Check-in Differences
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Difference From 0cef882bd89501bd To 42275338bd7b6ebc

2018-06-10
09:47
implementing the SQL function GetSpatialIndexExtent() check-in: 19c19ee8ae user: sandro tags: trunk
2018-06-05
15:20
fixing the build scripts supporting MSVC check-in: 0cef882bd8 user: sandro tags: trunk
12:03
SqlProc_CookedSQL, SqlProc_Execute and StoredProc_Execute now supportig up to 64 arguments check-in: 59d590947f user: sandro tags: trunk
2015-05-05
22:10
adding two missing files from the previous commit check-in: 1b63c8b896 user: sandro tags: trunk
22:00
implementing the Affine Transformations module (ATM) check-in: 42275338bd user: sandro tags: trunk
2015-04-28
12:48
enhancing GPKG for better compatibility with ESRI check-in: 4eb1d857a3 user: sandro tags: trunk

Added Android.mk.



































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
LOCAL_PATH:= $(call my-dir)/..

include ${CLEAR_VARS}

LOCAL_SRC_FILES := \
 src/gaiaaux/gg_sqlaux.c \
  src/gaiaexif/gaia_exif.c \
  src/gaiageo/gg_advanced.c \
  src/gaiageo/gg_endian.c \
  src/gaiageo/gg_ewkt.c \
  src/gaiageo/gg_geodesic.c \
  src/gaiageo/gg_geoJSON.c \
  src/gaiageo/gg_geometries.c \
  src/gaiageo/gg_geoscvt.c \
  src/gaiageo/gg_gml.c \
  src/gaiageo/gg_kml.c \
  src/gaiageo/gg_relations.c \
  src/gaiageo/gg_transform.c \
  src/gaiageo/gg_vanuatu.c \
  src/gaiageo/gg_wkb.c \
  src/gaiageo/gg_wkt.c \
  src/spatialite/mbrcache.c \
  src/spatialite/spatialite.c \
  src/spatialite/virtualfdo.c \
  src/spatialite/virtualnetwork.c \
  src/spatialite/virtualspatialindex.c \
  src/srsinit/srs_init.c \
  src/versioninfo/version.c

LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/jni/src/headers \
    $(LOCAL_PATH)/src/headers \
    $(LOCAL_PATH)/../SQLite

LOCAL_MODULE := spatialite

LOCAL_LDLIBS := -ldl -llog

LOCAL_CFLAGS := \
  -fvisibility=hidden \
  -DOMIT_GEOCALLBACKS \
  -DOMIT_GEOS \
  -DOMIT_PROJ \
  -DOMIT_EPSG \
  -DOMIT_ICONV \
  -DVERSION="\"3.0.2\""

include $(BUILD_SHARED_LIBRARY)

Deleted Android_3.0.2.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
LOCAL_PATH:= $(call my-dir)/..

include ${CLEAR_VARS}

LOCAL_SRC_FILES := \
 src/gaiaaux/gg_sqlaux.c \
  src/gaiaexif/gaia_exif.c \
  src/gaiageo/gg_advanced.c \
  src/gaiageo/gg_endian.c \
  src/gaiageo/gg_ewkt.c \
  src/gaiageo/gg_geodesic.c \
  src/gaiageo/gg_geoJSON.c \
  src/gaiageo/gg_geometries.c \
  src/gaiageo/gg_geoscvt.c \
  src/gaiageo/gg_gml.c \
  src/gaiageo/gg_kml.c \
  src/gaiageo/gg_relations.c \
  src/gaiageo/gg_transform.c \
  src/gaiageo/gg_vanuatu.c \
  src/gaiageo/gg_wkb.c \
  src/gaiageo/gg_wkt.c \
  src/spatialite/mbrcache.c \
  src/spatialite/spatialite.c \
  src/spatialite/virtualfdo.c \
  src/spatialite/virtualnetwork.c \
  src/spatialite/virtualspatialindex.c \
  src/srsinit/srs_init.c \
  src/versioninfo/version.c

LOCAL_C_INCLUDES := \
    $(LOCAL_PATH)/jni/src/headers \
    $(LOCAL_PATH)/src/headers \
    $(LOCAL_PATH)/../SQLite

LOCAL_MODULE := spatialite

LOCAL_LDLIBS := -ldl -llog

LOCAL_CFLAGS := \
  -fvisibility=hidden \
  -DOMIT_GEOCALLBACKS \
  -DOMIT_GEOS \
  -DOMIT_PROJ \
  -DOMIT_EPSG \
  -DOMIT_ICONV \
  -DVERSION="\"3.0.2\""

include $(BUILD_SHARED_LIBRARY)

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































Added Android_4.2.0.mk.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -------------------
# Android_4.2.0.mk
# ndk-build clean
# ndk-build
# -------------------
LOCAL_PATH := $(call my-dir)
JSQLITE_PATH := javasqlite-20120209
SPATIALITE_PATH := libspatialite-4.2.0-rc1
GEOS_PATH := geos-3.4.2
PROJ4_PATH := proj-4.8.0
SQLITE_PATH := sqlite-amalgamation-3080403
ICONV_PATH := libiconv-1.13.1
XML2_PATH := libxml2-2.9.1
LZMA_PATH := xz-5.1.3alpha

include $(LOCAL_PATH)/iconv-1.13.1.mk
include $(LOCAL_PATH)/sqlite-3080403.mk
include $(LOCAL_PATH)/proj4-4.8.0.mk
include $(LOCAL_PATH)/geos-3.4.2.mk
include $(LOCAL_PATH)/libxml2-2.9.1.mk
include $(LOCAL_PATH)/lzma-xz-5.1.3a.mk
include $(LOCAL_PATH)/spatialite-4.2.0.mk
include $(LOCAL_PATH)/jsqlite-20120209.mk

Deleted Android_4.3.0.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -------------------
# Android_4.3.0.mk
# [from 'jni/' directory]
# ndk-build clean
# ndk-build
# -------------------
LOCAL_PATH := $(call my-dir)
JSQLITE_PATH := javasqlite-20120209
SPATIALITE_PATH := libspatialite-4.3.0
GEOS_PATH := geos-3.4.2
PROJ4_PATH := proj-4.9.1
SQLITE_PATH := sqlite-amalgamation-3081002
ICONV_PATH := libiconv-1.13.1
XML2_PATH := libxml2-2.9.1
LZMA_PATH := xz-5.1.3alpha

include $(LOCAL_PATH)/iconv-1.13.1.mk
include $(LOCAL_PATH)/sqlite-3081002.mk
include $(LOCAL_PATH)/proj4-4.9.1.mk
include $(LOCAL_PATH)/geos-3.4.2.mk
include $(LOCAL_PATH)/libxml2-2.9.1.mk
include $(LOCAL_PATH)/lzma-xz-5.1.3a.mk
include $(LOCAL_PATH)/spatialite-4.3.0.mk
include $(LOCAL_PATH)/jsqlite-20120209.mk
$(call import-module,android/cpufeatures)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Deleted Android_4.4.0.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -------------------
# Android_4.4.0.mk
# [from 'jni/' directory]
# ndk-build clean
# ndk-build
# OR
# ndk-build clean ; ndk-build
# -------------------
# As of 2017-01-18
# -------------------
# changes:
# - geos-3.6.1
# - proj4-3.9.3
# - rttopo 1.1.0-dev
# - json-c-0.12
# - spatialite [4.4.0-20170118]
# -------------------
LOCAL_PATH := $(call my-dir)
JSQLITE_PATH := javasqlite-20120209
SPATIALITE_PATH := libspatialite-4.4.0
GEOS_PATH := geos-3.6.1
JSONC_PATH := json-c-0.12
RTTOPO_PATH := librttopo-20161220
PROJ4_PATH := proj-4.9.3
SQLITE_PATH := sqlite-amalgamation-3081002
ICONV_PATH := libiconv-1.13.1
XML2_PATH := libxml2-2.9.1
LZMA_PATH := xz-5.2.1

include $(LOCAL_PATH)/iconv-1.13.1.mk
include $(LOCAL_PATH)/sqlite-3081002.mk
include $(LOCAL_PATH)/proj4-4.9.3.mk
include $(LOCAL_PATH)/geos-3.6.1.mk
include $(LOCAL_PATH)/json-c-0.12.mk
include $(LOCAL_PATH)/librttopo-1.1.0.mk
include $(LOCAL_PATH)/libxml2-2.9.1.mk
include $(LOCAL_PATH)/lzma-xz-5.2.1.mk
include $(LOCAL_PATH)/spatialite-4.4.0.mk
include $(LOCAL_PATH)/jsqlite-20120209.mk
$(call import-module,android/cpufeatures)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































Changes to Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ACLOCAL_AMFLAGS = -I m4

AUTOMAKE_OPTIONS = dist-zip foreign

EXTRA_DIST = makefile.vc nmake.opt \
	makefile64.vc nmake64.opt \
	makefile_mod.vc nmake_mod.opt \
	makefile_mod64.vc nmake_mod64.opt \
	Android_3.0.2.mk Android_4.3.0.mk \
	spatialite-4.3.0.mk Android_4.4.0.mk spatialite-4.4.0.mk \
	mainpage.doxy README.coverage spatialite-sql-latest.html \
	config-msvc.h

if ENABLE_EXAMPLES
EXAMPLES = examples
endif

SUBDIRS = src test $(EXAMPLES)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spatialite.pc

coverage-init:
	lcov --directory src --capture --initial --output-file libspatialite_cov.info


coverage::
	lcov --rc lcov_branch_coverage=1 --directory src --output-file libspatialite_cov.info --capture
	lcov --rc lcov_branch_coverage=1 --remove libspatialite_cov.info "*/src/gaiageo/*Lexer.l" --output-file libspatialite_cov.info
	genhtml --rc lcov_branch_coverage=1 -o covresults libspatialite_cov.info

MOSTLYCLEANFILES = libspatialite_cov.info


|

|
<
<
<
<
<
|
|













<

|
<
|


1
2
3
4
5





6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

21
22

23
24
25
ACLOCAL_AMFLAGS = -I m4

AUTOMAKE_OPTIONS = dist-zip

EXTRA_DIST = makefile.vc nmake.opt Android.mk Android_4.2.0.mk \





	spatialite-4.2.0.mk mainpage.doxy README.coverage \
	spatialite-sql-latest.html config-msvc.h

if ENABLE_EXAMPLES
EXAMPLES = examples
endif

SUBDIRS = src test $(EXAMPLES)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spatialite.pc

coverage-init:
	lcov --directory src --capture --initial --output-file libspatialite_cov.info


coverage::
	lcov --directory src --output-file libspatialite_cov.info --capture

	genhtml -o covresults libspatialite_cov.info

MOSTLYCLEANFILES = libspatialite_cov.info

Changes to Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91






92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
...
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
...
396
397
398
399
400
401
402

403
404
405
406
407
408
409
...
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
...
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
...
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
...
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .






ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
	$(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = Doxyfile spatialite.pc
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
................................................................................
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = src test examples
am__DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.in \
	$(srcdir)/config.h.in $(srcdir)/spatialite.pc.in AUTHORS \
	COPYING INSTALL README compile config.guess config.sub depcomp \
	install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
  if test -d "$(distdir)"; then \
    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
      && rm -rf "$(distdir)" \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-zip foreign
EXTRA_DIST = makefile.vc nmake.opt \
	makefile64.vc nmake64.opt \
	makefile_mod.vc nmake_mod.opt \
	makefile_mod64.vc nmake_mod64.opt \
	Android_3.0.2.mk Android_4.3.0.mk \
	spatialite-4.3.0.mk Android_4.4.0.mk spatialite-4.4.0.mk \
	mainpage.doxy README.coverage spatialite-sql-latest.html \
	config-msvc.h

@ENABLE_EXAMPLES_TRUE@EXAMPLES = examples
SUBDIRS = src test $(EXAMPLES)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spatialite.pc
MOSTLYCLEANFILES = libspatialite_cov.info
all: config.h
................................................................................
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    echo ' $(SHELL) ./config.status'; \
	    $(SHELL) ./config.status;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
................................................................................
	|| find "$(distdir)" -type d ! -perm -755 \
		-exec chmod u+rwx,go+rx {} \; -o \
	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
	|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
	$(am__post_remove_distdir)

dist-bzip2: distdir
	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
	$(am__post_remove_distdir)

dist-lzip: distdir
................................................................................
	$(am__post_remove_distdir)

dist-xz: distdir
	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
	$(am__post_remove_distdir)

dist-tarZ: distdir
	@echo WARNING: "Support for distribution archives compressed with" \
		       "legacy program 'compress' is deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
	$(am__post_remove_distdir)

dist-shar: distdir
	@echo WARNING: "Support for shar distribution archives is" \
	               "deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
	$(am__post_remove_distdir)
dist-zip: distdir
	-rm -f $(distdir).zip
	zip -rq $(distdir).zip $(distdir)
	$(am__post_remove_distdir)

dist dist-all:
................................................................................

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	case '$(DIST_ARCHIVES)' in \
	*.tar.gz*) \
	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
	*.tar.bz2*) \
	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
	*.tar.lz*) \
	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
	*.tar.xz*) \
	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
	*.tar.Z*) \
	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
	*.shar.gz*) \
	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
	*.zip*) \
	  unzip $(distdir).zip ;;\
	esac
	chmod -R a-w $(distdir)
	chmod u+w $(distdir)
	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
	chmod a-w $(distdir)
	test -d $(distdir)/_build || exit 0; \
	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
	  && am__cwd=`pwd` \
	  && $(am__cd) $(distdir)/_build/sub \
	  && ../../configure \
	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	    --srcdir=../.. --prefix="$$dc_install_base" \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
................................................................................
	install-man install-pdf install-pdf-am install-pkgconfigDATA \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am uninstall-pkgconfigDATA

.PRECIOUS: Makefile


coverage-init:
	lcov --directory src --capture --initial --output-file libspatialite_cov.info

coverage::
	lcov --rc lcov_branch_coverage=1 --directory src --output-file libspatialite_cov.info --capture
	lcov --rc lcov_branch_coverage=1 --remove libspatialite_cov.info "*/src/gaiageo/*Lexer.l" --output-file libspatialite_cov.info
	genhtml --rc lcov_branch_coverage=1 -o covresults libspatialite_cov.info

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>







<
<







 







<
<
<
<







 







|
|
<
<
<
<
<
|
|







 







>







 







|







 







|
|





|
|

|







 







|









|





|





|
|


|







 







<
<





|
<
|




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94


95
96
97
98
99
100
101
...
180
181
182
183
184
185
186




187
188
189
190
191
192
193
...
352
353
354
355
356
357
358
359
360





361
362
363
364
365
366
367
368
369
...
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
...
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
...
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
...
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
...
871
872
873
874
875
876
877


878
879
880
881
882
883

884
885
886
887
888
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/configure $(am__configure_deps) \
	$(srcdir)/config.h.in $(srcdir)/Doxyfile.in \
	$(srcdir)/spatialite.pc.in AUTHORS COPYING INSTALL README \
	compile config.guess config.sub depcomp install-sh missing \
	ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)


am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = Doxyfile spatialite.pc
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
................................................................................
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = src test examples




DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
  if test -d "$(distdir)"; then \
    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
      && rm -rf "$(distdir)" \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-zip
EXTRA_DIST = makefile.vc nmake.opt Android.mk Android_4.2.0.mk \





	spatialite-4.2.0.mk mainpage.doxy README.coverage \
	spatialite-sql-latest.html config-msvc.h

@ENABLE_EXAMPLES_TRUE@EXAMPLES = examples
SUBDIRS = src test $(EXAMPLES)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = spatialite.pc
MOSTLYCLEANFILES = libspatialite_cov.info
all: config.h
................................................................................
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    echo ' $(SHELL) ./config.status'; \
	    $(SHELL) ./config.status;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
................................................................................
	|| find "$(distdir)" -type d ! -perm -755 \
		-exec chmod u+rwx,go+rx {} \; -o \
	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
	|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
	$(am__post_remove_distdir)

dist-bzip2: distdir
	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
	$(am__post_remove_distdir)

dist-lzip: distdir
................................................................................
	$(am__post_remove_distdir)

dist-xz: distdir
	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
	$(am__post_remove_distdir)

dist-tarZ: distdir
	@echo WARNING: "Support for shar distribution archives is" \
	               "deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
	$(am__post_remove_distdir)

dist-shar: distdir
	@echo WARNING: "Support for distribution archives compressed with" \
		       "legacy program 'compress' is deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
	$(am__post_remove_distdir)
dist-zip: distdir
	-rm -f $(distdir).zip
	zip -rq $(distdir).zip $(distdir)
	$(am__post_remove_distdir)

dist dist-all:
................................................................................

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	case '$(DIST_ARCHIVES)' in \
	*.tar.gz*) \
	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
	*.tar.bz2*) \
	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
	*.tar.lz*) \
	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
	*.tar.xz*) \
	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
	*.tar.Z*) \
	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
	*.shar.gz*) \
	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
	*.zip*) \
	  unzip $(distdir).zip ;;\
	esac
	chmod -R a-w $(distdir)
	chmod u+w $(distdir)
	mkdir $(distdir)/_build $(distdir)/_inst
	chmod a-w $(distdir)
	test -d $(distdir)/_build || exit 0; \
	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
	  && am__cwd=`pwd` \
	  && $(am__cd) $(distdir)/_build \
	  && ../configure \
	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	    --srcdir=.. --prefix="$$dc_install_base" \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
................................................................................
	install-man install-pdf install-pdf-am install-pkgconfigDATA \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am uninstall-pkgconfigDATA




coverage-init:
	lcov --directory src --capture --initial --output-file libspatialite_cov.info

coverage::
	lcov --directory src --output-file libspatialite_cov.info --capture

	genhtml -o covresults libspatialite_cov.info

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to aclocal.m4.

1
2
3
4
5
6
7
8
9
10
..
16
17
18
19
20
21
22
23
24
25

26
27
28

29
30
31
32
33

34
35
36
37
38

39
40
41
42
43

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
..
94
95
96
97
98
99
100
101
102
103
104
105
106

107
108
109

110
111
112
113

114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157


158
159
160



161
162
163
164
165
166
167
...
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
...
375
376
377
378
379
380
381
382

383
384
385
386
387
388
389
390
391
392
393
394
395
396
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
...
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
...
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
...
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
...
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
...
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
...
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
...
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
....
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
....
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
....
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
....
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
....
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
....
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
....
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
....
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
....
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
....
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
# generated automatically by aclocal 1.15 -*- Autoconf -*-

# Copyright (C) 1996-2014 Free Software Foundation, Inc.

# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])

dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
dnl serial 11 (pkg-config-0.29.1)
dnl

dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl

dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl

dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl

dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl

dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.

dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.1])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ

dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
................................................................................
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
		AC_MSG_RESULT([yes])
	else
		AC_MSG_RESULT([no])
		PKG_CONFIG=""
	fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG

dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl

dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl

dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually

AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  m4_default([$2], [:])
m4_ifvaln([$3], [else
  $3])dnl
fi])

dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
    pkg_cv_[]$1="$$1"
 elif test -n "$PKG_CONFIG"; then
    PKG_CHECK_EXISTS([$3],
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes ],
		     [pkg_failed=yes])
 else
    pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG

dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED


dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl   [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl


dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac



AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl

pkg_failed=no
AC_MSG_CHECKING([for $1])
................................................................................
        ])
else
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
        AC_MSG_RESULT([yes])
	$3
fi[]dnl
])dnl PKG_CHECK_MODULES


dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl   [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC


dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
    [pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
    [with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR


dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
    [with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR


dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl

_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])

AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR

# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version.  Point them to the right macro.
m4_if([$1], [1.15], [],
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])

# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too.  Using m4_define simplifies
................................................................................
m4_define([_AM_AUTOCONF_VERSION], [])

# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])

# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-

# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
................................................................................
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH.  The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.

AC_DEFUN([AM_AUX_DIR_EXPAND],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl

# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`
])

# AM_CONDITIONAL                                            -*- Autoconf -*-

# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
................................................................................
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])

# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.


# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
................................................................................
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])

# Generate code to set up dependency tracking.              -*- Autoconf -*-

# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.


# _AM_OUTPUT_DEPENDENCY_COMMANDS
................................................................................
[AC_CONFIG_COMMANDS([depfiles],
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])

# Do all the work for Automake.                             -*- Autoconf -*-

# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This macro actually does too much.  Some checks are only needed if
# your package does certain things.  But this isn't really a big deal.
................................................................................
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver).  The
# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
			     [_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
................................................................................
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.

END
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  fi
fi
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])

dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])

................................................................................
      break ;;
    * )
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])

# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi
AC_SUBST([install_sh])])

# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# Check whether the underlying file-system supports filenames
# with a leading dot.  For instance MS-DOS doesn't.
................................................................................
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])

# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
# From Jim Meyering

# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
................................................................................
  MAINT=$MAINTAINER_MODE_TRUE
  AC_SUBST([MAINT])dnl
]
)

# Check to see how 'make' treats includes.	            -*- Autoconf -*-

# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_MAKE_INCLUDE()
# -----------------
................................................................................
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])

# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-

# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
................................................................................
fi
])

#  -*- Autoconf -*-
# Obsolete and "removed" macros, that must however still report explicit
# error messages when used, to smooth transition.
#
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

AC_DEFUN([AM_CONFIG_HEADER],
[AC_DIAGNOSE([obsolete],
................................................................................

AC_DEFUN([AM_C_PROTOTYPES],
         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])

# Helper functions for option handling.                     -*- Autoconf -*-

# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_MANGLE_OPTION(NAME)
# -----------------------
................................................................................

# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])

# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_PROG_CC_C_O
# ---------------
................................................................................
   CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])

# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])

# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_RUN_LOG(COMMAND)
# -------------------
................................................................................
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   (exit $ac_status); }])

# Check to make sure that the build environment is sane.    -*- Autoconf -*-

# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_SANITY_CHECK
# ---------------
................................................................................
     # Hide warnings about reused PIDs.
     wait $am_sleep_pid 2>/dev/null
   fi
   AC_MSG_RESULT([done])])
rm -f conftest.file
])

# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_SILENT_RULES([DEFAULT])
# --------------------------
................................................................................
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])

# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_PROG_INSTALL_STRIP
# ---------------------
................................................................................
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
  AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])

# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
................................................................................
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])

# Check how to create a tarball.                            -*- Autoconf -*-

# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_PROG_TAR(FORMAT)
# --------------------
|

|







 







|
|
<
>
|
<
<
>
|
|
|
|
<
>
|
|
|
|
<
>
|
|
|
<
<
>
|
|
|
|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<







 







|

|
<
<
<
>
|
|
<
>
|
|
|
|
>









|
|
<
<











|

|
|
<







|


|
|
<
<
<
>
>
|
|
|
>
>
>







 







|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
|
|
|
|
|










|


|
|
<
<
|
|
|
|
|










|


|
|
|
<
<
|








|

|











|


|







 







|






|







 







|
>
|
|




|







 







|







 







|







 







|







 







|
|







 







|
<
<
<
<







 







|










|









|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
..
16
17
18
19
20
21
22
23
24

25
26


27
28
29
30
31

32
33
34
35
36

37
38
39
40


41
42
43
44
45

46





















47
48







49
50
51
52
53
54
55
..
63
64
65
66
67
68
69
70
71
72



73
74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
116
117
118
119



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
174
175
176
177
178
179
180
181
182
183






















184
185


186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205


206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226


227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
...
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
...
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
...
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
...
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
...
784
785
786
787
788
789
790
791




792
793
794
795
796
797
798
...
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
...
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
...
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
...
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
...
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
....
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
....
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
....
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
....
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
....
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
....
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
....
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
....
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-

# Copyright (C) 1996-2013 Free Software Foundation, Inc.

# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])

# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
# serial 1 (pkg-config-0.24)

# 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.


#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.

#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.























# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------







AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
................................................................................
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
		AC_MSG_RESULT([yes])
	else
		AC_MSG_RESULT([no])
		PKG_CONFIG=""
	fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG

# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])



#
# Check to see whether a particular set of modules exists.  Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.

#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  m4_default([$2], [:])
m4_ifvaln([$3], [else
  $3])dnl
fi])

# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------


m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
    pkg_cv_[]$1="$$1"
 elif test -n "$PKG_CONFIG"; then
    PKG_CHECK_EXISTS([$3],
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
		      test "x$?" != "x0" && pkg_failed=yes ],
		     [pkg_failed=yes])
 else
    pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG

# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------

AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED


# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])



#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl

pkg_failed=no
AC_MSG_CHECKING([for $1])
................................................................................
        ])
else
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
        AC_MSG_RESULT([yes])
	$3
fi[]dnl
])# PKG_CHECK_MODULES
























# PKG_INSTALLDIR(DIRECTORY)
# -------------------------


# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
    [pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
    [with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR


# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------


# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
    [with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR


# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------


# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl

_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])

AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR

# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version.  Point them to the right macro.
m4_if([$1], [1.14.1], [],
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])

# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too.  Using m4_define simplifies
................................................................................
m4_define([_AM_AUTOCONF_VERSION], [])

# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.14.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])

# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-

# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
................................................................................
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH.  The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.

AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])

# AM_CONDITIONAL                                            -*- Autoconf -*-

# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
................................................................................
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])

# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.


# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
................................................................................
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])

# Generate code to set up dependency tracking.              -*- Autoconf -*-

# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.


# _AM_OUTPUT_DEPENDENCY_COMMANDS
................................................................................
[AC_CONFIG_COMMANDS([depfiles],
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])

# Do all the work for Automake.                             -*- Autoconf -*-

# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This macro actually does too much.  Some checks are only needed if
# your package does certain things.  But this isn't really a big deal.
................................................................................
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target.  The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
			     [_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
................................................................................
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.

END
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  fi
fi])





dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])

................................................................................
      break ;;
    * )
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])

# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi
AC_SUBST([install_sh])])

# Copyright (C) 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# Check whether the underlying file-system supports filenames
# with a leading dot.  For instance MS-DOS doesn't.
................................................................................
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])

# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
# From Jim Meyering

# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
................................................................................
  MAINT=$MAINTAINER_MODE_TRUE
  AC_SUBST([MAINT])dnl
]
)

# Check to see how 'make' treats includes.	            -*- Autoconf -*-

# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_MAKE_INCLUDE()
# -----------------
................................................................................
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])

# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-

# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
................................................................................
fi
])

#  -*- Autoconf -*-
# Obsolete and "removed" macros, that must however still report explicit
# error messages when used, to smooth transition.
#
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

AC_DEFUN([AM_CONFIG_HEADER],
[AC_DIAGNOSE([obsolete],
................................................................................

AC_DEFUN([AM_C_PROTOTYPES],
         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])

# Helper functions for option handling.                     -*- Autoconf -*-

# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_MANGLE_OPTION(NAME)
# -----------------------
................................................................................

# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])

# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_PROG_CC_C_O
# ---------------
................................................................................
   CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])

# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])

# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_RUN_LOG(COMMAND)
# -------------------
................................................................................
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
   (exit $ac_status); }])

# Check to make sure that the build environment is sane.    -*- Autoconf -*-

# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_SANITY_CHECK
# ---------------
................................................................................
     # Hide warnings about reused PIDs.
     wait $am_sleep_pid 2>/dev/null
   fi
   AC_MSG_RESULT([done])])
rm -f conftest.file
])

# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_SILENT_RULES([DEFAULT])
# --------------------------
................................................................................
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])

# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_PROG_INSTALL_STRIP
# ---------------------
................................................................................
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
  AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])

# Copyright (C) 2006-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
................................................................................
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])

# Check how to create a tarball.                            -*- Autoconf -*-

# Copyright (C) 2004-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# _AM_PROG_TAR(FORMAT)
# --------------------

Changes to compile.

1
/usr/share/automake-1.15/compile
|
1
/usr/share/automake-1.14/compile

Changes to config-msvc.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */
/* 
/ Sandro: manually adjusted so to support the MSVC compiler 
/         using the OsGeo4W libraries
*/

/* Should be defined in order to enable GCP support. */
/* #undef ENABLE_GCP */

/* Should be defined in order to enable GeoPackage support. */
/* #undef ENABLE_GEOPACKAGE */

/* Should be defined in order to enable LIBXML2 support. */
#define ENABLE_LIBXML2 1

/* Should be defined in order to enable RTTOPO support. */
/* #define ENABLE_RTTOPO */

/* Should be defined in order to enable GEOS_ADVANCED support. */
#define GEOS_ADVANCED 1

/* Should be defined in order to fully disable GEOS non-thread-safe API. */
/* #undef GEOS_ONLY_REENTRANT */

/* Should be defined in order to enable GEOS_REENTRANT (fully thread-safe). */
#define GEOS_REENTRANT 1

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `fdatasync' function. */
#define HAVE_FDATASYNC 1

/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1

/* Define to 1 if you have the <freexl.h> header file. */
#define HAVE_FREEXL_H 1

................................................................................
/* Define to 1 if you have the <iconv.h> header file. */
#define HAVE_ICONV_H 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <liblwgeom.h> header file. */
/* #undef HAVE_LIBLWGEOM_H */

/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
#define HAVE_LIBSQLITE3 1

/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1

/* Define to 1 if you have the `localtime_r' function. */
#define HAVE_LOCALTIME_R 1

/* Define to 1 if `lstat' has the bug that it succeeds when given the
   zero-length file name argument. */
/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */

/* Define to 1 if you have the <math.h> header file. */
#define HAVE_MATH_H 1

/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1

................................................................................
/* Define to 1 if you have the <sqlite3ext.h> header file. */
#define HAVE_SQLITE3EXT_H 1

/* Define to 1 if you have the <sqlite3.h> header file. */
#define HAVE_SQLITE3_H 1

/* Define to 1 if you have the `sqrt' function. */
/* #undef HAVE_SQRT */

/* Define to 1 if `stat' has the bug that it succeeds when given the
   zero-length file name argument. */
/* #undef HAVE_STAT_EMPTY_STRING_BUG */

/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
................................................................................
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1

/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1

/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1

................................................................................
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1

/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

................................................................................
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1

/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
   slash. */
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1

/* Define to the sub-directory in which libtool stores uninstalled libraries.
   */
#define LT_OBJDIR ".libs/"

/* Must be defined in order to disable debug mode. */
#define NDEBUG 1
................................................................................
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "a.furieri@lqt.it"

/* Define to the full name of this package. */
#define PACKAGE_NAME "libspatialite"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libspatialite 5.0.0-devel"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libspatialite"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "5.0.0-devel1"

/* Should be defined when linking liblwgeom from PostGIS 2.1 (or later). */
/* #undefine POSTGIS_2_1 */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Should contain a text-string describing the intended target CPU */
#define TARGET_CPU "Win32"

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

/* Version number of package */
#define VERSION "5.0.0-devel"

/* Must be =64 in order to enable huge-file support. */
#define _FILE_OFFSET_BITS 64

/* Must be defined in order to enable huge-file support. */
#define _LARGEFILE_SOURCE 1








<
<
<






|
|




|
|

<
<
<

|





|







 







|








|



|







 







|







 







|







 







|







 







|







 







|








|


|





|








|







1
2
3
4
5
6
7



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
..
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
..
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
...
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */
/* 
/ Sandro: manually adjusted so to support the MSVC compiler 
/         using the OsGeo4W libraries
*/




/* Should be defined in order to enable GeoPackage support. */
/* #undef ENABLE_GEOPACKAGE */

/* Should be defined in order to enable LIBXML2 support. */
#define ENABLE_LIBXML2 1

/* Should be defined in order to enable LWGEOM support. */
/* #undef ENABLE_LWGEOM */

/* Should be defined in order to enable GEOS_ADVANCED support. */
#define GEOS_ADVANCED 1

/* Should be defined in order to enable GEOS_TRUNK experimental support. */
/* #undef GEOS_TRUNK */




/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `fdatasync' function. */
/* #undef HAVE_FDATASYNC */

/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1

/* Define to 1 if you have the <freexl.h> header file. */
#define HAVE_FREEXL_H 1

................................................................................
/* Define to 1 if you have the <iconv.h> header file. */
#define HAVE_ICONV_H 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <liblwgeom.h> header file. */
#define HAVE_LIBLWGEOM_H 1

/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
#define HAVE_LIBSQLITE3 1

/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1

/* Define to 1 if you have the `localtime_r' function. */
/* #undef HAVE_LOCALTIME_R */

/* Define to 1 if `lstat' has the bug that it succeeds when given the
   zero-length file name argument. */
#define HAVE_LSTAT_EMPTY_STRING_BUG 1

/* Define to 1 if you have the <math.h> header file. */
#define HAVE_MATH_H 1

/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1

................................................................................
/* Define to 1 if you have the <sqlite3ext.h> header file. */
#define HAVE_SQLITE3EXT_H 1

/* Define to 1 if you have the <sqlite3.h> header file. */
#define HAVE_SQLITE3_H 1

/* Define to 1 if you have the `sqrt' function. */
#define HAVE_SQRT 1

/* Define to 1 if `stat' has the bug that it succeeds when given the
   zero-length file name argument. */
/* #undef HAVE_STAT_EMPTY_STRING_BUG */

/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
................................................................................
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */

/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1

/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1

................................................................................
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
/* #undef HAVE_STRNCASECMP */

/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

................................................................................
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the <zlib.h> header file. */
#define HAVE_ZLIB_H 1

/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
   slash. */
/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */

/* Define to the sub-directory in which libtool stores uninstalled libraries.
   */
#define LT_OBJDIR ".libs/"

/* Must be defined in order to disable debug mode. */
#define NDEBUG 1
................................................................................
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "a.furieri@lqt.it"

/* Define to the full name of this package. */
#define PACKAGE_NAME "libspatialite"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libspatialite 4.2.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libspatialite"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "4.2.0"

/* Should be defined when linking liblwgeom from PostGIS 2.1 (or later). */
/* #undef POSTGIS_2_1 1 */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Should contain a text-string describing the intended target CPU */
#define TARGET_CPU "msvc-32"

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

/* Version number of package */
#define VERSION "4.2.0-rc2"

/* Must be =64 in order to enable huge-file support. */
#define _FILE_OFFSET_BITS 64

/* Must be defined in order to enable huge-file support. */
#define _LARGEFILE_SOURCE 1

Changes to config.h.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
200
201
202
203
204
205
206



207
208
209
210
211
212
213
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Should be defined in order to enable GCP support. */
#undef ENABLE_GCP

/* Should be defined in order to enable GeoPackage support. */
#undef ENABLE_GEOPACKAGE

/* Should be defined in order to enable LIBXML2 support. */
#undef ENABLE_LIBXML2

/* Should be defined in order to enable RTTOPO support. */
#undef ENABLE_RTTOPO

/* Should be defined in order to enable GEOS_ADVANCED support. */
#undef GEOS_ADVANCED

/* Should be defined in order to fully disable GEOS non-thread-safe API. */
#undef GEOS_ONLY_REENTRANT

/* Should be defined in order to enable GEOS_REENTRANT (fully thread-safe). */
#undef GEOS_REENTRANT

/* depending on SQLite library version. */
#undef HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H

................................................................................

/* Define to 1 if you have the <iconv.h> header file. */
#undef HAVE_ICONV_H

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the <librttopo.h> header file. */
#undef HAVE_LIBRTTOPO_H

/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
#undef HAVE_LIBSQLITE3

/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ

................................................................................

/* Should be defined in order to disable GEOS support. */
#undef OMIT_GEOS

/* Should be defined in order to disable ICONV support. */
#undef OMIT_ICONV

/* Should be defined in order to disable KNN support. */
#undef OMIT_KNN

/* Should be defined in order to disable MATHSQL support. */
#undef OMIT_MATHSQL

/* Should be defined in order to disable PROJ.4 support. */
#undef OMIT_PROJ

/* Name of package */
................................................................................
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION




/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

/* Should contain a text-string describing the intended target CPU */
#undef TARGET_CPU



|
|







|
|




<
<
<
|
|
<
<
<







 







|
|







 







<
<
<







 







>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17



18
19



20
21
22
23
24
25
26
..
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
165
166
167
168
169
170
171



172
173
174
175
176
177
178
...
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Should be defined in order to enable CONTROL_POINTS support. */
#undef ENABLE_CONTROL_POINTS

/* Should be defined in order to enable GeoPackage support. */
#undef ENABLE_GEOPACKAGE

/* Should be defined in order to enable LIBXML2 support. */
#undef ENABLE_LIBXML2

/* Should be defined in order to enable LWGEOM support. */
#undef ENABLE_LWGEOM

/* Should be defined in order to enable GEOS_ADVANCED support. */
#undef GEOS_ADVANCED




/* Should be defined in order to enable GEOS_TRUNK experimental support. */
#undef GEOS_TRUNK




/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H

................................................................................

/* Define to 1 if you have the <iconv.h> header file. */
#undef HAVE_ICONV_H

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the <liblwgeom.h> header file. */
#undef HAVE_LIBLWGEOM_H

/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
#undef HAVE_LIBSQLITE3

/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ

................................................................................

/* Should be defined in order to disable GEOS support. */
#undef OMIT_GEOS

/* Should be defined in order to disable ICONV support. */
#undef OMIT_ICONV




/* Should be defined in order to disable MATHSQL support. */
#undef OMIT_MATHSQL

/* Should be defined in order to disable PROJ.4 support. */
#undef OMIT_PROJ

/* Name of package */
................................................................................
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* Should be defined when linking liblwgeom from PostGIS 2.1 (or later). */
#undef POSTGIS_2_1

/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

/* Should contain a text-string describing the intended target CPU */
#undef TARGET_CPU

Changes to configure.

1
2
3
4
5
6
7
8
9
10
...
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
...
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
...
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
....
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
....
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
....
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
....
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
....
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
....
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
....
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
....
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
....
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
....
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
....
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
....
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
.....
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
.....
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
.....
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
.....
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352


































18353
18354
18355

18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
.....
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
.....
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
.....
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
.....
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
.....
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
.....
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
.....
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libspatialite 5.0.0-devel.
#
# Report bugs to <a.furieri@lqt.it>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
................................................................................
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='libspatialite'
PACKAGE_TARNAME='libspatialite'
PACKAGE_VERSION='5.0.0-devel'
PACKAGE_STRING='libspatialite 5.0.0-devel'
PACKAGE_BUGREPORT='a.furieri@lqt.it'
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
................................................................................
LTLIBOBJS
ANDROID_FALSE
ANDROID_TRUE
MACOSX_FALSE
MACOSX_TRUE
MINGW_FALSE
MINGW_TRUE
MODULE_ONLY_FALSE
MODULE_ONLY_TRUE
ENABLE_EXAMPLES_FALSE
ENABLE_EXAMPLES_TRUE
ENABLE_GEOPACKAGE_FALSE
ENABLE_GEOPACKAGE_TRUE
LIBXML2_LIBS
LIBXML2_CFLAGS
PKG_CONFIG_LIBDIR
................................................................................
with_pic
enable_fast_install
with_gnu_ld
with_sysroot
enable_libtool_lock
enable_mathsql
enable_geocallbacks
enable_knn
enable_proj
enable_iconv
enable_freexl
enable_epsg
enable_geos
with_geosconfig
enable_gcp
enable_geosadvanced
enable_geosreentrant
with_geosonlyreentrant
enable_rttopo
enable_libxml2
enable_geopackage
enable_gcov
enable_examples
enable_module_only
'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures libspatialite 5.0.0-devel to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libspatialite 5.0.0-devel:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-mathsql        enables SQL math functions [default=yes]
  --enable-geocallbacks   enables geometry callbacks [default=no]
  --enable-knn            enables KNN support [default=yes]
  --enable-proj           enables PROJ.4 inclusion [default=yes]
  --enable-iconv          enables ICONV inclusion [default=yes]
  --enable-freexl         enables FreeXL inclusion [default=yes]
  --enable-epsg           enables full EPSG dataset support [default=yes]
  --enable-geos           enables GEOS inclusion [default=yes]
  --enable-gcp            enables Control Points (from Grass GIS) [default=no]
  --enable-geosadvanced   enables GEOS advanced features [default=yes]
  --enable-geosreentrant  enables GEOS reentrant (fully thread safe)
                          [default=yes]
  --enable-rttopo         enables RTTOPO support [default=no]
  --enable-libxml2        enables libxml2 inclusion [default=yes]
  --enable-geopackage     enables GeoPackage support [default=yes]
  --enable-gcov           turn on code coverage analysis tools
  --enable-examples       enables building examples [default=yes]
  --enable-module-only    builds only mod_spatialite alone [default=no]

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic              try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot=DIR Search for dependent libraries within DIR
                        (or the compiler's sysroot if not specified).
  --with-geosconfig=FILE  specify an alternative geos-config file
  --with-geosonlyreentrant
                          completely disables GEOS non-thread safe API
                          [default=no]

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
libspatialite configure 5.0.0-devel
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
................................................................................
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_type

# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
# accordingly.
ac_fn_c_check_decl ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  as_decl_name=`echo $2|sed 's/ *(.*//'`
  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
if eval \${$3+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main ()
{
#ifndef $as_decl_name
#ifdef __cplusplus
  (void) $as_decl_use;
#else
  (void) $as_decl_name;
#endif
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  eval "$3=yes"
else
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_decl
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libspatialite $as_me 5.0.0-devel, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
................................................................................
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



am__api_version='1.15'

ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
................................................................................
test "$program_suffix" != NONE &&
  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`

# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`

if test x"${MISSING+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  *)
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
................................................................................
  am_missing_run="$MISSING "
else
  am_missing_run=
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi

if test x"${install_sh+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi
................................................................................
    CYGPATH_W=echo
  fi
fi


# Define the identity of the package.
 PACKAGE='libspatialite'
 VERSION='5.0.0-devel'


cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF


................................................................................

# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'

# We need awk for the "check" target (and possibly the TAP driver).  The
# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility.  Yes, it's still used
# in the wild :-(  We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'


# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar  pax cpio none'
................................................................................
to "yes", and re-run configure.

END
    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
  fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
    # Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
  USE_MAINTAINER_MODE=no
................................................................................

# disabling debug support

$as_echo "#define NDEBUG 1" >>confdefs.h


# config depending options









................................................................................
  LIBS="-lz $LIBS"

else
  as_fn_error $? "'libz' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi


ac_config_files="$ac_config_files Makefile src/Makefile src/headers/Makefile src/gaiaaux/Makefile src/gaiaexif/Makefile src/gaiageo/Makefile src/gaiageo/flex/Makefile src/gaiageo/lemon/Makefile src/gaiageo/lemon/lemon_src/Makefile src/geopackage/Makefile src/spatialite/Makefile src/shapefiles/Makefile src/dxf/Makefile src/md5/Makefile src/control_points/Makefile src/cutter/Makefile src/topology/Makefile src/srsinit/Makefile src/srsinit/epsg_update/Makefile src/stored_procedures/Makefile src/connection_cache/Makefile src/connection_cache/generator/Makefile src/virtualtext/Makefile src/wfs/Makefile test/Makefile test/sql_stmt_tests/Makefile test/sql_stmt_geos_tests/Makefile test/sql_stmt_geosadvanced_tests/Makefile test/sql_stmt_geopackage_tests/Makefile test/sql_stmt_gpkg_epsg492_tests/Makefile test/sql_stmt_gpkg_epsg493_tests/Makefile test/sql_stmt_proj_tests/Makefile test/sql_stmt_proj492_tests/Makefile test/sql_stmt_proj493_tests/Makefile test/sql_stmt_mathsql_tests/Makefile test/sql_stmt_rtgeom_tests/Makefile test/sql_stmt_rttopo_tests/Makefile test/sql_stmt_libxml2_tests/Makefile test/sql_stmt_security_tests/Makefile test/sql_stmt_xmlsec_tests/Makefile test/sql_stmt_freexl_tests/Makefile test/sql_stmt_cache_tests/Makefile test/sql_stmt_gpkgcache_tests/Makefile test/sql_stmt_nocache_tests/Makefile test/sql_stmt_gpkgnocache_tests/Makefile test/sql_stmt_voronoj1_tests/Makefile test/sql_stmt_voronoj2_tests/Makefile test/sql_stmt_sequence_tests/Makefile test/sql_stmt_routing_tests/Makefile test/sql_stmt_logfile_tests/Makefile test/sql_stmt_iconv_tests/Makefile test/sql_stmt_point_geom/Makefile test/sql_stmt_tiny_point/Makefile examples/Makefile Doxyfile spatialite.pc"


# exporting the TARGET_CPU string
splite_cpu=`$CC -dumpmachine`
cat >>confdefs.h <<_ACEOF
#define TARGET_CPU "$splite_cpu"
_ACEOF
................................................................................
else
  as_fn_error $? "obsolete 'libsqlite3' (< v.3.7.3). please retry specifying: --disable-geocallbacks" "$LINENO" 5
fi

else
  $as_echo "#define OMIT_GEOCALLBACKS 1" >>confdefs.h

fi
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-knn
#
# Check whether --enable-knn was given.
if test "${enable_knn+set}" = set; then :
  enableval=$enable_knn;
else
  enable_knn=yes
fi

if test x"$enable_knn" == "xyes"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_rtree_query_callback in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_rtree_query_callback in -lsqlite3... " >&6; }
if ${ac_cv_lib_sqlite3_sqlite3_rtree_query_callback+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite3 -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char sqlite3_rtree_query_callback ();
int
main ()
{
return sqlite3_rtree_query_callback ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_sqlite3_sqlite3_rtree_query_callback=yes
else
  ac_cv_lib_sqlite3_sqlite3_rtree_query_callback=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_rtree_query_callback" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_rtree_query_callback" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_rtree_query_callback" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSQLITE3 1
_ACEOF

  LIBS="-lsqlite3 $LIBS"

else
  as_fn_error $? "obsolete 'libsqlite3' (< v.3.8.5). please retry specifying: --disable-knn" "$LINENO" 5
fi

else
  $as_echo "#define OMIT_KNN 1" >>confdefs.h

fi
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-proj
#
# Check whether --enable-proj was given.
................................................................................

  LIBS="$LIBS_SAVE"
  LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"

  #-----------------------------------------------------------------------
  #   --enable-controlpoints
  #
  # Check whether --enable-gcp was given.
if test "${enable_gcp+set}" = set; then :
  enableval=$enable_gcp;
else
  enable_gcp=no
fi

  if test x"$enable_gcp" != "xno"; then
	  $as_echo "#define ENABLE_GCP 1" >>confdefs.h

  fi

  #-----------------------------------------------------------------------
  #   --enable-geosadvanced
  #
  # Check whether --enable-geosadvanced was given.
................................................................................
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GEOSDelaunayTriangulation" >&5
$as_echo "$ac_cv_search_GEOSDelaunayTriangulation" >&6; }
ac_res=$ac_cv_search_GEOSDelaunayTriangulation
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
  as_fn_error $? "'libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter." "$LINENO" 5
fi

	  $as_echo "#define GEOS_ADVANCED 1" >>confdefs.h

  fi

  #-----------------------------------------------------------------------
  #   --enable-geosreentrant
  #
  # Check whether --enable-geosreentrant was given.
if test "${enable_geosreentrant+set}" = set; then :
  enableval=$enable_geosreentrant;
else
  enable_geosreentrant=yes
fi

  if test x"$enable_geosreentrant" != "xno"; then


































	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing GEOSContext_setErrorMessageHandler_r" >&5
$as_echo_n "checking for library containing GEOSContext_setErrorMessageHandler_r... " >&6; }
if ${ac_cv_search_GEOSContext_setErrorMessageHandler_r+:} false; then :

  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char GEOSContext_setErrorMessageHandler_r ();
int
main ()
{
return GEOSContext_setErrorMessageHandler_r ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' geos_c; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_GEOSContext_setErrorMessageHandler_r=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_GEOSContext_setErrorMessageHandler_r+:} false; then :
  break
fi
done
if ${ac_cv_search_GEOSContext_setErrorMessageHandler_r+:} false; then :

else
  ac_cv_search_GEOSContext_setErrorMessageHandler_r=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GEOSContext_setErrorMessageHandler_r" >&5
$as_echo "$ac_cv_search_GEOSContext_setErrorMessageHandler_r" >&6; }
ac_res=$ac_cv_search_GEOSContext_setErrorMessageHandler_r
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
  as_fn_error $? "'libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter." "$LINENO" 5
fi

	  $as_echo "#define GEOS_REENTRANT 1" >>confdefs.h

  fi

  #-----------------------------------------------------------------------
  #   --with-geosonlyreentrant
  #

# Check whether --with-geosonlyreentrant was given.
if test "${with_geosonlyreentrant+set}" = set; then :
  withval=$with_geosonlyreentrant;
else
  with_geosonlyreentrant=no
fi

  if test x"$with_geosonlyreentrant" != "xno"; then
	  $as_echo "#define GEOS_ONLY_REENTRANT 1" >>confdefs.h

  fi

  #-----------------------------------------------------------------------
  #   --enable-rttopo
  #
  # Check whether --enable-rttopo was given.
if test "${enable_rttopo+set}" = set; then :
  enableval=$enable_rttopo;
else
  enable_rttopo=no
fi

  if test x"$enable_rttopo" != "xno"; then
	  for ac_header in librttopo.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "librttopo.h" "ac_cv_header_librttopo_h" "$ac_includes_default"
if test "x$ac_cv_header_librttopo_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBRTTOPO_H 1
_ACEOF

else
  as_fn_error $? "cannot find librttopo.h, bailing out" "$LINENO" 5
fi

done

	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rtt_AddLineNoFace" >&5
$as_echo_n "checking for library containing rtt_AddLineNoFace... " >&6; }
if ${ac_cv_search_rtt_AddLineNoFace+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char rtt_AddLineNoFace ();
int
main ()
{
return rtt_AddLineNoFace ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' rttopo; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_rtt_AddLineNoFace=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_rtt_AddLineNoFace+:} false; then :
  break
fi
done
if ${ac_cv_search_rtt_AddLineNoFace+:} false; then :

else
  ac_cv_search_rtt_AddLineNoFace=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rtt_AddLineNoFace" >&5
$as_echo "$ac_cv_search_rtt_AddLineNoFace" >&6; }
ac_res=$ac_cv_search_rtt_AddLineNoFace
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
  as_fn_error $? "'librttopo' (>= v.1.1.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-rttopo parameter." "$LINENO" 5
fi

	  $as_echo "#define ENABLE_RTTOPO 1" >>confdefs.h

  fi
else
  $as_echo "#define OMIT_GEOS 1" >>confdefs.h

fi

#-----------------------------------------------------------------------
................................................................................
else
  ENABLE_EXAMPLES_TRUE='#'
  ENABLE_EXAMPLES_FALSE=
fi

#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-module-only
#
# Check whether --enable-module-only was given.
if test "${enable_module_only+set}" = set; then :
  enableval=$enable_module_only;
else
  enable_module_only=no
fi

 if test x"$enable_module_only" != "xno"; then
  MODULE_ONLY_TRUE=
  MODULE_ONLY_FALSE='#'
else
  MODULE_ONLY_TRUE='#'
  MODULE_ONLY_FALSE=
fi

#-----------------------------------------------------------------------

# Checking for MinGW
 if test "$target_alias" = "mingw32"; then
  MINGW_TRUE=
  MINGW_FALSE='#'
else
  MINGW_TRUE='#'
  MINGW_FALSE=
................................................................................
# Checking for Android
 if test "$target_alias" = "android"; then
  ANDROID_TRUE=
  ANDROID_FALSE='#'
else
  ANDROID_TRUE='#'
  ANDROID_FALSE=
fi


# testing for sqlite 3-10 or later
ac_fn_c_check_decl "$LINENO" "SQLITE_INDEX_CONSTRAINT_LIKE" "ac_cv_have_decl_SQLITE_INDEX_CONSTRAINT_LIKE" "#include <sqlite3.h>
"
if test "x$ac_cv_have_decl_SQLITE_INDEX_CONSTRAINT_LIKE" = xyes; then :
  $as_echo "#define HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE 1" >>confdefs.h

fi


cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
................................................................................
fi
if test -z "${ENABLE_GEOPACKAGE_TRUE}" && test -z "${ENABLE_GEOPACKAGE_FALSE}"; then
  as_fn_error $? "conditional \"ENABLE_GEOPACKAGE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_EXAMPLES_TRUE}" && test -z "${ENABLE_EXAMPLES_FALSE}"; then
  as_fn_error $? "conditional \"ENABLE_EXAMPLES\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MODULE_ONLY_TRUE}" && test -z "${MODULE_ONLY_FALSE}"; then
  as_fn_error $? "conditional \"MODULE_ONLY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MINGW_TRUE}" && test -z "${MINGW_FALSE}"; then
  as_fn_error $? "conditional \"MINGW\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MACOSX_TRUE}" && test -z "${MACOSX_FALSE}"; then
................................................................................
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libspatialite $as_me 5.0.0-devel, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
................................................................................

Report bugs to <a.furieri@lqt.it>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libspatialite config.status 5.0.0-devel
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

................................................................................
    "src/gaiageo/lemon/lemon_src/Makefile") CONFIG_FILES="$CONFIG_FILES src/gaiageo/lemon/lemon_src/Makefile" ;;
    "src/geopackage/Makefile") CONFIG_FILES="$CONFIG_FILES src/geopackage/Makefile" ;;
    "src/spatialite/Makefile") CONFIG_FILES="$CONFIG_FILES src/spatialite/Makefile" ;;
    "src/shapefiles/Makefile") CONFIG_FILES="$CONFIG_FILES src/shapefiles/Makefile" ;;
    "src/dxf/Makefile") CONFIG_FILES="$CONFIG_FILES src/dxf/Makefile" ;;
    "src/md5/Makefile") CONFIG_FILES="$CONFIG_FILES src/md5/Makefile" ;;
    "src/control_points/Makefile") CONFIG_FILES="$CONFIG_FILES src/control_points/Makefile" ;;
    "src/cutter/Makefile") CONFIG_FILES="$CONFIG_FILES src/cutter/Makefile" ;;
    "src/topology/Makefile") CONFIG_FILES="$CONFIG_FILES src/topology/Makefile" ;;
    "src/srsinit/Makefile") CONFIG_FILES="$CONFIG_FILES src/srsinit/Makefile" ;;
    "src/srsinit/epsg_update/Makefile") CONFIG_FILES="$CONFIG_FILES src/srsinit/epsg_update/Makefile" ;;
    "src/stored_procedures/Makefile") CONFIG_FILES="$CONFIG_FILES src/stored_procedures/Makefile" ;;
    "src/connection_cache/Makefile") CONFIG_FILES="$CONFIG_FILES src/connection_cache/Makefile" ;;
    "src/connection_cache/generator/Makefile") CONFIG_FILES="$CONFIG_FILES src/connection_cache/generator/Makefile" ;;
    "src/virtualtext/Makefile") CONFIG_FILES="$CONFIG_FILES src/virtualtext/Makefile" ;;
    "src/wfs/Makefile") CONFIG_FILES="$CONFIG_FILES src/wfs/Makefile" ;;
    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
    "test/sql_stmt_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_tests/Makefile" ;;
    "test/sql_stmt_geos_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_geos_tests/Makefile" ;;
    "test/sql_stmt_geosadvanced_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_geosadvanced_tests/Makefile" ;;
    "test/sql_stmt_geopackage_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_geopackage_tests/Makefile" ;;
    "test/sql_stmt_gpkg_epsg492_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_gpkg_epsg492_tests/Makefile" ;;
    "test/sql_stmt_gpkg_epsg493_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_gpkg_epsg493_tests/Makefile" ;;
    "test/sql_stmt_proj_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_proj_tests/Makefile" ;;
    "test/sql_stmt_proj492_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_proj492_tests/Makefile" ;;
    "test/sql_stmt_proj493_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_proj493_tests/Makefile" ;;
    "test/sql_stmt_mathsql_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_mathsql_tests/Makefile" ;;
    "test/sql_stmt_rtgeom_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_rtgeom_tests/Makefile" ;;
    "test/sql_stmt_rttopo_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_rttopo_tests/Makefile" ;;
    "test/sql_stmt_libxml2_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_libxml2_tests/Makefile" ;;
    "test/sql_stmt_security_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_security_tests/Makefile" ;;
    "test/sql_stmt_xmlsec_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_xmlsec_tests/Makefile" ;;
    "test/sql_stmt_freexl_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_freexl_tests/Makefile" ;;
    "test/sql_stmt_cache_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_cache_tests/Makefile" ;;
    "test/sql_stmt_gpkgcache_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_gpkgcache_tests/Makefile" ;;
    "test/sql_stmt_nocache_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_nocache_tests/Makefile" ;;
    "test/sql_stmt_gpkgnocache_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_gpkgnocache_tests/Makefile" ;;
    "test/sql_stmt_voronoj1_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_voronoj1_tests/Makefile" ;;
    "test/sql_stmt_voronoj2_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_voronoj2_tests/Makefile" ;;
    "test/sql_stmt_sequence_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_sequence_tests/Makefile" ;;
    "test/sql_stmt_routing_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_routing_tests/Makefile" ;;
    "test/sql_stmt_logfile_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_logfile_tests/Makefile" ;;
    "test/sql_stmt_iconv_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_iconv_tests/Makefile" ;;
    "test/sql_stmt_point_geom/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_point_geom/Makefile" ;;
    "test/sql_stmt_tiny_point/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_tiny_point/Makefile" ;;
    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
    "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
    "spatialite.pc") CONFIG_FILES="$CONFIG_FILES spatialite.pc" ;;

  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  esac
done
................................................................................
fi


#-----------------------------------------------------------------------
# printing an eventual message reporting about GPL escalation
#-----------------------------------------------------------------------
gpl_escalation=no;
if test x"$enable_rttopo" != "xno"; then
    gpl_escalation=yes
fi
if test x"$enable_gcp" != "xno"; then
    gpl_escalation=yes
fi
if test x"$gpl_escalation" != xno; then
    echo
    echo
    echo "=============================================================="
    echo "                        IMPORTANT NOTICE"
    echo "=============================================================="
    echo "You have selected --enable-rttopo and/or --enable-gcp"
    echo
    echo "Both modules strictly depend on code released under the GPLv2+"
    echo "license, wich takes precedence over any other license."
    echo "Consequently the copy of libspatialite you are going to build"
    echo "if configured this way *must* be released under the GPLv2+ license."
    echo
    echo "If you wish better preserving the initial MPL tri-license you"
    echo "simply have to reconfigure by specifying the following options:"
    echo "        --disable-rttopo --disable-gcp"
    echo "=============================================================="

fi


|







 







|
|







 







<
<







 







<






|

<
<
|




<







 







|







 







|







 







<





|

|
<
<




<










<
<
<







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|







 







|







 







|
|







 







|







 







|







 







|
|







 







<







 







<
<







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|
|

|


|
|







 







|







|

|
|
|

|


|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
>












|



|












|



|



|


|




|
|
|


<
<
<
<
<
|

|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<







 







|







 







|







 







<
<


<









<
<

<
<

|
<




<
<
<
<
<
<
<
<
<
<
<
<







 







|


|








|


|





|



1
2
3
4
5
6
7
8
9
10
...
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
...
636
637
638
639
640
641
642


643
644
645
646
647
648
649
...
787
788
789
790
791
792
793

794
795
796
797
798
799
800
801


802
803
804
805
806

807
808
809
810
811
812
813
....
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
....
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
....
1453
1454
1455
1456
1457
1458
1459

1460
1461
1462
1463
1464
1465
1466
1467


1468
1469
1470
1471

1472
1473
1474
1475
1476
1477
1478
1479
1480
1481



1482
1483
1484
1485
1486
1487
1488
....
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
....
2104
2105
2106
2107
2108
2109
2110














































2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
....
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
....
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
....
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
....
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
....
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
....
3072
3073
3074
3075
3076
3077
3078

3079
3080
3081
3082
3083
3084
3085
....
3114
3115
3116
3117
3118
3119
3120


3121
3122
3123
3124
3125
3126
3127
.....
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
.....
17436
17437
17438
17439
17440
17441
17442
































































17443
17444
17445
17446
17447
17448
17449
.....
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
.....
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262

18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313





18314
18315
18316
18317





































































































18318
18319
18320
18321
18322
18323
18324
.....
18584
18585
18586
18587
18588
18589
18590




















18591
18592
18593
18594
18595
18596
18597
.....
18609
18610
18611
18612
18613
18614
18615









18616
18617
18618
18619
18620
18621
18622
.....
18762
18763
18764
18765
18766
18767
18768




18769
18770
18771
18772
18773
18774
18775
.....
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
.....
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
.....
19765
19766
19767
19768
19769
19770
19771


19772
19773

19774
19775
19776
19777
19778
19779
19780
19781
19782


19783


19784
19785

19786
19787
19788
19789












19790
19791
19792
19793
19794
19795
19796
.....
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libspatialite 4.3.0-devel.
#
# Report bugs to <a.furieri@lqt.it>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
................................................................................
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='libspatialite'
PACKAGE_TARNAME='libspatialite'
PACKAGE_VERSION='4.3.0-devel'
PACKAGE_STRING='libspatialite 4.3.0-devel'
PACKAGE_BUGREPORT='a.furieri@lqt.it'
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
................................................................................
LTLIBOBJS
ANDROID_FALSE
ANDROID_TRUE
MACOSX_FALSE
MACOSX_TRUE
MINGW_FALSE
MINGW_TRUE


ENABLE_EXAMPLES_FALSE
ENABLE_EXAMPLES_TRUE
ENABLE_GEOPACKAGE_FALSE
ENABLE_GEOPACKAGE_TRUE
LIBXML2_LIBS
LIBXML2_CFLAGS
PKG_CONFIG_LIBDIR
................................................................................
with_pic
enable_fast_install
with_gnu_ld
with_sysroot
enable_libtool_lock
enable_mathsql
enable_geocallbacks

enable_proj
enable_iconv
enable_freexl
enable_epsg
enable_geos
with_geosconfig
enable_controlpoints
enable_geosadvanced


enable_lwgeom
enable_libxml2
enable_geopackage
enable_gcov
enable_examples

'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
................................................................................
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # Omit some internal or obsolete options to make the list less imposing.
  # This message is too long to be a string in the A/UX 3.1 sh.
  cat <<_ACEOF
\`configure' configures libspatialite 4.3.0-devel to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.
................................................................................
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of libspatialite 4.3.0-devel:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-mathsql        enables SQL math functions [default=yes]
  --enable-geocallbacks   enables geometry callbacks [default=no]

  --enable-proj           enables PROJ.4 inclusion [default=yes]
  --enable-iconv          enables ICONV inclusion [default=yes]
  --enable-freexl         enables FreeXL inclusion [default=yes]
  --enable-epsg           enables full EPSG dataset support [default=yes]
  --enable-geos           enables GEOS inclusion [default=yes]
  --enable-controlpoints  enables Control Points (from Grass GIS) [default=no]
  --enable-geosadvanced   enables GEOS advanced features [default=yes]
  --enable-lwgeom         enables LWGEOM support [default=no]


  --enable-libxml2        enables libxml2 inclusion [default=yes]
  --enable-geopackage     enables GeoPackage support [default=yes]
  --enable-gcov           turn on code coverage analysis tools
  --enable-examples       enables building examples [default=yes]


Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic              try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot=DIR Search for dependent libraries within DIR
                        (or the compiler's sysroot if not specified).
  --with-geosconfig=FILE  specify an alternative geos-config file




Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
................................................................................
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
libspatialite configure 4.3.0-devel
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
................................................................................
fi
eval ac_res=\$$3
	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_type














































cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by libspatialite $as_me 4.3.0-devel, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ $0 $@

_ACEOF
exec 5>>config.log
{
................................................................................
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



am__api_version='1.14'

ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
................................................................................
test "$program_suffix" != NONE &&
  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`

# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`

if test x"${MISSING+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  *)
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
................................................................................
  am_missing_run="$MISSING "
else
  am_missing_run=
  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi

if test x"${install_sh}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi
................................................................................
    CYGPATH_W=echo
  fi
fi


# Define the identity of the package.
 PACKAGE='libspatialite'
 VERSION='4.3.0-devel'


cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF


................................................................................

# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'

# We need awk for the "check" target.  The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.  Yes, it's still used
# in the wild :-(  We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'


# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar  pax cpio none'
................................................................................
to "yes", and re-run configure.

END
    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
  fi
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
    # Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else
  USE_MAINTAINER_MODE=no
................................................................................

# disabling debug support

$as_echo "#define NDEBUG 1" >>confdefs.h


# config depending options









................................................................................
  LIBS="-lz $LIBS"

else
  as_fn_error $? "'libz' is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi


ac_config_files="$ac_config_files Makefile src/Makefile src/headers/Makefile src/gaiaaux/Makefile src/gaiaexif/Makefile src/gaiageo/Makefile src/gaiageo/flex/Makefile src/gaiageo/lemon/Makefile src/gaiageo/lemon/lemon_src/Makefile src/geopackage/Makefile src/spatialite/Makefile src/shapefiles/Makefile src/dxf/Makefile src/md5/Makefile src/control_points/Makefile src/srsinit/Makefile src/srsinit/epsg_update/Makefile src/connection_cache/Makefile src/connection_cache/generator/Makefile src/virtualtext/Makefile src/wfs/Makefile test/Makefile test/sql_stmt_tests/Makefile test/sql_stmt_geos_tests/Makefile test/sql_stmt_geosadvanced_tests/Makefile test/sql_stmt_geopackage_tests/Makefile test/sql_stmt_proj_tests/Makefile test/sql_stmt_mathsql_tests/Makefile test/sql_stmt_lwgeom_tests/Makefile test/sql_stmt_libxml2_tests/Makefile test/sql_stmt_security_tests/Makefile test/sql_stmt_xmlsec_tests/Makefile test/sql_stmt_freexl_tests/Makefile examples/Makefile Doxyfile spatialite.pc"


# exporting the TARGET_CPU string
splite_cpu=`$CC -dumpmachine`
cat >>confdefs.h <<_ACEOF
#define TARGET_CPU "$splite_cpu"
_ACEOF
................................................................................
else
  as_fn_error $? "obsolete 'libsqlite3' (< v.3.7.3). please retry specifying: --disable-geocallbacks" "$LINENO" 5
fi

else
  $as_echo "#define OMIT_GEOCALLBACKS 1" >>confdefs.h

































































fi
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-proj
#
# Check whether --enable-proj was given.
................................................................................

  LIBS="$LIBS_SAVE"
  LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"

  #-----------------------------------------------------------------------
  #   --enable-controlpoints
  #
  # Check whether --enable-controlpoints was given.
if test "${enable_controlpoints+set}" = set; then :
  enableval=$enable_controlpoints;
else
  enable_controlpoints=no
fi

  if test x"$enable_controlpoints" != "xno"; then
	  $as_echo "#define ENABLE_CONTROL_POINTS 1" >>confdefs.h

  fi

  #-----------------------------------------------------------------------
  #   --enable-geosadvanced
  #
  # Check whether --enable-geosadvanced was given.
................................................................................
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GEOSDelaunayTriangulation" >&5
$as_echo "$ac_cv_search_GEOSDelaunayTriangulation" >&6; }
ac_res=$ac_cv_search_GEOSDelaunayTriangulation
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

else
  as_fn_error $? "'libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system." "$LINENO" 5
fi

	  $as_echo "#define GEOS_ADVANCED 1" >>confdefs.h

  fi

  #-----------------------------------------------------------------------
  #   --enable-lwgeom
  #
  # Check whether --enable-lwgeom was given.
if test "${enable_lwgeom+set}" = set; then :
  enableval=$enable_lwgeom;
else
  enable_lwgeom=no
fi

  if test x"$enable_lwgeom" != "xno"; then
	  for ac_header in liblwgeom.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "liblwgeom.h" "ac_cv_header_liblwgeom_h" "$ac_includes_default"
if test "x$ac_cv_header_liblwgeom_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBLWGEOM_H 1
_ACEOF

else
  as_fn_error $? "cannot find liblwgeom.h, bailing out" "$LINENO" 5
fi

done

	  _save_libs="$LIBS"
	  LIBS=$LIBS' -llwgeom -lgeos_c'
	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int main() { return lwgeom_make_valid(); return 0; }
	    void lwgeom_init_allocators(void) { return; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  $as_echo "#define ENABLE_LWGEOM 1" >>confdefs.h

else
  as_fn_error $? "'liblwgeom' doesn't seem to be installed on this system; unsupported lwgeom_make_valid()." "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
	  LIBS="$_save_libs"
	  LIBS=$LIBS' -llwgeom -lgeos_c'
	#
	# testing for PostGIS 2.1 - lwgeom_set_handlers
	#
	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing lwgeom_set_handlers" >&5
$as_echo_n "checking for library containing lwgeom_set_handlers... " >&6; }

if ${ac_cv_search_lwgeom_set_handlers+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char lwgeom_set_handlers ();
int
main ()
{
return lwgeom_set_handlers ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' geos_c; do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_search_lwgeom_set_handlers=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext
  if ${ac_cv_search_lwgeom_set_handlers+:} false; then :
  break
fi
done
if ${ac_cv_search_lwgeom_set_handlers+:} false; then :

else
  ac_cv_search_lwgeom_set_handlers=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_lwgeom_set_handlers" >&5
$as_echo "$ac_cv_search_lwgeom_set_handlers" >&6; }
ac_res=$ac_cv_search_lwgeom_set_handlers
if test "$ac_res" != no; then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"





  $as_echo "#define POSTGIS_2_1 1" >>confdefs.h

fi






































































































  fi
else
  $as_echo "#define OMIT_GEOS 1" >>confdefs.h

fi

#-----------------------------------------------------------------------
................................................................................
else
  ENABLE_EXAMPLES_TRUE='#'
  ENABLE_EXAMPLES_FALSE=
fi

#-----------------------------------------------------------------------





















# Checking for MinGW
 if test "$target_alias" = "mingw32"; then
  MINGW_TRUE=
  MINGW_FALSE='#'
else
  MINGW_TRUE='#'
  MINGW_FALSE=
................................................................................
# Checking for Android
 if test "$target_alias" = "android"; then
  ANDROID_TRUE=
  ANDROID_FALSE='#'
else
  ANDROID_TRUE='#'
  ANDROID_FALSE=









fi


cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
................................................................................
fi
if test -z "${ENABLE_GEOPACKAGE_TRUE}" && test -z "${ENABLE_GEOPACKAGE_FALSE}"; then
  as_fn_error $? "conditional \"ENABLE_GEOPACKAGE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_EXAMPLES_TRUE}" && test -z "${ENABLE_EXAMPLES_FALSE}"; then
  as_fn_error $? "conditional \"ENABLE_EXAMPLES\" was never defined.




Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MINGW_TRUE}" && test -z "${MINGW_FALSE}"; then
  as_fn_error $? "conditional \"MINGW\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MACOSX_TRUE}" && test -z "${MACOSX_FALSE}"; then
................................................................................
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libspatialite $as_me 4.3.0-devel, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@
................................................................................

Report bugs to <a.furieri@lqt.it>."

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libspatialite config.status 4.3.0-devel
configured by $0, generated by GNU Autoconf 2.69,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

................................................................................
    "src/gaiageo/lemon/lemon_src/Makefile") CONFIG_FILES="$CONFIG_FILES src/gaiageo/lemon/lemon_src/Makefile" ;;
    "src/geopackage/Makefile") CONFIG_FILES="$CONFIG_FILES src/geopackage/Makefile" ;;
    "src/spatialite/Makefile") CONFIG_FILES="$CONFIG_FILES src/spatialite/Makefile" ;;
    "src/shapefiles/Makefile") CONFIG_FILES="$CONFIG_FILES src/shapefiles/Makefile" ;;
    "src/dxf/Makefile") CONFIG_FILES="$CONFIG_FILES src/dxf/Makefile" ;;
    "src/md5/Makefile") CONFIG_FILES="$CONFIG_FILES src/md5/Makefile" ;;
    "src/control_points/Makefile") CONFIG_FILES="$CONFIG_FILES src/control_points/Makefile" ;;


    "src/srsinit/Makefile") CONFIG_FILES="$CONFIG_FILES src/srsinit/Makefile" ;;
    "src/srsinit/epsg_update/Makefile") CONFIG_FILES="$CONFIG_FILES src/srsinit/epsg_update/Makefile" ;;

    "src/connection_cache/Makefile") CONFIG_FILES="$CONFIG_FILES src/connection_cache/Makefile" ;;
    "src/connection_cache/generator/Makefile") CONFIG_FILES="$CONFIG_FILES src/connection_cache/generator/Makefile" ;;
    "src/virtualtext/Makefile") CONFIG_FILES="$CONFIG_FILES src/virtualtext/Makefile" ;;
    "src/wfs/Makefile") CONFIG_FILES="$CONFIG_FILES src/wfs/Makefile" ;;
    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
    "test/sql_stmt_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_tests/Makefile" ;;
    "test/sql_stmt_geos_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_geos_tests/Makefile" ;;
    "test/sql_stmt_geosadvanced_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_geosadvanced_tests/Makefile" ;;
    "test/sql_stmt_geopackage_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_geopackage_tests/Makefile" ;;


    "test/sql_stmt_proj_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_proj_tests/Makefile" ;;


    "test/sql_stmt_mathsql_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_mathsql_tests/Makefile" ;;
    "test/sql_stmt_lwgeom_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_lwgeom_tests/Makefile" ;;

    "test/sql_stmt_libxml2_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_libxml2_tests/Makefile" ;;
    "test/sql_stmt_security_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_security_tests/Makefile" ;;
    "test/sql_stmt_xmlsec_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_xmlsec_tests/Makefile" ;;
    "test/sql_stmt_freexl_tests/Makefile") CONFIG_FILES="$CONFIG_FILES test/sql_stmt_freexl_tests/Makefile" ;;












    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
    "Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
    "spatialite.pc") CONFIG_FILES="$CONFIG_FILES spatialite.pc" ;;

  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  esac
done
................................................................................
fi


#-----------------------------------------------------------------------
# printing an eventual message reporting about GPL escalation
#-----------------------------------------------------------------------
gpl_escalation=no;
if test x"$enable_lwgeom" != "xno"; then
    gpl_escalation=yes
fi
if test x"$enable_controlpoints" != "xno"; then
    gpl_escalation=yes
fi
if test x"$gpl_escalation" != xno; then
    echo
    echo
    echo "=============================================================="
    echo "                        IMPORTANT NOTICE"
    echo "=============================================================="
    echo "You have selected --enable-lwgeom and/or --enable-controlpoints"
    echo
    echo "Both modules strictly depend on code released under the GPLv2+"
    echo "license, wich is virally infective by definition."
    echo "Consequently the copy of libspatialite you are going to build"
    echo "if configured this way *must* be released under the GPLv2+ license."
    echo
    echo "If you wish better preserving the initial MPL tri-license you"
    echo "simply have to reconfigure by specifying the following options:"
    echo "        --disable-lwgeom --disable-controlpoints"
    echo "=============================================================="

fi

Changes to configure.ac.

1
2
3
4
5
6
7
8
9
10
11
12
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59


60
61
62
63
64
65
66
67
68
69
70
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
...
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
...
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(libspatialite, 5.0.0-devel, a.furieri@lqt.it)
AC_LANG(C)
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

................................................................................
AC_DEFINE(NDEBUG)

# config depending options
AH_TEMPLATE([OMIT_GEOS],
            [Should be defined in order to disable GEOS support.])
AH_TEMPLATE([GEOS_ADVANCED],
            [Should be defined in order to enable GEOS_ADVANCED support.])
AH_TEMPLATE([GEOS_REENTRANT],
            [Should be defined in order to enable GEOS_REENTRANT (fully thread-safe).])
AH_TEMPLATE([GEOS_ONLY_REENTRANT],
            [Should be defined in order to fully disable GEOS non-thread-safe API.])
AH_TEMPLATE([ENABLE_RTTOPO],
            [Should be defined in order to enable RTTOPO support.])
AH_TEMPLATE([ENABLE_GCP],
            [Should be defined in order to enable GCP support.])
AH_TEMPLATE([OMIT_PROJ],
            [Should be defined in order to disable PROJ.4 support.])
AH_TEMPLATE([OMIT_ICONV],
            [Should be defined in order to disable ICONV support.])
AH_TEMPLATE([OMIT_MATHSQL],
            [Should be defined in order to disable MATHSQL support.])
AH_TEMPLATE([OMIT_EPSG],
            [Should be defined in order to disable EPSG full support.])
AH_TEMPLATE([OMIT_GEOCALLBACKS],
            [Should be defined in order to disable GEOCALLBACKS support.])
AH_TEMPLATE([OMIT_KNN],
            [Should be defined in order to disable KNN support.])
AH_TEMPLATE([OMIT_FREEXL],
            [Should be defined in order to disable FREEXL support.])
AH_TEMPLATE([ENABLE_LIBXML2],
            [Should be defined in order to enable LIBXML2 support.])
AH_TEMPLATE([ENABLE_GEOPACKAGE],
            [Should be defined in order to enable GeoPackage support.])


AH_TEMPLATE([TARGET_CPU],
            [Should contain a text-string describing the intended target CPU])
AH_TEMPLATE([HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE],
            [depending on SQLite library version.])

# Checks for header files.
AC_CHECK_HEADERS(stdlib.h,, [AC_MSG_ERROR([cannot find stdlib.h, bailing out])])
AC_CHECK_HEADERS(stdio.h,, [AC_MSG_ERROR([cannot find stdio.h, bailing out])])
AC_CHECK_HEADERS(string.h,, [AC_MSG_ERROR([cannot find string.h, bailing out])])
AC_CHECK_HEADERS(memory.h,, [AC_MSG_ERROR([cannot find memory.h, bailing out])])
AC_CHECK_HEADERS(math.h,, [AC_MSG_ERROR([cannot find math.h, bailing out])])
................................................................................
		src/gaiageo/lemon/lemon_src/Makefile \
		src/geopackage/Makefile \
		src/spatialite/Makefile \
		src/shapefiles/Makefile \
		src/dxf/Makefile \
		src/md5/Makefile \
		src/control_points/Makefile \
		src/cutter/Makefile \
		src/topology/Makefile \
		src/srsinit/Makefile \
		src/srsinit/epsg_update/Makefile \
		src/stored_procedures/Makefile \
		src/connection_cache/Makefile \
		src/connection_cache/generator/Makefile \
		src/virtualtext/Makefile \
		src/wfs/Makefile \
		test/Makefile \
		test/sql_stmt_tests/Makefile \
		test/sql_stmt_geos_tests/Makefile \
		test/sql_stmt_geosadvanced_tests/Makefile \
		test/sql_stmt_geopackage_tests/Makefile \
		test/sql_stmt_gpkg_epsg492_tests/Makefile \
		test/sql_stmt_gpkg_epsg493_tests/Makefile \
		test/sql_stmt_proj_tests/Makefile \
		test/sql_stmt_proj492_tests/Makefile \
		test/sql_stmt_proj493_tests/Makefile \
		test/sql_stmt_mathsql_tests/Makefile \
		test/sql_stmt_rtgeom_tests/Makefile \
		test/sql_stmt_rttopo_tests/Makefile \
		test/sql_stmt_libxml2_tests/Makefile \
		test/sql_stmt_security_tests/Makefile \
		test/sql_stmt_xmlsec_tests/Makefile \
		test/sql_stmt_freexl_tests/Makefile \
		test/sql_stmt_cache_tests/Makefile \
		test/sql_stmt_gpkgcache_tests/Makefile \
		test/sql_stmt_nocache_tests/Makefile \
		test/sql_stmt_gpkgnocache_tests/Makefile \
		test/sql_stmt_voronoj1_tests/Makefile \
		test/sql_stmt_voronoj2_tests/Makefile \
		test/sql_stmt_sequence_tests/Makefile \
		test/sql_stmt_routing_tests/Makefile \
		test/sql_stmt_logfile_tests/Makefile \
		test/sql_stmt_iconv_tests/Makefile \
		test/sql_stmt_point_geom/Makefile \
		test/sql_stmt_tiny_point/Makefile \
		examples/Makefile \
		Doxyfile \
		spatialite.pc])

# exporting the TARGET_CPU string
splite_cpu=`$CC -dumpmachine`
AC_DEFINE_UNQUOTED([TARGET_CPU], ["$splite_cpu"])
................................................................................
  [--enable-geocallbacks], [enables geometry callbacks [default=no]])],
  [], [enable_geocallbacks=no])
if test x"$enable_geocallbacks" == "xyes"; then
  AC_CHECK_LIB(sqlite3,sqlite3_rtree_geometry_callback,,AC_MSG_ERROR([obsolete 'libsqlite3' (< v.3.7.3). please retry specifying: --disable-geocallbacks]),-lm)
else
  AC_DEFINE(OMIT_GEOCALLBACKS)
fi
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-knn
#
AC_ARG_ENABLE(knn, [AS_HELP_STRING(
  [--enable-knn], [enables KNN support [default=yes]])],
  [], [enable_knn=yes])
if test x"$enable_knn" == "xyes"; then
  AC_CHECK_LIB(sqlite3,sqlite3_rtree_query_callback,,AC_MSG_ERROR([obsolete 'libsqlite3' (< v.3.8.5). please retry specifying: --disable-knn]),-lm)
else
  AC_DEFINE(OMIT_KNN)
fi
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-proj
#
AC_ARG_ENABLE(proj, [AS_HELP_STRING(
  [--enable-proj], [enables PROJ.4 inclusion [default=yes]])],
................................................................................
  AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig]))
  LIBS="$LIBS_SAVE"
  LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"

  #-----------------------------------------------------------------------
  #   --enable-controlpoints
  #
  AC_ARG_ENABLE(gcp, [AS_HELP_STRING(
	  [--enable-gcp], [enables Control Points (from Grass GIS) [default=no]])],
	  [], [enable_gcp=no])
  if test x"$enable_gcp" != "xno"; then
	  AC_DEFINE(ENABLE_GCP)
  fi

  #-----------------------------------------------------------------------
  #   --enable-geosadvanced
  #
  AC_ARG_ENABLE(geosadvanced, [AS_HELP_STRING(
	  [--enable-geosadvanced], [enables GEOS advanced features [default=yes]])],
	  [], [enable_geosadvanced=yes])
  if test x"$enable_geosadvanced" != "xno"; then
	  AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.]))
	  AC_DEFINE(GEOS_ADVANCED)
  fi

  #-----------------------------------------------------------------------
  #   --enable-geosreentrant
  #
  AC_ARG_ENABLE(geosreentrant, [AS_HELP_STRING(
	  [--enable-geosreentrant], [enables GEOS reentrant (fully thread safe) [default=yes]])],
	  [], [enable_geosreentrant=yes])
  if test x"$enable_geosreentrant" != "xno"; then
	  AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.]))
	  AC_DEFINE(GEOS_REENTRANT)
  fi

  #-----------------------------------------------------------------------
  #   --with-geosonlyreentrant
  #
  AC_ARG_WITH(geosonlyreentrant, [AS_HELP_STRING(
	  [--with-geosonlyreentrant], [completely disables GEOS non-thread safe API [default=no]])],
	  [], [with_geosonlyreentrant=no])
  if test x"$with_geosonlyreentrant" != "xno"; then
	  AC_DEFINE(GEOS_ONLY_REENTRANT)
  fi

  #-----------------------------------------------------------------------
  #   --enable-rttopo
  #
  AC_ARG_ENABLE(rttopo, [AS_HELP_STRING(
	  [--enable-rttopo], [enables RTTOPO support [default=no]])],
	  [], [enable_rttopo=no])
  if test x"$enable_rttopo" != "xno"; then
	  AC_CHECK_HEADERS(librttopo.h,, [AC_MSG_ERROR([cannot find librttopo.h, bailing out])])
	  AC_SEARCH_LIBS(rtt_AddLineNoFace,rttopo,,AC_MSG_ERROR(['librttopo' (>= v.1.1.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-rttopo parameter.]))
	  AC_DEFINE(ENABLE_RTTOPO)
  fi
else
  AC_DEFINE(OMIT_GEOS)
fi

#-----------------------------------------------------------------------
#   --enable-libxml2
................................................................................
#
AC_ARG_ENABLE(examples, [AS_HELP_STRING(
       [--enable-examples], [enables building examples [default=yes]])],
       [], [enable_examples=yes])
AM_CONDITIONAL(ENABLE_EXAMPLES, [test x"$enable_examples" != "xno"])
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-module-only
#
AC_ARG_ENABLE(module-only, [AS_HELP_STRING(
       [--enable-module-only], [builds only mod_spatialite alone [default=no]])],
       [], [enable_module_only=no])
AM_CONDITIONAL(MODULE_ONLY, [test x"$enable_module_only" != "xno"])
#-----------------------------------------------------------------------

# Checking for MinGW
AM_CONDITIONAL([MINGW], [test "$target_alias" = "mingw32"])
# Checking for Mac OsX
AM_CONDITIONAL([MACOSX], [test "$target_alias" = "macosx"])
# Checking for Android
AM_CONDITIONAL([ANDROID], [test "$target_alias" = "android"])

# testing for sqlite 3-10 or later
AC_CHECK_DECL([SQLITE_INDEX_CONSTRAINT_LIKE],
  [AC_DEFINE(HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE)],[],[[#include <sqlite3.h>]])

AC_OUTPUT

#-----------------------------------------------------------------------
# printing an eventual message reporting about GPL escalation
#-----------------------------------------------------------------------
gpl_escalation=no;
if test x"$enable_rttopo" != "xno"; then
    gpl_escalation=yes
fi
if test x"$enable_gcp" != "xno"; then
    gpl_escalation=yes
fi
if test x"$gpl_escalation" != xno; then
    echo 
    echo
    echo "=============================================================="
    echo "                        IMPORTANT NOTICE"
    echo "=============================================================="
    echo "You have selected --enable-rttopo and/or --enable-gcp"
    echo
    echo "Both modules strictly depend on code released under the GPLv2+"
    echo "license, wich takes precedence over any other license."
    echo "Consequently the copy of libspatialite you are going to build"
    echo "if configured this way *must* be released under the GPLv2+ license."
    echo
    echo "If you wish better preserving the initial MPL tri-license you"
    echo "simply have to reconfigure by specifying the following options:"
    echo "        --disable-rttopo --disable-gcp"
    echo "=============================================================="
  
fi




|







 







|
|
<
<
|
|
|
|










<
<






>
>


<
<







 







<
<


<









<
<

<
<

|
<




<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|
|
|
|









|




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







<
<
<
<






|


|








|


|





|

|

1
2
3
4
5
6
7
8
9
10
11
12
..
27
28
29
30
31
32
33
34
35


36
37
38
39
40
41
42
43
44
45
46
47
48
49


50
51
52
53
54
55
56
57
58
59


60
61
62
63
64
65
66
...
117
118
119
120
121
122
123


124
125

126
127
128
129
130
131
132
133
134


135


136
137

138
139
140
141












142
143
144
145
146
147
148
...
166
167
168
169
170
171
172













173
174
175
176
177
178
179
...
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322











323
324
325
326
327
328
329
...
367
368
369
370
371
372
373









374
375
376
377
378
379
380




381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(libspatialite, 4.3.0-devel, a.furieri@lqt.it)
AC_LANG(C)
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

................................................................................
AC_DEFINE(NDEBUG)

# config depending options
AH_TEMPLATE([OMIT_GEOS],
            [Should be defined in order to disable GEOS support.])
AH_TEMPLATE([GEOS_ADVANCED],
            [Should be defined in order to enable GEOS_ADVANCED support.])
AH_TEMPLATE([GEOS_TRUNK],
            [Should be defined in order to enable GEOS_TRUNK experimental support.])


AH_TEMPLATE([ENABLE_LWGEOM],
            [Should be defined in order to enable LWGEOM support.])
AH_TEMPLATE([ENABLE_CONTROL_POINTS],
            [Should be defined in order to enable CONTROL_POINTS support.])
AH_TEMPLATE([OMIT_PROJ],
            [Should be defined in order to disable PROJ.4 support.])
AH_TEMPLATE([OMIT_ICONV],
            [Should be defined in order to disable ICONV support.])
AH_TEMPLATE([OMIT_MATHSQL],
            [Should be defined in order to disable MATHSQL support.])
AH_TEMPLATE([OMIT_EPSG],
            [Should be defined in order to disable EPSG full support.])
AH_TEMPLATE([OMIT_GEOCALLBACKS],
            [Should be defined in order to disable GEOCALLBACKS support.])


AH_TEMPLATE([OMIT_FREEXL],
            [Should be defined in order to disable FREEXL support.])
AH_TEMPLATE([ENABLE_LIBXML2],
            [Should be defined in order to enable LIBXML2 support.])
AH_TEMPLATE([ENABLE_GEOPACKAGE],
            [Should be defined in order to enable GeoPackage support.])
AH_TEMPLATE([POSTGIS_2_1],
            [Should be defined when linking liblwgeom from PostGIS 2.1 (or later).])
AH_TEMPLATE([TARGET_CPU],
            [Should contain a text-string describing the intended target CPU])



# Checks for header files.
AC_CHECK_HEADERS(stdlib.h,, [AC_MSG_ERROR([cannot find stdlib.h, bailing out])])
AC_CHECK_HEADERS(stdio.h,, [AC_MSG_ERROR([cannot find stdio.h, bailing out])])
AC_CHECK_HEADERS(string.h,, [AC_MSG_ERROR([cannot find string.h, bailing out])])
AC_CHECK_HEADERS(memory.h,, [AC_MSG_ERROR([cannot find memory.h, bailing out])])
AC_CHECK_HEADERS(math.h,, [AC_MSG_ERROR([cannot find math.h, bailing out])])
................................................................................
		src/gaiageo/lemon/lemon_src/Makefile \
		src/geopackage/Makefile \
		src/spatialite/Makefile \
		src/shapefiles/Makefile \
		src/dxf/Makefile \
		src/md5/Makefile \
		src/control_points/Makefile \


		src/srsinit/Makefile \
		src/srsinit/epsg_update/Makefile \

		src/connection_cache/Makefile \
		src/connection_cache/generator/Makefile \
		src/virtualtext/Makefile \
		src/wfs/Makefile \
		test/Makefile \
		test/sql_stmt_tests/Makefile \
		test/sql_stmt_geos_tests/Makefile \
		test/sql_stmt_geosadvanced_tests/Makefile \
		test/sql_stmt_geopackage_tests/Makefile \


		test/sql_stmt_proj_tests/Makefile \


		test/sql_stmt_mathsql_tests/Makefile \
		test/sql_stmt_lwgeom_tests/Makefile \

		test/sql_stmt_libxml2_tests/Makefile \
		test/sql_stmt_security_tests/Makefile \
		test/sql_stmt_xmlsec_tests/Makefile \
		test/sql_stmt_freexl_tests/Makefile \












		examples/Makefile \
		Doxyfile \
		spatialite.pc])

# exporting the TARGET_CPU string
splite_cpu=`$CC -dumpmachine`
AC_DEFINE_UNQUOTED([TARGET_CPU], ["$splite_cpu"])
................................................................................
  [--enable-geocallbacks], [enables geometry callbacks [default=no]])],
  [], [enable_geocallbacks=no])
if test x"$enable_geocallbacks" == "xyes"; then
  AC_CHECK_LIB(sqlite3,sqlite3_rtree_geometry_callback,,AC_MSG_ERROR([obsolete 'libsqlite3' (< v.3.7.3). please retry specifying: --disable-geocallbacks]),-lm)
else
  AC_DEFINE(OMIT_GEOCALLBACKS)
fi













#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
#   --enable-proj
#
AC_ARG_ENABLE(proj, [AS_HELP_STRING(
  [--enable-proj], [enables PROJ.4 inclusion [default=yes]])],
................................................................................
  AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig]))
  LIBS="$LIBS_SAVE"
  LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"

  #-----------------------------------------------------------------------
  #   --enable-controlpoints
  #
  AC_ARG_ENABLE(controlpoints, [AS_HELP_STRING(
	  [--enable-controlpoints], [enables Control Points (from Grass GIS) [default=no]])],
	  [], [enable_controlpoints=no])
  if test x"$enable_controlpoints" != "xno"; then
	  AC_DEFINE(ENABLE_CONTROL_POINTS)
  fi

  #-----------------------------------------------------------------------
  #   --enable-geosadvanced
  #
  AC_ARG_ENABLE(geosadvanced, [AS_HELP_STRING(
	  [--enable-geosadvanced], [enables GEOS advanced features [default=yes]])],
	  [], [enable_geosadvanced=yes])
  if test x"$enable_geosadvanced" != "xno"; then
	  AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system.]))
	  AC_DEFINE(GEOS_ADVANCED)
  fi

  #-----------------------------------------------------------------------
  #   --enable-lwgeom
  #
  AC_ARG_ENABLE(lwgeom, [AS_HELP_STRING(
	  [--enable-lwgeom], [enables LWGEOM support [default=no]])],
	  [], [enable_lwgeom=no])
  if test x"$enable_lwgeom" != "xno"; then
	  AC_CHECK_HEADERS(liblwgeom.h,, [AC_MSG_ERROR([cannot find liblwgeom.h, bailing out])])
	  _save_libs="$LIBS"
	  LIBS=$LIBS' -llwgeom -lgeos_c'
	  AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return lwgeom_make_valid(); return 0; }
	    void lwgeom_init_allocators(void) { return; } ])],
	    [AC_DEFINE(ENABLE_LWGEOM)],
            [AC_MSG_ERROR(['liblwgeom' doesn't seem to be installed on this system; unsupported lwgeom_make_valid().])])
	  LIBS="$_save_libs"
	  LIBS=$LIBS' -llwgeom -lgeos_c'
	#
	# testing for PostGIS 2.1 - lwgeom_set_handlers
	#
	  AC_SEARCH_LIBS(lwgeom_set_handlers,geos_c,AC_DEFINE(POSTGIS_2_1))











  fi
else
  AC_DEFINE(OMIT_GEOS)
fi

#-----------------------------------------------------------------------
#   --enable-libxml2
................................................................................
#
AC_ARG_ENABLE(examples, [AS_HELP_STRING(
       [--enable-examples], [enables building examples [default=yes]])],
       [], [enable_examples=yes])
AM_CONDITIONAL(ENABLE_EXAMPLES, [test x"$enable_examples" != "xno"])
#-----------------------------------------------------------------------










# Checking for MinGW
AM_CONDITIONAL([MINGW], [test "$target_alias" = "mingw32"])
# Checking for Mac OsX
AM_CONDITIONAL([MACOSX], [test "$target_alias" = "macosx"])
# Checking for Android
AM_CONDITIONAL([ANDROID], [test "$target_alias" = "android"])





AC_OUTPUT

#-----------------------------------------------------------------------
# printing an eventual message reporting about GPL escalation
#-----------------------------------------------------------------------
gpl_escalation=no;
if test x"$enable_lwgeom" != "xno"; then
    gpl_escalation=yes
fi
if test x"$enable_controlpoints" != "xno"; then
    gpl_escalation=yes
fi
if test x"$gpl_escalation" != xno; then
    echo 
    echo
    echo "=============================================================="
    echo "                        IMPORTANT NOTICE"
    echo "=============================================================="
    echo "You have selected --enable-lwgeom and/or --enable-controlpoints"
    echo
    echo "Both modules strictly depend on code released under the GPLv2+"
    echo "license, wich is virally infective by definition."
    echo "Consequently the copy of libspatialite you are going to build"
    echo "if configured this way *must* be released under the GPLv2+ license."
    echo
    echo "If you wish better preserving the initial MPL tri-license you"
    echo "simply have to reconfigure by specifying the following options:"
    echo "        --disable-lwgeom --disable-controlpoints"
    echo "=============================================================="
    
fi

Changes to examples/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

if MODULE_ONLY
noinst_PROGRAMS = 
else
noinst_PROGRAMS = demo1 demo2 demo3 demo4 demo5
endif

AM_CFLAGS = -I@srcdir@/../src/headers 
AM_LDFLAGS = -L../src -lspatialite -lm $(GCOV_FLAGS)

LDADD = @LIBXML2_LIBS@

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = examples.doxy
<
<
<
<

<













1

2
3
4
5
6
7
8
9
10




noinst_PROGRAMS = demo1 demo2 demo3 demo4 demo5


AM_CFLAGS = -I@srcdir@/../src/headers 
AM_LDFLAGS = -L../src -lspatialite -lm $(GCOV_FLAGS)

LDADD = @LIBXML2_LIBS@

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = examples.doxy

Changes to examples/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
84
85
86
87
88
89
90
91
92
93
94


95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
337
338
339
340
341
342
343

344
345
346
347
348
349
350
...
627
628
629
630
631
632
633
634
635
636
637
638
639
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@MODULE_ONLY_FALSE@noinst_PROGRAMS = demo1$(EXEEXT) demo2$(EXEEXT) \
@MODULE_ONLY_FALSE@	demo3$(EXEEXT) demo4$(EXEEXT) \
@MODULE_ONLY_FALSE@	demo5$(EXEEXT)
subdir = examples


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
demo1_SOURCES = demo1.c
demo1_OBJECTS = demo1.$(OBJEXT)
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign examples/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







|
<
|

>
>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
...
175
176
177
178
179
180
181

182
183
184
185
186
187
188
...
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
...
617
618
619
620
621
622
623


624
625
626
627
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = demo1$(EXEEXT) demo2$(EXEEXT) demo3$(EXEEXT) \

	demo4$(EXEEXT) demo5$(EXEEXT)
subdir = examples
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
demo1_SOURCES = demo1.c
demo1_OBJECTS = demo1.$(OBJEXT)
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to examples/demo1.c.

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
...
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
...
378
379
380
381
382
383
384
385
386
387
  each single connection
- allocating/freeing this block falls under the responsibility 
  of the program handling the connection
- in multithreaded programs a connection can never be share by
  different threads; the internal-cache block must be allocated
  by the same thread holding the connection
*/

    cache = spatialite_alloc_connection ();
    spatialite_init_ex (handle, cache, 0);


/* showing the SQLite version */
    printf ("SQLite version: %s\n", sqlite3_libversion ());
/* showing the SpatiaLite version */
................................................................................
					      printf ("%s SRID=%d", geom_name,
						      geom->Srid);
					      if (geom_type == GAIA_LINESTRING
						  || geom_type ==
						  GAIA_MULTILINESTRING)
						{
#ifndef OMIT_GEOS		/* GEOS is required */
						    gaiaGeomCollLength_r (cache,
									  geom,
									  &measure);
						    printf (" length=%1.2f",
							    measure);
#else
						    printf
							(" length=?? [no GEOS support available]");
#endif /* GEOS enabled/disabled */
						}
................................................................................
/* we have to free the dynamic pointer array used to store geotable names */
    for (i = 0; i < n_geotables; i++)
      {
/* freeing each tablename */
	  free (p_geotables[i]);
      }
    free (p_geotables);
    spatialite_shutdown ();
    return 0;

  abort:
    sqlite3_close (handle);

/* freeing the internal-cache memory block */
    spatialite_cleanup_ex (cache);
................................................................................
	  for (i = 0; i < n_geotables; i++)
	    {
/* freeing each tablename */
		free (p_geotables[i]);
	    }
	  free (p_geotables);
      }
    spatialite_shutdown ();
    return -1;
}







|







 







|
<
|







 







|







 







|


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
283
284
285
286
287
288
289
290

291
292
293
294
295
296
297
298
...
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
...
377
378
379
380
381
382
383
384
385
386
  each single connection
- allocating/freeing this block falls under the responsibility 
  of the program handling the connection
- in multithreaded programs a connection can never be share by
  different threads; the internal-cache block must be allocated
  by the same thread holding the connection
*/
    
    cache = spatialite_alloc_connection ();
    spatialite_init_ex (handle, cache, 0);


/* showing the SQLite version */
    printf ("SQLite version: %s\n", sqlite3_libversion ());
/* showing the SpatiaLite version */
................................................................................
					      printf ("%s SRID=%d", geom_name,
						      geom->Srid);
					      if (geom_type == GAIA_LINESTRING
						  || geom_type ==
						  GAIA_MULTILINESTRING)
						{
#ifndef OMIT_GEOS		/* GEOS is required */
						    gaiaGeomCollLength (geom,

									&measure);
						    printf (" length=%1.2f",
							    measure);
#else
						    printf
							(" length=?? [no GEOS support available]");
#endif /* GEOS enabled/disabled */
						}
................................................................................
/* we have to free the dynamic pointer array used to store geotable names */
    for (i = 0; i < n_geotables; i++)
      {
/* freeing each tablename */
	  free (p_geotables[i]);
      }
    free (p_geotables);
    spatialite_shutdown();
    return 0;

  abort:
    sqlite3_close (handle);

/* freeing the internal-cache memory block */
    spatialite_cleanup_ex (cache);
................................................................................
	  for (i = 0; i < n_geotables; i++)
	    {
/* freeing each tablename */
		free (p_geotables[i]);
	    }
	  free (p_geotables);
      }
    spatialite_shutdown();
    return -1;
}

Changes to examples/demo2.c.

236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
...
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
...
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
...
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
...
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
...
538
539
540
541
542
543
544
545
546
547
/* we'll allocate a Geometry object */
    geo_pt = gaiaAllocGeomColl ();
/* then we insert a POINT, directly passing its coordinates */
    gaiaAddPointToGeomColl (geo_pt, 1.5, 2.75);
/* now we'll print the main attributes for this geometry */
    printf ("step#1: %s\t\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_pt)),
	    gaiaDimension (geo_pt), gaiaIsValid_r (cache, geo_pt));
    geometry_printout (geo_pt);



/*
Step #2
creating and checking a LINESTRING Geometry
................................................................................
    gaiaSetPoint (line->Coords, 2, 2.0, 2.0);
    gaiaSetPoint (line->Coords, 3, 100.0, 2.0);
    gaiaSetPoint (line->Coords, 4, 100.0, 100.0);


    printf ("\nstep#2: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_ln)),
	    gaiaDimension (geo_ln), gaiaIsValid_r (cache, geo_ln));
    geometry_printout (geo_ln);



/*
Step #3
creating and checking a POLYGON Geometry
................................................................................
    gaiaSetPoint (ring->Coords, 2, 31.0, 31.0);
    gaiaSetPoint (ring->Coords, 3, 30.0, 31.0);
    gaiaSetPoint (ring->Coords, 4, 30.0, 30.0);


    printf ("\nstep#3: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_pg)),
	    gaiaDimension (geo_pg), gaiaIsValid_r (cache, geo_pg));
    geometry_printout (geo_pg);



/*
Step #4
creating and checking a MULTIPOINT Geometry
................................................................................
    gaiaAddPointToGeomColl (geo_mpt, 5.0, 5.0);
    gaiaAddPointToGeomColl (geo_mpt, 15.0, 5.0);
    gaiaAddPointToGeomColl (geo_mpt, 5.0, 15.0);
    gaiaAddPointToGeomColl (geo_mpt, 25.0, 5.0);
    gaiaAddPointToGeomColl (geo_mpt, 5.0, 25.0);
    printf ("\nstep#4: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_mpt)),
	    gaiaDimension (geo_mpt), gaiaIsValid_r (cache, geo_mpt));
    geometry_printout (geo_mpt);



/*
Step #5
creating and checking a MULTILINESTRING Geometry
................................................................................

    line = gaiaAddLinestringToGeomColl (geo_mln, 2);
    gaiaSetPoint (line->Coords, 0, 40.0, 50.0);
    gaiaSetPoint (line->Coords, 1, 50.0, 40.0);

    printf ("\nstep#5: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_mln)),
	    gaiaDimension (geo_mln), gaiaIsValid_r (cache, geo_mln));
    geometry_printout (geo_mln);



/*
Step #6
creating and checking a MULTIPOLYGON Geometry
................................................................................
    gaiaSetPoint (ring->Coords, 1, 90.0, 80.0);
    gaiaSetPoint (ring->Coords, 2, 90.0, 90.0);
    gaiaSetPoint (ring->Coords, 3, 80.0, 90.0);
    gaiaSetPoint (ring->Coords, 4, 80.0, 80.0);

    printf ("\nstep#6: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_mpg)),
	    gaiaDimension (geo_mpg), gaiaIsValid_r (cache, geo_mpg));
    geometry_printout (geo_mpg);



/*
Step #7
creating and checking a GEOMETRYCOLLECTION Geometry
................................................................................
    gaiaSetPoint (ring->Coords, 1, 190.0, 180.0);
    gaiaSetPoint (ring->Coords, 2, 190.0, 190.0);
    gaiaSetPoint (ring->Coords, 3, 180.0, 190.0);
    gaiaSetPoint (ring->Coords, 4, 180.0, 180.0);

    printf ("\nstep#7: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_coll)),
	    gaiaDimension (geo_coll), gaiaIsValid_r (cache, geo_coll));
    geometry_printout (geo_coll);




/*
Step #8
................................................................................
	gaiaFreeGeomColl (geo_mln);
    if (geo_mpg)
	gaiaFreeGeomColl (geo_mpg);
    if (geo_coll)
	gaiaFreeGeomColl (geo_coll);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);
    spatialite_shutdown ();
    return 0;
}







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|


236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
...
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
...
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
...
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
...
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
...
538
539
540
541
542
543
544
545
546
547
/* we'll allocate a Geometry object */
    geo_pt = gaiaAllocGeomColl ();
/* then we insert a POINT, directly passing its coordinates */
    gaiaAddPointToGeomColl (geo_pt, 1.5, 2.75);
/* now we'll print the main attributes for this geometry */
    printf ("step#1: %s\t\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_pt)),
	    gaiaDimension (geo_pt), gaiaIsValid (geo_pt));
    geometry_printout (geo_pt);



/*
Step #2
creating and checking a LINESTRING Geometry
................................................................................
    gaiaSetPoint (line->Coords, 2, 2.0, 2.0);
    gaiaSetPoint (line->Coords, 3, 100.0, 2.0);
    gaiaSetPoint (line->Coords, 4, 100.0, 100.0);


    printf ("\nstep#2: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_ln)),
	    gaiaDimension (geo_ln), gaiaIsValid (geo_ln));
    geometry_printout (geo_ln);



/*
Step #3
creating and checking a POLYGON Geometry
................................................................................
    gaiaSetPoint (ring->Coords, 2, 31.0, 31.0);
    gaiaSetPoint (ring->Coords, 3, 30.0, 31.0);
    gaiaSetPoint (ring->Coords, 4, 30.0, 30.0);


    printf ("\nstep#3: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_pg)),
	    gaiaDimension (geo_pg), gaiaIsValid (geo_pg));
    geometry_printout (geo_pg);



/*
Step #4
creating and checking a MULTIPOINT Geometry
................................................................................
    gaiaAddPointToGeomColl (geo_mpt, 5.0, 5.0);
    gaiaAddPointToGeomColl (geo_mpt, 15.0, 5.0);
    gaiaAddPointToGeomColl (geo_mpt, 5.0, 15.0);
    gaiaAddPointToGeomColl (geo_mpt, 25.0, 5.0);
    gaiaAddPointToGeomColl (geo_mpt, 5.0, 25.0);
    printf ("\nstep#4: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_mpt)),
	    gaiaDimension (geo_mpt), gaiaIsValid (geo_mpt));
    geometry_printout (geo_mpt);



/*
Step #5
creating and checking a MULTILINESTRING Geometry
................................................................................

    line = gaiaAddLinestringToGeomColl (geo_mln, 2);
    gaiaSetPoint (line->Coords, 0, 40.0, 50.0);
    gaiaSetPoint (line->Coords, 1, 50.0, 40.0);

    printf ("\nstep#5: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_mln)),
	    gaiaDimension (geo_mln), gaiaIsValid (geo_mln));
    geometry_printout (geo_mln);



/*
Step #6
creating and checking a MULTIPOLYGON Geometry
................................................................................
    gaiaSetPoint (ring->Coords, 1, 90.0, 80.0);
    gaiaSetPoint (ring->Coords, 2, 90.0, 90.0);
    gaiaSetPoint (ring->Coords, 3, 80.0, 90.0);
    gaiaSetPoint (ring->Coords, 4, 80.0, 80.0);

    printf ("\nstep#6: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_mpg)),
	    gaiaDimension (geo_mpg), gaiaIsValid (geo_mpg));
    geometry_printout (geo_mpg);



/*
Step #7
creating and checking a GEOMETRYCOLLECTION Geometry
................................................................................
    gaiaSetPoint (ring->Coords, 1, 190.0, 180.0);
    gaiaSetPoint (ring->Coords, 2, 190.0, 190.0);
    gaiaSetPoint (ring->Coords, 3, 180.0, 190.0);
    gaiaSetPoint (ring->Coords, 4, 180.0, 180.0);

    printf ("\nstep#7: %s\tDimension=%d IsValid=%d\n",
	    geom_type (gaiaGeometryType (geo_coll)),
	    gaiaDimension (geo_coll), gaiaIsValid (geo_coll));
    geometry_printout (geo_coll);




/*
Step #8
................................................................................
	gaiaFreeGeomColl (geo_mln);
    if (geo_mpg)
	gaiaFreeGeomColl (geo_mpg);
    if (geo_coll)
	gaiaFreeGeomColl (geo_coll);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);
    spatialite_shutdown();
    return 0;
}

Changes to makefile.vc.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
	src\gaiageo\gg_geodesic.obj src\gaiageo\gg_geoJSON.obj \
	src\gaiageo\gg_geometries.obj src\gaiageo\gg_geoscvt.obj \
	src\gaiageo\gg_gml.obj src\gaiageo\gg_kml.obj \
	src\gaiageo\gg_relations.obj src\gaiageo\gg_shape.obj \
	src\gaiageo\gg_transform.obj src\gaiageo\gg_vanuatu.obj \
	src\gaiageo\gg_wkb.obj src\gaiageo\gg_wkt.obj \
	src\gaiageo\gg_extras.obj src\gaiageo\gg_xml.obj \
	src\gaiageo\gg_voronoj.obj src\gaiageo\gg_matrix.obj \
	src\gaiageo\gg_relations_ext.obj src\gaiageo\gg_rttopo.obj \
	src/connection_cache/alloc_cache.obj src/connection_cache/gg_sequence.obj \
	src\spatialite\mbrcache.obj src\shapefiles\shapefiles.obj \
	src\spatialite\spatialite.obj src\spatialite\virtualdbf.obj \
	src\spatialite\virtualfdo.obj src\spatialite\virtualnetwork.obj \
	src\spatialite\virtualshape.obj src\spatialite\virtualspatialindex.obj \
	src\spatialite\statistics.obj src\spatialite\metatables.obj \
	src\spatialite\virtualXL.obj src\spatialite\extra_tables.obj \
	src\spatialite\virtualxpath.obj src\spatialite\virtualbbox.obj \
	src\spatialite\spatialite_init.obj src\spatialite\se_helpers.obj \
	src\spatialite\srid_aux.obj src\spatialite\table_cloner.obj \
	src\spatialite\virtualelementary.obj src\spatialite\virtualrouting.obj \
	src\spatialite\create_routing.obj \
	src\wfs\wfs_in.obj src\srsinit\srs_init.obj \
	src\dxf\dxf_parser.obj src\dxf\dxf_loader.obj src\dxf\dxf_writer.obj \
	src\dxf\dxf_load_distinct.obj src\dxf\dxf_load_mixed.obj \
	src\shapefiles\validator.obj src\md5\md5.obj src\md5\gaia_md5.obj \
	src\srsinit\epsg_inlined_00.obj src\srsinit\epsg_inlined_01.obj \
	src\srsinit\epsg_inlined_02.obj src\srsinit\epsg_inlined_03.obj \
	src\srsinit\epsg_inlined_04.obj src\srsinit\epsg_inlined_05.obj \
................................................................................
	src\srsinit\epsg_inlined_32.obj src\srsinit\epsg_inlined_33.obj \
	src\srsinit\epsg_inlined_34.obj src\srsinit\epsg_inlined_35.obj \
	src\srsinit\epsg_inlined_36.obj src\srsinit\epsg_inlined_37.obj \
	src\srsinit\epsg_inlined_38.obj src\srsinit\epsg_inlined_39.obj \
	src\srsinit\epsg_inlined_40.obj src\srsinit\epsg_inlined_41.obj \
	src\srsinit\epsg_inlined_42.obj src\srsinit\epsg_inlined_43.obj \
	src\srsinit\epsg_inlined_44.obj src\srsinit\epsg_inlined_45.obj \
	src\srsinit\epsg_inlined_46.obj src\srsinit\epsg_inlined_47.obj \
	src\srsinit\epsg_inlined_48.obj src\srsinit\epsg_inlined_49.obj \
	src\srsinit\epsg_inlined_50.obj src\srsinit\epsg_inlined_51.obj \
	src\srsinit\epsg_inlined_extra.obj src\srsinit\epsg_inlined_prussian.obj \
	src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
	src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
	src\cutter\gaia_cutter.obj src\spatialite\virtualknn.obj \
	src\topology\gaia_auxnet.obj src\topology\gaia_topostmts.obj \
	src\topology\gaia_auxtopo.obj src\topology\lwn_network.obj \
	src\topology\gaia_netstmts.obj src\topology\net_callbacks.obj \
	src\topology\gaia_network.obj src\topology\topo_callbacks.obj \
	src\topology\gaia_topology.obj \
	src\stored_procedures\stored_procedures.obj

SPATIALITE_DLL = spatialite$(VERSION).dll

CFLAGS = /nologo -I.\src\headers -I.\src\topology \
	-I. -IC:\OSGeo4W\include $(OPTFLAGS)

default:	all

all: spatialite.lib spatialite_i.lib
#$(EXIF_LOADER_EXE)

spatialite.lib:	$(LIBOBJ)
................................................................................
	$(CC) $(CFLAGS) /c $*.c /Fo$@
	
clean:
	del *.dll
	del *.exp
	del *.manifest
	del *.lib
	del src\connection_cache\*.obj
	del src\cutter\*.obj
	del src\gaiaaux\*.obj
	del src\gaiaexif\*.obj
	del src\gaiageo\*.obj
	del src\shapefiles\*.obj
	del src\spatialite\*.obj
	del src\srsinit\*.obj
	del src\versioninfo\*.obj
	del src\virtualtext\*.obj
	del src\wfs\*.obj
	del src\dxf\*.obj
	del src\md5\*.obj
	del src\topology\*.obj
	del src\stored_procedures\*.obj
	del *.pdb

install: all
	-mkdir $(INSTDIR)
	-mkdir $(INSTDIR)\bin
	-mkdir $(INSTDIR)\lib
	-mkdir $(INSTDIR)\include
	-mkdir $(INSTDIR)\include\spatialite
	copy *.dll $(INSTDIR)\bin
	copy *.lib $(INSTDIR)\lib
	copy src\headers\spatialite.h $(INSTDIR)\include
	copy src\headers\spatialite\*.h $(INSTDIR)\include\spatialite
	







<
|
<







|
<
<
<







 







|
<
<
|

|
<
<
<
<
<
<
<
<


<
|







 







<
<



<







<
<













10
11
12
13
14
15
16

17

18
19
20
21
22
23
24
25



26
27
28
29
30
31
32
..
46
47
48
49
50
51
52
53


54
55
56








57
58

59
60
61
62
63
64
65
66
..
83
84
85
86
87
88
89


90
91
92

93
94
95
96
97
98
99


100
101
102
103
104
105
106
107
108
109
110
111
112
	src\gaiageo\gg_geodesic.obj src\gaiageo\gg_geoJSON.obj \
	src\gaiageo\gg_geometries.obj src\gaiageo\gg_geoscvt.obj \
	src\gaiageo\gg_gml.obj src\gaiageo\gg_kml.obj \
	src\gaiageo\gg_relations.obj src\gaiageo\gg_shape.obj \
	src\gaiageo\gg_transform.obj src\gaiageo\gg_vanuatu.obj \
	src\gaiageo\gg_wkb.obj src\gaiageo\gg_wkt.obj \
	src\gaiageo\gg_extras.obj src\gaiageo\gg_xml.obj \

	src\gaiageo\gg_relations_ext.obj src/connection_cache/alloc_cache.obj \

	src\spatialite\mbrcache.obj src\shapefiles\shapefiles.obj \
	src\spatialite\spatialite.obj src\spatialite\virtualdbf.obj \
	src\spatialite\virtualfdo.obj src\spatialite\virtualnetwork.obj \
	src\spatialite\virtualshape.obj src\spatialite\virtualspatialindex.obj \
	src\spatialite\statistics.obj src\spatialite\metatables.obj \
	src\spatialite\virtualXL.obj src\spatialite\extra_tables.obj \
	src\spatialite\virtualxpath.obj src\spatialite\virtualbbox.obj \
	src\spatialite\spatialite_init.obj src\gaiageo\gg_voronoj.obj \



	src\wfs\wfs_in.obj src\srsinit\srs_init.obj \
	src\dxf\dxf_parser.obj src\dxf\dxf_loader.obj src\dxf\dxf_writer.obj \
	src\dxf\dxf_load_distinct.obj src\dxf\dxf_load_mixed.obj \
	src\shapefiles\validator.obj src\md5\md5.obj src\md5\gaia_md5.obj \
	src\srsinit\epsg_inlined_00.obj src\srsinit\epsg_inlined_01.obj \
	src\srsinit\epsg_inlined_02.obj src\srsinit\epsg_inlined_03.obj \
	src\srsinit\epsg_inlined_04.obj src\srsinit\epsg_inlined_05.obj \
................................................................................
	src\srsinit\epsg_inlined_32.obj src\srsinit\epsg_inlined_33.obj \
	src\srsinit\epsg_inlined_34.obj src\srsinit\epsg_inlined_35.obj \
	src\srsinit\epsg_inlined_36.obj src\srsinit\epsg_inlined_37.obj \
	src\srsinit\epsg_inlined_38.obj src\srsinit\epsg_inlined_39.obj \
	src\srsinit\epsg_inlined_40.obj src\srsinit\epsg_inlined_41.obj \
	src\srsinit\epsg_inlined_42.obj src\srsinit\epsg_inlined_43.obj \
	src\srsinit\epsg_inlined_44.obj src\srsinit\epsg_inlined_45.obj \
	src\srsinit\epsg_inlined_extra.obj \


	src\srsinit\epsg_inlined_prussian.obj \
	src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
	src\versioninfo\version.obj src\virtualtext\virtualtext.obj








SPATIALITE_DLL = spatialite$(VERSION).dll


CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS)

default:	all

all: spatialite.lib spatialite_i.lib
#$(EXIF_LOADER_EXE)

spatialite.lib:	$(LIBOBJ)
................................................................................
	$(CC) $(CFLAGS) /c $*.c /Fo$@
	
clean:
	del *.dll
	del *.exp
	del *.manifest
	del *.lib


	del src\gaiaaux\*.obj
	del src\gaiaexif\*.obj
	del src\gaiageo\*.obj

	del src\spatialite\*.obj
	del src\srsinit\*.obj
	del src\versioninfo\*.obj
	del src\virtualtext\*.obj
	del src\wfs\*.obj
	del src\dxf\*.obj
	del src\md5\*.obj


	del *.pdb

install: all
	-mkdir $(INSTDIR)
	-mkdir $(INSTDIR)\bin
	-mkdir $(INSTDIR)\lib
	-mkdir $(INSTDIR)\include
	-mkdir $(INSTDIR)\include\spatialite
	copy *.dll $(INSTDIR)\bin
	copy *.lib $(INSTDIR)\lib
	copy src\headers\spatialite.h $(INSTDIR)\include
	copy src\headers\spatialite\*.h $(INSTDIR)\include\spatialite
	

Deleted makefile64.vc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# $Id: $
#
# NMAKE Makefile to build libspatialite on Windows
#
!INCLUDE nmake64.opt

LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
	src\gaiaexif\gaia_exif.obj src\gaiageo\gg_advanced.obj \
	src\gaiageo\gg_endian.obj src\gaiageo\gg_ewkt.obj \
	src\gaiageo\gg_geodesic.obj src\gaiageo\gg_geoJSON.obj \
	src\gaiageo\gg_geometries.obj src\gaiageo\gg_geoscvt.obj \
	src\gaiageo\gg_gml.obj src\gaiageo\gg_kml.obj \
	src\gaiageo\gg_relations.obj src\gaiageo\gg_shape.obj \
	src\gaiageo\gg_transform.obj src\gaiageo\gg_vanuatu.obj \
	src\gaiageo\gg_wkb.obj src\gaiageo\gg_wkt.obj \
	src\gaiageo\gg_extras.obj src\gaiageo\gg_xml.obj \
	src\gaiageo\gg_voronoj.obj src\gaiageo\gg_matrix.obj \
	src\gaiageo\gg_relations_ext.obj src\gaiageo\gg_rttopo.obj \
	src/connection_cache/alloc_cache.obj src/connection_cache/gg_sequence.obj \
	src\spatialite\mbrcache.obj src\shapefiles\shapefiles.obj \
	src\spatialite\spatialite.obj src\spatialite\virtualdbf.obj \
	src\spatialite\virtualfdo.obj src\spatialite\virtualnetwork.obj \
	src\spatialite\virtualshape.obj src\spatialite\virtualspatialindex.obj \
	src\spatialite\statistics.obj src\spatialite\metatables.obj \
	src\spatialite\virtualXL.obj src\spatialite\extra_tables.obj \
	src\spatialite\virtualxpath.obj src\spatialite\virtualbbox.obj \
	src\spatialite\spatialite_init.obj src\spatialite\se_helpers.obj \
	src\spatialite\srid_aux.obj src\spatialite\table_cloner.obj \
	src\spatialite\virtualelementary.obj src\spatialite\virtualrouting.obj \
	src\spatialite\create_routing.obj \
	src\wfs\wfs_in.obj src\srsinit\srs_init.obj \
	src\dxf\dxf_parser.obj src\dxf\dxf_loader.obj src\dxf\dxf_writer.obj \
	src\dxf\dxf_load_distinct.obj src\dxf\dxf_load_mixed.obj \
	src\shapefiles\validator.obj src\md5\md5.obj src\md5\gaia_md5.obj \
	src\srsinit\epsg_inlined_00.obj src\srsinit\epsg_inlined_01.obj \
	src\srsinit\epsg_inlined_02.obj src\srsinit\epsg_inlined_03.obj \
	src\srsinit\epsg_inlined_04.obj src\srsinit\epsg_inlined_05.obj \
	src\srsinit\epsg_inlined_06.obj src\srsinit\epsg_inlined_07.obj \
	src\srsinit\epsg_inlined_08.obj src\srsinit\epsg_inlined_09.obj \
	src\srsinit\epsg_inlined_10.obj src\srsinit\epsg_inlined_11.obj \
	src\srsinit\epsg_inlined_12.obj src\srsinit\epsg_inlined_13.obj \
	src\srsinit\epsg_inlined_14.obj src\srsinit\epsg_inlined_15.obj \
	src\srsinit\epsg_inlined_16.obj src\srsinit\epsg_inlined_17.obj \
	src\srsinit\epsg_inlined_18.obj src\srsinit\epsg_inlined_19.obj \
	src\srsinit\epsg_inlined_20.obj src\srsinit\epsg_inlined_21.obj \
	src\srsinit\epsg_inlined_22.obj src\srsinit\epsg_inlined_23.obj \
	src\srsinit\epsg_inlined_24.obj src\srsinit\epsg_inlined_25.obj \
	src\srsinit\epsg_inlined_26.obj src\srsinit\epsg_inlined_27.obj \
	src\srsinit\epsg_inlined_28.obj src\srsinit\epsg_inlined_29.obj \
	src\srsinit\epsg_inlined_30.obj src\srsinit\epsg_inlined_31.obj \
	src\srsinit\epsg_inlined_32.obj src\srsinit\epsg_inlined_33.obj \
	src\srsinit\epsg_inlined_34.obj src\srsinit\epsg_inlined_35.obj \
	src\srsinit\epsg_inlined_36.obj src\srsinit\epsg_inlined_37.obj \
	src\srsinit\epsg_inlined_38.obj src\srsinit\epsg_inlined_39.obj \
	src\srsinit\epsg_inlined_40.obj src\srsinit\epsg_inlined_41.obj \
	src\srsinit\epsg_inlined_42.obj src\srsinit\epsg_inlined_43.obj \
	src\srsinit\epsg_inlined_44.obj src\srsinit\epsg_inlined_45.obj \
	src\srsinit\epsg_inlined_46.obj src\srsinit\epsg_inlined_47.obj \
	src\srsinit\epsg_inlined_48.obj src\srsinit\epsg_inlined_49.obj \
	src\srsinit\epsg_inlined_50.obj src\srsinit\epsg_inlined_51.obj \
	src\srsinit\epsg_inlined_extra.obj \
	src\srsinit\epsg_inlined_prussian.obj \
	src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
	src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
	src\cutter\gaia_cutter.obj src\spatialite\virtualknn.obj \
	src\topology\gaia_auxnet.obj src\topology\gaia_topostmts.obj \
	src\topology\gaia_auxtopo.obj src\topology\lwn_network.obj \
	src\topology\gaia_netstmts.obj src\topology\net_callbacks.obj \
	src\topology\gaia_network.obj src\topology\topo_callbacks.obj \
	src\topology\gaia_topology.obj \
	src\stored_procedures\stored_procedures.obj

SPATIALITE_DLL = spatialite$(VERSION).dll

CFLAGS = /nologo -I.\src\headers -I.\src\topology \
	-I. -IC:\OSGeo4W64\include -IC:\OSGeo4W64\include\libxml2 $(OPTFLAGS)

default:	all

all: spatialite.lib spatialite_i.lib
#$(EXIF_LOADER_EXE)

spatialite.lib:	$(LIBOBJ)
	if exist spatialite.lib del spatialite.lib
	lib /out:spatialite.lib $(LIBOBJ)

$(SPATIALITE_DLL):	spatialite_i.lib

spatialite_i.lib:     $(LIBOBJ)
	link /debug /dll /out:$(SPATIALITE_DLL) \
		/implib:spatialite_i.lib $(LIBOBJ) \
		C:\OSGeo4W64\lib\proj_i.lib C:\OSGeo4W64\lib\geos_c.lib \
		C:\OSGeo4w64\lib\freexl_i.lib C:\OSGeo4w64\lib\iconv.lib \
		C:\OSGeo4W64\lib\sqlite3_i.lib C:\OSGeo4W64\lib\zlib.lib \
		C:\OSGeo4W64\lib\libxml2.lib
	if exist $(SPATIALITE_DLL).manifest mt -manifest \
		$(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2
		
.c.obj:
	$(CC) $(CFLAGS) /c $*.c /Fo$@
	
clean:
	del *.dll
	del *.exp
	del *.manifest
	del *.lib
	del src\connection_cache\*.obj
	del src\cutter\*.obj
	del src\gaiaaux\*.obj
	del src\gaiaexif\*.obj
	del src\gaiageo\*.obj
	del src\shapefiles\*.obj
	del src\spatialite\*.obj
	del src\srsinit\*.obj
	del src\versioninfo\*.obj
	del src\virtualtext\*.obj
	del src\wfs\*.obj
	del src\dxf\*.obj
	del src\md5\*.obj
	del src\topology\*.obj
	del src\stored_procedures\*.obj
	del *.pdb

install: all
	-mkdir $(INSTDIR)
	-mkdir $(INSTDIR)\bin
	-mkdir $(INSTDIR)\lib
	-mkdir $(INSTDIR)\include
	-mkdir $(INSTDIR)\include\spatialite
	copy *.dll $(INSTDIR)\bin
	copy *.lib $(INSTDIR)\lib
	copy src\headers\spatialite.h $(INSTDIR)\include
	copy src\headers\spatialite\*.h $(INSTDIR)\include\spatialite
	
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































Deleted makefile_mod.vc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# $Id: $
#
# NMAKE Makefile to build libspatialite on Windows
#
!INCLUDE nmake_mod.opt

LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
	src\gaiaexif\gaia_exif.obj src\gaiageo\gg_advanced.obj \
	src\gaiageo\gg_endian.obj src\gaiageo\gg_ewkt.obj \
	src\gaiageo\gg_geodesic.obj src\gaiageo\gg_geoJSON.obj \
	src\gaiageo\gg_geometries.obj src\gaiageo\gg_geoscvt.obj \
	src\gaiageo\gg_gml.obj src\gaiageo\gg_kml.obj \
	src\gaiageo\gg_relations.obj src\gaiageo\gg_shape.obj \
	src\gaiageo\gg_transform.obj src\gaiageo\gg_vanuatu.obj \
	src\gaiageo\gg_wkb.obj src\gaiageo\gg_wkt.obj \
	src\gaiageo\gg_extras.obj src\gaiageo\gg_xml.obj \
	src\gaiageo\gg_voronoj.obj src\gaiageo\gg_matrix.obj \
	src\gaiageo\gg_relations_ext.obj src\gaiageo\gg_rttopo.obj \
	src/connection_cache/alloc_cache.obj src/connection_cache/gg_sequence.obj \
	src\spatialite\mbrcache.obj src\shapefiles\shapefiles.obj \
	src\spatialite\spatialite.obj src\spatialite\virtualdbf.obj \
	src\spatialite\virtualfdo.obj src\spatialite\virtualnetwork.obj \
	src\spatialite\virtualshape.obj src\spatialite\virtualspatialindex.obj \
	src\spatialite\statistics.obj src\spatialite\metatables.obj \
	src\spatialite\virtualXL.obj src\spatialite\extra_tables.obj \
	src\spatialite\virtualxpath.obj src\spatialite\virtualbbox.obj \
	src\spatialite\spatialite_init.obj src\spatialite\se_helpers.obj \
	src\spatialite\srid_aux.obj src\spatialite\table_cloner.obj \
	src\spatialite\virtualelementary.obj  src\spatialite\virtualrouting.obj \
	src\spatialite\create_routing.obj \
	src\wfs\wfs_in.obj src\srsinit\srs_init.obj \
	src\dxf\dxf_parser.obj src\dxf\dxf_loader.obj src\dxf\dxf_writer.obj \
	src\dxf\dxf_load_distinct.obj src\dxf\dxf_load_mixed.obj \
	src\shapefiles\validator.obj src\md5\md5.obj src\md5\gaia_md5.obj \
	src\srsinit\epsg_inlined_00.obj src\srsinit\epsg_inlined_01.obj \
	src\srsinit\epsg_inlined_02.obj src\srsinit\epsg_inlined_03.obj \
	src\srsinit\epsg_inlined_04.obj src\srsinit\epsg_inlined_05.obj \
	src\srsinit\epsg_inlined_06.obj src\srsinit\epsg_inlined_07.obj \
	src\srsinit\epsg_inlined_08.obj src\srsinit\epsg_inlined_09.obj \
	src\srsinit\epsg_inlined_10.obj src\srsinit\epsg_inlined_11.obj \
	src\srsinit\epsg_inlined_12.obj src\srsinit\epsg_inlined_13.obj \
	src\srsinit\epsg_inlined_14.obj src\srsinit\epsg_inlined_15.obj \
	src\srsinit\epsg_inlined_16.obj src\srsinit\epsg_inlined_17.obj \
	src\srsinit\epsg_inlined_18.obj src\srsinit\epsg_inlined_19.obj \
	src\srsinit\epsg_inlined_20.obj src\srsinit\epsg_inlined_21.obj \
	src\srsinit\epsg_inlined_22.obj src\srsinit\epsg_inlined_23.obj \
	src\srsinit\epsg_inlined_24.obj src\srsinit\epsg_inlined_25.obj \
	src\srsinit\epsg_inlined_26.obj src\srsinit\epsg_inlined_27.obj \
	src\srsinit\epsg_inlined_28.obj src\srsinit\epsg_inlined_29.obj \
	src\srsinit\epsg_inlined_30.obj src\srsinit\epsg_inlined_31.obj \
	src\srsinit\epsg_inlined_32.obj src\srsinit\epsg_inlined_33.obj \
	src\srsinit\epsg_inlined_34.obj src\srsinit\epsg_inlined_35.obj \
	src\srsinit\epsg_inlined_36.obj src\srsinit\epsg_inlined_37.obj \
	src\srsinit\epsg_inlined_38.obj src\srsinit\epsg_inlined_39.obj \
	src\srsinit\epsg_inlined_40.obj src\srsinit\epsg_inlined_41.obj \
	src\srsinit\epsg_inlined_42.obj src\srsinit\epsg_inlined_43.obj \
	src\srsinit\epsg_inlined_44.obj src\srsinit\epsg_inlined_45.obj \
	src\srsinit\epsg_inlined_46.obj  src\srsinit\epsg_inlined_47.obj \
	src\srsinit\epsg_inlined_48.obj src\srsinit\epsg_inlined_49.obj \
	src\srsinit\epsg_inlined_50.obj src\srsinit\epsg_inlined_51.obj \
	src\srsinit\epsg_inlined_extra.obj src\srsinit\epsg_inlined_prussian.obj \
	src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
	src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
	src\cutter\gaia_cutter.obj  src\spatialite\virtualknn.obj \
	src\topology\gaia_auxnet.obj src\topology\gaia_topostmts.obj \
	src\topology\gaia_auxtopo.obj src\topology\lwn_network.obj \
	src\topology\gaia_netstmts.obj src\topology\net_callbacks.obj \
	src\topology\gaia_network.obj src\topology\topo_callbacks.obj \
	src\topology\gaia_topology.obj  \
	src\stored_procedures\stored_procedures.obj
MOD_SPATIALITE_DLL = mod_spatialite$(VERSION).dll

CFLAGS = /nologo -I.\src\headers -I.\src\topology \
	-I. -IC:\OSGeo4W\include $(OPTFLAGS)

default:	all

all: mod_spatialite.lib mod_spatialite_i.lib
#$(EXIF_LOADER_EXE)

mod_spatialite.lib:	$(LIBOBJ)
	if exist mod_spatialite.lib del mod_spatialite.lib
	lib /out:mod_spatialite.lib $(LIBOBJ)

$(MOD_SPATIALITE_DLL):	mod_spatialite_i.lib

mod_spatialite_i.lib:     $(LIBOBJ)
	link /debug /dll /out:$(MOD_SPATIALITE_DLL) \
		/implib:mod_spatialite_i.lib $(LIBOBJ) \
		C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \
		C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \
		C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \
		C:\OSGeo4W\lib\libxml2.lib
	if exist $(MOD_SPATIALITE_DLL).manifest mt -manifest \
		$(MOD_SPATIALITE_DLL).manifest -outputresource:$(MOD_SPATIALITE_DLL);2
		
.c.obj:
	$(CC) $(CFLAGS) /c $*.c /Fo$@
	
clean:
	del *.dll
	del *.exp
	del *.manifest
	del *.lib
	del src\connection_cache\*.obj
	del src\cutter\*.obj
	del src\gaiaaux\*.obj
	del src\gaiaexif\*.obj
	del src\gaiageo\*.obj
	del src\shapefiles\*.obj
	del src\spatialite\*.obj
	del src\srsinit\*.obj
	del src\versioninfo\*.obj
	del src\virtualtext\*.obj
	del src\wfs\*.obj
	del src\dxf\*.obj
	del src\md5\*.obj
	del src\topology\*.obj
	del src\stored_procedures\*.obj
	del *.pdb

install: all
	-mkdir $(INSTDIR)
	-mkdir $(INSTDIR)\bin
	-mkdir $(INSTDIR)\lib
	-mkdir $(INSTDIR)\include
	-mkdir $(INSTDIR)\include\spatialite
	copy *.dll $(INSTDIR)\bin
	copy *.lib $(INSTDIR)\lib
	copy src\headers\spatialite.h $(INSTDIR)\include
	copy src\headers\spatialite\*.h $(INSTDIR)\include\spatialite
	
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































Deleted makefile_mod64.vc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# $Id: $
#
# NMAKE Makefile to build libspatialite on Windows
#
!INCLUDE nmake_mod64.opt

LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
	src\gaiaexif\gaia_exif.obj src\gaiageo\gg_advanced.obj \
	src\gaiageo\gg_endian.obj src\gaiageo\gg_ewkt.obj \
	src\gaiageo\gg_geodesic.obj src\gaiageo\gg_geoJSON.obj \
	src\gaiageo\gg_geometries.obj src\gaiageo\gg_geoscvt.obj \
	src\gaiageo\gg_gml.obj src\gaiageo\gg_kml.obj \
	src\gaiageo\gg_relations.obj src\gaiageo\gg_shape.obj \
	src\gaiageo\gg_transform.obj src\gaiageo\gg_vanuatu.obj \
	src\gaiageo\gg_wkb.obj src\gaiageo\gg_wkt.obj \
	src\gaiageo\gg_extras.obj src\gaiageo\gg_xml.obj \
	src\gaiageo\gg_voronoj.obj src\gaiageo\gg_matrix.obj \
	src\gaiageo\gg_relations_ext.obj src\gaiageo\gg_rttopo.obj \
	src/connection_cache/alloc_cache.obj src/connection_cache/gg_sequence.obj \
	src\spatialite\mbrcache.obj src\shapefiles\shapefiles.obj \
	src\spatialite\spatialite.obj src\spatialite\virtualdbf.obj \
	src\spatialite\virtualfdo.obj src\spatialite\virtualnetwork.obj \
	src\spatialite\virtualshape.obj src\spatialite\virtualspatialindex.obj \
	src\spatialite\statistics.obj src\spatialite\metatables.obj \
	src\spatialite\virtualXL.obj src\spatialite\extra_tables.obj \
	src\spatialite\virtualxpath.obj src\spatialite\virtualbbox.obj \
	src\spatialite\spatialite_init.obj src\spatialite\se_helpers.obj \
	src\spatialite\srid_aux.obj src\spatialite\table_cloner.obj \
	src\spatialite\virtualelementary.obj  src\spatialite\virtualrouting.obj \
	src\spatialite\create_routing.obj \
	src\wfs\wfs_in.obj src\srsinit\srs_init.obj \
	src\dxf\dxf_parser.obj src\dxf\dxf_loader.obj src\dxf\dxf_writer.obj \
	src\dxf\dxf_load_distinct.obj src\dxf\dxf_load_mixed.obj \
	src\shapefiles\validator.obj src\md5\md5.obj src\md5\gaia_md5.obj \
	src\srsinit\epsg_inlined_00.obj src\srsinit\epsg_inlined_01.obj \
	src\srsinit\epsg_inlined_02.obj src\srsinit\epsg_inlined_03.obj \
	src\srsinit\epsg_inlined_04.obj src\srsinit\epsg_inlined_05.obj \
	src\srsinit\epsg_inlined_06.obj src\srsinit\epsg_inlined_07.obj \
	src\srsinit\epsg_inlined_08.obj src\srsinit\epsg_inlined_09.obj \
	src\srsinit\epsg_inlined_10.obj src\srsinit\epsg_inlined_11.obj \
	src\srsinit\epsg_inlined_12.obj src\srsinit\epsg_inlined_13.obj \
	src\srsinit\epsg_inlined_14.obj src\srsinit\epsg_inlined_15.obj \
	src\srsinit\epsg_inlined_16.obj src\srsinit\epsg_inlined_17.obj \
	src\srsinit\epsg_inlined_18.obj src\srsinit\epsg_inlined_19.obj \
	src\srsinit\epsg_inlined_20.obj src\srsinit\epsg_inlined_21.obj \
	src\srsinit\epsg_inlined_22.obj src\srsinit\epsg_inlined_23.obj \
	src\srsinit\epsg_inlined_24.obj src\srsinit\epsg_inlined_25.obj \
	src\srsinit\epsg_inlined_26.obj src\srsinit\epsg_inlined_27.obj \
	src\srsinit\epsg_inlined_28.obj src\srsinit\epsg_inlined_29.obj \
	src\srsinit\epsg_inlined_30.obj src\srsinit\epsg_inlined_31.obj \
	src\srsinit\epsg_inlined_32.obj src\srsinit\epsg_inlined_33.obj \
	src\srsinit\epsg_inlined_34.obj src\srsinit\epsg_inlined_35.obj \
	src\srsinit\epsg_inlined_36.obj src\srsinit\epsg_inlined_37.obj \
	src\srsinit\epsg_inlined_38.obj src\srsinit\epsg_inlined_39.obj \
	src\srsinit\epsg_inlined_40.obj src\srsinit\epsg_inlined_41.obj \
	src\srsinit\epsg_inlined_42.obj src\srsinit\epsg_inlined_43.obj \
	src\srsinit\epsg_inlined_44.obj src\srsinit\epsg_inlined_45.obj \
	src\srsinit\epsg_inlined_46.obj src\srsinit\epsg_inlined_47.obj \
	src\srsinit\epsg_inlined_48.obj src\srsinit\epsg_inlined_49.obj \
	src\srsinit\epsg_inlined_50.obj src\srsinit\epsg_inlined_51.obj \
	src\srsinit\epsg_inlined_extra.obj \
	src\srsinit\epsg_inlined_prussian.obj \
	src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
	src\versioninfo\version.obj src\virtualtext\virtualtext.obj \
	src\cutter\gaia_cutter.obj  src\spatialite\virtualknn.obj \
	src\topology\gaia_auxnet.obj src\topology\gaia_topostmts.obj \
	src\topology\gaia_auxtopo.obj src\topology\lwn_network.obj \
	src\topology\gaia_netstmts.obj src\topology\net_callbacks.obj \
	src\topology\gaia_network.obj src\topology\topo_callbacks.obj \
	src\topology\gaia_topology.obj  \
	src\stored_procedures\stored_procedures.obj
MOD_SPATIALITE_DLL = mod_spatialite$(VERSION).dll

CFLAGS = /nologo -I.\src\headers -I.\src\topology \
	-I. -IC:\OSGeo4W64\include -IC:\OSGeo4W64\include\libxml2 $(OPTFLAGS)

default:	all

all: mod_spatialite.lib mod_spatialite_i.lib
#$(EXIF_LOADER_EXE)

mod_spatialite.lib:	$(LIBOBJ)
	if exist mod_spatialite.lib del mod_spatialite.lib
	lib /out:mod_spatialite.lib $(LIBOBJ)

$(MOD_SPATIALITE_DLL):	mod_spatialite_i.lib

mod_spatialite_i.lib:     $(LIBOBJ)
	link /debug /dll /out:$(MOD_SPATIALITE_DLL) \
		/implib:mod_spatialite_i.lib $(LIBOBJ) \
		C:\OSGeo4W64\lib\proj_i.lib C:\OSGeo4W64\lib\geos_c.lib \
		C:\OSGeo4w64\lib\freexl_i.lib C:\OSGeo4w64\lib\iconv.lib \
		C:\OSGeo4W64\lib\sqlite3_i.lib C:\OSGeo4W64\lib\zlib.lib \
		C:\OSGeo4W64\lib\libxml2.lib
	if exist $(MOD_SPATIALITE_DLL).manifest mt -manifest \
		$(MOD_SPATIALITE_DLL).manifest -outputresource:$(MOD_SPATIALITE_DLL);2
		
.c.obj:
	$(CC) $(CFLAGS) /c $*.c /Fo$@
	
clean:
	del *.dll
	del *.exp
	del *.manifest
	del *.lib
	del src\connection_cache\*.obj
	del src\cutter\*.obj
	del src\gaiaaux\*.obj
	del src\gaiaexif\*.obj
	del src\gaiageo\*.obj
	del src\shapefiles\*.obj
	del src\spatialite\*.obj
	del src\srsinit\*.obj
	del src\versioninfo\*.obj
	del src\virtualtext\*.obj
	del src\wfs\*.obj
	del src\dxf\*.obj
	del src\md5\*.obj
	del src\topology\*.obj
	del src\stored_procedures\*.obj
	del *.pdb

install: all
	-mkdir $(INSTDIR)
	-mkdir $(INSTDIR)\bin
	-mkdir $(INSTDIR)\lib
	-mkdir $(INSTDIR)\include
	-mkdir $(INSTDIR)\include\spatialite
	copy *.dll $(INSTDIR)\bin
	copy *.lib $(INSTDIR)\lib
	copy src\headers\spatialite.h $(INSTDIR)\include
	copy src\headers\spatialite\*.h $(INSTDIR)\include\spatialite
	
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































Changes to nmake.opt.

1
2
3
4
5
6
7
8
9
10
11
12
# Directory tree where SpatiaLite will be installed.
INSTDIR=C:\OSGeo4W

# Uncomment the first for an optimized build, or the second for debug.
OPTFLAGS=	/nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \
		/DDLL_EXPORT /DYY_NO_UNISTD_H
#OPTFLAGS=	/nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT

# Set the version number for the DLL.  Normally we leave this blank since
# we want software that is dynamically loading the DLL to have no problem
# with version numbers.
VERSION=




|







1
2
3
4
5
6
7
8
9
10
11
12
# Directory tree where SpatiaLite will be installed.
INSTDIR=C:\OSGeo4W

# Uncomment the first for an optimized build, or the second for debug.
OPTFLAGS=	/nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
		/DDLL_EXPORT /DYY_NO_UNISTD_H
#OPTFLAGS=	/nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT

# Set the version number for the DLL.  Normally we leave this blank since
# we want software that is dynamically loading the DLL to have no problem
# with version numbers.
VERSION=

Deleted nmake64.opt.

1
2
3
4
5
6
7
8
9
10
11
12
# Directory tree where SpatiaLite will be installed.
INSTDIR=C:\OSGeo4W64

# Uncomment the first for an optimized build, or the second for debug.
OPTFLAGS=	/nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \
		/DDLL_EXPORT /DYY_NO_UNISTD_H
#OPTFLAGS=	/nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT

# Set the version number for the DLL.  Normally we leave this blank since
# we want software that is dynamically loading the DLL to have no problem
# with version numbers.
VERSION=
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted nmake_mod.opt.

1
2
3
4
5
6
7
8
9
10
11
12
# Directory tree where SpatiaLite will be installed.
INSTDIR=C:\OSGeo4W

# Uncomment the first for an optimized build, or the second for debug.
OPTFLAGS=	/nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \
		/DDLL_EXPORT /DLOADABLE_EXTENSION /DYY_NO_UNISTD_H
#OPTFLAGS=	/nologo /Zi /MD /Fdmod_spatialite.pdb /DDLL_EXPORT

# Set the version number for the DLL.  Normally we leave this blank since
# we want software that is dynamically loading the DLL to have no problem
# with version numbers.
VERSION=
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted nmake_mod64.opt.

1
2
3
4
5
6
7
8
9
10
11
12
# Directory tree where SpatiaLite will be installed.
INSTDIR=C:\OSGeo4W64

# Uncomment the first for an optimized build, or the second for debug.
OPTFLAGS=	/nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \
		/DDLL_EXPORT /DLOADABLE_EXTENSION /DYY_NO_UNISTD_H
#OPTFLAGS=	/nologo /Zi /MD /Fdmod_spatialite.pdb /DDLL_EXPORT

# Set the version number for the DLL.  Normally we leave this blank since
# we want software that is dynamically loading the DLL to have no problem
# with version numbers.
VERSION=
<
<
<
<
<
<
<
<
<
<
<
<
























Added spatialite-4.2.0.mk.



















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
include $(CLEAR_VARS)
# ./configure --enable-examples=no --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
# 2015-06-09: libspatialite-4.2.0-rc1
LOCAL_MODULE    := spatialite

# SQLite flags copied from ASOP
common_sqlite_flags := \
 -DHAVE_USLEEP=1 \
 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \
 -DSQLITE_THREADSAFE=1 \
 -DNDEBUG=1 \
 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \
 -DSQLITE_DEFAULT_AUTOVACUUM=1 \
 -DSQLITE_TEMP_STORE=3 \
 -DSQLITE_ENABLE_FTS3 \
 -DSQLITE_ENABLE_FTS3_BACKWARDS \
 -DSQLITE_ENABLE_RTREE=1 \
 -DSQLITE_DEFAULT_FILE_FORMAT=4


# spatialite flags
# comment out TARGET_CPU in config.h - will be replaced with TARGET_ARCH_ABI
spatialite_flags := \
 -DOMIT_FREEXL \
 -DTARGET_CPU=\"$(TARGET_ARCH_ABI)\" \
 -Dfdatasync=fsync \
 -DSQLITE_ENABLE_RTREE=1 \
 -DSQLITE_OMIT_BUILTIN_TEST=1 

LOCAL_CFLAGS    := \
 $(common_sqlite_flags) \
 $(spatialite_flags)

# LOCAL_LDLIBS is always ignored for static libraries
# LOCAL_LDLIBS    := -llog -lz
# LOADABLE_EXTENSION must NOT be defined
# For Spatialite with VirtualShapes,VirtualXL support iconv is needed
LOCAL_C_INCLUDES := \
 $(SQLITE_PATH) \
 $(SPATIALITE_PATH) \
 $(SPATIALITE_PATH)/src/headers \
 $(ICONV_PATH)/include \
 $(ICONV_PATH)/libcharset/include \
 $(GEOS_PATH)/include \
 $(GEOS_PATH)/capi \
 $(PROJ4_PATH)/src \
 $(LZMA_PATH)/src/liblzma/api \
 $(XML2_PATH)/include
LOCAL_SRC_FILES := \
 $(SPATIALITE_PATH)/src/connection_cache/alloc_cache.c \
 $(SPATIALITE_PATH)/src/connection_cache/generator/code_generator.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_load_distinct.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_loader.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_load_mixed.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_parser.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_writer.c \
 $(SPATIALITE_PATH)/src/gaiaaux/gg_sqlaux.c \
 $(SPATIALITE_PATH)/src/gaiaaux/gg_utf8.c \
 $(SPATIALITE_PATH)/src/gaiaexif/gaia_exif.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_advanced.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_endian.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_ewkt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_extras.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geodesic.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geoJSON.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geometries.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geoscvt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_gml.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_kml.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_lwgeom.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_relations.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_relations_ext.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_shape.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_transform.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_vanuatu.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_voronoj.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_wkb.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_wkt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_xml.c \
 $(SPATIALITE_PATH)/src/geopackage/gaia_cvt_gpkg.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgAddGeometryColumn.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_geometry_triggers.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_spatial_index.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_tile_triggers.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgBinary.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateBaseTables.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateTilesTable.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateTilesZoomLevel.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgGetImageType.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_get_normal_row.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_get_normal_zoom.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgInsertEpsgSRID.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgMakePoint.c \
 $(SPATIALITE_PATH)/src/md5/gaia_md5.c \
 $(SPATIALITE_PATH)/src/md5/md5.c \
 $(SPATIALITE_PATH)/src/shapefiles/shapefiles.c \
 $(SPATIALITE_PATH)/src/shapefiles/validator.c \
 $(SPATIALITE_PATH)/src/spatialite/extra_tables.c \
 $(SPATIALITE_PATH)/src/spatialite/mbrcache.c \
 $(SPATIALITE_PATH)/src/spatialite/metatables.c \
 $(SPATIALITE_PATH)/src/spatialite/spatialite.c \
 $(SPATIALITE_PATH)/src/spatialite/spatialite_init.c \
 $(SPATIALITE_PATH)/src/spatialite/statistics.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualbbox.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualdbf.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualfdo.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualgpkg.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualnetwork.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualshape.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualspatialindex.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualXL.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualxpath.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_00.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_01.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_02.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_03.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_04.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_05.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_06.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_07.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_08.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_09.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_10.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_11.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_12.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_13.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_14.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_15.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_16.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_17.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_18.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_19.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_20.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_21.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_22.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_23.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_24.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_25.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_26.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_27.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_28.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_29.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_30.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_31.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_32.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_33.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_34.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_35.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_36.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_37.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_38.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_39.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_40.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_41.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_42.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_43.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_44.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_45.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_extra.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_prussian.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_wgs84_00.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_wgs84_01.c \
 $(SPATIALITE_PATH)/src/srsinit/srs_init.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_update/auto_epsg.c \
 $(SPATIALITE_PATH)/src/versioninfo/version.c \
 $(SPATIALITE_PATH)/src/virtualtext/virtualtext.c \
 $(SPATIALITE_PATH)/src/wfs/wfs_in.c
LOCAL_STATIC_LIBRARIES := iconv proj geos libxml2
include $(BUILD_STATIC_LIBRARY)

Deleted spatialite-4.3.0.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
include $(CLEAR_VARS)
# ./configure  --enable-lwgeom=no --enable-gcp --enable-examples=no --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
# ./configure  --build=x86_64-pc-linux-gnu --host=arm-linux-eabi --without-grib --prefix=$PROJECT/external/gdal
# 20150607.libspatialite-4.3.0-dev
LOCAL_MODULE    := spatialite

# SQLite flags copied from ASOP
common_sqlite_flags := \
 -DHAVE_USLEEP=1 \
 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \
 -DSQLITE_THREADSAFE=1 \
 -DNDEBUG=1 \
 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \
 -DSQLITE_DEFAULT_AUTOVACUUM=1 \
 -DSQLITE_TEMP_STORE=3 \
 -DSQLITE_ENABLE_FTS3 \
 -DSQLITE_ENABLE_FTS3_BACKWARDS \
 -DSQLITE_ENABLE_RTREE=1 \
 -DSQLITE_DEFAULT_FILE_FORMAT=4


# spatialite flags
# comment out TARGET_CPU in config.h - will be replaced with TARGET_ARCH_ABI
spatialite_flags := \
 -DOMIT_FREEXL \
 -DTARGET_CPU=\"$(TARGET_ARCH_ABI)\" \
 -Dfdatasync=fsync \
 -DSQLITE_ENABLE_RTREE=1 \
 -DENABLE_GCP=1 \
 -DENABLE_GEOPACKAGE=1 \
 -DENABLE_LIBXML2=1 \
 -DSQLITE_OMIT_BUILTIN_TEST=1 

LOCAL_CFLAGS    := \
 $(common_sqlite_flags) \
 $(spatialite_flags)

# LOCAL_LDLIBS is always ignored for static libraries
# LOCAL_LDLIBS    := -llog -lz
# LOADABLE_EXTENSION must NOT be defined
# For Spatialite with VirtualShapes,VirtualXL support iconv is needed
# 2014-07-26 - adapted based on ls -1 result in all directories
# Note: not included are: /src/gaiageo/
# --> Ewkt.c:2071:24: error: expected ')' before 'yymsp'
# - Ewkt.c,geoJSON.c,Gml.c,Kml.c,vanuatuWkt.c
# - lex.Ewkt.c,lex.geoJSON.c,lex.Gml.c,lex.Kml.c,lex.VanuatuWkt.c
# 20150607 - ENABLE_GCP=1: 'GPL v2.0 or any subsequent version'
# 'srsinit/epsg_update' is not included, since it is not needed in the library [tools to create the epsg_inlined_*.c files]
LOCAL_C_INCLUDES := \
 $(SQLITE_PATH) \
 $(SPATIALITE_PATH) \
 $(SPATIALITE_PATH)/src/headers \
 $(ICONV_PATH)/include \
 $(ICONV_PATH)/libcharset/include \
 $(GEOS_PATH)/include \
 $(GEOS_PATH)/capi \
 $(PROJ4_PATH)/src \
 $(LZMA_PATH)/src/liblzma/api \
 $(XML2_PATH)/include
LOCAL_SRC_FILES := \
 $(SPATIALITE_PATH)/src/connection_cache/alloc_cache.c \
 $(SPATIALITE_PATH)/src/connection_cache/generator/code_generator.c \
 $(SPATIALITE_PATH)/src/control_points/gaia_control_points.c \
 $(SPATIALITE_PATH)/src/control_points/grass_crs3d.c \
 $(SPATIALITE_PATH)/src/control_points/grass_georef.c \
 $(SPATIALITE_PATH)/src/control_points/grass_georef_tps.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_load_distinct.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_loader.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_load_mixed.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_parser.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_writer.c \
 $(SPATIALITE_PATH)/src/gaiaaux/gg_sqlaux.c \
 $(SPATIALITE_PATH)/src/gaiaaux/gg_utf8.c \
 $(SPATIALITE_PATH)/src/gaiaexif/gaia_exif.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_advanced.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_endian.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_ewkt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_extras.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geodesic.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geoJSON.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geometries.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geoscvt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_gml.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_kml.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_lwgeom.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_matrix.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_relations.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_relations_ext.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_shape.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_transform.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_vanuatu.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_voronoj.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_wkb.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_wkt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_xml.c \
 $(SPATIALITE_PATH)/src/geopackage/gaia_cvt_gpkg.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgAddGeometryColumn.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_geometry_triggers.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_spatial_index.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_tile_triggers.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgBinary.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateBaseTables.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateTilesTable.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateTilesZoomLevel.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgGetImageType.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_get_normal_row.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_get_normal_zoom.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgInsertEpsgSRID.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgMakePoint.c \
 $(SPATIALITE_PATH)/src/md5/gaia_md5.c \
 $(SPATIALITE_PATH)/src/md5/md5.c \
 $(SPATIALITE_PATH)/src/shapefiles/shapefiles.c \
 $(SPATIALITE_PATH)/src/shapefiles/validator.c \
 $(SPATIALITE_PATH)/src/spatialite/extra_tables.c \
 $(SPATIALITE_PATH)/src/spatialite/mbrcache.c \
 $(SPATIALITE_PATH)/src/spatialite/metatables.c \
 $(SPATIALITE_PATH)/src/spatialite/se_helpers.c \
 $(SPATIALITE_PATH)/src/spatialite/spatialite.c \
 $(SPATIALITE_PATH)/src/spatialite/spatialite_init.c \
 $(SPATIALITE_PATH)/src/spatialite/srid_aux.c \
 $(SPATIALITE_PATH)/src/spatialite/statistics.c \
 $(SPATIALITE_PATH)/src/spatialite/table_cloner.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualbbox.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualdbf.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualelementary.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualfdo.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualgpkg.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualnetwork.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualshape.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualspatialindex.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualXL.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualxpath.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_00.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_01.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_02.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_03.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_04.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_05.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_06.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_07.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_08.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_09.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_10.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_11.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_12.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_13.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_14.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_15.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_16.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_17.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_18.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_19.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_20.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_21.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_22.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_23.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_24.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_25.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_26.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_27.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_28.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_29.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_30.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_31.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_32.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_33.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_34.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_35.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_36.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_37.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_38.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_39.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_40.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_41.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_42.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_43.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_44.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_45.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_46.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_extra.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_prussian.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_wgs84_00.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_wgs84_01.c \
 $(SPATIALITE_PATH)/src/srsinit/srs_init.c \
 $(SPATIALITE_PATH)/src/versioninfo/version.c \
 $(SPATIALITE_PATH)/src/virtualtext/virtualtext.c \
 $(SPATIALITE_PATH)/src/wfs/wfs_in.c
LOCAL_STATIC_LIBRARIES := iconv proj geos libxml2
include $(BUILD_STATIC_LIBRARY)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































Deleted spatialite-4.4.0.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
include $(CLEAR_VARS)
# ./configure  --enable-rttopo --enable-gcp  --enable-examples=no --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
# 20170118.libspatialite-4.4.0-dev
# -------------------
# As of 2015-10-03 [4.4.0-t20160229]
# -------------------
# changes:
# - geos-3.5.0
# - json-c-0.12
# - json-c-0.12
# -------------------
# Excluded files:
# gaiageo/
# - directories 'flex' and 'lemon'
# - Ewkt.c/.h geoJSON.c/.h
# - Gml.c/.h Kml.c/.h
# - lex.*.c
# - vanuatuWkt.*
# srsinit/
# - directory 'epsg_update'
# -------------------
LOCAL_MODULE    := spatialite

# SQLite flags copied from ASOP
common_sqlite_flags := \
 -DHAVE_USLEEP=1 \
 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \
 -DSQLITE_THREADSAFE=1 \
 -DNDEBUG=1 \
 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \
 -DSQLITE_DEFAULT_AUTOVACUUM=1 \
 -DSQLITE_TEMP_STORE=3 \
 -DSQLITE_ENABLE_FTS3 \
 -DSQLITE_ENABLE_FTS3_BACKWARDS \
 -DSQLITE_ENABLE_RTREE=1 \
 -DSQLITE_DEFAULT_FILE_FORMAT=4

# spatialite flags
# comment out TARGET_CPU in config.h - will be replaced with TARGET_ARCH_ABI
spatialite_flags := \
 -DOMIT_FREEXL \
 -DTARGET_CPU=\"$(TARGET_ARCH_ABI)\" \
 -Dfdatasync=fsync \
 -DSQLITE_ENABLE_RTREE=1 \
 -DENABLE_GCP=1 \
 -DENABLE_GEOPACKAGE=1 \
 -DENABLE_LIBXML2=1 \
 -DENABLE_RTTOPO=1 \
 -DSQLITE_OMIT_BUILTIN_TEST=1 

LOCAL_CFLAGS    := \
 $(common_sqlite_flags) \
 $(spatialite_flags)

# LOCAL_LDLIBS is always ignored for static libraries
# LOCAL_LDLIBS    := -llog -lz
# LOADABLE_EXTENSION must NOT be defined
LOCAL_C_INCLUDES := \
 $(SQLITE_PATH) \
 $(SPATIALITE_PATH) \
 $(SPATIALITE_PATH)/src/headers \
 $(SPATIALITE_PATH)/src/topology \
 $(ICONV_PATH)/include \
 $(ICONV_PATH)/libcharset/include \
 $(GEOS_PATH)/include \
 $(GEOS_PATH)/capi \
 $(RTTOPO_PATH)/headers \
 $(PROJ4_PATH)/src \
 $(LZMA_PATH)/src/liblzma/api \
 $(XML2_PATH)/include
LOCAL_SRC_FILES := \
 $(SPATIALITE_PATH)/src/connection_cache/generator/code_generator.c \
 $(SPATIALITE_PATH)/src/connection_cache/alloc_cache.c \
 $(SPATIALITE_PATH)/src/connection_cache/gg_sequence.c \
 $(SPATIALITE_PATH)/src/control_points/gaia_control_points.c \
 $(SPATIALITE_PATH)/src/control_points/grass_crs3d.c \
 $(SPATIALITE_PATH)/src/control_points/grass_georef.c \
 $(SPATIALITE_PATH)/src/control_points/grass_georef_tps.c \
 $(SPATIALITE_PATH)/src/cutter/gaia_cutter.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_load_distinct.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_loader.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_load_mixed.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_parser.c \
 $(SPATIALITE_PATH)/src/dxf/dxf_writer.c \
 $(SPATIALITE_PATH)/src/gaiaaux/gg_sqlaux.c \
 $(SPATIALITE_PATH)/src/gaiaaux/gg_utf8.c \
 $(SPATIALITE_PATH)/src/gaiaexif/gaia_exif.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_advanced.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_endian.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_ewkt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_extras.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geodesic.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geoJSON.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geometries.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_geoscvt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_gml.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_kml.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_matrix.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_relations.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_relations_ext.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_rttopo.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_shape.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_transform.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_vanuatu.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_voronoj.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_wkb.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_wkt.c \
 $(SPATIALITE_PATH)/src/gaiageo/gg_xml.c \
 $(SPATIALITE_PATH)/src/geopackage/gaia_cvt_gpkg.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgAddGeometryColumn.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_geometry_triggers.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_spatial_index.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_add_tile_triggers.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgBinary.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateBaseTables.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateTilesTable.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgCreateTilesZoomLevel.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgGetImageType.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_get_normal_row.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkg_get_normal_zoom.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgInsertEpsgSRID.c \
 $(SPATIALITE_PATH)/src/geopackage/gpkgMakePoint.c \
 $(SPATIALITE_PATH)/src/md5/gaia_md5.c \
 $(SPATIALITE_PATH)/src/md5/md5.c \
 $(SPATIALITE_PATH)/src/shapefiles/shapefiles.c \
 $(SPATIALITE_PATH)/src/shapefiles/validator.c \
 $(SPATIALITE_PATH)/src/spatialite/extra_tables.c \
 $(SPATIALITE_PATH)/src/spatialite/mbrcache.c \
 $(SPATIALITE_PATH)/src/spatialite/metatables.c \
 $(SPATIALITE_PATH)/src/spatialite/se_helpers.c \
 $(SPATIALITE_PATH)/src/spatialite/spatialite.c \
 $(SPATIALITE_PATH)/src/spatialite/spatialite_init.c \
 $(SPATIALITE_PATH)/src/spatialite/srid_aux.c \
 $(SPATIALITE_PATH)/src/spatialite/statistics.c \
 $(SPATIALITE_PATH)/src/spatialite/table_cloner.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualbbox.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualdbf.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualelementary.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualfdo.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualgpkg.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualknn.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualnetwork.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualrouting.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualshape.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualspatialindex.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualXL.c \
 $(SPATIALITE_PATH)/src/spatialite/virtualxpath.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_00.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_01.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_02.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_03.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_04.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_05.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_06.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_07.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_08.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_09.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_10.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_11.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_12.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_13.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_14.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_15.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_16.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_17.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_18.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_19.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_20.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_21.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_22.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_23.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_24.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_25.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_26.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_27.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_28.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_29.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_30.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_31.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_32.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_33.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_34.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_35.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_36.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_37.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_38.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_39.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_40.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_41.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_42.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_43.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_44.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_45.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_46.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_extra.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_prussian.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_wgs84_00.c \
 $(SPATIALITE_PATH)/src/srsinit/epsg_inlined_wgs84_01.c \
 $(SPATIALITE_PATH)/src/srsinit/srs_init.c \
 $(SPATIALITE_PATH)/src/topology/gaia_auxnet.c \
 $(SPATIALITE_PATH)/src/topology/gaia_auxtopo.c \
 $(SPATIALITE_PATH)/src/topology/gaia_auxtopo_table.c \
 $(SPATIALITE_PATH)/src/topology/gaia_netstmts.c \
 $(SPATIALITE_PATH)/src/topology/gaia_network.c \
 $(SPATIALITE_PATH)/src/topology/gaia_topology.c \
 $(SPATIALITE_PATH)/src/topology/gaia_topostmts.c \
 $(SPATIALITE_PATH)/src/topology/lwn_network.c \
 $(SPATIALITE_PATH)/src/topology/net_callbacks.c \
 $(SPATIALITE_PATH)/src/topology/topo_callbacks.c \
 $(SPATIALITE_PATH)/src/versioninfo/version.c \
 $(SPATIALITE_PATH)/src/virtualtext/virtualtext.c \
 $(SPATIALITE_PATH)/src/wfs/wfs_in.c
LOCAL_STATIC_LIBRARIES := iconv proj geos libljson-c librttopo libxml2
include $(BUILD_STATIC_LIBRARY)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































Changes to spatialite-sql-latest.html.

1
2


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
..
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
...
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
...
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
...
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621

622
623
624
625
626
627
628
629
630
631

632
633
634
635
636
637
638
639
640
641
642
643
644
...
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
...
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
...
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
....
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
....
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
....
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290

1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
....
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
....
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
....
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
....
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
....
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
....
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
....
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
....
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
....
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
....
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043

2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
....
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
....
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
....
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
....
2483
2484
2485
2486
2487
2488
2489
















2490
2491
2492
2493
2494
2495
2496
....
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
....
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
....
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
....
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
....
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
....
3192
3193
3194
3195
3196
3197
3198














3199
3200
3201
3202
3203
3204
3205
....
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
....
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
....
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
....
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
....
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
....
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
....
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
....
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
....
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
....
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
....
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
....
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
....
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
....
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
....
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
....
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
....
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
....
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
....
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
....
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715

5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
....
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
....
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
....
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
....
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>


		<meta content="text/html; charset=UTF-8" http-equiv="content-type">
		<title>SpatiaLite SQL functions reference list</title>
		<style type="text/css">
			h2 {color:navy; text-align:center;} 
			h3 {color:blue;} 
			b {color:brown;}
			i {color:navy;}
		</style>
	</head><body bgcolor="#fffff0">
		<h2>SpatiaLite 5.0.0-devel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQL functions reference list</h2>
		<a href="https://www.gaia-gis.it/fossil/libspatialite">back</a>
		<ul>
			<li><a href="#version">SQL Version Info [and build options testing] functions</a></li>
			<li><a href="#generic">Generic SQL utility functions</a></li>
			<li><a href="#global">Global settings per connection</a></li>
			<li><a href="#sequence">SQL functions manipulating Sequences</a></li>
			<li><a href="#math">SQL math functions</a></li>
			<li><a href="#error">SQL functions reporting GEOS / RTTOPO errors and warnings</a></li>
			<li><a href="#length_cvt">SQL length/distance unit-conversion functions</a></li>
			<li><a href="#dms_cvt">SQL conversion functions from DD/DMS notations (longitude/latitude)</a></li>
			<li><a href="#blob">SQL utility functions for BLOB objects</a></li>
			<li><a href="#p0">SQL utility functions [non-standard] for geometric objects</a></li>
			<li><a href="#p1">SQL functions for constructing a geometric object given its Well-known Text Representation</a></li>
			<li><a href="#p2">SQL functions for constructing a geometric object given its Well-known Binary Representation</a></li>
			<li><a href="#p3">SQL functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object</a></li>
................................................................................
			<li><a href="#p7">SQL functions on type LineString</a></li>
			<li><a href="#p8">SQL functions on type Surface [Polygon or Ring]</a></li>
			<li><a href="#p9">SQL functions on type Polygon</a></li>
			<li><a href="#p10">SQL functions on type GeomCollection</a></li>
			<li><a href="#p11">SQL functions that test approximate spatial relationships via MBRs</a></li>
			<li><a href="#p12">SQL functions that test spatial relationships</a></li>
			<li><a href="#p13">SQL functions for distance relationships</a></li>
			<li><a href="#p14-">SQL functions supporting Linear Referencing</a></li>
			<li><a href="#p14">SQL functions that implement spatial operators</a></li>
			<li><a href="#p14b">SQL functions that implement spatial operators [GEOS specific features]</a></li>
			<li><a href="#p14c">SQL functions that implement spatial operators [GEOS advanced features]</a></li>
			<li><a href="#p14d">SQL functions that implement spatial operators [RTTOPO features]</a></li>
			<li><a href="#p14e">SQL functions supporting Geodesic Arcs</a></li>
			<li><a href="#p15">SQL functions for coordinate transformations</a></li>
			<li><a href="#p15plus">SQL functions supporting Affine Transformations and Ground Control Points</a></li>
			<li><a href="#p16">SQL functions for Spatial-MetaData and Spatial-Index handling</a></li>
			<li><a href="#p16metacatalog">SQL functions supporting the MetaCatalog and related Statistics</a></li>
			<li><a href="#p16style">SQL functions supporting SLD/SE Styled Layers</a></li>
			<li><a href="#p16isometa">SQL functions supporting ISO Metadata</a></li>
			<li><a href="#p16fdo">SQL functions implementing FDO/OGR compatibility</a></li>
			<li><a href="#p16gpkg">SQL functions implementing OGC GeoPackage compatibility</a></li>
			<li><a href="#p17">SQL functions for MbrCache-based queries</a></li>
			<li><a href="#p18">SQL functions for R*Tree-based queries (Geometry Callbacks)</a></li>
			<li><a href="#xmlBlob">SQL functions supporting XmlBLOB</a></li>
			<li><a href="#srid">SQL functions supporting SRID inspection</a></li>
			<li><a href="#topology">SQL functions supporting Topology-Geometry</a></li>
			<li><a href="#network">SQL functions supporting Topology-Network</a></li>
			<li><a href="#wms">SQL functions supporting WMS datasources</a></li>
			<li><a href="#datalic">SQL functions supporting Data Licenses</a></li>
			<li><a href="#advanced">miscellaneous advanced SQL functions</a></li>
			<li><a href="#sqlproc">SQL Procedures, Stored Procedures and Stored Variables related SQL functions</a></li>
		</ul>
		<table bgcolor="#e2eae2" border="1" cellpadding="2" cellspacing="2" width="100%">
			<tbody><tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="version">SQL Version Info [and build options testing] functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td colspan="3">returns the current <b>SpatiaLite</b> Target CPU as a text string</td></tr>
			<tr><td><b>freexl_version</b></td>
				<td>freexl_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>FreeXL</b> version as a text string<br>
					or NULL if FreeXL is currently unsupported</td></tr>
			<tr><td><b>proj4_version</b></td>
				<td>proj4_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>PROJ</b> version as a text string<br>
					or NULL if PROJ is currently unsupported</td></tr>
			<tr><td><b>geos_version</b></td>
				<td>geos_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>GEOS</b> version as a text string<br>
					or NULL if GEOS is currently unsupported</td></tr>
			<tr><td><b>rttopo_version</b></td>
				<td>rttopo_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>RTTOPO</b> version as a text string<br>
					or NULL if RTTOPO is currently unsupported</td></tr>
			<tr><td><b>libxml2_version</b></td>
				<td>libxml2_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>LibXML2</b> version as a text string<br>
					or NULL if LibXML2 is currently unsupported</td></tr>
			<tr><td><b>HasIconv</b></td>
				<td>HasIconv( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>ICONV</b></td></tr>
			<tr><td><b>HasMathSQL</b></td>
				<td>HasMathSQL( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>MATHSQL</b></td></tr>
			<tr><td><b>HasGeoCallbacks</b></td>
				<td>HasGeoCallbacks( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GEOCALLBACKS</b></td></tr>
			<tr><td><b>HasProj</b></td>
				<td>HasProj( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>PROJ</b></td></tr>
			<tr><td><b>HasGeos</b></td>
				<td>HasGeos( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GEOS</b></td></tr>
			<tr><td><b>HasGeosAdvanced</b></td>
				<td>HasGeosAdvanced( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSADVANCED</b></td></tr>
			<tr><td><b>HasGeosTrunk</b></td>
				<td>HasGeosTrunk( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSTRUNK</b></td></tr>
			<tr><td><b>HasGeosReentrant</b></td>
				<td>HasGeosReentrant( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSREENTRANT</b></td></tr>
			<tr><td><b>HasGeosOnlyReentrant</b></td>
				<td>HasGeosOnlyReentrant( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSONLYREENTRANT</b></td></tr>
			<tr><td><b>HasRtTopo</b></td>
				<td>HasRtTopo( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>RTTOPO</b></td></tr>
			<tr><td><b>HasLibXML2</b></td>
				<td>HasLibXML2( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>LibXML2</b></td></tr>
			<tr><td><b>HasEpsg</b></td>
				<td>HasEpsg( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>EPSG</b></td></tr>
			<tr><td><b>HasFreeXL</b></td>
				<td>HasFreeXL( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>FREEXL</b></td></tr>
			<tr><td><b>HasGeoPackage</b></td>
				<td>HasGeoPackage( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>GeoPackage</b> support (<b>GPKG</b>)</td></tr>
			<tr><td><b>HasGCP</b></td>
				<td>HasGCP( void ) : <i>Boolean</i><hr>
				    HasGroundControlPoints ( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>Ground Control Points</b> support (<b>GGP</b>)</td></tr>
			<tr><td><b>HasTopology</b></td>
				<td>HasTopology( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>Topology</b> (RTTOPO) support</td></tr>
			<tr><td><b>HasKNN</b></td>
				<td>HasKNN( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>VirtualKNN</b> (KNN) support</td></tr>
			<tr><td><b>HasRouting</b></td>
				<td>HasRouting( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlying library was built enabling <b>VirtualRouting</b> support</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="generic">Generic SQL functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CastToInteger</b></td>
				<td>CastToInteger( value <i>Generic</i> ) : <i>Integer</i></td>
				<td colspan="3">returns the intput value possibly casted to the Integer data-type; NULL if no conversion is possible.</td></tr>
			<tr><td><b>CastToDouble</b></td>
				<td>CastToDouble( value <i>Generic</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the intput value possibly casted to the Double data-type; NULL if no conversion is possible.</td></tr>
			<tr><td><b>CastToText</b></td>
				<td>CastToText( value <i>Generic</i> ) : <i>Text</i><hr>
				CastToText( value <i>Generic</i> , zero_pad <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">returns the intput value possibly casted to the Text data-type; NULL if no conversion is possible.<br>
				If an optional argument <b>zero_pad</b> is passed and the input value is of the Integer or Double type, then the returned string will be padded using as many trailing ZEROs needed to ensure the required length.</td></tr>
			<tr><td><b>CastToBlob</b></td>
				<td>CastToBlob( value <i>Generic</i> ) : <i>Blob</i><hr>
                                CastToBlob( value <i>Generic</i> , hex_input <i>Boolean</i> ) : <i>Blob</i></td>
				<td colspan="3">returns the intput value possibly casted to the BLOB data-type:
                                if the optional argument <b>hex_input</b> is set to <b>TRUE</b> the input value will be expected to correspond to an HexaDecimal string, e.g. <b>01ab89EF</b>; if this conversion fails then NULL will be returned.<hr>
                                returns NULL if no conversion is possible.</td></tr>
			<tr><td><b>ForceAsNull</b></td>
				<td>ForceAsNull( val1 <i>Generic</i> , val2 <i>Generic</i>) : <i>Generic</i></td>
				<td colspan="3">if <b>val1</b> and <b>val2</b> are equal (and of the same data-type) NULL will be returned; 
				otherwise <b>val1</b> will be returned unchanged, preserving its original data-type.</td></tr>
			<tr><td><b>CreateUUID</b></td>
				<td>CreateUUID( void ) : <i>Text</i></td>
				<td colspan="3">returns a Version 4 (random) UUID (<a href="http://en.wikipedia.org/wiki/Universally_unique_identifier">Universally unique identifier</a>).</td></tr>
			<tr><td><b>MD5Checksum</b></td>
				<td>MD5Checksum( BLOB | TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the <a href="http://en.wikipedia.org/wiki/MD5">MD5 checksum</a> corresponding to the input value.<br>Will return <b>NULL</b> for non-BLOB or non-TEXT input.</td></tr>
			<tr><td><b>MD5TotalChecksum</b></td>
				<td>MD5TotalChecksum( BLOB | TEXT ) : <i>Text</i></td>
				<td colspan="3">returns a cumulative MD5 checksum.<br><b><u>aggregate function</u></b></td></tr>
			<tr><td><b>EncodeURL</b></td>
				<td>EncodeURL( url <i>Text</i> ) : <i>Text</i><hr>
					EncodeURL( url <i>Text</i> , charset <i>Text</i> ) : <i>Text</i></td>
				<td colspan="3">returns the <a href="http://en.wikipedia.org/wiki/Percent-encoding">percent encoded URL</a> corresponding to the input value.<br>Will return <b>NULL</b> for invalid input.
					<ul>
						<li>the <u>input URL</u> is always assumed to be an <b>UTF-8</b> string.</li>
						<li>the <u>output URL</u> will be converted into the charset encoding specified by the <b>charset</b> argument.<br>
							if not specified <b>UTF-8</b> will be assumed by default.</li>
					</ul></td></tr>
			<tr><td><b>DecodeURL</b></td>
				<td>DecodeURL( url <i>Text</i> ) : <i>Text</i><hr>
					DecodeURL( url <i>Text</i>, charset <i>Text</i> ) : <i>Text</i></td>
				<td colspan="3">returns a plain URL from its corresponding percent encoding.<br>Will return <b>NULL</b> for invalid input.
					<ul>
						<li>the <u>output URL</u> will be always returned as an <b>UTF-8</b> string.</li>
						<li>the <u>input URL</u> will be converted from the charset encoding specified by the <b>charset</b> argument.<br>
							if not specified <b>UTF-8</b> will be assumed by default.</li>
					</ul></td></tr>
			<tr><td><b>DirNameFromPath</b></td>
				<td>DirNameFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the Directory Name from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any simple path lacking a Directory.</td></tr>
			<tr><td><b>FullFileNameFromPath</b></td>
				<td>FullFileNameFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the Full File Name (including an eventual File Extension) from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
				 lacking a File Name.</td></tr>
................................................................................
				<td>FileNameFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the File Name (excluding an eventual File Extension) from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
				 lacking a File Name.</td></tr>
			<tr><td><b>FileExtFromPath</b></td>
				<td>FileExtFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the File Extension from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
				 lacking a File Name or when no Extension is present.</td></tr>
			<tr><td><b>MakeStringList</b></td>
				<td>MakeStringList( value ) : <i>Text</i><hr>
				    MakeStringList( value , delimiter <i>text</i>) : <i>Text</i></td>
				<td colspan="3">returns a comma-delimited list of integer or text values.<br>
				the optional argument <b>delimiter</b> can be used so to specify an alternative delimiter different from comma.<br>
				<b><u>aggregate function</u></b><hr>
				Will return <b>NULL</b> for invalid arguments.</td></tr>
			<tr><td><b>eval</b></td>
				<td>eval( X <i>TEXT</i> [ , Y <i>TEXT</i> ) : <i>Text</i></td>
				<td colspan="3">Evaluate the SQL text in <b>X</b>.  Return the results, using string <b>Y</b> as the separator.<br>
				If <b>Y</b> is omitted, use a single space character.<hr>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
            <tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="global">Global settings per connection</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>EnableGpkgMode</b></td>
				<td>EnableGpkgMode( <i>void</i> ) : <i>void</i></td>
				<td colspan="3">Enables the <b>Geopackage mode</b><br>
				All connections are initially started with a disabled GPKG mode, that must be explicitly enabled whenever required.<br>
				Enabling GPKG mode is a supported option only if the currently connected DB-file presents a GPKG layout.</td></tr>
			<tr><td><b>DisableGpkgMode</b></td>
				<td>DisableGpkgMode( <i>void</i> ) : <i>void</i></td>
				<td colspan="3">Disables the <b>Geopackage mode</b></td></tr>
			<tr><td><b>GetGpkgMode</b></td>
				<td>GetGpkgMode( <i>void</i> ) : <i>boolean</i></td>
				<td colspan="3">Returns <b>TRUE</b> if the <b>Geopackage mode</b> is currently enabled, otherwise <b>FALSE</b></td></tr>
			<tr><td><b>EnableGpkgAmphibiousMode</b></td>
				<td>EnableGpkgAmphibiousMode( <i>void</i> ) : <i>void</i></td>
				<td colspan="3">Enables the <b>Geopackage amphibious mode</b><br>
				All connections are initially started with a disabled amphibious mode, that must be explicitly enabled whenever required.<br>
				<u>Note</u>: <i>GPKG mode</i> and <i>GPKG amphibious mode</i> are mutually exclusive options.</td></tr>
			<tr><td><b>DisableGpkgAmphibiousMode</b></td>
				<td>DisableGpkgAmphibiousMode( <i>void</i> ) : <i>void</i></td>
				<td colspan="3">Disables the <b>Geopackage amphibious mode</b></td></tr>
			<tr><td><b>GetGpkgAmphibiousMode</b></td>
				<td>GetGpkgAmphibiousMode( <i>void</i> ) : <i>boolean</i></td>
				<td colspan="3">Returns <b>TRUE</b> if the <b>Geopackage amphibious mode</b> is currently enabled, otherwise <b>FALSE</b></td></tr>
			<tr><td><b>SetDecimalPrecision</b></td>
				<td>SetDecimalPrecision( <i>integer</i> ) : <i>void</i></td>
				<td colspan="3">Explicitly sets the number of decimal digits (<i>precision</i>) to be displayed by <b>ST_AsText()</b> for coordinate values: the standard default setting is <b>6</b> decimal digits.<br>
				Passing any <b>negative</b> precision will automatically restore the initial default setting.<br>
				The <b>spatialite_gui</b> tool will honor this setting for all floating point values to be displayed on the screen.</td></tr>
			<tr><td><b>GetDecimalPrecision</b></td>
				<td>GetDecimalPrecision( <i>void</i> ) : <i>integer</i></td>
				<td colspan="3">Returns the currently set <b>decimal precision</b>.<br>
				A <b>negative</b> precision identifies the default setting.</td></tr>
			<tr><td><b>EnableTinyPoint</b></td>
				<td>EnableTinyPoint( <i>void</i> ) : <i>void</i></td>
				<td colspan="3">Enables the <b>TinyPoint</b> BLOB encoding for all Point-Geometries being created.<br>
				All connections are initially started with a disabled TinyPoint BLOB encoding, that must be explicitly enabled whenever required.<br><hr>
				<u>Exception</u>: if the environment variable <b>SPATIALITE_TINYPOINT=1</b> is set, then all connections will initially start by enabling the TinyPoint BLOB encoding.</td></tr>
			<tr><td><b>DisableTinyPoint</b></td>
				<td>DisableTinyPoint( <i>void</i> ) : <i>void</i></td>
				<td colspan="3">Disables the <b>TinyPoint</b> BLOB encoding; all Point-Geometries will then be created applying the classic BLOB-Geometry encoding.</td></tr>
			<tr><td><b>IsTinyPointEnabled</b></td>
				<td>IsTinyPointEnabled( <i>void</i> ) : <i>boolean</i></td>
				<td colspan="3">Returns <b>TRUE</b> if the <b>TinyPoint</b> BLOB encoding is currently enabled, otherwise <b>FALSE</b></td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="sequence">SQL functions manipulating Sequences</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>sequence_nextval</b></td>
				<td>sequence_nextval ( seq_name <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">advances to the next value of the Sequence, which is then returned.<br>
					Will return <b>NULL</b> if any error occurred.</td></tr>
			<tr><td><b>sequence_currval</b></td>
				<td>sequence_currval ( seq_name <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">returns the value most recently obtained by <b>sequence_nextval()</b> for the Sequence identified by <i>seq_name</i><br>
					Will return <b>NULL</b> if the Sequence identified by <i>seq_name</i> has not yet been used.</td></tr>
			<tr><td><b>sequence_lastval</b></td>
				<td>sequence_lastval ( <i>void</i> ) : <i>Integer</i></td>
				<td colspan="3">returns the value most recently obtained by <b>sequence_nextval()</b><br>
					Will return <b>NULL</b> if <b>sequence_nextval()</b> has not yet been used.</td></tr>
			<tr><td><b>sequence_setval</b></td>
				<td>sequence_setval ( seq_name <i>Text</i> , value <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">sets the current <i>value</i> for the Sequence identified by <b>seq_name</b>; if the Sequence doesn't yet exist it will be created on-the-fly.<br>
					Will return <i>value</i> on success or <b>NULL</b> on failure.</td></tr>				
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="math">SQL math functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Abs</b></td>
				<td>Abs( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the absolute value of <b>x</b></td></tr>
			<tr><td><b>Acos</b></td>
				<td>Acos( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the arc cosine of <b>x</b>, that is, the value whose cosine is <b>x</b><br>
				returns NULL if <b>x</b> is not within the range -1 to 1</td></tr>
			<tr><td><b>Asin</b></td>
				<td>Asin( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the arc sine of <b>x</b>, that is, the value whose sine is <b>x</b><br>
				returns NULL if <b>x</b> is not in the range -1 to 1</td></tr>
			<tr><td><b>Atan</b></td>
				<td>Atan( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the arc tangent of <b>x</b>, that is, the value whose tangent is <b>x</b></td></tr>
			<tr><td><b>Atan2</b></td>
				<td>Atan2( y <i>Double precision</i> , x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the principal value of the arc tangent of <b>y/x</b> in radians, using the signs of the two
				arguments to determine the quadrant of the result. The return value is in the range[<b>-pi</b>, <b>pi</b>].</td></tr>
			<tr><td><b>Ceil<br>Ceiling</b></td>
				<td>Ceil( x <i>Double precision</i> ) : <i>Double precision</i><hr>
				Ceiling( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the smallest integer value not less than <b>x</b></td></tr>
			<tr><td><b>Cos</b></td>
				<td>Cos( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the cosine of <b>x</b>, where <b>x</b> is given in <u>radians</u></td></tr>
................................................................................
				<td colspan="3">returns the largest integer value not greater than <b>x</b></td></tr>
			<tr><td><b>Ln</b><br><b>Log</b></td>
				<td>Ln( x <i>Double precision</i> ) : <i>Double precision</i><hr>
				Log( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the natural logarithm of <b>x</b>; that is, the base-<b><i>e</i></b> logarithm of <b>x</b><br>
				If <b>x</b> is less than or equal to 0, then NULL is returned</td></tr>
			<tr><td><b>Log</b></td>
				<td>Log( x <i>Double precision</i> , b <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the logarithm of <b>x</b> to the base <b>b</b><br>
				If <b>x</b> is less than or equal to 0, or if <b>b</b> is less than or equal to 1, then NULL is returned<hr>
				<b>Log(x, b)</b>  is equivalent to <b>Log(x)</b> / <b>Log(b)</b></td></tr>
			<tr><td><b>Log2</b></td>
				<td>Log2( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the base-2 logarithm of <b>x</b><hr>
				<b>Log2(x)</b>  is equivalent to <b>Log(x)</b> / <b>Log(2)</b></td></tr>
			<tr><td><b>Log10</b></td>
				<td>Log10( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the base-10 logarithm of <b>x</b><hr>
................................................................................
				<td colspan="3">returns the population variance of the input values (<i>square of the population standard deviation</i>)<br>
				<b><u>aggregate function</u></b></td></tr>
			<tr><td><b>Var_samp</b></td>
				<td>Var_samp( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the sample variance of the input values (<i>square of the sample standard deviation</i>)<br>
				<b><u>aggregate function</u></b></td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="error">SQL functions reporting GEOS / RTTOPO errors and warnings</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>GEOS_GetLastWarningMsg</b></td>
				<td>GEOS_GetLastWarningMsg( <i>void</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td colspan="2">Will return the most recent warning message returned by GEOS (if any).<hr>
................................................................................
				<td>GEOS_GetCriticalPointFromMsg( <i>void</i> ) : <i>Point</i><hr>
				GEOS_GetCriticalPointFromMsg( SRID <i>Integer</i> ) : <i>Point</i></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td colspan="2">Will (possibly) return a Point Geometry extracted from the latest error / warning
				message returned by GEOS.<hr>
				<b>NULL</b> will be returned if there is no pending GEOS message, or if the current GEOS message
				doesn't contain a critical Point.</td></tr>
			<tr><td><b>RTTOPO_GetLastWarningMsg</b></td>
				<td>RTTOPO_GetLastWarningMsg( <i>void</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="2">Will return the most recent warning message returned by RTTOPO (if any).<hr>
				<b>NULL</b> will be returned if there is no pending RTTOPO warning.</td></tr>
			<tr><td><b>RTTOPO_GetLastErrorMsg</b></td>
				<td>RTTOPO_GetLastErrorMsg( <i>void</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="2">Will return the most recent error message returned by RTTOPO (if any).<hr>
				<b>NULL</b> will be returned if there is no pending RTTOPO error.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="length_cvt">SQL length/distance unit-conversion functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Kilometer</b></td>
				<td>CvtToKm( x <i>Double precision</i> ) : <i>Double precision</i><hr>
................................................................................
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="dms_cvt">SQL conversion functions from DD/DMS notations (longitude/latitude)</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>DD to DMS</b></td>
				<td>LongLatToDMS( longitude <i>Double precision</i> , latitude <i>Double precision</i> ) : <i>String</i></td>
				<td colspan="3">will return a DMS string (Degrees, Minutes and Seconds) using the given DD (Decimal Degrees) input coordinates<hr>
                                <b>NULL</b> will be returned on invalid input.</tr>
			<tr><td><b>DMS to DD</b></td>
				<td>LongitudeFromDMS( dms_expression <i>String</i> ) : <i>Double precision</i><hr>
                                    LatitudeFromDMS( dms_expression <i>String</i> ) : <i>Double precision</i></td>
				<td colspan="3">will return the DD coordinates from the given DMS expression<hr>
                                <b>NULL</b> will be returned on invalid input.</tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="blob">SQL utility functions for BLOB objects</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>IsZipBlob</b></td>
				<td>IsZipBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid ZIP-compressed file</td></tr>
			<tr><td><b>IsPdfBlob</b></td>
				<td>IsPdfBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid PDF document</td></tr>
			<tr><td><b>IsGifBlob</b></td>
				<td>IsGifBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid GIF image</td></tr>
			<tr><td><b>IsPngBlob</b></td>
				<td>IsPngBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid PNG image</td></tr>
			<tr><td><b>IsTiffBlob</b></td>
				<td>IsTiffBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid TIFF image</td></tr>
			<tr><td><b>IsJpegBlob</b></td>
				<td>IsJpegBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid JPEG image</td></tr>
			<tr><td><b>IsExifBlob</b></td>
				<td>IsExifBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid EXIF image<br>
					<u>Please note:</u> any valid EXIF image is also a valid JPEG</td></tr>
			<tr><td><b>IsExifGpsBlob</b></td>
				<td>IsExifGpsBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid EXIF-GPS image<br>
					<u>Please note:</u> any valid EXIF-GPS image is a valid EXIF and JPEG as well</td></tr>
			<tr><td><b>IsWebpBlob</b></td>
				<td>IsWebpBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid WebP image</td></tr>
			<tr><td><b>IsJP2Blob</b></td>
				<td>IsJP2Blob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid JP2 [Jpeg2000] image</td></tr>
			<tr><td><b>GetMimeType</b></td>
				<td>GetMimeType( payload <i>BLOB</i> ) : <i>String</i></td>
				<td colspan="3">The return type is Text, and could be one of: <b>image/gif</b>, <b>image/png</b>,
					<b>image/jpeg</b>, <b>image/jp2</b>, <b>image/tiff</b>, <b>image/svg+xml</b>, <b>application/xml</b>,
					<b>application/zip</b>,	<b>application/pdf</b>.<br>
					NULL will be returned when called with a NULL or non-BLOB argument, or if no valid mime-type is detected.</td></tr>
			<tr><td><b>IsGeometryBlob</b></td>
				<td>IsGeometryBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if the BLOB argument is a valid BLOB-Geometry.</td></tr>
			<tr><td><b>IsTinyPointBlob</b></td>
				<td>IsTinyPointBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL or non-BLOB argument.<hr>
					TRUE if the BLOB argument is a valid BLOB-TinyPoint.</td></tr>
			<tr><td><b>TinyPointEncode</b></td>
				<td>TinyPointEncode( content <i>POINT BLOB-GEOMETRY</i> ) : <i>BLOB-TinyPoint</i></td>
				<td colspan="3">If the input argument corresponds to a valid <b>BLOB-GEOMETRY</b> of the <b>POINT</b>, <b>POINT Z</b>, <b>POINT M</b> or <b>POINT ZM</b> type 
				    the corresponding <b>BLOB-TinyPoint</b> will be returned.<hr>
					In any other case the input argument will be retuned.</td></tr>
			<tr><td><b>GeometryPointEncode</b></td>
				<td>GeometryPointEncode( content <i>BLOB-TinyPoint</i> ) : <i>BLOB-GEOMETRY</i></td>
				<td colspan="3">If the input argument corresponds to a valid <b>BLOB-TinyPoint</b> the corresponding <b>BLOB-GEOMETRY</b> will be returned.<hr>
					In any other case the input argument will be retuned.</td></tr>
			<tr><td><b>BlobFromFile</b></td>
				<td>BlobFromFile( filepath <i>String</i> ) : <i>BLOB</i></td>

				<td colspan="3">If the filepath is valid, and the existing file can be successfully read, then the whole file content will be returned as a
					BLOB value.<br>
					Otherwise NULL will be returned.<br>
					<u>Please note:</u> SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).<hr>
                    <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                    Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is required in order to use this function.</td></tr>
			<tr><td><b>BlobToFile</b></td>
				<td>BlobToFile( binary-data <i>BLOB</i> , filepath <i>String</i> ) : <i>Integer</i></td>
				<td colspan="3">If <i>binary-data</i> is of the BLOB-type, and the filepath is valid (i.e. accessible in write/create mode), 
					then the corresponding file will be created/overwritten with the binary-data.<br>

					The return type is Integer, with a return value of 1 for success, 0 for failure.<hr>
                    <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                    Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is required in order to use this function.</td></tr>
			<tr><td><b>CountUnsafeTriggers</b></td>
				<td>CountUnsafeTriggers( ) : <i>Integer</i></td>
				<td colspan="3">This SQL function checks if the currently connected DB contains any potentially malicious Triggers;
					carefully checking this conditions is a minimal precaution expected to be always verified before eventually activating the <b>SPATIALITE_SECURITY=relaxed</b> mode.<hr>
					The return type is Integer (total count of suspected Triggers); 0 means that the currently connected DB should be considered absolutely safe.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p0">SQL utility functions [<i>non-standard</i>] for geometric objects</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
................................................................................
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>GeomFromExifGpsBlob</b></td>
				<td>GeomFromExifGpsBlob( image <i>BLOB</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>a POINT Geometry will be returned representing the GPS long/lat contained within EXIF-GPS <i>metadata</i>
				for the BLOB image<hr>
				NULL will be returned if for any reason it's not possible to create such a POINT</td></tr>
			<tr><td><b>ST_Point</b></td>
				<td>ST_Point( x <i>Double precision</i> , y <i>Double precision</i>  ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>simply an alias-name for <b>MakePoint()</b><br>
				<u>Please note</u>: the <u>SRID</u> argument is never supported by <u>ST_Point()</u></td></tr>
			<tr><td><b>MakePoint</b></td>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>will return a closed LINESTRING approximating the Circle defined by <b>cx, cy</b> and <b>radius</b>.<br>
                                The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
                                The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
                        <tr><td><b>MakeEllipse</b></td>
				<td>MakeEllipse( cx <i>Double precision</i> , cy <i>Double precision</i> ,
				x_axis <i>Double precision</i> , y_axis <i>Double precision</i> [ , SRID <i>Integer</i> [ , 
                                step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>will return a closed LINESTRING approximating the Ellipse defined by <b>cx, cy</b> and <b>x_axis, y_axis</b>.<br>
                                The optional argument <b>step</b> if specified defines how many points will be interpolated on the ellipse; a point will be set every <b>step</b> degrees.<br>
                                The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
                        <tr><td><b>MakeArc</b></td>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>will return a POLYGON approximating the Circular Stripe delimited by two arcs sharing the same Centre [<b>cx</b>, <b>cy</b>]
                                but having different radii [<b>radius_1</b>, <b>radius_2</b>]; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
                                The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
                                The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
			<tr><td><b>SquareGrid</b></td>
				<td>SquareGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
                                    ST_SquareGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a grid of square cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
                                The specific Type of returned Geometry is controlled by the <b>mode</b> attribute value:
                                <ul>
									<li>any <i>positive</i> value will cause a <b>MultiLinesting</b> to be returned.</li>
									<li><i>zero</i> (default value) will cause a <b>MultiPolygon</b> to be returned.</li>
									<li>any <i>negative</i> value will cause a <b>MultiPoint</b> to be returned.</li>
                                </ul>
                                If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
				NULL will be returned if any error is encountered.</td></tr>
			<tr><td><b>TriangularGrid</b></td>
				<td>TriangularGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
                                    ST_TriangularGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a grid of triangular cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
                                The specific Type of returned Geometry is controlled by the <b>mode</b> attribute value:
                                <ul>
									<li>any <i>positive</i> value will cause a <b>MultiLinesting</b> to be returned.</li>
									<li><i>zero</i> (default value) will cause a <b>MultiPolygon</b> to be returned.</li>
									<li>any <i>negative</i> value will cause a <b>MultiPoint</b> to be returned.</li>
                                </ul>
                                If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
				NULL will be returned if any error is encountered.</td></tr>
			<tr><td><b>HexagonalGrid</b></td>
				<td>HexagonalGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
                                    ST_HexagonalGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a grid of hexagonal cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
                                The specific Type of returned Geometry is controlled by the <b>mode</b> attribute value:
                                <ul>
									<li>any <i>positive</i> value will cause a <b>MultiLinesting</b> to be returned.</li>
									<li><i>zero</i> (default value) will cause a <b>MultiPolygon</b> to be returned.</li>
									<li>any <i>negative</i> value will cause a <b>MultiPoint</b> to be returned.</li>
                                </ul>
                                If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
				NULL will be returned if any error is encountered.</td></tr>
			<tr><td><b>BuildMbr</b></td>
				<td>BuildMbr( x1 <i>Double precision</i> , y1 <i>Double precision</i> ,
				x2 <i>Double precision</i> , y2 <i>Double precision</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the SVG [<i>Scalable Vector Graphics</i>] representation</td></tr>
			<tr><td><b>AsKml</b></td>
				<td>AsKml( geom <i>Geometry</i> [ , precision <i>Integer</i> ] ) : <i>String</i><br>
				AsKml( name <i>String</i>, description <i>String</i>, geom <i>Geometry</i> [ , precision <i>Integer</i> ] ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ</td>
				<td>returns the KML [<i>Keyhole Markup Language</i>] representation<br>
				The first form will simply generate the geometry element: the second form will generate a complete KML entity</td></tr>
			<tr><td><b>GeomFromKml</b></td>
				<td>GeomFromKml( KmlGeometry <i>String</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>construct a geometric object given its KML Representation</td></tr>	
................................................................................
				<td>returns the EWKT [<i>Extended Well Known Text</i>] representation (PostGIS compatibility)</td></tr>
			<tr><td><b>GeomFromEWKT</b></td>
				<td>GeomFromEWKT( ewktGeometry <i>String</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>construct a geometric object given its EWKT Representation</td></tr>	
			<tr><td><b>AsFGF</b></td>
				<td>AsFGF( geom <i>Geometry</i> , dims <i>Integer</i> ) : <i>Binary</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the FGF [<i>FDO Geometry Binary Format</i>] representation<hr>
				<i>dims</i> can assume one of the following values:
				<ul>
					<li><b>0</b> XY dimension</li>
					<li><b>1</b> XYZ dimension</li>
					<li><b>2</b> XYM dimension</li>
					<li><b>3</b> XYZM dimension</li>
				</ul></td></tr>
			<tr><td><b>GeomFromFGF</b></td>
				<td>GeomFromFGF( fgfGeometry <i>Binary</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>construct a geometric object given its FGF binary Representation</td></tr>
			<tr><td><b>AsTWKB</b></td>
				<td>AsTWKB( geom <i>Geometry</i> ) : <i>TWKB-blob</i><hr>
				    AsTWKB( geom <i>Geometry</i> , precision_xy <i>Integer</i>) : <i>TWKB-blob</i><hr>
				    AsTWKB( geom <i>Geometry</i> , precision_xy <i>Integer</i> , precision_z <i>Integer</i> ) : <i>TWKB-blob</i><hr>
				    AsTWKB( geom <i>Geometry</i> , precision_xy <i>Integer</i> , precision_z <i>Integer</i> , precision_m <i>Integer</i> ) : <i>TWKB-blob</i><hr>
				    AsTWKB( geom <i>Geometry</i> , precision_xy <i>Integer</i> , precision_z <i>Integer</i> , precision_m <i>Integer</i> , with_size <i>Integer</i> ) : <i>TWKB-blob</i><hr>
				    AsTWKB( geom <i>Geometry</i> , precision_xy <i>Integer</i> , precision_z <i>Integer</i> , precision_m <i>Integer</i> , with_size <i>Integer</i> , with_bbox <i>Integer</i> ) : <i>TWKB-blob</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>returns the TWKB [<i>Tiny Well Known Binary</i>] representation (PostGIS/Mapnik compatibility)
				<ul>
					<li>the optional arguments <b>precision_xy</b>, <b>precision_z</b> and <b>precision_m</b> are intended to specify how many decimal digits should be preserved
					for the corresponding coordinate (<i>less decimal digits = stronger compression</i>). If not specified the default value is alwasy <b>ZERO</b> (no decimal digits at all).</li>
					<li>the optional arguments <b>with_size</b> and <b>with_bbox</b> are of the <b>Boolean</b> type (<b>TRUE</b> or <b>FALSE</b>) and respectively control if the
					TWKB geometry should include or not a <b>size</b> and/or a <b>BBOX</b>. If not specified the default value is always <b>FALSE</b>.</li>
				</ul></td></tr>
			<tr><td><b>GeomFromTWKB</b></td>
				<td>GeomFromTWKB( twkbGeometry <i>BLOB</i> [ , SRID <i>Integer</i>]  ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>construct a geometric object given its TWKB Representation</td></tr>
			<tr><td><b>AsEncodedPolyline</b></td>
				<td>ST_AsEncodedPolyline( geom <i>Geometry</i> ) : <i>TEXT</i><hr>
				    ST_AsEncodedPolyline( geom <i>Geometry</i> , precision <i>Integer</i> ) : <i>TEXT</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>returns a <i>GoogleMaps encoded Polyline</i> from a Geometry.<br>
				    The optional arguments <b>precision</b> is intended to specify how many decimal digits should be preserved (<i>default value</i>: <b>5</b>).<br>
				    <u>Note</u>: the input Geometry must be a <b>LINESTRING</b> in some <b>geographic SRID</b> (coordinates expressed as <b>longitude</b> and <b>latitude</b> angles).<hr>
				    <b>NULL</b> will be returned on invalid arguments.
				</td></tr>	
				
			<tr><td><b>LineFromEncodedPolyline</b></td>
				<td>ST_LineFromEncodedPolyline( polyline <i>TEXT</i> ) : <i>Geometry</i><hr>
				    ST_LineFromEncodedPolyline( polyline <i>TEXT</i> , precision <i>Integer</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>returns a Geometry from a <i>GoogleMaps encoded Polyline</i>.<br>
				    The optional arguments <b>precision</b> is intended to specify how many decimal digist should be preserved (<i>default value</i>: <b>5</b>).<br>
				    <u>Note</u>: the returned Geometry will always be a <b>LINESTRING</b> in the <b>SRID=4326</b>.<hr>
				    <b>NULL</b> will be returned on invalid arguments.
				</td></tr>	
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p4">SQL functions on type Geometry</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
					<b>2</b>, <b>3</b> or <b>4</b></td></tr>
			<tr><td><b>Is3D</b></td>
				<td>ST_Is3D( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Checks if <i>geom</i> has the Z dimension.<br>
                                    The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
                                    and -1 for UNKNOWN when called with invalid arguments.</td></tr>
			<tr><td><b>IsMeasured</b></td>
				<td>ST_IsMeasured( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Check if <i>geom</i> has the M dimension.<br>
                                    The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
                                    and -1 for UNKNOWN when called with invalid arguments.</td></tr>
			<tr><td><b>GeometryType</b></td>
				<td>GeometryType( geom <i>Geometry</i> ) : <i>String</i><hr>
					ST_GeometryType( geom <i>Geometry</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the name of the instantiable subtype of Geometry of which this geometric object is a member, as a string</td></tr>
			<tr><td><b>SRID</b></td>
				<td>SRID( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_SRID( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the Spatial Reference System ID for this geometric object</td></tr>
			<tr><td><b>SetSRID</b></td>
				<td>SetSRID( geom <i>Geometry</i> , SRID <i>Integer</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>directly sets the Spatial Reference System ID for this geometric object [no reprojection is applied]<hr>
					Will return a new Geometry BLOB object, or <b>NULL</b> on invalid arguments or errors.</td></tr>

			<tr><td><b>IsEmpty</b></td>
				<td>IsEmpty( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_IsEmpty( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.<hr>
					TRUE if this geometric object corresponds to the empty set</td></tr>
			<tr><td><b>IsSimple</b></td>
				<td>IsSimple( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_IsSimple( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.<hr>
					TRUE if this geometric object is simple, as defined in the Geometry Model</td></tr>
			<tr><td><b>IsValid</b></td>
				<td>IsValid( geom <i>Geometry</i> [ , esri_flag <i>Boolean</i> ] ) : <i>Integer</i><hr>
					ST_IsValid( geom <i>Geometry</i> [ , esri_flag <i>Boolean</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.<br>
					If the <b>ESRI_flag</b> argument is set to 1 (TRUE), then all ESRI-like internal holes
					(violating the standard OGC model) will be considered valid.<hr>
					TRUE if this geometric object does  not contains any topological error</td></tr>
			<tr><td><b>IsValidReason</b></td>
				<td>IsValidReason( geom <i>Geometry</i> [ , esri_flag <i>Boolean</i> ] ) : <i>String</i><hr>
					ST_IsValidReason( geom <i>Geometry</i> [ , esri_flag <i>Boolean</i> ] ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Will return a TEXT string stating if a Geometry is valid and if not valid, a reason why.<br>
					If the <b>ESRI_flag</b> argument is set to 1 (TRUE), then all ESRI-like internal holes
					(violating the standard OGC model) will be considered valid.<hr>
					NULL will be returned on invalid arguments.</td></tr>
			<tr><td><b>IsValidDetail</b></td>
				<td>IsValidDetail( geom <i>Geometry</i>  [ , esri_flag <i>Boolean</i> ]) : <i>Geometry</i><hr>
					ST_IsValidDetail( geom <i>Geometry</i>  [ , esri_flag <i>Boolean</i> ]) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Will return a Geometry detail (usually a <b>POINT</b>) causing invalidity.<br>
					If the <b>ESRI_flag</b> argument is set to 1 (TRUE), then all ESRI-like internal holes
					(violating the standard OGC model) will be considered valid.<hr>
					NULL will be returned on invalid arguments, or in the case of a valid Geometry.</td></tr>
			<tr><td><b>Boundary</b></td>
				<td>Boundary( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_Boundary( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>returns a geometric object that is the combinatorial boundary of g as defined in the Geometry Model</td></tr>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Geometry [if a valid Geometry was supplied], or NULL in any other case.<hr>
                                    Any Linestring or Ring will be in reverse order (first vertex will be the last one,
                                    and last vertex will be the first one).</td></tr>
			<tr><td><b>ForceLHR</b></td>
				<td>ST_ForceLHR( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Just an <b>alias-name</b> for <b>ST_ForcePolygonCW()</b>.<br>
				<table bgcolor="#ffff00"><tr><td>Note: this function in Spatialite has a different interpretation then in PostGIS.</td></tr></table>
				</td></tr>
			<tr><td><b>ForcePolygonCW</b></td>
				<td>ST_ForcePolygonCW( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Geometry [if a valid Geometry was supplied], or NULL in any other case.<hr>
                                    All Polygons will be oriented accordingly to Clockwise Rule (all Exterior
                                    Ring will be clockwise oriented, and all Interior Rings will be counter-clockwise oriented).</td></tr>
			<tr><td><b>ForcePolygonCCW</b></td>
				<td>ST_ForcePolygonCCW( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Geometry [if a valid Geometry was supplied], or NULL in any other case.<hr>
                                    All Polygons will be oriented accordingly to Counter-Clockwise Rule (all Exterior
                                    Ring will be counter-clockwise oriented, and all Interior Rings will be clockwise oriented).</td></tr>
			<tr><td><b>IsPolygonCW</b></td>
				<td>ST_IsPolygonCW( geom <i>Geometry</i> ) : <i>Boolean</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns <b>TRUE</b> (<b>1</b>) if all Polygons into the Geometry are oriented accordingly to Clockwise Rule (all Exterior
                                    Ring must be clockwise oriented, and all Interior Rings must be counter-clockwise oriented).<br>
                    returns <b>FALSE</b> (<b>0</b>) if not; returns <b>-1</b> on invalid Geometries.<hr>
                    <u>Note</u>: a Geometry containing no Polygons will always return TRUE.</td></tr>
			<tr><td><b>IsPolygonCCW</b></td>
				<td>ST_IsPolygonCCW( geom <i>Geometry</i> ) : <i>Boolean</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns <b>TRUE</b> (<b>1</b>) if all Polygons into the Geometry are oriented accordingly to Counter-Clockwise Rule (all Exterior
                                    Ring must be counter-clockwise oriented, and all Interior Rings must be clockwise oriented).<br>
                    returns <b>FALSE</b> (<b>0</b>) if not: returns <b>-1</b> on invalid Geometries.<hr>
                    <u>Note</u>: a Geometry containing no Polygons will always return TRUE.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="repair">SQL functions attempting to repair malformed Geometries</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a (possibly) sanitized Geometry [<i>if a valid Geometry was supplied</i>], or NULL in any other case<hr>
					<u>Please note</u>: current implementations only affects:<ul>
						<li>repeated vertices suppression</li>
						<li>Ring's closure enforcement</li>
					</ul></td></tr>
			<tr><td><b>EnsureClosedRings</b></td>
				<td>EnsureClosedRings( geom <i>Geometry</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Geometry derived from the input Geometry; all <i>Rings</i> within the output Geometry are ensured to be correctly <i>closed</i>, 
				    i.e. will have exactly coincident <i>start</i> and <i>end</i> vertices.<br>
				    This function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
					<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.<hr>
					Will return <b>NULL</b> on invalid argument.
				</td></tr>
			<tr><td><b>RemoveRepeatedPoints</b></td>
				<td>RemoveRepeatedPoints( geom <i>Geometry</i> ) : geom <i>Geometry</i><hr>
				    RemoveRepeatedPoints( geom <i>Geometry</i> , tolerance <i>Double</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Geometry derived from the input Geometry; all repeated vertices found in <i>Linestrings</i> or <i>Rings</i> will be removed and the same applies
				    to repeated points found in <i>Multipoints</i>.<br>
				    This function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
					<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.
					<ul>
						<li>if the optional argument <b>tolerance</b> is defined all vertices/points presenting a distance less or equal to this value will be considered as repeated points.<br>
						The default tolerance value is <b>0.0</b>, this intending an <i>exact coincidence</i>; the same applies to any <i>negative</i> tolerance.</li>
						<li><i>Linestring</i> or <i>Ring</i> vertices are considered to be repeated only if they are <i>consecutive</i>.</li>
						<li><i>Multipoint</i> points are considered to be repeated independentely from their relative order.</li>
					</ul><hr>
					Will return <b>NULL</b> on invalid arguments.
				</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="compress">SQL Geometry-compression functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CastToXY</b></td>
				<td>CastToXY( geom <i>Geometry</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XY</b>] space dimension</td></tr>
			<tr><td><b>CastToXYZ</b></td>
				<td>CastToXYZ( geom <i>Geometry</i> ) : geom <i>Geometry</i><hr>
				    CastToXYZ( geom <i>Geometry</i> , no_data <i>Double</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XYZ</b>] space dimension.<br>
				    If the input Geometry already supports <b>Z</b> coordinates they'll be preserved as they are.<br>
				    If the input Geometry does not support <b>Z</b> coordinates they'll be set to <b>no_data</b> (defaulting to <b>0.0</b> if <b>no_data</b> is not specified).</td></tr>
			<tr><td><b>CastToXYM</b></td>
				<td>CastToXYM( geom <i>Geometry</i> ) : geom <i>Geometry</i><hr>
				    CastToXYM( geom <i>Geometry</i> , no_data <i>Double</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XYM</b>] space dimension.<br>
				    If the input Geometry already supports <b>M</b> coordinates they'll be preserved as they are.<br>
				    If the input Geometry does not support <b>M</b> coordinates they'll be set to <b>no_data</b> (defaulting to <b>0.0</b> if <b>no_data</b> is not specified).</td></tr>
			<tr><td><b>CastToXYZM</b></td>
				<td>CastToXYZM( geom <i>Geometry</i> ) : geom <i>Geometry</i><hr>
				    CastToXYZM( geom <i>Geometry</i> , z_no_data <i>Double</i> , m_no_data <i>Double</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XYZM</b>] space dimension.<br>
				    If the input Geometry already supports <b>Z</b> coordinates they'll be preserved as they are.<br>
				    If the input Geometry does not support <b>Z</b> coordinates they'll be set to <b>z_no_data</b> (defaulting to <b>0.0</b> if <b>z_no_data</b> is not specified).<br>
				    The same rule applies to <b>M</b> coordinates and <b>m_no_data</b>.</td></tr>
			<tr><td colspan="7" align="center" bgcolor="#f0f0c0">
				<h3><a name="p5">SQL functions on type Point</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				but they are by far quickest to compute</td></tr>
			<tr><td><b>IsClosed</b></td>
				<td>IsClosed( c <i>Curve</i> ) : <i>Integer</i><hr>
					ST_IsClosed( c <i>Curve</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument;<hr>
					return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c)</td></tr>
			<tr><td><b>IsRing</b></td>
				<td>IsRing( c <i>Curve</i> ) : <i>Integer</i><hr>
					ST_IsRing( c <i>Curve</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.<hr>
					return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through 
					the same Point more than once.</td></tr>
			<tr><td><b>PointOnSurface</b></td>
				<td>PointOnSurface( s <i>Surface/Curve</i> ) : <i>Point</i><hr>
					ST_PointOnSurface( s <i>Surface/Curve</i> ) : <i>Point</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
................................................................................
				<td>return a Point guaranteed to lie on the Surface (or Curve)</td></tr>
			<tr><td><b>Simplify</b></td>
				<td>Simplify( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i><hr>
                                ST_Simplify( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i><hr>
				ST_Generalize( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a geometric object representing a simplified version of <i>c</i> applying the Douglas-Peuker 
algorithm with given <i>tolerance</i></td></tr>
			<tr><td><b>SimplifyPreserveTopology</b></td>
				<td>SimplifyPreserveTopology( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i><hr>
                                ST_SimplifyPreserveTopology( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a geometric object representing a simplified version of <i>c</i> applying the Douglas-Peuker
algorithm with given <i>tolerance</i> and respecting topology</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p7">SQL functions on type LineString</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the number of Points in the LineString</td></tr>
			<tr><td><b>PointN</b></td>
				<td>PointN( line <i>LineString</i> , n <i>Integer</i> ) : <i>Point</i><hr>
					ST_PointN( line <i>LineString</i> , n <i>Integer</i> ) : <i>Point</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a Point containing Point n of line (first Point corresponds to n=1)</td></tr>
			<tr><td><b>AddPoint</b></td>
				<td>AddPoint( line <i>LineString</i> , point <i>Point</i> [ , position <i>Integer</i> ] ) : <i>Linestring</i><hr>
					ST_AddPoint( line <i>LineString</i> , point <i>Point</i> [ , position <i>Integer</i> ] ) : <i>Linestring</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Linestring by adding a new Point into the input Linestring immediately before <b>position</b> (zero-based index).<br>
                                A negative <b>position</b> (default) means appending the new Point to the end of the input Linestring.<br>
................................................................................
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return the area of s</td></tr>
			<tr><td>Area( s <i>Surface</i> , use_ellipsoid <i>Boolean</i> ) : <i>Double precision</i><hr>
					ST_Area( s <i>Surface</i> , use_ellipsoid <i>Boolean</i> ) : <i>Double precision</i>
				</td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return the area of s (measured in meters).<br>
If the <b>use_ellipsoid</b> argument is set to <b>TRUE</b> the precise (but slower) area will be computed on the Ellipsoid, otherwise will be computed on the Sphere (approximative, but faster).<hr>
This function only supports Long/Lat coordinates, and will return NULL for any planar CRS</td></tr>
			<tr><td rowspan="2"><b><a name="circularity">Circularity</a></b></td>
				<td>Circularity( s <i>Surface</i> ) : <i>Double precision</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>computes the Circularity Index from the given Geometry by applying the following formula:
				    <ul>
						<li><i>index = ( 4 * PI * Sum(area) ) / ( Sum(perimeter) * Sum(perimeter) )</i></li>
				    </ul>
				    <ul>
						<li>it only applies to <i>Polygons</i> or <i>MultiPolygons</i> with the following interpretation:
						<ul>
							<li><b>1.0</b> corresponds to a perfectly circular shape.</li>
							<li><b>very low</b> values (near zero) correspond to a threadlike shape.</li>
							<li><b>intermediate</b> values correspond to a more or less flattened shape;  lower index values means a stronger flattening effect.</li>
						</ul></li>
						<li>if the given Geometry does not contains any <i>Polygon</i> but contains at least a <i>Linestring</i> the index will always assume a <b>0.0</b> value.</li>
						<li>if the given Geometry only contains one or more <i>Points</i> the index will always assume a <b>NULL</b> value.</li>
				    </ul>
				    </td></tr>
			<tr><td>Circularity( s <i>Surface</i> , use_ellipsoid <i>Boolean</i> ) : <i>Double precision</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>same as the above Function, but in this case areas and perimeters will be measured in meters.<br>
If the <b>use_ellipsoid</b> argument is set to <b>TRUE</b> the precise (but slower) values will be computed on the Ellipsoid, otherwise they'll be computed on the Sphere (approximative, but faster).<hr>
This function only supports Long/Lat coordinates, and will return NULL for any planar CRS</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p9">SQL functions on type Polygon</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the number of interiorRings</td></tr>
			<tr><td><b>InteriorRingN</b></td>
				<td>InteriorRingN( polyg <i>Polygon</i> , n <i>Integer</i> ) : <i>LineString</i><hr>
					ST_InteriorRingN( polyg <i>Polygon</i> , n <i>Integer</i> ) : <i>LineString</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the nth (1-based) interiorRing. The order of Rings is not geometrically significant.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p10">SQL functions on type GeomCollection</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the number of individual Geometries</td></tr>
			<tr><td><b>GeometryN</b></td>
				<td>GeometryN( geom <i>GeomCollection</i> , n <i>Integer</i> ) : <i>Geometry</i><hr>
					ST_GeometryN( geom <i>GeomCollection</i> , n <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the nth (1-based) geometric object in the collection.
					The order of the elements in the collection is not geometrically significant.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p11">SQL functions that test approximate spatial relationships via MBRs</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>MbrEqual</b></td>
				<td>MbrEqual( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if g1 and g2 have equal MBRs</td></tr>
			<tr><td><b>MbrDisjoint</b></td>
				<td>MbrDisjoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 MBRs is the empty set</td></tr>
			<tr><td><b>MbrTouches</b></td>
				<td>MbrTouches( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2</td></tr>
			<tr><td><b>MbrWithin</b></td>
				<td>MbrWithin( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if g1 MBR is completely contained in g2 MBR</td></tr>
			<tr><td><b>MbrOverlaps</b></td>
				<td>MbrOverlaps( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 MBRs results in a value of the same
					dimension as g1 and g2 that is different from both g1 and g2</td></tr>
			<tr><td><b>MbrIntersects</b></td>
				<td>MbrIntersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<br>
					convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty</td></tr>
			<tr><td><b>EnvelopesIntersects</b></td>
				<td>ST_EnvIntersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
				    ST_EnvelopesIntersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
				    ST_EnvIntersects( geom1 <i>Geometry</i> , x1 <i>Double precision</i> , y1 <i>Double precision</i> , x2 <i>Double precision</i> , y2 <i>Double precision</i> ) : <i>Integer</i><hr>
				    ST_EnvelopesIntersects( geom1 <i>Geometry</i> , x1 <i>Double precision</i> , y1 <i>Double precision</i> , x2 <i>Double precision</i> , y2 <i>Double precision</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The first form simply is an <u>alias name</u> for <b>MbrIntersects</b>; the other form allows to define the second MBR by two extreme points [<b>x1, y1</b>] and [<b>x2, y2</b>].<br>
                                        The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with invalid arguments;<br>
					convenience predicate: TRUE if the intersection of both MBRs is not empty</td></tr>
			<tr><td><b>MbrContains</b></td>
				<td>MbrContains( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<hr>
					convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p12">SQL functions that test spatial relationships</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
................................................................................
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Equals</b></td>
				<td>Equals( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Equals( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if g1 and g2 are equal</td></tr>
			<tr><td><b>Disjoint</b></td>
				<td>Disjoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Disjoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 is the empty set</td></tr>
			<tr><td><b>Touches</b></td>
				<td>Touches( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Touches( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2</td></tr>
			<tr><td><b>Within</b></td>
				<td>Within( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Within( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if g1 is completely contained in g2</td></tr>
			<tr><td><b>Overlaps</b></td>
				<td>Overlaps( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Overlaps( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 results in a value of the same
					dimension as g1 and g2 that is different from both g1 and g2</td></tr>
			<tr><td><b>Crosses</b></td>
				<td>Crosses( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Crosses( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 results in a value whose dimension is less 
					than the maximum dimension of g1 and g2 and the intersection value includes Points 
					interior to both g1 and g2, and the intersection value is not equal to either g1 or g2</td></tr>
			<tr><td><b>Intersects</b></td>
				<td>Intersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Intersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<br>
					convenience predicate: TRUE if the intersection of g1 and g2 is not empty</td></tr>
			<tr><td><b>Contains</b></td>
				<td>Contains( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Contains( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<hr>
					convenience predicate: TRUE if g2 is completely contained in g1</td></tr>
			<tr><td><b>Covers</b></td>
				<td>Covers( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Covers( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<hr>
					convenience predicate: TRUE if g1 completely covers g2</td></tr>
			<tr><td><b>CoveredBy</b></td>
				<td>CoveredBy( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_CoveredBy( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<hr>
					convenience predicate: TRUE if g1 is completely covered by g2</td></tr>
			<tr><td rowspan="2"><b>Relate</b></td>
				<td><h3>OGC canonical signature</h3>
				    Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , patternMatrix <i>String</i> ) : <i>Integer</i><hr>
					ST_Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , patternMatrix <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
					<td>For more informations about patternMatrix interpretation please read: <a href="https://en.wikipedia.org/wiki/DE-9IM">DE-9IM</a><br><br>
					The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL arguments;<hr>

					returns TRUE if the spatial relationship specified by the patternMatrix holds.</td></tr>
			<tr><td><h3>non-canonical signature (PostGIS-like)</h3>
				    Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Text</i><hr>
					ST_Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Text</i><hr>
				    Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , bnr <i>Integer</i> ) : <i>Text</i><hr>
					ST_Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , bnr <i>Integer</i> ) : <i>Text</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Text, this corresponding to the serialized representation of some <b>[DE-9IM]</b> intersection matrix.<br>
					The optional argument <i>bnr</i> determines the Boundary Node Rule to be appiled, and has the following interpretation:
					<ul>
						<li><b>1</b>: OGC/MOD2 (this is the default case, and will be always assumed for any unknown value)</li>
						<li><b>2</b>: Endpoint</li>
						<li><b>3</b>: Multivalent Endpoint</li>
						<li><b>4</b>: Monovalent Endpoint</li>
					</ul>
					A patternMatrix returned by this function is then expected to be evaluated later by <b>ST_RelateMatch()</b>.<br>
					The main advantage in using this approach is that this way a comprehensive result (the patternMatrix itself) representing all possible intersection 
					modes between two geometries will be be computed just once by <b>ST_Relate()</b> and could then be more precisely qualified by repeatedly calling <b>ST_RelateMatch()</b>;
					the first operation is computationally heavy but the second is really fast, so an overall performance boot is usually expected when more than a single
					intersection mode have to be checked at the same time, as e.g. <i>OVERLAPS OR TOUCHES OR INTERSECTS</i>.<hr>
					Will return <b>NULL</b> on NULL or invalid geometries.
					</td></tr>
			<tr><td><b>RelateMatch</b></td>
				<td>ST_RelatedMatch( matrix <i>Text</i> , pattern <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Evaluates if an intersection matrix <b>[DE-9IM]</b> satisfies an intersection pattern.<hr>
					The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN when called with NULL or invalid arguments.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p13">SQL functions for distance relationships</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td>return the distance between geom1 and geom2 (measured in meters).<br>
If the <b>use_ellipsoid</b> argument is set to <b>TRUE</b> the precise (but slower) distance will be computed on the Ellipsoid, otherwise will be computed on the Great Cicle (approximative, but faster).<hr>
This function only supports Long/Lat coordinates, and will return NULL for any planar CRS</td></tr>
			<tr><td><b>PtDistWithin</b></td>
				<td>PtDistWithin( geom1 <i>Geometry</i> , geom2 <i>Geometry</i>, range <i>Double precision</i> [, use_spheroid <i>Integer</i> ] ) 
					: <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ</td>
				<td>return TRUE (1) if the distance between <i>geom1</i> and <i>geom2</i> is within the given range.<br>
				Usually distances are expressed in the length unit corresponding to the geoms own SRID:
				but if both geoms are simple POINTs and their SRID is 4326 (i.e. WGS84), then distances are
				expressed in <b>meters</b>.<br>
				In this later case the optional arg <i>use_spheroid</i> can be used to select the distance
				algorithm to be used: is <i>use_spheroid = 1</i> the slowest but most accurate <b>geodesic distance</b>
				will be evaluated: in any other case the simplest <b>great circle distance</b> will be used instead</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p14-">SQL functions supporting Linear Referencing</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>AddMeasure</b></td>
				<td>ST_AddMeasure( geom <i>Geometry</i> , m_start <i>Double precision</i> , m_end <i>Double precision</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Return a derived Geometry with M-values linearly interpolated between the start and end points.<br>
				NULL will be returned if any error is encountered.<br>
                                <u>Please note</u>: NULL will be returned if geom is not of the Linestring or MultiLinestring type.</td></tr>		
			<tr><td><b>InterpolatePoint</b></td>
				<td>ST_InterpolatePoint( line <i>Geometry</i> , point <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Interpolates the M-value of a linear Geometry at the point closest to the given point.<br>
				NULL will be returned if any error is encountered.<br>
                                <u>Please note</u>: NULL will be returned if the first geometry is not a Linestring supporting M-values, or if the second geometry is not a Point.</td></tr>		
			<tr><td><b>LocateAlongMeasure</b></td>
				<td>ST_Locate_Along_Measure( geom <i>Geometry</i> , m_value <i>Double precision</i> ) : <i>Geometry</i><hr>
				    ST_LocateAlong( geom <i>Geometry</i> , m_value <i>Double precision</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Return a derived geometry collection value with elements that match the specified measure.<br>
				NULL will be returned if any error is encountered (or when no element corresponding to the given measure is found).<br>
                                <u>Please note</u>: NULL will be returned if geom doesn't contain M-dimension, or if geom contains a Polygon, or if geom is a GeometryCollection.</td></tr>
			<tr><td><b>LocateBetweenMeasures</b></td>
				<td>ST_Locate_Between_Measures( geom <i>Geometry</i> , m_start <i>Double precision</i> , m_end <i>Double precision</i> ) : <i>Geometry</i><hr>
				    ST_LocateBetween( geom <i>Geometry</i> , m_start <i>Double precision</i> , m_end <i>Double precision</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Return a derived geometry collection value with elements that match the specified range of measures.<br>
				NULL will be returned if any error is encountered (or when no element corresponding to the given range of measures is found).<br>
                                <u>Please note</u>: NULL will be returned if geom doesn't contain M-dimension, or if geom contains a Polygon, or if geom is a GeometryCollection.</td></tr>                            
			<tr><td><b>IsValidTrajectory</b></td>
				<td>ST_IsValidTrajectory( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Check if a Geometry corresponds to a valid Trajectory.<br>
				a Trajectory is assumed to be a LINESTRING supporting M-values growing from each vertex to the next.<hr>
				NULL will be returned on invalid arguments.</td></tr>                           
			<tr><td><b>TrajectoryInterpolatePoint</b></td>
				<td>ST_TrajectoryInterpolarePoint( geom <i>Geometry</i> , m_value <i>Double</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Check if a Geometry corresponds to a valid Trajectory.<br>
				Return a POINT Geometry being interpolated along the Geometry (that is expected to be a valid Trajectory) accordingly to the given M-value.<br>
				The interpolated Point will have the same dimensions and SRID of the Trajectory.<hr>
				NULL will be returned on invalid arguments.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p14">SQL functions that implement spatial operators</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Intersection</b></td>
................................................................................
					end_fraction <i>Double precision</i> ) : <i>Curve</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Return a Linestring being a substring of the input one starting and ending at the given fractions of total 2d length.<br>
					Second and third arguments are expected to be in the range between <b>0.0</b> and <b>1.0</b>.<br>
					NULL is returned for invalid arguments</td></tr>
			<tr><td><b>ClosestPoint</b></td>
				<td>ClosestPoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Point</i><hr>
					ST_ClosestPoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Point</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Returns the Point on geom1 that is closest to geom2.<br>
					NULL is returned for invalid arguments (or if distance is ZERO)</td></tr>
			<tr><td><b>ShortestLine</b></td>
				<td>ShortestLine( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Curve</i><hr>
					ST_ShortestLine( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Curve</i></td>
................................................................................
				<td>UnaryUnion( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_UnaryUnion( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Exactely the same as <b><u>ST_Union</u></b>, but applied to a single Geometry.<br>
					(<i>set union of elementary Geometries within a MULTI- or GEOMETRYCOLLECTION complex Geometry</i>)<hr>
				NULL will be returned if any error is encountered</td></tr>
			<tr><td><b>DrapeLine</b></td>
				<td>ST_DrapeLine( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_DrapeLine( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , tolerance <i>Double</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Will return a <i>3D Linestring</i> by draping <i>geom1</i> over <i>geom2</i>:
				<ul>
					<li><b>geom1</b> is expected to be a <i>2D Linestring</i> (<i>XY</i> or <i>XYM</i> dimensions).</li>
					<li><b>geom2</b> is expected to be a <i>3D Linestring</i> (<i>XYZ</i> or <i>XYZM</i> dimensions).</li>
					<li>both <b>geom1</b> and <b>geom2</b> must share the same <b>SRID</b>.</li>
					<li>the option <b>tolerance</b> is the distance radius between corresponding 2D and 3d points.<br>
					    By default a <b>0.0</b> tolerance is intended, thus implying an exact coincidence of <b>X</b> and <b>Y</b> coordinates.</li>
				</ul>
				<u>Note</u>: The returned Linestring will contain all Vertices defined by <i>geom1</i> faithfully preserving their <b>X</b> and <b>Y</b> values; 
				<b>Z</b> and <b>M</b> values will be recovered from the corresponding 3D Vertex from <i>geom2</i>, or will be
				possibily interpolated if no direct match exists.<br>
				If neither a direct match nor interpolation can be applied then <b>Z</b> and <b>M</b> will assume a conventional <b>0.0</b> value.<hr>
				NULL will be returned on invalid arguments or if any error is encountered.</td></tr>
			<tr><td><b>DrapeLineExceptions</b></td>
				<td>ST_DrapeLineExceptions( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_DrapeLineExceptions( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , tolerance <i>Double</i> ) : <i>Geometry</i><hr>
					ST_DrapeLineExceptions( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , tolerance <i>Double</i> , interpolated <i>Bool</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Will return a <i>3D MultiPoint</i> containing all undraped Vertices encountered when draping <i>geom1</i> over <i>geom2</i>:
				<ul>
					<li><i>geom1</i>, <i>geom2</i> and <i>tolerance</i> exactly have the same interpretation as in <b>ST_DrapeLine()</b>.</li>
					<li>the option <b>interpolated</b> argument has the following interpreation:
						<ul>
							<li>if <i>FALSE</i> all 2D Vertices lacking a matching 3D Vertex will be inserted into the returned MultiPoint, even when <b>Z</b> and/or <b>M</b> values
							have been succesfully interpolated.</li>
							<li>if <i>TRUE</i> only 2D Vertices completely lacking <b>Z</b> and/or <b>M</b> values (defaulting to <b>0.0</b>) will be inserted into the returned MultiPoint.</li>
							<li>if not specified then <i>TRUE</i> is assumed by default.</li>
						</ul>
					</li>
				</ul>
				NULL will be returned on invalid arguments, or if any error is encountered or if there aren't undraped Vertices.</td></tr>
			<tr><td><b>DissolveSegments</b></td>
				<td>DissolveSegments( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_DissolveSegments( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>a Geometry (actually corresponding to a <i>LINESTRING</i>, <i>MULTILINESTRING</i> or <i>GEOMETRYCOLLECTION</i>) 
				will be returned.<br>
................................................................................
			<tr><td><b>ExtractMultiPolygon</b></td>
				<td>ExtractMultiPolygon( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Given any arbitrary GEOMETRY will return a derived <b>MULTIPOLYGON</b> geometry.
				Sub-geometries not being of the <b>POLYGON</b> type will be ignored.<br>
				NULL will be returned if any error is encountered (or when no POLYGON is found).</td></tr>
















			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p14c">SQL functions that implement spatial operators<br>[GEOS advanced features]</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
					The input Geometry could have any arbitrary type; eventually all Linestring's / Polygon's vertices will be dissolved into Points, so to implicitly always get a MultiPoint.<br>
					The returned Geometry will always be of the <b>Polygon</b> or <b>MultiPolygon</b> type.<br>
                                        The default <b>factor</b> applies a <b>3&sigma;</b> filtering; by declaring some <i>lower</i> factor you can get a more aggressive filtering effect.<br>
                                        By setting the optional <b>allow_holes</b> argument to <b>TRUE</b> all <i>interior holes</i> will be preserved.<br>
                                        The optional argument <b>tolerance</b> is intended to normalize the input Geometry, suppressing repeated (or too close) Points.<br>
					NULL is returned on failure.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p14d">SQL functions that implement spatial operators<br>[RTTOPO features]</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>MakeValid</b></td>
				<td>MakeValid( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_MakeValid( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a geometric object representing the <i>repaired</i> version of the input Geometry.<br>
                                        If the input Geometry was already valid, then it will be returned exactly as it was.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>MakeValidDiscarded</b></td>
				<td>MakeValidDiscarded( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_MakeValidDiscarded( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a geometric object containing all elements that would be eventually <i>discarded</i> by ST_MakeValid() while validating the same input Geometry.<br>
					NULL is returned on failure, or if no <i>discarded</i> item exists.</td></tr>
			<tr><td><b>Segmentize</b></td>
				<td>Segmentize( geom <i>Geometry</i>, dist <i>Double precision</i>  ) : <i>Geometry</i><hr>
					ST_Segmentize( geom <i>Geometry</i> , dist <i>Double precision</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a new Geometry corresponding to the input Geometry; as much Linestring / Ring vertices 
                                        as required will be eventually interpolated so to ensure that no segment will be longer than <i>dist</i>.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>Split</b></td>
				<td>Split( geom <i>Geometry</i>, blade <i>Geometry</i>  ) : <i>Geometry</i><hr>
					ST_Split( geom <i>Geometry</i> , blade <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a new Geometry collecting all items resulting by splitting the input Geometry by the <i>blade</i>.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>SplitLeft</b></td>
				<td>SplitLeft( geom <i>Geometry</i>, blade <i>Geometry</i>  ) : <i>Geometry</i><hr>
					ST_SplitLeft( geom <i>Geometry</i> , blade <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a new Geometry collecting all items resulting by splitting the input Geometry by the <i>blade</i> and falling on the <i>left side</i>.<br>
                                        All items not affected by the split operation (i.e. not intersecting the <i>blade</i>) will be returned into the <i>left</i> collection.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>SplitRight</b></td>
				<td>SplitRight( geom <i>Geometry</i>, blade <i>Geometry</i>  ) : <i>Geometry</i><hr>
					ST_SplitRight( geom <i>Geometry</i> , blade <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a new Geometry collecting all items resulting by splitting the input Geometry by the <i>blade</i> and falling on the <i>right side</i>.<br>
					NULL is returned on failure (or if the <i>right side</i> is empty).</td></tr>
			<tr><td><b>Azimuth</b></td>
				<td>Azimuth( pt1 <i>Geometry</i>, pt2 <i>Geometry</i>  ) : <i>Double precision</i><hr>
					ST_Azimuth( pt1 <i>Geometry</i> , pt2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return the angle (in radians) from the horizontal of the vector defined by <b>pt1</b> and <b>pt2</b>.<br>
                                        Both <b>pt1</b> and <b>pt2</b> are expected to be simple Points.<br>
					Starting since <u>4.1.0</u> if both points supports <u>long/lat</u> coords the returned Azimuth will be precisely computed on the ellipsoid.<br>
					NULL is returned on failure.<hr>
                                        On the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2</td></tr>
			<tr><td><b>Project</b></td>
				<td>Project( start_point <i>Geometry</i>, distance <i>Double precision</i>, azimuth <i>Double precision</i>  ) : <i>Geometry</i><hr>
					ST_Project( start_point <i>Geometry</i>, distance <i>Double precision</i>, azimuth <i>Double precision</i>  ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return a new Point projected from a start point using a bearing and distance.<br>
                                        <b>start_point</b> is expected to be simple <u>long/lat</u> Point.<br>
					<b>distance</b> is expected to be measured in <u>meters</u>; <b>azimuth</b> (aka <u>bearing</u> or <u>heading</u>) has the same identical meaning as in <b>ST_Azimuth()</b>.<br>
					NULL is returned on failure or on invalid arguments.</td></tr>
			<tr><td><b>SnapToGrid</b></td>
				<td>SnapToGrid( geom <i>Geometry</i> , size <i>Double precision</i>  ) : <i>Geometry</i><br>
				        SnapToGrid( geom <i>Geometry</i> , size_x <i>Double precision</i> , size_y <i>Double precision</i> ) : <i>Geometry</i><br>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a new Geometry corresponding to the input Geometry; all points and vertices will be snapped to the grid defined by its origin and size(s).<br>
                                        Removes all consecutive points falling on the same cell.<br>
                                        All collapsed geometries will be stripped from the returned Geometry.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>GeoHash</b></td>
				<td>GeoHash( geom <i>Geometry</i> [ , precision <i>Integer</i> ] ) : <i>String</i><hr>
					ST_GeoHash( geom <i>Geometry</i> [ , precision <i>Integer</i> ] ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>Return a GeoHash representation (geohash.org) of the geometry.<br>
                                    A GeoHash encodes a point into a text form that is sortable and searchable based on prefixing.<br>
                                    <ul>
										<li>If no <i>precision</i> is specficified ST_GeoHash returns a GeoHash based on full precision of the input geometry type.<br>
                                        Points return a GeoHash with 20 characters of precision (about enough to hold the full double precision of the input).</li>
                                        <li>Other types return a GeoHash with a variable amount of precision, based on the size of the feature.
                                        Larger features are represented with less precision, smaller features with more precision.
                                        The idea is that the box implied by the GeoHash will always contain the input feature.</li>
                                        <li>When explicitly set the <i>precision</i> argument will determine how many characters should by used by the returned GeoHash.</li>
                                    </ul><hr>
                                    ST_GeoHash will not work with geometries that are not in geographic (lon/lat) coordinates</td></tr>
			<tr><td><b>AsX3D</b></td>
				<td>AsX3D( geom <i>Geometry</i> ) : <i>String</i><br>
				AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> ) : <i>String</i><br>
				AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> ) : <i>String</i><br>
				AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> , refid <i>String</i> ) : <i>String</i><hr>
				ST_AsX3D( geom <i>Geometry</i> ) : <i>String</i><br>
				ST_AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> ) : <i>String</i><br>
				ST_AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> ) : <i>String</i><br>
				ST_AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> , refid <i>String</i> ) : <i>String</i>
</td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>Returns a geometry as an X3D XML formatted node element.</td></tr>
			<tr><td><b>MaxDistance</b></td>
				<td>MaxDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i><hr>
					ST_MaxDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return the max distance between geom1 and geom2</td></tr>
			<tr><td><b>3DDistance</b></td>
				<td>ST_3DDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return the 3D-distance between geom1 and geom2 (Z coordinates will be considered)</td></tr>
			<tr><td><b>3DMaxDistance</b></td>
				<td>ST_3DMaxDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return the max 3D-distance between geom1 and geom2 (Z coordinates will be considered)</td></tr>
			<tr><td><b>3dLength</b></td>
				<td>ST_3dLength( geom <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>return the total 2D or 3D-length of <i>Linestring</i> or <i>MultiLinestring</i> geometry.<br>
				Z coordinates if eventually present will be considered leading to a 3D measured length; otherwise a 2D length will be computed.</td></tr>
			<tr><td><b>ST_Node</b></td>
				<td>ST_Node( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>Fully nodes a set of linestrings using the least possible number of nodes while preserving all of the input ones.<br>
                                <b>NULL</b> will be returned if the input Geometry isn't a set of linestrings or if any other error occurs.</td></tr>
			<tr><td><b>SelfIntersections</b></td>
				<td>SelfIntersections( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
                                	ST_SelfIntersections( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td>Returns a MultiPoint Geometry representing any self-intersection found within the input geometry
					[expected to be of the Linestring or MultiLinestring type].<br>
                                <b>NULL</b> will be returned for invalid arguments, or when no self-intersections were found.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p15">SQL functions for coordinate transformations</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Transform</b></td>
				<td>Transform( geom <i>Geometry</i> , newSRID <i>Integer</i> ) : <i>Geometry</i><hr>
					ST_Transform( geom <i>Geometry</i> , newSRID <i>Integer</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ</td>
				<td>return a geometric object obtained by reprojecting coordinates into the Reference System identified by newSRID</td></tr>
			<tr><td><b>TransformXY</b></td>
				<td>TransformXY( geom <i>Geometry</i> , newSRID <i>Integer</i> ) : <i>Geometry</i><hr>
					ST_TransformXY( geom <i>Geometry</i> , newSRID <i>Integer</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ</td>
				<td>this is a <i>special flavor</i> of <b>ST_Transform()</b>; just <b>X</b> and <b>Y</b> coordinates will be transformed,
				<b>Z</b> and <b>M</b> values (if eventually present) will be left untouched.<br>
				<table bgcolor="#ffb080"><tr><td>
				Mainly intended as a workaround for (possibly) imprecise <i><u>+towsg84 PROJ</u></i> definitions; should never be used as a<i>ST_Transform()</i>
				replacement without a very careful evaluation.</td></tr></table>
				</td></tr>
			<tr><td><b>SridFromAuthCRS</b></td>
				<td>SridFromAuthCRS( auth_name <i>String</i> , auth_SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the internal SRID corresponding to <b>auth_name</b> and <b>auth_SRID</b><br>
				<b>-1</b> will be returned if no such CRS is defined </td></tr>
			<tr><td><b>ShiftCoords</b><br><b>ShiftCoordinates</b></td>
................................................................................
					i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected</td></tr>
			<tr><td><b>SwapCoords</b><br><b>SwapCoordinates</b></td>
				<td>SwapCoords( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					SwapCoordinates( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a geometric object obtained by swapping x- and y-coordinates</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">	
				<h3><a name="p14e">SQL functions supporting Geodesic Arcs</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>GeodesicArcLength</b></td>
				<td>GeodesicArcLength( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i><hr>
				    GeodesicArcLength( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , meters <i>Boolean</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ GEODESIC</td>
				<td>returns  the Arc length (distance) between <i>geom1</i> and <i>geom2</i> as the <b>surface</b> measurement of the outer circle arc / earth surface.<br>
				if <i>meters = 0</i> the result will be in degrees, otherwise meters [<b>default</b>].
				<hr>
				will return <b>NULL</b> on invalid arguments, or if PROJ GEODESIC is not supported.</td></tr>
			<tr><td><b>GeodesicChordLength</b></td>
				<td>GeodesicChordLength( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i><hr>
				    GeodesicChordLength( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , meters <i>Boolean</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ GEODESIC</td>
				<td>returns the length of the shortest line (distance) between <i>geom1</i> and <i>geom2</i> <b>through</b> the outer circle / earth surface.<br>
				if <i>meters = 0</i> the result will be in degrees, otherwise meters [<b>default</b>].
				<hr>
				will return <b>NULL</b> on invalid arguments, or if PROJ GEODESIC is not supported.</td></tr>
			<tr><td><b>GeodesicCentralAngle</b></td>
				<td>GeodesicCentralAngle( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i><hr>
				    GeodesicCentralAngle( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , radians <i>Boolean</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ GEODESIC</td>
				<td>returns the angle from the circle center to the <i>geom1</i> and <i>geom2</i> on the outer circle / earth surface.<br>
				if <i>radians = 0</i> the result will be in degrees, otherwise radians [<b>default</b>].
				<hr>
				will return <b>NULL</b> on invalid arguments, or if PROJ GEODESIC is not supported.</td></tr>
			<tr><td><b>GeodesicArcArea</b></td>
				<td>GeodesicArcArea( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ GEODESIC</td>
				<td>returns the area of the segment/arc  between the <b>Chord</b> and <b>Arc</b>, created by <i>geom1</i> and <i>geom2</i>, inside the outer circle / earth surface.<br>
				Since the <b>Radius</b> is in meters, only meter values can be returned.
				<hr>
				will return <b>NULL</b> on invalid arguments, or if PROJ GEODESIC is not supported.</td></tr>
			<tr><td><b>GeodesicArcHeight</b></td>
				<td>GeodesicArcHeight( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ GEODESIC</td>
				<td>returns  the height of the segment/arc (short-Sagitta) between the <b>Chord</b> and <b>Arc</b>, created by <i>geom1</i> and <i>geom2</i>, inside the outer circle / earth surface.<br>
				Since the <b>Radius</b> is in meters, only meter values can be returned.
				<hr>
				will return <b>NULL</b> on invalid arguments, or if PROJ GEODESIC is not supported.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">	
				<h3><a name="p15plus">SQL functions supporting Affine Transformations and Ground Control Points</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>ATM_Create</b></td>
				<td>ATM_Create( <i>void</i> ) : <i>AffineMatrix</i><hr>
				ATM_Create( a <i>Integer</i> , b <i>Integer</i> , d <i>Integer</i> , e <i>Integer</i> , xoff <i>Integer</i> , yoff <i>Integer</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_Create( a <i>Integer</i> , b <i>Integer</i> , c <i>Integer</i> , d <i>Integer</i> , e <i>Integer</i>  , f <i>Integer</i> , 
				g <i>Integer</i> , h <i>Integer</i> , i <i>Integer</i> , xoff <i>Integer</i> , yoff <i>Integer</i> , zoff <i>Integer</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix.
				<ul>
					<li>the first form (no arguments) will return an <b>Identity</b> matrix.</li>
					<li>the second and third forms will respectively return a fully initialized <b>2D</b> or <b>3D</b> Affine Transformation matrix.</li>
				</ul><hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>ATM_CreateTranslate</b></td>
				<td>ATM_CreateTranslate( tx <i>Double precision</i> , ty <i>Double precision</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_CreateTranslate( tx <i>Double precision</i> , ty <i>Double precision</i> , tz <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix representing a <b>2D</b> or <b>3D Translate</b> transformation.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>ATM_CreateScale</b></td>
				<td>ATM_CreateScale( sx <i>Double precision</i> , sy <i>Double precision</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_CreateScale( sx <i>Double precision</i> , sy <i>Double precision</i> , sz <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix representing a <b>2D</b> or <b>3D Scale</b> transformation.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>ATM_CreateRotate</b></td>
				<td>ATM_CreateRotate( angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_CreateZRoll( angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix representing a <b>Rotate</b> transformation (along the <b>Z axis</b>).<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_CreateXRoll</b></td>
				<td>ATM_CreateXRoll( angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix representing a <b>Rotate</b> transformation (along the <b>X axis</b>).<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_CreateYRoll</b></td>
				<td>ATM_CreateYRoll( angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix representing a <b>Rotate</b> transformation (along the <b>Y axis</b>).<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_Multiply</b></td>
				<td>ATM_Multiply( matrixA <i>AffineMatrix</i> , matrixB <i>AffineMatrix</i> ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix representing the result of multiplying <b>matrixA</b> by <b>matrixB</b>.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>ATM_Translate</b></td>
				<td>ATM_Translate( matrix <i>AffineMatrix</i> , tx <i>Double precision</i> , ty <i>Double precision</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_CreateTranslate( matrix <i>AffineMatrix</i> , tx <i>Double precision</i> , ty <i>Double precision</i> , tz <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix by chaining a further <b>2D</b> or <b>3D Translate</b> to a previous transformation matrix.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>ATM_Scale</b></td>
				<td>ATM_Scale( matrix <i>AffineMatrix</i> , sx <i>Double precision</i> , sy <i>Double precision</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_Scale( matrix <i>AffineMatrix</i> , sx <i>Double precision</i> , sy <i>Double precision</i> , sz <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix by chaining a further <b>2D</b> or <b>3D Scale</b> to a previous transformation matrix.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>ATM_Rotate</b></td>
				<td>ATM_Rotate( matrix <i>AffineMatrix</i> , angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i><hr>
				ATM_ZRoll( matrix <i>AffineMatrix</i> , angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix by chaining a further <b>Rotate</b> (along the <b>Z axis</b>) to a previous transformation matrix.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_XRoll</b></td>
				<td>ATM_XRoll( matrix <i>AffineMatrix</i> , angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix by chaining a further <b>Rotate</b> (along the <b>X axis</b>) to a previous transformation matrix.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_YRoll</b></td>
				<td>ATM_YRoll( matrix <i>AffineMatrix</i> , angleInDegrees <i>Double precision</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a BLOB-encoded Affine Transformation matrix by chaining a further <b>Rotate</b> (along the <b>Y axis</b>) to a previous transformation matrix.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_Determinant</b></td>
				<td>ATM_Determinant( matrix <i>AffineMatrix</i> ] ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the Determinant from an Affine Transformation matrix.<hr>
				will return <b>0.0</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_IsInvertible</b></td>
				<td>ATM_IsInvertible( matrix <i>AffineMatrix</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return <b>1</b> if the Affine Transformation matrix can be inverted, <b>0</b> if not.<hr>
				will return <b>-1</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_Invert</b></td>
				<td>ATM_Invert( matrix <i>AffineMatrix</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return an inverted Affine Transformation matrix.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_IsValid</b></td>
				<td>ATM_IsValid( matrix <i>AffineMatrix</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return <b>1</b> if the BLOB argument really contains a valid Affine Transformation matrix, <b>0</b> if not.<hr>
				will return <b>-1</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_AsText</b></td>
				<td>ATM_AsText( matrix <i>AffineMatrix</i> ] ) : <i>Text</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a serialized text string corresponding to an Affine Transformation matrix.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>ATM_Transform</b></td>
				<td>ATM_Transform( geom <i>Geometry</i> , matrix <i>AffineMatrix</i> [ , newSRID <i>Integer</i> ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a geometric object obtained by applying an Affine Transformation; if the optional arg newSRID is defined then the returned Geometry will assume the corresponding 
				Reference System, otherwise it will preserve the same Reference System of the input Geometry.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td><b>GCP_Compute</b></td>
				<td>GCP_Compute( pointA <i>Geometry</i> , pointB <i>Geometry</i> [ order <i>Integer</i>] ) : <i>PolynomialCoeffs</i></td>
				<td></td>
				<td align="center" bgcolor="#90f0d0">GrassGis code<br>GPLv2+</td>
				<td>return BLOB-encoded objects containing Polynomial coefficients computed from a set of matching <b>Ground Control Points</b> pairs.
				<ul>
					<li><b>pointA</b> corresponds to the origin Reference System; <b>pointB</b> corresponds to the destination target.</li>
					<li>the input Geometries must be of the <b>Point</b> type and must have the same dimensions</li>
					<li>if the points have <b>XYZ</b> or <b>XYZM</b> dimensions then <b>3D coeffs</b> will be returned, otherwise <b>2D</b> coeffs will be return.</li>
					<li>the optional <b>order</b> argument can assume the following values:
					<ul>
						<li><b>0</b>: a set of <b>2D coeffs</b> will be returned by applying the <b>Thin Plate Spline</b> method.</li>
						<li><b>1</b>: (<i>default setting</i>) a set of <b>2D</b> or <b>3D</b> Polynomial coeffs of the <b>1st order</b> will be returned.</li>
						<li><b>2</b>: a set of <b>2D</b> or <b>3D</b> Polynomial coeffs of the <b>2nd order</b> will be returned.</li>
						<li><b>3</b>: a set of <b>2D</b> or <b>3D</b> Polynomial coeffs of the <b>3rd order</b> will be returned.</li>
					</ul></li>
				</ul><hr>
				will return <b>NULL</b> on invalid arguments<hr>
				<u><b>aggreagate function</b></u></td></tr>
			<tr><td><b>GCP_IsValid</b></td>
				<td>GCP_IsValid( matrix <i>PolynomialCoeffs</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#90f0d0">GrassGis code<br>GPLv2+</td>
				<td>return <b>1</b> if the BLOB argument really contains valid Polynomial coeffs, <b>0</b> if not.<hr>
				will return <b>-1</b> on invalid argument.</td></tr>
			<tr><td><b>GCP_AsText</b></td>
				<td>GCP_AsText( matrix <i>PolynomialCoeffs</i> ] ) : <i>Text</i></td>
				<td></td>
				<td align="center" bgcolor="#90f0d0">GrassGis code<br>GPLv2+</td>
				<td>return a serialized text string corresponding to the Polynomial coeffs.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>GCP2ATM</b></td>
				<td>GCP2ATM( matrix <i>PolynomialCoeffs</i> ] ) : <i>AffineMatrix</i></td>
				<td></td>
				<td align="center" bgcolor="#90f0d0">GrassGis code<br>GPLv2+</td>
				<td>return an Affine Transformation matrix corresponding to the Polynomial coeffs.<br>
				Only a set of Polynomial coeffs of the <b>1st order</b> can be converted to an Affine Transformation matrix.<hr>
				will return <b>NULL</b> on invalid argument.</td></tr>
			<tr><td><b>GCP_Transform</b></td>
				<td>GCP_Transform( geom <i>Geometry</i> , coeffs <i>PolynomialCoeffs</i> [ , newSRID <i>Integer</i> ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#90f0d0">GrassGis code<br>GPLv2+</td>
				<td>return a geometric object obtained by applying a Transformation based on Polynomial coefficients of the <b>1st</b>, <b>2nd</b> or <b>3rd order</b>; if the optional arg newSRID is defined then the returned Geometry will assume the corresponding 
				Reference System, otherwise it will preserve the same Reference System of the input Geometry.<hr>
				will return <b>NULL</b> on invalid arguments.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p16">SQL functions for Spatial-MetaData and Spatial-Index handling</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
<ul>
	<li>if the <i>optional</i> argument <b>transaction</b> is set to <b>TRUE</b> the whole operation will be handled as a single <i>Transaction</i> (faster): the default setting is <b>transaction=FALSE</b> (slower, but safer).</li>
	<li>if the <i>optional</i> argument <b>mode</b> is not specified then any possible ESPG SRID definition will be inserted into the <b>spatial_ref_sys</b> table.</li>
	<li>if the <b>mode</b> arg <b>'WGS84'</b> (alias <b>'WGS84_ONLY'</b>) is specified, then only WGS84-related EPSG SRIDs will be inserted</li>
	<li>if the <b>mode</b> arg <b>'NONE'</b> (alias <b>'EMPTY'</b>) is specified, no EPSG SRID will be inserted at all</li>
</ul></td></tr>
			<tr><td><b>InitSpatialMetaDataFull</b></td>
				<td>InitSpatialMetaDataFull( void ) : <i>Integer</i><hr>
					InitSpatialMetaDataFull( transaction <i>Integer</i> ) : <i>Integer</i><hr>
					InitSpatialMetaDataFull( mode <i>String</i> ) : <i>Integer</i><hr>
					InitSpatialMetaDataFull( transaction <i>Integer</i> , mode <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This one simply is a <i>convenience function</i> accepting the same arguments of <b>InitSpatialMetaData()</b> (with identical meaning).<br>
				The intended scope is to fully initialize all <i>metadata tables</i> required by <i>libspatialite 5.0.0</i> (and following versions).
				This function will internally call in a single pass:
				<ul>
					<li><i>InitSpatialMetaData()</i></li>
					<li><i>CreateRasterCoveragesTable()</i></li>
					<li><i>CreateVectorCoveragesTables()</i></li>
					<li><i>CreateStylingTables()</i></li>
				</ul>the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>
			<tr><td><b>InsertEpsgSrid</b></td>
				<td>InsertEpsgSrid( srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Attempts to insert into <b>spatial_ref_sys</b> the EPSG definition uniquely identified by <b>srid</b><br>
				[the corresponding EPSG SRID definition will be copied from the inlined dataset defined in <b>libspatialite</b>]<hr>
the return type is Integer, with a return value of 1 for success or 0 for failure</td></tr>
................................................................................
					<li>otherwise statistics will be updated only for Geometry Columns
						corresponding to the given table</li>
					</ul><hr>
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE<hr>
				<u>Please note</u>: will effectively work only on behalf DB-files supporting the more recent metatables layout introduced 
				starting since version <b>4.x</b>; in any other case will always return an error and no action will happen.</td></tr>
		<tr><td><b>UpdateLayerStatistics</b></td>
				<td>UpdateLayerStatistics( void ) : <i>Integer</i><hr>
					UpdateLayerStatistics( table <i>String</i> [ , column <i>String</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Updates the internal Layer Statistics [Feature Count and Total Extent]<ul>
					<li>if no arguments are passed, then internal statistics will be updated 
						for any possible Geometry Column defined in the current DB</li>
					<li>otherwise statistics will be updated only for Geometry Columns
................................................................................
                                    if the Table/Layer only contains a single Geometry column passing the column name isn't strictly required.<br>
                                    The returned extent will be retrieved from the Statistics tables:<ul>
					<li>if the third argument <b>mode</b> is set to TRUEa <b>PESSIMISTIC</b>
                                            strategy will be applied, i.e. an attempt will be made in order to update the Statistics tables before returning the Envelope.</li>
					<li>otherwise the returned Envelope will simply reflect the current values stored into the Statics tables as they are (<b>OPTIMISTIC</b> strategy, adopted by default).</li>
					</ul><hr>
                                        NULL will be returned if any error occurs or if the required table isn't a Layer.</td></tr>














		<tr><td><b>CreateRasterCoveragesTable</b></td>
				<td>CreateRasterCoveragesTable( <i>void</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Creates the <b>raster_coverages</b> table required by <b>RasterLite-2</b><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure)</td></tr>
		<tr><td><b>CreateVectorCoveragesTables</b></td>
................................................................................
					<li>if the <i>optional</i> argument <b>relaxed</b> is explicitly set as <b>TRUE</b> then
					a <i>relaxed</i> version of the validating Triggers will be installed (not checking for strict <i><u>XSD schema validation</u></i>).</li>
					<li>if the <i>optional</i> argument <b>transaction</b> is explicitly set as <b>TRUE</b> then 
					the whole operation will be atomically confined within a monolithic SQL transaction</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.<hr>
<i>Please note</i>: will implicitly invoke <b>CreateRasterCoveragesTable()</b> and <b>CreateVectorCoveragesTables()</b> so to create the corresponding tables if not already defined.</td></tr>
		<tr><td><b>SE_RegisterVectorCoverage</b></td>
				<td>SE_RegisterVectorCoverage( coverage_name <i>String</i> , f_table_name <i>String</i> , f_geometry_column <i>String</i> ) : <i>Integer</i><hr>
					SE_RegisterVectorCoverage( coverage_name <i>String</i> , f_table_name <i>String</i> , f_geometry_column <i>String</i> , title <i>String</i> , abstract <i>String </i> ) : <i>Integer</i><hr>
					SE_RegisterVectorCoverage( coverage_name <i>String</i> , f_table_name <i>String</i> , f_geometry_column <i>String</i> , title <i>String</i> , abstract <i>String </i> ,
					is_queryable <i>Boolen</i> , is_editable <i>Boolean</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Creates a <b>Vector Coverage</b> based on an already existing Spatial Table.
				<ul>
					<li><b>coverage_name</b> is the symbolic name uniquely identifying each Vector Coverage (<i>Primary Key</i>).</li>
					<li><b>f_table_name</b> and <b>f_geometry_column</b> are expected to match the corresponding entries in the <i>geometry_columns</i> table.</li>
					<li>the optional arguments <b>title</b> and <b>abstract</b> could be eventually be specified for better human readability.</li>
					<li>if both optional arguments <b>is_queryable</b> and <b>is_editable</b> are left unspecified the Vector Coverage will then be neither queryable nor editable.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterSpatialViewCoverage</b></td>
				<td>SE_RegisterSpatialViewCoverage( coverage_name <i>String</i> , view_name <i>String</i> , view_geometry <i>String</i> ) : <i>Integer</i><hr>
					SE_RegisterSpatialViewCoverage( coverage_name <i>String</i> , view_name <i>String</i> , view_geometry <i>String</i> , title <i>String</i> , abstract <i>String </i> ) : <i>Integer</i><hr>
					SE_RegisterSpatialViewCoverage( coverage_name <i>String</i> , view_name <i>String</i> , view_geometry <i>String</i> , title <i>String</i> , abstract <i>String </i> ,
					is_queryable <i>Boolen</i> , is_editable <i>Boolean</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Creates a <b>Vector Coverage</b> based on an already existing Spatial View.
				<ul>
					<li><b>coverage_name</b> is the symbolic name uniquely identifying each Vector Coverage (<i>Primary Key</i>).</li>
					<li><b>view_name</b> and <b>view_geometry</b> are expected to match the corresponding entries in the <i>views_geometry_columns</i> table.</li>
					<li>the optional arguments <b>title</b> and <b>abstract</b> could be eventually be specified for better human readability.</li>
					<li>if both optional arguments <b>is_queryable</b> and <b>is_editable</b> are left unspecified the Vector Coverage will then be neither queryable nor editable.</li>
					<li><b>Note</b>: a Spatial View Coverage declared to be editable will not fully support editing operations if the underlying Spatial View is of the <b>read-only</b> type (read-only=<b>1</b>).</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterVirtualShapeCoverage</b></td>
				<td>SE_RegisterVirtualShapeCoverage( coverage_name <i>String</i> , virt_name <i>String</i> , virt_geometry <i>String</i> ) : <i>Integer</i><hr>
					SE_RegisterVirtualShapeCoverage( coverage_name <i>String</i> , virt_name <i>String</i> , virt_geometry <i>String</i> , title <i>String</i> , abstract <i>String </i> ) : <i>Integer</i><hr>
					SE_RegisterVirtualShapeCoverage( coverage_name <i>String</i> , virt_name <i>String</i> , virt_geometry <i>String</i> , title <i>String</i> , abstract <i>String </i> ,
					is_queryable <i>Boolen</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Creates a <b>Vector Coverage</b> based on an already existing VirtualShape Table.
				<ul>
					<li><b>coverage_name</b> is the symbolic name uniquely identifying each Vector Coverage (<i>Primary Key</i>).</li>
					<li><b>virt_name</b> and <b>virt_geometry</b> are expected to match the corresponding entries in the <i>virts_geometry_columns</i> table.</li>
					<li>the optional arguments <b>title</b> and <b>abstract</b> could be eventually be specified for better human readability.</li>
					<li>if the optional argument <b>is_queryable</b> is left unspecified tjem the Vector Coverage will not be queryable.</li>
					<li><b>Note</b>: VirtualShape Coverages are always not editable.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterTopoGeoCoverage</b></td>
				<td>SE_RegisterTopoGeoCoverage( coverage_name <i>String</i> , topology_name <i>String</i> ) : <i>Integer</i><hr>
					SE_RegisterTopoGeoCoverage( coverage_name <i>String</i> , topology_name <i>String</i> , title <i>String</i> , abstract <i>String </i> ) : <i>Integer</i><hr>
					SE_RegisterTopoGeoCoverage( coverage_name <i>String</i> , topology_name <i>String</i> , title <i>String</i> , abstract <i>String </i> ,
					is_queryable <i>Boolen</i> , is_editable <i>Boolean</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Creates a <b>Vector Coverage</b> based on an already existing Topology-Geometry.
				<ul>
					<li><b>coverage_name</b> is the symbolic name uniquely identifying each Vector Coverage (<i>Primary Key</i>).</li>
					<li><b>topogeo_name</b> is expected to match the corresponding entries in the <i>topologies</i> table.</li>
					<li>the optional arguments <b>title</b> and <b>abstract</b> could be eventually be specified for better human readability.</li>
					<li>if both optional arguments <b>is_queryable</b> and <b>is_editable</b> are left unspecified the Vector Coverage will then be neither queryable nor editable.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterTopoNetCoverage</b></td>
				<td>SE_RegisterTopoNetCoverage( coverage_name <i>String</i> , network_name <i>String</i> ) : <i>Integer</i><hr>
					SE_RegisterTopoNetCoverage( coverage_name <i>String</i> , network_name <i>String</i> , title <i>String</i> , abstract <i>String </i> ) : <i>Integer</i><hr>
					SE_RegisterTopoNetCoverage( coverage_name <i>String</i> , network_name <i>String</i> , title <i>String</i> , abstract <i>String </i> ,
					is_queryable <i>Boolen</i> , is_editable <i>Boolean</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Creates a <b>Vector Coverage</b> based on an already existing Topology-Network.
				<ul>
					<li><b>coverage_name</b> is the symbolic name uniquely identifying each Vector Coverage (<i>Primary Key</i>).</li>
					<li><b>toponet_name</b> is expected to match the corresponding entries in the <i>networks</i> table.</li>
					<li>the optional arguments <b>title</b> and <b>abstract</b> could be eventually be specified for better human readability.</li>
					<li>if both optional arguments <b>is_queryable</b> and <b>is_editable</b> are left unspecified the Vector Coverage will then be neither queryable nor editable.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorCoverage</b></td>
				<td>SE_UnregisterVectorCoverage( coverage_name <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
				<td>Completely removes an already defined <b>Vector Coverage</b> this including any furher depency; the underlying Spatial Table will be absolutely unaffected.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_SetVectorCoverageInfos</b></td>
				<td>SE_SetVectorCoverageInfos( coverage_name <i>String</i> , title <i>String</i> , abstract <i>String</i> ) : <i>Integer</i><hr>
				    SE_SetVectorCoverageInfos( coverage_name <i>String</i> , title <i>String</i> , abstract <i>String</i> , is_queryable <i>Boolen</i> , is_editable <i>Boolean</i> ): <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates the descriptive infos associated to a <b>Vector Coverage</b>.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
					<li><b>title</b> and <b>abstract</b> represent the descriptive infos to be set.</li>
					<li>the optional arguments <b>is_queryable</b> and <b>is_editable</b> can be explicitly set so to determine if the Vector Coverage is queryable and/or editable.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_SetVectorCoverageCopyright</b></td>
				<td>SE_SetVectorCoverageCopyright( coverage_name <i>String</i> , copyright <i>String</i> ) : <i>Integer</i><hr>
				    SE_SetVectorCoverageCopyright( coverage_name <i>String</i> , copyright <i>String</i> , license <i>String</i> ): <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates Copyright and License infos associated to a <b>Vector Coverage</b>.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
					<li><b>copyright</b> identifies the Copyright holder; if <b>NULL</b> the current value will be preserved.</li>
					<li>the optional argument <b>license</b> must reference one the Data Licenses registered into the <b>data_licenses</b> table, as e.g. <i>CC0 1.0</i> or <i>CC BY 4.0</i>.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterVectorCoverageSrid</b></td>
				<td>SE_RegisterVectorCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Adds an alternative <b>SRID</b> to an already defined Vector Coverage.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
					<li><b>srid</b> is expected to match the corresponding entries in the <b>spatial_ref_sys</b> table.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorCoverageSrid</b></td>
				<td>SE_UnregisterVectorCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
					<li>if the optional <b>coverage_name</b> argument is set then only that single Vector Coverage will be updated; 
					otherwise all registered Vector Coverages will be processed in a single pass (may require a long time).</li>
					<li>if the optional <b>transaction</b> argument is set to <b>TRUE</b> then the whole operation will be internally
					handled as a single SQL Transaction.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterVectorCoverageKeyword</b></td>
				<td>SE_RegisterVectorCoverageeKeyword( coverage_name <i>String</i> , keyword <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Adds a <b>keyword</b> to an already defined Vector Coverage.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
					<li><b>keyword</b> must not be already defined for the same Coverage.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorCoverageKeyword</b></td>
				<td>SE_UnregisterVectorCoverageKeyword( coverage_name <i>String</i> , keyword <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already defined <b>keyword</b> from a Vector Coverage.
				<ul>
					<li><b>coverage_name</b> and <b>keyword</b> must identify some previously defined keyword.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterExternalGraphic</b></td>
				<td>SE_RegisterExternalGraphic( xlink_href <i>String</i> , resource <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_RegisterExternalGraphic( xlink_href <i>String</i> , resource <i>BLOB</i> , title <i>String</i> , abstract <i>String</i> , file_name <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Inserts (or updates) an <b>External Graphic Resource</b>.
				<ul>
					<li><b>xlink_href</b> uniquely identifies each Resource (<i>Primary Key</i>).</li>
					<li><b>resource</b> is expected to be a BLOB containing an <i>image/gif</i>, <i>image/png</i>, <i>image/jpeg</i> or <i>image/svg+xml</i> payload.</li>
					<li>the optional arguments <b>title</b>, <b>abstract</b> and <b>file_name</b> could be eventually be specified for better human readability.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterExternalGraphic</b></td>
				<td>SE_UnregisterExternalGraphic( xlink_href <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The registered Style will be identified either by its unique <b>Style ID</b> or by its <b>Style Name</b> automatically retrieved from SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorStyle</b></td>
				<td>SE_UnregisterVectorStyle( style_id <i>Integer</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i><hr>
					SE_UnregisterVectorStyle( style_name <i>Text</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already registered <b>Vector Style</b> definition.
				<ul>
					<li>The Style to be removed could be referenced either by its unique <b>Style Id</b> or by its <b>Style Name</b>.<br>
					Anyway any attempt to remove a Style identified by its <b>Name</b> will be rejected if the if two (or more) Styles share the same <b>Name</b> thus causing ambiguity.</li>
					<li>when the <i>optional</i> argument <b>remove_all</b> is explicitly set to <b>TRUE</b> the Style will be removed even if it's already referenced by some
................................................................................
					<b>VectorStyledLayer</b> and all dependings references will be removed at the same time.<br>
					In any other case any attempt to unregister a Style already referenced by one (or more) <b>VectorStyleLayer</b> will be rejected.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_ReloadVectorStyle</b></td>
				<td>SE_ReloadVectorStyle( style_id <i>Integer</i> , style <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_ReloadVectorStyle( style_name <i>Text</i> , style <i>BLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates an already existing <b>Vector Style</b> definition.
				<ul>
					<li><b>style</b> is expected to be an XmlBLOB containing a valid SLD/SE Style of the Vector type.<br>
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The updated Style will continue to be identified by its current unique <b>Style ID</b> but the <b>Style Name</b> will be automatically updated accordingly to SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterVectorStyledLayer</b></td>
				<td>SE_RegisterVectorStyledLayer( coverage_name <i>String</i> , style_id <i>Integer</i> ) : <i>Integer</i><hr>
					SE_RegisterVectorStyledLayer( coverage_name <i>String</i> , style_name <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
................................................................................
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The registered Style will be identified either by its unique <b>Style ID</b> or by its <b>Style Name</b> automatically retrieved from SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterRasterStyle</b></td>
				<td>SE_UnregisterRasterStyle( style_id <i>Integer</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i><hr>
					SE_UnregisterRasterStyle( style_name <i>Text</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already registered <b>Raster Style</b> definition.
				<ul>
					<li>The Style to be removed could be referenced either by its unique <b>Style Id</b> or by its <b>Style Name</b>.<br>
					Anyway any attempt to remove a Style identified by its <b>Name</b> will be rejected if the if two (or more) Styles share the same <b>Name</b> thus causing ambiguity.</li>
					<li>when the <i>optional</i> argument <b>remove_all</b> is explicitly set to <b>TRUE</b> the Style will be removed even if it's already referenced by some
................................................................................
					<b>RasterStyledLayer</b> and all dependings references will be removed at the same time.<br>
					In any other case any attempt to unregister a Style already referenced by one (or more) <b>RasterStyleLayer</b> will be rejected.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_ReloadRasterStyle</b></td>
				<td>SE_ReloadRasterStyle( style_id <i>Integer</i> , style <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_ReloadRasterStyle( style_name <i>Text</i> , style <i>BLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates an already existing <b>Raster Style</b> definition.
				<ul>
					<li><b>style</b> is expected to be an XmlBLOB containing a valid SLD/SE Style of the Raster type.<br>
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The updated Style will continue to be identified by its current unique <b>Style ID</b> but the <b>Style Name</b> will be automatically updated accordingly to SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterRasterStyledLayer</b></td>
				<td>SE_RegisterRasterStyledLayer( coverage_name <i>String</i> , style_id <i>Integer</i>  ) : <i>Integer</i><hr>
					SE_RegisterRasterStyledLayer( coverage_name <i>String</i> , style_name <i>Text</i>  ) : <i>Integer</i></td>
				<td></td>
................................................................................
		<tr><td><b>SE_RegisterRasterCoverageSrid</b></td>
				<td>SE_RegisterRasterCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Adds an alternative <b>SRID</b> to an already defined Raster Coverage.
				<ul>
					<li><b>coverage_name</b> must identify an existing Raster Coverage.</li>
					<li><b>srid</b> is expected to match the corresponding entries in the <b>spatial_ref_sys</b> table.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterRasterCoverageSrid</b></td>
				<td>SE_UnregisterRasterCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
				<td>Updates the <b>Extent</b> boundary supporting a Raster Coverage, this including any eventually defined alternative SRID.
				<ul>
					<li>if the optional <b>coverage_name</b> argument is set then only that single Raster Coverage will be updated; 
					otherwise all registered Raster Coverages will be processed in a single pass (may require a long time).</li>
					<li>if the optional <b>transaction</b> argument is set to <b>TRUE</b> then the whole operation will be internally
					handled as a single SQL Transaction.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterRasterCoverageKeyword</b></td>
				<td>SE_RegisterRasterCoverageKeyword( coverage_name <i>String</i> , keyword <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Adds a <b>keyword</b> to an already defined Raster Coverage.
				<ul>
					<li><b>coverage_name</b> must identify an existing Raster Coverage.</li>
					<li><b>keyword</b> must not be already defined for the same Coverage.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterRasterCoverageKeyword</b></td>
				<td>SE_UnregisterRasterCoverageKeyword( coverage_name <i>String</i> , keyword <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already defined <b>keyword</b> from a Raster Coverage.
				<ul>
					<li><b>coverage_name</b> and <b>keyword</b> must identify some previously defined keyword.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_SetStyledGroupInfos</b></td>
				<td>SE_SetStyledGroupInfos( group_name <i>String</i> , title <i>String</i> , abstract <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Inserts (or updates) the descriptive infos associated to a <b>Styled Group</b>.
................................................................................
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The registered Style will be identified either by its unique <b>Style ID</b> or by its unique <b>Style Name</b> automatically retrieved from SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterGroupStyle</b></td>
				<td>SE_UnregisterGroupStyle( style_id <i>Integer</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i><hr>
					SE_UnregisterGroupStyle( style_name <i>Text</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already registered <b>Group Style</b> definition.
				<ul>
					<li>The Style to be removed could be referenced either by its unique <b>Style Id</b> or by its <b>Style Name</b>.<br>
					Anyway any attempt to remove a Style identified by its <b>Name</b> will be rejected if the if two (or more) Styles share the same <b>Name</b> thus causing ambiguity.</li>
					<li>when the <i>optional</i> argument <b>remove_all</b> is explicitly set to <b>TRUE</b> the Style will be removed even if it's already referenced by some
................................................................................
					<b>RasterStyledLayer</b> and all dependings references will be removed at the same time.<br>
					In any other case any attempt to unregister a Style already referenced by one (or more) <b>RasterStyleLayer</b> will be rejected.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_ReloadGroupStyle</b></td>
				<td>SE_ReloadGroupStyle( style_id <i>Integer</i> , style <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_ReloadGroupStyle( style_name <i>Text</i> , style <i>BLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates an already existing <b>Group Style</b> definition.
				<ul>
					<li><b>style</b> is expected to be an XmlBLOB containing a valid SLD complex Style.<br>
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The updated Style will continue to be identified by its current unique <b>Style ID</b> but the <b>Style Name</b> will be automatically updated accordingly to SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterStyledGroupStyle</b></td>
				<td>SE_RegisterStyledGroupStyle( group_name <i>String</i> , style_id <i>Integer</i> ) : <i>Integer</i><hr>
					SE_RegisterStyledGroupStyle( group_name <i>String</i> , style_name <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
................................................................................
				<h3><a name="p16fdo">SQL functions implementing FDO/OGR compatibility</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CheckSpatialMetaData</b></td>
				<td>CheckSpatialMetaData( void ) : <i>Integer</i><hr>
				    CheckSpatialMetaData( db_prefix <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Checks the Spatial Metadata type, then returning:<ul>
				<li><b>-1</b> - on invalid args or if no ATTACHED-DB identified by <b>db_prefix</b> exists.</li>
				<li><b>0</b> - if the <b>geometry_columns</b> or <b>spatial_ref_sys</b> table does not exists, or if their actual layout doesn't corresponds to any known implementation</li>
				<li><b>1</b> - if both tables exist, and their layout is the one previously used by <b>SpatiaLite legacy</b> (<i>older versions including 3.1.0 any earlier</i>)</li>
				<li><b>2</b> - if both tables exist, and their layout is the one used by <b>FDO/OGR</b></li>
				<li><b>3</b> - if both tables exist, and their layout is the one currently used by <b>SpatiaLite</b> (<i>4.0.0 or any subsequent version</i>)</li>
				<li><b>4</b> - if the DB layout is the one defined by the <b>OGC GPKG</b> specification (<i>GeoPackage</i>)</li>
				</ul><hr>
				The optional <b>db_prefix</b> argument specifies which one of the ATTACHED databases is intended to be checked; if unspecified or <b>NULL</b> then 
				the <b>MAIN</b> database will be assumed by default.</td></tr>
			<tr><td><b>AutoFDOStart</b></td>
				<td>AutoFDOStart( void ) : <i>Integer</i><hr>
				    AutoFDOStart( db_prefix <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This function will inspect the Spatial Metadata, then automatically creating/refreshing a <b>VirtualFDO</b>
				wrapper for each FDO/OGR geometry table<hr>
				the return type is Integer [how many VirtualFDO tables have been created]<hr>
				The optional <b>db_prefix</b> argument specifies which one of the ATTACHED databases is intended to be targeted; if unspecified or <b>NULL</b> then 
				the <b>MAIN</b> database will be assumed by default.</td></tr>
			<tr><td><b>AutoFDOStop</b></td>
				<td>AutoFDOStop( void ) : <i>Integer</i><hr>
				    AutoFDOStop( db_prefix <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This function will inspect the Spatial Metadata, then automatically destroying any <b>VirtualFDO</b>
				wrapper found<hr>
				the return type is Integer [how many VirtualFDO tables have been destroyed]<hr>
				the return type is Integer [how many VirtualFDO tables have been created]<hr>
				The optional <b>db_prefix</b> argument specifies which one of the ATTACHED databases is intended to be targeted; if unspecified or <b>NULL</b> then 
				the <b>MAIN</b> database will be assumed by default.</td></tr>
			<tr><td><b>InitFDOSpatialMetaData</b></td>
				<td>InitFDOSpatialMetaData( void ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Creates the <b>geometry_columns</b> and <b>spatial_ref_sys</b> metadata tables<br>
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE<hr>
<u>Please note:</u> Spatial Metadata created using this function will have the FDO/OGR layout, and not the standard SpatiaLite layout</td></tr>
................................................................................
				<li><b>3</b> <i>POLYGON</i></li>
				<li><b>4</b> <i>MULTIPOINT</i></li>
				<li><b>5</b> <i>MULTILINESTRING</i></li>
				<li><b>6</b> <i>MULTIPOLYGON</i></li>
				<li><b>7</b> <i>GEOMETRYCOLLECTION</i></li>
				</ul><b>dimension</b> may be <b>2</b>, <b>3</b> or <b>4</b>, accordingly to OGR/FDO specs<br>
				<b>geometry_format</b> has to be one of the followings:<ul>
				<li>'WKB'</li>
				<li>'WKT'</li>
				<li>'FGF'</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>
			<tr><td><b>RecoverFDOGeometryColumn</b></td>
				<td>RecoverFDOGeometryColumn( table <i>String</i> , column <i>String</i> , srid <i>Integer</i> ,
geom_type <i>String</i> , dimension <i>Integer</i>, geometry_format <i>String</i> ) : <i>Integer</i></td>
................................................................................
				<h3><a name="p16gpkg">SQL functions implementing OGC GeoPackage compatibility</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CheckGeoPackageMetaData</b></td>
				<td>CheckGeoPackageMetaData( void ) : <i>Integer</i><hr>
				    CheckGeoPackageMetaData ( db_prefix <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This function will inspect the DB layout checking if it corresponds to the GPKG own style.<br>
				The optional <b>db_prefix</b> argument specifies which one of the ATTACHED databases is intended to be checked; if unspecified or <b>NULL</b> then 
				the <b>MAIN</b> database will be assumed by default.<hr>
the return type is Integer, with a return value of 1 for TRUE, 0 for FALSE and -1 on invalid args or if no ATTACHED-DB identified by <b>db_prefix</b> exists.</td></tr>
			<tr><td><b>AutoGPKGStart</b></td>
				<td>AutoGPKGStart( void ) : <i>Integer</i><hr>
				    AutoGPKGStart( db_prefix <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>This function will inspect the DB layout, then automatically creating/refreshing a <b>VirtualGPKG</b>
				wrapper for each GPKG geometry table<hr>
				the return type is Integer [how many VirtualGPKG tables have been created]<hr>
				The optional <b>db_prefix</b> argument specifies which one of the ATTACHED databases is intended to be targeted; if unspecified or <b>NULL</b> then 
				the <b>MAIN</b> database will be assumed by default.</td></tr>
			<tr><td><b>AutoGPKGStop</b></td>
				<td>AutoGPKGStop( void ) : <i>Integer</i><hr>
				    AutoGPKGStop( db_prefix <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>This function will inspect the DB layout, then automatically destroying any <b>VirtualGPKG</b>
				wrapper found<hr>
				the return type is Integer [how many VirtualGPKG tables have been destroyed]<hr>
				The optional <b>db_prefix</b> argument specifies which one of the ATTACHED databases is intended to be targeted; if unspecified or <b>NULL</b> then 
				the <b>MAIN</b> database will be assumed by default.</td></tr>
			<tr><td><b>gpkgCreateBaseTables</b></td>
				<td>gpkgCreateBaseTables( void ) : <i>void</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>This function will create base tables for an "empty" GeoPackage<hr>
returns nothing on success, raises exception on error</td></tr>
			<tr><td><b>gpkgInsertEpsgSRID</b></td>
................................................................................
				<li><b>"jpeg"</b> for JPEG</li>
				<li><b>"tiff"</b> for TIFF</li>
				<li><b>"x-webp"</b> for WebP</li>
				</ul>
				These are the mime type for the image format (without the "image/" prefix).<hr>
				This function raises exception on error (e.g. wrong argument type).</td></tr>
			<tr><td><b>gpkgAddGeometryColumn</b></td>
				<td>gpkgAddGeomtryColumn( table_name <i>String</i>, geometry_column_name <i>String</i> , geometry_type <i>String</i> , 
					with_z <i>Integer</i> , with_m <i>Integer</i> , srs_id <i>Integer</i> ) : <i>void</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>Adds a geometry column to the specified table:
				<ul>
					<li><b>geometry_type</b> is a normal WKT name:
						<ul>
................................................................................
                                If the input XmlBLOB is already uncompressed this one is a harmless no-op.<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object).</td></tr>
			<tr><td><b>XB_IsValid</b></td>
				<td>XB_IsValid( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsCompressed</b></td>
				<td>XB_IsCompressed( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsSchemaValidated</b></td>
				<td>XB_IsSchemaValidated( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsIsoMetadata</b></td>
				<td>XB_IsIsoMetadata( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsSldSeVectorStyle</b></td>
				<td>XB_IsSldSeVectorStyle( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsSldSeRasterStyle</b></td>
				<td>XB_IsSldSeRasterStyle( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsSvg</b></td>
				<td>XB_IsSvg( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_IsGpx</b></td>
				<td>XB_IsGpx( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_GetDocumentSize</b></td>
				<td>XB_GetDocumentSize( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the size in bytes of the corresponding uncompressed XmlDocument.<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object).</td></tr>
			<tr><td><b>XB_GetEncoding</b></td>
................................................................................
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object), or when no Abstract is defined.<hr>Supported only on ISO Metadata and SLD/SE Styles.</td></tr>
			<tr><td><b>XB_GetGeometry</b></td>
				<td>XB_GetGeometry( xmlObject <i>XmlBLOB</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the Geometry (Bounding Box) defined within the XmlBLOB (if any).<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object), or when no Bounding Box is defined.<hr>Supported only on ISO Metadata XML Documents.</td></tr>
			<tr><td><b>XB_MLineFromGPX</b></td>
				<td>XB_MLineFromGPX( xmlObject <i>XmlBLOB</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return a Geometry of the <b>MULTILINESTRING XYZM</b> type by parsing an XmlBLOB corresponding to a GPX document.<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object), or when a valid XmlBLOB does not contains a GPX document, or when a valid GPX
				does not contains any <b>&lt;trk&gt;</b> tag.</td></tr>
			<tr><td><b>XB_GetLastParseError</b></td>
				<td>XB_GetLastParseError( <i>void</i> ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the most recent XML parsing error (if any).<hr>
				<b>NULL</b> will be returned if there is no pending parsing error.</td></tr>
			<tr><td><b>XB_GetLastValidateError</b></td>
................................................................................
				<td>Will return the most recent XML validating error (if any).<hr>
				<b>NULL</b> will be returned if there is no pending validating error.</td></tr>
			<tr><td><b>XB_IsValidXPathExpression</b></td>
				<td>XB_IsValidXPathExpression( expr <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					when called with a NULL argument.</td></tr>
			<tr><td><b>XB_GetLastXPathError</b></td>
				<td>XB_GetLastXPathError( <i>void</i> ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the most recent XPath error (if any).<hr>
				<b>NULL</b> will be returned if there is no pending XPath error.</td></tr>
			<tr><td><b>XB_CacheFlush</b></td>
................................................................................
				<h3><a name="srid">SQL functions supporting SRID inspection</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>SridIsGeographic</b></td>
				<td>SridIsGeographic( SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">Will inspect the SRID definitions checking if the SRID is of the <b>Geographic</b> type;<br>
					will return <b>1</b> (i.e. <b>TRUE</b>) or <b>0</b> (i.e. <b>FALSE</b>).<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridIsProjected</b></td>
				<td>SridIsProjected( SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">Will inspect the SRID definitions checking if the SRID is of the <b>Projected</b> type;<br>
					will return <b>1</b> (i.e. <b>TRUE</b>) or <b>0</b> (i.e. <b>FALSE</b>).<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridHasFlippedAxes</b></td>
				<td>SridHasFlippedAxes( SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">Will inspect the SRID definitions checking if the SRID requires a flipped Axes configuration: i.e. <b>Y,X</b> instead of the most usual <b>X,Y</b>;<br>
					will return <b>1</b> (i.e. <b>TRUE</b>) or <b>0</b> (i.e. <b>FALSE</b>).<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridGetSpheroid</b></td>
				<td>SridGetSpheroid( SRID <i>Integer</i> ) : <i>Text</i><hr>
					SridGetEllipsoid( SRID <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">Will inspect the SRID definitions then returning the appropriate <b>Spheroid</b> name.<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridGetPrimeMeridian</b></td>
................................................................................
				<td colspan="3">Will inspect the SRID definitions then returning the appropriate <b>Name</b> for its <b>second</b> axis.<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridGetAxis_2_Orientation</b></td>
				<td>SridGetAxis_2_Orientation( SRID <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">Will inspect the SRID definitions then returning the appropriate <b>Orientation</b> for its <b>second</b> axis.<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="topology">SQL functions supporting Topology-Geometry</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">ISO 13249-3<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>GetLastTopologyException</b></td>
				<td>GetLastTopologyException( toponame <i>Text</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will return the most recent exception raised by this Topo-Geo, or <b>NULL</b> if no exception is currently pending.</td></tr>
			<tr><td><b>CreateTopoTables</b></td>
				<td>CreateTopoTables( ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create both <b>topologies</b> and <b>networks</b> meta-tables.<hr>
					Will return <i>1</i> on success) or <i>0</i> on failure (including already existing tables).</td></tr>
			<tr><td><b>InitTopoGeo</b></td>
				<td>ST_InitTopoGeo( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">This SQL function is explicitly required by <b>ISO 13249-3</b>, anyway it's simply implemented as an <i>alias-name</i> for <b>CreateTopology ( toponame )</b>.<hr>
					Will return <i>1</i> on success) or <i>0</i> on failure: <i>-1</i> will be returned on invalid arguments.</td></tr>
			<tr><td><b>CreateTopology</b></td>
				<td>CreateTopology( toponame <i>Text</i> ) : <i>Integer</i><hr>
				    CreateTopology( toponame <i>Text</i> , srid <i>Integer</i> ) : <i>Integer</i><hr>
				    CreateTopology( toponame <i>Text</i> , srid <i>Integer</i>  , has_z <i>Boolean</i> ) : <i>Integer</i><hr>
				    CreateTopology( toponame <i>Text</i> , srid <i>Integer</i>  , has_z <i>Boolean</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create all DBMS objects (tables, triggers, indices and alike) required in order to store a separate Topo-Geo.
				<ul>
					<li><i>toponame</i>: the individual unique name of this Topo-Geo: all subordinated tables will use it as a prefix.</li>
					<li><i>srid</i>: the Spatial Reference System supporting this Topo-Geo (<b>-1</b> by default).</li>
					<li><i>has_z</i>: if set to <b>TRUE</b> this Topo-Geo will support <b>3D - XYZ</b> coordinates (<b>FALSE</b> by default).</li>
					<li><i>tolerence</i>: the standard tolerance to be applied to this Topo-Geo. (<b>0.0</b> by default, i.e. no tolerance at all).</li>
				</ul>
					Will return <i>1</i> on success), <i>0</i> on failure, <i>-1</i> on invalid args: an exception will be raised while passing a <i>negative</i> tolerance value.</td></tr>
			<tr><td><b>DropTopology</b></td>
				<td>DropTopology( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Completely removes a Topo-Geo (and all data it contains) from the DBMS: to be invoked very cautiously and only if you are absolutely sure of what you are doing.<hr>
					Will return <i>1</i> on success) or <i>0</i> on failure: <i>-1</i> will be returned on invalid arguments.</td></tr>
			<tr><td><b>AddIsoNode</b></td>
				<td>ST_AddIsoNode( toponame <i>Text</i> , face-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will add a new isolated Node; <i>face-id</i> is expected to exactly match the ID of the Face containing <i>point</i>; by passing a 
					<b>NULL face-id</b> the function itself will take care to identify the appropriate Face.<hr>
					Will return the <b>ID</b> of the inserted Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>MoveIsoNode</b></td>
				<td>ST_MoveIsoNode( toponame <i>Text</i> , node-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will move an isolated Node from a point to another.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>RemIsoNode</b></td>
				<td>ST_RemIsoNode( toponame <i>Text</i> , node-id <i>Integer</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove an isolated Node.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>AddIsoEdge</b></td>
				<td>ST_AddIsoEdge( toponame <i>Text</i> , startnode-id <i>Integer</i> , endnode-id <i>Integer</i> , linestring <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will add a new isolated Edge connecting two isolated Nodes.<hr>
					Will return the <b>ID</b> of the inserted Edge on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ChangeEdgeGeom</b></td>
				<td>ST_ChangeEdgeGeom( toponame <i>Text</i> , edge-id <i>Integer</i> , linestring <i>Geometry</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will change the geometry of an Edge without affecting Topology relationships.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>RemIsoEdge</b></td>
				<td>ST_RemIsoEdge( toponame <i>Text</i> , edge-id <i>Integer</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove an isolated Edge.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>NewEdgesSplit</b></td>
				<td>ST_NewEdgesSplit( toponame <i>Text</i> , edge-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will split an Edge by creating a new intermediate Node. The original Edge will be deleted and will be replaced by two new Edges.<hr>
					Will return the <b>ID</b> of the inserted Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ModEdgeSplit</b></td>
				<td>ST_ModEdgeSplit( toponame <i>Text</i> , edge-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will split an Edge by creating a new intermediate Node. The original Edge will be modified and a new Edge will be inserted.<hr>
					Will return the <b>ID</b> of the inserted Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>NewEdgeHeal</b></td>
				<td>ST_NewEdgeHeal( toponame <i>Text</i> , edge1-id <i>Integer</i> , edge2-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will heal two Edges by deleting the Node connecting them. Both the original Edges will be deleted and will be replaced by
					a new Edge preserving the same orientation of the first Edge provided.<hr>
					Will return the <b>ID</b> of the removed Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ModEdgeHeal</b></td>
				<td>ST_ModEdgeHeal( toponame <i>Text</i> , edge1-id <i>Integer</i> , edge2-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will heal two Edges by deleting the Node connecting them. The first Edge provided will be modified and the second deleted.<hr>
					Will return the <b>ID</b> of the removed Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>AddEdgeNewFaces</b></td>
				<td>ST_AddEdgeNewFaces( toponame <i>Text</i> , startnode-id <i>Integer</i> , endnode-id <i>Integer</i> , linestring <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will add a new Edge connecting two Nodes. If this new Edge splits a Face the original Face will be deleted and replaced by two new Faces.<hr>
					Will return the <b>ID</b> of the inserted Edge on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>AddEdgeModFace</b></td>
				<td>ST_AddEdgeModFace( toponame <i>Text</i> , startnode-id <i>Integer</i> , endnode-id <i>Integer</i> , linestring <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will add a new Edge connecting two Nodes. If this new Edge splits a Face the original Face will be modified and a new Face will be inserted.<hr>
					Will return the <b>ID</b> of the inserted Edge on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>RemEdgeNewFace</b></td>
				<td>ST_RemEdgeNewFace( toponame <i>Text</i> , edge-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove an Edge. If the removed Edge separated two Faces the original Faces will be deleted and replaced by a new Face.<hr>
					Will return the <b>ID</b> of the inserted Face on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>RemEdgeModFace</b></td>
				<td>ST_RemEdgeModFace( toponame <i>Text</i> , edge-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove an Edge. If the removed Edge separated two Faces one of then will be modified and the other deleted.<hr>
					Will return the <b>ID</b> of the surviving Face on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>GetFaceGeometry</b></td>
				<td>ST_GetFaceGeometry( toponame <i>Text</i> , face-id <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will return the exact Geometry of a Face.<hr>
					Will return a <b>Polygon</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>GetFaceEdges</b></td>
				<td>ST_GetFaceEdges( toponame <i>Text</i> , face-id <i>Integer</i> ) : <i>DB-table</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will update a DB-Table containing the ordered list of all Edges delimiting the given Face. 
					The orientation will always be counterclockwise, and all Edges traversed in the opposite direction (i.e. from <u>end</u> to <u>start</u>) will be marked by a <b>negative sign</b>.<hr>
					Will return <b>NULL</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ValidateTopoGeo</b></td>
				<td>ST_ValidateTopoGeo( toponame <i>Text</i> ) : <i>DB-table</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create a DB-Table containing a validation report for the given TopoGeo: if the output table is empty and no exception was raised
					the Topology is assumed to be fully valid, otherwise a row will be inserted into the table for each detected Topology invalidity.<br>
					If the destination table already exists it will be dropped and created yet again.<hr>
					Will return <b>NULL</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>CreateTopoGeo</b></td>
				<td>ST_CreateTopoGeo( toponame <i>Text</i> , geometry <i>BLOB</i> )</td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will populate a full Topology by importing a collection of arbitrary Geometries.<br>
					The destination Topology must already exists and must be empty; both SRID and dimensions of input Geometries must match SRID and dimensions declared by Topology.<hr>
					Will return <b>NULL</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>GetNodeByPoint</b></td>
				<td>GetNodeByPoint( toponame <i>Text</i> , point <i>Geometry</i> ) : <i>Integer</i><hr>
				    GetNodeByPoint( toponame <i>Text</i> , point <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to find the ID of a Node located at Point.
				    <ul><li>The optional argument <b>tolerance</b> if omitted will assume the corresponding value declared when creating the target Topology.</li></ul><hr>
					Will return the ID of the Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>GetEdgeByPoint</b></td>
				<td>GetEdgeByPoint( toponame <i>Text</i> , point <i>Geometry</i> ) : <i>Integer</i><hr>
				    GetEdgeByPoint( toponame <i>Text</i> , point <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to find the ID of an Edge intersecting the given Point.
				    <ul><li>The optional argument <b>tolerance</b> if omitted will assume the corresponding value declared when creating the target Topology.</li></ul><hr>
					Will return the ID of the Edge on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>GetFaceByPoint</b></td>
				<td>GetFaceByPoint( toponame <i>Text</i> , point <i>Geometry</i> ) : <i>Integer</i><hr>
				    GetFaceByPoint( toponame <i>Text</i> , point <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to find the ID of a Face intersecting the given Point.
				    <ul><li>The optional argument <b>tolerance</b> if omitted will assume the corresponding value declared when creating the target Topology.</li></ul><hr>
					Will return the ID of the Face on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_AddPoint</b></td>
				<td>TopoGeo_AddPoint( toponame <i>Text</i> , point <i>Geometry</i> ) : <i>Text</i><hr>
				    TopoGeo_AddPoint( toponame <i>Text</i> , point <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to add a <b>Point</b> (or even a <b>MultiPoint</b>) to an already existing Topology, possibly splitting existing Edges.
				    <ul><li>The optional argument <b>tolerance</b> if omitted will assume the corresponding value declared when creating the target Topology.</li></ul><hr>
					Will return a comma separated list of all IDs of corresponding Nodes on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_AddLineString</b></td>
				<td>TopoGeo_AddLineString( toponame <i>Text</i> , linestring <i>Geometry</i> ) : <i>Integer</i><hr>
				    TopoGeo_AddLineString( toponame <i>Text</i> , linestring <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to add a <b>Linestring</b> (or even a <b>MultiLinestring</b>) to an already existing Topology, possibly splitting existing Edges/Faces.
				    <ul><li>The optional argument <b>tolerance</b> if omitted will assume the corresponding value declared when creating the target Topology.</li></ul><hr>
					Will return a comma separated list of all IDs of the corresponding Edges on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_AddLineStringNoFace</b></td>
				<td>TopoGeo_AddLineStringNoFace( toponame <i>Text</i> , linestring <i>Geometry</i> ) : <i>Integer</i><hr>
				    TopoGeo_AddLineStringNoFace( toponame <i>Text</i> , linestring <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Very similar to <b>TopoGeo_AddLinestring</b> except for a very critical difference.
				This function is strongly optimized for maximum speed, and will just update Nodes and Edges purposely ignoring Faces.<br>
				Consequently it will always leave the target Topology in an <i>inconsistent state</i>; only after executing <b>TopoGeo_Polygonize()</b> all Faces will be
				properly restored and the target Topology will finally resume a consistent state.
				    <ul><li>The optional argument <b>tolerance</b> if omitted will assume the corresponding value declared when creating the target Topology.</li></ul><hr>
					Will return a comma separated list of all IDs of the corresponding Edges on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_TopoSnap</b></td>
				<td>TopoGeo_TopoSnap( toponame <i>Text</i> , input <i>Geometry</i> , iterate <i>Integer</i> ) : <i>Geometry</i><hr>
				    TopoGeo_TopoSnap( toponame <i>Text</i> , input <i>Geometry</i> , tolerance_snap <i>Double precision</i>  , tolerance_removal <i>Double precision</i> , iterate <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to snap (i.e. renode) the <i>input</i> Geometry (any type) against the Topology identified by <i>toponame</i>.
					<ul>
						<li>the arguments <b>iterate</b> is intended to be Boolean (<b>0</b> = <b>FALSE</b>, any other value = <b>TRUE</b>);
						    when set to <b>TRUE</b> the input Geometry will be iteratively processed until no more snaps are found.</li>
						<li>The optional argument <b>tolerance_snap</b> if omitted will assume the corresponding value declared when creating the target Topology.</li>
						<li>The optional argument <b>tolerance_removal</b> if omitted (or set to <b>NULL</b>) will suppress the removal phase.</li>
					</ul><hr>
					Will return a snapped Geometry on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_SnappedGeoTable</b></td>
				<td>TopoGeo_SnappedGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , output-table <i>Text</i> ,
				    iterate <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_SnappedGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , output-table <i>Text</i> ,
				    tolerance_snap <i>Double precision</i> , tolerance_removal <i>Double precision</i> , iterate <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to create and populate an <i>output-table</i> by snapping against the Topology identified by <i>toponame</i> all Geometries 
				    from an input GeoTable identified by <i>db-prefix</i>, <i>table-name</i> and <i>column-name</i>.
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the input GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the input GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
						<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.</li>
						<li>argument <b>iterate</b>, <b>tolerance_snap</b> and <b>tolerance_removal</b> will be interpreted exactly in the same way adopted by <b>TopoGeo_TopoSnap()</b>.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_SubdivideLines</b></td>
				<td>TopoGeo_SubdivideLines( input <i>Geometry</i> , line_max_points <i>Integer</i> ) : <i>MultiLinestring</i><hr>
				    TopoGeo_SubdivideLines( input <i>Geometry</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> ) : <i>MultiLinestring</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to split a <b>Linestring</b> (or even a <b>MultiLinestring</b>) into a collection 
					of shorter LineStrings fully respecting Topology consistency.
					<ul>
						<li>if argument <i>line_max_points</i> is set to a <u>positive</u> value (<b>&gt;= 2</b>) then all input Linestrings will be split into many
						shorter lines having no more than the required number of points.</li>
						<li>if argument <i>line_max_length</i> is set to a <u>positive</u> value, in units of the SRID, then a separate output line will be split every time
						that it becomes longer than the allowed limit.</li>
						<li>either <i>line_max_point</i> and <i>line_max_length</i> can assume a <b>NULL</b> value, this intending <u>ignore</u>.</li>
						<li>if both <i>line_max_point</i> and <i>line_max_length</i> are active at the same time then the first limit encountered will apply.</li>
						<li>in any other case all input Linestrings will be simply copied into the output collection exactly as they are.</li>
					</ul><hr>
					Will return a <b>MultiLinestring</b> Geometry on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_FromGeoTable</b></td>
				<td>TopoGeo_FromGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , line_max_points <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , line_max_points <i>Integer</i> , 
				    line_max_length <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , line_max_points <i>Integer</i> , 
				    line_max_length <i>Double precision</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to import all Geometries from an input GeoTable identified by <i>db-prefix</i>, <i>table-name</i> and <i>column-name</i> into an already existing Topology-Geometry.
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the input GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the input GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
						<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.</li>
						<li>The optional arguments <i>line_max_points</i> and <i>line_max_length</i> will be interpreted in the same way adopted by <b>TopoGeo_SubdivideLines()</b> 
						(default for both: <b>NULL</b>, this meaning <u>ignore</u>).</li>
				        <li>The optional argument <i>tolerance</i> if omitted will assume the corresponding value declared when creating the target Topology.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_FromGeoTableNoFace</b></td>
				<td>TopoGeo_FromGeoTableNoFace( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableNoFace( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , line_max_points <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableNoFace( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , line_max_points <i>Integer</i> , 
				    line_max_length <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableNoFace( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , line_max_points <i>Integer</i> , 
				    line_max_length <i>Double precision</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Very similar to <b>TopoGeo_FromGeoTable</b> except for a very critical difference.
				This function is strongly optimized for maximum speed, and will just update Nodes and Edges purposely ignoring Faces.<br>
				Consequently it will always leave the target Topology in an <i>inconsistent state</i>; only after executing <b>TopoGeo_Polygonize()</b> all Faces will be
				properly restored and the target Topology will finally resume a consistent state.<hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_FromGeoTableExt</b></td>
				<td>TopoGeo_FromGeoTableExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> , line_max_points <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to import all Geometries from an input GeoTable identified by <i>db-prefix</i>, <i>table-name</i> and <i>column-name</i> into an already existing Topology-Geometry.
				    When some Topology expection is encounterd this function will never stop: the Primary Key corresponding to the failing feature will be saved into the <i>dustbin-table</i>,
				    and the loading process will restart from the next feature until all input features will be consumed. 
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the input GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the input GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>the input GeoTable is absolutely required to declare a <b>Primary Key</b>.</li>
						<li>this function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
						<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.</li>
						<li><i>dustbin-table</i> is the name of the table intended to store PK values corresponding to features failing to be imported; this table should not already exist
						and will be automatically created by the function itself.</li>
						<li><i>dustbin-view</i> is the name of the Spatial View supporting the above table; this view should not already exist
						and will be automatically created by the function itself.<br>
						<u>Note</u>: both the <i>dustbin-table</i> and the <i>dustbin-view</i> will be always created on the same DB containing the input GeoTable.</li>
						<li>The optional arguments <i>line_max_points</i> and <i>line_max_length</i> will be interpreted in the same way adopted by <b>TopoGeo_SubdivideLines()</b> 
						(default for both: <b>NULL</b>, this meaning <u>ignore</u>).</li>
				        <li>The optional argument <i>tolerance</i> if omitted will assume the corresponding value declared when creating the target Topology.</li>
					</ul><hr>
					Will return <b>0</b> on full success or a <b>positive</b> integer corresponding to the total count of failing features referenced by the <i>dustbin</i> table.<br>
					An exception will be raised only on wrong arguments.</td></tr>
			<tr><td><b>TopoGeo_FromGeoTableNoFaceExt</b></td>
				<td>TopoGeo_FromGeoTableNoFaceExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableNoFaceExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> , line_max_points <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableNoFaceExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoGeo_FromGeoTableNoFaceExt( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> , dustbin-table <i>Text</i> , 
				    dustbin-view <i>Text</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Very similar to <b>TopoGeo_FromGeoTableExt</b> except for a very critical difference.
				This function is strongly optimized for maximum speed, and will just update Nodes and Edges purposely ignoring Faces.<br>
				Consequently it will always leave the target Topology in an <i>inconsistent state</i>; only after executing <b>TopoGeo_Polygonize()</b> all Faces will be
				properly restored and the target Topology will finally resume a consistent state.<hr>
					Will return <b>0</b> on full success or a <b>positive</b> integer corresponding to the total count of failing features referenced by the <i>dustbin</i> table.<br>
					An exception will be raised only on wrong arguments.</td></tr>
			<tr><td><b>TopoGeo_Polygonize</b></td>
				<td>TopoGeo_Polygonize( toponame <i>Text</i> )<hr>
				    TopoGeo_Polygonize( toponame <i>Text</i> , force_rebuild <i>Boolean</i> )</td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove all existing Faces from a Topology then rebuilding all them by scratch.
				<ul>
					<li>If the Topology already is in a fully consistent state (i.e. all Edges are found to be assigned to their corresponding Faces) the function will immediately return 
					whithout taking any action.</li>
					<li>If the Topology is in an inconsistent state (i.e. some Edges are found lacking their corresponding Faces (preasumably due to previous calls to <b>TopoGeo_AddLinesStringNoFace</b>,
					<b>TopoGeo_FromGeoTableNoFace</b> and/or <b>TopoGeo_FromGeoTableNoFaceExt</b>) the function will effectively rebuild all Faces from scratch.</li>
					<li>If the optional argument <i>force_rebuild</i> is set to <b>TRUE</b> (not <b>0</b>) all Faces will be unconditionally rebuilt.</li>
				</ul>
				<i>Caveat</i>: for efficiency/speed reasons this function requires a substantial amount of available RAM: any attempt to process a very
				huge Topology on a platform supporting a very limited amount of RAM will probably fail due to <b>insufficient memory</b> errors.<hr>
					Will return <b>NULL</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_RemoveSmallFaces</b></td>
				<td>TopoGeo_RemoveSmallFaces( toponame <i>Text</i> , min-circularity <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoGeo_RemoveSmallFaces( toponame <i>Text</i> , min-circularity <i>Double precision</i> , min-area <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove from the given Topology all Faces presenting <b>both</b> a Circularity index smaller than <i>min-circularity</i> <b>and</b> an area smaller than <i>min-area</i>.
				    <ul>
						<li>for a formal definition of the Circularity index please see <a href="#circularity">Circularity()</a></li>
						<li>the Circularity index ranges between <i>1.0</i> and <i>0.0</i>, so setting <b>min-circularity</b> to a value equal or greater than <i>1.0</i> will implicitly disable the
						    corresponding check.</li>
						<li>the <i>optional</i> argument <b>min-area</b> if not specified will assume a <i>0.0</i> value thus implicitly disabling the corresponding check.</li>
				    </ul><hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_RemoveDanglingEdges</b></td>
				<td>TopoGeo_RemoveDanglingEdges( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove from the given Topology all dangling Edges.<hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_RemoveDanglingNodes</b></td>
				<td>TopoGeo_RemoveDanglingNodes( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove from the given Topology all dangling Nodes.<hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_NewEdgeHeal</b></td>
				<td>TopoGeo_NewEdgeHeal( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove from the given Topology all unnecessary Nodes.<br>
				    An unnecessary Node is one connected to exactly two Edges whilst both Edges share the same two Faces; it's obvious that such a Node could be safely removed giving birth to a single Edge
				    without altering in any way the Topological self-consistency.<br>
				    All unnecessary Nodes identified by this function will be removed by implicitly calling <b>ST_NewEdgeHeal()</b><hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_ModEdgeHeal</b></td>
				<td>TopoGeo_ModEdgeHeal( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove from the given Topology all unnecessary Nodes.<br>
				    An unnecessary Node is one connected to exactly two Edges whilst both Edges share the same two Faces; it's obvious that such a Node could be safely removed giving birth to a single Edge
				    without altering in any way the Topological self-consistency.<br>
				    All unnecessary Nodes identified by this function will be removed by implicitly calling <b>ST_ModEdgeHeal()</b><hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_NewEdgesSplit</b></td>
				<td>TopoGeo_NewEdgesSplit( toponame <i>Text</i> , line_max_points <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_NewEdgesSplit( toponame <i>Text</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to split all <i>Edges</i> into a collection of shorter Edges fully respecting Topology consistency.<br>
					The interpretation of <b>line_max_points</b> and <b>line_max_lenght</b> arguments is the same adopted by <b>TopoGeo_SubdivideLines()</b><br>
				    Edges and Nodes will be handled by implicitly calling <b>ST_NewEdgesSplit()</b><hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_ModEdgeSplit</b></td>
				<td>TopoGeo_ModEdgeSplit( toponame <i>Text</i> , line_max_points <i>Integer</i> ) : <i>Integer</i><hr>
				    TopoGeo_ModEdgeSplit( toponame <i>Text</i> , line_max_points <i>Integer</i> , line_max_length <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to split all <i>Edges</i> into a collection of shorter Edges fully respecting Topology consistency.<br>
					The interpretation of <b>line_max_points</b> and <b>line_max_lenght</b> arguments is the same adopted by <b>TopoGeo_SubdivideLines()</b><br>
				    Edges and Nodes will be handled by implicitly calling <b>ST_ModEdgeSplit()</b><hr>
					Will return <b>1</b> on full success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_Clone</b></td>
				<td>TopoGeo_Clone( toponame <i>Text</i> , new-toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will clone an existing Topology into another; the destionation Topology shall not exist and will be automatically created.<hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_GetEdgeSeed</b></td>
				<td>TopoGeo_GetEdgeSeed( toponame <i>Text</i> , edge-id <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will return a Point Geometry uniquely identifying an Edge (i.e. spatially intersecting the Edge).<hr>
					Will return a <b>Point</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_GetFaceSeed</b></td>
				<td>TopoGeo_GetFaceSeed( toponame <i>Text</i> , face-id <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will return a Point Geometry uniquely identifying a Face (i.e. spatially intersecting the Face).<hr>
					Will return a <b>Point</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_SnapPointToSeed</b></td>
				<td>TopoGeo_SnapPointToSeed( point <i>Geometry</i> , toponame <i>Text</i> , distance <i>Double</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will possibly return a new <b>Point</b> precisely snapped to the nearset TopoNode within the given <b>distance</b>; if no such TopoNode exists <b>NULL</b> will be returned.<br>
				An exception will be raised on invalid arguments.</td></tr>
			<tr><td><b>TopoGeo_SnapLineToSeed</b></td>
				<td>TopoGeo_SnapLineToSeed( line <i>Geometry</i> , toponame <i>Text</i> , distance <i>Double</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will possibly return a new <b>Linestring</b> precisely snapped to the nearset Edge TopoSeed within the given <b>distance</b>; if no such TopoSeed exists <b>NULL</b> will be returned.<br>
				An exception will be raised on invalid arguments.</td></tr>
			<tr><td><b>TopoGeo_DisambiguateSegmentEdges</b></td>
				<td>TopoGeo_DisambiguateSegmentEdges( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Ensures that all Edges on a Topology-Geometry will have not less than three vertices.
					<ul>
						<li>all Edges found already definining three or more vertices will be left untouched as they are.</li>
						<li>all Edges found simply being a two-points segment will be changed by interpolating a third intermediate vertex.</li>
						<li>this function is harmless (doesn't substantially alters the Topology in any way) and ensures that all <b>Seeds</b> will certainly be not ambiguous.</li>
					</ul>
					Will return the total number of changed Edges on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_UpdateSeeds</b></td>
				<td>TopoGeo_UpdateSeeds( toponame <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_UpdateSeeds( toponame <i>Text</i> , incremental-mode <i>Integer</i> ) : <i>Integer</i> </td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will update all persistent Edge- and Face-Seeds so to correctly represent the current state of the underlying Topology.
					<ul>
						<li>if the optional argument <i>incremental-mode</i> is set to TRUE an incremental update (faster) will be applied,
						otherwise all persistent Seeds will be rebuilt from scratch (slower).</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_PolyFacesList</b></td>
				<td>TopoGeo_PolyFacesList( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to export into an output Table all relationships between the Faces of some Topology-Geometry and Polygons/Multipolygons found within a given
				    Reference-GeoTable. 
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>ref-column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the reference GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function accepts input Geometries only of the <b>Polygon</b> or <b>MultiPolygon</b> types.</li>
						<li>the output Table will be always located on the <b>"MAIN"</b> DB and must not exists; it will be automatically created.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_LineEdgesList</b></td>
				<td>TopoGeo_LineEdgesList( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to export into an output Table all relationships between the Edges of some Topology-Geometry and Linestrings/Multilinestrings found within a given
				    Reference-GeoTable. 
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>ref-column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the reference GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function accepts input Geometries only of the <b>Linestring</b> or <b>MultiLinestring</b> types.</li>
						<li>the output Table will be always located on the <b>"MAIN"</b> DB and must not exists; it will be automatically created.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_ToGeoTable</b></td>
				<td>TopoGeo_ToGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_ToGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> , with-spatial-index <i>Boolenan</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to export into an Output GeoTable all Geometries out from a Topology-Geometry matching (via Seed-based references) a given
				    Reference-GeoTable containing information attributes. 
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>ref-column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the reference GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
						<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.</li>
						<li>the output GeoTable will be always located on the <b>"MAIN"</b> DB and must not exists; it will be automatically created with the same identical
						    attributes of the reference GeoTable.</li>
						<li>all spatial features found into the reference GeoTable will be copied into the output GeoTable. All information attributes will be preserved
						    exactly as they are, and the feature's Geometry will be built by aggregating all Topology objects matching the reference Geometry by Seed correspondences.<br>
						    If no matching Topology objectes are found the result will be a <b>NULL</b> output Geometry.</li>
						<li><i><u>Please note</u></i>: this function will automatically invoke <b>TopoGeo_UpdateSeeds()</b> (<i>incremental mode</i>).</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_ToGeoTableGeneralize</b></td>
				<td>TopoGeo_ToGeoTableGeneralize( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> , tolerance <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoGeo_ToGeoTableGeneralize( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> , tolerance <i>Double precision</i> , with-spatial-index <i>Boolean</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Exactly the same as <b>TopoGeo_ToGeoTable()</b> except in that all exported geometries will be simplified / generalized still maintaining full topological consistency. 
					<ul>
						<li><i>tolerance</i> represents the approximation radius required by the Douglas-Peuker simplification algorithm.<br>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_CreateTopoLayer</b></td>
				<td>TopoGeo_CreateTopoLayer( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, topolayer-name <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_CreateTopoLayer( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, topolayer-name <i>Text</i> , is-view <i>Boolean</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create a fully defined new <b>TopoLayer</b> starting from a reference GeoTable:
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>ref-column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the reference GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function accepts input Geometries of any class: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
						<b>Polygon</b>, <b>MultiPolygon</b>, <b>GeometryCollection</b> and <b>Geometry</b>.</li>
						<li>if the optional boolean argument <b>is-view</b> is set to <b>TRUE</b> (any other value different from zero) then a View or a Table containing a unregistered Geometry column will
						    be accepted (<b>FALSE</b> by default).<br>
						    In this case <b>ref-column</b> must be always explicitly defined, and must contain all Geometries matching both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_InitTopoLayer</b></td>
				<td>TopoGeo_InitTopoLayer( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , topolayer-name <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will initialize a partialy defined new <b>TopoLayer</b> starting from a reference plain Table or View:
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference Table or View is expected to be located within the <b>"MAIN"</b> database.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_RemoveTopoLayer</b></td>
				<td>TopoGeo_RemoveTopoLayer( toponame <i>Text</i> , topolayer-name <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will completely remove an existing <b>TopoLayer</b>.<hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_ExportTopoLayer</b></td>
				<td>TopoGeo_ExportTopoLayer( toponame <i>Text</i> , topolayer-name <i>Text</i> , out-table <i>Text</i> ) : <i>Integer</i><hr>
				    TopoGeo_ExportTopoLayer( toponame <i>Text</i> , topolayer-name <i>Text</i> , out-table <i>Text</i> , with-spatial-index <i>Boolean</i> ) : <i>Integer</i><hr>
				    TopoGeo_ExportTopoLayer( toponame <i>Text</i> , topolayer-name <i>Text</i> , out-table <i>Text</i> , with-spatial-index <i>Boolean</i> , create-only <i>Boolean</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create and populate a GeoTable corresponding to a <b>TopoLayer</b>.
					<ul>
						<li>if the optional boolean argument <b>with-spatial-index</b> is set to <b>TRUE</b> (any other value different from zero) then a <b>Spatial Index</b> supporting
						the output GeoTable will be automatically created (<b>FALSE</b> by default).</li>
						<li>if the optional boolean argument <b>create-only</b> is set to <b>TRUE</b> (any other value different from zero) then the output GeoTable will be created 
						but will not be populated thus remaining completely empty (<b>FALSE</b> by default).</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoGeo_InsertFeatureFromTopoLayer</b></td>
				<td>TopoGeo_InsertFeatureFrom( toponame <i>Text</i> , topolayer-name <i>Text</i> , out-table <i>Text</i> , fid <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will inserting a single TopoFeature identified by is <b>fid</b> into a GeoTable corresponding to a <b>TopoLayer</b>.
					<ul>
						<li>the output GeoTable must exist and is expected to be created by a previous call to <b>TopoGeo_ExportTopoLayer()</b>.</li>
						<li>the TopoFeature identified by <b>fid</b> must exist and a corresponding row must not be already inserted into the output GeoTable.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="network">SQL functions supporting Topology-Network</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">ISO 13249-3<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>GetLastNetworkException</b></td>
				<td>GetLastNetworkException( netname <i>Text</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will return the most recent exception raised by this Topo-Net, or <b>NULL</b> if no exception is currently pending.</td></tr>
			<tr><td><b>InitTopoNet</b></td>
				<td>ST_InitTopoNet( netname <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">This SQL function is explicitly required by <b>ISO 13249-3</b>, anyway it's simply implemented as an <i>alias-name</i> for <b>CreateNetwork ( netname )</b>.<hr>
					Will return <i>1</i> on success) or <i>0</i> on failure: <i>-1</i> will be returned on invalid arguments.</td></tr>
			<tr><td><b>CreateNetwork</b></td>
				<td>CreateNetwork( netname <i>Text</i> ) : <i>Integer</i><hr>
				    CreateNetwork( netname <i>Text</i> , spatial <i>Boolean</i> ) : <i>Integer</i><hr>
				    CreateNetwork( netname <i>Text</i> , spatial <i>Boolean</i> , srid <i>Integer</i> ) : <i>Integer</i><hr>
				    CreateNetwork( netname <i>Text</i> , spatial <i>Boolean</i> , srid <i>Integer</i> , has_z <i>Boolean</i> ) : <i>Integer</i><hr>
				    CreateNetwork( netname <i>Text</i> , spatial <i>Boolean</i> , srid <i>Integer</i> , has_z <i>Boolean</i> , allow_coincident <i>Boolean</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create all DBMS objects (tables, triggers, indices and alike) required in order to store a separate Topo-Net.
				<ul>
					<li><i>netname</i>: the individual unique name of this Topo-Net: all subordinated tables will use it as a prefix.</li>
					<li><i>spatial</i>: if set to <b>TRUE</b> this Topo-Net will be considered a <b>Spatial-Network</b>, otherwise a <b>Logical-Network</b> will be assumed (<b>FALSE</b> by default).</li>
					<li><i>srid</i>: the Spatial Reference System supporting this Topo-Net (<b>-1</b> by default).</li>
					<li><i>has_z</i>: if set to <b>TRUE</b> this Topo-Net will support <b>3D - XYZ</b> coordinates (<b>FALSE</b> by default).</li>
					<li><i>allow_coincident</i>: if set to <b>FALSE</b> all <u>Node-on-Node</u>, <u>Link-on-Node</u> or <u>Node-on-Link</u> conditions will raise an exception (<b>TRUE</b> by default).</li>
				</ul>
					Will return <i>1</i> on success), <i>0</i> on failure, <i>-1</i> on invalid arguments.</td></tr>
			<tr><td><b>DropNetwork</b></td>
				<td>DropNetwork( netname <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Completely removes a Topo-Net (and all data it contains) from the DBMS: to be invoked very cautiously and only if you are absolutely sure of what you are doing.<hr>
					Will return <i>1</i> on success) or <i>0</i> on failure: <i>-1</i> will be returned on invalid arguments.</td></tr>
			<tr><td><b>AddIsoNetNode</b></td>
				<td>ST_AddIsoNetNode( netname <i>Text</i> , point <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will add a new isolated NetNode.<hr>
					Will return the <b>ID</b> of the inserted NetNode on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>MoveIsoNetNode</b></td>
				<td>ST_MoveIsoNetNode( netname <i>Text</i> , node-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will move an isolated NetNode from a point to another.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>RemIsoNetNode</b></td>
				<td>ST_RemIsoNetNode( netname <i>Text</i> , node-id <i>Integer</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove an isolated NetNode.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>AddLink</b></td>
				<td>ST_AddLink( netname <i>Text</i> , startnode-id <i>Integer</i> , endnode-id <i>Integer</i> , linestring <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will add a new Link connecting two NetNodes.<hr>
					Will return the <b>ID</b> of the inserted Link on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ChangeLinkGeom</b></td>
				<td>ST_ChangeLinkGeom( netname <i>Text</i> , link-id <i>Integer</i> , linestring <i>Geometry</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will change the geometry of a Link without affecting Topology relationships.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>RemoveLink</b></td>
				<td>ST_RemoveLink( netname <i>Text</i> , link-id <i>Integer</i> ) : <i>Text</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will remove a Link.<hr>
					Will return a <b>text message</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>NewLogLinkSplit</b></td>
				<td>ST_NewLogLinkSplit( netname <i>Text</i> , link-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will split a Link (of the <u>Logical</u> type) by creating a new intermediate NetNode. The original Link will be deleted and will be replaced by two new Links.<hr>
					Will return the <b>ID</b> of the inserted Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ModLogLinkSplit</b></td>
				<td>ST_ModLogLingSplit( netname <i>Text</i> , link-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will split a Link (of the <u>Logical</u> type) by creating a new intermediate NetNode. The original Link will be modified and a new Link will be inserted.<hr>
					Will return the <b>ID</b> of the inserted Node on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>NewGeoLinkSplit</b></td>
				<td>ST_NewGeoLinkSplit( netame <i>Text</i> , link-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will split a Link (of the <u>Spatial</u> type) by creating a new intermediate NetNode. The original Link will be deleted and will be replaced by two new Links.<hr>
					Will return the <b>ID</b> of the inserted NetNode on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ModGeoLinkSplit</b></td>
				<td>ST_ModGeoLingSplit( netame <i>Text</i> , link-id <i>Integer</i> , point <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will split a Link (of the <u>Spatial</u> type) by creating a new intermediate NetNode. The original Link will be modified and a new Link will be inserted.<hr>
					Will return the <b>ID</b> of the inserted NetNode on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>NewLinkHeal</b></td>
				<td>ST_NewLinkHeal( netname <i>Text</i> , link1-id <i>Integer</i> , link2-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will heal two Links by deleting the NetNode connecting them. Both the original Links will be deleted and will be replaced by
					a new Link preserving the same orientation of the first Link provided.<hr>
					Will return the <b>ID</b> of the removed NetNode on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ModLinkHeal</b></td>
				<td>ST_ModLinkHeal( netname <i>Text</i> , link1-id <i>Integer</i> , link2-id <i>Integer</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will heal two Links by deleting the NetNode connecting them. The first Link provided will be modified and the second deleted.<hr>
					Will return the <b>ID</b> of the removed NetNode on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>LogiNetFromTGeo</b></td>
				<td>ST_LogiNetFromTGeo( netname <i>Text</i> , toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create a <b>Logical Topology-Network</b> from an existing <b>Topology-Geometry</b>.<br>
					The destination <i>TopoNet</i> is expected to exist and to be completely empty.<hr>
					Will return <b>1</b> on success; an exception will be raised on failure.<br>
					Calling this function on behalf of some Network of the Spatial type will raise an exception.</td></tr>
			<tr><td><b>SpatNetFromTGeo</b></td>
				<td>ST_SpatNetFromTGeo( netname <i>Text</i> , toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create a <b>Spatial Topology-Network</b> from an existing <b>Topology-Geometry</b>.<br>
					The destination <i>TopoNet</i> is expected to exist and to be completely empty.<hr>
					Will return <b>1</b> on success; an exception will be raised on failure.<br>
					Calling this function on behalf of some Network of the Logical type will raise an exception; both the <i>TopoNet</i>
					and the <i>TopoGeo</i> are expected to declared the same identical <b>SRID</b> and <b>dimensions</b> (<i>2D</i> or <i>3D</i>),
					otherwise an exception will be raised.</td></tr>
			<tr><td><b>SpatNetFromGeom</b></td>
				<td>ST_SpatNetFromGeom( netname <i>Text</i> , geometry <i>BLOB</i> )</td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will populate a full Network by importing a collection of arbitrary Geometries.<br>
					The destination Network must already exists and must be empty; both SRID and dimensions of input Geometries must match SRID and dimensions declared by Network.<br>
					Calling this function on behalf of some Network of the Logical type will raise an exception<hr>
					Will return <b>NULL</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>ValidLogicalNet</b></td>
				<td>ST_ValidLogicalNet( netname <i>Text</i> ) : <i>DB-table</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create a DB-Table containing a validation report for the given TopoNet of the Logical type: if the output table is empty and no exception was raised
					the Network is assumed to be fully valid, otherwise a row will be inserted into the table for each detected Topology invalidity.<br>
					If the destination table already exists it will be dropped and created yet again.<hr>
					Will return <b>NULL</b> on success; an exception will be raised on failure.<br>
					Calling this function on behalf of some Network of the Spatial type will raise an exception.</td></tr>
			<tr><td><b>ValidSpatialNet</b></td>
				<td>ST_ValidSpatialNet( netname <i>Text</i> ) : <i>DB-table</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will create a DB-Table containing a validation report for the given TopoNet of the Spatial type: if the output table is empty and no exception was raised
					the Network is assumed to be fully valid, otherwise a row will be inserted into the table for each detected Topology invalidity.<br>
					If the destination table already exists it will be dropped and created yet again.<hr>
					Will return <b>NULL</b> on success; an exception will be raised on failure.<br>
					Calling this function on behalf of some Network of the Logical type will raise an exception.</td></tr>
			<tr><td><b>GetNetNodeByPoint</b></td>
				<td>GetNetNodeByPoint( netname <i>Text</i> , point <i>Geometry</i> ) : <i>Integer</i><hr>
				    GetNetNodeByPoint( netname <i>Text</i> , point <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to find the ID of a NetNode located at Point.
				    <ul><li>The optional argument <i>tolerance</i> if omitted will imply an exact coincidence (<b>0.0</b> by default).</li></ul><hr>
					Will return the ID of the NetNode on success; an exception will be raised on failure.<br>
					<b>Note</b>: this function cannot be applied to a <i>Logical Network</i></td></tr>
			<tr><td><b>GetLinkByPoint</b></td>
				<td>GetLinkByPoint( netname <i>Text</i> , point <i>Geometry</i> ) : <i>Integer</i><hr>
				    GetLinkByPoint( netname <i>Text</i> , point <i>Geometry</i> , tolerance <i>Double precision</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to find the ID of a Link intersecting the given Point.
				    <ul><li>The optional argument <i>tolerance</i> if omitted will imply an exact coincidence (<b>0.0</b> by default).</li></ul><hr>
					Will return the ID of the Link on success; an exception will be raised on failure.<br>
					<b>Note</b>: this function cannot be applied to a <i>Logical Network</i></td></tr>
			<tr><td><b>TopoNet_FromGeoTable</b></td>
				<td>TopoNet_FromGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , table-name <i>Text</i> , column-name <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to import all Geometries from an input GeoTable identified by <i>db-prefix</i>, <i>table-name</i> and <i>column-name</i> into an already existing Topology-Network.
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the input GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the input GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Topology.</li>
						<li>this function only accepts input Geometries of the <b>Linestring</b> or <b>MultiLinestring</b> classes.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_Clone</b></td>
				<td>TopoNet_Clone( netname <i>Text</i> , new-netname <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will clone an existing Network into another; the destionation Network shall not exist and will be automatically created.<hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_GetLinkSeed</b></td>
				<td>TopoNet_GetLinkSeed( netname <i>Text</i> , link-id <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will return a Point Geometry uniquely identifying a Link (i.e. spatially intersecting the Link).<hr>
					Will return a <b>Point</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_DisambiguateSegmentLinks</b></td>
				<td>TopoNet_DisambiguateSegmentLinks( toponame <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Ensures that all Links on a Topology-Network will have not less than three vertices.
					<ul>
						<li>all Links found already definining three or more vertices will be left untouched as they are.</li>
						<li>all Links found simply being a two-points segment will be changed by interpolating a third intermediate vertex.</li>
						<li>this function is harmless (doesn't substantially alters the Network in any way) and ensures that all <b>Seeds</b> will certainly be not ambiguous.</li>
					</ul>
					Will return the total number of changed Links on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_UpdateSeeds</b></td>
				<td>TopoNet_UpdateSeeds( netname <i>Text</i> ) : <i>Integer</i><hr>
				    TopoNet_UpdateSeeds( netname <i>Text</i> , incremental-mode <i>Integer</i> ) : <i>Integer</i> </td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPOM</td>
				<td colspan="3">Will update all persistent Link-Seeds so to correctly represent the current state of the underlying Network.
					<ul>
						<li>if the optional argument <i>incremental-mode</i> is set to TRUE an incremental update (faster) will be applied,
						otherwise all persistent Seeds will be rebuilt from scratch (slower).</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_LineLinksList</b></td>
				<td>TopoNet_LineLinksList( netname <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to export into an output Table all relationships between the Links of some Topology-Network and Linestrings/Multilinestrings found within a given
				    Reference-GeoTable. 
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>ref-column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the reference GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Network.</li>
						<li>this function accepts input Geometries only of the <b>Linestring</b> or <b>MultiLinestring</b> types.</li>
						<li>the output Table will be always located on the <b>"MAIN"</b> DB and must not exists; it will be automatically created.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_ToGeoTable</b></td>
				<td>TopoNet_ToGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> ) : <i>Integer</i><hr>
				    TopoNet_ToGeoTable( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> , with-spatial-index <i>Boolean</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Will attempt to export into an Output GeoTable all Geometries out from a Topology-Network matching (via Seed-based references) a given
				    Reference-GeoTable containing information attributes. 
					<ul>
						<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the reference GeoTable is expected to be located within the <b>"MAIN"</b> database.</li>
						<li><i>ref-column-name</i> too can be <b>NULL</b>, and in this case the name of the column containing Geometries will be automatically retrieved;
						if <b>"db"."table"</b> does not contains any Geometry column, or if it contains two or more Geometries an exception will be raised.</li>
						<li>the reference GeoTable must be properly registered and must match both <b>SRID</b> and <b>dimensions</b> declared by the target Network.</li>
						<li>this function accepts input Geometries of the following classes: <b>Point</b>, <b>MultiPoint</b>, <b>Linestring</b>, <b>MultiLinestring</b>,
						<b>GeometryCollection</b> and <b>Geometry</b>.<br>
						All areal Geometries (<i>Polygon</i>, <i>MultiPolygon</i>) will be always ignored.</li>
						<li>the output GeoTable will be always located on the <b>"MAIN"</b> DB and must not exists; it will be automatically created with the same identical
						    attributes of the reference GeoTable.</li>
						<li>all spatial features found into the reference GeoTable will be copied into the output GeoTable. All information attributes will be preserved
						    exactly as they are, and the feature's Geometry will be built by aggregating all Topology objects matching the reference Geometry by Seed correspondences.<br>
						    If no matching Topology objectes are found the result will be a <b>NULL</b> output Geometry.</li>
						<li><i><u>Please note</u></i>: this function will automatically invoke <b>TopoNet_UpdateSeeds()</b> (<i>incremental mode</i>).</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td><b>TopoNet_ToGeoTableGeneralize</b></td>
				<td>TopoNet_ToGeoTableGeneralize( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> , tolerance <i>Double precision</i> ) : <i>Integer</i><hr>
				    TopoNet_ToGeoTableGeneralize( toponame <i>Text</i> , db-prefix <i>Text</i> , ref-table-name <i>Text</i> , ref-column-name <i>Text</i>, out-table <i>Text</i> , tolerance <i>Double precision</i> , with-spatial-index <i>Boolean</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0"></td>
				<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
				<td colspan="3">Exactly the same as <b>TopoNet_ToGeoTable()</b> except in that all exported geometries will be simplified / generalized still maintaining full topological consistency. 
					<ul>
						<li><i>tolerance</i> represents the approximation radius required by the Douglas-Peuker simplification algorithm.</li>
					</ul><hr>
					Will return <b>1</b> on success; an exception will be raised on failure.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="wms">SQL functions supporting WMS datasources</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>WMS_CreateTables</b></td>
				<td>WMS_CreateTables() : <i>Integer</i></td>
				<td colspan="3">Creates all DB Tables required for permanently egistering WMS datasources and their configurations.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure.</td></tr>
			<tr><td><b>WMS_RegisterGetCapabilities</b></td>
				<td>WMS_RegisterGetCapabilities( url <i>Text</i> ) : <i>Integer</i><hr>
				    WMS_RegisterGetCapabilities( url <i>Text</i> , title <i>Text</i> , abstract <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Registers a WMS server.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_UnRegisterGetCapabilities</b></td>
				<td>WMS_UnRegisterGetCapabilities( url <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Unregisters a WMS server (and all related children).<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_SetGetCapabilitiesInfos</b></td>
				<td>WMS_SetGetCapabilitiesInfos( url <i>Text</i> , title <i>Text</i> , abstract <i>Text</i> )</td>
				<td colspan="3">Sets or updates the <b>Title</b> and <b>Abstract</b> for the WMS server identified by <b>url</b>.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_RegisterGetMap</b></td>
				<td>WMS_RegisterGetMap( getcapabilitites_url <i>Text</i> , getmap_url <i>Text</i> , layer_name <i>Text</i> , version <i>Text</i>, ref_sys <i>Text</i> ,
                    image_format <i>Text</i> , style <i>Text</i> , is_transparent <i>Boolean</i> , flip_axes <i>Boolean</i> ) : <i>Integer</i><hr>
				    WMS_RegisterGetMap( getcapabilitites_url <i>Text</i> , getmap_url <i>Text</i> , layer_name <i>Text</i> , version <i>Text</i>, ref_sys <i>Text</i> ,
                    image_format <i>Text</i> , style <i>Text</i> , is_transparent <i>Boolean</i> , flip_axes <i>Boolean</i> , is_tiled <i>Boolean</i> , 
                    is_cached <i>Boolean</i> , tile_width <i>Integer</i> , tile_height <i>Integer</i> ) : <i>Integer</i><hr>
				    WMS_RegisterGetMap( getcapabilitites_url <i>Text</i> , getmap_url <i>Text</i> , layer_name <i>Text</i> , title <i>Text</i> , abstract <i>Text</i> , 
				    version <i>Text</i>, ref_sys <i>Text</i> , image_format <i>Text</i> , style <i>Text</i> , is_transparent <i>Boolean</i> , flip_axes <i>Boolean</i> , 
				    is_tiled <i>Boolean</i> , is_cached <i>Boolean</i> , tile_width <i>Integer</i> , tile_height <i>Integer</i> , bgcolor <i>Text</i> ,
				    is_queryable <i>Boolean</i> , getfeatureinfo_url <b>Text</b> ) : <i>Integer</i></td>
				<td colspan="3">Registers a WMS layer.
					<ul>
						<li><b>getcapabilities_url</b>: URL referencing the parent <i>WMS GetCapabilities</i> request (must be already registered).</li>
						<li><b>getmap_url</b>: base URL corresponding to the <i>WMS GetMap</i> request.</li>
						<li><b>layer_name</b> name of the <i>WMS Layer</i>.</li>
						<li><b>title</b> (<i>optional arg</i>): Title of the WMS Service.</li>
						<li><b>abstract</b> (<i>optional arg</i>): Abstract of the WMS Service.</li>
						<li><b>version</b>: version of the WMS protocol to be used for <i>GetMap</i> requests (e.g. <b>'1.1.1'</b> or <b>'1.3.0'</b>).</li>
						<li><b>ref_sys</b>: reference system to be used for <i>GetMap</i> requests (e.g. <b>'EPSG:4326'</b> or <b>'EPSG:32632'</b>).</li>
						<li><b>image_format</b>: MIME type of the image returned by a <i>WMS GetMap</i> request (e.g. <b>'image/png'</b> or <b>'image/jpeg'</b>).</li>
						<li><b>style</b>: name of the style to be applied to the <i>WMS Layer</i> (could be <b>'default'</b>).</li>
						<li><b>is_transparent</b>: if the image returned by a <i>WMS GetMap</i> request should be opaque or transparent.</li>
						<li><b>flip_axes</b>: if a <i>WMS GetMap</i> request requires flipping the horizontal and vertical axes.</li>
						<li><b>is_tiled</b> (<i>optional arg</i>): if <i>WMS GetMap</i> requests should be handled <i>by tiles</i> or not.</li>
						<li><b>is_cached</b> (<i>optional arg</i>): if <i>WMS GetMap</i> results should be cached or not (applies only to <i>tiled</i> requests).</li>
						<li><b>tile_width</b> (<i>optional arg</i>): tile width expressed in <i>pixels</i> (applies only to <i>tiled</i> requests).</li>
						<li><b>tile_height</b> (<i>optional arg</i>): tile height expressed in <i>pixels</i> (applies only to <i>tiled</i> requests).</li>
						<li><b>bgcolor</b> (<i>optional arg</i>): image background color (<i>Hex RGB color</i> as e.g. <b>'ff8000'</b> or <b>'A8A8A8'</b>).</li>
						<li><b>is_queriable</b> (<i>optional arg</i>): if the <i>WMS Layer</i> supports or not <i>GetFeatureInfo</i> requests.</li>
						<li><b>getfeatureinfo_url</b> (<i>optional arg</i>): base URL corresponding to a <i>WMS GetFeatureInfo</i> request.</li>
					</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_UnRegisterGetMap</b></td>
				<td>WMS_UnRegisterGetMap( getmap_url <i>Text</i> , layer_name <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Unregisters a WMS Layer (and all related children).<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_SetGetMapInfos</b></td>
				<td>WMS_SetGetMapInfos( getmap_url <i>Text</i> , layer_name <i>Text</i> , title <i>Text</i> , abstract <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Sets or updates the <b>Title</b> and <b>Abstract</b> for the WMS Layer identified by <b>getmap_url</b> and <b>layer_name</b>.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_SetGetMapCopyright</b></td>
					<td>WMS_SetGetMapCopyright( getmap_url <i>Text</i> , layer_name <i>String</i> , copyright <i>String</i> ) : <i>Integer</i><hr>
						WMS_SetGetMapCopyright( getmap_url <i>Text</i> , layer_name <i>String</i> , copyright <i>String</i> , license <i>String</i> ): <i>Integer</i></td>
					<td colspan="3">Updates Copyright and License infos associated to a <b>WMS Layer</b>.
					<ul>
						<li><b>getmap_url</b> and <b>layer_name</b> must identify an existing WMS Layer.</li>
						<li><b>copyright</b> identifies the Copyright holder; if <b>NULL</b> the current value will be preserved.</li>
						<li>the optional argument <b>license</b> must reference one the Data Licenses registered into the <b>data_licenses</b> table, as e.g. <i>CC0 1.0</i> or <i>CC BY 4.0</i>.</li>
					</ul><hr>
						the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be returned on invalid arguments.</td></tr>
			<tr><td><b>WMS_SetGetMapOptions</b></td>
				<td>WMS_SetGetMapOptions( getmap_url <i>Text</i> , layer_name <i>Text</i> , transparent <i>Boolean</i> , flip_axes <i>Boolean</i> )<hr>
				    WMS_SetGetMapOptions( getmap_url <i>Text</i> , layer_name <i>Text</i> , is_tiled <i>Boolean</i> , cached <i>Boolean</i> , tile_width <i>Integer</i> , tile_height <i>Integer</i>) : <i>Integer</i><hr>
				    WMS_SetGetMapOptions( getmap_url <i>Text</i> , layer_name <i>Text</i> , is_queryable <i>Boolean</i> , getfeatureinfo_url <i>Text</i> ) : <i>Integer</i><hr>
				    WMS_SetGetMapOptions( getmap_url <i>Text</i> , layer_name <i>Text</i> , bgcolor <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Sets or updates configurable options for the WMS Layer identified by <b>getmap_url</b> and <b>layer_name</b>.<br>
				    Please check <b>WMS_RegisterGetMap</b> for more informations about supported options.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_RegisterSetting</b></td>
				<td>WMS_RegisterSetting( getmap_url <i>Text</i> , layer_name <i>Text</i> , key <i>Text</i> , value <i>Text</i> ) : <i>Integer</i><hr>
				    WMS_RegisterSetting( getmap_url <i>Text</i> , layer_name <i>Text</i> , key <i>Text</i> , value <i>Text</i> , is_default <i>Boolean</i> ) : <i>Integer</i></td>
				<td colspan="3">Registers an alternative setting for the WMS Layer identified by <b>getmap_url</b> and <b>layer_name</b>.
					<ul>
						<li><b>key</b>: identifies a specific multi-value setting, and should be one between <b>version</b>, <b>format</b> or <b>style</b>.</li>
						<li><b>value</b>: an alternative setting value. Examples:
							<ul>
								<li><i>key</i> = <b>'version'</b> , <i>value</i> = '<b>'1.0.0'</b></li>
								<li><i>key</i> = <b>'version'</b> , <i>value</i> = '<b>'1.1.0'</b></li>
								<li><i>key</i> = <b>'version'</b> , <i>value</i> = '<b>'1.1.1'</b></li>
								<li><i>key</i> = <b>'version'</b> , <i>value</i> = '<b>'1.3.0'</b></li>
							</ul>
						</li>
						<li><b>is_default</b> (<i>optional arg</i>): if the corresponding value will become the standard setting for the corresponding WMS Layer (<b>FALSE</b> if undefined).</li>
					</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_UnRegisterSetting</b></td>
				<td>WMS_UnRegisterSetting( getmap_url <i>Text</i> , layer_name <i>Text</i> , key <i>Text</i> , value <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Unregisters an alternative setting from the corresponding WMS Layer.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_DefaultSetting</b></td>
				<td>WMS_DefaultSetting( getmap_url <i>Text</i> , layer_name <i>Text</i> , key <i>Text</i> , value <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Makes an alternative setting to become the standard setting for the corresponding WMS Layer.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_RegisterRefSys</b></td>
				<td>WMS_RegisterRefSys( getmap_url <i>Text</i> , layer_name <i>Text</i> , ref_sys <i>Text</i> , minx <i>Double</i> , miny <i>Double</i> ,
				    maxx <i>Double</i> , maxy <i>Double</i> ) : <i>Integer</i><hr>
				    WMS_RegisterRefSys( getmap_url <i>Text</i> , layer_name <i>Text</i> , ref_sys <i>Text</i> , minx <i>Double</i> , miny <i>Double</i> ,
				    maxx <i>Double</i> , maxy <i>Double</i> , is_default <i>Boolean</i> ) : <i>Integer</i></td>
				<td colspan="3">Registers an alternative Reference System for the WMS Layer identified by <b>getmap_url</b> and <b>layer_name</b>
					<ul>
						<li><b>ref_sys</b>: name of Reference System (e.g. <b>'EPSG:4326'</b> or <b>'EPSG:32632'</b>).</li>
						<li><b>minx</b>, <b>miny</b>, <b>maxx</b> and <b>maxy</b>: the corresponding WMS Layer's Bounding Box (aka full extent).</li>
						<li><b>is_default</b> (<i>optional arg</i>): if the corresponding SRS will become the standard Reference System for the corresponding WMS Layer (<b>FALSE</b> if undefined).</li>
					</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_UnRegisterRefSys</b></td>
				<td>WMS_UnRegisterRefSys( getmap_url <i>Text</i> , layer_name <i>Text</i> , ref_sys <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Unregisters an alternative Reference System from the corresponding WMS Layer.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_DefaultRefSys</b></td>
				<td>WMS_DefaultRefSys( getmap_url <i>Text</i> , layer_name <i>Text</i> , ref_sys <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Makes an alternative SRS to become the standard Reference System for the corresponding WMS Layer.<hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>WMS_GetMapRequestURL</b></td>
				<td>WMS_GetMapRequestURL( getmap_url <i>Text</i> , layer_name <i>Text</i> , width <i>Integer</i> , height <i>Integer</i> , minx <i>Double</i> , miny <i>Double</i> ,
				    maxx <i>Double</i> , maxy <i>Double</i> ) : <i>Text</i></td>
				<td colspan="3">Creates a <b>WMS GetMap</b> request URL for the WMS Layer identified by <b>getmap_url</b> and <b>layer_name</b> by applying the currently set options.
				    <ul>
						<li><b>width</b> and <b>height</b>: horizontal and vertical dimensions (expressed in pixels) of the returned map image.</li>
						<li><b>minx</b>, <b>miny</b>, <b>maxx</b> and <b>maxy</b>: the Bounding Box coverred by the returned map image.</li>
				    </ul><hr>
					Will return a <b>request URL</b> on success; <b>NULL</b> on failure or on invalid arguments.</td></tr>
			<tr><td><b>WMS_GetFeatureInfoRequestURL</b></td>
				<td>WMS_GetFeatureInfoRequestURL( getmap_url <i>Text</i> , layer_name <i>Text</i> , width <i>Integer</i> , height <i>Integer</i> , x <i>Integer</i>, y <i>Integer</i> ,
					minx <i>Double</i> , miny <i>Double</i> , maxx <i>Double</i> , maxy <i>Double</i> ) : <i>Text</i><hr>
					WMS_GetFeatureInfoRequestURL( getmap_url <i>Text</i> , layer_name <i>Text</i> , width <i>Integer</i> , height <i>Integer</i> , x <i>Integer</i>, y <i>Integer</i> ,
					minx <i>Double</i> , miny <i>Double</i> , maxx <i>Double</i> , maxy <i>Double</i> , feature_count <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">Creates a <b>WMS GetFeatureInfo</b> request URL for the WMS Layer identified by <b>getmap_url</b> and <b>layer_name</b> by applying the currently set options.
				    <ul>
						<li><b>width</b> and <b>height</b>: horizontal and vertical dimensions (expressed in pixels) of the map image.</li>
						<li><b>x</b> and <b>y</b>: position of a Point on the map image to be queried: the map image coordidate origin <i>(0, 0)</i> is located on the
						<i>upper left corner</i>, the X axis increases going towards the right, the Y axis increases going towards the bottom. </li>
						<li><b>minx</b>, <b>miny</b>, <b>maxx</b> and <b>maxy</b>: the Bounding Box coverred by the map image.</li>
						<li><b>feature_count</b> (<i>optional arg</i>): maximum number of features allowed (<i>1</i> if unspecified).</li>
				    </ul><hr>
					Will return a <b>request URL</b> on success; <b>NULL</b> on failure or on invalid arguments.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="datalic">SQL functions supporting Data Licenses</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>RegisterDataLicense</b></td>
				<td>RegisterDataLicense( license_name <b>Text</b> ) : <i>Integer</i><hr>
					RegisterDataLicense( license_name <b>Text</b> , url <b>Text</b> ) : <i>Integer</i></td>
				<td colspan="3">Registers a Data License.
				<ul>
					<li><b>license_name</b> is expected to be a text string uniquely identifying a license/version.<br>
					<u>Note</u>: the following licenses are always self-defined when creating a new DB:
						<ul>
							<li><i>Undefined</i></li>
							<li><i>Proprietary - Non Free</i></li>
							<li><i>PD - Public Domain</i></li>
							<li><i>CC0 1.0</i></li>
							<li><i>CC BY 3.0</i></li>
							<li><i>CC BY 4.0</i></li>
							<li><i>CC BY-SA 3.0</i></li>
							<li><i>CC BY-SA 4.0</i></li>
							<li><i>CC BY-SA-NC 3.0</i></li>
							<li><i>CC BY-SA-NC 4.0</i></li>
						</ul>
					</li>
					<li>the optional argument <b>url</b> may eventually contain an URL pointing to the license's legal terms and conditions.</li>
				</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>UnRegisterDataLicense</b></td>
				<td>UnRegisterDataLicense( license_name <b>Text</b> ) : <i>Integer</i></td>
				<td colspan="3">Unregisters a Data License.
				<ul>
					<li><b>license_name</b> is expected to match an already registered license/version.</li>
				</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid argument.</td></tr>
			<tr><td><b>RenameDataLicense</b></td>
				<td>RenameDataLicense( old_name <b>Text</b> , new_name <b>Text</b> ) : <i>Integer</i></td>
				<td colspan="3">Renames a Data License.
				<ul>
					<li><b>old_name</b> is expected to match an already registered license/version.</li>
					<li><b>new_name</b> must not match any already registered license/version so to respect the unique constraint.</li>
				</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td><b>SetDataLicenseUrl</b></td>
				<td>SetDataLicenseURL( license_name <b>Text</b> , url <b>Text</b> ) : <i>Integer</i></td>
				<td colspan="3">Sets or updates the URL corresponding to a Data License.
				<ul>
					<li><b>license_name</b> is expected to match an already registered license/version.</li>
					<li><b>url</b> is expected to be an URL pointing to the license's legal terms and conditions.</li>
				</ul><hr>
					Will return <b>1</b> on success; <b>0</b> on failure; <b>-1</b> on invalid arguments.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="advanced">miscellaneous advanced SQL functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>CloneTable</b></td>
				<td>CloneTable( db-prefix <i>Text</i> , input_table <i>Text</i> , output_table <i>Text</i> , 
				transaction <i>Integer</i> ) : <i>Integer</i><hr>
				CloneTable(  db-prefix <i>Text</i> , input_table <i>Text</i> , output_table <i>Text</i> , 
				transaction <i>Integer</i> , option_1 <i>Text</i> [ , ... , option_10 <i>Text</i> ] ) : <i>Integer</i></td>
				<td colspan="3">Will clone (i.e. create+copy) an origin table into a destination table: 
				the origin could be eventually located into some <i>attached</i> DB, but the destination is always
				assumed to be located into the primary DB.<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>db-prefix</b> corresponding to the origin; the primary DB always corresponds to the <i>main</i> prefix.<br>
					    Can be legitimately set to <b>NULL</b>, and in this case <b>MAIN</b> will be implicitly assumed.</b></b></li>
					<li><b>input_table</b> name of the origin table</li>
					<li><b>output_table</b> name of the destination table</li>
					<li><b>transaction</b> a <i>boolean</i> values stating if the whole operation has to be atomically confined
					within a monolithic SQL transaction</li>
				</ul></li>
				<li>Optional arguments: a maximum of 10 further options could be eventually be specified. Valid options are:
				<ul>
					<li><b>::with-foreign-keys::</b></li>
					<li><b>::with-triggers::</b></li>
					<li><b>::resequence::</b></li>
					<li><b>::append::</b></li>
					<li><b>::ignore::</b><i>column_name</i></li>
					<li><b>::cast2multi::</b><i>geometry_column</i></li>
				</ul></li>
				</ul>
				<hr>
				Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success. <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>CreateClonedTable</b></td>
				<td>CreateClonedTable( db-prefix <i>Text</i> , input_table <i>Text</i> , output_table <i>Text</i> , 
				transaction <i>Integer</i> ) : <i>Integer</i><hr>
				CreateClonedTable(  db-prefix <i>Text</i> , input_table <i>Text</i> , output_table <i>Text</i> , 
				transaction <i>Integer</i> , option_1 <i>Text</i> [ , ... , option_10 <i>Text</i> ] ) : <i>Integer</i></td>
				<td colspan="3">A strict derivative of <b>CloneTable()</b> accepting the same arguments with identical meaning.<br>
				The only difference is in that this second variant will just create the output Table completely avoiding to copy any row betweem the two tables. 
				<hr>
				Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success. <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>CheckDuplicateRows</b></td>
				<td>CheckDuplicateRows( table <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Will check if the given <b>table</b> does contain duplicate rows, i.e. rows presenting identical 
				values for all columns (ignoring any Primary Key column).
				<hr>
				Will return the total number of duplicate rows found.<br> <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>RemoveDuplicateRows</b></td>
				<td>RemoveDuplicateRows( table <i>Text</i> ) : <i>Integer</i><hr>
				RemoveDuplicateRows( table <i>Text</i> , transaction <i>Boolean</i> ) : <i>Integer</i></td>
				<td colspan="3">Will remove all duplicate rows from the given <b>table</b> preserving only a single occurrence.<br>
				The <i>optional</i> argument <b>transaction</b> determines if an internal SQL Transaction should be automatically
				started or not (the default setting if not explicitly overridden is <b>TRUE</b>).
				<hr>
				Will return the total number of deleted rows.<br> <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>ElementaryGeometries</b></td>
				<td>ElementaryGeometries( in_table <i>Text</i> , geom_column <i>Text</i> , out_table <i>Text</i> ,
				out_pk <i>Text</i> , out_multi_id <i>Text</i> ) : <i>Integer</i><hr>
				ElementaryGeometries( in_table <i>Text</i> , geom_column <i>Text</i> , out_table <i>Text</i> ,
				out_pk <i>Text</i> , out_multi_id <i>Text</i> , transaction <i>Boolean</i> ) : <i>Integer</i><hr>
				ElementaryGeometries( in_table <i>Text</i> , geom_column <i>Text</i> , out_table <i>Text</i> ,
				out_pk <i>Text</i> , out_multi_id <i>Text</i> , transaction <i>Boolean</i> , 
				option_1 <i>Text</i> [ , ... , option_10 <i>Text</i> ] ) : <i>Integer</i></td>
				<td colspan="3">Will create a new <b>out_table</b> directly corresponding to <b>in_table</b>.
				The output table will be arranged in such a way that each row will always contain an elementary Geometry;
				so each time that a <b>MULTI-type</b> Geometry is found in the input table it will be split into many
				distinct rows.
				<ul>
					<li><b>out_pk</b> is the name to be set for the output Primary Key, and <b>out_multi_id</b> is the name to be set for a second column within the output table 
						where to store the a zero-based index from which Geometry the Element-Geometry comes from, that together with the original Primary Key can be identified.<br>
						<u>Note</u>: both <i>out_pk</i> and <i>out_multi_id</i> must not exist in the given <i>in_table</i> table.</li>
					<li>The <i>optional</i> argument <b>transaction</b> determines if an internal SQL Transaction should be automatically
						started or not (the default setting if not explicitly overridden is <b>TRUE</b>).</li>
				</ul>
				Optional arguments: a maximum of 10 further options could be eventually be specified. Valid options are:
				<ul>
					<li><b>::ignore::</b><i>column_name</i><br>
					<u>Note</u>: the <b>geom-column</b> will never be ignored, even if explicitly requested to be.</li>
					<li><b>::cast2multi::</b><br>
					Will automatically apply a <b>CastToMulti ( geom_column )</b> directive.</li>
					<li>All references to mismatching options or not existinting columns will be silently discarded.</li>
				</ul>

				<hr>
				Will return the total number of rows inserted into the output table.<br> <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>DropGeoTable</b></td>
				<td>DropGeoTable( table <i>Text</i> ) : <i>Integer</i><hr>
				DropGeoTable( table <i>Text</i> , transaction <i>Boolean</i> ) : <i>Integer</i><hr>
				DropGeoTable( db-prefix <i>Text</i> , table <i>Text</i> ) : <i>Integer</i><hr>
				DropGeoTable( db-prefix <i>Text</i> , table <i>Text</i> , transaction <i>Boolean</i> ) : <i>Integer</i></td>
				<td colspan="3">Will completely remove a Geometry Table (or Spatial View) this including any eventual SpatialIndex,
				metadata and statistics definitions an alike.<br>
				The <i>optional</i> argument <b>transaction</b> determines if an internal SQL Transaction should be automatically
				started or not (the default setting if not explicitly overridden is <b>TRUE</b>).
				<hr>
				Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success..<br> 
				<b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>ImportSHP</b></td>
				<td>ImportSHP( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i><hr>
				ImportSHP( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> [ , srid <i>Integer</i>  [ ,
				    geom_column <i>Text</i> [ , pk_column <i>Text</i> [ , geometry_type <i>Text</i> [ , coerce2D <i>Integer</i> 
				    [ , compressed <i>Integer</i> [ , spatial_index <i>Integer</i> [ , text_dates <i>Integer</i> 
				    [ , colname_case <i>Text</i> [ , update_statistics <i>Integer</i> [ , verbose <i>Integer</i> ] ] ] ] ] ] ] ] ] ] ] )
				    : <i>Integer</i></td>
				<td colspan="3">Will import an external Shapfile into an internal Table:
				<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>filename</b> absolute or relative path leading to the Shapefile (omitting any <i>.shp</i>, <i>.shx</i> or <i>.dbf</i> suffix).</li>
					<li><b>table</b> name of the table to be created.</li>
................................................................................
						<i>POLYGON|Z|M|ZM</i>, <i>MULTIPOINT|Z|M|ZM</i>, <i>LINESTRING|Z|M|ZM</i>, <i>MULTIPOLYGON|Z|M|ZM</i>;
						 by default <i>AUTO</i>.</li>
					<li><b>coerce2D</b> boolean flag: casting to 2D or not; <i>0</i> by default.</li>
					<li><b>compressed</b> boolean flag; compressed geometries or not; <i>0</i> by default.</li>
					<li><b>spatial_index</b> boolean flag: immediately building a Spatial Index or not; <i>0</i> by default.</li>
					<li><b>text_dates</b> boolean flag: interpreting DBF dates as plaintext or not: <i>0</i> by default
					(i.e. as <i>Julian Day</i>).</li>
					<li><b>colname_case</b> one between:<ul>
						<li><i>LOWER</i> or <i>LOWERCASE</i>: all column names will be converted to lowercase (default option).</li>
						<li><i>UPPER</i> or <i>UPPERCASE</i>: all column names will be converted to uppercase.</li>
						<li><i>SAME</i> or <i>SAMECASE</i>: all column names will be left as they are.</li>
					</ul></li>
					<li><b>update_statistics</b> boolean flag: immediately updating Layer Statustics or not; <i>1</i> by default.</li>
					<li><b>verbose</b> boolean flag: verbose console output: <i>1</i> by default, you can explicitly pass <i>0</i>
					if you better whish a silent output.
				</ul></li>
				</ul>
				<hr>
				Will return the total number of imported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ExportSHP</b></td>
				<td>ExportSHP( table <i>Text</i> , geom_column <i>Text</i> , filename <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i><hr>
				ExportSHP( table <i>Text</i> , geom_column <i>Text</i> , filename <i>Text</i> , charset <i>Text</i> , [ geom_type <i>Text</i>
				[ , colname_case <i>Text</i> ] ] ) : <i>Integer</i></td>
				<td colspan="3">Will export an internal Table as an external Shapefile:
				<ul>
					<li><b>table</b> name of the table to be exported.</li>
					<li><b>geom_column</b> name of the Geometry column.</li>
					<li><b>filename</b> absolute or relative path leading to the Shapefile (omitting any <i>.shp</i>, <i>.shx</i> or <i>.dbf</i> suffix).</li>
					<li><b>charset</b> the character encoding adopted by the DBF member, as e.g. <i>UTF-8</i> or <i>CP1252</i></li>
					<li>the optional argument <b>geom_type</b> is useful when exporting unregistered Geometries, and
					can be one between: <i>POINT</i>, <i>LINESTRING</i>, <i>POLYGON</i> or <i>MULTIPOINT</i>.</li>
					<li><b>colname_case</b> (optional argument) can be one between:<ul>
						<li><i>LOWER</i> or <i>LOWERCASE</i>: all column names will be converted to lowercase (default option).</li>
						<li><i>UPPER</i> or <i>UPPERCASE</i>: all column names will be converted to uppercase.</li>
						<li><i>SAME</i> or <i>SAMECASE</i>: all column names will be left as they are.</li>
					</ul></li>
				</ul>
				<hr>
				Will return the total number of exported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ImportDBF</b></td>
				<td>ImportDBF( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i><hr>
				ImportDBF( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> [ , pk_column <i>Text</i>  
				    [ , text_dates <i>Integer</i> [ , colname_case <i>Text</i> ] ] ] ) : <i>Integer</i></td>
				<td colspan="3">Will import an external DBF file into an internal Table:
				<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>filename</b> absolute or relative path leading to the DBF (including the <i>.dbf</i> suffix).</li>
					<li><b>table</b> name of the table to be created.</li>
					<li><b>charset</b> the character encoding adopted by the DBF, as e.g. <i>UTF-8</i> or <i>CP1252</i></li>
................................................................................
				</ul></li>
				<li>Optional arguments:
				<ul>
					<li><b>pk_column</b> name of a DBF column to be used in the Primary Key role; an <i>INTEGER AUTOINCREMENT</i> 
					PK will be created by default.</li>
					<li><b>text_dates</b> boolean flag: interpreting DBF dates as plaintext or not: <i>0</i> by default
					(i.e. as <i>Julian Day</i>).</li>
					<li><b>colname_case</b> one between:<ul>
						<li><i>LOWER</i> or <i>LOWERCASE</i>: all column names will be converted to lowercase (default option).</li>
						<li><i>UPPER</i> or <i>UPPERCASE</i>: all column names will be converted to uppercase.</li>
						<li><i>SAME</i> or <i>SAMECASE</i>: all column names will be left as they are.</li>
					</ul></li>
				</ul></li>
				</ul>
				<hr>
				Will return the total number of imported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ExportDBF</b></td>
				<td>ExportDBF( table <i>Text</i> , filename <i>Text</i> , charset <i>Text</i> [ , colname_case <i>Text</i> ] ) : <i>Integer</i></td>
				<td colspan="3">Will export an internal Table as an external DBF file:
				<ul>
					<li><b>table</b> name of the table to be exported.</li>
					<li><b>filename</b> absolute or relative path leading to the DBF (including the <i>.dbf</i> suffix).</li>
					<li><b>charset</b> the character encoding adopted by the DBF, as e.g. <i>UTF-8</i> or <i>CP1252</i></li>
					<li><b>colname_case</b> (optional argument) can be one between:<ul>
						<li><i>LOWER</i> or <i>LOWERCASE</i>: all column names will be converted to lowercase (default option).</li>
						<li><i>UPPER</i> or <i>UPPERCASE</i>: all column names will be converted to uppercase.</li>
						<li><i>SAME</i> or <i>SAMECASE</i>: all column names will be left as they are.</li>
					</ul></li>
				</ul>
				<hr>
				Will return the total number of exported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ExportKML</b></td>
				<td>ExportKML( table <i>Text</i> , geo_column <i>Text</i> , filename <i>Text</i> ) : <i>Integer</i><hr>
................................................................................
				</ul>
				<hr>
				Will return the total number of imported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ImportWFS</b></td>
				<td>ImportWFS( filename_or_url <i>Text</i> , layer_name <i>Text</i> , table <i>Text</i> ) : <i>Integer</i><hr>
				ImportWFS( filename_or_url <i>Text</i> , layer_name <i>Text</i> , table <i>Text</i> [ , pk_column <i>Text</i>  
				    [ , swap_axes <i>Integer</i> [ , page_size <i>Integer</i> [ , spatial_index <i>Integer</i> ] ] ] ] ) : <i>Integer</i></td>
				<td colspan="3">Will import data from a WFS datasource:
				<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>filename_or_url</b> absolute or relative path leading to the WFS file.<br>
					Alternatively an URL corresponding to a WFS service.</li>
................................................................................
					and <b>text_rotation_col_name</b> must specify the corresponding <u>column names</u> within the resultset
					returned by <b>sql_query</b> (<i>label_col_name</i>, <i>text_height_col_name</i> and <i>text_rotation_col_name</i> could be eventually <b>NULL</b>).</li>
					<li><b>geom_filter</b> acts as a <u>spatial filter</u> selecting which entities have to be exported (could be <b>NULL</b>).</li>
					<li>the optional argument <b>precision</b> specificies how many <u>decimal digits</u> are required for coordinate values: if not specified the default is <b>3</b>.</li>
					</ul>
					Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success.<hr>
                    <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                    Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>		
			<tr><td><b>ST_Cutter()</b></td>
				<td>ST_Cutter( input-db-prefix <i>String</i> , input-table <i>String</i> , input-geometry <i>String</i> , blade-db-prefix <i>String</i> ,
				    blade-table <i>String</i> , blade-geom <i>String</i> , output-table <i>String</i>
				    [ , transaction <i>Boolean</i> [ , ram-temp-storage <i>Boolean</i> ] ] ) : <i>Integer</i></td>
				<td colspan="3">Will precisely cut in a topological consistent way a whole <b>Input dataset</b> using a <b>Blade dataset</b> (i.e. an arbitrary <i>polygonal</i> dataset).<br>
				    All cut fragments will be stored into a further <b>Output dataset</b>, and all <i>mother-child relationships</i> will be fully preserved by saving the <i>Primary Key values</i> allowing
				    to trace back <i>Input</i> and <i>Blade</i> pairs giving birth to each single fragment.<br>
				    Any cut fragment stored into the <i>Output dataset</i> eventually falling outside any Blade will reference a conventional <b>NULL</b> Blade.
				    <ul>
                    <li>The <i>Input</i> dataset is always expected to declare a <b>Primary Key</b> and must declare a <i>POINT</i>, <i>LINESTRING</i>, <i>POLYGON</i>,
                    <i>MULTIPOINT</i>, <i>MULTILINESTRING</i> or <i>MULTIPOLYGON</i> Geometry type.<br>
                    It can be located either in the <b>MAIN</b> database or in any other <b>attached DB</b>, and must be fully identified by the <b>input-db-prefix</b>, 
                    <b>input-table</b> and <b>input-geometry</b> arguments.</li>
                    <li>The <i>Blade</i> dataset is always expected to be a <i>POLYGON</i> or <i>MULTIPOLYGON</i>, with a defined <b>Primary Key</b>.<br> 
                    It can be located either in the <b>MAIN</b> database or in any other <b>attached DB</b>, and is fully identified by the <b>blade-db-prefix</b>,
                    <b>blade-table</b> and <b>blade-geometry</b> arguments.<br>
                    <u>Note</u>: both the <i>Input</i> and <i>Blade</i> Geometries must have the same identical <i>SRID</i> value.</li>
                    <li>The <i>Output</i> dataset will be always created in the <b>MAIN</b> database.<br>
                    The Output Geometry will have the same name and SRID as the <b>input-geom</b>: the Geometry type will always be one of
                    <i>POINT</i>, <i>LINESTRING</i> or <i>POLYGON</i> (all cut fragments will be stored as simple features on distinct rows).</li>
					</ul>
					<ul>
					<li>Both the <b>input-db-prefix</b> and <b>blade-db-prefix</b> arguments could be set as <b>NULL</b>, where the <b>MAIN</b> database will then always be assumed.</li>
					<li>also the <b>input-geom</b> and <b>blade-geom</b> arguments can be set as <b>NULL</b>.<br>
					In such a case the appropriate Geometry column name will be chosen when only one Geometry column is defined, otherwise an exception will be raised.</li>
					<li>The <i>optional</i> argument <b>transaction</b> determines if an internal SQL Transaction should be automatically started or not (the default setting, if not explicitly overridden, is FALSE).</li>
					<li>The <i>optional</i> argument <b>ram-tmp-storage</b> determines if the intermediate <i>temporary tables</i> internally used by this function should be created in RAM or not 
					(the default setting if not explicitly overridden is FALSE).</li>
					</ul>
					Will return <b>-1</b> on invalid arguments, <b>0</b> on failure, <b>1</b> on full success and <b>2</b> on partial success (i.e.when the output table contains
					one or more <i>invalid geometries</i>).</td></tr>			
			<tr><td><b>GetCutterMessage()</b></td>
				<td>GetCutterMessage( <i>void</i> ) : <i>String</i></td>
				<td colspan="3">Will return the most <i>recent diagnostic message</i> emitted by <b>ST_Cutter()</b>.<br>
				<b>NULL</b> will be returned if no such message currently exists.</td></tr>			
			<tr><td><b>GetShapefileExtent()</b></td>
				<td>GetShapefileExtent( virtual_table_name <i>String</i> ) : <i>Geometry</i></td>
				<td colspan="3"><b>virtual_table_name</b> is expected to identify some Table of the <b>VirtualSHP</b> type.<br>
					An Envelope Geometry will be returned corresponding to the <b>Shapefile's Full Extent</b>;
				<b>NULL</b> will be returned if any error occurs (invalid argument type or not existing VirtualTable).</td></tr>	
			<tr><td><b>CreateRouting()</b></td>
				<td>CreateRouting( routing_data_table <i>String</i> , virtual_routing_table <i>String</i> , input_table <i>String</i> , from_column <i>String</i> , to_column <i>String</i> ,
				geom_column <i>String</i> , cost_column <i>String</i> ) : <i>Boolean</i><hr>
				CreateRouting( routing_data_table <i>String</i> , virtual_routing_table <i>String</i> , input_table <i>String</i> , from_column <i>String</i> , to_column <i>String</i> ,
				geom_column <i>String</i> , cost_column <i>String</i> , road_name_column <i>String</i> , a_star_enabled <i>Boolean</i> , bidirectional <i>Boolean</i> ) : <i>Boolean</i><hr>
				CreateRouting( routing_data_table <i>String</i> , virtual_routing_table <i>String</i> , input_table <i>String</i> , from_column <i>String</i> , to_column <i>String</i> ,
				geom_column <i>String</i> , cost_column <i>String</i> , road_name_column <i>String</i> , a_star_enabled <i>Boolean</i> , bidirectional <i>Boolean</i> , oneway_from <i>String</i> , 
				oneway_to <i>String</i> ) : <i>Boolean</i><hr>
				CreateRouting( routing_data_table <i>String</i> , virtual_routing_table <i>String</i> , input_table <i>String</i> , from_column <i>String</i> , to_column <i>String</i> ,
				geom_column <i>String</i> , cost_column <i>String</i> , road_name_column <i>String</i> , a_star_enabled <i>Boolean</i> , bidirectional <i>Boolean</i> , oneway_from <i>String</i> , 
				oneway_to <i>String</i> , overwrite <i>Boolean</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will attempt to create a <b>VirtualRouting Table</b> (and the corresponding <b>Routing Binary Data Table</b>) starting from a topologically correct <b>Road Network</b>.<br>
				<ul>
					<li><b>routing_data_table</b>: name of the Routing Binary Data Table to be created.</li>
					<li><b>virtual_routing_table</b>: name of the VirtualRouting Table to be created.</li>
					<li><b>input_table</b>: name of the input Table containing the Road Network.</li>
					<li><b>from_column</b>: name of the input Table column containing FromNode values.</li>
					<li><b>to_column</b>: name of the input Table column containing ToNode values.</li>
					<li><b>geom_column</b>: name of the input Table column containing Geometries.<br>
						Could be eventually <b>NULL</b> for Networks just describing relations but lacking any Spatial representation.</li>
					<li><b>cost_column</b>: name of the input Table column containing Cost values.<br>
						Could be eventually <b>NULL</b> and in this case <b>ST_Length(geom_column)</b> will be assumed to be the Cost: in the case of Networks based on some <i>Geographic Reference System</i>
						(<b>long/lat</b>, as e.g. <b>SRID=4326</b>) a precise measure of lengths expressed in <b>meters</b> will be computed by using <i>geodesic formulas</i>.</li>
					<li><b>road_name_column</b>: name of the input Table column containing Road Name values. Could be eventually <b>NULL</b>.</li>
					<li><b>a_star_enabled</b>: if the <b>A*</b> algorithm should be enabled or not (default: <b>1</b>).</li>
					<li><b>bidirectional</b>: if arcs/links should be considered uni- or bi-directionals (default: <b>0</b>).</li>
					<li><b>oneway_from</b>: name of the input Table column containing OneWay flags in the From-To direction. Could be eventually <b>NULL</b>.</li>
					<li><b>oneway_to</b>: name of the input Table column containing OneWay flags in the To-From direction. Could be eventually <b>NULL</b>.</li>
					<li><b>overwrite</b>: if set to <b>TRUE</b> already existing Routing Binary Data and/or VirtualRouting Tables will be silently overwritten (default: <b>0</b>).</li>
				</ul><hr>
				<b>1</b> (aka <b>TRUE</b>) will be returned on success, an <b>exception</b> will be raised on failure.</td></tr>
			<tr><td><b>CreateRoutingNodes()</b></td>
				<td>CreateRoutingNodes( db_prefix <i>String</i> , spatial_table <i>String</i> , geom_column <i>String</i> ,  node_from <i>String</i> , node_to <i>String</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will attempt to add both <b>node_from</b> and <b>nodes_to</b> columns to the Spatial Table identified by <b>db_prefix</b>, <b>spatial_table</b> and <b>geom_column</b>.
				These two columns will be populated by inserting appropriate <b>Node-IDs</b> (of the <i>INTEGER</i> type) fully respecting the topological consistency of the network.<br>
				<ul>
					<li><b>db_prefix</b> could be <b>NULL</b>, and in this case the <b>MAIN</b> DB is implicitly assumed.</li>
					<li>also <b>geom_column</b> could be <b>NULL</b>, and in this case the name of the Geometry column will be automatically detected if the Spatial Table has just a single Geometry.</li>
					<li><b>geom_column</b> must contain Geometries of the <b>LINESTRING</b> type.</li>
					<li>both <b>node_from</b> and <b>node_to</b> columns should not exist.</li>
				</ul><hr>
				<b>1</b> (aka <b>TRUE</b>) will be returned on success, an <b>exception</b> will be raised on failure.</td></tr>				
			<tr><td><b>CreateRouting_GetLastError()</b></td>
				<td>CreateRouting_GetLastError( <i>void</i> ) : <i>String</i></td>
				<td colspan="3">Will return the most <i>recent error message</i> emitted by <b>CreateRouting()</b> or <b>CreateRoutingNodes()</b>.<br>
				<b>NULL</b> will be returned if no such error message currently exists.</td></tr>	
			<tr><td><b>IsLowASCII()</b></td>
				<td>IsLowASCII( text_string <i>String</i> ) : <i>Integer</i></td>
				<td colspan="3">Inspects an <b>UTF-8</b> encoded <b>text_string</b> testing if it only contains <b>ASCII 7-bit</b> characters.<br>
                    The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
                    and -1 for UNKNOWN when called with invalid arguments.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="sqlproc">SQL Procedures, Stored Procedures and Stored Variables related SQL functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>SqlProc_GetLastError</b></td>
				<td>SqlProc_GetLastError( <i>void</i> ) : <i>String</i></td>
				<td colspan="3">Will return the most recent error message returned by SQL Procedures and friends (if any).<hr>
				<b>NULL</b> will be returned if there is no pending SQL Procedures error.</td></tr>
			<tr><td><b>SqlProc_SetLogfile</b></td>
				<td>SqlProc_SetLogfile( filepath <i>String</i> ) : <i>Integer</i><hr>
				    SqlProc_SetLogfile( filepath <i>String</i> , append <i>Boolean</i> ) : <i>Integer</i></td>
				<td colspan="3">Will activate a SQL Logfile supporting all following calls to <b>SqlProc_Execute()</b> and <b>StoredProc_Execute()</b>.
				<ul>
					<li>The <b>filepath</b> argument is expected to be a valid relative or absolute pathname; it could be set to <b>NULL</b> so to disable SQL Logging.</li>
					<li>The optional argument <b>append</b> if set to <b>TRUE</b> requires to open the Logfile for appending; if set to <b>FALSE</b> (default setting) the Logfile will be truncated.</li>
				</ul><hr>
				<b>1</b> will be returned on success; an exception will be raised on invalid argument or if the SQL Logfile can't be succesfully opened.<hr>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>SqlProc_GetLogfile</b></td>
				<td>SqlProc_GetLogfile( <i>void</i> ) : <i>String</i></td>
				<td colspan="3">Will return the pathname of the currently set SQL Logfile.<hr>
				<b>NULL</b> will be returned if no SQL Logfile is currently set.</td></tr>
			<tr><td><b>SqlProc_FromText</b></td>
				<td>SqlProc_FromText( sql_body <i>String</i> ) : <i>BLOB</i><hr>
				    SqlProc_FromText( sql_body <i>String</i>, charset_encoding <i>String</i> ) : <i>BLOB</i></td>
				<td colspan="3">Will return a BLOB object of the Sql Procedure type encapsulating the given <b>SQL Body</b>.<br>
				If the optional second argument is explicitly specified the SQL Body will be automatically converted from the given <b>charset encoding</b> into <b>UTF-8</b>.<hr>
				<b>1</b> will be returned on success; an exception will be raised on failure or invalid arguments.</td></tr>	
			<tr><td><b>SqlProc_FromFile</b></td>
				<td>SqlProc_FromFile( filepath <i>String</i> ) : <i>BLOB</i><hr>
				    SqlProc_FromFile( filepath <i>String</i>, charset_encoding <i>String</i> ) : <i>BLOB</i></td>
				<td colspan="3">Will return a BLOB object of the Sql Procedure type encapsulating the <b>SQL Body</b> loaded from the given <b>filepath</b>.<br>
				If the optional second argument is explicitly specified the SQL Body will be automatically converted from the given <b>charset encoding</b> into <b>UTF-8</b>.<hr>
				<b>1</b> will be returned on success; an exception will be raised on failure or invalid arguments.<hr>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>	
			<tr><td><b>SqlProc_IsValid</b></td>
				<td>SqlProc_IsValid( object <i>BLOB</i> ) : <i>Boolean</i></td>
				<td colspan="3">Returns <b>TRUE</b> if the passed BLOB is valid <b>SQL Procedure</b> object, otherwise <b>FALSE</b>.<hr>
				An exception will be raised on invalid argument.</td></tr>	
			<tr><td><b>SqlProc_NumVariables</b></td>
				<td>SqlProc_NumVariables( object <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">Returns the total number of <b>Variables</b> declared by the given <b>SQL Procedure</b> object.<hr>
				An exception will be raised on failure or invalid arguments.</td></tr>		
			<tr><td><b>SqlProc_VariableN</b></td>
				<td>SqlProc_VariableN( object <i>BLOB</i> , index <i>Integer</i> ) : <i>String</i></td>
				<td colspan="3">Returns the <b>symbolic name</b> of the <b>Nth</b> Variable declared by the given <b>SQL Procedure</b> object.<br>
				The first Variable always corresponds to <b>index=0</b>, and the last one to <b>SqlProc_NumVariables() - 1</b>.<hr>
				An exception will be raised on failure or invalid arguments.</td></tr>	
			<tr><td><b>SqlProc_AllVariables</b></td>
				<td>SqlProc_AllVariables( object <i>BLOB</i> ) : <i>String</i></td>
				<td colspan="3">Returns a space delimited list of all Variable <b>symbolic names</b> declared by the given <b>SQL Procedure</b> object.<hr>
				An exception will be raised on failure or invalid argument.</td></tr>
			<tr><td><b>SqlProc_VarValue</b></td>
				<td>SqlProc_VarValue( var_name <i>String</i> , var_value <i>NULL</i> ) : <i>String</i><hr>
					SqlProc_VarValue( var_name <i>String</i> , var_value <i>Integer</i> ) : <i>String</i><hr>
					SqlProc_VarValue( var_name <i>String</i> , var_value <i>Double</i> ) : <i>String</i><hr>
					SqlProc_VarValue( var_name <i>String</i> , var_value <i>Text</i> ) : <i>String</i><hr>
					SqlProc_VarValue( var_name <i>String</i> , var_value <i>BLOB</i> ) : <i>String</i></td>
				<td colspan="3">Returns a properly formatted <b>Variable with Value</b> Text string.<hr>
				An exception will be raised on failure or invalid argument.</td></tr>
			<tr><td><b>SqlProc_RawSQL</b></td>
				<td>SqlProc_RawSQL( object <i>BLOB</i> ) : <i>String</i></td>
				<td colspan="3">Returns the <b>raw SQL Body</b> declared by the given <b>SQL Procedure</b> object.<hr>
				An exception will be raised on failure or invalid argument.</td></tr>
			<tr><td><b>SqlProc_CookedSQL</b></td>
				<td>SqlProc_CookedSQL( object <i>BLOB</i> ) : <i>String</i><hr>
					SqlProc_CookedSQL( object <i>BLOB</i> , vararg <i>String</i> ) : <i>String</i><hr>
					SqlProc_CookedSQL( object <i>BLOB</i> , vararg1 <i>String</i> [ , ... ] , varargN <i>String</i> ) : <i>String</i></td>
				<td colspan="3">Returns the <b>cooked SQL Body</b> declared by the given <b>SQL Procedure</b> object after applying all <b>Variable Values</b>.<br>
				<i>Note:</i> this function accepts from <b>0</b> to <b>16</b> well-formed <b>Variable with Value</b> arguments; declaring twice or more the same Variable is considered to be a fatal error.<hr>
				An exception will be raised on failure or invalid arguments.</td></tr>
			<tr><td><b>SqlProc_Execute</b></td>
				<td>SqlProc_Execute( object <i>BLOB</i> ) : <i>Integer</i><hr>
					SqlProc_Execute( object <i>BLOB</i> , vararg <i>String</i> ) : <i>Integer</i><hr>
					SqlProc_Execute( object <i>BLOB</i> , vararg1 <i>String</i> [ , ... ] , varargN <i>String</i> ) : <i>Integer</i></td>
				<td colspan="3">Executes the <b>cooked SQL Body</b> declared by the given <b>SQL Procedure</b> object after applying all <b>Variable Values</b>.<br>
				<i>Note:</i> this function accepts from <b>0</b> to <b>16</b> well-formed <b>Variable with Value</b> arguments; declaring twice or more the same Variable is considered to be a fatal error.<hr>
				Will return <b>1</b> on success, an exception will be raised on failure or invalid arguments.</td></tr>
			<tr><td><b>SqlProc_Exit</b></td>
				<td>SqlProc_Exit( <i>void</i> ) : <i>Integer</i><hr>
					StoredProc_Exit( <i>void</i> ) : <i>Integer</i></td>
				<td colspan="3">
					Will notify a pending <b>EXIT</b> request to <b>SqlProc_Execute()</b> or <b>StoredProc_Execute()</b>;
					the internal execution loop will immediately stop and exit after completing the current SQL statement from the SQL Body.<br><br>
				<i>Notes:</i><ol>
					<li>These functions are completely effectless outside the specific execution context of <b>SqlProc_Execute()</b> or <b>StoredProc_Execute()</b>.</li>
					<li><b>SqlProc_Exit()</b> and <b>StoredProc_Exit()</b> are just <i>alias names</i>.
				</ol>
				Will return <b>1</b> on success, an exception will be raised on failure.</td></tr>
			<tr><td><b>StoredProc_CreateTables</b></td>
				<td>StoredProc_CreateTables( <i>void</i> ) : <i>Boolean</i></td>
				<td colspan="3">Returns <b>TRUE</b> if the <b>Stored Procedures and Variables tables</b> have been succesfully created or if they already exist, otherwise <b>FALSE</b>.</td></tr>
			<tr><td><b>StoredProc_Register</b></td>
				<td>StoredProc_Register( name <i>String</i> , title <i>String</i> , object <i>BLOB</i> ) : <i>Boolean</i></td>
				<td colspan="3">Registers a permanent <b>Stored Procedure</b>:
				<ul>
					<li><b>name</b> is expected to <b>uniquely identify</b> the Stored Procedure.</li>
					<li><b>title</b> is expected to specify a short description of the Stored Procedure intended scopes.</li>
					<li><b>object</b> is expected to be a valid BLOB of the <b>SQL Procedure</b> type created by <b>SqlProc_FromText()</b> or <b>SqlProc_FromFile()</b>.</li>
				</ul><hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>.	An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredProc_Get</b></td>
				<td>StoredProc_Get( name <i>String</i> ) : <i>BLOB</i></td>
				<td colspan="3">Will return a <b>SQL Procedure</b> BLOB object from a <b>Stored Procedure</b>. <b>NULL</b> will be returned if the Stored Procedure does not exists.<hr>
				An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredProc_Delete</b></td>
				<td>StoredProc_Delete( name <i>String</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will delete a <b>Stored Procedure</b>.<hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>. An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredProc_UpdateTitle</b></td>
				<td>StoredProc_UpdateTitle( name <i>String</i> , title <i>String</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will change the <b>Title</b> on the given <b>Stored Procedure</b>.<hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>. An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredProc_UpdateSqlBody</b></td>
				<td>StoredProc_UpdateSqlBody( name <i>String</i> , object <i>BLOB</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will change the <b>SQL Body</b> on the given <b>Stored Procedure</b>.<hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>. An exception will be raised on invalid arguments.</td></tr>	
			<tr><td><b>StoredProc_Execute</b></td>
				<td>StoredProc_Execute( name <i>String</i> ) : <i>Integer</i><hr>
					StoredProc_Execute( name <i>String</i> , vararg <i>String</i> ) : <i>Integer</i><hr>
					StoredProc_Execute( name <i>String</i> , vararg1 <i>String</i> [ , ... ] , varargN <i>String</i> ) : <i>Integer</i></td>
				<td colspan="3">Executes the given <b>Stored Procedure</b> after applying all <b>Variable Values</b>.<br>
				<i>Note:</i> this function accepts from <b>0</b> to <b>16</b> well-formed <b>Variable with Value</b> arguments; declaring twice or more the same Variable is considered to be a fatal error.<hr>
				Will return <b>1</b> on success, an exception will be raised on failure or invalid arguments.</td></tr>
			<tr><td><b>StoredVar_Register</b></td>
				<td>StoredVar_Register( name <i>String</i> , title <i>String</i> , value <i>NULL</i> ) : <i>Boolean</i><hr>
				    StoredVar_Register( name <i>String</i> , title <i>String</i> , value <i>Integer</i> ) : <i>Boolean</i><hr>
				    StoredVar_Register( name <i>String</i> , title <i>String</i> , value <i>Double</i> ) : <i>Boolean</i><hr>
				    StoredVar_Register( name <i>String</i> , title <i>String</i> , value <i>Text</i> ) : <i>Boolean</i><hr>
				    StoredVar_Register( name <i>String</i> , title <i>String</i> , value <i>BLOB</i> ) : <i>Boolean</i></td>
				<td colspan="3">Registers a permanent <b>Stored Variable</b>:
				<ul>
					<li><b>name</b> is expected to <b>uniquely identify</b> a Variable Name.</li>
					<li><b>title</b> is expected to specify a short description of the Stored Variable intended scopes.</li>
					<li><b>value</b> can be any data-type and will be automatically converted to its correspondined textual representation.</li>
				</ul><hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>.	An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredVar_Get</b></td>
				<td>StoredVar_Get( name <i>String</i> ) : <i>BLOB</i></td>
				<td colspan="3">Will return a <b>Variable with Value</b> string from a <b>Stored Variable</b>. <b>NULL</b> will be returned if the Stored Variable does not exists.<hr>
				An exception will be raised on invalid arguments.</td></tr>			
			<tr><td><b>StoredVar_GetValue</b></td>
				<td>StoredVar_GetValue( name <i>String</i> ) : <i>BLOB</i></td>
				<td colspan="3">Will return the <b>undecorated Value</b> string from a <b>Stored Variable</b>. <b>NULL</b> will be returned if the Stored Variable does not exists.<hr>
				An exception will be raised on invalid arguments.</td></tr>			
			<tr><td><b>StoredVar_Delete</b></td>
				<td>StoredVar_Delete( name <i>String</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will delete a <b>Stored Variable</b>.<hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>. An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredVar_UpdateTitle</b></td>
				<td>StoredVar_UpdateTitle( name <i>String</i> , title <i>String</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will change the <b>Title</b> on the given <b>Stored Variable</b>.<hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>. An exception will be raised on invalid arguments.</td></tr>		
			<tr><td><b>StoredVar_UpdateValue</b></td>
				<td>StoredVar_UpdateValue( name <i>String</i> , var_value <i>NULL</i> ) : <i>Boolean</i><hr>
				    StoredVar_UpdateValue( name <i>String</i> , var_value <i>Integer</i> ) : <i>Boolean</i><hr>
				    StoredVar_UpdateValue( name <i>String</i> , var_value <i>Double</i> ) : <i>Boolean</i><hr>
				    StoredVar_UpdateValue( name <i>String</i> , var_value <i>Text</i> ) : <i>Boolean</i><hr>
				    StoredVar_UpdateValue( name <i>String</i> , var_value <i>BLOB</i> ) : <i>Boolean</i></td>
				<td colspan="3">Will change the <b>Value</b> on the given <b>Stored Variable</b>.<hr>
				Returns <b>TRUE</b> on success, otherwise <b>FALSE</b>. An exception will be raised on invalid arguments.</td></tr>		
		</tbody></table>
		<br>
		<a href="https://www.gaia-gis.it/fossil/libspatialite">back</a>
		<br>
	</body></html>


>
>









|




<
<

|







 







<



|
<

<










<
<
<
<

<







 







|
|




|
|
|
|






|


|


|


|


|


|


|
<
<
<
<
<
<
|
|
|


|


|


|


|
<
<
<
<
<
<
<
<
<
<
<
<
<







|


|



|
|




|
|


|
|










<
|
|
<
<
<
<
<

<
|
|
<
<
<
<
<







 







<
<
<
<
<
<
<





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











|







<
<
<
<







 







|


|







 







|







 







|
|
|
|
|
|
|
|
|
|







 







|


|
|
|









|




|




|




|




|




|




|

|



|





|




|




|

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


>
|



|
|

|
|
|
>

|
|


|







 







|







 







|







 







|
|



|
<
<
<
<
<



|
|



|
<
<
<
<
<



|
|



|
<
<
<
<
<







 







|







 







|


|
<
<
<
<
<
<
<





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|






|













|



|
>






|







|


|
|



|
<
<


|
|


|
<
<


|
|


|
<
<







 








<
<
<
<
<
<
<

|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<


|
<
<

|
<


|
<
<

|
<


|
<
<
<







 







|







|







 







|



|


|







 







|







 







|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|













|






|






|






|






|







|










|






|







 







|







|







|







|







|








|









|







|







|







|

|
<
|
|


<
|
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|









|







|






|







|






|







|






|









|







 







|
|

|

|
<
<
<
<
<
<
<
<












|





|




|




|

<
<
<
<
<
<



|






|











|


|

<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|

|
<
|
<





|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<










|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|







 







|







 







|






|







 







|







 







|






|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|






|







 







|
<



<





|
<
<

|
<




|
<
<

|
<




|
<
<
<







 







|







 







|
<


|
<
<
|

|
<




|
<
<

|
<




|
<
<







 







|







 







|





|





|





|





|





|





|
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







|







 







|




|



|
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











|


|
<





|










<
<
<
<
<
<
<
<
<








|
<
|
<
<




|
<
<
<
<
<


|
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
>




<
|
<

|
<
<







|
<







 







<
<
<
<
<
<
<
<








|
<







|
<
<
<
<
<








|







 







<
<
<
<
<







|





<
<
<
<
<







 







|







 







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<

<

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


19
20
21
22
23
24
25
26
27
..
36
37
38
39
40
41
42

43
44
45
46

47

48
49
50
51
52
53
54
55
56
57




58

59
60
61
62
63
64
65
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112






113
114
115
116
117
118
119
120
121
122
123
124
125
126
127













128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

164
165





166

167
168





169
170
171
172
173
174
175
...
177
178
179
180
181
182
183







184
185
186
187
188




































































189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207




208
209
210
211
212
213
214
...
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
...
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482



















483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
...
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
...
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
...
632
633
634
635
636
637
638
639
640
641
642
643
644





645
646
647
648
649
650
651
652
653





654
655
656
657
658
659
660
661
662





663
664
665
666
667
668
669
...
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
....
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028







1029
1030
1031
1032
1033










































1034
1035
1036
1037
1038
1039
1040
....
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115


1116
1117
1118
1119
1120
1121
1122


1123
1124
1125
1126
1127
1128
1129


1130
1131
1132
1133
1134
1135
1136
....
1163
1164
1165
1166
1167
1168
1169
1170







1171
1172
1173























1174
1175
1176
1177
1178
1179
1180
....
1183
1184
1185
1186
1187
1188
1189



























1190
1191
1192
1193
1194
1195
1196
....
1285
1286
1287
1288
1289
1290
1291
1292

1293
1294
1295


1296
1297

1298
1299
1300


1301
1302

1303
1304
1305



1306
1307
1308
1309
1310
1311
1312
....
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
....
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
....
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
....
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534

























1535
1536
1537
1538
1539
1540
1541
....
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
....
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
....
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739

1740
1741
1742
1743

1744

1745
1746





























1747
1748
1749
1750
1751
1752
1753
....
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779




















































1780
1781
1782
1783
1784
1785
1786
....
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
....
1980
1981
1982
1983
1984
1985
1986





































1987
1988
1989
1990
1991
1992
1993
....
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
....
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
....
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222








2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252






2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279











2280
2281
2282
2283
2284
2285
2286
....
2334
2335
2336
2337
2338
2339
2340
































































































































































































































2341
2342
2343
2344
2345
2346
2347
....
2356
2357
2358
2359
2360
2361
2362
















2363
2364
2365
2366
2367
2368
2369
....
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
....
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
....
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631

2632

2633
2634
2635
2636
2637
2638
2639



































































2640
2641
2642
2643
2644
2645
2646
....
2647
2648
2649
2650
2651
2652
2653
2654

2655
2656
2657
2658
2659
2660














2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
....
2694
2695
2696
2697
2698
2699
2700





















2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
....
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
....
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
....
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
....
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
....
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
....
2884
2885
2886
2887
2888
2889
2890





















2891
2892
2893
2894
2895
2896
2897
....
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
....
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
....
3111
3112
3113
3114
3115
3116
3117
3118

3119
3120
3121

3122
3123
3124
3125
3126
3127


3128
3129

3130
3131
3132
3133
3134


3135
3136

3137
3138
3139
3140
3141



3142
3143
3144
3145
3146
3147
3148
....
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
....
3186
3187
3188
3189
3190
3191
3192
3193

3194
3195
3196


3197
3198
3199

3200
3201
3202
3203
3204


3205
3206

3207
3208
3209
3210
3211


3212
3213
3214
3215
3216
3217
3218
....
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
....
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557






3558
3559
3560
3561
3562
3563
3564
....
3638
3639
3640
3641
3642
3643
3644







3645
3646
3647
3648
3649
3650
3651
....
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
....
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
....
3753
3754
3755
3756
3757
3758
3759







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774

3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790









3791
3792
3793
3794
3795
3796
3797
3798
3799

3800


3801
3802
3803
3804
3805





3806
3807
3808
3809

3810













3811
3812
3813
3814
3815

3816

3817
3818


3819
3820
3821
3822
3823
3824
3825
3826

3827
3828
3829
3830
3831
3832
3833
....
3843
3844
3845
3846
3847
3848
3849








3850
3851
3852
3853
3854
3855
3856
3857
3858

3859
3860
3861
3862
3863
3864
3865
3866





3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
....
3883
3884
3885
3886
3887
3888
3889





3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902





3903
3904
3905
3906
3907
3908
3909
....
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
....
4045
4046
4047
4048
4049
4050
4051
4052





























































































































































































































































4053

4054

4055
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

	
		<meta content="text/html; charset=UTF-8" http-equiv="content-type">
		<title>SpatiaLite SQL functions reference list</title>
		<style type="text/css">
			h2 {color:navy; text-align:center;} 
			h3 {color:blue;} 
			b {color:brown;}
			i {color:navy;}
		</style>
	</head><body bgcolor="#fffff0">
		<h2>SpatiaLite 4.3.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQL functions reference list</h2>
		<a href="https://www.gaia-gis.it/fossil/libspatialite">back</a>
		<ul>
			<li><a href="#version">SQL Version Info [and build options testing] functions</a></li>
			<li><a href="#generic">Generic SQL utility functions</a></li>


			<li><a href="#math">SQL math functions</a></li>
			<li><a href="#error">SQL functions reporting GEOS / LWGEOM errors and warnings</a></li>
			<li><a href="#length_cvt">SQL length/distance unit-conversion functions</a></li>
			<li><a href="#dms_cvt">SQL conversion functions from DD/DMS notations (longitude/latitude)</a></li>
			<li><a href="#blob">SQL utility functions for BLOB objects</a></li>
			<li><a href="#p0">SQL utility functions [non-standard] for geometric objects</a></li>
			<li><a href="#p1">SQL functions for constructing a geometric object given its Well-known Text Representation</a></li>
			<li><a href="#p2">SQL functions for constructing a geometric object given its Well-known Binary Representation</a></li>
			<li><a href="#p3">SQL functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object</a></li>
................................................................................
			<li><a href="#p7">SQL functions on type LineString</a></li>
			<li><a href="#p8">SQL functions on type Surface [Polygon or Ring]</a></li>
			<li><a href="#p9">SQL functions on type Polygon</a></li>
			<li><a href="#p10">SQL functions on type GeomCollection</a></li>
			<li><a href="#p11">SQL functions that test approximate spatial relationships via MBRs</a></li>
			<li><a href="#p12">SQL functions that test spatial relationships</a></li>
			<li><a href="#p13">SQL functions for distance relationships</a></li>

			<li><a href="#p14">SQL functions that implement spatial operators</a></li>
			<li><a href="#p14b">SQL functions that implement spatial operators [GEOS specific features]</a></li>
			<li><a href="#p14c">SQL functions that implement spatial operators [GEOS advanced features]</a></li>
			<li><a href="#p14d">SQL functions that implement spatial operators [LWGEOM features]</a></li>

			<li><a href="#p15">SQL functions for coordinate transformations</a></li>

			<li><a href="#p16">SQL functions for Spatial-MetaData and Spatial-Index handling</a></li>
			<li><a href="#p16metacatalog">SQL functions supporting the MetaCatalog and related Statistics</a></li>
			<li><a href="#p16style">SQL functions supporting SLD/SE Styled Layers</a></li>
			<li><a href="#p16isometa">SQL functions supporting ISO Metadata</a></li>
			<li><a href="#p16fdo">SQL functions implementing FDO/OGR compatibility</a></li>
			<li><a href="#p16gpkg">SQL functions implementing OGC GeoPackage compatibility</a></li>
			<li><a href="#p17">SQL functions for MbrCache-based queries</a></li>
			<li><a href="#p18">SQL functions for R*Tree-based queries (Geometry Callbacks)</a></li>
			<li><a href="#xmlBlob">SQL functions supporting XmlBLOB</a></li>
			<li><a href="#srid">SQL functions supporting SRID inspection</a></li>




			<li><a href="#advanced">miscellaneous advanced SQL functions</a></li>

		</ul>
		<table bgcolor="#e2eae2" border="1" cellpadding="2" cellspacing="2" width="100%">
			<tbody><tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="version">SQL Version Info [and build options testing] functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td colspan="3">returns the current <b>SpatiaLite</b> Target CPU as a text string</td></tr>
			<tr><td><b>freexl_version</b></td>
				<td>freexl_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>FreeXL</b> version as a text string<br>
					or NULL if FreeXL is currently unsupported</td></tr>
			<tr><td><b>proj4_version</b></td>
				<td>proj4_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>PROJ.4</b> version as a text string<br>
					or NULL if PROJ.4 is currently unsupported</td></tr>
			<tr><td><b>geos_version</b></td>
				<td>geos_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>GEOS</b> version as a text string<br>
					or NULL if GEOS is currently unsupported</td></tr>
			<tr><td><b>lwgeom_version</b></td>
				<td>lwgeom_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>LWGEOM</b> version as a text string<br>
					or NULL if LWGEOM is currently unsupported</td></tr>
			<tr><td><b>libxml2_version</b></td>
				<td>libxml2_version( void ) : <i>String</i></td>
				<td colspan="3">returns the current <b>LibXML2</b> version as a text string<br>
					or NULL if LibXML2 is currently unsupported</td></tr>
			<tr><td><b>HasIconv</b></td>
				<td>HasIconv( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>ICONV</b></td></tr>
			<tr><td><b>HasMathSQL</b></td>
				<td>HasMathSQL( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>MATHSQL</b></td></tr>
			<tr><td><b>HasGeoCallbacks</b></td>
				<td>HasGeoCallbacks( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>GEOCALLBACKS</b></td></tr>
			<tr><td><b>HasProj</b></td>
				<td>HasProj( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>PROJ</b></td></tr>
			<tr><td><b>HasGeos</b></td>
				<td>HasGeos( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>GEOS</b></td></tr>
			<tr><td><b>HasGeosAdvanced</b></td>
				<td>HasGeosAdvanced( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>GEOSADVANCED</b></td></tr>
			<tr><td><b>HasGeosTrunk</b></td>
				<td>HasGeosTrunk( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>GEOSTRUNK</b></td></tr>






			<tr><td><b>HasLwGeom</b></td>
				<td>HasLwGeom( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>LWGEOM</b></td></tr>
			<tr><td><b>HasLibXML2</b></td>
				<td>HasLibXML2( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>LibXML2</b></td></tr>
			<tr><td><b>HasEpsg</b></td>
				<td>HasEpsg( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>EPSG</b></td></tr>
			<tr><td><b>HasFreeXL</b></td>
				<td>HasFreeXL( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>FREEXL</b></td></tr>
			<tr><td><b>HasGeoPackage</b></td>
				<td>HasGeoPackage( void ) : <i>Boolean</i></td>
				<td colspan="3">TRUE if the underlaying library was built enabling <b>GeoPackage</b> support (<b>GPKG</b>)</b>)</td></tr>













			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="generic">Generic SQL functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CastToInteger</b></td>
				<td>CastToInteger( value <i>Generic</i> ) : <i>Integer</i></td>
				<td colspan="3">returns the intput value possibly casted to the Integer data-type: NULL if no conversion is possible.</td></tr>
			<tr><td><b>CastToDouble</b></td>
				<td>CastToDouble( value <i>Generic</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the intput value possibly casted to the Double data-type: NULL if no conversion is possible.</td></tr>
			<tr><td><b>CastToText</b></td>
				<td>CastToText( value <i>Generic</i> ) : <i>Text</i><hr>
				CastToText( value <i>Generic</i> , zero_pad <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">returns the intput value possibly casted to the Text data-type: NULL if no conversion is possible.<br>
				If an optional argument <b>zero_pad</b> is passed and the input value is of the Integer or Double type, then the returned string will be padded using as much trailing ZEROs so to ensure the required length.</td></tr>
			<tr><td><b>CastToBlob</b></td>
				<td>CastToBlob( value <i>Generic</i> ) : <i>Blob</i><hr>
                                CastToBlob( value <i>Generic</i> , hex_input <i>Boolean</i> ) : <i>Blob</i></td>
				<td colspan="3">returns the intput value possibly casted to the BLOB data-type:
                                if the optional argument <b>hex_input</b> is set to <b>TRUE</b> the input value will be expected to correspond to an HexaDecimal string, e.g. <b>01ab89EF</b>; if this assumption fails then NULL will be returned.<hr>
                                NULL if no conversion is possible.</td></tr>
			<tr><td><b>ForceAsNull</b></td>
				<td>ForceAsNull( val1 <i>Generic</i> , val2 <i>Generic</i>) : <i>Generic</i></td>
				<td colspan="3">if <b>val1</b> and <b>val2</b> are equal (and exactly of the same data-type) NULL will be returned; 
				otherwise <b>val1</b> will be returned absolutely untouched and still preserving its originale data-type.</td></tr>
			<tr><td><b>CreateUUID</b></td>
				<td>CreateUUID( void ) : <i>Text</i></td>
				<td colspan="3">returns a Version 4 (random) UUID (<a href="http://en.wikipedia.org/wiki/Universally_unique_identifier">Universally unique identifier</a>).</td></tr>
			<tr><td><b>MD5Checksum</b></td>
				<td>MD5Checksum( BLOB | TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the <a href="http://en.wikipedia.org/wiki/MD5">MD5 checksum</a> corresponding to the input value.<br>Will return <b>NULL</b> for non-BLOB or non-TEXT input.</td></tr>
			<tr><td><b>MD5TotalChecksum</b></td>
				<td>MD5TotalChecksum( BLOB | TEXT ) : <i>Text</i></td>
				<td colspan="3">returns a cumulative MD5 checksum.<br><b><u>aggregate function</u></b></td></tr>
			<tr><td><b>EncodeURL</b></td>

				<td>EncodeURL( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the <a href="http://en.wikipedia.org/wiki/Percent-encoding">percent encoded URL</a> corresponding to the input value.<br>Will return <b>NULL</b> for invalid input.</td></tr>





			<tr><td><b>DecodeURL</b></td>

				<td>DecodeURL( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns a plain URL from its corresponding percent encoding.<br>Will return <b>NULL</b> for invalid input.</td></tr>





			<tr><td><b>DirNameFromPath</b></td>
				<td>DirNameFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the Directory Name from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any simple path lacking a Directory.</td></tr>
			<tr><td><b>FullFileNameFromPath</b></td>
				<td>FullFileNameFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the Full File Name (including an eventual File Extension) from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
				 lacking a File Name.</td></tr>
................................................................................
				<td>FileNameFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the File Name (excluding an eventual File Extension) from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
				 lacking a File Name.</td></tr>
			<tr><td><b>FileExtFromPath</b></td>
				<td>FileExtFromPath( TEXT ) : <i>Text</i></td>
				<td colspan="3">returns the File Extension from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
				 lacking a File Name or when no Extension is present.</td></tr>







			<tr><td><b>eval</b></td>
				<td>eval( X <i>TEXT</i> [ , Y <i>TEXT</i> ) : <i>Text</i></td>
				<td colspan="3">Evaluate the SQL text in <b>X</b>.  Return the results, using string <b>Y</b> as the separator.<br>
				If <b>Y</b> is omitted, use a single space character.<hr>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>




































































			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="math">SQL math functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Abs</b></td>
				<td>Abs( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the absolute value of <b>x</b></td></tr>
			<tr><td><b>Acos</b></td>
				<td>Acos( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the arc cosine of <b>x</b>, that is, the value whose cosine is <b>x</b><br>
				returns NULL if <b>x</b> is not in the range -1 to 1</td></tr>
			<tr><td><b>Asin</b></td>
				<td>Asin( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the arc sine of <b>x</b>, that is, the value whose sine is <b>x</b><br>
				returns NULL if <b>x</b> is not in the range -1 to 1</td></tr>
			<tr><td><b>Atan</b></td>
				<td>Atan( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the arc tangent of <b>x</b>, that is, the value whose tangent is <b>x</b></td></tr>




			<tr><td><b>Ceil<br>Ceiling</b></td>
				<td>Ceil( x <i>Double precision</i> ) : <i>Double precision</i><hr>
				Ceiling( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the smallest integer value not less than <b>x</b></td></tr>
			<tr><td><b>Cos</b></td>
				<td>Cos( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the cosine of <b>x</b>, where <b>x</b> is given in <u>radians</u></td></tr>
................................................................................
				<td colspan="3">returns the largest integer value not greater than <b>x</b></td></tr>
			<tr><td><b>Ln</b><br><b>Log</b></td>
				<td>Ln( x <i>Double precision</i> ) : <i>Double precision</i><hr>
				Log( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the natural logarithm of <b>x</b>; that is, the base-<b><i>e</i></b> logarithm of <b>x</b><br>
				If <b>x</b> is less than or equal to 0, then NULL is returned</td></tr>
			<tr><td><b>Log</b></td>
				<td>Log( b <i>Double precision</i> , x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the logarithm of <b>x</b> to the base <b>b</b><br>
				If <b>x</b> is less than or equal to 0, or if <b>b</b> is less than or equal to 1, then NULL is returned<hr>
				<b>Log(b, x)</b>  is equivalent to <b>Log(x)</b> / <b>Log(b)</b></td></tr>
			<tr><td><b>Log2</b></td>
				<td>Log2( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the base-2 logarithm of <b>x</b><hr>
				<b>Log2(x)</b>  is equivalent to <b>Log(x)</b> / <b>Log(2)</b></td></tr>
			<tr><td><b>Log10</b></td>
				<td>Log10( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the base-10 logarithm of <b>x</b><hr>
................................................................................
				<td colspan="3">returns the population variance of the input values (<i>square of the population standard deviation</i>)<br>
				<b><u>aggregate function</u></b></td></tr>
			<tr><td><b>Var_samp</b></td>
				<td>Var_samp( x <i>Double precision</i> ) : <i>Double precision</i></td>
				<td colspan="3">returns the sample variance of the input values (<i>square of the sample standard deviation</i>)<br>
				<b><u>aggregate function</u></b></td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="error">SQL functions reporting GEOS / LWGEOM errors and warnings</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>GEOS_GetLastWarningMsg</b></td>
				<td>GEOS_GetLastWarningMsg( <i>void</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td colspan="2">Will return the most recent warning message returned by GEOS (if any).<hr>
................................................................................
				<td>GEOS_GetCriticalPointFromMsg( <i>void</i> ) : <i>Point</i><hr>
				GEOS_GetCriticalPointFromMsg( SRID <i>Integer</i> ) : <i>Point</i></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td colspan="2">Will (possibly) return a Point Geometry extracted from the latest error / warning
				message returned by GEOS.<hr>
				<b>NULL</b> will be returned if there is no pending GEOS message, or if the current GEOS message
				doesn't contain a critical Point.</td></tr>
			<tr><td><b>LWGEOM_GetLastWarningMsg</b></td>
				<td>LWGEOM_GetLastWarningMsg( <i>void</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td colspan="2">Will return the most recent warning message returned by LWGEOM (if any).<hr>
				<b>NULL</b> will be returned if there is no pending LWGEOM warning.</td></tr>
			<tr><td><b>LWGEOM_GetLastErrorMsg</b></td>
				<td>LWGEOM_GetLastErrorMsg( <i>void</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td colspan="2">Will return the most recent error message returned by LWGEOM (if any).<hr>
				<b>NULL</b> will be returned if there is no pending LWGEOM error.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="length_cvt">SQL length/distance unit-conversion functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Kilometer</b></td>
				<td>CvtToKm( x <i>Double precision</i> ) : <i>Double precision</i><hr>
................................................................................
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="dms_cvt">SQL conversion functions from DD/DMS notations (longitude/latitude)</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>DD to DMS</b></td>
				<td>LongLatToDMS( longitude <i>Double precision</i> , latitude <i>Double precision</i> ) : <i>String</i></td>
				<td colspan="3">will return a DMS string (Degrees, Minutes and Seconds) starting from DD (Decimal Degrees) input coordinates<hr>
                                <b>NULL</b> will be returned on invalid input.</tr>
			<tr><td><b>DMS to DD</b></td>
				<td>LongitudeFromDMS( dms_expression <i>Sting</i> ) : <i>Double precision</i><hr>
                                    LatitudeFromDMS( dms_expression <i>Sting</i> ) : <i>Double precision</i></td>
				<td colspan="3">will return the DD coordinates from within a DMS expression<hr>
                                <b>NULL</b> will be returned on invalid input.</tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
				<h3><a name="blob">SQL utility functions for BLOB objects</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>IsZipBlob</b></td>
				<td>IsZipBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid ZIP-compressed file</td></tr>
			<tr><td><b>IsPdfBlob</b></td>
				<td>IsPdfBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid PDF document</td></tr>
			<tr><td><b>IsGifBlob</b></td>
				<td>IsGifBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid GIF image</td></tr>
			<tr><td><b>IsPngBlob</b></td>
				<td>IsPngBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid PNG image</td></tr>
			<tr><td><b>IsTiffBlob</b></td>
				<td>IsTiffBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid TIFF image</td></tr>
			<tr><td><b>IsJpegBlob</b></td>
				<td>IsJpegBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid JPEG image</td></tr>
			<tr><td><b>IsExifBlob</b></td>
				<td>IsExifBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid EXIF image<br>
					<u>Please note:</u> any valid EXIF image is a valid JPEG as well</td></tr>
			<tr><td><b>IsExifGpsBlob</b></td>
				<td>IsExifGpsBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid EXIF-GPS image<br>
					<u>Please note:</u> any valid EXIF-GPS image is a valid EXIF and JPEG as well</td></tr>
			<tr><td><b>IsWebpBlob</b></td>
				<td>IsWebpBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid WebP image</td></tr>
			<tr><td><b>IsJP2Blob</b></td>
				<td>IsJP2Blob( image <i>BLOB</i> ) : <i>Integer</i></td>
				<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL or not-BLOB argument.<hr>
					TRUE if this BLOB object corresponds to a valid JP2 [Jpeg2000] image</td></tr>
			<tr><td><b>GetMimeType</b></td>
				<td>GetMimeType( payload <i>BLOB</i> ) : <i>String</i></td>
				<td colspan="3">The return type is Text, and could be one of: <b>image/gif</b>, <b>image/png</b>,
					<b>image/jpeg</b>, <b>image/jp2</b>, </b></v><b>image/tiff</b>, <b>image/svg+xml</b>, <b>application/xml</b>,
					<b>application/zip</b>,	<b>application/pdf</b>.<br>
					NULL could be returned for an invalid argument or if no valid mime-type is detected.</td></tr>



















			<tr><td><b>BlobFromFile</b></td>
				<td>BlobFromFile( filepath <i>String</i> ) : <i>BLOB</i></td>
				<td colspan="3">If <i>filepath</i> corresponds to some valid pathname, and the corresponding file
					can be actually accessed in read mode, then the whole file content will be returned as a
					BLOB value.<br>
					Otherwise NULL will be returned.<br>
					<u>Please note:</u> SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).<hr>
                                        <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                                        Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>BlobToFile</b></td>
				<td>BlobToFile( payload <i>BLOB</i> , filepath <i>String</i> ) : <i>Integer</i></td>
				<td colspan="3">If <i>payload</i> is of the BLOB-type, and if <i>filepath</i> corresponds to some valid pathname 
					(accessible in write/create mode), then the corresponding file will be created/overwritten so to
					contain the <i>payload</i>.<br>
					The return type is Integer, with a return value of 1 for success, 0 for failure.<hr>
                                        <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                                        Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>CountUnsafeTriggers</b></td>
				<td>CountUnsafeTriggers( ) : <i>Integer</i></td>
				<td colspan="3">This SQL function checks if the currently connected DB does contain any potentially malicious Trigger;
					carefully checking this conditions is a minimal precaution expected to be always verified before eventually activating the <b>SPATIALITE_SECURITY=relaxed</b> mode.<hr>
					The return type is Integer (total count of suspected Triggers); 0 means that the currently connected DB should be considered absolutely safe.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p0">SQL utility functions [<i>non-standard</i>] for geometric objects</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
................................................................................
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>GeomFromExifGpsBlob</b></td>
				<td>GeomFromExifGpsBlob( image <i>BLOB</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>a POINT Geometry will be returned representing the GPS long/lat contained within EXIF-GPS <i>metadata</i>
				for the BLOB image<hr>
				NULL will be returned if for any reason it's not possible to build such a POINT</td></tr>
			<tr><td><b>ST_Point</b></td>
				<td>ST_Point( x <i>Double precision</i> , y <i>Double precision</i>  ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>simply an alias-name for <b>MakePoint()</b><br>
				<u>Please note</u>: the <u>SRID</u> argument is never supported by <u>ST_Point()</u></td></tr>
			<tr><td><b>MakePoint</b></td>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>will return a closed LINESTRING approximating the Circle defined by <b>cx, cy</b> and <b>radius</b>.<br>
                                The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
                                The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
                        <tr><td><b>MakeEllipse</b></td>
				<td>MakeEllipse( cx <i>Double precision</i> , cy <i>Double precision</i> ,
				x_axis <i>Double precision</i> , y_axis <i>Double precisin</i> [ , SRID <i>Integer</i> [ , 
                                step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>will return a closed LINESTRING approximating the Ellipse defined by <b>cx, cy</b> and <b>x_axis, y_axis</b>.<br>
                                The optional argument <b>step</b> if specified defines how many points will be interpolated on the ellipse; a point will be set every <b>step</b> degrees.<br>
                                The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
                        <tr><td><b>MakeArc</b></td>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>will return a POLYGON approximating the Circular Stripe delimited by two arcs sharing the same Centre [<b>cx</b>, <b>cy</b>]
                                but having different radii [<b>radius_1</b>, <b>radius_2</b>]; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
                                The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
                                The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
			<tr><td><b>SquareGrid</b></td>
				<td>SquareGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , edges_only <i>Boolean</i> , [ origing <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
                                    ST_SquareGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , edges_only <i>Boolean</i> , [ origing <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a grid of square cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
                                The returned Geometry will usually be of the <b>MultiPolygon</b> type (a collection of Squares), but will be a <b>MultiLinestring</b> if the optional <b>edges_only</b> argument is set to <b>TRUE</b><br>





                                If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
				NULL will be returned if any error is encountered.</td></tr>
			<tr><td><b>TriangularGrid</b></td>
				<td>TriangularGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , edges_only <i>Boolean</i> , [ origing <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
                                    ST_TriangularGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , edges_only <i>Boolean</i> , [ origing <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a grid of triangular cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
                                The returned Geometry will usually be of the <b>MultiPolygon</b> type (a collection of Squares), but will be a <b>MultiLinestring</b> if the optional <b>edges_only</b> argument is set to <b>TRUE</b><br>





                                If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
				NULL will be returned if any error is encountered.</td></tr>
			<tr><td><b>HexagonalGrid</b></td>
				<td>HexagonalGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , edges_only <i>Boolean</i> , [ origing <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
                                    ST_HexagonalGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , edges_only <i>Boolean</i> , [ origing <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a grid of hexagonal cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
                                The returned Geometry will usually be of the <b>MultiPolygon</b> type (a collection of Squares), but will be a <b>MultiLinestring</b> if the optional <b>edges_only</b> argument is set to <b>TRUE</b><br>





                                If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
				NULL will be returned if any error is encountered.</td></tr>
			<tr><td><b>BuildMbr</b></td>
				<td>BuildMbr( x1 <i>Double precision</i> , y1 <i>Double precision</i> ,
				x2 <i>Double precision</i> , y2 <i>Double precision</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the SVG [<i>Scalable Vector Graphics</i>] representation</td></tr>
			<tr><td><b>AsKml</b></td>
				<td>AsKml( geom <i>Geometry</i> [ , precision <i>Integer</i> ] ) : <i>String</i><br>
				AsKml( name <i>String</i>, description <i>String</i>, geom <i>Geometry</i> [ , precision <i>Integer</i> ] ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ.4</td>
				<td>returns the KML [<i>Keyhole Markup Language</i>] representation<br>
				The first form will simply generate the geometry element: the second form will generate a complete KML entity</td></tr>
			<tr><td><b>GeomFromKml</b></td>
				<td>GeomFromKml( KmlGeometry <i>String</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>construct a geometric object given its KML Representation</td></tr>	
................................................................................
				<td>returns the EWKT [<i>Extended Well Known Text</i>] representation (PostGIS compatibility)</td></tr>
			<tr><td><b>GeomFromEWKT</b></td>
				<td>GeomFromEWKT( ewktGeometry <i>String</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>construct a geometric object given its EWKT Representation</td></tr>	
			<tr><td><b>AsFGF</b></td>
				<td>AsFGF( geom <i>Geometry</i> ) : <i>Binary</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the FGF [<i>FDO Geometry Binary Format</i>] representation</td></tr>







			<tr><td><b>GeomFromFGF</b></td>
				<td>GeomFromFGF( fgfGeometry <i>Binary</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>construct a geometric object given its FGF binary Representation</td></tr>










































			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p4">SQL functions on type Geometry</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
					<b>2</b>, <b>3</b> or <b>4</b></td></tr>
			<tr><td><b>Is3D</b></td>
				<td>ST_Is3D( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Checks if <i>geom</i> has the Z dimension.<br>
                                    The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
                                    and -1 for UNKNOWN corresponding to a function invocation on invalid arguments.</td></tr>
			<tr><td><b>IsMeasured</b></td>
				<td>ST_IsMeasured( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Check if <i>geom</i> has the M dimension.<br>
                                    The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
                                    and -1 for UNKNOWN corresponding to a function invocation on invalid arguments.</td></tr>
			<tr><td><b>GeometryType</b></td>
				<td>GeometryType( geom <i>Geometry</i> ) : <i>String</i><hr>
					ST_GeometryType( geom <i>Geometry</i> ) : <i>String</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the name of the instantiable subtype of Geometry of which this geometric object is a member, as a string</td></tr>
			<tr><td><b>SRID</b></td>
				<td>SRID( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_SRID( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns the Spatial Reference System ID for this geometric object</td></tr>
			<tr><td><b>SetSRID</b></td>
				<td>SetSRID( geom <i>Geometry</i> , SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>directly sets the Spatial Reference System ID for this geometric object [no reprojection is applied]<hr>
					The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>IsEmpty</b></td>
				<td>IsEmpty( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_IsEmpty( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.<hr>
					TRUE if this geometric object corresponds to the empty set</td></tr>
			<tr><td><b>IsSimple</b></td>
				<td>IsSimple( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_IsSimple( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.<hr>
					TRUE if this geometric object is simple, as defined in the Geometry Model</td></tr>
			<tr><td><b>IsValid</b></td>
				<td>IsValid( geom <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_IsValid( geom <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.<hr>


					TRUE if this geometric object does  not contains any topological error</td></tr>
			<tr><td><b>IsValidReason</b></td>
				<td>IsValidReason( geom <i>Geometry</i> ) : <i>String</i><hr>
					ST_IsValidReason( geom <i>Geometry</i> ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Will return a TEXT string stating if a Geometry is valid and if not valid, a reason why.<hr>


					NULL will be returned on invalid arguments.</td></tr>
			<tr><td><b>IsValidDetail</b></td>
				<td>IsValidDetail( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_IsValidDetail( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Will return a Geometry detail (usually a <b>POINT</b>) causing invalidity.<hr>


					NULL will be returned on invalid arguments, or in the case of a valid Geometry.</td></tr>
			<tr><td><b>Boundary</b></td>
				<td>Boundary( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_Boundary( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>returns a geometric object that is the combinatorial boundary of g as defined in the Geometry Model</td></tr>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Geometry [if a valid Geometry was supplied], or NULL in any other case.<hr>
                                    Any Linestring or Ring will be in reverse order (first vertex will be the last one,
                                    and last vertex will be the first one).</td></tr>
			<tr><td><b>ForceLHR</b></td>
				<td>ST_ForceLHR( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>







				<td>returns a new Geometry [if a valid Geometry was supplied], or NULL in any other case.<hr>
                                    Any Polygon Ring will be oriented accordingly to Left Hand Rule (Exterior
                                    Ring will be clockwise oriented, and Interior Rings will be counter-clockwise oriented).</td></tr>























			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="repair">SQL functions attempting to repair malformed Geometries</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a (possibly) sanitized Geometry [<i>if a valid Geometry was supplied</i>], or NULL in any other case<hr>
					<u>Please note</u>: current implementations only affects:<ul>
						<li>repeated vertices suppression</li>
						<li>Ring's closure enforcement</li>
					</ul></td></tr>



























			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="compress">SQL Geometry-compression functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CastToXY</b></td>
				<td>CastToXY( geom <i>Geometry</i> ) : geom <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XY</b>] space dimension</td></tr>
			<tr><td><b>CastToXYZ</b></td>
				<td>CastToXYZ( geom <i>Geometry</i> ) : geom <i>Geometry</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XYZ</b>] space dimension</td></tr>


			<tr><td><b>CastToXYM</b></td>
				<td>CastToXYM( geom <i>Geometry</i> ) : geom <i>Geometry</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XYZM</b>] space dimension</td></tr>


			<tr><td><b>CastToXYZM</b></td>
				<td>CastToXYZM( geom <i>Geometry</i> ) : geom <i>Geometry</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a Geometry using the [<b>XYZM</b>] space dimension</td></tr>



			<tr><td colspan="7" align="center" bgcolor="#f0f0c0">
				<h3><a name="p5">SQL functions on type Point</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				but they are by far quickest to compute</td></tr>
			<tr><td><b>IsClosed</b></td>
				<td>IsClosed( c <i>Curve</i> ) : <i>Integer</i><hr>
					ST_IsClosed( c <i>Curve</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments;<hr>
					return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c)</td></tr>
			<tr><td><b>IsRing</b></td>
				<td>IsRing( c <i>Curve</i> ) : <i>Integer</i><hr>
					ST_IsRing( c <i>Curve</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.<hr>
					return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through 
					the same Point more than once.</td></tr>
			<tr><td><b>PointOnSurface</b></td>
				<td>PointOnSurface( s <i>Surface/Curve</i> ) : <i>Point</i><hr>
					ST_PointOnSurface( s <i>Surface/Curve</i> ) : <i>Point</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
................................................................................
				<td>return a Point guaranteed to lie on the Surface (or Curve)</td></tr>
			<tr><td><b>Simplify</b></td>
				<td>Simplify( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i><hr>
                                ST_Simplify( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i><hr>
				ST_Generalize( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a geometric object representing a simplified version of <i>c</i> applying the Douglas-Peukert 
algorithm with given <i>tolerance</i></td></tr>
			<tr><td><b>SimplifyPreserveTopology</b></td>
				<td>SimplifyPreserveTopology( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i><hr>
                                ST_SimplifyPreserveTopology( c <i>Curve</i> , tolerance <i>Double precision</i> ) : <i>Curve</i></td></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return a geometric object representing a simplified version of <i>c</i> applying the Douglas-Peukert 
algorithm with given <i>tolerance</i> and respecting topology</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p7">SQL functions on type LineString</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the number of Points in the LineString</td></tr>
			<tr><td><b>PointN</b></td>
				<td>PointN( line <i>LineString</i> , n <i>Integer</i> ) : <i>Point</i><hr>
					ST_PointN( line <i>LineString</i> , n <i>Integer</i> ) : <i>Point</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a Point containing Point n of line</td></tr>
			<tr><td><b>AddPoint</b></td>
				<td>AddPoint( line <i>LineString</i> , point <i>Point</i> [ , position <i>Integer</i> ] ) : <i>Linestring</i><hr>
					ST_AddPoint( line <i>LineString</i> , point <i>Point</i> [ , position <i>Integer</i> ] ) : <i>Linestring</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>returns a new Linestring by adding a new Point into the input Linestring immediately before <b>position</b> (zero-based index).<br>
                                A negative <b>position</b> (default) means appending the new Point to the end of the input Linestring.<br>
................................................................................
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>return the area of s</td></tr>
			<tr><td>Area( s <i>Surface</i> , use_ellipsoid <i>Boolean</i> ) : <i>Double precision</i><hr>
					ST_Area( s <i>Surface</i> , use_ellipsoid <i>Boolean</i> ) : <i>Double precision</i>
				</td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return the area of s (measured in meters).<br>
If the <b>use_ellipsoid</b> argument is set to <b>TRUE</b> the precise (but slower) area will be computed on the Ellipsoid, otherwise will be computed on the Sphere (approximative, but faster).<hr>
This function only supports Long/Lat coordinates, and will return NULL for any planar CRS</td></tr>

























			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p9">SQL functions on type Polygon</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the number of interiorRings</td></tr>
			<tr><td><b>InteriorRingN</b></td>
				<td>InteriorRingN( polyg <i>Polygon</i> , n <i>Integer</i> ) : <i>LineString</i><hr>
					ST_InteriorRingN( polyg <i>Polygon</i> , n <i>Integer</i> ) : <i>LineString</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the nth interiorRing. The order of Rings is not geometrically significant.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p10">SQL functions on type GeomCollection</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the number of individual Geometries</td></tr>
			<tr><td><b>GeometryN</b></td>
				<td>GeometryN( geom <i>GeomCollection</i> , n <i>Integer</i> ) : <i>Geometry</i><hr>
					ST_GeometryN( geom <i>GeomCollection</i> , n <i>Integer</i> ) : <i>Geometry</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the nth geometric object in the collection.
					The order of the elements in the collection is not geometrically significant.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p11">SQL functions that test approximate spatial relationships via MBRs</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>MbrEqual</b></td>
				<td>MbrEqual( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if g1 and g2 have equal MBRs</td></tr>
			<tr><td><b>MbrDisjoint</b></td>
				<td>MbrDisjoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 MBRs is the empty set</td></tr>
			<tr><td><b>MbrTouches</b></td>
				<td>MbrTouches( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2</td></tr>
			<tr><td><b>MbrWithin</b></td>
				<td>MbrWithin( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if g1 MBR is completely contained in g2 MBR</td></tr>
			<tr><td><b>MbrOverlaps</b></td>
				<td>MbrOverlaps( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 MBRs results in a value of the same
					dimension as g1 and g2 that is different from both g1 and g2</td></tr>
			<tr><td><b>MbrIntersects</b></td>
				<td>MbrIntersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<br>
					convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty</td></tr>
			<tr><td><b>EnvelopesIntersects</b></td>
				<td>ST_EnvIntersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
				    ST_EnvelopesIntersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
				    ST_EnvIntersects( geom1 <i>Geometry</i> , x1 <i>Double precision</i> , y1 <i>Double precision</i> , x2 <i>Double precision</i> , y2 <i>Double precision</i> ) : <i>Integer</i><hr>
				    ST_EnvelopesIntersects( geom1 <i>Geometry</i> , x1 <i>Double precision</i> , y1 <i>Double precision</i> , x2 <i>Double precision</i> , y2 <i>Double precision</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The first form simply is an <u>alias name</u> for <b>MbrIntersects</b>; the other form allows to define the second MBR by two extreme points [<b>x1, y1</b>] and [<b>x2, y2</b>].<br>
                                        The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on invalid arguments;<br>
					convenience predicate: TRUE if the intersection of both MBRs is not empty</td></tr>
			<tr><td><b>MbrContains</b></td>
				<td>MbrContains( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<hr>
					convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p12">SQL functions that test spatial relationships</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
................................................................................
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Equals</b></td>
				<td>Equals( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Equals( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if g1 and g2 are equal</td></tr>
			<tr><td><b>Disjoint</b></td>
				<td>Disjoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Disjoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 is the empty set</td></tr>
			<tr><td><b>Touches</b></td>
				<td>Touches( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Touches( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2</td></tr>
			<tr><td><b>Within</b></td>
				<td>Within( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Within( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if g1 is completely contained in g2</td></tr>
			<tr><td><b>Overlaps</b></td>
				<td>Overlaps( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Overlaps( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 results in a value of the same
					dimension as g1 and g2 that is different from both g1 and g2</td></tr>
			<tr><td><b>Crosses</b></td>
				<td>Crosses( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Crosses( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments.<hr>
					TRUE if the intersection of g1 and g2 results in a value whose dimension is less 
					than the maximum dimension of g1 and g2 and the intersection value includes Points 
					interior to both g1 and g2, and the intersection value is not equal to either g1 or g2</td></tr>
			<tr><td><b>Intersects</b></td>
				<td>Intersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Intersects( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<br>
					convenience predicate: TRUE if the intersection of g1 and g2 is not empty</td></tr>
			<tr><td><b>Contains</b></td>
				<td>Contains( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Contains( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<hr>
					convenience predicate: TRUE if g2 is completely contained in g1</td></tr>
			<tr><td><b>Covers</b></td>
				<td>Covers( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_Covers( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<hr>
					convenience predicate: TRUE if g1 completely covers g2</td></tr>
			<tr><td><b>CoveredBy</b></td>
				<td>CoveredBy( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i><hr>
					ST_CoveredBy( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 
					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<hr>
					convenience predicate: TRUE if g1 is completely covered by g2</td></tr>
			<tr><td><b>Relate</b></td>

				<td>Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , patternMatrix <i>String</i> ) : <i>Integer</i><hr>
					ST_Relate( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> , patternMatrix <i>String</i> ) : <i>Integer</i></td>
				<td align="center" bgcolor="#d0f0d0">X</td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>

				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, 

					and &#8211;1 for UNKNOWN corresponding to a function invocation on NULL arguments;<hr>
					returns TRUE if the spatial relationship specified by the patternMatrix holds</td></tr>





























			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p13">SQL functions for distance relationships</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
				<td>return the distance between geom1 and geom2 (measured in meters).<br>
If the <b>use_ellipsoid</b> argument is set to <b>TRUE</b> the precise (but slower) distance will be computed on the Ellipsoid, otherwise will be computed on the Great Cicle (approximative, but faster).<hr>
This function only supports Long/Lat coordinates, and will return NULL for any planar CRS</td></tr>
			<tr><td><b>PtDistWithin</b></td>
				<td>PtDistWithin( geom1 <i>Geometry</i> , geom2 <i>Geometry</i>, range <i>Double precision</i> [, use_spheroid <i>Integer</i> ] ) 
					: <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ.4</td>
				<td>return TRUE (1) if the distance between <i>geom1</i> and <i>geom2</i> is within the given range.<br>
				Usually distances are expressed in the length unit corresponding to the geoms own SRID:
				but if both geoms are simple POINTs and their SRID is 4326 (i.e. WGS84), then distances are
				expressed in <b>meters</b>.<br>
				In this later case the optional arg <i>use_spheroid</i> can be used to select the distance
				algorithm to be used: is <i>use_spheroid = 1</i> the slowest but most accurate <b>geodesic distance</b>
				will be evaluated: in any other case the simplest <b>great circle distance</b> will be used instead</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">




















































				<h3><a name="p14">SQL functions that implement spatial operators</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Intersection</b></td>
................................................................................
					end_fraction <i>Double precision</i> ) : <i>Curve</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Return a Linestring being a substring of the input one starting and ending at the given fractions of total 2d length.<br>
					Second and third arguments are expected to be in the range between <b>0.0</b> and <b>1.0</b>.<br>
					NULL is returned for invalid arguments</td></tr>
			<tr><td><b>ClosestPoint</b></td>
				<td>ClosesetPoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Point</i><hr>
					ST_ClosesetPoint( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Point</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Returns the Point on geom1 that is closest to geom2.<br>
					NULL is returned for invalid arguments (or if distance is ZERO)</td></tr>
			<tr><td><b>ShortestLine</b></td>
				<td>ShortestLine( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Curve</i><hr>
					ST_ShortestLine( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Curve</i></td>
................................................................................
				<td>UnaryUnion( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_UnaryUnion( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0d0">GEOS</td>
				<td>Exactely the same as <b><u>ST_Union</u></b>, but applied to a single Geometry.<br>
					(<i>set union of elementary Geometries within a MULTI- or GEOMETRYCOLLECTION complex Geometry</i>)<hr>
				NULL will be returned if any error is encountered</td></tr>





































			<tr><td><b>DissolveSegments</b></td>
				<td>DissolveSegments( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_DissolveSegments( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>a Geometry (actually corresponding to a <i>LINESTRING</i>, <i>MULTILINESTRING</i> or <i>GEOMETRYCOLLECTION</i>) 
				will be returned.<br>
................................................................................
			<tr><td><b>ExtractMultiPolygon</b></td>
				<td>ExtractMultiPolygon( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Given any arbitrary GEOMETRY will return a derived <b>MULTIPOLYGON</b> geometry.
				Sub-geometries not being of the <b>POLYGON</b> type will be ignored.<br>
				NULL will be returned if any error is encountered (or when no POLYGON is found).</td></tr>
			<tr><td><b>LocateAlongMeasure</b></td>
				<td>ST_Locate_Along_Measure( geom <i>Geometry</i> , m_value <i>Double precision</i> ) : <i>Geometry</i><hr>
				    ST_LocateAlong( geom <i>Geometry</i> , m_value <i>Double precision</i> ) : <i>Geometry</i></hr></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Return a derived geometry collection value with elements that match the specified measure.<br>
				NULL will be returned if any error is encountered (or when no element corresponding to the given measure is found).<br>
                                <u>Please note</u>: NULL will be returned if geom doesn't contain M-dimension, or if geom contains a Polygon, or if geom is a GeometryCollection.</td></tr>
			<tr><td><b>LocateBetweenMeasures</b></td>
				<td>ST_Locate_Between_Measures( geom <i>Geometry</i> , m_start <i>Double precision</i> , m_end <i>Double precision</i> ) : <i>Geometry</i><hr>
				    ST_LocateBetween( geom <i>Geometry</i> , m_start <i>Double precision</i> , m_end <i>Double precision</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Return a derived geometry collection value with elements that match the specified range of measures.<br>
				NULL will be returned if any error is encountered (or when no element corresponding to the given range of measures is found).<br>
                                <u>Please note</u>: NULL will be returned if geom doesn't contain M-dimension, or if geom contains a Polygon, or if geom is a GeometryCollection.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p14c">SQL functions that implement spatial operators<br>[GEOS advanced features]</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
					The input Geometry could have any arbitrary type; eventually all Linestring's / Polygon's vertices will be dissolved into Points, so to implicitly always get a MultiPoint.<br>
					The returned Geometry will always be of the <b>Polygon</b> or <b>MultiPolygon</b> type.<br>
                                        The default <b>factor</b> applies a <b>3&sigma;</b> filtering; by declaring some <i>lower</i> factor you can get a more aggressive filtering effect.<br>
                                        By setting the optional <b>allow_holes</b> argument to <b>TRUE</b> all <i>interior holes</i> will be preserved.<br>
                                        The optional argument <b>tolerance</b> is intended to normalize the input Geometry, suppressing repeated (or too close) Points.<br>
					NULL is returned on failure.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p14d">SQL functions that implement spatial operators<br>[LWGEOM features]</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>MakeValid</b></td>
				<td>MakeValid( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_MakeValid( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a geometric object representing the <i>repaired</i> version of the input Geometry.<br>
                                        If the input Geometry was already valid, then it will be returned exactly as it was.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>MakeValidDiscarded</b></td>
				<td>MakeValidDiscarded( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					ST_MakeValidDiscarded( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a geometric object containing all elements that would be eventually <i>discarded</i> by ST_MakeValid() while validating the same input Geometry.<br>
					NULL is returned on failure, or if no <i>discarded</i> item exists.</td></tr>
			<tr><td><b>Segmentize</b></td>
				<td>Segmentize( geom <i>Geometry</i>, dist <i>Double precision</i>  ) : <i>Geometry</i><hr>
					ST_Segmentize( geom <i>Geometry</i> , dist <i>Double precision</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a new Geometry corresponding to the input Geometry; as much Linestring / Ring vertices 
                                        as required will be eventually interpolated so to ensure that no segment will be longer than <i>dist</i>.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>Split</b></td>
				<td>Split( geom <i>Geometry</i>, blade <i>Geometry</i>  ) : <i>Geometry</i><hr>
					ST_Split( geom <i>Geometry</i> , blade <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a new Geometry collecting all items resulting by splitting the input Geometry by the <i>blade</i>.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>SplitLeft</b></td>
				<td>SplitLeft( geom <i>Geometry</i>, blade <i>Geometry</i>  ) : <i>Geometry</i><hr>
					ST_SplitLeft( geom <i>Geometry</i> , blade <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a new Geometry collecting all items resulting by splitting the input Geometry by the <i>blade</i> and falling on the <i>left side</i>.<br>
                                        All items not affected by the split operation (i.e. not intersecting the <i>blade</i>) will be returned into the <i>left</i> collection.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>SplitRight</b></td>
				<td>SplitRight( geom <i>Geometry</i>, blade <i>Geometry</i>  ) : <i>Geometry</i><hr>
					ST_SplitRight( geom <i>Geometry</i> , blade <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a new Geometry collecting all items resulting by splitting the input Geometry by the <i>blade</i> and falling on the <i>right side</i>.<br>
					NULL is returned on failure (or if the <i>right side</i> is empty).</td></tr>
			<tr><td><b>Azimuth</b></td>
				<td>Azimuth( pt1 <i>Geometry</i>, pt2 <i>Geometry</i>  ) : <i>Double precision</i><hr>
					ST_Azimuth( pt1 <i>Geometry</i> , pt2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return the angle (in radians) from the horizontal of the vector defined by <b>pt1</b> and <b>pt2</b>.<br>
                                        Both <b>pt1</b> and <b>pt2</b> are expected to be simple Points.<br>
					Starting since <u>4.1.0</u> if both points supports <u>long/lat</u> coords the returned Azimuth will be precisely computed on the ellipsoid.<br>
					NULL is returned on failure.<hr>
                                        On the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2</td></tr>
			<tr><td><b>Project</b></td>
				<td>Project( start_point <i>Geometry</i>, distance <i>Double precision</i>, azimuth <i>Double precision</i>  ) : <i>Geometry</i><hr>
					ST_Project( start_point <i>Geometry</i>, distance <i>Double precision</i>, azimuth <i>Double precision</i>  ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return a new Point projected from a start point using a bearing and distance.<br>
                                        <b>start_point</b> is expected to be simple <u>long/lat</u> Point.<br>
					<b>distance</b> is expected to be measured in <u>meters</u>; <b>azimuth</b> (aka <u>bearing</u> or <u>heading</u>) has the same identical meaning as in <b>ST_Azimuth()</b>.<br>
					NULL is returned on failure or on invalid arguments.</td></tr>
			<tr><td><b>SnapToGrid</b></td>
				<td>SnapToGrid( geom <i>Geometry</i> , size <i>Double precision</i>  ) : <i>Geometry</i><br>
				        SnapToGrid( geom <i>Geometry</i> , size_x <i>Double precision</i> , size_y <i>Double precision</i> ) : <i>Geometry</i><br>
................................................................................
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a new Geometry corresponding to the input Geometry; all points and vertices will be snapped to the grid defined by its origin and size(s).<br>
                                        Removes all consecutive points falling on the same cell.<br>
                                        All collapsed geometries will be stripped from the returned Geometry.<br>
					NULL is returned on failure.</td></tr>
			<tr><td><b>GeoHash</b></td>
				<td>GeoHash( geom <i>Geometry</i> ) : <i>String</i><hr>
					ST_GeoHash( geom <i>Geometry</i> ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>Return a GeoHash representation (geohash.org) of the geometry.<br>
                                    A GeoHash encodes a point into a text form that is sortable and searchable based on prefixing.<hr>








                                    ST_GeoHash will not work with geometries that are not in geographic (lon/lat) coordinates</td></tr>
			<tr><td><b>AsX3D</b></td>
				<td>AsX3D( geom <i>Geometry</i> ) : <i>String</i><br>
				AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> ) : <i>String</i><br>
				AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> ) : <i>String</i><br>
				AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> , refid <i>String</i> ) : <i>String</i><hr>
				ST_AsX3D( geom <i>Geometry</i> ) : <i>String</i><br>
				ST_AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> ) : <i>String</i><br>
				ST_AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> ) : <i>String</i><br>
				ST_AsX3D( geom <i>Geometry</i> , precision <i>Integer</i> , options <i>Integer</i> , refid <i>String</i> ) : <i>String</i>
</td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>Returns a geometry as an X3D XML formatted node element.</td></tr>
			<tr><td><b>MaxDistance</b></td>
				<td>MaxDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i><hr>
					ST_MaxDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return the max distance between geom1 and geom2</td></tr>
			<tr><td><b>3DDistance</b></td>
				<td>ST_3DDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return the 3D-distance between geom1 and geom2 (Z coordinates will be considered)</td></tr>
			<tr><td><b>3DMaxDistance</b></td>
				<td>ST_3DMaxDistance( geom1 <i>Geometry</i> , geom2 <i>Geometry</i> ) : <i>Double precision</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>return the max 3D-distance between geom1 and geom2 (Z coordinates will be considered)</td></tr>






			<tr><td><b>ST_Node</b></td>
				<td>ST_Node( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>Fully nodes a set of linestrings using the least possible number of nodes while preserving all of the input ones.<br>
                                <b>NULL</b> will be returned if the input Geometry isn't a set of linestrings or if any other error occurs.</td></tr>
			<tr><td><b>SelfIntersections</b></td>
				<td>SelfIntersections( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
                                	ST_SelfIntersections( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#f0d0f0">LWGEOM</td>
				<td>Returns a MultiPoint Geometry representing any self-intersection found within the input geometry
					[expected to be of the Linestring or MultiLinestring type].<br>
                                <b>NULL</b> will be returned for invalid arguments, or when no self-intersections were found.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p15">SQL functions for coordinate transformations</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>Transform</b></td>
				<td>Transform( geom <i>Geometry</i> , newSRID <i>Integer</i> ) : <i>Geometry</i><br>
					ST_Transform( geom <i>Geometry</i> , newSRID <i>Integer</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0d0f0">PROJ.4</td>
				<td>return a geometric object obtained by reprojecting coordinates into the Reference System identified by newSRID</td></tr>











			<tr><td><b>SridFromAuthCRS</b></td>
				<td>SridFromAuthCRS( auth_name <i>String</i> , auth_SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return the internal SRID corresponding to <b>auth_name</b> and <b>auth_SRID</b><br>
				<b>-1</b> will be returned if no such CRS is defined </td></tr>
			<tr><td><b>ShiftCoords</b><br><b>ShiftCoordinates</b></td>
................................................................................
					i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected</td></tr>
			<tr><td><b>SwapCoords</b><br><b>SwapCoordinates</b></td>
				<td>SwapCoords( geom <i>Geometry</i> ) : <i>Geometry</i><hr>
					SwapCoordinates( geom <i>Geometry</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>return a geometric object obtained by swapping x- and y-coordinates</td></tr>
































































































































































































































			<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
				<h3><a name="p16">SQL functions for Spatial-MetaData and Spatial-Index handling</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
................................................................................
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
<ul>
	<li>if the <i>optional</i> argument <b>transaction</b> is set to <b>TRUE</b> the whole operation will be handled as a single <i>Transaction</i> (faster): the default setting is <b>transaction=FALSE</b> (slower, but safer).</li>
	<li>if the <i>optional</i> argument <b>mode</b> is not specified then any possible ESPG SRID definition will be inserted into the <b>spatial_ref_sys</b> table.</li>
	<li>if the <b>mode</b> arg <b>'WGS84'</b> (alias <b>'WGS84_ONLY'</b>) is specified, then only WGS84-related EPSG SRIDs will be inserted</li>
	<li>if the <b>mode</b> arg <b>'NONE'</b> (alias <b>'EMPTY'</b>) is specified, no EPSG SRID will be inserted at all</li>
</ul></td></tr>
















			<tr><td><b>InsertEpsgSrid</b></td>
				<td>InsertEpsgSrid( srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Attempts to insert into <b>spatial_ref_sys</b> the EPSG definition uniquely identified by <b>srid</b><br>
				[the corresponding EPSG SRID definition will be copied from the inlined dataset defined in <b>libspatialite</b>]<hr>
the return type is Integer, with a return value of 1 for success or 0 for failure</td></tr>
................................................................................
					<li>otherwise statistics will be updated only for Geometry Columns
						corresponding to the given table</li>
					</ul><hr>
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE<hr>
				<u>Please note</u>: will effectively work only on behalf DB-files supporting the more recent metatables layout introduced 
				starting since version <b>4.x</b>; in any other case will always return an error and no action will happen.</td></tr>
		<tr><td><b>UpdateLayerStatistics</b></td>
				<td>UpdateLayerStatistics( [ void ) : <i>Integer</i><hr>
					UpdateLayerStatistics( table <i>String</i> [ , column <i>String</i> ] ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Updates the internal Layer Statistics [Feature Count and Total Extent]<ul>
					<li>if no arguments are passed, then internal statistics will be updated 
						for any possible Geometry Column defined in the current DB</li>
					<li>otherwise statistics will be updated only for Geometry Columns
................................................................................
                                    if the Table/Layer only contains a single Geometry column passing the column name isn't strictly required.<br>
                                    The returned extent will be retrieved from the Statistics tables:<ul>
					<li>if the third argument <b>mode</b> is set to TRUEa <b>PESSIMISTIC</b>
                                            strategy will be applied, i.e. an attempt will be made in order to update the Statistics tables before returning the Envelope.</li>
					<li>otherwise the returned Envelope will simply reflect the current values stored into the Statics tables as they are (<b>OPTIMISTIC</b> strategy, adopted by default).</li>
					</ul><hr>
                                        NULL will be returned if any error occurs or if the required table isn't a Layer.</td></tr>
		<tr><td><b>CreateTopologyTables</b></td>
				<td>CreateTopologyTables( SRID <i>Integer</i> , dims : <i>String</i> ) : <i>Integer</i><hr>
					CreateTopologyTables( prefix <i>String</i> , SRID <i>Integer</i> , dims : <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Creates a set of <b>Topology</b> tables
				<ul>
					<li><b>SRID</b> argument is mandatory</li>
					<li><b>dims</b> argument must be <b>'XY'</b> or <b>'XYZ'</b>:<br>
						<b>2</b> or <b>3</b> are valid aliases</li>
					<li>the <i>optional</i> argument <b>prefix</b> can be used to support more Topology sets on the same DB:<br>
						if omitted a <b>"topo_"</b> prefix will be assumed by default</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure)</td></tr>
		<tr><td><b>CreateRasterCoveragesTable</b></td>
				<td>CreateRasterCoveragesTable( <i>void</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Creates the <b>raster_coverages</b> table required by <b>RasterLite-2</b><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure)</td></tr>
		<tr><td><b>CreateVectorCoveragesTables</b></td>
................................................................................
					<li>if the <i>optional</i> argument <b>relaxed</b> is explicitly set as <b>TRUE</b> then
					a <i>relaxed</i> version of the validating Triggers will be installed (not checking for strict <i><u>XSD schema validation</u></i>).</li>
					<li>if the <i>optional</i> argument <b>transaction</b> is explicitly set as <b>TRUE</b> then 
					the whole operation will be atomically confined within a monolithic SQL transaction</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.<hr>
<i>Please note</i>: will implicitly invoke <b>CreateRasterCoverages()</b> if the <b>raster_coverages</b> table has not yet been created.</td></tr>
		<tr><td><b>SE_RegisterVectorCoverage</b></td>
				<td>SE_RegisterVectorCoverage( coverage_name <i>String</i> , f_table_name <i>String</i> , f_geometry_column <i>Sting</i> ) : <i>Integer</i><hr>

					SE_RegisterVectorCoverage( coverage_name <i>String</i> , f_table_name <i>String</i> , f_geometry_column <i>Sting</i> , title <i>String</i> , abstract <i>String </i> ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Creates a <b>Vector Coverage</b> based on an already existing Spatial Table.
				<ul>
					<li><b>coverage_name</b> is the symbolic name uniquely identifying each Vector Coverage (<i>Primary Key</i>).</li>
					<li><b>f_table_name</b> and <b>f_geometry_column</b> are expected to match a corresponding entry in the <b>geometry_columns</b> table.</li>
					<li>the optional arguments <b>title</b> and <b>abstract</b> could be eventually specified for better human readability.</li>



































































				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorCoverage</b></td>
				<td>SE_UnregisterVectorCoverage( coverage_name <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
				<td>Completely removes an already defined <b>Vector Coverage</b> this including any furher depency; the underlying Spatial Table will be absolutely unaffected.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_SetVectorCoverageInfos</b></td>
				<td>SE_SetVectorCoverageInfos( coverage_name <i>String</i> , title <i>String</i> , abstract <i>String</i> ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates the descriptive infos associated to a <b>Vector Coverage</b>.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
					<li><b>title</b> and <b>abstract</b> represent the descriptive infos to be set.</li>














				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterVectorCoverageSrid</b></td>
				<td>SE_RegisterVectorCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Adds an alternative <b>SRID</b> to an already defined Vector Coverage.
				<ul>
					<li><b>coverage_name</b> must identify an existing Vector Coverage.</li>
					<li><b>srid</b> is expected to match a corresponding entry in the <b>spatial_ref_sys</b> table.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorCoverageSrid</b></td>
				<td>SE_UnregisterVectorCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
					<li>if the optional <b>coverage_name</b> argument is set then only that single Vector Coverage will be updated; 
					otherwise all registered Vector Coverages will be processed in a single pass (may require a long time).</li>
					<li>if the optional <b>transaction</b> argument is set to <b>TRUE</b> then the whole operation will be internally
					handled as a single SQL Transaction.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>





















		<tr><td><b>SE_RegisterExternalGraphic</b></td>
				<td>SE_RegisterExternalGraphic( xlink_href <i>String</i> , resource <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_RegisterExternalGraphic( xlink_href <i>String</i> , resource <i>BLOB</i> , title <i>String</i> , abstract <i>String</i> , file_name <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Inserts (or updates) an <b>External Graphic Resource</b>.
				<ul>
					<li><b>xlink_href</b> uniquely identifies each Resource (<i>Primary Key</i>).</li>
					<li><b>resource</b> is expected to be a BLOB containing an <i>image/gif</i>, <i>image/png</i>, <i>image/jpeg</i> or <i>image/svg+xml</i> payload.</li>
					<li>the optional arguments <b>title</b>, <b>abstract</b> and <b>file_name</b> could be eventually specified for better human readability.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterExternalGraphic</b></td>
				<td>SE_UnregisterExternalGraphic( xlink_href <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The registered Style will be identified either by its unique <b>Style ID</b> or by its <b>Style Name</b> automatically retrieved from SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterVectorStyle</b></td>
				<td>SE_UnregisterVectorStyle( style_id <i>Integer</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i><hr>
					SE_UnregisterVectorStyle( style_name <i>Text</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already registered <b>Vector Style</b> definition.
				<ul>
					<li>The Style to be removed could be referenced either by its unique <b>Style Id</b> or by its <b>Style Name</b>.<br>
					Anyway any attempt to remove a Style identified by its <b>Name</b> will be rejected if the if two (or more) Styles share the same <b>Name</b> thus causing ambiguity.</li>
					<li>when the <i>optional</i> argument <b>remove_all</b> is explicitly set to <b>TRUE</b> the Style will be removed even if it's already referenced by some
................................................................................
					<b>VectorStyledLayer</b> and all dependings references will be removed at the same time.<br>
					In any other case any attempt to unregister a Style already referenced by one (or more) <b>VectorStyleLayer</b> will be rejected.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_ReloadVectorStyle</b></td>
				<td>SE_ReloadVectorStyle( style_id <i>Integer</i> , style <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_ReloadVectorStyle( style_name <i>Text</i> , style <i>BLOB</i> ) : <i>Integer</td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates an already existing <b>Vector Style</b> definition.
				<ul>
					<li><b>style</b> is expected to be an XmlBLOB containing a valid SLD/SE Style of the Vector type.<br>
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The updated Style will continue to be identified by its current unique <b>Style ID</b> but the <b>Style Name</b> will be automatically updated accordingly to SLD/SE XML.</li></li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterVectorStyledLayer</b></td>
				<td>SE_RegisterVectorStyledLayer( coverage_name <i>String</i> , style_id <i>Integer</i> ) : <i>Integer</i><hr>
					SE_RegisterVectorStyledLayer( coverage_name <i>String</i> , style_name <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
................................................................................
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The registered Style will be identified either by its unique <b>Style ID</b> or by its <b>Style Name</b> automatically retrieved from SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterRasterStyle</b></td>
				<td>SE_UnregisterRasterStyle( style_id <i>Integer</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i><hr>
					SE_UnregisterRasterStyle( style_name <i>Text</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already registered <b>Raster Style</b> definition.
				<ul>
					<li>The Style to be removed could be referenced either by its unique <b>Style Id</b> or by its <b>Style Name</b>.<br>
					Anyway any attempt to remove a Style identified by its <b>Name</b> will be rejected if the if two (or more) Styles share the same <b>Name</b> thus causing ambiguity.</li>
					<li>when the <i>optional</i> argument <b>remove_all</b> is explicitly set to <b>TRUE</b> the Style will be removed even if it's already referenced by some
................................................................................
					<b>RasterStyledLayer</b> and all dependings references will be removed at the same time.<br>
					In any other case any attempt to unregister a Style already referenced by one (or more) <b>RasterStyleLayer</b> will be rejected.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_ReloadRasterStyle</b></td>
				<td>SE_ReloadRasterStyle( style_id <i>Integer</i> , style <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_ReloadRasterStyle( style_name <i>Text</i> , style <i>BLOB</i> ) : <i>Integer</td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates an already existing <b>Raster Style</b> definition.
				<ul>
					<li><b>style</b> is expected to be an XmlBLOB containing a valid SLD/SE Style of the Raster type.<br>
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The updated Style will continue to be identified by its current unique <b>Style ID</b> but the <b>Style Name</b> will be automatically updated accordingly to SLD/SE XML.</li><
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterRasterStyledLayer</b></td>
				<td>SE_RegisterRasterStyledLayer( coverage_name <i>String</i> , style_id <i>Integer</i>  ) : <i>Integer</i><hr>
					SE_RegisterRasterStyledLayer( coverage_name <i>String</i> , style_name <i>Text</i>  ) : <i>Integer</i></td>
				<td></td>
................................................................................
		<tr><td><b>SE_RegisterRasterCoverageSrid</b></td>
				<td>SE_RegisterRasterCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Adds an alternative <b>SRID</b> to an already defined Raster Coverage.
				<ul>
					<li><b>coverage_name</b> must identify an existing Raster Coverage.</li>
					<li><b>srid</b> is expected to match a corresponding entry in the <b>spatial_ref_sys</b> table.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterRasterCoverageSrid</b></td>
				<td>SE_UnregisterRasterCoverageSrid( coverage_name <i>String</i> , srid <i>Integer</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
................................................................................
				<td>Updates the <b>Extent</b> boundary supporting a Raster Coverage, this including any eventually defined alternative SRID.
				<ul>
					<li>if the optional <b>coverage_name</b> argument is set then only that single Raster Coverage will be updated; 
					otherwise all registered Raster Coverages will be processed in a single pass (may require a long time).</li>
					<li>if the optional <b>transaction</b> argument is set to <b>TRUE</b> then the whole operation will be internally
					handled as a single SQL Transaction.</li>
				</ul><hr>





















the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_SetStyledGroupInfos</b></td>
				<td>SE_SetStyledGroupInfos( group_name <i>String</i> , title <i>String</i> , abstract <i>String</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Inserts (or updates) the descriptive infos associated to a <b>Styled Group</b>.
................................................................................
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The registered Style will be identified either by its unique <b>Style ID</b> or by its unique <b>Style Name</b> automatically retrieved from SLD/SE XML.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_UnregisterGroupStyle</b></td>
				<td>SE_UnregisterGroupStyle( style_id <i>Integer</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</i><hr>
					SE_UnregisterGroupStyle( style_name <i>Text</i> [ , remove_all <i>Integer</i> ] ) : <i>Integer</td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Removes an already registered <b>Group Style</b> definition.
				<ul>
					<li>The Style to be removed could be referenced either by its unique <b>Style Id</b> or by its <b>Style Name</b>.<br>
					Anyway any attempt to remove a Style identified by its <b>Name</b> will be rejected if the if two (or more) Styles share the same <b>Name</b> thus causing ambiguity.</li>
					<li>when the <i>optional</i> argument <b>remove_all</b> is explicitly set to <b>TRUE</b> the Style will be removed even if it's already referenced by some
................................................................................
					<b>RasterStyledLayer</b> and all dependings references will be removed at the same time.<br>
					In any other case any attempt to unregister a Style already referenced by one (or more) <b>RasterStyleLayer</b> will be rejected.</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_ReloadGroupStyle</b></td>
				<td>SE_ReloadGroupStyle( style_id <i>Integer</i> , style <i>BLOB</i> ) : <i>Integer</i><hr>
					SE_ReloadGroupStyle( style_name <i>Text</i> , style <i>BLOB</i> ) : <i>Integer</td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Updates an already existing <b>Group Style</b> definition.
				<ul>
					<li><b>style</b> is expected to be an XmlBLOB containing a valid SLD complex Style.<br>
					If <b>CreatedStylingTables()</b> was invoked without specifying the <i>relaxed</i> option this XmlBLOB is expected to have successfully passed a formal XML Schema Validation.<br>
					The updated Style will continue to be identified by its current unique <b>Style ID</b> but the <b>Style Name</b> will be automatically updated accordingly to SLD/SE XML.</li></li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure): -1 will be
				returned on invalid arguments.</td></tr>
		<tr><td><b>SE_RegisterStyledGroupStyle</b></td>
				<td>SE_RegisterStyledGroupStyle( group_name <i>String</i> , style_id <i>Integer</i> ) : <i>Integer</i><hr>
					SE_RegisterStyledGroupStyle( group_name <i>String</i> , style_name <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
................................................................................
				<h3><a name="p16fdo">SQL functions implementing FDO/OGR compatibility</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CheckSpatialMetaData</b></td>
				<td>CheckSpatialMetaData( void ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Checks the Spatial Metadata type, then returning:<ul>

				<li><b>0</b> - if the <b>geometry_columns</b> or <b>spatial_ref_sys</b> table does not exists, or if their actual layout doesn't corresponds to any known implementation</li>
				<li><b>1</b> - if both tables exist, and their layout is the one previously used by <b>SpatiaLite legacy</b> (<i>older versions including 3.1.0 any earlier</i>)</li>
				<li><b>2</b> - if both tables exist, and their layout is the one used by <b>FDO/OGR</b></li>
				<li><b>3</b> - if both tables exist, and their layout is the one currently used by <b>SpatiaLite</b> (<i>4.0.0 or any subsequent version</i>)</li>
				<li><b>4</b> - if the DB layout is the one defined by the <b>OGC GPKG</b> specification (<i>GeoPackage</i>)</li>
				</ul></td></tr>


			<tr><td><b>AutoFDOStart</b></td>
				<td>AutoFDOStart( void ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This function will inspect the Spatial Metadata, then automatically creating/refreshing a <b>VirtualFDO</b>
				wrapper for each FDO/OGR geometry table<hr>
the return type is Integer [how many VirtualFDO tables have been created]</td></tr>


			<tr><td><b>AutoFDOStop</b></td>
				<td>AutoFDOStop( void ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This function will inspect the Spatial Metadata, then automatically destroying any <b>VirtualFDO</b>
				wrapper found<hr>
the return type is Integer [how many VirtualFDO tables have been destroyed]</td></tr>



			<tr><td><b>InitFDOSpatialMetaData</b></td>
				<td>InitFDOSpatialMetaData( void ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>Creates the <b>geometry_columns</b> and <b>spatial_ref_sys</b> metadata tables<br>
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE<hr>
<u>Please note:</u> Spatial Metadata created using this function will have the FDO/OGR layout, and not the standard SpatiaLite layout</td></tr>
................................................................................
				<li><b>3</b> <i>POLYGON</i></li>
				<li><b>4</b> <i>MULTIPOINT</i></li>
				<li><b>5</b> <i>MULTILINESTRING</i></li>
				<li><b>6</b> <i>MULTIPOLYGON</i></li>
				<li><b>7</b> <i>GEOMETRYCOLLECTION</i></li>
				</ul><b>dimension</b> may be <b>2</b>, <b>3</b> or <b>4</b>, accordingly to OGR/FDO specs<br>
				<b>geometry_format</b> has to be one of the followings:<ul>
				<li>'WBT'</li>
				<li>'WKT'</li>
				<li>'FGF'</li>
				</ul><hr>
the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE</td></tr>
			<tr><td><b>RecoverFDOGeometryColumn</b></td>
				<td>RecoverFDOGeometryColumn( table <i>String</i> , column <i>String</i> , srid <i>Integer</i> ,
geom_type <i>String</i> , dimension <i>Integer</i>, geometry_format <i>String</i> ) : <i>Integer</i></td>
................................................................................
				<h3><a name="p16gpkg">SQL functions implementing OGC GeoPackage compatibility</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0">OGC<br>defined</th>
				<th bgcolor="#d0d0d0">required<br>module</th>
				<th bgcolor="#d0d0d0">Summary</th></tr>
			<tr><td><b>CheckGeoPackageMetaData</b></td>
				<td>CheckGeoPackageMetaData( void ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0d0">base</td>
				<td>This function will inspect the DB layout checking if it corresponds to the GPKG own style<hr>


the return type is Integer, with a return value of 1 for TRUE, 0 for FALSE</td></tr>
			<tr><td><b>AutoGPKGStart</b></td>
				<td>AutoGPKGStart( void ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>This function will inspect the DB layout, then automatically creating/refreshing a <b>VirtualGPKG</b>
				wrapper for each GPKG geometry table<hr>
the return type is Integer [how many VirtualGPKG tables have been created]</td></tr>


			<tr><td><b>AutoGPKGStop</b></td>
				<td>AutoGPKGStop( void ) : <i>Integer</i></td>

				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>This function will inspect the DB layout, then automatically destroying any <b>VirtualGPKG</b>
				wrapper found<hr>
the return type is Integer [how many VirtualGPKG tables have been destroyed]</td></tr>


			<tr><td><b>gpkgCreateBaseTables</b></td>
				<td>gpkgCreateBaseTables( void ) : <i>void</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>This function will create base tables for an "empty" GeoPackage<hr>
returns nothing on success, raises exception on error</td></tr>
			<tr><td><b>gpkgInsertEpsgSRID</b></td>
................................................................................
				<li><b>"jpeg"</b> for JPEG</li>
				<li><b>"tiff"</b> for TIFF</li>
				<li><b>"x-webp"</b> for WebP</li>
				</ul>
				These are the mime type for the image format (without the "image/" prefix).<hr>
				This function raises exception on error (e.g. wrong argument type).</td></tr>
			<tr><td><b>gpkgAddGeometryColumn</b></td>
				<td>gpkgAddGeomtryColumn( table_name <i>Sting</i>, geometry_column_name <i>String</i> , geometry_type <i>String</i> , 
					with_z <i>Integer</i> , with_m <i>Integer</i> , srs_id <i>Integer</i> ) : <i>void</i></td>
				<td></td>
				<td align="center" bgcolor="#d0f0ff">GeoPackage</td>
				<td>Adds a geometry column to the specified table:
				<ul>
					<li><b>geometry_type</b> is a normal WKT name:
						<ul>
................................................................................
                                If the input XmlBLOB is already uncompressed this one is a harmless no-op.<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object).</td></tr>
			<tr><td><b>XB_IsValid</b></td>
				<td>XB_IsValid( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_IsCompressed</b></td>
				<td>XB_IsCompressed( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_IsSchemaValidated</b></td>
				<td>XB_IsSchemaValidated( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_IsIsoMetadata</b></td>
				<td>XB_IsIsoMetadata( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_IsSldSeVectorStyle</b></td>
				<td>XB_IsSldSeVectorStyle( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_IsSldSeRasterStyle</b></td>
				<td>XB_IsSldSeRasterStyle( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_IsSvg</b></td>
				<td>XB_IsSvg( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>






			<tr><td><b>XB_GetDocumentSize</b></td>
				<td>XB_GetDocumentSize( xmlObject <i>XmlBLOB</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the size in bytes of the corresponding uncompressed XmlDocument.<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object).</td></tr>
			<tr><td><b>XB_GetEncoding</b></td>
................................................................................
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object), or when no Abstract is defined.<hr>Supported only on ISO Metadata and SLD/SE Styles.</td></tr>
			<tr><td><b>XB_GetGeometry</b></td>
				<td>XB_GetGeometry( xmlObject <i>XmlBLOB</i> ) : <i>Geometry</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the Geometry (Bounding Box) defined within the XmlBLOB (if any).<hr>
				<b>NULL</b> will be returned for any invalid input (not a valid XmlBLOB object), or when no Bounding Box is defined.<hr>Supported only on ISO Metadata XML Documents.</td></tr>







			<tr><td><b>XB_GetLastParseError</b></td>
				<td>XB_GetLastParseError( <i>void</i> ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the most recent XML parsing error (if any).<hr>
				<b>NULL</b> will be returned if there is no pending parsing error.</td></tr>
			<tr><td><b>XB_GetLastValidateError</b></td>
................................................................................
				<td>Will return the most recent XML validating error (if any).<hr>
				<b>NULL</b> will be returned if there is no pending validating error.</td></tr>
			<tr><td><b>XB_IsValidXPathExpression</b></td>
				<td>XB_IsValidXPathExpression( expr <i>Text</i> ) : <i>Integer</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and &#8211;1 for UNKNOWN
					corresponding to a function invocation on NULL arguments.</td></tr>
			<tr><td><b>XB_GetLastXPathError</b></td>
				<td>XB_GetLastXPathError( <i>void</i> ) : <i>String</i></td>
				<td></td>
				<td align="center" bgcolor="#99d099">libxml2</td>
				<td>Will return the most recent XPath error (if any).<hr>
				<b>NULL</b> will be returned if there is no pending XPath error.</td></tr>
			<tr><td><b>XB_CacheFlush</b></td>
................................................................................
				<h3><a name="srid">SQL functions supporting SRID inspection</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>SridIsGeographic</b></td>
				<td>SridIsGeographic( SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">Will inspect the SRID definitions checking if the SRID is of the <b>Geographic</b> type;<br>
					will return <b>1</b> (i.e. <b>TRUE</b> or <b>0</b> (i.e. <b>FALSE</b>).<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridIsProjected</b></td>
				<td>SridIsProjected( SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">Will inspect the SRID definitions checking if the SRID is of the <b>Projected</b> type;<br>
					will return <b>1</b> (i.e. <b>TRUE</b> or <b>0</b> (i.e. <b>FALSE</b>).<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridHasFlippedAxes</b></td>
				<td>SridHasFlippedAxes( SRID <i>Integer</i> ) : <i>Integer</i></td>
				<td colspan="3">Will inspect the SRID definitions checking if the SRID requires a flipped Axes configuration: i.e. <b>Y,X</b> instead of the most usual <b>X.Y</b>;<br>
					will return <b>1</b> (i.e. <b>TRUE</b> or <b>0</b> (i.e. <b>FALSE</b>).<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridGetSpheroid</b></td>
				<td>SridGetSpheroid( SRID <i>Integer</i> ) : <i>Text</i><hr>
					SridGetEllipsoid( SRID <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">Will inspect the SRID definitions then returning the appropriate <b>Spheroid</b> name.<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridGetPrimeMeridian</b></td>
................................................................................
				<td colspan="3">Will inspect the SRID definitions then returning the appropriate <b>Name</b> for its <b>second</b> axis.<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td><b>SridGetAxis_2_Orientation</b></td>
				<td>SridGetAxis_2_Orientation( SRID <i>Integer</i> ) : <i>Text</i></td>
				<td colspan="3">Will inspect the SRID definitions then returning the appropriate <b>Orientation</b> for its <b>second</b> axis.<br>
					<b>NULL</b> will be returned on invalid argument or if the SRID is undefined.</td></tr>
			<tr><td colspan="5" align="center" bgcolor="#f0e0c0">







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































				<h3><a name="advanced">miscellaneous advanced SQL functions</a></h3></td></tr>
			<tr><th bgcolor="#d0d0d0">Function</th>
				<th bgcolor="#d0d0d0">Syntax</th>
				<th bgcolor="#d0d0d0" colspan="3">Summary</th></tr>
			<tr><td><b>CloneTable</b></td>
				<td>CloneTable( db-prefix <i>Text</i> , input_table <i>Text</i> , output_table <i>Text</i> , 
				transaction <i>Integer</i> ) : <i>Integer</i><hr>
				CloneTable(  db-prefix <i>Text</i> , input_table <i>Text</i> , output_table <i>Text</i> , 
				transaction <i>Integer</i> , option_1 <i>Text</i> [ , ... , option_10 <i>Text</i> ] ) : <i>Integer</i></td>
				<td colspan="3">Will clone (i.e. create+copy) an origin table into a destination table: 
				the origin could be eventually located into some <i>attached</i> DB, but the destination is always
				assumed to be located into the primary DB</b>.<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>db-prefix</b> corresponding to the origin; the primary DB always corresponds to the <i>main</i> prefix.</li>

					<li><b>input_table</b> name of the origin table</li>
					<li><b>output_table</b> name of the destination table</li>
					<li><b>transaction</b> a <i>boolean</i> values stating if the whole operation has to be atomically confined
					within a monolithic SQL transaction</li>
				</ul></li>
				<li>Optional arguments: a maximum of 10 further options could be eventually specified. Valid options are:
				<ul>
					<li><b>::with-foreign-keys::</b></li>
					<li><b>::with-triggers::</b></li>
					<li><b>::resequence::</b></li>
					<li><b>::append::</b></li>
					<li><b>::ignore::</b><i>column_name</i></li>
					<li><b>::cast2multi::</b><i>geometry_column</i></li>
				</ul></li>
				</ul>
				<hr>









				Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success. <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>CheckDuplicateRows</b></td>
				<td>CheckDuplicateRows( table <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Will check if the given <b>table</b> does contain duplicate rows, i.e. rows presenting identical 
				values for all columns (ignoring any Primary Key column).
				<hr>
				Will return the total number of duplicate rows found.<br> <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>RemoveDuplicateRows</b></td>
				<td>RemoveDuplicateRows( table <i>Text</i> ) : <i>Integer</i></td>

				<td colspan="3">Will remove all duplicate rows from the given <b>table</b> preserving only a songle occurrence.


				<hr>
				Will return the total number of deleted rows.<br> <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>ElementaryGeometries</b></td>
				<td>ElementaryGeometries( in_table <i>Text</i> , geom_column <i>Text</i> , out_table <i>Text</i> ,
				out_pk <i>Text</i> , out_multi_id <i>Text</i> ) : <i>Integer</i></td>





				<td colspan="3">Will create a new <b>out_table</b> directly corresponding to <b>in_table</b>.
				The output table will be arranged in such a way that each row will always contain an elementary Geometry;
				so each time that a <b>MULTI-type</b> Geometry is found in the input table it will be split into mamy
				distinct rows.<br>

				<b>out_pk</b> is the name to be set for the output Primary Key, and <b>out_multi_id</b> is the name to













				be set for a second column within the output table where to store the original Primary Key.
				<hr>
				Will return the total number of rows inserted into the output table.<br> <b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>DropGeoTable</b></td>
				<td>DropGeoTable( table <i>Text</i> ) : <i>Integer</i><hr>

				DropGeoTable( db-prefix <i>Text</i> , table <i>Text</i> ) : <i>Integer</i></td>

				<td colspan="3">Will completely remove a Geometry Table (or Spatial View) this including any eventual SpatialIndex,
				metadata and statistics definitions an alike.


				<hr>
				Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success..<br> 
				<b>NULL</b> will be returned on invalid arguments.</td></tr>
			<tr><td><b>ImportSHP</b></td>
				<td>ImportSHP( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i><hr>
				ImportSHP( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> [ , srid <i>Integer</i>  [ ,
				    geom_column <i>Text</i> [ , pk_column <i>Text</i> [ , geometry_type <i>Text</i> [ , coerce2D <i>Integer</i> 
				    [ , compressed <i>Integer</i> [ , spatial_index <i>Integer</i> [ , text_dats <i>Integer</i> ] ] ] ] ] ] ] ] )

				    : <i>Integer</i></td>
				<td colspan="3">Will import an external Shapfile into an internal Table:
				<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>filename</b> absolute or relative path leading to the Shapefile (omitting any <i>.shp</i>, <i>.shx</i> or <i>.dbf</i> suffix).</li>
					<li><b>table</b> name of the table to be created.</li>
................................................................................
						<i>POLYGON|Z|M|ZM</i>, <i>MULTIPOINT|Z|M|ZM</i>, <i>LINESTRING|Z|M|ZM</i>, <i>MULTIPOLYGON|Z|M|ZM</i>;
						 by default <i>AUTO</i>.</li>
					<li><b>coerce2D</b> boolean flag: casting to 2D or not; <i>0</i> by default.</li>
					<li><b>compressed</b> boolean flag; compressed geometries or not; <i>0</i> by default.</li>
					<li><b>spatial_index</b> boolean flag: immediately building a Spatial Index or not; <i>0</i> by default.</li>
					<li><b>text_dates</b> boolean flag: interpreting DBF dates as plaintext or not: <i>0</i> by default
					(i.e. as <i>Julian Day</i>).</li>








				</ul></li>
				</ul>
				<hr>
				Will return the total number of imported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ExportSHP</b></td>
				<td>ExportSHP( table <i>Text</i> , geom_column <i>Text</i> , filename <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i><hr>
				ExportSHP( table <i>Text</i> , geom_column <i>Text</i> , filename <i>Text</i> , charset <i>Text</i> , geom_type <i>Text</i>) : <i>Integer</i></td>

				<td colspan="3">Will export an internal Table as an external Shapefile:
				<ul>
					<li><b>table</b> name of the table to be exported.</li>
					<li><b>geom_column</b> name of the Geometry column.</li>
					<li><b>filename</b> absolute or relative path leading to the Shapefile (omitting any <i>.shp</i>, <i>.shx</i> or <i>.dbf</i> suffix).</li>
					<li><b>charset</b> the character encoding adopted by the DBF member, as e.g. <i>UTF-8</i> or <i>CP1252</i></li>
					<li>the optional argument <b>geom_type</b> is useful when exporting unregistered Geometries, and
					can be one between: <i>POINT</i>, <i>LINESTRING</i>, <i>POLYGON</i> or <i>MULTUPOINT</i>.</li>





				</ul>
				<hr>
				Will return the total number of exported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ImportDBF</b></td>
				<td>ImportDBF( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i><hr>
				ImportDBF( filename <i>Text</i> , table <i>Text</i> , charset <i>Text</i> [ , pk_column <i>Text</i>  
				    [ , text_dats <i>Integer</i> ] ] ) : <i>Integer</i></td>
				<td colspan="3">Will import an external DBF file into an internal Table:
				<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>filename</b> absolute or relative path leading to the DBF (including the <i>.dbf</i> suffix).</li>
					<li><b>table</b> name of the table to be created.</li>
					<li><b>charset</b> the character encoding adopted by the DBF, as e.g. <i>UTF-8</i> or <i>CP1252</i></li>
................................................................................
				</ul></li>
				<li>Optional arguments:
				<ul>
					<li><b>pk_column</b> name of a DBF column to be used in the Primary Key role; an <i>INTEGER AUTOINCREMENT</i> 
					PK will be created by default.</li>
					<li><b>text_dates</b> boolean flag: interpreting DBF dates as plaintext or not: <i>0</i> by default
					(i.e. as <i>Julian Day</i>).</li>





				</ul></li>
				</ul>
				<hr>
				Will return the total number of imported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ExportDBF</b></td>
				<td>ExportDBF( table <i>Text</i> , filename <i>Text</i> , charset <i>Text</i> ) : <i>Integer</i></td>
				<td colspan="3">Will export an internal Table as an external DBF file:
				<ul>
					<li><b>table</b> name of the table to be exported.</li>
					<li><b>filename</b> absolute or relative path leading to the DBF (including the <i>.dbf</i> suffix).</li>
					<li><b>charset</b> the character encoding adopted by the DBF, as e.g. <i>UTF-8</i> or <i>CP1252</i></li>





				</ul>
				<hr>
				Will return the total number of exported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ExportKML</b></td>
				<td>ExportKML( table <i>Text</i> , geo_column <i>Text</i> , filename <i>Text</i> ) : <i>Integer</i><hr>
................................................................................
				</ul>
				<hr>
				Will return the total number of imported rows.<br> <b>NULL</b> will be returned on invalid arguments.<hr>
                <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>
			<tr><td><b>ImportWFS</b></td>
				<td>ImportWFS( filename_or_url <i>Text</i> , layer_name <i>Text</i> , table <i>Text</i> ) : <i>Integer</i><hr>
				ImportXLS( filename_or_url <i>Text</i> , layer_name <i>Text</i> , table <i>Text</i> [ , pk_column <i>Text</i>  
				    [ , swap_axes <i>Integer</i> [ , page_size <i>Integer</i> [ , spatial_index <i>Integer</i> ] ] ] ] ) : <i>Integer</i></td>
				<td colspan="3">Will import data from a WFS datasource:
				<ul>
				<li>Mandatory arguments:
				<ul>
					<li><b>filename_or_url</b> absolute or relative path leading to the WFS file.<br>
					Alternatively an URL corresponding to a WFS service.</li>
................................................................................
					and <b>text_rotation_col_name</b> must specify the corresponding <u>column names</u> within the resultset
					returned by <b>sql_query</b> (<i>label_col_name</i>, <i>text_height_col_name</i> and <i>text_rotation_col_name</i> could be eventually <b>NULL</b>).</li>
					<li><b>geom_filter</b> acts as a <u>spatial filter</u> selecting which entities have to be exported (could be <b>NULL</b>).</li>
					<li>the optional argument <b>precision</b> specificies how many <u>decimal digits</u> are required for coordinate values: if not specified the default is <b>3</b>.</li>
					</ul>
					Will return <b>0</b> (i.e. <b>FALSE</b>) on failure, any other value (i.e. <b>TRUE</b>) on success.<hr>
                    <u>Please note well</u>: this SQL function open the doors to many potential security issues, and thus is always <i>disabled by default</i>.<br>
                    Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to effectively enable this function.</td></tr>	





























































































































































































































































		</tbody></table>

		<a href="https://www.gaia-gis.it/fossil/libspatialite">back</a>

	</body></html>

Changes to spatialite.pc.in.

4
5
6
7
8
9
10
11
12
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: spatialite
Description: Spatial SQL database engine based on SQLite
Version: @VERSION@
Libs: -L${libdir} -lspatialite
Cflags: -I${includedir}







|

4
5
6
7
8
9
10
11
12
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: spatialite
Description: Spatial SQL database engine based on SQLite
Version: @VERSION@
Libs: -L${libdir} -lspatialite -lsqlite3 -lm -lz 
Cflags: -I${includedir}

Changes to src/Makefile.am.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
	shapefiles \
	srsinit \
	connection_cache \
	virtualtext \
	wfs \
	dxf \
	md5 \
	control_points \
	cutter \
	topology \
	stored_procedures

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers
AM_CPPFLAGS += -I$(top_srcdir)

if MODULE_ONLY
lib_LTLIBRARIES = mod_spatialite.la
else
lib_LTLIBRARIES = libspatialite.la mod_spatialite.la
endif

libspatialite_la_SOURCES = versioninfo/version.c

libspatialite_la_LIBADD = ./gaiaaux/libgaiaaux.la \
	./gaiaexif/libgaiaexif.la \
	./gaiageo/libgaiageo.la \
	./geopackage/libgeopackage.la \
	./spatialite/libsplite.la \
	./shapefiles/libshapefiles.la \
	./dxf/libdxf.la \
	./md5/libmd5.la  \
	./control_points/libcontrol_points.la \
	./cutter/libcutter.la \
	./topology/libtopology.la \
	./srsinit/libsrsinit.la \
	./stored_procedures/libstored_procedures.la \
	./connection_cache/libconnection_cache.la \
	./virtualtext/libvirtualtext.la \
	./wfs/libwfs.la @LIBXML2_LIBS@

if MINGW
libspatialite_la_LDFLAGS = -version-info 4:4:0 -no-undefined
libspatialite_la_LIBADD += -lm
else 
if ANDROID
libspatialite_la_LDFLAGS = -version-info 8:1:1
libspatialite_la_LIBADD += -ldl -lm
else
libspatialite_la_LDFLAGS = -version-info 8:1:1
libspatialite_la_LIBADD += -lpthread -ldl -lm
endif
endif

mod_spatialite_la_SOURCES = versioninfo/version.c

mod_spatialite_la_LIBADD = ./gaiaaux/gaiaaux.la \
................................................................................
	./gaiageo/gaiageo.la \
	./geopackage/geopackage.la \
	./spatialite/splite.la \
	./shapefiles/shapefiles.la \
	./dxf/dxf.la \
	./md5/md5.la \
	./control_points/control_points.la \
	./cutter/cutter.la \
	./topology/topology.la \
	./srsinit/srsinit.la \
	./stored_procedures/stored_procedures.la \
	./connection_cache/connection_cache.la \
	./virtualtext/virtualtext.la \
	./wfs/wfs.la @LIBXML2_LIBS@

mod_spatialite_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
mod_spatialite_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
mod_spatialite_la_CPPFLAGS += -DLOADABLE_EXTENSION
mod_spatialite_la_LIBTOOLFLAGS = --tag=disable-static

if MINGW
mod_spatialite_la_LDFLAGS = -module -avoid-version -no-undefined
mod_spatialite_la_LIBADD += -lm
else 
if ANDROID
mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
mod_spatialite_la_LIBADD += -ldl -lm
else
mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
mod_spatialite_la_LIBADD += -lpthread -ldl -lm
endif
endif

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda







|
<
<
<

|



<
<
<

<











|
<
<

<





|



|


|







 







<
<

<




|









|


|





9
10
11
12
13
14
15
16



17
18
19
20
21



22

23
24
25
26
27
28
29
30
31
32
33
34


35

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
..
57
58
59
60
61
62
63


64

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
	shapefiles \
	srsinit \
	connection_cache \
	virtualtext \
	wfs \
	dxf \
	md5 \
	control_points




AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers
AM_CPPFLAGS += -I$(top_srcdir)




lib_LTLIBRARIES = libspatialite.la mod_spatialite.la


libspatialite_la_SOURCES = versioninfo/version.c

libspatialite_la_LIBADD = ./gaiaaux/libgaiaaux.la \
	./gaiaexif/libgaiaexif.la \
	./gaiageo/libgaiageo.la \
	./geopackage/libgeopackage.la \
	./spatialite/libsplite.la \
	./shapefiles/libshapefiles.la \
	./dxf/libdxf.la \
	./md5/libmd5.la  \
	./control_points/libcontrol_points.la\


	./srsinit/libsrsinit.la \

	./connection_cache/libconnection_cache.la \
	./virtualtext/libvirtualtext.la \
	./wfs/libwfs.la @LIBXML2_LIBS@

if MINGW
libspatialite_la_LDFLAGS = -version-info 4:2:0 -no-undefined
libspatialite_la_LIBADD += -lm
else 
if ANDROID
libspatialite_la_LDFLAGS = -version-info 7:0:1
libspatialite_la_LIBADD += -ldl -lm
else
libspatialite_la_LDFLAGS = -version-info 7:0:1
libspatialite_la_LIBADD += -lpthread -ldl -lm
endif
endif

mod_spatialite_la_SOURCES = versioninfo/version.c

mod_spatialite_la_LIBADD = ./gaiaaux/gaiaaux.la \
................................................................................
	./gaiageo/gaiageo.la \
	./geopackage/geopackage.la \
	./spatialite/splite.la \
	./shapefiles/shapefiles.la \
	./dxf/dxf.la \
	./md5/md5.la \
	./control_points/control_points.la \


	./srsinit/srsinit.la \

	./connection_cache/connection_cache.la \
	./virtualtext/virtualtext.la \
	./wfs/wfs.la @LIBXML2_LIBS@

mod_spatialite_la_CPPFLAGS = @CFLAGS@
mod_spatialite_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
mod_spatialite_la_CPPFLAGS += -DLOADABLE_EXTENSION
mod_spatialite_la_LIBTOOLFLAGS = --tag=disable-static

if MINGW
mod_spatialite_la_LDFLAGS = -module -avoid-version -no-undefined
mod_spatialite_la_LIBADD += -lm
else 
if ANDROID
mod_spatialite_la_LDFLAGS = -module -version-info 7:0:1
mod_spatialite_la_LIBADD += -ldl -lm
else
mod_spatialite_la_LDFLAGS = -module -version-info 7:0:1
mod_spatialite_la_LIBADD += -lpthread -ldl -lm
endif
endif

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
91
92
93
94
95
96
97


98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
...
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
...
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
...
480
481
482
483
484
485
486

487
488
489
490
491
492
493
...
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
...
881
882
883
884
885
886
887
888
889
890
891
892
893
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
@MINGW_TRUE@am__append_1 = -lm
@ANDROID_TRUE@@MINGW_FALSE@am__append_2 = -ldl -lm
@ANDROID_FALSE@@MINGW_FALSE@am__append_3 = -lpthread -ldl -lm
@MINGW_TRUE@am__append_4 = -lm
@ANDROID_TRUE@@MINGW_FALSE@am__append_5 = -ldl -lm
@ANDROID_FALSE@@MINGW_FALSE@am__append_6 = -lpthread -ldl -lm
subdir = src


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
................................................................................
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libspatialite_la_DEPENDENCIES = ./gaiaaux/libgaiaaux.la \
	./gaiaexif/libgaiaexif.la ./gaiageo/libgaiageo.la \
	./geopackage/libgeopackage.la ./spatialite/libsplite.la \
	./shapefiles/libshapefiles.la ./dxf/libdxf.la ./md5/libmd5.la \
	./control_points/libcontrol_points.la ./cutter/libcutter.la \
	./topology/libtopology.la ./srsinit/libsrsinit.la \
	./stored_procedures/libstored_procedures.la \
	./connection_cache/libconnection_cache.la \
	./virtualtext/libvirtualtext.la ./wfs/libwfs.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
am__dirstamp = $(am__leading_dot)dirstamp
am_libspatialite_la_OBJECTS = versioninfo/version.lo
libspatialite_la_OBJECTS = $(am_libspatialite_la_OBJECTS)
................................................................................
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
libspatialite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(libspatialite_la_LDFLAGS) $(LDFLAGS) \
	-o $@
@MODULE_ONLY_FALSE@am_libspatialite_la_rpath = -rpath $(libdir)
mod_spatialite_la_DEPENDENCIES = ./gaiaaux/gaiaaux.la \
	./gaiaexif/gaiaexif.la ./gaiageo/gaiageo.la \
	./geopackage/geopackage.la ./spatialite/splite.la \
	./shapefiles/shapefiles.la ./dxf/dxf.la ./md5/md5.la \
	./control_points/control_points.la ./cutter/cutter.la \
	./topology/topology.la ./srsinit/srsinit.la \
	./stored_procedures/stored_procedures.la \
	./connection_cache/connection_cache.la \
	./virtualtext/virtualtext.la ./wfs/wfs.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
am_mod_spatialite_la_OBJECTS =  \
	versioninfo/mod_spatialite_la-version.lo
mod_spatialite_la_OBJECTS = $(am_mod_spatialite_la_OBJECTS)
mod_spatialite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(mod_spatialite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(mod_spatialite_la_LDFLAGS) \
	$(LDFLAGS) -o $@
@MODULE_ONLY_FALSE@am_mod_spatialite_la_rpath = -rpath $(libdir)
@MODULE_ONLY_TRUE@am_mod_spatialite_la_rpath = -rpath $(libdir)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
	shapefiles \
	srsinit \
	connection_cache \
	virtualtext \
	wfs \
	dxf \
	md5 \
	control_points \
	cutter \
	topology \
	stored_procedures

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers \
	-I$(top_srcdir)
@MODULE_ONLY_FALSE@lib_LTLIBRARIES = libspatialite.la mod_spatialite.la
@MODULE_ONLY_TRUE@lib_LTLIBRARIES = mod_spatialite.la
libspatialite_la_SOURCES = versioninfo/version.c
libspatialite_la_LIBADD = ./gaiaaux/libgaiaaux.la \
	./gaiaexif/libgaiaexif.la ./gaiageo/libgaiageo.la \
	./geopackage/libgeopackage.la ./spatialite/libsplite.la \
	./shapefiles/libshapefiles.la ./dxf/libdxf.la ./md5/libmd5.la \
	./control_points/libcontrol_points.la ./cutter/libcutter.la \
	./topology/libtopology.la ./srsinit/libsrsinit.la \
	./stored_procedures/libstored_procedures.la \
	./connection_cache/libconnection_cache.la \
	./virtualtext/libvirtualtext.la ./wfs/libwfs.la @LIBXML2_LIBS@ \
	$(am__append_1) $(am__append_2) $(am__append_3)
@ANDROID_FALSE@@MINGW_FALSE@libspatialite_la_LDFLAGS = -version-info 8:1:1
@ANDROID_TRUE@@MINGW_FALSE@libspatialite_la_LDFLAGS = -version-info 8:1:1
@MINGW_TRUE@libspatialite_la_LDFLAGS = -version-info 4:4:0 -no-undefined
mod_spatialite_la_SOURCES = versioninfo/version.c
mod_spatialite_la_LIBADD = ./gaiaaux/gaiaaux.la ./gaiaexif/gaiaexif.la \
	./gaiageo/gaiageo.la ./geopackage/geopackage.la \
	./spatialite/splite.la ./shapefiles/shapefiles.la ./dxf/dxf.la \
	./md5/md5.la ./control_points/control_points.la \
	./cutter/cutter.la ./topology/topology.la ./srsinit/srsinit.la \
	./stored_procedures/stored_procedures.la \
	./connection_cache/connection_cache.la \
	./virtualtext/virtualtext.la ./wfs/wfs.la @LIBXML2_LIBS@ \
	$(am__append_4) $(am__append_5) $(am__append_6)
mod_spatialite_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
mod_spatialite_la_LIBTOOLFLAGS = --tag=disable-static
@ANDROID_FALSE@@MINGW_FALSE@mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
@ANDROID_TRUE@@MINGW_FALSE@mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
@MINGW_TRUE@mod_spatialite_la_LDFLAGS = -module -avoid-version -no-undefined
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
versioninfo/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) versioninfo/$(DEPDIR)
	@: > versioninfo/$(DEPDIR)/$(am__dirstamp)
versioninfo/version.lo: versioninfo/$(am__dirstamp) \
	versioninfo/$(DEPDIR)/$(am__dirstamp)

libspatialite.la: $(libspatialite_la_OBJECTS) $(libspatialite_la_DEPENDENCIES) $(EXTRA_libspatialite_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(libspatialite_la_LINK) $(am_libspatialite_la_rpath) $(libspatialite_la_OBJECTS) $(libspatialite_la_LIBADD) $(LIBS)
versioninfo/mod_spatialite_la-version.lo: versioninfo/$(am__dirstamp) \
	versioninfo/$(DEPDIR)/$(am__dirstamp)

mod_spatialite.la: $(mod_spatialite_la_OBJECTS) $(mod_spatialite_la_DEPENDENCIES) $(EXTRA_mod_spatialite_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(mod_spatialite_la_LINK) $(am_mod_spatialite_la_rpath) $(mod_spatialite_la_OBJECTS) $(mod_spatialite_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)
	-rm -f versioninfo/*.$(OBJEXT)
	-rm -f versioninfo/*.lo

distclean-compile:
................................................................................
	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







|
<
<







 







<




|
<
<











<
<







 







<







 







|
<
<
<

|
<
|
<





|
<
<



|
|
|





<
<
|


|
|

|
|







 







>







 







|




|







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
...
128
129
130
131
132
133
134
135


136
137
138
139
140
141
142
...
144
145
146
147
148
149
150

151
152
153
154
155


156
157
158
159
160
161
162
163
164
165
166


167
168
169
170
171
172
173
...
238
239
240
241
242
243
244

245
246
247
248
249
250
251
...
407
408
409
410
411
412
413
414



415
416

417

418
419
420
421
422
423


424
425
426
427
428
429
430
431
432
433
434


435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
...
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
...
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
...
856
857
858
859
860
861
862


863
864
865
866
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
@MINGW_TRUE@am__append_1 = -lm
@ANDROID_TRUE@@MINGW_FALSE@am__append_2 = -ldl -lm
@ANDROID_FALSE@@MINGW_FALSE@am__append_3 = -lpthread -ldl -lm
@MINGW_TRUE@am__append_4 = -lm
@ANDROID_TRUE@@MINGW_FALSE@am__append_5 = -ldl -lm
@ANDROID_FALSE@@MINGW_FALSE@am__append_6 = -lpthread -ldl -lm
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
................................................................................
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libspatialite_la_DEPENDENCIES = ./gaiaaux/libgaiaaux.la \
	./gaiaexif/libgaiaexif.la ./gaiageo/libgaiageo.la \
	./geopackage/libgeopackage.la ./spatialite/libsplite.la \
	./shapefiles/libshapefiles.la ./dxf/libdxf.la ./md5/libmd5.la \
	./control_points/libcontrol_points.la ./srsinit/libsrsinit.la \


	./connection_cache/libconnection_cache.la \
	./virtualtext/libvirtualtext.la ./wfs/libwfs.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
am__dirstamp = $(am__leading_dot)dirstamp
am_libspatialite_la_OBJECTS = versioninfo/version.lo
libspatialite_la_OBJECTS = $(am_libspatialite_la_OBJECTS)
................................................................................
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
libspatialite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(libspatialite_la_LDFLAGS) $(LDFLAGS) \
	-o $@

mod_spatialite_la_DEPENDENCIES = ./gaiaaux/gaiaaux.la \
	./gaiaexif/gaiaexif.la ./gaiageo/gaiageo.la \
	./geopackage/geopackage.la ./spatialite/splite.la \
	./shapefiles/shapefiles.la ./dxf/dxf.la ./md5/md5.la \
	./control_points/control_points.la ./srsinit/srsinit.la \


	./connection_cache/connection_cache.la \
	./virtualtext/virtualtext.la ./wfs/wfs.la \
	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
	$(am__DEPENDENCIES_1)
am_mod_spatialite_la_OBJECTS =  \
	versioninfo/mod_spatialite_la-version.lo
mod_spatialite_la_OBJECTS = $(am_mod_spatialite_la_OBJECTS)
mod_spatialite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(mod_spatialite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(mod_spatialite_la_LDFLAGS) \
	$(LDFLAGS) -o $@


AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
	shapefiles \
	srsinit \
	connection_cache \
	virtualtext \
	wfs \
	dxf \
	md5 \
	control_points




AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I$(top_srcdir)

lib_LTLIBRARIES = libspatialite.la mod_spatialite.la

libspatialite_la_SOURCES = versioninfo/version.c
libspatialite_la_LIBADD = ./gaiaaux/libgaiaaux.la \
	./gaiaexif/libgaiaexif.la ./gaiageo/libgaiageo.la \
	./geopackage/libgeopackage.la ./spatialite/libsplite.la \
	./shapefiles/libshapefiles.la ./dxf/libdxf.la ./md5/libmd5.la \
	./control_points/libcontrol_points.la ./srsinit/libsrsinit.la \


	./connection_cache/libconnection_cache.la \
	./virtualtext/libvirtualtext.la ./wfs/libwfs.la @LIBXML2_LIBS@ \
	$(am__append_1) $(am__append_2) $(am__append_3)
@ANDROID_FALSE@@MINGW_FALSE@libspatialite_la_LDFLAGS = -version-info 7:0:1
@ANDROID_TRUE@@MINGW_FALSE@libspatialite_la_LDFLAGS = -version-info 7:0:1
@MINGW_TRUE@libspatialite_la_LDFLAGS = -version-info 4:2:0 -no-undefined
mod_spatialite_la_SOURCES = versioninfo/version.c
mod_spatialite_la_LIBADD = ./gaiaaux/gaiaaux.la ./gaiaexif/gaiaexif.la \
	./gaiageo/gaiageo.la ./geopackage/geopackage.la \
	./spatialite/splite.la ./shapefiles/shapefiles.la ./dxf/dxf.la \
	./md5/md5.la ./control_points/control_points.la \


	./srsinit/srsinit.la ./connection_cache/connection_cache.la \
	./virtualtext/virtualtext.la ./wfs/wfs.la @LIBXML2_LIBS@ \
	$(am__append_4) $(am__append_5) $(am__append_6)
mod_spatialite_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
mod_spatialite_la_LIBTOOLFLAGS = --tag=disable-static
@ANDROID_FALSE@@MINGW_FALSE@mod_spatialite_la_LDFLAGS = -module -version-info 7:0:1
@ANDROID_TRUE@@MINGW_FALSE@mod_spatialite_la_LDFLAGS = -module -version-info 7:0:1
@MINGW_TRUE@mod_spatialite_la_LDFLAGS = -module -avoid-version -no-undefined
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
versioninfo/$(DEPDIR)/$(am__dirstamp):
	@$(MKDIR_P) versioninfo/$(DEPDIR)
	@: > versioninfo/$(DEPDIR)/$(am__dirstamp)
versioninfo/version.lo: versioninfo/$(am__dirstamp) \
	versioninfo/$(DEPDIR)/$(am__dirstamp)

libspatialite.la: $(libspatialite_la_OBJECTS) $(libspatialite_la_DEPENDENCIES) $(EXTRA_libspatialite_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(libspatialite_la_LINK) -rpath $(libdir) $(libspatialite_la_OBJECTS) $(libspatialite_la_LIBADD) $(LIBS)
versioninfo/mod_spatialite_la-version.lo: versioninfo/$(am__dirstamp) \
	versioninfo/$(DEPDIR)/$(am__dirstamp)

mod_spatialite.la: $(mod_spatialite_la_OBJECTS) $(mod_spatialite_la_DEPENDENCIES) $(EXTRA_mod_spatialite_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(mod_spatialite_la_LINK) -rpath $(libdir) $(mod_spatialite_la_OBJECTS) $(mod_spatialite_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)
	-rm -f versioninfo/*.$(OBJEXT)
	-rm -f versioninfo/*.lo

distclean-compile:
................................................................................
	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/connection_cache/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

SUBDIRS = generator

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_HEADERS = cache_aux_1.h cache_aux_2.h cache_aux_3.h
noinst_LTLIBRARIES = libconnection_cache.la connection_cache.la

libconnection_cache_la_SOURCES = alloc_cache.c gg_sequence.c

connection_cache_la_SOURCES = alloc_cache.c gg_sequence.c 

connection_cache_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@
connection_cache_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
connection_cache_la_CPPFLAGS += -DLOADABLE_EXTENSION
connection_cache_la_LDFLAGS = -module
connection_cache_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda





|





|

|

|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

SUBDIRS = generator

AM_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_HEADERS = cache_aux_1.h cache_aux_2.h cache_aux_3.h
noinst_LTLIBRARIES = libconnection_cache.la connection_cache.la

libconnection_cache_la_SOURCES = alloc_cache.c 

connection_cache_la_SOURCES = alloc_cache.c 

connection_cache_la_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@
connection_cache_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
connection_cache_la_CPPFLAGS += -DLOADABLE_EXTENSION
connection_cache_la_LDFLAGS = -module
connection_cache_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda


Changes to src/connection_cache/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
..
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
86
87
88
89
90
91
92


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
...
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
...
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
...
379
380
381
382
383
384
385

386
387
388
389
390
391
392
...
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
...
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
...
744
745
746
747
748
749
750
751
752
753
754
755
756
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/connection_cache


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
	$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
connection_cache_la_LIBADD =
am_connection_cache_la_OBJECTS = connection_cache_la-alloc_cache.lo \
	connection_cache_la-gg_sequence.lo
connection_cache_la_OBJECTS = $(am_connection_cache_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
connection_cache_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(connection_cache_la_LDFLAGS) $(LDFLAGS) -o $@
libconnection_cache_la_LIBADD =
am_libconnection_cache_la_OBJECTS = alloc_cache.lo gg_sequence.lo
libconnection_cache_la_OBJECTS = $(am_libconnection_cache_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = generator
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers
noinst_HEADERS = cache_aux_1.h cache_aux_2.h cache_aux_3.h
noinst_LTLIBRARIES = libconnection_cache.la connection_cache.la
libconnection_cache_la_SOURCES = alloc_cache.c gg_sequence.c
connection_cache_la_SOURCES = alloc_cache.c gg_sequence.c 
connection_cache_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
connection_cache_la_LDFLAGS = -module
connection_cache_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-recursive

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/connection_cache/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/connection_cache/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc_cache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection_cache_la-alloc_cache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection_cache_la-gg_sequence.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_sequence.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
................................................................................
connection_cache_la-alloc_cache.lo: alloc_cache.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(connection_cache_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT connection_cache_la-alloc_cache.lo -MD -MP -MF $(DEPDIR)/connection_cache_la-alloc_cache.Tpo -c -o connection_cache_la-alloc_cache.lo `test -f 'alloc_cache.c' || echo '$(srcdir)/'`alloc_cache.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/connection_cache_la-alloc_cache.Tpo $(DEPDIR)/connection_cache_la-alloc_cache.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alloc_cache.c' object='connection_cache_la-alloc_cache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(connection_cache_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o connection_cache_la-alloc_cache.lo `test -f 'alloc_cache.c' || echo '$(srcdir)/'`alloc_cache.c

connection_cache_la-gg_sequence.lo: gg_sequence.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(connection_cache_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT connection_cache_la-gg_sequence.lo -MD -MP -MF $(DEPDIR)/connection_cache_la-gg_sequence.Tpo -c -o connection_cache_la-gg_sequence.lo `test -f 'gg_sequence.c' || echo '$(srcdir)/'`gg_sequence.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/connection_cache_la-gg_sequence.Tpo $(DEPDIR)/connection_cache_la-gg_sequence.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_sequence.c' object='connection_cache_la-gg_sequence.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(connection_cache_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o connection_cache_la-gg_sequence.lo `test -f 'gg_sequence.c' || echo '$(srcdir)/'`gg_sequence.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

# This directory's subdirectories are mostly independent; you can cd
................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|







 







|
<
<
<
<
<
<
<
<
<
<







 







>
>







<
<






|
<










|







 







<







 







<
|


|
|
|







 







>







 







<
<







 







<
<
<
<
<
<
<







 







<
<




1
2
3
4
5
6
7
8
9
10
11
..
12
13
14
15
16
17
18
19










20
21
22
23
24
25
26
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91


92
93
94
95
96
97
98

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
184
185
186
187
188
189
190

191
192
193
194
195
196
197
...
340
341
342
343
344
345
346

347
348
349
350
351
352
353
354
355
356
357
358
359
...
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
...
410
411
412
413
414
415
416


417
418
419
420
421
422
423
...
439
440
441
442
443
444
445







446
447
448
449
450
451
452
...
723
724
725
726
727
728
729


730
731
732
733
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/connection_cache
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)


mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
connection_cache_la_LIBADD =
am_connection_cache_la_OBJECTS = connection_cache_la-alloc_cache.lo

connection_cache_la_OBJECTS = $(am_connection_cache_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
connection_cache_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(connection_cache_la_LDFLAGS) $(LDFLAGS) -o $@
libconnection_cache_la_LIBADD =
am_libconnection_cache_la_OBJECTS = alloc_cache.lo
libconnection_cache_la_OBJECTS = $(am_libconnection_cache_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = generator

AM_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@ -I$(top_srcdir)/src/headers
noinst_HEADERS = cache_aux_1.h cache_aux_2.h cache_aux_3.h
noinst_LTLIBRARIES = libconnection_cache.la connection_cache.la
libconnection_cache_la_SOURCES = alloc_cache.c 
connection_cache_la_SOURCES = alloc_cache.c 
connection_cache_la_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
connection_cache_la_LDFLAGS = -module
connection_cache_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-recursive

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/connection_cache/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/connection_cache/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc_cache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection_cache_la-alloc_cache.Plo@am__quote@



.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
................................................................................
connection_cache_la-alloc_cache.lo: alloc_cache.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(connection_cache_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT connection_cache_la-alloc_cache.lo -MD -MP -MF $(DEPDIR)/connection_cache_la-alloc_cache.Tpo -c -o connection_cache_la-alloc_cache.lo `test -f 'alloc_cache.c' || echo '$(srcdir)/'`alloc_cache.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/connection_cache_la-alloc_cache.Tpo $(DEPDIR)/connection_cache_la-alloc_cache.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='alloc_cache.c' object='connection_cache_la-alloc_cache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(connection_cache_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(connection_cache_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o connection_cache_la-alloc_cache.lo `test -f 'alloc_cache.c' || echo '$(srcdir)/'`alloc_cache.c








mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

# This directory's subdirectories are mostly independent; you can cd
................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/connection_cache/alloc_cache.c.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

107
108

109
110
111
112
113
114

115
116


117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276






















277
278
279
280
281
282
283
...
337
338
339
340
341
342
343









344
345
346
347
348
349


350
351

352
353
354

355
356














357
358
359



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
...
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
...
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
...
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
...
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809

810
811
812
813

814
815
816
817


818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833

834
835
836
837

838
839
840
841


842
843
844
845
846
847
848
849

850
851
852
853

854
855
856
857


858
859
860
861
862
863
864
865

866
867
868
869

870
871
872
873


874
875
876
877
878
879
880
881
882

883
884
885
886

887
888
889
890


891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906

907
908
909
910

911
912
913
914


915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930

931
932
933
934

935
936
937
938


939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
....
1062
1063
1064
1065
1066
1067
1068

1069
1070

1071
1072
1073
1074
1075
1076
1077
1078

1079


1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111




















1112
1113
1114
1115
1116
1117
1118
1119
1120
1121

1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142

1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
/*
 alloc_cache.c -- Gaia spatial support for SQLite

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2013-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>


#if defined(_WIN32) && !defined(__MINGW32__)
#include <windows.h>
#else
#include <pthread.h>
#endif

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
................................................................................

#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gg_advanced.h>
#include <spatialite/gaiamatrix.h>

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

#ifndef OMIT_PROJ		/* including PROJ.4 */
#include <proj_api.h>
#endif

#ifdef ENABLE_RTTOPO		/* including RTTOPO */
#include <librttopo.h>
#endif

#ifndef GEOS_REENTRANT		/* only when using the obsolete partially thread-safe mode */
#include "cache_aux_1.h"
#endif /* end GEOS_REENTRANT */

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

/* GLOBAL variables */
extern char *gaia_geos_error_msg;
extern char *gaia_geos_warning_msg;

/* GLOBAL semaphores */
int gaia_already_initialized = 0;
#if defined(_WIN32) && !defined(__MINGW32__)
static CRITICAL_SECTION gaia_cache_semaphore;

#else
static pthread_mutex_t gaia_cache_semaphore = PTHREAD_MUTEX_INITIALIZER;

#endif

#define GAIA_CONN_RESERVED	(char *)1

static void
conn_geos_error (const char *msg, void *userdata)

{
/* reporting some GEOS error - thread safe */


    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) userdata;
    if (cache == NULL)
	goto invalid_cache;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	goto invalid_cache;

    if (cache->gaia_geos_error_msg != NULL)
	free (cache->gaia_geos_error_msg);
    cache->gaia_geos_error_msg = NULL;
    if (msg)
      {
	  if (cache->silent_mode == 0)
	      spatialite_e ("GEOS error: %s\n", msg);

	  len = strlen (msg);
	  cache->gaia_geos_error_msg = malloc (len + 1);
	  strcpy (cache->gaia_geos_error_msg, msg);
      }
    return;

  invalid_cache:
    if (msg)
	spatialite_e ("GEOS error: %s\n", msg);
}

static void
conn_geos_warning (const char *msg, void *userdata)
{
/* reporting some GEOS warning - thread safe */
    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) userdata;
    if (cache == NULL)
	goto invalid_cache;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	goto invalid_cache;

    if (cache->gaia_geos_warning_msg != NULL)
	free (cache->gaia_geos_warning_msg);
    cache->gaia_geos_warning_msg = NULL;
    if (msg)
      {
	  if (cache->silent_mode == 0)
	      spatialite_e ("GEOS warning: %s\n", msg);
	  len = strlen (msg);
	  cache->gaia_geos_warning_msg = malloc (len + 1);
	  strcpy (cache->gaia_geos_warning_msg, msg);
      }
    return;

  invalid_cache:
    if (msg)
	spatialite_e ("GEOS warning: %s\n", msg);
}

static void
conn_rttopo_error (const char *fmt, va_list ap, void *userdata)
{
/* reporting some RTTOPO error - thread safe */
    char *msg = NULL;
    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) userdata;
    if (cache == NULL)
	goto invalid_cache;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	goto invalid_cache;

    if (cache->gaia_rttopo_error_msg != NULL)
	free (cache->gaia_rttopo_error_msg);
    cache->gaia_rttopo_error_msg = NULL;

    msg = sqlite3_vmprintf (fmt, ap);
    if (msg)
      {
	  if (strlen (msg) > 0)
	    {
		if (cache->silent_mode == 0)
		    spatialite_e ("RTTOPO error: %s\n\n", msg);
		len = strlen (msg);
		cache->gaia_rttopo_error_msg = malloc (len + 1);
		strcpy (cache->gaia_rttopo_error_msg, msg);
	    }
	  sqlite3_free (msg);
      }
    return;

  invalid_cache:
    if (msg)
      {
	  spatialite_e ("RTTOPO error: %s\n", msg);
	  sqlite3_free (msg);
      }
}

static void
conn_rttopo_warning (const char *fmt, va_list ap, void *userdata)
{
/* reporting some RTTOPO warning - thread safe */
    char *msg = NULL;
    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) userdata;
    if (cache == NULL)
	goto invalid_cache;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	goto invalid_cache;

    if (cache->gaia_rttopo_warning_msg != NULL)
	free (cache->gaia_rttopo_warning_msg);
    cache->gaia_rttopo_warning_msg = NULL;

    msg = sqlite3_vmprintf (fmt, ap);
    if (msg)
      {
	  if (strlen (msg) > 0)
	    {
		/* disabled so to stop endless warnings caused by topo-tolerance */
		if (cache->silent_mode == 0)
		    spatialite_e ("RTTOPO warning: %s\n", msg);
		len = strlen (msg);
		cache->gaia_rttopo_warning_msg = malloc (len + 1);
		strcpy (cache->gaia_rttopo_warning_msg, msg);
	    }
	  sqlite3_free (msg);
      }
    return;

  invalid_cache:
    if (msg)
      {
	  spatialite_e ("RTTOPO warning: %s\n\n", msg);
	  sqlite3_free (msg);
      }
}

#ifndef GEOS_REENTRANT		/* only when using the obsolete partially thread-safe mode */
static void
setGeosErrorMsg (int pool_index, const char *msg)
{
/* setting the latest GEOS error message */
    struct splite_connection *p = &(splite_connection_pool[pool_index]);
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) (p->conn_ptr);
    conn_geos_error (msg, cache);
}

static void
setGeosWarningMsg (int pool_index, const char *msg)
{
/* setting the latest GEOS error message */
    struct splite_connection *p = &(splite_connection_pool[pool_index]);
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) (p->conn_ptr);
    conn_geos_warning (msg, cache);






















}

static void
geos_error_r (int pool_index, const char *fmt, va_list ap)
{
/* reporting some GEOS error - thread safe */
    char *msg;
................................................................................
}

static void
invalidate (int i)
{
/* definitely releasing the slot */
    struct splite_connection *p = &(splite_connection_pool[i]);









    p->conn_ptr = NULL;
}
#endif /* END obsolete partially thread-safe mode */

static void
init_splite_internal_cache (struct splite_internal_cache *cache)


{
/* common initialization of the internal cache */

    gaiaOutBufferPtr out;
    int i;
    const char *tinyPoint;

    struct splite_geos_cache_item *p;
    struct splite_xmlSchema_cache_item *p_xmlSchema;














    if (cache == NULL)
	return;




    cache->magic1 = SPATIALITE_CACHE_MAGIC1;
    cache->magic2 = SPATIALITE_CACHE_MAGIC2;
    cache->gpkg_mode = 0;
    cache->gpkg_amphibious_mode = 0;
    cache->decimal_precision = -1;
    cache->GEOS_handle = NULL;
    cache->PROJ_handle = NULL;
    cache->RTTOPO_handle = NULL;
    cache->cutterMessage = NULL;
    cache->storedProcError = NULL;
    cache->createRoutingError = NULL;
    cache->SqlProcLogfile = NULL;
    cache->SqlProcLog = NULL;
    cache->SqlProcContinue = 1;
    cache->pool_index = -1;
    cache->gaia_geos_error_msg = NULL;
    cache->gaia_geos_warning_msg = NULL;
    cache->gaia_geosaux_error_msg = NULL;
    cache->gaia_rttopo_error_msg = NULL;
    cache->gaia_rttopo_warning_msg = NULL;
    cache->silent_mode = 0;
    cache->tinyPointEnabled = 0;
    tinyPoint = getenv ("SPATIALITE_TINYPOINT");
    if (tinyPoint == NULL)
	;
    else if (atoi (tinyPoint) != 0)
	cache->tinyPointEnabled = 1;
/* initializing an empty linked list of Topologies */
    cache->firstTopology = NULL;
    cache->lastTopology = NULL;
    cache->next_topo_savepoint = 0;
    cache->first_topo_svpt = NULL;
    cache->last_topo_svpt = NULL;
    cache->firstNetwork = NULL;
    cache->lastNetwork = NULL;
    cache->next_network_savepoint = 0;
    cache->first_net_svpt = NULL;
    cache->last_net_svpt = NULL;
/* initializing Sequences */
    cache->first_seq = NULL;
    cache->last_seq = NULL;
    cache->ok_last_used_sequence = 0;
    cache->last_used_sequence_val = 0;
/* initializing SHP BBOXes */
    cache->first_shp_extent = NULL;
    cache->last_shp_extent = NULL;
/* initializing the XML error buffers */
    out = malloc (sizeof (gaiaOutBuffer));
    gaiaOutBufferInitialize (out);
    cache->xmlParsingErrors = out;
    out = malloc (sizeof (gaiaOutBuffer));
    gaiaOutBufferInitialize (out);
    cache->xmlSchemaValidationErrors = out;
................................................................................
	  p_xmlSchema = &(cache->xmlSchemaCache[i]);
	  p_xmlSchema->timestamp = 0;
	  p_xmlSchema->schemaURI = NULL;
	  p_xmlSchema->schemaDoc = NULL;
	  p_xmlSchema->parserCtxt = NULL;
	  p_xmlSchema->schema = NULL;
      }
}

#ifdef GEOS_REENTRANT		/* reentrant (thread-safe) initialization */
static void *
spatialite_alloc_reentrant ()
{
/* 
 * allocating and initializing an empty internal cache 
 * fully reentrant (thread-safe) version requiring GEOS >= 3.5.0
*/
    struct splite_internal_cache *cache = NULL;

/* attempting to implicitly initialize the library */
    spatialite_initialize ();

    cache = malloc (sizeof (struct splite_internal_cache));
    if (cache == NULL)
	goto done;
    init_splite_internal_cache (cache);

/* initializing GEOS and PROJ.4 handles */

#ifndef OMIT_GEOS		/* initializing GEOS */
    cache->GEOS_handle = GEOS_init_r (NULL, NULL);
    GEOSContext_setNoticeMessageHandler_r (cache->GEOS_handle,
					   conn_geos_warning, cache);
    GEOSContext_setErrorMessageHandler_r (cache->GEOS_handle, conn_geos_error,
					  cache);
#endif /* end GEOS  */

#ifndef OMIT_PROJ		/* initializing the PROJ.4 context */
    cache->PROJ_handle = pj_ctx_alloc ();
#endif /* end PROJ.4  */

#ifdef ENABLE_RTTOPO		/* initializing the RTTOPO context */
    cache->RTTOPO_handle = rtgeom_init (NULL, NULL, NULL);
    rtgeom_set_error_logger (cache->RTTOPO_handle, conn_rttopo_error, cache);
    rtgeom_set_notice_logger (cache->RTTOPO_handle, conn_rttopo_warning, cache);
#endif /* end RTTOPO */

  done:
    return cache;
}
#endif /* end GEOS_REENTRANT */

SPATIALITE_DECLARE void *
spatialite_alloc_connection ()
{
/* allocating and initializing an empty internal cache */

#ifdef GEOS_REENTRANT		/* reentrant (thread-safe) initialization */
    return spatialite_alloc_reentrant ();
#else /* end GEOS_REENTRANT */
    struct splite_internal_cache *cache = NULL;
    int pool_index;

/* attempting to implicitly initialize the library */
    spatialite_initialize ();

/* locking the semaphore */
    splite_cache_semaphore_lock ();

    pool_index = find_free_connection ();

    if (pool_index < 0)
	goto done;

    cache = malloc (sizeof (struct splite_internal_cache));
    if (cache == NULL)
      {
	  invalidate (pool_index);
	  goto done;
      }
    init_splite_internal_cache (cache);
    cache->pool_index = pool_index;
    confirm (pool_index, cache);

#include "cache_aux_3.h"

/* initializing GEOS and PROJ.4 handles */

#ifndef OMIT_GEOS		/* initializing GEOS */
    cache->GEOS_handle = initGEOS_r (cache->geos_warning, cache->geos_error);
................................................................................
    cache->PROJ_handle = pj_ctx_alloc ();
#endif /* end PROJ.4  */

  done:
/* unlocking the semaphore */
    splite_cache_semaphore_unlock ();
    return cache;
#endif
}

SPATIALITE_DECLARE void
spatialite_finalize_topologies (const void *ptr)
{
#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
/* freeing all Topology Accessor Objects */
    struct splite_savepoint *p_svpt;
    struct splite_savepoint *p_svpt_n;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) ptr;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;
    free_internal_cache_topologies (cache->firstTopology);
    cache->firstTopology = NULL;
    cache->lastTopology = NULL;
    p_svpt = cache->first_topo_svpt;
    while (p_svpt != NULL)
      {
	  p_svpt_n = p_svpt->next;
	  if (p_svpt->savepoint_name != NULL)
	      sqlite3_free (p_svpt->savepoint_name);
	  free (p_svpt);
	  p_svpt = p_svpt_n;
      }
    cache->first_topo_svpt = NULL;
    cache->last_topo_svpt = NULL;
    free_internal_cache_networks (cache->firstNetwork);
    cache->firstNetwork = NULL;
    cache->lastTopology = NULL;
    p_svpt = cache->first_net_svpt;
    while (p_svpt != NULL)
      {
	  p_svpt_n = p_svpt->next;
	  if (p_svpt->savepoint_name != NULL)
	      sqlite3_free (p_svpt->savepoint_name);
	  free (p_svpt);
	  p_svpt = p_svpt_n;
      }
    cache->first_net_svpt = NULL;
    cache->last_net_svpt = NULL;
#else
    if (ptr == NULL)
	return;			/* silencing stupid compiler warnings */
#endif /* end RTTOPO conditionals */
}

static void
free_sequences (struct splite_internal_cache *cache)
{
/* freeing all Sequences */
    gaiaSequencePtr pS;
    gaiaSequencePtr pSn;

    pS = cache->first_seq;
    while (pS != NULL)
      {
	  pSn = pS->next;
	  if (pS->seq_name != NULL)
	      free (pS->seq_name);
	  free (pS);
	  pS = pSn;
      }
}

static void
free_shp_extents (struct splite_internal_cache *cache)
{
/* freeing all SHP BBOXes */
    struct splite_shp_extent *pS;
    struct splite_shp_extent *pSn;

    pS = cache->first_shp_extent;
    while (pS != NULL)
      {
	  pSn = pS->next;
	  if (pS->table != NULL)
	      free (pS->table);
	  free (pS);
	  pS = pSn;
      }
}

SPATIALITE_PRIVATE void
add_shp_extent (const char *table, double minx,
		double miny, double maxx,
		double maxy, int srid, const void *p_cache)
{
/* adding a Shapefile Full Extent */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    struct splite_shp_extent *shp = malloc (sizeof (struct splite_shp_extent));
    int len = strlen (table);
    shp->table = malloc (len + 1);
    strcpy (shp->table, table);
    shp->minx = minx;
    shp->miny = miny;
    shp->maxx = maxx;
    shp->maxy = maxy;
    shp->srid = srid;
    shp->prev = cache->last_shp_extent;
    shp->next = NULL;
    if (cache->first_shp_extent == NULL)
	cache->first_shp_extent = shp;
    if (cache->last_shp_extent != NULL)
	cache->last_shp_extent->next = shp;
    cache->last_shp_extent = shp;
}

SPATIALITE_PRIVATE void
remove_shp_extent (const char *table, const void *p_cache)
{
/* adding a Shapefile Full Extent */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    struct splite_shp_extent *shp_n;
    struct splite_shp_extent *shp = cache->first_shp_extent;
    while (shp != NULL)
      {
	  shp_n = shp->next;
	  if (strcasecmp (shp->table, table) == 0)
	    {
		if (shp->table != NULL)
		    free (shp->table);
		if (shp->next != NULL)
		    shp->next->prev = shp->prev;
		if (shp->prev != NULL)
		    shp->prev->next = shp->next;
		if (cache->first_shp_extent == shp)
		    cache->first_shp_extent = shp->next;
		if (cache->last_shp_extent == shp)
		    cache->last_shp_extent = shp->prev;
		free (shp);
	    }
	  shp = shp_n;
      }
}

SPATIALITE_PRIVATE int
get_shp_extent (const char *table, double *minx, double *miny, double *maxx,
		double *maxy, int *srid, const void *p_cache)
{
/* retrieving a Shapefile Full Extent */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    struct splite_shp_extent *shp = cache->first_shp_extent;
    while (shp != NULL)
      {
	  if (strcasecmp (shp->table, table) == 0)
	    {
		*minx = shp->minx;
		*miny = shp->miny;
		*maxx = shp->maxx;
		*maxy = shp->maxy;
		*srid = shp->srid;
		return 1;
	    }
	  shp = shp->next;
      }
    return 0;
}

SPATIALITE_PRIVATE void
free_internal_cache (struct splite_internal_cache *cache)
{
/* freeing an internal cache */
    struct splite_geos_cache_item *p;
................................................................................
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

#ifndef OMIT_GEOS
    handle = cache->GEOS_handle;
    if (handle != NULL)
#ifdef GEOS_REENTRANT		/* reentrant (thread-safe) initialization */
	GEOS_finish_r (handle);
#else /* end GEOS_REENTRANT */
	finishGEOS_r (handle);
#endif
    cache->GEOS_handle = NULL;
    gaiaResetGeosMsg_r (cache);
#endif

#ifndef OMIT_PROJ
    if (cache->PROJ_handle != NULL)
	pj_ctx_free (cache->PROJ_handle);
    cache->PROJ_handle = NULL;
#endif

/* freeing GEOS error buffers */
    if (cache->gaia_geos_error_msg)
	free (cache->gaia_geos_error_msg);
    if (cache->gaia_geos_warning_msg)
	free (cache->gaia_geos_warning_msg);
    if (cache->gaia_geosaux_error_msg)
	free (cache->gaia_geosaux_error_msg);

/* freeing RTTOPO error buffers */
    if (cache->gaia_rttopo_error_msg)
	free (cache->gaia_rttopo_error_msg);
    if (cache->gaia_rttopo_warning_msg)
	free (cache->gaia_rttopo_warning_msg);

/* freeing the XML error buffers */
    gaiaOutBufferReset (cache->xmlParsingErrors);
    gaiaOutBufferReset (cache->xmlSchemaValidationErrors);
    gaiaOutBufferReset (cache->xmlXPathErrors);
    free (cache->xmlParsingErrors);
    free (cache->xmlSchemaValidationErrors);
    free (cache->xmlXPathErrors);
................................................................................
      {
	  /* freeing the XmlSchema cache */
	  p_xmlSchema = &(cache->xmlSchemaCache[i]);
	  splite_free_xml_schema_cache_item (p_xmlSchema);
      }
#endif

    if (cache->cutterMessage != NULL)
	sqlite3_free (cache->cutterMessage);
    cache->cutterMessage = NULL;
    if (cache->createRoutingError != NULL)
	free (cache->createRoutingError);
    cache->createRoutingError = NULL;
    if (cache->storedProcError != NULL)
	free (cache->storedProcError);
    cache->storedProcError = NULL;
    if (cache->SqlProcLogfile != NULL)
	free (cache->SqlProcLogfile);
    cache->SqlProcLogfile = NULL;
    if (cache->SqlProcLog != NULL)
	fclose (cache->SqlProcLog);
    cache->SqlProcLog = NULL;
    free_sequences (cache);
    free_shp_extents (cache);

    spatialite_finalize_topologies (cache);

#ifdef ENABLE_RTTOPO
    if (cache->RTTOPO_handle != NULL)
	rtgeom_finish (cache->RTTOPO_handle);
    cache->RTTOPO_handle = NULL;
#endif

#ifndef GEOS_REENTRANT		/* only partially thread-safe mode */
/* releasing the connection pool object */
    invalidate (cache->pool_index);
#endif /* end GEOS_REENTRANT */

/* freeing the cache itself */
    free (cache);
}

GAIAGEO_DECLARE void
gaiaResetGeosMsg_r (const void *p_cache)
{
/* resets the GEOS error and warning messages */

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return;
    if (cache->gaia_geos_error_msg != NULL)
	free (cache->gaia_geos_error_msg);
    if (cache->gaia_geos_warning_msg != NULL)
	free (cache->gaia_geos_warning_msg);
    if (cache->gaia_geosaux_error_msg != NULL)
	free (cache->gaia_geosaux_error_msg);
    cache->gaia_geos_error_msg = NULL;
    cache->gaia_geos_warning_msg = NULL;
    cache->gaia_geosaux_error_msg = NULL;
}

GAIAGEO_DECLARE const char *
gaiaGetGeosErrorMsg_r (const void *p_cache)
{
/* return the latest GEOS error message */

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return NULL;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return NULL;
    return cache->gaia_geos_error_msg;
}

GAIAGEO_DECLARE const char *
gaiaGetGeosWarningMsg_r (const void *p_cache)
{
/* return the latest GEOS error message */

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return NULL;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return NULL;
    return cache->gaia_geos_warning_msg;
}

GAIAGEO_DECLARE const char *
gaiaGetGeosAuxErrorMsg_r (const void *p_cache)
{
/* return the latest GEOS (auxialiary) error message */

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return NULL;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return NULL;
    return cache->gaia_geosaux_error_msg;
}

GAIAGEO_DECLARE void
gaiaSetGeosErrorMsg_r (const void *p_cache, const char *msg)
{
/* setting the latest GEOS error message */
    int len;

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return;
    if (cache->gaia_geos_error_msg != NULL)
	free (cache->gaia_geos_error_msg);
    cache->gaia_geos_error_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    cache->gaia_geos_error_msg = malloc (len + 1);
    strcpy (cache->gaia_geos_error_msg, msg);
}

GAIAGEO_DECLARE void
gaiaSetGeosWarningMsg_r (const void *p_cache, const char *msg)
{
/* setting the latest GEOS error message */
    int len;

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return;
    if (cache->gaia_geos_warning_msg != NULL)
	free (cache->gaia_geos_warning_msg);
    cache->gaia_geos_warning_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    cache->gaia_geos_warning_msg = malloc (len + 1);
    strcpy (cache->gaia_geos_warning_msg, msg);
}

GAIAGEO_DECLARE void
gaiaSetGeosAuxErrorMsg_r (const void *p_cache, const char *msg)
{
/* setting the latest GEOS (auxiliary) error message */
    int len;

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;

    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else


	return;
    if (cache->gaia_geosaux_error_msg != NULL)
	free (cache->gaia_geosaux_error_msg);
    cache->gaia_geosaux_error_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    cache->gaia_geosaux_error_msg = malloc (len + 1);
    strcpy (cache->gaia_geosaux_error_msg, msg);
}

static char *
parse_number_from_msg (const char *str)
{
/* attempting to parse a number from a string */
    int sign = 0;
................................................................................
/ Attempts to return a Point Geometry extracted from the latest GEOS 
/ error / warning message
*/
    double x;
    double y;
    gaiaGeomCollPtr geom;
    const char *msg;

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;


    if (cache == NULL)
	return NULL;
    if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 == SPATIALITE_CACHE_MAGIC2)
	;
    else
	return NULL;




    msg = cache->gaia_geos_error_msg;
    if (msg == NULL)
	msg = cache->gaia_geos_warning_msg;
    if (msg == NULL)
	return NULL;
    if (!check_geos_critical_point (msg, &x, &y))
	return NULL;
    geom = gaiaAllocGeomColl ();
    gaiaAddPointToGeomColl (geom, x, y);
    return geom;
}

SPATIALITE_PRIVATE void
splite_cache_semaphore_lock (void)
{
#if defined(_WIN32) && !defined(__MINGW32__)
    EnterCriticalSection (&gaia_cache_semaphore);
#else
    pthread_mutex_lock (&gaia_cache_semaphore);
#endif
}

SPATIALITE_PRIVATE void
splite_cache_semaphore_unlock (void)
{
#if defined(_WIN32) && !defined(__MINGW32__)
    LeaveCriticalSection (&gaia_cache_semaphore);
#else
    pthread_mutex_trylock (&gaia_cache_semaphore);
    pthread_mutex_unlock (&gaia_cache_semaphore);
#endif
}





















SPATIALITE_DECLARE void
spatialite_initialize (void)
{
/* initializes the library */
    if (gaia_already_initialized)
	return;

#if defined(_WIN32) && !defined(__MINGW32__)
    InitializeCriticalSection (&gaia_cache_semaphore);

#endif

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    xmlInitParser ();
#endif /* end LIBXML2 conditional */

    gaia_already_initialized = 1;
}

SPATIALITE_DECLARE void
spatialite_shutdown (void)
{
/* finalizes the library */
#ifndef GEOS_REENTRANT
    int i;
#endif
    if (!gaia_already_initialized)
	return;

#if defined(_WIN32) && !defined(__MINGW32__)
    DeleteCriticalSection (&gaia_cache_semaphore);

#endif

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    xmlCleanupParser ();
#endif /* end LIBXML2 conditional */

#ifndef GEOS_REENTRANT		/* only when using the obsolete partially thread-safe mode */
    for (i = 0; i < SPATIALITE_MAX_CONNECTIONS; i++)
      {
	  struct splite_connection *p = &(splite_connection_pool[i]);
	  if (p->conn_ptr != NULL && p->conn_ptr != GAIA_CONN_RESERVED)
	      free_internal_cache (p->conn_ptr);
      }
#endif /* end GEOS_REENTRANT */

    gaia_already_initialized = 0;
}

SPATIALITE_DECLARE void
spatialite_set_silent_mode (const void *p_cache)
{
/* setting up the SILENT mode */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;
    cache->silent_mode = 1;
}

SPATIALITE_DECLARE void
spatialite_set_verbose_mode (const void *p_cache)
{
/* setting up the VERBOSE mode */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;
    cache->silent_mode = 0;
}

SPATIALITE_DECLARE void
enable_tiny_point (const void *p_cache)
{
/* Enabling the BLOB-TinyPoint encoding */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;
    cache->tinyPointEnabled = 1;
}

SPATIALITE_DECLARE void
disable_tiny_point (const void *p_cache)
{
/* Disabling the BLOB-TinyPoint encoding */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;
    cache->tinyPointEnabled = 0;
}

SPATIALITE_DECLARE int
is_tiny_point_enabled (const void *p_cache)
{
/* Checking if the BLOB-TinyPoint encoding is enabled or not */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    return cache->tinyPointEnabled;
}



|







 







|







 







|







 







<
<
<
<
<







<
<
<
<
<

<
<
<
<
<







|

>


>





<
>

<
>
>

<
<
<
<
<
<
<
<
|
|
|
|
<
<
<
>
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>


<

<
<
>
>

<
>


<
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>

<
|
>
>
>


<
<
<


<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


<









>


|
<
>
|
|
<
|
>
>

|
|
|
|
|
|
|
|
|






>


|
<
>
|
|
<
|
>
>

|






>


|
<
>
|
|
<
|
>
>

|






>


|
<
>
|
|
<
|
>
>

|







>


|
<
>
|
|
<
|
>
>

|
|
|



|
|







>


|
<
>
|
|
<
|
>
>

|
|
|



|
|







>


|
<
>
|
|
<
|
>
>

|
|
|



|
|







 







>


>
|
<
<
|
|
<
<
<
>
|
>
>
|

|












|









|


<



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








|

>













<

<



|

>






<






<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
68
69
70
71
72
73
74





75
76
77
78
79
80
81





82





83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

101
102

103
104
105








106
107
108
109



110
111
112
113



































































































































114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
...
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

224


225
226
227

228
229
230

231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

249
250
251
252
253
254



255
256







257














258
















259
260
261
262
263
264
265
...
285
286
287
288
289
290
291












































































292
293
294
295
296
297
298
...
302
303
304
305
306
307
308



































































































































































309
310
311
312
313
314
315
...
327
328
329
330
331
332
333



334

335
336
337
338
339
340
341
342
343
344














345
346
347
348
349
350
351
...
360
361
362
363
364
365
366



























367
368

369
370
371
372
373
374
375
376
377
378
379
380
381

382
383
384

385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407

408
409
410

411
412
413
414
415
416
417
418
419
420
421
422
423
424
425

426
427
428

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443

444
445
446

447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462

463
464
465

466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488

489
490
491

492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514

515
516
517

518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
...
644
645
646
647
648
649
650
651
652
653
654
655


656
657



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689

690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736

737

738
739
740
741
742
743
744
745
746
747
748
749

750
751
752
753
754
755


756
757






































































/*
 alloc_cache.c -- Gaia spatial support for SQLite

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>


#ifdef _WIN32
#include <windows.h>
#else
#include <pthread.h>
#endif

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
................................................................................

#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gg_advanced.h>
#include <spatialite/gaiamatrix.h>

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif

#ifndef OMIT_PROJ		/* including PROJ.4 */
#include <proj_api.h>
#endif






#include "cache_aux_1.h"






/* GLOBAL variables */
extern char *gaia_geos_error_msg;
extern char *gaia_geos_warning_msg;

/* GLOBAL semaphores */
int gaia_already_initialized = 0;
#ifdef _WIN32
static CRITICAL_SECTION gaia_cache_semaphore;
static CRITICAL_SECTION gaia_lwgeom_semaphore;
#else
static pthread_mutex_t gaia_cache_semaphore = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t gaia_lwgeom_semaphore = PTHREAD_MUTEX_INITIALIZER;
#endif

#define GAIA_CONN_RESERVED	(char *)1

static void

setGeosErrorMsg (int pool_index, const char *msg)
{

/* setting the latest GEOS error message */
    struct splite_connection *p = &(splite_connection_pool[pool_index]);
    int len;








    if (p->gaia_geos_error_msg != NULL)
	free (p->gaia_geos_error_msg);
    p->gaia_geos_error_msg = NULL;
    if (msg == NULL)



	return;
    len = strlen (msg);
    p->gaia_geos_error_msg = malloc (len + 1);
    strcpy (p->gaia_geos_error_msg, msg);



































































































































}

static void
setGeosWarningMsg (int pool_index, const char *msg)
{
/* setting the latest GEOS error message */
    struct splite_connection *p = &(splite_connection_pool[pool_index]);
    int len;
    if (p->gaia_geos_warning_msg != NULL)
	free (p->gaia_geos_warning_msg);
    p->gaia_geos_warning_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    p->gaia_geos_warning_msg = malloc (len + 1);
    strcpy (p->gaia_geos_warning_msg, msg);
}

static void
setGeosAuxErrorMsg (int pool_index, const char *msg)
{
/* setting the latest GEOS (auxiliary) error message */
    struct splite_connection *p = &(splite_connection_pool[pool_index]);
    int len;
    if (p->gaia_geosaux_error_msg != NULL)
	free (p->gaia_geosaux_error_msg);
    p->gaia_geosaux_error_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    p->gaia_geosaux_error_msg = malloc (len + 1);
    strcpy (p->gaia_geosaux_error_msg, msg);
}

static void
geos_error_r (int pool_index, const char *fmt, va_list ap)
{
/* reporting some GEOS error - thread safe */
    char *msg;
................................................................................
}

static void
invalidate (int i)
{
/* definitely releasing the slot */
    struct splite_connection *p = &(splite_connection_pool[i]);
    if (p->gaia_geos_error_msg != NULL)
	free (p->gaia_geos_error_msg);
    if (p->gaia_geos_warning_msg != NULL)
	free (p->gaia_geos_warning_msg);
    if (p->gaia_geosaux_error_msg != NULL)
	free (p->gaia_geosaux_error_msg);
    p->gaia_geos_error_msg = NULL;
    p->gaia_geos_warning_msg = NULL;
    p->gaia_geosaux_error_msg = NULL;
    p->conn_ptr = NULL;
}




SPATIALITE_DECLARE void *
spatialite_alloc_connection ()
{

/* allocating and initializing an empty internal cache */
    gaiaOutBufferPtr out;
    int i;

    struct splite_internal_cache *cache = NULL;
    struct splite_geos_cache_item *p;
    struct splite_xmlSchema_cache_item *p_xmlSchema;
    int pool_index;

/* attempting to implicitly initialize the library */
    spatialite_initialize ();

/* locking the semaphore */
    splite_cache_semaphore_lock ();

    pool_index = find_free_connection ();

    if (pool_index < 0)
	goto done;

    cache = malloc (sizeof (struct splite_internal_cache));
    if (cache == NULL)

      {
	  invalidate (pool_index);
	  goto done;
      }
    cache->magic1 = SPATIALITE_CACHE_MAGIC1;
    cache->magic2 = SPATIALITE_CACHE_MAGIC2;



    cache->GEOS_handle = NULL;
    cache->PROJ_handle = NULL;







    cache->pool_index = pool_index;














    confirm (pool_index, cache);
















/* initializing the XML error buffers */
    out = malloc (sizeof (gaiaOutBuffer));
    gaiaOutBufferInitialize (out);
    cache->xmlParsingErrors = out;
    out = malloc (sizeof (gaiaOutBuffer));
    gaiaOutBufferInitialize (out);
    cache->xmlSchemaValidationErrors = out;
................................................................................
	  p_xmlSchema = &(cache->xmlSchemaCache[i]);
	  p_xmlSchema->timestamp = 0;
	  p_xmlSchema->schemaURI = NULL;
	  p_xmlSchema->schemaDoc = NULL;
	  p_xmlSchema->parserCtxt = NULL;
	  p_xmlSchema->schema = NULL;
      }













































































#include "cache_aux_3.h"

/* initializing GEOS and PROJ.4 handles */

#ifndef OMIT_GEOS		/* initializing GEOS */
    cache->GEOS_handle = initGEOS_r (cache->geos_warning, cache->geos_error);
................................................................................
    cache->PROJ_handle = pj_ctx_alloc ();
#endif /* end PROJ.4  */

  done:
/* unlocking the semaphore */
    splite_cache_semaphore_unlock ();
    return cache;



































































































































































}

SPATIALITE_PRIVATE void
free_internal_cache (struct splite_internal_cache *cache)
{
/* freeing an internal cache */
    struct splite_geos_cache_item *p;
................................................................................
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

#ifndef OMIT_GEOS
    handle = cache->GEOS_handle;
    if (handle != NULL)



	finishGEOS_r (handle);

    cache->GEOS_handle = NULL;
    gaiaResetGeosMsg_r (cache);
#endif

#ifndef OMIT_PROJ
    if (cache->PROJ_handle != NULL)
	pj_ctx_free (cache->PROJ_handle);
    cache->PROJ_handle = NULL;
#endif















/* freeing the XML error buffers */
    gaiaOutBufferReset (cache->xmlParsingErrors);
    gaiaOutBufferReset (cache->xmlSchemaValidationErrors);
    gaiaOutBufferReset (cache->xmlXPathErrors);
    free (cache->xmlParsingErrors);
    free (cache->xmlSchemaValidationErrors);
    free (cache->xmlXPathErrors);
................................................................................
      {
	  /* freeing the XmlSchema cache */
	  p_xmlSchema = &(cache->xmlSchemaCache[i]);
	  splite_free_xml_schema_cache_item (p_xmlSchema);
      }
#endif




























/* releasing the connection pool object */
    invalidate (cache->pool_index);


/* freeing the cache itself */
    free (cache);
}

GAIAGEO_DECLARE void
gaiaResetGeosMsg_r (const void *p_cache)
{
/* resets the GEOS error and warning messages */
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return;
    if (p->gaia_geos_error_msg != NULL)
	free (p->gaia_geos_error_msg);
    if (p->gaia_geos_warning_msg != NULL)
	free (p->gaia_geos_warning_msg);
    if (p->gaia_geosaux_error_msg != NULL)
	free (p->gaia_geosaux_error_msg);
    p->gaia_geos_error_msg = NULL;
    p->gaia_geos_warning_msg = NULL;
    p->gaia_geosaux_error_msg = NULL;
}

GAIAGEO_DECLARE const char *
gaiaGetGeosErrorMsg_r (const void *p_cache)
{
/* return the latest GEOS error message */
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return NULL;
    return p->gaia_geos_error_msg;
}

GAIAGEO_DECLARE const char *
gaiaGetGeosWarningMsg_r (const void *p_cache)
{
/* return the latest GEOS error message */
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return NULL;
    return p->gaia_geos_warning_msg;
}

GAIAGEO_DECLARE const char *
gaiaGetGeosAuxErrorMsg_r (const void *p_cache)
{
/* return the latest GEOS (auxialiary) error message */
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return NULL;
    return p->gaia_geosaux_error_msg;
}

GAIAGEO_DECLARE void
gaiaSetGeosErrorMsg_r (const void *p_cache, const char *msg)
{
/* setting the latest GEOS error message */
    int len;
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return;
    if (p->gaia_geos_error_msg != NULL)
	free (p->gaia_geos_error_msg);
    p->gaia_geos_error_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    p->gaia_geos_error_msg = malloc (len + 1);
    strcpy (p->gaia_geos_error_msg, msg);
}

GAIAGEO_DECLARE void
gaiaSetGeosWarningMsg_r (const void *p_cache, const char *msg)
{
/* setting the latest GEOS error message */
    int len;
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return;
    if (p->gaia_geos_warning_msg != NULL)
	free (p->gaia_geos_warning_msg);
    p->gaia_geos_warning_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    p->gaia_geos_warning_msg = malloc (len + 1);
    strcpy (p->gaia_geos_warning_msg, msg);
}

GAIAGEO_DECLARE void
gaiaSetGeosAuxErrorMsg_r (const void *p_cache, const char *msg)
{
/* setting the latest GEOS (auxiliary) error message */
    int len;
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)

      {
	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)

	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return;
    if (p->gaia_geosaux_error_msg != NULL)
	free (p->gaia_geosaux_error_msg);
    p->gaia_geosaux_error_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    p->gaia_geosaux_error_msg = malloc (len + 1);
    strcpy (p->gaia_geosaux_error_msg, msg);
}

static char *
parse_number_from_msg (const char *str)
{
/* attempting to parse a number from a string */
    int sign = 0;
................................................................................
/ Attempts to return a Point Geometry extracted from the latest GEOS 
/ error / warning message
*/
    double x;
    double y;
    gaiaGeomCollPtr geom;
    const char *msg;
    struct splite_connection *p = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache != NULL)
      {


	  if (cache->magic1 == SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 == SPATIALITE_CACHE_MAGIC2)



	      p = &(splite_connection_pool[cache->pool_index]);
      }
    if (p == NULL)
	return NULL;
    msg = p->gaia_geos_error_msg;
    if (msg == NULL)
	msg = p->gaia_geos_warning_msg;
    if (msg == NULL)
	return NULL;
    if (!check_geos_critical_point (msg, &x, &y))
	return NULL;
    geom = gaiaAllocGeomColl ();
    gaiaAddPointToGeomColl (geom, x, y);
    return geom;
}

SPATIALITE_PRIVATE void
splite_cache_semaphore_lock (void)
{
#ifdef _WIN32
    EnterCriticalSection (&gaia_cache_semaphore);
#else
    pthread_mutex_lock (&gaia_cache_semaphore);
#endif
}

SPATIALITE_PRIVATE void
splite_cache_semaphore_unlock (void)
{
#ifdef _WIN32
    LeaveCriticalSection (&gaia_cache_semaphore);
#else

    pthread_mutex_unlock (&gaia_cache_semaphore);
#endif
}

SPATIALITE_PRIVATE void
splite_lwgeom_semaphore_lock (void)
{
#ifdef _WIN32
    EnterCriticalSection (&gaia_lwgeom_semaphore);
#else
    pthread_mutex_lock (&gaia_lwgeom_semaphore);
#endif
}

SPATIALITE_PRIVATE void
splite_lwgeom_semaphore_unlock (void)
{
#ifdef _WIN32
    LeaveCriticalSection (&gaia_lwgeom_semaphore);
#else
    pthread_mutex_unlock (&gaia_lwgeom_semaphore);
#endif
}

SPATIALITE_DECLARE void
spatialite_initialize (void)
{
/* initializes the library */
    if (gaia_already_initialized)
	return;

#ifdef _WIN32
    InitializeCriticalSection (&gaia_cache_semaphore);
    InitializeCriticalSection (&gaia_lwgeom_semaphore);
#endif

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    xmlInitParser ();
#endif /* end LIBXML2 conditional */

    gaia_already_initialized = 1;
}

SPATIALITE_DECLARE void
spatialite_shutdown (void)
{
/* finalizes the library */

    int i;

    if (!gaia_already_initialized)
	return;

#ifdef _WIN32
    DeleteCriticalSection (&gaia_cache_semaphore);
    DeleteCriticalSection (&gaia_lwgeom_semaphore);
#endif

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    xmlCleanupParser ();
#endif /* end LIBXML2 conditional */


    for (i = 0; i < SPATIALITE_MAX_CONNECTIONS; i++)
      {
	  struct splite_connection *p = &(splite_connection_pool[i]);
	  if (p->conn_ptr != NULL && p->conn_ptr != GAIA_CONN_RESERVED)
	      free_internal_cache (p->conn_ptr);
      }


    gaia_already_initialized = 0;
}






































































Changes to src/connection_cache/cache_aux_1.h.

1
2
3
4
5
6



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72



73
#define SPATIALITE_MAX_CONNECTIONS	64

struct splite_connection
{
/* connections pool */
	void *conn_ptr;



} splite_connection_pool[SPATIALITE_MAX_CONNECTIONS] =
{
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL},
	{NULL}



};






>
>
>


<
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#define SPATIALITE_MAX_CONNECTIONS	64

struct splite_connection
{
/* connections pool */
	void *conn_ptr;
	char *gaia_geos_error_msg;
	char *gaia_geos_warning_msg;
	char *gaia_geosaux_error_msg;
} splite_connection_pool[SPATIALITE_MAX_CONNECTIONS] =
{



	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL},
	{NULL, NULL, NULL, NULL}
};

Changes to src/connection_cache/generator/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
263
264
265
266
267
268
269

270
271
272
273
274
275
276
...
437
438
439
440
441
442
443
444
445
446
447
448
449
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/connection_cache/generator

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/connection_cache/generator/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/connection_cache/generator/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
427
428
429
430
431
432
433


434
435
436
437
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/connection_cache/generator
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/connection_cache/generator/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/connection_cache/generator/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/connection_cache/generator/code_generator.c.

71
72
73
74
75
76
77



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	  fprintf (stderr, "Unable to create/open \"cache_aux_1.h\"\n");
	  return -1;
      }
    fprintf (out, "#define SPATIALITE_MAX_CONNECTIONS\t%d\n\n", max);
    fprintf (out, "struct splite_connection\n{\n");
    fprintf (out, "/* connections pool */\n");
    fprintf (out, "\tvoid *conn_ptr;\n");



    fprintf (out,
	     "} splite_connection_pool[" "SPATIALITE_MAX_CONNECTIONS] =\n{\n");
    for (i = 0; i < max; i++)
      {
	  if (i == (max - 1))
	      fprintf (out, "\t{NULL}\n");
	  else
	      fprintf (out, "\t{NULL},\n");
      }
    fprintf (out, "};\n");
    fclose (out);

/* generating "cache_aux_2.h" */
    out = fopen ("cache_aux_2.h", "w");
    if (out == NULL)







>
>
>





|

|







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
	  fprintf (stderr, "Unable to create/open \"cache_aux_1.h\"\n");
	  return -1;
      }
    fprintf (out, "#define SPATIALITE_MAX_CONNECTIONS\t%d\n\n", max);
    fprintf (out, "struct splite_connection\n{\n");
    fprintf (out, "/* connections pool */\n");
    fprintf (out, "\tvoid *conn_ptr;\n");
    fprintf (out, "\tchar *gaia_geos_error_msg;\n");
    fprintf (out, "\tchar *gaia_geos_warning_msg;\n");
    fprintf (out, "\tchar *gaia_geosaux_error_msg;\n");
    fprintf (out,
	     "} splite_connection_pool[" "SPATIALITE_MAX_CONNECTIONS] =\n{\n");
    for (i = 0; i < max; i++)
      {
	  if (i == (max - 1))
	      fprintf (out, "\t{NULL, NULL, NULL, NULL}\n");
	  else
	      fprintf (out, "\t{NULL, NULL, NULL, NULL},\n");
      }
    fprintf (out, "};\n");
    fclose (out);

/* generating "cache_aux_2.h" */
    out = fopen ("cache_aux_2.h", "w");
    if (out == NULL)

Deleted src/connection_cache/gg_sequence.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*
 gg_sequence.c -- Gaia support for Spatialite's own Sequence
  
 version 4.4, 2016 August 12

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2013-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

GAIASEQ_DECLARE gaiaSequencePtr
gaiaCreateSequence (const void *p_cache, const char *seq_name)
{
/* creating a new Sequence or retrieving an already existing Sequence */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    gaiaSequencePtr seq;

    if (cache == NULL)
	return NULL;
    seq = cache->first_seq;
    while (seq != NULL)
      {
	  /* testing for an existing Sequence */
	  if (seq_name == NULL && seq->seq_name == NULL)
	      return seq;
	  if (seq_name != NULL && seq->seq_name != NULL)
	    {
		if (strcasecmp (seq_name, seq->seq_name) == 0)
		    return seq;
	    }
	  seq = seq->next;
      }

/* not already existsting; creating a new Sequence */
    seq = malloc (sizeof (gaiaSequence));
    if (seq_name == NULL)
	seq->seq_name = NULL;
    else
      {
	  int len = strlen (seq_name);
	  seq->seq_name = malloc (len + 1);
	  strcpy (seq->seq_name, seq_name);
      }
    seq->value = 0;
    seq->next = NULL;

/* inserting into the linked list */
    if (cache->first_seq == NULL)
	cache->first_seq = seq;
    if (cache->last_seq != NULL)
	cache->last_seq->next = seq;
    cache->last_seq = seq;

    return seq;
}

GAIASEQ_DECLARE gaiaSequencePtr
gaiaFindSequence (const void *p_cache, const char *seq_name)
{
/* retrieving an existing Sequence */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    gaiaSequencePtr seq;

    if (cache == NULL)
	return NULL;
    seq = cache->first_seq;
    while (seq != NULL)
      {
	  /* testing for an existing Sequence */
	  if (seq_name == NULL && seq->seq_name == NULL)
	      return seq;
	  if (seq_name != NULL && seq->seq_name != NULL)
	    {
		if (strcasecmp (seq_name, seq->seq_name) == 0)
		    return seq;
	    }
	  seq = seq->next;
      }

    return NULL;
}

GAIASEQ_DECLARE int
gaiaLastUsedSequence (const void *p_cache, int *value)
{
/* return the most recently used Sequence (if any) */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;

    if (cache == NULL)
	return 0;
    if (cache->ok_last_used_sequence == 0)
	return 0;
    *value = cache->last_used_sequence_val;
    return 1;
}

GAIASEQ_DECLARE int
gaiaSequenceNext (const void *p_cache, gaiaSequencePtr seq)
{
/* inreases the Sequence value */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;

    if (cache == NULL)
	return 0;
    if (seq == NULL)
	return 0;

    seq->value += 1;
    cache->ok_last_used_sequence = 1;
    cache->last_used_sequence_val = seq->value;
    return 1;
}

GAIASEQ_DECLARE int
gaiaResetSequence (gaiaSequencePtr seq, int value)
{
/* resetting a Sequence */
    if (seq == NULL)
	return 0;

    seq->value = abs (value);
    return 1;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































Changes to src/control_points/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

EXTRA_DIST = COPYING

noinst_HEADERS = grass_crs.h
noinst_LTLIBRARIES = libcontrol_points.la control_points.la

libcontrol_points_la_SOURCES = gaia_control_points.c grass_crs3d.c \
	grass_georef.c grass_georef_tps.c

control_points_la_SOURCES = gaia_control_points.c grass_crs3d.c \
	grass_georef.c grass_georef_tps.c

control_points_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
control_points_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
control_points_la_CPPFLAGS += -DLOADABLE_EXTENSION
control_points_la_LDFLAGS = -module
control_points_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|













|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

EXTRA_DIST = COPYING

noinst_HEADERS = grass_crs.h
noinst_LTLIBRARIES = libcontrol_points.la control_points.la

libcontrol_points_la_SOURCES = gaia_control_points.c grass_crs3d.c \
	grass_georef.c grass_georef_tps.c

control_points_la_SOURCES = gaia_control_points.c grass_crs3d.c \
	grass_georef.c grass_georef_tps.c

control_points_la_CPPFLAGS = @CFLAGS@
control_points_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
control_points_la_CPPFLAGS += -DLOADABLE_EXTENSION
control_points_la_LDFLAGS = -module
control_points_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Deleted src/control_points/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/control_points
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
	$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
control_points_la_LIBADD =
am_control_points_la_OBJECTS =  \
	control_points_la-gaia_control_points.lo \
	control_points_la-grass_crs3d.lo \
	control_points_la-grass_georef.lo \
	control_points_la-grass_georef_tps.lo
control_points_la_OBJECTS = $(am_control_points_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
control_points_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(control_points_la_LDFLAGS) \
	$(LDFLAGS) -o $@
libcontrol_points_la_LIBADD =
am_libcontrol_points_la_OBJECTS = gaia_control_points.lo \
	grass_crs3d.lo grass_georef.lo grass_georef_tps.lo
libcontrol_points_la_OBJECTS = $(am_libcontrol_points_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(control_points_la_SOURCES) $(libcontrol_points_la_SOURCES)
DIST_SOURCES = $(control_points_la_SOURCES) \
	$(libcontrol_points_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp COPYING
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I.
EXTRA_DIST = COPYING
noinst_HEADERS = grass_crs.h
noinst_LTLIBRARIES = libcontrol_points.la control_points.la
libcontrol_points_la_SOURCES = gaia_control_points.c grass_crs3d.c \
	grass_georef.c grass_georef_tps.c

control_points_la_SOURCES = gaia_control_points.c grass_crs3d.c \
	grass_georef.c grass_georef_tps.c

control_points_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
control_points_la_LDFLAGS = -module
control_points_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/control_points/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/control_points/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

control_points.la: $(control_points_la_OBJECTS) $(control_points_la_DEPENDENCIES) $(EXTRA_control_points_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(control_points_la_LINK)  $(control_points_la_OBJECTS) $(control_points_la_LIBADD) $(LIBS)

libcontrol_points.la: $(libcontrol_points_la_OBJECTS) $(libcontrol_points_la_DEPENDENCIES) $(EXTRA_libcontrol_points_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libcontrol_points_la_OBJECTS) $(libcontrol_points_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_points_la-gaia_control_points.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_points_la-grass_crs3d.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_points_la-grass_georef.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control_points_la-grass_georef_tps.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_control_points.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grass_crs3d.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grass_georef.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grass_georef_tps.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

control_points_la-gaia_control_points.lo: gaia_control_points.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control_points_la-gaia_control_points.lo -MD -MP -MF $(DEPDIR)/control_points_la-gaia_control_points.Tpo -c -o control_points_la-gaia_control_points.lo `test -f 'gaia_control_points.c' || echo '$(srcdir)/'`gaia_control_points.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/control_points_la-gaia_control_points.Tpo $(DEPDIR)/control_points_la-gaia_control_points.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_control_points.c' object='control_points_la-gaia_control_points.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control_points_la-gaia_control_points.lo `test -f 'gaia_control_points.c' || echo '$(srcdir)/'`gaia_control_points.c

control_points_la-grass_crs3d.lo: grass_crs3d.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control_points_la-grass_crs3d.lo -MD -MP -MF $(DEPDIR)/control_points_la-grass_crs3d.Tpo -c -o control_points_la-grass_crs3d.lo `test -f 'grass_crs3d.c' || echo '$(srcdir)/'`grass_crs3d.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/control_points_la-grass_crs3d.Tpo $(DEPDIR)/control_points_la-grass_crs3d.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grass_crs3d.c' object='control_points_la-grass_crs3d.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control_points_la-grass_crs3d.lo `test -f 'grass_crs3d.c' || echo '$(srcdir)/'`grass_crs3d.c

control_points_la-grass_georef.lo: grass_georef.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control_points_la-grass_georef.lo -MD -MP -MF $(DEPDIR)/control_points_la-grass_georef.Tpo -c -o control_points_la-grass_georef.lo `test -f 'grass_georef.c' || echo '$(srcdir)/'`grass_georef.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/control_points_la-grass_georef.Tpo $(DEPDIR)/control_points_la-grass_georef.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grass_georef.c' object='control_points_la-grass_georef.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control_points_la-grass_georef.lo `test -f 'grass_georef.c' || echo '$(srcdir)/'`grass_georef.c

control_points_la-grass_georef_tps.lo: grass_georef_tps.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT control_points_la-grass_georef_tps.lo -MD -MP -MF $(DEPDIR)/control_points_la-grass_georef_tps.Tpo -c -o control_points_la-grass_georef_tps.lo `test -f 'grass_georef_tps.c' || echo '$(srcdir)/'`grass_georef_tps.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/control_points_la-grass_georef_tps.Tpo $(DEPDIR)/control_points_la-grass_georef_tps.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='grass_georef_tps.c' object='control_points_la-grass_georef_tps.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(control_points_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(control_points_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o control_points_la-grass_georef_tps.lo `test -f 'grass_georef_tps.c' || echo '$(srcdir)/'`grass_georef_tps.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:
	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
	mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
	ctags-am distclean distclean-compile distclean-generic \
	distclean-libtool distclean-tags distdir dvi dvi-am html \
	html-am info info-am install install-am install-data \
	install-data-am install-dvi install-dvi-am install-exec \
	install-exec-am install-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/control_points/gaia_control_points.c.

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605

606
607
608
609
610
611
612
613
614
615
616
...
618
619
620
621
622
623
624

625
626


627
628
629
630
631
632
633
634
635
636
...
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671

672
673
674
675
676
677
678
...
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729

730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747












748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772

773
774
775
776
777
778
779








780
781
782
783
784
785
786
787
788
789
790
791







792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264

1265
1266
1267
1268
1269
1270

1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307

1308
1309
1310
1311
1312

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_GCP		/* only if ControlPoints enabled */

#include <spatialite/sqlite.h>

#include <spatialite_private.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaiamatrix.h>
#include <spatialite/control_points.h>

#include "grass_crs.h"

#define POLYNOMIAL_MAGIC_START		0x00
#define POLYNOMIAL_MAGIC_DELIMITER	0x6a
#define POLYNOMIAL_MAGIC_END		0x63
#define POLYNOMIAL_FIRST_ORDER		0xb1
#define POLYNOMIAL_SECOND_ORDER		0xb2
#define POLYNOMIAL_THIRD_ORDER		0xb3
#define THIN_PLATE_SPLINE			0x3f
#define POLYNOMIAL_2D				0x3e
#define POLYNOMIAL_3D				0x3d

struct cp_coeffs
{
/* Polynomial Coefficients */
    unsigned char type;
    unsigned char order;
    double E[20];
    double N[20];
    double Z[20];
    double *Etps;
    double *Ntps;
    struct Control_Points grass_cp;
};

GAIACP_DECLARE GaiaControlPointsPtr
gaiaCreateControlPoints (int allocation_incr, int has3d, int order, int tps)
{
/* creating a Control Point set container */
    struct gaia_control_points *cp =
	malloc (sizeof (struct gaia_control_points));
    if (cp == NULL)
	return NULL;
    if (order < 1)
	order = 1;
    if (order > 3)
	order = 3;
    cp->order = order;
    cp->has3d = has3d;
    cp->tps = tps;
    cp->affine_valid = 0;
    if (allocation_incr < 64)
	allocation_incr = 64;
    cp->allocation_incr = allocation_incr;
    cp->allocated_items = allocation_incr;
................................................................................
	free (cp->z1);
    if (cp->z2 != NULL)
	free (cp->z2);
    if (cp->status != NULL)
	free (cp->status);
}

static int
blob_encode_3d (double *E, double *N, double *Z, int order,
		unsigned char **blob, int *blob_sz)
{
/* creating a BLOB-Polynomial object - 3D */
    int i;
    int max;
    unsigned char *xblob = NULL;
    unsigned char *ptr;
    int xblob_sz;
    int endian_arch = gaiaEndianArch ();

    *blob = NULL;
    *blob_sz = 0;

    if (order == 2)
	max = 10;
    else if (order == 3)
	max = 20;
    else
	max = 4;
    xblob_sz = 11 + (max * (3 * (sizeof (double) + 1)));

    xblob = malloc (xblob_sz);
    if (xblob == NULL)
	return 0;
    ptr = xblob;
/* encoding the BLOB */
    *ptr = POLYNOMIAL_MAGIC_START;	/* START signature */
    *(ptr + 1) = 1;		/* LITTLE ENDIAN */
    *(ptr + 2) = POLYNOMIAL_3D;
    *(ptr + 3) = POLYNOMIAL_MAGIC_DELIMITER;
    *(ptr + 4) = order;
    *(ptr + 5) = POLYNOMIAL_MAGIC_DELIMITER;
    gaiaExport32 (ptr + 6, 0, 1, endian_arch);
    ptr = xblob + 10;
    for (i = 0; i < max; i++)
      {
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, E[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, N[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, Z[i], 1, endian_arch);
	  ptr += sizeof (double);
      }
    *ptr = POLYNOMIAL_MAGIC_END;

    *blob = xblob;
    *blob_sz = xblob_sz;
    return 1;
}

static int
blob_encode_2d (double *E, double *N, unsigned char order,
		unsigned char **blob, int *blob_sz)
{
/* creating a BLOB-Polynomial object - 2D */
    int i;
    int max;
    unsigned char *xblob = NULL;
    unsigned char *ptr;
    int xblob_sz;
    int endian_arch = gaiaEndianArch ();

    *blob = NULL;
    *blob_sz = 0;

    if (order == 2)
	max = 6;
    else if (order == 3)
	max = 10;
    else
	max = 3;
    xblob_sz = 11 + (max * (2 * (sizeof (double) + 1)));

    xblob = malloc (xblob_sz);
    if (xblob == NULL)
	return 0;
    ptr = xblob;
/* encoding the BLOB */
    *ptr = POLYNOMIAL_MAGIC_START;	/* START signature */
    *(ptr + 1) = 1;		/* LITTLE ENDIAN */
    *(ptr + 2) = POLYNOMIAL_2D;
    *(ptr + 3) = POLYNOMIAL_MAGIC_DELIMITER;
    *(ptr + 4) = order;
    *(ptr + 5) = POLYNOMIAL_MAGIC_DELIMITER;
    gaiaExport32 (ptr + 6, 0, 1, endian_arch);
    ptr = xblob + 10;
    for (i = 0; i < max; i++)
      {
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, E[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, N[i], 1, endian_arch);
	  ptr += sizeof (double);
      }
    *ptr = POLYNOMIAL_MAGIC_END;

    *blob = xblob;
    *blob_sz = xblob_sz;
    return 1;
}

static int
blob_encode_tps (double *E, double *N, struct Control_Points *cp,
		 unsigned char **blob, int *blob_sz)
{
/* creating a BLOB-Polynomial object - 2D */
    int i;
    unsigned char *xblob = NULL;
    unsigned char *ptr;
    int xblob_sz;
    int endian_arch = gaiaEndianArch ();

    *blob = NULL;
    *blob_sz = 0;

    xblob_sz = 11 + ((cp->count + 3) * (2 * (sizeof (double) + 1)));
    xblob_sz += (cp->count * (4 * (sizeof (double) + 1)));

    xblob = malloc (xblob_sz);
    if (xblob == NULL)
	return 0;
    ptr = xblob;
/* encoding the BLOB */
    *ptr = POLYNOMIAL_MAGIC_START;	/* START signature */
    *(ptr + 1) = 1;		/* LITTLE ENDIAN */
    *(ptr + 2) = THIN_PLATE_SPLINE;
    *(ptr + 3) = POLYNOMIAL_MAGIC_DELIMITER;
    *(ptr + 4) = 1;
    *(ptr + 5) = POLYNOMIAL_MAGIC_DELIMITER;
    gaiaExport32 (ptr + 6, cp->count, 1, endian_arch);
    ptr = xblob + 10;
    for (i = 0; i < cp->count + 3; i++)
      {
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, E[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, N[i], 1, endian_arch);
	  ptr += sizeof (double);
      }
    for (i = 0; i < cp->count; i++)
      {
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, cp->e1[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, cp->n1[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, cp->e2[i], 1, endian_arch);
	  ptr += sizeof (double);
	  *ptr++ = POLYNOMIAL_MAGIC_DELIMITER;
	  gaiaExport64 (ptr, cp->n2[i], 1, endian_arch);
	  ptr += sizeof (double);
      }
    *ptr = POLYNOMIAL_MAGIC_END;

    *blob = xblob;
    *blob_sz = xblob_sz;
    return 1;
}

static int
blob_decode (struct cp_coeffs *coeffs, const unsigned char *blob, int blob_sz)
{
/* decoding a BLOB-Polynomial coeffs object */
    int endian;
    int endian_arch = gaiaEndianArch ();
    unsigned char type;
    unsigned char order;
    int count;
    int i;
    int max;
    int xblob_sz;
    const unsigned char *ptr = blob;

    coeffs->Etps = NULL;
    coeffs->Ntps = NULL;
    coeffs->grass_cp.count = 0;
    coeffs->grass_cp.e1 = NULL;
    coeffs->grass_cp.n1 = NULL;
    coeffs->grass_cp.e2 = NULL;
    coeffs->grass_cp.n2 = NULL;
    coeffs->grass_cp.status = NULL;
    if (blob == NULL)
	return 0;
    if (blob_sz < 11)
	return 0;

    if (*ptr != POLYNOMIAL_MAGIC_START)
	return 0;
    if (*(ptr + 1) == 1)
	endian = 1;
    else if (*(ptr + 1) == 0)
	endian = 0;
    else
	return 0;
    type = *(ptr + 2);
    order = *(ptr + 4);
    coeffs->type = type;
    coeffs->order = order;
    if (order < 1 || order > 3)
	return 0;
    if (type == THIN_PLATE_SPLINE)
	max = 0;
    else if (type == POLYNOMIAL_2D)
      {
	  if (order == 2)
	      max = 6;
	  else if (order == 3)
	      max = 10;
	  else
	      max = 3;
      }
    else if (type == POLYNOMIAL_3D)
      {
	  if (order == 2)
	      max = 10;
	  else if (order == 3)
	      max = 20;
	  else
	      max = 4;
      }
    else
	return 0;
    count = gaiaImport32 (ptr + 6, endian, endian_arch);
    if (type == POLYNOMIAL_3D)
	xblob_sz = 11 + (max * (3 * (sizeof (double) + 1)));
    else
	xblob_sz = 11 + (max * (2 * (sizeof (double) + 1)));
    if (type == THIN_PLATE_SPLINE)
      {
	  xblob_sz += ((count + 3) * (2 * (sizeof (double) + 1)));
	  xblob_sz += (count * (4 * (sizeof (double) + 1)));
      }
    if (blob_sz != xblob_sz)
	return 0;

    ptr = blob + 11;
    for (i = 0; i < max; i++)
      {
	  coeffs->E[i] = gaiaImport64 (ptr, endian, endian_arch);
	  ptr += sizeof (double) + 1;
	  coeffs->N[i] = gaiaImport64 (ptr, endian, endian_arch);
	  ptr += sizeof (double) + 1;
	  if (type == POLYNOMIAL_3D)
	    {
		coeffs->Z[i] = gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
	    }
      }

    if (type == THIN_PLATE_SPLINE)
      {
	  /* extracting the Control Points for Grass TPS code */
	  coeffs->Etps = malloc (sizeof (double) * (3 + count));
	  coeffs->Ntps = malloc (sizeof (double) * (3 + count));
	  coeffs->grass_cp.count = count;
	  coeffs->grass_cp.e1 = malloc (sizeof (double) * count);
	  coeffs->grass_cp.n1 = malloc (sizeof (double) * count);
	  coeffs->grass_cp.e2 = malloc (sizeof (double) * count);
	  coeffs->grass_cp.n2 = malloc (sizeof (double) * count);
	  coeffs->grass_cp.status = malloc (sizeof (int) * count);
	  for (i = 0; i < count + 3; i++)
	    {
		coeffs->Etps[i] = gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
		coeffs->Ntps[i] = gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
	    }
	  for (i = 0; i < count; i++)
	    {
		coeffs->grass_cp.e1[i] =
		    gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
		coeffs->grass_cp.n1[i] =
		    gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
		coeffs->grass_cp.e2[i] =
		    gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
		coeffs->grass_cp.n2[i] =
		    gaiaImport64 (ptr, endian, endian_arch);
		ptr += sizeof (double) + 1;
		coeffs->grass_cp.status[i] = 1;
	    }
      }
    return 1;
}


GAIACP_DECLARE int
gaiaCreatePolynomialCoeffs (GaiaControlPointsPtr cp_handle,
			    unsigned char **blob, int *blob_sz)
{
/*
 * computes the Control Points and return a BLOB-serialized 
 * Polynomial coeffs object
*/
    unsigned char *xblob;
    int xblob_sz;

    struct Control_Points cp;
    struct Control_Points_3D cp3;
    int ret = 0;
    int ret2;
    int use3d;
    int orthorot = 0;
    int order = 1;
    int order_pnts[2][3] = { {3, 6, 10}, {4, 10, 20} };

    double E12[20];
    double N12[20];
................................................................................
    double E21[20];
    double N21[20];
    double Z21[20];
    double *E12_t = NULL;
    double *N12_t = NULL;
    double *E21_t = NULL;
    double *N21_t = NULL;

    struct gaia_control_points *gaia_cp =
	(struct gaia_control_points *) cp_handle;



    *blob = NULL;
    *blob_sz = 0;
    if (gaia_cp == NULL)
	return 0;

    cp.count = 0;
    cp.e1 = NULL;
    cp.e2 = NULL;
    cp.n1 = NULL;
................................................................................
    cp3.n1 = NULL;
    cp3.n2 = NULL;
    cp3.z1 = NULL;
    cp3.z2 = NULL;
    cp3.status = NULL;

    use3d = gaia_cp->has3d;
    order = gaia_cp->order;
    if (use3d)
      {
	  /* 3D control points */
	  copy_control_points_3d (gaia_cp, &cp3);
	  ret =
	      gcp_CRS_compute_georef_equations_3d (&cp3, E12, N12, Z12, E21,
						   N21, Z21, order);
      }
    else
      {
	  /* 2D control points */
	  copy_control_points_2d (gaia_cp, &cp);
	  if (gaia_cp->tps)
	      ret =
		  gcp_I_compute_georef_equations_tps (&cp, &E12_t, &N12_t,
						      &E21_t, &N21_t);
	  else
	      ret =
		  gcp_I_compute_georef_equations (&cp, E12, N12, E21, N21,
						  order);
      }


    switch (ret)
      {
      case 0:
	  fprintf (stderr,
		   "Not enough active control points for current order, %d are required.\n",
		   (orthorot ? 3 : order_pnts[use3d != 0][order - 1]));
................................................................................
      case -3:
	  fprintf (stderr, "Invalid order\n");
	  break;
      default:
	  break;
      }

    if (ret > 0)
      {
	  if (use3d)
	      ret2 = blob_encode_3d (E12, N12, Z12, order, &xblob, &xblob_sz);
	  else
	    {
		if (gaia_cp->tps)
		    ret2 =
			blob_encode_tps (E12_t, N12_t, &cp, &xblob, &xblob_sz);
		else
		    ret2 = blob_encode_2d (E12, N12, order, &xblob, &xblob_sz);
	    }
      }

    if (use3d)
	free_control_points_3d (&cp3);
    else
	free_control_points_2d (&cp);
    if (E12_t != NULL)
	free (E12_t);
    if (N12_t != NULL)
	free (N12_t);
    if (E21_t != NULL)
	free (E21_t);
    if (N21_t != NULL)
	free (N21_t);

    if (ret > 0 && ret2)
      {
	  *blob = xblob;
	  *blob_sz = xblob_sz;
	  return 1;
      }
    return 0;
}


GAIACP_DECLARE int
gaiaPolynomialIsValid (const unsigned char *blob, int blob_sz)
{
/* checking a BLOB-Polynomial coeffs object for validity */
    unsigned char type;
    unsigned char order;
    int i;
    int max;
    int xblob_sz;
    int endian;
    int endian_arch = gaiaEndianArch ();
    int count;
    const unsigned char *ptr = blob;
    if (blob == NULL)
	return 0;
    if (blob_sz < 11)
	return 0;













    if (*ptr != POLYNOMIAL_MAGIC_START)
	return 0;
    if (*(ptr + 1) == 1)
	endian = 1;
    else if (*(ptr + 1) == 0)
	endian = 0;
    else
	return 0;
    type = *(ptr + 2);
    order = *(ptr + 4);
    if (order > 3)
	return 0;
    if (type == THIN_PLATE_SPLINE)
	max = 0;
    else if (type == POLYNOMIAL_2D)
      {
	  if (order == 2)
	      max = 6;
	  else if (order == 3)
	      max = 10;
	  else
	      max = 3;
      }
    else if (type == POLYNOMIAL_3D)

      {
	  if (order == 2)
	      max = 10;
	  else if (order == 3)
	      max = 20;
	  else
	      max = 4;








      }
    else
	return 0;
    count = gaiaImport32 (ptr + 6, endian, endian_arch);
    if (type == POLYNOMIAL_3D)
	xblob_sz = 11 + (max * (3 * (sizeof (double) + 1)));
    else
	xblob_sz = 11 + (max * (2 * (sizeof (double) + 1)));
    if (type == THIN_PLATE_SPLINE)
      {
	  xblob_sz += ((count + 3) * (2 * (sizeof (double) + 1)));
	  xblob_sz += (count * (4 * (sizeof (double) + 1)));







      }
    if (blob_sz != xblob_sz)
	return 0;

    ptr = blob + 10;
    for (i = 0; i < max; i++)
      {
	  if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
	      return 0;
	  ptr++;
	  ptr += sizeof (double);
	  if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
	      return 0;
	  ptr++;
	  ptr += sizeof (double);
	  if (type == POLYNOMIAL_3D)
	    {
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
	    }
      }
    if (type == THIN_PLATE_SPLINE)
      {
	  for (i = 0; i < count + 3; i++)
	    {
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
	    }
	  for (i = 0; i < count; i++)
	    {
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
		if (*ptr != POLYNOMIAL_MAGIC_DELIMITER)
		    return 0;
		ptr++;
		ptr += sizeof (double);
	    }
      }
    if (*ptr != POLYNOMIAL_MAGIC_END)
	return 0;
    return 1;
}

static void
clean_tps_coeffs (struct cp_coeffs *cp)
{
/* memory cleanup - TPS coefficients */
    if (cp->Etps != NULL)
	free (cp->Etps);
    if (cp->Ntps != NULL)
	free (cp->Ntps);
}

GAIACP_DECLARE char *
gaiaPolynomialAsText (const unsigned char *blob, int blob_sz)
{
/* printing a BLOB-Polynomial coeffs object as a text string */
    char *text = NULL;
    struct cp_coeffs coeffs;
    if (!gaiaPolynomialIsValid (blob, blob_sz))
	return NULL;
    if (!blob_decode (&coeffs, blob, blob_sz))
	return NULL;

    free_control_points_2d (&(coeffs.grass_cp));
/* printing the Polynommial coeffs as text */
    if (coeffs.type == POLYNOMIAL_3D)
      {
	  if (coeffs.order == 3)
	      text =
		  sqlite3_mprintf
		  ("E{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}, "
		   "N{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}, "
		   "Z{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}",
		   coeffs.E[0], coeffs.E[1], coeffs.E[2], coeffs.E[3],
		   coeffs.E[4], coeffs.E[5], coeffs.E[6], coeffs.E[6],
		   coeffs.E[7], coeffs.E[8], coeffs.E[9], coeffs.E[10],
		   coeffs.E[11], coeffs.E[12], coeffs.E[13], coeffs.E[14],
		   coeffs.E[15], coeffs.E[16], coeffs.E[16], coeffs.E[17],
		   coeffs.E[18], coeffs.E[19], coeffs.N[0], coeffs.N[1],
		   coeffs.N[2], coeffs.N[3], coeffs.N[4], coeffs.N[5],
		   coeffs.N[6], coeffs.N[6], coeffs.N[7], coeffs.N[8],
		   coeffs.N[9], coeffs.N[10], coeffs.N[11], coeffs.N[12],
		   coeffs.N[13], coeffs.N[14], coeffs.N[15], coeffs.N[16],
		   coeffs.N[16], coeffs.N[17], coeffs.N[18], coeffs.N[19],
		   coeffs.Z[0], coeffs.Z[1], coeffs.Z[2], coeffs.Z[3],
		   coeffs.Z[4], coeffs.Z[5], coeffs.Z[6], coeffs.Z[6],
		   coeffs.Z[7], coeffs.Z[8], coeffs.Z[9], coeffs.Z[10],
		   coeffs.Z[11], coeffs.Z[12], coeffs.Z[13], coeffs.Z[14],
		   coeffs.Z[15], coeffs.Z[16], coeffs.Z[16], coeffs.Z[17],
		   coeffs.Z[18], coeffs.Z[19]);
	  else if (coeffs.order == 2)
	      text =
		  sqlite3_mprintf
		  ("E{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}, "
		   "N{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}, "
		   "Z{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}",
		   coeffs.E[0], coeffs.E[1], coeffs.E[2], coeffs.E[3],
		   coeffs.E[4], coeffs.E[5], coeffs.E[6], coeffs.E[6],
		   coeffs.E[7], coeffs.E[8], coeffs.E[9], coeffs.N[0],
		   coeffs.N[1], coeffs.N[2], coeffs.N[3], coeffs.N[4],
		   coeffs.N[5], coeffs.N[6], coeffs.N[6], coeffs.N[7],
		   coeffs.N[8], coeffs.N[9], coeffs.Z[0], coeffs.Z[1],
		   coeffs.Z[2], coeffs.Z[3], coeffs.Z[4], coeffs.Z[5],
		   coeffs.Z[6], coeffs.Z[6], coeffs.Z[7], coeffs.Z[8],
		   coeffs.Z[9]);
	  else
	      text =
		  sqlite3_mprintf
		  ("E{%1.10f,%1.10f,%1.10f,%1.10f}, N{%1.10f,%1.10f,%1.10f,%1.10f}, Z{%1.10f,%1.10f,%1.10f,%1.10f}",
		   coeffs.E[0], coeffs.E[1], coeffs.E[2], coeffs.E[3],
		   coeffs.N[0], coeffs.N[1], coeffs.N[2], coeffs.N[3],
		   coeffs.Z[0], coeffs.Z[1], coeffs.Z[2], coeffs.Z[3]);
      }
    else
      {
	  if (coeffs.order == 3)
	      text =
		  sqlite3_mprintf
		  ("E{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}, "
		   "N{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}",
		   coeffs.E[0], coeffs.E[1], coeffs.E[2], coeffs.E[3],
		   coeffs.E[4], coeffs.E[5], coeffs.E[6], coeffs.E[6],
		   coeffs.E[7], coeffs.E[8], coeffs.E[9], coeffs.N[0],
		   coeffs.N[1], coeffs.N[2], coeffs.N[3], coeffs.N[4],
		   coeffs.N[5], coeffs.N[6], coeffs.N[6], coeffs.N[7],
		   coeffs.N[8], coeffs.N[9]);
	  else if (coeffs.order == 2)
	      text =
		  sqlite3_mprintf
		  ("E{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}, "
		   "N{%1.10f,%1.10f,%1.10f,%1.10f,%1.10f,%1.10f}",
		   coeffs.E[0], coeffs.E[1], coeffs.E[2], coeffs.E[3],
		   coeffs.E[4], coeffs.E[5], coeffs.N[0], coeffs.N[1],
		   coeffs.N[2], coeffs.N[3], coeffs.N[4], coeffs.N[5]);
	  else
	      text =
		  sqlite3_mprintf
		  ("E{%1.10f,%1.10f,%1.10f}, N{%1.10f,%1.10f,%1.10f}",
		   coeffs.E[0], coeffs.E[1], coeffs.E[2], coeffs.N[0],
		   coeffs.N[1], coeffs.N[2]);
      }
    clean_tps_coeffs (&coeffs);
    return text;
}

static void
gaia_point_transform3D (struct cp_coeffs *coeffs, double *x, double *y,
			double *z)
{
/* Affine Transform 3D */
    double x0 = *x;
    double y0 = *y;
    double z0 = *z;
    double x1;
    double y1;
    double z1;
    if (coeffs->type == THIN_PLATE_SPLINE)
      {
	  gcp_I_georef_tps (x0, y0, &x1, &y1, coeffs->Etps, coeffs->Ntps,
			    &(coeffs->grass_cp), 1);
	  z1 = z0;
      }
    else if (coeffs->type == POLYNOMIAL_2D)
      {
	  gcp_I_georef (x0, y0, &x1, &y1, coeffs->E, coeffs->N, coeffs->order);
	  z1 = z0;
      }
    else
	gcp_CRS_georef_3d (x0, y0, z0, &x1, &y1, &z1, coeffs->E, coeffs->N,
			   coeffs->Z, coeffs->order);
    *x = x1;
    *y = y1;
    *z = z1;
}


static void
gaia_point_transform2D (struct cp_coeffs *coeffs, double *x, double *y)
{
/* Affine Transform 2D */
    double x0 = *x;
    double y0 = *y;
    double x1;
    double y1;
    if (coeffs->type == THIN_PLATE_SPLINE)
	gcp_I_georef_tps (x0, y0, &x1, &y1, coeffs->Etps, coeffs->Ntps,
			  &(coeffs->grass_cp), 1);
    else
	gcp_I_georef (x0, y0, &x1, &y1, coeffs->E, coeffs->N, coeffs->order);
    *x = x1;
    *y = y1;
}

GAIACP_DECLARE gaiaGeomCollPtr
gaiaPolynomialTransformGeometry (gaiaGeomCollPtr geom,
				 const unsigned char *blob, int blob_sz)
{
/* transforming a Geometry by applying Polynomial coefficients */
    int iv;
    int ib;
    double x;
    double y;
    double z;
    double m;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    struct cp_coeffs coeffs;
    if (!gaiaPolynomialIsValid (blob, blob_sz))
	return NULL;
    if (!blob_decode (&coeffs, blob, blob_sz))
	return NULL;
    if (geom == NULL)
      {
	  free_control_points_2d (&(coeffs.grass_cp));
	  return NULL;
      }

/* creating the output Geometry */
    if (geom->DimensionModel == GAIA_XY_Z)
	new_geom = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
	new_geom = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	new_geom = gaiaAllocGeomCollXYZM ();
    else
	new_geom = gaiaAllocGeomColl ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;

/* cloning and transforming all individual items */
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  if (geom->DimensionModel == GAIA_XY_Z)
	    {
		x = point->X;
		y = point->Y;
		z = point->Z;
		gaia_point_transform3D (&coeffs, &x, &y, &z);
		gaiaAddPointToGeomCollXYZ (new_geom, x, y, z);
	    }
	  else if (geom->DimensionModel == GAIA_XY_M)
	    {
		x = point->X;
		y = point->Y;
		m = point->M;
		gaia_point_transform2D (&coeffs, &x, &y);
		gaiaAddPointToGeomCollXYM (new_geom, x, y, m);
	    }
	  else if (geom->DimensionModel == GAIA_XY_Z_M)
	    {
		x = point->X;
		y = point->Y;
		z = point->Z;
		m = point->M;
		gaia_point_transform3D (&coeffs, &x, &y, &z);
		gaiaAddPointToGeomCollXYZM (new_geom, x, y, z, m);
	    }
	  else
	    {
		x = point->X;
		y = point->Y;
		gaia_point_transform2D (&coeffs, &x, &y);
		gaiaAddPointToGeomColl (new_geom, x, y);
	    }
	  point = point->Next;
      }

    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  for (iv = 0; iv < line->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
		  }
		else if (line->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (line->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (line->Coords, iv, &x, &y);
		  }
		if (new_line->DimensionModel == GAIA_XY_Z
		    || new_line->DimensionModel == GAIA_XY_Z_M)
		    gaia_point_transform3D (&coeffs, &x, &y, &z);
		else
		    gaia_point_transform2D (&coeffs, &x, &y);
		if (new_line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (new_line->Coords, iv, x, y, z);
		  }
		else if (new_line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (new_line->Coords, iv, x, y, m);
		  }
		else if (new_line->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (new_line->Coords, iv, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (new_line->Coords, iv, x, y);
		  }
	    }
	  line = line->Next;
      }

    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  for (iv = 0; iv < o_ring->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (i_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y, &z);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (i_ring->Coords, iv, &x, &y, &m);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (i_ring->Coords, iv, &x, &y);
		  }
		if (o_ring->DimensionModel == GAIA_XY_Z
		    || o_ring->DimensionModel == GAIA_XY_Z_M)
		    gaia_point_transform3D (&coeffs, &x, &y, &z);
		else
		    gaia_point_transform2D (&coeffs, &x, &y);
		if (o_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (o_ring->Coords, iv, x, y, z);
		  }
		else if (o_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (o_ring->Coords, iv, x, y, m);
		  }
		else if (o_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (o_ring->Coords, iv, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (o_ring->Coords, iv, x, y);
		  }
	    }
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		for (iv = 0; iv < o_ring->Points; iv++)
		  {
		      z = 0.0;
		      m = 0.0;
		      if (i_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y, &z);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (i_ring->Coords, iv, &x, &y, &m);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y, &z,
					      &m);
			}
		      else
			{
			    gaiaGetPoint (i_ring->Coords, iv, &x, &y);
			}
		      if (o_ring->DimensionModel == GAIA_XY_Z
			  || o_ring->DimensionModel == GAIA_XY_Z_M)
			  gaia_point_transform3D (&coeffs, &x, &y, &z);
		      else
			  gaia_point_transform2D (&coeffs, &x, &y);
		      if (o_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (o_ring->Coords, iv, x, y, z);
			}
		      else if (o_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaSetPointXYM (o_ring->Coords, iv, x, y, m);
			}
		      else if (o_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaSetPointXYZM (o_ring->Coords, iv, x, y, z, m);
			}
		      else
			{
			    gaiaSetPoint (o_ring->Coords, iv, x, y);
			}
		  }
	    }
	  polyg = polyg->Next;
      }
    free_control_points_2d (&(coeffs.grass_cp));
    clean_tps_coeffs (&coeffs);
    return new_geom;
}

GAIACP_DECLARE int
gaiaPolynomialToMatrix (const unsigned char *iblob, int iblob_sz,
			unsigned char **oblob, int *oblob_sz)
{
/*
* converting a BLOB-Polynomial coeffs object into a
* BLOB Affine Transformation matrix */
    double a = 1.0;
    double b = 0.0;
    double c = 0.0;
    double d = 0.0;
    double e = 1.0;
    double f = 0.0;
    double g = 0.0;
    double h = 0.0;
    double i = 1.0;
    double xoff = 0.0;
    double yoff = 0.0;
    double zoff = 0.0;
    struct cp_coeffs coeffs;


    *oblob = NULL;
    *oblob_sz = 0;
    if (!gaiaPolynomialIsValid (iblob, iblob_sz))
	return 0;
    if (!blob_decode (&coeffs, iblob, iblob_sz))
	return 0;


    if (coeffs.type == THIN_PLATE_SPLINE)
      {
	  free_control_points_2d (&(coeffs.grass_cp));
	  clean_tps_coeffs (&coeffs);
	  return 0;		/* Thin Plate Spline coefficients can't be converted */
      }
    if (coeffs.order != 1)
	return 0;		/* only 1st order coefficients can be converted */

/* converting */
    if (coeffs.type == POLYNOMIAL_3D)
      {
	  a = coeffs.E[1];
	  b = coeffs.E[2];
	  c = coeffs.E[3];
	  d = coeffs.N[1];
	  e = coeffs.N[2];
	  f = coeffs.N[3];
	  g = coeffs.Z[1];
	  h = coeffs.Z[2];
	  i = coeffs.Z[3];
	  xoff = coeffs.E[0];
	  yoff = coeffs.N[0];
	  zoff = coeffs.Z[0];
      }
    else
      {
	  a = coeffs.E[1];
	  b = coeffs.E[2];
	  d = coeffs.N[1];
	  e = coeffs.N[2];
	  xoff = coeffs.E[0];
	  yoff = coeffs.N[0];
      }
    if (gaia_matrix_create
	(a, b, c, d, e, f, g, h, i, xoff, yoff, zoff, oblob, oblob_sz))

	return 1;
    return 0;
}

#endif /* end including GCO */







|

<
<

<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|






<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<

<
<
<
<
<
<
>



<







 







>


>
>

<
<







 







<





|
|







|
|

<
|
<

>







 







<
<
|
<
<
<
<
<
<
<
<
<
<
<
<



<
<
<
<
<
<
<
<

|

<
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
<
>
>
>
>
>
>
>
>
|
|
<
<
<
<
<
<
<
|
<
<
>
>
>
>
>
>
>
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>




|
34
35
36
37
38
39
40
41
42


43


44
45
46
47























48
49
50
51
52
53
54
55





56
57
58
59
60
61
62
...
260
261
262
263
264
265
266









































































































































































































































































































267
268

269






270
271
272
273

274
275
276
277
278
279
280
...
282
283
284
285
286
287
288
289
290
291
292
293
294


295
296
297
298
299
300
301
...
308
309
310
311
312
313
314

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

332

333
334
335
336
337
338
339
340
341
...
351
352
353
354
355
356
357


358












359
360
361








362
363
364






365
366

















367
368
369
370
371
372
373
374
375
376
377
378
379






380








381








382
383






384
385
386
387
388
389
390
391
392
393







394


395
396
397
398
399
400
401
402


403

















404
405










































406
407
408
409







































































































































































410












































































































































































































































411
412





413
414




































415
416
417
418
419
420

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_CONTROL_POINTS	/* only if ControlPoints enabled */



#include <spatialite_private.h>


#include <spatialite/control_points.h>

#include "grass_crs.h"
























GAIACP_DECLARE GaiaControlPointsPtr
gaiaCreateControlPoints (int allocation_incr, int has3d, int tps)
{
/* creating a Control Point set container */
    struct gaia_control_points *cp =
	malloc (sizeof (struct gaia_control_points));
    if (cp == NULL)
	return NULL;





    cp->has3d = has3d;
    cp->tps = tps;
    cp->affine_valid = 0;
    if (allocation_incr < 64)
	allocation_incr = 64;
    cp->allocation_incr = allocation_incr;
    cp->allocated_items = allocation_incr;
................................................................................
	free (cp->z1);
    if (cp->z2 != NULL)
	free (cp->z2);
    if (cp->status != NULL)
	free (cp->status);
}










































































































































































































































































































GAIACP_DECLARE int
gaiaAffineFromControlPoints (GaiaControlPointsPtr cp_handle)

{






/* creating an Affine Transform from the Control Points */
    struct Control_Points cp;
    struct Control_Points_3D cp3;
    int ret = 0;

    int use3d;
    int orthorot = 0;
    int order = 1;
    int order_pnts[2][3] = { {3, 6, 10}, {4, 10, 20} };

    double E12[20];
    double N12[20];
................................................................................
    double E21[20];
    double N21[20];
    double Z21[20];
    double *E12_t = NULL;
    double *N12_t = NULL;
    double *E21_t = NULL;
    double *N21_t = NULL;

    struct gaia_control_points *gaia_cp =
	(struct gaia_control_points *) cp_handle;
    if (gaia_cp == NULL)
	return 0;



    if (gaia_cp == NULL)
	return 0;

    cp.count = 0;
    cp.e1 = NULL;
    cp.e2 = NULL;
    cp.n1 = NULL;
................................................................................
    cp3.n1 = NULL;
    cp3.n2 = NULL;
    cp3.z1 = NULL;
    cp3.z2 = NULL;
    cp3.status = NULL;

    use3d = gaia_cp->has3d;

    if (use3d)
      {
	  /* 3D control points */
	  copy_control_points_3d (gaia_cp, &cp3);
	  ret =
	      CRS_compute_georef_equations_3d (&cp3, E12, N12, Z12, E21, N21,
					       Z21, order);
      }
    else
      {
	  /* 2D control points */
	  copy_control_points_2d (gaia_cp, &cp);
	  if (gaia_cp->tps)
	      ret =
		  I_compute_georef_equations_tps (&cp, &E12_t, &N12_t, &E21_t,
						  &N21_t);
	  else

	      ret = I_compute_georef_equations (&cp, E12, N12, E21, N21, order);

      }
fprintf(stderr, "ret=%d tps=%d\n", ret, gaia_cp->tps);

    switch (ret)
      {
      case 0:
	  fprintf (stderr,
		   "Not enough active control points for current order, %d are required.\n",
		   (orthorot ? 3 : order_pnts[use3d != 0][order - 1]));
................................................................................
      case -3:
	  fprintf (stderr, "Invalid order\n");
	  break;
      default:
	  break;
      }



    if (use3d)












	free_control_points_3d (&cp3);
    else
	free_control_points_2d (&cp);









    if (ret > 0)
      {






	  if (use3d)
	    {

















		gaia_cp->a = E12[1];
		gaia_cp->b = E12[2];
		gaia_cp->c = E12[3];
		gaia_cp->d = N12[1];
		gaia_cp->e = N12[2];
		gaia_cp->f = N12[3];
		gaia_cp->g = Z12[1];
		gaia_cp->h = Z12[2];
		gaia_cp->i = Z12[3];
		gaia_cp->xoff = E12[0];
		gaia_cp->yoff = N12[0];
		gaia_cp->zoff = Z12[0];
	    }






	  else








	    {








		if (gaia_cp->tps)
		  {






		      gaia_cp->a = E12_t[1];
		      gaia_cp->b = E12_t[2];
		      gaia_cp->d = N12_t[1];
		      gaia_cp->e = N12_t[2];
		      gaia_cp->xoff = E12_t[0];
		      gaia_cp->yoff = N12_t[0];
		      gaia_cp->affine_valid = 1;
fprintf(stderr, "pl\n");
		  }
		else







		  {


		      gaia_cp->a = E12[1];
		      gaia_cp->b = E12[2];
		      gaia_cp->d = N12[1];
		      gaia_cp->e = N12[2];
		      gaia_cp->xoff = E12[0];
		      gaia_cp->yoff = N12[0];
		      gaia_cp->affine_valid = 1;
		  }


	    }

















      }











































    if (E12_t != NULL)
	free (E12_t);
    if (N12_t != NULL)
	free (N12_t);







































































































































































    if (E21_t != NULL)












































































































































































































































	free (E21_t);
    if (N21_t != NULL)





	free (N21_t);





































    if (ret > 0)
	return 1;
    return 0;
}

#endif	/* end including CONTROL_POINTS */

Changes to src/control_points/grass_crs.h.

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
*/

#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define GCP_PRIVATE __attribute__ ((visibility("hidden")))
#endif

/* STRUCTURE FOR USE INTERNALLY WITH THESE FUNCTIONS.  THESE FUNCTIONS EXPECT
   SQUARE MATRICES SO ONLY ONE VARIABLE IS GIVEN (N) FOR THE MATRIX SIZE */

struct MATRIX
{
    int n;			/* SIZE OF THIS MATRIX (N x N) */
    double *v;
................................................................................
    double *z1;
    double *e2;
    double *n2;
    double *z2;
    int *status;
};

GCP_PRIVATE int
gcp_CRS_compute_georef_equations_3d (struct Control_Points_3D *,
				     double *, double *, double *,
				     double *, double *, double *, int);

GCP_PRIVATE int
gcp_I_compute_georef_equations (struct Control_Points *cp, double E12[],
				double N12[], double E21[], double N21[],
				int order);

GCP_PRIVATE int
gcp_I_compute_georef_equations_tps (struct Control_Points *cp,
				    double **E12tps, double **N12tps,
				    double **E21tps, double **N21tps);

GCP_PRIVATE int
gcp_I_georef (double e1, double n1, double *e, double *n, double E[],
	      double N[], int order);

GCP_PRIVATE int
gcp_CRS_georef_3d (double e1, double n1, double z1, double *e,
		   double *n, double *z, double E[], double N[],
		   double Z[], int order);

GCP_PRIVATE int
gcp_I_georef_tps (double e1, double n1, double *e, double *n, double *E,
		  double *N, struct Control_Points *cp, int fwd);







<
<
<
<







 







<
|



<
|



<
|


<
<
<
<
<
<
<
<
<
<
<
<
<
27
28
29
30
31
32
33




34
35
36
37
38
39
40
..
73
74
75
76
77
78
79

80
81
82
83

84
85
86
87

88
89
90














 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
*/





/* STRUCTURE FOR USE INTERNALLY WITH THESE FUNCTIONS.  THESE FUNCTIONS EXPECT
   SQUARE MATRICES SO ONLY ONE VARIABLE IS GIVEN (N) FOR THE MATRIX SIZE */

struct MATRIX
{
    int n;			/* SIZE OF THIS MATRIX (N x N) */
    double *v;
................................................................................
    double *z1;
    double *e2;
    double *n2;
    double *z2;
    int *status;
};


int CRS_compute_georef_equations_3d (struct Control_Points_3D *,
				     double *, double *, double *,
				     double *, double *, double *, int);


int I_compute_georef_equations (struct Control_Points *cp, double E12[],
				double N12[], double E21[], double N21[],
				int order);


int I_compute_georef_equations_tps (struct Control_Points *cp,
				    double **E12tps, double **N12tps,
				    double **E21tps, double **N21tps);













Changes to src/control_points/grass_crs3d.c.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188

189
190
191
192
193
194
195
...
572
573
574
575
576
577
578
579

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_GCP		/* only if ControlPoints enabled */

/* original code from Grass GIS starts here */

/***********************************************************************

   crs3d.c

................................................................................

/***********************************************************************

  TRANSFORM A SINGLE COORDINATE PAIR.

************************************************************************/

GCP_PRIVATE int
gcp_CRS_georef_3d (double e1,	/* EASTING TO BE TRANSFORMED */
		   double n1,	/* NORTHING TO BE TRANSFORMED */
		   double z1,	/* HEIGHT TO BE TRANSFORMED */
		   double *e,	/* EASTING, TRANSFORMED */
		   double *n,	/* NORTHING, TRANSFORMED */
		   double *z,	/* HEIGHT, TRANSFORMED */
		   double E[],	/* EASTING COEFFICIENTS */
		   double N[],	/* NORTHING COEFFICIENTS */
		   double Z[],	/* HEIGHT COEFFICIENTS */
		   int order	/* ORDER OF TRANSFORMATION TO BE PERFORMED, MUST MATCH THE
				   ORDER USED TO CALCULATE THE COEFFICIENTS */
    )
{
    double e2, n2, z2, en, ez, nz,
	e3, n3, z3, e2n, e2z, en2, ez2, n2z, nz2, enz;

    switch (order)
................................................................................
/***********************************************************************

  COMPUTE THE FORWARD AND BACKWARD GEOREFFERENCING COEFFICIENTS
  BASED ON A SET OF CONTROL POINTS

************************************************************************/

GCP_PRIVATE int
gcp_CRS_compute_georef_equations_3d (struct Control_Points_3D *cp,
				     double E12[], double N12[], double Z12[],
				     double E21[], double N21[], double Z21[],
				     int order)
{
    double *tempptr;
    int status;

    if (order < 1 || order > MAXORDER)
	return MPARMERR;

    /* CALCULATE THE FORWARD TRANSFORMATION COEFFICIENTS */

    status = calccoef (cp, E12, N12, Z12, order);

    if (status != MSUCCESS)
	return status;

    /* SWITCH THE 1 AND 2 EASTING, NORTHING, AND HEIGHT ARRAYS */

................................................................................
	  N[i - 1] = b[i - 1] / M (i, i);
	  Z[i - 1] = c[i - 1] / M (i, i);
      }

    return MSUCCESS;
}

#endif /* end including GCP */







|







 







|
|
|
|
|
|
|
|
|
|
|







 







|
|
|
|
|








>







 







|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...
573
574
575
576
577
578
579
580

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_CONTROL_POINTS	/* only if ControlPoints enabled */

/* original code from Grass GIS starts here */

/***********************************************************************

   crs3d.c

................................................................................

/***********************************************************************

  TRANSFORM A SINGLE COORDINATE PAIR.

************************************************************************/

int
CRS_georef_3d (double e1,	/* EASTING TO BE TRANSFORMED */
	       double n1,	/* NORTHING TO BE TRANSFORMED */
	       double z1,	/* HEIGHT TO BE TRANSFORMED */
	       double *e,	/* EASTING, TRANSFORMED */
	       double *n,	/* NORTHING, TRANSFORMED */
	       double *z,	/* HEIGHT, TRANSFORMED */
	       double E[],	/* EASTING COEFFICIENTS */
	       double N[],	/* NORTHING COEFFICIENTS */
	       double Z[],	/* HEIGHT COEFFICIENTS */
	       int order	/* ORDER OF TRANSFORMATION TO BE PERFORMED, MUST MATCH THE
				   ORDER USED TO CALCULATE THE COEFFICIENTS */
    )
{
    double e2, n2, z2, en, ez, nz,
	e3, n3, z3, e2n, e2z, en2, ez2, n2z, nz2, enz;

    switch (order)
................................................................................
/***********************************************************************

  COMPUTE THE FORWARD AND BACKWARD GEOREFFERENCING COEFFICIENTS
  BASED ON A SET OF CONTROL POINTS

************************************************************************/

int
CRS_compute_georef_equations_3d (struct Control_Points_3D *cp,
				 double E12[], double N12[], double Z12[],
				 double E21[], double N21[], double Z21[],
				 int order)
{
    double *tempptr;
    int status;

    if (order < 1 || order > MAXORDER)
	return MPARMERR;

    /* CALCULATE THE FORWARD TRANSFORMATION COEFFICIENTS */

    status = calccoef (cp, E12, N12, Z12, order);

    if (status != MSUCCESS)
	return status;

    /* SWITCH THE 1 AND 2 EASTING, NORTHING, AND HEIGHT ARRAYS */

................................................................................
	  N[i - 1] = b[i - 1] / M (i, i);
	  Z[i - 1] = c[i - 1] / M (i, i);
      }

    return MSUCCESS;
}

#endif	/* end including CONTROL_POINTS */

Changes to src/control_points/grass_georef.c.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
...
483
484
485
486
487
488
489
490

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
*/

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_GCP		/* only if ControlPoints enabled */

/* original code from Grass GIS starts here */

/****************************************************************************
 *
 * MODULE:       imagery library
 * AUTHOR(S):    Original author(s) name(s) unknown - written by CERL
................................................................................

/***********************************************************************

  TRANSFORM A SINGLE COORDINATE PAIR.

************************************************************************/

GCP_PRIVATE int
gcp_I_georef (double e1,	/* EASTING TO BE TRANSFORMED */
	      double n1,	/* NORTHING TO BE TRANSFORMED */
	      double *e,	/* EASTING, TRANSFORMED */
	      double *n,	/* NORTHING, TRANSFORMED */
	      double E[],	/* EASTING COEFFICIENTS */
	      double N[],	/* NORTHING COEFFICIENTS */
	      int order		/* ORDER OF TRANSFORMATION TO BE PERFORMED, MUST MATCH THE
				   ORDER USED TO CALCULATE THE COEFFICIENTS */
    )
{
    double e3, e2n, en2, n3, e2, en, n2;

    switch (order)
      {
................................................................................
/***********************************************************************

  COMPUTE THE FORWARD AND BACKWARD GEOREFFERENCING COEFFICIENTS
  BASED ON A SET OF CONTROL POINTS

************************************************************************/

GCP_PRIVATE int
gcp_I_compute_georef_equations (struct Control_Points *cp, double E12[],
				double N12[], double E21[], double N21[],
				int order)
{
    double *tempptr;
    int status;

    if (order < 1 || order > MAXORDER)
	return MPARMERR;

................................................................................
	  E[i - 1] = a[i - 1] / M (i, i);
	  N[i - 1] = b[i - 1] / M (i, i);
      }

    return MSUCCESS;
}

#endif /* end including GCP */







<









|







 







|
|
|
|
|
|
|
|







 







|
|
|
<







 







|
26
27
28
29
30
31
32

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
..
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
152
153
154
155
156
157
158
159
160
161

162
163
164
165
166
167
168
...
481
482
483
484
485
486
487
488

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
*/


#include <stdlib.h>
#include <math.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_CONTROL_POINTS	/* only if ControlPoints enabled */

/* original code from Grass GIS starts here */

/****************************************************************************
 *
 * MODULE:       imagery library
 * AUTHOR(S):    Original author(s) name(s) unknown - written by CERL
................................................................................

/***********************************************************************

  TRANSFORM A SINGLE COORDINATE PAIR.

************************************************************************/

int
I_georef (double e1,		/* EASTING TO BE TRANSFORMED */
	  double n1,		/* NORTHING TO BE TRANSFORMED */
	  double *e,		/* EASTING, TRANSFORMED */
	  double *n,		/* NORTHING, TRANSFORMED */
	  double E[],		/* EASTING COEFFICIENTS */
	  double N[],		/* NORTHING COEFFICIENTS */
	  int order		/* ORDER OF TRANSFORMATION TO BE PERFORMED, MUST MATCH THE
				   ORDER USED TO CALCULATE THE COEFFICIENTS */
    )
{
    double e3, e2n, en2, n3, e2, en, n2;

    switch (order)
      {
................................................................................
/***********************************************************************

  COMPUTE THE FORWARD AND BACKWARD GEOREFFERENCING COEFFICIENTS
  BASED ON A SET OF CONTROL POINTS

************************************************************************/

int
I_compute_georef_equations (struct Control_Points *cp, double E12[],
			    double N12[], double E21[], double N21[], int order)

{
    double *tempptr;
    int status;

    if (order < 1 || order > MAXORDER)
	return MPARMERR;

................................................................................
	  E[i - 1] = a[i - 1] / M (i, i);
	  N[i - 1] = b[i - 1] / M (i, i);
      }

    return MSUCCESS;
}

#endif	/* end including CONTROL_POINTS */

Changes to src/control_points/grass_georef_tps.c.

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
109
110
111
112
113
114
115

116
117
118
119
120
121
122
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
...
533
534
535
536
537
538
539
540

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_GCP		/* only if ControlPoints enabled */

/* original code from Grass GIS starts here */

/****************************************************************************
 *
 * MODULE:       imagery library
 * AUTHOR(S):    Markus Metz
................................................................................

/***********************************************************************

  TRANSFORM A SINGLE COORDINATE PAIR.

************************************************************************/

GCP_PRIVATE int
gcp_I_georef_tps (double e1,	/* EASTING TO BE TRANSFORMED */
		  double n1,	/* NORTHING TO BE TRANSFORMED */
		  double *e,	/* EASTING, TRANSFORMED */
		  double *n,	/* NORTHING, TRANSFORMED */
		  double *E,	/* EASTING COEFFICIENTS */
		  double *N,	/* NORTHING COEFFICIENTS */
		  struct Control_Points *cp, int fwd)
{
    int i, j;
    double dist, *pe, *pn;

    if (fwd)
      {
	  pe = cp->e1;
................................................................................
	  pe = cp->e2;
	  pn = cp->n2;
      }

    /* global affine (1st order poly) */
    *e = E[0] + e1 * E[1] + n1 * E[2];
    *n = N[0] + e1 * N[1] + n1 * N[2];


    for (i = 0, j = 0; i < cp->count; i++)
      {
	  if (cp->status[i] > 0)
	    {

		dist = tps_base_func (e1, n1, pe[i], pn[i]);
................................................................................
/***********************************************************************

  COMPUTE THE FORWARD AND BACKWARD GEOREFFERENCING COEFFICIENTS
  BASED ON A SET OF CONTROL POINTS

************************************************************************/

GCP_PRIVATE int
gcp_I_compute_georef_equations_tps (struct Control_Points *cp,
				    double **E12tps, double **N12tps,
				    double **E21tps, double **N21tps)
{
    double *tempptr;
    int numactive;		/* NUMBER OF ACTIVE CONTROL POINTS */
    int status, i;
    double xmax, xmin, ymax, ymin;
    double delx, dely;
    double xx, yy;
................................................................................
	return 0.0;

    dist = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);

    return dist * log (dist) * 0.5;
}

#endif /* end including GCO */







|







 







|
|
|
|
|
|
|
|







 







>







 







|
|
|
|







 







|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
...
534
535
536
537
538
539
540
541

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_CONTROL_POINTS	/* only if ControlPoints enabled */

/* original code from Grass GIS starts here */

/****************************************************************************
 *
 * MODULE:       imagery library
 * AUTHOR(S):    Markus Metz
................................................................................

/***********************************************************************

  TRANSFORM A SINGLE COORDINATE PAIR.

************************************************************************/

int
I_georef_tps (double e1,	/* EASTING TO BE TRANSFORMED */
	      double n1,	/* NORTHING TO BE TRANSFORMED */
	      double *e,	/* EASTING, TRANSFORMED */
	      double *n,	/* NORTHING, TRANSFORMED */
	      double *E,	/* EASTING COEFFICIENTS */
	      double *N,	/* NORTHING COEFFICIENTS */
	      struct Control_Points *cp, int fwd)
{
    int i, j;
    double dist, *pe, *pn;

    if (fwd)
      {
	  pe = cp->e1;
................................................................................
	  pe = cp->e2;
	  pn = cp->n2;
      }

    /* global affine (1st order poly) */
    *e = E[0] + e1 * E[1] + n1 * E[2];
    *n = N[0] + e1 * N[1] + n1 * N[2];


    for (i = 0, j = 0; i < cp->count; i++)
      {
	  if (cp->status[i] > 0)
	    {

		dist = tps_base_func (e1, n1, pe[i], pn[i]);
................................................................................
/***********************************************************************

  COMPUTE THE FORWARD AND BACKWARD GEOREFFERENCING COEFFICIENTS
  BASED ON A SET OF CONTROL POINTS

************************************************************************/

int
I_compute_georef_equations_tps (struct Control_Points *cp,
				double **E12tps, double **N12tps,
				double **E21tps, double **N21tps)
{
    double *tempptr;
    int numactive;		/* NUMBER OF ACTIVE CONTROL POINTS */
    int status, i;
    double xmax, xmin, ymax, ymin;
    double delx, dely;
    double xx, yy;
................................................................................
	return 0.0;

    dist = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);

    return dist * log (dist) * 0.5;
}

#endif	/* end including CONTROL_POINTS */

Deleted src/cutter/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

noinst_LTLIBRARIES = libcutter.la cutter.la

libcutter_la_SOURCES = gaia_cutter.c

cutter_la_SOURCES = gaia_cutter.c

cutter_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
cutter_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
cutter_la_CPPFLAGS += -DLOADABLE_EXTENSION
cutter_la_LDFLAGS = -module
cutter_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Deleted src/cutter/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/cutter
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
cutter_la_LIBADD =
am_cutter_la_OBJECTS = cutter_la-gaia_cutter.lo
cutter_la_OBJECTS = $(am_cutter_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
cutter_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(cutter_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(cutter_la_LDFLAGS) $(LDFLAGS) -o $@
libcutter_la_LIBADD =
am_libcutter_la_OBJECTS = gaia_cutter.lo
libcutter_la_OBJECTS = $(am_libcutter_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(cutter_la_SOURCES) $(libcutter_la_SOURCES)
DIST_SOURCES = $(cutter_la_SOURCES) $(libcutter_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I.
noinst_LTLIBRARIES = libcutter.la cutter.la
libcutter_la_SOURCES = gaia_cutter.c
cutter_la_SOURCES = gaia_cutter.c
cutter_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers \
	-I. -DLOADABLE_EXTENSION
cutter_la_LDFLAGS = -module
cutter_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/cutter/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/cutter/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

cutter.la: $(cutter_la_OBJECTS) $(cutter_la_DEPENDENCIES) $(EXTRA_cutter_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(cutter_la_LINK)  $(cutter_la_OBJECTS) $(cutter_la_LIBADD) $(LIBS)

libcutter.la: $(libcutter_la_OBJECTS) $(libcutter_la_DEPENDENCIES) $(EXTRA_libcutter_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libcutter_la_OBJECTS) $(libcutter_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cutter_la-gaia_cutter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_cutter.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

cutter_la-gaia_cutter.lo: gaia_cutter.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(cutter_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cutter_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cutter_la-gaia_cutter.lo -MD -MP -MF $(DEPDIR)/cutter_la-gaia_cutter.Tpo -c -o cutter_la-gaia_cutter.lo `test -f 'gaia_cutter.c' || echo '$(srcdir)/'`gaia_cutter.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/cutter_la-gaia_cutter.Tpo $(DEPDIR)/cutter_la-gaia_cutter.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_cutter.c' object='cutter_la-gaia_cutter.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(cutter_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cutter_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cutter_la-gaia_cutter.lo `test -f 'gaia_cutter.c' || echo '$(srcdir)/'`gaia_cutter.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:
	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
	mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
	ctags-am distclean distclean-compile distclean-generic \
	distclean-libtool distclean-tags distdir dvi dvi-am html \
	html-am info info-am install install-am install-data \
	install-data-am install-dvi install-dvi-am install-exec \
	install-exec-am install-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/cutter/gaia_cutter.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
/*

 gaia_cutter.c -- implementation of the Cutter module
    
 version 4.3, 2015 July 2

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(Cutter module)

CIG: 6038019AE5 

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "process.h"
#else
#include "unistd.h"
#endif

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>

#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gaiaaux.h>

#ifndef OMIT_GEOS		/* only if GEOS is enabled */

#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp    _stricmp
#define strncasecmp    _strnicmp
#define pid_t	int
#endif

#define GAIA_CUTTER_OUTPUT_PK	1
#define GAIA_CUTTER_INPUT_PK	2
#define GAIA_CUTTER_BLADE_PK	3
#define GAIA_CUTTER_NORMAL		4

#define GAIA_CUTTER_POINT		1
#define GAIA_CUTTER_LINESTRING	2
#define GAIA_CUTTER_POLYGON		3

struct output_column
{
/* a struct wrapping an Output Table Column */
    char *base_name;
    char *real_name;
    char *type;
    int notnull;
    int role;
    int order_nr;
    struct output_column *next;
};

struct output_table
{
/* a struct wrapping the Output Table */
    struct output_column *first;
    struct output_column *last;
};

struct multivar
{
/* a struct wrapping a generic SQLite value */
    int progr_id;
    int type;
    union multivalue
    {
	sqlite3_int64 intValue;
	double doubleValue;
	char *textValue;
    } value;
    struct multivar *next;
};

struct temporary_row
{
/* a struct wrapping a row from the TMP #1 resultset */
    struct multivar *first_input;
    struct multivar *last_input;
    struct multivar *first_blade;
    struct multivar *last_blade;
};

struct child_row
{
/* a struct wrapping a resultset row */
    struct multivar *first;
    struct multivar *last;
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr geom2;
    struct child_row *next;
};

struct pending_rows
{
/* a struct containing groups of pending rows to be processed */
    struct multivar *first;
    struct multivar *last;
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr geom2;
    struct child_row *first_child;
    struct child_row *last_child;
};

struct cut_item
{
/* a struct wrapping a Cut Solution Item */
    struct multivar *first;
    struct multivar *last;
    gaiaGeomCollPtr geom;
    struct cut_item *next;
};

struct cut_solution
{
/* a struct containing a Cut Solution */
    struct cut_item *first;
    struct cut_item *last;
};

static struct multivar *
alloc_multivar (void)
{
/* allocating a NULL SQLite value */
    struct multivar *var = malloc (sizeof (struct multivar));
    var->progr_id = 0;
    var->type = SQLITE_NULL;
    var->value.textValue = NULL;
    var->next = NULL;
    return var;
}

static void
destroy_multivar (struct multivar *var)
{
/* destroying a generic SQLite values */
    if (var == NULL)
	return;
    if (var->type == SQLITE_TEXT)
      {
	  if (var->value.textValue != NULL)
	      free (var->value.textValue);
      }
    free (var);
}

static void
reset_temporary_row (struct temporary_row *row)
{
/* memory cleanup - resetting a temporary row */
    struct multivar *var;
    struct multivar *var_n;
    if (row == NULL)
	return;

    var = row->first_input;
    while (var != NULL)
      {
	  var_n = var->next;
	  destroy_multivar (var);
	  var = var_n;
      }
    var = row->first_blade;
    while (var != NULL)
      {
	  var_n = var->next;
	  destroy_multivar (var);
	  var = var_n;
      }
}

static void
do_set_null_blade_columns (struct temporary_row *row)
{
/* setting a NULL value for all Blade PK columns */
    struct multivar *var;
    if (row == NULL)
	return;

    var = row->first_blade;
    while (var != NULL)
      {
	  if (var->type == SQLITE_TEXT)
	    {
		if (var->value.textValue != NULL)
		    free (var->value.textValue);
		var->value.textValue = NULL;
	    }
	  var->type = SQLITE_NULL;
	  var = var->next;
      }
}

static struct multivar *
find_input_pk_value (struct temporary_row *row, int idx)
{
/* finding an Input column value by its relative position */
    int count = 0;
    struct multivar *var;
    if (row == NULL)
	return NULL;

    var = row->first_input;
    while (var != NULL)
      {
	  if (count == idx)
	      return var;
	  count++;
	  var = var->next;
      }
    return NULL;
}

static struct multivar *
find_blade_pk_value (struct temporary_row *row, int idx)
{
/* finding a Bladecolumn value by its relative position */
    int count = 0;
    struct multivar *var;
    if (row == NULL)
	return NULL;

    var = row->first_blade;
    while (var != NULL)
      {
	  if (count == idx)
	      return var;
	  count++;
	  var = var->next;
      }
    return NULL;
}

static void
add_int_pk_value (struct temporary_row *row, char table, int progr_id,
		  sqlite3_int64 value)
{
/* storing an INT-64 value into a ROW object */
    struct multivar *var = alloc_multivar ();
    var->progr_id = progr_id;
    var->type = SQLITE_INTEGER;
    var->value.intValue = value;
    if (table == 'B')
      {
	  /* from the Blade Table */
	  if (row->first_blade == NULL)
	      row->first_blade = var;
	  if (row->last_blade != NULL)
	      row->last_blade->next = var;
	  row->last_blade = var;
      }
    else
      {
	  /* from the Input Table */
	  if (row->first_input == NULL)
	      row->first_input = var;
	  if (row->last_input != NULL)
	      row->last_input->next = var;
	  row->last_input = var;
      }
}

static void
add_double_pk_value (struct temporary_row *row, char table, int progr_id,
		     double value)
{
/* storing a FLOAT DOUBLE value into a ROW object */
    struct multivar *var = alloc_multivar ();
    var->progr_id = progr_id;
    var->type = SQLITE_FLOAT;
    var->value.doubleValue = value;
    if (table == 'B')
      {
	  /* from the Blade Table */
	  if (row->first_blade == NULL)
	      row->first_blade = var;
	  if (row->last_blade != NULL)
	      row->last_blade->next = var;
	  row->last_blade = var;
      }
    else
      {
	  /* from the Input Table */
	  if (row->first_input == NULL)
	      row->first_input = var;
	  if (row->last_input != NULL)
	      row->last_input->next = var;
	  row->last_input = var;
      }
}

static void
add_text_pk_value (struct temporary_row *row, char table, int progr_id,
		   const char *value)
{
/* storing a TEXT value into a ROW object */
    int len;
    struct multivar *var = alloc_multivar ();
    var->progr_id = progr_id;
    var->type = SQLITE_TEXT;
    len = strlen (value);
    var->value.textValue = malloc (len + 1);
    strcpy (var->value.textValue, value);
    if (table == 'B')
      {
	  /* from the Blade Table */
	  if (row->first_blade == NULL)
	      row->first_blade = var;
	  if (row->last_blade != NULL)
	      row->last_blade->next = var;
	  row->last_blade = var;
      }
    else
      {
	  /* from the Input Table */
	  if (row->first_input == NULL)
	      row->first_input = var;
	  if (row->last_input != NULL)
	      row->last_input->next = var;
	  row->last_input = var;
      }
}

static void
add_null_pk_value (struct temporary_row *row, char table, int progr_id)
{
/* storing a NULL value into a ROW object */
    struct multivar *var = alloc_multivar ();
    var->progr_id = progr_id;
    if (table == 'B')
      {
	  /* from the Blade Table */
	  if (row->first_blade == NULL)
	      row->first_blade = var;
	  if (row->last_blade != NULL)
	      row->last_blade->next = var;
	  row->last_blade = var;
      }
    else
      {
	  /* from the Input Table */
	  if (row->first_input == NULL)
	      row->first_input = var;
	  if (row->last_input != NULL)
	      row->last_input->next = var;
	  row->last_input = var;
      }
}

static int
eval_multivar (struct multivar *var1, struct multivar *var2)
{
/* comparing to generic SQLite values */
    if (var1->type != var2->type)
	return 0;
    switch (var1->type)
      {
      case SQLITE_INTEGER:
	  if (var1->value.intValue == var2->value.intValue)
	      return 1;
	  break;
      case SQLITE_FLOAT:
	  if (var1->value.doubleValue == var2->value.doubleValue)
	      return 1;
	  break;
      case SQLITE_TEXT:
	  if (strcmp (var1->value.textValue, var2->value.textValue) == 0)
	      return 1;
	  break;
      default:
	  return 1;
      };
    return 0;
}

static int
check_same_input (struct temporary_row *prev_row, struct temporary_row *row)
{
/* checks if the current row is the same of the previous row - Input PK columns */
    int ok = 1;
    struct multivar *var1;
    struct multivar *var2;

    var1 = prev_row->first_input;
    var2 = row->first_input;
    while (1)
      {
	  if (var1 == NULL)
	    {
		ok = 0;
		break;
	    }
	  if (var2 == NULL)
	    {
		ok = 0;
		break;
	    }
	  if (!eval_multivar (var1, var2))
	    {
		ok = 0;
		break;
	    }
	  var1 = var1->next;
	  var2 = var2->next;
	  if (var1 == NULL && var2 == NULL)
	      break;
      }
    return ok;
}

static void
copy_input_values (struct temporary_row *orig, struct temporary_row *dest)
{
/* copying all values from origin to destination */
    struct multivar *var;
    int pos = 0;

    reset_temporary_row (dest);
    dest->first_input = NULL;
    dest->last_input = NULL;
    dest->first_blade = NULL;
    dest->last_blade = NULL;
    var = orig->first_input;
    while (var)
      {
	  switch (var->type)
	    {
	    case SQLITE_INTEGER:
		add_int_pk_value (dest, 'I', pos, var->value.intValue);
		break;
	    case SQLITE_FLOAT:
		add_double_pk_value (dest, 'I', pos, var->value.doubleValue);
		break;
	    case SQLITE_TEXT:
		add_text_pk_value (dest, 'I', pos, var->value.textValue);
		break;
	    default:
		add_null_pk_value (dest, 'I', pos);
	    };
	  pos++;
	  var = var->next;
      }
}

static struct output_column *
alloc_output_table_column (const char *name, const char *type, int notnull,
			   int role, int order_nr)
{
/* creating an Output Table Column */
    int len;
    struct output_column *col = malloc (sizeof (struct output_column));
    if (col == NULL)
	return NULL;
    len = strlen (name);
    col->base_name = malloc (len + 1);
    strcpy (col->base_name, name);
    col->real_name = NULL;
    len = strlen (type);
    col->type = malloc (len + 1);
    strcpy (col->type, type);
    col->notnull = notnull;
    col->role = role;
    col->order_nr = order_nr;
    col->next = NULL;
    return col;
}

static void
destroy_output_table_column (struct output_column *col)
{
/* destroying an Output Table Column */
    if (col == NULL)
	return;
    if (col->base_name != NULL)
	free (col->base_name);
    if (col->real_name != NULL)
	sqlite3_free (col->real_name);
    if (col->type != NULL)
	free (col->type);
    free (col);
}

static struct output_table *
alloc_output_table (void)
{
/* creating the Output Table struct */
    struct output_table *ptr = malloc (sizeof (struct output_table));
    if (ptr == NULL)
	return NULL;
    ptr->first = NULL;
    ptr->last = NULL;
    return ptr;
}

static void
destroy_output_table (struct output_table *tbl)
{
/* memory cleanup - destroying the Output Table struct */
    struct output_column *col;
    struct output_column *col_n;

    if (tbl == NULL)
	return;
    col = tbl->first;
    while (col != NULL)
      {
	  col_n = col->next;
	  destroy_output_table_column (col);
	  col = col_n;
      }
    free (tbl);
}

static struct output_column *
add_column_to_output_table (struct output_table *tbl, const char *name,
			    const char *type, int notnull, int role,
			    int order_nr)
{
/* adding a column to the Output Table */
    struct output_column *col;

    if (tbl == NULL)
	return NULL;
    col = alloc_output_table_column (name, type, notnull, role, order_nr);
    if (col == NULL)
	return NULL;
    if (tbl->first == NULL)
	tbl->first = col;
    if (tbl->last != NULL)
	tbl->last->next = col;
    tbl->last = col;
    return col;
}

static void
do_reset_message (char **ptr)
{
/* resetting the message string */
    if (ptr == NULL)
	return;
    if (*ptr != NULL)
	sqlite3_free (*ptr);
    *ptr = NULL;
}

static void
do_update_message (char **ptr, const char *message)
{
/* updating the message string */
    if (ptr == NULL)
	return;
    if (*ptr != NULL)
	return;
    *ptr = sqlite3_mprintf ("%s", message);
}

static void
do_update_sql_error (char **ptr, const char *message, const char *sql_err)
{
/* printing some SQL error */
    if (ptr == NULL)
	return;
    if (*ptr != NULL)
	return;
    *ptr = sqlite3_mprintf ("%s %s", message, sql_err);
}

static void
do_print_message2 (char **ptr, const char *message, const char *prefix,
		   const char *table)
{
/* printing the message string - 2 args */
    if (ptr == NULL)
	return;
    if (*ptr != NULL)
	return;
    *ptr = sqlite3_mprintf (message, prefix, table);
}

static void
do_print_message3 (char **ptr, const char *message, const char *prefix,
		   const char *table, const char *geometry)
{
/* printing the message string - 3 args */
    if (ptr == NULL)
	return;
    if (*ptr != NULL)
	return;
    *ptr = sqlite3_mprintf (message, prefix, table, geometry);
}

static int
do_check_input (sqlite3 * handle, const char *db_prefix, const char *table,
		const char *xgeometry, char **geometry, int *srid, int *type,
		char **message)
{
/* checking the input table for validity */
    char *sql;
    char *xprefix;
    char *xtable;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int count = 0;
    char *geom_name = NULL;
    int geom_srid = -1;
    int geom_type = -1;
    int pk = 0;
    int i;
    int ret;

    *geometry = NULL;
    *srid = -1;
    *type = GAIA_UNKNOWN;
    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* checking if the table really exists */
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 5];
	  if (atoi (value) > 0)
	      pk = 1;
	  count++;
      }
    sqlite3_free_table (results);
    if (count == 0)
      {
	  do_print_message2 (message, "ERROR: table %s.%s does not exists",
			     db_prefix, table);
	  goto error;
      }
    if (pk == 0)
      {
	  do_print_message2 (message,
			     "ERROR: table %s.%s lacks any Primary Key",
			     db_prefix, table);
	  goto error;
      }

/* checking geometry_columns */
    count = 0;
    if (xgeometry == NULL)
	sql = sqlite3_mprintf ("SELECT f_geometry_column, srid, geometry_type "
			       "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q)",
			       xprefix, table, xgeometry);
    else
	sql = sqlite3_mprintf ("SELECT f_geometry_column, srid, geometry_type "
			       "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) "
			       "AND Lower(f_geometry_column) = Lower(%Q)",
			       xprefix, table, xgeometry);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT geometry_columns", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 0];
	  if (count == 0)
	    {
		int len = strlen (value);
		geom_name = malloc (len + 1);
		strcpy (geom_name, value);
	    }
	  value = results[(i * columns) + 1];
	  geom_srid = atoi (value);
	  value = results[(i * columns) + 2];
	  geom_type = atoi (value);
	  count++;
      }
    sqlite3_free_table (results);
    if (count == 0)
      {
	  do_print_message2 (message,
			     "ERROR: table %s.%s lacks any registered Geometry",
			     db_prefix, table);
	  goto error;
      }
    if (count > 1)
      {
	  do_print_message2 (message,
			     "ERROR: table %s.%s has multiple Geometries and a NULL name was passed",
			     db_prefix, table);
	  goto error;
      }
    switch (geom_type)
      {
      case GAIA_POINT:
      case GAIA_LINESTRING:
      case GAIA_POLYGON:
      case GAIA_MULTIPOINT:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTIPOLYGON:
      case GAIA_POINTZ:
      case GAIA_LINESTRINGZ:
      case GAIA_POLYGONZ:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_POINTM:
      case GAIA_LINESTRINGM:
      case GAIA_POLYGONM:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTIPOLYGONM:
      case GAIA_POINTZM:
      case GAIA_LINESTRINGZM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOINTZM:
      case GAIA_MULTILINESTRINGZM:
      case GAIA_MULTIPOLYGONZM:
	  break;
      default:
	  do_print_message3 (message,
			     "ERROR: table %s.%s Geometry %s has an invalid Type",
			     db_prefix, table, geom_name);
	  goto error;
      };
    *geometry = geom_name;
    *srid = geom_srid;
    *type = geom_type;

    free (xprefix);
    return 1;

  error:
    free (xprefix);
    if (geom_name != NULL)
	free (geom_name);
    return 0;
}

static int
do_check_blade (sqlite3 * handle, const char *db_prefix, const char *table,
		const char *xgeometry, char **geometry, int *srid,
		char **message)
{
/* checking the blade table for validity */
    char *sql;
    char *xprefix;
    char *xtable;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int count = 0;
    char *geom_name = NULL;
    int geom_srid = -1;
    int geom_type = -1;
    int pk = 0;
    int i;
    int ret;

    *geometry = NULL;
    *srid = -1;
    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* checking if the table really exists */
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 5];
	  if (atoi (value) > 0)
	      pk = 1;
	  count++;
      }
    sqlite3_free_table (results);
    if (count == 0)
      {
	  do_print_message2 (message, "ERROR: table %s.%s does not exists",
			     db_prefix, table);
	  goto error;
      }
    if (pk == 0)
      {
	  do_print_message2 (message,
			     "ERROR: table %s.%s lacks any Primary Key",
			     db_prefix, table);
	  goto error;
      }

/* checking geometry_columns */
    count = 0;
    if (xgeometry == NULL)
	sql = sqlite3_mprintf ("SELECT f_geometry_column, srid, geometry_type "
			       "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q)",
			       xprefix, table, xgeometry);
    else
	sql = sqlite3_mprintf ("SELECT f_geometry_column, srid, geometry_type "
			       "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) "
			       "AND Lower(f_geometry_column) = Lower(%Q)",
			       xprefix, table, xgeometry);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT geometry_columns", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 0];
	  if (count == 0)
	    {
		int len = strlen (value);
		geom_name = malloc (len + 1);
		strcpy (geom_name, value);
	    }
	  value = results[(i * columns) + 1];
	  geom_srid = atoi (value);
	  value = results[(i * columns) + 2];
	  geom_type = atoi (value);
	  count++;
      }
    sqlite3_free_table (results);
    if (count == 0)
      {
	  do_print_message2 (message,
			     "ERROR: table %s.%s lacks any registered Geometry",
			     db_prefix, table);
	  goto error;
      }
    if (count > 1)
      {
	  do_print_message2 (message,
			     "ERROR: table %s.%s has multiple Geometries and a NULL name was passed",
			     db_prefix, table);
	  goto error;
      }
    switch (geom_type)
      {
      case GAIA_POLYGON:
      case GAIA_MULTIPOLYGON:
      case GAIA_POLYGONZ:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_POLYGONM:
      case GAIA_MULTIPOLYGONM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGONZM:
	  break;
      default:
	  do_print_message3 (message,
			     "ERROR: table %s.%s Geometry %s isn't of the POLYGON or MULTIPOLYGON Type",
			     db_prefix, table, geom_name);
	  goto error;
      };
    *geometry = geom_name;
    *srid = geom_srid;

    free (xprefix);
    return 1;

  error:
    free (xprefix);
    if (geom_name != NULL)
	free (geom_name);
    return 0;
}

static int
do_check_nulls (sqlite3 * handle, const char *db_prefix, const char *table,
		const char *geom, const char *which, char **message)
{
/* testing for NULL PK values and NULL Geoms */
    int ret;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    char *sql;
    char *prev;
    char **results;
    int rows;
    int columns;
    int i;
    char *errMsg = NULL;
    sqlite3_stmt *stmt = NULL;
    int icol;
    int count = 0;
    int null_geom = 0;
    int null_pk = 0;

/* composing the SQL query */
    xcolumn = gaiaDoubleQuotedSql (geom);
    sql = sqlite3_mprintf ("SELECT \"%s\"", geom);
    free (xcolumn);
    prev = sql;

/* retrieving all PK columns */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *name = results[(i * columns) + 1];
	  const char *value = results[(i * columns) + 5];
	  if (atoi (value) > 0)
	    {
		/* found a PK column */
		xcolumn = gaiaDoubleQuotedSql (name);
		sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn);
		free (xcolumn);
		sqlite3_free (prev);
		prev = sql;
	    }
      }
    sqlite3_free_table (results);

    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("%s FROM \"%s\".\"%s\"", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);

/* creating the prepared statement */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "CHECK NULLS ",
			       sqlite3_errmsg (handle));
	  goto error;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		count++;
		if (sqlite3_column_type (stmt, 0) == SQLITE_NULL)
		    null_geom++;
		for (icol = 1; icol < sqlite3_column_count (stmt); icol++)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_NULL)
			  null_pk++;
		  }
		if (null_geom || null_pk)
		    break;
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: CHECK NULLS",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }
    sqlite3_finalize (stmt);
    stmt = NULL;

    if (null_geom)
      {
	  sql =
	      sqlite3_mprintf ("Invalid %s: found NULL Geometries !!!", which);
	  do_update_message (message, sql);
	  sqlite3_free (sql);
	  goto error;
      }
    if (null_pk)
      {
	  sql = sqlite3_mprintf ("Invalid %s: found NULL PK Values !!!", which);
	  do_update_message (message, sql);
	  sqlite3_free (sql);
	  goto error;
      }
    if (!count)
      {
	  sql = sqlite3_mprintf ("Invalid %s: empty table !!!", which);
	  do_update_message (message, sql);
	  sqlite3_free (sql);
	  goto error;
      }

    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
do_check_valid (sqlite3 * handle, const char *out_table, const char *input_geom,
		char **message)
{
/* checking for Invalid Output Geoms */
    int ret;
    char *sql;
    char *xcolumn;
    char *xtable;
    char **results;
    int rows;
    int columns;
    int i;
    char *errMsg = NULL;
    int count = 0;

/* inspecting the table */
    xcolumn = gaiaDoubleQuotedSql (input_geom);
    xtable = gaiaDoubleQuotedSql (out_table);
    sql =
	sqlite3_mprintf
	("SELECT Count(*) FROM MAIN.\"%s\" WHERE ST_IsValid(\"%s\") <> 1",
	 xtable, xcolumn);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 1;
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 0];
	  count = atoi (value);
      }
    sqlite3_free_table (results);
    if (count > 0)
      {
	  do_update_message (message,
			     "The OUTPUT table contains INVALID Geometries");
	  return 0;
      }
    return 1;
}

static int
check_spatial_index (sqlite3 * handle, const char *db_prefix,
		     const char *idx_name, char **message)
{
/* testing if some Spatial Index do really exists */
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char **results;
    int rows;
    int columns;
    int i;
    char *errMsg = NULL;
    int ok_pkid = 0;
    int ok_xmin = 0;
    int ok_xmax = 0;
    int ok_ymin = 0;
    int ok_ymax = 0;

    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* inspecting the table */
    xtable = gaiaDoubleQuotedSql (idx_name);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *name = results[(i * columns) + 1];
	  if (strcasecmp (name, "pkid") == 0)
	      ok_pkid = 1;
	  if (strcasecmp (name, "xmin") == 0)
	      ok_xmin = 1;
	  if (strcasecmp (name, "xmax") == 0)
	      ok_xmax = 1;
	  if (strcasecmp (name, "ymin") == 0)
	      ok_ymin = 1;
	  if (strcasecmp (name, "ymax") == 0)
	      ok_ymax = 1;
      }
    sqlite3_free_table (results);
    if (!ok_pkid || !ok_xmin || !ok_xmax || !ok_ymin || !ok_ymax)
	goto error;

    free (xprefix);
    return 1;

  error:
    free (xprefix);
    return 0;
}

static int
do_verify_blade_spatial_index (sqlite3 * handle, const char *db_prefix,
			       const char *table, const char *geometry,
			       char **spatial_index_prefix,
			       char **spatial_index, int *drop_spatial_index,
			       char **message)
{
/* verifying the Spatial Index supporting the Blade Geometry */
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char *xgeometry;
    char *idx_prefix;
    char *idx_name;
    char **results;
    int rows;
    int columns;
    int i;
    int declared = 0;
    char *errMsg = NULL;
    time_t now;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif

    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* inspecting the table */
    sql = sqlite3_mprintf ("SELECT spatial_index_enabled "
			   "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) "
			   "AND Lower(f_geometry_column) = Lower(%Q)",
			   xprefix, table, geometry);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT geometry_columns", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 0];
	  if (atoi (value) == 1)
	      declared = 1;
      }
    sqlite3_free_table (results);

    if (!declared)
	goto create_default;

    idx_name = sqlite3_mprintf ("idx_%s_%s", table, geometry);
    if (check_spatial_index (handle, db_prefix, idx_name, message))
      {
	  idx_prefix = malloc (strlen (db_prefix) + 1);
	  strcpy (idx_prefix, db_prefix);
	  *spatial_index_prefix = idx_prefix;
	  *spatial_index = idx_name;
	  *drop_spatial_index = 0;
	  goto end;
      }
    sqlite3_free (idx_name);

  create_default:
/* creating a transient Spatial Index */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    time (&now);
    idx_name = sqlite3_mprintf ("tmpidx_%u_%u", pid, now);
    xtable = gaiaDoubleQuotedSql (idx_name);
    sql = sqlite3_mprintf ("CREATE VIRTUAL TABLE TEMP.\"%s\" USING "
			   "rtree(pkid, xmin, xmax, ymin, ymax)", xtable);
    free (xtable);

    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "CREATE SPATIAL INDEX", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }

/* populating the transient Spatial Index */
    xtable = gaiaDoubleQuotedSql (table);
    xgeometry = gaiaDoubleQuotedSql (geometry);
    sql =
	sqlite3_mprintf
	("INSERT INTO TEMP.\"%s\" (pkid, xmin, xmax, ymin, ymax) "
	 "SELECT ROWID, MbrMinX(\"%s\"), MbrMaxX(\"%s\"), MbrMinY(\"%s\"), MbrMaxY(\"%s\") "
	 "FROM \"%s\".\"%s\"", idx_name, xgeometry, xgeometry, xgeometry,
	 xgeometry, xprefix, xtable);
    free (xtable);
    free (xgeometry);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "POPULATE SPATIAL INDEX", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }

    *spatial_index = idx_name;
    idx_prefix = malloc (5);
    strcpy (idx_prefix, "TEMP");
    *spatial_index_prefix = idx_prefix;
    *drop_spatial_index = 1;

  end:
    free (xprefix);
    return 1;

  error:
    free (xprefix);
    return 0;
}

static int
do_drop_blade_spatial_index (sqlite3 * handle, const char *spatial_index,
			     char **message)
{
/* dropping the transient Spatial Index supporting the Blade table */
    int ret;
    char *sql;
    char *xtable;
    char *errMsg = NULL;
    xtable = gaiaDoubleQuotedSql (spatial_index);
    sql = sqlite3_mprintf ("DROP TABLE TEMP.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "DROP SPATIAL INDEX", errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    return 1;
}

static int
do_drop_tmp_table (sqlite3 * handle, const char *tmp_table, char **message)
{
/* dropping the Temporary helper table */
    int ret;
    char *sql;
    char *xtable;
    char *errMsg = NULL;
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("DROP TABLE TEMP.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "DROP TEMPORAY TABLE", errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    return 1;
}

static int
do_check_output (sqlite3 * handle, const char *db_prefix, const char *table,
		 const char *geometry, char **message)
{
/* checking the output table for validity */
    char *sql;
    char *xprefix;
    char *xtable;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int count = 0;
    int i;
    int ret;

    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* checking if the table already exists */
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);
    if (count != 0)
      {
	  do_print_message2 (message, "ERROR: table %s.%s do already exists",
			     db_prefix, table);
	  goto error;
      }

/* checking geometry_columns */
    count = 0;
    sql = sqlite3_mprintf ("SELECT f_geometry_column, srid, geometry_type "
			   "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) "
			   "AND Lower(f_geometry_column) = Lower(%Q)",
			   xprefix, table, geometry);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT geometry_columns", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);
    if (count != 0)
      {
	  do_print_message3 (message,
			     "ERROR: table %s.%s Geometry %s is already registered",
			     db_prefix, table, geometry);
	  goto error;
      }

    free (xprefix);
    return 1;

  error:
    free (xprefix);
    return 0;
}

static int
do_get_input_pk (struct output_table *tbl, sqlite3 * handle,
		 const char *db_prefix, const char *table, char **message)
{
/* retrieving the input table PK columns */
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char **results;
    int rows;
    int columns;
    int i;
    char *errMsg = NULL;

    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* inspecting the table */
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *name = results[(i * columns) + 1];
	  const char *type = results[(i * columns) + 2];
	  const char *notnull = results[(i * columns) + 3];
	  const char *value = results[(i * columns) + 5];
	  if (atoi (value) > 0)
	    {
		if (add_column_to_output_table
		    (tbl, name, type, atoi (notnull), GAIA_CUTTER_INPUT_PK,
		     atoi (value)) == NULL)
		  {
		      do_print_message2 (message,
					 "ERROR: insufficient memory (OutputTable wrapper/Input PK)",
					 db_prefix, table);
		      goto error;
		  }
	    }
      }
    sqlite3_free_table (results);

    free (xprefix);
    return 1;

  error:
    free (xprefix);
    return 0;
}

static int
do_get_blade_pk (struct output_table *tbl, sqlite3 * handle,
		 const char *db_prefix, const char *table, char **message)
{
/* retrieving the blade table PK columns */
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char **results;
    int rows;
    int columns;
    int i;
    char *errMsg = NULL;

    xprefix = gaiaDoubleQuotedSql (db_prefix);

/* inspecting the table */
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA table_info", errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *name = results[(i * columns) + 1];
	  const char *type = results[(i * columns) + 2];
	  const char *notnull = results[(i * columns) + 3];
	  const char *value = results[(i * columns) + 5];
	  if (atoi (value) > 0)
	    {
		if (add_column_to_output_table
		    (tbl, name, type, atoi (notnull), GAIA_CUTTER_BLADE_PK,
		     atoi (value)) == NULL)
		  {
		      do_print_message2 (message,
					 "ERROR: insufficient memory (OutputTable wrapper/Blade PK)",
					 db_prefix, table);
		      goto error;
		  }
	    }
      }
    sqlite3_free_table (results);

    free (xprefix);
    return 1;

  error:
    free (xprefix);
    return 0;
}

static void
make_lowercase (char *name)
{
/* making a column name all lowercase */
    char *p = name;
    while (*p != '\0')
      {
	  if (*p >= 'A' && *p <= 'Z')
	      *p = *p - 'A' + 'a';
	  p++;
      }
}

static int
do_create_output_table (struct output_table *tbl, sqlite3 * handle,
			const char *table, const char *input_table,
			const char *blade_table, char **message)
{
/* attempting to create the Output Table */
    int ret;
    char *errMsg = NULL;
    char *sql;
    char *prev;
    char *xtable;
    char *xcolumn;
    char *zcolumn;
    char *zzcolumn;
    struct output_column *col;

/* composing the CREATE TABLE statement */
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* adding a column to the table */
	  xcolumn = gaiaDoubleQuotedSql (col->base_name);
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		/* Input PK column */
		zcolumn =
		    sqlite3_mprintf ("input_%s_%s", input_table,
				     col->base_name);
		make_lowercase (zcolumn);
		zzcolumn = gaiaDoubleQuotedSql (zcolumn);
		col->real_name = zcolumn;
		sql =
		    sqlite3_mprintf ("%s,\n\t\"%s\" %s%s", prev, zzcolumn,
				     col->type,
				     (col->notnull) ? " NOT NULL" : "");
		free (zzcolumn);
		sqlite3_free (prev);
		prev = sql;
	    }
	  else if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		/* Blade PK column */
		zcolumn =
		    sqlite3_mprintf ("blade_%s_%s", blade_table,
				     col->base_name);
		make_lowercase (zcolumn);
		zzcolumn = gaiaDoubleQuotedSql (zcolumn);
		col->real_name = zcolumn;
		sql =
		    sqlite3_mprintf ("%s,\n\t\"%s\" %s", prev, zzcolumn,
				     col->type);
		free (zzcolumn);
		sqlite3_free (prev);
		prev = sql;
	    }
	  else if (col->role == GAIA_CUTTER_OUTPUT_PK)
	    {
		/* output table primary column */
		sql =
		    sqlite3_mprintf ("%s\n\t\"%s\" %s PRIMARY KEY", prev,
				     xcolumn, col->type);
		sqlite3_free (prev);
		prev = sql;
	    }
	  else
	    {
		/* ordinary column */
		sql =
		    sqlite3_mprintf ("%s,\n\t\"%s\" %s%s", prev, xcolumn,
				     col->type,
				     (col->notnull) ? " NOT NULL" : "");
		sqlite3_free (prev);
		prev = sql;
	    }
	  free (xcolumn);
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s)", prev);
    sqlite3_free (prev);

/* creating the Output Table */
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "CREATE TABLE", errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    return 1;
}

static int
do_create_output_geometry (sqlite3 * handle, const char *table,
			   const char *geometry, int srid, int geom_type,
			   char **message)
{
/* attempting to create the Output Geometry */
    int ret;
    int retcode = 0;
    sqlite3_stmt *stmt = NULL;
    char *sql;
    const char *type = "";
    const char *dims = "";

    switch (geom_type)
      {
      case GAIA_POINT:
      case GAIA_POINTZ:
      case GAIA_POINTM:
      case GAIA_POINTZM:
      case GAIA_MULTIPOINT:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTIPOINTZM:
	  type = "POINT";
	  break;
      case GAIA_LINESTRING:
      case GAIA_LINESTRINGZ:
      case GAIA_LINESTRINGM:
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTILINESTRINGZM:
	  type = "LINESTRING";
	  break;
      case GAIA_POLYGON:
      case GAIA_POLYGONZ:
      case GAIA_POLYGONM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGON:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_MULTIPOLYGONM:
      case GAIA_MULTIPOLYGONZM:
	  type = "POLYGON";
	  break;
      };
    switch (geom_type)
      {
      case GAIA_POINT:
      case GAIA_LINESTRING:
      case GAIA_POLYGON:
      case GAIA_MULTIPOINT:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTIPOLYGON:
      case GAIA_POINTM:
      case GAIA_LINESTRINGM:
      case GAIA_POLYGONM:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTIPOLYGONM:
	  dims = "XY";
	  break;
      case GAIA_POINTZ:
      case GAIA_LINESTRINGZ:
      case GAIA_POLYGONZ:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_POINTZM:
      case GAIA_LINESTRINGZM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOINTZM:
      case GAIA_MULTILINESTRINGZM:
      case GAIA_MULTIPOLYGONZM:
	  dims = "XYZ";
	  break;
      };
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(Lower(%Q), Lower(%Q), %d, %Q, %Q)", table,
	 geometry, srid, type, dims);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "AddGeometryTable",
			       sqlite3_errmsg (handle));
	  goto end;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_INTEGER)
		  {
		      /* testing for success */
		      if (sqlite3_column_int (stmt, 0) != 0)
			  retcode = 1;
		  }
	    }
      }

  end:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return retcode;
}

static gaiaGeomCollPtr
do_read_input_geometry (struct output_table *tbl, const void *cache,
			sqlite3_stmt * stmt_in, sqlite3 * handle,
			struct temporary_row *row, char **message,
			unsigned char **blob, int *blob_sz)
{
/* reading an Input Geometry */
    int ret;
    int icol2 = 0;
    int icol = 1;
    struct multivar *var;
    struct output_column *col;
    gaiaGeomCollPtr geom = NULL;
    const unsigned char *blob_value;
    int size;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  gpkg_mode = pcache->gpkg_mode;
      }
    *blob = NULL;
    *blob_sz = 0;

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		var = find_input_pk_value (row, icol2);
		if (var == NULL)
		    return NULL;
		icol2++;
		switch (var->type)
		  {
		      /* Input Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_in, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_in, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_in, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_in, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    while (1)
      {
	  /* scrolling the result set rows - Input */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_BLOB)
		  {
		      blob_value = sqlite3_column_blob (stmt_in, 0);
		      size = sqlite3_column_bytes (stmt_in, 0);
		      geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob_value, size,
						       gpkg_mode,
						       gpkg_amphibious);
		      *blob = (unsigned char *) blob_value;
		      *blob_sz = size;
		      return geom;
		  }
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT Geometry FROM INPUT",
				     sqlite3_errmsg (handle));
		if (geom != NULL)
		    gaiaFreeGeomColl (geom);
		return NULL;
	    }
      }

    if (geom == NULL)
	do_update_message (message, "found unexpected NULL Input Geometry");
    return geom;
}

static gaiaGeomCollPtr
do_read_blade_geometry (struct output_table *tbl, const void *cache,
			sqlite3_stmt * stmt_in, sqlite3 * handle,
			struct temporary_row *row, char **message,
			unsigned char **blob, int *blob_sz)
{
/* reading an Blase Geometry */
    int ret;
    int icol2 = 0;
    int icol = 1;
    struct multivar *var;
    struct output_column *col;
    gaiaGeomCollPtr geom = NULL;
    const unsigned char *blob_value;
    int size;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  gpkg_mode = pcache->gpkg_mode;
      }
    *blob = NULL;
    *blob_sz = 0;

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		var = find_blade_pk_value (row, icol2);
		if (var == NULL)
		    return NULL;
		icol2++;
		switch (var->type)
		  {
		      /* Blade Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_in, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_in, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_in, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_in, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    while (1)
      {
	  /* scrolling the result set rows - Input */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_BLOB)
		  {
		      blob_value = sqlite3_column_blob (stmt_in, 0);
		      size = sqlite3_column_bytes (stmt_in, 0);
		      geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob_value, size,
						       gpkg_mode,
						       gpkg_amphibious);
		      *blob = (unsigned char *) blob_value;
		      *blob_sz = size;
		      return geom;
		  }
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT Geometry FROM BLADE",
				     sqlite3_errmsg (handle));
		if (geom != NULL)
		    gaiaFreeGeomColl (geom);
		return NULL;
	    }
      }

    if (geom == NULL)
	do_update_message (message, "found unexpected NULL Blade Geometry");
    return geom;
}

static gaiaGeomCollPtr
do_prepare_point (gaiaPointPtr pt, int srid)
{
/* normalizing a Point Geometry */
    gaiaGeomCollPtr new_geom = NULL;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
      {
	  new_geom = gaiaAllocGeomCollXYZ ();
	  gaiaAddPointToGeomCollXYZ (new_geom, pt->X, pt->Y, pt->Z);
      }
    else
      {
	  new_geom = gaiaAllocGeomColl ();
	  gaiaAddPointToGeomColl (new_geom, pt->X, pt->Y);
      }
    if (new_geom->MinX > pt->X)
	new_geom->MinX = pt->X;
    if (new_geom->MaxX < pt->X)
	new_geom->MaxX = pt->X;
    if (new_geom->MinY > pt->Y)
	new_geom->MinY = pt->Y;
    if (new_geom->MaxY < pt->Y)
	new_geom->MaxY = pt->Y;
    new_geom->Srid = srid;
    new_geom->DeclaredType = GAIA_POINT;
    return new_geom;
}

static gaiaGeomCollPtr
do_prepare_linestring (gaiaLinestringPtr ln, int srid)
{
/* normalizing a Linestring Geometry */
    gaiaGeomCollPtr new_geom = NULL;
    gaiaLinestringPtr new_ln;
    int iv;
    double x;
    double y;
    double z = 0.0;
    double m = 0.0;

    if (ln->DimensionModel == GAIA_XY_Z || ln->DimensionModel == GAIA_XY_Z_M)
	new_geom = gaiaAllocGeomCollXYZ ();
    else
	new_geom = gaiaAllocGeomColl ();
    new_geom->Srid = srid;
    new_geom->DeclaredType = GAIA_LINESTRING;

    new_ln = gaiaAddLinestringToGeomColl (new_geom, ln->Points);
    for (iv = 0; iv < ln->Points; iv++)
      {
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  if (new_geom->MinX > x)
	      new_geom->MinX = x;
	  if (new_geom->MaxX < x)
	      new_geom->MaxX = x;
	  if (new_geom->MinY > y)
	      new_geom->MinY = y;
	  if (new_geom->MaxY < y)
	      new_geom->MaxY = y;
	  if (new_ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (new_ln->Coords, iv, x, y, z);
	    }
	  else
	    {
		gaiaSetPoint (new_ln->Coords, iv, x, y);
	    }
      }
    return new_geom;
}

static gaiaGeomCollPtr
do_prepare_polygon (gaiaPolygonPtr pg, int srid)
{
/* normalizing a Polygon Geometry */
    gaiaGeomCollPtr new_geom = NULL;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr rng;
    gaiaRingPtr new_rng;
    int iv;
    int ib;
    double x;
    double y;
    double z;
    double m;

    if (pg->DimensionModel == GAIA_XY_Z || pg->DimensionModel == GAIA_XY_Z_M)
	new_geom = gaiaAllocGeomCollXYZ ();
    else
	new_geom = gaiaAllocGeomColl ();
    new_geom->Srid = srid;
    new_geom->DeclaredType = GAIA_POLYGON;

/* Exterior Ring */
    rng = pg->Exterior;
    new_pg = gaiaAddPolygonToGeomColl (new_geom, rng->Points, pg->NumInteriors);
    new_rng = new_pg->Exterior;
    for (iv = 0; iv < rng->Points; iv++)
      {
	  m = 0.0;
	  z = 0.0;
	  if (rng->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
	    }
	  else if (rng->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
	    }
	  else if (rng->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, iv, &x, &y);
	    }
	  if (new_geom->MinX > x)
	      new_geom->MinX = x;
	  if (new_geom->MaxX < x)
	      new_geom->MaxX = x;
	  if (new_geom->MinY > y)
	      new_geom->MinY = y;
	  if (new_geom->MaxY < y)
	      new_geom->MaxY = y;
	  if (new_rng->DimensionModel == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (new_rng->Coords, iv, x, y, z);
	    }
	  else
	    {
		gaiaSetPoint (new_rng->Coords, iv, x, y);
	    }
      }
    for (ib = 0; ib < pg->NumInteriors; ib++)
      {
	  /* Interior Rings */
	  rng = pg->Interiors + ib;
	  new_rng = gaiaAddInteriorRing (new_pg, ib, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (rng->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else if (rng->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		if (new_rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (new_rng->Coords, iv, x, y, z);
		  }
		else
		  {
		      gaiaSetPoint (new_rng->Coords, iv, x, y);
		  }
	    }
      }
    return new_geom;
}

static int
do_insert_output_row (struct output_table *tbl, const void *cache,
		      sqlite3_stmt * stmt_out, sqlite3 * handle,
		      struct temporary_row *row, int n_geom, int res_prog,
		      int geom_type, void *item, int srid, char **message)
{
/* inserting into the Output table */
    int ret;
    int icol2 = 0;
    int icol = 1;
    struct multivar *var;
    struct output_column *col;
    gaiaGeomCollPtr geom = NULL;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    unsigned char *blob;
    int size;
    int gpkg_mode = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    sqlite3_reset (stmt_out);
    sqlite3_clear_bindings (stmt_out);
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		/* binding Input PK values */
		var = find_input_pk_value (row, icol2);
		if (var == NULL)
		    return 0;
		icol2++;
		switch (var->type)
		  {
		      /* Input Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_out, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_out, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_out, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_out, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    icol2 = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		/* binding Blade PK values */
		var = find_blade_pk_value (row, icol2);
		if (var == NULL)
		    return 0;
		icol2++;
		switch (var->type)
		  {
		      /* Blade Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_out, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_out, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_out, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_out, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
/* binding "n_geom" and "res_prog" columns */
    sqlite3_bind_int (stmt_out, icol, n_geom);
    icol++;
    sqlite3_bind_int (stmt_out, icol, res_prog);
    icol++;
    switch (geom_type)
      {
	  /* preparing the Output Geometry */
      case GAIA_CUTTER_POINT:
	  pt = (gaiaPointPtr) item;
	  geom = do_prepare_point (pt, srid);
	  break;
      case GAIA_CUTTER_LINESTRING:
	  ln = (gaiaLinestringPtr) item;
	  geom = do_prepare_linestring (ln, srid);
	  break;
      case GAIA_CUTTER_POLYGON:
	  pg = (gaiaPolygonPtr) item;
	  geom = do_prepare_polygon (pg, srid);
	  break;
      default:
	  do_update_message (message, "ILLEGAL OUTPUT GEOMETRY");
	  return 0;
      };
    if (geom == NULL)
      {
	  do_update_message (message, "UNEXPECTED NULL OUTPUT GEOMETRY");
	  return 0;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (geom, &blob, &size, gpkg_mode, tiny_point);
    if (blob == NULL)
      {
	  do_update_message (message, "UNEXPECTED NULL OUTPUT BLOB GEOMETRY");
	  gaiaFreeGeomColl (geom);
	  return 0;
      }
    sqlite3_bind_blob (stmt_out, icol, blob, size, free);
    gaiaFreeGeomColl (geom);

    ret = sqlite3_step (stmt_out);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

/* some error occurred */
    do_update_sql_error (message, "INSERT INTO OUTPUT",
			 sqlite3_errmsg (handle));
    return 0;
}

static int
do_create_input_statement (struct output_table *tbl, sqlite3 * handle,
			   const char *input_db_prefix, const char *input_table,
			   const char *input_geom, sqlite3_stmt ** stmt_in,
			   char **message)
{
/* creating a Prepared Statemet - SELECT geometry FROM Input */
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;

/* composing the SQL statement */
    xcolumn = gaiaDoubleQuotedSql (input_geom);
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\" WHERE", xcolumn,
			 xprefix, xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s AND \"%s\" = ?", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT GEOMETRY FROM INPUT",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    *stmt_in = stmt;
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
do_create_output_statement (struct output_table *tbl, sqlite3 * handle,
			    const char *out_table, sqlite3_stmt ** stmt_out,
			    char **message)
{
/* creating a Prepared Statemet - INSERT INTO Output */
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *xtable;
    char *sql;
    char *prev;
    struct output_column *col;

/* composing the SQL statement */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" VALUES (NULL", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s, ?, ?, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO OUTPUT",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    *stmt_out = stmt;
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
do_prepare_temp_points (struct output_table *tbl, sqlite3 * handle,
			const char *input_db_prefix, const char *input_table,
			const char *input_geom, const char *blade_db_prefix,
			const char *blade_table, const char *blade_geom,
			const char *spatial_index_prefix,
			const char *spatial_index, char **tmp_table,
			char **message)
{
/* creating and populating the temporary helper table - POINTs */
    int ret;
    char *errMsg = NULL;
    char *temporary_table;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    time_t now;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    struct output_column *col;
    int comma = 0;

    *tmp_table = NULL;
/* composing the SQL statement */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    time (&now);
    temporary_table = sqlite3_mprintf ("tmpcuttertbl_%u_%u", pid, now);
    xtable = gaiaDoubleQuotedSql (temporary_table);

    sql = sqlite3_mprintf ("CREATE TEMPORARY TABLE \"%s\" AS SELECT", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, i.\"%s\" AS \"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s i.\"%s\" AS \"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, b.\"%s\" AS \"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s b.\"%s\" AS \"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the "Touches" column */
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    xcolumn2 = gaiaDoubleQuotedSql (blade_geom);
    sql =
	sqlite3_mprintf ("%s, ST_Touches(i.\"%s\", b.\"%s\") AS touches", prev,
			 xcolumn1, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql = sqlite3_mprintf ("%s FROM \"%s\".\"%s\" AS i", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("%s LEFT JOIN \"%s\".\"%s\" AS b ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    xcolumn2 = gaiaDoubleQuotedSql (blade_geom);
    sql =
	sqlite3_mprintf ("%sST_CoveredBy(i.\"%s\", b.\"%s\") = 1 ", prev,
			 xcolumn1, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    sql = sqlite3_mprintf ("%s AND b.ROWID IN (SELECT pkid FROM ", prev);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (spatial_index_prefix);
    xtable = gaiaDoubleQuotedSql (spatial_index);
    sql = sqlite3_mprintf ("%s \"%s\".\"%s\" WHERE", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    sql =
	sqlite3_mprintf
	("%s xmin <= MbrMaxX(i.\"%s\") AND xmax >= MbrMinX(i.\"%s\") ", prev,
	 xcolumn1, xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    sql =
	sqlite3_mprintf
	("%s AND ymin <= MbrMaxY(i.\"%s\") AND ymax >= MbrMinY(i.\"%s\")))",
	 prev, xcolumn1, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);

/* executing the SQL Query */
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "CREATE TEMPORARY TABLE POINT #0",
			       errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }

    *tmp_table = temporary_table;
    return 1;

  error:
    if (temporary_table != NULL)
	sqlite3_free (temporary_table);
    return 0;
}

static int
do_create_temp_linestrings (struct output_table *tbl, sqlite3 * handle,
			    char **tmp_table, char **message)
{
/* creating and populating the temporary helper table - LINESTRINGs */
    int ret;
    char *errMsg = NULL;
    char *temporary_table;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    time_t now;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    struct output_column *col;
    int comma = 0;

    *tmp_table = NULL;
/* composing the SQL statement */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    time (&now);
    temporary_table = sqlite3_mprintf ("tmpcuttertbl_%u_%u", pid, now);
    xtable = gaiaDoubleQuotedSql (temporary_table);

    sql = sqlite3_mprintf ("CREATE TEMPORARY TABLE \"%s\" (", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, \"%s\" GENERIC", prev, xcolumn2);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" GENERIC", prev, xcolumn2);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the n_geom column */ ;
    xprefix = sqlite3_mprintf ("%s_n_geom", temporary_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s, \"%s\" INTEGER", prev, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s, \"%s\" GENERIC", prev, xcolumn2);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the nodes-geometry */
    xprefix = sqlite3_mprintf ("%s_nodes_geom", temporary_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s, \"%s\" BLOB", prev, xcolumn2);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
/* adding the cut-geometry */
    xprefix = sqlite3_mprintf ("%s_geom", temporary_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s, \"%s\" BLOB)", prev, xcolumn2);
    free (xcolumn2);
    sqlite3_free (prev);

/* executing the SQL Query */
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "CREATE TEMPORARY TABLE LINESTRINGS",
			       errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }

    *tmp_table = temporary_table;
    return 1;

  error:
    if (temporary_table != NULL)
	sqlite3_free (temporary_table);
    return 0;
}

static int
do_create_temp_polygons (struct output_table *tbl, sqlite3 * handle,
			 char **tmp_table, char **message)
{
/* creating and populating the temporary helper table - POLYGONs */
    int ret;
    char *errMsg = NULL;
    char *temporary_table;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    time_t now;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    struct output_column *col;
    int comma = 0;

    *tmp_table = NULL;
/* composing the SQL statement */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    time (&now);
    temporary_table = sqlite3_mprintf ("tmpcuttertbl_%u_%u", pid, now);
    xtable = gaiaDoubleQuotedSql (temporary_table);

    sql = sqlite3_mprintf ("CREATE TEMPORARY TABLE \"%s\" (", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, \"%s\" GENERIC", prev, xcolumn2);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" GENERIC", prev, xcolumn2);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the n_geom column */ ;
    xprefix = sqlite3_mprintf ("%s_n_geom", temporary_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s, \"%s\" INTEGER", prev, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s, \"%s\" GENERIC", prev, xcolumn2);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the cut-geometry */
    xprefix = sqlite3_mprintf ("%s_geom", temporary_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s, \"%s\" BLOB)", prev, xcolumn2);
    free (xcolumn2);
    sqlite3_free (prev);

/* executing the SQL Query */
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "CREATE TEMPORARY TABLE POLYGONS",
			       errMsg);
	  sqlite3_free (errMsg);
	  goto error;
      }

    *tmp_table = temporary_table;
    return 1;

  error:
    if (temporary_table != NULL)
	sqlite3_free (temporary_table);
    return 0;
}

static int
is_null_blade (struct temporary_row *row)
{
/* testing for a NULL Blade reference */
    struct multivar *var = row->first_blade;
    while (var != NULL)
      {
	  if (var->type != SQLITE_NULL)
	      return 0;
	  var = var->next;
      }
    return 1;
}

static int
is_covered_by (const void *cache, gaiaGeomCollPtr input_g,
	       unsigned char *input_blob, int input_blob_sz,
	       gaiaGeomCollPtr blade_g, unsigned char *blade_blob,
	       int blade_blob_sz)
{
/* testing if the Input geometry is completely Covered By the Blade Geometry */
    return gaiaGeomCollPreparedCoveredBy (cache, input_g, input_blob,
					  input_blob_sz, blade_g, blade_blob,
					  blade_blob_sz);
}

static int
do_insert_temporary_linestrings (struct output_table *tbl, sqlite3 * handle,
				 const void *cache, sqlite3_stmt * stmt_out,
				 struct temporary_row *row,
				 gaiaGeomCollPtr geom, char **message,
				 int ngeom)
{
/* inserting a resolved Geometry in the Linestrings Helper Table */
    int ret;
    gaiaLinestringPtr ln;
    struct output_column *col;
    struct multivar *var;
    int icol2 = 0;
    int icol = 1;
    int n_geom = 0;
    unsigned char *blob;
    int size;
    int gpkg_mode = 0;
    int tiny_point = 0;
    gaiaGeomCollPtr g;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    if (ngeom < 0)
	n_geom = 0;
    else
	n_geom = ngeom;

    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  /* separating elementary geometries */
	  icol2 = 0;
	  icol = 1;
	  if (ngeom < 0)
	      n_geom++;
	  g = do_prepare_linestring (ln, geom->Srid);
	  sqlite3_reset (stmt_out);
	  sqlite3_clear_bindings (stmt_out);
	  col = tbl->first;
	  while (col != NULL)
	    {
		if (col->role == GAIA_CUTTER_INPUT_PK)
		  {
		      /* binding Input PK values */
		      var = find_input_pk_value (row, icol2);
		      if (var == NULL)
			  return 0;
		      icol2++;
		      switch (var->type)
			{
			    /* Input Primary Key Column(s) */
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_out, icol,
						var->value.intValue);
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_out, icol,
						 var->value.doubleValue);
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_out, icol,
					       var->value.textValue,
					       strlen (var->value.textValue),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_out, icol);
			    break;
			};
		      icol++;
		  }
		col = col->next;
	    }
	  /* binding n_geom */
	  sqlite3_bind_int (stmt_out, icol, n_geom);
	  icol++;
	  icol2 = 0;
	  col = tbl->first;
	  while (col != NULL)
	    {
		if (col->role == GAIA_CUTTER_BLADE_PK)
		  {
		      /* binding Blade PK values */
		      var = find_blade_pk_value (row, icol2);
		      if (var == NULL)
			  return 0;
		      icol2++;
		      switch (var->type)
			{
			    /* Blade Primary Key Column(s) */
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_out, icol,
						var->value.intValue);
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_out, icol,
						 var->value.doubleValue);
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_out, icol,
					       var->value.textValue,
					       strlen (var->value.textValue),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_out, icol);
			    break;
			};
		      icol++;
		  }
		col = col->next;
	    }
	  /* binding Nodes */
	  sqlite3_bind_null (stmt_out, icol);
	  icol++;
	  /* binding Geometry */
	  gaiaToSpatiaLiteBlobWkbEx2 (g, &blob, &size, gpkg_mode, tiny_point);
	  if (blob == NULL)
	    {
		do_update_message (message,
				   "UNEXPECTED NULL TEMPORARY LINESTRING BLOB GEOMETRY");
		gaiaFreeGeomColl (geom);
		return 0;
	    }
	  sqlite3_bind_blob (stmt_out, icol, blob, size, free);
	  gaiaFreeGeomColl (g);
	  ret = sqlite3_step (stmt_out);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		/* some error occurred */
		do_update_sql_error (message,
				     "INSERT INTO TEMPORARY LINSTRINGS",
				     sqlite3_errmsg (handle));
		return 0;
	    }
	  ln = ln->Next;
      }
    return 1;
}

static int
do_insert_temporary_linestring_intersection (struct output_table *tbl,
					     sqlite3 * handle,
					     const void *cache,
					     sqlite3_stmt * stmt_out,
					     struct temporary_row *row,
					     int n_geom, gaiaGeomCollPtr nodes,
					     char **message)
{
/* inserting an Input/Blade intersection into the Linestrings Helper Table */
    int ret;
    struct output_column *col;
    struct multivar *var;
    int icol2 = 0;
    int icol = 1;
    unsigned char *blob;
    int size;
    int gpkg_mode = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    sqlite3_reset (stmt_out);
    sqlite3_clear_bindings (stmt_out);
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		/* binding Input PK values */
		var = find_input_pk_value (row, icol2);
		if (var == NULL)
		    return 0;
		icol2++;
		switch (var->type)
		  {
		      /* Input Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_out, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_out, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_out, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_out, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    /* binding n_geom */
    sqlite3_bind_int (stmt_out, icol, n_geom);
    icol++;
    icol2 = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		/* binding Blade PK values */
		var = find_blade_pk_value (row, icol2);
		if (var == NULL)
		    return 0;
		icol2++;
		switch (var->type)
		  {
		      /* Blade Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_out, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_out, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_out, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_out, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    /* binding Nodes */
    gaiaToSpatiaLiteBlobWkbEx2 (nodes, &blob, &size, gpkg_mode, tiny_point);
    if (blob == NULL)
      {
	  do_update_message (message,
			     "UNEXPECTED NULL TEMPORARY LINESTRING NODES BLOB GEOMETRY");
	  return 0;
      }
    sqlite3_bind_blob (stmt_out, icol, blob, size, free);
    icol++;
    /* binding NULL geometry */
    sqlite3_bind_null (stmt_out, icol);
    ret = sqlite3_step (stmt_out);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

    /* some error occurred */
    do_update_sql_error (message, "INSERT INTO TEMPORARY LINESTRINGS",
			 sqlite3_errmsg (handle));
    return 0;
}

static gaiaGeomCollPtr
do_extract_linestring_nodes (const void *cache, sqlite3_stmt * stmt_nodes,
			     gaiaLinestringPtr input_ln, int srid,
			     gaiaGeomCollPtr blade_g)
{
/* finding the points of intersection between tweo lines (nodes) */
    int ret;
    gaiaGeomCollPtr input_g;
    gaiaGeomCollPtr result = NULL;
    unsigned char *input_blob = NULL;
    int input_blob_sz;
    unsigned char *blade_blob = NULL;
    int blade_blob_sz;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    sqlite3_reset (stmt_nodes);
    sqlite3_clear_bindings (stmt_nodes);
    input_g = do_prepare_linestring (input_ln, srid);
    gaiaToSpatiaLiteBlobWkbEx2 (input_g, &input_blob, &input_blob_sz, gpkg_mode,
				tiny_point);
    gaiaFreeGeomColl (input_g);
    gaiaToSpatiaLiteBlobWkbEx2 (blade_g, &blade_blob, &blade_blob_sz, gpkg_mode,
				tiny_point);
    sqlite3_bind_blob (stmt_nodes, 1, input_blob, input_blob_sz, free);
    sqlite3_bind_blob (stmt_nodes, 2, blade_blob, blade_blob_sz, free);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_nodes);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		if (sqlite3_column_type (stmt_nodes, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_nodes, 0);
		      int blob_sz = sqlite3_column_bytes (stmt_nodes, 0);
		      result =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
	    }
      }

    return result;
}

static int
do_populate_temp_linestrings (struct output_table *tbl, sqlite3 * handle,
			      const void *cache, const char *input_db_prefix,
			      const char *input_table, const char *input_geom,
			      const char *blade_db_prefix,
			      const char *blade_table, const char *blade_geom,
			      const char *spatial_index_prefix,
			      const char *spatial_index, const char *tmp_table,
			      int type, char **message)
{
/* populating the temporary helper table - LINESTRINGs */
    int ret;
    sqlite3_stmt *stmt_main = NULL;
    sqlite3_stmt *stmt_input = NULL;
    sqlite3_stmt *stmt_blade = NULL;
    sqlite3_stmt *stmt_tmp = NULL;
    sqlite3_stmt *stmt_nodes = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    int cast2d = 0;
    int cast3d = 0;

    switch (type)
      {
      case GAIA_LINESTRINGM:
      case GAIA_MULTILINESTRINGM:
	  cast2d = 1;
	  break;
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRINGZM:
	  cast3d = 1;
	  break;
      };

/* composing the SQL statement - main SELECT query */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, i.\"%s\"", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		sql = sqlite3_mprintf ("%s, b.\"%s\"", prev, xcolumn);
		free (xcolumn);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql = sqlite3_mprintf ("%s FROM \"%s\".\"%s\" AS i", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS b ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    sql = sqlite3_mprintf ("%sb.ROWID IN (SELECT pkid FROM ", prev);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (spatial_index_prefix);
    xtable = gaiaDoubleQuotedSql (spatial_index);
    sql = sqlite3_mprintf ("%s \"%s\".\"%s\" WHERE", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xcolumn = gaiaDoubleQuotedSql (input_geom);
    sql =
	sqlite3_mprintf
	("%s xmin <= MbrMaxX(i.\"%s\") AND xmax >= MbrMinX(i.\"%s\") ", prev,
	 xcolumn, xcolumn);
    sqlite3_free (prev);
    prev = sql;
    sql =
	sqlite3_mprintf
	("%s AND ymin <= MbrMaxY(i.\"%s\") AND ymax >= MbrMinY(i.\"%s\")))",
	 prev, xcolumn, xcolumn);
    free (xcolumn);
    sqlite3_free (prev);

/* creating a Prepared Statement - main SELECT query */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_main, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "QUERYING LINESTRING INTERSECTIONS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - SELECT geometry FROM Input */
    xcolumn = gaiaDoubleQuotedSql (input_geom);
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\" WHERE", xcolumn,
			 xprefix, xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s AND \"%s\" = ?", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT geometry FROM Input */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_input, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT GEOMETRY FROM INPUT",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - SELECT geometry FROM Blade */
    xcolumn = gaiaDoubleQuotedSql (blade_geom);
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\" WHERE", xcolumn,
			 xprefix, xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s AND \"%s\" = ?", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT geometry FROM Blade */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_blade, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT GEOMETRY FROM BLADE",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - Inserting into TMP */
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("INSERT INTO TEMP.\"%s\" VALUES (", xtable);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s, ?", prev);
		else
		    sql = sqlite3_mprintf ("%s?", prev);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the n_geom column */
    sql = sqlite3_mprintf ("%s, ?", prev);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the nodes columns */
    sql = sqlite3_mprintf ("%s, ?", prev);
    sqlite3_free (prev);
    prev = sql;
/* adding the geom columns */
    if (cast2d)
	sql = sqlite3_mprintf ("%s, CastToXY(?))", prev);
    else if (cast3d)
	sql = sqlite3_mprintf ("%s, CastToXYZ(?))", prev);
    else
	sql = sqlite3_mprintf ("%s, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement - INSERT INTO TMP LINESTRINGS */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_tmp, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO TMP LINESTRINGS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - finding NODES */
    sql =
	sqlite3_mprintf ("SELECT CollectionExtract(ST_Intersection(?, ?), 1)");

/* creating a Prepared Statement - finding NODES */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_nodes, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "FINDING LINESTRING NODES",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - checking matching Input/Blade pairs */
	  ret = sqlite3_step (stmt_main);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		gaiaGeomCollPtr input_g = NULL;
		gaiaGeomCollPtr blade_g = NULL;
		gaiaGeomCollPtr linear_blade_g = NULL;
		gaiaLinestringPtr ln;
		int n_geom = 0;
		unsigned char *input_blob;
		unsigned char *blade_blob;
		int input_blob_sz;
		int blade_blob_sz;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_main, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_main, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_main, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_main, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_main, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_main, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_main, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_main, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }

		/* reading the Input Geometry */
		input_g =
		    do_read_input_geometry (tbl, cache, stmt_input, handle,
					    &row, message, &input_blob,
					    &input_blob_sz);
		if (input_g == NULL)
		    goto error;

		if (is_null_blade (&row))
		  {
		      /* Input doesn't matches any Blade */
		      if (!do_insert_temporary_linestrings
			  (tbl, handle, cache, stmt_tmp, &row, input_g,
			   message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    goto error;
			}
		      goto skip;
		  }

		/* reading the Blade Geometry */
		blade_g =
		    do_read_blade_geometry (tbl, cache, stmt_blade, handle,
					    &row, message, &blade_blob,
					    &blade_blob_sz);
		if (blade_g == NULL)
		    goto error;

		if (is_covered_by
		    (cache, input_g, input_blob, input_blob_sz, blade_g,
		     blade_blob, blade_blob_sz))
		  {
		      /* Input is completely Covered By Blade */
		      if (!do_insert_temporary_linestrings
			  (tbl, handle, cache, stmt_tmp, &row, input_g,
			   message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    gaiaFreeGeomColl (blade_g);
			    goto error;
			}
		      goto skip;
		  }

		linear_blade_g = gaiaLinearize (blade_g, 1);
		ln = input_g->FirstLinestring;
		while (ln != NULL)
		  {
		      gaiaGeomCollPtr nodes;
		      n_geom++;
		      nodes =
			  do_extract_linestring_nodes (cache, stmt_nodes, ln,
						       input_g->Srid,
						       linear_blade_g);
		      if (nodes != NULL)
			{
			    /* saving an Input/Blade intersection */
			    if (!do_insert_temporary_linestring_intersection
				(tbl, handle, cache, stmt_tmp, &row, n_geom,
				 nodes, message))
			      {
				  reset_temporary_row (&row);
				  gaiaFreeGeomColl (input_g);
				  gaiaFreeGeomColl (blade_g);
				  gaiaFreeGeomColl (linear_blade_g);
				  gaiaFreeGeomColl (nodes);
				  goto error;
			      }
			    gaiaFreeGeomColl (nodes);
			}
		      ln = ln->Next;
		  }
		gaiaFreeGeomColl (linear_blade_g);

	      skip:
		reset_temporary_row (&row);
		gaiaFreeGeomColl (input_g);
		gaiaFreeGeomColl (blade_g);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: MAIN LINESTRINGS LOOP",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_main);
    sqlite3_finalize (stmt_input);
    sqlite3_finalize (stmt_blade);
    sqlite3_finalize (stmt_tmp);
    sqlite3_finalize (stmt_nodes);
    return 1;

  error:
    if (stmt_main == NULL)
	sqlite3_finalize (stmt_main);
    if (stmt_input == NULL)
	sqlite3_finalize (stmt_input);
    if (stmt_blade == NULL)
	sqlite3_finalize (stmt_blade);
    if (stmt_tmp == NULL)
	sqlite3_finalize (stmt_tmp);
    if (stmt_nodes == NULL)
	sqlite3_finalize (stmt_nodes);
    return 0;
}

static int
do_update_tmp_cut_linestring (sqlite3 * handle, sqlite3_stmt * stmt_upd,
			      sqlite3_int64 pk, const unsigned char *blob,
			      int blob_sz, char **message)
{
/* saving an Input Linestring cut against a renoded Blade */
    int ret;

    sqlite3_reset (stmt_upd);
    sqlite3_clear_bindings (stmt_upd);
/* binding the cut Input geometry */
    sqlite3_bind_blob (stmt_upd, 1, blob, blob_sz, free);
    sqlite3_bind_int64 (stmt_upd, 2, pk);
    /* updating the TMP table */
    ret = sqlite3_step (stmt_upd);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

    /* some error occurred */
    do_update_sql_error (message,
			 "step: UPDATE TMP SET cut-Polygon",
			 sqlite3_errmsg (handle));
    return 0;
}

static int
do_cut_tmp_linestrings (sqlite3 * handle, const void *cache,
			sqlite3_stmt * stmt_in, sqlite3_stmt * stmt_upd,
			struct temporary_row *row, char **message,
			const unsigned char *blade_blob, int blade_blob_sz)
{
/* cutting all Input Linestrings intersecting the renoded Blade */
    int ret;
    struct multivar *var;
    int icol = 1;
    gaiaGeomCollPtr blade_g;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  gpkg_mode = pcache->gpkg_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    blade_g = gaiaFromSpatiaLiteBlobWkbEx (blade_blob, blade_blob_sz,
					   gpkg_mode, gpkg_amphibious);

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    var = row->first_blade;
    while (var != NULL)
      {
	  /* binding Primary Key values (from Blade) */
	  switch (var->type)
	    {
	    case SQLITE_INTEGER:
		sqlite3_bind_int64 (stmt_in, icol, var->value.intValue);
		break;
	    case SQLITE_FLOAT:
		sqlite3_bind_double (stmt_in, icol, var->value.doubleValue);
		break;
	    case SQLITE_TEXT:
		sqlite3_bind_text (stmt_in, icol,
				   var->value.textValue,
				   strlen (var->value.textValue),
				   SQLITE_STATIC);
		break;
	    default:
		sqlite3_bind_null (stmt_in, icol);
		break;
	    };
	  icol++;
	  var = var->next;
      }

    while (1)
      {
	  /* scrolling the result set rows - cut Linestrings */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		sqlite3_int64 pk = 0;
		unsigned char *blob = NULL;
		int blob_sz = 0;
		gaiaGeomCollPtr input_g;
		gaiaGeomCollPtr result;
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER
		    && sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		  {
		      pk = sqlite3_column_int64 (stmt_in, 0);
		      blob = (unsigned char *) sqlite3_column_blob (stmt_in, 1);
		      blob_sz = sqlite3_column_bytes (stmt_in, 1);
		      input_g = gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
							     gpkg_mode,
							     gpkg_amphibious);
		      result =
			  gaiaGeometryIntersection_r (cache, input_g, blade_g);
		      if (result != NULL)
			{
			    gaiaToSpatiaLiteBlobWkbEx2 (result, &blob, &blob_sz,
							gpkg_mode, tiny_point);
			    gaiaFreeGeomColl (result);
			}
		      gaiaFreeGeomColl (input_g);
		  }
		if (blob != NULL)
		  {
		      if (!do_update_tmp_cut_linestring
			  (handle, stmt_upd, pk, blob, blob_sz, message))
			  goto error;
		  }
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: cut Linestrings",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }
    gaiaFreeGeomColl (blade_g);
    return 1;

  error:
    gaiaFreeGeomColl (blade_g);
    return 0;
}

static int
do_split_linestrings (struct output_table *tbl, sqlite3 * handle,
		      const void *cache, const char *input_db_prefix,
		      const char *input_table, const char *input_geom,
		      const char *blade_db_prefix, const char *blade_table,
		      const char *blade_geom, const char *tmp_table,
		      char **message)
{
/* cutting all Input Linestrings intersecting some Blade */
    int ret;
    sqlite3_stmt *stmt_blades = NULL;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_upd = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;

/* composing the SQL statement - SELECT FROM Blades */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, t.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s t.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xcolumn1 = gaiaDoubleQuotedSql (blade_geom);
    xprefix = sqlite3_mprintf ("%s_nodes_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf
	("%s, ST_Snap(b.\"%s\", ST_UnaryUnion(ST_Collect(t.\"%s\")), 0.000000001)",
	 prev, xcolumn1, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("%s FROM TEMP.\"%s\" AS t", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS b ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND b.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s b.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("%s) WHERE t.\"%s\" IS NULL GROUP BY", prev, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, t.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s t.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT FROM Blades */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_blades, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM BLADES",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - SELECT Input */
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    xtable = gaiaDoubleQuotedSql (tmp_table);
    xprefix = sqlite3_mprintf ("%s_n_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf
	("SELECT t.ROWID, ST_GeometryN(i.\"%s\", t.\"%s\") FROM TEMP.\"%s\" AS t",
	 xcolumn1, xcolumn2, xtable);
    free (xcolumn1);
    free (xcolumn2);
    free (xtable);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS i ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s) WHERE t.\"%s\" IS NULL", prev, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s AND t.\"%s\" = ?", prev, xcolumn1);
		free (xcolumn1);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT Input */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT INPUT FROM TMP",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - UPDATE tmp SET cut-Geom */
    xtable = gaiaDoubleQuotedSql (tmp_table);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("UPDATE TEMP.\"%s\" SET \"%s\" = ? WHERE ROWID = ?",
			 xtable, xcolumn1);
    free (xcolumn1);
    free (xtable);

/* creating a Prepared Statement - UPDATE tmp SET cut-Geom */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_upd, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "UPDATE TMP cut-Geometries",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - renoded Blades */
	  ret = sqlite3_step (stmt_blades);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_blades, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_blades, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_blades, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_blades, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the Blade */
		if (sqlite3_column_type (stmt_blades, icol) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_blades, icol);
		      int blob_sz = sqlite3_column_bytes (stmt_blades, icol);
		      /* cutting all Input geoms intersecting the Blade */
		      if (!do_cut_tmp_linestrings
			  (handle, cache, stmt_in, stmt_upd, &row, message,
			   blob, blob_sz))
			{
			    reset_temporary_row (&row);
			    goto error;
			}
		  }
		else
		  {
		      do_update_message (message, "Unexpected NULL Blade\n");
		      reset_temporary_row (&row);
		      goto error;
		  }

		reset_temporary_row (&row);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: BLADES", sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_blades);
    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_upd);
    return 1;

  error:
    if (stmt_blades != NULL)
	sqlite3_finalize (stmt_blades);
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_upd != NULL)
	sqlite3_finalize (stmt_upd);
    return 0;
}

static int
do_insert_temporary_polygons (struct output_table *tbl, sqlite3 * handle,
			      const void *cache, sqlite3_stmt * stmt_out,
			      struct temporary_row *row, gaiaGeomCollPtr geom,
			      char **message, int ngeom)
{
/* inserting a resolved Geometry in the Polygons Helper Table */
    int ret;
    gaiaPolygonPtr pg;
    struct output_column *col;
    struct multivar *var;
    int icol2 = 0;
    int icol = 1;
    int n_geom = 0;
    unsigned char *blob;
    int size;
    int gpkg_mode = 0;
    int tiny_point = 0;
    gaiaGeomCollPtr g;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    if (ngeom < 0)
	n_geom = 0;
    else
	n_geom = ngeom;

    pg = geom->FirstPolygon;
    while (pg != NULL)
      {
	  /* separating elementary geometries */
	  icol2 = 0;
	  icol = 1;
	  if (ngeom < 0)
	      n_geom++;
	  g = do_prepare_polygon (pg, geom->Srid);
	  sqlite3_reset (stmt_out);
	  sqlite3_clear_bindings (stmt_out);
	  col = tbl->first;
	  while (col != NULL)
	    {
		if (col->role == GAIA_CUTTER_INPUT_PK)
		  {
		      /* binding Input PK values */
		      var = find_input_pk_value (row, icol2);
		      if (var == NULL)
			  return 0;
		      icol2++;
		      switch (var->type)
			{
			    /* Input Primary Key Column(s) */
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_out, icol,
						var->value.intValue);
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_out, icol,
						 var->value.doubleValue);
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_out, icol,
					       var->value.textValue,
					       strlen (var->value.textValue),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_out, icol);
			    break;
			};
		      icol++;
		  }
		col = col->next;
	    }
	  /* binding n_geom */
	  sqlite3_bind_int (stmt_out, icol, n_geom);
	  icol++;
	  icol2 = 0;
	  col = tbl->first;
	  while (col != NULL)
	    {
		if (col->role == GAIA_CUTTER_BLADE_PK)
		  {
		      /* binding Blade PK values */
		      var = find_blade_pk_value (row, icol2);
		      if (var == NULL)
			  return 0;
		      icol2++;
		      switch (var->type)
			{
			    /* Blade Primary Key Column(s) */
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_out, icol,
						var->value.intValue);
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_out, icol,
						 var->value.doubleValue);
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_out, icol,
					       var->value.textValue,
					       strlen (var->value.textValue),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_out, icol);
			    break;
			};
		      icol++;
		  }
		col = col->next;
	    }
	  /* binding Geometry */
	  gaiaToSpatiaLiteBlobWkbEx2 (g, &blob, &size, gpkg_mode, tiny_point);
	  if (blob == NULL)
	    {
		do_update_message (message,
				   "UNEXPECTED NULL TEMPORARY POLYGON BLOB GEOMETRY");
		gaiaFreeGeomColl (geom);
		return 0;
	    }
	  sqlite3_bind_blob (stmt_out, icol, blob, size, free);
	  gaiaFreeGeomColl (g);
	  ret = sqlite3_step (stmt_out);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		/* some error occurred */
		do_update_sql_error (message, "INSERT INTO TEMPORARY POLYGONS",
				     sqlite3_errmsg (handle));
		return 0;
	    }
	  pg = pg->Next;
      }
    return 1;
}

static int
do_insert_temporary_polygon_intersection (struct output_table *tbl,
					  sqlite3 * handle,
					  sqlite3_stmt * stmt_out,
					  struct temporary_row *row, int n_geom,
					  char **message)
{
/* inserting an Input/Blade intersection into the Polygons Helper Table */
    int ret;
    struct output_column *col;
    struct multivar *var;
    int icol2 = 0;
    int icol = 1;

    sqlite3_reset (stmt_out);
    sqlite3_clear_bindings (stmt_out);
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		/* binding Input PK values */
		var = find_input_pk_value (row, icol2);
		if (var == NULL)
		    return 0;
		icol2++;
		switch (var->type)
		  {
		      /* Input Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_out, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_out, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_out, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_out, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    /* binding n_geom */
    sqlite3_bind_int (stmt_out, icol, n_geom);
    icol++;
    icol2 = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		/* binding Blade PK values */
		var = find_blade_pk_value (row, icol2);
		if (var == NULL)
		    return 0;
		icol2++;
		switch (var->type)
		  {
		      /* Blade Primary Key Column(s) */
		  case SQLITE_INTEGER:
		      sqlite3_bind_int64 (stmt_out, icol, var->value.intValue);
		      break;
		  case SQLITE_FLOAT:
		      sqlite3_bind_double (stmt_out, icol,
					   var->value.doubleValue);
		      break;
		  case SQLITE_TEXT:
		      sqlite3_bind_text (stmt_out, icol,
					 var->value.textValue,
					 strlen (var->value.textValue),
					 SQLITE_STATIC);
		      break;
		  default:
		      sqlite3_bind_null (stmt_out, icol);
		      break;
		  };
		icol++;
	    }
	  col = col->next;
      }
    /* binding NULL geometry */
    sqlite3_bind_null (stmt_out, icol);
    ret = sqlite3_step (stmt_out);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

    /* some error occurred */
    do_update_sql_error (message, "INSERT INTO TEMPORARY POLYGONS",
			 sqlite3_errmsg (handle));
    return 0;
}

static int
do_populate_temp_polygons (struct output_table *tbl, sqlite3 * handle,
			   const void *cache, const char *input_db_prefix,
			   const char *input_table, const char *input_geom,
			   const char *blade_db_prefix, const char *blade_table,
			   const char *blade_geom,
			   const char *spatial_index_prefix,
			   const char *spatial_index, const char *tmp_table,
			   int type, char **message)
{
/* populating the temporary helper table - POLYGONs */
    int ret;
    sqlite3_stmt *stmt_main = NULL;
    sqlite3_stmt *stmt_input = NULL;
    sqlite3_stmt *stmt_blade = NULL;
    sqlite3_stmt *stmt_tmp = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    int cast2d = 0;
    int cast3d = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
      }

    switch (type)
      {
      case GAIA_POLYGONM:
      case GAIA_MULTIPOLYGONM:
	  cast2d = 1;
	  break;
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGONZM:
	  cast3d = 1;
	  break;
      };

/* composing the SQL statement - main SELECT query */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, i.\"%s\"", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		sql = sqlite3_mprintf ("%s, b.\"%s\"", prev, xcolumn);
		free (xcolumn);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql = sqlite3_mprintf ("%s FROM \"%s\".\"%s\" AS i", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS b ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    sql = sqlite3_mprintf ("%sb.ROWID IN (SELECT pkid FROM ", prev);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (spatial_index_prefix);
    xtable = gaiaDoubleQuotedSql (spatial_index);
    sql = sqlite3_mprintf ("%s \"%s\".\"%s\" WHERE", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xcolumn = gaiaDoubleQuotedSql (input_geom);
    sql =
	sqlite3_mprintf
	("%s xmin <= MbrMaxX(i.\"%s\") AND xmax >= MbrMinX(i.\"%s\") ", prev,
	 xcolumn, xcolumn);
    sqlite3_free (prev);
    prev = sql;
    sql =
	sqlite3_mprintf
	("%s AND ymin <= MbrMaxY(i.\"%s\") AND ymax >= MbrMinY(i.\"%s\")))",
	 prev, xcolumn, xcolumn);
    free (xcolumn);
    sqlite3_free (prev);

/* creating a Prepared Statement - main SELECT query */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_main, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "QUERYING POLYGON INTERSECTIONS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - SELECT geometry FROM Input */
    xcolumn = gaiaDoubleQuotedSql (input_geom);
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\" WHERE", xcolumn,
			 xprefix, xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s AND \"%s\" = ?", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT geometry FROM Input */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_input, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT GEOMETRY FROM INPUT",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - SELECT geometry FROM Blade */
    xcolumn = gaiaDoubleQuotedSql (blade_geom);
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\" WHERE", xcolumn,
			 xprefix, xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s AND \"%s\" = ?", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT geometry FROM Blade */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_blade, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT GEOMETRY FROM BLADE",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* creating a Prepared Statement - Inserting into TMP */
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("INSERT INTO TEMP.\"%s\" VALUES (", xtable);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s, ?", prev);
		else
		    sql = sqlite3_mprintf ("%s?", prev);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the n_geom column */
    sql = sqlite3_mprintf ("%s, ?", prev);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the geom columns */
    if (cast2d)
	sql = sqlite3_mprintf ("%s, CastToXY(?))", prev);
    else if (cast3d)
	sql = sqlite3_mprintf ("%s, CastToXYZ(?))", prev);
    else
	sql = sqlite3_mprintf ("%s, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement - INSERT INTO TMP POLYGONS */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_tmp, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO TMP POLYGONS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - checking matching Input/Blade pairs */
	  ret = sqlite3_step (stmt_main);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		gaiaGeomCollPtr input_g = NULL;
		gaiaGeomCollPtr blade_g = NULL;
		gaiaPolygonPtr pg;
		int n_geom = 0;
		unsigned char *input_blob;
		unsigned char *blade_blob;
		int input_blob_sz;
		int blade_blob_sz;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_main, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_main, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_main, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_main, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_main, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_main, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_main, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_main, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }

		/* reading the Input Geometry */
		input_g =
		    do_read_input_geometry (tbl, cache, stmt_input, handle,
					    &row, message, &input_blob,
					    &input_blob_sz);
		if (input_g == NULL)
		    goto error;

		if (is_null_blade (&row))
		  {
		      /* Input doesn't matches any Blade */
		      if (!do_insert_temporary_polygons
			  (tbl, handle, cache, stmt_tmp, &row, input_g,
			   message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    goto error;
			}
		      goto skip;
		  }

		/* reading the Blade Geometry */
		blade_g =
		    do_read_blade_geometry (tbl, cache, stmt_blade, handle,
					    &row, message, &blade_blob,
					    &blade_blob_sz);
		if (blade_g == NULL)
		    goto error;

		if (is_covered_by
		    (cache, input_g, input_blob, input_blob_sz, blade_g,
		     blade_blob, blade_blob_sz))
		  {
		      /* Input is completely Covered By Blade */
		      if (!do_insert_temporary_polygons
			  (tbl, handle, cache, stmt_tmp, &row, input_g,
			   message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    gaiaFreeGeomColl (blade_g);
			    goto error;
			}
		      goto skip;
		  }

		if (is_covered_by
		    (cache, blade_g, blade_blob, blade_blob_sz, input_g,
		     input_blob, input_blob_sz))
		  {
		      /* Blade is completely Covered By Input */
		      gaiaGeomCollPtr g =
			  gaiaGeometryIntersection_r (cache, input_g, blade_g);
		      if (!do_insert_temporary_polygons
			  (tbl, handle, cache, stmt_tmp, &row, g, message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    gaiaFreeGeomColl (blade_g);
			    gaiaFreeGeomColl (g);
			    goto error;
			}
		      gaiaFreeGeomColl (g);
		      goto skip;
		  }

		pg = input_g->FirstPolygon;
		while (pg != NULL)
		  {
		      unsigned char *pg_blob;
		      int pg_blob_sz;
		      gaiaGeomCollPtr pg_geom =
			  do_prepare_polygon (pg, input_g->Srid);
		      gaiaToSpatiaLiteBlobWkbEx2 (pg_geom, &pg_blob,
						  &pg_blob_sz, gpkg_mode,
						  tiny_point);
		      n_geom++;
		      if (gaiaGeomCollPreparedIntersects
			  (cache, pg_geom, pg_blob, pg_blob_sz, blade_g,
			   blade_blob, blade_blob_sz))
			{
			    /* saving an Input/Blade intersection */
			    if (!do_insert_temporary_polygon_intersection
				(tbl, handle, stmt_tmp, &row, n_geom, message))
			      {
				  reset_temporary_row (&row);
				  gaiaFreeGeomColl (input_g);
				  gaiaFreeGeomColl (blade_g);
				  gaiaFreeGeomColl (pg_geom);
				  free (pg_blob);
				  goto error;
			      }
			}
		      free (pg_blob);
		      gaiaFreeGeomColl (pg_geom);
		      pg = pg->Next;
		  }

	      skip:
		reset_temporary_row (&row);
		gaiaFreeGeomColl (input_g);
		gaiaFreeGeomColl (blade_g);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: MAIN POLYGONS LOOP",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_main);
    sqlite3_finalize (stmt_input);
    sqlite3_finalize (stmt_blade);
    sqlite3_finalize (stmt_tmp);
    return 1;

  error:
    if (stmt_main == NULL)
	sqlite3_finalize (stmt_main);
    if (stmt_input == NULL)
	sqlite3_finalize (stmt_input);
    if (stmt_blade == NULL)
	sqlite3_finalize (stmt_blade);
    if (stmt_tmp == NULL)
	sqlite3_finalize (stmt_tmp);
    return 0;
}

static int
do_update_tmp_cut_polygon (sqlite3 * handle, sqlite3_stmt * stmt_upd,
			   sqlite3_int64 pk, const unsigned char *blob,
			   int blob_sz, char **message)
{
/* saving an Input Polygon cut against a renoded Blade */
    int ret;

    sqlite3_reset (stmt_upd);
    sqlite3_clear_bindings (stmt_upd);
/* binding the cut Input geometry */
    sqlite3_bind_blob (stmt_upd, 1, blob, blob_sz, free);
    sqlite3_bind_int64 (stmt_upd, 2, pk);
    /* updating the TMP table */
    ret = sqlite3_step (stmt_upd);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

    /* some error occurred */
    do_update_sql_error (message,
			 "step: UPDATE TMP SET cut-Polygon",
			 sqlite3_errmsg (handle));
    return 0;
}

static int
do_cut_tmp_polygons (sqlite3 * handle, const void *cache,
		     sqlite3_stmt * stmt_in, sqlite3_stmt * stmt_upd,
		     struct temporary_row *row, char **message,
		     const unsigned char *blade_blob, int blade_blob_sz)
{
/* cutting all Input Polygons intersecting the renoded Blade */
    int ret;
    struct multivar *var;
    int icol = 1;
    gaiaGeomCollPtr blade_g;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  gpkg_mode = pcache->gpkg_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    blade_g = gaiaFromSpatiaLiteBlobWkbEx (blade_blob, blade_blob_sz,
					   gpkg_mode, gpkg_amphibious);

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    var = row->first_blade;
    while (var != NULL)
      {
	  /* binding Primary Key values (from Blade) */
	  switch (var->type)
	    {
	    case SQLITE_INTEGER:
		sqlite3_bind_int64 (stmt_in, icol, var->value.intValue);
		break;
	    case SQLITE_FLOAT:
		sqlite3_bind_double (stmt_in, icol, var->value.doubleValue);
		break;
	    case SQLITE_TEXT:
		sqlite3_bind_text (stmt_in, icol,
				   var->value.textValue,
				   strlen (var->value.textValue),
				   SQLITE_STATIC);
		break;
	    default:
		sqlite3_bind_null (stmt_in, icol);
		break;
	    };
	  icol++;
	  var = var->next;
      }

    while (1)
      {
	  /* scrolling the result set rows - cut Polygons */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		sqlite3_int64 pk = 0;
		unsigned char *blob = NULL;
		int blob_sz = 0;
		gaiaGeomCollPtr input_g;
		gaiaGeomCollPtr result;
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER
		    && sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		  {
		      pk = sqlite3_column_int64 (stmt_in, 0);
		      blob = (unsigned char *) sqlite3_column_blob (stmt_in, 1);
		      blob_sz = sqlite3_column_bytes (stmt_in, 1);
		      input_g = gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
							     gpkg_mode,
							     gpkg_amphibious);
		      result =
			  gaiaGeometryIntersection_r (cache, input_g, blade_g);
		      if (result != NULL)
			{
			    gaiaToSpatiaLiteBlobWkbEx2 (result, &blob, &blob_sz,
							gpkg_mode, tiny_point);
			    gaiaFreeGeomColl (result);
			}
		      gaiaFreeGeomColl (input_g);
		  }
		if (blob != NULL)
		  {
		      if (!do_update_tmp_cut_polygon
			  (handle, stmt_upd, pk, blob, blob_sz, message))
			  goto error;
		  }
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: cut Polygons",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }
    gaiaFreeGeomColl (blade_g);
    return 1;

  error:
    gaiaFreeGeomColl (blade_g);
    return 0;
}

static int
do_split_polygons (struct output_table *tbl, sqlite3 * handle,
		   const void *cache, const char *input_db_prefix,
		   const char *input_table, const char *input_geom,
		   const char *blade_db_prefix, const char *blade_table,
		   const char *blade_geom, const char *tmp_table,
		   char **message)
{
/* cutting all Input Polygons intersecting some Blade */
    int ret;
    sqlite3_stmt *stmt_blades = NULL;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_upd = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;

/* composing the SQL statement - SELECT FROM Blades */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, t.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s t.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xcolumn1 = gaiaDoubleQuotedSql (blade_geom);
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql =
	sqlite3_mprintf
	("%s, b.\"%s\" FROM TEMP.\"%s\" AS t", prev, xcolumn1, xtable);
    free (xcolumn1);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS b ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND b.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s b.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("%s) WHERE t.\"%s\" IS NULL GROUP BY", prev, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, t.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s t.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT FROM Blades */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_blades, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM BLADES",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - SELECT Input */
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    xtable = gaiaDoubleQuotedSql (tmp_table);
    xprefix = sqlite3_mprintf ("%s_n_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf
	("SELECT t.ROWID, ST_GeometryN(i.\"%s\", t.\"%s\") FROM TEMP.\"%s\" AS t",
	 xcolumn1, xcolumn2, xtable);
    free (xcolumn1);
    free (xcolumn2);
    free (xtable);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS i ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql = sqlite3_mprintf ("%s) WHERE t.\"%s\" IS NULL", prev, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s AND t.\"%s\" = ?", prev, xcolumn1);
		free (xcolumn1);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT Input */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT INPUT FROM TMP",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - UPDATE tmp SET cut-Geom */
    xtable = gaiaDoubleQuotedSql (tmp_table);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("UPDATE TEMP.\"%s\" SET \"%s\" = ? WHERE ROWID = ?",
			 xtable, xcolumn1);
    free (xcolumn1);
    free (xtable);

/* creating a Prepared Statement - UPDATE tmp SET cut-Geom */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_upd, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "UPDATE TMP cut-Geometries",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - renoded Blades */
	  ret = sqlite3_step (stmt_blades);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_blades, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_blades, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_blades, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_blades, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the Blade */
		if (sqlite3_column_type (stmt_blades, icol) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_blades, icol);
		      int blob_sz = sqlite3_column_bytes (stmt_blades, icol);
		      /* cutting all Input geoms intersecting the Blade */
		      if (!do_cut_tmp_polygons
			  (handle, cache, stmt_in, stmt_upd, &row, message,
			   blob, blob_sz))
			{
			    reset_temporary_row (&row);
			    goto error;
			}
		  }
		else
		  {
		      do_update_message (message, "Unexpected NULL Blade\n");
		      reset_temporary_row (&row);
		      goto error;
		  }

		reset_temporary_row (&row);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: BLADES", sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_blades);
    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_upd);
    return 1;

  error:
    if (stmt_blades != NULL)
	sqlite3_finalize (stmt_blades);
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_upd != NULL)
	sqlite3_finalize (stmt_upd);
    return 0;
}

static gaiaGeomCollPtr
do_compute_diff_polygs (const void *cache, sqlite3_stmt * stmt_diff,
			gaiaPolygonPtr input_pg, int srid,
			gaiaGeomCollPtr union_g)
{
/* computing the difference between two Polygons */
    int ret;
    gaiaGeomCollPtr input_g;
    gaiaGeomCollPtr result = NULL;
    unsigned char *input_blob = NULL;
    int input_blob_sz;
    unsigned char *union_blob = NULL;
    int union_blob_sz;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    sqlite3_reset (stmt_diff);
    sqlite3_clear_bindings (stmt_diff);
    input_g = do_prepare_polygon (input_pg, srid);
    gaiaToSpatiaLiteBlobWkbEx2 (input_g, &input_blob, &input_blob_sz, gpkg_mode,
				tiny_point);
    gaiaFreeGeomColl (input_g);
    gaiaToSpatiaLiteBlobWkbEx2 (union_g, &union_blob, &union_blob_sz, gpkg_mode,
				tiny_point);
    sqlite3_bind_blob (stmt_diff, 1, input_blob, input_blob_sz, SQLITE_STATIC);
    sqlite3_bind_blob (stmt_diff, 2, union_blob, union_blob_sz, SQLITE_STATIC);
    sqlite3_bind_blob (stmt_diff, 3, union_blob, union_blob_sz, SQLITE_STATIC);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_diff);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		if (sqlite3_column_type (stmt_diff, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_diff, 0);
		      int blob_sz = sqlite3_column_bytes (stmt_diff, 0);
		      result =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
	    }
      }

    free (input_blob);
    free (union_blob);
    return result;
}

static int
do_get_uncovered_polygons (struct output_table *tbl, sqlite3 * handle,
			   const void *cache, const char *input_db_prefix,
			   const char *input_table, const char *input_geom,
			   const char *tmp_table, int type, char **message)
{
/* recovering all Input portions not covered by any Blade */
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    sqlite3_stmt *stmt_diff = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    int cast2d = 0;
    int cast3d = 0;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
      }

    switch (type)
      {
      case GAIA_POLYGONM:
      case GAIA_MULTIPOLYGONM:
	  cast2d = 1;
	  break;
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGONZM:
	  cast3d = 1;
	  break;
      };

/* composing the SQL statement - union of all already assigned portions */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, i.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("%s, i.\"%s\", ST_UnaryUnion(ST_Collect(t.\"%s\")) ",
			 prev, xcolumn1, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    xcolumn1 = gaiaDoubleQuotedSql (tmp_table);
    sql =
	sqlite3_mprintf
	("%s FROM \"%s\".\"%s\" AS i LEFT JOIN TEMP.\"%s\" AS t ON (", prev,
	 xprefix, xtable, xcolumn1);
    free (xprefix);
    free (xtable);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s) GROUP BY", prev);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, i.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT FROM TMP */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM TMP Union-Geometries",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the Prepared Statement - Inserting into TMP */
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("INSERT INTO TEMP.\"%s\" VALUES (", xtable);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s, ?", prev);
		else
		    sql = sqlite3_mprintf ("%s?", prev);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the n_geom column */
    sql = sqlite3_mprintf ("%s, ?", prev);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the geom columns */
    if (cast2d)
	sql = sqlite3_mprintf ("%s, CastToXY(?))", prev);
    else if (cast3d)
	sql = sqlite3_mprintf ("%s, CastToXYZ(?))", prev);
    else
	sql = sqlite3_mprintf ("%s, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement - INSERT INTO TMP POLYGONS */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO TMP POLYGONS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the Prepared Statement - polygons difference */
    sql =
	sqlite3_mprintf ("SELECT ST_Difference(ST_Snap(?, ?, 0.000000001), ?)");

/* creating a Prepared Statement - polygons difference */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_diff, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "POLYGONS DIFFERENCE",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - from Temporary Helper */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		gaiaGeomCollPtr input_g = NULL;
		gaiaGeomCollPtr union_g = NULL;
		const unsigned char *blob;
		int blob_sz;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    add_null_pk_value (&row, 'B', icol2);
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the "geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_BLOB)
		  {
		      blob = sqlite3_column_blob (stmt_in, icol);
		      blob_sz = sqlite3_column_bytes (stmt_in, icol);
		      input_g =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
		icol++;
		/* fetching the "union_geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_BLOB)
		  {
		      blob = sqlite3_column_blob (stmt_in, icol);
		      blob_sz = sqlite3_column_bytes (stmt_in, icol);
		      union_g =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
		if (union_g == NULL)
		  {
		      /* fully uncovered Input Geometry */
		      if (!do_insert_temporary_polygons
			  (tbl, handle, cache, stmt_out, &row, input_g,
			   message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    goto error;
			}
		  }
		else
		  {
		      /* partialy uncovered Input Geometry */
		      int n_geom = 0;
		      gaiaPolygonPtr pg = input_g->FirstPolygon;
		      while (pg != NULL)
			{
			    gaiaGeomCollPtr diff_g =
				do_compute_diff_polygs (cache, stmt_diff, pg,
							input_g->Srid,
							union_g);
			    n_geom++;
			    if (diff_g != NULL)
			      {
				  if (!do_insert_temporary_polygons
				      (tbl, handle, cache, stmt_out, &row,
				       diff_g, message, n_geom))
				    {
					reset_temporary_row (&row);
					gaiaFreeGeomColl (input_g);
					gaiaFreeGeomColl (union_g);
					gaiaFreeGeomColl (diff_g);
					goto error;
				    }
				  gaiaFreeGeomColl (diff_g);
			      }
			    pg = pg->Next;
			}
		  }

		reset_temporary_row (&row);
		gaiaFreeGeomColl (input_g);
		gaiaFreeGeomColl (union_g);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT FROM TEMPORARY POLIGONS",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    sqlite3_finalize (stmt_diff);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    if (stmt_diff != NULL)
	sqlite3_finalize (stmt_diff);
    return 0;
}

static int
do_insert_output_polygons (struct output_table *tbl, sqlite3 * handle,
			   const void *cache, const char *out_table,
			   const char *tmp_table, char **message)
{
/* populating the output table */
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;
    struct temporary_row prev_row;
    int prev_ngeom = -1;
    int prog_res = -1;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
      }

    prev_row.first_input = NULL;
    prev_row.last_input = NULL;
    prev_row.first_blade = NULL;
    prev_row.last_blade = NULL;

/* composing the SQL statement - SELECT FROM TMP */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s \"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn1);
		free (xcolumn1);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_n_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql =
	sqlite3_mprintf ("%s, \"%s\", \"%s\" FROM TEMP.\"%s\" ORDER BY", prev,
			 xcolumn1, xcolumn2, xtable);
    free (xtable);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_n_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("%s, \"%s\", MbrMinY(\"%s\") DESC, MbrMinX(\"%s\")",
			 prev, xcolumn1, xcolumn2, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;

/* creating a Prepared Statement - SELECT FROM TMP */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM TMP cut-Geometries",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - INSERT INTO Output */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" VALUES(NULL", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s, ?", prev);
		free (xcolumn1);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s, ?, ?, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement - INSERT INTO OUTPUT */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO OUTPUT POLYGONS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - from Temporary Helper */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		int n_geom = 0;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the "n_geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_INTEGER)
		    n_geom = sqlite3_column_int (stmt_in, icol);
		icol++;
		if (check_same_input (&prev_row, &row) && n_geom == prev_ngeom)
		    ;
		else
		    prog_res = 1;
		prev_ngeom = n_geom;
		copy_input_values (&row, &prev_row);
		/* fetching the "geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_BLOB)
		  {
		      gaiaGeomCollPtr geom;
		      gaiaPolygonPtr pg;
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_in, icol);
		      int blob_sz = sqlite3_column_bytes (stmt_in, icol);
		      geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);

		      pg = geom->FirstPolygon;
		      while (pg)
			{
			    do_insert_output_row
				(tbl, cache, stmt_out, handle, &row, n_geom,
				 prog_res++, GAIA_CUTTER_POLYGON, pg,
				 geom->Srid, message);
			    pg = pg->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
		reset_temporary_row (&row);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT FROM TEMPORARY POLYGONS",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    reset_temporary_row (&prev_row);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    reset_temporary_row (&prev_row);
    return 0;
}

static gaiaGeomCollPtr
do_compute_diff_lines (const void *cache, sqlite3_stmt * stmt_diff,
		       gaiaLinestringPtr input_ln, int srid,
		       gaiaGeomCollPtr union_g)
{
/* computing the difference between two Linestrings */
    int ret;
    gaiaGeomCollPtr input_g;
    gaiaGeomCollPtr result = NULL;
    unsigned char *input_blob = NULL;
    int input_blob_sz;
    unsigned char *union_blob = NULL;
    int union_blob_sz;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;
    int tiny_point = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
	  tiny_point = pcache->tinyPointEnabled;
      }

    sqlite3_reset (stmt_diff);
    sqlite3_clear_bindings (stmt_diff);
    input_g = do_prepare_linestring (input_ln, srid);
    gaiaToSpatiaLiteBlobWkbEx2 (input_g, &input_blob, &input_blob_sz, gpkg_mode,
				tiny_point);
    gaiaFreeGeomColl (input_g);
    gaiaToSpatiaLiteBlobWkbEx2 (union_g, &union_blob, &union_blob_sz, gpkg_mode,
				tiny_point);
    sqlite3_bind_blob (stmt_diff, 1, input_blob, input_blob_sz, SQLITE_STATIC);
    sqlite3_bind_blob (stmt_diff, 2, union_blob, union_blob_sz, SQLITE_STATIC);
    sqlite3_bind_blob (stmt_diff, 3, union_blob, union_blob_sz, SQLITE_STATIC);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_diff);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		if (sqlite3_column_type (stmt_diff, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_diff, 0);
		      int blob_sz = sqlite3_column_bytes (stmt_diff, 0);
		      result =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
	    }
      }

    free (input_blob);
    free (union_blob);
    return result;
}

static int
do_get_uncovered_linestrings (struct output_table *tbl, sqlite3 * handle,
			      const void *cache, const char *input_db_prefix,
			      const char *input_table, const char *input_geom,
			      const char *tmp_table, int type, char **message)
{
/* recovering all Input portions not covered by any Blade */
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    sqlite3_stmt *stmt_diff = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    int cast2d = 0;
    int cast3d = 0;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
      }

    switch (type)
      {
      case GAIA_LINESTRINGM:
      case GAIA_MULTILINESTRINGM:
	  cast2d = 1;
	  break;
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRINGZM:
	  cast3d = 1;
	  break;
      };

/* composing the SQL statement - union of all already assigned portions */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, i.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xcolumn1 = gaiaDoubleQuotedSql (input_geom);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("%s, i.\"%s\", ST_UnaryUnion(ST_Collect(t.\"%s\")) ",
			 prev, xcolumn1, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    xcolumn1 = gaiaDoubleQuotedSql (tmp_table);
    sql =
	sqlite3_mprintf
	("%s FROM \"%s\".\"%s\" AS i LEFT JOIN TEMP.\"%s\" AS t ON (", prev,
	 xprefix, xtable, xcolumn1);
    free (xprefix);
    free (xtable);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s i.\"%s\" = t.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s) GROUP BY", prev);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, i.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }

/* creating a Prepared Statement - SELECT FROM TMP */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM TMP Union-Geometries",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the Prepared Statement - Inserting into TMP */
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("INSERT INTO TEMP.\"%s\" VALUES (", xtable);
    free (xtable);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s, ?", prev);
		else
		    sql = sqlite3_mprintf ("%s?", prev);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the n_geom column */
    sql = sqlite3_mprintf ("%s, ?", prev);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
/* adding the geom columns */
    if (cast2d)
	sql = sqlite3_mprintf ("%s, ?, CastToXY(?))", prev);
    else if (cast3d)
	sql = sqlite3_mprintf ("%s, ?, CastToXYZ(?))", prev);
    else
	sql = sqlite3_mprintf ("%s, ?, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement - INSERT INTO TMP LINESTRINGS */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO TMP LINESTRINGS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the Prepared Statement - linestrings difference */
    sql =
	sqlite3_mprintf ("SELECT ST_Difference(ST_Snap(?, ?, 0.000000001), ?)");

/* creating a Prepared Statement - linestrings difference */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_diff, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "LINESTRINGS DIFFERENCE",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - from Temporary Helper */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		gaiaGeomCollPtr input_g = NULL;
		gaiaGeomCollPtr union_g = NULL;
		const unsigned char *blob;
		int blob_sz;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    add_null_pk_value (&row, 'B', icol2);
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the "geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_BLOB)
		  {
		      blob = sqlite3_column_blob (stmt_in, icol);
		      blob_sz = sqlite3_column_bytes (stmt_in, icol);
		      input_g =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
		icol++;
		/* fetching the "union_geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_BLOB)
		  {
		      blob = sqlite3_column_blob (stmt_in, icol);
		      blob_sz = sqlite3_column_bytes (stmt_in, icol);
		      union_g =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);
		  }
		if (union_g == NULL)
		  {
		      /* fully uncovered Input Geometry */
		      if (!do_insert_temporary_linestrings
			  (tbl, handle, cache, stmt_out, &row, input_g,
			   message, -1))
			{
			    reset_temporary_row (&row);
			    gaiaFreeGeomColl (input_g);
			    goto error;
			}
		  }
		else
		  {
		      /* partialy uncovered Input Geometry */
		      int n_geom = 0;
		      gaiaLinestringPtr ln = input_g->FirstLinestring;
		      while (ln != NULL)
			{
			    gaiaGeomCollPtr diff_g =
				do_compute_diff_lines (cache, stmt_diff, ln,
						       input_g->Srid,
						       union_g);
			    n_geom++;
			    if (diff_g != NULL)
			      {
				  if (!do_insert_temporary_linestrings
				      (tbl, handle, cache, stmt_out, &row,
				       diff_g, message, n_geom))
				    {
					reset_temporary_row (&row);
					gaiaFreeGeomColl (input_g);
					gaiaFreeGeomColl (union_g);
					gaiaFreeGeomColl (diff_g);
					goto error;
				    }
				  gaiaFreeGeomColl (diff_g);
			      }
			    ln = ln->Next;
			}
		  }

		reset_temporary_row (&row);
		gaiaFreeGeomColl (input_g);
		gaiaFreeGeomColl (union_g);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT FROM TEMPORARY LINESTRINGS",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    sqlite3_finalize (stmt_diff);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    if (stmt_diff != NULL)
	sqlite3_finalize (stmt_diff);
    return 0;
}

static int
do_insert_output_linestrings (struct output_table *tbl, sqlite3 * handle,
			      const void *cache, const char *input_db_prefix,
			      const char *input_table, const char *input_geom,
			      const char *out_table, const char *tmp_table,
			      char **message)
{
/* populating the output table */
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    int gpkg_mode = 0;
    int gpkg_amphibious = 0;
    struct temporary_row prev_row;
    int prev_ngeom = -1;
    int prog_res = -1;

    if (cache != NULL)
      {
	  struct splite_internal_cache *pcache =
	      (struct splite_internal_cache *) cache;
	  gpkg_mode = pcache->gpkg_mode;
	  gpkg_amphibious = pcache->gpkg_amphibious_mode;
      }

    prev_row.first_input = NULL;
    prev_row.last_input = NULL;
    prev_row.first_blade = NULL;
    prev_row.last_blade = NULL;

/* composing the SQL statement - SELECT FROM TMP */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, t.\"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s t.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s, t.\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_n_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql =
	sqlite3_mprintf ("%s, t.\"%s\", t.\"%s\" FROM TEMP.\"%s\" AS t", prev,
			 xcolumn1, xcolumn2, xtable);
    free (xtable);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (input_db_prefix);
    xtable = gaiaDoubleQuotedSql (input_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS i ON(", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->base_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND t.\"%s\" = i.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s t.\"%s\" = i.\"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s) ORDER BY", prev);
    sqlite3_free (prev);
    prev = sql;
    comma = 0;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn1);
		else
		    sql = sqlite3_mprintf ("%s\"%s\"", prev, xcolumn1);
		free (xcolumn1);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xprefix = sqlite3_mprintf ("%s_n_geom", tmp_table);
    xcolumn1 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xprefix = sqlite3_mprintf ("%s_geom", tmp_table);
    xcolumn2 = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    xprefix = gaiaDoubleQuotedSql (input_geom);
    sql =
	sqlite3_mprintf
	("%s, \"%s\", ST_Line_Locate_Point(i.\"%s\", ST_StartPoint(ST_GeometryN(t.\"%s\", t.\"%s\")))",
	 prev, xcolumn1, xprefix, xcolumn2, xcolumn1);
    free (xcolumn1);
    free (xcolumn2);
    free (xprefix);
    sqlite3_free (prev);
    prev = sql;

/* creating a Prepared Statement - SELECT FROM TMP */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM TMP cut-Geometries",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* composing the SQL statement - INSERT INTO Output */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" VALUES(NULL", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		sql = sqlite3_mprintf ("%s, ?", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->real_name);
		sql = sqlite3_mprintf ("%s, ?", prev);
		free (xcolumn1);
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s, ?, ?, ?)", prev);
    sqlite3_free (prev);

/* creating a Prepared Statement - INSERT INTO OUTPUT */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "INSERT INTO OUTPUT LINESTRINGS",
			       sqlite3_errmsg (handle));
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - from Temporary Helper */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		int n_geom = 0;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the "n_geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_INTEGER)
		    n_geom = sqlite3_column_int (stmt_in, icol);
		icol++;
		if (check_same_input (&prev_row, &row) && n_geom == prev_ngeom)
		    ;
		else
		    prog_res = 1;
		prev_ngeom = n_geom;
		copy_input_values (&row, &prev_row);
		/* fetching the "geom" column value */
		if (sqlite3_column_type (stmt_in, icol) == SQLITE_BLOB)
		  {
		      gaiaGeomCollPtr geom;
		      gaiaLinestringPtr ln;
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_in, icol);
		      int blob_sz = sqlite3_column_bytes (stmt_in, icol);
		      geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz,
						       gpkg_mode,
						       gpkg_amphibious);

		      ln = geom->FirstLinestring;
		      while (ln)
			{
			    do_insert_output_row
				(tbl, cache, stmt_out, handle, &row, n_geom,
				 prog_res++, GAIA_CUTTER_LINESTRING, ln,
				 geom->Srid, message);
			    ln = ln->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
		reset_temporary_row (&row);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT FROM TEMPORARY LINESTRINGS",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    reset_temporary_row (&prev_row);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    reset_temporary_row (&prev_row);
    return 0;
}

static int
do_insert_output_points (struct output_table *tbl, sqlite3 * handle,
			 const void *cache, const char *input_db_prefix,
			 const char *input_table, const char *input_geom,
			 const char *out_table, const char *tmp_table,
			 char **message)
{
/* populating the Output table - POINTs */
    sqlite3_stmt *stmt_tmp = NULL;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;
    char *xtable;
    char *xcolumn;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;

/* composing the SQL statement - SELECT FROM Tempory Helper */
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Input Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_INPUT_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\"", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s \"%s\"", prev, xcolumn);
		free (xcolumn);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xtable = gaiaDoubleQuotedSql (tmp_table);
    sql = sqlite3_mprintf ("%s, touches FROM TEMP.\"%s\"", prev, xtable);
    free (xtable);
    sqlite3_free (prev);

/* creating a Prepared Statement - SELECT FROM Temporary Table */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_tmp, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "SELECT FROM TMP POINTs",
			       sqlite3_errmsg (handle));
	  goto error;
      }

/* creating a Prepared Statement - SELECT Geometry FROM Input */
    if (!do_create_input_statement
	(tbl, handle, input_db_prefix, input_table, input_geom, &stmt_in,
	 message))
	goto error;

/* creating a Prepared Statement - INSERT INTO Output */
    if (!do_create_output_statement
	(tbl, handle, out_table, &stmt_out, message))
	goto error;

    while (1)
      {
	  /* scrolling the result set rows - from Temporary Helper */
	  ret = sqlite3_step (stmt_tmp);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* fetched one row from the resultset */
		struct temporary_row row;
		int icol = 0;
		int icol2 = 0;
		int n_geom = 0;
		int ok_touches = -1;
		gaiaGeomCollPtr geom = NULL;
		gaiaPointPtr pt;
		unsigned char *input_blob;
		int input_blob_sz;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Input Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_INPUT_PK)
			{
			    switch (sqlite3_column_type (stmt_tmp, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'I', icol2,
						    sqlite3_column_int64
						    (stmt_tmp, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'I', icol2,
						       sqlite3_column_double
						       (stmt_tmp, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'I', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_tmp, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'I', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_tmp, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_tmp, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_tmp, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_tmp, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }
		/* fetching the "Touches" column value */
		if (sqlite3_column_type (stmt_tmp, icol) == SQLITE_INTEGER)
		    ok_touches = sqlite3_column_int (stmt_tmp, icol);
		if (ok_touches == 1)
		    do_set_null_blade_columns (&row);

		/* reading the Input Geometry */
		geom =
		    do_read_input_geometry (tbl, cache, stmt_in, handle, &row,
					    message, &input_blob,
					    &input_blob_sz);
		if (geom == NULL)
		    goto error;

		n_geom = 0;
		pt = geom->FirstPoint;
		while (pt != NULL)
		  {
		      /* inserting the Output row(s) */
		      n_geom++;
		      if (!do_insert_output_row
			  (tbl, cache, stmt_out, handle, &row, n_geom, 1,
			   GAIA_CUTTER_POINT, pt, geom->Srid, message))
			  goto error;
		      pt = pt->Next;
		  }
		gaiaFreeGeomColl (geom);
		reset_temporary_row (&row);
	    }
	  else
	    {
		do_update_sql_error (message,
				     "step: SELECT FROM TEMPORARY POINTS",
				     sqlite3_errmsg (handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_tmp);
    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  error:
    if (stmt_tmp != NULL)
	sqlite3_finalize (stmt_tmp);
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static void
do_finish_output (struct output_table *tbl, sqlite3 * handle,
		  const char *out_table, const char *geometry,
		  const char *blade_db_prefix, const char *blade_table,
		  const char *blade_geom, const char *spatial_index_prefix,
		  const char *spatial_index)
{
/* assigning the BLADE to all uncut elements */
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    char *xprefix;
    char *xtable;
    char *xcolumn1;
    char *xcolumn2;
    char *sql;
    char *prev;
    struct output_column *col;
    int comma = 0;
    char *errMsg = NULL;

/* creating the "tmpcutternull" Temporary Table */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("CREATE TEMPORARY TABLE TEMP.tmpcutternull AS "
			   "SELECT rowid AS in_rowid FROM MAIN.\"%s\" WHERE ",
			   xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s AND \"%s\" IS NULL", prev,
					 xcolumn2);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" IS NULL", prev, xcolumn2);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  goto error;
      }

/* preparing the INPUT statement */
    comma = 0;
    sql = sqlite3_mprintf ("SELECT");
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* adding the output PK column  */
	  if (col->role == GAIA_CUTTER_OUTPUT_PK)
	    {
		/* output table primary column */
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		sql = sqlite3_mprintf ("%s i.\"%s\"", prev, xcolumn1);
		sqlite3_free (prev);
		free (xcolumn1);
		prev = sql;
		comma = 1;
	    }
	  col = col->next;
      }
    col = tbl->first;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, b.\"%s\" AS \"%s\"", prev,
					 xcolumn1, xcolumn2);
		else
		    sql =
			sqlite3_mprintf ("%s b.\"%s\" AS \"%s\"", prev,
					 xcolumn1, xcolumn2);
		free (xcolumn1);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("%s FROM MAIN.\"%s\" AS i", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (blade_db_prefix);
    xtable = gaiaDoubleQuotedSql (blade_table);
    sql =
	sqlite3_mprintf ("%s JOIN \"%s\".\"%s\" AS b ON (", prev, xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xcolumn1 = gaiaDoubleQuotedSql (geometry);
    xcolumn2 = gaiaDoubleQuotedSql (blade_geom);
    sql =
	sqlite3_mprintf ("%sST_CoveredBy(i.\"%s\", b.\"%s\") = 1 ", prev,
			 xcolumn1, xcolumn2);
    free (xcolumn1);
    free (xcolumn2);
    sqlite3_free (prev);
    prev = sql;
    sql = sqlite3_mprintf ("%s AND b.ROWID IN (SELECT pkid FROM ", prev);
    sqlite3_free (prev);
    prev = sql;
    xprefix = gaiaDoubleQuotedSql (spatial_index_prefix);
    xtable = gaiaDoubleQuotedSql (spatial_index);
    sql = sqlite3_mprintf ("%s \"%s\".\"%s\" WHERE", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = sql;
    xcolumn1 = gaiaDoubleQuotedSql (geometry);
    sql =
	sqlite3_mprintf
	("%s xmin <= MbrMaxX(i.\"%s\") AND xmax >= MbrMinX(i.\"%s\") ", prev,
	 xcolumn1, xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    sql =
	sqlite3_mprintf
	("%s AND ymin <= MbrMaxY(i.\"%s\") AND ymax >= MbrMinY(i.\"%s\")))",
	 prev, xcolumn1, xcolumn1);
    free (xcolumn1);
    sqlite3_free (prev);
    prev = sql;
    sql =
	sqlite3_mprintf
	("%s WHERE i.rowid IN (SELECT in_rowid FROM TEMP.tmpcutternull)", prev);
    sqlite3_free (prev);

/* creating the OUTPUT prepared statement */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;

/* preparing the OUTPUT statement */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET", xtable);
    free (xtable);
    prev = sql;
    col = tbl->first;
    comma = 0;
    while (col != NULL)
      {
	  /* Blade Primary Key Column(s) */
	  if (col->role == GAIA_CUTTER_BLADE_PK)
	    {
		xcolumn2 = gaiaDoubleQuotedSql (col->real_name);
		if (comma)
		    sql = sqlite3_mprintf ("%s, \"%s\" = ?", prev, xcolumn2);
		else
		    sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn2);
		free (xcolumn2);
		comma = 1;
		sqlite3_free (prev);
		prev = sql;
	    }
	  col = col->next;
      }
    sql = sqlite3_mprintf ("%s WHERE ", prev);
    sqlite3_free (prev);
    prev = sql;
    col = tbl->first;
    while (col != NULL)
      {
	  /* adding the output PK column  */
	  if (col->role == GAIA_CUTTER_OUTPUT_PK)
	    {
		/* output table primary column */
		xcolumn1 = gaiaDoubleQuotedSql (col->base_name);
		sql = sqlite3_mprintf ("%s \"%s\" = ?", prev, xcolumn1);
		sqlite3_free (prev);
		free (xcolumn1);
		prev = sql;
		comma = 1;
	    }
	  col = col->next;
      }

/* creating the OUTPUT prepared statement */
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		struct temporary_row row;
		struct multivar *var;
		int icol = 1;
		int icol2 = 0;
		sqlite3_int64 pk;

		row.first_input = NULL;
		row.last_input = NULL;
		row.first_blade = NULL;
		row.last_blade = NULL;

		pk = sqlite3_column_int64 (stmt_in, 0);
		icol2 = 0;
		col = tbl->first;
		while (col != NULL)
		  {
		      /* Blade Primary Key Column(s) */
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    switch (sqlite3_column_type (stmt_in, icol))
			      {
			      case SQLITE_INTEGER:
				  add_int_pk_value (&row, 'B', icol2,
						    sqlite3_column_int64
						    (stmt_in, icol));
				  break;
			      case SQLITE_FLOAT:
				  add_double_pk_value (&row, 'B', icol2,
						       sqlite3_column_double
						       (stmt_in, icol));
				  break;
			      case SQLITE_TEXT:
				  add_text_pk_value (&row, 'B', icol2,
						     (const char *)
						     sqlite3_column_text
						     (stmt_in, icol));
				  break;
			      default:
				  add_null_pk_value (&row, 'B', icol2);
			      };
			    icol++;
			    icol2++;
			}
		      col = col->next;
		  }

		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		col = tbl->first;
		icol = 1;
		icol2 = 0;
		while (col != NULL)
		  {
		      if (col->role == GAIA_CUTTER_BLADE_PK)
			{
			    var = find_blade_pk_value (&row, icol2);
			    if (var == NULL)
				return;
			    icol2++;
			    switch (var->type)
			      {
				  /* Blade Primary Key Column(s) */
			      case SQLITE_INTEGER:
				  sqlite3_bind_int64 (stmt_out, icol,
						      var->value.intValue);
				  break;
			      case SQLITE_FLOAT:
				  sqlite3_bind_double (stmt_out, icol,
						       var->value.doubleValue);
				  break;
			      case SQLITE_TEXT:
				  sqlite3_bind_text (stmt_out, icol,
						     var->value.textValue,
						     strlen (var->
							     value.textValue),
						     SQLITE_STATIC);
				  break;
			      default:
				  sqlite3_bind_null (stmt_out, icol);
				  break;
			      };
			    icol++;
			}
		      col = col->next;
		  }
		sqlite3_bind_int64 (stmt_out, icol, pk);
		ret = sqlite3_step (stmt_out);
		reset_temporary_row (&row);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		    goto error;
	    }
	  else
	      goto error;
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);

/* dropping the "tmpcutternull" Temporary Table */
    sql = "DROP TABLE TEMP.tmpcutternull";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
	sqlite3_free (errMsg);
    return;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
}

static int
do_cut_points (struct output_table *tbl, sqlite3 * handle, const void *cache,
	       const char *input_db_prefix, const char *input_table,
	       const char *input_geom, const char *blade_db_prefix,
	       const char *blade_table, const char *blade_geom,
	       const char *spatial_index_prefix, const char *spatial_index,
	       const char *out_table, char **tmp_table, int *drop_tmp_table,
	       char **message)
{
/* cutting Input POINTs */
    if (!do_prepare_temp_points
	(tbl, handle, input_db_prefix, input_table, input_geom, blade_db_prefix,
	 blade_table, blade_geom, spatial_index_prefix, spatial_index,
	 tmp_table, message))
	return 0;
    if (!do_insert_output_points
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 out_table, *tmp_table, message))
	return 0;
    do_finish_output (tbl, handle, out_table, input_geom, blade_db_prefix,
		      blade_table, blade_geom, spatial_index_prefix,
		      spatial_index);

    *drop_tmp_table = 1;
    return 1;
}

static int
do_cut_linestrings (struct output_table *tbl, sqlite3 * handle,
		    const void *cache, const char *input_db_prefix,
		    const char *input_table, const char *input_geom,
		    const char *blade_db_prefix, const char *blade_table,
		    const char *blade_geom, const char *spatial_index_prefix,
		    const char *spatial_index, const char *out_table,
		    char **tmp_table, int *drop_tmp_table, int type,
		    char **message)
{
/* cutting Input LINESTRINGs */
    if (!do_create_temp_linestrings (tbl, handle, tmp_table, message))
	return 0;
    if (!do_populate_temp_linestrings
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 blade_db_prefix, blade_table, blade_geom, spatial_index_prefix,
	 spatial_index, *tmp_table, type, message))
	return 0;
    if (!do_split_linestrings
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 blade_db_prefix, blade_table, blade_geom, *tmp_table, message))
	return 0;
    if (!do_get_uncovered_linestrings
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 *tmp_table, type, message))
	return 0;
    if (!do_insert_output_linestrings
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 out_table, *tmp_table, message))
	return 0;
    do_finish_output (tbl, handle, out_table, input_geom, blade_db_prefix,
		      blade_table, blade_geom, spatial_index_prefix,
		      spatial_index);

    *drop_tmp_table = 1;
    return 1;
}

static int
do_cut_polygons (struct output_table *tbl, sqlite3 * handle, const void *cache,
		 const char *input_db_prefix, const char *input_table,
		 const char *input_geom, const char *blade_db_prefix,
		 const char *blade_table, const char *blade_geom,
		 const char *spatial_index_prefix, const char *spatial_index,
		 const char *out_table, char **tmp_table, int *drop_tmp_table,
		 int type, char **message)
{
/* cutting Input POLYGONs */
    if (!do_create_temp_polygons (tbl, handle, tmp_table, message))
	return 0;
    if (!do_populate_temp_polygons
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 blade_db_prefix, blade_table, blade_geom, spatial_index_prefix,
	 spatial_index, *tmp_table, type, message))
	return 0;
    if (!do_split_polygons
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 blade_db_prefix, blade_table, blade_geom, *tmp_table, message))
	return 0;
    if (!do_get_uncovered_polygons
	(tbl, handle, cache, input_db_prefix, input_table, input_geom,
	 *tmp_table, type, message))
	return 0;
    if (!do_insert_output_polygons
	(tbl, handle, cache, out_table, *tmp_table, message))
	return 0;
    do_finish_output (tbl, handle, out_table, input_geom, blade_db_prefix,
		      blade_table, blade_geom, spatial_index_prefix,
		      spatial_index);

    *drop_tmp_table = 1;
    return 1;
}

SPATIALITE_DECLARE int
gaiaCutter (sqlite3 * handle, const void *cache, const char *xin_db_prefix,
	    const char *input_table, const char *xinput_geom,
	    const char *xblade_db_prefix, const char *blade_table,
	    const char *xblade_geom, const char *out_table, int transaction,
	    int ram_tmp_store, char **message)
{
/* main Cutter tool implementation */
    const char *in_db_prefix = "MAIN";
    const char *blade_db_prefix = "MAIN";
    char *input_geom = NULL;
    char *blade_geom = NULL;
    char *spatial_index_prefix = NULL;
    char *spatial_index = NULL;
    char *tmp_table = NULL;
    int input_type;
    int input_srid;
    int blade_srid;
    int retcode = 0;
    int ret;
    char *errMsg = NULL;
    int pending = 0;
    int drop_spatial_index = 0;
    int drop_tmp_table = 0;
    struct output_table *tbl = NULL;
    const char *sql;
    int pt_type = 0;
    int ln_type = 0;
    int pg_type = 0;

/* testing and validating the arguments */
    do_reset_message (message);
    if (xin_db_prefix != NULL)
	in_db_prefix = xin_db_prefix;
    if (xblade_db_prefix != NULL)
	blade_db_prefix = xblade_db_prefix;
    if (input_table == NULL)
      {
	  do_update_message (message, "ERROR: input table name can't be NULL");
	  goto end;
      }
    if (blade_table == NULL)
      {
	  do_update_message (message, "ERROR: blade table name can't be NULL");
	  goto end;
      }
    if (out_table == NULL)
      {
	  do_update_message (message, "ERROR: output table name can't be NULL");
	  goto end;
      }
    if (!do_check_input
	(handle, in_db_prefix, input_table, xinput_geom, &input_geom,
	 &input_srid, &input_type, message))
	goto end;
    if (!do_check_blade
	(handle, blade_db_prefix, blade_table, xblade_geom, &blade_geom,
	 &blade_srid, message))
	goto end;
    if (!do_check_output (handle, "MAIN", out_table, input_geom, message))
	goto end;
    if (input_srid != blade_srid)
      {
	  do_update_message (message,
			     "ERROR: both input and blade tables must share the same SRID");
	  goto end;
      }
    if (!do_check_nulls
	(handle, in_db_prefix, input_table, input_geom, "INPUT", message))
	goto end;
    if (!do_check_nulls
	(handle, blade_db_prefix, blade_table, blade_geom, "BLADE", message))
	goto end;

/* determining the Output Table layout */
    tbl = alloc_output_table ();
    if (tbl == NULL)
      {
	  do_update_message (message,
			     "ERROR: insufficient memory (OutputTable wrapper)");
	  goto end;
      }
    if (add_column_to_output_table
	(tbl, "PK_UID", "INTEGER", 0, GAIA_CUTTER_OUTPUT_PK, 0) == NULL)
      {
	  do_update_message (message,
			     "ERROR: insufficient memory (OutputTable wrapper)");
	  goto end;
      }
    if (!do_get_input_pk (tbl, handle, in_db_prefix, input_table, message))
	goto end;
    if (!do_get_blade_pk (tbl, handle, blade_db_prefix, blade_table, message))
	goto end;
    if (add_column_to_output_table
	(tbl, "n_geom", "INTEGER", 1, GAIA_CUTTER_NORMAL, 0) == NULL)
      {
	  do_update_message (message,
			     "ERROR: insufficient memory (OutputTable wrapper)");
	  goto end;
      }
    if (add_column_to_output_table
	(tbl, "res_prog", "INTEGER", 1, GAIA_CUTTER_NORMAL, 0) == NULL)
      {
	  do_update_message (message,
			     "ERROR: insufficient memory (OutputTable wrapper)");
	  goto end;
      }

/* setting the Temp Store */
    if (ram_tmp_store)
	sql = "PRAGMA temp_store=2";
    else
	sql = "PRAGMA temp_store=1";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA temp_store", errMsg);
	  sqlite3_free (errMsg);
	  goto end;
      }

    if (transaction)
      {
	  /* starting a Transaction */
	  ret = sqlite3_exec (handle, "BEGIN", NULL, NULL, &errMsg);
	  if (ret != SQLITE_OK)
	    {
		do_update_sql_error (message, "BEGIN", errMsg);
		sqlite3_free (errMsg);
		goto end;
	    }
	  pending = 1;
      }

/* creating the Output Table */
    if (!do_create_output_table
	(tbl, handle, out_table, input_table, blade_table, message))
	goto end;
/* adding the Output Geometry */
    if (!do_create_output_geometry
	(handle, out_table, input_geom, input_srid, input_type, message))
	goto end;
/* verifying the Blade Spatial Index */
    if (!do_verify_blade_spatial_index
	(handle, blade_db_prefix, blade_table, blade_geom,
	 &spatial_index_prefix, &spatial_index, &drop_spatial_index, message))
	goto end;

    switch (input_type)
      {
      case GAIA_POINT:
      case GAIA_POINTZ:
      case GAIA_POINTM:
      case GAIA_POINTZM:
      case GAIA_MULTIPOINT:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTIPOINTZM:
	  pt_type = 1;
	  break;
      case GAIA_LINESTRING:
      case GAIA_LINESTRINGZ:
      case GAIA_LINESTRINGM:
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTILINESTRINGZM:
	  ln_type = 1;
	  break;
      case GAIA_POLYGON:
      case GAIA_POLYGONZ:
      case GAIA_POLYGONM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGON:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_MULTIPOLYGONM:
      case GAIA_MULTIPOLYGONZM:
	  pg_type = 1;
	  break;
      };

    if (pt_type)
      {
	  /* processing Input of (multi)POINT type */
	  if (!do_cut_points
	      (tbl, handle, cache, in_db_prefix, input_table, input_geom,
	       blade_db_prefix, blade_table, blade_geom, spatial_index_prefix,
	       spatial_index, out_table, &tmp_table, &drop_tmp_table, message))
	      goto end;
      }
    if (ln_type)
      {
	  /* processing Input of (multi)LINESTRING type */
	  if (!do_cut_linestrings
	      (tbl, handle, cache, in_db_prefix, input_table, input_geom,
	       blade_db_prefix, blade_table, blade_geom, spatial_index_prefix,
	       spatial_index, out_table, &tmp_table, &drop_tmp_table,
	       input_type, message))
	      goto end;
      }
    if (pg_type)
      {
	  /* processing Input of (multi)POLYGON type */
	  if (!do_cut_polygons
	      (tbl, handle, cache, in_db_prefix, input_table, input_geom,
	       blade_db_prefix, blade_table, blade_geom, spatial_index_prefix,
	       spatial_index, out_table, &tmp_table, &drop_tmp_table,
	       input_type, message))
	      goto end;
      }

    if (drop_tmp_table)
      {
	  /* dropping the Temporary Table */
	  drop_tmp_table = 0;
	  if (!do_drop_tmp_table (handle, tmp_table, message))
	      goto end;
      }

    if (transaction)
      {
	  /* committing the Transaction */
	  ret = sqlite3_exec (handle, "COMMIT", NULL, NULL, &errMsg);
	  if (ret != SQLITE_OK)
	    {
		do_update_sql_error (message, "COMMIT", errMsg);
		sqlite3_free (errMsg);
		goto end;
	    }
	  pending = 0;
      }
    retcode = 1;

/* testing for invalid Output Geoms */
    if (!do_check_valid (handle, out_table, input_geom, message))
	retcode = 2;

  end:
    if (drop_spatial_index)
      {
	  /* dropping the transient Blade Spatial Index */
	  do_drop_blade_spatial_index (handle, spatial_index, message);
      }
    if (drop_tmp_table)
      {
	  /* dropping the Temporary Table */
	  do_drop_tmp_table (handle, tmp_table, message);
      }

/* resetting the Temp Store */
    sql = "PRAGMA temp_store=0";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  do_update_sql_error (message, "PRAGMA temp_store", errMsg);
	  sqlite3_free (errMsg);
      }

    if (input_geom != NULL)
	free (input_geom);
    if (blade_geom != NULL)
	free (blade_geom);
    if (spatial_index_prefix != NULL)
	free (spatial_index_prefix);
    if (spatial_index != NULL)
	sqlite3_free (spatial_index);
    if (tmp_table != NULL)
	sqlite3_free (tmp_table);
    if (tbl != NULL)
	destroy_output_table (tbl);
    if (transaction && pending)
      {
	  /* rolling back the Transaction */
	  ret = sqlite3_exec (handle, "ROLLBACK", NULL, NULL, &errMsg);
	  if (ret != SQLITE_OK)
	    {
		do_update_sql_error (message, "ROLLBACK", errMsg);
		sqlite3_free (errMsg);
	    }
      }
    return retcode;
}

#endif /* end GEOS conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/dxf/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

noinst_HEADERS = dxf_private.h
noinst_LTLIBRARIES = libdxf.la dxf.la

DXF_COMMON_SOURCES = dxf_parser.c dxf_loader.c \
	dxf_load_distinct.c dxf_load_mixed.c \
	dxf_writer.c

libdxf_la_SOURCES = $(DXF_COMMON_SOURCES)

dxf_la_SOURCES = $(DXF_COMMON_SOURCES)

dxf_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
dxf_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
dxf_la_CPPFLAGS += -DLOADABLE_EXTENSION
dxf_la_LDFLAGS = -module
dxf_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|













|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

noinst_HEADERS = dxf_private.h
noinst_LTLIBRARIES = libdxf.la dxf.la

DXF_COMMON_SOURCES = dxf_parser.c dxf_loader.c \
	dxf_load_distinct.c dxf_load_mixed.c \
	dxf_writer.c

libdxf_la_SOURCES = $(DXF_COMMON_SOURCES)

dxf_la_SOURCES = $(DXF_COMMON_SOURCES)

dxf_la_CPPFLAGS = @CFLAGS@
dxf_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
dxf_la_CPPFLAGS += -DLOADABLE_EXTENSION
dxf_la_LDFLAGS = -module
dxf_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/dxf/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
..
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
86
87
88
89
90
91
92


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
...
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
...
340
341
342
343
344
345
346

347
348
349
350
351
352
353
...
658
659
660
661
662
663
664
665
666
667
668
669
670
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/dxf


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
	$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
dxf_la_LIBADD =
am__objects_1 = dxf_la-dxf_parser.lo dxf_la-dxf_loader.lo \
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I.
noinst_HEADERS = dxf_private.h
noinst_LTLIBRARIES = libdxf.la dxf.la
DXF_COMMON_SOURCES = dxf_parser.c dxf_loader.c \
	dxf_load_distinct.c dxf_load_mixed.c \
	dxf_writer.c

libdxf_la_SOURCES = $(DXF_COMMON_SOURCES)
dxf_la_SOURCES = $(DXF_COMMON_SOURCES)
dxf_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
dxf_la_LDFLAGS = -module
dxf_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dxf/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/dxf/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|







 







|
<
<
<
<
<
<
<
<
<
<







 







>
>







<
<







 







<







 







|








|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
..
12
13
14
15
16
17
18
19










20
21
22
23
24
25
26
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91


92
93
94
95
96
97
98
...
169
170
171
172
173
174
175

176
177
178
179
180
181
182
...
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
...
648
649
650
651
652
653
654


655
656
657
658
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/dxf
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)


mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
dxf_la_LIBADD =
am__objects_1 = dxf_la-dxf_parser.lo dxf_la-dxf_loader.lo \
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I.
noinst_HEADERS = dxf_private.h
noinst_LTLIBRARIES = libdxf.la dxf.la
DXF_COMMON_SOURCES = dxf_parser.c dxf_loader.c \
	dxf_load_distinct.c dxf_load_mixed.c \
	dxf_writer.c

libdxf_la_SOURCES = $(DXF_COMMON_SOURCES)
dxf_la_SOURCES = $(DXF_COMMON_SOURCES)
dxf_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
dxf_la_LDFLAGS = -module
dxf_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/dxf/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/dxf/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/dxf/dxf_load_distinct.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
/*

 dxf_load_distinct.c -- implements DXF support
 [loding features into the DB - by distinct layers]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
}

DXF_PRIVATE int
import_by_layer (sqlite3 * handle, gaiaDxfParserPtr dxf, int append)
{
/* populating the target DB - by distinct layers */
    int ret;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_ext = NULL;
    sqlite3_stmt *stmt_pattern = NULL;
    unsigned char *blob;
    int blob_size;
    gaiaGeomCollPtr geom;
    gaiaLinestringPtr p_ln;
    gaiaPolygonPtr p_pg;
    gaiaRingPtr p_rng;
    int iv;
    char *name;
    char *attr_name = "";
    char *block;
    gaiaDxfTextPtr txt = NULL;
    gaiaDxfPointPtr pt;
    gaiaDxfPolylinePtr ln;
    gaiaDxfPolylinePtr pg;
    gaiaDxfHatchPtr p_hatch;
    gaiaDxfInsertPtr ins;

    gaiaDxfLayerPtr lyr = dxf->first_layer;





|







 







|







 







|
|
|








|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
/*

 dxf_load_distinct.c -- implements DXF support
 [loding features into the DB - by distinct layers]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
}

DXF_PRIVATE int
import_by_layer (sqlite3 * handle, gaiaDxfParserPtr dxf, int append)
{
/* populating the target DB - by distinct layers */
    int ret;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_ext;
    sqlite3_stmt *stmt_pattern;
    unsigned char *blob;
    int blob_size;
    gaiaGeomCollPtr geom;
    gaiaLinestringPtr p_ln;
    gaiaPolygonPtr p_pg;
    gaiaRingPtr p_rng;
    int iv;
    char *name;
    char *attr_name;
    char *block;
    gaiaDxfTextPtr txt;
    gaiaDxfPointPtr pt;
    gaiaDxfPolylinePtr ln;
    gaiaDxfPolylinePtr pg;
    gaiaDxfHatchPtr p_hatch;
    gaiaDxfInsertPtr ins;

    gaiaDxfLayerPtr lyr = dxf->first_layer;

Changes to src/dxf/dxf_load_mixed.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*

 dxf_load_mixed.c -- implements DXF support
 [loding features into the DB - mixed layers by geometry type]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),





|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*

 dxf_load_mixed.c -- implements DXF support
 [loding features into the DB - mixed layers by geometry type]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),

Changes to src/dxf/dxf_loader.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
....
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
/*

 dxf_loader.c -- implements DXF support 
 [loding features into the DB - common methods]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    gaiaDxfPolylinePtr pg;
    gaiaDxfHatchPtr htc;
    int ret;
    unsigned char *blob;
    int blob_size;
    gaiaGeomCollPtr geom;
    int error = 0;
    char *name = "??";
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_text_2d = NULL;
    sqlite3_stmt *stmt_text_3d = NULL;
    sqlite3_stmt *stmt_point_2d = NULL;
    sqlite3_stmt *stmt_point_3d = NULL;
    sqlite3_stmt *stmt_line_2d = NULL;
    sqlite3_stmt *stmt_line_3d = NULL;





|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
....
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
/*

 dxf_loader.c -- implements DXF support 
 [loding features into the DB - common methods]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    gaiaDxfPolylinePtr pg;
    gaiaDxfHatchPtr htc;
    int ret;
    unsigned char *blob;
    int blob_size;
    gaiaGeomCollPtr geom;
    int error = 0;
    char *name;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_text_2d = NULL;
    sqlite3_stmt *stmt_text_3d = NULL;
    sqlite3_stmt *stmt_point_2d = NULL;
    sqlite3_stmt *stmt_point_3d = NULL;
    sqlite3_stmt *stmt_line_2d = NULL;
    sqlite3_stmt *stmt_line_3d = NULL;

Changes to src/dxf/dxf_parser.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
....
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
....
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
/*

 dxf_parser.c -- implements DXF support [parsing]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    coll->last = out;
}

static void
unlinked_rings (const void *p_cache, gaiaDxfPolylinePtr line)
{
/* attempt to identify unlinked Polygon rings */
    int invalid = 0;
    int start;
    int count;
    double x;
    double y;
    double z;
    int i;
    int i2;
................................................................................
		  {
		      /* EOF marker found - quitting */
		      break;
		  }
		p = line;
		continue;
	    }
	  *p++ = (char) c;
	  /* Even Rouault 2013-06-02 - avoiding a potential buffer overflow */
	  if (p - line == sizeof (line) - 1)
	      goto stop;
	  /* END - Even Rouault 2013-06-02 */
      }

    fclose (fl);




|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
....
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
....
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
/*

 dxf_parser.c -- implements DXF support [parsing]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    coll->last = out;
}

static void
unlinked_rings (const void *p_cache, gaiaDxfPolylinePtr line)
{
/* attempt to identify unlinked Polygon rings */
    int invalid;
    int start;
    int count;
    double x;
    double y;
    double z;
    int i;
    int i2;
................................................................................
		  {
		      /* EOF marker found - quitting */
		      break;
		  }
		p = line;
		continue;
	    }
	  *p++ = c;
	  /* Even Rouault 2013-06-02 - avoiding a potential buffer overflow */
	  if (p - line == sizeof (line) - 1)
	      goto stop;
	  /* END - Even Rouault 2013-06-02 */
      }

    fclose (fl);

Changes to src/dxf/dxf_private.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* 
 dxf_private.h -- DXF Import Private API
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),



|







 







|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* 
 dxf_private.h -- DXF Import Private API
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),

Changes to src/dxf/dxf_writer.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
/*

 dxf_writer.c -- implements DXF support
 [exporting a DXF]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	return 0;
    fprintf (dxf->out, "%3d\r\nPOLYLINE\r\n%3d\r\n%s\r\n%3d\r\n%6d\r\n", 0, 8,
	     layer, 66, 1);
    fprintf (dxf->out, "%3d\r\n%6d\r\n", 70, 0);
    for (iv = 0; iv < line->Points; iv++)
      {
	  /* exporting all vertices */
	  m = 0.0;
	  z = 0.0;
	  if (line->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
	    }
	  else if (line->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
      {
	  /* sandro 2013-10-19 
	     exporting all vertices except the last one 
	     because accordingly to DXF specifications the
	     Ring closure is always implicitly assumed, so 
	     there is no need at all to explicitly export
	     a last vertex identical to the first one */
	  m = 0.0;
	  z = 0.0;
	  if (ring->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
	    }
	  else if (ring->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ring->Coords, iv, &x, &y, &m);





|







 







|







 







<
<







 







<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
..
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
269
270
271
272
273
274
275


276
277
278
279
280
281
282
...
323
324
325
326
327
328
329


330
331
332
333
334
335
336
/*

 dxf_writer.c -- implements DXF support
 [exporting a DXF]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	return 0;
    fprintf (dxf->out, "%3d\r\nPOLYLINE\r\n%3d\r\n%s\r\n%3d\r\n%6d\r\n", 0, 8,
	     layer, 66, 1);
    fprintf (dxf->out, "%3d\r\n%6d\r\n", 70, 0);
    for (iv = 0; iv < line->Points; iv++)
      {
	  /* exporting all vertices */


	  if (line->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
	    }
	  else if (line->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
      {
	  /* sandro 2013-10-19 
	     exporting all vertices except the last one 
	     because accordingly to DXF specifications the
	     Ring closure is always implicitly assumed, so 
	     there is no need at all to explicitly export
	     a last vertex identical to the first one */


	  if (ring->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
	    }
	  else if (ring->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ring->Coords, iv, &x, &y, &m);

Changes to src/gaiaaux/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgaiaaux.la gaiaaux.la

GAIAAUX_COMMON_SOURCES = gg_sqlaux.c gg_utf8.c

libgaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)

gaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)

gaiaaux_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
gaiaaux_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
gaiaaux_la_CPPFLAGS += -DLOADABLE_EXTENSION
gaiaaux_la_LDFLAGS = -module
gaiaaux_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|










|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgaiaaux.la gaiaaux.la

GAIAAUX_COMMON_SOURCES = gg_sqlaux.c gg_utf8.c

libgaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)

gaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)

gaiaaux_la_CPPFLAGS = @CFLAGS@
gaiaaux_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
gaiaaux_la_CPPFLAGS += -DLOADABLE_EXTENSION
gaiaaux_la_LDFLAGS = -module
gaiaaux_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/gaiaaux/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
330
331
332
333
334
335
336

337
338
339
340
341
342
343
...
621
622
623
624
625
626
627
628
629
630
631
632
633
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiaaux


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
gaiaaux_la_LIBADD =
am__objects_1 = gaiaaux_la-gg_sqlaux.lo gaiaaux_la-gg_utf8.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgaiaaux.la gaiaaux.la
GAIAAUX_COMMON_SOURCES = gg_sqlaux.c gg_utf8.c
libgaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)
gaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)
gaiaaux_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers \
	-I. -DLOADABLE_EXTENSION
gaiaaux_la_LDFLAGS = -module
gaiaaux_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiaaux/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiaaux/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<







 







|




|
|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
164
165
166
167
168
169
170

171
172
173
174
175
176
177
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
612
613
614
615
616
617
618


619
620
621
622
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiaaux
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
gaiaaux_la_LIBADD =
am__objects_1 = gaiaaux_la-gg_sqlaux.lo gaiaaux_la-gg_utf8.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgaiaaux.la gaiaaux.la
GAIAAUX_COMMON_SOURCES = gg_sqlaux.c gg_utf8.c
libgaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)
gaiaaux_la_SOURCES = $(GAIAAUX_COMMON_SOURCES)
gaiaaux_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
gaiaaux_la_LDFLAGS = -module
gaiaaux_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiaaux/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiaaux/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/gaiaaux/gg_sqlaux.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
....
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
....
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250


1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
....
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
/*

 gg_sqlaux.c -- SQL ancillary functions

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	  longitude *= -1.0;
      }
    if (latitude < 0.0)
      {
	  lat_prefix = 'S';
	  latitude *= -1.0;
      }
    long_d = (int) floor (longitude);
    val = 60.0 * (longitude - (double) long_d);
    long_m = (int) floor (val);
    val = 60.0 * (val - (double) long_m);
    long_s = (int) floor (val);
    if ((val - (double) long_s) > 0.5)
	long_s++;
    lat_d = (int) floor (latitude);
    val = 60.0 * (latitude - (double) lat_d);
    lat_m = (int) floor (val);
    val = 60.0 * (val - (double) lat_m);
    lat_s = (int) floor (val);
    if ((val - (double) lat_s) > 0.5)
	lat_s++;
    dms0 =
	sqlite3_mprintf ("%02d°%02d′%02d″%c %03d°%02d′%02d″%c", lat_d,
			 lat_m, lat_s, lat_prefix, long_d, long_m, long_s,
			 long_prefix);
    len = strlen (dms0);
    dms = malloc (len + 1);
    strcpy (dms, dms0);
    sqlite3_free (dms0);
    return dms;
}

#if OMIT_ICONV == 0		/* ICONV is absolutely required */

/*********************************************************************
/
/ DISCLAIMER
/
/ the following code implementation (URL percent-encoding/-decoding)
/ simply is a rearranged adaption of this original code released
/ into the Public Domain:
................................................................................
url_to_hex (char code)
{
    static char hex[] = "0123456789abcdef";
    return hex[code & 15];
}

GAIAAUX_DECLARE char *
gaiaEncodeURL (const char *url, const char *out_charset)
{
/* encoding some URL */
    char *encoded = NULL;
    const char *in;
    char *utf8_url = NULL;
    char *out;
    int len;
    if (url == NULL)
	return NULL;

    utf8_url = url_fromUtf8 (url, out_charset);
    if (utf8_url == NULL)
	return NULL;
    len = strlen (url);
    if (len == 0)
	return NULL;
    in = utf8_url;

    encoded = malloc ((len * 3) + 1);
    out = encoded;
    while (*in != '\0')
      {
	  if (isalnum (*in) || *in == '-' || *in == '_' || *in == '.'
	      || *in == '~')
	      *out++ = *in;


	  else
	    {
		*out++ = '%';
		*out++ = url_to_hex (*in >> 4);
		*out++ = url_to_hex (*in & 15);
	    }
	  in++;
      }
    *out = '\0';
    free (utf8_url);
    return encoded;
}

static char
url_from_hex (char ch)
{
    return isdigit (ch) ? ch - '0' : (char) (tolower (ch) - 'a' + 10);
}

GAIAAUX_DECLARE char *
gaiaDecodeURL (const char *encoded, const char *in_charset)
{
/* decoding some URL */
    char *url = NULL;
    char *utf8_url = NULL;
    const char *in = encoded;
    char *out;
    int len;
    if (encoded == NULL)
	return NULL;
    len = strlen (encoded);
    if (len == 0)
................................................................................
	  else if (*in == '+')
	      *out++ = ' ';
	  else
	      *out++ = *in;
	  in++;
      }
    *out = '\0';
    utf8_url = url_toUtf8 (url, in_charset);
    free (url);
    return utf8_url;
}

#endif /* ICONV enabled/disabled */

GAIAAUX_DECLARE char *
gaiaDirNameFromPath (const char *path)
{
/* extracting the DirName (if any) from a Path */
    const char *in = path;
    const char *last = NULL;
    int len = 0;
    int dirlen = len;
    char *name;

    if (path == NULL)
	return NULL;

    while (*in != '\0')
      {
	  /* parsing the Path */
	  len++;
	  if (*in == '/' || *in == '\\')
	    {
		last = in;
		dirlen = len;
	    }
	  in++;
      }
    if (last == NULL)
	return NULL;		/* there is no Dir component */

/* allocating the DirName  to be returned */
    name = malloc (dirlen + 1);
    memcpy (name, path, dirlen);
    *(name + dirlen) = '\0';
    return name;
}

GAIAAUX_DECLARE char *
gaiaFullFileNameFromPath (const char *path)
{
/* extracting the FullFileName (including Extension) from a Path */
    const char *in = path;
    const char *last = path - 1;
    int len;
    char *name;

    if (path == NULL)
	return NULL;

    while (*in != '\0')
      {
	  /* parsing the Path */
	  if (*in == '/' || *in == '\\')
	      last = in;
	  in++;
      }
    len = strlen (last + 1);
    if (len == 0)
	return NULL;

/* allocating the FullFileName to be returned */
    name = malloc (len + 1);
    strcpy (name, last + 1);
    return name;
}

GAIAAUX_DECLARE char *
gaiaFileNameFromPath (const char *path)
{
/* extracting the FileName (excluding Extension) from a Path */
    const char *in = path;
    const char *last = path - 1;
    int len;
    char *name;
    int i;

    if (path == NULL)
	return NULL;

    while (*in != '\0')
      {
	  /* parsing the Path */
	  if (*in == '/' || *in == '\\')
	      last = in;
	  in++;
      }
    len = strlen (last + 1);
    if (len == 0)
	return NULL;

/* allocating the FullFileName to be returned */
    name = malloc (len + 1);
    strcpy (name, last + 1);
    for (i = len - 1; i > 0; i--)
      {
	  if (*(name + i) == '.')
	    {
		/* stripping out the extension */
		*(name + i) = '\0';
		break;
	    }
      }
    return name;
}

GAIAAUX_DECLARE char *
gaiaFileExtFromPath (const char *path)
{
/* extracting the FileExtension (if any) from a Path */
    int len;
    char *name;
    int i;
    int pos = -1;

    if (path == NULL)
	return NULL;

    len = strlen (path);
    for (i = len - 1; i > 0; i--)
      {
	  if (*(path + i) == '/' || *(path + i) == '\\')
	      break;
	  if (*(path + i) == '.')
	    {
		/* found an extension */
		pos = i;
		break;
	    }
      }
    if (pos <= 0)
	return NULL;

/* allocating the FileExtension to be returned */
    len = strlen (path + pos + 1);
    if (len == 0)
	return NULL;
    name = malloc (len + 1);
    strcpy (name, path + pos + 1);
    return name;
}




|







 







|







 







|

|

|


|

|

|













<
<







 







|



|
<




<
<
<
<



<








>
>









<






|



|



<







 







<
<
|


<
<




|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|






|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|

|
|
|






|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|

|
|
|
|
|
|

|
|
|
|
|






|
|
|
|
|
|

|
|
|
|
|
|
|
|

|
|
|
|
|

|

|
|

|
|
|

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
....
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202


1203
1204
1205
1206
1207
1208
1209
....
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227

1228
1229
1230
1231




1232
1233
1234

1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253

1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267

1268
1269
1270
1271
1272
1273
1274
....
1291
1292
1293
1294
1295
1296
1297


1298
1299
1300


1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
/*

 gg_sqlaux.c -- SQL ancillary functions

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	  longitude *= -1.0;
      }
    if (latitude < 0.0)
      {
	  lat_prefix = 'S';
	  latitude *= -1.0;
      }
    long_d = floor (longitude);
    val = 60.0 * (longitude - (double) long_d);
    long_m = floor (val);
    val = 60.0 * (val - (double) long_m);
    long_s = floor (val);
    if ((val - (double) long_s) > 0.5)
	long_s++;
    lat_d = floor (latitude);
    val = 60.0 * (latitude - (double) lat_d);
    lat_m = floor (val);
    val = 60.0 * (val - (double) lat_m);
    lat_s = floor (val);
    if ((val - (double) lat_s) > 0.5)
	lat_s++;
    dms0 =
	sqlite3_mprintf ("%02d°%02d′%02d″%c %03d°%02d′%02d″%c", lat_d,
			 lat_m, lat_s, lat_prefix, long_d, long_m, long_s,
			 long_prefix);
    len = strlen (dms0);
    dms = malloc (len + 1);
    strcpy (dms, dms0);
    sqlite3_free (dms0);
    return dms;
}



/*********************************************************************
/
/ DISCLAIMER
/
/ the following code implementation (URL percent-encoding/-decoding)
/ simply is a rearranged adaption of this original code released
/ into the Public Domain:
................................................................................
url_to_hex (char code)
{
    static char hex[] = "0123456789abcdef";
    return hex[code & 15];
}

GAIAAUX_DECLARE char *
gaiaEncodeURL (const char *url)
{
/* encoding some URL */
    char *encoded = NULL;
    const char *in = url;

    char *out;
    int len;
    if (url == NULL)
	return NULL;




    len = strlen (url);
    if (len == 0)
	return NULL;


    encoded = malloc ((len * 3) + 1);
    out = encoded;
    while (*in != '\0')
      {
	  if (isalnum (*in) || *in == '-' || *in == '_' || *in == '.'
	      || *in == '~')
	      *out++ = *in;
	  else if (*in == ' ')
	      *out++ = '+';
	  else
	    {
		*out++ = '%';
		*out++ = url_to_hex (*in >> 4);
		*out++ = url_to_hex (*in & 15);
	    }
	  in++;
      }
    *out = '\0';

    return encoded;
}

static char
url_from_hex (char ch)
{
    return isdigit (ch) ? ch - '0' : tolower (ch) - 'a' + 10;
}

GAIAAUX_DECLARE char *
gaiaDecodeURL (const char *encoded)
{
/* decoding some URL */
    char *url = NULL;

    const char *in = encoded;
    char *out;
    int len;
    if (encoded == NULL)
	return NULL;
    len = strlen (encoded);
    if (len == 0)
................................................................................
	  else if (*in == '+')
	      *out++ = ' ';
	  else
	      *out++ = *in;
	  in++;
      }
    *out = '\0';


    return url;
}



GAIAAUX_DECLARE char *
gaiaDirNameFromPath (const char *path)
{
/* extracting the DirName (if any) from a Path */
	const char *in = path;
	const char *last = NULL;
	int len = 0;
	int dirlen;
	char *name;
	
	if (path == NULL)
	return NULL;
	
	while (*in != '\0')
	{
	/* parsing the Path */
		len++;
		if (*in == '/' || *in == '\\')
		{
			last = in;
			dirlen = len;
		}
		in++;
	}
	if (last == NULL)
	return NULL;	/* there is no Dir component */
	
/* allocating the DirName  to be returned */
	name = malloc(dirlen+1);
	memcpy(name, path, dirlen);
	*(name+dirlen) = '\0';
	return name;
}

GAIAAUX_DECLARE char *
gaiaFullFileNameFromPath (const char *path)
{
/* extracting the FullFileName (including Extension) from a Path */
	const char *in = path;
	const char *last = path - 1;
	int len;
	char *name;
	
	if (path == NULL)
	return NULL;
	
	while (*in != '\0')
	{
	/* parsing the Path */
		if (*in == '/' || *in == '\\')
			last = in;
		in++;
	}
	len = strlen(last+1);
	if (len == 0)
	return NULL;
	
/* allocating the FullFileName to be returned */
	name = malloc(len+1);
	strcpy(name, last+1);
	return name;
}

GAIAAUX_DECLARE char *
gaiaFileNameFromPath (const char *path)
{
/* extracting the FileName (excluding Extension) from a Path */
	const char *in = path;
	const char *last = path - 1;
	int len;
	char *name;
	int i;
	
	if (path == NULL)
	return NULL;
	
	while (*in != '\0')
	{
	/* parsing the Path */
		if (*in == '/' || *in == '\\')
			last = in;
		in++;
	}
	len = strlen(last+1);
	if (len == 0)
	return NULL;
	
/* allocating the FullFileName to be returned */
	name = malloc(len+1);
	strcpy(name, last+1);
	for (i = len - 1; i > 0; i--)
	{
		if (*(name+i) == '.')
		{
		/* stripping out the extension */
			*(name+i) = '\0';
			break;
		}
	}
	return name;
}

GAIAAUX_DECLARE char *
gaiaFileExtFromPath (const char *path)
{
/* extracting the FileExtension (if any) from a Path */
	int len;
	char *name;
	int i;
	int pos = -1;
	
	if (path == NULL)
	return NULL;
	
	len = strlen(path);
	for (i = len - 1; i > 0; i--)
	{
		if (*(path+i) == '/' || *(path+i) == '\\')
		break;
		if (*(path+i) == '.')
		{
		/* found an extension */
			pos = i;
			break;
		}
	}
	if (pos <= 0)
	return NULL;
	
/* allocating the FileExtension to be returned */
	len = strlen(path + pos + 1);
	if (len == 0)
	return NULL;
	name = malloc(len+1);
	strcpy(name, path + pos + 1);
	return name;
}

Changes to src/gaiaaux/gg_utf8.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
...
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/*

 gg_utf8.c -- locale charset handling
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include <iconv.h>
#include <langinfo.h>
#endif
#endif

#include <spatialite/sqlite.h>
#include <spatialite/gaiaaux.h>
#include <spatialite_private.h>

GAIAAUX_DECLARE const char *
gaiaGetLocaleCharset ()
{
/* identifies the locale charset */
#if defined(__MINGW32__) || defined(_WIN32)
    return locale_charset ();
................................................................................
#endif
}

GAIAAUX_DECLARE int
gaiaConvertCharset (char **buf, const char *fromCs, const char *toCs)
{
/* converting a string from a charset to another "on-the-fly" */
    char *utf8buf;
#if !defined(__MINGW32__) && defined(_WIN32)
    const char *pBuf;
#else /* not WIN32 */
    char *pBuf;
#endif
    size_t len;
    size_t utf8len;
    char *pUtf8buf;
    int maxlen;
    iconv_t cvt = iconv_open (toCs, fromCs);
    if (cvt == (iconv_t) (-1))
	goto unsupported;
    len = strlen (*buf);
    if (len == 0)
      {
	  /* empty string */
	  utf8buf = sqlite3_malloc (1);
	  *utf8buf = '\0';
	  sqlite3_free (*buf);
	  *buf = utf8buf;
	  iconv_close (cvt);
	  return 1;
      }
    maxlen = len * 4;
    utf8len = maxlen;
    pBuf = *buf;
    utf8buf = sqlite3_malloc (utf8len);
    pUtf8buf = utf8buf;
    if (iconv (cvt, &pBuf, &len, &pUtf8buf, &utf8len) == (size_t) (-1))
	goto error;
    utf8buf[maxlen - utf8len] = '\0';
    sqlite3_free (*buf);
    *buf = utf8buf;
    iconv_close (cvt);
    return 1;
  error:
    iconv_close (cvt);
    sqlite3_free (*buf);
    *buf = NULL;
  unsupported:
    return 0;
}

GAIAAUX_DECLARE void *
gaiaCreateUTF8Converter (const char *fromCS)
{
................................................................................
	  *err = 1;
	  return NULL;
      }
    utf8buf[maxlen - utf8len] = '\0';
    return utf8buf;
}

SPATIALITE_PRIVATE char *
url_toUtf8 (const char *url, const char *in_charset)
{
/* converting an URL to UTF-8 */
    iconv_t cvt;
    size_t len;
    size_t utf8len;
    int maxlen;
    char *utf8buf;
    char *pUtf8buf;
#if !defined(__MINGW32__) && defined(_WIN32)
    const char *pBuf = url;
#else /* not WIN32 */
    char *pBuf = (char *)url;
#endif

    if (url == NULL || in_charset == NULL)
	return NULL;
    cvt = iconv_open ("UTF-8", in_charset);
    if (cvt == (iconv_t) (-1))
	goto unsupported;
    len = strlen (url);
    maxlen = len * 4;
    utf8len = maxlen;
    utf8buf = malloc (maxlen);
    pUtf8buf = utf8buf;
    if (iconv (cvt, &pBuf, &len, &pUtf8buf, &utf8len) == (size_t) (-1))
	goto error;
    utf8buf[maxlen - utf8len] = '\0';
    iconv_close (cvt);
    return utf8buf;

  error:
    iconv_close (cvt);
    free (utf8buf);
  unsupported:
    return NULL;
}

SPATIALITE_PRIVATE char *
url_fromUtf8 (const char *url, const char *out_charset)
{
/* converting an URL from UTF-8 */
    iconv_t cvt;
    size_t len;
    size_t utf8len;
    int maxlen;
    char *utf8buf;
    char *pUtf8buf;
#if !defined(__MINGW32__) && defined(_WIN32)
    const char *pBuf = url;
#else /* not WIN32 */
    char *pBuf = (char *)url;
#endif

    if (url == NULL || out_charset == NULL)
	return NULL;
    cvt = iconv_open (out_charset, "UTF-8");
    if (cvt == (iconv_t) (-1))
	goto unsupported;
    len = strlen (url);
    maxlen = len * 4;
    utf8len = maxlen;
    utf8buf = malloc (maxlen);
    pUtf8buf = utf8buf;
    if (iconv (cvt, &pBuf, &len, &pUtf8buf, &utf8len) == (size_t) (-1))
	goto error;
    utf8buf[maxlen - utf8len] = '\0';
    iconv_close (cvt);
    return utf8buf;

  error:
    iconv_close (cvt);
    free (utf8buf);
  unsupported:
    return NULL;
}

#endif /* ICONV enabled/disabled */




|







 







|







 







<







 







|








<




<
<
<
<
<
<
<
<
<
<
<
|

<



|
|
<




<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
76
77
78
79
80
81
82

83
84
85
86
87
88
89
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

112
113
114
115











116
117

118
119
120
121
122

123
124
125
126


127
128
129
130
131
132
133
...
177
178
179
180
181
182
183














































































184
/*

 gg_utf8.c -- locale charset handling
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include <iconv.h>
#include <langinfo.h>
#endif
#endif

#include <spatialite/sqlite.h>
#include <spatialite/gaiaaux.h>


GAIAAUX_DECLARE const char *
gaiaGetLocaleCharset ()
{
/* identifies the locale charset */
#if defined(__MINGW32__) || defined(_WIN32)
    return locale_charset ();
................................................................................
#endif
}

GAIAAUX_DECLARE int
gaiaConvertCharset (char **buf, const char *fromCs, const char *toCs)
{
/* converting a string from a charset to another "on-the-fly" */
    char utf8buf[65536];
#if !defined(__MINGW32__) && defined(_WIN32)
    const char *pBuf;
#else /* not WIN32 */
    char *pBuf;
#endif
    size_t len;
    size_t utf8len;
    char *pUtf8buf;

    iconv_t cvt = iconv_open (toCs, fromCs);
    if (cvt == (iconv_t) (-1))
	goto unsupported;
    len = strlen (*buf);











    utf8len = 65536;
    pBuf = *buf;

    pUtf8buf = utf8buf;
    if (iconv (cvt, &pBuf, &len, &pUtf8buf, &utf8len) == (size_t) (-1))
	goto error;
    utf8buf[65536 - utf8len] = '\0';
    memcpy (*buf, utf8buf, (65536 - utf8len) + 1);

    iconv_close (cvt);
    return 1;
  error:
    iconv_close (cvt);


  unsupported:
    return 0;
}

GAIAAUX_DECLARE void *
gaiaCreateUTF8Converter (const char *fromCS)
{
................................................................................
	  *err = 1;
	  return NULL;
      }
    utf8buf[maxlen - utf8len] = '\0';
    return utf8buf;
}















































































#endif /* ICONV enabled/disabled */

Changes to src/gaiaexif/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgaiaexif.la gaiaexif.la

libgaiaexif_la_SOURCES = gaia_exif.c

gaiaexif_la_SOURCES = gaia_exif.c

gaiaexif_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
gaiaexif_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
gaiaexif_la_CPPFLAGS += -DLOADABLE_EXTENSION
gaiaexif_la_LDFLAGS = -module
gaiaexif_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|








|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgaiaexif.la gaiaexif.la

libgaiaexif_la_SOURCES = gaia_exif.c

gaiaexif_la_SOURCES = gaia_exif.c

gaiaexif_la_CPPFLAGS = @CFLAGS@
gaiaexif_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
gaiaexif_la_CPPFLAGS += -DLOADABLE_EXTENSION
gaiaexif_la_LDFLAGS = -module
gaiaexif_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/gaiaexif/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
328
329
330
331
332
333
334

335
336
337
338
339
340
341
...
610
611
612
613
614
615
616
617
618
619
620
621
622
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiaexif


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
gaiaexif_la_LIBADD =
am_gaiaexif_la_OBJECTS = gaiaexif_la-gaia_exif.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgaiaexif.la gaiaexif.la
libgaiaexif_la_SOURCES = gaia_exif.c
gaiaexif_la_SOURCES = gaia_exif.c
gaiaexif_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers \
	-I. -DLOADABLE_EXTENSION
gaiaexif_la_LDFLAGS = -module
gaiaexif_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiaexif/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiaexif/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<







 







|



|
|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
163
164
165
166
167
168
169

170
171
172
173
174
175
176
...
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
...
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
...
601
602
603
604
605
606
607


608
609
610
611
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiaexif
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
gaiaexif_la_LIBADD =
am_gaiaexif_la_OBJECTS = gaiaexif_la-gaia_exif.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgaiaexif.la gaiaexif.la
libgaiaexif_la_SOURCES = gaia_exif.c
gaiaexif_la_SOURCES = gaia_exif.c
gaiaexif_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
gaiaexif_la_LDFLAGS = -module
gaiaexif_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiaexif/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiaexif/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/gaiaexif/gaia_exif.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
....
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
....
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
....
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552




2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
....
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
/*

 gaia_exif.c -- Gaia EXIF support
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
		      human = "Fine weather";
		      break;
		  case 10:
		      human = "Cloudy weather";
		      break;
		  case 11:
		      human = "Shade";
		      break;
		  case 12:
		      human = "Daylight fluorescent (D 5700 - 7100K)";
		      break;
		  case 13:
		      human = "Day white fluorescent (N 4600 - 5400K)";
		      break;
		  case 14:
		      human = "Cool white fluorescent (W 3900 - 4500K)";
		      break;
		  case 15:
		      human = "White fluorescent (WW 3200 - 3700K)";
		      break;
		  case 17:
		      human = "Standard light A";
		      break;
		  case 18:
................................................................................
gaiaGuessBlobType (const unsigned char *blob, int size)
{
/* returns the BLOB content type */
    int jpeg = 0;
    int exif = 0;
    int exif_gps = 0;
    int geom = 1;
    int tiny_point = 1;
    gaiaExifTagListPtr exif_list;
    gaiaExifTagPtr pT;
    unsigned char jpeg1_signature[2];
    unsigned char jpeg2_signature[2];
    unsigned char jpeg3_signature[4];
    unsigned char jfif_signature[4];
    unsigned char exif_signature[4];
................................................................................
      }
/* testing for GEOMETRY */
    if (size < 45)
	geom = 0;
    else
      {
	  if (*(blob + 0) != GAIA_MARK_START)
	      geom = 0;
	  if (*(blob + 1) == GAIA_LITTLE_ENDIAN
	      || *(blob + 1) == GAIA_BIG_ENDIAN)
	      ;
	  else
	      geom = 0;
	  if (*(blob + (size - 1)) != GAIA_MARK_END)
	      geom = 0;
	  if (*(blob + 38) != GAIA_MARK_MBR)




	      geom = 0;
      }
    if (geom)
	return GAIA_GEOMETRY_BLOB;

/* testing for TinyPoint */
    if (size < 24)
	tiny_point = 0;
    else
      {
	  if (*(blob + 0) != GAIA_MARK_START)
	      tiny_point = 0;
	  if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	      || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      ;
	  else
	      tiny_point = 0;
	  if (*(blob + 6) == GAIA_TINYPOINT_XY
	      || *(blob + 6) == GAIA_TINYPOINT_XYZ
	      || *(blob + 6) == GAIA_TINYPOINT_XYM
	      || *(blob + 6) == GAIA_TINYPOINT_XYZM)
	      ;
	  else
	      tiny_point = 0;
	  if (*(blob + (size - 1)) != GAIA_MARK_END)
	      tiny_point = 0;
      }
    if (tiny_point)
	return GAIA_TINYPOINT_BLOB;

#ifdef ENABLE_LIBXML2		/* LIBXML2 enabled: supporting XML documents */

    if (gaiaIsValidXmlBlob (blob, size))
	return GAIA_XML_BLOB;

#endif /* end LIBXML2: supporting XML documents */

................................................................................
	  gaiaExifTagsFree (exif_list);
	  if ((lat_ref == 'N' || lat_ref == 'S' || long_ref == 'E'
	       || long_ref == 'W') && lat_degs != -DBL_MAX
	      && lat_mins != -DBL_MAX && lat_secs != -DBL_MAX
	      && long_degs != -DBL_MAX && long_mins != -DBL_MAX
	      && long_secs != -DBL_MAX)
	    {
		int long_d = long_degs;
		int long_m = long_mins;
		int long_s = long_secs;
		int lat_d = lat_degs;
		int lat_m = lat_mins;
		int lat_s = lat_secs;
		sprintf (ll, "%02d°%02d′%02d″%c %03d°%02d′%02d″%c",
			 lat_d, lat_m, lat_s, lat_ref, long_d, long_m, long_s,
			 long_ref);
		len = strlen (ll);
		if (len < ll_size)
		    strcpy (latlong, ll);
		else
		  {
		      memcpy (latlong, ll, ll_size - 1);
		      latlong[ll_size] = '\0';
		  }
		return 1;
	    }
      }
    return 0;
}




|







 







|







 







<








<







 







<







 







<
<
<
<
<




>
>
>
>





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|
|
|
<
<
<
<
<













1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
....
2162
2163
2164
2165
2166
2167
2168

2169
2170
2171
2172
2173
2174
2175
2176

2177
2178
2179
2180
2181
2182
2183
....
2358
2359
2360
2361
2362
2363
2364

2365
2366
2367
2368
2369
2370
2371
....
2534
2535
2536
2537
2538
2539
2540





2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553

























2554
2555
2556
2557
2558
2559
2560
....
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762





2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
/*

 gaia_exif.c -- Gaia EXIF support
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
		      human = "Fine weather";
		      break;
		  case 10:
		      human = "Cloudy weather";
		      break;
		  case 11:
		      human = "Shade";

		  case 12:
		      human = "Daylight fluorescent (D 5700 - 7100K)";
		      break;
		  case 13:
		      human = "Day white fluorescent (N 4600 - 5400K)";
		      break;
		  case 14:
		      human = "Cool white fluorescent (W 3900 - 4500K)";

		  case 15:
		      human = "White fluorescent (WW 3200 - 3700K)";
		      break;
		  case 17:
		      human = "Standard light A";
		      break;
		  case 18:
................................................................................
gaiaGuessBlobType (const unsigned char *blob, int size)
{
/* returns the BLOB content type */
    int jpeg = 0;
    int exif = 0;
    int exif_gps = 0;
    int geom = 1;

    gaiaExifTagListPtr exif_list;
    gaiaExifTagPtr pT;
    unsigned char jpeg1_signature[2];
    unsigned char jpeg2_signature[2];
    unsigned char jpeg3_signature[4];
    unsigned char jfif_signature[4];
    unsigned char exif_signature[4];
................................................................................
      }
/* testing for GEOMETRY */
    if (size < 45)
	geom = 0;
    else
      {
	  if (*(blob + 0) != GAIA_MARK_START)





	      geom = 0;
	  if (*(blob + (size - 1)) != GAIA_MARK_END)
	      geom = 0;
	  if (*(blob + 38) != GAIA_MARK_MBR)
	      geom = 0;
	  if (*(blob + 1) == 0 || *(blob + 1) == 1)
	      ;
	  else
	      geom = 0;
      }
    if (geom)
	return GAIA_GEOMETRY_BLOB;


























#ifdef ENABLE_LIBXML2		/* LIBXML2 enabled: supporting XML documents */

    if (gaiaIsValidXmlBlob (blob, size))
	return GAIA_XML_BLOB;

#endif /* end LIBXML2: supporting XML documents */

................................................................................
	  gaiaExifTagsFree (exif_list);
	  if ((lat_ref == 'N' || lat_ref == 'S' || long_ref == 'E'
	       || long_ref == 'W') && lat_degs != -DBL_MAX
	      && lat_mins != -DBL_MAX && lat_secs != -DBL_MAX
	      && long_degs != -DBL_MAX && long_mins != -DBL_MAX
	      && long_secs != -DBL_MAX)
	    {
		sprintf (ll,
			 "%c %1.2f %1.2f %1.2f / %c %1.2f %1.2f %1.2f",
			 lat_ref, lat_degs, lat_mins, lat_secs, long_ref,
			 long_degs, long_mins, long_secs);





		len = strlen (ll);
		if (len < ll_size)
		    strcpy (latlong, ll);
		else
		  {
		      memcpy (latlong, ll, ll_size - 1);
		      latlong[ll_size] = '\0';
		  }
		return 1;
	    }
      }
    return 0;
}

Changes to src/gaiageo/Ewkt.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160


161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180


181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326

327
328
329

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364

365
366
367
368

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394

395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429

















430
431
432


433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
...
456
457
458
459
460
461
462
463
464
465
466
467
468
469


470
471
472
473
474
475
476
477
478
479
480


481
482

483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
...
516
517
518
519
520
521
522

523

524
525

526

527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153




1154
1155
1156
1157
1158


1159
1160
1161


1162
1163
1164
1165

1166
1167
1168


1169
1170
1171


1172
1173
1174
1175

1176
1177
1178
1179
1180
1181
1182
1183
1184


1185

1186
1187

1188
1189
1190
1191


1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023










































































































































































































































































































































































































































































































































2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034


2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054


2055
2056
2057
2058


2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
....
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096


2097
2098
2099
2100
2101
2102
2103
2104
2105
2106

2107
2108
2109

2110







2111







2112
2113
2114
2115
2116
2117
2118


2119
2120
2121
2122
2123
2124
2125
2126
2127

2128
2129
2130
2131
2132
2133




2134
2135
2136
2137
2138
2139
2140





2141

2142
2143
2144
2145
2146
2147
2148
2149


2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173


2174
2175
2176

2177
2178

2179
2180
2181
2182
2183

2184

2185
2186


2187

2188
2189
2190
2191


2192
2193
2194



2195
2196
2197
2198
2199
2200

2201
2202




2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216


2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230


2231
2232
2233

2234

2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255

2256
2257
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/

/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions


*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 117
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE void *
typedef union {

  int yyinit;
  ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct ewkt_data *p_data ;
#define ParseARG_PDECL , struct ewkt_data *p_data 
#define ParseARG_FETCH  struct ewkt_data *p_data  = yypParser->p_data 
#define ParseARG_STORE yypParser->p_data  = p_data 
#define YYNSTATE             335
#define YYNRULE              199
#define YYNTOKEN             20
#define YY_MAX_SHIFT         334
#define YY_MIN_SHIFTREDUCE   508
#define YY_MAX_SHIFTREDUCE   706
#define YY_ERROR_ACTION      707


#define YY_ACCEPT_ACTION     708
#define YY_NO_ACTION         709
#define YY_MIN_REDUCE        710
#define YY_MAX_REDUCE        908
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if

** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.


**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.

**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (694)
static const YYACTIONTYPE yy_action[] = {


 /*     0 */   334,  334,  334,  334,  710,  711,  712,  713,  714,  715,
 /*    10 */   716,  717,  718,  719,  720,  721,  722,  723,  724,  725,
 /*    20 */   726,  727,  728,  729,  730,  731,  732,  733,  734,  735,
 /*    30 */   736,  737,  148,  110,   87,  133,  109,   86,  132,  108,
 /*    40 */    85,  131,  107,   84,  130,  106,   83,  129,  105,   82,
 /*    50 */   903,  206,  333,  236,  212,  329,  194,  245,   28,  231,
 /*    60 */    27,  216,   25,  187,   24,  170,   22,  153,   20,   79,
 /*    70 */   333,  329,  708,    1,  299,  231,   28,  216,   27,  187,
 /*    80 */    25,  170,   24,  153,   22,   71,   19,  208,  207,  548,
 /*    90 */   206,  205,  248,  329,  200,  194,  262,  231,  330,  216,
 /*   100 */   236,  187,  101,  170,  100,  153,   99,   64,   98,  262,
 /*   110 */    96,  127,   81,  125,  102,  101,  207,  100,  270,   99,
 /*   120 */   240,   98,  200,   96,  124,   88,  123,  270,  122,  323,
 /*   130 */   121,  236,  119,  124,  104,  123,  278,  122,  218,  121,
 /*   140 */   236,  119,  147,  111,  146,  278,  145,  306,  144,  236,
 /*   150 */   142,  147,  128,  146,  249,  145,  331,  144,  208,  142,
 /*   160 */   240,  134,  205,  243,    2,   61,   77,   76,   75,   74,
 /*   170 */    73,   72,   78,   69,   68,   67,   66,   65,   87,   63,
 /*   180 */    94,   86,  110,   93,   85,  109,   92,   84,  108,   91,
 /*   190 */    83,  107,   90,   82,  106,   89,  117,  105,  148,  116,
 /*   200 */   140,  133,  115,  139,  132,  114,  138,  131,  113,  137,
 /*   210 */   130,  112,  136,  129,   26,  135,  210,  318,  313,  548,
 /*   220 */   308,   21,  248,  192,  327,  325,  548,  323,    4,  248,
 /*   230 */   332,  331,  325,  330,  183,  248,  240,  245,  182,  839,
 /*   240 */   222,  841,  842,  165,  240,  161,  157,  823,  311,  825,
 /*   250 */   826,  179,  240,  176,  173,  807,  902,  809,  810,  332,
 /*   260 */   795,  228,  797,  798,  243,  224,  775,  220,  777,  778,
 /*   270 */   767,  198,  769,  770,  548,  203,  186,   13,  548,  548,
 /*   280 */   327,  301,   23,  302,  245,  243,  245,  303,    3,  307,
 /*   290 */   245,  236,  308,  312,  236,  313,  226,  240,  316,  240,
 /*   300 */   317,  243,  318,  243,   12,  243,  229,  243,  230,  245,
 /*   310 */   321,  245,  232,  245,  236,  237,  233,  238,  236,  240,
 /*   320 */   241,  240,  242,  328,    5,  243,  245,  243,  542,  250,
 /*   330 */   548,  540,  251,  548,    6,  252,  253,    7,   70,  155,
 /*   340 */   254,  872,   95,   32,   97,  871,  870,   15,  869,  868,
 /*   350 */     9,  867,    8,  866,  159,  255,  157,  840,  173,  256,
 /*   360 */   887,  102,  770,  778,  118,   33,  120,  257,   16,   10,
 /*   370 */   258,  259,  260,   80,   11,  261,  810,  798,  901,  900,
 /*   380 */   161,  826,  176,  777,  899,  898,  897,  769,  163,  141,
 /*   390 */   896,  263,  125,   34,  264,  825,  797,  809,  179,  143,
 /*   400 */    17,  150,  265,  266,  267,  268,  269,  103,  886,  885,
 /*   410 */   884,  165,  883,  882,  881,  215,  795,  767,  271,  857,
 /*   420 */   127,  272,  273,  274,  807,  126,  275,  276,  277,  823,
 /*   430 */   856,  855,  854,  775,  853,  852,  149,  851,  152,  832,
 /*   440 */   156,  151,  280,  824,   42,  279,  220,  154,   46,  160,
 /*   450 */   158,  164,  829,  838,  281,  224,  835,   50,  282,  228,
 /*   460 */   162,   53,  283,  167,  166,  168,  816,  284,  169,  808,
 /*   470 */   172,  175,  822,  171,  285,  819,  174,  178,  286,  813,
 /*   480 */   177,  181,  754,  287,  186,  180,  288,   51,  289,  290,
 /*   490 */   184,  185,   18,  796,  193,  758,  189,  190,  191,  192,
 /*   500 */   199,  291,  188,  293,  198,  204,  756,  196,  197,  203,
 /*   510 */   201,  195,  292,  295,  752,  202,  294,   54,   56,   58,
 /*   520 */    62,  209,  213,   38,  219,  223,  227,  709,  296,  297,
 /*   530 */   298,  709,  709,  662,  661,  660,  300,  709,  659,  658,
 /*   540 */   657,  656,  709,  691,  305,  690,  689,   29,  310,  788,
 /*   550 */   211,  688,  304,  214,  776,  749,  315,  234,  768,  794,
 /*   560 */   762,  217,  764,  309,  791,  785,  221,  319,  314,  320,
 /*   570 */   225,  687,  760,  766,  322,  324,  235,  326,  686,  692,
 /*   580 */   676,  748,  239,  746,  747,  244,  246,  247,  675,  674,
 /*   590 */   673,  672,  671,   30,  709,  677,  647,  646,  645,  709,
 /*   600 */   644,  643,  642,  641,   31,  709,  628,  634,  631,  625,
 /*   610 */   709,  612,  618,  615,  609,  709,  602,  598,  541,  604,
 /*   620 */   709,  603,  542,  601,  540,  709,  600,  599,  597,  543,
 /*   630 */   709,  584,  709,  709,  709,   35,   36,   37,  709,   39,
 /*   640 */   578,  590,  709,  709,  709,   40,  580,   41,   43,  709,
 /*   650 */   587,  709,  703,  579,   44,   45,  709,  709,  581,  709,
 /*   660 */   709,  709,   47,   48,  709,  709,   49,  577,  570,  709,
 /*   670 */   709,  709,  572,  709,   52,  709,   55,  571,  709,  709,
 /*   680 */   709,  569,   57,  709,  709,   59,  538,  539,  709,   60,
 /*   690 */   709,  537,  536,   14,
};

static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    23,   24,   25,   26,   27,   28,   29,   30,   31,   32,
 /*    10 */    33,   34,   35,   36,   37,   38,   39,   40,   41,   42,
 /*    20 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*    30 */    53,   54,   27,   28,   29,   30,   31,   32,   33,   34,
 /*    40 */    35,   36,   37,   38,   39,   40,   41,   42,   43,   44,
 /*    50 */     0,   58,    2,   60,   57,    5,   63,   60,    8,    9,
 /*    60 */    10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
 /*    70 */     2,    5,   21,   22,   60,    9,    8,   11,   10,   13,
 /*    80 */    12,   15,   14,   17,   16,   19,   18,   55,   56,    6,
 /*    90 */    58,   59,   60,    5,   62,   63,    2,    9,   58,   11,
 /*   100 */    60,   13,    8,   15,   10,   17,   12,   19,   14,    2,
 /*   110 */    16,  108,   18,  110,  111,    8,   56,   10,    2,   12,
 /*   120 */    60,   14,   62,   16,    8,   18,   10,    2,   12,   58,
 /*   130 */    14,   60,   16,    8,   18,   10,    2,   12,   58,   14,
 /*   140 */    60,   16,    8,   18,   10,    2,   12,   58,   14,   60,
 /*   150 */    16,    8,   18,   10,  113,   12,   56,   14,   55,   16,
 /*   160 */    60,   18,   59,   60,    3,   60,   48,   49,   50,   51,
 /*   170 */    52,   53,   48,   49,   50,   51,   52,   53,   29,  109,
 /*   180 */    29,   32,   28,   32,   35,   31,   35,   38,   34,   38,
 /*   190 */    41,   37,   41,   44,   40,   44,   28,   43,   27,   31,
 /*   200 */    27,   30,   34,   30,   33,   37,   33,   36,   40,   36,
 /*   210 */    39,   43,   39,   42,    3,   42,    3,   55,   56,    6,
 /*   220 */    58,    3,   60,    3,   55,   56,    6,   58,    7,   60,
 /*   230 */    55,   56,   56,   58,   57,   60,   60,   60,   61,  108,
 /*   240 */    56,  110,  111,   76,   60,   78,   79,  100,   56,  102,
 /*   250 */   103,   72,   60,   74,   75,   92,  115,   94,   95,   55,
 /*   260 */    88,   80,   90,   91,   60,   84,   76,   86,   78,   79,
 /*   270 */    72,    3,   74,   75,    6,    3,    3,    3,    6,    6,
 /*   280 */    55,   57,    3,   57,   60,   60,   60,   57,    3,   58,
 /*   290 */    60,   60,   58,   56,   60,   56,   55,   60,   55,   60,
 /*   300 */    55,   60,   55,   60,    3,   60,   57,   60,   57,   60,
 /*   310 */    57,   60,   58,   60,   60,   56,   58,   56,   60,   60,
 /*   320 */    55,   60,   55,   57,    3,   60,   60,   60,    4,  113,
 /*   330 */     6,    4,  113,    6,    3,  113,  113,    7,  109,    3,
 /*   340 */   113,  113,    3,    3,    3,  113,  113,    3,  113,  113,
 /*   350 */     7,  113,    3,  113,    3,  113,   79,  109,   75,  115,
 /*   360 */   114,  111,   75,   79,    3,    3,    3,  115,    3,    3,
 /*   370 */   115,  115,  115,  111,    7,  115,   95,   91,  115,  115,
 /*   380 */    78,  103,   74,   78,  115,  115,  115,   74,    3,    3,
 /*   390 */   115,  115,  110,    3,  114,  102,   90,   94,   72,    3,
 /*   400 */     3,    7,  114,  114,  114,  114,  114,  110,  114,  114,
 /*   410 */   114,   76,  114,  114,  114,    3,   88,   72,  114,  112,
 /*   420 */   108,  112,  112,  112,   92,  108,  112,  112,  112,  100,
 /*   430 */   112,  112,  112,   76,  112,  112,   77,  112,    3,  105,
 /*   440 */     7,   77,  105,  101,    3,  112,   86,   79,    3,    7,
 /*   450 */    78,    7,  104,  107,  107,   84,  106,    3,  106,   80,
 /*   460 */    76,    3,  104,    7,   73,   73,   97,   97,    3,   93,
 /*   470 */     7,    7,   99,   75,   99,   98,   74,    7,   98,   96,
 /*   480 */    72,    7,   65,   96,    3,   61,   65,    7,   69,   60,
 /*   490 */    60,   60,    3,   89,    7,   67,   60,   60,   60,    3,
 /*   500 */     7,   67,   63,   60,    3,    7,   66,   60,   60,    3,
 /*   510 */    59,   62,   66,   60,   64,   60,   64,    7,    7,    7,
 /*   520 */    60,   60,    7,    3,    7,    7,    7,  116,   71,   70,
 /*   530 */    68,  116,  116,    4,    4,    4,   69,  116,    4,    4,
 /*   540 */     4,    4,  116,    4,   71,    4,    4,    3,   70,   83,
 /*   550 */    82,    4,   83,   82,   77,   60,   68,   60,   73,   87,
 /*   560 */    69,   86,   70,   87,   85,   81,   84,   81,   85,   69,
 /*   570 */    80,    4,   68,   71,   71,   70,   60,   68,    4,    4,
 /*   580 */     4,   60,   60,   60,   60,   60,   60,   60,    4,    4,
 /*   590 */     4,    4,    4,    3,  116,    4,    4,    4,    4,  116,
 /*   600 */     4,    4,    4,    4,    3,  116,    4,    4,    4,    4,
 /*   610 */   116,    4,    4,    4,    4,  116,    4,    4,    4,    4,
 /*   620 */   116,    4,    4,    4,    4,  116,    4,    4,    4,    4,
 /*   630 */   116,    4,  116,  116,  116,    7,    7,    7,  116,    7,
 /*   640 */     4,    4,  116,  116,  116,    7,    4,    7,    7,  116,
 /*   650 */     4,  116,    1,    4,    7,    7,  116,  116,    4,  116,
 /*   660 */   116,  116,    7,    7,  116,  116,    7,    4,    4,  116,
 /*   670 */   116,  116,    4,  116,    7,  116,    7,    4,  116,  116,
 /*   680 */   116,    4,    7,  116,  116,    7,    4,    4,  116,    3,
 /*   690 */   116,    4,    4,    3,  116,  116,  116,  116,  116,  116,
 /*   700 */   116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
 /*   710 */   116,  116,  116,  116,
};
#define YY_SHIFT_COUNT    (334)

#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (690)
static const unsigned short int yy_shift_ofst[] = {

 /*     0 */   694,   50,   68,  213,   66,   88,   94,  107,  116,  125,
 /*    10 */   134,  143,   83,   83,   83,  220,  268,  272,  273,  161,
 /*    20 */   161,  211,  218,  274,  279,  285,  301,  211,  274,   83,
 /*    30 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*    40 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*    50 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*    60 */    83,  324,  327,  221,  321,  221,  221,  221,  221,  221,
 /*    70 */   221,  321,  221,  221,  221,  221,  221,  221,  221,  321,
 /*    80 */   330,  331,  330,  330,  330,  330,  330,  330,  331,  330,
 /*    90 */   330,  330,  330,  330,  330,  336,  339,  340,  341,  344,
 /*   100 */   336,  340,  330,  343,  349,  343,  343,  343,  343,  343,
 /*   110 */   343,  349,  343,  343,  343,  343,  343,  343,  351,  361,
 /*   120 */   362,  363,  365,  351,  362,  343,  367,  367,  366,  367,
 /*   130 */   367,  367,  367,  367,  366,  367,  367,  367,  367,  367,
 /*   140 */   367,  385,  386,  390,  396,  397,  385,  390,  367,  394,
 /*   150 */   412,  394,  412,  435,  433,  441,  336,  433,  442,  445,
 /*   160 */   351,  442,  444,  454,  385,  444,  456,  458,  456,  458,
 /*   170 */   465,  463,  340,  463,  464,  362,  464,  470,  390,  470,
 /*   180 */   474,  481,  474,  480,   83,   83,   83,  489,  487,   83,
 /*   190 */    83,   83,   83,  496,  487,  493,   83,   83,   83,  501,
 /*   200 */   493,  498,   83,   83,  506,  498,  510,  511,  512,   83,
 /*   210 */    83,  515,  480,  520,  515,  520,  412,  517,  510,  441,
 /*   220 */   517,  518,  511,  445,  518,  519,  512,  454,  519,  480,
 /*   230 */   480,  458,  510,  510,   83,   83,   83,  511,  511,   83,
 /*   240 */    83,  512,  512,   83,   83,   83,   83,   83,   83,  529,
 /*   250 */   530,  531,  534,  535,  536,  537,  539,  541,  542,  547,
 /*   260 */   567,  574,  544,  575,  576,  584,  585,  586,  587,  588,
 /*   270 */   590,  591,  592,  593,  594,  596,  597,  598,  601,  599,
 /*   280 */   602,  603,  604,  605,  607,  608,  609,  610,  612,  613,
 /*   290 */   614,  615,  617,  618,  619,  620,  622,  623,  624,  625,
 /*   300 */   627,  628,  629,  630,  636,  637,  632,  638,  640,  642,
 /*   310 */   646,  641,  647,  648,  649,  654,  655,  656,  659,  663,
 /*   320 */   664,  667,  668,  669,  673,  675,  677,  678,  682,  686,
 /*   330 */   683,  687,  688,  690,  651,
};

#define YY_REDUCE_COUNT (248)
#define YY_REDUCE_MIN   (-23)
#define YY_REDUCE_MAX   (527)
static const short yy_reduce_ofst[] = {

 /*     0 */    51,  -23,    5,   32,  118,  124,  149,  151,  154,  168,
 /*    10 */   171,  173,  162,  169,  175,   -7,   60,  103,  177,    3,
 /*    20 */   131,  167,  147,  179,  163,  172,  181,  190,  198,   40,
 /*    30 */   100,  204,   71,  176,  225,   -3,  224,  226,  230,   80,
 /*    40 */    89,  231,  234,  184,  192,  237,  239,  241,  243,  245,
 /*    50 */   247,  249,  251,  253,  254,  258,  259,  261,  265,  267,
 /*    60 */   266,   14,  105,   41,   70,  216,  219,  222,  223,  227,
 /*    70 */   228,  229,  232,  233,  235,  236,  238,  240,  242,  248,
 /*    80 */   141,  250,  244,  252,  255,  256,  257,  260,  262,  263,
 /*    90 */   264,  269,  270,  271,  275,  277,  278,  283,  281,  286,
 /*   100 */   284,  287,  276,  246,  282,  280,  288,  289,  290,  291,
 /*   110 */   292,  297,  294,  295,  296,  298,  299,  300,  302,  293,
 /*   120 */   308,  303,  306,  305,  313,  304,  307,  309,  312,  310,
 /*   130 */   311,  314,  315,  316,  317,  318,  319,  320,  322,  323,
 /*   140 */   325,  335,  329,  326,  332,  328,  357,  345,  333,  334,
 /*   150 */   359,  337,  364,  342,  346,  360,  368,  347,  350,  371,
 /*   160 */   372,  352,  348,  379,  384,  358,  369,  391,  370,  392,
 /*   170 */   376,  373,  398,  375,  377,  402,  380,  383,  408,  387,
 /*   180 */   417,  424,  421,  419,  429,  430,  431,  404,  428,   14,
 /*   190 */   436,  437,  438,  439,  434,  440,  443,  447,  448,  449,
 /*   200 */   446,  450,  453,  455,  451,  452,  457,  459,  462,  460,
 /*   210 */   461,  466,  467,  468,  469,  471,  477,  472,  473,  475,
 /*   220 */   476,  479,  478,  482,  483,  484,  488,  490,  486,  491,
 /*   230 */   500,  485,  502,  503,  495,  497,  516,  492,  505,  521,
 /*   240 */   522,  504,  509,  523,  524,  525,  495,  526,  527,
};

static const YYACTIONTYPE yy_default[] = {
 /*     0 */   904,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*    10 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*    20 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*    30 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*    40 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*    50 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*    60 */   707,  707,  707,  865,  707,  865,  865,  865,  865,  865,
 /*    70 */   865,  707,  865,  865,  865,  865,  865,  865,  865,  707,
 /*    80 */   895,  707,  895,  895,  895,  895,  895,  895,  707,  895,
 /*    90 */   895,  895,  895,  895,  895,  707,  707,  707,  707,  707,
 /*   100 */   707,  707,  895,  880,  707,  880,  880,  880,  880,  880,
 /*   110 */   880,  707,  880,  880,  880,  880,  880,  880,  707,  707,
 /*   120 */   707,  707,  707,  707,  707,  880,  850,  850,  707,  850,
 /*   130 */   850,  850,  850,  850,  707,  850,  850,  850,  850,  850,
 /*   140 */   850,  707,  707,  707,  707,  707,  707,  707,  850,  831,
 /*   150 */   707,  831,  707,  707,  837,  707,  707,  837,  834,  707,
 /*   160 */   707,  834,  828,  707,  707,  828,  815,  707,  815,  707,
 /*   170 */   707,  821,  707,  821,  818,  707,  818,  812,  707,  812,
 /*   180 */   753,  707,  753,  761,  707,  707,  707,  707,  757,  707,
 /*   190 */   707,  707,  707,  707,  757,  755,  707,  707,  707,  707,
 /*   200 */   755,  751,  707,  707,  707,  751,  765,  763,  759,  707,
 /*   210 */   707,  787,  761,  707,  787,  707,  707,  793,  765,  707,
 /*   220 */   793,  790,  763,  707,  790,  784,  759,  707,  784,  761,
 /*   230 */   761,  707,  765,  765,  707,  707,  707,  763,  763,  707,
 /*   240 */   707,  759,  759,  707,  707,  707,  748,  746,  707,  707,
 /*   250 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   260 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   270 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   280 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   290 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   300 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   310 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   320 */   707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
 /*   330 */   707,  707,  707,  707,  707,

















};
/********** End of lemon-generated parsing tables *****************************/



/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */


  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */


#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */

#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/

void ParseTrace(FILE *TraceFILE, char *zTracePrompt){

  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;

  if( yyTraceFILE==0 ) yyTracePrompt = 0;

  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "EWKT_NEWLINE",
  /*    2 */ "EWKT_POINT",
  /*    3 */ "EWKT_OPEN_BRACKET",
  /*    4 */ "EWKT_CLOSE_BRACKET",
  /*    5 */ "EWKT_POINT_M",
  /*    6 */ "EWKT_NUM",
  /*    7 */ "EWKT_COMMA",
  /*    8 */ "EWKT_LINESTRING",
  /*    9 */ "EWKT_LINESTRING_M",
  /*   10 */ "EWKT_POLYGON",
  /*   11 */ "EWKT_POLYGON_M",
  /*   12 */ "EWKT_MULTIPOINT",
  /*   13 */ "EWKT_MULTIPOINT_M",
  /*   14 */ "EWKT_MULTILINESTRING",
  /*   15 */ "EWKT_MULTILINESTRING_M",
  /*   16 */ "EWKT_MULTIPOLYGON",
  /*   17 */ "EWKT_MULTIPOLYGON_M",
  /*   18 */ "EWKT_GEOMETRYCOLLECTION",
  /*   19 */ "EWKT_GEOMETRYCOLLECTION_M",
  /*   20 */ "error",
  /*   21 */ "main",
  /*   22 */ "in",
  /*   23 */ "state",
  /*   24 */ "program",
  /*   25 */ "geo_text",
  /*   26 */ "geo_textm",
  /*   27 */ "point",
  /*   28 */ "pointz",
  /*   29 */ "pointzm",
  /*   30 */ "linestring",
  /*   31 */ "linestringz",
  /*   32 */ "linestringzm",
  /*   33 */ "polygon",
  /*   34 */ "polygonz",
  /*   35 */ "polygonzm",
  /*   36 */ "multipoint",
  /*   37 */ "multipointz",
  /*   38 */ "multipointzm",
  /*   39 */ "multilinestring",
  /*   40 */ "multilinestringz",
  /*   41 */ "multilinestringzm",
  /*   42 */ "multipolygon",
  /*   43 */ "multipolygonz",
  /*   44 */ "multipolygonzm",
  /*   45 */ "geocoll",
  /*   46 */ "geocollz",
  /*   47 */ "geocollzm",
  /*   48 */ "pointm",
  /*   49 */ "linestringm",
  /*   50 */ "polygonm",
  /*   51 */ "multipointm",
  /*   52 */ "multilinestringm",
  /*   53 */ "multipolygonm",
  /*   54 */ "geocollm",
  /*   55 */ "point_coordxy",
  /*   56 */ "point_coordxyz",
  /*   57 */ "point_coordxym",
  /*   58 */ "point_coordxyzm",
  /*   59 */ "point_brkt_coordxy",
  /*   60 */ "coord",
  /*   61 */ "point_brkt_coordxym",
  /*   62 */ "point_brkt_coordxyz",
  /*   63 */ "point_brkt_coordxyzm",
  /*   64 */ "extra_brkt_pointsxy",
  /*   65 */ "extra_brkt_pointsxym",
  /*   66 */ "extra_brkt_pointsxyz",
  /*   67 */ "extra_brkt_pointsxyzm",
  /*   68 */ "extra_pointsxy",
  /*   69 */ "extra_pointsxym",
  /*   70 */ "extra_pointsxyz",
  /*   71 */ "extra_pointsxyzm",
  /*   72 */ "linestring_text",
  /*   73 */ "linestring_textm",
  /*   74 */ "linestring_textz",
  /*   75 */ "linestring_textzm",
  /*   76 */ "polygon_text",
  /*   77 */ "polygon_textm",
  /*   78 */ "polygon_textz",
  /*   79 */ "polygon_textzm",
  /*   80 */ "ring",
  /*   81 */ "extra_rings",
  /*   82 */ "ringm",
  /*   83 */ "extra_ringsm",
  /*   84 */ "ringz",
  /*   85 */ "extra_ringsz",
  /*   86 */ "ringzm",
  /*   87 */ "extra_ringszm",
  /*   88 */ "multipoint_text",
  /*   89 */ "multipoint_textm",
  /*   90 */ "multipoint_textz",
  /*   91 */ "multipoint_textzm",
  /*   92 */ "multilinestring_text",
  /*   93 */ "multilinestring_textm",
  /*   94 */ "multilinestring_textz",
  /*   95 */ "multilinestring_textzm",
  /*   96 */ "multilinestring_text2",
  /*   97 */ "multilinestring_textm2",
  /*   98 */ "multilinestring_textz2",
  /*   99 */ "multilinestring_textzm2",
  /*  100 */ "multipolygon_text",
  /*  101 */ "multipolygon_textm",
  /*  102 */ "multipolygon_textz",
  /*  103 */ "multipolygon_textzm",
  /*  104 */ "multipolygon_text2",
  /*  105 */ "multipolygon_textm2",
  /*  106 */ "multipolygon_textz2",
  /*  107 */ "multipolygon_textzm2",
  /*  108 */ "geocoll_text",
  /*  109 */ "geocoll_textm",
  /*  110 */ "geocoll_textz",
  /*  111 */ "geocoll_textzm",
  /*  112 */ "geocoll_text2",
  /*  113 */ "geocoll_textm2",
  /*  114 */ "geocoll_textz2",
  /*  115 */ "geocoll_textzm2",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "geo_text ::= point",
 /*   1 */ "geo_text ::= pointz",
 /*   2 */ "geo_text ::= pointzm",
 /*   3 */ "geo_text ::= linestring",
 /*   4 */ "geo_text ::= linestringz",
 /*   5 */ "geo_text ::= linestringzm",
 /*   6 */ "geo_text ::= polygon",
 /*   7 */ "geo_text ::= polygonz",
 /*   8 */ "geo_text ::= polygonzm",
 /*   9 */ "geo_text ::= multipoint",
 /*  10 */ "geo_text ::= multipointz",
 /*  11 */ "geo_text ::= multipointzm",
 /*  12 */ "geo_text ::= multilinestring",
 /*  13 */ "geo_text ::= multilinestringz",
 /*  14 */ "geo_text ::= multilinestringzm",
 /*  15 */ "geo_text ::= multipolygon",
 /*  16 */ "geo_text ::= multipolygonz",
 /*  17 */ "geo_text ::= multipolygonzm",
 /*  18 */ "geo_text ::= geocoll",
 /*  19 */ "geo_text ::= geocollz",
 /*  20 */ "geo_text ::= geocollzm",
 /*  21 */ "geo_textm ::= pointm",
 /*  22 */ "geo_textm ::= linestringm",
 /*  23 */ "geo_textm ::= polygonm",
 /*  24 */ "geo_textm ::= multipointm",
 /*  25 */ "geo_textm ::= multilinestringm",
 /*  26 */ "geo_textm ::= multipolygonm",
 /*  27 */ "geo_textm ::= geocollm",
 /*  28 */ "point ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxy EWKT_CLOSE_BRACKET",
 /*  29 */ "pointz ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyz EWKT_CLOSE_BRACKET",
 /*  30 */ "pointm ::= EWKT_POINT_M EWKT_OPEN_BRACKET point_coordxym EWKT_CLOSE_BRACKET",
 /*  31 */ "pointzm ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyzm EWKT_CLOSE_BRACKET",
 /*  32 */ "point_brkt_coordxy ::= EWKT_OPEN_BRACKET coord coord EWKT_CLOSE_BRACKET",
 /*  33 */ "point_brkt_coordxym ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET",
 /*  34 */ "point_brkt_coordxyz ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET",
 /*  35 */ "point_brkt_coordxyzm ::= EWKT_OPEN_BRACKET coord coord coord coord EWKT_CLOSE_BRACKET",
 /*  36 */ "point_coordxy ::= coord coord",
 /*  37 */ "point_coordxym ::= coord coord coord",
 /*  38 */ "point_coordxyz ::= coord coord coord",
 /*  39 */ "point_coordxyzm ::= coord coord coord coord",
 /*  40 */ "coord ::= EWKT_NUM",
 /*  41 */ "extra_brkt_pointsxy ::=",
 /*  42 */ "extra_brkt_pointsxy ::= EWKT_COMMA point_brkt_coordxy extra_brkt_pointsxy",
 /*  43 */ "extra_brkt_pointsxym ::=",
 /*  44 */ "extra_brkt_pointsxym ::= EWKT_COMMA point_brkt_coordxym extra_brkt_pointsxym",
 /*  45 */ "extra_brkt_pointsxyz ::=",
 /*  46 */ "extra_brkt_pointsxyz ::= EWKT_COMMA point_brkt_coordxyz extra_brkt_pointsxyz",
 /*  47 */ "extra_brkt_pointsxyzm ::=",
 /*  48 */ "extra_brkt_pointsxyzm ::= EWKT_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm",
 /*  49 */ "extra_pointsxy ::=",
 /*  50 */ "extra_pointsxy ::= EWKT_COMMA point_coordxy extra_pointsxy",
 /*  51 */ "extra_pointsxym ::=",
 /*  52 */ "extra_pointsxym ::= EWKT_COMMA point_coordxym extra_pointsxym",
 /*  53 */ "extra_pointsxyz ::=",
 /*  54 */ "extra_pointsxyz ::= EWKT_COMMA point_coordxyz extra_pointsxyz",
 /*  55 */ "extra_pointsxyzm ::=",
 /*  56 */ "extra_pointsxyzm ::= EWKT_COMMA point_coordxyzm extra_pointsxyzm",
 /*  57 */ "linestring ::= EWKT_LINESTRING linestring_text",
 /*  58 */ "linestringm ::= EWKT_LINESTRING_M linestring_textm",
 /*  59 */ "linestringz ::= EWKT_LINESTRING linestring_textz",
 /*  60 */ "linestringzm ::= EWKT_LINESTRING linestring_textzm",
 /*  61 */ "linestring_text ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET",
 /*  62 */ "linestring_textm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET",
 /*  63 */ "linestring_textz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET",
 /*  64 */ "linestring_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET",
 /*  65 */ "polygon ::= EWKT_POLYGON polygon_text",
 /*  66 */ "polygonm ::= EWKT_POLYGON_M polygon_textm",
 /*  67 */ "polygonz ::= EWKT_POLYGON polygon_textz",
 /*  68 */ "polygonzm ::= EWKT_POLYGON polygon_textzm",
 /*  69 */ "polygon_text ::= EWKT_OPEN_BRACKET ring extra_rings EWKT_CLOSE_BRACKET",
 /*  70 */ "polygon_textm ::= EWKT_OPEN_BRACKET ringm extra_ringsm EWKT_CLOSE_BRACKET",
 /*  71 */ "polygon_textz ::= EWKT_OPEN_BRACKET ringz extra_ringsz EWKT_CLOSE_BRACKET",
 /*  72 */ "polygon_textzm ::= EWKT_OPEN_BRACKET ringzm extra_ringszm EWKT_CLOSE_BRACKET",
 /*  73 */ "ring ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET",
 /*  74 */ "extra_rings ::=",
 /*  75 */ "extra_rings ::= EWKT_COMMA ring extra_rings",
 /*  76 */ "ringm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET",
 /*  77 */ "extra_ringsm ::=",
 /*  78 */ "extra_ringsm ::= EWKT_COMMA ringm extra_ringsm",
 /*  79 */ "ringz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET",
 /*  80 */ "extra_ringsz ::=",
 /*  81 */ "extra_ringsz ::= EWKT_COMMA ringz extra_ringsz",
 /*  82 */ "ringzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET",
 /*  83 */ "extra_ringszm ::=",
 /*  84 */ "extra_ringszm ::= EWKT_COMMA ringzm extra_ringszm",
 /*  85 */ "multipoint ::= EWKT_MULTIPOINT multipoint_text",
 /*  86 */ "multipointm ::= EWKT_MULTIPOINT_M multipoint_textm",
 /*  87 */ "multipointz ::= EWKT_MULTIPOINT multipoint_textz",
 /*  88 */ "multipointzm ::= EWKT_MULTIPOINT multipoint_textzm",
 /*  89 */ "multipoint_text ::= EWKT_OPEN_BRACKET point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET",
 /*  90 */ "multipoint_textm ::= EWKT_OPEN_BRACKET point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET",
 /*  91 */ "multipoint_textz ::= EWKT_OPEN_BRACKET point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET",
 /*  92 */ "multipoint_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET",
 /*  93 */ "multipoint_text ::= EWKT_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy EWKT_CLOSE_BRACKET",
 /*  94 */ "multipoint_textm ::= EWKT_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym EWKT_CLOSE_BRACKET",
 /*  95 */ "multipoint_textz ::= EWKT_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz EWKT_CLOSE_BRACKET",
 /*  96 */ "multipoint_textzm ::= EWKT_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm EWKT_CLOSE_BRACKET",
 /*  97 */ "multilinestring ::= EWKT_MULTILINESTRING multilinestring_text",
 /*  98 */ "multilinestringm ::= EWKT_MULTILINESTRING_M multilinestring_textm",
 /*  99 */ "multilinestringz ::= EWKT_MULTILINESTRING multilinestring_textz",
 /* 100 */ "multilinestringzm ::= EWKT_MULTILINESTRING multilinestring_textzm",
 /* 101 */ "multilinestring_text ::= EWKT_OPEN_BRACKET linestring_text multilinestring_text2 EWKT_CLOSE_BRACKET",
 /* 102 */ "multilinestring_text2 ::=",
 /* 103 */ "multilinestring_text2 ::= EWKT_COMMA linestring_text multilinestring_text2",
 /* 104 */ "multilinestring_textm ::= EWKT_OPEN_BRACKET linestring_textm multilinestring_textm2 EWKT_CLOSE_BRACKET",
 /* 105 */ "multilinestring_textm2 ::=",
 /* 106 */ "multilinestring_textm2 ::= EWKT_COMMA linestring_textm multilinestring_textm2",
 /* 107 */ "multilinestring_textz ::= EWKT_OPEN_BRACKET linestring_textz multilinestring_textz2 EWKT_CLOSE_BRACKET",
 /* 108 */ "multilinestring_textz2 ::=",
 /* 109 */ "multilinestring_textz2 ::= EWKT_COMMA linestring_textz multilinestring_textz2",
 /* 110 */ "multilinestring_textzm ::= EWKT_OPEN_BRACKET linestring_textzm multilinestring_textzm2 EWKT_CLOSE_BRACKET",
 /* 111 */ "multilinestring_textzm2 ::=",
 /* 112 */ "multilinestring_textzm2 ::= EWKT_COMMA linestring_textzm multilinestring_textzm2",
 /* 113 */ "multipolygon ::= EWKT_MULTIPOLYGON multipolygon_text",
 /* 114 */ "multipolygonm ::= EWKT_MULTIPOLYGON_M multipolygon_textm",
 /* 115 */ "multipolygonz ::= EWKT_MULTIPOLYGON multipolygon_textz",
 /* 116 */ "multipolygonzm ::= EWKT_MULTIPOLYGON multipolygon_textzm",
 /* 117 */ "multipolygon_text ::= EWKT_OPEN_BRACKET polygon_text multipolygon_text2 EWKT_CLOSE_BRACKET",
 /* 118 */ "multipolygon_text2 ::=",
 /* 119 */ "multipolygon_text2 ::= EWKT_COMMA polygon_text multipolygon_text2",
 /* 120 */ "multipolygon_textm ::= EWKT_OPEN_BRACKET polygon_textm multipolygon_textm2 EWKT_CLOSE_BRACKET",
 /* 121 */ "multipolygon_textm2 ::=",
 /* 122 */ "multipolygon_textm2 ::= EWKT_COMMA polygon_textm multipolygon_textm2",
 /* 123 */ "multipolygon_textz ::= EWKT_OPEN_BRACKET polygon_textz multipolygon_textz2 EWKT_CLOSE_BRACKET",
 /* 124 */ "multipolygon_textz2 ::=",
 /* 125 */ "multipolygon_textz2 ::= EWKT_COMMA polygon_textz multipolygon_textz2",
 /* 126 */ "multipolygon_textzm ::= EWKT_OPEN_BRACKET polygon_textzm multipolygon_textzm2 EWKT_CLOSE_BRACKET",
 /* 127 */ "multipolygon_textzm2 ::=",
 /* 128 */ "multipolygon_textzm2 ::= EWKT_COMMA polygon_textzm multipolygon_textzm2",
 /* 129 */ "geocoll ::= EWKT_GEOMETRYCOLLECTION geocoll_text",
 /* 130 */ "geocollm ::= EWKT_GEOMETRYCOLLECTION_M geocoll_textm",
 /* 131 */ "geocollz ::= EWKT_GEOMETRYCOLLECTION geocoll_textz",
 /* 132 */ "geocollzm ::= EWKT_GEOMETRYCOLLECTION geocoll_textzm",
 /* 133 */ "geocoll_text ::= EWKT_OPEN_BRACKET point geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 134 */ "geocoll_text ::= EWKT_OPEN_BRACKET linestring geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 135 */ "geocoll_text ::= EWKT_OPEN_BRACKET polygon geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 136 */ "geocoll_text ::= EWKT_OPEN_BRACKET multipoint geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 137 */ "geocoll_text ::= EWKT_OPEN_BRACKET multilinestring geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 138 */ "geocoll_text ::= EWKT_OPEN_BRACKET multipolygon geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 139 */ "geocoll_text ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 EWKT_CLOSE_BRACKET",
 /* 140 */ "geocoll_text2 ::=",
 /* 141 */ "geocoll_text2 ::= EWKT_COMMA point geocoll_text2",
 /* 142 */ "geocoll_text2 ::= EWKT_COMMA linestring geocoll_text2",
 /* 143 */ "geocoll_text2 ::= EWKT_COMMA polygon geocoll_text2",
 /* 144 */ "geocoll_text2 ::= EWKT_COMMA multipoint geocoll_text2",
 /* 145 */ "geocoll_text2 ::= EWKT_COMMA multilinestring geocoll_text2",
 /* 146 */ "geocoll_text2 ::= EWKT_COMMA multipolygon geocoll_text2",
 /* 147 */ "geocoll_text2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2",
 /* 148 */ "geocoll_textm ::= EWKT_OPEN_BRACKET pointm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 149 */ "geocoll_textm ::= EWKT_OPEN_BRACKET linestringm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 150 */ "geocoll_textm ::= EWKT_OPEN_BRACKET polygonm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 151 */ "geocoll_textm ::= EWKT_OPEN_BRACKET multipointm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 152 */ "geocoll_textm ::= EWKT_OPEN_BRACKET multilinestringm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 153 */ "geocoll_textm ::= EWKT_OPEN_BRACKET multipolygonm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 154 */ "geocoll_textm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 EWKT_CLOSE_BRACKET",
 /* 155 */ "geocoll_textm2 ::=",
 /* 156 */ "geocoll_textm2 ::= EWKT_COMMA pointm geocoll_textm2",
 /* 157 */ "geocoll_textm2 ::= EWKT_COMMA linestringm geocoll_textm2",
 /* 158 */ "geocoll_textm2 ::= EWKT_COMMA polygonm geocoll_textm2",
 /* 159 */ "geocoll_textm2 ::= EWKT_COMMA multipointm geocoll_textm2",
 /* 160 */ "geocoll_textm2 ::= EWKT_COMMA multilinestringm geocoll_textm2",
 /* 161 */ "geocoll_textm2 ::= EWKT_COMMA multipolygonm geocoll_textm2",
 /* 162 */ "geocoll_textm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2",
 /* 163 */ "geocoll_textz ::= EWKT_OPEN_BRACKET pointz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 164 */ "geocoll_textz ::= EWKT_OPEN_BRACKET linestringz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 165 */ "geocoll_textz ::= EWKT_OPEN_BRACKET polygonz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 166 */ "geocoll_textz ::= EWKT_OPEN_BRACKET multipointz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 167 */ "geocoll_textz ::= EWKT_OPEN_BRACKET multilinestringz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 168 */ "geocoll_textz ::= EWKT_OPEN_BRACKET multipolygonz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 169 */ "geocoll_textz ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 EWKT_CLOSE_BRACKET",
 /* 170 */ "geocoll_textz2 ::=",
 /* 171 */ "geocoll_textz2 ::= EWKT_COMMA pointz geocoll_textz2",
 /* 172 */ "geocoll_textz2 ::= EWKT_COMMA linestringz geocoll_textz2",
 /* 173 */ "geocoll_textz2 ::= EWKT_COMMA polygonz geocoll_textz2",
 /* 174 */ "geocoll_textz2 ::= EWKT_COMMA multipointz geocoll_textz2",
 /* 175 */ "geocoll_textz2 ::= EWKT_COMMA multilinestringz geocoll_textz2",
 /* 176 */ "geocoll_textz2 ::= EWKT_COMMA multipolygonz geocoll_textz2",
 /* 177 */ "geocoll_textz2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2",
 /* 178 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET pointzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 179 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET linestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 180 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET polygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 181 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET multipointzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 182 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET multilinestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 183 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET multipolygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 184 */ "geocoll_textzm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
 /* 185 */ "geocoll_textzm2 ::=",
 /* 186 */ "geocoll_textzm2 ::= EWKT_COMMA pointzm geocoll_textzm2",
 /* 187 */ "geocoll_textzm2 ::= EWKT_COMMA linestringzm geocoll_textzm2",
 /* 188 */ "geocoll_textzm2 ::= EWKT_COMMA polygonzm geocoll_textzm2",
 /* 189 */ "geocoll_textzm2 ::= EWKT_COMMA multipointzm geocoll_textzm2",
 /* 190 */ "geocoll_textzm2 ::= EWKT_COMMA multilinestringzm geocoll_textzm2",
 /* 191 */ "geocoll_textzm2 ::= EWKT_COMMA multipolygonzm geocoll_textzm2",
 /* 192 */ "geocoll_textzm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2",
 /* 193 */ "main ::= in",
 /* 194 */ "in ::=",
 /* 195 */ "in ::= in state EWKT_NEWLINE",
 /* 196 */ "state ::= program",
 /* 197 */ "program ::= geo_text",
 /* 198 */ "program ::= geo_textm",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
static void ParseInit(void *yypParser){
  yyParser *pParser = (yyParser*)yypParser;
#ifdef YYTRACKMAXSTACKDEPTH
  pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  pParser->yytos = NULL;
  pParser->yystack = NULL;
  pParser->yystksz = 0;
  if( yyGrowStack(pParser) ){
    pParser->yystack = &pParser->yystk0;
    pParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  pParser->yyerrcnt = -1;
#endif
  pParser->yytos = pParser->yystack;
  pParser->yystack[0].stateno = 0;
  pParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ) ParseInit(pParser);
  return pParser;
}
#endif /* Parse_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
static void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.




*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){


  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){


    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );

#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );


  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){


    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );

  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){


   ParseARG_FETCH;

#ifndef NDEBUG
   if( yyTraceFILE ){

     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);


   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/

     spatialite_e( "Giving up.  Parser stack overflow\n");
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
  {   25,   -1 }, /* (0) geo_text ::= point */
  {   25,   -1 }, /* (1) geo_text ::= pointz */
  {   25,   -1 }, /* (2) geo_text ::= pointzm */
  {   25,   -1 }, /* (3) geo_text ::= linestring */
  {   25,   -1 }, /* (4) geo_text ::= linestringz */
  {   25,   -1 }, /* (5) geo_text ::= linestringzm */
  {   25,   -1 }, /* (6) geo_text ::= polygon */
  {   25,   -1 }, /* (7) geo_text ::= polygonz */
  {   25,   -1 }, /* (8) geo_text ::= polygonzm */
  {   25,   -1 }, /* (9) geo_text ::= multipoint */
  {   25,   -1 }, /* (10) geo_text ::= multipointz */
  {   25,   -1 }, /* (11) geo_text ::= multipointzm */
  {   25,   -1 }, /* (12) geo_text ::= multilinestring */
  {   25,   -1 }, /* (13) geo_text ::= multilinestringz */
  {   25,   -1 }, /* (14) geo_text ::= multilinestringzm */
  {   25,   -1 }, /* (15) geo_text ::= multipolygon */
  {   25,   -1 }, /* (16) geo_text ::= multipolygonz */
  {   25,   -1 }, /* (17) geo_text ::= multipolygonzm */
  {   25,   -1 }, /* (18) geo_text ::= geocoll */
  {   25,   -1 }, /* (19) geo_text ::= geocollz */
  {   25,   -1 }, /* (20) geo_text ::= geocollzm */
  {   26,   -1 }, /* (21) geo_textm ::= pointm */
  {   26,   -1 }, /* (22) geo_textm ::= linestringm */
  {   26,   -1 }, /* (23) geo_textm ::= polygonm */
  {   26,   -1 }, /* (24) geo_textm ::= multipointm */
  {   26,   -1 }, /* (25) geo_textm ::= multilinestringm */
  {   26,   -1 }, /* (26) geo_textm ::= multipolygonm */
  {   26,   -1 }, /* (27) geo_textm ::= geocollm */
  {   27,   -4 }, /* (28) point ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxy EWKT_CLOSE_BRACKET */
  {   28,   -4 }, /* (29) pointz ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyz EWKT_CLOSE_BRACKET */
  {   48,   -4 }, /* (30) pointm ::= EWKT_POINT_M EWKT_OPEN_BRACKET point_coordxym EWKT_CLOSE_BRACKET */
  {   29,   -4 }, /* (31) pointzm ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyzm EWKT_CLOSE_BRACKET */
  {   59,   -4 }, /* (32) point_brkt_coordxy ::= EWKT_OPEN_BRACKET coord coord EWKT_CLOSE_BRACKET */
  {   61,   -5 }, /* (33) point_brkt_coordxym ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET */
  {   62,   -5 }, /* (34) point_brkt_coordxyz ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET */
  {   63,   -6 }, /* (35) point_brkt_coordxyzm ::= EWKT_OPEN_BRACKET coord coord coord coord EWKT_CLOSE_BRACKET */
  {   55,   -2 }, /* (36) point_coordxy ::= coord coord */
  {   57,   -3 }, /* (37) point_coordxym ::= coord coord coord */
  {   56,   -3 }, /* (38) point_coordxyz ::= coord coord coord */
  {   58,   -4 }, /* (39) point_coordxyzm ::= coord coord coord coord */
  {   60,   -1 }, /* (40) coord ::= EWKT_NUM */
  {   64,    0 }, /* (41) extra_brkt_pointsxy ::= */
  {   64,   -3 }, /* (42) extra_brkt_pointsxy ::= EWKT_COMMA point_brkt_coordxy extra_brkt_pointsxy */
  {   65,    0 }, /* (43) extra_brkt_pointsxym ::= */
  {   65,   -3 }, /* (44) extra_brkt_pointsxym ::= EWKT_COMMA point_brkt_coordxym extra_brkt_pointsxym */
  {   66,    0 }, /* (45) extra_brkt_pointsxyz ::= */
  {   66,   -3 }, /* (46) extra_brkt_pointsxyz ::= EWKT_COMMA point_brkt_coordxyz extra_brkt_pointsxyz */
  {   67,    0 }, /* (47) extra_brkt_pointsxyzm ::= */
  {   67,   -3 }, /* (48) extra_brkt_pointsxyzm ::= EWKT_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm */
  {   68,    0 }, /* (49) extra_pointsxy ::= */
  {   68,   -3 }, /* (50) extra_pointsxy ::= EWKT_COMMA point_coordxy extra_pointsxy */
  {   69,    0 }, /* (51) extra_pointsxym ::= */
  {   69,   -3 }, /* (52) extra_pointsxym ::= EWKT_COMMA point_coordxym extra_pointsxym */
  {   70,    0 }, /* (53) extra_pointsxyz ::= */
  {   70,   -3 }, /* (54) extra_pointsxyz ::= EWKT_COMMA point_coordxyz extra_pointsxyz */
  {   71,    0 }, /* (55) extra_pointsxyzm ::= */
  {   71,   -3 }, /* (56) extra_pointsxyzm ::= EWKT_COMMA point_coordxyzm extra_pointsxyzm */
  {   30,   -2 }, /* (57) linestring ::= EWKT_LINESTRING linestring_text */
  {   49,   -2 }, /* (58) linestringm ::= EWKT_LINESTRING_M linestring_textm */
  {   31,   -2 }, /* (59) linestringz ::= EWKT_LINESTRING linestring_textz */
  {   32,   -2 }, /* (60) linestringzm ::= EWKT_LINESTRING linestring_textzm */
  {   72,   -6 }, /* (61) linestring_text ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
  {   73,   -6 }, /* (62) linestring_textm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
  {   74,   -6 }, /* (63) linestring_textz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
  {   75,   -6 }, /* (64) linestring_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
  {   33,   -2 }, /* (65) polygon ::= EWKT_POLYGON polygon_text */
  {   50,   -2 }, /* (66) polygonm ::= EWKT_POLYGON_M polygon_textm */
  {   34,   -2 }, /* (67) polygonz ::= EWKT_POLYGON polygon_textz */
  {   35,   -2 }, /* (68) polygonzm ::= EWKT_POLYGON polygon_textzm */
  {   76,   -4 }, /* (69) polygon_text ::= EWKT_OPEN_BRACKET ring extra_rings EWKT_CLOSE_BRACKET */
  {   77,   -4 }, /* (70) polygon_textm ::= EWKT_OPEN_BRACKET ringm extra_ringsm EWKT_CLOSE_BRACKET */
  {   78,   -4 }, /* (71) polygon_textz ::= EWKT_OPEN_BRACKET ringz extra_ringsz EWKT_CLOSE_BRACKET */
  {   79,   -4 }, /* (72) polygon_textzm ::= EWKT_OPEN_BRACKET ringzm extra_ringszm EWKT_CLOSE_BRACKET */
  {   80,  -10 }, /* (73) ring ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
  {   81,    0 }, /* (74) extra_rings ::= */
  {   81,   -3 }, /* (75) extra_rings ::= EWKT_COMMA ring extra_rings */
  {   82,  -10 }, /* (76) ringm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
  {   83,    0 }, /* (77) extra_ringsm ::= */
  {   83,   -3 }, /* (78) extra_ringsm ::= EWKT_COMMA ringm extra_ringsm */
  {   84,  -10 }, /* (79) ringz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
  {   85,    0 }, /* (80) extra_ringsz ::= */
  {   85,   -3 }, /* (81) extra_ringsz ::= EWKT_COMMA ringz extra_ringsz */
  {   86,  -10 }, /* (82) ringzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
  {   87,    0 }, /* (83) extra_ringszm ::= */
  {   87,   -3 }, /* (84) extra_ringszm ::= EWKT_COMMA ringzm extra_ringszm */
  {   36,   -2 }, /* (85) multipoint ::= EWKT_MULTIPOINT multipoint_text */
  {   51,   -2 }, /* (86) multipointm ::= EWKT_MULTIPOINT_M multipoint_textm */
  {   37,   -2 }, /* (87) multipointz ::= EWKT_MULTIPOINT multipoint_textz */
  {   38,   -2 }, /* (88) multipointzm ::= EWKT_MULTIPOINT multipoint_textzm */
  {   88,   -4 }, /* (89) multipoint_text ::= EWKT_OPEN_BRACKET point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
  {   89,   -4 }, /* (90) multipoint_textm ::= EWKT_OPEN_BRACKET point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
  {   90,   -4 }, /* (91) multipoint_textz ::= EWKT_OPEN_BRACKET point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
  {   91,   -4 }, /* (92) multipoint_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
  {   88,   -4 }, /* (93) multipoint_text ::= EWKT_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy EWKT_CLOSE_BRACKET */
  {   89,   -4 }, /* (94) multipoint_textm ::= EWKT_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym EWKT_CLOSE_BRACKET */
  {   90,   -4 }, /* (95) multipoint_textz ::= EWKT_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz EWKT_CLOSE_BRACKET */
  {   91,   -4 }, /* (96) multipoint_textzm ::= EWKT_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm EWKT_CLOSE_BRACKET */
  {   39,   -2 }, /* (97) multilinestring ::= EWKT_MULTILINESTRING multilinestring_text */
  {   52,   -2 }, /* (98) multilinestringm ::= EWKT_MULTILINESTRING_M multilinestring_textm */
  {   40,   -2 }, /* (99) multilinestringz ::= EWKT_MULTILINESTRING multilinestring_textz */
  {   41,   -2 }, /* (100) multilinestringzm ::= EWKT_MULTILINESTRING multilinestring_textzm */
  {   92,   -4 }, /* (101) multilinestring_text ::= EWKT_OPEN_BRACKET linestring_text multilinestring_text2 EWKT_CLOSE_BRACKET */
  {   96,    0 }, /* (102) multilinestring_text2 ::= */
  {   96,   -3 }, /* (103) multilinestring_text2 ::= EWKT_COMMA linestring_text multilinestring_text2 */
  {   93,   -4 }, /* (104) multilinestring_textm ::= EWKT_OPEN_BRACKET linestring_textm multilinestring_textm2 EWKT_CLOSE_BRACKET */
  {   97,    0 }, /* (105) multilinestring_textm2 ::= */
  {   97,   -3 }, /* (106) multilinestring_textm2 ::= EWKT_COMMA linestring_textm multilinestring_textm2 */
  {   94,   -4 }, /* (107) multilinestring_textz ::= EWKT_OPEN_BRACKET linestring_textz multilinestring_textz2 EWKT_CLOSE_BRACKET */
  {   98,    0 }, /* (108) multilinestring_textz2 ::= */
  {   98,   -3 }, /* (109) multilinestring_textz2 ::= EWKT_COMMA linestring_textz multilinestring_textz2 */
  {   95,   -4 }, /* (110) multilinestring_textzm ::= EWKT_OPEN_BRACKET linestring_textzm multilinestring_textzm2 EWKT_CLOSE_BRACKET */
  {   99,    0 }, /* (111) multilinestring_textzm2 ::= */
  {   99,   -3 }, /* (112) multilinestring_textzm2 ::= EWKT_COMMA linestring_textzm multilinestring_textzm2 */
  {   42,   -2 }, /* (113) multipolygon ::= EWKT_MULTIPOLYGON multipolygon_text */
  {   53,   -2 }, /* (114) multipolygonm ::= EWKT_MULTIPOLYGON_M multipolygon_textm */
  {   43,   -2 }, /* (115) multipolygonz ::= EWKT_MULTIPOLYGON multipolygon_textz */
  {   44,   -2 }, /* (116) multipolygonzm ::= EWKT_MULTIPOLYGON multipolygon_textzm */
  {  100,   -4 }, /* (117) multipolygon_text ::= EWKT_OPEN_BRACKET polygon_text multipolygon_text2 EWKT_CLOSE_BRACKET */
  {  104,    0 }, /* (118) multipolygon_text2 ::= */
  {  104,   -3 }, /* (119) multipolygon_text2 ::= EWKT_COMMA polygon_text multipolygon_text2 */
  {  101,   -4 }, /* (120) multipolygon_textm ::= EWKT_OPEN_BRACKET polygon_textm multipolygon_textm2 EWKT_CLOSE_BRACKET */
  {  105,    0 }, /* (121) multipolygon_textm2 ::= */
  {  105,   -3 }, /* (122) multipolygon_textm2 ::= EWKT_COMMA polygon_textm multipolygon_textm2 */
  {  102,   -4 }, /* (123) multipolygon_textz ::= EWKT_OPEN_BRACKET polygon_textz multipolygon_textz2 EWKT_CLOSE_BRACKET */
  {  106,    0 }, /* (124) multipolygon_textz2 ::= */
  {  106,   -3 }, /* (125) multipolygon_textz2 ::= EWKT_COMMA polygon_textz multipolygon_textz2 */
  {  103,   -4 }, /* (126) multipolygon_textzm ::= EWKT_OPEN_BRACKET polygon_textzm multipolygon_textzm2 EWKT_CLOSE_BRACKET */
  {  107,    0 }, /* (127) multipolygon_textzm2 ::= */
  {  107,   -3 }, /* (128) multipolygon_textzm2 ::= EWKT_COMMA polygon_textzm multipolygon_textzm2 */
  {   45,   -2 }, /* (129) geocoll ::= EWKT_GEOMETRYCOLLECTION geocoll_text */
  {   54,   -2 }, /* (130) geocollm ::= EWKT_GEOMETRYCOLLECTION_M geocoll_textm */
  {   46,   -2 }, /* (131) geocollz ::= EWKT_GEOMETRYCOLLECTION geocoll_textz */
  {   47,   -2 }, /* (132) geocollzm ::= EWKT_GEOMETRYCOLLECTION geocoll_textzm */
  {  108,   -4 }, /* (133) geocoll_text ::= EWKT_OPEN_BRACKET point geocoll_text2 EWKT_CLOSE_BRACKET */
  {  108,   -4 }, /* (134) geocoll_text ::= EWKT_OPEN_BRACKET linestring geocoll_text2 EWKT_CLOSE_BRACKET */
  {  108,   -4 }, /* (135) geocoll_text ::= EWKT_OPEN_BRACKET polygon geocoll_text2 EWKT_CLOSE_BRACKET */
  {  108,   -4 }, /* (136) geocoll_text ::= EWKT_OPEN_BRACKET multipoint geocoll_text2 EWKT_CLOSE_BRACKET */
  {  108,   -4 }, /* (137) geocoll_text ::= EWKT_OPEN_BRACKET multilinestring geocoll_text2 EWKT_CLOSE_BRACKET */
  {  108,   -4 }, /* (138) geocoll_text ::= EWKT_OPEN_BRACKET multipolygon geocoll_text2 EWKT_CLOSE_BRACKET */
  {  108,   -5 }, /* (139) geocoll_text ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 EWKT_CLOSE_BRACKET */
  {  112,    0 }, /* (140) geocoll_text2 ::= */
  {  112,   -3 }, /* (141) geocoll_text2 ::= EWKT_COMMA point geocoll_text2 */
  {  112,   -3 }, /* (142) geocoll_text2 ::= EWKT_COMMA linestring geocoll_text2 */
  {  112,   -3 }, /* (143) geocoll_text2 ::= EWKT_COMMA polygon geocoll_text2 */
  {  112,   -3 }, /* (144) geocoll_text2 ::= EWKT_COMMA multipoint geocoll_text2 */
  {  112,   -3 }, /* (145) geocoll_text2 ::= EWKT_COMMA multilinestring geocoll_text2 */
  {  112,   -3 }, /* (146) geocoll_text2 ::= EWKT_COMMA multipolygon geocoll_text2 */
  {  112,   -4 }, /* (147) geocoll_text2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 */
  {  109,   -4 }, /* (148) geocoll_textm ::= EWKT_OPEN_BRACKET pointm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  109,   -4 }, /* (149) geocoll_textm ::= EWKT_OPEN_BRACKET linestringm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  109,   -4 }, /* (150) geocoll_textm ::= EWKT_OPEN_BRACKET polygonm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  109,   -4 }, /* (151) geocoll_textm ::= EWKT_OPEN_BRACKET multipointm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  109,   -4 }, /* (152) geocoll_textm ::= EWKT_OPEN_BRACKET multilinestringm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  109,   -4 }, /* (153) geocoll_textm ::= EWKT_OPEN_BRACKET multipolygonm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  109,   -5 }, /* (154) geocoll_textm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 EWKT_CLOSE_BRACKET */
  {  113,    0 }, /* (155) geocoll_textm2 ::= */
  {  113,   -3 }, /* (156) geocoll_textm2 ::= EWKT_COMMA pointm geocoll_textm2 */
  {  113,   -3 }, /* (157) geocoll_textm2 ::= EWKT_COMMA linestringm geocoll_textm2 */
  {  113,   -3 }, /* (158) geocoll_textm2 ::= EWKT_COMMA polygonm geocoll_textm2 */
  {  113,   -3 }, /* (159) geocoll_textm2 ::= EWKT_COMMA multipointm geocoll_textm2 */
  {  113,   -3 }, /* (160) geocoll_textm2 ::= EWKT_COMMA multilinestringm geocoll_textm2 */
  {  113,   -3 }, /* (161) geocoll_textm2 ::= EWKT_COMMA multipolygonm geocoll_textm2 */
  {  113,   -4 }, /* (162) geocoll_textm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 */
  {  110,   -4 }, /* (163) geocoll_textz ::= EWKT_OPEN_BRACKET pointz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  110,   -4 }, /* (164) geocoll_textz ::= EWKT_OPEN_BRACKET linestringz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  110,   -4 }, /* (165) geocoll_textz ::= EWKT_OPEN_BRACKET polygonz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  110,   -4 }, /* (166) geocoll_textz ::= EWKT_OPEN_BRACKET multipointz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  110,   -4 }, /* (167) geocoll_textz ::= EWKT_OPEN_BRACKET multilinestringz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  110,   -4 }, /* (168) geocoll_textz ::= EWKT_OPEN_BRACKET multipolygonz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  110,   -5 }, /* (169) geocoll_textz ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 EWKT_CLOSE_BRACKET */
  {  114,    0 }, /* (170) geocoll_textz2 ::= */
  {  114,   -3 }, /* (171) geocoll_textz2 ::= EWKT_COMMA pointz geocoll_textz2 */
  {  114,   -3 }, /* (172) geocoll_textz2 ::= EWKT_COMMA linestringz geocoll_textz2 */
  {  114,   -3 }, /* (173) geocoll_textz2 ::= EWKT_COMMA polygonz geocoll_textz2 */
  {  114,   -3 }, /* (174) geocoll_textz2 ::= EWKT_COMMA multipointz geocoll_textz2 */
  {  114,   -3 }, /* (175) geocoll_textz2 ::= EWKT_COMMA multilinestringz geocoll_textz2 */
  {  114,   -3 }, /* (176) geocoll_textz2 ::= EWKT_COMMA multipolygonz geocoll_textz2 */
  {  114,   -4 }, /* (177) geocoll_textz2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 */
  {  111,   -4 }, /* (178) geocoll_textzm ::= EWKT_OPEN_BRACKET pointzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  111,   -4 }, /* (179) geocoll_textzm ::= EWKT_OPEN_BRACKET linestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  111,   -4 }, /* (180) geocoll_textzm ::= EWKT_OPEN_BRACKET polygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  111,   -4 }, /* (181) geocoll_textzm ::= EWKT_OPEN_BRACKET multipointzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  111,   -4 }, /* (182) geocoll_textzm ::= EWKT_OPEN_BRACKET multilinestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  111,   -4 }, /* (183) geocoll_textzm ::= EWKT_OPEN_BRACKET multipolygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  111,   -5 }, /* (184) geocoll_textzm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
  {  115,    0 }, /* (185) geocoll_textzm2 ::= */
  {  115,   -3 }, /* (186) geocoll_textzm2 ::= EWKT_COMMA pointzm geocoll_textzm2 */
  {  115,   -3 }, /* (187) geocoll_textzm2 ::= EWKT_COMMA linestringzm geocoll_textzm2 */
  {  115,   -3 }, /* (188) geocoll_textzm2 ::= EWKT_COMMA polygonzm geocoll_textzm2 */
  {  115,   -3 }, /* (189) geocoll_textzm2 ::= EWKT_COMMA multipointzm geocoll_textzm2 */
  {  115,   -3 }, /* (190) geocoll_textzm2 ::= EWKT_COMMA multilinestringzm geocoll_textzm2 */
  {  115,   -3 }, /* (191) geocoll_textzm2 ::= EWKT_COMMA multipolygonzm geocoll_textzm2 */
  {  115,   -4 }, /* (192) geocoll_textzm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 */
  {   21,   -1 }, /* (193) main ::= in */
  {   22,    0 }, /* (194) in ::= */
  {   22,   -3 }, /* (195) in ::= in state EWKT_NEWLINE */
  {   23,   -1 }, /* (196) state ::= program */
  {   24,   -1 }, /* (197) program ::= geo_text */
  {   24,   -1 }, /* (198) program ::= geo_textm */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* geo_text ::= point */
      case 1: /* geo_text ::= pointz */ yytestcase(yyruleno==1);
      case 2: /* geo_text ::= pointzm */ yytestcase(yyruleno==2);
      case 3: /* geo_text ::= linestring */ yytestcase(yyruleno==3);
      case 4: /* geo_text ::= linestringz */ yytestcase(yyruleno==4);
      case 5: /* geo_text ::= linestringzm */ yytestcase(yyruleno==5);
      case 6: /* geo_text ::= polygon */ yytestcase(yyruleno==6);
      case 7: /* geo_text ::= polygonz */ yytestcase(yyruleno==7);
      case 8: /* geo_text ::= polygonzm */ yytestcase(yyruleno==8);
      case 9: /* geo_text ::= multipoint */ yytestcase(yyruleno==9);
      case 10: /* geo_text ::= multipointz */ yytestcase(yyruleno==10);
      case 11: /* geo_text ::= multipointzm */ yytestcase(yyruleno==11);
      case 12: /* geo_text ::= multilinestring */ yytestcase(yyruleno==12);
      case 13: /* geo_text ::= multilinestringz */ yytestcase(yyruleno==13);
      case 14: /* geo_text ::= multilinestringzm */ yytestcase(yyruleno==14);
      case 15: /* geo_text ::= multipolygon */ yytestcase(yyruleno==15);
      case 16: /* geo_text ::= multipolygonz */ yytestcase(yyruleno==16);
      case 17: /* geo_text ::= multipolygonzm */ yytestcase(yyruleno==17);
      case 18: /* geo_text ::= geocoll */ yytestcase(yyruleno==18);
      case 19: /* geo_text ::= geocollz */ yytestcase(yyruleno==19);
      case 20: /* geo_text ::= geocollzm */ yytestcase(yyruleno==20);
      case 21: /* geo_textm ::= pointm */ yytestcase(yyruleno==21);
      case 22: /* geo_textm ::= linestringm */ yytestcase(yyruleno==22);
      case 23: /* geo_textm ::= polygonm */ yytestcase(yyruleno==23);
      case 24: /* geo_textm ::= multipointm */ yytestcase(yyruleno==24);
      case 25: /* geo_textm ::= multilinestringm */ yytestcase(yyruleno==25);
      case 26: /* geo_textm ::= multipolygonm */ yytestcase(yyruleno==26);
      case 27: /* geo_textm ::= geocollm */ yytestcase(yyruleno==27);
{ p_data->result = yymsp[0].minor.yy0; }
        break;
      case 28: /* point ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxy EWKT_CLOSE_BRACKET */
      case 29: /* pointz ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyz EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==29);
      case 31: /* pointzm ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyzm EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==31);
{ yymsp[-3].minor.yy0 = ewkt_buildGeomFromPoint( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0); }
        break;
      case 30: /* pointm ::= EWKT_POINT_M EWKT_OPEN_BRACKET point_coordxym EWKT_CLOSE_BRACKET */
{ yymsp[-3].minor.yy0 = ewkt_buildGeomFromPoint( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0);  }
        break;
      case 32: /* point_brkt_coordxy ::= EWKT_OPEN_BRACKET coord coord EWKT_CLOSE_BRACKET */
{ yymsp[-3].minor.yy0 = (void *) ewkt_point_xy( p_data, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 33: /* point_brkt_coordxym ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET */
{ yymsp[-4].minor.yy0 = (void *) ewkt_point_xym( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 34: /* point_brkt_coordxyz ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET */
{ yymsp[-4].minor.yy0 = (void *) ewkt_point_xyz( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 35: /* point_brkt_coordxyzm ::= EWKT_OPEN_BRACKET coord coord coord coord EWKT_CLOSE_BRACKET */
{ yymsp[-5].minor.yy0 = (void *) ewkt_point_xyzm( p_data, (double *)yymsp[-4].minor.yy0, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 36: /* point_coordxy ::= coord coord */
{ yylhsminor.yy0 = (void *) ewkt_point_xy( p_data, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 37: /* point_coordxym ::= coord coord coord */
{ yylhsminor.yy0 = (void *) ewkt_point_xym( p_data, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 38: /* point_coordxyz ::= coord coord coord */
{ yylhsminor.yy0 = (void *) ewkt_point_xyz( p_data, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 39: /* point_coordxyzm ::= coord coord coord coord */
{ yylhsminor.yy0 = (void *) ewkt_point_xyzm( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 40: /* coord ::= EWKT_NUM */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 41: /* extra_brkt_pointsxy ::= */
      case 43: /* extra_brkt_pointsxym ::= */ yytestcase(yyruleno==43);
      case 45: /* extra_brkt_pointsxyz ::= */ yytestcase(yyruleno==45);
      case 47: /* extra_brkt_pointsxyzm ::= */ yytestcase(yyruleno==47);
      case 49: /* extra_pointsxy ::= */ yytestcase(yyruleno==49);
      case 51: /* extra_pointsxym ::= */ yytestcase(yyruleno==51);
      case 53: /* extra_pointsxyz ::= */ yytestcase(yyruleno==53);
      case 55: /* extra_pointsxyzm ::= */ yytestcase(yyruleno==55);
      case 74: /* extra_rings ::= */ yytestcase(yyruleno==74);
      case 77: /* extra_ringsm ::= */ yytestcase(yyruleno==77);
      case 80: /* extra_ringsz ::= */ yytestcase(yyruleno==80);
      case 83: /* extra_ringszm ::= */ yytestcase(yyruleno==83);
      case 102: /* multilinestring_text2 ::= */ yytestcase(yyruleno==102);
      case 105: /* multilinestring_textm2 ::= */ yytestcase(yyruleno==105);
      case 108: /* multilinestring_textz2 ::= */ yytestcase(yyruleno==108);
      case 111: /* multilinestring_textzm2 ::= */ yytestcase(yyruleno==111);
      case 118: /* multipolygon_text2 ::= */ yytestcase(yyruleno==118);
      case 121: /* multipolygon_textm2 ::= */ yytestcase(yyruleno==121);
      case 124: /* multipolygon_textz2 ::= */ yytestcase(yyruleno==124);
      case 127: /* multipolygon_textzm2 ::= */ yytestcase(yyruleno==127);
      case 140: /* geocoll_text2 ::= */ yytestcase(yyruleno==140);
      case 155: /* geocoll_textm2 ::= */ yytestcase(yyruleno==155);
      case 170: /* geocoll_textz2 ::= */ yytestcase(yyruleno==170);
      case 185: /* geocoll_textzm2 ::= */ yytestcase(yyruleno==185);
{ yymsp[1].minor.yy0 = NULL; }
        break;
      case 42: /* extra_brkt_pointsxy ::= EWKT_COMMA point_brkt_coordxy extra_brkt_pointsxy */
      case 44: /* extra_brkt_pointsxym ::= EWKT_COMMA point_brkt_coordxym extra_brkt_pointsxym */ yytestcase(yyruleno==44);
      case 46: /* extra_brkt_pointsxyz ::= EWKT_COMMA point_brkt_coordxyz extra_brkt_pointsxyz */ yytestcase(yyruleno==46);
      case 48: /* extra_brkt_pointsxyzm ::= EWKT_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm */ yytestcase(yyruleno==48);
      case 50: /* extra_pointsxy ::= EWKT_COMMA point_coordxy extra_pointsxy */ yytestcase(yyruleno==50);
      case 52: /* extra_pointsxym ::= EWKT_COMMA point_coordxym extra_pointsxym */ yytestcase(yyruleno==52);
      case 54: /* extra_pointsxyz ::= EWKT_COMMA point_coordxyz extra_pointsxyz */ yytestcase(yyruleno==54);
      case 56: /* extra_pointsxyzm ::= EWKT_COMMA point_coordxyzm extra_pointsxyzm */ yytestcase(yyruleno==56);
{ ((gaiaPointPtr)yymsp[-1].minor.yy0)->Next = (gaiaPointPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 57: /* linestring ::= EWKT_LINESTRING linestring_text */
      case 58: /* linestringm ::= EWKT_LINESTRING_M linestring_textm */ yytestcase(yyruleno==58);
      case 59: /* linestringz ::= EWKT_LINESTRING linestring_textz */ yytestcase(yyruleno==59);
      case 60: /* linestringzm ::= EWKT_LINESTRING linestring_textzm */ yytestcase(yyruleno==60);
{ yymsp[-1].minor.yy0 = ewkt_buildGeomFromLinestring( p_data, (gaiaLinestringPtr)yymsp[0].minor.yy0); }
        break;
      case 61: /* linestring_text ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) ewkt_linestring_xy( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 62: /* linestring_textm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) ewkt_linestring_xym( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 63: /* linestring_textz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) ewkt_linestring_xyz( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 64: /* linestring_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) ewkt_linestring_xyzm( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 65: /* polygon ::= EWKT_POLYGON polygon_text */
      case 66: /* polygonm ::= EWKT_POLYGON_M polygon_textm */ yytestcase(yyruleno==66);
      case 67: /* polygonz ::= EWKT_POLYGON polygon_textz */ yytestcase(yyruleno==67);
      case 68: /* polygonzm ::= EWKT_POLYGON polygon_textzm */ yytestcase(yyruleno==68);
{ yymsp[-1].minor.yy0 = ewkt_buildGeomFromPolygon( p_data, (gaiaPolygonPtr)yymsp[0].minor.yy0); }
        break;
      case 69: /* polygon_text ::= EWKT_OPEN_BRACKET ring extra_rings EWKT_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_polygon_xy( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 70: /* polygon_textm ::= EWKT_OPEN_BRACKET ringm extra_ringsm EWKT_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_polygon_xym( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 71: /* polygon_textz ::= EWKT_OPEN_BRACKET ringz extra_ringsz EWKT_CLOSE_BRACKET */
{  
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_polygon_xyz( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 72: /* polygon_textzm ::= EWKT_OPEN_BRACKET ringzm extra_ringszm EWKT_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_polygon_xyzm( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 73: /* ring ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) ewkt_ring_xy( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 75: /* extra_rings ::= EWKT_COMMA ring extra_rings */
      case 78: /* extra_ringsm ::= EWKT_COMMA ringm extra_ringsm */ yytestcase(yyruleno==78);
      case 81: /* extra_ringsz ::= EWKT_COMMA ringz extra_ringsz */ yytestcase(yyruleno==81);
      case 84: /* extra_ringszm ::= EWKT_COMMA ringzm extra_ringszm */ yytestcase(yyruleno==84);
{
		((gaiaRingPtr)yymsp[-1].minor.yy0)->Next = (gaiaRingPtr)yymsp[0].minor.yy0;
		yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 76: /* ringm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) ewkt_ring_xym( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 79: /* ringz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) ewkt_ring_xyz( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 82: /* ringzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) ewkt_ring_xyzm( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 85: /* multipoint ::= EWKT_MULTIPOINT multipoint_text */
      case 86: /* multipointm ::= EWKT_MULTIPOINT_M multipoint_textm */ yytestcase(yyruleno==86);
      case 87: /* multipointz ::= EWKT_MULTIPOINT multipoint_textz */ yytestcase(yyruleno==87);
      case 88: /* multipointzm ::= EWKT_MULTIPOINT multipoint_textzm */ yytestcase(yyruleno==88);
      case 97: /* multilinestring ::= EWKT_MULTILINESTRING multilinestring_text */ yytestcase(yyruleno==97);
      case 98: /* multilinestringm ::= EWKT_MULTILINESTRING_M multilinestring_textm */ yytestcase(yyruleno==98);
      case 99: /* multilinestringz ::= EWKT_MULTILINESTRING multilinestring_textz */ yytestcase(yyruleno==99);
      case 100: /* multilinestringzm ::= EWKT_MULTILINESTRING multilinestring_textzm */ yytestcase(yyruleno==100);
      case 113: /* multipolygon ::= EWKT_MULTIPOLYGON multipolygon_text */ yytestcase(yyruleno==113);
      case 114: /* multipolygonm ::= EWKT_MULTIPOLYGON_M multipolygon_textm */ yytestcase(yyruleno==114);
      case 115: /* multipolygonz ::= EWKT_MULTIPOLYGON multipolygon_textz */ yytestcase(yyruleno==115);
      case 116: /* multipolygonzm ::= EWKT_MULTIPOLYGON multipolygon_textzm */ yytestcase(yyruleno==116);
      case 129: /* geocoll ::= EWKT_GEOMETRYCOLLECTION geocoll_text */ yytestcase(yyruleno==129);
      case 130: /* geocollm ::= EWKT_GEOMETRYCOLLECTION_M geocoll_textm */ yytestcase(yyruleno==130);
      case 131: /* geocollz ::= EWKT_GEOMETRYCOLLECTION geocoll_textz */ yytestcase(yyruleno==131);
      case 132: /* geocollzm ::= EWKT_GEOMETRYCOLLECTION geocoll_textzm */ yytestcase(yyruleno==132);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
        break;
      case 89: /* multipoint_text ::= EWKT_OPEN_BRACKET point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
      case 93: /* multipoint_text ::= EWKT_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==93);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipoint_xy( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 90: /* multipoint_textm ::= EWKT_OPEN_BRACKET point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
      case 94: /* multipoint_textm ::= EWKT_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==94);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipoint_xym( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 91: /* multipoint_textz ::= EWKT_OPEN_BRACKET point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
      case 95: /* multipoint_textz ::= EWKT_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==95);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipoint_xyz( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 92: /* multipoint_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
      case 96: /* multipoint_textzm ::= EWKT_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==96);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipoint_xyzm( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 101: /* multilinestring_text ::= EWKT_OPEN_BRACKET linestring_text multilinestring_text2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multilinestring_xy( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 103: /* multilinestring_text2 ::= EWKT_COMMA linestring_text multilinestring_text2 */
      case 106: /* multilinestring_textm2 ::= EWKT_COMMA linestring_textm multilinestring_textm2 */ yytestcase(yyruleno==106);
      case 109: /* multilinestring_textz2 ::= EWKT_COMMA linestring_textz multilinestring_textz2 */ yytestcase(yyruleno==109);
      case 112: /* multilinestring_textzm2 ::= EWKT_COMMA linestring_textzm multilinestring_textzm2 */ yytestcase(yyruleno==112);
{ ((gaiaLinestringPtr)yymsp[-1].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 104: /* multilinestring_textm ::= EWKT_OPEN_BRACKET linestring_textm multilinestring_textm2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multilinestring_xym( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 107: /* multilinestring_textz ::= EWKT_OPEN_BRACKET linestring_textz multilinestring_textz2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multilinestring_xyz( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 110: /* multilinestring_textzm ::= EWKT_OPEN_BRACKET linestring_textzm multilinestring_textzm2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multilinestring_xyzm( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 117: /* multipolygon_text ::= EWKT_OPEN_BRACKET polygon_text multipolygon_text2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipolygon_xy( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 119: /* multipolygon_text2 ::= EWKT_COMMA polygon_text multipolygon_text2 */
      case 122: /* multipolygon_textm2 ::= EWKT_COMMA polygon_textm multipolygon_textm2 */ yytestcase(yyruleno==122);
      case 125: /* multipolygon_textz2 ::= EWKT_COMMA polygon_textz multipolygon_textz2 */ yytestcase(yyruleno==125);
      case 128: /* multipolygon_textzm2 ::= EWKT_COMMA polygon_textzm multipolygon_textzm2 */ yytestcase(yyruleno==128);
{ ((gaiaPolygonPtr)yymsp[-1].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 120: /* multipolygon_textm ::= EWKT_OPEN_BRACKET polygon_textm multipolygon_textm2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipolygon_xym( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 123: /* multipolygon_textz ::= EWKT_OPEN_BRACKET polygon_textz multipolygon_textz2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipolygon_xyz( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 126: /* multipolygon_textzm ::= EWKT_OPEN_BRACKET polygon_textzm multipolygon_textzm2 EWKT_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) ewkt_multipolygon_xyzm( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 133: /* geocoll_text ::= EWKT_OPEN_BRACKET point geocoll_text2 EWKT_CLOSE_BRACKET */
      case 134: /* geocoll_text ::= EWKT_OPEN_BRACKET linestring geocoll_text2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==134);
      case 135: /* geocoll_text ::= EWKT_OPEN_BRACKET polygon geocoll_text2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==135);
      case 136: /* geocoll_text ::= EWKT_OPEN_BRACKET multipoint geocoll_text2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==136);
      case 137: /* geocoll_text ::= EWKT_OPEN_BRACKET multilinestring geocoll_text2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==137);
      case 138: /* geocoll_text ::= EWKT_OPEN_BRACKET multipolygon geocoll_text2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==138);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_geomColl_xy( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 139: /* geocoll_text ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 EWKT_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) ewkt_geomColl_xy( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 141: /* geocoll_text2 ::= EWKT_COMMA point geocoll_text2 */
      case 142: /* geocoll_text2 ::= EWKT_COMMA linestring geocoll_text2 */ yytestcase(yyruleno==142);
      case 143: /* geocoll_text2 ::= EWKT_COMMA polygon geocoll_text2 */ yytestcase(yyruleno==143);
      case 144: /* geocoll_text2 ::= EWKT_COMMA multipoint geocoll_text2 */ yytestcase(yyruleno==144);
      case 145: /* geocoll_text2 ::= EWKT_COMMA multilinestring geocoll_text2 */ yytestcase(yyruleno==145);
      case 146: /* geocoll_text2 ::= EWKT_COMMA multipolygon geocoll_text2 */ yytestcase(yyruleno==146);
      case 156: /* geocoll_textm2 ::= EWKT_COMMA pointm geocoll_textm2 */ yytestcase(yyruleno==156);
      case 157: /* geocoll_textm2 ::= EWKT_COMMA linestringm geocoll_textm2 */ yytestcase(yyruleno==157);
      case 158: /* geocoll_textm2 ::= EWKT_COMMA polygonm geocoll_textm2 */ yytestcase(yyruleno==158);
      case 159: /* geocoll_textm2 ::= EWKT_COMMA multipointm geocoll_textm2 */ yytestcase(yyruleno==159);
      case 160: /* geocoll_textm2 ::= EWKT_COMMA multilinestringm geocoll_textm2 */ yytestcase(yyruleno==160);
      case 161: /* geocoll_textm2 ::= EWKT_COMMA multipolygonm geocoll_textm2 */ yytestcase(yyruleno==161);
      case 171: /* geocoll_textz2 ::= EWKT_COMMA pointz geocoll_textz2 */ yytestcase(yyruleno==171);
      case 172: /* geocoll_textz2 ::= EWKT_COMMA linestringz geocoll_textz2 */ yytestcase(yyruleno==172);
      case 173: /* geocoll_textz2 ::= EWKT_COMMA polygonz geocoll_textz2 */ yytestcase(yyruleno==173);
      case 174: /* geocoll_textz2 ::= EWKT_COMMA multipointz geocoll_textz2 */ yytestcase(yyruleno==174);
      case 175: /* geocoll_textz2 ::= EWKT_COMMA multilinestringz geocoll_textz2 */ yytestcase(yyruleno==175);
      case 176: /* geocoll_textz2 ::= EWKT_COMMA multipolygonz geocoll_textz2 */ yytestcase(yyruleno==176);
      case 186: /* geocoll_textzm2 ::= EWKT_COMMA pointzm geocoll_textzm2 */ yytestcase(yyruleno==186);
      case 187: /* geocoll_textzm2 ::= EWKT_COMMA linestringzm geocoll_textzm2 */ yytestcase(yyruleno==187);
      case 188: /* geocoll_textzm2 ::= EWKT_COMMA polygonzm geocoll_textzm2 */ yytestcase(yyruleno==188);
      case 189: /* geocoll_textzm2 ::= EWKT_COMMA multipointzm geocoll_textzm2 */ yytestcase(yyruleno==189);
      case 190: /* geocoll_textzm2 ::= EWKT_COMMA multilinestringzm geocoll_textzm2 */ yytestcase(yyruleno==190);
      case 191: /* geocoll_textzm2 ::= EWKT_COMMA multipolygonzm geocoll_textzm2 */ yytestcase(yyruleno==191);
{
		((gaiaGeomCollPtr)yymsp[-1].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[0].minor.yy0;
		yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 147: /* geocoll_text2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 */
      case 162: /* geocoll_textm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 */ yytestcase(yyruleno==162);
      case 177: /* geocoll_textz2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 */ yytestcase(yyruleno==177);
      case 192: /* geocoll_textzm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 */ yytestcase(yyruleno==192);
{
		((gaiaGeomCollPtr)yymsp[-1].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[0].minor.yy0;
		yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 148: /* geocoll_textm ::= EWKT_OPEN_BRACKET pointm geocoll_textm2 EWKT_CLOSE_BRACKET */
      case 149: /* geocoll_textm ::= EWKT_OPEN_BRACKET linestringm geocoll_textm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==149);
      case 150: /* geocoll_textm ::= EWKT_OPEN_BRACKET polygonm geocoll_textm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==150);
      case 151: /* geocoll_textm ::= EWKT_OPEN_BRACKET multipointm geocoll_textm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==151);
      case 152: /* geocoll_textm ::= EWKT_OPEN_BRACKET multilinestringm geocoll_textm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==152);
      case 153: /* geocoll_textm ::= EWKT_OPEN_BRACKET multipolygonm geocoll_textm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==153);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_geomColl_xym( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 154: /* geocoll_textm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 EWKT_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) ewkt_geomColl_xym( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 163: /* geocoll_textz ::= EWKT_OPEN_BRACKET pointz geocoll_textz2 EWKT_CLOSE_BRACKET */
      case 164: /* geocoll_textz ::= EWKT_OPEN_BRACKET linestringz geocoll_textz2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==164);
      case 165: /* geocoll_textz ::= EWKT_OPEN_BRACKET polygonz geocoll_textz2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==165);
      case 166: /* geocoll_textz ::= EWKT_OPEN_BRACKET multipointz geocoll_textz2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==166);
      case 167: /* geocoll_textz ::= EWKT_OPEN_BRACKET multilinestringz geocoll_textz2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==167);
      case 168: /* geocoll_textz ::= EWKT_OPEN_BRACKET multipolygonz geocoll_textz2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==168);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_geomColl_xyz( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 169: /* geocoll_textz ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 EWKT_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) ewkt_geomColl_xyz( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 178: /* geocoll_textzm ::= EWKT_OPEN_BRACKET pointzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
      case 179: /* geocoll_textzm ::= EWKT_OPEN_BRACKET linestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==179);
      case 180: /* geocoll_textzm ::= EWKT_OPEN_BRACKET polygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==180);
      case 181: /* geocoll_textzm ::= EWKT_OPEN_BRACKET multipointzm geocoll_textzm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==181);
      case 182: /* geocoll_textzm ::= EWKT_OPEN_BRACKET multilinestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==182);
      case 183: /* geocoll_textzm ::= EWKT_OPEN_BRACKET multipolygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET */ yytestcase(yyruleno==183);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) ewkt_geomColl_xyzm( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 184: /* geocoll_textzm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) ewkt_geomColl_xyzm( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      default:
      /* (193) main ::= in */ yytestcase(yyruleno==193);
      /* (194) in ::= */ yytestcase(yyruleno==194);
      /* (195) in ::= in state EWKT_NEWLINE */ yytestcase(yyruleno==195);
      /* (196) state ::= program (OPTIMIZED OUT) */ assert(yyruleno!=196);
      /* (197) program ::= geo_text (OPTIMIZED OUT) */ assert(yyruleno!=197);
      /* (198) program ::= geo_textm (OPTIMIZED OUT) */ assert(yyruleno!=198);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */










































































































































































































































































































































































































































































































































}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){


  ParseARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/

/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
	p_data->ewkt_parse_error = 1;
	p_data->result = NULL;
/************ End %syntax_error code ******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){


  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);


  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){


  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */


  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)

  yyendofinput = (yymajor==0);







#endif







  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    int stateno = yypParser->yytos->stateno;
    if( stateno < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",


              yyTracePrompt,yyTokenName[yymajor],stateno);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno-YY_MIN_REDUCE);
    }
  }
#endif

  do{

    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact >= YY_MIN_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY




      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;





    }else{

      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);


      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);


      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){

#ifndef NDEBUG
        if( yyTraceFILE ){

          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);

        yymajor = YYNOCODE;

      }else{
        while( yypParser->yytos >= yypParser->yystack


            && yymx != YYERRORSYMBOL

            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){


          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){



          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;

        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);




        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);


      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);


      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);

      if( yyendofinput ){

        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif

  return;
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<


<
<
<
<
<
<
<
<
<
>
>

<
<
<
<




|
>
|
|





|
|
|
|
|
|
|
<
<
|
>
>
|
|
<
<
<










|











|


|
<

|

|

|


<
<
<

|

|
<

<
>
|
>
>

|


|
>











|
<
<

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

>

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

<
>
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

>
|
<
|

>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

>

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

<

>
>
|
|







<
<
<
<







 







<
<
<
<

|
<
>
>
|
|
|
|





|
<
>
>

<
>

<
|
<
|

|
|
<

|
<







 







>
|
>
|
|
>
|
>
|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>
>
>
>

|
|
|
<
>
>
|

<
>
>
|
|

<
>

|
<
>
>
|

<
>
>
|
|

<
>
|

|





|
>
>
|
>

|
>
|
|

<
>
>
|
|
<

|
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






|
|
|
|
<
>
>
|
|
<





|
|
<
|





|
|
<
>
>
|

|
<
>
>
|

<
|
<
|
|
|
<
<
|







 







|
|
|
|
|
<
>
>
|
|
<
|
<

|

|

>
|
|
<
>
|
>
>
>
>
>
>
>

>
>
>
>
>
>
>
|


|
<
<
<
>
>
|
<
<
<
|
<


|
>
|
<
<
<
<
<
>
>
>
>
|
<
|
<
<
<
<
>
>
>
>
>
|
>
|
<

|


|
<
>
>
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
|
>

|
>
|
|
|

|
>
|
>
|
<
>
>
|
>
|
|
|
<
>
>
|
|
<
>
>
>
|
|
<
<
<
|
>
|
<
>
>
>
>
|
|
|
|

|
|
|
|
|
|
|
<
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
<
>
|
>
|
<
<
<
|
|

|
<
<
<
<
<
<
<
<
<
|
<
<
<
>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


















46
47
48
49
50
51


52
53









54
55
56




57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115



116
117
118
119

120

121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288

289

290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327

328
329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412

413
414
415
416
417
418
419
420
421
422
423
424




425
426
427
428
429
430
431
...
435
436
437
438
439
440
441




442
443

444
445
446
447
448
449
450
451
452
453
454
455

456
457
458

459
460

461

462
463
464
465

466
467

468
469
470
471
472
473
474
...
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
























































1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082

1083
1084
1085
1086

1087
1088
1089
1090
1091

1092
1093
1094

1095
1096
1097
1098

1099
1100
1101
1102
1103

1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123

1124
1125
1126
1127

1128
1129

1130
1131





















1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466

2467
2468
2469
2470

2471
2472
2473
2474
2475
2476
2477

2478
2479
2480
2481
2482
2483
2484
2485

2486
2487
2488
2489
2490

2491
2492
2493
2494

2495

2496
2497
2498


2499
2500
2501
2502
2503
2504
2505
2506
....
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525

2526
2527
2528
2529

2530

2531
2532
2533
2534
2535
2536
2537
2538

2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559



2560
2561
2562



2563

2564
2565
2566
2567
2568





2569
2570
2571
2572
2573

2574




2575
2576
2577
2578
2579
2580
2581
2582

2583
2584
2585
2586
2587

2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612

2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630

2631
2632
2633
2634
2635
2636
2637

2638
2639
2640
2641

2642
2643
2644
2645
2646



2647
2648
2649

2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665


2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680

2681
2682
2683
2684

2685
2686
2687
2688



2689
2690
2691
2692









2693



2694
2695
2696
/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>

/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
/* 
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands. 
**
** Each symbol here is a terminal symbol in the grammar.
*/
/* Make sure the INTERFACE macro is defined.
*/
#ifndef INTERFACE
#define INTERFACE 1
#endif
/* The next thing included is series of defines which control
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 terminals
**                       and nonterminals.  "int" is used otherwise.
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
**                       to no legal terminal or nonterminal number.  This
**                       number is used to fill in empty slots of the hash 
**                       table.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       have fall-back values which should be used if the
**                       original value of the token will not parse.
**    YYACTIONTYPE       is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 rules and
**                       states combined.  "int" is used otherwise.
**    ParseTOKENTYPE     is the data type used for minor tokens given 
**                       directly to the parser from the tokenizer.
**    YYMINORTYPE        is the data type used for all minor tokens.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for base tokens is called "yy0".


















**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser


**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar









**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
*/




#define YYCODETYPE unsigned char
#define YYNOCODE 117
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE void *
typedef union
{
    int yyinit;
    ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct ewkt_data *p_data ;
#define ParseARG_PDECL , struct ewkt_data *p_data
#define ParseARG_FETCH  struct ewkt_data *p_data  = yypParser->p_data
#define ParseARG_STORE yypParser->p_data  = p_data
#define YYNSTATE 508
#define YYNRULE 199
#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)


#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)

/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static const YYMINORTYPE yyzerominor = { 0 };




/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
#define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.

**
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
**
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
**
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**



** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]

**

** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
*/


static const YYACTIONTYPE yy_action[] = {
    /*     0 */ 249, 336, 337, 338, 339, 340, 341, 342, 343, 344,
    /*    10 */ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
    /*    20 */ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
    /*    30 */ 365, 366, 163, 201, 224, 178, 202, 225, 179, 203,
    /*    40 */ 226, 180, 204, 227, 181, 205, 228, 182, 206, 229,
    /*    50 */ 508, 101, 250, 128, 371, 254, 66, 129, 19, 80,
    /*    60 */ 20, 95, 22, 124, 23, 141, 25, 158, 27, 232,
    /*    70 */ 250, 254, 708, 1, 13, 80, 19, 95, 20, 124,
    /*    80 */ 22, 141, 23, 158, 25, 247, 28, 103, 104, 371,
    /*    90 */ 105, 106, 63, 305, 111, 117, 305, 255, 21, 164,
    /*   100 */ 66, 165, 164, 166, 165, 167, 166, 169, 167, 177,
    /*   110 */ 169, 313, 183, 374, 313, 375, 376, 187, 14, 188,
    /*   120 */ 187, 189, 188, 190, 189, 192, 190, 200, 192, 321,
    /*   130 */ 207, 404, 321, 405, 406, 210, 62, 211, 210, 212,
    /*   140 */ 211, 213, 212, 215, 213, 223, 215, 254, 230, 3,
    /*   150 */ 24, 80, 104, 95, 26, 124, 71, 141, 111, 158,
    /*   160 */ 171, 240, 2, 172, 194, 163, 173, 195, 178, 174,
    /*   170 */ 196, 179, 175, 197, 180, 176, 198, 181, 217, 199,
    /*   180 */ 182, 218, 201, 125, 219, 202, 371, 220, 203, 224,
    /*   190 */ 221, 204, 225, 222, 205, 226, 108, 206, 227, 371,
    /*   200 */ 388, 228, 389, 390, 229, 284, 233, 242, 243, 244,
    /*   210 */ 245, 246, 234, 235, 236, 237, 238, 239, 31, 113,
    /*   220 */ 251, 252, 371, 253, 83, 63, 256, 258, 87, 260,
    /*   230 */ 91, 63, 265, 270, 103, 275, 257, 63, 106, 68,
    /*   240 */ 105, 78, 75, 75, 424, 117, 425, 426, 132, 119,
    /*   250 */ 135, 138, 371, 436, 64, 437, 438, 146, 69, 150,
    /*   260 */ 154, 65, 370, 68, 448, 70, 449, 450, 67, 184,
    /*   270 */ 68, 186, 209, 73, 74, 373, 33, 71, 71, 79,
    /*   280 */ 262, 75, 81, 66, 82, 66, 265, 66, 266, 267,
    /*   290 */ 85, 68, 270, 68, 68, 68, 71, 271, 272, 89,
    /*   300 */ 258, 71, 71, 71, 71, 275, 276, 75, 75, 277,
    /*   310 */ 93, 75, 75, 280, 281, 282, 66, 66, 66, 377,
    /*   320 */ 256, 99, 251, 378, 66, 68, 260, 68, 75, 252,
    /*   330 */ 253, 72, 75, 71, 407, 408, 371, 371, 380, 76,
    /*   340 */ 259, 77, 35, 36, 381, 38, 261, 383, 84, 263,
    /*   350 */ 385, 386, 39, 88, 268, 43, 47, 92, 96, 273,
    /*   360 */ 51, 98, 102, 278, 264, 86, 61, 283, 393, 269,
    /*   370 */ 287, 285, 90, 400, 286, 396, 107, 97, 274, 94,
    /*   380 */ 279, 399, 100, 289, 403, 108, 110, 413, 109, 288,
    /*   390 */ 112, 291, 113, 114, 116, 118, 115, 290, 119, 15,
    /*   400 */ 415, 419, 125, 120, 121, 123, 292, 122, 126, 130,
    /*   410 */ 133, 127, 417, 296, 55, 136, 293, 428, 297, 56,
    /*   420 */ 430, 131, 139, 298, 295, 57, 422, 294, 142, 148,
    /*   430 */ 144, 147, 301, 152, 134, 151, 155, 137, 156, 140,
    /*   440 */ 143, 159, 709, 145, 161, 16, 4, 168, 170, 149,
    /*   450 */ 5, 17, 709, 6, 83, 153, 709, 191, 193, 433,
    /*   460 */ 87, 709, 160, 157, 432, 299, 91, 162, 435, 374,
    /*   470 */ 388, 7, 132, 709, 709, 709, 300, 709, 8, 440,
    /*   480 */ 146, 404, 709, 18, 442, 214, 302, 445, 444, 216,
    /*   490 */ 424, 709, 303, 709, 709, 709, 447, 709, 709, 709,
    /*   500 */ 709, 436, 709, 709, 304, 709, 709, 375, 9, 709,
    /*   510 */ 135, 709, 389, 709, 709, 709, 709, 452, 453, 454,
    /*   520 */ 709, 455, 456, 709, 457, 185, 306, 312, 709, 150,
    /*   530 */ 307, 308, 309, 310, 425, 184, 10, 11, 709, 405,
    /*   540 */ 709, 709, 709, 311, 464, 709, 709, 709, 709, 709,
    /*   550 */ 709, 709, 437, 709, 376, 466, 390, 709, 335, 709,
    /*   560 */ 138, 709, 12, 709, 709, 367, 467, 154, 709, 29,
    /*   570 */ 468, 208, 469, 470, 471, 406, 426, 314, 315, 316,
    /*   580 */ 317, 318, 186, 319, 478, 368, 369, 372, 320, 379,
    /*   590 */ 438, 30, 382, 32, 34, 384, 37, 387, 391, 40,
    /*   600 */ 709, 392, 41, 42, 480, 481, 482, 394, 483, 44,
    /*   610 */ 58, 45, 484, 46, 395, 48, 397, 485, 59, 231,
    /*   620 */ 49, 50, 398, 52, 322, 401, 323, 53, 324, 54,
    /*   630 */ 402, 409, 493, 325, 326, 327, 209, 492, 410, 328,
    /*   640 */ 495, 496, 411, 412, 497, 498, 241, 499, 500, 501,
    /*   650 */ 407, 329, 414, 330, 408, 416, 418, 331, 332, 420,
    /*   660 */ 421, 423, 427, 429, 248, 431, 333, 434, 439, 334,
    /*   670 */ 441, 443, 446, 451, 458, 459, 460, 461, 462, 463,
    /*   680 */ 465, 472, 473, 474, 475, 476, 477, 479, 60, 709,
    /*   690 */ 486, 487, 488, 489, 709, 490, 491, 494, 502, 709,
    /*   700 */ 503, 504, 505, 506, 709, 507,

};

static const YYCODETYPE yy_lookahead[] = {
    /*     0 */ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
    /*    10 */ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
    /*    20 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
    /*    30 */ 53, 54, 27, 28, 29, 30, 31, 32, 33, 34,
    /*    40 */ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
    /*    50 */ 0, 3, 2, 57, 6, 5, 60, 61, 8, 9,
    /*    60 */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
    /*    70 */ 2, 5, 21, 22, 3, 9, 8, 11, 10, 13,
    /*    80 */ 12, 15, 14, 17, 16, 19, 18, 55, 56, 6,
    /*    90 */ 58, 59, 60, 2, 62, 63, 2, 57, 3, 8,
    /*   100 */ 60, 10, 8, 12, 10, 14, 12, 16, 14, 18,
    /*   110 */ 16, 2, 18, 72, 2, 74, 75, 8, 3, 10,
    /*   120 */ 8, 12, 10, 14, 12, 16, 14, 18, 16, 2,
    /*   130 */ 18, 88, 2, 90, 91, 8, 60, 10, 8, 12,
    /*   140 */ 10, 14, 12, 16, 14, 18, 16, 5, 18, 3,
    /*   150 */ 3, 9, 56, 11, 3, 13, 60, 15, 62, 17,
    /*   160 */ 27, 19, 3, 30, 28, 27, 33, 31, 30, 36,
    /*   170 */ 34, 33, 39, 37, 36, 42, 40, 39, 29, 43,
    /*   180 */ 42, 32, 28, 3, 35, 31, 6, 38, 34, 29,
    /*   190 */ 41, 37, 32, 44, 40, 35, 3, 43, 38, 6,
    /*   200 */ 76, 41, 78, 79, 44, 60, 48, 49, 50, 51,
    /*   210 */ 52, 53, 48, 49, 50, 51, 52, 53, 7, 3,
    /*   220 */ 55, 56, 6, 58, 80, 60, 55, 56, 84, 58,
    /*   230 */ 86, 60, 55, 56, 55, 58, 68, 60, 59, 60,
    /*   240 */ 58, 58, 60, 60, 92, 63, 94, 95, 72, 3,
    /*   250 */ 74, 75, 6, 100, 60, 102, 103, 76, 55, 78,
    /*   260 */ 79, 60, 60, 60, 108, 55, 110, 111, 60, 108,
    /*   270 */ 60, 110, 111, 56, 56, 60, 7, 60, 60, 58,
    /*   280 */ 57, 60, 57, 60, 57, 60, 55, 60, 55, 55,
    /*   290 */ 55, 60, 56, 60, 60, 60, 60, 56, 56, 56,
    /*   300 */ 56, 60, 60, 60, 60, 58, 58, 60, 60, 58,
    /*   310 */ 58, 60, 60, 57, 57, 57, 60, 60, 60, 60,
    /*   320 */ 55, 57, 55, 68, 60, 60, 58, 60, 60, 56,
    /*   330 */ 58, 60, 60, 60, 4, 4, 6, 6, 60, 60,
    /*   340 */ 70, 60, 7, 3, 70, 7, 71, 71, 7, 69,
    /*   350 */ 73, 69, 3, 7, 68, 3, 3, 7, 3, 70,
    /*   360 */ 3, 7, 60, 71, 81, 80, 60, 69, 81, 85,
    /*   370 */ 71, 68, 84, 77, 70, 85, 7, 82, 87, 86,
    /*   380 */ 83, 87, 82, 64, 83, 3, 59, 64, 60, 60,
    /*   390 */ 7, 66, 3, 60, 62, 7, 60, 60, 3, 3,
    /*   400 */ 66, 89, 3, 60, 60, 63, 67, 60, 60, 7,
    /*   410 */ 7, 60, 67, 96, 3, 7, 60, 96, 98, 3,
    /*   420 */ 98, 61, 7, 99, 65, 3, 65, 69, 3, 3,
    /*   430 */ 7, 7, 106, 3, 72, 7, 7, 74, 3, 75,
    /*   440 */ 73, 3, 116, 73, 7, 3, 7, 3, 3, 76,
    /*   450 */ 3, 3, 116, 7, 80, 78, 116, 3, 3, 93,
    /*   460 */ 84, 116, 77, 79, 99, 97, 86, 77, 97, 72,
    /*   470 */ 76, 3, 72, 116, 116, 116, 104, 116, 7, 104,
    /*   480 */ 76, 88, 116, 3, 106, 3, 107, 101, 107, 3,
    /*   490 */ 92, 116, 105, 116, 116, 116, 105, 116, 116, 116,
    /*   500 */ 116, 100, 116, 116, 112, 116, 116, 74, 3, 116,
    /*   510 */ 74, 116, 78, 116, 116, 116, 116, 112, 112, 112,
    /*   520 */ 116, 112, 112, 116, 112, 108, 112, 114, 116, 78,
    /*   530 */ 112, 112, 112, 112, 94, 108, 3, 7, 116, 90,
    /*   540 */ 116, 116, 116, 112, 112, 116, 116, 116, 116, 116,
    /*   550 */ 116, 116, 102, 116, 75, 114, 79, 116, 1, 116,
    /*   560 */ 75, 116, 3, 116, 116, 4, 114, 79, 116, 3,
    /*   570 */ 114, 110, 114, 114, 114, 91, 95, 114, 114, 114,
    /*   580 */ 114, 114, 110, 114, 114, 4, 4, 4, 115, 4,
    /*   590 */ 103, 7, 4, 7, 7, 4, 7, 4, 4, 7,
    /*   600 */ 116, 4, 7, 7, 115, 115, 115, 4, 115, 7,
    /*   610 */ 3, 7, 115, 7, 4, 7, 4, 115, 3, 111,
    /*   620 */ 7, 7, 4, 7, 115, 4, 115, 7, 115, 7,
    /*   630 */ 4, 4, 109, 115, 115, 115, 111, 115, 4, 113,
    /*   640 */ 113, 113, 4, 4, 113, 113, 109, 113, 113, 113,
    /*   650 */ 4, 113, 4, 113, 4, 4, 4, 113, 113, 4,
    /*   660 */ 4, 4, 4, 4, 109, 4, 113, 4, 4, 113,
    /*   670 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
    /*   680 */ 4, 4, 4, 4, 4, 4, 4, 4, 3, 116,
    /*   690 */ 4, 4, 4, 4, 116, 4, 4, 4, 4, 116,
    /*   700 */ 4, 4, 4, 4, 116, 4,

};


#define YY_SHIFT_USE_DFLT (-1)
#define YY_SHIFT_MAX 334
static const short yy_shift_ofst[] = {
    /*     0 */ -1, 50, 68, 48, 91, 94, 109, 112, 127, 130,
    /*    10 */ 66, 142, 83, 83, 83, 180, 193, 216, 246, 71,
    /*    20 */ 95, 115, 146, 147, 71, 151, 95, 159, 159, 83,
    /*    30 */ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
    /*    40 */ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
    /*    50 */ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
    /*    60 */ 83, 330, 331, 83, 83, 83, 83, 83, 83, 211,
    /*    70 */ 211, 83, 83, 269, 269, 83, 83, 83, 335, 335,
    /*    80 */ 340, 338, 338, 341, 349, 211, 341, 346, 352, 269,
    /*    90 */ 346, 350, 353, 335, 350, 355, 357, 354, 357, 338,
    /*   100 */ 354, 83, 83, 211, 269, 335, 369, 382, 83, 83,
    /*   110 */ 369, 383, 389, 83, 83, 83, 383, 388, 395, 83,
    /*   120 */ 83, 83, 83, 388, 396, 83, 83, 83, 338, 402,
    /*   130 */ 399, 402, 403, 411, 403, 408, 416, 408, 415, 422,
    /*   140 */ 415, 425, 340, 423, 340, 423, 424, 426, 349, 424,
    /*   150 */ 428, 430, 352, 428, 429, 435, 353, 429, 438, 355,
    /*   160 */ 437, 355, 437, 439, 411, 426, 442, 444, 411, 445,
    /*   170 */ 426, 439, 439, 439, 439, 439, 439, 447, 439, 439,
    /*   180 */ 439, 439, 439, 447, 439, 439, 446, 416, 430, 448,
    /*   190 */ 454, 416, 455, 430, 446, 446, 446, 446, 446, 446,
    /*   200 */ 468, 446, 446, 446, 446, 446, 446, 468, 446, 471,
    /*   210 */ 422, 435, 480, 482, 422, 486, 435, 471, 471, 471,
    /*   220 */ 471, 471, 471, 505, 471, 471, 471, 471, 471, 471,
    /*   230 */ 505, 471, 533, 530, 530, 530, 530, 530, 530, 530,
    /*   240 */ 533, 530, 530, 530, 530, 530, 530, 533, 530, 557,
    /*   250 */ 559, 561, 581, 582, 566, 583, 584, 585, 586, 588,
    /*   260 */ 587, 591, 589, 593, 594, 592, 595, 596, 597, 603,
    /*   270 */ 602, 604, 606, 610, 612, 608, 613, 614, 618, 621,
    /*   280 */ 616, 620, 622, 626, 627, 634, 638, 639, 646, 648,
    /*   290 */ 650, 651, 652, 655, 656, 657, 658, 659, 661, 663,
    /*   300 */ 664, 666, 667, 668, 669, 607, 670, 671, 672, 673,
    /*   310 */ 674, 675, 676, 615, 677, 678, 679, 680, 681, 682,
    /*   320 */ 683, 685, 686, 687, 688, 689, 691, 692, 693, 694,
    /*   330 */ 696, 697, 698, 699, 701,

};

#define YY_REDUCE_USE_DFLT (-24)

#define YY_REDUCE_MAX 248
static const short yy_reduce_ofst[] = {
    /*     0 */ 51, -23, 5, 32, 133, 138, 136, 154, 149, 160,
    /*    10 */ 158, 164, 165, 171, 177, -4, 179, 96, 182, 41,
    /*    20 */ 124, 144, 43, 152, 176, 153, 181, 156, 161, 40,
    /*    30 */ 203, 210, 217, 218, 183, 221, 223, 225, 227, 231,
    /*    40 */ 233, 234, 235, 236, 241, 242, 243, 247, 248, 251,
    /*    50 */ 252, 256, 257, 258, 264, 265, 244, 268, 267, 273,
    /*    60 */ 272, 76, 145, 194, 201, 202, 208, 215, 259, 168,
    /*    70 */ 255, 271, 278, 270, 274, 279, 281, 202, 275, 276,
    /*    80 */ 277, 280, 282, 283, 285, 286, 287, 284, 288, 289,
    /*    90 */ 290, 291, 293, 292, 294, 296, 295, 297, 300, 298,
    /*   100 */ 301, 302, 306, 303, 304, 299, 319, 327, 328, 329,
    /*   110 */ 323, 325, 332, 333, 336, 337, 334, 339, 342, 343,
    /*   120 */ 344, 347, 145, 345, 312, 348, 351, 356, 358, 359,
    /*   130 */ 360, 361, 317, 362, 321, 320, 363, 322, 324, 364,
    /*   140 */ 365, 366, 367, 368, 370, 371, 372, 373, 374, 375,
    /*   150 */ 326, 377, 376, 378, 379, 384, 380, 381, 386, 385,
    /*   160 */ 387, 390, 391, 392, 397, 394, 393, 398, 400, 401,
    /*   170 */ 404, 405, 406, 407, 409, 410, 412, 417, 414, 418,
    /*   180 */ 419, 420, 421, 427, 431, 432, 413, 433, 434, 449,
    /*   190 */ 440, 436, 450, 451, 441, 452, 456, 458, 459, 460,
    /*   200 */ 461, 463, 464, 465, 466, 467, 469, 472, 470, 473,
    /*   210 */ 479, 477, 484, 481, 485, 487, 488, 489, 490, 491,
    /*   220 */ 493, 497, 502, 508, 509, 511, 513, 518, 519, 520,
    /*   230 */ 525, 522, 523, 526, 527, 528, 531, 532, 534, 535,
    /*   240 */ 537, 536, 538, 540, 544, 545, 553, 555, 556,

};

static const YYACTIONTYPE yy_default[] = {
    /*     0 */ 509, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*    10 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*    20 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*    30 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*    40 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*    50 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*    60 */ 707, 707, 707, 707, 550, 552, 707, 707, 707, 563,
    /*    70 */ 563, 707, 707, 567, 567, 707, 707, 707, 569, 569,
    /*    80 */ 707, 565, 565, 588, 707, 563, 588, 594, 707, 567,
    /*    90 */ 594, 597, 707, 569, 597, 707, 707, 591, 707, 565,
    /*   100 */ 591, 707, 707, 563, 567, 569, 555, 707, 707, 707,
    /*   110 */ 555, 559, 707, 707, 707, 707, 559, 561, 707, 707,
    /*   120 */ 707, 707, 707, 561, 707, 707, 707, 707, 565, 557,
    /*   130 */ 707, 557, 616, 707, 616, 622, 707, 622, 625, 707,
    /*   140 */ 625, 707, 707, 619, 707, 619, 632, 707, 707, 632,
    /*   150 */ 638, 707, 707, 638, 641, 707, 707, 641, 707, 707,
    /*   160 */ 635, 707, 635, 654, 707, 707, 707, 707, 707, 707,
    /*   170 */ 707, 654, 654, 654, 654, 654, 654, 707, 654, 654,
    /*   180 */ 654, 654, 654, 707, 654, 654, 684, 707, 707, 707,
    /*   190 */ 707, 707, 707, 707, 684, 684, 684, 684, 684, 684,
    /*   200 */ 707, 684, 684, 684, 684, 684, 684, 707, 684, 699,
    /*   210 */ 707, 707, 707, 707, 707, 707, 707, 699, 699, 699,
    /*   220 */ 699, 699, 699, 707, 699, 699, 699, 699, 699, 699,
    /*   230 */ 707, 699, 707, 669, 669, 669, 669, 669, 669, 669,
    /*   240 */ 707, 669, 669, 669, 669, 669, 669, 707, 669, 707,
    /*   250 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   260 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   270 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   280 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   290 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   300 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   310 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   320 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
    /*   330 */ 707, 707, 707, 707, 707, 510, 511, 512, 513, 514,
    /*   340 */ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
    /*   350 */ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
    /*   360 */ 535, 536, 537, 538, 539, 540, 541, 542, 543, 545,
    /*   370 */ 553, 554, 544, 551, 571, 573, 574, 550, 564, 575,
    /*   380 */ 552, 568, 577, 570, 578, 572, 566, 576, 579, 581,
    /*   390 */ 582, 583, 587, 589, 585, 593, 595, 586, 596, 598,
    /*   400 */ 580, 584, 590, 592, 599, 601, 602, 546, 548, 549,
    /*   410 */ 603, 605, 606, 556, 607, 560, 609, 562, 610, 600,
    /*   420 */ 547, 604, 558, 608, 611, 613, 614, 615, 617, 621,
    /*   430 */ 623, 624, 626, 612, 618, 620, 627, 629, 630, 631,
    /*   440 */ 633, 637, 639, 640, 642, 628, 634, 636, 643, 645,
    /*   450 */ 646, 647, 655, 656, 657, 658, 659, 660, 648, 649,
    /*   460 */ 650, 651, 652, 653, 661, 683, 685, 686, 687, 688,
    /*   470 */ 689, 690, 677, 678, 679, 680, 681, 682, 691, 698,
    /*   480 */ 700, 701, 702, 703, 704, 705, 692, 693, 694, 695,
    /*   490 */ 696, 697, 706, 644, 662, 670, 671, 672, 673, 674,
    /*   500 */ 675, 676, 663, 664, 665, 666, 667, 668,
};


#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.




*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.




*/
struct yyStackEntry

{
    YYACTIONTYPE stateno;	/* The state-number */
    YYCODETYPE major;		/* The major token value.  This is the code
				 ** number for the token at this stack level */
    YYMINORTYPE minor;		/* The user-supplied minor token value.  This
				 ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser

{
    int yyidx;			/* Index of top element in stack */
#ifdef YYTRACKMAXSTACKDEPTH

    int yyidxMax;		/* Maximum value of yyidx */
#endif

    int yyerrcnt;		/* Shifts left before out of the error */

      ParseARG_SDECL		/* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
    int yystksz;		/* Current side of the stack */
    yyStackEntry *yystack;	/* The parser's stack */

#else
      yyStackEntry yystack[YYSTACKDEPTH];	/* The parser's stack */

#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void
ParseTrace (FILE * TraceFILE, char *zTracePrompt)
{
    yyTraceFILE = TraceFILE;
    yyTracePrompt = zTracePrompt;
    if (yyTraceFILE == 0)
	yyTracePrompt = 0;
    else if (yyTracePrompt == 0)
	yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = {
    "$", "EWKT_NEWLINE", "EWKT_POINT", "EWKT_OPEN_BRACKET",
    "EWKT_CLOSE_BRACKET", "EWKT_POINT_M", "EWKT_NUM", "EWKT_COMMA",
    "EWKT_LINESTRING", "EWKT_LINESTRING_M", "EWKT_POLYGON", "EWKT_POLYGON_M",
    "EWKT_MULTIPOINT", "EWKT_MULTIPOINT_M", "EWKT_MULTILINESTRING",
    "EWKT_MULTILINESTRING_M",
    "EWKT_MULTIPOLYGON", "EWKT_MULTIPOLYGON_M", "EWKT_GEOMETRYCOLLECTION",
    "EWKT_GEOMETRYCOLLECTION_M",
    "error", "main", "in", "state",
    "program", "geo_text", "geo_textm", "point",
    "pointz", "pointzm", "linestring", "linestringz",
    "linestringzm", "polygon", "polygonz", "polygonzm",
    "multipoint", "multipointz", "multipointzm", "multilinestring",
    "multilinestringz", "multilinestringzm", "multipolygon", "multipolygonz",
    "multipolygonzm", "geocoll", "geocollz", "geocollzm",
    "pointm", "linestringm", "polygonm", "multipointm",
    "multilinestringm", "multipolygonm", "geocollm", "point_coordxy",
    "point_coordxyz", "point_coordxym", "point_coordxyzm", "point_brkt_coordxy",
    "coord", "point_brkt_coordxym", "point_brkt_coordxyz",
    "point_brkt_coordxyzm",
    "extra_brkt_pointsxy", "extra_brkt_pointsxym", "extra_brkt_pointsxyz",
    "extra_brkt_pointsxyzm",
    "extra_pointsxy", "extra_pointsxym", "extra_pointsxyz", "extra_pointsxyzm",
    "linestring_text", "linestring_textm", "linestring_textz",
    "linestring_textzm",
    "polygon_text", "polygon_textm", "polygon_textz", "polygon_textzm",
    "ring", "extra_rings", "ringm", "extra_ringsm",
    "ringz", "extra_ringsz", "ringzm", "extra_ringszm",
    "multipoint_text", "multipoint_textm", "multipoint_textz",
    "multipoint_textzm",
    "multilinestring_text", "multilinestring_textm", "multilinestring_textz",
    "multilinestring_textzm",
    "multilinestring_text2", "multilinestring_textm2", "multilinestring_textz2",
    "multilinestring_textzm2",
    "multipolygon_text", "multipolygon_textm", "multipolygon_textz",
    "multipolygon_textzm",
    "multipolygon_text2", "multipolygon_textm2", "multipolygon_textz2",
    "multipolygon_textzm2",
    "geocoll_text", "geocoll_textm", "geocoll_textz", "geocoll_textzm",
    "geocoll_text2", "geocoll_textm2", "geocoll_textz2", "geocoll_textzm2",
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
    /*   0 */ "main ::= in",
    /*   1 */ "in ::=",
    /*   2 */ "in ::= in state EWKT_NEWLINE",
    /*   3 */ "state ::= program",
    /*   4 */ "program ::= geo_text",
    /*   5 */ "program ::= geo_textm",
    /*   6 */ "geo_text ::= point",
    /*   7 */ "geo_text ::= pointz",
    /*   8 */ "geo_text ::= pointzm",
    /*   9 */ "geo_text ::= linestring",
    /*  10 */ "geo_text ::= linestringz",
    /*  11 */ "geo_text ::= linestringzm",
    /*  12 */ "geo_text ::= polygon",
    /*  13 */ "geo_text ::= polygonz",
    /*  14 */ "geo_text ::= polygonzm",
    /*  15 */ "geo_text ::= multipoint",
    /*  16 */ "geo_text ::= multipointz",
    /*  17 */ "geo_text ::= multipointzm",
    /*  18 */ "geo_text ::= multilinestring",
    /*  19 */ "geo_text ::= multilinestringz",
    /*  20 */ "geo_text ::= multilinestringzm",
    /*  21 */ "geo_text ::= multipolygon",
    /*  22 */ "geo_text ::= multipolygonz",
    /*  23 */ "geo_text ::= multipolygonzm",
    /*  24 */ "geo_text ::= geocoll",
    /*  25 */ "geo_text ::= geocollz",
    /*  26 */ "geo_text ::= geocollzm",
    /*  27 */ "geo_textm ::= pointm",
    /*  28 */ "geo_textm ::= linestringm",
    /*  29 */ "geo_textm ::= polygonm",
    /*  30 */ "geo_textm ::= multipointm",
    /*  31 */ "geo_textm ::= multilinestringm",
    /*  32 */ "geo_textm ::= multipolygonm",
    /*  33 */ "geo_textm ::= geocollm",
    /*  34 */
    "point ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxy EWKT_CLOSE_BRACKET",
    /*  35 */
    "pointz ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyz EWKT_CLOSE_BRACKET",
    /*  36 */
    "pointm ::= EWKT_POINT_M EWKT_OPEN_BRACKET point_coordxym EWKT_CLOSE_BRACKET",
    /*  37 */
    "pointzm ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyzm EWKT_CLOSE_BRACKET",
    /*  38 */
    "point_brkt_coordxy ::= EWKT_OPEN_BRACKET coord coord EWKT_CLOSE_BRACKET",
    /*  39 */
    "point_brkt_coordxym ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET",
    /*  40 */
    "point_brkt_coordxyz ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET",
    /*  41 */
    "point_brkt_coordxyzm ::= EWKT_OPEN_BRACKET coord coord coord coord EWKT_CLOSE_BRACKET",
    /*  42 */ "point_coordxy ::= coord coord",
    /*  43 */ "point_coordxym ::= coord coord coord",
    /*  44 */ "point_coordxyz ::= coord coord coord",
    /*  45 */ "point_coordxyzm ::= coord coord coord coord",
    /*  46 */ "coord ::= EWKT_NUM",
    /*  47 */ "extra_brkt_pointsxy ::=",
    /*  48 */
    "extra_brkt_pointsxy ::= EWKT_COMMA point_brkt_coordxy extra_brkt_pointsxy",
    /*  49 */ "extra_brkt_pointsxym ::=",
    /*  50 */
    "extra_brkt_pointsxym ::= EWKT_COMMA point_brkt_coordxym extra_brkt_pointsxym",
    /*  51 */ "extra_brkt_pointsxyz ::=",
    /*  52 */
    "extra_brkt_pointsxyz ::= EWKT_COMMA point_brkt_coordxyz extra_brkt_pointsxyz",
    /*  53 */ "extra_brkt_pointsxyzm ::=",
    /*  54 */
    "extra_brkt_pointsxyzm ::= EWKT_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm",
    /*  55 */ "extra_pointsxy ::=",
    /*  56 */ "extra_pointsxy ::= EWKT_COMMA point_coordxy extra_pointsxy",
    /*  57 */ "extra_pointsxym ::=",
    /*  58 */ "extra_pointsxym ::= EWKT_COMMA point_coordxym extra_pointsxym",
    /*  59 */ "extra_pointsxyz ::=",
    /*  60 */ "extra_pointsxyz ::= EWKT_COMMA point_coordxyz extra_pointsxyz",
    /*  61 */ "extra_pointsxyzm ::=",
    /*  62 */
    "extra_pointsxyzm ::= EWKT_COMMA point_coordxyzm extra_pointsxyzm",
    /*  63 */ "linestring ::= EWKT_LINESTRING linestring_text",
    /*  64 */ "linestringm ::= EWKT_LINESTRING_M linestring_textm",
    /*  65 */ "linestringz ::= EWKT_LINESTRING linestring_textz",
    /*  66 */ "linestringzm ::= EWKT_LINESTRING linestring_textzm",
    /*  67 */
    "linestring_text ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET",
    /*  68 */
    "linestring_textm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET",
    /*  69 */
    "linestring_textz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET",
    /*  70 */
    "linestring_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET",
    /*  71 */ "polygon ::= EWKT_POLYGON polygon_text",
    /*  72 */ "polygonm ::= EWKT_POLYGON_M polygon_textm",
    /*  73 */ "polygonz ::= EWKT_POLYGON polygon_textz",
    /*  74 */ "polygonzm ::= EWKT_POLYGON polygon_textzm",
    /*  75 */
    "polygon_text ::= EWKT_OPEN_BRACKET ring extra_rings EWKT_CLOSE_BRACKET",
    /*  76 */
    "polygon_textm ::= EWKT_OPEN_BRACKET ringm extra_ringsm EWKT_CLOSE_BRACKET",
    /*  77 */
    "polygon_textz ::= EWKT_OPEN_BRACKET ringz extra_ringsz EWKT_CLOSE_BRACKET",
    /*  78 */
    "polygon_textzm ::= EWKT_OPEN_BRACKET ringzm extra_ringszm EWKT_CLOSE_BRACKET",
    /*  79 */
    "ring ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET",
    /*  80 */ "extra_rings ::=",
    /*  81 */ "extra_rings ::= EWKT_COMMA ring extra_rings",
    /*  82 */
    "ringm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET",
    /*  83 */ "extra_ringsm ::=",
    /*  84 */ "extra_ringsm ::= EWKT_COMMA ringm extra_ringsm",
    /*  85 */
    "ringz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET",
    /*  86 */ "extra_ringsz ::=",
    /*  87 */ "extra_ringsz ::= EWKT_COMMA ringz extra_ringsz",
    /*  88 */
    "ringzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET",
    /*  89 */ "extra_ringszm ::=",
    /*  90 */ "extra_ringszm ::= EWKT_COMMA ringzm extra_ringszm",
    /*  91 */ "multipoint ::= EWKT_MULTIPOINT multipoint_text",
    /*  92 */ "multipointm ::= EWKT_MULTIPOINT_M multipoint_textm",
    /*  93 */ "multipointz ::= EWKT_MULTIPOINT multipoint_textz",
    /*  94 */ "multipointzm ::= EWKT_MULTIPOINT multipoint_textzm",
    /*  95 */
    "multipoint_text ::= EWKT_OPEN_BRACKET point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET",
    /*  96 */
    "multipoint_textm ::= EWKT_OPEN_BRACKET point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET",
    /*  97 */
    "multipoint_textz ::= EWKT_OPEN_BRACKET point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET",
    /*  98 */
    "multipoint_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET",
    /*  99 */
    "multipoint_text ::= EWKT_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy EWKT_CLOSE_BRACKET",
    /* 100 */
    "multipoint_textm ::= EWKT_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym EWKT_CLOSE_BRACKET",
    /* 101 */
    "multipoint_textz ::= EWKT_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz EWKT_CLOSE_BRACKET",
    /* 102 */
    "multipoint_textzm ::= EWKT_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm EWKT_CLOSE_BRACKET",
    /* 103 */ "multilinestring ::= EWKT_MULTILINESTRING multilinestring_text",
    /* 104 */
    "multilinestringm ::= EWKT_MULTILINESTRING_M multilinestring_textm",
    /* 105 */ "multilinestringz ::= EWKT_MULTILINESTRING multilinestring_textz",
    /* 106 */
    "multilinestringzm ::= EWKT_MULTILINESTRING multilinestring_textzm",
    /* 107 */
    "multilinestring_text ::= EWKT_OPEN_BRACKET linestring_text multilinestring_text2 EWKT_CLOSE_BRACKET",
    /* 108 */ "multilinestring_text2 ::=",
    /* 109 */
    "multilinestring_text2 ::= EWKT_COMMA linestring_text multilinestring_text2",
    /* 110 */
    "multilinestring_textm ::= EWKT_OPEN_BRACKET linestring_textm multilinestring_textm2 EWKT_CLOSE_BRACKET",
    /* 111 */ "multilinestring_textm2 ::=",
    /* 112 */
    "multilinestring_textm2 ::= EWKT_COMMA linestring_textm multilinestring_textm2",
    /* 113 */
    "multilinestring_textz ::= EWKT_OPEN_BRACKET linestring_textz multilinestring_textz2 EWKT_CLOSE_BRACKET",
    /* 114 */ "multilinestring_textz2 ::=",
    /* 115 */
    "multilinestring_textz2 ::= EWKT_COMMA linestring_textz multilinestring_textz2",
    /* 116 */
    "multilinestring_textzm ::= EWKT_OPEN_BRACKET linestring_textzm multilinestring_textzm2 EWKT_CLOSE_BRACKET",
    /* 117 */ "multilinestring_textzm2 ::=",
    /* 118 */
    "multilinestring_textzm2 ::= EWKT_COMMA linestring_textzm multilinestring_textzm2",
    /* 119 */ "multipolygon ::= EWKT_MULTIPOLYGON multipolygon_text",
    /* 120 */ "multipolygonm ::= EWKT_MULTIPOLYGON_M multipolygon_textm",
    /* 121 */ "multipolygonz ::= EWKT_MULTIPOLYGON multipolygon_textz",
    /* 122 */ "multipolygonzm ::= EWKT_MULTIPOLYGON multipolygon_textzm",
    /* 123 */
    "multipolygon_text ::= EWKT_OPEN_BRACKET polygon_text multipolygon_text2 EWKT_CLOSE_BRACKET",
    /* 124 */ "multipolygon_text2 ::=",
    /* 125 */
    "multipolygon_text2 ::= EWKT_COMMA polygon_text multipolygon_text2",
    /* 126 */
    "multipolygon_textm ::= EWKT_OPEN_BRACKET polygon_textm multipolygon_textm2 EWKT_CLOSE_BRACKET",
    /* 127 */ "multipolygon_textm2 ::=",
    /* 128 */
    "multipolygon_textm2 ::= EWKT_COMMA polygon_textm multipolygon_textm2",
    /* 129 */
    "multipolygon_textz ::= EWKT_OPEN_BRACKET polygon_textz multipolygon_textz2 EWKT_CLOSE_BRACKET",
    /* 130 */ "multipolygon_textz2 ::=",
    /* 131 */
    "multipolygon_textz2 ::= EWKT_COMMA polygon_textz multipolygon_textz2",
    /* 132 */
    "multipolygon_textzm ::= EWKT_OPEN_BRACKET polygon_textzm multipolygon_textzm2 EWKT_CLOSE_BRACKET",
    /* 133 */ "multipolygon_textzm2 ::=",
    /* 134 */
    "multipolygon_textzm2 ::= EWKT_COMMA polygon_textzm multipolygon_textzm2",
    /* 135 */ "geocoll ::= EWKT_GEOMETRYCOLLECTION geocoll_text",
    /* 136 */ "geocollm ::= EWKT_GEOMETRYCOLLECTION_M geocoll_textm",
    /* 137 */ "geocollz ::= EWKT_GEOMETRYCOLLECTION geocoll_textz",
    /* 138 */ "geocollzm ::= EWKT_GEOMETRYCOLLECTION geocoll_textzm",
    /* 139 */
    "geocoll_text ::= EWKT_OPEN_BRACKET point geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 140 */
    "geocoll_text ::= EWKT_OPEN_BRACKET linestring geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 141 */
    "geocoll_text ::= EWKT_OPEN_BRACKET polygon geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 142 */
    "geocoll_text ::= EWKT_OPEN_BRACKET multipoint geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 143 */
    "geocoll_text ::= EWKT_OPEN_BRACKET multilinestring geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 144 */
    "geocoll_text ::= EWKT_OPEN_BRACKET multipolygon geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 145 */
    "geocoll_text ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 EWKT_CLOSE_BRACKET",
    /* 146 */ "geocoll_text2 ::=",
    /* 147 */ "geocoll_text2 ::= EWKT_COMMA point geocoll_text2",
    /* 148 */ "geocoll_text2 ::= EWKT_COMMA linestring geocoll_text2",
    /* 149 */ "geocoll_text2 ::= EWKT_COMMA polygon geocoll_text2",
    /* 150 */ "geocoll_text2 ::= EWKT_COMMA multipoint geocoll_text2",
    /* 151 */ "geocoll_text2 ::= EWKT_COMMA multilinestring geocoll_text2",
    /* 152 */ "geocoll_text2 ::= EWKT_COMMA multipolygon geocoll_text2",
    /* 153 */
    "geocoll_text2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2",
    /* 154 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET pointm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 155 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET linestringm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 156 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET polygonm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 157 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET multipointm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 158 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET multilinestringm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 159 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET multipolygonm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 160 */
    "geocoll_textm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 EWKT_CLOSE_BRACKET",
    /* 161 */ "geocoll_textm2 ::=",
    /* 162 */ "geocoll_textm2 ::= EWKT_COMMA pointm geocoll_textm2",
    /* 163 */ "geocoll_textm2 ::= EWKT_COMMA linestringm geocoll_textm2",
    /* 164 */ "geocoll_textm2 ::= EWKT_COMMA polygonm geocoll_textm2",
    /* 165 */ "geocoll_textm2 ::= EWKT_COMMA multipointm geocoll_textm2",
    /* 166 */ "geocoll_textm2 ::= EWKT_COMMA multilinestringm geocoll_textm2",
    /* 167 */ "geocoll_textm2 ::= EWKT_COMMA multipolygonm geocoll_textm2",
    /* 168 */
    "geocoll_textm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2",
    /* 169 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET pointz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 170 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET linestringz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 171 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET polygonz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 172 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET multipointz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 173 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET multilinestringz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 174 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET multipolygonz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 175 */
    "geocoll_textz ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 EWKT_CLOSE_BRACKET",
    /* 176 */ "geocoll_textz2 ::=",
    /* 177 */ "geocoll_textz2 ::= EWKT_COMMA pointz geocoll_textz2",
    /* 178 */ "geocoll_textz2 ::= EWKT_COMMA linestringz geocoll_textz2",
    /* 179 */ "geocoll_textz2 ::= EWKT_COMMA polygonz geocoll_textz2",
    /* 180 */ "geocoll_textz2 ::= EWKT_COMMA multipointz geocoll_textz2",
    /* 181 */ "geocoll_textz2 ::= EWKT_COMMA multilinestringz geocoll_textz2",
    /* 182 */ "geocoll_textz2 ::= EWKT_COMMA multipolygonz geocoll_textz2",
    /* 183 */
    "geocoll_textz2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2",
    /* 184 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET pointzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 185 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET linestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 186 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET polygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 187 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET multipointzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 188 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET multilinestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 189 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET multipolygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 190 */
    "geocoll_textzm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 EWKT_CLOSE_BRACKET",
    /* 191 */ "geocoll_textzm2 ::=",
    /* 192 */ "geocoll_textzm2 ::= EWKT_COMMA pointzm geocoll_textzm2",
    /* 193 */ "geocoll_textzm2 ::= EWKT_COMMA linestringzm geocoll_textzm2",
    /* 194 */ "geocoll_textzm2 ::= EWKT_COMMA polygonzm geocoll_textzm2",
    /* 195 */ "geocoll_textzm2 ::= EWKT_COMMA multipointzm geocoll_textzm2",
    /* 196 */
    "geocoll_textzm2 ::= EWKT_COMMA multilinestringzm geocoll_textzm2",
    /* 197 */ "geocoll_textzm2 ::= EWKT_COMMA multipolygonzm geocoll_textzm2",
    /* 198 */
    "geocoll_textzm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.
*/
static void
yyGrowStack (yyParser * p)
{
    int newSize;
    yyStackEntry *pNew;

    newSize = p->yystksz * 2 + 100;
    pNew = realloc (p->yystack, newSize * sizeof (pNew[0]));
    if (pNew)
      {
	  p->yystack = pNew;
	  p->yystksz = newSize;
#ifndef NDEBUG
	  if (yyTraceFILE)
	    {
		fprintf (yyTraceFILE, "%sStack grows to %d entries!\n",
			 yyTracePrompt, p->yystksz);
	    }
#endif
      }
}
#endif

/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *
ParseAlloc (void *(*mallocProc) (size_t))
{
    yyParser *pParser;
    pParser = (yyParser *) (*mallocProc) ((size_t) sizeof (yyParser));
    if (pParser)
      {
	  pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
	  pParser->yyidxMax = 0;
#endif
#if YYSTACKDEPTH<=0
	  pParser->yystack = NULL;
	  pParser->yystksz = 0;
	  yyGrowStack (pParser);
#endif
      }
    return pParser;
}

/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
static void
yy_destructor (yyParser * yypParser,	/* The parser */
	       YYCODETYPE yymajor,	/* Type code for object to destroy */
	       YYMINORTYPE * yypminor	/* The object to be destroyed */
    )
{
    ParseARG_FETCH;
    switch (yymajor)
      {
	  /* Here is inserted the actions which take place when a
	   ** terminal or non-terminal is destroyed.  This can happen
	   ** when the symbol is popped from the stack during a
	   ** reduce or during error processing or when a parser is 
	   ** being destroyed before it is finished parsing.
	   **
	   ** Note: during a reduce, the only symbols destroyed are those
	   ** which appear on the RHS of the rule, but which are not used
	   ** inside the C code.
	   */
      default:
	  break;		/* If no destructor action specified: do nothing */
      }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
**
** Return the major token number for the symbol popped.
*/
static int
yy_pop_parser_stack (yyParser * pParser)
{
    YYCODETYPE yymajor;
    yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

    if (pParser->yyidx < 0)
	return 0;
#ifndef NDEBUG
    if (yyTraceFILE && pParser->yyidx >= 0)
      {
	  fprintf (yyTraceFILE, "%sPopping %s\n",
		   yyTracePrompt, yyTokenName[yytos->major]);
      }
#endif
    yymajor = yytos->major;
    yy_destructor (pParser, yymajor, &yytos->minor);
    pParser->yyidx--;
    return yymajor;
}

/* 
** Deallocate and destroy a parser.  Destructors are all called for
** all stack elements before shutting the parser down.
**
** Inputs:
** <ul>
** <li>  A pointer to the parser.  This should be a pointer
**       obtained from ParseAlloc.
** <li>  A pointer to a function used to reclaim memory obtained
**       from malloc.
** </ul>
*/
void
ParseFree (void *p,		/* The parser to be deleted */
	   void (*freeProc) (void *)	/* Function used to reclaim memory */
    )
{
    yyParser *pParser = (yyParser *) p;
    if (pParser == 0)
	return;
    while (pParser->yyidx >= 0)
	yy_pop_parser_stack (pParser);
#if YYSTACKDEPTH<=0
    free (pParser->yystack);
#endif
    (*freeProc) ((void *) pParser);
}

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int
ParseStackPeak (void *p)
{
    yyParser *pParser = (yyParser *) p;
    return pParser->yyidxMax;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_shift_action (yyParser * pParser,	/* The parser */
		      YYCODETYPE iLookAhead	/* The look-ahead token */
    )
{
    int i;
    int stateno = pParser->yystack[pParser->yyidx].stateno;

    if (stateno > YY_SHIFT_MAX
	|| (i = yy_shift_ofst[stateno]) == YY_SHIFT_USE_DFLT)
      {
	  return yy_default[stateno];
      }
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  if (iLookAhead > 0)
	    {
#ifdef YYFALLBACK
		YYCODETYPE iFallback;	/* Fallback token */
		if (iLookAhead < sizeof (yyFallback) / sizeof (yyFallback[0])
		    && (iFallback = yyFallback[iLookAhead]) != 0)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sFALLBACK %s => %s\n",
				     yyTracePrompt, yyTokenName[iLookAhead],
				     yyTokenName[iFallback]);
			}
#endif
		      return yy_find_shift_action (pParser, iFallback);
		  }
#endif
#ifdef YYWILDCARD
		{
		    int j = i - iLookAhead + YYWILDCARD;
		    if (j >= 0 && j < YY_SZ_ACTTAB
			&& yy_lookahead[j] == YYWILDCARD)
		      {
#ifndef NDEBUG
			  if (yyTraceFILE)
			    {
				fprintf (yyTraceFILE, "%sWILDCARD %s => %s\n",
					 yyTracePrompt, yyTokenName[iLookAhead],
					 yyTokenName[YYWILDCARD]);
			    }
#endif /* NDEBUG */
			  return yy_action[j];
		      }
		}
#endif /* YYWILDCARD */
	    }
	  return yy_default[stateno];
      }
    else
      {
	  return yy_action[i];
      }
























































}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_reduce_action (int stateno,	/* Current state number */
		       YYCODETYPE iLookAhead	/* The look-ahead token */

    )
{
    int i;
#ifdef YYERRORSYMBOL

    if (stateno > YY_REDUCE_MAX)
      {
	  return yy_default[stateno];
      }
#else

    assert (stateno <= YY_REDUCE_MAX);
#endif
    i = yy_reduce_ofst[stateno];

    assert (i != YY_REDUCE_USE_DFLT);
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
#ifdef YYERRORSYMBOL

    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  return yy_default[stateno];
      }
#else

    assert (i >= 0 && i < YY_SZ_ACTTAB);
    assert (yy_lookahead[i] == iLookAhead);
#endif
    return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void
yyStackOverflow (yyParser * yypParser, YYMINORTYPE * yypMinor)
{
    ParseARG_FETCH;
    yypParser->yyidx--;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sStack Overflow!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will execute if the parser
     ** stack every overflows */


    spatialite_e ("Giving up.  Parser stack overflow\n");

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument var */
}






















/*
** Perform a shift action.
*/
static void
yy_shift (yyParser * yypParser,	/* The parser to be shifted */
	  int yyNewState,	/* The new state to shift in */
	  int yyMajor,		/* The major token to shift in */
	  YYMINORTYPE * yypMinor	/* Pointer to the minor token to shift in */
    )
{
    yyStackEntry *yytos;
    yypParser->yyidx++;
#ifdef YYTRACKMAXSTACKDEPTH
    if (yypParser->yyidx > yypParser->yyidxMax)
      {
	  yypParser->yyidxMax = yypParser->yyidx;
      }
#endif
#if YYSTACKDEPTH>0
    if (yypParser->yyidx >= YYSTACKDEPTH)
      {
	  yyStackOverflow (yypParser, yypMinor);
	  return;
      }
#else
    if (yypParser->yyidx >= yypParser->yystksz)
      {
	  yyGrowStack (yypParser);
	  if (yypParser->yyidx >= yypParser->yystksz)
	    {
		yyStackOverflow (yypParser, yypMinor);
		return;
	    }
      }
#endif
    yytos = &yypParser->yystack[yypParser->yyidx];
    yytos->stateno = (YYACTIONTYPE) yyNewState;
    yytos->major = (YYCODETYPE) yyMajor;
    yytos->minor = *yypMinor;
#ifndef NDEBUG
    if (yyTraceFILE && yypParser->yyidx > 0)
      {
	  int i;
	  fprintf (yyTraceFILE, "%sShift %d\n", yyTracePrompt, yyNewState);
	  fprintf (yyTraceFILE, "%sStack:", yyTracePrompt);
	  for (i = 1; i <= yypParser->yyidx; i++)
	      fprintf (yyTraceFILE, " %s",
		       yyTokenName[yypParser->yystack[i].major]);
	  fprintf (yyTraceFILE, "\n");
      }
#endif
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct
{
    YYCODETYPE lhs;		/* Symbol on the left-hand side of the rule */
    unsigned char nrhs;		/* Number of right-hand side symbols in the rule */
} yyRuleInfo[] =
{
    {
    21, 1},
    {
    22, 0},
    {
    22, 3},
    {
    23, 1},
    {
    24, 1},
    {
    24, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    25, 1},
    {
    26, 1},
    {
    26, 1},
    {
    26, 1},
    {
    26, 1},
    {
    26, 1},
    {
    26, 1},
    {
    26, 1},
    {
    27, 4},
    {
    28, 4},
    {
    48, 4},
    {
    29, 4},
    {
    59, 4},
    {
    61, 5},
    {
    62, 5},
    {
    63, 6},
    {
    55, 2},
    {
    57, 3},
    {
    56, 3},
    {
    58, 4},
    {
    60, 1},
    {
    64, 0},
    {
    64, 3},
    {
    65, 0},
    {
    65, 3},
    {
    66, 0},
    {
    66, 3},
    {
    67, 0},
    {
    67, 3},
    {
    68, 0},
    {
    68, 3},
    {
    69, 0},
    {
    69, 3},
    {
    70, 0},
    {
    70, 3},
    {
    71, 0},
    {
    71, 3},
    {
    30, 2},
    {
    49, 2},
    {
    31, 2},
    {
    32, 2},
    {
    72, 6},
    {
    73, 6},
    {
    74, 6},
    {
    75, 6},
    {
    33, 2},
    {
    50, 2},
    {
    34, 2},
    {
    35, 2},
    {
    76, 4},
    {
    77, 4},
    {
    78, 4},
    {
    79, 4},
    {
    80, 10},
    {
    81, 0},
    {
    81, 3},
    {
    82, 10},
    {
    83, 0},
    {
    83, 3},
    {
    84, 10},
    {
    85, 0},
    {
    85, 3},
    {
    86, 10},
    {
    87, 0},
    {
    87, 3},
    {
    36, 2},
    {
    51, 2},
    {
    37, 2},
    {
    38, 2},
    {
    88, 4},
    {
    89, 4},
    {
    90, 4},
    {
    91, 4},
    {
    88, 4},
    {
    89, 4},
    {
    90, 4},
    {
    91, 4},
    {
    39, 2},
    {
    52, 2},
    {
    40, 2},
    {
    41, 2},
    {
    92, 4},
    {
    96, 0},
    {
    96, 3},
    {
    93, 4},
    {
    97, 0},
    {
    97, 3},
    {
    94, 4},
    {
    98, 0},
    {
    98, 3},
    {
    95, 4},
    {
    99, 0},
    {
    99, 3},
    {
    42, 2},
    {
    53, 2},
    {
    43, 2},
    {
    44, 2},
    {
    100, 4},
    {
    104, 0},
    {
    104, 3},
    {
    101, 4},
    {
    105, 0},
    {
    105, 3},
    {
    102, 4},
    {
    106, 0},
    {
    106, 3},
    {
    103, 4},
    {
    107, 0},
    {
    107, 3},
    {
    45, 2},
    {
    54, 2},
    {
    46, 2},
    {
    47, 2},
    {
    108, 4},
    {
    108, 4},
    {
    108, 4},
    {
    108, 4},
    {
    108, 4},
    {
    108, 4},
    {
    108, 5},
    {
    112, 0},
    {
    112, 3},
    {
    112, 3},
    {
    112, 3},
    {
    112, 3},
    {
    112, 3},
    {
    112, 3},
    {
    112, 4},
    {
    109, 4},
    {
    109, 4},
    {
    109, 4},
    {
    109, 4},
    {
    109, 4},
    {
    109, 4},
    {
    109, 5},
    {
    113, 0},
    {
    113, 3},
    {
    113, 3},
    {
    113, 3},
    {
    113, 3},
    {
    113, 3},
    {
    113, 3},
    {
    113, 4},
    {
    110, 4},
    {
    110, 4},
    {
    110, 4},
    {
    110, 4},
    {
    110, 4},
    {
    110, 4},
    {
    110, 5},
    {
    114, 0},
    {
    114, 3},
    {
    114, 3},
    {
    114, 3},
    {
    114, 3},
    {
    114, 3},
    {
    114, 3},
    {
    114, 4},
    {
    111, 4},
    {
    111, 4},
    {
    111, 4},
    {
    111, 4},
    {
    111, 4},
    {
    111, 4},
    {
    111, 5},
    {
    115, 0},
    {
    115, 3},
    {
    115, 3},
    {
    115, 3},
    {
    115, 3},
    {
    115, 3},
    {
    115, 3},
    {
115, 4},};

static void yy_accept (yyParser *);	/* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
*/
static void
yy_reduce (yyParser * yypParser,	/* The parser */
	   int yyruleno		/* Number of the rule by which to reduce */
    )
{
    int yygoto;			/* The next state */
    int yyact;			/* The next action */
    YYMINORTYPE yygotominor;	/* The LHS of the rule reduced */
    yyStackEntry *yymsp;	/* The top of the parser's stack */
    int yysize;			/* Amount to pop the stack */
    ParseARG_FETCH;
    yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
    if (yyTraceFILE && yyruleno >= 0
	&& yyruleno < (int) (sizeof (yyRuleName) / sizeof (yyRuleName[0])))
      {
	  fprintf (yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
		   yyRuleName[yyruleno]);
      }
#endif /* NDEBUG */

    /* Silence complaints from purify about yygotominor being uninitialized
     ** in some cases when it is copied into the stack after the following
     ** switch.  yygotominor is uninitialized when a rule reduces that does
     ** not set the value of its left-hand side nonterminal.  Leaving the
     ** value of the nonterminal uninitialized is utterly harmless as long
     ** as the value is never used.  So really the only thing this code
     ** accomplishes is to quieten purify.  
     **
     ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
     ** without this code, their parser segfaults.  I'm not sure what there
     ** parser is doing to make this happen.  This is the second bug report
     ** from wireshark this week.  Clearly they are stressing Lemon in ways
     ** that it has not been previously stressed...  (SQLite ticket #2172)
     */
    /*memset(&yygotominor, 0, sizeof(yygotominor)); */
    yygotominor = yyzerominor;


    switch (yyruleno)
      {
	  /* Beginning here are the reduction cases.  A typical example
	   ** follows:
	   **   case 0:
	   **  #line <lineno> <grammarfile>
	   **     { ... }           // User supplied code
	   **  #line <lineno> <thisfile>
	   **     break;
	   */
      case 6:			/* geo_text ::= point */
      case 7:			/* geo_text ::= pointz */
	  yytestcase (yyruleno == 7);
      case 8:			/* geo_text ::= pointzm */
	  yytestcase (yyruleno == 8);
      case 9:			/* geo_text ::= linestring */
	  yytestcase (yyruleno == 9);
      case 10:			/* geo_text ::= linestringz */
	  yytestcase (yyruleno == 10);
      case 11:			/* geo_text ::= linestringzm */
	  yytestcase (yyruleno == 11);
      case 12:			/* geo_text ::= polygon */
	  yytestcase (yyruleno == 12);
      case 13:			/* geo_text ::= polygonz */
	  yytestcase (yyruleno == 13);
      case 14:			/* geo_text ::= polygonzm */
	  yytestcase (yyruleno == 14);
      case 15:			/* geo_text ::= multipoint */
	  yytestcase (yyruleno == 15);
      case 16:			/* geo_text ::= multipointz */
	  yytestcase (yyruleno == 16);
      case 17:			/* geo_text ::= multipointzm */
	  yytestcase (yyruleno == 17);
      case 18:			/* geo_text ::= multilinestring */
	  yytestcase (yyruleno == 18);
      case 19:			/* geo_text ::= multilinestringz */
	  yytestcase (yyruleno == 19);
      case 20:			/* geo_text ::= multilinestringzm */
	  yytestcase (yyruleno == 20);
      case 21:			/* geo_text ::= multipolygon */
	  yytestcase (yyruleno == 21);
      case 22:			/* geo_text ::= multipolygonz */
	  yytestcase (yyruleno == 22);
      case 23:			/* geo_text ::= multipolygonzm */
	  yytestcase (yyruleno == 23);
      case 24:			/* geo_text ::= geocoll */
	  yytestcase (yyruleno == 24);
      case 25:			/* geo_text ::= geocollz */
	  yytestcase (yyruleno == 25);
      case 26:			/* geo_text ::= geocollzm */
	  yytestcase (yyruleno == 26);
      case 27:			/* geo_textm ::= pointm */
	  yytestcase (yyruleno == 27);
      case 28:			/* geo_textm ::= linestringm */
	  yytestcase (yyruleno == 28);
      case 29:			/* geo_textm ::= polygonm */
	  yytestcase (yyruleno == 29);
      case 30:			/* geo_textm ::= multipointm */
	  yytestcase (yyruleno == 30);
      case 31:			/* geo_textm ::= multilinestringm */
	  yytestcase (yyruleno == 31);
      case 32:			/* geo_textm ::= multipolygonm */
	  yytestcase (yyruleno == 32);
      case 33:			/* geo_textm ::= geocollm */
	  yytestcase (yyruleno == 33);
	  {
	      p_data->result = yymsp[0].minor.yy0;
	  }
	  break;
      case 34:			/* point ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxy EWKT_CLOSE_BRACKET */
      case 35:			/* pointz ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyz EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 35);
      case 37:			/* pointzm ::= EWKT_POINT EWKT_OPEN_BRACKET point_coordxyzm EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 37);
	  {
	      yygotominor.yy0 =
		  ewkt_buildGeomFromPoint (p_data,
					   (gaiaPointPtr) yymsp[-1].minor.yy0);
	  }
	  break;
      case 36:			/* pointm ::= EWKT_POINT_M EWKT_OPEN_BRACKET point_coordxym EWKT_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  ewkt_buildGeomFromPoint (p_data,
					   (gaiaPointPtr) yymsp[-1].minor.yy0);
	  }
	  break;
      case 38:			/* point_brkt_coordxy ::= EWKT_OPEN_BRACKET coord coord EWKT_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xy (p_data,
					  (double *) yymsp[-2].minor.yy0,
					  (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 39:			/* point_brkt_coordxym ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xym (p_data,
					   (double *) yymsp[-3].minor.yy0,
					   (double *) yymsp[-2].minor.yy0,
					   (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 40:			/* point_brkt_coordxyz ::= EWKT_OPEN_BRACKET coord coord coord EWKT_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xyz (p_data,
					   (double *) yymsp[-3].minor.yy0,
					   (double *) yymsp[-2].minor.yy0,
					   (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 41:			/* point_brkt_coordxyzm ::= EWKT_OPEN_BRACKET coord coord coord coord EWKT_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xyzm (p_data,
					    (double *) yymsp[-4].minor.yy0,
					    (double *) yymsp[-3].minor.yy0,
					    (double *) yymsp[-2].minor.yy0,
					    (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 42:			/* point_coordxy ::= coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xy (p_data,
					  (double *) yymsp[-1].minor.yy0,
					  (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 43:			/* point_coordxym ::= coord coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xym (p_data,
					   (double *) yymsp[-2].minor.yy0,
					   (double *) yymsp[-1].minor.yy0,
					   (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 44:			/* point_coordxyz ::= coord coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xyz (p_data,
					   (double *) yymsp[-2].minor.yy0,
					   (double *) yymsp[-1].minor.yy0,
					   (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 45:			/* point_coordxyzm ::= coord coord coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) ewkt_point_xyzm (p_data,
					    (double *) yymsp[-3].minor.yy0,
					    (double *) yymsp[-2].minor.yy0,
					    (double *) yymsp[-1].minor.yy0,
					    (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 46:			/* coord ::= EWKT_NUM */
      case 91:			/* multipoint ::= EWKT_MULTIPOINT multipoint_text */
	  yytestcase (yyruleno == 91);
      case 92:			/* multipointm ::= EWKT_MULTIPOINT_M multipoint_textm */
	  yytestcase (yyruleno == 92);
      case 93:			/* multipointz ::= EWKT_MULTIPOINT multipoint_textz */
	  yytestcase (yyruleno == 93);
      case 94:			/* multipointzm ::= EWKT_MULTIPOINT multipoint_textzm */
	  yytestcase (yyruleno == 94);
      case 103:		/* multilinestring ::= EWKT_MULTILINESTRING multilinestring_text */
	  yytestcase (yyruleno == 103);
      case 104:		/* multilinestringm ::= EWKT_MULTILINESTRING_M multilinestring_textm */
	  yytestcase (yyruleno == 104);
      case 105:		/* multilinestringz ::= EWKT_MULTILINESTRING multilinestring_textz */
	  yytestcase (yyruleno == 105);
      case 106:		/* multilinestringzm ::= EWKT_MULTILINESTRING multilinestring_textzm */
	  yytestcase (yyruleno == 106);
      case 119:		/* multipolygon ::= EWKT_MULTIPOLYGON multipolygon_text */
	  yytestcase (yyruleno == 119);
      case 120:		/* multipolygonm ::= EWKT_MULTIPOLYGON_M multipolygon_textm */
	  yytestcase (yyruleno == 120);
      case 121:		/* multipolygonz ::= EWKT_MULTIPOLYGON multipolygon_textz */
	  yytestcase (yyruleno == 121);
      case 122:		/* multipolygonzm ::= EWKT_MULTIPOLYGON multipolygon_textzm */
	  yytestcase (yyruleno == 122);
      case 135:		/* geocoll ::= EWKT_GEOMETRYCOLLECTION geocoll_text */
	  yytestcase (yyruleno == 135);
      case 136:		/* geocollm ::= EWKT_GEOMETRYCOLLECTION_M geocoll_textm */
	  yytestcase (yyruleno == 136);
      case 137:		/* geocollz ::= EWKT_GEOMETRYCOLLECTION geocoll_textz */
	  yytestcase (yyruleno == 137);
      case 138:		/* geocollzm ::= EWKT_GEOMETRYCOLLECTION geocoll_textzm */
	  yytestcase (yyruleno == 138);
	  {
	      yygotominor.yy0 = yymsp[0].minor.yy0;
	  }
	  break;
      case 47:			/* extra_brkt_pointsxy ::= */
      case 49:			/* extra_brkt_pointsxym ::= */
	  yytestcase (yyruleno == 49);
      case 51:			/* extra_brkt_pointsxyz ::= */
	  yytestcase (yyruleno == 51);
      case 53:			/* extra_brkt_pointsxyzm ::= */
	  yytestcase (yyruleno == 53);
      case 55:			/* extra_pointsxy ::= */
	  yytestcase (yyruleno == 55);
      case 57:			/* extra_pointsxym ::= */
	  yytestcase (yyruleno == 57);
      case 59:			/* extra_pointsxyz ::= */
	  yytestcase (yyruleno == 59);
      case 61:			/* extra_pointsxyzm ::= */
	  yytestcase (yyruleno == 61);
      case 80:			/* extra_rings ::= */
	  yytestcase (yyruleno == 80);
      case 83:			/* extra_ringsm ::= */
	  yytestcase (yyruleno == 83);
      case 86:			/* extra_ringsz ::= */
	  yytestcase (yyruleno == 86);
      case 89:			/* extra_ringszm ::= */
	  yytestcase (yyruleno == 89);
      case 108:		/* multilinestring_text2 ::= */
	  yytestcase (yyruleno == 108);
      case 111:		/* multilinestring_textm2 ::= */
	  yytestcase (yyruleno == 111);
      case 114:		/* multilinestring_textz2 ::= */
	  yytestcase (yyruleno == 114);
      case 117:		/* multilinestring_textzm2 ::= */
	  yytestcase (yyruleno == 117);
      case 124:		/* multipolygon_text2 ::= */
	  yytestcase (yyruleno == 124);
      case 127:		/* multipolygon_textm2 ::= */
	  yytestcase (yyruleno == 127);
      case 130:		/* multipolygon_textz2 ::= */
	  yytestcase (yyruleno == 130);
      case 133:		/* multipolygon_textzm2 ::= */
	  yytestcase (yyruleno == 133);
      case 146:		/* geocoll_text2 ::= */
	  yytestcase (yyruleno == 146);
      case 161:		/* geocoll_textm2 ::= */
	  yytestcase (yyruleno == 161);
      case 176:		/* geocoll_textz2 ::= */
	  yytestcase (yyruleno == 176);
      case 191:		/* geocoll_textzm2 ::= */
	  yytestcase (yyruleno == 191);
	  {
	      yygotominor.yy0 = NULL;
	  }
	  break;
      case 48:			/* extra_brkt_pointsxy ::= EWKT_COMMA point_brkt_coordxy extra_brkt_pointsxy */
      case 50:			/* extra_brkt_pointsxym ::= EWKT_COMMA point_brkt_coordxym extra_brkt_pointsxym */
	  yytestcase (yyruleno == 50);
      case 52:			/* extra_brkt_pointsxyz ::= EWKT_COMMA point_brkt_coordxyz extra_brkt_pointsxyz */
	  yytestcase (yyruleno == 52);
      case 54:			/* extra_brkt_pointsxyzm ::= EWKT_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm */
	  yytestcase (yyruleno == 54);
      case 56:			/* extra_pointsxy ::= EWKT_COMMA point_coordxy extra_pointsxy */
	  yytestcase (yyruleno == 56);
      case 58:			/* extra_pointsxym ::= EWKT_COMMA point_coordxym extra_pointsxym */
	  yytestcase (yyruleno == 58);
      case 60:			/* extra_pointsxyz ::= EWKT_COMMA point_coordxyz extra_pointsxyz */
	  yytestcase (yyruleno == 60);
      case 62:			/* extra_pointsxyzm ::= EWKT_COMMA point_coordxyzm extra_pointsxyzm */
	  yytestcase (yyruleno == 62);
	  {
	      ((gaiaPointPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 63:			/* linestring ::= EWKT_LINESTRING linestring_text */
      case 64:			/* linestringm ::= EWKT_LINESTRING_M linestring_textm */
	  yytestcase (yyruleno == 64);
      case 65:			/* linestringz ::= EWKT_LINESTRING linestring_textz */
	  yytestcase (yyruleno == 65);
      case 66:			/* linestringzm ::= EWKT_LINESTRING linestring_textzm */
	  yytestcase (yyruleno == 66);
	  {
	      yygotominor.yy0 =
		  ewkt_buildGeomFromLinestring (p_data,
						(gaiaLinestringPtr)
						yymsp[0].minor.yy0);
	  }
	  break;
      case 67:			/* linestring_text ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_linestring_xy (p_data,
					       (gaiaPointPtr) yymsp[-4].minor.
					       yy0);
	  }
	  break;
      case 68:			/* linestring_textm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_linestring_xym (p_data,
						(gaiaPointPtr) yymsp[-4].minor.
						yy0);
	  }
	  break;
      case 69:			/* linestring_textz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_linestring_xyz (p_data,
						(gaiaPointPtr) yymsp[-4].minor.
						yy0);
	  }
	  break;
      case 70:			/* linestring_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_linestring_xyzm (p_data,
						 (gaiaPointPtr) yymsp[-4].minor.
						 yy0);
	  }
	  break;
      case 71:			/* polygon ::= EWKT_POLYGON polygon_text */
      case 72:			/* polygonm ::= EWKT_POLYGON_M polygon_textm */
	  yytestcase (yyruleno == 72);
      case 73:			/* polygonz ::= EWKT_POLYGON polygon_textz */
	  yytestcase (yyruleno == 73);
      case 74:			/* polygonzm ::= EWKT_POLYGON polygon_textzm */
	  yytestcase (yyruleno == 74);
	  {
	      yygotominor.yy0 =
		  ewkt_buildGeomFromPolygon (p_data,
					     (gaiaPolygonPtr) yymsp[0].minor.
					     yy0);
	  }
	  break;
      case 75:			/* polygon_text ::= EWKT_OPEN_BRACKET ring extra_rings EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_polygon_xy (p_data,
					    (gaiaRingPtr) yymsp[-2].minor.yy0);
	  }
	  break;
      case 76:			/* polygon_textm ::= EWKT_OPEN_BRACKET ringm extra_ringsm EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_polygon_xym (p_data,
					     (gaiaRingPtr) yymsp[-2].minor.yy0);
	  }
	  break;
      case 77:			/* polygon_textz ::= EWKT_OPEN_BRACKET ringz extra_ringsz EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_polygon_xyz (p_data,
					     (gaiaRingPtr) yymsp[-2].minor.yy0);
	  }
	  break;
      case 78:			/* polygon_textzm ::= EWKT_OPEN_BRACKET ringzm extra_ringszm EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_polygon_xyzm (p_data,
					      (gaiaRingPtr) yymsp[-2].minor.
					      yy0);
	  }
	  break;
      case 79:			/* ring ::= EWKT_OPEN_BRACKET point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy EWKT_COMMA point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_ring_xy (p_data,
					 (gaiaPointPtr) yymsp[-8].minor.yy0);
	  }
	  break;
      case 81:			/* extra_rings ::= EWKT_COMMA ring extra_rings */
      case 84:			/* extra_ringsm ::= EWKT_COMMA ringm extra_ringsm */
	  yytestcase (yyruleno == 84);
      case 87:			/* extra_ringsz ::= EWKT_COMMA ringz extra_ringsz */
	  yytestcase (yyruleno == 87);
      case 90:			/* extra_ringszm ::= EWKT_COMMA ringzm extra_ringszm */
	  yytestcase (yyruleno == 90);
	  {
	      ((gaiaRingPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 82:			/* ringm ::= EWKT_OPEN_BRACKET point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym EWKT_COMMA point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_ring_xym (p_data,
					  (gaiaPointPtr) yymsp[-8].minor.yy0);
	  }
	  break;
      case 85:			/* ringz ::= EWKT_OPEN_BRACKET point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz EWKT_COMMA point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_ring_xyz (p_data,
					  (gaiaPointPtr) yymsp[-8].minor.yy0);
	  }
	  break;
      case 88:			/* ringzm ::= EWKT_OPEN_BRACKET point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm EWKT_COMMA point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_ring_xyzm (p_data,
					   (gaiaPointPtr) yymsp[-8].minor.yy0);
	  }
	  break;
      case 95:			/* multipoint_text ::= EWKT_OPEN_BRACKET point_coordxy extra_pointsxy EWKT_CLOSE_BRACKET */
      case 99:			/* multipoint_text ::= EWKT_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 99);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipoint_xy (p_data,
					       (gaiaPointPtr) yymsp[-2].minor.
					       yy0);
	  }
	  break;
      case 96:			/* multipoint_textm ::= EWKT_OPEN_BRACKET point_coordxym extra_pointsxym EWKT_CLOSE_BRACKET */
      case 100:		/* multipoint_textm ::= EWKT_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 100);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipoint_xym (p_data,
						(gaiaPointPtr) yymsp[-2].minor.
						yy0);
	  }
	  break;
      case 97:			/* multipoint_textz ::= EWKT_OPEN_BRACKET point_coordxyz extra_pointsxyz EWKT_CLOSE_BRACKET */
      case 101:		/* multipoint_textz ::= EWKT_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 101);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipoint_xyz (p_data,
						(gaiaPointPtr) yymsp[-2].minor.
						yy0);
	  }
	  break;
      case 98:			/* multipoint_textzm ::= EWKT_OPEN_BRACKET point_coordxyzm extra_pointsxyzm EWKT_CLOSE_BRACKET */
      case 102:		/* multipoint_textzm ::= EWKT_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 102);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipoint_xyzm (p_data,
						 (gaiaPointPtr) yymsp[-2].minor.
						 yy0);
	  }
	  break;
      case 107:		/* multilinestring_text ::= EWKT_OPEN_BRACKET linestring_text multilinestring_text2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multilinestring_xy (p_data,
						    (gaiaLinestringPtr)
						    yymsp[-2].minor.yy0);
	  }
	  break;
      case 109:		/* multilinestring_text2 ::= EWKT_COMMA linestring_text multilinestring_text2 */
      case 112:		/* multilinestring_textm2 ::= EWKT_COMMA linestring_textm multilinestring_textm2 */
	  yytestcase (yyruleno == 112);
      case 115:		/* multilinestring_textz2 ::= EWKT_COMMA linestring_textz multilinestring_textz2 */
	  yytestcase (yyruleno == 115);
      case 118:		/* multilinestring_textzm2 ::= EWKT_COMMA linestring_textzm multilinestring_textzm2 */
	  yytestcase (yyruleno == 118);
	  {
	      ((gaiaLinestringPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 110:		/* multilinestring_textm ::= EWKT_OPEN_BRACKET linestring_textm multilinestring_textm2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multilinestring_xym (p_data,
						     (gaiaLinestringPtr)
						     yymsp[-2].minor.yy0);
	  }
	  break;
      case 113:		/* multilinestring_textz ::= EWKT_OPEN_BRACKET linestring_textz multilinestring_textz2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multilinestring_xyz (p_data,
						     (gaiaLinestringPtr)
						     yymsp[-2].minor.yy0);
	  }
	  break;
      case 116:		/* multilinestring_textzm ::= EWKT_OPEN_BRACKET linestring_textzm multilinestring_textzm2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multilinestring_xyzm (p_data,
						      (gaiaLinestringPtr)
						      yymsp[-2].minor.yy0);
	  }
	  break;
      case 123:		/* multipolygon_text ::= EWKT_OPEN_BRACKET polygon_text multipolygon_text2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipolygon_xy (p_data,
						 (gaiaPolygonPtr)
						 yymsp[-2].minor.yy0);
	  }
	  break;
      case 125:		/* multipolygon_text2 ::= EWKT_COMMA polygon_text multipolygon_text2 */
      case 128:		/* multipolygon_textm2 ::= EWKT_COMMA polygon_textm multipolygon_textm2 */
	  yytestcase (yyruleno == 128);
      case 131:		/* multipolygon_textz2 ::= EWKT_COMMA polygon_textz multipolygon_textz2 */
	  yytestcase (yyruleno == 131);
      case 134:		/* multipolygon_textzm2 ::= EWKT_COMMA polygon_textzm multipolygon_textzm2 */
	  yytestcase (yyruleno == 134);
	  {
	      ((gaiaPolygonPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 126:		/* multipolygon_textm ::= EWKT_OPEN_BRACKET polygon_textm multipolygon_textm2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipolygon_xym (p_data,
						  (gaiaPolygonPtr)
						  yymsp[-2].minor.yy0);
	  }
	  break;
      case 129:		/* multipolygon_textz ::= EWKT_OPEN_BRACKET polygon_textz multipolygon_textz2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipolygon_xyz (p_data,
						  (gaiaPolygonPtr)
						  yymsp[-2].minor.yy0);
	  }
	  break;
      case 132:		/* multipolygon_textzm ::= EWKT_OPEN_BRACKET polygon_textzm multipolygon_textzm2 EWKT_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_multipolygon_xyzm (p_data,
						   (gaiaPolygonPtr)
						   yymsp[-2].minor.yy0);
	  }
	  break;
      case 139:		/* geocoll_text ::= EWKT_OPEN_BRACKET point geocoll_text2 EWKT_CLOSE_BRACKET */
      case 140:		/* geocoll_text ::= EWKT_OPEN_BRACKET linestring geocoll_text2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 140);
      case 141:		/* geocoll_text ::= EWKT_OPEN_BRACKET polygon geocoll_text2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 141);
      case 142:		/* geocoll_text ::= EWKT_OPEN_BRACKET multipoint geocoll_text2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 142);
      case 143:		/* geocoll_text ::= EWKT_OPEN_BRACKET multilinestring geocoll_text2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 143);
      case 144:		/* geocoll_text ::= EWKT_OPEN_BRACKET multipolygon geocoll_text2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 144);
      case 145:		/* geocoll_text ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 145);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_geomColl_xy (p_data,
					     (gaiaGeomCollPtr) yymsp[-2].minor.
					     yy0);
	  }
	  break;
      case 147:		/* geocoll_text2 ::= EWKT_COMMA point geocoll_text2 */
      case 148:		/* geocoll_text2 ::= EWKT_COMMA linestring geocoll_text2 */
	  yytestcase (yyruleno == 148);
      case 149:		/* geocoll_text2 ::= EWKT_COMMA polygon geocoll_text2 */
	  yytestcase (yyruleno == 149);
      case 150:		/* geocoll_text2 ::= EWKT_COMMA multipoint geocoll_text2 */
	  yytestcase (yyruleno == 150);
      case 151:		/* geocoll_text2 ::= EWKT_COMMA multilinestring geocoll_text2 */
	  yytestcase (yyruleno == 151);
      case 152:		/* geocoll_text2 ::= EWKT_COMMA multipolygon geocoll_text2 */
	  yytestcase (yyruleno == 152);
      case 153:		/* geocoll_text2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_text geocoll_text2 */
	  yytestcase (yyruleno == 153);
      case 162:		/* geocoll_textm2 ::= EWKT_COMMA pointm geocoll_textm2 */
	  yytestcase (yyruleno == 162);
      case 163:		/* geocoll_textm2 ::= EWKT_COMMA linestringm geocoll_textm2 */
	  yytestcase (yyruleno == 163);
      case 164:		/* geocoll_textm2 ::= EWKT_COMMA polygonm geocoll_textm2 */
	  yytestcase (yyruleno == 164);
      case 165:		/* geocoll_textm2 ::= EWKT_COMMA multipointm geocoll_textm2 */
	  yytestcase (yyruleno == 165);
      case 166:		/* geocoll_textm2 ::= EWKT_COMMA multilinestringm geocoll_textm2 */
	  yytestcase (yyruleno == 166);
      case 167:		/* geocoll_textm2 ::= EWKT_COMMA multipolygonm geocoll_textm2 */
	  yytestcase (yyruleno == 167);
      case 168:		/* geocoll_textm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 */
	  yytestcase (yyruleno == 168);
      case 177:		/* geocoll_textz2 ::= EWKT_COMMA pointz geocoll_textz2 */
	  yytestcase (yyruleno == 177);
      case 178:		/* geocoll_textz2 ::= EWKT_COMMA linestringz geocoll_textz2 */
	  yytestcase (yyruleno == 178);
      case 179:		/* geocoll_textz2 ::= EWKT_COMMA polygonz geocoll_textz2 */
	  yytestcase (yyruleno == 179);
      case 180:		/* geocoll_textz2 ::= EWKT_COMMA multipointz geocoll_textz2 */
	  yytestcase (yyruleno == 180);
      case 181:		/* geocoll_textz2 ::= EWKT_COMMA multilinestringz geocoll_textz2 */
	  yytestcase (yyruleno == 181);
      case 182:		/* geocoll_textz2 ::= EWKT_COMMA multipolygonz geocoll_textz2 */
	  yytestcase (yyruleno == 182);
      case 183:		/* geocoll_textz2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 */
	  yytestcase (yyruleno == 183);
      case 192:		/* geocoll_textzm2 ::= EWKT_COMMA pointzm geocoll_textzm2 */
	  yytestcase (yyruleno == 192);
      case 193:		/* geocoll_textzm2 ::= EWKT_COMMA linestringzm geocoll_textzm2 */
	  yytestcase (yyruleno == 193);
      case 194:		/* geocoll_textzm2 ::= EWKT_COMMA polygonzm geocoll_textzm2 */
	  yytestcase (yyruleno == 194);
      case 195:		/* geocoll_textzm2 ::= EWKT_COMMA multipointzm geocoll_textzm2 */
	  yytestcase (yyruleno == 195);
      case 196:		/* geocoll_textzm2 ::= EWKT_COMMA multilinestringzm geocoll_textzm2 */
	  yytestcase (yyruleno == 196);
      case 197:		/* geocoll_textzm2 ::= EWKT_COMMA multipolygonzm geocoll_textzm2 */
	  yytestcase (yyruleno == 197);
      case 198:		/* geocoll_textzm2 ::= EWKT_COMMA EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 */
	  yytestcase (yyruleno == 198);
	  {
	      ((gaiaGeomCollPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 154:		/* geocoll_textm ::= EWKT_OPEN_BRACKET pointm geocoll_textm2 EWKT_CLOSE_BRACKET */
      case 155:		/* geocoll_textm ::= EWKT_OPEN_BRACKET linestringm geocoll_textm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 155);
      case 156:		/* geocoll_textm ::= EWKT_OPEN_BRACKET polygonm geocoll_textm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 156);
      case 157:		/* geocoll_textm ::= EWKT_OPEN_BRACKET multipointm geocoll_textm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 157);
      case 158:		/* geocoll_textm ::= EWKT_OPEN_BRACKET multilinestringm geocoll_textm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 158);
      case 159:		/* geocoll_textm ::= EWKT_OPEN_BRACKET multipolygonm geocoll_textm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 159);
      case 160:		/* geocoll_textm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 160);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_geomColl_xym (p_data,
					      (gaiaGeomCollPtr) yymsp[-2].minor.
					      yy0);
	  }
	  break;
      case 169:		/* geocoll_textz ::= EWKT_OPEN_BRACKET pointz geocoll_textz2 EWKT_CLOSE_BRACKET */
      case 170:		/* geocoll_textz ::= EWKT_OPEN_BRACKET linestringz geocoll_textz2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 170);
      case 171:		/* geocoll_textz ::= EWKT_OPEN_BRACKET polygonz geocoll_textz2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 171);
      case 172:		/* geocoll_textz ::= EWKT_OPEN_BRACKET multipointz geocoll_textz2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 172);
      case 173:		/* geocoll_textz ::= EWKT_OPEN_BRACKET multilinestringz geocoll_textz2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 173);
      case 174:		/* geocoll_textz ::= EWKT_OPEN_BRACKET multipolygonz geocoll_textz2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 174);
      case 175:		/* geocoll_textz ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textz geocoll_textz2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 175);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_geomColl_xyz (p_data,
					      (gaiaGeomCollPtr) yymsp[-2].minor.
					      yy0);
	  }
	  break;
      case 184:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET pointzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
      case 185:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET linestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 185);
      case 186:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET polygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 186);
      case 187:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET multipointzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 187);
      case 188:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET multilinestringzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 188);
      case 189:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET multipolygonzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 189);
      case 190:		/* geocoll_textzm ::= EWKT_OPEN_BRACKET EWKT_GEOMETRYCOLLECTION geocoll_textzm geocoll_textzm2 EWKT_CLOSE_BRACKET */
	  yytestcase (yyruleno == 190);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) ewkt_geomColl_xyzm (p_data,
					       (gaiaGeomCollPtr)
					       yymsp[-2].minor.yy0);
	  }
	  break;
      default:
	  /* (0) main ::= in */ yytestcase (yyruleno == 0);
	  /* (1) in ::= */ yytestcase (yyruleno == 1);
	  /* (2) in ::= in state EWKT_NEWLINE */ yytestcase (yyruleno == 2);
	  /* (3) state ::= program */ yytestcase (yyruleno == 3);
	  /* (4) program ::= geo_text */ yytestcase (yyruleno == 4);
	  /* (5) program ::= geo_textm */ yytestcase (yyruleno == 5);
	  break;
      };
    yygoto = yyRuleInfo[yyruleno].lhs;
    yysize = yyRuleInfo[yyruleno].nrhs;
    yypParser->yyidx -= yysize;
    yyact = yy_find_reduce_action (yymsp[-yysize].stateno, (YYCODETYPE) yygoto);
    if (yyact < YYNSTATE)
      {
#ifdef NDEBUG
	  /* If we are not debugging and the reduce action popped at least
	   ** one element off the stack, then we can push the new element back
	   ** onto the stack here, and skip the stack overflow test in yy_shift().
	   ** That gives a significant speed improvement. */
	  if (yysize)
	    {
		yypParser->yyidx++;
		yymsp -= yysize - 1;
		yymsp->stateno = (YYACTIONTYPE) yyact;
		yymsp->major = (YYCODETYPE) yygoto;
		yymsp->minor = yygotominor;
	    }
	  else
#endif
	    {
		yy_shift (yypParser, yyact, yygoto, &yygotominor);
	    }
      }
    else
      {
	  assert (yyact == YYNSTATE + YYNRULE + 1);
	  yy_accept (yypParser);
      }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void
yy_parse_failed (yyParser * yypParser	/* The parser */
    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sFail!\n", yyTracePrompt);
      }
#endif
    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser fails */
    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void
yy_syntax_error (yyParser * yypParser,	/* The parser */
		 int yymajor,	/* The major type of the error token */
		 YYMINORTYPE yyminor	/* The minor type of the error token */

    )
{
    ParseARG_FETCH;
#define TOKEN (yyminor.yy0)


/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
    p_data->ewkt_parse_error = 1;
    p_data->result = NULL;

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void
yy_accept (yyParser * yypParser	/* The parser */

    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)

      {
	  fprintf (yyTraceFILE, "%sAccept!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)

	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser accepts */


    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void
Parse (void *yyp,		/* The parser */
       int yymajor,		/* The major token code number */
       ParseTOKENTYPE yyminor	/* The value for the token */
       ParseARG_PDECL		/* Optional %extra_argument parameter */

    )
{
    YYMINORTYPE yyminorunion;
    int yyact;			/* The parser action. */

    int yyendofinput;		/* True if we are at the end of input */

#ifdef YYERRORSYMBOL
    int yyerrorhit = 0;		/* True if yymajor has invoked an error */
#endif
    yyParser *yypParser;	/* The parser */

    /* (re)initialize the parser, if necessary */
    yypParser = (yyParser *) yyp;
    if (yypParser->yyidx < 0)

      {
#if YYSTACKDEPTH<=0
	  if (yypParser->yystksz <= 0)
	    {
		/*memset(&yyminorunion, 0, sizeof(yyminorunion)); */
		yyminorunion = yyzerominor;
		yyStackOverflow (yypParser, &yyminorunion);
		return;
	    }
#endif
	  yypParser->yyidx = 0;
	  yypParser->yyerrcnt = -1;
	  yypParser->yystack[0].stateno = 0;
	  yypParser->yystack[0].major = 0;
      }
    yyminorunion.yy0 = yyminor;
    yyendofinput = (yymajor == 0);
    ParseARG_STORE;

#ifndef NDEBUG
    if (yyTraceFILE)



      {
	  fprintf (yyTraceFILE, "%sInput %s\n", yyTracePrompt,
		   yyTokenName[yymajor]);



      }

#endif

    do
      {
	  yyact = yy_find_shift_action (yypParser, (YYCODETYPE) yymajor);





	  if (yyact < YYNSTATE)
	    {
		assert (!yyendofinput);	/* Impossible to shift the $ token */
		yy_shift (yypParser, yyact, yymajor, &yyminorunion);
		yypParser->yyerrcnt--;

		yymajor = YYNOCODE;




	    }
	  else if (yyact < YYNSTATE + YYNRULE)
	    {
		yy_reduce (yypParser, yyact - YYNSTATE);
	    }
	  else
	    {
		assert (yyact == YY_ERROR_ACTION);

#ifdef YYERRORSYMBOL
		int yymx;
#endif
#ifndef NDEBUG
		if (yyTraceFILE)

		  {
		      fprintf (yyTraceFILE, "%sSyntax Error!\n", yyTracePrompt);
		  }
#endif
#ifdef YYERRORSYMBOL
		/* A syntax error has occurred.
		 ** The response to an error depends upon whether or not the
		 ** grammar defines an error token "ERROR".  
		 **
		 ** This is what we do if the grammar does define ERROR:
		 **
		 **  * Call the %syntax_error function.
		 **
		 **  * Begin popping the stack until we enter a state where
		 **    it is legal to shift the error symbol, then shift
		 **    the error symbol.
		 **
		 **  * Set the error count to three.
		 **
		 **  * Begin accepting and shifting new tokens.  No new error
		 **    processing will occur until three tokens have been
		 **    shifted successfully.
		 **
		 */
		if (yypParser->yyerrcnt < 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yymx = yypParser->yystack[yypParser->yyidx].major;
		if (yymx == YYERRORSYMBOL || yyerrorhit)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sDiscard input token %s\n",
				     yyTracePrompt, yyTokenName[yymajor]);
			}
#endif
		      yy_destructor (yypParser, (YYCODETYPE) yymajor,
				     &yyminorunion);
		      yymajor = YYNOCODE;
		  }
		else

		  {
		      while (yypParser->yyidx >= 0 &&
			     yymx != YYERRORSYMBOL &&
			     (yyact =
			      yy_find_reduce_action (yypParser->yystack
						     [yypParser->yyidx].stateno,
						     YYERRORSYMBOL)) >=

			     YYNSTATE)
			{
			    yy_pop_parser_stack (yypParser);
			}

		      if (yypParser->yyidx < 0 || yymajor == 0)
			{
			    yy_destructor (yypParser, (YYCODETYPE) yymajor,
					   &yyminorunion);
			    yy_parse_failed (yypParser);



			    yymajor = YYNOCODE;
			}
		      else if (yymx != YYERRORSYMBOL)

			{
			    YYMINORTYPE u2;
			    u2.YYERRSYMDT = 0;
			    yy_shift (yypParser, yyact, YYERRORSYMBOL, &u2);
			}
		  }
		yypParser->yyerrcnt = 3;
		yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
		/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
		 ** do any kind of error recovery.  Instead, simply invoke the syntax
		 ** error routine and continue going as if nothing had happened.
		 **
		 ** Applications can set this macro (for example inside %include) if
		 ** they intend to abandon the parse upon the first syntax error seen.
		 */


		yy_syntax_error (yypParser, yymajor, yyminorunion);
		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		yymajor = YYNOCODE;

#else /* YYERRORSYMBOL is not defined */
		/* This is what we do if the grammar does not define ERROR:
		 **
		 **  * Report an error message, and throw away the input token.
		 **
		 **  * If the input token is $, then fail the parse.
		 **
		 ** As before, subsequent error messages are suppressed until
		 ** three input tokens have been successfully shifted.
		 */
		if (yypParser->yyerrcnt <= 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yypParser->yyerrcnt = 3;

		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		if (yyendofinput)
		  {
		      yy_parse_failed (yypParser);



		  }
		yymajor = YYNOCODE;
#endif
	    }









      }



    while (yymajor != YYNOCODE && yypParser->yyidx >= 0);
    return;
}

Changes to src/gaiageo/Ewkt.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


#define EWKT_NEWLINE                     1
#define EWKT_POINT                       2
#define EWKT_OPEN_BRACKET                3
#define EWKT_CLOSE_BRACKET               4
#define EWKT_POINT_M                     5
#define EWKT_NUM                         6
#define EWKT_COMMA                       7
#define EWKT_LINESTRING                  8
#define EWKT_LINESTRING_M                9
#define EWKT_POLYGON                    10
#define EWKT_POLYGON_M                  11
#define EWKT_MULTIPOINT                 12
#define EWKT_MULTIPOINT_M               13
#define EWKT_MULTILINESTRING            14
#define EWKT_MULTILINESTRING_M          15
#define EWKT_MULTIPOLYGON               16
#define EWKT_MULTIPOLYGON_M             17
#define EWKT_GEOMETRYCOLLECTION         18
#define EWKT_GEOMETRYCOLLECTION_M       19


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define EWKT_NEWLINE                    1
#define EWKT_POINT                      2
#define EWKT_OPEN_BRACKET               3
#define EWKT_CLOSE_BRACKET              4
#define EWKT_POINT_M                    5
#define EWKT_NUM                        6
#define EWKT_COMMA                      7
#define EWKT_LINESTRING                 8
#define EWKT_LINESTRING_M               9
#define EWKT_POLYGON                   10
#define EWKT_POLYGON_M                 11
#define EWKT_MULTIPOINT                12
#define EWKT_MULTIPOINT_M              13
#define EWKT_MULTILINESTRING           14
#define EWKT_MULTILINESTRING_M         15
#define EWKT_MULTIPOLYGON              16
#define EWKT_MULTIPOLYGON_M            17
#define EWKT_GEOMETRYCOLLECTION        18
#define EWKT_GEOMETRYCOLLECTION_M      19
#define EWKT_GEOMETRYCOLLECTION_Z      20
#define EWKT_GEOMETRYCOLLECTION_ZM     21

Changes to src/gaiageo/Gml.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160


161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222


223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
...
244
245
246
247
248
249
250
251
252
253
254
255
256
257


258
259
260
261
262
263
264
265
266
267
268


269
270

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
...
304
305
306
307
308
309
310

311

312
313

314

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687




688
689
690
691
692


693
694
695


696
697
698
699

700
701
702


703
704
705


706
707
708
709

710
711
712
713
714
715
716
717
718


719

720
721

722
723
724
725


726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061


























































































1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072


1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092


1093
1094
1095
1096


1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
....
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134


1135
1136
1137
1138
1139
1140
1141
1142
1143
1144

1145
1146
1147

1148







1149







1150
1151
1152
1153
1154
1155
1156


1157
1158
1159
1160
1161
1162
1163
1164
1165

1166
1167
1168
1169
1170
1171




1172
1173
1174
1175
1176
1177
1178





1179

1180
1181
1182
1183
1184
1185
1186
1187


1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211


1212
1213
1214

1215
1216

1217
1218
1219
1220
1221

1222

1223
1224


1225

1226
1227
1228
1229


1230
1231
1232



1233
1234
1235
1236
1237
1238

1239
1240




1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254


1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268


1269
1270
1271

1272

1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293

1294
1295
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/

/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions


*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 28
#define YYACTIONTYPE unsigned char
#define ParseTOKENTYPE void *
typedef union {

  int yyinit;
  ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct gml_data *p_data ;
#define ParseARG_PDECL , struct gml_data *p_data 
#define ParseARG_FETCH  struct gml_data *p_data  = yypParser->p_data 
#define ParseARG_STORE yypParser->p_data  = p_data 
#define YYNSTATE             27
#define YYNRULE              34
#define YYNTOKEN             9
#define YY_MAX_SHIFT         26
#define YY_MIN_SHIFTREDUCE   49
#define YY_MAX_SHIFTREDUCE   82
#define YY_ERROR_ACTION      83


#define YY_ACCEPT_ACTION     84
#define YY_NO_ACTION         85
#define YY_MIN_REDUCE        86
#define YY_MAX_REDUCE        119
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if

** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.


**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.

**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (63)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */    26,   26,   26,    4,   87,    5,    2,    2,    5,    5,
 /*    10 */   100,   84,    1,  100,  100,  105,  106,    3,    8,    5,
 /*    20 */    25,    6,   74,   23,  100,  109,   24,   12,  115,   23,
 /*    30 */    13,   19,   14,   16,   95,   17,   99,    8,   21,    7,
 /*    40 */    10,   10,   18,   97,  110,   15,  113,  114,   66,   14,
 /*    50 */     9,   23,  101,   66,   20,   11,   65,   53,   70,   52,
 /*    60 */    51,   22,   80,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    12,   13,   14,   15,   16,   17,   15,   15,   17,   17,
 /*    10 */    22,   10,   11,   22,   22,   24,   24,   15,   18,   17,
 /*    20 */     2,    3,    8,    5,   22,   25,    2,    3,    0,    5,
 /*    30 */    18,   19,    4,   20,   21,   20,   21,   18,    2,    3,
 /*    40 */    20,   20,   20,   21,   25,    2,   26,   26,    5,    4,
 /*    50 */    18,    5,   23,    5,   23,   20,    3,    3,    7,    3,
 /*    60 */     3,    6,    1,   27,   27,   27,   27,   27,   27,   27,
 /*    70 */    27,   27,
};
#define YY_SHIFT_COUNT    (26)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (61)
static const unsigned char yy_shift_ofst[] = {
 /*     0 */    63,   28,   45,   45,   45,   18,   14,   14,   46,   46,
 /*    10 */    14,   14,   14,   24,   43,   48,   14,   14,   14,   36,
 /*    20 */    53,   54,   51,   55,   56,   57,   61,
};
#define YY_REDUCE_COUNT (18)
#define YY_REDUCE_MIN   (-12)
#define YY_REDUCE_MAX   (35)
static const signed char yy_reduce_ofst[] = {
 /*     0 */     1,  -12,   -9,   -8,    2,   12,   13,   15,    0,   19,
 /*    10 */    20,   21,   22,   32,   29,   31,   35,   35,   35,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   116,   83,  104,  104,   86,   83,   91,   93,  108,  108,
 /*    10 */   112,  112,   92,   83,   83,   83,   94,   98,   96,   83,
 /*    20 */    83,   83,   83,   83,   83,   83,   83,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:


** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */


  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */


#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */

#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/

void ParseTrace(FILE *TraceFILE, char *zTracePrompt){

  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;

  if( yyTraceFILE==0 ) yyTracePrompt = 0;

  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "GML_NEWLINE",
  /*    2 */ "GML_END",
  /*    3 */ "GML_CLOSE",
  /*    4 */ "GML_OPEN",
  /*    5 */ "GML_KEYWORD",
  /*    6 */ "GML_EQ",
  /*    7 */ "GML_VALUE",
  /*    8 */ "GML_COORD",
  /*    9 */ "error",
  /*   10 */ "main",
  /*   11 */ "in",
  /*   12 */ "state",
  /*   13 */ "program",
  /*   14 */ "gml_tree",
  /*   15 */ "node",
  /*   16 */ "node_chain",
  /*   17 */ "open_tag",
  /*   18 */ "attr",
  /*   19 */ "attributes",
  /*   20 */ "coord",
  /*   21 */ "coord_chain",
  /*   22 */ "close_tag",
  /*   23 */ "keyword",
  /*   24 */ "extra_nodes",
  /*   25 */ "extra_attr",
  /*   26 */ "extra_coord",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "gml_tree ::= node",
 /*   1 */ "gml_tree ::= node_chain",
 /*   2 */ "node ::= open_tag GML_END GML_CLOSE",
 /*   3 */ "node ::= open_tag attr GML_END GML_CLOSE",
 /*   4 */ "node ::= open_tag attributes GML_END GML_CLOSE",
 /*   5 */ "node ::= open_tag GML_CLOSE",
 /*   6 */ "node ::= open_tag attr GML_CLOSE",
 /*   7 */ "node ::= open_tag attributes GML_CLOSE",
 /*   8 */ "node ::= open_tag GML_CLOSE coord",
 /*   9 */ "node ::= open_tag GML_CLOSE coord_chain",
 /*  10 */ "node ::= open_tag attr GML_CLOSE coord",
 /*  11 */ "node ::= open_tag attr GML_CLOSE coord_chain",
 /*  12 */ "node ::= open_tag attributes GML_CLOSE coord",
 /*  13 */ "node ::= open_tag attributes GML_CLOSE coord_chain",
 /*  14 */ "node ::= close_tag",
 /*  15 */ "open_tag ::= GML_OPEN keyword",
 /*  16 */ "close_tag ::= GML_OPEN GML_END keyword GML_CLOSE",
 /*  17 */ "keyword ::= GML_KEYWORD",
 /*  18 */ "extra_nodes ::=",
 /*  19 */ "extra_nodes ::= node extra_nodes",
 /*  20 */ "node_chain ::= node node extra_nodes",
 /*  21 */ "attr ::= GML_KEYWORD GML_EQ GML_VALUE",
 /*  22 */ "extra_attr ::=",
 /*  23 */ "extra_attr ::= attr extra_attr",
 /*  24 */ "attributes ::= attr attr extra_attr",
 /*  25 */ "coord ::= GML_COORD",
 /*  26 */ "extra_coord ::=",
 /*  27 */ "extra_coord ::= coord extra_coord",
 /*  28 */ "coord_chain ::= coord coord extra_coord",
 /*  29 */ "main ::= in",
 /*  30 */ "in ::=",
 /*  31 */ "in ::= in state GML_NEWLINE",
 /*  32 */ "state ::= program",
 /*  33 */ "program ::= gml_tree",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
static void ParseInit(void *yypParser){
  yyParser *pParser = (yyParser*)yypParser;
#ifdef YYTRACKMAXSTACKDEPTH
  pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  pParser->yytos = NULL;
  pParser->yystack = NULL;
  pParser->yystksz = 0;
  if( yyGrowStack(pParser) ){
    pParser->yystack = &pParser->yystk0;
    pParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  pParser->yyerrcnt = -1;
#endif
  pParser->yytos = pParser->yystack;
  pParser->yystack[0].stateno = 0;
  pParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ) ParseInit(pParser);
  return pParser;
}
#endif /* Parse_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
static void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.




*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){


  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){


    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );

#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );


  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){


    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );

  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){


   ParseARG_FETCH;

#ifndef NDEBUG
   if( yyTraceFILE ){

     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);


   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/

     spatialite_e( "Giving up.  Parser stack overflow\n");
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
  {   14,   -1 }, /* (0) gml_tree ::= node */
  {   14,   -1 }, /* (1) gml_tree ::= node_chain */
  {   15,   -3 }, /* (2) node ::= open_tag GML_END GML_CLOSE */
  {   15,   -4 }, /* (3) node ::= open_tag attr GML_END GML_CLOSE */
  {   15,   -4 }, /* (4) node ::= open_tag attributes GML_END GML_CLOSE */
  {   15,   -2 }, /* (5) node ::= open_tag GML_CLOSE */
  {   15,   -3 }, /* (6) node ::= open_tag attr GML_CLOSE */
  {   15,   -3 }, /* (7) node ::= open_tag attributes GML_CLOSE */
  {   15,   -3 }, /* (8) node ::= open_tag GML_CLOSE coord */
  {   15,   -3 }, /* (9) node ::= open_tag GML_CLOSE coord_chain */
  {   15,   -4 }, /* (10) node ::= open_tag attr GML_CLOSE coord */
  {   15,   -4 }, /* (11) node ::= open_tag attr GML_CLOSE coord_chain */
  {   15,   -4 }, /* (12) node ::= open_tag attributes GML_CLOSE coord */
  {   15,   -4 }, /* (13) node ::= open_tag attributes GML_CLOSE coord_chain */
  {   15,   -1 }, /* (14) node ::= close_tag */
  {   17,   -2 }, /* (15) open_tag ::= GML_OPEN keyword */
  {   22,   -4 }, /* (16) close_tag ::= GML_OPEN GML_END keyword GML_CLOSE */
  {   23,   -1 }, /* (17) keyword ::= GML_KEYWORD */
  {   24,    0 }, /* (18) extra_nodes ::= */
  {   24,   -2 }, /* (19) extra_nodes ::= node extra_nodes */
  {   16,   -3 }, /* (20) node_chain ::= node node extra_nodes */
  {   18,   -3 }, /* (21) attr ::= GML_KEYWORD GML_EQ GML_VALUE */
  {   25,    0 }, /* (22) extra_attr ::= */
  {   25,   -2 }, /* (23) extra_attr ::= attr extra_attr */
  {   19,   -3 }, /* (24) attributes ::= attr attr extra_attr */
  {   20,   -1 }, /* (25) coord ::= GML_COORD */
  {   26,    0 }, /* (26) extra_coord ::= */
  {   26,   -2 }, /* (27) extra_coord ::= coord extra_coord */
  {   21,   -3 }, /* (28) coord_chain ::= coord coord extra_coord */
  {   10,   -1 }, /* (29) main ::= in */
  {   11,    0 }, /* (30) in ::= */
  {   11,   -3 }, /* (31) in ::= in state GML_NEWLINE */
  {   12,   -1 }, /* (32) state ::= program */
  {   13,   -1 }, /* (33) program ::= gml_tree */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* gml_tree ::= node */
      case 1: /* gml_tree ::= node_chain */ yytestcase(yyruleno==1);
{ p_data->result = yymsp[0].minor.yy0; }
        break;
      case 2: /* node ::= open_tag GML_END GML_CLOSE */
{ yylhsminor.yy0 = gml_createSelfClosedNode( p_data, (void *)yymsp[-2].minor.yy0, NULL); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 3: /* node ::= open_tag attr GML_END GML_CLOSE */
      case 4: /* node ::= open_tag attributes GML_END GML_CLOSE */ yytestcase(yyruleno==4);
{ yylhsminor.yy0 = gml_createSelfClosedNode( p_data, (void *)yymsp[-3].minor.yy0, (void *)yymsp[-2].minor.yy0); }
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 5: /* node ::= open_tag GML_CLOSE */
{ yylhsminor.yy0 = gml_createNode( p_data, (void *)yymsp[-1].minor.yy0, NULL, NULL); }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 6: /* node ::= open_tag attr GML_CLOSE */
      case 7: /* node ::= open_tag attributes GML_CLOSE */ yytestcase(yyruleno==7);
{ yylhsminor.yy0 = gml_createNode( p_data, (void *)yymsp[-2].minor.yy0, (void *)yymsp[-1].minor.yy0, NULL); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 8: /* node ::= open_tag GML_CLOSE coord */
      case 9: /* node ::= open_tag GML_CLOSE coord_chain */ yytestcase(yyruleno==9);
{ yylhsminor.yy0 = gml_createNode( p_data, (void *)yymsp[-2].minor.yy0, NULL, (void *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 10: /* node ::= open_tag attr GML_CLOSE coord */
      case 11: /* node ::= open_tag attr GML_CLOSE coord_chain */ yytestcase(yyruleno==11);
      case 12: /* node ::= open_tag attributes GML_CLOSE coord */ yytestcase(yyruleno==12);
      case 13: /* node ::= open_tag attributes GML_CLOSE coord_chain */ yytestcase(yyruleno==13);
{ yylhsminor.yy0 = gml_createNode( p_data, (void *)yymsp[-3].minor.yy0, (void *)yymsp[-2].minor.yy0, (void *)yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 14: /* node ::= close_tag */
{ yylhsminor.yy0 = gml_closingNode( p_data, (void *)yymsp[0].minor.yy0); }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 15: /* open_tag ::= GML_OPEN keyword */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
        break;
      case 16: /* close_tag ::= GML_OPEN GML_END keyword GML_CLOSE */
{ yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 17: /* keyword ::= GML_KEYWORD */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 18: /* extra_nodes ::= */
      case 22: /* extra_attr ::= */ yytestcase(yyruleno==22);
      case 26: /* extra_coord ::= */ yytestcase(yyruleno==26);
{ yymsp[1].minor.yy0 = NULL; }
        break;
      case 19: /* extra_nodes ::= node extra_nodes */
{ ((gmlNodePtr)yymsp[-1].minor.yy0)->Next = (gmlNodePtr)yymsp[0].minor.yy0;  yylhsminor.yy0 = yymsp[-1].minor.yy0; }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 20: /* node_chain ::= node node extra_nodes */
{ 
	   ((gmlNodePtr)yymsp[-1].minor.yy0)->Next = (gmlNodePtr)yymsp[0].minor.yy0; 
	   ((gmlNodePtr)yymsp[-2].minor.yy0)->Next = (gmlNodePtr)yymsp[-1].minor.yy0;
	   yylhsminor.yy0 = yymsp[-2].minor.yy0;
	}
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 21: /* attr ::= GML_KEYWORD GML_EQ GML_VALUE */
{ yylhsminor.yy0 = gml_attribute( p_data, (void *)yymsp[-2].minor.yy0, (void *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 23: /* extra_attr ::= attr extra_attr */
{ ((gmlAttrPtr)yymsp[-1].minor.yy0)->Next = (gmlAttrPtr)yymsp[0].minor.yy0;  yylhsminor.yy0 = yymsp[-1].minor.yy0; }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 24: /* attributes ::= attr attr extra_attr */
{ 
	   ((gmlAttrPtr)yymsp[-1].minor.yy0)->Next = (gmlAttrPtr)yymsp[0].minor.yy0; 
	   ((gmlAttrPtr)yymsp[-2].minor.yy0)->Next = (gmlAttrPtr)yymsp[-1].minor.yy0;
	   yylhsminor.yy0 = yymsp[-2].minor.yy0;
	}
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 25: /* coord ::= GML_COORD */
{ yylhsminor.yy0 = gml_coord( p_data, (void *)yymsp[0].minor.yy0); }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 27: /* extra_coord ::= coord extra_coord */
{ ((gmlCoordPtr)yymsp[-1].minor.yy0)->Next = (gmlCoordPtr)yymsp[0].minor.yy0;  yylhsminor.yy0 = yymsp[-1].minor.yy0; }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 28: /* coord_chain ::= coord coord extra_coord */
{ 
	   ((gmlCoordPtr)yymsp[-1].minor.yy0)->Next = (gmlCoordPtr)yymsp[0].minor.yy0; 
	   ((gmlCoordPtr)yymsp[-2].minor.yy0)->Next = (gmlCoordPtr)yymsp[-1].minor.yy0;
	   yylhsminor.yy0 = yymsp[-2].minor.yy0;
	}
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      default:
      /* (29) main ::= in */ yytestcase(yyruleno==29);
      /* (30) in ::= */ yytestcase(yyruleno==30);
      /* (31) in ::= in state GML_NEWLINE */ yytestcase(yyruleno==31);
      /* (32) state ::= program (OPTIMIZED OUT) */ assert(yyruleno!=32);
      /* (33) program ::= gml_tree (OPTIMIZED OUT) */ assert(yyruleno!=33);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */


























































































}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){


  ParseARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/

/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
	p_data->gml_parse_error = 1;
	p_data->result = NULL;
/************ End %syntax_error code ******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){


  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);


  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){


  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */


  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)

  yyendofinput = (yymajor==0);







#endif







  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    int stateno = yypParser->yytos->stateno;
    if( stateno < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",


              yyTracePrompt,yyTokenName[yymajor],stateno);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno-YY_MIN_REDUCE);
    }
  }
#endif

  do{

    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact >= YY_MIN_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY




      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;





    }else{

      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);


      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);


      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){

#ifndef NDEBUG
        if( yyTraceFILE ){

          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);

        yymajor = YYNOCODE;

      }else{
        while( yypParser->yytos >= yypParser->yystack


            && yymx != YYERRORSYMBOL

            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){


          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){



          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;

        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);




        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);


      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);


      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);

      if( yyendofinput ){

        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif

  return;
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<


<
<
<
<
<
<
<
<
<
>
>

<
<
<
<




|
>
|
|





|
|
|
|
|
|
|
<
<
|
>
>
|
|
<
<
<










|











|


|
<

|

|

|


<
<
<

|

|
<

<
>
|
>
>

|


|
>











|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>







<
<
<
<







 







<
<
<
<

|
<
>
>
|
|
|
|





|
<
>
>

<
>

<
|
<
|

|
|
<

|
<







 







>
|
>
|
|
>
|
>
|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>
>
>
>

|
|
|
<
>
>
|

<
>
>
|
|

<
>

|
<
>
>
|

<
>
>
|
|

<
>
|

|





|
>
>
|
>

|
>
|
|

<
>
>
|
|
<

|
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






|
|
|
|
<
>
>
|
|
<





|
|
<
|





|
|
<
>
>
|

|
<
>
>
|

<
|
<
|
|
|
<
<
|







 







|
|
|
|
|
<
>
>
|
|
<
|
<

|

|

>
|
|
<
>
|
>
>
>
>
>
>
>

>
>
>
>
>
>
>
|


|
<
<
<
>
>
|
<
<
<
|
<


|
>
|
<
<
<
<
<
>
>
>
>
|
<
|
<
<
<
<
>
>
>
>
>
|
>
|
<

|


|
<
>
>
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
|
>

|
>
|
|
|

|
>
|
>
|
<
>
>
|
>
|
|
|
<
>
>
|
|
<
>
>
>
|
|
<
<
<
|
>
|
<
>
>
>
>
|
|
|
|

|
|
|
|
|
|
|
<
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
<
>
|
>
|
<
<
<
|
|

|
<
<
<
<
<
<
<
<
<
|
<
<
<
>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


















46
47
48
49
50
51


52
53









54
55
56




57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115



116
117
118
119

120

121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196




197
198
199
200
201
202
203
...
207
208
209
210
211
212
213




214
215

216
217
218
219
220
221
222
223
224
225
226
227

228
229
230

231
232

233

234
235
236
237

238
239

240
241
242
243
244
245
246
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559




















































































560
561
562
563
564
565
566
567
568
569
570
571
572

573
574
575
576

577
578
579
580
581

582
583
584

585
586
587
588

589
590
591
592
593

594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613

614
615
616
617

618
619

620
621





















622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028

1029
1030
1031
1032

1033
1034
1035
1036
1037
1038
1039

1040
1041
1042
1043
1044
1045
1046
1047

1048
1049
1050
1051
1052

1053
1054
1055
1056

1057

1058
1059
1060


1061
1062
1063
1064
1065
1066
1067
1068
....
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087

1088
1089
1090
1091

1092

1093
1094
1095
1096
1097
1098
1099
1100

1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121



1122
1123
1124



1125

1126
1127
1128
1129
1130





1131
1132
1133
1134
1135

1136




1137
1138
1139
1140
1141
1142
1143
1144

1145
1146
1147
1148
1149

1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174

1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192

1193
1194
1195
1196
1197
1198
1199

1200
1201
1202
1203

1204
1205
1206
1207
1208



1209
1210
1211

1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227


1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242

1243
1244
1245
1246

1247
1248
1249
1250



1251
1252
1253
1254









1255



1256
1257
1258
/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>

/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
/* 
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands. 
**
** Each symbol here is a terminal symbol in the grammar.
*/
/* Make sure the INTERFACE macro is defined.
*/
#ifndef INTERFACE
#define INTERFACE 1
#endif
/* The next thing included is series of defines which control
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 terminals
**                       and nonterminals.  "int" is used otherwise.
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
**                       to no legal terminal or nonterminal number.  This
**                       number is used to fill in empty slots of the hash 
**                       table.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       have fall-back values which should be used if the
**                       original value of the token will not parse.
**    YYACTIONTYPE       is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 rules and
**                       states combined.  "int" is used otherwise.
**    ParseTOKENTYPE     is the data type used for minor tokens given 
**                       directly to the parser from the tokenizer.
**    YYMINORTYPE        is the data type used for all minor tokens.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for base tokens is called "yy0".


















**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser


**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar









**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
*/




#define YYCODETYPE unsigned char
#define YYNOCODE 28
#define YYACTIONTYPE unsigned char
#define ParseTOKENTYPE void *
typedef union
{
    int yyinit;
    ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct gml_data *p_data ;
#define ParseARG_PDECL , struct gml_data *p_data
#define ParseARG_FETCH  struct gml_data *p_data  = yypParser->p_data
#define ParseARG_STORE yypParser->p_data  = p_data
#define YYNSTATE 49
#define YYNRULE 34
#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)


#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)

/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static const YYMINORTYPE yyzerominor = { 0 };




/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
#define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.

**
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
**
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
**
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**



** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]

**

** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
*/
static const YYACTIONTYPE yy_action[] = {
    /*     0 */ 20, 28, 29, 4, 48, 5, 3, 3, 5, 5,
    /*    10 */ 42, 84, 1, 42, 42, 47, 46, 2, 10, 5,
    /*    20 */ 21, 12, 32, 23, 42, 38, 22, 6, 49, 23,
    /*    30 */ 13, 19, 14, 15, 35, 8, 8, 10, 25, 11,
    /*    40 */ 18, 34, 33, 45, 37, 16, 40, 17, 41, 14,
    /*    50 */ 9, 23, 43, 7, 45, 27, 30, 26, 31, 36,
    /*    60 */ 39, 44, 24,
};

static const YYCODETYPE yy_lookahead[] = {
    /*     0 */ 12, 13, 14, 15, 16, 17, 15, 15, 17, 17,
    /*    10 */ 22, 10, 11, 22, 22, 24, 24, 15, 18, 17,
    /*    20 */ 2, 3, 8, 5, 22, 25, 2, 3, 0, 5,
    /*    30 */ 18, 19, 4, 20, 21, 20, 20, 18, 2, 3,
    /*    40 */ 2, 26, 26, 5, 25, 20, 21, 20, 21, 4,
    /*    50 */ 18, 5, 23, 20, 5, 1, 3, 23, 3, 7,
    /*    60 */ 3, 3, 6,
};

#define YY_SHIFT_USE_DFLT (-1)
#define YY_SHIFT_MAX 26
static const signed char yy_shift_ofst[] = {
    /*     0 */ -1, 28, 45, 45, 45, 18, 14, 14, 14, 46,
    /*    10 */ 46, 14, 14, 24, 38, 14, 14, 14, 49, 36,
    /*    20 */ 54, 53, 55, 56, 52, 57, 58,
};

#define YY_REDUCE_USE_DFLT (-13)
#define YY_REDUCE_MAX 18
static const signed char yy_reduce_ofst[] = {
    /*     0 */ 1, -12, -9, -8, 2, 12, 13, 15, 16, 0,
    /*    10 */ 19, 25, 27, 32, 29, 33, 33, 33, 34,
};

static const YYACTIONTYPE yy_default[] = {
    /*     0 */ 50, 83, 72, 72, 54, 83, 60, 80, 80, 76,
    /*    10 */ 76, 61, 59, 83, 83, 64, 66, 62, 83, 83,
    /*    20 */ 83, 83, 83, 83, 83, 83, 83, 51, 52, 53,
    /*    30 */ 56, 57, 79, 81, 82, 65, 75, 77, 78, 58,
    /*    40 */ 67, 63, 68, 69, 70, 71, 73, 74, 55,
};

#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.




*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.




*/
struct yyStackEntry

{
    YYACTIONTYPE stateno;	/* The state-number */
    YYCODETYPE major;		/* The major token value.  This is the code
				 ** number for the token at this stack level */
    YYMINORTYPE minor;		/* The user-supplied minor token value.  This
				 ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser

{
    int yyidx;			/* Index of top element in stack */
#ifdef YYTRACKMAXSTACKDEPTH

    int yyidxMax;		/* Maximum value of yyidx */
#endif

    int yyerrcnt;		/* Shifts left before out of the error */

      ParseARG_SDECL		/* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
    int yystksz;		/* Current side of the stack */
    yyStackEntry *yystack;	/* The parser's stack */

#else
      yyStackEntry yystack[YYSTACKDEPTH];	/* The parser's stack */

#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void
ParseTrace (FILE * TraceFILE, char *zTracePrompt)
{
    yyTraceFILE = TraceFILE;
    yyTracePrompt = zTracePrompt;
    if (yyTraceFILE == 0)
	yyTracePrompt = 0;
    else if (yyTracePrompt == 0)
	yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = {
    "$", "GML_NEWLINE", "GML_END", "GML_CLOSE",
    "GML_OPEN", "GML_KEYWORD", "GML_EQ", "GML_VALUE",
    "GML_COORD", "error", "main", "in",
    "state", "program", "gml_tree", "node",
    "node_chain", "open_tag", "attr", "attributes",
    "coord", "coord_chain", "close_tag", "keyword",
    "extra_nodes", "extra_attr", "extra_coord",
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
    /*   0 */ "main ::= in",
    /*   1 */ "in ::=",
    /*   2 */ "in ::= in state GML_NEWLINE",
    /*   3 */ "state ::= program",
    /*   4 */ "program ::= gml_tree",
    /*   5 */ "gml_tree ::= node",
    /*   6 */ "gml_tree ::= node_chain",
    /*   7 */ "node ::= open_tag GML_END GML_CLOSE",
    /*   8 */ "node ::= open_tag attr GML_END GML_CLOSE",
    /*   9 */ "node ::= open_tag attributes GML_END GML_CLOSE",
    /*  10 */ "node ::= open_tag GML_CLOSE",
    /*  11 */ "node ::= open_tag attr GML_CLOSE",
    /*  12 */ "node ::= open_tag attributes GML_CLOSE",
    /*  13 */ "node ::= open_tag GML_CLOSE coord",
    /*  14 */ "node ::= open_tag GML_CLOSE coord_chain",
    /*  15 */ "node ::= open_tag attr GML_CLOSE coord",
    /*  16 */ "node ::= open_tag attr GML_CLOSE coord_chain",
    /*  17 */ "node ::= open_tag attributes GML_CLOSE coord",
    /*  18 */ "node ::= open_tag attributes GML_CLOSE coord_chain",
    /*  19 */ "node ::= close_tag",
    /*  20 */ "open_tag ::= GML_OPEN keyword",
    /*  21 */ "close_tag ::= GML_OPEN GML_END keyword GML_CLOSE",
    /*  22 */ "keyword ::= GML_KEYWORD",
    /*  23 */ "extra_nodes ::=",
    /*  24 */ "extra_nodes ::= node extra_nodes",
    /*  25 */ "node_chain ::= node node extra_nodes",
    /*  26 */ "attr ::= GML_KEYWORD GML_EQ GML_VALUE",
    /*  27 */ "extra_attr ::=",
    /*  28 */ "extra_attr ::= attr extra_attr",
    /*  29 */ "attributes ::= attr attr extra_attr",
    /*  30 */ "coord ::= GML_COORD",
    /*  31 */ "extra_coord ::=",
    /*  32 */ "extra_coord ::= coord extra_coord",
    /*  33 */ "coord_chain ::= coord coord extra_coord",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.
*/
static void
yyGrowStack (yyParser * p)
{
    int newSize;
    yyStackEntry *pNew;

    newSize = p->yystksz * 2 + 100;
    pNew = realloc (p->yystack, newSize * sizeof (pNew[0]));
    if (pNew)
      {
	  p->yystack = pNew;
	  p->yystksz = newSize;
#ifndef NDEBUG
	  if (yyTraceFILE)
	    {
		fprintf (yyTraceFILE, "%sStack grows to %d entries!\n",
			 yyTracePrompt, p->yystksz);
	    }
#endif
      }
}
#endif

/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *
ParseAlloc (void *(*mallocProc) (size_t))
{
    yyParser *pParser;
    pParser = (yyParser *) (*mallocProc) ((size_t) sizeof (yyParser));
    if (pParser)
      {
	  pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
	  pParser->yyidxMax = 0;
#endif
#if YYSTACKDEPTH<=0
	  pParser->yystack = NULL;
	  pParser->yystksz = 0;
	  yyGrowStack (pParser);
#endif
      }
    return pParser;
}

/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
static void
yy_destructor (yyParser * yypParser,	/* The parser */
	       YYCODETYPE yymajor,	/* Type code for object to destroy */
	       YYMINORTYPE * yypminor	/* The object to be destroyed */
    )
{
    switch (yymajor)
      {
	  /* Here is inserted the actions which take place when a
	   ** terminal or non-terminal is destroyed.  This can happen
	   ** when the symbol is popped from the stack during a
	   ** reduce or during error processing or when a parser is 
	   ** being destroyed before it is finished parsing.
	   **
	   ** Note: during a reduce, the only symbols destroyed are those
	   ** which appear on the RHS of the rule, but which are not used
	   ** inside the C code.
	   */
      default:
	  break;		/* If no destructor action specified: do nothing */
      }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
**
** Return the major token number for the symbol popped.
*/
static int
yy_pop_parser_stack (yyParser * pParser)
{
    YYCODETYPE yymajor;
    yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

    if (pParser->yyidx < 0)
	return 0;
#ifndef NDEBUG
    if (yyTraceFILE && pParser->yyidx >= 0)
      {
	  fprintf (yyTraceFILE, "%sPopping %s\n",
		   yyTracePrompt, yyTokenName[yytos->major]);
      }
#endif
    yymajor = yytos->major;
    yy_destructor (pParser, yymajor, &yytos->minor);
    pParser->yyidx--;
    return yymajor;
}

/* 
** Deallocate and destroy a parser.  Destructors are all called for
** all stack elements before shutting the parser down.
**
** Inputs:
** <ul>
** <li>  A pointer to the parser.  This should be a pointer
**       obtained from ParseAlloc.
** <li>  A pointer to a function used to reclaim memory obtained
**       from malloc.
** </ul>
*/
void
ParseFree (void *p,		/* The parser to be deleted */
	   void (*freeProc) (void *)	/* Function used to reclaim memory */
    )
{
    yyParser *pParser = (yyParser *) p;
    if (pParser == 0)
	return;
    while (pParser->yyidx >= 0)
	yy_pop_parser_stack (pParser);
#if YYSTACKDEPTH<=0
    free (pParser->yystack);
#endif
    (*freeProc) ((void *) pParser);
}

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int
ParseStackPeak (void *p)
{
    yyParser *pParser = (yyParser *) p;
    return pParser->yyidxMax;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_shift_action (yyParser * pParser,	/* The parser */
		      YYCODETYPE iLookAhead	/* The look-ahead token */
    )
{
    int i;
    int stateno = pParser->yystack[pParser->yyidx].stateno;

    if (stateno > YY_SHIFT_MAX
	|| (i = yy_shift_ofst[stateno]) == YY_SHIFT_USE_DFLT)
      {
	  return yy_default[stateno];
      }
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  if (iLookAhead > 0)
	    {
#ifdef YYFALLBACK
		YYCODETYPE iFallback;	/* Fallback token */
		if (iLookAhead < sizeof (yyFallback) / sizeof (yyFallback[0])
		    && (iFallback = yyFallback[iLookAhead]) != 0)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sFALLBACK %s => %s\n",
				     yyTracePrompt, yyTokenName[iLookAhead],
				     yyTokenName[iFallback]);
			}
#endif
		      return yy_find_shift_action (pParser, iFallback);
		  }
#endif
#ifdef YYWILDCARD
		{
		    int j = i - iLookAhead + YYWILDCARD;
		    if (j >= 0 && j < YY_SZ_ACTTAB
			&& yy_lookahead[j] == YYWILDCARD)
		      {
#ifndef NDEBUG
			  if (yyTraceFILE)
			    {
				fprintf (yyTraceFILE, "%sWILDCARD %s => %s\n",
					 yyTracePrompt, yyTokenName[iLookAhead],
					 yyTokenName[YYWILDCARD]);
			    }
#endif /* NDEBUG */
			  return yy_action[j];
		      }
		}
#endif /* YYWILDCARD */
	    }
	  return yy_default[stateno];
      }
    else
      {
	  return yy_action[i];
      }




















































































}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_reduce_action (int stateno,	/* Current state number */
		       YYCODETYPE iLookAhead	/* The look-ahead token */

    )
{
    int i;
#ifdef YYERRORSYMBOL

    if (stateno > YY_REDUCE_MAX)
      {
	  return yy_default[stateno];
      }
#else

    assert (stateno <= YY_REDUCE_MAX);
#endif
    i = yy_reduce_ofst[stateno];

    assert (i != YY_REDUCE_USE_DFLT);
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
#ifdef YYERRORSYMBOL

    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  return yy_default[stateno];
      }
#else

    assert (i >= 0 && i < YY_SZ_ACTTAB);
    assert (yy_lookahead[i] == iLookAhead);
#endif
    return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void
yyStackOverflow (yyParser * yypParser, YYMINORTYPE * yypMinor)
{
    ParseARG_FETCH;
    yypParser->yyidx--;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sStack Overflow!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will execute if the parser
     ** stack every overflows */


    spatialite_e ("Giving up.  Parser stack overflow\n");

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument var */
}






















/*
** Perform a shift action.
*/
static void
yy_shift (yyParser * yypParser,	/* The parser to be shifted */
	  int yyNewState,	/* The new state to shift in */
	  int yyMajor,		/* The major token to shift in */
	  YYMINORTYPE * yypMinor	/* Pointer to the minor token to shift in */
    )
{
    yyStackEntry *yytos;
    yypParser->yyidx++;
#ifdef YYTRACKMAXSTACKDEPTH
    if (yypParser->yyidx > yypParser->yyidxMax)
      {
	  yypParser->yyidxMax = yypParser->yyidx;
      }
#endif
#if YYSTACKDEPTH>0
    if (yypParser->yyidx >= YYSTACKDEPTH)
      {
	  yyStackOverflow (yypParser, yypMinor);
	  return;
      }
#else
    if (yypParser->yyidx >= yypParser->yystksz)
      {
	  yyGrowStack (yypParser);
	  if (yypParser->yyidx >= yypParser->yystksz)
	    {
		yyStackOverflow (yypParser, yypMinor);
		return;
	    }
      }
#endif
    yytos = &yypParser->yystack[yypParser->yyidx];
    yytos->stateno = (YYACTIONTYPE) yyNewState;
    yytos->major = (YYCODETYPE) yyMajor;
    yytos->minor = *yypMinor;
#ifndef NDEBUG
    if (yyTraceFILE && yypParser->yyidx > 0)
      {
	  int i;
	  fprintf (yyTraceFILE, "%sShift %d\n", yyTracePrompt, yyNewState);
	  fprintf (yyTraceFILE, "%sStack:", yyTracePrompt);
	  for (i = 1; i <= yypParser->yyidx; i++)
	      fprintf (yyTraceFILE, " %s",
		       yyTokenName[yypParser->yystack[i].major]);
	  fprintf (yyTraceFILE, "\n");
      }
#endif
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct
{
    YYCODETYPE lhs;		/* Symbol on the left-hand side of the rule */
    unsigned char nrhs;		/* Number of right-hand side symbols in the rule */
} yyRuleInfo[] =
{
    {
    10, 1},
    {
    11, 0},
    {
    11, 3},
    {
    12, 1},
    {
    13, 1},
    {
    14, 1},
    {
    14, 1},
    {
    15, 3},
    {
    15, 4},
    {
    15, 4},
    {
    15, 2},
    {
    15, 3},
    {
    15, 3},
    {
    15, 3},
    {
    15, 3},
    {
    15, 4},
    {
    15, 4},
    {
    15, 4},
    {
    15, 4},
    {
    15, 1},
    {
    17, 2},
    {
    22, 4},
    {
    23, 1},
    {
    24, 0},
    {
    24, 2},
    {
    16, 3},
    {
    18, 3},
    {
    25, 0},
    {
    25, 2},
    {
    19, 3},
    {
    20, 1},
    {
    26, 0},
    {
    26, 2},
    {
21, 3},};

static void yy_accept (yyParser *);	/* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
*/
static void
yy_reduce (yyParser * yypParser,	/* The parser */
	   int yyruleno		/* Number of the rule by which to reduce */
    )
{
    int yygoto;			/* The next state */
    int yyact;			/* The next action */
    YYMINORTYPE yygotominor;	/* The LHS of the rule reduced */
    yyStackEntry *yymsp;	/* The top of the parser's stack */
    int yysize;			/* Amount to pop the stack */
    ParseARG_FETCH;
    yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
    if (yyTraceFILE && yyruleno >= 0
	&& yyruleno < (int) (sizeof (yyRuleName) / sizeof (yyRuleName[0])))
      {
	  fprintf (yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
		   yyRuleName[yyruleno]);
      }
#endif /* NDEBUG */

    /* Silence complaints from purify about yygotominor being uninitialized
     ** in some cases when it is copied into the stack after the following
     ** switch.  yygotominor is uninitialized when a rule reduces that does
     ** not set the value of its left-hand side nonterminal.  Leaving the
     ** value of the nonterminal uninitialized is utterly harmless as long
     ** as the value is never used.  So really the only thing this code
     ** accomplishes is to quieten purify.  
     **
     ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
     ** without this code, their parser segfaults.  I'm not sure what there
     ** parser is doing to make this happen.  This is the second bug report
     ** from wireshark this week.  Clearly they are stressing Lemon in ways
     ** that it has not been previously stressed...  (SQLite ticket #2172)
     */
    /*memset(&yygotominor, 0, sizeof(yygotominor)); */
    yygotominor = yyzerominor;


    switch (yyruleno)
      {
	  /* Beginning here are the reduction cases.  A typical example
	   ** follows:
	   **   case 0:
	   **  #line <lineno> <grammarfile>
	   **     { ... }           // User supplied code
	   **  #line <lineno> <thisfile>
	   **     break;
	   */
      case 5:			/* gml_tree ::= node */
      case 6:			/* gml_tree ::= node_chain */
	  yytestcase (yyruleno == 6);
	  {
	      p_data->result = yymsp[0].minor.yy0;
	  }
	  break;
      case 7:			/* node ::= open_tag GML_END GML_CLOSE */
	  {
	      yygotominor.yy0 =
		  gml_createSelfClosedNode (p_data,
					    (void *) yymsp[-2].minor.yy0, NULL);
	  }
	  break;
      case 8:			/* node ::= open_tag attr GML_END GML_CLOSE */
      case 9:			/* node ::= open_tag attributes GML_END GML_CLOSE */
	  yytestcase (yyruleno == 9);
	  {
	      yygotominor.yy0 =
		  gml_createSelfClosedNode (p_data,
					    (void *) yymsp[-3].minor.yy0,
					    (void *) yymsp[-2].minor.yy0);
	  }
	  break;
      case 10:			/* node ::= open_tag GML_CLOSE */
	  {
	      yygotominor.yy0 =
		  gml_createNode (p_data, (void *) yymsp[-1].minor.yy0, NULL,
				  NULL);
	  }
	  break;
      case 11:			/* node ::= open_tag attr GML_CLOSE */
      case 12:			/* node ::= open_tag attributes GML_CLOSE */
	  yytestcase (yyruleno == 12);
	  {
	      yygotominor.yy0 =
		  gml_createNode (p_data, (void *) yymsp[-2].minor.yy0,
				  (void *) yymsp[-1].minor.yy0, NULL);
	  }
	  break;
      case 13:			/* node ::= open_tag GML_CLOSE coord */
      case 14:			/* node ::= open_tag GML_CLOSE coord_chain */
	  yytestcase (yyruleno == 14);
	  {
	      yygotominor.yy0 =
		  gml_createNode (p_data, (void *) yymsp[-2].minor.yy0, NULL,
				  (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 15:			/* node ::= open_tag attr GML_CLOSE coord */
      case 16:			/* node ::= open_tag attr GML_CLOSE coord_chain */
	  yytestcase (yyruleno == 16);
      case 17:			/* node ::= open_tag attributes GML_CLOSE coord */
	  yytestcase (yyruleno == 17);
      case 18:			/* node ::= open_tag attributes GML_CLOSE coord_chain */
	  yytestcase (yyruleno == 18);
	  {
	      yygotominor.yy0 =
		  gml_createNode (p_data, (void *) yymsp[-3].minor.yy0,
				  (void *) yymsp[-2].minor.yy0,
				  (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 19:			/* node ::= close_tag */
	  {
	      yygotominor.yy0 =
		  gml_closingNode (p_data, (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 20:			/* open_tag ::= GML_OPEN keyword */
      case 22:			/* keyword ::= GML_KEYWORD */
	  yytestcase (yyruleno == 22);
	  {
	      yygotominor.yy0 = yymsp[0].minor.yy0;
	  }
	  break;
      case 21:			/* close_tag ::= GML_OPEN GML_END keyword GML_CLOSE */
	  {
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 23:			/* extra_nodes ::= */
      case 27:			/* extra_attr ::= */
	  yytestcase (yyruleno == 27);
      case 31:			/* extra_coord ::= */
	  yytestcase (yyruleno == 31);
	  {
	      yygotominor.yy0 = NULL;
	  }
	  break;
      case 24:			/* extra_nodes ::= node extra_nodes */
	  {
	      ((gmlNodePtr) yymsp[-1].minor.yy0)->Next =
		  (gmlNodePtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 25:			/* node_chain ::= node node extra_nodes */
	  {
	      ((gmlNodePtr) yymsp[-1].minor.yy0)->Next =
		  (gmlNodePtr) yymsp[0].minor.yy0;
	      ((gmlNodePtr) yymsp[-2].minor.yy0)->Next =
		  (gmlNodePtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      case 26:			/* attr ::= GML_KEYWORD GML_EQ GML_VALUE */
	  {
	      yygotominor.yy0 =
		  gml_attribute (p_data, (void *) yymsp[-2].minor.yy0,
				 (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 28:			/* extra_attr ::= attr extra_attr */
	  {
	      ((gmlAttrPtr) yymsp[-1].minor.yy0)->Next =
		  (gmlAttrPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 29:			/* attributes ::= attr attr extra_attr */
	  {
	      ((gmlAttrPtr) yymsp[-1].minor.yy0)->Next =
		  (gmlAttrPtr) yymsp[0].minor.yy0;
	      ((gmlAttrPtr) yymsp[-2].minor.yy0)->Next =
		  (gmlAttrPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      case 30:			/* coord ::= GML_COORD */
	  {
	      yygotominor.yy0 = gml_coord (p_data, (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 32:			/* extra_coord ::= coord extra_coord */
	  {
	      ((gmlCoordPtr) yymsp[-1].minor.yy0)->Next =
		  (gmlCoordPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 33:			/* coord_chain ::= coord coord extra_coord */
	  {
	      ((gmlCoordPtr) yymsp[-1].minor.yy0)->Next =
		  (gmlCoordPtr) yymsp[0].minor.yy0;
	      ((gmlCoordPtr) yymsp[-2].minor.yy0)->Next =
		  (gmlCoordPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      default:
	  /* (0) main ::= in */ yytestcase (yyruleno == 0);
	  /* (1) in ::= */ yytestcase (yyruleno == 1);
	  /* (2) in ::= in state GML_NEWLINE */ yytestcase (yyruleno == 2);
	  /* (3) state ::= program */ yytestcase (yyruleno == 3);
	  /* (4) program ::= gml_tree */ yytestcase (yyruleno == 4);
	  break;
      };
    yygoto = yyRuleInfo[yyruleno].lhs;
    yysize = yyRuleInfo[yyruleno].nrhs;
    yypParser->yyidx -= yysize;
    yyact = yy_find_reduce_action (yymsp[-yysize].stateno, (YYCODETYPE) yygoto);
    if (yyact < YYNSTATE)
      {
#ifdef NDEBUG
	  /* If we are not debugging and the reduce action popped at least
	   ** one element off the stack, then we can push the new element back
	   ** onto the stack here, and skip the stack overflow test in yy_shift().
	   ** That gives a significant speed improvement. */
	  if (yysize)
	    {
		yypParser->yyidx++;
		yymsp -= yysize - 1;
		yymsp->stateno = (YYACTIONTYPE) yyact;
		yymsp->major = (YYCODETYPE) yygoto;
		yymsp->minor = yygotominor;
	    }
	  else
#endif
	    {
		yy_shift (yypParser, yyact, yygoto, &yygotominor);
	    }
      }
    else
      {
	  assert (yyact == YYNSTATE + YYNRULE + 1);
	  yy_accept (yypParser);
      }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void
yy_parse_failed (yyParser * yypParser	/* The parser */
    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sFail!\n", yyTracePrompt);
      }
#endif
    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser fails */
    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void
yy_syntax_error (yyParser * yypParser,	/* The parser */
		 int yymajor,	/* The major type of the error token */
		 YYMINORTYPE yyminor	/* The minor type of the error token */

    )
{
    ParseARG_FETCH;
#define TOKEN (yyminor.yy0)


/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
    p_data->gml_parse_error = 1;
    p_data->result = NULL;

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void
yy_accept (yyParser * yypParser	/* The parser */

    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)

      {
	  fprintf (yyTraceFILE, "%sAccept!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)

	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser accepts */


    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void
Parse (void *yyp,		/* The parser */
       int yymajor,		/* The major token code number */
       ParseTOKENTYPE yyminor	/* The value for the token */
       ParseARG_PDECL		/* Optional %extra_argument parameter */

    )
{
    YYMINORTYPE yyminorunion;
    int yyact;			/* The parser action. */

    int yyendofinput;		/* True if we are at the end of input */

#ifdef YYERRORSYMBOL
    int yyerrorhit = 0;		/* True if yymajor has invoked an error */
#endif
    yyParser *yypParser;	/* The parser */

    /* (re)initialize the parser, if necessary */
    yypParser = (yyParser *) yyp;
    if (yypParser->yyidx < 0)

      {
#if YYSTACKDEPTH<=0
	  if (yypParser->yystksz <= 0)
	    {
		/*memset(&yyminorunion, 0, sizeof(yyminorunion)); */
		yyminorunion = yyzerominor;
		yyStackOverflow (yypParser, &yyminorunion);
		return;
	    }
#endif
	  yypParser->yyidx = 0;
	  yypParser->yyerrcnt = -1;
	  yypParser->yystack[0].stateno = 0;
	  yypParser->yystack[0].major = 0;
      }
    yyminorunion.yy0 = yyminor;
    yyendofinput = (yymajor == 0);
    ParseARG_STORE;

#ifndef NDEBUG
    if (yyTraceFILE)



      {
	  fprintf (yyTraceFILE, "%sInput %s\n", yyTracePrompt,
		   yyTokenName[yymajor]);



      }

#endif

    do
      {
	  yyact = yy_find_shift_action (yypParser, (YYCODETYPE) yymajor);





	  if (yyact < YYNSTATE)
	    {
		assert (!yyendofinput);	/* Impossible to shift the $ token */
		yy_shift (yypParser, yyact, yymajor, &yyminorunion);
		yypParser->yyerrcnt--;

		yymajor = YYNOCODE;




	    }
	  else if (yyact < YYNSTATE + YYNRULE)
	    {
		yy_reduce (yypParser, yyact - YYNSTATE);
	    }
	  else
	    {
		assert (yyact == YY_ERROR_ACTION);

#ifdef YYERRORSYMBOL
		int yymx;
#endif
#ifndef NDEBUG
		if (yyTraceFILE)

		  {
		      fprintf (yyTraceFILE, "%sSyntax Error!\n", yyTracePrompt);
		  }
#endif
#ifdef YYERRORSYMBOL
		/* A syntax error has occurred.
		 ** The response to an error depends upon whether or not the
		 ** grammar defines an error token "ERROR".  
		 **
		 ** This is what we do if the grammar does define ERROR:
		 **
		 **  * Call the %syntax_error function.
		 **
		 **  * Begin popping the stack until we enter a state where
		 **    it is legal to shift the error symbol, then shift
		 **    the error symbol.
		 **
		 **  * Set the error count to three.
		 **
		 **  * Begin accepting and shifting new tokens.  No new error
		 **    processing will occur until three tokens have been
		 **    shifted successfully.
		 **
		 */
		if (yypParser->yyerrcnt < 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yymx = yypParser->yystack[yypParser->yyidx].major;
		if (yymx == YYERRORSYMBOL || yyerrorhit)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sDiscard input token %s\n",
				     yyTracePrompt, yyTokenName[yymajor]);
			}
#endif
		      yy_destructor (yypParser, (YYCODETYPE) yymajor,
				     &yyminorunion);
		      yymajor = YYNOCODE;
		  }
		else

		  {
		      while (yypParser->yyidx >= 0 &&
			     yymx != YYERRORSYMBOL &&
			     (yyact =
			      yy_find_reduce_action (yypParser->yystack
						     [yypParser->yyidx].stateno,
						     YYERRORSYMBOL)) >=

			     YYNSTATE)
			{
			    yy_pop_parser_stack (yypParser);
			}

		      if (yypParser->yyidx < 0 || yymajor == 0)
			{
			    yy_destructor (yypParser, (YYCODETYPE) yymajor,
					   &yyminorunion);
			    yy_parse_failed (yypParser);



			    yymajor = YYNOCODE;
			}
		      else if (yymx != YYERRORSYMBOL)

			{
			    YYMINORTYPE u2;
			    u2.YYERRSYMDT = 0;
			    yy_shift (yypParser, yyact, YYERRORSYMBOL, &u2);
			}
		  }
		yypParser->yyerrcnt = 3;
		yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
		/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
		 ** do any kind of error recovery.  Instead, simply invoke the syntax
		 ** error routine and continue going as if nothing had happened.
		 **
		 ** Applications can set this macro (for example inside %include) if
		 ** they intend to abandon the parse upon the first syntax error seen.
		 */


		yy_syntax_error (yypParser, yymajor, yyminorunion);
		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		yymajor = YYNOCODE;

#else /* YYERRORSYMBOL is not defined */
		/* This is what we do if the grammar does not define ERROR:
		 **
		 **  * Report an error message, and throw away the input token.
		 **
		 **  * If the input token is $, then fail the parse.
		 **
		 ** As before, subsequent error messages are suppressed until
		 ** three input tokens have been successfully shifted.
		 */
		if (yypParser->yyerrcnt <= 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yypParser->yyerrcnt = 3;

		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		if (yyendofinput)
		  {
		      yy_parse_failed (yypParser);



		  }
		yymajor = YYNOCODE;
#endif
	    }









      }



    while (yymajor != YYNOCODE && yypParser->yyidx >= 0);
    return;
}

Changes to src/gaiageo/Gml.h.

1
2
3
4
5
6
7
8
#define GML_NEWLINE                      1
#define GML_END                          2
#define GML_CLOSE                        3
#define GML_OPEN                         4
#define GML_KEYWORD                      5
#define GML_EQ                           6
#define GML_VALUE                        7
#define GML_COORD                        8
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
#define GML_NEWLINE                     1
#define GML_END                         2
#define GML_CLOSE                       3
#define GML_OPEN                        4
#define GML_KEYWORD                     5
#define GML_EQ                          6
#define GML_VALUE                       7
#define GML_COORD                       8

Changes to src/gaiageo/Kml.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160


161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222


223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
...
244
245
246
247
248
249
250
251
252
253
254
255
256
257


258
259
260
261
262
263
264
265
266
267
268


269
270

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
...
304
305
306
307
308
309
310

311

312
313

314

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687




688
689
690
691
692


693
694
695


696
697
698
699

700
701
702


703
704
705


706
707
708
709

710
711
712
713
714
715
716
717
718


719

720
721

722
723
724
725


726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061


























































































1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072


1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092


1093
1094
1095
1096


1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
....
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134


1135
1136
1137
1138
1139
1140
1141
1142
1143
1144

1145
1146
1147

1148







1149







1150
1151
1152
1153
1154
1155
1156


1157
1158
1159
1160
1161
1162
1163
1164
1165

1166
1167
1168
1169
1170
1171




1172
1173
1174
1175
1176
1177
1178





1179

1180
1181
1182
1183
1184
1185
1186
1187


1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211


1212
1213
1214

1215
1216

1217
1218
1219
1220
1221

1222

1223
1224


1225

1226
1227
1228
1229


1230
1231
1232



1233
1234
1235
1236
1237
1238

1239
1240




1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254


1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268


1269
1270
1271

1272

1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293

1294
1295
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/

/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions


*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 28
#define YYACTIONTYPE unsigned char
#define ParseTOKENTYPE void *
typedef union {

  int yyinit;
  ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct kml_data *p_data ;
#define ParseARG_PDECL , struct kml_data *p_data 
#define ParseARG_FETCH  struct kml_data *p_data  = yypParser->p_data 
#define ParseARG_STORE yypParser->p_data  = p_data 
#define YYNSTATE             27
#define YYNRULE              34
#define YYNTOKEN             9
#define YY_MAX_SHIFT         26
#define YY_MIN_SHIFTREDUCE   49
#define YY_MAX_SHIFTREDUCE   82
#define YY_ERROR_ACTION      83


#define YY_ACCEPT_ACTION     84
#define YY_NO_ACTION         85
#define YY_MIN_REDUCE        86
#define YY_MAX_REDUCE        119
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if

** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.


**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.

**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (63)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */    26,   26,   26,    4,   87,    5,    2,    2,    5,    5,
 /*    10 */   100,   84,    1,  100,  100,  105,  106,    3,    8,    5,
 /*    20 */    25,    6,   74,   23,  100,  109,   24,   12,  115,   23,
 /*    30 */    13,   19,   14,   16,   95,   17,   99,    8,   21,    7,
 /*    40 */    10,   10,   18,   97,  110,   15,  113,  114,   66,   14,
 /*    50 */     9,   23,  101,   66,   20,   11,   65,   53,   70,   52,
 /*    60 */    51,   22,   80,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    12,   13,   14,   15,   16,   17,   15,   15,   17,   17,
 /*    10 */    22,   10,   11,   22,   22,   24,   24,   15,   18,   17,
 /*    20 */     2,    3,    8,    5,   22,   25,    2,    3,    0,    5,
 /*    30 */    18,   19,    4,   20,   21,   20,   21,   18,    2,    3,
 /*    40 */    20,   20,   20,   21,   25,    2,   26,   26,    5,    4,
 /*    50 */    18,    5,   23,    5,   23,   20,    3,    3,    7,    3,
 /*    60 */     3,    6,    1,   27,   27,   27,   27,   27,   27,   27,
 /*    70 */    27,   27,
};
#define YY_SHIFT_COUNT    (26)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (61)
static const unsigned char yy_shift_ofst[] = {
 /*     0 */    63,   28,   45,   45,   45,   18,   14,   14,   46,   46,
 /*    10 */    14,   14,   14,   24,   43,   48,   14,   14,   14,   36,
 /*    20 */    53,   54,   51,   55,   56,   57,   61,
};
#define YY_REDUCE_COUNT (18)
#define YY_REDUCE_MIN   (-12)
#define YY_REDUCE_MAX   (35)
static const signed char yy_reduce_ofst[] = {
 /*     0 */     1,  -12,   -9,   -8,    2,   12,   13,   15,    0,   19,
 /*    10 */    20,   21,   22,   32,   29,   31,   35,   35,   35,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   116,   83,  104,  104,   86,   83,   91,   93,  108,  108,
 /*    10 */   112,  112,   92,   83,   83,   83,   94,   98,   96,   83,
 /*    20 */    83,   83,   83,   83,   83,   83,   83,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:


** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */


  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */


#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */

#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/

void ParseTrace(FILE *TraceFILE, char *zTracePrompt){

  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;

  if( yyTraceFILE==0 ) yyTracePrompt = 0;

  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "KML_NEWLINE",
  /*    2 */ "KML_END",
  /*    3 */ "KML_CLOSE",
  /*    4 */ "KML_OPEN",
  /*    5 */ "KML_KEYWORD",
  /*    6 */ "KML_EQ",
  /*    7 */ "KML_VALUE",
  /*    8 */ "KML_COORD",
  /*    9 */ "error",
  /*   10 */ "main",
  /*   11 */ "in",
  /*   12 */ "state",
  /*   13 */ "program",
  /*   14 */ "kml_tree",
  /*   15 */ "node",
  /*   16 */ "node_chain",
  /*   17 */ "open_tag",
  /*   18 */ "attr",
  /*   19 */ "attributes",
  /*   20 */ "coord",
  /*   21 */ "coord_chain",
  /*   22 */ "close_tag",
  /*   23 */ "keyword",
  /*   24 */ "extra_nodes",
  /*   25 */ "extra_attr",
  /*   26 */ "extra_coord",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "kml_tree ::= node",
 /*   1 */ "kml_tree ::= node_chain",
 /*   2 */ "node ::= open_tag KML_END KML_CLOSE",
 /*   3 */ "node ::= open_tag attr KML_END KML_CLOSE",
 /*   4 */ "node ::= open_tag attributes KML_END KML_CLOSE",
 /*   5 */ "node ::= open_tag KML_CLOSE",
 /*   6 */ "node ::= open_tag attr KML_CLOSE",
 /*   7 */ "node ::= open_tag attributes KML_CLOSE",
 /*   8 */ "node ::= open_tag KML_CLOSE coord",
 /*   9 */ "node ::= open_tag KML_CLOSE coord_chain",
 /*  10 */ "node ::= open_tag attr KML_CLOSE coord",
 /*  11 */ "node ::= open_tag attr KML_CLOSE coord_chain",
 /*  12 */ "node ::= open_tag attributes KML_CLOSE coord",
 /*  13 */ "node ::= open_tag attributes KML_CLOSE coord_chain",
 /*  14 */ "node ::= close_tag",
 /*  15 */ "open_tag ::= KML_OPEN keyword",
 /*  16 */ "close_tag ::= KML_OPEN KML_END keyword KML_CLOSE",
 /*  17 */ "keyword ::= KML_KEYWORD",
 /*  18 */ "extra_nodes ::=",
 /*  19 */ "extra_nodes ::= node extra_nodes",
 /*  20 */ "node_chain ::= node node extra_nodes",
 /*  21 */ "attr ::= KML_KEYWORD KML_EQ KML_VALUE",
 /*  22 */ "extra_attr ::=",
 /*  23 */ "extra_attr ::= attr extra_attr",
 /*  24 */ "attributes ::= attr attr extra_attr",
 /*  25 */ "coord ::= KML_COORD",
 /*  26 */ "extra_coord ::=",
 /*  27 */ "extra_coord ::= coord extra_coord",
 /*  28 */ "coord_chain ::= coord coord extra_coord",
 /*  29 */ "main ::= in",
 /*  30 */ "in ::=",
 /*  31 */ "in ::= in state KML_NEWLINE",
 /*  32 */ "state ::= program",
 /*  33 */ "program ::= kml_tree",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
static void ParseInit(void *yypParser){
  yyParser *pParser = (yyParser*)yypParser;
#ifdef YYTRACKMAXSTACKDEPTH
  pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  pParser->yytos = NULL;
  pParser->yystack = NULL;
  pParser->yystksz = 0;
  if( yyGrowStack(pParser) ){
    pParser->yystack = &pParser->yystk0;
    pParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  pParser->yyerrcnt = -1;
#endif
  pParser->yytos = pParser->yystack;
  pParser->yystack[0].stateno = 0;
  pParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ) ParseInit(pParser);
  return pParser;
}
#endif /* Parse_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
static void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.




*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){


  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){


    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );

#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );


  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){


    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );

  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){


   ParseARG_FETCH;

#ifndef NDEBUG
   if( yyTraceFILE ){

     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);


   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/

     spatialite_e( "Giving up.  Parser stack overflow\n");
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
  {   14,   -1 }, /* (0) kml_tree ::= node */
  {   14,   -1 }, /* (1) kml_tree ::= node_chain */
  {   15,   -3 }, /* (2) node ::= open_tag KML_END KML_CLOSE */
  {   15,   -4 }, /* (3) node ::= open_tag attr KML_END KML_CLOSE */
  {   15,   -4 }, /* (4) node ::= open_tag attributes KML_END KML_CLOSE */
  {   15,   -2 }, /* (5) node ::= open_tag KML_CLOSE */
  {   15,   -3 }, /* (6) node ::= open_tag attr KML_CLOSE */
  {   15,   -3 }, /* (7) node ::= open_tag attributes KML_CLOSE */
  {   15,   -3 }, /* (8) node ::= open_tag KML_CLOSE coord */
  {   15,   -3 }, /* (9) node ::= open_tag KML_CLOSE coord_chain */
  {   15,   -4 }, /* (10) node ::= open_tag attr KML_CLOSE coord */
  {   15,   -4 }, /* (11) node ::= open_tag attr KML_CLOSE coord_chain */
  {   15,   -4 }, /* (12) node ::= open_tag attributes KML_CLOSE coord */
  {   15,   -4 }, /* (13) node ::= open_tag attributes KML_CLOSE coord_chain */
  {   15,   -1 }, /* (14) node ::= close_tag */
  {   17,   -2 }, /* (15) open_tag ::= KML_OPEN keyword */
  {   22,   -4 }, /* (16) close_tag ::= KML_OPEN KML_END keyword KML_CLOSE */
  {   23,   -1 }, /* (17) keyword ::= KML_KEYWORD */
  {   24,    0 }, /* (18) extra_nodes ::= */
  {   24,   -2 }, /* (19) extra_nodes ::= node extra_nodes */
  {   16,   -3 }, /* (20) node_chain ::= node node extra_nodes */
  {   18,   -3 }, /* (21) attr ::= KML_KEYWORD KML_EQ KML_VALUE */
  {   25,    0 }, /* (22) extra_attr ::= */
  {   25,   -2 }, /* (23) extra_attr ::= attr extra_attr */
  {   19,   -3 }, /* (24) attributes ::= attr attr extra_attr */
  {   20,   -1 }, /* (25) coord ::= KML_COORD */
  {   26,    0 }, /* (26) extra_coord ::= */
  {   26,   -2 }, /* (27) extra_coord ::= coord extra_coord */
  {   21,   -3 }, /* (28) coord_chain ::= coord coord extra_coord */
  {   10,   -1 }, /* (29) main ::= in */
  {   11,    0 }, /* (30) in ::= */
  {   11,   -3 }, /* (31) in ::= in state KML_NEWLINE */
  {   12,   -1 }, /* (32) state ::= program */
  {   13,   -1 }, /* (33) program ::= kml_tree */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* kml_tree ::= node */
      case 1: /* kml_tree ::= node_chain */ yytestcase(yyruleno==1);
{ p_data->result = yymsp[0].minor.yy0; }
        break;
      case 2: /* node ::= open_tag KML_END KML_CLOSE */
{ yylhsminor.yy0 = kml_createSelfClosedNode( p_data, (void *)yymsp[-2].minor.yy0, NULL); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 3: /* node ::= open_tag attr KML_END KML_CLOSE */
      case 4: /* node ::= open_tag attributes KML_END KML_CLOSE */ yytestcase(yyruleno==4);
{ yylhsminor.yy0 = kml_createSelfClosedNode( p_data, (void *)yymsp[-3].minor.yy0, (void *)yymsp[-2].minor.yy0); }
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 5: /* node ::= open_tag KML_CLOSE */
{ yylhsminor.yy0 = kml_createNode( p_data, (void *)yymsp[-1].minor.yy0, NULL, NULL); }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 6: /* node ::= open_tag attr KML_CLOSE */
      case 7: /* node ::= open_tag attributes KML_CLOSE */ yytestcase(yyruleno==7);
{ yylhsminor.yy0 = kml_createNode( p_data, (void *)yymsp[-2].minor.yy0, (void *)yymsp[-1].minor.yy0, NULL); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 8: /* node ::= open_tag KML_CLOSE coord */
      case 9: /* node ::= open_tag KML_CLOSE coord_chain */ yytestcase(yyruleno==9);
{ yylhsminor.yy0 = kml_createNode( p_data, (void *)yymsp[-2].minor.yy0, NULL, (void *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 10: /* node ::= open_tag attr KML_CLOSE coord */
      case 11: /* node ::= open_tag attr KML_CLOSE coord_chain */ yytestcase(yyruleno==11);
      case 12: /* node ::= open_tag attributes KML_CLOSE coord */ yytestcase(yyruleno==12);
      case 13: /* node ::= open_tag attributes KML_CLOSE coord_chain */ yytestcase(yyruleno==13);
{ yylhsminor.yy0 = kml_createNode( p_data, (void *)yymsp[-3].minor.yy0, (void *)yymsp[-2].minor.yy0, (void *)yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 14: /* node ::= close_tag */
{ yylhsminor.yy0 = kml_closingNode( p_data, (void *)yymsp[0].minor.yy0); }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 15: /* open_tag ::= KML_OPEN keyword */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
        break;
      case 16: /* close_tag ::= KML_OPEN KML_END keyword KML_CLOSE */
{ yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 17: /* keyword ::= KML_KEYWORD */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 18: /* extra_nodes ::= */
      case 22: /* extra_attr ::= */ yytestcase(yyruleno==22);
      case 26: /* extra_coord ::= */ yytestcase(yyruleno==26);
{ yymsp[1].minor.yy0 = NULL; }
        break;
      case 19: /* extra_nodes ::= node extra_nodes */
{ ((kmlNodePtr)yymsp[-1].minor.yy0)->Next = (kmlNodePtr)yymsp[0].minor.yy0;  yylhsminor.yy0 = yymsp[-1].minor.yy0; }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 20: /* node_chain ::= node node extra_nodes */
{ 
	   ((kmlNodePtr)yymsp[-1].minor.yy0)->Next = (kmlNodePtr)yymsp[0].minor.yy0; 
	   ((kmlNodePtr)yymsp[-2].minor.yy0)->Next = (kmlNodePtr)yymsp[-1].minor.yy0;
	   yylhsminor.yy0 = yymsp[-2].minor.yy0;
	}
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 21: /* attr ::= KML_KEYWORD KML_EQ KML_VALUE */
{ yylhsminor.yy0 = kml_attribute( p_data, (void *)yymsp[-2].minor.yy0, (void *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 23: /* extra_attr ::= attr extra_attr */
{ ((kmlAttrPtr)yymsp[-1].minor.yy0)->Next = (kmlAttrPtr)yymsp[0].minor.yy0;  yylhsminor.yy0 = yymsp[-1].minor.yy0; }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 24: /* attributes ::= attr attr extra_attr */
{ 
	   ((kmlAttrPtr)yymsp[-1].minor.yy0)->Next = (kmlAttrPtr)yymsp[0].minor.yy0; 
	   ((kmlAttrPtr)yymsp[-2].minor.yy0)->Next = (kmlAttrPtr)yymsp[-1].minor.yy0;
	   yylhsminor.yy0 = yymsp[-2].minor.yy0;
	}
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 25: /* coord ::= KML_COORD */
{ yylhsminor.yy0 = kml_coord( p_data, (void *)yymsp[0].minor.yy0); }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 27: /* extra_coord ::= coord extra_coord */
{ ((kmlCoordPtr)yymsp[-1].minor.yy0)->Next = (kmlCoordPtr)yymsp[0].minor.yy0;  yylhsminor.yy0 = yymsp[-1].minor.yy0; }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 28: /* coord_chain ::= coord coord extra_coord */
{ 
	   ((kmlCoordPtr)yymsp[-1].minor.yy0)->Next = (kmlCoordPtr)yymsp[0].minor.yy0; 
	   ((kmlCoordPtr)yymsp[-2].minor.yy0)->Next = (kmlCoordPtr)yymsp[-1].minor.yy0;
	   yylhsminor.yy0 = yymsp[-2].minor.yy0;
	}
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      default:
      /* (29) main ::= in */ yytestcase(yyruleno==29);
      /* (30) in ::= */ yytestcase(yyruleno==30);
      /* (31) in ::= in state KML_NEWLINE */ yytestcase(yyruleno==31);
      /* (32) state ::= program (OPTIMIZED OUT) */ assert(yyruleno!=32);
      /* (33) program ::= kml_tree (OPTIMIZED OUT) */ assert(yyruleno!=33);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */


























































































}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){


  ParseARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/

/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
	p_data->kml_parse_error = 1;
	p_data->result = NULL;
/************ End %syntax_error code ******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){


  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);


  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){


  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */


  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)

  yyendofinput = (yymajor==0);







#endif







  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    int stateno = yypParser->yytos->stateno;
    if( stateno < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",


              yyTracePrompt,yyTokenName[yymajor],stateno);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno-YY_MIN_REDUCE);
    }
  }
#endif

  do{

    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact >= YY_MIN_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY




      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;





    }else{

      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);


      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);


      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){

#ifndef NDEBUG
        if( yyTraceFILE ){

          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);

        yymajor = YYNOCODE;

      }else{
        while( yypParser->yytos >= yypParser->yystack


            && yymx != YYERRORSYMBOL

            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){


          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){



          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;

        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);




        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);


      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);


      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);

      if( yyendofinput ){

        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif

  return;
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<


<
<
<
<
<
<
<
<
<
>
>

<
<
<
<




|
>
|
|





|
|
|
|
|
|
|
<
<
|
>
>
|
|
<
<
<










|











|


|
<

|

|

|


<
<
<

|

|
<

<
>
|
>
>

|


|
>











|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>







<
<
<
<







 







<
<
<
<

|
<
>
>
|
|
|
|





|
<
>
>

<
>

<
|
<
|

|
|
<

|
<







 







>
|
>
|
|
>
|
>
|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>
>
>
>

|
|
|
<
>
>
|

<
>
>
|
|

<
>

|
<
>
>
|

<
>
>
|
|

<
>
|

|





|
>
>
|
>

|
>
|
|

<
>
>
|
|
<

|
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






|
|
|
|
<
>
>
|
|
<





|
|
<
|





|
|
<
>
>
|

|
<
>
>
|

<
|
<
|
|
|
<
<
|







 







|
|
|
|
|
<
>
>
|
|
<
|
<

|

|

>
|
|
<
>
|
>
>
>
>
>
>
>

>
>
>
>
>
>
>
|


|
<
<
<
>
>
|
<
<
<
|
<


|
>
|
<
<
<
<
<
>
>
>
>
|
<
|
<
<
<
<
>
>
>
>
>
|
>
|
<

|


|
<
>
>
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
|
>

|
>
|
|
|

|
>
|
>
|
<
>
>
|
>
|
|
|
<
>
>
|
|
<
>
>
>
|
|
<
<
<
|
>
|
<
>
>
>
>
|
|
|
|

|
|
|
|
|
|
|
<
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
<
>
|
>
|
<
<
<
|
|

|
<
<
<
<
<
<
<
<
<
|
<
<
<
>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


















46
47
48
49
50
51


52
53









54
55
56




57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115



116
117
118
119

120

121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196




197
198
199
200
201
202
203
...
207
208
209
210
211
212
213




214
215

216
217
218
219
220
221
222
223
224
225
226
227

228
229
230

231
232

233

234
235
236
237

238
239

240
241
242
243
244
245
246
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559




















































































560
561
562
563
564
565
566
567
568
569
570
571
572

573
574
575
576

577
578
579
580
581

582
583
584

585
586
587
588

589
590
591
592
593

594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613

614
615
616
617

618
619

620
621





















622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028

1029
1030
1031
1032

1033
1034
1035
1036
1037
1038
1039

1040
1041
1042
1043
1044
1045
1046
1047

1048
1049
1050
1051
1052

1053
1054
1055
1056

1057

1058
1059
1060


1061
1062
1063
1064
1065
1066
1067
1068
....
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087

1088
1089
1090
1091

1092

1093
1094
1095
1096
1097
1098
1099
1100

1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121



1122
1123
1124



1125

1126
1127
1128
1129
1130





1131
1132
1133
1134
1135

1136




1137
1138
1139
1140
1141
1142
1143
1144

1145
1146
1147
1148
1149

1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174

1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192

1193
1194
1195
1196
1197
1198
1199

1200
1201
1202
1203

1204
1205
1206
1207
1208



1209
1210
1211

1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227


1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242

1243
1244
1245
1246

1247
1248
1249
1250



1251
1252
1253
1254









1255



1256
1257
1258
/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>

/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
/* 
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands. 
**
** Each symbol here is a terminal symbol in the grammar.
*/
/* Make sure the INTERFACE macro is defined.
*/
#ifndef INTERFACE
#define INTERFACE 1
#endif
/* The next thing included is series of defines which control
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 terminals
**                       and nonterminals.  "int" is used otherwise.
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
**                       to no legal terminal or nonterminal number.  This
**                       number is used to fill in empty slots of the hash 
**                       table.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       have fall-back values which should be used if the
**                       original value of the token will not parse.
**    YYACTIONTYPE       is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 rules and
**                       states combined.  "int" is used otherwise.
**    ParseTOKENTYPE     is the data type used for minor tokens given 
**                       directly to the parser from the tokenizer.
**    YYMINORTYPE        is the data type used for all minor tokens.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for base tokens is called "yy0".


















**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser


**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar









**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
*/




#define YYCODETYPE unsigned char
#define YYNOCODE 28
#define YYACTIONTYPE unsigned char
#define ParseTOKENTYPE void *
typedef union
{
    int yyinit;
    ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct kml_data *p_data ;
#define ParseARG_PDECL , struct kml_data *p_data
#define ParseARG_FETCH  struct kml_data *p_data  = yypParser->p_data
#define ParseARG_STORE yypParser->p_data  = p_data
#define YYNSTATE 49
#define YYNRULE 34
#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)


#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)

/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static const YYMINORTYPE yyzerominor = { 0 };




/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
#define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.

**
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
**
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
**
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**



** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]

**

** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
*/
static const YYACTIONTYPE yy_action[] = {
    /*     0 */ 20, 28, 29, 4, 48, 5, 3, 3, 5, 5,
    /*    10 */ 42, 84, 1, 42, 42, 47, 46, 2, 10, 5,
    /*    20 */ 21, 12, 32, 23, 42, 38, 22, 6, 49, 23,
    /*    30 */ 13, 19, 14, 15, 35, 8, 8, 10, 25, 11,
    /*    40 */ 18, 34, 33, 45, 37, 16, 40, 17, 41, 14,
    /*    50 */ 9, 23, 43, 7, 45, 27, 30, 26, 31, 36,
    /*    60 */ 39, 44, 24,
};

static const YYCODETYPE yy_lookahead[] = {
    /*     0 */ 12, 13, 14, 15, 16, 17, 15, 15, 17, 17,
    /*    10 */ 22, 10, 11, 22, 22, 24, 24, 15, 18, 17,
    /*    20 */ 2, 3, 8, 5, 22, 25, 2, 3, 0, 5,
    /*    30 */ 18, 19, 4, 20, 21, 20, 20, 18, 2, 3,
    /*    40 */ 2, 26, 26, 5, 25, 20, 21, 20, 21, 4,
    /*    50 */ 18, 5, 23, 20, 5, 1, 3, 23, 3, 7,
    /*    60 */ 3, 3, 6,
};

#define YY_SHIFT_USE_DFLT (-1)
#define YY_SHIFT_MAX 26
static const signed char yy_shift_ofst[] = {
    /*     0 */ -1, 28, 45, 45, 45, 18, 14, 14, 14, 46,
    /*    10 */ 46, 14, 14, 24, 38, 14, 14, 14, 49, 36,
    /*    20 */ 54, 53, 55, 56, 52, 57, 58,
};

#define YY_REDUCE_USE_DFLT (-13)
#define YY_REDUCE_MAX 18
static const signed char yy_reduce_ofst[] = {
    /*     0 */ 1, -12, -9, -8, 2, 12, 13, 15, 16, 0,
    /*    10 */ 19, 25, 27, 32, 29, 33, 33, 33, 34,
};

static const YYACTIONTYPE yy_default[] = {
    /*     0 */ 50, 83, 72, 72, 54, 83, 60, 80, 80, 76,
    /*    10 */ 76, 61, 59, 83, 83, 64, 66, 62, 83, 83,
    /*    20 */ 83, 83, 83, 83, 83, 83, 83, 51, 52, 53,
    /*    30 */ 56, 57, 79, 81, 82, 65, 75, 77, 78, 58,
    /*    40 */ 67, 63, 68, 69, 70, 71, 73, 74, 55,
};

#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.




*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.




*/
struct yyStackEntry

{
    YYACTIONTYPE stateno;	/* The state-number */
    YYCODETYPE major;		/* The major token value.  This is the code
				 ** number for the token at this stack level */
    YYMINORTYPE minor;		/* The user-supplied minor token value.  This
				 ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser

{
    int yyidx;			/* Index of top element in stack */
#ifdef YYTRACKMAXSTACKDEPTH

    int yyidxMax;		/* Maximum value of yyidx */
#endif

    int yyerrcnt;		/* Shifts left before out of the error */

      ParseARG_SDECL		/* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
    int yystksz;		/* Current side of the stack */
    yyStackEntry *yystack;	/* The parser's stack */

#else
      yyStackEntry yystack[YYSTACKDEPTH];	/* The parser's stack */

#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void
ParseTrace (FILE * TraceFILE, char *zTracePrompt)
{
    yyTraceFILE = TraceFILE;
    yyTracePrompt = zTracePrompt;
    if (yyTraceFILE == 0)
	yyTracePrompt = 0;
    else if (yyTracePrompt == 0)
	yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = {
    "$", "KML_NEWLINE", "KML_END", "KML_CLOSE",
    "KML_OPEN", "KML_KEYWORD", "KML_EQ", "KML_VALUE",
    "KML_COORD", "error", "main", "in",
    "state", "program", "kml_tree", "node",
    "node_chain", "open_tag", "attr", "attributes",
    "coord", "coord_chain", "close_tag", "keyword",
    "extra_nodes", "extra_attr", "extra_coord",
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
    /*   0 */ "main ::= in",
    /*   1 */ "in ::=",
    /*   2 */ "in ::= in state KML_NEWLINE",
    /*   3 */ "state ::= program",
    /*   4 */ "program ::= kml_tree",
    /*   5 */ "kml_tree ::= node",
    /*   6 */ "kml_tree ::= node_chain",
    /*   7 */ "node ::= open_tag KML_END KML_CLOSE",
    /*   8 */ "node ::= open_tag attr KML_END KML_CLOSE",
    /*   9 */ "node ::= open_tag attributes KML_END KML_CLOSE",
    /*  10 */ "node ::= open_tag KML_CLOSE",
    /*  11 */ "node ::= open_tag attr KML_CLOSE",
    /*  12 */ "node ::= open_tag attributes KML_CLOSE",
    /*  13 */ "node ::= open_tag KML_CLOSE coord",
    /*  14 */ "node ::= open_tag KML_CLOSE coord_chain",
    /*  15 */ "node ::= open_tag attr KML_CLOSE coord",
    /*  16 */ "node ::= open_tag attr KML_CLOSE coord_chain",
    /*  17 */ "node ::= open_tag attributes KML_CLOSE coord",
    /*  18 */ "node ::= open_tag attributes KML_CLOSE coord_chain",
    /*  19 */ "node ::= close_tag",
    /*  20 */ "open_tag ::= KML_OPEN keyword",
    /*  21 */ "close_tag ::= KML_OPEN KML_END keyword KML_CLOSE",
    /*  22 */ "keyword ::= KML_KEYWORD",
    /*  23 */ "extra_nodes ::=",
    /*  24 */ "extra_nodes ::= node extra_nodes",
    /*  25 */ "node_chain ::= node node extra_nodes",
    /*  26 */ "attr ::= KML_KEYWORD KML_EQ KML_VALUE",
    /*  27 */ "extra_attr ::=",
    /*  28 */ "extra_attr ::= attr extra_attr",
    /*  29 */ "attributes ::= attr attr extra_attr",
    /*  30 */ "coord ::= KML_COORD",
    /*  31 */ "extra_coord ::=",
    /*  32 */ "extra_coord ::= coord extra_coord",
    /*  33 */ "coord_chain ::= coord coord extra_coord",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.
*/
static void
yyGrowStack (yyParser * p)
{
    int newSize;
    yyStackEntry *pNew;

    newSize = p->yystksz * 2 + 100;
    pNew = realloc (p->yystack, newSize * sizeof (pNew[0]));
    if (pNew)
      {
	  p->yystack = pNew;
	  p->yystksz = newSize;
#ifndef NDEBUG
	  if (yyTraceFILE)
	    {
		fprintf (yyTraceFILE, "%sStack grows to %d entries!\n",
			 yyTracePrompt, p->yystksz);
	    }
#endif
      }
}
#endif

/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *
ParseAlloc (void *(*mallocProc) (size_t))
{
    yyParser *pParser;
    pParser = (yyParser *) (*mallocProc) ((size_t) sizeof (yyParser));
    if (pParser)
      {
	  pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
	  pParser->yyidxMax = 0;
#endif
#if YYSTACKDEPTH<=0
	  pParser->yystack = NULL;
	  pParser->yystksz = 0;
	  yyGrowStack (pParser);
#endif
      }
    return pParser;
}

/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
static void
yy_destructor (yyParser * yypParser,	/* The parser */
	       YYCODETYPE yymajor,	/* Type code for object to destroy */
	       YYMINORTYPE * yypminor	/* The object to be destroyed */
    )
{
    switch (yymajor)
      {
	  /* Here is inserted the actions which take place when a
	   ** terminal or non-terminal is destroyed.  This can happen
	   ** when the symbol is popped from the stack during a
	   ** reduce or during error processing or when a parser is 
	   ** being destroyed before it is finished parsing.
	   **
	   ** Note: during a reduce, the only symbols destroyed are those
	   ** which appear on the RHS of the rule, but which are not used
	   ** inside the C code.
	   */
      default:
	  break;		/* If no destructor action specified: do nothing */
      }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
**
** Return the major token number for the symbol popped.
*/
static int
yy_pop_parser_stack (yyParser * pParser)
{
    YYCODETYPE yymajor;
    yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

    if (pParser->yyidx < 0)
	return 0;
#ifndef NDEBUG
    if (yyTraceFILE && pParser->yyidx >= 0)
      {
	  fprintf (yyTraceFILE, "%sPopping %s\n",
		   yyTracePrompt, yyTokenName[yytos->major]);
      }
#endif
    yymajor = yytos->major;
    yy_destructor (pParser, yymajor, &yytos->minor);
    pParser->yyidx--;
    return yymajor;
}

/* 
** Deallocate and destroy a parser.  Destructors are all called for
** all stack elements before shutting the parser down.
**
** Inputs:
** <ul>
** <li>  A pointer to the parser.  This should be a pointer
**       obtained from ParseAlloc.
** <li>  A pointer to a function used to reclaim memory obtained
**       from malloc.
** </ul>
*/
void
ParseFree (void *p,		/* The parser to be deleted */
	   void (*freeProc) (void *)	/* Function used to reclaim memory */
    )
{
    yyParser *pParser = (yyParser *) p;
    if (pParser == 0)
	return;
    while (pParser->yyidx >= 0)
	yy_pop_parser_stack (pParser);
#if YYSTACKDEPTH<=0
    free (pParser->yystack);
#endif
    (*freeProc) ((void *) pParser);
}

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int
ParseStackPeak (void *p)
{
    yyParser *pParser = (yyParser *) p;
    return pParser->yyidxMax;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_shift_action (yyParser * pParser,	/* The parser */
		      YYCODETYPE iLookAhead	/* The look-ahead token */
    )
{
    int i;
    int stateno = pParser->yystack[pParser->yyidx].stateno;

    if (stateno > YY_SHIFT_MAX
	|| (i = yy_shift_ofst[stateno]) == YY_SHIFT_USE_DFLT)
      {
	  return yy_default[stateno];
      }
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  if (iLookAhead > 0)
	    {
#ifdef YYFALLBACK
		YYCODETYPE iFallback;	/* Fallback token */
		if (iLookAhead < sizeof (yyFallback) / sizeof (yyFallback[0])
		    && (iFallback = yyFallback[iLookAhead]) != 0)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sFALLBACK %s => %s\n",
				     yyTracePrompt, yyTokenName[iLookAhead],
				     yyTokenName[iFallback]);
			}
#endif
		      return yy_find_shift_action (pParser, iFallback);
		  }
#endif
#ifdef YYWILDCARD
		{
		    int j = i - iLookAhead + YYWILDCARD;
		    if (j >= 0 && j < YY_SZ_ACTTAB
			&& yy_lookahead[j] == YYWILDCARD)
		      {
#ifndef NDEBUG
			  if (yyTraceFILE)
			    {
				fprintf (yyTraceFILE, "%sWILDCARD %s => %s\n",
					 yyTracePrompt, yyTokenName[iLookAhead],
					 yyTokenName[YYWILDCARD]);
			    }
#endif /* NDEBUG */
			  return yy_action[j];
		      }
		}
#endif /* YYWILDCARD */
	    }
	  return yy_default[stateno];
      }
    else
      {
	  return yy_action[i];
      }




















































































}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_reduce_action (int stateno,	/* Current state number */
		       YYCODETYPE iLookAhead	/* The look-ahead token */

    )
{
    int i;
#ifdef YYERRORSYMBOL

    if (stateno > YY_REDUCE_MAX)
      {
	  return yy_default[stateno];
      }
#else

    assert (stateno <= YY_REDUCE_MAX);
#endif
    i = yy_reduce_ofst[stateno];

    assert (i != YY_REDUCE_USE_DFLT);
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
#ifdef YYERRORSYMBOL

    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  return yy_default[stateno];
      }
#else

    assert (i >= 0 && i < YY_SZ_ACTTAB);
    assert (yy_lookahead[i] == iLookAhead);
#endif
    return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void
yyStackOverflow (yyParser * yypParser, YYMINORTYPE * yypMinor)
{
    ParseARG_FETCH;
    yypParser->yyidx--;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sStack Overflow!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will execute if the parser
     ** stack every overflows */


    spatialite_e ("Giving up.  Parser stack overflow\n");

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument var */
}






















/*
** Perform a shift action.
*/
static void
yy_shift (yyParser * yypParser,	/* The parser to be shifted */
	  int yyNewState,	/* The new state to shift in */
	  int yyMajor,		/* The major token to shift in */
	  YYMINORTYPE * yypMinor	/* Pointer to the minor token to shift in */
    )
{
    yyStackEntry *yytos;
    yypParser->yyidx++;
#ifdef YYTRACKMAXSTACKDEPTH
    if (yypParser->yyidx > yypParser->yyidxMax)
      {
	  yypParser->yyidxMax = yypParser->yyidx;
      }
#endif
#if YYSTACKDEPTH>0
    if (yypParser->yyidx >= YYSTACKDEPTH)
      {
	  yyStackOverflow (yypParser, yypMinor);
	  return;
      }
#else
    if (yypParser->yyidx >= yypParser->yystksz)
      {
	  yyGrowStack (yypParser);
	  if (yypParser->yyidx >= yypParser->yystksz)
	    {
		yyStackOverflow (yypParser, yypMinor);
		return;
	    }
      }
#endif
    yytos = &yypParser->yystack[yypParser->yyidx];
    yytos->stateno = (YYACTIONTYPE) yyNewState;
    yytos->major = (YYCODETYPE) yyMajor;
    yytos->minor = *yypMinor;
#ifndef NDEBUG
    if (yyTraceFILE && yypParser->yyidx > 0)
      {
	  int i;
	  fprintf (yyTraceFILE, "%sShift %d\n", yyTracePrompt, yyNewState);
	  fprintf (yyTraceFILE, "%sStack:", yyTracePrompt);
	  for (i = 1; i <= yypParser->yyidx; i++)
	      fprintf (yyTraceFILE, " %s",
		       yyTokenName[yypParser->yystack[i].major]);
	  fprintf (yyTraceFILE, "\n");
      }
#endif
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct
{
    YYCODETYPE lhs;		/* Symbol on the left-hand side of the rule */
    unsigned char nrhs;		/* Number of right-hand side symbols in the rule */
} yyRuleInfo[] =
{
    {
    10, 1},
    {
    11, 0},
    {
    11, 3},
    {
    12, 1},
    {
    13, 1},
    {
    14, 1},
    {
    14, 1},
    {
    15, 3},
    {
    15, 4},
    {
    15, 4},
    {
    15, 2},
    {
    15, 3},
    {
    15, 3},
    {
    15, 3},
    {
    15, 3},
    {
    15, 4},
    {
    15, 4},
    {
    15, 4},
    {
    15, 4},
    {
    15, 1},
    {
    17, 2},
    {
    22, 4},
    {
    23, 1},
    {
    24, 0},
    {
    24, 2},
    {
    16, 3},
    {
    18, 3},
    {
    25, 0},
    {
    25, 2},
    {
    19, 3},
    {
    20, 1},
    {
    26, 0},
    {
    26, 2},
    {
21, 3},};

static void yy_accept (yyParser *);	/* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
*/
static void
yy_reduce (yyParser * yypParser,	/* The parser */
	   int yyruleno		/* Number of the rule by which to reduce */
    )
{
    int yygoto;			/* The next state */
    int yyact;			/* The next action */
    YYMINORTYPE yygotominor;	/* The LHS of the rule reduced */
    yyStackEntry *yymsp;	/* The top of the parser's stack */
    int yysize;			/* Amount to pop the stack */
    ParseARG_FETCH;
    yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
    if (yyTraceFILE && yyruleno >= 0
	&& yyruleno < (int) (sizeof (yyRuleName) / sizeof (yyRuleName[0])))
      {
	  fprintf (yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
		   yyRuleName[yyruleno]);
      }
#endif /* NDEBUG */

    /* Silence complaints from purify about yygotominor being uninitialized
     ** in some cases when it is copied into the stack after the following
     ** switch.  yygotominor is uninitialized when a rule reduces that does
     ** not set the value of its left-hand side nonterminal.  Leaving the
     ** value of the nonterminal uninitialized is utterly harmless as long
     ** as the value is never used.  So really the only thing this code
     ** accomplishes is to quieten purify.  
     **
     ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
     ** without this code, their parser segfaults.  I'm not sure what there
     ** parser is doing to make this happen.  This is the second bug report
     ** from wireshark this week.  Clearly they are stressing Lemon in ways
     ** that it has not been previously stressed...  (SQLite ticket #2172)
     */
    /*memset(&yygotominor, 0, sizeof(yygotominor)); */
    yygotominor = yyzerominor;


    switch (yyruleno)
      {
	  /* Beginning here are the reduction cases.  A typical example
	   ** follows:
	   **   case 0:
	   **  #line <lineno> <grammarfile>
	   **     { ... }           // User supplied code
	   **  #line <lineno> <thisfile>
	   **     break;
	   */
      case 5:			/* kml_tree ::= node */
      case 6:			/* kml_tree ::= node_chain */
	  yytestcase (yyruleno == 6);
	  {
	      p_data->result = yymsp[0].minor.yy0;
	  }
	  break;
      case 7:			/* node ::= open_tag KML_END KML_CLOSE */
	  {
	      yygotominor.yy0 =
		  kml_createSelfClosedNode (p_data,
					    (void *) yymsp[-2].minor.yy0, NULL);
	  }
	  break;
      case 8:			/* node ::= open_tag attr KML_END KML_CLOSE */
      case 9:			/* node ::= open_tag attributes KML_END KML_CLOSE */
	  yytestcase (yyruleno == 9);
	  {
	      yygotominor.yy0 =
		  kml_createSelfClosedNode (p_data,
					    (void *) yymsp[-3].minor.yy0,
					    (void *) yymsp[-2].minor.yy0);
	  }
	  break;
      case 10:			/* node ::= open_tag KML_CLOSE */
	  {
	      yygotominor.yy0 =
		  kml_createNode (p_data, (void *) yymsp[-1].minor.yy0, NULL,
				  NULL);
	  }
	  break;
      case 11:			/* node ::= open_tag attr KML_CLOSE */
      case 12:			/* node ::= open_tag attributes KML_CLOSE */
	  yytestcase (yyruleno == 12);
	  {
	      yygotominor.yy0 =
		  kml_createNode (p_data, (void *) yymsp[-2].minor.yy0,
				  (void *) yymsp[-1].minor.yy0, NULL);
	  }
	  break;
      case 13:			/* node ::= open_tag KML_CLOSE coord */
      case 14:			/* node ::= open_tag KML_CLOSE coord_chain */
	  yytestcase (yyruleno == 14);
	  {
	      yygotominor.yy0 =
		  kml_createNode (p_data, (void *) yymsp[-2].minor.yy0, NULL,
				  (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 15:			/* node ::= open_tag attr KML_CLOSE coord */
      case 16:			/* node ::= open_tag attr KML_CLOSE coord_chain */
	  yytestcase (yyruleno == 16);
      case 17:			/* node ::= open_tag attributes KML_CLOSE coord */
	  yytestcase (yyruleno == 17);
      case 18:			/* node ::= open_tag attributes KML_CLOSE coord_chain */
	  yytestcase (yyruleno == 18);
	  {
	      yygotominor.yy0 =
		  kml_createNode (p_data, (void *) yymsp[-3].minor.yy0,
				  (void *) yymsp[-2].minor.yy0,
				  (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 19:			/* node ::= close_tag */
	  {
	      yygotominor.yy0 =
		  kml_closingNode (p_data, (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 20:			/* open_tag ::= KML_OPEN keyword */
      case 22:			/* keyword ::= KML_KEYWORD */
	  yytestcase (yyruleno == 22);
	  {
	      yygotominor.yy0 = yymsp[0].minor.yy0;
	  }
	  break;
      case 21:			/* close_tag ::= KML_OPEN KML_END keyword KML_CLOSE */
	  {
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 23:			/* extra_nodes ::= */
      case 27:			/* extra_attr ::= */
	  yytestcase (yyruleno == 27);
      case 31:			/* extra_coord ::= */
	  yytestcase (yyruleno == 31);
	  {
	      yygotominor.yy0 = NULL;
	  }
	  break;
      case 24:			/* extra_nodes ::= node extra_nodes */
	  {
	      ((kmlNodePtr) yymsp[-1].minor.yy0)->Next =
		  (kmlNodePtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 25:			/* node_chain ::= node node extra_nodes */
	  {
	      ((kmlNodePtr) yymsp[-1].minor.yy0)->Next =
		  (kmlNodePtr) yymsp[0].minor.yy0;
	      ((kmlNodePtr) yymsp[-2].minor.yy0)->Next =
		  (kmlNodePtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      case 26:			/* attr ::= KML_KEYWORD KML_EQ KML_VALUE */
	  {
	      yygotominor.yy0 =
		  kml_attribute (p_data, (void *) yymsp[-2].minor.yy0,
				 (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 28:			/* extra_attr ::= attr extra_attr */
	  {
	      ((kmlAttrPtr) yymsp[-1].minor.yy0)->Next =
		  (kmlAttrPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 29:			/* attributes ::= attr attr extra_attr */
	  {
	      ((kmlAttrPtr) yymsp[-1].minor.yy0)->Next =
		  (kmlAttrPtr) yymsp[0].minor.yy0;
	      ((kmlAttrPtr) yymsp[-2].minor.yy0)->Next =
		  (kmlAttrPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      case 30:			/* coord ::= KML_COORD */
	  {
	      yygotominor.yy0 = kml_coord (p_data, (void *) yymsp[0].minor.yy0);
	  }
	  break;
      case 32:			/* extra_coord ::= coord extra_coord */
	  {
	      ((kmlCoordPtr) yymsp[-1].minor.yy0)->Next =
		  (kmlCoordPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 33:			/* coord_chain ::= coord coord extra_coord */
	  {
	      ((kmlCoordPtr) yymsp[-1].minor.yy0)->Next =
		  (kmlCoordPtr) yymsp[0].minor.yy0;
	      ((kmlCoordPtr) yymsp[-2].minor.yy0)->Next =
		  (kmlCoordPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      default:
	  /* (0) main ::= in */ yytestcase (yyruleno == 0);
	  /* (1) in ::= */ yytestcase (yyruleno == 1);
	  /* (2) in ::= in state KML_NEWLINE */ yytestcase (yyruleno == 2);
	  /* (3) state ::= program */ yytestcase (yyruleno == 3);
	  /* (4) program ::= kml_tree */ yytestcase (yyruleno == 4);
	  break;
      };
    yygoto = yyRuleInfo[yyruleno].lhs;
    yysize = yyRuleInfo[yyruleno].nrhs;
    yypParser->yyidx -= yysize;
    yyact = yy_find_reduce_action (yymsp[-yysize].stateno, (YYCODETYPE) yygoto);
    if (yyact < YYNSTATE)
      {
#ifdef NDEBUG
	  /* If we are not debugging and the reduce action popped at least
	   ** one element off the stack, then we can push the new element back
	   ** onto the stack here, and skip the stack overflow test in yy_shift().
	   ** That gives a significant speed improvement. */
	  if (yysize)
	    {
		yypParser->yyidx++;
		yymsp -= yysize - 1;
		yymsp->stateno = (YYACTIONTYPE) yyact;
		yymsp->major = (YYCODETYPE) yygoto;
		yymsp->minor = yygotominor;
	    }
	  else
#endif
	    {
		yy_shift (yypParser, yyact, yygoto, &yygotominor);
	    }
      }
    else
      {
	  assert (yyact == YYNSTATE + YYNRULE + 1);
	  yy_accept (yypParser);
      }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void
yy_parse_failed (yyParser * yypParser	/* The parser */
    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sFail!\n", yyTracePrompt);
      }
#endif
    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser fails */
    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void
yy_syntax_error (yyParser * yypParser,	/* The parser */
		 int yymajor,	/* The major type of the error token */
		 YYMINORTYPE yyminor	/* The minor type of the error token */

    )
{
    ParseARG_FETCH;
#define TOKEN (yyminor.yy0)


/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
    p_data->kml_parse_error = 1;
    p_data->result = NULL;

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void
yy_accept (yyParser * yypParser	/* The parser */

    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)

      {
	  fprintf (yyTraceFILE, "%sAccept!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)

	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser accepts */


    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void
Parse (void *yyp,		/* The parser */
       int yymajor,		/* The major token code number */
       ParseTOKENTYPE yyminor	/* The value for the token */
       ParseARG_PDECL		/* Optional %extra_argument parameter */

    )
{
    YYMINORTYPE yyminorunion;
    int yyact;			/* The parser action. */

    int yyendofinput;		/* True if we are at the end of input */

#ifdef YYERRORSYMBOL
    int yyerrorhit = 0;		/* True if yymajor has invoked an error */
#endif
    yyParser *yypParser;	/* The parser */

    /* (re)initialize the parser, if necessary */
    yypParser = (yyParser *) yyp;
    if (yypParser->yyidx < 0)

      {
#if YYSTACKDEPTH<=0
	  if (yypParser->yystksz <= 0)
	    {
		/*memset(&yyminorunion, 0, sizeof(yyminorunion)); */
		yyminorunion = yyzerominor;
		yyStackOverflow (yypParser, &yyminorunion);
		return;
	    }
#endif
	  yypParser->yyidx = 0;
	  yypParser->yyerrcnt = -1;
	  yypParser->yystack[0].stateno = 0;
	  yypParser->yystack[0].major = 0;
      }
    yyminorunion.yy0 = yyminor;
    yyendofinput = (yymajor == 0);
    ParseARG_STORE;

#ifndef NDEBUG
    if (yyTraceFILE)



      {
	  fprintf (yyTraceFILE, "%sInput %s\n", yyTracePrompt,
		   yyTokenName[yymajor]);



      }

#endif

    do
      {
	  yyact = yy_find_shift_action (yypParser, (YYCODETYPE) yymajor);





	  if (yyact < YYNSTATE)
	    {
		assert (!yyendofinput);	/* Impossible to shift the $ token */
		yy_shift (yypParser, yyact, yymajor, &yyminorunion);
		yypParser->yyerrcnt--;

		yymajor = YYNOCODE;




	    }
	  else if (yyact < YYNSTATE + YYNRULE)
	    {
		yy_reduce (yypParser, yyact - YYNSTATE);
	    }
	  else
	    {
		assert (yyact == YY_ERROR_ACTION);

#ifdef YYERRORSYMBOL
		int yymx;
#endif
#ifndef NDEBUG
		if (yyTraceFILE)

		  {
		      fprintf (yyTraceFILE, "%sSyntax Error!\n", yyTracePrompt);
		  }
#endif
#ifdef YYERRORSYMBOL
		/* A syntax error has occurred.
		 ** The response to an error depends upon whether or not the
		 ** grammar defines an error token "ERROR".  
		 **
		 ** This is what we do if the grammar does define ERROR:
		 **
		 **  * Call the %syntax_error function.
		 **
		 **  * Begin popping the stack until we enter a state where
		 **    it is legal to shift the error symbol, then shift
		 **    the error symbol.
		 **
		 **  * Set the error count to three.
		 **
		 **  * Begin accepting and shifting new tokens.  No new error
		 **    processing will occur until three tokens have been
		 **    shifted successfully.
		 **
		 */
		if (yypParser->yyerrcnt < 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yymx = yypParser->yystack[yypParser->yyidx].major;
		if (yymx == YYERRORSYMBOL || yyerrorhit)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sDiscard input token %s\n",
				     yyTracePrompt, yyTokenName[yymajor]);
			}
#endif
		      yy_destructor (yypParser, (YYCODETYPE) yymajor,
				     &yyminorunion);
		      yymajor = YYNOCODE;
		  }
		else

		  {
		      while (yypParser->yyidx >= 0 &&
			     yymx != YYERRORSYMBOL &&
			     (yyact =
			      yy_find_reduce_action (yypParser->yystack
						     [yypParser->yyidx].stateno,
						     YYERRORSYMBOL)) >=

			     YYNSTATE)
			{
			    yy_pop_parser_stack (yypParser);
			}

		      if (yypParser->yyidx < 0 || yymajor == 0)
			{
			    yy_destructor (yypParser, (YYCODETYPE) yymajor,
					   &yyminorunion);
			    yy_parse_failed (yypParser);



			    yymajor = YYNOCODE;
			}
		      else if (yymx != YYERRORSYMBOL)

			{
			    YYMINORTYPE u2;
			    u2.YYERRSYMDT = 0;
			    yy_shift (yypParser, yyact, YYERRORSYMBOL, &u2);
			}
		  }
		yypParser->yyerrcnt = 3;
		yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
		/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
		 ** do any kind of error recovery.  Instead, simply invoke the syntax
		 ** error routine and continue going as if nothing had happened.
		 **
		 ** Applications can set this macro (for example inside %include) if
		 ** they intend to abandon the parse upon the first syntax error seen.
		 */


		yy_syntax_error (yypParser, yymajor, yyminorunion);
		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		yymajor = YYNOCODE;

#else /* YYERRORSYMBOL is not defined */
		/* This is what we do if the grammar does not define ERROR:
		 **
		 **  * Report an error message, and throw away the input token.
		 **
		 **  * If the input token is $, then fail the parse.
		 **
		 ** As before, subsequent error messages are suppressed until
		 ** three input tokens have been successfully shifted.
		 */
		if (yypParser->yyerrcnt <= 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yypParser->yyerrcnt = 3;

		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		if (yyendofinput)
		  {
		      yy_parse_failed (yypParser);



		  }
		yymajor = YYNOCODE;
#endif
	    }









      }



    while (yymajor != YYNOCODE && yypParser->yyidx >= 0);
    return;
}

Changes to src/gaiageo/Kml.h.

1
2
3
4
5
6
7
8
#define KML_NEWLINE                      1
#define KML_END                          2
#define KML_CLOSE                        3
#define KML_OPEN                         4
#define KML_KEYWORD                      5
#define KML_EQ                           6
#define KML_VALUE                        7
#define KML_COORD                        8
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
#define KML_NEWLINE                     1
#define KML_END                         2
#define KML_CLOSE                       3
#define KML_OPEN                        4
#define KML_KEYWORD                     5
#define KML_EQ                          6
#define KML_VALUE                       7
#define KML_COORD                       8

Changes to src/gaiageo/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

SUBDIRS = flex lemon

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgaiageo.la gaiageo.la

GAIAGEO_COMMON_SOURCES = gg_advanced.c \
	gg_endian.c \
	gg_geodesic.c \
	gg_geometries.c \
	gg_geoscvt.c \
	gg_relations.c \
	gg_relations_ext.c \
	gg_rttopo.c \
	gg_extras.c \
	gg_shape.c \
	gg_transform.c \
	gg_wkb.c \
	gg_wkt.c \
	gg_vanuatu.c \
	gg_ewkt.c \
................................................................................
	gg_xml.c \
	gg_matrix.c

libgaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)

gaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)

gaiageo_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
gaiageo_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
gaiageo_la_CPPFLAGS += -DLOADABLE_EXTENSION
gaiageo_la_LDFLAGS = -module
gaiageo_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = Ewkt.h Ewkt.c lex.Ewkt.c \
	geoJSON.h geoJSON.c lex.GeoJson.c \
	Gml.h Gml.c lex.Gml.c \
	Kml.h Kml.c lex.Kml.c \
	vanuatuWkt.h vanuatuWkt.c lex.VanuatuWkt.c




|











|







 







|













1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

SUBDIRS = flex lemon

AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgaiageo.la gaiageo.la

GAIAGEO_COMMON_SOURCES = gg_advanced.c \
	gg_endian.c \
	gg_geodesic.c \
	gg_geometries.c \
	gg_geoscvt.c \
	gg_relations.c \
	gg_relations_ext.c \
	gg_lwgeom.c \
	gg_extras.c \
	gg_shape.c \
	gg_transform.c \
	gg_wkb.c \
	gg_wkt.c \
	gg_vanuatu.c \
	gg_ewkt.c \
................................................................................
	gg_xml.c \
	gg_matrix.c

libgaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)

gaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)

gaiageo_la_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
gaiageo_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
gaiageo_la_CPPFLAGS += -DLOADABLE_EXTENSION
gaiageo_la_LDFLAGS = -module
gaiageo_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = Ewkt.h Ewkt.c lex.Ewkt.c \
	geoJSON.h geoJSON.c lex.GeoJson.c \
	Gml.h Gml.c lex.Gml.c \
	Kml.h Kml.c lex.Kml.c \
	vanuatuWkt.h vanuatuWkt.c lex.VanuatuWkt.c

Changes to src/gaiageo/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
...
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
...
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
417
418
419
420
421
422
423

424
425
426
427
428
429
430
...
468
469
470
471
472
473
474

475
476
477
478
479
480
481
482
483
484
485
...
489
490
491
492
493
494
495

496
497
498
499
500
501
502
503
504
505
506
...
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
...
953
954
955
956
957
958
959
960
961
962
963
964
965
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
gaiageo_la_LIBADD =
am__objects_1 = gaiageo_la-gg_advanced.lo gaiageo_la-gg_endian.lo \
	gaiageo_la-gg_geodesic.lo gaiageo_la-gg_geometries.lo \
	gaiageo_la-gg_geoscvt.lo gaiageo_la-gg_relations.lo \
	gaiageo_la-gg_relations_ext.lo gaiageo_la-gg_rttopo.lo \
	gaiageo_la-gg_extras.lo gaiageo_la-gg_shape.lo \
	gaiageo_la-gg_transform.lo gaiageo_la-gg_wkb.lo \
	gaiageo_la-gg_wkt.lo gaiageo_la-gg_vanuatu.lo \
	gaiageo_la-gg_ewkt.lo gaiageo_la-gg_geoJSON.lo \
	gaiageo_la-gg_kml.lo gaiageo_la-gg_gml.lo \
	gaiageo_la-gg_voronoj.lo gaiageo_la-gg_xml.lo \
	gaiageo_la-gg_matrix.lo
................................................................................
am__v_lt_1 = 
gaiageo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(gaiageo_la_LDFLAGS) $(LDFLAGS) -o $@
libgaiageo_la_LIBADD =
am__objects_2 = gg_advanced.lo gg_endian.lo gg_geodesic.lo \
	gg_geometries.lo gg_geoscvt.lo gg_relations.lo \
	gg_relations_ext.lo gg_rttopo.lo gg_extras.lo gg_shape.lo \
	gg_transform.lo gg_wkb.lo gg_wkt.lo gg_vanuatu.lo gg_ewkt.lo \
	gg_geoJSON.lo gg_kml.lo gg_gml.lo gg_voronoj.lo gg_xml.lo \
	gg_matrix.lo
am_libgaiageo_la_OBJECTS = $(am__objects_2)
libgaiageo_la_OBJECTS = $(am_libgaiageo_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = flex lemon
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgaiageo.la gaiageo.la
GAIAGEO_COMMON_SOURCES = gg_advanced.c \
	gg_endian.c \
	gg_geodesic.c \
	gg_geometries.c \
	gg_geoscvt.c \
	gg_relations.c \
	gg_relations_ext.c \
	gg_rttopo.c \
	gg_extras.c \
	gg_shape.c \
	gg_transform.c \
	gg_wkb.c \
	gg_wkt.c \
	gg_vanuatu.c \
	gg_ewkt.c \
................................................................................
	gg_gml.c \
	gg_voronoj.c \
	gg_xml.c \
	gg_matrix.c

libgaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)
gaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)
gaiageo_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ \
	@LIBXML2_CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
gaiageo_la_LDFLAGS = -module
gaiageo_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
EXTRA_DIST = Ewkt.h Ewkt.c lex.Ewkt.c \
	geoJSON.h geoJSON.c lex.GeoJson.c \
	Gml.h Gml.c lex.Gml.c \
	Kml.h Kml.c lex.Kml.c \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_extras.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geoJSON.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geodesic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geometries.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geoscvt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_gml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_kml.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_matrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_relations.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_relations_ext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_rttopo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_shape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_transform.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_vanuatu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_voronoj.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_wkb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_wkt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_xml.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_extras.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geoJSON.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geodesic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geometries.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geoscvt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_gml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_kml.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_matrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_relations.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_relations_ext.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_rttopo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_shape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_transform.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_vanuatu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_voronoj.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_wkb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_wkt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_xml.Plo@am__quote@
................................................................................
gaiageo_la-gg_relations_ext.lo: gg_relations_ext.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gaiageo_la-gg_relations_ext.lo -MD -MP -MF $(DEPDIR)/gaiageo_la-gg_relations_ext.Tpo -c -o gaiageo_la-gg_relations_ext.lo `test -f 'gg_relations_ext.c' || echo '$(srcdir)/'`gg_relations_ext.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gaiageo_la-gg_relations_ext.Tpo $(DEPDIR)/gaiageo_la-gg_relations_ext.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_relations_ext.c' object='gaiageo_la-gg_relations_ext.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gaiageo_la-gg_relations_ext.lo `test -f 'gg_relations_ext.c' || echo '$(srcdir)/'`gg_relations_ext.c

gaiageo_la-gg_rttopo.lo: gg_rttopo.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gaiageo_la-gg_rttopo.lo -MD -MP -MF $(DEPDIR)/gaiageo_la-gg_rttopo.Tpo -c -o gaiageo_la-gg_rttopo.lo `test -f 'gg_rttopo.c' || echo '$(srcdir)/'`gg_rttopo.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gaiageo_la-gg_rttopo.Tpo $(DEPDIR)/gaiageo_la-gg_rttopo.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_rttopo.c' object='gaiageo_la-gg_rttopo.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gaiageo_la-gg_rttopo.lo `test -f 'gg_rttopo.c' || echo '$(srcdir)/'`gg_rttopo.c

gaiageo_la-gg_extras.lo: gg_extras.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gaiageo_la-gg_extras.lo -MD -MP -MF $(DEPDIR)/gaiageo_la-gg_extras.Tpo -c -o gaiageo_la-gg_extras.lo `test -f 'gg_extras.c' || echo '$(srcdir)/'`gg_extras.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gaiageo_la-gg_extras.Tpo $(DEPDIR)/gaiageo_la-gg_extras.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_extras.c' object='gaiageo_la-gg_extras.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gaiageo_la-gg_extras.lo `test -f 'gg_extras.c' || echo '$(srcdir)/'`gg_extras.c
................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<









|







 







|







 







<







 







|









|







 







|
|
<







 







>







 







>



<







 







>



<







 







|
|
|
|

|







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
...
196
197
198
199
200
201
202

203
204
205
206
207
208
209
...
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
...
379
380
381
382
383
384
385
386
387

388
389
390
391
392
393
394
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
...
458
459
460
461
462
463
464
465
466
467
468

469
470
471
472
473
474
475
...
479
480
481
482
483
484
485
486
487
488
489

490
491
492
493
494
495
496
...
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
...
943
944
945
946
947
948
949


950
951
952
953
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
gaiageo_la_LIBADD =
am__objects_1 = gaiageo_la-gg_advanced.lo gaiageo_la-gg_endian.lo \
	gaiageo_la-gg_geodesic.lo gaiageo_la-gg_geometries.lo \
	gaiageo_la-gg_geoscvt.lo gaiageo_la-gg_relations.lo \
	gaiageo_la-gg_relations_ext.lo gaiageo_la-gg_lwgeom.lo \
	gaiageo_la-gg_extras.lo gaiageo_la-gg_shape.lo \
	gaiageo_la-gg_transform.lo gaiageo_la-gg_wkb.lo \
	gaiageo_la-gg_wkt.lo gaiageo_la-gg_vanuatu.lo \
	gaiageo_la-gg_ewkt.lo gaiageo_la-gg_geoJSON.lo \
	gaiageo_la-gg_kml.lo gaiageo_la-gg_gml.lo \
	gaiageo_la-gg_voronoj.lo gaiageo_la-gg_xml.lo \
	gaiageo_la-gg_matrix.lo
................................................................................
am__v_lt_1 = 
gaiageo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(gaiageo_la_LDFLAGS) $(LDFLAGS) -o $@
libgaiageo_la_LIBADD =
am__objects_2 = gg_advanced.lo gg_endian.lo gg_geodesic.lo \
	gg_geometries.lo gg_geoscvt.lo gg_relations.lo \
	gg_relations_ext.lo gg_lwgeom.lo gg_extras.lo gg_shape.lo \
	gg_transform.lo gg_wkb.lo gg_wkt.lo gg_vanuatu.lo gg_ewkt.lo \
	gg_geoJSON.lo gg_kml.lo gg_gml.lo gg_voronoj.lo gg_xml.lo \
	gg_matrix.lo
am_libgaiageo_la_OBJECTS = $(am__objects_2)
libgaiageo_la_OBJECTS = $(am_libgaiageo_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = flex lemon
AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgaiageo.la gaiageo.la
GAIAGEO_COMMON_SOURCES = gg_advanced.c \
	gg_endian.c \
	gg_geodesic.c \
	gg_geometries.c \
	gg_geoscvt.c \
	gg_relations.c \
	gg_relations_ext.c \
	gg_lwgeom.c \
	gg_extras.c \
	gg_shape.c \
	gg_transform.c \
	gg_wkb.c \
	gg_wkt.c \
	gg_vanuatu.c \
	gg_ewkt.c \
................................................................................
	gg_gml.c \
	gg_voronoj.c \
	gg_xml.c \
	gg_matrix.c

libgaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)
gaiageo_la_SOURCES = $(GAIAGEO_COMMON_SOURCES)
gaiageo_la_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION

gaiageo_la_LDFLAGS = -module
gaiageo_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
EXTRA_DIST = Ewkt.h Ewkt.c lex.Ewkt.c \
	geoJSON.h geoJSON.c lex.GeoJson.c \
	Gml.h Gml.c lex.Gml.c \
	Kml.h Kml.c lex.Kml.c \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_extras.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geoJSON.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geodesic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geometries.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_geoscvt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_gml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_kml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_lwgeom.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_matrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_relations.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_relations_ext.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_shape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_transform.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_vanuatu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_voronoj.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_wkb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_wkt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaiageo_la-gg_xml.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_extras.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geoJSON.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geodesic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geometries.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_geoscvt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_gml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_kml.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_lwgeom.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_matrix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_relations.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_relations_ext.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_shape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_transform.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_vanuatu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_voronoj.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_wkb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_wkt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gg_xml.Plo@am__quote@
................................................................................
gaiageo_la-gg_relations_ext.lo: gg_relations_ext.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gaiageo_la-gg_relations_ext.lo -MD -MP -MF $(DEPDIR)/gaiageo_la-gg_relations_ext.Tpo -c -o gaiageo_la-gg_relations_ext.lo `test -f 'gg_relations_ext.c' || echo '$(srcdir)/'`gg_relations_ext.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gaiageo_la-gg_relations_ext.Tpo $(DEPDIR)/gaiageo_la-gg_relations_ext.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_relations_ext.c' object='gaiageo_la-gg_relations_ext.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gaiageo_la-gg_relations_ext.lo `test -f 'gg_relations_ext.c' || echo '$(srcdir)/'`gg_relations_ext.c

gaiageo_la-gg_lwgeom.lo: gg_lwgeom.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gaiageo_la-gg_lwgeom.lo -MD -MP -MF $(DEPDIR)/gaiageo_la-gg_lwgeom.Tpo -c -o gaiageo_la-gg_lwgeom.lo `test -f 'gg_lwgeom.c' || echo '$(srcdir)/'`gg_lwgeom.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gaiageo_la-gg_lwgeom.Tpo $(DEPDIR)/gaiageo_la-gg_lwgeom.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_lwgeom.c' object='gaiageo_la-gg_lwgeom.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gaiageo_la-gg_lwgeom.lo `test -f 'gg_lwgeom.c' || echo '$(srcdir)/'`gg_lwgeom.c

gaiageo_la-gg_extras.lo: gg_extras.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT gaiageo_la-gg_extras.lo -MD -MP -MF $(DEPDIR)/gaiageo_la-gg_extras.Tpo -c -o gaiageo_la-gg_extras.lo `test -f 'gg_extras.c' || echo '$(srcdir)/'`gg_extras.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/gaiageo_la-gg_extras.Tpo $(DEPDIR)/gaiageo_la-gg_extras.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gg_extras.c' object='gaiageo_la-gg_extras.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(gaiageo_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(gaiageo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gaiageo_la-gg_extras.lo `test -f 'gg_extras.c' || echo '$(srcdir)/'`gg_extras.c
................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/gaiageo/flex/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
265
266
267
268
269
270
271

272
273
274
275
276
277
278
...
439
440
441
442
443
444
445
446
447
448
449
450
451
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo/flex

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/flex/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/flex/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
429
430
431
432
433
434
435


436
437
438
439
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo/flex
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/flex/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/flex/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/gaiageo/flex/ReadMe.txt.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
...
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....

3.2) IMPORTANT NOTICE: to avoid duplicated link symbols
you should carefully check the generated *.c  code,
replacing these two function definitions:
void ParseInit(void *yypParser)
void ParseFinalize(void *p)
with:
static void ParseInit(void *yypParser)
static void ParseFinalize(void *p)

3.3) now you should copy this file into the parent dir:
cp lex.VanuatuWkt.c ..




The EWKT lexer:
================
................................................................................
flex -L ewktLexer.l

3) a source file named "lex.Ewkt.c" will be
generated during the above step.

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
void ParseFinalize()
with:
spatialite_e(.....

3.2) IMPORTANT NOTICE: to avoid duplicated link symbols
you should carefully check the generated *.c  code,
replacing these two function definitions:
void ParseInit(void *yypParser)
void ParseFinalize(void *p)
with:
static void ParseInit(void *yypParser)
static void ParseFinalize(void *p)

3.3) now you should copy this file into the parent dir:
cp lex.Ewkt.c ..




The GeoJSON lexer:
================
................................................................................

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....

3.2) IMPORTANT NOTICE: to avoid duplicated link symbols
you should carefully check the generated *.c  code,
replacing these two function definitions:
void ParseInit(void *yypParser)
void ParseFinalize(void *p)
with:
static void ParseInit(void *yypParser)
static void ParseFinalize(void *p)

3.3) now you should copy this file into the parent dir:
cp lex.geoJsonLexer.c ..




The KML lexer:
================
................................................................................

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....

3.2) IMPORTANT NOTICE: to avoid duplicated link symbols
you should carefully check the generated *.c  code,
replacing these two function definitions:
void ParseInit(void *yypParser)
void ParseFinalize(void *p)
with:
static void ParseInit(void *yypParser)
static void ParseFinalize(void *p)

3.3) now you should copy this file into the parent dir:
cp lex.Kml.c ..




The GML lexer:
================
................................................................................

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....

3.2) IMPORTANT NOTICE: to avoid duplicated link symbols
you should carefully check the generated *.c  code,
replacing these two function definitions:
void ParseInit(void *yypParser)
void ParseFinalize(void *p)
with:
static void ParseInit(void *yypParser)
static void ParseFinalize(void *p)

3.3) now you should copy this file into the parent dir:
cp lex.Gml.c ..







<
<
<
<
<
<
<
<
<
|







 







|



<
<
<
<
<
<
<
<
<
|







 







<
<
<
<
<
<
<
<
<
|







 







<
<
<
<
<
<
<
<
<
|







 







<
<
<
<
<
<
<
<
<
|

12
13
14
15
16
17
18









19
20
21
22
23
24
25
26
..
32
33
34
35
36
37
38
39
40
41
42









43
44
45
46
47
48
49
50
..
60
61
62
63
64
65
66









67
68
69
70
71
72
73
74
..
84
85
86
87
88
89
90









91
92
93
94
95
96
97
98
...
108
109
110
111
112
113
114









115
116

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....










3.2) now you should copy this file into the parent dir:
cp lex.VanuatuWkt.c ..




The EWKT lexer:
================
................................................................................
flex -L ewktLexer.l

3) a source file named "lex.Ewkt.c" will be
generated during the above step.

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....










3.2) now you should copy this file into the parent dir:
cp lex.Ewkt.c ..




The GeoJSON lexer:
================
................................................................................

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....










3.2) now you should copy this file into the parent dir:
cp lex.geoJsonLexer.c ..




The KML lexer:
================
................................................................................

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....










3.2) now you should copy this file into the parent dir:
cp lex.Kml.c ..




The GML lexer:
================
................................................................................

3.1) IMPORTANT NOTICE: carefully check the generated *.c 
code; you should manually replace any occurrence of:
fprintf(stderr, .....
with:
spatialite_e(.....










3.2) now you should copy this file into the parent dir:
cp lex.Gml.c ..

Changes to src/gaiageo/flex/ewktLexer.l.

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
*  What Flex will do is, For the input string, beginning from the front, Flex
*  will try to match with any of the defined tokens from below.  Flex will 
*  then match the string of longest length.  Suppose the string is: POINTM,
*  Flex would match both POINT and POINTM, but since POINTM is the longer
*  of the two tokens, FLEX will match POINTM.
*/
%%
-?[0-9]+|-?[0-9]+"."[0-9]*|"+"?[0-9]+|"+"?[0-9]+"."[0-9]*|-?[0-9]+[eE]-?[0-9]*|-?[0-9]+[eE]"+"[0-9]*|"+"?[0-9]+[eE]-?[0-9]*|"+"?[0-9]+[eE]"+"[0-9]*|-?[0-9]+"."[0-9]+[eE]-?[0-9]*|-?[0-9]+"."[0-9]+[eE]"+"?[0-9]*|"+"?[0-9]+"."[0-9]+[eE]-?[0-9]*|"+"?[0-9]+"."[0-9]+[eE]"+"?[0-9]*|-?"."[0-9]+[eE]-?[0-9]*|-?"."[0-9]+[eE]"+"?[0-9]*|"+"?"."[0-9]+[eE]-?[0-9]*|"+"?"."[0-9]+[eE]"+"?[0-9]*|-?"."[0-9]*|"+"?"."[0-9]*       	{ Ewktget_extra(yyscanner)->ewkt_col += (int) strlen(yytext);  Ewktget_extra(yyscanner)->EwktLval.dval = atof(yytext); return EWKT_NUM; }
","				{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_COMMA; }
"("				{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_OPEN_BRACKET; }
")"				{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_CLOSE_BRACKET; }
(?i:"point")			{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POINT; }
(?i:"pointm")			{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POINT_M; }
(?i:"linestring")		{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_LINESTRING; }
(?i:"linestringm")		{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_LINESTRING_M; }







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
*  What Flex will do is, For the input string, beginning from the front, Flex
*  will try to match with any of the defined tokens from below.  Flex will 
*  then match the string of longest length.  Suppose the string is: POINTM,
*  Flex would match both POINT and POINTM, but since POINTM is the longer
*  of the two tokens, FLEX will match POINTM.
*/
%%
-?[0-9]+|-?[0-9]+"."[0-9]*|"+"?[0-9]+|"+"?[0-9]+"."[0-9]*       	{ Ewktget_extra(yyscanner)->ewkt_col += (int) strlen(yytext);  Ewktget_extra(yyscanner)->EwktLval.dval = atof(yytext); return EWKT_NUM; }
","				{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_COMMA; }
"("				{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_OPEN_BRACKET; }
")"				{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_CLOSE_BRACKET; }
(?i:"point")			{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POINT; }
(?i:"pointm")			{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POINT_M; }
(?i:"linestring")		{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_LINESTRING; }
(?i:"linestringm")		{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_LINESTRING_M; }

Changes to src/gaiageo/flex/geoJsonLexer.l.

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
*  What Flex will do is, For the input string, beginning from the front, Flex
*  will try to match with any of the defined tokens from below.  Flex will 
*  then match the string of longest length.  Suppose the string is: POINTM,
*  Flex would match both POINT and POINTM, but since POINTM is the longer
*  of the two tokens, FLEX will match POINTM.
*/
%%
-?[0-9]+|-?[0-9]+"."[0-9]*|"+"?[0-9]+|"+"?[0-9]+"."[0-9]*|-?[0-9]+[eE]-?[0-9]*|-?[0-9]+[eE]"+"[0-9]*|"+"?[0-9]+[eE]-?[0-9]*|"+"?[0-9]+[eE]"+"[0-9]*|-?[0-9]+"."[0-9]+[eE]-?[0-9]*|-?[0-9]+"."[0-9]+[eE]"+"?[0-9]*|"+"?[0-9]+"."[0-9]+[eE]-?[0-9]*|"+"?[0-9]+"."[0-9]+[eE]"+"?[0-9]*|-?"."[0-9]+[eE]-?[0-9]*|-?"."[0-9]+[eE]"+"?[0-9]*|"+"?"."[0-9]+[eE]-?[0-9]*|"+"?"."[0-9]+[eE]"+"?[0-9]*|-?"."[0-9]*|"+"?"."[0-9]*      { GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = atof(yytext); return GEOJSON_NUM; }
-?"\""EPSG:-?[0-9]+"\""					{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.ival = atoi(yytext+6); return GEOJSON_SHORT_SRID; }
-?"\""urn:ogc:def:crs:EPSG:-?[0-9]+"\""	{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.ival = atoi(yytext+22); return GEOJSON_LONG_SRID; }
","					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COMMA; }
":"					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COLON; }
"{"					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_OPEN_BRACE; }
"}"					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_CLOSE_BRACE; }
"["					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_OPEN_BRACKET; }







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
*  What Flex will do is, For the input string, beginning from the front, Flex
*  will try to match with any of the defined tokens from below.  Flex will 
*  then match the string of longest length.  Suppose the string is: POINTM,
*  Flex would match both POINT and POINTM, but since POINTM is the longer
*  of the two tokens, FLEX will match POINTM.
*/
%%
-?[0-9]+|-?[0-9]+"."[0-9]*|"+"?[0-9]+|"+"?[0-9]+"."[0-9]*      { GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = atof(yytext); return GEOJSON_NUM; }
-?"\""EPSG:-?[0-9]+"\""					{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.ival = atoi(yytext+6); return GEOJSON_SHORT_SRID; }
-?"\""urn:ogc:def:crs:EPSG:-?[0-9]+"\""	{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.ival = atoi(yytext+22); return GEOJSON_LONG_SRID; }
","					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COMMA; }
":"					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COLON; }
"{"					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_OPEN_BRACE; }
"}"					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_CLOSE_BRACE; }
"["					{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_OPEN_BRACKET; }

Changes to src/gaiageo/flex/gmlLexer.l.

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
*  of the two tokens, FLEX will match POINTM.
*/
%%
"/"				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_END; }
"="				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_EQ; }
"<"				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_OPEN; }
">"				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_CLOSE; }
[0-9Ee,\.\+\-]*		{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_COORD; }
\"[^<>\"]*\"			{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_VALUE; }
[a-zA-Z_][a-zA-Z_:0-9]*		{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_KEYWORD; }

[ \t]   { gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col += (int) strlen(yytext); }               /* ignore but count white space */

\n      { gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col = 0; Gmlget_extra(yyscanner)->gml_line++; }








|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
*  of the two tokens, FLEX will match POINTM.
*/
%%
"/"				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_END; }
"="				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_EQ; }
"<"				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_OPEN; }
">"				{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_CLOSE; }
[0-9,\.\+-]*			{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_COORD; }
\"[^<>\"]*\"			{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_VALUE; }
[a-zA-Z_][a-zA-Z_:0-9]*		{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_KEYWORD; }

[ \t]   { gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col += (int) strlen(yytext); }               /* ignore but count white space */

\n      { gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col = 0; Gmlget_extra(yyscanner)->gml_line++; }

Changes to src/gaiageo/flex/kmlLexer.l.

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
*  of the two tokens, FLEX will match POINTM.
*/
%%
"/"				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_END; }
"="				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_EQ; }
"<"				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_OPEN; }
">"				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_CLOSE; }
[0-9Ee,\.\+\-]*			{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_COORD; }
\"[^<>\"]*\"			{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_VALUE; }
[a-zA-Z_][a-zA-Z_:0-9]*		{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_KEYWORD; }

[ \t]   { kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col += (int) strlen(yytext); }               /* ignore but count white space */

\n      { kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col = 0; Kmlget_extra(yyscanner)->kml_line++; }








|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
*  of the two tokens, FLEX will match POINTM.
*/
%%
"/"				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_END; }
"="				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_EQ; }
"<"				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_OPEN; }
">"				{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_CLOSE; }
[0-9,\.\+-]*			{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_COORD; }
\"[^<>\"]*\"			{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_VALUE; }
[a-zA-Z_][a-zA-Z_:0-9]*		{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_KEYWORD; }

[ \t]   { kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col += (int) strlen(yytext); }               /* ignore but count white space */

\n      { kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col = 0; Kmlget_extra(yyscanner)->kml_line++; }

Changes to src/gaiageo/flex/vanuatuLexer.l.

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
*  What Flex will do is, For the input string, beginning from the front, Flex
*  will try to match with any of the defined tokens from below.  Flex will 
*  then match the string of longest length.  Suppose the string is: POINT ZM,
*  Flex would match both POINT Z and POINT ZM, but since POINT ZM is the longer
*  of the two tokens, FLEX will match POINT ZM.
*/
%%
-?[0-9]+|-?[0-9]+"."[0-9]*|"+"?[0-9]+|"+"?[0-9]+"."[0-9]*|-?[0-9]+[eE]-?[0-9]*|-?[0-9]+[eE]"+"[0-9]*|"+"?[0-9]+[eE]-?[0-9]*|"+"?[0-9]+[eE]"+"[0-9]*|-?[0-9]+"."[0-9]+[eE]-?[0-9]*|-?[0-9]+"."[0-9]+[eE]"+"?[0-9]*|"+"?[0-9]+"."[0-9]+[eE]-?[0-9]*|"+"?[0-9]+"."[0-9]+[eE]"+"?[0-9]*|-?"."[0-9]+[eE]-?[0-9]*|-?"."[0-9]+[eE]"+"?[0-9]*|"+"?"."[0-9]+[eE]-?[0-9]*|"+"?"."[0-9]+[eE]"+"?[0-9]*|-?"."[0-9]*|"+"?"."[0-9]*      	{ VanuatuWktget_extra(yyscanner)->vanuatu_col += (int) strlen(yytext);  VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = atof(yytext); return VANUATU_NUM; }
","					{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_COMMA; }
"("					{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_OPEN_BRACKET; }
")"					{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_CLOSE_BRACKET; }
(?i:"point")				{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT; }
(?i:"point"[ \t\n]*"z")			{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_Z; }
(?i:"point"[ \t\n]*"m")			{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_M; }
(?i:"point"[ \t\n]*"zm")		{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_ZM; }







|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
*  What Flex will do is, For the input string, beginning from the front, Flex
*  will try to match with any of the defined tokens from below.  Flex will 
*  then match the string of longest length.  Suppose the string is: POINT ZM,
*  Flex would match both POINT Z and POINT ZM, but since POINT ZM is the longer
*  of the two tokens, FLEX will match POINT ZM.
*/
%%
-?[0-9]+|-?[0-9]+"."[0-9]*|"+"?[0-9]+|"+"?[0-9]+"."[0-9]*       	{ VanuatuWktget_extra(yyscanner)->vanuatu_col += (int) strlen(yytext);  VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = atof(yytext); return VANUATU_NUM; }
","					{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_COMMA; }
"("					{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_OPEN_BRACKET; }
")"					{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_CLOSE_BRACKET; }
(?i:"point")				{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT; }
(?i:"point"[ \t\n]*"z")			{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_Z; }
(?i:"point"[ \t\n]*"m")			{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_M; }
(?i:"point"[ \t\n]*"zm")		{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_ZM; }

Changes to src/gaiageo/geoJSON.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160


161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490














491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
...
512
513
514
515
516
517
518
519
520
521
522
523
524
525


526
527
528
529
530
531
532
533
534
535
536


537
538

539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
...
572
573
574
575
576
577
578

579

580
581

582

583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136




1137
1138
1139
1140
1141


1142
1143
1144


1145
1146
1147
1148

1149
1150
1151


1152
1153
1154


1155
1156
1157
1158

1159
1160
1161
1162
1163
1164
1165
1166
1167


1168

1169
1170

1171
1172
1173
1174


1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839

























































































































































































































































































































































































































































1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850


1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870


1871
1872
1873
1874


1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
....
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912


1913
1914
1915
1916
1917
1918
1919
1920
1921
1922

1923
1924
1925

1926







1927







1928
1929
1930
1931
1932
1933
1934


1935
1936
1937
1938
1939
1940
1941
1942
1943

1944
1945
1946
1947
1948
1949




1950
1951
1952
1953
1954
1955
1956





1957

1958
1959
1960
1961
1962
1963
1964
1965


1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989


1990
1991
1992

1993
1994

1995
1996
1997
1998
1999

2000

2001
2002


2003

2004
2005
2006
2007


2008
2009
2010



2011
2012
2013
2014
2015
2016

2017
2018




2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032


2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046


2047
2048
2049

2050

2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071

2072
2073
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/

/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions


*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 84
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE void *
typedef union {

  int yyinit;
  ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct geoJson_data *p_data ;
#define ParseARG_PDECL , struct geoJson_data *p_data 
#define ParseARG_FETCH  struct geoJson_data *p_data  = yypParser->p_data 
#define ParseARG_STORE yypParser->p_data  = p_data 
#define YYNSTATE             532
#define YYNRULE              159
#define YYNTOKEN             25
#define YY_MAX_SHIFT         531
#define YY_MIN_SHIFTREDUCE   679
#define YY_MAX_SHIFTREDUCE   837
#define YY_ERROR_ACTION      838


#define YY_ACCEPT_ACTION     839
#define YY_NO_ACTION         840
#define YY_MIN_REDUCE        841
#define YY_MAX_REDUCE        999
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if

** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.


**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.

**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (820)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   531,  531,  531,  841,  842,  843,  844,  845,  846,  847,
 /*    10 */   848,  849,  850,  851,  852,  853,  854,  528,  104,  219,
 /*    20 */    97,   96,   95,  189,   88,   87,  994,  514,  530,    2,
 /*    30 */   473,  428,  381,  342,  303,  264,   95,  709,   88,   87,
 /*    40 */    94,  217,   93,   92,  103,  233,  102,  101,  104,   86,
 /*    50 */    97,   96,  258,  244,  214,  211,  208,  968,  229,  225,
 /*    60 */   839,    1,  302,  235,  297,  254,  250,  289,  263,  139,
 /*    70 */   341,  131,  336,  201,  380,  328,  375,  514,  427,  367,
 /*    80 */   414,  242,  472,  406,  461,  514,  527,  453,  522,  710,
 /*    90 */   711,  511,  477,  475,  185,  184,  193,  192,  197,  196,
 /*   100 */   260,  205,  204,  207,  195,  247,  222,  251,  226,  275,
 /*   110 */   255,  272,  238,  237,  230,  266,  265,  469,  274,  273,
 /*   120 */   270,  465,  278,  277,  514,  287,  282,  284,  286,  285,
 /*   130 */   514,  288,  276,  295,  486,  291,  290,  514,  113,  109,
 /*   140 */   309,   63,  305,  304,  514,  301,  300,  313,  312,  321,
 /*   150 */   317,  316,   74,  514,  325,  324,  327,  315,  330,  329,
 /*   160 */   334,  121,  117,  157,  514,  340,  339,  344,  343,  348,
 /*   170 */   352,  351,  220,  514,  356,  355,  360,  221,  364,  363,
 /*   180 */   514,  366,  354,  369,  368,  373,  123,  379,  378,  514,
 /*   190 */   122,  387,  399,  383,  382,  514,  514,  391,  390,   29,
 /*   200 */   395,  394,  405,  393,  403,  402,  408,  407,  412,    4,
 /*   210 */   423,   40,  514,  434,  418,  426,  425,  514,  430,  429,
 /*   220 */   107,  438,  437,  442,  441,  446,  450,  449,   51,  514,
 /*   230 */   452,  440,  455,  454,  459,  471,  470,  488,  514,  492,
 /*   240 */   496,  487,  500,  514,  495,  504,  499,  508,   62,  514,
 /*   250 */   191,  507,  510,  498,  516,  203,  222,  520,  515,  526,
 /*   260 */   314,  514,  311,  525,    3,  194,  326,  353,  323,  350,
 /*   270 */   206,  365,  115,  362,  392,  404,  389,  401,  439,  451,
 /*   280 */   436,  448,  497,  509,  494,  506,  155,  226,  144,  230,
 /*   290 */     5,  707,  987,  986,  247,  985,  236,  245,  246,  111,
 /*   300 */   119,  150,  251,  255,  980,  979,  978,    6,  261,  262,
 /*   310 */   108,  961,  129,  131,  106,  298,  112,  137,  116,  958,
 /*   320 */   139,  299,  110,  943,  120,  114,  465,  469,  118,  141,
 /*   330 */   147,  337,  377,  940,  130,  376,  911,  338,  138,  415,
 /*   340 */   420,  125,  416,  417,  418,  419,  133,  124,  908,  463,
 /*   350 */   421,  422,  140,  423,  877,  132,  811,  805,  424,    8,
 /*   360 */   146,  464,  142,  462,  148,  186,  187,  875,  188,  466,
 /*   370 */   467,  468,  999,    9,  190,  512,  513,  523,  169,  183,
 /*   380 */   524,  809,  803,  810,   10,  804,   11,  199,  198,  200,
 /*   390 */   202,  170,  808,   12,   13,  802,   14,   15,  209,   16,
 /*   400 */   210,   17,  478,  212,  213,  218,  215,  216,  159,  482,
 /*   410 */   840,  821,   89,  224,  831,  840,  820,  829,   90,  223,
 /*   420 */   227,  228,   91,  483,  160,  827,  231,  232,  234,  840,
 /*   430 */   490,  807,   18,  819,  801,  240,  840,  243,  840,  840,
 /*   440 */   840,   77,   98,  241,   19,  840,  814,  813,  181,   99,
 /*   450 */   248,  239,  830,  249,  840,  502,  828,  252,  253,  826,
 /*   460 */   256,  100,  800,  161,  257,  259,   80,  105,  840,  793,
 /*   470 */   162,  812,   20,  787,  840,  701,   21,  267,  268,  171,
 /*   480 */   280,  271,  269,  840,  695,  283,  791,  785,  792,   81,
 /*   490 */   786,   22,   23,  292,  281,  840,  279,   25,  296,  840,
 /*   500 */   790,   24,  840,  784,  172,   26,  840,  788,  294,   27,
 /*   510 */   789,  840,  783,  840,  163,  840,  293,  797,  840,   28,
 /*   520 */   840,  782,  794,  775,   30,  769,   31,  840,  840,  308,
 /*   530 */   306,  307,  173,  319,   32,  310,  840,  840,  773,   33,
 /*   540 */   767,  774,  840,   34,  768,  320,  322,  318,  840,  840,
 /*   550 */    36,   35,  772,  766,  174,   37,  840,   39,   38,  840,
 /*   560 */   771,  765,  331,  840,  840,  332,  335,  333,  840,  779,
 /*   570 */   840,  770,  776,  164,  764,  345,   41,  840,  761,   42,
 /*   580 */   346,  755,  840,  840,  349,  759,  840,  347,  357,   43,
 /*   590 */   753,  175,   44,  840,  760,   45,  840,  840,  754,  358,
 /*   600 */   359,  176,   46,  361,  758,   47,   48,  840,  752,   49,
 /*   610 */   840,  757,  751,  370,  840,  371,  374,  840,  372,  840,
 /*   620 */    50,   52,  165,  840,  763,  762,  840,  756,  840,  750,
 /*   630 */   741,  735,   53,  384,  840,   54,  385,  388,   55,  840,
 /*   640 */   739,  840,  386,  177,  733,   56,  740,  734,  840,  840,
 /*   650 */   396,  397,  400,  178,  840,  398,   57,   58,   59,  738,
 /*   660 */   732,  840,   60,  840,  737,  731,  409,  410,  840,  413,
 /*   670 */   840,  411,  840,   61,  126,  736,  127,  747,  128,  840,
 /*   680 */    64,  840,  840,  134,  135,  743,  744,  730,  840,  727,
 /*   690 */   136,  840,  166,  840,   65,  721,  742,  840,  431,  432,
 /*   700 */   435,  840,  481,   67,  840,  840,  433,   66,  725,  719,
 /*   710 */   179,  704,  840,   68,  840,  726,  720,  443,  840,  489,
 /*   720 */   444,  447,  445,  840,  180,  840,   69,   70,  702,  724,
 /*   730 */   718,   71,  840,  723,   72,  840,  717,  696,  456,  840,
 /*   740 */   457,  460,   78,  458,  840,   73,  840,  155,  143,  840,
 /*   750 */   729,  703,  145,   75,  840,  728,   79,  149,  840,  707,
 /*   760 */   167,  722,  151,  840,  501,  840,  716,  840,  706,  474,
 /*   770 */   705,  476,  479,    7,  840,  480,  484,  485,  491,  840,
 /*   780 */    76,  698,  493,  840,  840,  697,  505,  182,  840,  152,
 /*   790 */   503,   82,  153,  840,  154,  840,   83,  840,  700,  694,
 /*   800 */   517,  518,  840,  840,  521,  840,  840,  840,  519,   84,
 /*   810 */   699,  156,  708,  840,   85,  158,  529,  693,  168,  834,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    28,   29,   30,   31,   32,   33,   34,   35,   36,   37,
 /*    10 */    38,   39,   40,   41,   42,   43,   44,    5,   75,    2,
 /*    20 */    77,   78,   79,   46,   81,   82,    0,   50,    2,   10,
 /*    30 */    18,   19,   20,   21,   22,   23,   79,   15,   81,   82,
 /*    40 */    79,    5,   81,   82,   75,    5,   77,   78,   75,   23,
 /*    50 */    77,   78,    5,    9,   18,   19,   12,   74,   18,   19,
 /*    60 */    26,   27,    7,    2,    9,   18,   19,   12,   24,   59,
 /*    70 */     7,   61,    9,   46,    7,   12,    9,   50,    7,   12,
 /*    80 */     9,   46,    7,   12,    9,   50,    7,   12,    9,   16,
 /*    90 */    17,   12,   51,   52,   73,   74,   73,   74,   73,   74,
 /*   100 */     2,   73,   74,   47,   48,   57,   58,   55,   56,    7,
 /*   110 */    45,    9,   73,   74,   49,   69,   70,   45,   69,   70,
 /*   120 */    46,   49,   69,   70,   50,    7,   46,    9,   69,   70,
 /*   130 */    50,   47,   48,   46,    2,   69,   70,   50,   57,   58,
 /*   140 */    46,   10,   65,   66,   50,   69,   70,   65,   66,   46,
 /*   150 */    65,   66,   10,   50,   65,   66,   47,   48,   65,   66,
 /*   160 */    46,   55,   56,   10,   50,   65,   66,   63,   64,   46,
 /*   170 */    63,   64,   80,   50,   63,   64,   46,   80,   63,   64,
 /*   180 */    50,   47,   48,   63,   64,   46,   45,   63,   64,   50,
 /*   190 */    49,   46,   46,   57,   58,   50,   50,   57,   58,   10,
 /*   200 */    57,   58,   47,   48,   57,   58,   57,   58,   46,    6,
 /*   210 */    45,   10,   50,   46,   49,   57,   58,   50,   55,   56,
 /*   220 */    10,   55,   56,   55,   56,   46,   55,   56,   10,   50,
 /*   230 */    47,   48,   55,   56,   46,   55,   56,   45,   50,   46,
 /*   240 */    45,   49,   45,   50,   49,   46,   49,   45,   10,   50,
 /*   250 */     9,   49,   47,   48,   45,    9,   58,   46,   49,   45,
 /*   260 */     7,   50,    9,   49,   10,   24,    7,    7,    9,    9,
 /*   270 */    24,    7,   10,    9,    7,    7,    9,    9,    7,    7,
 /*   280 */     9,    9,    7,    7,    9,    9,    6,   56,   10,   49,
 /*   290 */     6,   11,   80,   80,   57,   80,   80,   76,   76,   10,
 /*   300 */    10,   10,   55,   45,   76,   76,   76,   10,   76,   73,
 /*   310 */     6,   72,   10,   61,   58,   72,    6,   10,    6,   71,
 /*   320 */    59,   71,   57,   68,    6,   56,   49,   45,   55,    6,
 /*   330 */     6,   68,   53,   67,    6,   54,   62,   67,    6,   54,
 /*   340 */    53,   49,   49,   49,   49,   62,   45,   61,   60,   50,
 /*   350 */    45,   45,   49,   45,   54,   59,    8,    8,   60,    4,
 /*   360 */    45,   50,   49,   54,   45,   24,    6,   53,   11,   53,
 /*   370 */    50,   50,   50,   10,    4,   50,   50,   50,    6,   50,
 /*   380 */    50,    8,    8,    8,    4,    8,    4,    6,   24,   11,
 /*   390 */     4,    6,    8,   10,    4,    8,    4,    4,    7,    4,
 /*   400 */     6,    4,   13,    7,    6,    3,    7,    6,    4,    6,
 /*   410 */    83,   11,    4,    6,    8,   83,   11,    8,    4,    7,
 /*   420 */     7,    6,    4,   13,    4,    8,    7,    6,    3,   83,
 /*   430 */     6,    8,    4,   11,    8,    6,   83,    4,   83,   83,
 /*   440 */    83,   10,    4,   11,   10,   83,   11,   11,    6,    4,
 /*   450 */     7,   24,    8,    6,   83,    6,    8,    7,    6,    8,
 /*   460 */     7,    4,    8,    4,    6,    3,   10,    4,   83,    8,
 /*   470 */     6,   11,    4,    8,   83,    8,   10,    7,    6,    6,
 /*   480 */     6,    4,   11,   83,    8,    4,    8,    8,    8,    4,
 /*   490 */     8,    4,    4,    7,   11,   83,    7,    4,    4,   83,
 /*   500 */     8,   10,   83,    8,    6,    4,   83,    8,   11,    4,
 /*   510 */     8,   83,    8,   83,    6,   83,    6,   11,   83,   10,
 /*   520 */    83,    8,   11,    8,    4,    8,    4,   83,   83,   11,
 /*   530 */     7,    6,    6,    6,   10,    4,   83,   83,    8,    4,
 /*   540 */     8,    8,   83,    4,    8,   11,    4,    7,   83,   83,
 /*   550 */     4,   10,    8,    8,    6,    4,   83,   10,    4,   83,
 /*   560 */     8,    8,    7,   83,   83,    6,    4,   11,   83,   11,
 /*   570 */    83,    8,   11,    6,    8,    7,    4,   83,    8,    4,
 /*   580 */     6,    8,   83,   83,    4,    8,   83,   11,    7,   10,
 /*   590 */     8,    6,    4,   83,    8,    4,   83,   83,    8,    6,
 /*   600 */    11,    6,   10,    4,    8,    4,    4,   83,    8,    4,
 /*   610 */    83,    8,    8,    7,   83,    6,    4,   83,   11,   83,
 /*   620 */    10,    4,    6,   83,   11,   11,   83,    8,   83,    8,
 /*   630 */     8,    8,    4,    7,   83,   10,    6,    4,    4,   83,
 /*   640 */     8,   83,   11,    6,    8,    4,    8,    8,   83,   83,
 /*   650 */     7,    6,    4,    6,   83,   11,   10,    4,    4,    8,
 /*   660 */     8,   83,    4,   83,    8,    8,    7,    6,   83,    4,
 /*   670 */    83,   11,   83,   10,    6,    8,    6,   11,    6,   83,
 /*   680 */     4,   83,   83,    6,    6,   11,   11,    8,   83,    8,
 /*   690 */     6,   83,    6,   83,    4,    8,   11,   83,    7,    6,
 /*   700 */     4,   83,   14,    4,   83,   83,   11,   10,    8,    8,
 /*   710 */     6,    8,   83,    4,   83,    8,    8,    7,   83,    7,
 /*   720 */     6,    4,   11,   83,    6,   83,   10,    4,    8,    8,
 /*   730 */     8,    4,   83,    8,    4,   83,    8,    8,    7,   83,
 /*   740 */     6,    4,    4,   11,   83,   10,   83,    6,    6,   83,
 /*   750 */    11,    8,    6,    4,   83,   11,    4,    6,   83,   11,
 /*   760 */     6,    8,    6,   83,    7,   83,    8,   83,    8,    8,
 /*   770 */     8,    8,    2,    4,   83,    4,    4,    3,   11,   83,
 /*   780 */     4,    8,    4,   83,   83,    8,    4,    6,   83,    6,
 /*   790 */    11,    4,    6,   83,    6,   83,    4,   83,    8,    8,
 /*   800 */     7,    6,   83,   83,    4,   83,   83,   83,   11,   10,
 /*   810 */     8,    6,   11,   83,    4,    4,    3,    8,    6,    1,
 /*   820 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*   830 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*   840 */    83,   83,   83,   83,   83,
};
#define YY_SHIFT_COUNT    (531)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (818)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */   820,   26,   17,   61,   61,   98,   98,   73,   19,   22,
 /*    10 */    19,   19,   22,   19,  132,  131,  142,  153,   19,   22,
 /*    20 */   189,   22,  189,  189,   22,  189,  132,  189,   22,  131,
 /*    30 */   189,  201,   22,  201,  201,   22,  201,  132,  201,   22,
 /*    40 */   142,  201,  218,   22,  218,  218,   22,  218,  132,  218,
 /*    50 */    22,  153,  218,  131,   22,  131,  131,   22,  131,  132,
 /*    60 */   131,   22,  153,  238,  131,  142,   22,  142,  142,   22,
 /*    70 */   142,  132,  142,   22,  153,  142,  153,   22,  153,  153,
 /*    80 */    22,  153,  132,  153,   22,  153,  254,  203,  203,  210,
 /*    90 */   262,  278,  203,  203,  203,  203,  284,  284,  289,  290,
 /*   100 */   291,  284,  284,  284,  284,  297,  304,  302,  210,  304,
 /*   110 */   310,  307,  289,  310,  312,  278,  262,  312,  318,  291,
 /*   120 */   290,  318,  323,  324,  328,  323,  278,  278,  278,  278,
 /*   130 */   302,  328,  332,  324,  291,  291,  291,  291,  307,  332,
 /*   140 */   323,  278,  323,   22,   22,  278,  324,  291,  324,   22,
 /*   150 */    22,  291,   22,   22,   22,   22,   22,   22,   12,   36,
 /*   160 */    40,   47,   44,   55,   63,   67,   71,   75,   79,  241,
 /*   170 */   246,  102,  118,  253,  259,  260,  264,  267,  268,  271,
 /*   180 */   272,  275,  276,  280,  348,  349,  355,  341,  360,  357,
 /*   190 */   363,  370,  373,  374,  380,  372,  375,  377,  382,  364,
 /*   200 */   381,  378,  383,  386,  384,  387,  390,  385,  392,  393,
 /*   210 */   391,  394,  395,  396,  398,  397,  399,  401,  404,  402,
 /*   220 */   400,  405,  406,  408,  412,  407,  409,  414,  413,  415,
 /*   230 */   417,  418,  419,  421,  420,  425,  422,  423,  426,  428,
 /*   240 */   427,  429,  432,  434,  433,  435,  436,  444,  438,  443,
 /*   250 */   447,  448,  445,  450,  452,  451,  457,  453,  458,  459,
 /*   260 */   462,  460,  454,  463,  464,  461,  465,  468,  470,  472,
 /*   270 */   471,  466,  477,  478,  479,  487,  473,  480,  482,  488,
 /*   280 */   489,  474,  483,  491,  481,  492,  495,  493,  498,  501,
 /*   290 */   502,  504,  505,  486,  510,  497,  509,  494,  506,  511,
 /*   300 */   499,  513,  520,  508,  515,  517,  522,  523,  525,  518,
 /*   310 */   524,  531,  530,  532,  535,  526,  533,  536,  539,  540,
 /*   320 */   527,  534,  541,  542,  544,  545,  546,  548,  551,  552,
 /*   330 */   553,  554,  555,  559,  556,  547,  562,  558,  561,  563,
 /*   340 */   566,  572,  567,  570,  573,  575,  568,  574,  576,  579,
 /*   350 */   580,  577,  582,  588,  585,  586,  590,  591,  581,  593,
 /*   360 */   589,  592,  599,  596,  600,  601,  595,  602,  603,  604,
 /*   370 */   605,  606,  609,  607,  610,  612,  613,  614,  619,  621,
 /*   380 */   617,  616,  622,  623,  628,  626,  630,  631,  625,  633,
 /*   390 */   632,  636,  634,  637,  638,  639,  641,  643,  645,  644,
 /*   400 */   646,  648,  651,  652,  653,  647,  654,  656,  657,  658,
 /*   410 */   659,  661,  660,  663,  665,  666,  668,  670,  672,  674,
 /*   420 */   675,  677,  678,  684,  685,  667,  679,  676,  686,  681,
 /*   430 */   687,  690,  691,  693,  695,  697,  696,  700,  701,  699,
 /*   440 */   704,  707,  708,  709,  710,  714,  711,  716,  717,  721,
 /*   450 */   722,  723,  718,  727,  725,  728,  730,  731,  734,  732,
 /*   460 */   735,  737,  739,  741,  742,  746,  744,  748,  751,  756,
 /*   470 */   753,  758,  749,  754,  760,  761,  762,  763,  769,  389,
 /*   480 */   770,  771,  688,  403,  410,  772,  774,  703,  773,  776,
 /*   490 */   712,  424,  767,  431,  778,  720,  729,  738,  442,  743,
 /*   500 */   777,  752,  757,  449,  779,  456,  782,  467,  476,  485,
 /*   510 */   781,  787,  783,  786,  788,  790,  791,  792,  793,  795,
 /*   520 */   797,  799,  800,  801,  805,  802,  809,  810,  812,  811,
 /*   530 */   813,  818,
};
#define YY_REDUCE_COUNT (157)
#define YY_REDUCE_MIN   (-57)
#define YY_REDUCE_MAX   (330)
static const short yy_reduce_ofst[] = {
 /*     0 */    34,  -28,  -57,  -43,  -39,  -31,  -27,   41,   21,  -23,
 /*    10 */    23,   25,   27,   28,   56,   48,   52,   65,   39,   35,
 /*    20 */    46,   74,   49,   53,   80,   59,   84,   66,   87,   81,
 /*    30 */    76,   77,   94,   82,   85,  103,   89,  109,   93,  114,
 /*    40 */   106,  100,  104,  123,  107,  111,  130,  115,  134,  120,
 /*    50 */   139,  141,  124,  136,  145,  140,  143,  146,  147,  155,
 /*    60 */   149,  162,  165,   10,  158,  163,  167,  166,  168,  179,
 /*    70 */   171,  183,  177,  188,   72,  180,  192,  193,  195,  197,
 /*    80 */   199,  202,  205,  209,  211,  214,  -17,   92,   97,  198,
 /*    90 */   231,  240,  212,  213,  215,  216,  221,  222,  237,  247,
 /*   100 */   258,  228,  229,  230,  232,  236,  239,  252,  256,  243,
 /*   110 */   248,  261,  265,  250,  255,  277,  269,  263,  266,  282,
 /*   120 */   273,  270,  281,  279,  274,  285,  292,  293,  294,  295,
 /*   130 */   286,  283,  288,  287,  301,  305,  306,  308,  296,  298,
 /*   140 */   300,  303,  309,  299,  311,  313,  314,  315,  316,  320,
 /*   150 */   321,  319,  322,  325,  326,  327,  329,  330,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   995,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    10 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    20 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    30 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    40 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    50 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    60 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    70 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*    80 */   838,  838,  838,  838,  838,  838,  838,  984,  984,  838,
 /*    90 */   838,  838,  984,  984,  984,  984,  977,  977,  838,  838,
 /*   100 */   838,  977,  977,  977,  977,  838,  960,  838,  838,  960,
 /*   110 */   957,  838,  838,  957,  942,  838,  838,  942,  939,  838,
 /*   120 */   838,  939,  876,  874,  910,  876,  838,  838,  838,  838,
 /*   130 */   838,  910,  907,  874,  838,  838,  838,  838,  838,  907,
 /*   140 */   876,  838,  876,  838,  838,  838,  874,  838,  874,  838,
 /*   150 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   160 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   170 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   180 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   190 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   200 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   210 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   220 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   230 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   240 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   250 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   260 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   270 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   280 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   290 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   300 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   310 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   320 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   330 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   340 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   350 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   360 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   370 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   380 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   390 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   400 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   410 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   420 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   430 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   440 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   450 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   460 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   470 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   480 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   490 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   500 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   510 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   520 */   838,  838,  838,  838,  838,  838,  838,  838,  838,  838,
 /*   530 */   838,  838,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:














** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */


  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */


#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */

#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/

void ParseTrace(FILE *TraceFILE, char *zTracePrompt){

  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;

  if( yyTraceFILE==0 ) yyTracePrompt = 0;

  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "GEOJSON_NEWLINE",
  /*    2 */ "GEOJSON_OPEN_BRACE",
  /*    3 */ "GEOJSON_TYPE",
  /*    4 */ "GEOJSON_COLON",
  /*    5 */ "GEOJSON_POINT",
  /*    6 */ "GEOJSON_COMMA",
  /*    7 */ "GEOJSON_COORDS",
  /*    8 */ "GEOJSON_CLOSE_BRACE",
  /*    9 */ "GEOJSON_BBOX",
  /*   10 */ "GEOJSON_OPEN_BRACKET",
  /*   11 */ "GEOJSON_CLOSE_BRACKET",
  /*   12 */ "GEOJSON_CRS",
  /*   13 */ "GEOJSON_NAME",
  /*   14 */ "GEOJSON_PROPS",
  /*   15 */ "GEOJSON_NUM",
  /*   16 */ "GEOJSON_SHORT_SRID",
  /*   17 */ "GEOJSON_LONG_SRID",
  /*   18 */ "GEOJSON_LINESTRING",
  /*   19 */ "GEOJSON_POLYGON",
  /*   20 */ "GEOJSON_MULTIPOINT",
  /*   21 */ "GEOJSON_MULTILINESTRING",
  /*   22 */ "GEOJSON_MULTIPOLYGON",
  /*   23 */ "GEOJSON_GEOMETRYCOLLECTION",
  /*   24 */ "GEOJSON_GEOMS",
  /*   25 */ "error",
  /*   26 */ "main",
  /*   27 */ "in",
  /*   28 */ "state",
  /*   29 */ "program",
  /*   30 */ "geo_text",
  /*   31 */ "point",
  /*   32 */ "pointz",
  /*   33 */ "linestring",
  /*   34 */ "linestringz",
  /*   35 */ "polygon",
  /*   36 */ "polygonz",
  /*   37 */ "multipoint",
  /*   38 */ "multipointz",
  /*   39 */ "multilinestring",
  /*   40 */ "multilinestringz",
  /*   41 */ "multipolygon",
  /*   42 */ "multipolygonz",
  /*   43 */ "geocoll",
  /*   44 */ "geocollz",
  /*   45 */ "point_coordxy",
  /*   46 */ "bbox",
  /*   47 */ "short_crs",
  /*   48 */ "long_crs",
  /*   49 */ "point_coordxyz",
  /*   50 */ "coord",
  /*   51 */ "short_srid",
  /*   52 */ "long_srid",
  /*   53 */ "extra_pointsxy",
  /*   54 */ "extra_pointsxyz",
  /*   55 */ "linestring_text",
  /*   56 */ "linestring_textz",
  /*   57 */ "polygon_text",
  /*   58 */ "polygon_textz",
  /*   59 */ "ring",
  /*   60 */ "extra_rings",
  /*   61 */ "ringz",
  /*   62 */ "extra_ringsz",
  /*   63 */ "multipoint_text",
  /*   64 */ "multipoint_textz",
  /*   65 */ "multilinestring_text",
  /*   66 */ "multilinestring_textz",
  /*   67 */ "multilinestring_text2",
  /*   68 */ "multilinestring_textz2",
  /*   69 */ "multipolygon_text",
  /*   70 */ "multipolygon_textz",
  /*   71 */ "multipolygon_text2",
  /*   72 */ "multipolygon_textz2",
  /*   73 */ "geocoll_text",
  /*   74 */ "geocoll_textz",
  /*   75 */ "coll_point",
  /*   76 */ "geocoll_text2",
  /*   77 */ "coll_linestring",
  /*   78 */ "coll_polygon",
  /*   79 */ "coll_pointz",
  /*   80 */ "geocoll_textz2",
  /*   81 */ "coll_linestringz",
  /*   82 */ "coll_polygonz",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "geo_text ::= point",
 /*   1 */ "geo_text ::= pointz",
 /*   2 */ "geo_text ::= linestring",
 /*   3 */ "geo_text ::= linestringz",
 /*   4 */ "geo_text ::= polygon",
 /*   5 */ "geo_text ::= polygonz",
 /*   6 */ "geo_text ::= multipoint",
 /*   7 */ "geo_text ::= multipointz",
 /*   8 */ "geo_text ::= multilinestring",
 /*   9 */ "geo_text ::= multilinestringz",
 /*  10 */ "geo_text ::= multipolygon",
 /*  11 */ "geo_text ::= multipolygonz",
 /*  12 */ "geo_text ::= geocoll",
 /*  13 */ "geo_text ::= geocollz",
 /*  14 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /*  15 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /*  16 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /*  17 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /*  18 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /*  19 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /*  20 */ "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /*  21 */ "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /*  22 */ "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /*  23 */ "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /*  24 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /*  25 */ "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /*  26 */ "short_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON short_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE",
 /*  27 */ "long_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON long_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE",
 /*  28 */ "point_coordxy ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET",
 /*  29 */ "point_coordxyz ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET",
 /*  30 */ "coord ::= GEOJSON_NUM",
 /*  31 */ "short_srid ::= GEOJSON_SHORT_SRID",
 /*  32 */ "long_srid ::= GEOJSON_LONG_SRID",
 /*  33 */ "extra_pointsxy ::=",
 /*  34 */ "extra_pointsxy ::= GEOJSON_COMMA point_coordxy extra_pointsxy",
 /*  35 */ "extra_pointsxyz ::=",
 /*  36 */ "extra_pointsxyz ::= GEOJSON_COMMA point_coordxyz extra_pointsxyz",
 /*  37 */ "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /*  38 */ "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /*  39 */ "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /*  40 */ "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /*  41 */ "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /*  42 */ "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /*  43 */ "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /*  44 */ "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /*  45 */ "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /*  46 */ "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /*  47 */ "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /*  48 */ "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /*  49 */ "linestring_text ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET",
 /*  50 */ "linestring_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET",
 /*  51 */ "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /*  52 */ "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /*  53 */ "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /*  54 */ "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /*  55 */ "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /*  56 */ "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /*  57 */ "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /*  58 */ "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /*  59 */ "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /*  60 */ "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /*  61 */ "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /*  62 */ "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /*  63 */ "polygon_text ::= GEOJSON_OPEN_BRACKET ring extra_rings GEOJSON_CLOSE_BRACKET",
 /*  64 */ "polygon_textz ::= GEOJSON_OPEN_BRACKET ringz extra_ringsz GEOJSON_CLOSE_BRACKET",
 /*  65 */ "ring ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET",
 /*  66 */ "extra_rings ::=",
 /*  67 */ "extra_rings ::= GEOJSON_COMMA ring extra_rings",
 /*  68 */ "ringz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET",
 /*  69 */ "extra_ringsz ::=",
 /*  70 */ "extra_ringsz ::= GEOJSON_COMMA ringz extra_ringsz",
 /*  71 */ "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
 /*  72 */ "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
 /*  73 */ "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
 /*  74 */ "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
 /*  75 */ "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
 /*  76 */ "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
 /*  77 */ "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
 /*  78 */ "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
 /*  79 */ "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
 /*  80 */ "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
 /*  81 */ "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
 /*  82 */ "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
 /*  83 */ "multipoint_text ::= GEOJSON_OPEN_BRACKET point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET",
 /*  84 */ "multipoint_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET",
 /*  85 */ "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
 /*  86 */ "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
 /*  87 */ "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
 /*  88 */ "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
 /*  89 */ "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
 /*  90 */ "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
 /*  91 */ "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
 /*  92 */ "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
 /*  93 */ "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
 /*  94 */ "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
 /*  95 */ "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
 /*  96 */ "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
 /*  97 */ "multilinestring_text ::= GEOJSON_OPEN_BRACKET linestring_text multilinestring_text2 GEOJSON_CLOSE_BRACKET",
 /*  98 */ "multilinestring_text2 ::=",
 /*  99 */ "multilinestring_text2 ::= GEOJSON_COMMA linestring_text multilinestring_text2",
 /* 100 */ "multilinestring_textz ::= GEOJSON_OPEN_BRACKET linestring_textz multilinestring_textz2 GEOJSON_CLOSE_BRACKET",
 /* 101 */ "multilinestring_textz2 ::=",
 /* 102 */ "multilinestring_textz2 ::= GEOJSON_COMMA linestring_textz multilinestring_textz2",
 /* 103 */ "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
 /* 104 */ "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
 /* 105 */ "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
 /* 106 */ "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
 /* 107 */ "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
 /* 108 */ "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
 /* 109 */ "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
 /* 110 */ "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
 /* 111 */ "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
 /* 112 */ "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
 /* 113 */ "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
 /* 114 */ "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
 /* 115 */ "multipolygon_text ::= GEOJSON_OPEN_BRACKET polygon_text multipolygon_text2 GEOJSON_CLOSE_BRACKET",
 /* 116 */ "multipolygon_text2 ::=",
 /* 117 */ "multipolygon_text2 ::= GEOJSON_COMMA polygon_text multipolygon_text2",
 /* 118 */ "multipolygon_textz ::= GEOJSON_OPEN_BRACKET polygon_textz multipolygon_textz2 GEOJSON_CLOSE_BRACKET",
 /* 119 */ "multipolygon_textz2 ::=",
 /* 120 */ "multipolygon_textz2 ::= GEOJSON_COMMA polygon_textz multipolygon_textz2",
 /* 121 */ "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
 /* 122 */ "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
 /* 123 */ "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
 /* 124 */ "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
 /* 125 */ "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
 /* 126 */ "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
 /* 127 */ "geocollz ::= GEOJSON_GEOMETRYCOLLECTION geocoll_textz",
 /* 128 */ "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
 /* 129 */ "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
 /* 130 */ "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
 /* 131 */ "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
 /* 132 */ "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
 /* 133 */ "geocoll_text ::= GEOJSON_OPEN_BRACKET coll_point geocoll_text2 GEOJSON_CLOSE_BRACKET",
 /* 134 */ "geocoll_text ::= GEOJSON_OPEN_BRACKET coll_linestring geocoll_text2 GEOJSON_CLOSE_BRACKET",
 /* 135 */ "geocoll_text ::= GEOJSON_OPEN_BRACKET coll_polygon geocoll_text2 GEOJSON_CLOSE_BRACKET",
 /* 136 */ "geocoll_text2 ::=",
 /* 137 */ "geocoll_text2 ::= GEOJSON_COMMA coll_point geocoll_text2",
 /* 138 */ "geocoll_text2 ::= GEOJSON_COMMA coll_linestring geocoll_text2",
 /* 139 */ "geocoll_text2 ::= GEOJSON_COMMA coll_polygon geocoll_text2",
 /* 140 */ "geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_pointz geocoll_textz2 GEOJSON_CLOSE_BRACKET",
 /* 141 */ "geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_linestringz geocoll_textz2 GEOJSON_CLOSE_BRACKET",
 /* 142 */ "geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_polygonz geocoll_textz2 GEOJSON_CLOSE_BRACKET",
 /* 143 */ "geocoll_textz2 ::=",
 /* 144 */ "geocoll_textz2 ::= GEOJSON_COMMA coll_pointz geocoll_textz2",
 /* 145 */ "geocoll_textz2 ::= GEOJSON_COMMA coll_linestringz geocoll_textz2",
 /* 146 */ "geocoll_textz2 ::= GEOJSON_COMMA coll_polygonz geocoll_textz2",
 /* 147 */ "coll_point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
 /* 148 */ "coll_pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
 /* 149 */ "coll_linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
 /* 150 */ "coll_linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
 /* 151 */ "coll_polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
 /* 152 */ "coll_polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
 /* 153 */ "main ::= in",
 /* 154 */ "in ::=",
 /* 155 */ "in ::= in state GEOJSON_NEWLINE",
 /* 156 */ "state ::= program",
 /* 157 */ "program ::= geo_text",
 /* 158 */ "bbox ::= coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_COMMA coord",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
static void ParseInit(void *yypParser){
  yyParser *pParser = (yyParser*)yypParser;
#ifdef YYTRACKMAXSTACKDEPTH
  pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  pParser->yytos = NULL;
  pParser->yystack = NULL;
  pParser->yystksz = 0;
  if( yyGrowStack(pParser) ){
    pParser->yystack = &pParser->yystk0;
    pParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  pParser->yyerrcnt = -1;
#endif
  pParser->yytos = pParser->yystack;
  pParser->yystack[0].stateno = 0;
  pParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ) ParseInit(pParser);
  return pParser;
}
#endif /* Parse_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
static void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.




*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){


  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){


    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );

#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );


  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){


    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );

  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){


   ParseARG_FETCH;

#ifndef NDEBUG
   if( yyTraceFILE ){

     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);


   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/

     spatialite_e( "Giving up.  Parser stack overflow\n");
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
  {   30,   -1 }, /* (0) geo_text ::= point */
  {   30,   -1 }, /* (1) geo_text ::= pointz */
  {   30,   -1 }, /* (2) geo_text ::= linestring */
  {   30,   -1 }, /* (3) geo_text ::= linestringz */
  {   30,   -1 }, /* (4) geo_text ::= polygon */
  {   30,   -1 }, /* (5) geo_text ::= polygonz */
  {   30,   -1 }, /* (6) geo_text ::= multipoint */
  {   30,   -1 }, /* (7) geo_text ::= multipointz */
  {   30,   -1 }, /* (8) geo_text ::= multilinestring */
  {   30,   -1 }, /* (9) geo_text ::= multilinestringz */
  {   30,   -1 }, /* (10) geo_text ::= multipolygon */
  {   30,   -1 }, /* (11) geo_text ::= multipolygonz */
  {   30,   -1 }, /* (12) geo_text ::= geocoll */
  {   30,   -1 }, /* (13) geo_text ::= geocollz */
  {   31,   -9 }, /* (14) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   31,  -15 }, /* (15) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   31,  -13 }, /* (16) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   31,  -13 }, /* (17) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   31,  -19 }, /* (18) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   31,  -19 }, /* (19) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   32,   -9 }, /* (20) pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   32,  -15 }, /* (21) pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   32,  -13 }, /* (22) pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   32,  -13 }, /* (23) pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   31,  -19 }, /* (24) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   31,  -19 }, /* (25) point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   47,  -13 }, /* (26) short_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON short_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE */
  {   48,  -13 }, /* (27) long_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON long_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE */
  {   45,   -5 }, /* (28) point_coordxy ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET */
  {   49,   -7 }, /* (29) point_coordxyz ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET */
  {   50,   -1 }, /* (30) coord ::= GEOJSON_NUM */
  {   51,   -1 }, /* (31) short_srid ::= GEOJSON_SHORT_SRID */
  {   52,   -1 }, /* (32) long_srid ::= GEOJSON_LONG_SRID */
  {   53,    0 }, /* (33) extra_pointsxy ::= */
  {   53,   -3 }, /* (34) extra_pointsxy ::= GEOJSON_COMMA point_coordxy extra_pointsxy */
  {   54,    0 }, /* (35) extra_pointsxyz ::= */
  {   54,   -3 }, /* (36) extra_pointsxyz ::= GEOJSON_COMMA point_coordxyz extra_pointsxyz */
  {   33,   -9 }, /* (37) linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   33,  -15 }, /* (38) linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   33,  -13 }, /* (39) linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   33,  -13 }, /* (40) linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   33,  -19 }, /* (41) linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   33,  -19 }, /* (42) linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   34,   -9 }, /* (43) linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   34,  -15 }, /* (44) linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   34,  -13 }, /* (45) linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   34,  -13 }, /* (46) linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   34,  -19 }, /* (47) linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   34,  -19 }, /* (48) linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   55,   -6 }, /* (49) linestring_text ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
  {   56,   -6 }, /* (50) linestring_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
  {   35,   -9 }, /* (51) polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   35,  -15 }, /* (52) polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   35,  -13 }, /* (53) polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   35,  -13 }, /* (54) polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   35,  -19 }, /* (55) polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   35,  -19 }, /* (56) polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   36,   -9 }, /* (57) polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   36,  -15 }, /* (58) polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   36,  -13 }, /* (59) polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   36,  -13 }, /* (60) polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   36,  -19 }, /* (61) polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   36,  -19 }, /* (62) polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   57,   -4 }, /* (63) polygon_text ::= GEOJSON_OPEN_BRACKET ring extra_rings GEOJSON_CLOSE_BRACKET */
  {   58,   -4 }, /* (64) polygon_textz ::= GEOJSON_OPEN_BRACKET ringz extra_ringsz GEOJSON_CLOSE_BRACKET */
  {   59,  -10 }, /* (65) ring ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
  {   60,    0 }, /* (66) extra_rings ::= */
  {   60,   -3 }, /* (67) extra_rings ::= GEOJSON_COMMA ring extra_rings */
  {   61,  -10 }, /* (68) ringz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
  {   62,    0 }, /* (69) extra_ringsz ::= */
  {   62,   -3 }, /* (70) extra_ringsz ::= GEOJSON_COMMA ringz extra_ringsz */
  {   37,   -9 }, /* (71) multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
  {   37,  -15 }, /* (72) multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
  {   37,  -13 }, /* (73) multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
  {   37,  -13 }, /* (74) multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
  {   37,  -19 }, /* (75) multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
  {   37,  -19 }, /* (76) multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
  {   38,   -9 }, /* (77) multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
  {   38,  -15 }, /* (78) multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
  {   38,  -13 }, /* (79) multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
  {   38,  -13 }, /* (80) multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
  {   38,  -19 }, /* (81) multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
  {   38,  -19 }, /* (82) multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
  {   63,   -4 }, /* (83) multipoint_text ::= GEOJSON_OPEN_BRACKET point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
  {   64,   -4 }, /* (84) multipoint_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
  {   39,   -9 }, /* (85) multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
  {   39,  -15 }, /* (86) multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
  {   39,  -13 }, /* (87) multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
  {   39,  -13 }, /* (88) multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
  {   39,  -19 }, /* (89) multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
  {   39,  -19 }, /* (90) multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
  {   40,   -9 }, /* (91) multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
  {   40,  -15 }, /* (92) multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
  {   40,  -13 }, /* (93) multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
  {   40,  -13 }, /* (94) multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
  {   40,  -19 }, /* (95) multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
  {   40,  -19 }, /* (96) multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
  {   65,   -4 }, /* (97) multilinestring_text ::= GEOJSON_OPEN_BRACKET linestring_text multilinestring_text2 GEOJSON_CLOSE_BRACKET */
  {   67,    0 }, /* (98) multilinestring_text2 ::= */
  {   67,   -3 }, /* (99) multilinestring_text2 ::= GEOJSON_COMMA linestring_text multilinestring_text2 */
  {   66,   -4 }, /* (100) multilinestring_textz ::= GEOJSON_OPEN_BRACKET linestring_textz multilinestring_textz2 GEOJSON_CLOSE_BRACKET */
  {   68,    0 }, /* (101) multilinestring_textz2 ::= */
  {   68,   -3 }, /* (102) multilinestring_textz2 ::= GEOJSON_COMMA linestring_textz multilinestring_textz2 */
  {   41,   -9 }, /* (103) multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
  {   41,  -15 }, /* (104) multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
  {   41,  -13 }, /* (105) multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
  {   41,  -13 }, /* (106) multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
  {   41,  -19 }, /* (107) multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
  {   41,  -19 }, /* (108) multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
  {   42,   -9 }, /* (109) multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
  {   42,  -15 }, /* (110) multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
  {   42,  -13 }, /* (111) multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
  {   42,  -13 }, /* (112) multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
  {   42,  -19 }, /* (113) multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
  {   42,  -19 }, /* (114) multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
  {   69,   -4 }, /* (115) multipolygon_text ::= GEOJSON_OPEN_BRACKET polygon_text multipolygon_text2 GEOJSON_CLOSE_BRACKET */
  {   71,    0 }, /* (116) multipolygon_text2 ::= */
  {   71,   -3 }, /* (117) multipolygon_text2 ::= GEOJSON_COMMA polygon_text multipolygon_text2 */
  {   70,   -4 }, /* (118) multipolygon_textz ::= GEOJSON_OPEN_BRACKET polygon_textz multipolygon_textz2 GEOJSON_CLOSE_BRACKET */
  {   72,    0 }, /* (119) multipolygon_textz2 ::= */
  {   72,   -3 }, /* (120) multipolygon_textz2 ::= GEOJSON_COMMA polygon_textz multipolygon_textz2 */
  {   43,   -9 }, /* (121) geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
  {   43,  -15 }, /* (122) geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
  {   43,  -13 }, /* (123) geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
  {   43,  -13 }, /* (124) geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
  {   43,  -19 }, /* (125) geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
  {   43,  -19 }, /* (126) geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
  {   44,   -2 }, /* (127) geocollz ::= GEOJSON_GEOMETRYCOLLECTION geocoll_textz */
  {   44,  -15 }, /* (128) geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
  {   44,  -13 }, /* (129) geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
  {   44,  -13 }, /* (130) geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
  {   44,  -19 }, /* (131) geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
  {   44,  -19 }, /* (132) geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
  {   73,   -4 }, /* (133) geocoll_text ::= GEOJSON_OPEN_BRACKET coll_point geocoll_text2 GEOJSON_CLOSE_BRACKET */
  {   73,   -4 }, /* (134) geocoll_text ::= GEOJSON_OPEN_BRACKET coll_linestring geocoll_text2 GEOJSON_CLOSE_BRACKET */
  {   73,   -4 }, /* (135) geocoll_text ::= GEOJSON_OPEN_BRACKET coll_polygon geocoll_text2 GEOJSON_CLOSE_BRACKET */
  {   76,    0 }, /* (136) geocoll_text2 ::= */
  {   76,   -3 }, /* (137) geocoll_text2 ::= GEOJSON_COMMA coll_point geocoll_text2 */
  {   76,   -3 }, /* (138) geocoll_text2 ::= GEOJSON_COMMA coll_linestring geocoll_text2 */
  {   76,   -3 }, /* (139) geocoll_text2 ::= GEOJSON_COMMA coll_polygon geocoll_text2 */
  {   74,   -4 }, /* (140) geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_pointz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
  {   74,   -4 }, /* (141) geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_linestringz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
  {   74,   -4 }, /* (142) geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_polygonz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
  {   80,    0 }, /* (143) geocoll_textz2 ::= */
  {   80,   -3 }, /* (144) geocoll_textz2 ::= GEOJSON_COMMA coll_pointz geocoll_textz2 */
  {   80,   -3 }, /* (145) geocoll_textz2 ::= GEOJSON_COMMA coll_linestringz geocoll_textz2 */
  {   80,   -3 }, /* (146) geocoll_textz2 ::= GEOJSON_COMMA coll_polygonz geocoll_textz2 */
  {   75,   -9 }, /* (147) coll_point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
  {   79,   -9 }, /* (148) coll_pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
  {   77,   -9 }, /* (149) coll_linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
  {   81,   -9 }, /* (150) coll_linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
  {   78,   -9 }, /* (151) coll_polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
  {   82,   -9 }, /* (152) coll_polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
  {   26,   -1 }, /* (153) main ::= in */
  {   27,    0 }, /* (154) in ::= */
  {   27,   -3 }, /* (155) in ::= in state GEOJSON_NEWLINE */
  {   28,   -1 }, /* (156) state ::= program */
  {   29,   -1 }, /* (157) program ::= geo_text */
  {   46,   -7 }, /* (158) bbox ::= coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_COMMA coord */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* geo_text ::= point */
      case 1: /* geo_text ::= pointz */ yytestcase(yyruleno==1);
      case 2: /* geo_text ::= linestring */ yytestcase(yyruleno==2);
      case 3: /* geo_text ::= linestringz */ yytestcase(yyruleno==3);
      case 4: /* geo_text ::= polygon */ yytestcase(yyruleno==4);
      case 5: /* geo_text ::= polygonz */ yytestcase(yyruleno==5);
      case 6: /* geo_text ::= multipoint */ yytestcase(yyruleno==6);
      case 7: /* geo_text ::= multipointz */ yytestcase(yyruleno==7);
      case 8: /* geo_text ::= multilinestring */ yytestcase(yyruleno==8);
      case 9: /* geo_text ::= multilinestringz */ yytestcase(yyruleno==9);
      case 10: /* geo_text ::= multipolygon */ yytestcase(yyruleno==10);
      case 11: /* geo_text ::= multipolygonz */ yytestcase(yyruleno==11);
      case 12: /* geo_text ::= geocoll */ yytestcase(yyruleno==12);
      case 13: /* geo_text ::= geocollz */ yytestcase(yyruleno==13);
{ p_data->result = yymsp[0].minor.yy0; }
        break;
      case 14: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 20: /* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==20);
{ yymsp[-8].minor.yy0 = geoJSON_buildGeomFromPoint( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0); }
        break;
      case 15: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 21: /* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==21);
{ yymsp[-14].minor.yy0 = geoJSON_buildGeomFromPoint( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0); }
        break;
      case 16: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 17: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==17);
      case 22: /* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==22);
      case 23: /* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==23);
{ yymsp[-12].minor.yy0 = geoJSON_buildGeomFromPointSrid( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0, (int *)yymsp[-5].minor.yy0); }
        break;
      case 18: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 19: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==19);
      case 24: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==24);
      case 25: /* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==25);
{ yymsp[-18].minor.yy0 = geoJSON_buildGeomFromPointSrid( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0, (int *)yymsp[-11].minor.yy0); }
        break;
      case 26: /* short_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON short_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE */
      case 27: /* long_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON long_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==27);
{ yymsp[-12].minor.yy0 = yymsp[-2].minor.yy0; }
        break;
      case 28: /* point_coordxy ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET */
{ yymsp[-4].minor.yy0 = (void *) geoJSON_point_xy( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 29: /* point_coordxyz ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET */
{ yymsp[-6].minor.yy0 = (void *) geoJSON_point_xyz( p_data, (double *)yymsp[-5].minor.yy0, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 30: /* coord ::= GEOJSON_NUM */
      case 31: /* short_srid ::= GEOJSON_SHORT_SRID */ yytestcase(yyruleno==31);
      case 32: /* long_srid ::= GEOJSON_LONG_SRID */ yytestcase(yyruleno==32);
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 33: /* extra_pointsxy ::= */
      case 35: /* extra_pointsxyz ::= */ yytestcase(yyruleno==35);
      case 66: /* extra_rings ::= */ yytestcase(yyruleno==66);
      case 69: /* extra_ringsz ::= */ yytestcase(yyruleno==69);
      case 98: /* multilinestring_text2 ::= */ yytestcase(yyruleno==98);
      case 101: /* multilinestring_textz2 ::= */ yytestcase(yyruleno==101);
      case 116: /* multipolygon_text2 ::= */ yytestcase(yyruleno==116);
      case 119: /* multipolygon_textz2 ::= */ yytestcase(yyruleno==119);
      case 136: /* geocoll_text2 ::= */ yytestcase(yyruleno==136);
      case 143: /* geocoll_textz2 ::= */ yytestcase(yyruleno==143);
{ yymsp[1].minor.yy0 = NULL; }
        break;
      case 34: /* extra_pointsxy ::= GEOJSON_COMMA point_coordxy extra_pointsxy */
      case 36: /* extra_pointsxyz ::= GEOJSON_COMMA point_coordxyz extra_pointsxyz */ yytestcase(yyruleno==36);
{ ((gaiaPointPtr)yymsp[-1].minor.yy0)->Next = (gaiaPointPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 37: /* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 43: /* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==43);
{ yymsp[-8].minor.yy0 = geoJSON_buildGeomFromLinestring( p_data, (gaiaLinestringPtr)yymsp[-1].minor.yy0); }
        break;
      case 38: /* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 44: /* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==44);
{ yymsp[-14].minor.yy0 = geoJSON_buildGeomFromLinestring( p_data, (gaiaLinestringPtr)yymsp[-1].minor.yy0); }
        break;
      case 39: /* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 40: /* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==40);
      case 45: /* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==45);
      case 46: /* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==46);
{ yymsp[-12].minor.yy0 = geoJSON_buildGeomFromLinestringSrid( p_data, (gaiaLinestringPtr)yymsp[-1].minor.yy0, (int *)yymsp[-5].minor.yy0); }
        break;
      case 41: /* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 42: /* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==42);
      case 47: /* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==47);
      case 48: /* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==48);
{ yymsp[-18].minor.yy0 = geoJSON_buildGeomFromLinestringSrid( p_data, (gaiaLinestringPtr)yymsp[-1].minor.yy0, (int *)yymsp[-11].minor.yy0); }
        break;
      case 49: /* linestring_text ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) geoJSON_linestring_xy( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 50: /* linestring_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) geoJSON_linestring_xyz( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 51: /* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 57: /* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==57);
{ yymsp[-8].minor.yy0 = geoJSON_buildGeomFromPolygon( p_data, (gaiaPolygonPtr)yymsp[-1].minor.yy0); }
        break;
      case 52: /* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 58: /* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==58);
{ yymsp[-14].minor.yy0 = geoJSON_buildGeomFromPolygon( p_data, (gaiaPolygonPtr)yymsp[-1].minor.yy0); }
        break;
      case 53: /* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 54: /* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==54);
      case 59: /* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==59);
      case 60: /* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==60);
{ yymsp[-12].minor.yy0 = geoJSON_buildGeomFromPolygonSrid( p_data, (gaiaPolygonPtr)yymsp[-1].minor.yy0, (int *)yymsp[-5].minor.yy0); }
        break;
      case 55: /* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 56: /* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==56);
      case 61: /* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==61);
      case 62: /* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==62);
{ yymsp[-18].minor.yy0 = geoJSON_buildGeomFromPolygonSrid( p_data, (gaiaPolygonPtr)yymsp[-1].minor.yy0, (int *)yymsp[-11].minor.yy0); }
        break;
      case 63: /* polygon_text ::= GEOJSON_OPEN_BRACKET ring extra_rings GEOJSON_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) geoJSON_polygon_xy(p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 64: /* polygon_textz ::= GEOJSON_OPEN_BRACKET ringz extra_ringsz GEOJSON_CLOSE_BRACKET */
{  
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) geoJSON_polygon_xyz(p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 65: /* ring ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) geoJSON_ring_xy(p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 67: /* extra_rings ::= GEOJSON_COMMA ring extra_rings */
      case 70: /* extra_ringsz ::= GEOJSON_COMMA ringz extra_ringsz */ yytestcase(yyruleno==70);
{
		((gaiaRingPtr)yymsp[-1].minor.yy0)->Next = (gaiaRingPtr)yymsp[0].minor.yy0;
		yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 68: /* ringz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) geoJSON_ring_xyz(p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 71: /* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 77: /* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==77);
      case 85: /* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==85);
      case 91: /* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==91);
      case 103: /* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==103);
      case 109: /* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==109);
      case 121: /* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==121);
{ yymsp[-8].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 72: /* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 78: /* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==78);
      case 86: /* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==86);
      case 92: /* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==92);
      case 104: /* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==104);
      case 110: /* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==110);
      case 122: /* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==122);
      case 128: /* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==128);
{ yymsp[-14].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 73: /* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 74: /* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==74);
      case 79: /* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==79);
      case 80: /* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==80);
      case 87: /* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==87);
      case 88: /* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==88);
      case 93: /* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==93);
      case 94: /* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==94);
      case 105: /* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==105);
      case 106: /* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==106);
      case 111: /* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==111);
      case 112: /* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==112);
      case 123: /* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==123);
      case 124: /* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==124);
      case 129: /* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==129);
      case 130: /* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==130);
{ yymsp[-12].minor.yy0 = (void *) geoJSON_setSrid((gaiaGeomCollPtr)yymsp[-1].minor.yy0, (int *)yymsp[-5].minor.yy0); }
        break;
      case 75: /* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 76: /* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==76);
      case 81: /* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==81);
      case 82: /* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==82);
      case 89: /* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==89);
      case 90: /* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==90);
      case 95: /* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==95);
      case 96: /* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==96);
      case 107: /* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==107);
      case 108: /* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==108);
      case 113: /* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==113);
      case 114: /* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==114);
      case 125: /* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==125);
      case 126: /* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==126);
      case 131: /* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==131);
      case 132: /* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==132);
{ yymsp[-18].minor.yy0 = (void *) geoJSON_setSrid((gaiaGeomCollPtr)yymsp[-1].minor.yy0, (int *)yymsp[-11].minor.yy0); }
        break;
      case 83: /* multipoint_text ::= GEOJSON_OPEN_BRACKET point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) geoJSON_multipoint_xy(p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 84: /* multipoint_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) geoJSON_multipoint_xyz(p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 97: /* multilinestring_text ::= GEOJSON_OPEN_BRACKET linestring_text multilinestring_text2 GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) geoJSON_multilinestring_xy( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 99: /* multilinestring_text2 ::= GEOJSON_COMMA linestring_text multilinestring_text2 */
      case 102: /* multilinestring_textz2 ::= GEOJSON_COMMA linestring_textz multilinestring_textz2 */ yytestcase(yyruleno==102);
{ ((gaiaLinestringPtr)yymsp[-1].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 100: /* multilinestring_textz ::= GEOJSON_OPEN_BRACKET linestring_textz multilinestring_textz2 GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) geoJSON_multilinestring_xyz(p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 115: /* multipolygon_text ::= GEOJSON_OPEN_BRACKET polygon_text multipolygon_text2 GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) geoJSON_multipolygon_xy(p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 117: /* multipolygon_text2 ::= GEOJSON_COMMA polygon_text multipolygon_text2 */
      case 120: /* multipolygon_textz2 ::= GEOJSON_COMMA polygon_textz multipolygon_textz2 */ yytestcase(yyruleno==120);
{ ((gaiaPolygonPtr)yymsp[-1].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 118: /* multipolygon_textz ::= GEOJSON_OPEN_BRACKET polygon_textz multipolygon_textz2 GEOJSON_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) geoJSON_multipolygon_xyz(p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 127: /* geocollz ::= GEOJSON_GEOMETRYCOLLECTION geocoll_textz */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
        break;
      case 133: /* geocoll_text ::= GEOJSON_OPEN_BRACKET coll_point geocoll_text2 GEOJSON_CLOSE_BRACKET */
      case 134: /* geocoll_text ::= GEOJSON_OPEN_BRACKET coll_linestring geocoll_text2 GEOJSON_CLOSE_BRACKET */ yytestcase(yyruleno==134);
      case 135: /* geocoll_text ::= GEOJSON_OPEN_BRACKET coll_polygon geocoll_text2 GEOJSON_CLOSE_BRACKET */ yytestcase(yyruleno==135);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) geoJSON_geomColl_xy(p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 137: /* geocoll_text2 ::= GEOJSON_COMMA coll_point geocoll_text2 */
      case 138: /* geocoll_text2 ::= GEOJSON_COMMA coll_linestring geocoll_text2 */ yytestcase(yyruleno==138);
      case 139: /* geocoll_text2 ::= GEOJSON_COMMA coll_polygon geocoll_text2 */ yytestcase(yyruleno==139);
      case 144: /* geocoll_textz2 ::= GEOJSON_COMMA coll_pointz geocoll_textz2 */ yytestcase(yyruleno==144);
      case 145: /* geocoll_textz2 ::= GEOJSON_COMMA coll_linestringz geocoll_textz2 */ yytestcase(yyruleno==145);
      case 146: /* geocoll_textz2 ::= GEOJSON_COMMA coll_polygonz geocoll_textz2 */ yytestcase(yyruleno==146);
{
		((gaiaGeomCollPtr)yymsp[-1].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[0].minor.yy0;
		yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 140: /* geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_pointz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
      case 141: /* geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_linestringz geocoll_textz2 GEOJSON_CLOSE_BRACKET */ yytestcase(yyruleno==141);
      case 142: /* geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_polygonz geocoll_textz2 GEOJSON_CLOSE_BRACKET */ yytestcase(yyruleno==142);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) geoJSON_geomColl_xyz(p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 147: /* coll_point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 148: /* coll_pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==148);
{ yymsp[-8].minor.yy0 = geoJSON_buildGeomFromPoint(p_data, (gaiaPointPtr)yymsp[-1].minor.yy0); }
        break;
      case 149: /* coll_linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 150: /* coll_linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==150);
{ yymsp[-8].minor.yy0 = geoJSON_buildGeomFromLinestring(p_data, (gaiaLinestringPtr)yymsp[-1].minor.yy0); }
        break;
      case 151: /* coll_polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 152: /* coll_polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */ yytestcase(yyruleno==152);
{ yymsp[-8].minor.yy0 = geoJSON_buildGeomFromPolygon(p_data, (gaiaPolygonPtr)yymsp[-1].minor.yy0); }
        break;
      default:
      /* (153) main ::= in */ yytestcase(yyruleno==153);
      /* (154) in ::= */ yytestcase(yyruleno==154);
      /* (155) in ::= in state GEOJSON_NEWLINE */ yytestcase(yyruleno==155);
      /* (156) state ::= program (OPTIMIZED OUT) */ assert(yyruleno!=156);
      /* (157) program ::= geo_text (OPTIMIZED OUT) */ assert(yyruleno!=157);
      /* (158) bbox ::= coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_COMMA coord */ yytestcase(yyruleno==158);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */

























































































































































































































































































































































































































































}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){


  ParseARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/

/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
	p_data->geoJson_parse_error = 1;
	p_data->result = NULL;
/************ End %syntax_error code ******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){


  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);


  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){


  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */


  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)

  yyendofinput = (yymajor==0);







#endif







  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    int stateno = yypParser->yytos->stateno;
    if( stateno < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",


              yyTracePrompt,yyTokenName[yymajor],stateno);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno-YY_MIN_REDUCE);
    }
  }
#endif

  do{

    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact >= YY_MIN_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY




      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;





    }else{

      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);


      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);


      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){

#ifndef NDEBUG
        if( yyTraceFILE ){

          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);

        yymajor = YYNOCODE;

      }else{
        while( yypParser->yytos >= yypParser->yystack


            && yymx != YYERRORSYMBOL

            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){


          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){



          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;

        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);




        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);


      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);


      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);

      if( yyendofinput ){

        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif

  return;
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<


<
<
<
<
<
<
<
<
<
>
>

<
<
<
<




|
>
|
|





|
|
|
|
|
|
|
<
<
|
>
>
|
|
<
<
<










|











|


|
<

|

|

|


<
<
<

|

|
<

<
>
|
>
>

|


|
>











|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>







<
<
<
<







 







<
<
<
<

|
<
>
>
|
|
|
|





|
<
>
>

<
>

<
|
<
|

|
|
<

|
<







 







>
|
>
|
|
>
|
>
|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<





>
>
>
>

|
|
|
<
>
>
|

<
>
>
|
|

<
>

|
<
>
>
|

<
>
>
|
|

<
>
|

|





|
>
>
|
>

|
>
|
|

<
>
>
|
|
<

|
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






|
|
|
|
<
>
>
|
|
<





|
|
<
|





|
|
<
>
>
|

|
<
>
>
|

<
|
<
|
|
|
<
<
|







 







|
|
|
|
|
<
>
>
|
|
<
|
<

|

|

>
|
|
<
>
|
>
>
>
>
>
>
>

>
>
>
>
>
>
>
|


|
<
<
<
>
>
|
<
<
<
|
<


|
>
|
<
<
<
<
<
>
>
>
>
|
<
|
<
<
<
<
>
>
>
>
>
|
>
|
<

|


|
<
>
>
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
|
>

|
>
|
|
|

|
>
|
>
|
<
>
>
|
>
|
|
|
<
>
>
|
|
<
>
>
>
|
|
<
<
<
|
>
|
<
>
>
>
>
|
|
|
|

|
|
|
|
|
|
|
<
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
<
>
|
>
|
<
<
<
|
|

|
<
<
<
<
<
<
<
<
<
|
<
<
<
>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


















46
47
48
49
50
51


52
53









54
55
56




57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115



116
117
118
119

120

121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476




477
478
479
480
481
482
483
...
487
488
489
490
491
492
493




494
495

496
497
498
499
500
501
502
503
504
505
506
507

508
509
510

511
512

513

514
515
516
517

518
519

520
521
522
523
524
525
526
...
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101



1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114

1115
1116
1117
1118

1119
1120
1121
1122
1123

1124
1125
1126

1127
1128
1129
1130

1131
1132
1133
1134
1135

1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155

1156
1157
1158
1159

1160
1161

1162
1163





















1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250

2251
2252
2253
2254

2255
2256
2257
2258
2259
2260
2261

2262
2263
2264
2265
2266
2267
2268
2269

2270
2271
2272
2273
2274

2275
2276
2277
2278

2279

2280
2281
2282


2283
2284
2285
2286
2287
2288
2289
2290
....
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309

2310
2311
2312
2313

2314

2315
2316
2317
2318
2319
2320
2321
2322

2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343



2344
2345
2346



2347

2348
2349
2350
2351
2352





2353
2354
2355
2356
2357

2358




2359
2360
2361
2362
2363
2364
2365
2366

2367
2368
2369
2370
2371

2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396

2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414

2415
2416
2417
2418
2419
2420
2421

2422
2423
2424
2425

2426
2427
2428
2429
2430



2431
2432
2433

2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449


2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464

2465
2466
2467
2468

2469
2470
2471
2472



2473
2474
2475
2476









2477



2478
2479
2480
/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>

/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
/* 
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands. 
**
** Each symbol here is a terminal symbol in the grammar.
*/
/* Make sure the INTERFACE macro is defined.
*/
#ifndef INTERFACE
#define INTERFACE 1
#endif
/* The next thing included is series of defines which control
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 terminals
**                       and nonterminals.  "int" is used otherwise.
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
**                       to no legal terminal or nonterminal number.  This
**                       number is used to fill in empty slots of the hash 
**                       table.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       have fall-back values which should be used if the
**                       original value of the token will not parse.
**    YYACTIONTYPE       is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 rules and
**                       states combined.  "int" is used otherwise.
**    ParseTOKENTYPE     is the data type used for minor tokens given 
**                       directly to the parser from the tokenizer.
**    YYMINORTYPE        is the data type used for all minor tokens.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for base tokens is called "yy0".


















**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser


**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar









**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
*/




#define YYCODETYPE unsigned char
#define YYNOCODE 84
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE void *
typedef union
{
    int yyinit;
    ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct geoJson_data *p_data ;
#define ParseARG_PDECL , struct geoJson_data *p_data
#define ParseARG_FETCH  struct geoJson_data *p_data  = yypParser->p_data
#define ParseARG_STORE yypParser->p_data  = p_data
#define YYNSTATE 679
#define YYNRULE 159
#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)


#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)

/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static const YYMINORTYPE yyzerominor = { 0 };




/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
#define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.

**
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
**
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
**
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**



** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]

**

** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
*/
static const YYACTIONTYPE yy_action[] = {
    /*     0 */ 184, 533, 534, 535, 536, 537, 538, 539, 540, 541,
    /*    10 */ 542, 543, 544, 545, 546, 547, 548, 187, 139, 189,
    /*    20 */ 146, 147, 148, 190, 155, 156, 679, 104, 185, 112,
    /*    30 */ 242, 287, 334, 373, 412, 451, 139, 195, 146, 147,
    /*    40 */ 140, 201, 141, 142, 512, 149, 88, 150, 151, 157,
    /*    50 */ 148, 551, 155, 156, 496, 188, 243, 193, 254, 509,
    /*    60 */ 204, 262, 455, 288, 335, 301, 340, 471, 309, 348,
    /*    70 */ 507, 374, 413, 379, 418, 457, 387, 426, 482, 191,
    /*    80 */ 498, 480, 452, 567, 568, 839, 1, 169, 461, 465,
    /*    90 */ 93, 486, 490, 501, 504, 238, 240, 211, 199, 207,
    /*   100 */ 86, 201, 200, 208, 101, 244, 245, 215, 205, 217,
    /*   110 */ 553, 216, 223, 219, 227, 99, 201, 220, 228, 246,
    /*   120 */ 229, 19, 256, 250, 263, 275, 201, 260, 261, 95,
    /*   130 */ 30, 269, 31, 265, 266, 201, 273, 274, 277, 278,
    /*   140 */ 281, 285, 286, 42, 201, 292, 289, 290, 303, 297,
    /*   150 */ 307, 308, 201, 310, 322, 312, 313, 96, 316, 328,
    /*   160 */ 320, 321, 201, 201, 324, 325, 332, 333, 206, 120,
    /*   170 */ 209, 336, 337, 121, 342, 192, 349, 361, 201, 53,
    /*   180 */ 346, 347, 351, 352, 355, 64, 359, 360, 201, 363,
    /*   190 */ 364, 367, 375, 376, 2, 201, 381, 371, 372, 394,
    /*   200 */ 201, 122, 126, 201, 385, 386, 388, 400, 390, 391,
    /*   210 */ 414, 415, 398, 399, 402, 403, 406, 410, 411, 420,
    /*   220 */ 201, 130, 134, 201, 424, 425, 427, 439, 433, 429,
    /*   230 */ 430, 218, 201, 221, 437, 438, 441, 442, 445, 477,
    /*   240 */ 478, 202, 201, 449, 450, 473, 460, 468, 493, 201,
    /*   250 */ 485, 464, 489, 508, 520, 514, 510, 511, 524, 201,
    /*   260 */ 518, 519, 522, 523, 526, 203, 530, 531, 201, 264,
    /*   270 */ 276, 267, 279, 521, 311, 323, 314, 326, 350, 362,
    /*   280 */ 353, 365, 389, 401, 392, 404, 428, 440, 431, 443,
    /*   290 */ 556, 247, 248, 97, 99, 251, 249, 571, 102, 105,
    /*   300 */ 252, 253, 103, 292, 106, 573, 291, 295, 113, 293,
    /*   310 */ 294, 111, 123, 114, 110, 589, 125, 124, 296, 297,
    /*   320 */ 119, 127, 298, 299, 377, 840, 118, 620, 592, 128,
    /*   330 */ 246, 131, 300, 132, 338, 135, 339, 250, 136, 4,
    /*   340 */ 3, 5, 129, 532, 6, 158, 186, 133, 8, 552,
    /*   350 */ 104, 378, 159, 549, 460, 622, 137, 550, 112, 87,
    /*   360 */ 416, 194, 9, 10, 197, 464, 636, 196, 417, 468,
    /*   370 */ 485, 638, 198, 453, 554, 555, 489, 454, 89, 90,
    /*   380 */ 651, 652, 493, 91, 653, 11, 170, 469, 12, 470,
    /*   390 */ 557, 558, 210, 213, 479, 13, 662, 663, 664, 214,
    /*   400 */ 212, 14, 494, 559, 560, 678, 171, 495, 15, 561,
    /*   410 */ 562, 222, 225, 16, 17, 226, 224, 563, 230, 564,
    /*   420 */ 231, 236, 235, 233, 20, 232, 7, 234, 456, 239,
    /*   430 */ 840, 565, 241, 237, 566, 569, 160, 18, 840, 551,
    /*   440 */ 570, 92, 94, 98, 100, 572, 88, 255, 840, 21,
    /*   450 */ 258, 840, 574, 257, 259, 22, 575, 270, 576, 172,
    /*   460 */ 23, 268, 577, 578, 271, 25, 840, 272, 26, 24,
    /*   470 */ 579, 580, 173, 581, 280, 840, 582, 840, 283, 27,
    /*   480 */ 284, 28, 282, 583, 32, 29, 161, 584, 840, 840,
    /*   490 */ 585, 586, 107, 108, 109, 587, 304, 840, 840, 115,
    /*   500 */ 116, 117, 588, 590, 302, 33, 840, 591, 305, 840,
    /*   510 */ 306, 840, 593, 594, 174, 34, 36, 35, 840, 39,
    /*   520 */ 315, 476, 595, 596, 318, 37, 75, 840, 317, 840,
    /*   530 */ 319, 329, 597, 598, 599, 175, 40, 38, 327, 600,
    /*   540 */ 840, 330, 840, 331, 41, 601, 602, 603, 162, 840,
    /*   550 */ 840, 341, 604, 840, 840, 840, 605, 606, 43, 344,
    /*   560 */ 343, 840, 44, 356, 345, 45, 840, 607, 608, 176,
    /*   570 */ 46, 358, 840, 609, 354, 840, 610, 357, 48, 47,
    /*   580 */ 611, 49, 840, 612, 177, 366, 840, 613, 614, 840,
    /*   590 */ 840, 369, 50, 370, 163, 368, 51, 615, 52, 840,
    /*   600 */ 840, 616, 840, 617, 618, 840, 380, 840, 619, 621,
    /*   610 */ 382, 383, 840, 178, 54, 55, 384, 840, 623, 56,
    /*   620 */ 624, 57, 625, 393, 626, 840, 840, 59, 396, 840,
    /*   630 */ 58, 397, 395, 627, 840, 179, 628, 60, 405, 629,
    /*   640 */ 630, 840, 840, 62, 408, 840, 61, 409, 407, 631,
    /*   650 */ 840, 164, 632, 63, 840, 633, 634, 419, 840, 840,
    /*   660 */ 481, 635, 840, 637, 65, 423, 840, 421, 422, 66,
    /*   670 */ 840, 81, 639, 67, 640, 840, 180, 68, 69, 840,
    /*   680 */ 840, 432, 641, 642, 840, 435, 70, 840, 840, 434,
    /*   690 */ 436, 840, 643, 181, 644, 71, 517, 840, 645, 444,
    /*   700 */ 840, 646, 840, 183, 72, 447, 840, 446, 647, 448,
    /*   710 */ 73, 840, 674, 648, 165, 138, 840, 649, 166, 143,
    /*   720 */ 840, 650, 458, 84, 840, 459, 462, 654, 840, 463,
    /*   730 */ 144, 655, 840, 466, 145, 467, 840, 840, 840, 656,
    /*   740 */ 472, 840, 840, 657, 840, 658, 474, 475, 529, 840,
    /*   750 */ 74, 840, 659, 85, 660, 167, 665, 840, 661, 483,
    /*   760 */ 152, 840, 484, 487, 153, 840, 488, 154, 840, 666,
    /*   770 */ 491, 840, 492, 840, 497, 667, 840, 168, 840, 668,
    /*   780 */ 840, 669, 499, 670, 76, 500, 840, 840, 502, 77,
    /*   790 */ 503, 840, 505, 840, 78, 79, 506, 840, 840, 182,
    /*   800 */ 80, 513, 840, 671, 840, 840, 82, 516, 840, 840,
    /*   810 */ 840, 515, 672, 840, 840, 673, 83, 840, 840, 527,
    /*   820 */ 525, 675, 840, 528, 840, 840, 840, 840, 676, 677,
};

static const YYCODETYPE yy_lookahead[] = {
    /*     0 */ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
    /*    10 */ 38, 39, 40, 41, 42, 43, 44, 5, 75, 45,
    /*    20 */ 77, 78, 79, 49, 81, 82, 0, 59, 2, 61,
    /*    30 */ 18, 19, 20, 21, 22, 23, 75, 46, 77, 78,
    /*    40 */ 75, 50, 77, 78, 9, 79, 6, 81, 82, 23,
    /*    50 */ 79, 11, 81, 82, 2, 7, 7, 9, 9, 24,
    /*    60 */ 12, 12, 2, 7, 7, 9, 9, 9, 12, 12,
    /*    70 */ 12, 7, 7, 9, 9, 5, 12, 12, 5, 50,
    /*    80 */ 5, 2, 24, 16, 17, 26, 27, 50, 18, 19,
    /*    90 */ 10, 18, 19, 18, 19, 51, 52, 46, 45, 45,
    /*   100 */ 10, 50, 49, 49, 49, 55, 56, 45, 47, 48,
    /*   110 */ 15, 49, 46, 45, 45, 10, 50, 49, 49, 45,
    /*   120 */ 2, 10, 46, 49, 47, 48, 50, 55, 56, 45,
    /*   130 */ 10, 46, 10, 55, 56, 50, 55, 56, 55, 56,
    /*   140 */ 46, 55, 56, 10, 50, 45, 57, 58, 46, 49,
    /*   150 */ 57, 58, 50, 47, 48, 57, 58, 6, 46, 46,
    /*   160 */ 57, 58, 50, 50, 57, 58, 57, 58, 7, 45,
    /*   170 */ 9, 63, 64, 49, 46, 50, 47, 48, 50, 10,
    /*   180 */ 63, 64, 63, 64, 46, 10, 63, 64, 50, 63,
    /*   190 */ 64, 46, 65, 66, 10, 50, 46, 63, 64, 46,
    /*   200 */ 50, 55, 56, 50, 65, 66, 47, 48, 65, 66,
    /*   210 */ 69, 70, 65, 66, 65, 66, 46, 65, 66, 46,
    /*   220 */ 50, 57, 58, 50, 69, 70, 47, 48, 46, 69,
    /*   230 */ 70, 7, 50, 9, 69, 70, 69, 70, 46, 73,
    /*   240 */ 74, 50, 50, 69, 70, 46, 45, 57, 58, 50,
    /*   250 */ 49, 55, 56, 47, 48, 46, 73, 74, 9, 50,
    /*   260 */ 73, 74, 73, 74, 46, 50, 73, 74, 50, 7,
    /*   270 */ 7, 9, 9, 24, 7, 7, 9, 9, 7, 7,
    /*   280 */ 9, 9, 7, 7, 9, 9, 7, 7, 9, 9,
    /*   290 */ 50, 50, 50, 45, 10, 50, 53, 53, 6, 6,
    /*   300 */ 50, 54, 49, 45, 10, 54, 60, 53, 6, 45,
    /*   310 */ 45, 59, 6, 10, 45, 60, 55, 10, 62, 49,
    /*   320 */ 61, 6, 49, 49, 67, 83, 49, 67, 62, 10,
    /*   330 */ 45, 6, 54, 10, 53, 6, 54, 49, 10, 6,
    /*   340 */ 10, 6, 56, 1, 10, 4, 3, 57, 4, 11,
    /*   350 */ 59, 68, 6, 8, 45, 68, 58, 8, 61, 6,
    /*   360 */ 71, 4, 10, 4, 6, 55, 71, 11, 72, 57,
    /*   370 */ 49, 72, 7, 73, 8, 8, 56, 76, 6, 6,
    /*   380 */ 76, 76, 58, 6, 76, 4, 6, 76, 4, 76,
    /*   390 */ 8, 8, 4, 6, 80, 10, 80, 80, 80, 7,
    /*   400 */ 11, 4, 80, 8, 8, 74, 6, 80, 4, 8,
    /*   410 */ 8, 4, 6, 10, 4, 7, 11, 8, 3, 8,
    /*   420 */ 4, 2, 4, 6, 10, 13, 4, 14, 3, 8,
    /*   430 */ 83, 8, 8, 13, 8, 8, 6, 4, 83, 11,
    /*   440 */ 8, 6, 6, 6, 6, 11, 6, 4, 83, 4,
    /*   450 */ 6, 83, 11, 11, 7, 4, 8, 11, 8, 6,
    /*   460 */ 4, 4, 8, 8, 6, 4, 83, 7, 4, 10,
    /*   470 */ 8, 8, 6, 8, 4, 83, 8, 83, 6, 10,
    /*   480 */ 7, 4, 11, 8, 10, 4, 6, 8, 83, 83,
    /*   490 */ 8, 8, 6, 6, 6, 11, 11, 83, 83, 6,
    /*   500 */ 6, 6, 11, 11, 4, 4, 83, 11, 6, 83,
    /*   510 */ 7, 83, 8, 8, 6, 4, 10, 4, 83, 10,
    /*   520 */ 4, 24, 8, 8, 6, 4, 4, 83, 11, 83,
    /*   530 */ 7, 11, 8, 8, 8, 6, 4, 4, 4, 8,
    /*   540 */ 83, 6, 83, 7, 4, 8, 8, 8, 6, 83,
    /*   550 */ 83, 4, 8, 83, 83, 83, 11, 11, 10, 6,
    /*   560 */ 11, 83, 4, 11, 7, 4, 83, 8, 8, 6,
    /*   570 */ 4, 7, 83, 8, 4, 83, 8, 6, 4, 10,
    /*   580 */ 8, 4, 83, 8, 6, 4, 83, 8, 8, 83,
    /*   590 */ 83, 6, 10, 7, 6, 11, 4, 8, 4, 83,
    /*   600 */ 83, 8, 83, 8, 8, 83, 4, 83, 11, 11,
    /*   610 */ 11, 6, 83, 6, 10, 4, 7, 83, 8, 4,
    /*   620 */ 8, 4, 8, 4, 8, 83, 83, 4, 6, 83,
    /*   630 */ 10, 7, 11, 8, 83, 6, 8, 4, 4, 8,
    /*   640 */ 8, 83, 83, 4, 6, 83, 10, 7, 11, 8,
    /*   650 */ 83, 6, 8, 4, 83, 8, 8, 4, 83, 83,
    /*   660 */ 3, 11, 83, 11, 10, 7, 83, 11, 6, 4,
    /*   670 */ 83, 10, 8, 4, 8, 83, 6, 4, 10, 83,
    /*   680 */ 83, 4, 8, 8, 83, 6, 4, 83, 83, 11,
    /*   690 */ 7, 83, 8, 6, 8, 4, 24, 83, 8, 4,
    /*   700 */ 83, 8, 83, 6, 10, 6, 83, 11, 8, 7,
    /*   710 */ 4, 83, 8, 8, 6, 4, 83, 8, 4, 4,
    /*   720 */ 83, 11, 6, 10, 83, 7, 6, 8, 83, 7,
    /*   730 */ 4, 8, 83, 6, 4, 7, 83, 83, 83, 8,
    /*   740 */ 4, 83, 83, 11, 83, 11, 11, 6, 24, 83,
    /*   750 */ 10, 83, 8, 4, 8, 4, 8, 83, 11, 6,
    /*   760 */ 4, 83, 7, 6, 4, 83, 7, 4, 83, 8,
    /*   770 */ 6, 83, 7, 83, 3, 8, 83, 4, 83, 11,
    /*   780 */ 83, 11, 6, 8, 4, 7, 83, 83, 6, 4,
    /*   790 */ 7, 83, 6, 83, 4, 4, 7, 83, 83, 6,
    /*   800 */ 4, 4, 83, 8, 83, 83, 4, 6, 83, 83,
    /*   810 */ 83, 11, 8, 83, 83, 8, 4, 83, 83, 11,
    /*   820 */ 4, 8, 83, 6, 83, 83, 83, 83, 8, 8,
};

#define YY_SHIFT_USE_DFLT (-1)
#define YY_SHIFT_MAX 531
static const short yy_shift_ofst[] = {
    /*     0 */ -1, 26, 52, 60, 60, 79, 79, 67, 90, 95,
    /*    10 */ 90, 118, 90, 95, 90, 90, 95, 90, 111, 90,
    /*    20 */ 95, 111, 118, 111, 95, 111, 111, 95, 111, 120,
    /*    30 */ 122, 90, 95, 120, 118, 120, 95, 120, 120, 95,
    /*    40 */ 120, 133, 90, 95, 133, 118, 133, 95, 133, 133,
    /*    50 */ 95, 133, 169, 111, 95, 169, 118, 169, 95, 169,
    /*    60 */ 169, 95, 169, 175, 120, 95, 175, 118, 175, 95,
    /*    70 */ 175, 175, 95, 175, 95, 184, 90, 111, 120, 118,
    /*    80 */ 184, 95, 184, 184, 95, 184, 95, 95, 95, 95,
    /*    90 */ 95, 95, 80, 95, 95, 151, 80, 151, 284, 95,
    /*   100 */ 95, 292, 105, 292, 293, 294, 80, 80, 80, 80,
    /*   110 */ 151, 293, 302, 303, 105, 105, 105, 105, 292, 302,
    /*   120 */ 151, 292, 306, 307, 80, 306, 315, 319, 105, 315,
    /*   130 */ 325, 323, 294, 325, 329, 328, 303, 329, 330, 333,
    /*   140 */ 333, 333, 333, 80, 307, 323, 333, 333, 335, 335,
    /*   150 */ 335, 335, 105, 319, 328, 335, 335, 334, 12, 48,
    /*   160 */ 49, 56, 57, 64, 65, 58, 70, 73, 75, 40,
    /*   170 */ 161, 224, 262, 263, 267, 268, 271, 272, 275, 276,
    /*   180 */ 279, 280, 35, 249, 342, 343, 341, 346, 344, 345,
    /*   190 */ 349, 353, 338, 357, 352, 356, 358, 365, 359, 366,
    /*   200 */ 367, 372, 373, 377, 381, 380, 384, 382, 383, 388,
    /*   210 */ 385, 389, 387, 392, 397, 395, 396, 400, 404, 401,
    /*   220 */ 402, 407, 403, 405, 406, 408, 410, 409, 411, 415,
    /*   230 */ 416, 412, 417, 413, 418, 419, 420, 422, 421, 423,
    /*   240 */ 424, 426, 430, 433, 427, 432, 435, 436, 428, 434,
    /*   250 */ 437, 438, 440, 441, 443, 414, 442, 444, 447, 445,
    /*   260 */ 448, 450, 451, 453, 456, 454, 455, 457, 459, 446,
    /*   270 */ 458, 460, 461, 462, 463, 466, 464, 465, 468, 470,
    /*   280 */ 469, 471, 472, 473, 477, 475, 479, 480, 481, 482,
    /*   290 */ 483, 484, 486, 487, 488, 491, 492, 493, 494, 495,
    /*   300 */ 496, 500, 474, 485, 502, 503, 501, 504, 505, 511,
    /*   310 */ 508, 513, 514, 515, 516, 506, 517, 518, 523, 521,
    /*   320 */ 524, 525, 529, 533, 526, 531, 534, 509, 520, 535,
    /*   330 */ 536, 532, 537, 538, 542, 540, 539, 544, 545, 546,
    /*   340 */ 547, 548, 549, 553, 557, 558, 559, 560, 561, 563,
    /*   350 */ 566, 565, 568, 570, 569, 552, 571, 564, 574, 572,
    /*   360 */ 575, 578, 577, 579, 580, 581, 582, 584, 585, 586,
    /*   370 */ 592, 589, 593, 588, 594, 595, 596, 597, 598, 602,
    /*   380 */ 604, 599, 605, 609, 611, 610, 612, 615, 607, 617,
    /*   390 */ 614, 616, 619, 620, 621, 622, 624, 623, 625, 628,
    /*   400 */ 629, 633, 631, 632, 634, 636, 637, 638, 640, 639,
    /*   410 */ 641, 644, 645, 649, 647, 648, 650, 652, 653, 654,
    /*   420 */ 656, 662, 658, 665, 664, 666, 669, 670, 673, 674,
    /*   430 */ 675, 677, 668, 678, 679, 683, 682, 684, 686, 687,
    /*   440 */ 691, 690, 693, 695, 694, 696, 699, 702, 706, 700,
    /*   450 */ 705, 708, 711, 709, 710, 425, 714, 716, 718, 715,
    /*   460 */ 719, 720, 722, 726, 723, 727, 728, 730, 731, 732,
    /*   470 */ 734, 736, 740, 735, 741, 497, 522, 744, 746, 747,
    /*   480 */ 657, 751, 753, 755, 756, 748, 757, 759, 760, 761,
    /*   490 */ 764, 765, 763, 767, 768, 770, 771, 773, 776, 778,
    /*   500 */ 780, 782, 783, 785, 786, 789, 790, 791, 793, 796,
    /*   510 */ 775, 795, 797, 661, 800, 801, 672, 802, 804, 807,
    /*   520 */ 697, 812, 704, 813, 816, 713, 808, 817, 724, 749,
    /*   530 */ 820, 821,
};

#define YY_REDUCE_USE_DFLT (-58)
#define YY_REDUCE_MAX 157
static const short yy_reduce_ofst[] = {
    /*     0 */ 59, -28, -57, -39, -35, -34, -29, 44, -26, -9,
    /*    10 */ 53, 61, 54, 51, 62, 68, 66, 69, 50, 74,
    /*    20 */ 76, 72, 77, 78, 85, 81, 83, 94, 86, 89,
    /*    30 */ -32, 100, 102, 93, 106, 98, 112, 103, 107, 113,
    /*    40 */ 109, 108, 124, 128, 117, 129, 119, 138, 123, 126,
    /*    50 */ 145, 134, 127, 146, 150, 139, 159, 143, 153, 147,
    /*    60 */ 149, 170, 152, 141, 164, 173, 155, 179, 160, 182,
    /*    70 */ 165, 167, 192, 174, 199, 166, 201, 196, 190, 206,
    /*    80 */ 183, 209, 187, 189, 218, 193, 29, 37, 125, 191,
    /*    90 */ 215, 240, 84, 241, 242, 243, 248, 244, 55, 245,
    /*   100 */ 250, 247, 253, 251, 246, 252, 258, 264, 265, 269,
    /*   110 */ 254, 255, 256, 259, 270, 273, 274, 277, 278, 266,
    /*   120 */ 281, 282, 257, 261, 285, 260, 283, 286, 288, 287,
    /*   130 */ 289, 290, 291, 295, 296, 298, 297, 299, 300, 301,
    /*   140 */ 304, 305, 308, 309, 310, 312, 311, 313, 314, 316,
    /*   150 */ 317, 318, 321, 320, 324, 322, 327, 331,
};

static const YYACTIONTYPE yy_default[] = {
    /*     0 */ 680, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    10 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    20 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    30 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    40 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    50 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    60 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    70 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    80 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*    90 */ 838, 838, 838, 838, 838, 718, 838, 718, 838, 838,
    /*   100 */ 838, 720, 838, 720, 751, 838, 838, 838, 838, 838,
    /*   110 */ 718, 751, 754, 838, 838, 838, 838, 838, 720, 754,
    /*   120 */ 718, 720, 783, 838, 838, 783, 786, 838, 838, 786,
    /*   130 */ 801, 838, 838, 801, 804, 838, 838, 804, 838, 821,
    /*   140 */ 821, 821, 821, 838, 838, 838, 821, 821, 828, 828,
    /*   150 */ 828, 828, 838, 838, 838, 828, 828, 838, 838, 838,
    /*   160 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   170 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   180 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   190 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   200 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   210 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   220 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   230 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   240 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   250 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   260 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   270 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   280 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   290 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   300 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   310 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   320 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   330 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   340 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   350 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   360 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   370 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   380 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   390 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   400 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   410 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   420 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   430 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   440 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   450 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   460 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   470 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   480 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   490 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   500 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   510 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   520 */ 838, 838, 838, 838, 838, 838, 838, 838, 838, 838,
    /*   530 */ 838, 838, 681, 682, 683, 684, 685, 686, 687, 688,
    /*   540 */ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
    /*   550 */ 704, 713, 714, 715, 699, 705, 710, 700, 706, 702,
    /*   560 */ 708, 701, 707, 703, 709, 711, 712, 716, 717, 722,
    /*   570 */ 728, 719, 734, 721, 735, 723, 729, 724, 730, 726,
    /*   580 */ 732, 725, 731, 727, 733, 736, 742, 748, 750, 752,
    /*   590 */ 749, 753, 755, 737, 743, 738, 744, 740, 746, 739,
    /*   600 */ 745, 741, 747, 756, 762, 768, 769, 757, 763, 758,
    /*   610 */ 764, 760, 766, 759, 765, 761, 767, 770, 776, 782,
    /*   620 */ 784, 785, 787, 771, 777, 772, 778, 774, 780, 773,
    /*   630 */ 779, 775, 781, 788, 794, 800, 802, 803, 805, 789,
    /*   640 */ 795, 790, 796, 792, 798, 791, 797, 793, 799, 806,
    /*   650 */ 818, 822, 823, 824, 832, 834, 836, 819, 820, 807,
    /*   660 */ 813, 825, 829, 830, 831, 833, 835, 837, 826, 827,
    /*   670 */ 808, 814, 810, 816, 809, 815, 811, 817, 812,
};

#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.




*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.




*/
struct yyStackEntry

{
    YYACTIONTYPE stateno;	/* The state-number */
    YYCODETYPE major;		/* The major token value.  This is the code
				 ** number for the token at this stack level */
    YYMINORTYPE minor;		/* The user-supplied minor token value.  This
				 ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser

{
    int yyidx;			/* Index of top element in stack */
#ifdef YYTRACKMAXSTACKDEPTH

    int yyidxMax;		/* Maximum value of yyidx */
#endif

    int yyerrcnt;		/* Shifts left before out of the error */

      ParseARG_SDECL		/* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
    int yystksz;		/* Current side of the stack */
    yyStackEntry *yystack;	/* The parser's stack */

#else
      yyStackEntry yystack[YYSTACKDEPTH];	/* The parser's stack */

#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void
ParseTrace (FILE * TraceFILE, char *zTracePrompt)
{
    yyTraceFILE = TraceFILE;
    yyTracePrompt = zTracePrompt;
    if (yyTraceFILE == 0)
	yyTracePrompt = 0;
    else if (yyTracePrompt == 0)
	yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = {
    "$", "GEOJSON_NEWLINE", "GEOJSON_OPEN_BRACE", "GEOJSON_TYPE",
    "GEOJSON_COLON", "GEOJSON_POINT", "GEOJSON_COMMA", "GEOJSON_COORDS",
    "GEOJSON_CLOSE_BRACE", "GEOJSON_BBOX", "GEOJSON_OPEN_BRACKET",
    "GEOJSON_CLOSE_BRACKET",
    "GEOJSON_CRS", "GEOJSON_NAME", "GEOJSON_PROPS", "GEOJSON_NUM",
    "GEOJSON_SHORT_SRID", "GEOJSON_LONG_SRID", "GEOJSON_LINESTRING",
    "GEOJSON_POLYGON",
    "GEOJSON_MULTIPOINT", "GEOJSON_MULTILINESTRING", "GEOJSON_MULTIPOLYGON",
    "GEOJSON_GEOMETRYCOLLECTION",
    "GEOJSON_GEOMS", "error", "main", "in",
    "state", "program", "geo_text", "point",
    "pointz", "linestring", "linestringz", "polygon",
    "polygonz", "multipoint", "multipointz", "multilinestring",
    "multilinestringz", "multipolygon", "multipolygonz", "geocoll",
    "geocollz", "point_coordxy", "bbox", "short_crs",
    "long_crs", "point_coordxyz", "coord", "short_srid",
    "long_srid", "extra_pointsxy", "extra_pointsxyz", "linestring_text",
    "linestring_textz", "polygon_text", "polygon_textz", "ring",
    "extra_rings", "ringz", "extra_ringsz", "multipoint_text",
    "multipoint_textz", "multilinestring_text", "multilinestring_textz",
    "multilinestring_text2",
    "multilinestring_textz2", "multipolygon_text", "multipolygon_textz",
    "multipolygon_text2",
    "multipolygon_textz2", "geocoll_text", "geocoll_textz", "coll_point",
    "geocoll_text2", "coll_linestring", "coll_polygon", "coll_pointz",
    "geocoll_textz2", "coll_linestringz", "coll_polygonz",
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
    /*   0 */ "main ::= in",
    /*   1 */ "in ::=",
    /*   2 */ "in ::= in state GEOJSON_NEWLINE",
    /*   3 */ "state ::= program",
    /*   4 */ "program ::= geo_text",
    /*   5 */ "geo_text ::= point",
    /*   6 */ "geo_text ::= pointz",
    /*   7 */ "geo_text ::= linestring",
    /*   8 */ "geo_text ::= linestringz",
    /*   9 */ "geo_text ::= polygon",
    /*  10 */ "geo_text ::= polygonz",
    /*  11 */ "geo_text ::= multipoint",
    /*  12 */ "geo_text ::= multipointz",
    /*  13 */ "geo_text ::= multilinestring",
    /*  14 */ "geo_text ::= multilinestringz",
    /*  15 */ "geo_text ::= multipolygon",
    /*  16 */ "geo_text ::= multipolygonz",
    /*  17 */ "geo_text ::= geocoll",
    /*  18 */ "geo_text ::= geocollz",
    /*  19 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /*  20 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /*  21 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /*  22 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /*  23 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /*  24 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /*  25 */
    "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /*  26 */
    "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /*  27 */
    "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /*  28 */
    "pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /*  29 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /*  30 */
    "point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /*  31 */
    "bbox ::= coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_COMMA coord",
    /*  32 */
    "short_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON short_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE",
    /*  33 */
    "long_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON long_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE",
    /*  34 */
    "point_coordxy ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET",
    /*  35 */
    "point_coordxyz ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET",
    /*  36 */ "coord ::= GEOJSON_NUM",
    /*  37 */ "short_srid ::= GEOJSON_SHORT_SRID",
    /*  38 */ "long_srid ::= GEOJSON_LONG_SRID",
    /*  39 */ "extra_pointsxy ::=",
    /*  40 */ "extra_pointsxy ::= GEOJSON_COMMA point_coordxy extra_pointsxy",
    /*  41 */ "extra_pointsxyz ::=",
    /*  42 */
    "extra_pointsxyz ::= GEOJSON_COMMA point_coordxyz extra_pointsxyz",
    /*  43 */
    "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /*  44 */
    "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /*  45 */
    "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /*  46 */
    "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /*  47 */
    "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /*  48 */
    "linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /*  49 */
    "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /*  50 */
    "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /*  51 */
    "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /*  52 */
    "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /*  53 */
    "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /*  54 */
    "linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /*  55 */
    "linestring_text ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET",
    /*  56 */
    "linestring_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET",
    /*  57 */
    "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /*  58 */
    "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /*  59 */
    "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /*  60 */
    "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /*  61 */
    "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /*  62 */
    "polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /*  63 */
    "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
    /*  64 */
    "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
    /*  65 */
    "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
    /*  66 */
    "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
    /*  67 */
    "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
    /*  68 */
    "polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
    /*  69 */
    "polygon_text ::= GEOJSON_OPEN_BRACKET ring extra_rings GEOJSON_CLOSE_BRACKET",
    /*  70 */
    "polygon_textz ::= GEOJSON_OPEN_BRACKET ringz extra_ringsz GEOJSON_CLOSE_BRACKET",
    /*  71 */
    "ring ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET",
    /*  72 */ "extra_rings ::=",
    /*  73 */ "extra_rings ::= GEOJSON_COMMA ring extra_rings",
    /*  74 */
    "ringz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET",
    /*  75 */ "extra_ringsz ::=",
    /*  76 */ "extra_ringsz ::= GEOJSON_COMMA ringz extra_ringsz",
    /*  77 */
    "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
    /*  78 */
    "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
    /*  79 */
    "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
    /*  80 */
    "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
    /*  81 */
    "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
    /*  82 */
    "multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE",
    /*  83 */
    "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
    /*  84 */
    "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
    /*  85 */
    "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
    /*  86 */
    "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
    /*  87 */
    "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
    /*  88 */
    "multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE",
    /*  89 */
    "multipoint_text ::= GEOJSON_OPEN_BRACKET point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET",
    /*  90 */
    "multipoint_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET",
    /*  91 */
    "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
    /*  92 */
    "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
    /*  93 */
    "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
    /*  94 */
    "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
    /*  95 */
    "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
    /*  96 */
    "multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE",
    /*  97 */
    "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
    /*  98 */
    "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
    /*  99 */
    "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
    /* 100 */
    "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
    /* 101 */
    "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
    /* 102 */
    "multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE",
    /* 103 */
    "multilinestring_text ::= GEOJSON_OPEN_BRACKET linestring_text multilinestring_text2 GEOJSON_CLOSE_BRACKET",
    /* 104 */ "multilinestring_text2 ::=",
    /* 105 */
    "multilinestring_text2 ::= GEOJSON_COMMA linestring_text multilinestring_text2",
    /* 106 */
    "multilinestring_textz ::= GEOJSON_OPEN_BRACKET linestring_textz multilinestring_textz2 GEOJSON_CLOSE_BRACKET",
    /* 107 */ "multilinestring_textz2 ::=",
    /* 108 */
    "multilinestring_textz2 ::= GEOJSON_COMMA linestring_textz multilinestring_textz2",
    /* 109 */
    "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
    /* 110 */
    "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
    /* 111 */
    "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
    /* 112 */
    "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
    /* 113 */
    "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
    /* 114 */
    "multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE",
    /* 115 */
    "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
    /* 116 */
    "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
    /* 117 */
    "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
    /* 118 */
    "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
    /* 119 */
    "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
    /* 120 */
    "multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE",
    /* 121 */
    "multipolygon_text ::= GEOJSON_OPEN_BRACKET polygon_text multipolygon_text2 GEOJSON_CLOSE_BRACKET",
    /* 122 */ "multipolygon_text2 ::=",
    /* 123 */
    "multipolygon_text2 ::= GEOJSON_COMMA polygon_text multipolygon_text2",
    /* 124 */
    "multipolygon_textz ::= GEOJSON_OPEN_BRACKET polygon_textz multipolygon_textz2 GEOJSON_CLOSE_BRACKET",
    /* 125 */ "multipolygon_textz2 ::=",
    /* 126 */
    "multipolygon_textz2 ::= GEOJSON_COMMA polygon_textz multipolygon_textz2",
    /* 127 */
    "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
    /* 128 */
    "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
    /* 129 */
    "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
    /* 130 */
    "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
    /* 131 */
    "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
    /* 132 */
    "geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE",
    /* 133 */ "geocollz ::= GEOJSON_GEOMETRYCOLLECTION geocoll_textz",
    /* 134 */
    "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
    /* 135 */
    "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
    /* 136 */
    "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
    /* 137 */
    "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
    /* 138 */
    "geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE",
    /* 139 */
    "geocoll_text ::= GEOJSON_OPEN_BRACKET coll_point geocoll_text2 GEOJSON_CLOSE_BRACKET",
    /* 140 */
    "geocoll_text ::= GEOJSON_OPEN_BRACKET coll_linestring geocoll_text2 GEOJSON_CLOSE_BRACKET",
    /* 141 */
    "geocoll_text ::= GEOJSON_OPEN_BRACKET coll_polygon geocoll_text2 GEOJSON_CLOSE_BRACKET",
    /* 142 */ "geocoll_text2 ::=",
    /* 143 */ "geocoll_text2 ::= GEOJSON_COMMA coll_point geocoll_text2",
    /* 144 */ "geocoll_text2 ::= GEOJSON_COMMA coll_linestring geocoll_text2",
    /* 145 */ "geocoll_text2 ::= GEOJSON_COMMA coll_polygon geocoll_text2",
    /* 146 */
    "geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_pointz geocoll_textz2 GEOJSON_CLOSE_BRACKET",
    /* 147 */
    "geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_linestringz geocoll_textz2 GEOJSON_CLOSE_BRACKET",
    /* 148 */
    "geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_polygonz geocoll_textz2 GEOJSON_CLOSE_BRACKET",
    /* 149 */ "geocoll_textz2 ::=",
    /* 150 */ "geocoll_textz2 ::= GEOJSON_COMMA coll_pointz geocoll_textz2",
    /* 151 */
    "geocoll_textz2 ::= GEOJSON_COMMA coll_linestringz geocoll_textz2",
    /* 152 */ "geocoll_textz2 ::= GEOJSON_COMMA coll_polygonz geocoll_textz2",
    /* 153 */
    "coll_point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE",
    /* 154 */
    "coll_pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE",
    /* 155 */
    "coll_linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE",
    /* 156 */
    "coll_linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE",
    /* 157 */
    "coll_polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE",
    /* 158 */
    "coll_polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.
*/
static void
yyGrowStack (yyParser * p)
{
    int newSize;
    yyStackEntry *pNew;

    newSize = p->yystksz * 2 + 100;
    pNew = realloc (p->yystack, newSize * sizeof (pNew[0]));
    if (pNew)
      {
	  p->yystack = pNew;
	  p->yystksz = newSize;
#ifndef NDEBUG
	  if (yyTraceFILE)
	    {
		fprintf (yyTraceFILE, "%sStack grows to %d entries!\n",
			 yyTracePrompt, p->yystksz);
	    }
#endif
      }
}
#endif

/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *
ParseAlloc (void *(*mallocProc) (size_t))
{
    yyParser *pParser;
    pParser = (yyParser *) (*mallocProc) ((size_t) sizeof (yyParser));
    if (pParser)
      {
	  pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
	  pParser->yyidxMax = 0;
#endif
#if YYSTACKDEPTH<=0
	  pParser->yystack = NULL;
	  pParser->yystksz = 0;
	  yyGrowStack (pParser);
#endif
      }
    return pParser;
}

/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
static void
yy_destructor (yyParser * yypParser,	/* The parser */
	       YYCODETYPE yymajor,	/* Type code for object to destroy */
	       YYMINORTYPE * yypminor	/* The object to be destroyed */
    )
{
    switch (yymajor)
      {
	  /* Here is inserted the actions which take place when a
	   ** terminal or non-terminal is destroyed.  This can happen
	   ** when the symbol is popped from the stack during a
	   ** reduce or during error processing or when a parser is 
	   ** being destroyed before it is finished parsing.
	   **
	   ** Note: during a reduce, the only symbols destroyed are those
	   ** which appear on the RHS of the rule, but which are not used
	   ** inside the C code.
	   */
      default:
	  break;		/* If no destructor action specified: do nothing */
      }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
**
** Return the major token number for the symbol popped.
*/
static int
yy_pop_parser_stack (yyParser * pParser)
{
    YYCODETYPE yymajor;
    yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

    if (pParser->yyidx < 0)
	return 0;
#ifndef NDEBUG
    if (yyTraceFILE && pParser->yyidx >= 0)
      {
	  fprintf (yyTraceFILE, "%sPopping %s\n",
		   yyTracePrompt, yyTokenName[yytos->major]);
      }
#endif
    yymajor = yytos->major;
    yy_destructor (pParser, yymajor, &yytos->minor);
    pParser->yyidx--;
    return yymajor;
}

/* 
** Deallocate and destroy a parser.  Destructors are all called for
** all stack elements before shutting the parser down.
**
** Inputs:
** <ul>
** <li>  A pointer to the parser.  This should be a pointer
**       obtained from ParseAlloc.
** <li>  A pointer to a function used to reclaim memory obtained
**       from malloc.
** </ul>
*/
void
ParseFree (void *p,		/* The parser to be deleted */
	   void (*freeProc) (void *)	/* Function used to reclaim memory */
    )
{
    yyParser *pParser = (yyParser *) p;
    if (pParser == 0)
	return;
    while (pParser->yyidx >= 0)
	yy_pop_parser_stack (pParser);
#if YYSTACKDEPTH<=0
    free (pParser->yystack);
#endif
    (*freeProc) ((void *) pParser);
}

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int
ParseStackPeak (void *p)
{
    yyParser *pParser = (yyParser *) p;
    return pParser->yyidxMax;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_shift_action (yyParser * pParser,	/* The parser */
		      YYCODETYPE iLookAhead	/* The look-ahead token */
    )
{
    int i;
    int stateno = pParser->yystack[pParser->yyidx].stateno;

    if (stateno > YY_SHIFT_MAX
	|| (i = yy_shift_ofst[stateno]) == YY_SHIFT_USE_DFLT)
      {
	  return yy_default[stateno];
      }
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  if (iLookAhead > 0)
	    {
#ifdef YYFALLBACK
		YYCODETYPE iFallback;	/* Fallback token */
		if (iLookAhead < sizeof (yyFallback) / sizeof (yyFallback[0])
		    && (iFallback = yyFallback[iLookAhead]) != 0)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sFALLBACK %s => %s\n",
				     yyTracePrompt, yyTokenName[iLookAhead],
				     yyTokenName[iFallback]);
			}
#endif
		      return yy_find_shift_action (pParser, iFallback);
		  }
#endif
#ifdef YYWILDCARD
		{
		    int j = i - iLookAhead + YYWILDCARD;
		    if (j >= 0 && j < YY_SZ_ACTTAB
			&& yy_lookahead[j] == YYWILDCARD)
		      {
#ifndef NDEBUG
			  if (yyTraceFILE)
			    {
				fprintf (yyTraceFILE, "%sWILDCARD %s => %s\n",
					 yyTracePrompt, yyTokenName[iLookAhead],
					 yyTokenName[YYWILDCARD]);
			    }
#endif /* NDEBUG */
			  return yy_action[j];
		      }
		}
#endif /* YYWILDCARD */
	    }
	  return yy_default[stateno];
      }
    else
      {
	  return yy_action[i];
      }



}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_reduce_action (int stateno,	/* Current state number */
		       YYCODETYPE iLookAhead	/* The look-ahead token */

    )
{
    int i;
#ifdef YYERRORSYMBOL

    if (stateno > YY_REDUCE_MAX)
      {
	  return yy_default[stateno];
      }
#else

    assert (stateno <= YY_REDUCE_MAX);
#endif
    i = yy_reduce_ofst[stateno];

    assert (i != YY_REDUCE_USE_DFLT);
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
#ifdef YYERRORSYMBOL

    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  return yy_default[stateno];
      }
#else

    assert (i >= 0 && i < YY_SZ_ACTTAB);
    assert (yy_lookahead[i] == iLookAhead);
#endif
    return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void
yyStackOverflow (yyParser * yypParser, YYMINORTYPE * yypMinor)
{
    ParseARG_FETCH;
    yypParser->yyidx--;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sStack Overflow!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will execute if the parser
     ** stack every overflows */


    spatialite_e ("Giving up.  Parser stack overflow\n");

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument var */
}






















/*
** Perform a shift action.
*/
static void
yy_shift (yyParser * yypParser,	/* The parser to be shifted */
	  int yyNewState,	/* The new state to shift in */
	  int yyMajor,		/* The major token to shift in */
	  YYMINORTYPE * yypMinor	/* Pointer to the minor token to shift in */
    )
{
    yyStackEntry *yytos;
    yypParser->yyidx++;
#ifdef YYTRACKMAXSTACKDEPTH
    if (yypParser->yyidx > yypParser->yyidxMax)
      {
	  yypParser->yyidxMax = yypParser->yyidx;
      }
#endif
#if YYSTACKDEPTH>0
    if (yypParser->yyidx >= YYSTACKDEPTH)
      {
	  yyStackOverflow (yypParser, yypMinor);
	  return;
      }
#else
    if (yypParser->yyidx >= yypParser->yystksz)
      {
	  yyGrowStack (yypParser);
	  if (yypParser->yyidx >= yypParser->yystksz)
	    {
		yyStackOverflow (yypParser, yypMinor);
		return;
	    }
      }
#endif
    yytos = &yypParser->yystack[yypParser->yyidx];
    yytos->stateno = (YYACTIONTYPE) yyNewState;
    yytos->major = (YYCODETYPE) yyMajor;
    yytos->minor = *yypMinor;
#ifndef NDEBUG
    if (yyTraceFILE && yypParser->yyidx > 0)
      {
	  int i;
	  fprintf (yyTraceFILE, "%sShift %d\n", yyTracePrompt, yyNewState);
	  fprintf (yyTraceFILE, "%sStack:", yyTracePrompt);
	  for (i = 1; i <= yypParser->yyidx; i++)
	      fprintf (yyTraceFILE, " %s",
		       yyTokenName[yypParser->yystack[i].major]);
	  fprintf (yyTraceFILE, "\n");
      }
#endif
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct
{
    YYCODETYPE lhs;		/* Symbol on the left-hand side of the rule */
    unsigned char nrhs;		/* Number of right-hand side symbols in the rule */
} yyRuleInfo[] =
{
    {
    26, 1},
    {
    27, 0},
    {
    27, 3},
    {
    28, 1},
    {
    29, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    30, 1},
    {
    31, 9},
    {
    31, 15},
    {
    31, 13},
    {
    31, 13},
    {
    31, 19},
    {
    31, 19},
    {
    32, 9},
    {
    32, 15},
    {
    32, 13},
    {
    32, 13},
    {
    31, 19},
    {
    31, 19},
    {
    46, 7},
    {
    47, 13},
    {
    48, 13},
    {
    45, 5},
    {
    49, 7},
    {
    50, 1},
    {
    51, 1},
    {
    52, 1},
    {
    53, 0},
    {
    53, 3},
    {
    54, 0},
    {
    54, 3},
    {
    33, 9},
    {
    33, 15},
    {
    33, 13},
    {
    33, 13},
    {
    33, 19},
    {
    33, 19},
    {
    34, 9},
    {
    34, 15},
    {
    34, 13},
    {
    34, 13},
    {
    34, 19},
    {
    34, 19},
    {
    55, 6},
    {
    56, 6},
    {
    35, 9},
    {
    35, 15},
    {
    35, 13},
    {
    35, 13},
    {
    35, 19},
    {
    35, 19},
    {
    36, 9},
    {
    36, 15},
    {
    36, 13},
    {
    36, 13},
    {
    36, 19},
    {
    36, 19},
    {
    57, 4},
    {
    58, 4},
    {
    59, 10},
    {
    60, 0},
    {
    60, 3},
    {
    61, 10},
    {
    62, 0},
    {
    62, 3},
    {
    37, 9},
    {
    37, 15},
    {
    37, 13},
    {
    37, 13},
    {
    37, 19},
    {
    37, 19},
    {
    38, 9},
    {
    38, 15},
    {
    38, 13},
    {
    38, 13},
    {
    38, 19},
    {
    38, 19},
    {
    63, 4},
    {
    64, 4},
    {
    39, 9},
    {
    39, 15},
    {
    39, 13},
    {
    39, 13},
    {
    39, 19},
    {
    39, 19},
    {
    40, 9},
    {
    40, 15},
    {
    40, 13},
    {
    40, 13},
    {
    40, 19},
    {
    40, 19},
    {
    65, 4},
    {
    67, 0},
    {
    67, 3},
    {
    66, 4},
    {
    68, 0},
    {
    68, 3},
    {
    41, 9},
    {
    41, 15},
    {
    41, 13},
    {
    41, 13},
    {
    41, 19},
    {
    41, 19},
    {
    42, 9},
    {
    42, 15},
    {
    42, 13},
    {
    42, 13},
    {
    42, 19},
    {
    42, 19},
    {
    69, 4},
    {
    71, 0},
    {
    71, 3},
    {
    70, 4},
    {
    72, 0},
    {
    72, 3},
    {
    43, 9},
    {
    43, 15},
    {
    43, 13},
    {
    43, 13},
    {
    43, 19},
    {
    43, 19},
    {
    44, 2},
    {
    44, 15},
    {
    44, 13},
    {
    44, 13},
    {
    44, 19},
    {
    44, 19},
    {
    73, 4},
    {
    73, 4},
    {
    73, 4},
    {
    76, 0},
    {
    76, 3},
    {
    76, 3},
    {
    76, 3},
    {
    74, 4},
    {
    74, 4},
    {
    74, 4},
    {
    80, 0},
    {
    80, 3},
    {
    80, 3},
    {
    80, 3},
    {
    75, 9},
    {
    79, 9},
    {
    77, 9},
    {
    81, 9},
    {
    78, 9},
    {
82, 9},};

static void yy_accept (yyParser *);	/* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
*/
static void
yy_reduce (yyParser * yypParser,	/* The parser */
	   int yyruleno		/* Number of the rule by which to reduce */
    )
{
    int yygoto;			/* The next state */
    int yyact;			/* The next action */
    YYMINORTYPE yygotominor;	/* The LHS of the rule reduced */
    yyStackEntry *yymsp;	/* The top of the parser's stack */
    int yysize;			/* Amount to pop the stack */
    ParseARG_FETCH;
    yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
    if (yyTraceFILE && yyruleno >= 0
	&& yyruleno < (int) (sizeof (yyRuleName) / sizeof (yyRuleName[0])))
      {
	  fprintf (yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
		   yyRuleName[yyruleno]);
      }
#endif /* NDEBUG */

    /* Silence complaints from purify about yygotominor being uninitialized
     ** in some cases when it is copied into the stack after the following
     ** switch.  yygotominor is uninitialized when a rule reduces that does
     ** not set the value of its left-hand side nonterminal.  Leaving the
     ** value of the nonterminal uninitialized is utterly harmless as long
     ** as the value is never used.  So really the only thing this code
     ** accomplishes is to quieten purify.  
     **
     ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
     ** without this code, their parser segfaults.  I'm not sure what there
     ** parser is doing to make this happen.  This is the second bug report
     ** from wireshark this week.  Clearly they are stressing Lemon in ways
     ** that it has not been previously stressed...  (SQLite ticket #2172)
     */
    /*memset(&yygotominor, 0, sizeof(yygotominor)); */
    yygotominor = yyzerominor;


    switch (yyruleno)
      {
	  /* Beginning here are the reduction cases.  A typical example
	   ** follows:
	   **   case 0:
	   **  #line <lineno> <grammarfile>
	   **     { ... }           // User supplied code
	   **  #line <lineno> <thisfile>
	   **     break;
	   */
      case 5:			/* geo_text ::= point */
      case 6:			/* geo_text ::= pointz */
	  yytestcase (yyruleno == 6);
      case 7:			/* geo_text ::= linestring */
	  yytestcase (yyruleno == 7);
      case 8:			/* geo_text ::= linestringz */
	  yytestcase (yyruleno == 8);
      case 9:			/* geo_text ::= polygon */
	  yytestcase (yyruleno == 9);
      case 10:			/* geo_text ::= polygonz */
	  yytestcase (yyruleno == 10);
      case 11:			/* geo_text ::= multipoint */
	  yytestcase (yyruleno == 11);
      case 12:			/* geo_text ::= multipointz */
	  yytestcase (yyruleno == 12);
      case 13:			/* geo_text ::= multilinestring */
	  yytestcase (yyruleno == 13);
      case 14:			/* geo_text ::= multilinestringz */
	  yytestcase (yyruleno == 14);
      case 15:			/* geo_text ::= multipolygon */
	  yytestcase (yyruleno == 15);
      case 16:			/* geo_text ::= multipolygonz */
	  yytestcase (yyruleno == 16);
      case 17:			/* geo_text ::= geocoll */
	  yytestcase (yyruleno == 17);
      case 18:			/* geo_text ::= geocollz */
	  yytestcase (yyruleno == 18);
	  {
	      p_data->result = yymsp[0].minor.yy0;
	  }
	  break;
      case 19:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 20:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 20);
      case 25:			/* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 25);
      case 26:			/* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 26);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPoint (p_data,
					      (gaiaPointPtr) yymsp[-1].minor.
					      yy0);
	  }
	  break;
      case 21:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 22:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 22);
      case 27:			/* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 27);
      case 28:			/* pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 28);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPointSrid (p_data,
						  (gaiaPointPtr)
						  yymsp[-1].minor.yy0,
						  (int *) yymsp[-5].minor.yy0);
	  }
	  break;
      case 23:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 24:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 24);
      case 29:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 29);
      case 30:			/* point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 30);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPointSrid (p_data,
						  (gaiaPointPtr)
						  yymsp[-1].minor.yy0,
						  (int *) yymsp[-11].minor.yy0);
	  }
	  break;
      case 32:			/* short_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON short_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE */
      case 33:			/* long_crs ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_NAME GEOJSON_COMMA GEOJSON_PROPS GEOJSON_COLON GEOJSON_OPEN_BRACE GEOJSON_NAME GEOJSON_COLON long_srid GEOJSON_CLOSE_BRACE GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 33);
	  {
	      yygotominor.yy0 = yymsp[-2].minor.yy0;
	  }
	  break;
      case 34:			/* point_coordxy ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) geoJSON_point_xy (p_data,
					     (double *) yymsp[-3].minor.yy0,
					     (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 35:			/* point_coordxyz ::= GEOJSON_OPEN_BRACKET coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) geoJSON_point_xyz (p_data,
					      (double *) yymsp[-5].minor.yy0,
					      (double *) yymsp[-3].minor.yy0,
					      (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 36:			/* coord ::= GEOJSON_NUM */
      case 37:			/* short_srid ::= GEOJSON_SHORT_SRID */
	  yytestcase (yyruleno == 37);
      case 38:			/* long_srid ::= GEOJSON_LONG_SRID */
	  yytestcase (yyruleno == 38);
      case 133:		/* geocollz ::= GEOJSON_GEOMETRYCOLLECTION geocoll_textz */
	  yytestcase (yyruleno == 133);
	  {
	      yygotominor.yy0 = yymsp[0].minor.yy0;
	  }
	  break;
      case 39:			/* extra_pointsxy ::= */
      case 41:			/* extra_pointsxyz ::= */
	  yytestcase (yyruleno == 41);
      case 72:			/* extra_rings ::= */
	  yytestcase (yyruleno == 72);
      case 75:			/* extra_ringsz ::= */
	  yytestcase (yyruleno == 75);
      case 104:		/* multilinestring_text2 ::= */
	  yytestcase (yyruleno == 104);
      case 107:		/* multilinestring_textz2 ::= */
	  yytestcase (yyruleno == 107);
      case 122:		/* multipolygon_text2 ::= */
	  yytestcase (yyruleno == 122);
      case 125:		/* multipolygon_textz2 ::= */
	  yytestcase (yyruleno == 125);
      case 142:		/* geocoll_text2 ::= */
	  yytestcase (yyruleno == 142);
      case 149:		/* geocoll_textz2 ::= */
	  yytestcase (yyruleno == 149);
	  {
	      yygotominor.yy0 = NULL;
	  }
	  break;
      case 40:			/* extra_pointsxy ::= GEOJSON_COMMA point_coordxy extra_pointsxy */
      case 42:			/* extra_pointsxyz ::= GEOJSON_COMMA point_coordxyz extra_pointsxyz */
	  yytestcase (yyruleno == 42);
	  {
	      ((gaiaPointPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 43:			/* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 44:			/* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 44);
      case 49:			/* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 49);
      case 50:			/* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 50);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromLinestring (p_data,
						   (gaiaLinestringPtr)
						   yymsp[-1].minor.yy0);
	  }
	  break;
      case 45:			/* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 46:			/* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 46);
      case 51:			/* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 51);
      case 52:			/* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 52);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromLinestringSrid (p_data,
						       (gaiaLinestringPtr)
						       yymsp[-1].minor.yy0,
						       (int *) yymsp[-5].minor.
						       yy0);
	  }
	  break;
      case 47:			/* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 48:			/* linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 48);
      case 53:			/* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 53);
      case 54:			/* linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 54);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromLinestringSrid (p_data,
						       (gaiaLinestringPtr)
						       yymsp[-1].minor.yy0,
						       (int *) yymsp[-11].minor.
						       yy0);
	  }
	  break;
      case 55:			/* linestring_text ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_linestring_xy (p_data,
						  (gaiaPointPtr)
						  yymsp[-4].minor.yy0);
	  }
	  break;
      case 56:			/* linestring_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_linestring_xyz (p_data,
						   (gaiaPointPtr)
						   yymsp[-4].minor.yy0);
	  }
	  break;
      case 57:			/* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 58:			/* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 58);
      case 63:			/* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 63);
      case 64:			/* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 64);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPolygon (p_data,
						(gaiaPolygonPtr)
						yymsp[-1].minor.yy0);
	  }
	  break;
      case 59:			/* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 60:			/* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 60);
      case 65:			/* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 65);
      case 66:			/* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 66);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPolygonSrid (p_data,
						    (gaiaPolygonPtr)
						    yymsp[-1].minor.yy0,
						    (int *) yymsp[-5].minor.
						    yy0);
	  }
	  break;
      case 61:			/* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 62:			/* polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 62);
      case 67:			/* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 67);
      case 68:			/* polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 68);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPolygonSrid (p_data,
						    (gaiaPolygonPtr)
						    yymsp[-1].minor.yy0,
						    (int *) yymsp[-11].minor.
						    yy0);
	  }
	  break;
      case 69:			/* polygon_text ::= GEOJSON_OPEN_BRACKET ring extra_rings GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_polygon_xy (p_data,
					       (gaiaRingPtr) yymsp[-2].minor.
					       yy0);
	  }
	  break;
      case 70:			/* polygon_textz ::= GEOJSON_OPEN_BRACKET ringz extra_ringsz GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_polygon_xyz (p_data,
						(gaiaRingPtr) yymsp[-2].minor.
						yy0);
	  }
	  break;
      case 71:			/* ring ::= GEOJSON_OPEN_BRACKET point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy GEOJSON_COMMA point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_ring_xy (p_data,
					    (gaiaPointPtr) yymsp[-8].minor.yy0);
	  }
	  break;
      case 73:			/* extra_rings ::= GEOJSON_COMMA ring extra_rings */
      case 76:			/* extra_ringsz ::= GEOJSON_COMMA ringz extra_ringsz */
	  yytestcase (yyruleno == 76);
	  {
	      ((gaiaRingPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 74:			/* ringz ::= GEOJSON_OPEN_BRACKET point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz GEOJSON_COMMA point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_ring_xyz (p_data,
					     (gaiaPointPtr) yymsp[-8].minor.
					     yy0);
	  }
	  break;
      case 77:			/* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 78:			/* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 78);
      case 83:			/* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 83);
      case 84:			/* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 84);
      case 91:			/* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 91);
      case 92:			/* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 92);
      case 97:			/* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 97);
      case 98:			/* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 98);
      case 109:		/* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 109);
      case 110:		/* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 110);
      case 115:		/* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 115);
      case 116:		/* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 116);
      case 127:		/* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 127);
      case 128:		/* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 128);
      case 134:		/* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 134);
	  {
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 79:			/* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 80:			/* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 80);
      case 85:			/* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 85);
      case 86:			/* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 86);
      case 93:			/* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 93);
      case 94:			/* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 94);
      case 99:			/* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 99);
      case 100:		/* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 100);
      case 111:		/* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 111);
      case 112:		/* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 112);
      case 117:		/* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 117);
      case 118:		/* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 118);
      case 129:		/* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 129);
      case 130:		/* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 130);
      case 135:		/* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 135);
      case 136:		/* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 136);
	  {
	      yygotominor.yy0 =
		  (void *) geoJSON_setSrid ((gaiaGeomCollPtr) yymsp[-1].minor.
					    yy0, (int *) yymsp[-5].minor.yy0);
	  }
	  break;
      case 81:			/* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
      case 82:			/* multipoint ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 82);
      case 87:			/* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 87);
      case 88:			/* multipointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOINT GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipoint_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 88);
      case 95:			/* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 95);
      case 96:			/* multilinestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 96);
      case 101:		/* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 101);
      case 102:		/* multilinestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTILINESTRING GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multilinestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 102);
      case 113:		/* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 113);
      case 114:		/* multipolygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 114);
      case 119:		/* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 119);
      case 120:		/* multipolygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_MULTIPOLYGON GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON multipolygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 120);
      case 131:		/* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 131);
      case 132:		/* geocoll ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_text GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 132);
      case 137:		/* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON short_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 137);
      case 138:		/* geocollz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_GEOMETRYCOLLECTION GEOJSON_COMMA GEOJSON_CRS GEOJSON_COLON long_crs GEOJSON_COMMA GEOJSON_BBOX GEOJSON_COLON GEOJSON_OPEN_BRACKET bbox GEOJSON_CLOSE_BRACKET GEOJSON_COMMA GEOJSON_GEOMS GEOJSON_COLON geocoll_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 138);
	  {
	      yygotominor.yy0 =
		  (void *) geoJSON_setSrid ((gaiaGeomCollPtr) yymsp[-1].minor.
					    yy0, (int *) yymsp[-11].minor.yy0);
	  }
	  break;
      case 89:			/* multipoint_text ::= GEOJSON_OPEN_BRACKET point_coordxy extra_pointsxy GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_multipoint_xy (p_data,
						  (gaiaPointPtr)
						  yymsp[-2].minor.yy0);
	  }
	  break;
      case 90:			/* multipoint_textz ::= GEOJSON_OPEN_BRACKET point_coordxyz extra_pointsxyz GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_multipoint_xyz (p_data,
						   (gaiaPointPtr)
						   yymsp[-2].minor.yy0);
	  }
	  break;
      case 103:		/* multilinestring_text ::= GEOJSON_OPEN_BRACKET linestring_text multilinestring_text2 GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_multilinestring_xy (p_data,
						       (gaiaLinestringPtr)
						       yymsp[-2].minor.yy0);
	  }
	  break;
      case 105:		/* multilinestring_text2 ::= GEOJSON_COMMA linestring_text multilinestring_text2 */
      case 108:		/* multilinestring_textz2 ::= GEOJSON_COMMA linestring_textz multilinestring_textz2 */
	  yytestcase (yyruleno == 108);
	  {
	      ((gaiaLinestringPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 106:		/* multilinestring_textz ::= GEOJSON_OPEN_BRACKET linestring_textz multilinestring_textz2 GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_multilinestring_xyz (p_data,
							(gaiaLinestringPtr)
							yymsp[-2].minor.yy0);
	  }
	  break;
      case 121:		/* multipolygon_text ::= GEOJSON_OPEN_BRACKET polygon_text multipolygon_text2 GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_multipolygon_xy (p_data,
						    (gaiaPolygonPtr)
						    yymsp[-2].minor.yy0);
	  }
	  break;
      case 123:		/* multipolygon_text2 ::= GEOJSON_COMMA polygon_text multipolygon_text2 */
      case 126:		/* multipolygon_textz2 ::= GEOJSON_COMMA polygon_textz multipolygon_textz2 */
	  yytestcase (yyruleno == 126);
	  {
	      ((gaiaPolygonPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 124:		/* multipolygon_textz ::= GEOJSON_OPEN_BRACKET polygon_textz multipolygon_textz2 GEOJSON_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_multipolygon_xyz (p_data,
						     (gaiaPolygonPtr)
						     yymsp[-2].minor.yy0);
	  }
	  break;
      case 139:		/* geocoll_text ::= GEOJSON_OPEN_BRACKET coll_point geocoll_text2 GEOJSON_CLOSE_BRACKET */
      case 140:		/* geocoll_text ::= GEOJSON_OPEN_BRACKET coll_linestring geocoll_text2 GEOJSON_CLOSE_BRACKET */
	  yytestcase (yyruleno == 140);
      case 141:		/* geocoll_text ::= GEOJSON_OPEN_BRACKET coll_polygon geocoll_text2 GEOJSON_CLOSE_BRACKET */
	  yytestcase (yyruleno == 141);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_geomColl_xy (p_data,
						(gaiaGeomCollPtr)
						yymsp[-2].minor.yy0);
	  }
	  break;
      case 143:		/* geocoll_text2 ::= GEOJSON_COMMA coll_point geocoll_text2 */
      case 144:		/* geocoll_text2 ::= GEOJSON_COMMA coll_linestring geocoll_text2 */
	  yytestcase (yyruleno == 144);
      case 145:		/* geocoll_text2 ::= GEOJSON_COMMA coll_polygon geocoll_text2 */
	  yytestcase (yyruleno == 145);
      case 150:		/* geocoll_textz2 ::= GEOJSON_COMMA coll_pointz geocoll_textz2 */
	  yytestcase (yyruleno == 150);
      case 151:		/* geocoll_textz2 ::= GEOJSON_COMMA coll_linestringz geocoll_textz2 */
	  yytestcase (yyruleno == 151);
      case 152:		/* geocoll_textz2 ::= GEOJSON_COMMA coll_polygonz geocoll_textz2 */
	  yytestcase (yyruleno == 152);
	  {
	      ((gaiaGeomCollPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 146:		/* geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_pointz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
      case 147:		/* geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_linestringz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
	  yytestcase (yyruleno == 147);
      case 148:		/* geocoll_textz ::= GEOJSON_OPEN_BRACKET coll_polygonz geocoll_textz2 GEOJSON_CLOSE_BRACKET */
	  yytestcase (yyruleno == 148);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) geoJSON_geomColl_xyz (p_data,
						 (gaiaGeomCollPtr)
						 yymsp[-2].minor.yy0);
	  }
	  break;
      case 153:		/* coll_point ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxy GEOJSON_CLOSE_BRACE */
      case 154:		/* coll_pointz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POINT GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON point_coordxyz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 154);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPoint (p_data,
					      (gaiaPointPtr) yymsp[-1].minor.
					      yy0);
	  }
	  break;
      case 155:		/* coll_linestring ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_text GEOJSON_CLOSE_BRACE */
      case 156:		/* coll_linestringz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_LINESTRING GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON linestring_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 156);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromLinestring (p_data,
						   (gaiaLinestringPtr)
						   yymsp[-1].minor.yy0);
	  }
	  break;
      case 157:		/* coll_polygon ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_text GEOJSON_CLOSE_BRACE */
      case 158:		/* coll_polygonz ::= GEOJSON_OPEN_BRACE GEOJSON_TYPE GEOJSON_COLON GEOJSON_POLYGON GEOJSON_COMMA GEOJSON_COORDS GEOJSON_COLON polygon_textz GEOJSON_CLOSE_BRACE */
	  yytestcase (yyruleno == 158);
	  {
	      yygotominor.yy0 =
		  geoJSON_buildGeomFromPolygon (p_data,
						(gaiaPolygonPtr)
						yymsp[-1].minor.yy0);
	  }
	  break;
      default:
	  /* (0) main ::= in */ yytestcase (yyruleno == 0);
	  /* (1) in ::= */ yytestcase (yyruleno == 1);
	  /* (2) in ::= in state GEOJSON_NEWLINE */ yytestcase (yyruleno == 2);
	  /* (3) state ::= program */ yytestcase (yyruleno == 3);
	  /* (4) program ::= geo_text */ yytestcase (yyruleno == 4);
	  /* (31) bbox ::= coord GEOJSON_COMMA coord GEOJSON_COMMA coord GEOJSON_COMMA coord */
	  yytestcase (yyruleno == 31);
	  break;
      };
    yygoto = yyRuleInfo[yyruleno].lhs;
    yysize = yyRuleInfo[yyruleno].nrhs;
    yypParser->yyidx -= yysize;
    yyact = yy_find_reduce_action (yymsp[-yysize].stateno, (YYCODETYPE) yygoto);
    if (yyact < YYNSTATE)
      {
#ifdef NDEBUG
	  /* If we are not debugging and the reduce action popped at least
	   ** one element off the stack, then we can push the new element back
	   ** onto the stack here, and skip the stack overflow test in yy_shift().
	   ** That gives a significant speed improvement. */
	  if (yysize)
	    {
		yypParser->yyidx++;
		yymsp -= yysize - 1;
		yymsp->stateno = (YYACTIONTYPE) yyact;
		yymsp->major = (YYCODETYPE) yygoto;
		yymsp->minor = yygotominor;
	    }
	  else
#endif
	    {
		yy_shift (yypParser, yyact, yygoto, &yygotominor);
	    }
      }
    else
      {
	  assert (yyact == YYNSTATE + YYNRULE + 1);
	  yy_accept (yypParser);
      }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void
yy_parse_failed (yyParser * yypParser	/* The parser */
    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sFail!\n", yyTracePrompt);
      }
#endif
    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser fails */
    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void
yy_syntax_error (yyParser * yypParser,	/* The parser */
		 int yymajor,	/* The major type of the error token */
		 YYMINORTYPE yyminor	/* The minor type of the error token */

    )
{
    ParseARG_FETCH;
#define TOKEN (yyminor.yy0)


/* 
** when the LEMON parser encounters an error
** then this global variable is set 
*/
    p_data->geoJson_parse_error = 1;
    p_data->result = NULL;

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void
yy_accept (yyParser * yypParser	/* The parser */

    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)

      {
	  fprintf (yyTraceFILE, "%sAccept!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)

	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser accepts */


    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void
Parse (void *yyp,		/* The parser */
       int yymajor,		/* The major token code number */
       ParseTOKENTYPE yyminor	/* The value for the token */
       ParseARG_PDECL		/* Optional %extra_argument parameter */

    )
{
    YYMINORTYPE yyminorunion;
    int yyact;			/* The parser action. */

    int yyendofinput;		/* True if we are at the end of input */

#ifdef YYERRORSYMBOL
    int yyerrorhit = 0;		/* True if yymajor has invoked an error */
#endif
    yyParser *yypParser;	/* The parser */

    /* (re)initialize the parser, if necessary */
    yypParser = (yyParser *) yyp;
    if (yypParser->yyidx < 0)

      {
#if YYSTACKDEPTH<=0
	  if (yypParser->yystksz <= 0)
	    {
		/*memset(&yyminorunion, 0, sizeof(yyminorunion)); */
		yyminorunion = yyzerominor;
		yyStackOverflow (yypParser, &yyminorunion);
		return;
	    }
#endif
	  yypParser->yyidx = 0;
	  yypParser->yyerrcnt = -1;
	  yypParser->yystack[0].stateno = 0;
	  yypParser->yystack[0].major = 0;
      }
    yyminorunion.yy0 = yyminor;
    yyendofinput = (yymajor == 0);
    ParseARG_STORE;

#ifndef NDEBUG
    if (yyTraceFILE)



      {
	  fprintf (yyTraceFILE, "%sInput %s\n", yyTracePrompt,
		   yyTokenName[yymajor]);



      }

#endif

    do
      {
	  yyact = yy_find_shift_action (yypParser, (YYCODETYPE) yymajor);





	  if (yyact < YYNSTATE)
	    {
		assert (!yyendofinput);	/* Impossible to shift the $ token */
		yy_shift (yypParser, yyact, yymajor, &yyminorunion);
		yypParser->yyerrcnt--;

		yymajor = YYNOCODE;




	    }
	  else if (yyact < YYNSTATE + YYNRULE)
	    {
		yy_reduce (yypParser, yyact - YYNSTATE);
	    }
	  else
	    {
		assert (yyact == YY_ERROR_ACTION);

#ifdef YYERRORSYMBOL
		int yymx;
#endif
#ifndef NDEBUG
		if (yyTraceFILE)

		  {
		      fprintf (yyTraceFILE, "%sSyntax Error!\n", yyTracePrompt);
		  }
#endif
#ifdef YYERRORSYMBOL
		/* A syntax error has occurred.
		 ** The response to an error depends upon whether or not the
		 ** grammar defines an error token "ERROR".  
		 **
		 ** This is what we do if the grammar does define ERROR:
		 **
		 **  * Call the %syntax_error function.
		 **
		 **  * Begin popping the stack until we enter a state where
		 **    it is legal to shift the error symbol, then shift
		 **    the error symbol.
		 **
		 **  * Set the error count to three.
		 **
		 **  * Begin accepting and shifting new tokens.  No new error
		 **    processing will occur until three tokens have been
		 **    shifted successfully.
		 **
		 */
		if (yypParser->yyerrcnt < 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yymx = yypParser->yystack[yypParser->yyidx].major;
		if (yymx == YYERRORSYMBOL || yyerrorhit)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sDiscard input token %s\n",
				     yyTracePrompt, yyTokenName[yymajor]);
			}
#endif
		      yy_destructor (yypParser, (YYCODETYPE) yymajor,
				     &yyminorunion);
		      yymajor = YYNOCODE;
		  }
		else

		  {
		      while (yypParser->yyidx >= 0 &&
			     yymx != YYERRORSYMBOL &&
			     (yyact =
			      yy_find_reduce_action (yypParser->yystack
						     [yypParser->yyidx].stateno,
						     YYERRORSYMBOL)) >=

			     YYNSTATE)
			{
			    yy_pop_parser_stack (yypParser);
			}

		      if (yypParser->yyidx < 0 || yymajor == 0)
			{
			    yy_destructor (yypParser, (YYCODETYPE) yymajor,
					   &yyminorunion);
			    yy_parse_failed (yypParser);



			    yymajor = YYNOCODE;
			}
		      else if (yymx != YYERRORSYMBOL)

			{
			    YYMINORTYPE u2;
			    u2.YYERRSYMDT = 0;
			    yy_shift (yypParser, yyact, YYERRORSYMBOL, &u2);
			}
		  }
		yypParser->yyerrcnt = 3;
		yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
		/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
		 ** do any kind of error recovery.  Instead, simply invoke the syntax
		 ** error routine and continue going as if nothing had happened.
		 **
		 ** Applications can set this macro (for example inside %include) if
		 ** they intend to abandon the parse upon the first syntax error seen.
		 */


		yy_syntax_error (yypParser, yymajor, yyminorunion);
		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		yymajor = YYNOCODE;

#else /* YYERRORSYMBOL is not defined */
		/* This is what we do if the grammar does not define ERROR:
		 **
		 **  * Report an error message, and throw away the input token.
		 **
		 **  * If the input token is $, then fail the parse.
		 **
		 ** As before, subsequent error messages are suppressed until
		 ** three input tokens have been successfully shifted.
		 */
		if (yypParser->yyerrcnt <= 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yypParser->yyerrcnt = 3;

		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		if (yyendofinput)
		  {
		      yy_parse_failed (yypParser);



		  }
		yymajor = YYNOCODE;
#endif
	    }









      }



    while (yymajor != YYNOCODE && yypParser->yyidx >= 0);
    return;
}

Changes to src/gaiageo/geoJSON.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#define GEOJSON_NEWLINE                  1
#define GEOJSON_OPEN_BRACE               2
#define GEOJSON_TYPE                     3
#define GEOJSON_COLON                    4
#define GEOJSON_POINT                    5
#define GEOJSON_COMMA                    6
#define GEOJSON_COORDS                   7
#define GEOJSON_CLOSE_BRACE              8
#define GEOJSON_BBOX                     9
#define GEOJSON_OPEN_BRACKET            10
#define GEOJSON_CLOSE_BRACKET           11
#define GEOJSON_CRS                     12
#define GEOJSON_NAME                    13
#define GEOJSON_PROPS                   14
#define GEOJSON_NUM                     15
#define GEOJSON_SHORT_SRID              16
#define GEOJSON_LONG_SRID               17
#define GEOJSON_LINESTRING              18
#define GEOJSON_POLYGON                 19
#define GEOJSON_MULTIPOINT              20
#define GEOJSON_MULTILINESTRING         21
#define GEOJSON_MULTIPOLYGON            22
#define GEOJSON_GEOMETRYCOLLECTION      23
#define GEOJSON_GEOMS                   24
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#define GEOJSON_NEWLINE                 1
#define GEOJSON_OPEN_BRACE              2
#define GEOJSON_TYPE                    3
#define GEOJSON_COLON                   4
#define GEOJSON_POINT                   5
#define GEOJSON_COMMA                   6
#define GEOJSON_COORDS                  7
#define GEOJSON_CLOSE_BRACE             8
#define GEOJSON_BBOX                    9
#define GEOJSON_OPEN_BRACKET           10
#define GEOJSON_CLOSE_BRACKET          11
#define GEOJSON_CRS                    12
#define GEOJSON_NAME                   13
#define GEOJSON_PROPS                  14
#define GEOJSON_NUM                    15
#define GEOJSON_SHORT_SRID             16
#define GEOJSON_LONG_SRID              17
#define GEOJSON_LINESTRING             18
#define GEOJSON_POLYGON                19
#define GEOJSON_MULTIPOINT             20
#define GEOJSON_MULTILINESTRING        21
#define GEOJSON_MULTIPOLYGON           22
#define GEOJSON_GEOMETRYCOLLECTION     23
#define GEOJSON_GEOMS                  24

Changes to src/gaiageo/gg_advanced.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
....
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098

2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
....
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
/*

 gg_advanced.c -- Gaia advanced geometric operations
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gaiageo.h>
#include <spatialite/debug.h>

GAIAGEO_DECLARE double
gaiaMeasureLength (int dims, double *coords, int vert)
{
/* computes the total length */
    double lung = 0.0;
    double xx1;
................................................................................
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaEnsureClosedRings (gaiaGeomCollPtr geom)
{
/* 
/ sanitizes a GEOMETRYCOLLECTION:
/ - ring closure is enforced anyway  
*/
    int iv;
    int ib;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    double last_x = 0.0;
    double last_y = 0.0;
    double last_z = 0.0;
    int points;
    int end_point;
    int enforce;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!geom)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	new_geom = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
	new_geom = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	new_geom = gaiaAllocGeomCollXYZM ();
    else
	new_geom = gaiaAllocGeomColl ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y, point->Z,
				      point->M);
	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoords (new_line, line);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  /* sanitizing EXTERIOR RING */
	  points = i_ring->Points;
	  z = 0.0;
	  m = 0.0;
	  if (i_ring->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (i_ring->Coords, 0, &x, &y, &z);
	    }
	  else if (i_ring->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (i_ring->Coords, 0, &x, &y, &m);
	    }
	  else if (i_ring->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (i_ring->Coords, 0, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (i_ring->Coords, 0, &x, &y);
	    }
	  last_z = 0.0;
	  m = 0.0;
	  end_point = points - 1;
	  if (i_ring->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (i_ring->Coords, end_point, &last_x, &last_y,
				 &last_z);
	    }
	  else if (i_ring->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (i_ring->Coords, end_point, &last_x, &last_y,
				 &m);
	    }
	  else if (i_ring->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (i_ring->Coords, end_point, &last_x, &last_y,
				  &last_z, &m);
	    }
	  else
	    {
		gaiaGetPoint (i_ring->Coords, end_point, &last_x, &last_y);
	    }
	  if (last_x == x && last_y == y && last_z == z)
	      enforce = 0;
	  else
	    {
		/* forcing RING closure */
		enforce = 1;
	    }
	  if (!enforce)
	    {
		/* already closed */
		new_polyg =
		    gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					      polyg->NumInteriors);
		o_ring = new_polyg->Exterior;
		gaiaCopyRingCoords (o_ring, i_ring);
	    }
	  else
	    {
		/* forcing closure */
		new_polyg =
		    gaiaAddPolygonToGeomColl (new_geom, i_ring->Points + 1,
					      polyg->NumInteriors);
		o_ring = new_polyg->Exterior;
		for (iv = 0; iv < i_ring->Points; iv++)
		  {
		      /* inserting points */
		      z = 0.0;
		      m = 0.0;
		      if (i_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y, &z);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (i_ring->Coords, iv, &x, &y, &m);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y, &z,
					      &m);
			}
		      else
			{
			    gaiaGetPoint (i_ring->Coords, iv, &x, &y);
			}
		      if (o_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (o_ring->Coords, iv, x, y, z);
			}
		      else if (o_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaSetPointXYM (o_ring->Coords, iv, x, y, m);
			}
		      else if (o_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaSetPointXYZM (o_ring->Coords, iv, x, y, z, m);
			}
		      else
			{
			    gaiaSetPoint (o_ring->Coords, iv, x, y);
			}
		  }
		/* adding last vertex so to ensure closure */
		z = 0.0;
		m = 0.0;
		if (i_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (i_ring->Coords, 0, &x, &y, &z);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (i_ring->Coords, 0, &x, &y, &m);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (i_ring->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (i_ring->Coords, 0, &x, &y);
		  }
		end_point = o_ring->Points - 1;
		if (o_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (o_ring->Coords, end_point, x, y, z);
		  }
		else if (o_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (o_ring->Coords, end_point, x, y, m);
		  }
		else if (o_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (o_ring->Coords, end_point, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (o_ring->Coords, end_point, x, y);
		  }
	    }

	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		points = i_ring->Points;
		z = 0.0;
		m = 0.0;
		if (i_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (i_ring->Coords, 0, &x, &y, &z);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (i_ring->Coords, 0, &x, &y, &m);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (i_ring->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (i_ring->Coords, 0, &x, &y);
		  }
		last_z = 0.0;
		m = 0.0;
		end_point = points - 1;
		if (i_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (i_ring->Coords, end_point, &last_x,
				       &last_y, &last_z);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (i_ring->Coords, end_point, &last_x,
				       &last_y, &m);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (i_ring->Coords, end_point, &last_x,
					&last_y, &last_z, &m);
		  }
		else
		  {
		      gaiaGetPoint (i_ring->Coords, end_point, &last_x,
				    &last_y);
		  }
		last_z = z;
		if (last_x == x && last_y == y && last_z == z)
		    enforce = 0;
		else
		  {
		      /* forcing RING closure */
		      enforce = 1;
		  }
		if (!enforce)
		  {
		      /* already closed */
		      o_ring =
			  gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		      gaiaCopyRingCoords (o_ring, i_ring);
		  }
		else
		  {
		      /* forcing closure */
		      o_ring =
			  gaiaAddInteriorRing (new_polyg, ib,
					       i_ring->Points + 1);
		      for (iv = 0; iv < i_ring->Points; iv++)
			{
			    /* inserting points */
			    z = 0.0;
			    m = 0.0;
			    if (i_ring->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y,
						   &z);
			      }
			    else if (i_ring->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (i_ring->Coords, iv, &x, &y,
						   &m);
			      }
			    else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y,
						    &z, &m);
			      }
			    else
			      {
				  gaiaGetPoint (i_ring->Coords, iv, &x, &y);
			      }
			    if (o_ring->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (o_ring->Coords, iv, x, y, z);
			      }
			    else if (o_ring->DimensionModel == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (o_ring->Coords, iv, x, y, m);
			      }
			    else if (o_ring->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (o_ring->Coords,
						    iv, x, y, z, m);
			      }
			    else
			      {
				  gaiaSetPoint (o_ring->Coords, iv, x, y);
			      }
			}
		      /* adding last vertex so to ensure closure */
		      z = 0.0;
		      m = 0.0;
		      if (i_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (i_ring->Coords, 0, &x, &y, &z);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (i_ring->Coords, 0, &x, &y, &m);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (i_ring->Coords, 0, &x, &y, &z,
					      &m);
			}
		      else
			{
			    gaiaGetPoint (i_ring->Coords, 0, &x, &y);
			}
		      end_point = o_ring->Points - 1;
		      if (o_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (o_ring->Coords, end_point, x, y,
					     z);
			}
		      else if (o_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaSetPointXYM (o_ring->Coords, end_point, x, y,
					     m);
			}
		      else if (o_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaSetPointXYZM (o_ring->Coords, end_point, x, y,
					      z, m);
			}
		      else
			{
			    gaiaSetPoint (o_ring->Coords, end_point, x, y);
			}
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

static double
point_point_distance (double x1, double y1, double x2, double y2)
{
    return sqrt (((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
}

static int
repeated_matching_point (gaiaGeomCollPtr geom, double x, double y, double z,
			 double tolerance)
{
/* checking for duplicate points - multipoint */
    gaiaPointPtr point;
    point = geom->FirstPoint;
    while (point)
      {
	  if (tolerance <= 0.0)
	    {
		if (point->X == x && point->Y == y && point->Z == z)
		    return 1;
	    }
	  else
	    {
		if (point_point_distance (x, y, point->X, point->Y) <=
		    tolerance)
		    return 1;
	    }
	  point = point->Next;
      }
    return 0;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaRemoveRepeatedPoints (gaiaGeomCollPtr geom, double tolerance)
{
/* 
/ sanitizes a GEOMETRYCOLLECTION:
/ - repeated vertices are omitted 
*/
    int iv;
    int ib;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    double last_x = 0.0;
    double last_y = 0.0;
    double last_z = 0.0;
    int points;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!geom)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	new_geom = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
	new_geom = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	new_geom = gaiaAllocGeomCollXYZM ();
    else
	new_geom = gaiaAllocGeomColl ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  if (!repeated_matching_point
	      (new_geom, point->X, point->Y, point->Z, tolerance))
	      gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y,
					  point->Z, point->M);
	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* sanitizing LINESTRINGs */
	  points = 0;
	  for (iv = 0; iv < line->Points; iv++)
	    {
		/* PASS I - checking points */
		z = 0.0;
		m = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
		  }
		else if (line->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (line->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (line->Coords, iv, &x, &y);
		  }
		if (iv > 0)
		  {
		      if (tolerance <= 0.0)
			{
			    if (last_x == x && last_y == y && last_z == z)
				;
			    else
				points++;
			}
		      else
			{
			    if (point_point_distance (x, y, last_x, last_y) <=
				tolerance)
				;
			    else
				points++;
			}
		  }
		else
		    points++;
		last_x = x;
		last_y = y;
		last_z = z;
	    }
	  if (points < 2)
	    {
		/* illegal LINESTRING - copying the original one */
		new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
		gaiaCopyLinestringCoords (new_line, line);
	    }
	  else
	    {
		/* valid LINESTRING - sanitizing */
		new_line = gaiaAddLinestringToGeomColl (new_geom, points);
		points = 0;
		for (iv = 0; iv < line->Points; iv++)
		  {
		      /* PASS II - inserting points */
		      z = 0.0;
		      m = 0.0;
		      if (line->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
			}
		      else if (line->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
			}
		      else if (line->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (line->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (line->Coords, iv, &x, &y);
			}
		      if (iv > 0)
			{
			    int skip = 0;
			    if (tolerance <= 0.0)
			      {
				  if (last_x == x && last_y == y && last_z == z)
				      skip = 1;
			      }
			    else
			      {
				  if (point_point_distance
				      (x, y, last_x, last_y) <= tolerance)
				      skip = 1;
			      }
			    if (skip)
				;
			    else
			      {
				  if (new_line->DimensionModel == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (new_line->Coords,
							 points, x, y, z);
				    }
				  else if (new_line->DimensionModel ==
					   GAIA_XY_M)
				    {
					gaiaSetPointXYM (new_line->Coords,
							 points, x, y, m);
				    }
				  else if (new_line->DimensionModel ==
					   GAIA_XY_Z_M)
				    {
					gaiaSetPointXYZM (new_line->Coords,
							  points, x, y, z, m);
				    }
				  else
				    {
					gaiaSetPoint (new_line->Coords, points,
						      x, y);
				    }
				  points++;
			      }
			}
		      else
			{
			    if (new_line->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (new_line->Coords, points, x,
						   y, z);
			      }
			    else if (new_line->DimensionModel == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (new_line->Coords, points, x,
						   y, m);
			      }
			    else if (new_line->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (new_line->Coords, points, x,
						    y, z, m);
			      }
			    else
			      {
				  gaiaSetPoint (new_line->Coords, points, x, y);
			      }
			    points++;
			}
		      last_x = x;
		      last_y = y;
		      last_z = z;
		  }
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  /* sanitizing EXTERIOR RING */
	  points = 0;
	  for (iv = 0; iv < i_ring->Points; iv++)
	    {
		/* PASS I - checking points */
		z = 0.0;
		m = 0.0;
		if (i_ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y, &z);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (i_ring->Coords, iv, &x, &y, &m);
		  }
		else if (i_ring->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (i_ring->Coords, iv, &x, &y);
		  }
		if (iv > 0)
		  {
		      if (tolerance <= 0.0)
			{
			    if (last_x == x && last_y == y && last_z == z)
				;
			    else
				points++;
			}
		      else
			{
			    if (point_point_distance (x, y, last_x, last_y) <=
				tolerance)
				;
			    else
				points++;
			}
		  }
		else
		    points++;
		last_x = x;
		last_y = y;
		last_z = z;
	    }
	  if (points < 4)
	    {
		/* illegal RING - copying the original one */
		new_polyg =
		    gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					      polyg->NumInteriors);
		o_ring = new_polyg->Exterior;
		gaiaCopyRingCoords (o_ring, i_ring);
	    }
	  else
	    {
		/* valid RING - sanitizing */
		new_polyg =
		    gaiaAddPolygonToGeomColl (new_geom, points,
					      polyg->NumInteriors);
		o_ring = new_polyg->Exterior;
		points = 0;
		for (iv = 0; iv < i_ring->Points; iv++)
		  {
		      /* PASS II - inserting points */
		      z = 0.0;
		      m = 0.0;
		      if (i_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y, &z);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (i_ring->Coords, iv, &x, &y, &m);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y, &z,
					      &m);
			}
		      else
			{
			    gaiaGetPoint (i_ring->Coords, iv, &x, &y);
			}
		      if (iv > 0)
			{
			    int skip = 0;
			    if (tolerance <= 0.0)
			      {
				  if (last_x == x && last_y == y && last_z == z)
				      skip = 1;
			      }
			    else
			      {
				  if (point_point_distance
				      (x, y, last_x, last_y) <= tolerance)
				      skip = 1;
			      }
			    if (skip)
				;
			    else
			      {
				  if (o_ring->DimensionModel == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (o_ring->Coords, points,
							 x, y, z);
				    }
				  else if (o_ring->DimensionModel == GAIA_XY_M)
				    {
					gaiaSetPointXYM (o_ring->Coords, points,
							 x, y, m);
				    }
				  else if (o_ring->DimensionModel ==
					   GAIA_XY_Z_M)
				    {
					gaiaSetPointXYZM (o_ring->Coords,
							  points, x, y, z, m);
				    }
				  else
				    {
					gaiaSetPoint (o_ring->Coords, points, x,
						      y);
				    }
				  points++;
			      }
			}
		      else
			{
			    if (o_ring->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (o_ring->Coords, points, x,
						   y, z);
			      }
			    else if (o_ring->DimensionModel == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (o_ring->Coords, points, x,
						   y, m);
			      }
			    else if (o_ring->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (o_ring->Coords, points, x,
						    y, z, m);
			      }
			    else
			      {
				  gaiaSetPoint (o_ring->Coords, points, x, y);
			      }
			    points++;
			}
		      last_x = x;
		      last_y = y;
		      last_z = z;
		  }
	    }

	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		/* sanitizing an INTERIOR RING */
		points = 0;
		for (iv = 0; iv < i_ring->Points; iv++)
		  {
		      /* PASS I - checking points */
		      z = 0.0;
		      m = 0.0;
		      if (i_ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y, &z);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (i_ring->Coords, iv, &x, &y, &m);
			}
		      else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y, &z,
					      &m);
			}
		      else
			{
			    gaiaGetPoint (i_ring->Coords, iv, &x, &y);
			}
		      if (iv > 0)
			{
			    if (tolerance <= 0.0)
			      {
				  if (last_x == x && last_y == y && last_z == z)
				      ;
				  else
				      points++;
			      }
			    else
			      {
				  if (point_point_distance
				      (x, y, last_x, last_y) <= tolerance)
				      ;
				  else
				      points++;
			      }
			}
		      else
			  points++;
		      last_x = x;
		      last_y = y;
		      last_z = z;
		  }
		if (points < 4)
		  {
		      /* illegal RING - copying the original one */
		      o_ring =
			  gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		      gaiaCopyRingCoords (o_ring, i_ring);
		  }
		else
		  {
		      /* valid RING - sanitizing */
		      o_ring = gaiaAddInteriorRing (new_polyg, ib, points);
		      points = 0;
		      for (iv = 0; iv < i_ring->Points; iv++)
			{
			    /* PASS II - inserting points */
			    z = 0.0;
			    m = 0.0;
			    if (i_ring->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (i_ring->Coords, iv, &x, &y,
						   &z);
			      }
			    else if (i_ring->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (i_ring->Coords, iv, &x, &y,
						   &m);
			      }
			    else if (i_ring->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (i_ring->Coords, iv, &x, &y,
						    &z, &m);
			      }
			    else
			      {
				  gaiaGetPoint (i_ring->Coords, iv, &x, &y);
			      }
			    if (iv > 0)
			      {
				  int skip = 0;
				  if (tolerance <= 0.0)
				    {
					if (last_x == x && last_y == y
					    && last_z == z)
					    skip = 1;
				    }
				  else
				    {
					if (point_point_distance
					    (x, y, last_x, last_y) <= tolerance)
					    skip = 1;
				    }
				  if (skip)
				      ;
				  else
				    {
					if (o_ring->DimensionModel == GAIA_XY_Z)
					  {
					      gaiaSetPointXYZ (o_ring->Coords,
							       points, x, y, z);
					  }
					else if (o_ring->DimensionModel ==
						 GAIA_XY_M)
					  {
					      gaiaSetPointXYM (o_ring->Coords,
							       points, x, y, m);
					  }
					else if (o_ring->DimensionModel ==
						 GAIA_XY_Z_M)
					  {
					      gaiaSetPointXYZM (o_ring->Coords,
								points, x, y, z,
								m);
					  }
					else
					  {
					      gaiaSetPoint (o_ring->Coords,
							    points, x, y);
					  }
					points++;
				    }
			      }
			    else
			      {
				  if (o_ring->DimensionModel == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (o_ring->Coords, points,
							 x, y, z);
				    }
				  else if (o_ring->DimensionModel == GAIA_XY_M)
				    {
					gaiaSetPointXYM (o_ring->Coords, points,
							 x, y, m);
				    }
				  else if (o_ring->DimensionModel ==
					   GAIA_XY_Z_M)
				    {
					gaiaSetPointXYZM (o_ring->Coords,
							  points, x, y, z, m);
				    }
				  else
				    {
					gaiaSetPoint (o_ring->Coords, points, x,
						      y);
				    }
				  points++;
			      }
			    last_x = x;
			    last_y = y;
			    last_z = z;
			}
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

static int
gaiaIsToxicLinestring (gaiaLinestringPtr line)
{
/* checking a Linestring */
    if (line->Points < 2)
	return 1;


/* not a valid Linestring, simply a degenerated Point */
    return 0;
}

static int
gaiaIsToxicRing (gaiaRingPtr ring)
{
/* checking a Ring */
    if (ring->Points < 4)
................................................................................
    result->Srid = geom->Srid;
    if (pgs == 1)
	result->DeclaredType = GAIA_POLYGON;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
    return result;
}

SPATIALITE_PRIVATE int
gaia_do_check_linestring (const void *g)
{
/* testing if the Geometry is a simple Linestring */
    gaiaGeomCollPtr geom = (gaiaGeomCollPtr) g;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    pt = geom->FirstPoint;
    while (pt != NULL)
      {
	  /* counting how many Points are there */
	  pts++;
	  pt = pt->Next;
      }
    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  /* counting how many Linestrings are there */
	  lns++;
	  ln = ln->Next;
      }
    pg = geom->FirstPolygon;
    while (pg != NULL)
      {
	  /* counting how many Polygons are there */
	  pgs++;
	  pg = pg->Next;
      }
    if (pts == 0 && lns == 1 && pgs == 0)
	return 1;
    return 0;
}

static int
do_create_points (sqlite3 * mem_db, const char *table)
{
/* creating a table for storing Points */
    int ret;
    char *sql;
    char *err_msg = NULL;

/* creating the main table */
    if (strcmp (table, "points1") == 0)
	sql = sqlite3_mprintf ("CREATE TABLE %s "
			       "(id INTEGER PRIMARY KEY AUTOINCREMENT, "
			       "geom BLOB NOT NULL, "
			       "needs_interpolation INTEGER NOT NULL)", table);
    else
	sql = sqlite3_mprintf ("CREATE TABLE %s "
			       "(id INTEGER PRIMARY KEY AUTOINCREMENT, "
			       "geom BLOB NOT NULL)", table);
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("gaiaDrapeLine: CREATE TABLE \"%s\" error: %s\n",
			table, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    if (strcmp (table, "points1") == 0)
	return 1;

/* creating the companion R*Tree table */
    sql = sqlite3_mprintf ("CREATE VIRTUAL TABLE rtree_%s "
			   "USING rtree(pkid, xmin, xmax, ymin, ymax)", table);
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("gaiaDrapeLine: CREATE TABLE \"rtree_%s\" error: %s\n",
			table, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_insert_point (sqlite3 * mem_db, sqlite3_stmt * stmt_pts,
		 sqlite3_stmt * stmt_rtree_pts, double x,
		 double y, double z, double m)
{
/* inserting into the Points2 helper table */
    int ret;
    sqlite3_int64 rowid;

    sqlite3_reset (stmt_pts);
    sqlite3_clear_bindings (stmt_pts);
    sqlite3_bind_double (stmt_pts, 1, x);
    sqlite3_bind_double (stmt_pts, 2, y);
    sqlite3_bind_double (stmt_pts, 3, z);
    sqlite3_bind_double (stmt_pts, 4, m);
    ret = sqlite3_step (stmt_pts);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	rowid = sqlite3_last_insert_rowid (mem_db);
    else
      {
	  spatialite_e ("INSERT INTO \"Points\" error: \"%s\"\n",
			sqlite3_errmsg (mem_db));
	  goto error;
      }

/* inserting into the companion R*Tree */
    sqlite3_reset (stmt_rtree_pts);
    sqlite3_clear_bindings (stmt_rtree_pts);
    sqlite3_bind_int64 (stmt_rtree_pts, 1, rowid);
    sqlite3_bind_double (stmt_rtree_pts, 2, x);
    sqlite3_bind_double (stmt_rtree_pts, 3, x);
    sqlite3_bind_double (stmt_rtree_pts, 4, y);
    sqlite3_bind_double (stmt_rtree_pts, 5, y);
    ret = sqlite3_step (stmt_rtree_pts);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("INSERT INTO \"RTree_Points\" error: \"%s\"\n",
			sqlite3_errmsg (mem_db));
	  goto error;
      }

    return 1;

  error:
    return 0;
}

static int
do_populate_points2 (sqlite3 * mem_db, gaiaGeomCollPtr geom)
{
/* populating Points-2 */
    int ret;
    const char *sql;
    int iv;
    gaiaLinestringPtr ln;
    sqlite3_stmt *stmt_pts = NULL;
    sqlite3_stmt *stmt_rtree_pts = NULL;
    double ox;
    double oy;
    double oz;
    double om;
    double fx;
    double fy;
    double fz;
    double fm;

/* creating an SQL statement for inserting rows into the Points2 table */
    sql = "INSERT INTO points2 (id, geom) VALUES "
	"(NULL, MakePointZM(?, ?, ?, ?))";
    ret = sqlite3_prepare_v2 (mem_db, sql, strlen (sql), &stmt_pts, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO Points2: error %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

/* creating an SQL statement for inserting rows into the R*TREE table */
    sql = "INSERT INTO rtree_points2 (pkid, xmin, xmax, ymin, ymax) "
	"VALUES (?, ?, ?, ?, ?)";
    ret = sqlite3_prepare_v2 (mem_db, sql, strlen (sql), &stmt_rtree_pts, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO RTree_Points2: error %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

/* starting a Transaction */
    sql = "BEGIN";
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("BEGIN: error: %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

    ln = geom->FirstLinestring;
    for (iv = 0; iv < ln->Points; iv++)
      {
	  /* processing all Vertices from the input Linestring */
	  double x;
	  double y;
	  double z = 0.0;
	  double m = 0.0;
	  int repeated;
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  repeated = 0;
	  if (iv != 0)
	    {
		/* checking for repeated points */
		if (x == ox && y == oy && z == oz && m == om)
		    repeated = 1;
	    }
	  if (iv == ln->Points - 1)
	    {
		/* checkink for a closed Linestring */
		if (x == fx && y == fy && z == fz && m == fm)
		    repeated = 1;
	    }
	  if (!repeated)
	    {
		/* inserting a Point */
		if (!do_insert_point
		    (mem_db, stmt_pts, stmt_rtree_pts, x, y, z, m))
		    goto error;
	    }
	  /* saving the current coords */
	  ox = x;
	  oy = y;
	  oz = z;
	  om = m;
	  if (iv == 0)
	    {
		/* saving the Start Point coords */
		fx = x;
		fy = y;
		fz = z;
		fm = m;
	    }
      }

/* committing the pending Transaction */
    sql = "COMMIT";
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("COMMIT: error: %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

    sqlite3_finalize (stmt_pts);
    sqlite3_finalize (stmt_rtree_pts);
    return 1;

  error:
    if (stmt_pts != NULL)
	sqlite3_finalize (stmt_pts);
    if (stmt_rtree_pts != NULL)
	sqlite3_finalize (stmt_rtree_pts);
    return 0;
}

static int
do_insert_draped_point (sqlite3 * mem_db, sqlite3_stmt * stmt_pts,
			int needs_interpolation, gaiaGeomCollPtr geom)
{
/* inserting into the Points helper table */
    int ret;
    gaiaPointPtr pt = geom->FirstPoint;

    if (pt == NULL)
	return 0;

    sqlite3_reset (stmt_pts);
    sqlite3_clear_bindings (stmt_pts);
    sqlite3_bind_double (stmt_pts, 1, pt->X);
    sqlite3_bind_double (stmt_pts, 2, pt->Y);
    sqlite3_bind_double (stmt_pts, 3, pt->Z);
    sqlite3_bind_double (stmt_pts, 4, pt->M);
    sqlite3_bind_int (stmt_pts, 5, needs_interpolation);
    ret = sqlite3_step (stmt_pts);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

    spatialite_e ("INSERT INTO \"Points1\" error: \"%s\"\n",
		  sqlite3_errmsg (mem_db));
    return 0;
}

static gaiaGeomCollPtr
do_point_drape_coords (int srid, double x, double y, gaiaGeomCollPtr geom_3d)
{
/* draping a Point */
    gaiaPointPtr pt_3d = geom_3d->FirstPoint;
    gaiaGeomCollPtr geom = gaiaAllocGeomCollXYZM ();
    geom->Srid = srid;
    gaiaAddPointToGeomCollXYZM (geom, x, y, pt_3d->Z, pt_3d->M);
    return geom;
}

static gaiaGeomCollPtr
do_point_same_coords (int srid, double x, double y, double z, double m)
{
/* creating a Point (unchanged coords) */
    gaiaGeomCollPtr geom;
    geom = gaiaAllocGeomCollXYZM ();
    geom->Srid = srid;
    gaiaAddPointToGeomCollXYZM (geom, x, y, z, m);
    return geom;
}

static int
do_drape_vertex (sqlite3 * mem_db, sqlite3_stmt * stmt,
		 sqlite3_stmt * stmt_pts, int srid, double tolerance,
		 double x, double y, double z, double m)
{
/* draping the segment */
    double minx = x;
    double miny = y;
    double maxx = x;
    double maxy = y;
    int ret;
    int count = 0;
    gaiaGeomCollPtr g2;

/* preparing an extendend BBOX */
    minx = x - (tolerance * 2.0);
    miny = y - (tolerance * 2.0);
    maxx = x + (tolerance * 2.0);
    maxy = y + (tolerance * 2.0);

/* querying Points-2 by distance from Segment */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, minx);	/* R*Tree BBOX */
    sqlite3_bind_double (stmt, 2, miny);
    sqlite3_bind_double (stmt, 3, maxx);
    sqlite3_bind_double (stmt, 4, maxy);
    sqlite3_bind_double (stmt, 5, x);	/* point (distance) */
    sqlite3_bind_double (stmt, 6, y);
    sqlite3_bind_double (stmt, 7, tolerance);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		gaiaGeomCollPtr g2 = NULL;
		gaiaGeomCollPtr geom = NULL;
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      unsigned char *p_blob =
			  (unsigned char *) sqlite3_column_blob (stmt, 0);
		      int n_bytes = sqlite3_column_bytes (stmt, 0);
		      geom = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		  }
		if (geom != NULL)
		  {
		      /* found a valid Point */
		      g2 = do_point_drape_coords (srid, x, y, geom);
		      gaiaFreeGeomColl (geom);
		      if (!do_insert_draped_point (mem_db, stmt_pts, 0, g2))
			  goto error;
		      gaiaFreeGeomColl (g2);
		      count++;
		  }
	    }
      }
    if (count == 0)
      {
	  /* not found - inserting the Point itself */
	  g2 = do_point_same_coords (srid, x, y, z, m);
	  if (!do_insert_draped_point (mem_db, stmt_pts, 1, g2))
	      goto error;
	  gaiaFreeGeomColl (g2);
      }
    return 1;

  error:
    return 0;
}

static int
do_drape_line (sqlite3 * mem_db, gaiaGeomCollPtr geom, double tolerance)
{
/* draping the line */
    int ret;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_pts = NULL;
    const char *sql;
    gaiaLinestringPtr ln;
    int iv;

/* creating an SQL statement for querying Points-2 */
    sql = "SELECT geom FROM points2 "
	"WHERE ROWID IN (SELECT pkid FROM rtree_points2 WHERE "
	"MbrIntersects(geom, BuildMbr(?, ?, ?, ?)) = 1) "
	"AND ST_Distance(geom, MakePoint(?, ?)) <= ? " "ORDER BY id";
    ret = sqlite3_prepare_v2 (mem_db, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT Points2: error %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

/* creating an SQL statement for inserting rows into the Points-1 table */
    sql = "INSERT INTO points1 (id, geom, needs_interpolation) VALUES "
	"(NULL, MakePointZM(?, ?, ?, ?), ?)";
    ret = sqlite3_prepare_v2 (mem_db, sql, strlen (sql), &stmt_pts, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO Points1: error %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

/* starting a Transaction */
    sql = "BEGIN";
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("BEGIN: error: %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

    ln = geom->FirstLinestring;
    for (iv = 0; iv < ln->Points; iv++)
      {
	  /* processing all Vertices from the input Linestring */
	  double x;
	  double y;
	  double z = 0.0;
	  double m = 0.0;
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  /* processing a Vertex */
	  if (!do_drape_vertex
	      (mem_db, stmt, stmt_pts, geom->Srid, tolerance, x, y, z, m))
	      goto error;
      }

/* committing the pending Transaction */
    sql = "COMMIT";
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("COMMIT: error: %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto error;
      }

    sqlite3_finalize (stmt);
    sqlite3_finalize (stmt_pts);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_pts != NULL)
	sqlite3_finalize (stmt_pts);
    return 0;
}

static int
get_prev_coords (int index, gaiaDynamicLinePtr dyn, double *z, double *m,
		 double *dist)
{
/* retrieving the previous Point */
    double ox;
    double oy;
    double x;
    double y;
    double zz;
    double mm;
    int ok = 0;
    int count = 0;
    gaiaPointPtr pt = dyn->First;
    while (pt != NULL)
      {
	  if (index - 1 == count)
	    {
		/* this is the previous point */
		ox = pt->X;
		oy = pt->Y;
		zz = pt->Z;
		mm = pt->M;
		ok = 1;
	    }
	  if (index == count)
	    {
		/* this is the current point */
		x = pt->X;
		y = pt->Y;
		if (ok)
		  {
		      *z = zz;
		      *m = mm;
		      *dist =
			  sqrt (((ox - x) * (ox - x)) + ((oy - y) * (oy - y)));
		      return 1;
		  }
		return 0;
	    }
	  count++;
	  pt = pt->Next;
      }
    return 0;
}

static int
get_next_coords (int index, gaiaDynamicLinePtr dyn, const char *interpolate,
		 double *z, double *m, double *dist)
{
/* retrieving the next Point */
    double ox;
    double oy;
    double x;
    double y;
    double d = 0.0;
    int ok = 0;
    int count = 0;
    gaiaPointPtr pt = dyn->First;
    while (pt != NULL)
      {
	  if (index == count)
	    {
		/* this is the current Point */
		ox = pt->X;
		oy = pt->Y;
		ok = 1;
	    }
	  if (index < count)
	    {
		/* this is a following Point */
		if (!ok)
		    return 0;
		x = pt->X;
		y = pt->Y;
		d += sqrt (((ox - x) * (ox - x)) + ((oy - y) * (oy - y)));
		if (*(interpolate + count) == 'N')
		  {
		      /* found a valid Point */
		      *z = pt->Z;
		      *m = pt->M;
		      *dist = d;
		      return 1;
		  }
	    }
	  count++;
	  pt = pt->Next;
      }
    return 0;
}

static int
do_update_coords (int index, gaiaDynamicLinePtr dyn, double z, double m)
{
/* updating the coords */
    int count = 0;
    gaiaPointPtr pt = dyn->First;
    while (pt != NULL)
      {
	  if (index == count)
	    {
		pt->Z = z;
		pt->M = m;
		return 1;
	    }
	  count++;
	  pt = pt->Next;
      }
      return 0;
}

static void
do_interpolate_coords (int index, gaiaDynamicLinePtr dyn, char *interpolate)
{
/* attempting to interpolate coords */
    double pz;
    double pm;
    double nz;
    double nm;
    double z;
    double m;
    double pdist;
    double ndist;
    double perc;
    if (!get_prev_coords (index, dyn, &pz, &pm, &pdist))
	return;
    if (!get_next_coords (index, dyn, interpolate, &nz, &nm, &ndist))
	return;
    perc = pdist / (pdist + ndist);
    z = pz + ((nz - pz) * perc);
    m = pm + ((nm - pm) * perc);
    if (do_update_coords (index, dyn, z, m))
    *(interpolate+index) = 'I';
}

static gaiaGeomCollPtr
do_reassemble_line (sqlite3 * mem_db, int dims, int srid)
{
/* reassembling the Linestring to be returned */
    gaiaGeomCollPtr geom = NULL;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    const char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int count = 0;
    int needs_interpolation = 0;

/* creating an SQL statement for querying Points-1 */
    sql = "SELECT geom, needs_interpolation FROM points1 ORDER BY id";
    ret = sqlite3_prepare_v2 (mem_db, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT Points1: error %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto end;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		gaiaGeomCollPtr g = NULL;
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      unsigned char *p_blob =
			  (unsigned char *) sqlite3_column_blob (stmt, 0);
		      int n_bytes = sqlite3_column_bytes (stmt, 0);
		      g = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		  }
		if (g != NULL)
		  {
		      /* found a valid Point */
		      pt = g->FirstPoint;
		      if (dims == GAIA_XY_Z_M)
			  gaiaAppendPointZMToDynamicLine (dyn, pt->X, pt->Y,
							  pt->Z, pt->M);
		      else if (dims == GAIA_XY_Z)
			  gaiaAppendPointZToDynamicLine (dyn, pt->X, pt->Y,
							 pt->Z);
		      else if (dims == GAIA_XY_M)
			  gaiaAppendPointMToDynamicLine (dyn, pt->X, pt->Y,
							 pt->M);
		      else
			  gaiaAppendPointToDynamicLine (dyn, pt->X, pt->Y);
		      gaiaFreeGeomColl (g);
		  }
		if (sqlite3_column_int (stmt, 1) == 1)
		    needs_interpolation = 1;
	    }
      }

    pt = dyn->First;
    while (pt)
      {
	  /* counting how many points are there */
	  count++;
	  pt = pt->Next;
      }
    if (count < 2)
	goto end;

    if (needs_interpolation)
      {
	  /* attempting to interpolate missing coords */
	  int i;
	  int max = count;
	  char *interpolate = malloc (max + 1);
	  memset (interpolate, '\0', max + 1);
	  sqlite3_reset (stmt);	/* rewinding the resultset */
	  count = 0;
	  while (1)
	    {
		/* scrolling the result set rows */
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE)
		    break;	/* end of result set */
		if (ret == SQLITE_ROW)
		  {
		      if (sqlite3_column_int (stmt, 1) == 0)
			  *(interpolate + count) = 'N';
		      else
			  *(interpolate + count) = 'Y';
		      count++;
		  }
	    }
	  for (i = 0; i < max; i++)
	    {
		if (*(interpolate + i) == 'Y')
		    do_interpolate_coords (i, dyn, interpolate);
	    }
	  free (interpolate);
      }

    sqlite3_finalize (stmt);
    stmt = NULL;

/* creating the final Linestring */
    if (dims == GAIA_XY_Z_M)
	geom = gaiaAllocGeomCollXYZM ();
    else if (dims == GAIA_XY_Z)
	geom = gaiaAllocGeomCollXYZ ();
    else if (dims == GAIA_XY_M)
	geom = gaiaAllocGeomCollXYM ();
    else
	geom = gaiaAllocGeomColl ();
    geom->Srid = srid;

    ln = gaiaAddLinestringToGeomColl (geom, count);
    count = 0;
    pt = dyn->First;
    while (pt != NULL)
      {
	  if (dims == GAIA_XY_Z_M)
	    {
		gaiaSetPointXYZM (ln->Coords, count, pt->X, pt->Y,
				  pt->Z, pt->M);
	    }
	  else if (dims == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (ln->Coords, count, pt->X, pt->Y, pt->Z);
	    }
	  else if (dims == GAIA_XY_M)
	    {
		gaiaSetPointXYM (ln->Coords, count, pt->X, pt->Y, pt->M);
	    }
	  else
	    {
		gaiaSetPoint (ln->Coords, count, pt->X, pt->Y);
	    }
	  count++;
	  pt = pt->Next;
      }

  end:
    gaiaFreeDynamicLine (dyn);
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return geom;
}

static gaiaGeomCollPtr
do_reassemble_multi_point (sqlite3 * mem_db, int dims, int srid,
			   int interpolated)
{
/* reassembling the MultiPoint to be returned */
    gaiaGeomCollPtr geom = NULL;
    gaiaPointPtr pt;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    const char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int count = 0;
    int needs_interpolation = 0;
    char *interpolate = NULL;

/* creating an SQL statement for querying Points-1 */
    sql = "SELECT geom, needs_interpolation FROM points1 ORDER BY id";
    ret = sqlite3_prepare_v2 (mem_db, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT Points1: error %d \"%s\"\n",
			sqlite3_errcode (mem_db), sqlite3_errmsg (mem_db));
	  goto end;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		gaiaGeomCollPtr g = NULL;
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      unsigned char *p_blob =
			  (unsigned char *) sqlite3_column_blob (stmt, 0);
		      int n_bytes = sqlite3_column_bytes (stmt, 0);
		      g = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		  }
		if (g != NULL)
		  {
		      /* found a valid Point */
		      pt = g->FirstPoint;
		      if (dims == GAIA_XY_Z_M)
			  gaiaAppendPointZMToDynamicLine (dyn, pt->X, pt->Y,
							  pt->Z, pt->M);
		      else if (dims == GAIA_XY_Z)
			  gaiaAppendPointZToDynamicLine (dyn, pt->X, pt->Y,
							 pt->Z);
		      else if (dims == GAIA_XY_M)
			  gaiaAppendPointMToDynamicLine (dyn, pt->X, pt->Y,
							 pt->M);
		      else
			  gaiaAppendPointToDynamicLine (dyn, pt->X, pt->Y);
		      gaiaFreeGeomColl (g);
		  }
		if (sqlite3_column_int (stmt, 1) == 1)
		    needs_interpolation = 1;
	    }
      }

    pt = dyn->First;
    while (pt)
      {
	  /* counting how many points are there */
	  count++;
	  pt = pt->Next;
      }
    if (count < 2)
	goto end;

    if (needs_interpolation)
      {
	  /* attempting to interpolate missing coords */
	  int i;
	  int max = count;
	  interpolate = malloc (max + 1);
	  memset (interpolate, '\0', max + 1);
	  sqlite3_reset (stmt);	/* rewinding the resultset */
	  count = 0;
	  while (1)
	    {
		/* scrolling the result set rows */
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE)
		    break;	/* end of result set */
		if (ret == SQLITE_ROW)
		  {
		      if (sqlite3_column_int (stmt, 1) == 0)
			  *(interpolate + count) = 'N';
		      else
			  *(interpolate + count) = 'Y';
		      count++;
		  }
	    }
	  for (i = 0; i < max; i++)
	    {
		if (*(interpolate + i) == 'Y')
		    do_interpolate_coords (i, dyn, interpolate);
	    }
      }

    sqlite3_finalize (stmt);
    stmt = NULL;

/* creating the final MultiPoint */
    if (dims == GAIA_XY_Z_M)
	geom = gaiaAllocGeomCollXYZM ();
    else if (dims == GAIA_XY_Z)
	geom = gaiaAllocGeomCollXYZ ();
    else if (dims == GAIA_XY_M)
	geom = gaiaAllocGeomCollXYM ();
    else
	geom = gaiaAllocGeomColl ();
    geom->Srid = srid;
    geom->DeclaredType = GAIA_MULTIPOINT;

    pt = dyn->First;
    count = 0;
    while (pt != NULL)
      {
	  int ok = 0;
	  if (*(interpolate + count) == 'Y')
	      ok = 1;
	  if (!interpolated && *(interpolate + count) == 'I')
	      ok = 1;
	  if (ok)
	    {
		if (dims == GAIA_XY_Z_M)
		    gaiaAddPointToGeomCollXYZM (geom, pt->X, pt->Y, pt->Z,
						pt->M);
		else if (dims == GAIA_XY_Z)
		    gaiaAddPointToGeomCollXYZ (geom, pt->X, pt->Y, pt->Z);
		else if (dims == GAIA_XY_M)
		    gaiaAddPointToGeomCollXYM (geom, pt->X, pt->Y, pt->M);
		else
		    gaiaAddPointToGeomColl (geom, pt->X, pt->Y);
	    }
	  count++;
	  pt = pt->Next;
      }

  end:
    if (interpolate != NULL)
	free (interpolate);
    gaiaFreeDynamicLine (dyn);
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaDrapeLine (sqlite3 * db_handle, gaiaGeomCollPtr geom1,
	       gaiaGeomCollPtr geom2, double tolerance)
{
/* will return a 3D Linestring by draping line-1 (2D) over line-2 (3D) */
    int ret;
    sqlite3 *mem_db = NULL;
    void *cache;
    char *sql;
    char *err_msg = NULL;
    gaiaGeomCollPtr geom3 = NULL;

/* arguments validation */
    if (db_handle == NULL)
	return NULL;
    if (geom1 == NULL || geom2 == NULL)
	return NULL;
    if (tolerance < 0.0)
	return NULL;
    if (geom1->Srid != geom2->Srid)
	return NULL;
    if (geom1->DimensionModel != GAIA_XY)
	return NULL;
    if (geom2->DimensionModel != GAIA_XY_Z)
	return NULL;
    if (!gaia_do_check_linestring (geom1))
	return NULL;
    if (!gaia_do_check_linestring (geom2))
	return NULL;

/* creating a Temporary MemoryDB */
    ret =
	sqlite3_open_v2 (":memory:", &mem_db,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("gaiaDrapeLine: sqlite3_open_v2 error: %s\n",
			sqlite3_errmsg (mem_db));
	  sqlite3_close (mem_db);
	  return NULL;
      }
    cache = spatialite_alloc_connection ();
    spatialite_internal_init (mem_db, cache);

/* initializing a minimal SpatiaLite DB */
    sql = "SELECT InitSpatialMetadata(1, 'NONE')";
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("gaiaDrapeLine: InitSpatialMetadata() error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  goto end;
      }

/* creating the helper tables on the Temporary MemoryDB */
    if (!do_create_points (mem_db, "points1"))
	goto end;
    if (!do_create_points (mem_db, "points2"))
	goto end;

/* populating the Points-2 helper table */
    if (!do_populate_points2 (mem_db, geom2))
	goto end;

/* draping the first line over Points-2 */
    if (!do_drape_line (mem_db, geom1, tolerance))
	goto end;

/* building the final linestring to be returned */
    geom3 = do_reassemble_line (mem_db, geom2->DimensionModel, geom2->Srid);

  end:
/* releasing the Temporary MemoryDB */
    ret = sqlite3_close (mem_db);
    if (ret != SQLITE_OK)
	spatialite_e ("gaiaDrapeLine: sqlite3_close() error: %s\n",
		      sqlite3_errmsg (mem_db));
    spatialite_internal_cleanup (cache);

    return geom3;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaDrapeLineExceptions (sqlite3 * db_handle, gaiaGeomCollPtr geom1,
			 gaiaGeomCollPtr geom2, double tolerance,
			 int interpolated)
{
/*
 *  will return a 3D MultiPoint containing all Vertices from geom1
 * not being correctly draped over geom2
*/
    int ret;
    sqlite3 *mem_db = NULL;
    void *cache;
    char *sql;
    char *err_msg = NULL;
    gaiaGeomCollPtr geom3 = NULL;

/* arguments validation */
    if (db_handle == NULL)
	return NULL;
    if (geom1 == NULL || geom2 == NULL)
	return NULL;
    if (tolerance < 0.0)
	return NULL;
    if (geom1->Srid != geom2->Srid)
	return NULL;
    if (geom1->DimensionModel != GAIA_XY)
	return NULL;
    if (geom2->DimensionModel != GAIA_XY_Z)
	return NULL;
    if (!gaia_do_check_linestring (geom1))
	return NULL;
    if (!gaia_do_check_linestring (geom2))
	return NULL;

/* creating a Temporary MemoryDB */
    ret =
	sqlite3_open_v2 (":memory:", &mem_db,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("gaiaDrapeLine: sqlite3_open_v2 error: %s\n",
			sqlite3_errmsg (mem_db));
	  sqlite3_close (mem_db);
	  return NULL;
      }
    cache = spatialite_alloc_connection ();
    spatialite_internal_init (mem_db, cache);

/* initializing a minimal SpatiaLite DB */
    sql = "SELECT InitSpatialMetadata(1, 'NONE')";
    ret = sqlite3_exec (mem_db, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("gaiaDrapeLineExceptions: InitSpatialMetadata() error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  goto end;
      }

/* creating the helper tables on the Temporary MemoryDB */
    if (!do_create_points (mem_db, "points1"))
	goto end;
    if (!do_create_points (mem_db, "points2"))
	goto end;

/* populating the Points-2 helper table */
    if (!do_populate_points2 (mem_db, geom2))
	goto end;

/* draping the first line over Points-2 */
    if (!do_drape_line (mem_db, geom1, tolerance))
	goto end;

/* building the final MultiPoint to be returned */
    geom3 =
	do_reassemble_multi_point (mem_db, geom2->DimensionModel, geom2->Srid,
				   interpolated);

  end:
/* releasing the Temporary MemoryDB */
    ret = sqlite3_close (mem_db);
    if (ret != SQLITE_OK)
	spatialite_e ("gaiaDrapeLineExceptions: sqlite3_close() error: %s\n",
		      sqlite3_errmsg (mem_db));
    spatialite_internal_cleanup (cache);

    return geom3;
}




|







 







|







 







<









<
<

<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>


|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58
59


60

61
62
63
64
65
66
67
....
1160
1161
1162
1163
1164
1165
1166












































































































































































































































































































































































1167














































































































































































































































































































































































































































































































































































1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
....
2099
2100
2101
2102
2103
2104
2105







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































/*

 gg_advanced.c -- Gaia advanced geometric operations
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <float.h>


#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>



#include <spatialite/gaiageo.h>


GAIAGEO_DECLARE double
gaiaMeasureLength (int dims, double *coords, int vert)
{
/* computes the total length */
    double lung = 0.0;
    double xx1;
................................................................................
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}













































































































































































































































































































































































static int














































































































































































































































































































































































































































































































































































gaiaIsToxicLinestring (gaiaLinestringPtr line)
{
/* checking a Linestring */
    if (line->Points < 2)
	return 1;
    return 0;

/* not a valid Linestring, simply a degenerated Point */
    return 1;
}

static int
gaiaIsToxicRing (gaiaRingPtr ring)
{
/* checking a Ring */
    if (ring->Points < 4)
................................................................................
    result->Srid = geom->Srid;
    if (pgs == 1)
	result->DeclaredType = GAIA_POLYGON;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
    return result;
}







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/gaiageo/gg_endian.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 gg_endian.c -- Gaia functions for litte/big endian values handling
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),




|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 gg_endian.c -- Gaia functions for litte/big endian values handling
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),

Changes to src/gaiageo/gg_ewkt.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 gg_ewkt.c -- EWKT parser/lexer 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2015
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only




|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 gg_ewkt.c -- EWKT parser/lexer 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2013
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only

Changes to src/gaiageo/gg_extras.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
...
760
761
762
763
764
765
766
767

768
769
770
771
772
773
774
...
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
...
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
...
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908

909
910
911
912
913
914
915

916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
....
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
....
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
....
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
....
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201

1202
1203
1204

1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
....
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
....
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
....
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
....
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462

1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
/*

 gg_extras.c -- Gaia extra functions support
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/gaiageo.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#if defined(_MSC_VER) && _MSC_VER < 1800
/*
/ only when using an obsolete MSVC (< 2013)
/ we need to define an internal replacement
/ implementig C99 rint()
*/
static double
rint (double x)
{
    return floor (x + 0.5);
}
#endif
#endif

static void
auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result,
		  double origin_x, double origin_y, double origin_z,
		  double origin_m, double size_x, double size_y, double size_z,
		  double size_m)
................................................................................
	*base_y = y - size;
    else
	*base_y = y;
}

static gaiaGeomCollPtr
gaiaSquareGridCommon (const void *p_cache, gaiaGeomCollPtr geom,
		      double origin_x, double origin_y, double size, int mode)

{
/* creating a regular grid [Square cells] */
    double min_x;
    double min_y;
    double max_x;
    double max_y;
    double base_x;
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell */
		      count++;
		      if (mode > 0)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
................................................................................
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x3, y3);
			    gaiaSetPoint (ln->Coords, 1, x4, y4);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x4, y4);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}
		      else if (mode < 0)
			{
			    /* multipoint */
			    gaiaAddPointToGeomColl (result, x1, y1);
			    gaiaAddPointToGeomColl (result, x2, y2);
			    gaiaAddPointToGeomColl (result, x3, y3);
			    gaiaAddPointToGeomColl (result, x4, y4);
			}
		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 5, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x1, y1);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
/* final check */
    if (!count)
      {
	  /* empty grid */
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    if (mode == 0)
      {
	  result->DeclaredType = GAIA_MULTIPOLYGON;
	  return result;
      }

    item = result;
    if (p_cache != NULL)
	result = gaiaUnaryUnion_r (p_cache, item);
    else
	result = gaiaUnaryUnion (item);
    gaiaFreeGeomColl (item);
    result->Srid = geom->Srid;
    if (mode < 0)
	result->DeclaredType = GAIA_MULTIPOINT;
    else
	result->DeclaredType = GAIA_MULTILINESTRING;
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSquareGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y,
		double size, int mode)
{
    return gaiaSquareGridCommon (NULL, geom, origin_x, origin_y, size, mode);

}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSquareGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x,
		  double origin_y, double size, int mode)
{
    return gaiaSquareGridCommon (p_cache, geom, origin_x, origin_y, size, mode);

}

static void
get_trigrid_base (double min_x, double min_y, double origin_x, double origin_y,
		  double shift_h_odd, double shift_h_even, double shift_v,
		  int *odd_even, double *base_x, double *base_y)
{
/* determining the grid base-point [MinX/MinY] for a Triangular Grid */
    double bx = origin_x;
    double by = origin_y;
    while (1)
      {
	  /* looping on grid rows */
	  if (min_y < origin_y)
	    {
		/* going southward */
		if (by > min_y)
		    goto next_scanline;
		if (*odd_even)
		    bx = origin_x - shift_h_odd;
		else
		    bx = origin_x;
	    }
	  else
	    {
		/* going northward */
		if (by < min_y)
		    goto next_scanline;
		if (*odd_even)
		    bx = origin_x - shift_h_odd;
		else
		    bx = origin_x;
	    }
	  while (1)
	    {
		/* looping on grid columns */
		if (min_x < origin_x)
		  {
		      /* going eastward */
		      if (bx - shift_h_even - shift_h_odd < min_x)
			{
			    *base_x = bx;
			    *base_y = by;
			    return;
			}
		      bx -= shift_h_even;
		  }
		else
		  {
		      /* going westward */
		      if (bx + shift_h_even > min_x
			  || bx + shift_h_even + shift_h_odd > min_x)
			{
			    *base_x = bx;
			    *base_y = by;
			    return;
			}
		      bx += shift_h_even;
		  }
	    }
	next_scanline:
	  if (min_y < origin_y)
	      by -= shift_v;
	  else
	      by += shift_v;
	  if (*odd_even)
	      *odd_even = 0;
	  else
	      *odd_even = 1;
      }
}

static gaiaGeomCollPtr
gaiaTriangularGridCommon (const void *p_cache, gaiaGeomCollPtr geom,
			  double origin_x, double origin_y, double size,
			  int mode)
{
/* creating a regular grid [Triangular cells] */
    double min_x;
    double min_y;
    double max_x;
    double max_y;
    double base_x;
................................................................................
    shift_v = size * sin (3.14159265358979323846 / 3.0);

    result = gaiaAllocGeomColl ();
    result->Srid = geom->Srid;
    get_grid_bbox (geom, &min_x, &min_y, &max_x, &max_y);
    get_trigrid_base (min_x, min_y, origin_x, origin_y, shift_h_odd,
		      shift_h_even, shift_v, &odd_even, &base_x, &base_y);
    base_x -= base_x;
    base_y -= shift_v;
    while (base_y < max_y)
      {
	  /* looping on grid rows */
	  if (odd_even)
	      x1 = base_x - shift_h_odd;
	  else
	      x1 = base_x;
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell [pointing upside] */
		      count++;
		      if (mode > 0)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
			    gaiaSetPoint (ln->Coords, 1, x3, y3);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x3, y3);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}
		      else if (mode < 0)
			{
			    /* multipoint */
			    gaiaAddPointToGeomColl (result, x1, y1);
			    gaiaAddPointToGeomColl (result, x2, y2);
			    gaiaAddPointToGeomColl (result, x3, y3);
			}
		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 4, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x1, y1);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell [pointing downside] */
		      count++;
		      if (mode > 0)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
			    gaiaSetPoint (ln->Coords, 1, x3, y3);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x3, y3);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}
		      else if (mode < 0)
			{
			    /* multipoint */
			    gaiaAddPointToGeomColl (result, x1, y1);
			    gaiaAddPointToGeomColl (result, x2, y2);
			    gaiaAddPointToGeomColl (result, x3, y3);
			}
		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 4, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x3, y3);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
/* final check */
    if (!count)
      {
	  /* empty grid */
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    if (mode == 0)
      {
	  result->DeclaredType = GAIA_MULTIPOLYGON;
	  return result;
      }

    item = result;
    if (p_cache != NULL)
	result = gaiaUnaryUnion_r (p_cache, item);
    else
	result = gaiaUnaryUnion (item);
    gaiaFreeGeomColl (item);
    result->Srid = geom->Srid;
    if (mode < 0)
	result->DeclaredType = GAIA_MULTIPOINT;
    else
	result->DeclaredType = GAIA_MULTILINESTRING;
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTriangularGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y,
		    double size, int mode)
{
    return gaiaTriangularGridCommon (NULL, geom, origin_x, origin_y, size,
				     mode);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTriangularGrid_r (const void *p_cache, gaiaGeomCollPtr geom,
		      double origin_x, double origin_y, double size, int mode)

{
    return gaiaTriangularGridCommon (p_cache, geom, origin_x, origin_y, size,
				     mode);

}

static void
get_hexgrid_base (double min_x, double min_y, double origin_x, double origin_y,
		  double shift3, double shift4, double shift,
		  int *odd_even, double *base_x, double *base_y)
{
/* determining the grid base-point [MinX/MinY] for am Hexagonal Grid */
    double bx = origin_x;
    double by = origin_y;
    while (1)
      {
	  /* looping on grid rows */
	  if (min_y < origin_y)
	    {
		/* going southward */
		if (by > min_y)
		    goto next_scanline;
		if (*odd_even)
		    bx = origin_x - (shift3 / 2.0);
		else
		    bx = origin_x;
	    }
	  else
	    {
		/* going northward */
		if (by < min_y)
		    goto next_scanline;
		if (*odd_even)
		    bx = origin_x + (shift3 / 2.0);
		else
		    bx = origin_x;
	    }
	  while (1)
	    {
		/* looping on grid columns */
		if (min_x < origin_x)
		  {
		      /* going westward */
		      if (bx - shift4 < min_x)
			{
			    *base_x = bx;
			    *base_y = by;
			    return;
			}
		      bx -= shift3;
		  }
		else
		  {
		      /* going eastward */
		      if (bx + shift4 > min_x)
			{
			    *base_x = bx;
			    *base_y = by;
			    return;
			}
		      bx += shift3;
		  }
	    }
	next_scanline:
	  if (min_y < origin_y)
	      by -= shift;
	  else
	      by += shift;
	  if (*odd_even)
	      *odd_even = 0;
	  else
	      *odd_even = 1;
      }
}

static gaiaGeomCollPtr
gaiaHexagonalGridCommon (const void *p_cache, gaiaGeomCollPtr geom,
			 double origin_x, double origin_y, double size,
			 int mode)
{
/* creating a regular grid [Hexagonal cells] */
    double min_x;
    double min_y;
    double max_x;
    double max_y;
    double base_x;
................................................................................
    shift4 = size * 2.0;

    result = gaiaAllocGeomColl ();
    result->Srid = geom->Srid;
    get_grid_bbox (geom, &min_x, &min_y, &max_x, &max_y);
    get_hexgrid_base (min_x, min_y, origin_x, origin_y, shift3, shift4,
		      shift, &odd_even, &base_x, &base_y);
    base_x -= shift3;
    base_y -= shift;
    while ((base_y - shift) < max_y)
      {
	  /* looping on grid rows */
	  if (odd_even)
	      x1 = base_x - (shift3 / 2.0);
	  else
	      x1 = base_x;
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell */
		      count++;
		      if (mode > 0)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
................................................................................
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x5, y5);
			    gaiaSetPoint (ln->Coords, 1, x6, y6);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x6, y6);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}
		      else if (mode < 0)
			{
			    /* multipoint */
			    gaiaAddPointToGeomColl (result, x1, y1);
			    gaiaAddPointToGeomColl (result, x2, y2);
			    gaiaAddPointToGeomColl (result, x3, y3);
			    gaiaAddPointToGeomColl (result, x4, y4);
			    gaiaAddPointToGeomColl (result, x5, y5);
			    gaiaAddPointToGeomColl (result, x6, y6);
			}
		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 7, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x1, y1);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
/* final check */
    if (!count)
      {
	  /* empty grid */
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    if (mode == 0)
      {
	  result->DeclaredType = GAIA_MULTIPOLYGON;
	  return result;
      }

    item = result;
    if (p_cache != NULL)
	result = gaiaUnaryUnion_r (p_cache, item);
    else
	result = gaiaUnaryUnion (item);
    gaiaFreeGeomColl (item);
    result->Srid = geom->Srid;
    if (mode < 0)
	result->DeclaredType = GAIA_MULTIPOINT;
    else
	result->DeclaredType = GAIA_MULTILINESTRING;
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaHexagonalGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y,
		   double size, int mode)
{
    return gaiaHexagonalGridCommon (NULL, geom, origin_x, origin_y, size, mode);

}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaHexagonalGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x,
		     double origin_y, double size, int mode)
{
    return gaiaHexagonalGridCommon (p_cache, geom, origin_x, origin_y, size,
				    mode);
}

#endif /* end including GEOS */




|







 







|







 







<
<
<
<
<
<





<







 







|
>







 







|







 







<
<
<
<
<
<
<
<







 







|












<
|
<
<





|

|
>




|

|
>













<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
|
|
|
<

<
<
<
|










|







 







<
<







 







|












<
<
<
<
<
<
<







 







|












<
<
<
<
<
<
<







 







|












<
|
<
<





|


|




|
>


<
>













<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
|
|
<

<
<
<
|










|







 







<
<







 







|







 







<
<
<
<
<
<
<
<
<
<







 







|












<
|
<
<





|

|
>




|


|



1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
56
57
58
59
60
61
62






63
64
65
66
67

68
69
70
71
72
73
74
...
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
...
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
...
835
836
837
838
839
840
841








842
843
844
845
846
847
848
...
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882

883


884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913













914
915
916
917
918
919

920
921
922














923
924
925
926
927
928
929
930
931

932



933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
...
977
978
979
980
981
982
983


984
985
986
987
988
989
990
....
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031







1032
1033
1034
1035
1036
1037
1038
....
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075







1076
1077
1078
1079
1080
1081
1082
....
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120

1121


1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138

1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152













1153
1154
1155
1156
1157
1158

1159
1160
1161














1162
1163
1164
1165
1166
1167
1168
1169

1170



1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
....
1221
1222
1223
1224
1225
1226
1227


1228
1229
1230
1231
1232
1233
1234
....
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
....
1285
1286
1287
1288
1289
1290
1291










1292
1293
1294
1295
1296
1297
1298
....
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341

1342


1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
/*

 gg_extras.c -- Gaia extra functions support
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/gaiageo.h>

#if defined(_WIN32) && !defined(__MINGW32__)






static double
rint (double x)
{
    return floor (x + 0.5);
}

#endif

static void
auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result,
		  double origin_x, double origin_y, double origin_z,
		  double origin_m, double size_x, double size_y, double size_z,
		  double size_m)
................................................................................
	*base_y = y - size;
    else
	*base_y = y;
}

static gaiaGeomCollPtr
gaiaSquareGridCommon (const void *p_cache, gaiaGeomCollPtr geom,
		      double origin_x, double origin_y, double size,
		      int edges_only)
{
/* creating a regular grid [Square cells] */
    double min_x;
    double min_y;
    double max_x;
    double max_y;
    double base_x;
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell */
		      count++;
		      if (edges_only)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
................................................................................
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x3, y3);
			    gaiaSetPoint (ln->Coords, 1, x4, y4);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x4, y4);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}








		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 5, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x1, y1);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
/* final check */
    if (!count)
      {
	  /* empty grid */
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    if (!edges_only)
      {
	  result->DeclaredType = GAIA_MULTIPOLYGON;
	  return result;
      }

    item = result;
    if (p_cache != NULL)
	result = gaiaUnaryUnion_r (p_cache, item);
    else
	result = gaiaUnaryUnion (item);
    gaiaFreeGeomColl (item);
    result->Srid = geom->Srid;

    result->DeclaredType = GAIA_LINESTRING;


    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSquareGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y,
		double size, int edges_only)
{
    return gaiaSquareGridCommon (NULL, geom, origin_x, origin_y, size,
				 edges_only);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSquareGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x,
		  double origin_y, double size, int edges_only)
{
    return gaiaSquareGridCommon (p_cache, geom, origin_x, origin_y, size,
				 edges_only);
}

static void
get_trigrid_base (double min_x, double min_y, double origin_x, double origin_y,
		  double shift_h_odd, double shift_h_even, double shift_v,
		  int *odd_even, double *base_x, double *base_y)
{
/* determining the grid base-point [MinX/MinY] for a Triangular Grid */
    double bx = origin_x;
    double by = origin_y;
    while (1)
      {
	  /* looping on grid rows */













	  if (by < min_y)
	      goto next_scanline;
	  if (*odd_even)
	      bx = origin_x - shift_h_odd;
	  else
	      bx = origin_x;

	  while (1)
	    {
		/* looping on grid columns */














		if (bx + shift_h_even > min_x
		    || bx + shift_h_even + shift_h_odd > min_x)
		  {
		      *base_x = bx;
		      *base_y = by;
		      return;
		  }
		bx += shift_h_even;
	    }

	next_scanline:



	  by += shift_v;
	  if (*odd_even)
	      *odd_even = 0;
	  else
	      *odd_even = 1;
      }
}

static gaiaGeomCollPtr
gaiaTriangularGridCommon (const void *p_cache, gaiaGeomCollPtr geom,
			  double origin_x, double origin_y, double size,
			  int edges_only)
{
/* creating a regular grid [Triangular cells] */
    double min_x;
    double min_y;
    double max_x;
    double max_y;
    double base_x;
................................................................................
    shift_v = size * sin (3.14159265358979323846 / 3.0);

    result = gaiaAllocGeomColl ();
    result->Srid = geom->Srid;
    get_grid_bbox (geom, &min_x, &min_y, &max_x, &max_y);
    get_trigrid_base (min_x, min_y, origin_x, origin_y, shift_h_odd,
		      shift_h_even, shift_v, &odd_even, &base_x, &base_y);


    while (base_y < max_y)
      {
	  /* looping on grid rows */
	  if (odd_even)
	      x1 = base_x - shift_h_odd;
	  else
	      x1 = base_x;
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell [pointing upside] */
		      count++;
		      if (edges_only)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
			    gaiaSetPoint (ln->Coords, 1, x3, y3);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x3, y3);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}







		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 4, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x1, y1);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell [pointing downside] */
		      count++;
		      if (edges_only)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
			    gaiaSetPoint (ln->Coords, 1, x3, y3);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x3, y3);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}







		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 4, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x3, y3);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
/* final check */
    if (!count)
      {
	  /* empty grid */
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    if (!edges_only)
      {
	  result->DeclaredType = GAIA_MULTIPOLYGON;
	  return result;
      }

    item = result;
    if (p_cache != NULL)
	result = gaiaUnaryUnion_r (p_cache, item);
    else
	result = gaiaUnaryUnion (item);
    gaiaFreeGeomColl (item);
    result->Srid = geom->Srid;

    result->DeclaredType = GAIA_LINESTRING;


    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTriangularGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y,
		    double size, int edges_only)
{
    return gaiaTriangularGridCommon (NULL, geom, origin_x, origin_y, size,
				     edges_only);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTriangularGrid_r (const void *p_cache, gaiaGeomCollPtr geom,
		      double origin_x, double origin_y, double size,
		      int edges_only)
{
    return gaiaTriangularGridCommon (p_cache, geom, origin_x, origin_y, size,

				     edges_only);
}

static void
get_hexgrid_base (double min_x, double min_y, double origin_x, double origin_y,
		  double shift3, double shift4, double shift,
		  int *odd_even, double *base_x, double *base_y)
{
/* determining the grid base-point [MinX/MinY] for am Hexagonal Grid */
    double bx = origin_x;
    double by = origin_y;
    while (1)
      {
	  /* looping on grid rows */













	  if (by < min_y)
	      goto next_scanline;
	  if (*odd_even)
	      bx = origin_x + (shift3 / 2.0);
	  else
	      bx = origin_x;

	  while (1)
	    {
		/* looping on grid columns */














		if (bx + shift4 > min_x)
		  {
		      *base_x = bx;
		      *base_y = by;
		      return;
		  }
		bx += shift3;
	    }

	next_scanline:



	  by += shift;
	  if (*odd_even)
	      *odd_even = 0;
	  else
	      *odd_even = 1;
      }
}

static gaiaGeomCollPtr
gaiaHexagonalGridCommon (const void *p_cache, gaiaGeomCollPtr geom,
			 double origin_x, double origin_y, double size,
			 int edges_only)
{
/* creating a regular grid [Hexagonal cells] */
    double min_x;
    double min_y;
    double max_x;
    double max_y;
    double base_x;
................................................................................
    shift4 = size * 2.0;

    result = gaiaAllocGeomColl ();
    result->Srid = geom->Srid;
    get_grid_bbox (geom, &min_x, &min_y, &max_x, &max_y);
    get_hexgrid_base (min_x, min_y, origin_x, origin_y, shift3, shift4,
		      shift, &odd_even, &base_x, &base_y);


    while ((base_y - shift) < max_y)
      {
	  /* looping on grid rows */
	  if (odd_even)
	      x1 = base_x - (shift3 / 2.0);
	  else
	      x1 = base_x;
................................................................................
		    ret = gaiaGeomCollIntersects_r (p_cache, geom, item);
		else
		    ret = gaiaGeomCollIntersects (geom, item);
		if (ret == 1)
		  {
		      /* ok, inserting a valid cell */
		      count++;
		      if (edges_only)
			{
			    /* multilinestring */
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x1, y1);
			    gaiaSetPoint (ln->Coords, 1, x2, y2);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x2, y2);
................................................................................
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x5, y5);
			    gaiaSetPoint (ln->Coords, 1, x6, y6);
			    ln = gaiaAddLinestringToGeomColl (result, 2);
			    gaiaSetPoint (ln->Coords, 0, x6, y6);
			    gaiaSetPoint (ln->Coords, 1, x1, y1);
			}










		      else
			{
			    /* polygon */
			    pg = gaiaAddPolygonToGeomColl (result, 7, 0);
			    rng = pg->Exterior;
			    gaiaSetPoint (rng->Coords, 0, x1, y1);
			    gaiaSetPoint (rng->Coords, 1, x2, y2);
................................................................................
/* final check */
    if (!count)
      {
	  /* empty grid */
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    if (!edges_only)
      {
	  result->DeclaredType = GAIA_MULTIPOLYGON;
	  return result;
      }

    item = result;
    if (p_cache != NULL)
	result = gaiaUnaryUnion_r (p_cache, item);
    else
	result = gaiaUnaryUnion (item);
    gaiaFreeGeomColl (item);
    result->Srid = geom->Srid;

    result->DeclaredType = GAIA_LINESTRING;


    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaHexagonalGrid (gaiaGeomCollPtr geom, double origin_x, double origin_y,
		   double size, int edges_only)
{
    return gaiaHexagonalGridCommon (NULL, geom, origin_x, origin_y, size,
				    edges_only);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaHexagonalGrid_r (const void *p_cache, gaiaGeomCollPtr geom, double origin_x,
		     double origin_y, double size, int edges_only)
{
    return gaiaHexagonalGridCommon (p_cache, geom, origin_x, origin_y, size,
				    edges_only);
}

#endif /* end including GEOS */

Changes to src/gaiageo/gg_geoJSON.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
....
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
....
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
....
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
/*

 gg_geoJSON.c -- GeoJSON parser/lexer 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2015
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
#include <stdio.h>
#include <string.h>

#include <assert.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#include <io.h>
#else
#include "config.h"
#endif

#if defined(_WIN32) && !defined(__MINGW32__)
#define isatty	_isatty
#define fileno	_fileno
#endif

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>

#include <spatialite/gaiageo.h>

#define GEOJSON_DYN_NONE	0
#define GEOJSON_DYN_POINT	1
................................................................................
	  ptok_n = ptok->Next;
	  free (ptok);
	  ptok = ptok_n;
      }
    return 0;
}

static int
geoJSONlen (int start, int e1, int e2, int e3, int e4, int len)
{
/* computing an item length */
    int end = len;
    if (start < 0)
	return -1;
    if (e1 > start && e1 < end)
	end = e1;
    if (e2 > start && e2 < end)
	end = e2;
    if (e3 > start && e3 < end)
	end = e3;
    if (e4 > start && e4 < end)
	end = e4;
    return end;
}

static char *
geoJSONuncomma (const char *str, int i_str, int n_str)
{
/* removing an eventual trailing COMMA */
    int i;
    int comma = 1;
    int out = 0;
    char *norm = malloc (n_str + 1);
    for (i = i_str; i < n_str; i++)
      {
	  /* copying bytes */
	  *(norm + out) = *(str + i);
	  out++;
      }
    *(norm + out) = '\0';
    for (i = out - 1; i >= 0; i--)
      {
	  if (*(norm + i) == ' ' || *(norm + i) == '\t' || *(norm + i) == '\n'
	      || *(norm + i) == '\r')
	    {
		/*ignoring trailing WHITESPACES */
		*(norm + i) = '\0';
		continue;
	    }
	  if (*(norm + i) == ',' && comma)
	    {
		/* suppressing a final COMMA */
		*(norm + i) = '\0';
		comma = 0;
	    }
	  break;
      }
    return norm;
}

static int
geoJSONcheckType (const char *str, int pos)
{
/* testing for a Geometry Type */
    int pos1 = -1;
    int i;
    int len = strlen (str);
    for (i = pos; i < len; i++)
      {
	  if (*(str + i) == ':')
	    {
		pos1 = i + 1;
		break;
	    }
      }
    if (pos1 < 0)
	return 0;
    for (i = pos1; i < len; i++)
      {
	  if (*(str + i) == ',')
	      break;
	  if ((i + 7) <= len && strncmp (str + i, "\"Point\"", 7) == 0)
	      return 1;
	  if ((i + 12) <= len && strncmp (str + i, "\"LineString\"", 12) == 0)
	      return 1;
	  if ((i + 9) <= len && strncmp (str + i, "\"Polygon\"", 9) == 0)
	      return 1;
	  if ((i + 12) <= len && strncmp (str + i, "\"MultiPoint\"", 12) == 0)
	      return 1;
	  if ((i + 17) <= len
	      && strncmp (str + i, "\"MultiLineString\"", 17) == 0)
	      return 1;
	  if ((i + 14) <= len && strncmp (str + i, "\"MultiPolygon\"", 14) == 0)
	      return 1;
	  if ((i + 20) <= len
	      && strncmp (str + i, "\"GeometryCollection\"", 20) == 0)
	      return 1;
      }
    return 0;
}

static int
geoJSONcheckGeomCollType (const char *str, int pos)
{
/* testing for a GeometryCollection Type */
    int pos1 = -1;
    int i;
    int len = strlen (str);
    for (i = pos; i < len; i++)
      {
	  if (*(str + i) == ':')
	    {
		pos1 = i + 1;
		break;
	    }
      }
    if (pos1 < 0)
	return 0;
    for (i = pos1; i < len; i++)
      {
	  if (*(str + i) == ',')
	      break;
	  if ((i + 20) <= len
	      && strncmp (str + i, "\"GeometryCollection\"", 20) == 0)
	      return 1;
      }
    return 0;
}

static char *
geoJSONnormalize (const char *dirty)
{
/* attempting to normalize  the geoJSON expression */
    int len = strlen (dirty);
    char *clean;
    char *norm;
    int i;
    int i_type = -1;
    int i_geometries = -1;
    int i_coordinates = -1;
    int i_crs = -1;
    int i_bbox = -1;
    int i_end = -1;
    int n_type = -1;
    int n_geometries = -1;
    int n_coordinates = -1;
    int n_crs = -1;
    int n_bbox = -1;
    int base;
    int out = 0;

    for (i = 0; i < len; i++)
      {
	  /* hi-priority: searching for GeometryCollection */
	  if (i_type < 0 && (i + 6) < len
	      && strncmp (dirty + i, "\"type\"", 6) == 0)
	    {
		if (geoJSONcheckGeomCollType (dirty, i + 6))
		    i_type = i;
	    }
  }

    for (i = 0; i < len; i++)
      {
	  /* searching the start index for each item */
	  if (*(dirty + i) == '}')
	      i_end = i;
	  if (i_type < 0 && (i + 6) < len
	      && strncmp (dirty + i, "\"type\"", 6) == 0)
	    {
		if (geoJSONcheckType (dirty, i + 6))
		    i_type = i;
	    }
	  if (i_geometries < 0 && (i + 12) < len
	      && strncmp (dirty + i, "\"geometries\"", 12) == 0)
	      i_geometries = i;
	  if (i_coordinates < 0 && (i + 13) < len
	      && strncmp (dirty + i, "\"coordinates\"", 13) == 0)
	      i_coordinates = i;
	  if (i_crs < 0 && (i + 5) < len
	      && strncmp (dirty + i, "\"crs\"", 5) == 0)
	      i_crs = i;
	  if (i_bbox < 0 && (i + 6) < len
	      && strncmp (dirty + i, "\"bbox\"", 6) == 0)
	      i_bbox = i;
      }
      if (i_geometries >= 0)
      i_coordinates = i_geometries;
    n_type = geoJSONlen (i_type, i_coordinates, i_crs, i_bbox, i_end, len);
    n_coordinates =
	geoJSONlen (i_coordinates, i_type, i_crs, i_bbox, i_end, len);
    n_crs = geoJSONlen (i_crs, i_coordinates, i_type, i_bbox, i_end, len);
    n_bbox = geoJSONlen (i_bbox, i_coordinates, i_type, i_crs, i_end, len);

    clean = malloc (len + 1);

    if (i_end < 0)
      {
	  strcpy (clean, dirty);
	  return clean;
      }
    if (i_type < 0 || n_type <= 0)
      {
	  strcpy (clean, dirty);
	  return clean;
      }
    if (i_coordinates < 0 || n_coordinates <= 0)
      {
	  strcpy (clean, dirty);
	  return clean;
      }
    if (i_crs >= 0 && n_crs <= 0)
      {
	  strcpy (clean, dirty);
	  return clean;
      }
    if (i_bbox >= 0 && n_bbox <= 0)
      {
	  strcpy (clean, dirty);
	  return clean;
      }

    base = i_type;
    if (i_coordinates < base)
	base = i_coordinates;
    if (i_crs >= 0 && i_crs < base)
	base = i_crs;
    if (i_bbox >= 0 && i_bbox < base)
	base = i_bbox;

    for (i = 0; i < base; i++)
      {
	  /* preamble */
	  *(clean + out) = *(dirty + i);
	  out++;
      }

    norm = geoJSONuncomma (dirty, i_type, n_type);
    len = strlen (norm);
    for (i = 0; i < len; i++)
      {
	  /* type */
	  *(clean + out) = *(norm + i);
	  out++;
      }
    free (norm);
    *(clean + out) = ',';
    out++;

    if (i_crs >= 0)
      {
	  norm = geoJSONuncomma (dirty, i_crs, n_crs);
	  len = strlen (norm);
	  for (i = 0; i < len; i++)
	    {
		/* crs */
		*(clean + out) = *(norm + i);
		out++;
	    }
	  free (norm);
	  *(clean + out) = ',';
	  out++;
      }

    if (i_bbox >= 0)
      {
	  norm = geoJSONuncomma (dirty, i_bbox, n_bbox);
	  len = strlen (norm);
	  for (i = 0; i < len; i++)
	    {
		/* bbox */
		*(clean + out) = *(norm + i);
		out++;
	    }
	  free (norm);
	  *(clean + out) = ',';
	  out++;
      }

    norm = geoJSONuncomma (dirty, i_coordinates, n_coordinates);
    len = strlen (norm);
    for (i = 0; i < len; i++)
      {
	  /* coordinates */
	  *(clean + out) = *(norm + i);
	  out++;
      }
    free (norm);
    *(clean + out) = '}';
    out++;
    *(clean + out) = '\0';
    return clean;
}

gaiaGeomCollPtr
gaiaParseGeoJSON (const unsigned char *dirty_buffer)
{
    void *pParser = ParseAlloc (malloc);
    /* Linked-list of token values */
    geoJsonFlexToken *tokens = malloc (sizeof (geoJsonFlexToken));
    /* Pointer to the head of the list */
    geoJsonFlexToken *head = tokens;
    int yv;
    yyscan_t scanner;
    struct geoJson_data str_data;
    char *normalized_buffer = geoJSONnormalize ((const char *) dirty_buffer);

/* initializing the helper structs */
    str_data.geoJson_line = 1;
    str_data.geoJson_col = 1;
    str_data.geoJson_parse_error = 0;
    str_data.geoJson_first_dyn_block = NULL;
    str_data.geoJson_last_dyn_block = NULL;
................................................................................
    str_data.result = NULL;

/* initializing the scanner state */
    GeoJsonlex_init_extra (&str_data, &scanner);

    tokens->Next = NULL;

    GeoJson_scan_string ((char *) normalized_buffer, scanner);

    /*
       / Keep tokenizing until we reach the end
       / yylex() will return the next matching Token for us.
     */
    while ((yv = yylex (scanner)) != 0)
      {
................................................................................
	  tokens = tokens->Next;
      }
    /* This denotes the end of a line as well as the end of the parser */
    Parse (pParser, GEOJSON_NEWLINE, 0, &str_data);
    ParseFree (pParser, free);
    GeoJsonlex_destroy (scanner);

    free (normalized_buffer);

    /* Assigning the token as the end to avoid seg faults while cleaning */
    tokens->Next = NULL;
    geoJSON_cleanup (head);

    if (str_data.geoJson_parse_error)
      {
	  if (str_data.result)




|







 







|







 







<




<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











<







 







|







 







<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
46
47
48
49
50
51
52

53
54
55
56





57
58
59
60
61
62
63
....
1277
1278
1279
1280
1281
1282
1283































































































































































































































































































1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294

1295
1296
1297
1298
1299
1300
1301
....
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
....
1327
1328
1329
1330
1331
1332
1333


1334
1335
1336
1337
1338
1339
1340
/*

 gg_geoJSON.c -- GeoJSON parser/lexer 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2013
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
#include <stdio.h>
#include <string.h>

#include <assert.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"

#else
#include "config.h"
#endif






#include <spatialite/sqlite.h>
#include <spatialite/debug.h>

#include <spatialite/gaiageo.h>

#define GEOJSON_DYN_NONE	0
#define GEOJSON_DYN_POINT	1
................................................................................
	  ptok_n = ptok->Next;
	  free (ptok);
	  ptok = ptok_n;
      }
    return 0;
}
































































































































































































































































































gaiaGeomCollPtr
gaiaParseGeoJSON (const unsigned char *dirty_buffer)
{
    void *pParser = ParseAlloc (malloc);
    /* Linked-list of token values */
    geoJsonFlexToken *tokens = malloc (sizeof (geoJsonFlexToken));
    /* Pointer to the head of the list */
    geoJsonFlexToken *head = tokens;
    int yv;
    yyscan_t scanner;
    struct geoJson_data str_data;


/* initializing the helper structs */
    str_data.geoJson_line = 1;
    str_data.geoJson_col = 1;
    str_data.geoJson_parse_error = 0;
    str_data.geoJson_first_dyn_block = NULL;
    str_data.geoJson_last_dyn_block = NULL;
................................................................................
    str_data.result = NULL;

/* initializing the scanner state */
    GeoJsonlex_init_extra (&str_data, &scanner);

    tokens->Next = NULL;

    GeoJson_scan_string ((char *) dirty_buffer, scanner);

    /*
       / Keep tokenizing until we reach the end
       / yylex() will return the next matching Token for us.
     */
    while ((yv = yylex (scanner)) != 0)
      {
................................................................................
	  tokens = tokens->Next;
      }
    /* This denotes the end of a line as well as the end of the parser */
    Parse (pParser, GEOJSON_NEWLINE, 0, &str_data);
    ParseFree (pParser, free);
    GeoJsonlex_destroy (scanner);



    /* Assigning the token as the end to avoid seg faults while cleaning */
    tokens->Next = NULL;
    geoJSON_cleanup (head);

    if (str_data.geoJson_parse_error)
      {
	  if (str_data.result)

Changes to src/gaiageo/gg_geodesic.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
..
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90




91
92
93
94
95
96
97
...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
...
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
...
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
/*

 gg_geodesic.c -- Gaia functions for geodesic calculations
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Charles Karney <charles@karney.com>
Mark Johnson <mj10777@googlemail.com>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
................................................................................
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
#include <spatialite.h>
#include <spatialite_private.h>

#ifndef OMIT_PROJ
#include <proj_api.h>
#if defined(PJ_VERSION) && PJ_VERSION >= 490
/* Enable new proj.4's geodesic distance */
#define PROJ_GEODESIC 1
#include <geodesic.h>
#else
/* Use the old (Vincenty) geodesic distance */
#define PROJ_GEODESIC 0
#endif
#else
#define PROJ_GEODESIC 0
#endif

#define DEG2RAD	0.0174532925199432958
#define PI	3.14159265358979323846

struct ellipses
{
    char *name;
    double a;			/* equatorial radius - meters */
    double rf;			/* reverse flattening */
    double b;			/* polar radius - meters */
};





GAIAGEO_DECLARE int
gaiaEllipseParams (const char *name, double *a, double *b, double *rf)
{
/* trying to find ellipse params */
    struct ellipses ellps_list[] = {
	{"MERIT", 6378137.0, 298.257, -1.0},
................................................................................
GAIAGEO_DECLARE double
gaiaGeodesicDistance (double a, double b, double rf, double lat1, double lon1,
		      double lat2, double lon2)
{
/*
/ Calculate geodesic distance (in m) 
/ between two points specified by latitude/longitude 
/ (in decimal degrees) 
*/

#if PROJ_GEODESIC
/*
/ using the PROJ.4 own implementation
/
/ requires PROJ.4 >= 4.9.0
/
/ (accepting a patch suggested by Charles Karney <charles@karney.com>
*/
    double s12;
    struct geod_geodesic gd;
    if (b == a)
	b = a;			/* silencing stupid compiler warnings */
    geod_init (&gd, a, 1 / rf);
    geod_inverse (&gd, lat1, lon1, lat2, lon2, &s12, 0, 0);
    return s12;
#else
/*
/ using Vincenty inverse formula for ellipsoids
/
/ based on original JavaScript by (c) Chris Veness 2002-2008 
/ http://www.movable-type.co.uk/scripts/latlong-vincenty.html
/
*/
    double f = 1.0 / rf;
    double L = (lon2 - lon1) * DEG2RAD;
................................................................................
							   sinSigma) * (-3.0 +
									4.0 *
									cos2SigmaM
									*
									cos2SigmaM)));
    s = b * A * (sigma - deltaSigma);
    return s;
#endif /* end Vincenty formula */
}

GAIAGEO_DECLARE void
gaiaFree (void *ptr)
{
/* freeing a generic memory allocation */
    if (!ptr)
................................................................................
	    }
	  x1 = x2;
	  y1 = y2;
      }
    return len;
}

static int
auxGeodesicArcLength (double a, double rf, double lat1, double lon1,
		      double lat2, double lon2, double *parc_length_degrees,
		      double *parc_length_meters, double *pchord_degrees,
		      double *pchord_meters, double *pcentral_angle_radian,
		      double *pcentral_angle_degrees,
		      double *psegment_area_meters,
		      double *psegment_height_meters)
{
/* 
 / practical implementation of GeodesicArcLen
 /
 / *******************************************************************
 / this code was kindly contributed by Mark Johnson 
 / <mj10777@googlemail.com>
*/
#if PROJ_GEODESIC
    struct geod_geodesic gd;
    double arc_length_degrees = 0.0;	/* Arc Length = θ × r  (when θ is in radians) */
    double arc_length_meters = 0.0;	/* Distance of Arc Length in meters between points 1 and 2 */
    double chord_degrees = 0.0;	/* Distance in Degrees of shortest Line (chord) between points 1 and 2 */
    double chord_meters = 0.0;	/* Distance in Meters of shortest Line (chord) between points 1 and 2 */
    double central_angle_radian = 0.0;	/* θ: Arc Length / r (where θ is in radians) */
    double central_angle_degrees = 0.0;	/* θ: Arc Length / r (where θ is in degrees) */
    double segment_area_meters = 0.0;	// Area of segment/arc  in meters */
    double segment_height_meters = 0.0;	/* Height of segment/arc [short-sagitta] in meters */
    double a2 = (a * a);	/* pow(a,2) Radius (a) in meters */

    geod_init (&gd, a, 1 / rf);
    arc_length_degrees =
	geod_geninverse (&gd, lat1, lon1, lat2, lon2, &arc_length_meters, 0, 0,
			 0, 0, 0, 0);

    central_angle_radian = arc_length_meters / a;	/* Central Angle [radians] from Arch Length in meters and Radius (a) in meters */
    central_angle_degrees = central_angle_radian * (180 / PI);	/* Central Angle [degrees] from Arch Length in meters and Radius (a) in meters */
    chord_degrees = sqrt (((lat1 - lat2) * (lat1 - lat2)) + ((lon1 - lon2) * (lon1 - lon2)));	/* Pythagoras Theorem */
    chord_meters = sqrt ((a2 + a2) - (2 * (a2) * cos (central_angle_radian)));	/* Cosine rule using Central Angle [radians] */

    segment_height_meters = a - sqrt (a2 - pow ((chord_meters / 2), 2));	/* Height of Segment/Arch [short-sagitta] in meters with Radius (a) and chord in meters */
    segment_area_meters = ((central_angle_radian - sin (central_angle_radian)) / 2) * a2;	/* Area of Segment in meters with Radius (a) in meters */

    if (parc_length_degrees)
      {
	  *parc_length_degrees = arc_length_degrees;
      }
    if (parc_length_meters)
      {
	  *parc_length_meters = arc_length_meters;
      }
    if (pchord_degrees)
      {
	  *pchord_degrees = chord_degrees;
      }
    if (pchord_meters)
      {
	  *pchord_meters = chord_meters;
      }
    if (pcentral_angle_radian)
      {
	  *pcentral_angle_radian = central_angle_radian;
      }
    if (pcentral_angle_degrees)
      {
	  *pcentral_angle_degrees = central_angle_degrees;
      }
    if (psegment_area_meters)
      {
	  *psegment_area_meters = segment_area_meters;
      }
    if (psegment_height_meters)
      {
	  *psegment_height_meters = segment_height_meters;
      }
    if ((arc_length_degrees < 0.0) || (arc_length_degrees > 180.0))
      {
	  return 0;
      }
    return 1;
#else
    return 0;
#endif
}

GAIAGEO_DECLARE int
gaiaGeodesicArcLength (sqlite3 * sqlite, const void *data,
		       gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		       int return_type, double *retval)
{
/* 
 / Computes several Geodesic values based on the Distance between two Geometries 
 / 
 / *******************************************************************
 / this code was kindly contributed by Mark Johnson 
 / <mj10777@googlemail.com>
*/
    int is_longlat;
    double a;
    double b;
    double rf;
    int ret;
    gaiaGeomCollPtr shortest = NULL;
#ifdef OMIT_GEOS		/* not including GEOS */
    gaiaPointPtr pt1;
    gaiaPointPtr pt2;
    gaiaLinestringPtr ln_build;
#endif
    gaiaLinestringPtr ln;
    double x0;
    double y0;
    double x1;
    double y1;
    double z;
    double m;
    double arc_length_degrees = 0.0;	/* Arc Length = θ × r  (when θ is in radians) */
    double arc_length_meters = 0.0;	/* Distance of Arc Length in meters between points 1 and 2 */
    double chord_degrees = 0.0;	/* Distance in Degrees of shortest Line (chord) between points 1 and 2 */
    double chord_meters = 0.0;	/* Distance in Meters of shortest Line (chord) between points 1 and 2 */
    double central_angle_radian = 0.0;	/* θ: Arc Length / r (where θ is in radians) */
    double central_angle_degrees = 0.0;	/* θ: Arc Length / r (where θ is in degrees) */
    double segment_area_meters = 0.0;	/* Area of segment/arc  in meters */
    double segment_height_meters = 0.0;	/* Height of segment/arc [short-sagitta] in meters */

/* preliminary checks */
    if (geom1 == NULL || geom2 == NULL)
	return 0;
    if (geom1->Srid != geom2->Srid)
	return 0;
    if (!srid_is_geographic (sqlite, geom1->Srid, &is_longlat))
	return 0;
    else if (!is_longlat)
	return 0;
#ifdef OMIT_GEOS		/* not including GEOS */
    if (geom1->FirstLinestring != NULL || geom1->FirstPolygon != NULL
	|| geom2->FirstLinestring != NULL || geom2->FirstPolygon != NULL)
	return 0;
    if (geom1->FirstPoint == NULL || geom1->FirstPoint != geom1->LastPoint ||
	geom2->FirstPoint == NULL || geom->FirstPoint != geom2->LastPoint)
	return 0;
#endif

/* attempting to identify the corresponding ellipsoid */
    if (!getEllipsoidParams (sqlite, geom1->Srid, &a, &b, &rf))
	return 0;
#ifndef OMIT_GEOS		/* only if GEOS is supported */
/* checking first if an intersection exists */
    if (data != NULL)
	ret = gaiaGeomCollIntersects_r (data, geom1, geom2);
    else
	ret = gaiaGeomCollIntersects (geom1, geom2);
    if (ret)
      {
	  /* if an intersection exists the distance is always ZERO */
	  *retval = 0.0;
	  return 1;
      }
/* With GEOS: create a single LINESTRING with the 2 points containing the nearst point from each geometry */
    if (data != NULL)
	shortest = gaiaShortestLine_r (data, geom1, geom2);
    else
	shortest = gaiaShortestLine (geom1, geom2);
#else
    pt1 = geom1->FirstPoint;
    pt2 = geom2->FirstPoint;
    if (pt1->X == pt2->X && pt1->Y == pt2->Y)
      {
	  /* The Points are the same, the distance is always ZERO */
	  *retval = 0.0;
	  return 1;
      }
/* Without GEOS: create a single, XY based LINESTRING with the 2 points */
    shortest = gaiaAllocGeomColl ();
    ln_build = gaiaAddLinestringToGeomColl (shortest, 2);
    shortest->Srid = geom1->Srid;
    shortest->DeclaredType = GAIA_LINESTRING;
    shortest->DimensionModel = GAIA_XY;
    gaiaSetPoint (ln_build->Coords, 0, pt1->X, pt1->Y);
    gaiaSetPoint (ln_build->Coords, 1, pt2->X, pt2->Y);
#endif
    if (shortest == NULL)
	return 0;
    else if (shortest->FirstLinestring == NULL)
      {
	  gaiaFreeGeomColl (shortest);
	  return 0;
      }
    ln = shortest->FirstLinestring;
    if (ln->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (ln->Coords, 0, &x0, &y0, &z);
      }
    else if (ln->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (ln->Coords, 0, &x0, &y0, &m);
      }
    else if (ln->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (ln->Coords, 0, &x0, &y0, &z, &m);
      }
    else
      {
	  gaiaGetPoint (ln->Coords, 0, &x0, &y0);
      }
    if (ln->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (ln->Coords, 1, &x1, &y1, &z);
      }
    else if (ln->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (ln->Coords, 1, &x1, &y1, &m);
      }
    else if (ln->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (ln->Coords, 1, &x1, &y1, &z, &m);
      }
    else
      {
	  gaiaGetPoint (ln->Coords, 1, &x1, &y1);
      }
    if (auxGeodesicArcLength
	(a, rf, y0, x0, y1, x1, &arc_length_degrees, &arc_length_meters,
	 &chord_degrees, &chord_meters, &central_angle_radian,
	 &central_angle_degrees, &segment_area_meters, &segment_height_meters))
      {
	  switch (return_type)
	    {
	    case GAIA_GEODESIC_ARC_LENGTH_METERS:
		/*: arc_length_meters as Distance of Arc Length in meters between points 1 and 2 */
		*retval = arc_length_meters;
		break;
	    case GAIA_GEODESIC_CHORD_LENGTH_DEGREES:
		/* chord_degrees as Distance in Degrees of shortest Line (chord) between points 1 and 2 */
		*retval = chord_degrees;
		break;
	    case GAIA_GEODESIC_CHORD_LENGTH_METERS:
		/* chord_meters as Distance in Meters of shortest Line (chord) between points 1 and 2 */
		*retval = chord_meters;
		break;
	    case GAIA_GEODESIC_CENTRAL_ANGLE_RADIANS:
		/* central_angle_radian , as radians,  from Arch Length in meters and Radius (a) in meters */
		*retval = central_angle_radian;
		break;
	    case GAIA_GEODESIC_CENTRAL_ANGLE_DEGREES:
		/* central_angle_degrees, as degrees,  from Arch Length in meters and Radius (a) in meters */
		*retval = central_angle_degrees;
		break;
	    case GAIA_GEODESIC_ARC_AREA_METERS:
		/* segment_area_meters, Area of segment/arc in meters */
		*retval = segment_area_meters;
		break;
	    case GAIA_GEODESIC_ARC_HEIGHT_METERS:
		/* segment_height_meters, in meters,  Height of segment/arc [short-sagitta] in meters */
		*retval = segment_height_meters;
		break;
	    case GAIA_GEODESIC_ARC_LENGTH_DEGREES:
	    default:
		/* arc_length_degrees as Distance of Arc Length in degrees between points 1 and 2 */
		*retval = arc_length_degrees;
		break;
	    }
	  gaiaFreeGeomColl (shortest);
	  return 1;
      }

/* invalid distance (for Arc-Length in degrees not between 0-180) */
    gaiaFreeGeomColl (shortest);
    return 0;
}

GAIAGEO_DECLARE int
gaiaConvertLength (double value, int unit_from, int unit_to, double *cvt)
{
/* converting length from one unit to another */
    double m;
    double factors[] = {
	1000.0, 1.0, 0.1, 0.01, 0.001, 1852.0, 0.0254, 0.3048, 0.9144,




|







 







|



<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











>
>
>
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30


31
32
33
34
35
36
37
..
55
56
57
58
59
60
61
















62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
183
184
185
186
187
188
189




















190
191
192
193
194
195
196
197
...
263
264
265
266
267
268
269

270
271
272
273
274
275
276
...
358
359
360
361
362
363
364












































































































































































































































































365
366
367
368
369
370
371
/*

 gg_geodesic.c -- Gaia functions for geodesic calculations
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):



Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
................................................................................
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>

















#define DEG2RAD	0.0174532925199432958
#define PI	3.14159265358979323846

struct ellipses
{
    char *name;
    double a;			/* equatorial radius - meters */
    double rf;			/* reverse flattening */
    double b;			/* polar radius - meters */
};

#if defined(_WIN32) && !defined(__MINGW32__)
#define isnan	_isnan
#endif /* not WIN32-MSVC */

GAIAGEO_DECLARE int
gaiaEllipseParams (const char *name, double *a, double *b, double *rf)
{
/* trying to find ellipse params */
    struct ellipses ellps_list[] = {
	{"MERIT", 6378137.0, 298.257, -1.0},
................................................................................
GAIAGEO_DECLARE double
gaiaGeodesicDistance (double a, double b, double rf, double lat1, double lon1,
		      double lat2, double lon2)
{
/*
/ Calculate geodesic distance (in m) 
/ between two points specified by latitude/longitude 




















/ (in decimal degrees) using Vincenty inverse formula for ellipsoids
/
/ based on original JavaScript by (c) Chris Veness 2002-2008 
/ http://www.movable-type.co.uk/scripts/latlong-vincenty.html
/
*/
    double f = 1.0 / rf;
    double L = (lon2 - lon1) * DEG2RAD;
................................................................................
							   sinSigma) * (-3.0 +
									4.0 *
									cos2SigmaM
									*
									cos2SigmaM)));
    s = b * A * (sigma - deltaSigma);
    return s;

}

GAIAGEO_DECLARE void
gaiaFree (void *ptr)
{
/* freeing a generic memory allocation */
    if (!ptr)
................................................................................
	    }
	  x1 = x2;
	  y1 = y2;
      }
    return len;
}













































































































































































































































































GAIAGEO_DECLARE int
gaiaConvertLength (double value, int unit_from, int unit_to, double *cvt)
{
/* converting length from one unit to another */
    double m;
    double factors[] = {
	1000.0, 1.0, 0.1, 0.01, 0.001, 1852.0, 0.0254, 0.3048, 0.9144,

Changes to src/gaiageo/gg_geometries.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
...
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
...
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
....
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
....
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
....
1494
1495
1496
1497
1498
1499
1500
1501



















1502


1503




























1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
....
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
....
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
....
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
....
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
....
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
....
3983
3984
3985
3986
3987
3988
3989
3990

3991
3992
3993
3994
3995
3996
3997



3998
3999
4000
4001
4002
4003
4004
4005
4006
4007


4008
























































































4009
4010
4011
4012
4013
4014
4015
....
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058













































4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
....
4096
4097
4098
4099
4100
4101
4102
4103




























































































4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
....
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
....
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
....
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
....
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
....
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
....
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
....
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
/*

 gg_geometries.c -- Gaia geometric objects
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
GAIAGEO_DECLARE void
gaiaCopyLinestringCoords (gaiaLinestringPtr dst, gaiaLinestringPtr src)
{
/* 
/ copying coords from one Linestring to another
/ maybe, converting from one Dimension Model to a different one
*/
    gaiaCopyLinestringCoordsEx (dst, src, 0.0, 0.0);
}

GAIAGEO_DECLARE void
gaiaCopyLinestringCoordsEx (gaiaLinestringPtr dst, gaiaLinestringPtr src,
			    double z_no_data, double m_no_data)
{
/* 
/ copying coords from one Linestring to another
/ maybe, converting from one Dimension Model to a different one
*/
    int iv;
    double x;
    double y;
    double z;
    double m;
    if (!src)
	return;
    if (!dst)
	return;
    if (src->Points != dst->Points)
	return;
    for (iv = 0; iv < dst->Points; iv++)
      {
	  z = z_no_data;
	  m = m_no_data;
	  if (src->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (src->Coords, iv, &x, &y, &z);
	    }
	  else if (src->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (src->Coords, iv, &x, &y, &m);
................................................................................
GAIAGEO_DECLARE void
gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr src)
{
/* 
/ copying coords from one Ring to another
/ maybe, converting from one Dimension Model to a different one
*/
    gaiaCopyRingCoordsEx (dst, src, 0.0, 0.0);
}

GAIAGEO_DECLARE void
gaiaCopyRingCoordsEx (gaiaRingPtr dst, gaiaRingPtr src, double z_no_data,
		      double m_no_data)
{
/* 
/ copying coords from one Ring to another
/ maybe, converting from one Dimension Model to a different one
*/
    int iv;
    double x;
    double y;
    double z;
    double m;
    if (!src)
	return;
    if (!dst)
	return;
    if (src->Points != dst->Points)
	return;
    for (iv = 0; iv < dst->Points; iv++)
      {
	  z = z_no_data;
	  m = m_no_data;
	  if (src->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (src->Coords, iv, &x, &y, &z);
	    }
	  else if (src->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (src->Coords, iv, &x, &y, &m);
................................................................................
/* clones a POLYGON (special) */
    int ib;
    gaiaPolygonPtr new_polyg;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!polyg)
	return NULL;
    if (mode == GAIA_REVERSE_ORDER || mode == GAIA_CW_ORDER
	|| mode == GAIA_CCW_ORDER)
	;
    else
	return gaiaClonePolygon (polyg);

    i_ring = polyg->Exterior;
    if (polyg->DimensionModel == GAIA_XY_Z)
	new_polyg = gaiaAllocPolygonXYZ (i_ring->Points, polyg->NumInteriors);
................................................................................
    o_ring = new_polyg->Exterior;
/* copying points for the EXTERIOR RING */
    if (mode == GAIA_REVERSE_ORDER)
	gaiaCopyRingCoordsReverse (o_ring, i_ring);
    else
      {
	  gaiaClockwise (i_ring);
	  if (mode == GAIA_CCW_ORDER)
	    {
		/* returning a Counter-Clockwise Polygon */
		if (i_ring->Clockwise)
		    gaiaCopyRingCoordsReverse (o_ring, i_ring);
		else
		    gaiaCopyRingCoords (o_ring, i_ring);
	    }
	  else
	    {
		/* returning a Clockwise Polygon */
		if (i_ring->Clockwise)
		    gaiaCopyRingCoords (o_ring, i_ring);
		else
		    gaiaCopyRingCoordsReverse (o_ring, i_ring);
	    }
      }
    for (ib = 0; ib < new_polyg->NumInteriors; ib++)
      {
	  /* copying each INTERIOR RING [if any] */
	  i_ring = polyg->Interiors + ib;
	  o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
	  if (mode == GAIA_REVERSE_ORDER)
	      gaiaCopyRingCoordsReverse (o_ring, i_ring);
	  else
	    {
		if (mode == GAIA_CCW_ORDER)
		  {
		      /* returning a Counter-Clockwise Polygon */
		      if (i_ring->Clockwise)
			  gaiaCopyRingCoords (o_ring, i_ring);
		      else
			  gaiaCopyRingCoordsReverse (o_ring, i_ring);
		  }
		else
		  {
		      /* returning a Clockwise Polygon */
		      gaiaClockwise (i_ring);
		      if (i_ring->Clockwise)
			  gaiaCopyRingCoordsReverse (o_ring, i_ring);
		      else
			  gaiaCopyRingCoords (o_ring, i_ring);
		  }
	    }
      }
    return new_polyg;
}

GAIAGEO_DECLARE int
gaiaCheckClockwise (gaiaGeomCollPtr geom)
{
/* checking for a Clockwise Geometry */
    int retval = 1;
    gaiaPolygonPtr polyg;
    int ib;
    gaiaRingPtr i_ring;
    if (!geom)
	return 1;

    polyg = geom->FirstPolygon;
    while (polyg != NULL)
      {
	  i_ring = polyg->Exterior;
	  gaiaClockwise (i_ring);
	  if (i_ring->Clockwise == 0)
	      retval = 0;
	  for (ib = 0; ib < polyg->NumInteriors; ib++)
	    {
		/* checking each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		gaiaClockwise (i_ring);
		if (i_ring->Clockwise)
		    retval = 0;
	    }
	  polyg = polyg->Next;
      }
    return retval;
}

GAIAGEO_DECLARE int
gaiaCheckCounterClockwise (gaiaGeomCollPtr geom)
{
/* checking for a CounterClockwise Geometry */
    int retval = 1;
    gaiaPolygonPtr polyg;
    int ib;
    gaiaRingPtr i_ring;
    if (!geom)
	return 1;

    polyg = geom->FirstPolygon;
    while (polyg != NULL)
      {
	  i_ring = polyg->Exterior;
	  gaiaClockwise (i_ring);
	  if (i_ring->Clockwise)
	      retval = 0;
	  for (ib = 0; ib < polyg->NumInteriors; ib++)
	    {
		/* checking each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		gaiaClockwise (i_ring);
		if (i_ring->Clockwise == 0)
		    retval = 0;
	    }
	  polyg = polyg->Next;
      }
    return retval;
}

GAIAGEO_DECLARE gaiaPolygonPtr
gaiaAllocPolygon (int vert, int excl)
{
/* POLYGON object constructor */
    gaiaPolygonPtr p;
................................................................................
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!geom)
	return NULL;
    if (mode == GAIA_REVERSE_ORDER || mode == GAIA_CW_ORDER
	|| mode == GAIA_CCW_ORDER)
	;
    else
	return gaiaCloneGeomColl (geom);

    if (geom->DimensionModel == GAIA_XY_Z)
	new_geom = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
................................................................................
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  if (mode == GAIA_REVERSE_ORDER)
	      gaiaCopyRingCoordsReverse (o_ring, i_ring);
	  else
	    {
		gaiaClockwise (i_ring);
		if (mode == GAIA_CCW_ORDER)
		  {
		      /* Counter-Clockwise Polygon */
		      if (i_ring->Clockwise)
			  gaiaCopyRingCoordsReverse (o_ring, i_ring);
		      else
			  gaiaCopyRingCoords (o_ring, i_ring);
		  }
		else
		  {
		      /* Clockwise Polygon */
		      if (i_ring->Clockwise)
			  gaiaCopyRingCoords (o_ring, i_ring);
		      else
			  gaiaCopyRingCoordsReverse (o_ring, i_ring);
		  }
	    }
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		if (mode == GAIA_REVERSE_ORDER)
		    gaiaCopyRingCoordsReverse (o_ring, i_ring);
		else
		  {
		      gaiaClockwise (i_ring);
		      if (mode == GAIA_CCW_ORDER)
			{
			    /* Counter-Clockwise Polygon */
			    if (i_ring->Clockwise)
				gaiaCopyRingCoords (o_ring, i_ring);
			    else
				gaiaCopyRingCoordsReverse (o_ring, i_ring);
			}
		      else
			{
			    /* Clockwise Polygon */
			    if (i_ring->Clockwise)
				gaiaCopyRingCoordsReverse (o_ring, i_ring);
			    else
				gaiaCopyRingCoords (o_ring, i_ring);
			}
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

................................................................................
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYZ (gaiaGeomCollPtr geom)
{
/* clones a GEOMETRYCOLLECTION converting to XYZ-dimensions */
    return gaiaCastGeomCollToXYZnoData (geom, 0.0);



















}































GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYZnoData (gaiaGeomCollPtr geom, double no_data)
{
/* clones a GEOMETRYCOLLECTION converting to XYZ-dimensions */
    int ib;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    int has_z = 0;
    if (!geom)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    new_geom = gaiaAllocGeomCollXYZ ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  if (has_z)
	      gaiaAddPointToGeomCollXYZ (new_geom, point->X, point->Y,
					 point->Z);
	  else
	      gaiaAddPointToGeomCollXYZ (new_geom, point->X, point->Y, no_data);
	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoordsEx (new_line, line, no_data, 0.0);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  gaiaCopyRingCoordsEx (o_ring, i_ring, no_data, 0.0);
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		gaiaCopyRingCoordsEx (o_ring, i_ring, no_data, 0.0);
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYM (gaiaGeomCollPtr geom)
{
/* clones a GEOMETRYCOLLECTION converting to XYM-dimensions */
    return gaiaCastGeomCollToXYMnoData (geom, 0.0);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYMnoData (gaiaGeomCollPtr geom, double no_data)
{
/* clones a GEOMETRYCOLLECTION converting to XYM-dimensions */
    int ib;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    int has_m = 0;
    if (!geom)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_M
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_m = 1;
    new_geom = gaiaAllocGeomCollXYM ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  if (has_m)
	      gaiaAddPointToGeomCollXYM (new_geom, point->X, point->Y,
					 point->M);
	  else
	      gaiaAddPointToGeomCollXYM (new_geom, point->X, point->Y, no_data);
	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoordsEx (new_line, line, 0.0, no_data);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  gaiaCopyRingCoordsEx (o_ring, i_ring, 0.0, no_data);
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		gaiaCopyRingCoordsEx (o_ring, i_ring, 0.0, no_data);
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYZM (gaiaGeomCollPtr geom)
{
/* clones a GEOMETRYCOLLECTION converting to XYZM-dimensions */
    return gaiaCastGeomCollToXYZMnoData (geom, 0.0, 0.0);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYZMnoData (gaiaGeomCollPtr geom, double z_no_data,
			      double m_no_data)
{
/* clones a GEOMETRYCOLLECTION converting to XYZM-dimensions */
    int ib;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    int has_z = 0;
    int has_m = 0;
    if (!geom)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    if (geom->DimensionModel == GAIA_XY_M
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_m = 1;
    new_geom = gaiaAllocGeomCollXYZM ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  if (has_z && has_m)
	      gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y,
					  point->Z, point->M);
	  else if (has_z)
	      gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y,
					  point->Z, m_no_data);
	  else if (has_m)
	      gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y,
					  z_no_data, point->M);
	  else
	      gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y,
					  z_no_data, m_no_data);
	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoordsEx (new_line, line, z_no_data, m_no_data);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  gaiaCopyRingCoordsEx (o_ring, i_ring, z_no_data, m_no_data);
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		gaiaCopyRingCoordsEx (o_ring, i_ring, z_no_data, m_no_data);
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
................................................................................
    if (mbr1->MaxY >= mbr2->MinY && mbr1->MaxY <= mbr2->MaxY)
	ok_4 = 1;
    if (ok_1 && ok_2 && ok_3 && ok_4)
	return 1;
    return 0;
}

static void
fatMakePoint (double x, double y, int srid, unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing a POINT */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 2);	/* [x,y] coords */
................................................................................
    *(ptr + 38) = GAIA_MARK_MBR;	/* MBR signature */
    gaiaExport32 (ptr + 39, GAIA_POINT, 1, endian_arch);	/* class POINT */
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    *(ptr + 59) = GAIA_MARK_END;	/* END signature */
}

static void
tinyMakePoint (double x, double y, int srid, unsigned char **result, int *size)
{
/* build a Blob encoded TinyPoint representing a POINT */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* allocating the BLOB */
    *size = 24;
    *result = malloc (*size);
    ptr = *result;
/* setting the Blob value */
    *ptr = GAIA_MARK_START;	/* START signature */
    *(ptr + 1) = GAIA_TINYPOINT_LITTLE_ENDIAN;	/* byte ordering */
    gaiaExport32 (ptr + 2, srid, 1, endian_arch);	/* the SRID */
    *(ptr + 6) = GAIA_TINYPOINT_XY;	/* Point Type */
    gaiaExport64 (ptr + 7, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 15, y, 1, endian_arch);	/* Y */
    *(ptr + 23) = GAIA_MARK_END;	/* END signature */
}

GAIAGEO_DECLARE void
gaiaMakePoint (double x, double y, int srid, unsigned char **result, int *size)
{
/* always returns a BLOB-Geometry encoded POINT */
    gaiaMakePointEx (0, x, y, srid, result, size);
}

GAIAGEO_DECLARE void
gaiaMakePointEx (int tiny_point, double x, double y, int srid,
		 unsigned char **result, int *size)
{
/* conditionally returns either a BLOB-Geometry or BLOB-TinyPoint encoded POINT */
    if (tiny_point)
	tinyMakePoint (x, y, srid, result, size);
    else
	fatMakePoint (x, y, srid, result, size);
}

static void
fatMakePointZ (double x, double y, double z, int srid, unsigned char **result,
	       int *size)
{
/* build a Blob encoded Geometry representing a POINT Z */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 3);	/* [x,y,z] coords */
................................................................................
    gaiaExport32 (ptr + 39, GAIA_POINTZ, 1, endian_arch);	/* class POINT */
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 59, z, 1, endian_arch);	/* Z */
    *(ptr + 67) = GAIA_MARK_END;	/* END signature */
}

static void
tinyMakePointZ (double x, double y, double z, int srid, unsigned char **result,
		int *size)
{
/* build a Blob encoded TinyPoint representing a POINT Z */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* allocating the BLOB */
    *size = 32;
    *result = malloc (*size);
    ptr = *result;
/* setting the Blob value */
    *ptr = GAIA_MARK_START;	/* START signature */
    *(ptr + 1) = GAIA_TINYPOINT_LITTLE_ENDIAN;	/* byte ordering */
    gaiaExport32 (ptr + 2, srid, 1, endian_arch);	/* the SRID */
    *(ptr + 6) = GAIA_TINYPOINT_XYZ;	/* Point Type */
    gaiaExport64 (ptr + 7, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 15, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 23, z, 1, endian_arch);	/* Z */
    *(ptr + 31) = GAIA_MARK_END;	/* END signature */
}

GAIAGEO_DECLARE void
gaiaMakePointZ (double x, double y, double z, int srid, unsigned char **result,
		int *size)
{
/* always returns a BLOB-Geometry encoded POINT Z */
    gaiaMakePointZEx (0, x, y, z, srid, result, size);
}

GAIAGEO_DECLARE void
gaiaMakePointZEx (int tiny_point, double x, double y, double z, int srid,
		  unsigned char **result, int *size)
{
/* conditionally returns either a BLOB-Geometry or BLOB-TinyPoint encoded POINT Z */
    if (tiny_point)
	tinyMakePointZ (x, y, z, srid, result, size);
    else
	fatMakePointZ (x, y, z, srid, result, size);
}

static void
fatMakePointM (double x, double y, double m, int srid, unsigned char **result,
	       int *size)
{
/* build a Blob encoded Geometry representing a POINT M */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 3);	/* [x,y,z] coords */
    *result = malloc (*size);
................................................................................
    gaiaExport32 (ptr + 39, GAIA_POINTM, 1, endian_arch);	/* class POINT */
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 59, m, 1, endian_arch);	/* M */
    *(ptr + 67) = GAIA_MARK_END;	/* END signature */
}

static void
tinyMakePointM (double x, double y, double m, int srid, unsigned char **result,
		int *size)
{
/* build a Blob encoded TinyPoint representing a POINT M */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* allocating the BLOB */
    *size = 32;
    *result = malloc (*size);
    ptr = *result;
/* setting the Blob value */
    *ptr = GAIA_MARK_START;	/* START signature */
    *(ptr + 1) = GAIA_TINYPOINT_LITTLE_ENDIAN;	/* byte ordering */
    gaiaExport32 (ptr + 2, srid, 1, endian_arch);	/* the SRID */
    *(ptr + 6) = GAIA_TINYPOINT_XYM;	/* Point Type */
    gaiaExport64 (ptr + 7, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 15, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 23, m, 1, endian_arch);	/* M */
    *(ptr + 31) = GAIA_MARK_END;	/* END signature */
}

GAIAGEO_DECLARE void
gaiaMakePointM (double x, double y, double m, int srid, unsigned char **result,
		int *size)
{
/* always returns a BLOB-Geometry encoded POINT M */
    gaiaMakePointMEx (0, x, y, m, srid, result, size);
}

GAIAGEO_DECLARE void
gaiaMakePointMEx (int tiny_point, double x, double y, double m, int srid,
		  unsigned char **result, int *size)
{
/* conditionally returns either a BLOB-Geometry or BLOB-TinyPoint encoded POINT M */
    if (tiny_point)
	tinyMakePointM (x, y, m, srid, result, size);
    else
	fatMakePointM (x, y, m, srid, result, size);
}

static void
fatMakePointZM (double x, double y, double z, double m, int srid,
		unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing a POINT ZM */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 4);	/* [x,y,z,m] coords */
................................................................................
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 59, z, 1, endian_arch);	/* Z */
    gaiaExport64 (ptr + 67, m, 1, endian_arch);	/* M */
    *(ptr + 75) = GAIA_MARK_END;	/* END signature */
}

static void
tinyMakePointZM (double x, double y, double z, double m, int srid,
		 unsigned char **result, int *size)
{
/* build a Blob encoded TinyPoint representing a POINT ZM */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* allocating the BLOB */
    *size = 40;
    *result = malloc (*size);
    ptr = *result;
/* setting the Blob value */
    *ptr = GAIA_MARK_START;	/* START signature */
    *(ptr + 1) = GAIA_TINYPOINT_LITTLE_ENDIAN;	/* byte ordering */
    gaiaExport32 (ptr + 2, srid, 1, endian_arch);	/* the SRID */
    *(ptr + 6) = GAIA_TINYPOINT_XYZM;	/* Point Type */
    gaiaExport64 (ptr + 7, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 15, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 23, z, 1, endian_arch);	/* Z */
    gaiaExport64 (ptr + 31, m, 1, endian_arch);	/* M */
    *(ptr + 39) = GAIA_MARK_END;	/* END signature */
}

GAIAGEO_DECLARE void
gaiaMakePointZM (double x, double y, double z, double m, int srid,
		 unsigned char **result, int *size)
{
/* always returns a BLOB-Geometry encoded POINT ZM */
    gaiaMakePointZMEx (0, x, y, z, m, srid, result, size);
}

GAIAGEO_DECLARE void
gaiaMakePointZMEx (int tiny_point, double x, double y, double z, double m,
		   int srid, unsigned char **result, int *size)
{
/* conditionally returns either a BLOB-Geometry or BLOB-TinyPoint encoded POINT ZM */
    if (tiny_point)
	tinyMakePointZM (x, y, z, m, srid, result, size);
    else
	fatMakePointZM (x, y, z, m, srid, result, size);
}

GAIAGEO_DECLARE void
gaiaMakeLine (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
	      unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing a LINESTRING (segment) */
    int pts;
    int lns;
................................................................................
    return gaiaMergeGeometries_r (NULL, geom1, geom2);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaMergeGeometries_r (const void *cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
/* mergine a second generic Geometries into the first one */

    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaLinestringPtr new_ln;
    gaiaPolygonPtr pg;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr rng;
    gaiaRingPtr new_rng;



    double x;
    double y;
    double z;
    double m;
    int iv;
    int ib;

    if (geom1 == NULL || geom2 == NULL)
	return NULL;
    if (cache != NULL)


	cache = NULL;

























































































    pt = geom2->FirstPoint;
    while (pt)
      {
	  /* copying POINTs from GEOM-2 */
	  z = 0.0;
	  m = 0.0;
................................................................................
		m = pt->M;
	    }
	  else
	    {
		x = pt->X;
		y = pt->Y;
	    }
	  if (geom1->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaAddPointToGeomCollXYZM (geom1, x, y, z, m);
	    }
	  else if (geom1->DimensionModel == GAIA_XY_Z)
	    {
		gaiaAddPointToGeomCollXYZ (geom1, x, y, z);
	    }
	  else if (geom1->DimensionModel == GAIA_XY_M)
	    {
		gaiaAddPointToGeomCollXYM (geom1, x, y, m);
	    }
	  else
	    {
		gaiaAddPointToGeomColl (geom1, x, y);
	    }
	  pt = pt->Next;
      }














































    ln = geom2->FirstLinestring;
    while (ln)
      {
	  /* copying LINESTRINGs from GEOM-2 */
	  new_ln = gaiaAddLinestringToGeomColl (geom1, ln->Points);
	  for (iv = 0; iv < ln->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (ln->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
................................................................................
		else
		  {
		      gaiaSetPoint (new_ln->Coords, iv, x, y);
		  }
	    }
	  ln = ln->Next;
      }





























































































    pg = geom2->FirstPolygon;
    while (pg)
      {
	  /* copying POLYGONs from GEOM-2 */
	  rng = pg->Exterior;
	  new_pg =
	      gaiaAddPolygonToGeomColl (geom1, rng->Points, pg->NumInteriors);
	  new_rng = new_pg->Exterior;
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* Exterior Ring */
		z = 0.0;
		m = 0.0;
		if (rng->DimensionModel == GAIA_XY_Z_M)
................................................................................
			    gaiaSetPoint (new_rng->Coords, iv, x, y);
			}
		  }
	    }
	  pg = pg->Next;
      }

    return geom1;
}

GAIAGEO_DECLARE void
gaiaBuildMbr (double x1, double y1, double x2, double y2, int srid,
	      unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing an MBR */
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMinX (const unsigned char *blob, unsigned int size, double *minx)
{
/* returns the MinX coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();

    if (size == 24 || size == 32 || size == 40)
      {
	  /* testing for a possible TinyPoint BLOB */
	  if (*(blob + 0) == GAIA_MARK_START &&
	      (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	       || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      && *(blob + (size - 1)) == GAIA_MARK_END)
	    {
		if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
		    little_endian = 1;
		else if (*(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
		    little_endian = 0;
		else
		    return 0;	/* unknown encoding; neither little-endian nor big-endian */
		*minx = gaiaImport64 (blob + 7, little_endian, endian_arch);
		return 1;
	    }
      }

    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMaxX (const unsigned char *blob, unsigned int size, double *maxx)
{
/* returns the MaxX coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();

    if (size == 24 || size == 32 || size == 40)
      {
	  /* testing for a possible TinyPoint BLOB */
	  if (*(blob + 0) == GAIA_MARK_START &&
	      (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	       || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      && *(blob + (size - 1)) == GAIA_MARK_END)
	    {
		if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
		    little_endian = 1;
		else if (*(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
		    little_endian = 0;
		else
		    return 0;	/* unknown encoding; neither little-endian nor big-endian */
		*maxx = gaiaImport64 (blob + 7, little_endian, endian_arch);
		return 1;
	    }
      }

    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMinY (const unsigned char *blob, unsigned int size, double *miny)
{
/* returns the MinY coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();

    if (size == 24 || size == 32 || size == 40)
      {
	  /* testing for a possible TinyPoint BLOB */
	  if (*(blob + 0) == GAIA_MARK_START &&
	      (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	       || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      && *(blob + (size - 1)) == GAIA_MARK_END)
	    {
		if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
		    little_endian = 1;
		else if (*(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
		    little_endian = 0;
		else
		    return 0;	/* unknown encoding; neither little-endian nor big-endian */
		*miny = gaiaImport64 (blob + 15, little_endian, endian_arch);
		return 1;
	    }
      }

    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMaxY (const unsigned char *blob, unsigned int size, double *maxy)
{
/* returns the MaxY coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();

    if (size == 24 || size == 32 || size == 40)
      {
	  /* testing for a possible TinyPoint BLOB */
	  if (*(blob + 0) == GAIA_MARK_START &&
	      (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	       || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      && *(blob + (size - 1)) == GAIA_MARK_END)
	    {
		if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
		    little_endian = 1;
		else if (*(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
		    little_endian = 0;
		else
		    return 0;	/* unknown encoding; neither little-endian nor big-endian */
		*maxy = gaiaImport64 (blob + 15, little_endian, endian_arch);
		return 1;
	    }
      }

    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................
	little_endian = 0;
    else
	return 0;		/* unknown encoding; neither little-endian nor big-endian */
    *maxy = gaiaImport64 (blob + 30, little_endian, endian_arch);
    return 1;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaAddMeasure (gaiaGeomCollPtr geom, double m_start, double m_end)
{
/* linearly interpolates M-values between the start and end points. */
    double total_length;
    double progressive_length;
    gaiaGeomCollPtr geo2;
    gaiaLinestringPtr pL;
    gaiaLinestringPtr pL2;
    int iv;
    double x;
    double y;
    double z;
    double m;
    double x0;
    double y0;
    double mm;
    double percent;
    double interval = m_end - m_start;

    if (!geom)
	return NULL;
/* only Linestring or MultiLinestrings are accepted */
    if (geom->FirstPoint != NULL)
	return NULL;
    if (geom->FirstPolygon != NULL)
	return NULL;
    if (geom->FirstLinestring == NULL)
	return NULL;

/* computing the total length */
    total_length = 0.0;
    pL = geom->FirstLinestring;
    while (pL != NULL)
      {
	  for (iv = 0; iv < pL->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (pL->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (pL->Coords, iv, &x, &y, &z);
		  }
		else if (pL->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (pL->Coords, iv, &x, &y, &m);
		  }
		else if (pL->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (pL->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (pL->Coords, iv, &x, &y);
		  }

		if (iv != 0)
		    total_length +=
			sqrt (((x0 - x) * (x0 - x)) + ((y0 - y) * (y0 - y)));
		x0 = x;
		y0 = y;
	    }
	  pL = pL->Next;
      }

/* creating the output geometry */
    progressive_length = 0.0;
    if (geom->DimensionModel == GAIA_XY_Z)
	geo2 = gaiaAllocGeomCollXYZM ();
    else if (geom->DimensionModel == GAIA_XY_M)
	geo2 = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	geo2 = gaiaAllocGeomCollXYZM ();
    else
	geo2 = gaiaAllocGeomCollXYM ();
    geo2->Srid = geom->Srid;
    pL = geom->FirstLinestring;
    while (pL != NULL)
      {
	  pL2 = gaiaAddLinestringToGeomColl (geo2, pL->Points);
	  for (iv = 0; iv < pL->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (pL->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (pL->Coords, iv, &x, &y, &z);
		  }
		else if (pL->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (pL->Coords, iv, &x, &y, &m);
		  }
		else if (pL->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (pL->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (pL->Coords, iv, &x, &y);
		  }

		if (iv != 0)
		    progressive_length +=
			sqrt (((x0 - x) * (x0 - x)) + ((y0 - y) * (y0 - y)));
		x0 = x;
		y0 = y;

		/* linealy interpolating M-values */
		percent = progressive_length / total_length;
		mm = m_start + (interval * percent);
		if (pL2->DimensionModel == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (pL2->Coords, iv, x, y, mm);
		  }
		else
		  {
		      gaiaSetPointXYZM (pL2->Coords, iv, x, y, z, mm);
		  }
	    }
	  pL = pL->Next;
      }

    return geo2;
}

GAIAGEO_DECLARE int
gaiaInterpolatePoint (const void *p_cache, gaiaGeomCollPtr line,
		      gaiaGeomCollPtr point, double *m_value)
{
/* Will interpolate the M-value for a LinestringM at the point closest to the given Point */
    gaiaLinestringPtr pL;
    int iv;
    double x;
    double y;
    double m;
    double z;
    double fraction;
    double x0;
    double y0;
    double m0;
    double progressive_length;
    double pl0;

    if (!line)
	return 0;
    if (!point)
	return 0;
/* only a Linestring M is accepted as the first geom */
    if (line->FirstPoint != NULL)
	return 0;
    if (line->FirstPolygon != NULL)
	return 0;
    if (line->FirstLinestring == NULL)
	return 0;
    if (line->FirstLinestring != line->LastLinestring)
	return 0;
    if (line->DimensionModel == GAIA_XY_M
	|| line->DimensionModel == GAIA_XY_Z_M)
	;
    else
	return 0;
/* only a Point is accepted as the second geom */
    if (point->FirstPolygon != NULL)
	return 0;
    if (point->FirstLinestring != NULL)
	return 0;
    if (point->FirstPoint == NULL)
	return 0;
    if (point->FirstPoint != point->LastPoint)
	return 0;

#ifndef OMIT_GEOS		/* only if GEOS is supported */

/* locating the Point along the Line */
    if (p_cache != NULL)
	fraction = gaiaLineLocatePoint_r (p_cache, line, point);
    else
	fraction = gaiaLineLocatePoint (line, point);

    pL = line->FirstLinestring;
    if (fraction <= 0.0)
      {
	  /* special case: assuming the start point */
	  z = 0.0;
	  if (pL->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (pL->Coords, 0, &x, &y, &m);
	    }
	  else
	    {
		gaiaGetPointXYZM (pL->Coords, 0, &x, &y, &z, &m);
	    }
	  *m_value = m;
	  return 1;
      }
    if (fraction >= 1.0)
      {
	  /* special case: assuming the end point */
	  z = 0.0;
	  iv = pL->Points - 1;
	  if (pL->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (pL->Coords, iv, &x, &y, &m);
	    }
	  else
	    {
		gaiaGetPointXYZM (pL->Coords, iv, &x, &y, &z, &m);
	    }
	  *m_value = m;
	  return 1;
      }

/* computing the progressive length */
    progressive_length = 0.0;
    for (iv = 0; iv < pL->Points; iv++)
      {
	  z = 0.0;
	  if (pL->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (pL->Coords, iv, &x, &y, &m);
	    }
	  else
	    {
		gaiaGetPointXYZM (pL->Coords, iv, &x, &y, &z, &m);
	    }

	  if (iv != 0)
	    {
		progressive_length +=
		    sqrt (((x0 - x) * (x0 - x)) + ((y0 - y) * (y0 - y)));
		if (progressive_length == fraction)
		  {
		      /* special case: exactly intercepting a vertex */
		      *m_value = m;
		      return 1;
		  }
		if (progressive_length > fraction)
		  {
		      /* interpolating the M-Value */
		      double interval = m - m0;
		      double diff = fraction - pl0;
		      *m_value = m0 + (interval * diff);
		      break;
		  }
	    }
	  x0 = x;
	  y0 = y;
	  m0 = m;
	  pl0 = progressive_length;
      }
    return 1;

#else
    return 0;
#endif /* end GEOS conditional */
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLocateBetweenMeasures (gaiaGeomCollPtr geom, double m_start, double m_end)
{
/* extracts points/linestrings accordingly to a range of measures */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaLinestringPtr new_line;
................................................................................
	  /* empty result: returning NULL */
	  gaiaFreeGeomColl (new_geom);
	  return NULL;
      }
    return new_geom;
}

GAIAGEO_DECLARE int
gaiaIsValidTrajectory (gaiaGeomCollPtr geom)
{
/* Checks if a Geometry object is valid Trajectory */
    gaiaLinestringPtr ln;
    int iv;
    double x;
    double y;
    double z;
    double m;
    double prev_m;
    if (!geom)
	return 0;
    if (geom->FirstPoint != NULL || geom->FirstLinestring == NULL
	|| geom->FirstPolygon != NULL)
	return 0;		/* not a Linestring */
    if (geom->FirstLinestring != geom->LastLinestring)
	return 0;		/* not a simple Linestring */
    if (geom->DimensionModel == GAIA_XY_M
	|| geom->DimensionModel == GAIA_XY_Z_M)
	;
    else
	return 0;		/* not supporting M_values */
    ln = geom->FirstLinestring;
    for (iv = 0; iv < ln->Points; iv++)
      {
	  z = 0.0;
	  if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  if (iv != 0)
	    {
		if (m <= prev_m)
		    return 0;
	    }
	  prev_m = m;
      }
    return 1;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTrajectoryInterpolatePoint (gaiaGeomCollPtr geom, double m_value)
{
/* attempts to interpolate a Point along a Trajectory accordingly to given M-Value */
    gaiaGeomCollPtr point;
    gaiaLinestringPtr ln;
    int iv;
    double x;
    double y;
    double z;
    double m;
    double prev_x;
    double prev_y;
    double prev_z;
    double prev_m;
    if (!gaiaIsValidTrajectory (geom))
	return NULL;

/* creating the Geometry to be returned */
    if (geom->DimensionModel == GAIA_XY_M)
	point = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	point = gaiaAllocGeomCollXYZM ();
    else
	return NULL;
    point->Srid = geom->Srid;
    point->DeclaredType = GAIA_POINT;

    ln = geom->FirstLinestring;	
/* testing if m < StartPoint */
    if (ln->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (ln->Coords, 0, &x, &y, &z, &m);
      }
    else
      {
	  gaiaGetPointXYM (ln->Coords, 0, &x, &y, &m);
      }
    if (m_value < m)
      {
	  if (ln->DimensionModel == GAIA_XY_Z_M)
	      gaiaAddPointToGeomCollXYZM (point, x, y, z, m_value);
	  else
	      gaiaAddPointToGeomCollXYM (point, x, y, m_value);
	  return point;
      }

/* testing if m > EndPoint */
    iv = ln->Points - 1;
    if (ln->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
      }
    else
      {
	  gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
      }
    if (m_value > m)
      {
	  if (ln->DimensionModel == GAIA_XY_Z_M)
	      gaiaAddPointToGeomCollXYZM (point, x, y, z, m_value);
	  else
	      gaiaAddPointToGeomCollXYM (point, x, y, m_value);
	  return point;
      }

    ln = geom->FirstLinestring;
    for (iv = 0; iv < ln->Points; iv++)
      {
	  z = 0.0;
	  if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  if (m_value == m)
	    {
		if (ln->DimensionModel == GAIA_XY_Z_M)
		    gaiaAddPointToGeomCollXYZM (point, x, y, z, m_value);
		else
		    gaiaAddPointToGeomCollXYM (point, x, y, m_value);
		return point;
	    }
	  if (m_value > prev_m && m_value < m)
	    {
		/* interpolating the Point */
		double ix;
		double iy;
		double iz;
		double diff = m - prev_m;
		double m_diff = m_value - prev_m;
		double ratio = diff / m_diff;
		diff = x - prev_x;
		ix = prev_x + (diff / ratio);
		diff = y - prev_y;
		iy = prev_y + (diff / ratio);
		diff = z - prev_z;
		iz = prev_z + (diff / ratio);
		if (ln->DimensionModel == GAIA_XY_Z_M)
		    gaiaAddPointToGeomCollXYZM (point, ix, iy, iz, m_value);
		else
		    gaiaAddPointToGeomCollXYM (point, ix, iy, m_value);
		return point;
	    }
	  prev_x = x;
	  prev_y = y;
	  prev_z = z;
	  prev_m = m;
      }

    gaiaFreeGeomColl (point);
    return NULL;
}

static int
check_closed_multi_linestring (gaiaGeomCollPtr geom, int single)
{
/* check if :
/   - this geometry is a (multi) Linestring 
/   - all Linestrings are effectively closed
*/




|







 







|







 







<
<
<
<
<
<
<
<
<
<
<













|
|







 







<
<
<
<
<
<
<
<
<
<
<













|
|







 







|
<







 







<
<
<
|
<
<
|
<

<
<
<
<
<
|
<










<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<







 







<
<
<
|
<
<
|
<

<
<
<
<
<
|
<











<
<
<
|
<
<
|
<

<
<
<
<
<
|
<







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|

|









<


<
<
<
|






<
|
<
<
<







|












|





|







|

|
<
<
<
<
<
<
<









<


<
<
<
|






<
|
|
<
<







|












|





|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|








 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
>







>
>
>










>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|

|

|

|

|

|



|




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
285
286
287
288
289
290
291











292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
...
604
605
606
607
608
609
610











611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
...
796
797
798
799
800
801
802
803

804
805
806
807
808
809
810
...
817
818
819
820
821
822
823



824


825

826





827

828
829
830
831
832
833
834
835
836
837











838
839
840
841
842
843
844

845






























































846
847
848
849
850
851
852
....
1103
1104
1105
1106
1107
1108
1109
1110

1111
1112
1113
1114
1115
1116
1117
....
1161
1162
1163
1164
1165
1166
1167



1168


1169

1170





1171

1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182



1183


1184

1185





1186

1187
1188
1189
1190
1191
1192
1193
....
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431

1432
1433



1434
1435
1436
1437
1438
1439
1440

1441



1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478







1479
1480
1481
1482
1483
1484
1485
1486
1487

1488
1489



1490
1491
1492
1493
1494
1495
1496

1497
1498


1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525



















































































1526
1527
1528
1529
1530
1531
1532
....
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
....
3368
3369
3370
3371
3372
3373
3374




















3375


















3376
3377
3378
3379
3380
3381
3382
3383
3384
....
3396
3397
3398
3399
3400
3401
3402






















3403



















3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
....
3424
3425
3426
3427
3428
3429
3430






















3431



















3432
3433
3434
3435
3436
3437
3438
3439
3440
....
3453
3454
3455
3456
3457
3458
3459










































3460
3461
3462
3463
3464
3465
3466
....
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
....
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
....
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
....
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
....
4272
4273
4274
4275
4276
4277
4278




















4279
4280
4281
4282
4283
4284
4285
....
4296
4297
4298
4299
4300
4301
4302




















4303
4304
4305
4306
4307
4308
4309
....
4320
4321
4322
4323
4324
4325
4326




















4327
4328
4329
4330
4331
4332
4333
....
4344
4345
4346
4347
4348
4349
4350




















4351
4352
4353
4354
4355
4356
4357
....
4362
4363
4364
4365
4366
4367
4368

































































































































































































































































4369
4370
4371
4372
4373
4374
4375
....
4548
4549
4550
4551
4552
4553
4554


































































































































































4555
4556
4557
4558
4559
4560
4561
/*

 gg_geometries.c -- Gaia geometric objects
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
GAIAGEO_DECLARE void
gaiaCopyLinestringCoords (gaiaLinestringPtr dst, gaiaLinestringPtr src)
{
/* 
/ copying coords from one Linestring to another
/ maybe, converting from one Dimension Model to a different one
*/











    int iv;
    double x;
    double y;
    double z;
    double m;
    if (!src)
	return;
    if (!dst)
	return;
    if (src->Points != dst->Points)
	return;
    for (iv = 0; iv < dst->Points; iv++)
      {
	  z = 0.0;
	  m = 0.0;
	  if (src->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (src->Coords, iv, &x, &y, &z);
	    }
	  else if (src->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (src->Coords, iv, &x, &y, &m);
................................................................................
GAIAGEO_DECLARE void
gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr src)
{
/* 
/ copying coords from one Ring to another
/ maybe, converting from one Dimension Model to a different one
*/











    int iv;
    double x;
    double y;
    double z;
    double m;
    if (!src)
	return;
    if (!dst)
	return;
    if (src->Points != dst->Points)
	return;
    for (iv = 0; iv < dst->Points; iv++)
      {
	  z = 0.0;
	  m = 0.0;
	  if (src->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (src->Coords, iv, &x, &y, &z);
	    }
	  else if (src->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (src->Coords, iv, &x, &y, &m);
................................................................................
/* clones a POLYGON (special) */
    int ib;
    gaiaPolygonPtr new_polyg;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!polyg)
	return NULL;
    if (mode == GAIA_REVERSE_ORDER || mode == GAIA_LHR_ORDER)

	;
    else
	return gaiaClonePolygon (polyg);

    i_ring = polyg->Exterior;
    if (polyg->DimensionModel == GAIA_XY_Z)
	new_polyg = gaiaAllocPolygonXYZ (i_ring->Points, polyg->NumInteriors);
................................................................................
    o_ring = new_polyg->Exterior;
/* copying points for the EXTERIOR RING */
    if (mode == GAIA_REVERSE_ORDER)
	gaiaCopyRingCoordsReverse (o_ring, i_ring);
    else
      {
	  gaiaClockwise (i_ring);



	  if (i_ring->Clockwise)


	      gaiaCopyRingCoords (o_ring, i_ring);

	  else





	      gaiaCopyRingCoordsReverse (o_ring, i_ring);

      }
    for (ib = 0; ib < new_polyg->NumInteriors; ib++)
      {
	  /* copying each INTERIOR RING [if any] */
	  i_ring = polyg->Interiors + ib;
	  o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
	  if (mode == GAIA_REVERSE_ORDER)
	      gaiaCopyRingCoordsReverse (o_ring, i_ring);
	  else
	    {











		gaiaClockwise (i_ring);
		if (i_ring->Clockwise)
		    gaiaCopyRingCoordsReverse (o_ring, i_ring);
		else
		    gaiaCopyRingCoords (o_ring, i_ring);
	    }
      }

    return new_polyg;






























































}

GAIAGEO_DECLARE gaiaPolygonPtr
gaiaAllocPolygon (int vert, int excl)
{
/* POLYGON object constructor */
    gaiaPolygonPtr p;
................................................................................
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!geom)
	return NULL;
    if (mode == GAIA_REVERSE_ORDER || mode == GAIA_LHR_ORDER)

	;
    else
	return gaiaCloneGeomColl (geom);

    if (geom->DimensionModel == GAIA_XY_Z)
	new_geom = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
................................................................................
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  if (mode == GAIA_REVERSE_ORDER)
	      gaiaCopyRingCoordsReverse (o_ring, i_ring);
	  else
	    {
		gaiaClockwise (i_ring);



		if (i_ring->Clockwise)


		    gaiaCopyRingCoords (o_ring, i_ring);

		else





		    gaiaCopyRingCoordsReverse (o_ring, i_ring);

	    }
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		if (mode == GAIA_REVERSE_ORDER)
		    gaiaCopyRingCoordsReverse (o_ring, i_ring);
		else
		  {
		      gaiaClockwise (i_ring);



		      if (i_ring->Clockwise)


			  gaiaCopyRingCoordsReverse (o_ring, i_ring);

		      else





			  gaiaCopyRingCoords (o_ring, i_ring);

		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

................................................................................
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYZ (gaiaGeomCollPtr geom)
{
/* clones a GEOMETRYCOLLECTION converting to XYZ-dimensions */
    int ib;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    if (!geom)
	return NULL;
    new_geom = gaiaAllocGeomCollXYZ ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */
	  gaiaAddPointToGeomCollXYZ (new_geom, point->X, point->Y, point->Z);
	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoords (new_line, line);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  gaiaCopyRingCoords (o_ring, i_ring);
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		gaiaCopyRingCoords (o_ring, i_ring);
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYM (gaiaGeomCollPtr geom)
{
/* clones a GEOMETRYCOLLECTION converting to XYM-dimensions */
    int ib;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;

    if (!geom)
	return NULL;



    new_geom = gaiaAllocGeomCollXYM ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */

	  gaiaAddPointToGeomCollXYM (new_geom, point->X, point->Y, point->M);



	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoords (new_line, line);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  gaiaCopyRingCoords (o_ring, i_ring);
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		gaiaCopyRingCoords (o_ring, i_ring);
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaCastGeomCollToXYZM (gaiaGeomCollPtr geom)
{
/* clones a GEOMETRYCOLLECTION converting to XYZM-dimensions */







    int ib;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
    gaiaLinestringPtr new_line;
    gaiaPolygonPtr polyg;
    gaiaPolygonPtr new_polyg;
    gaiaGeomCollPtr new_geom;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;

    if (!geom)
	return NULL;



    new_geom = gaiaAllocGeomCollXYZM ();
    new_geom->Srid = geom->Srid;
    new_geom->DeclaredType = geom->DeclaredType;
    point = geom->FirstPoint;
    while (point)
      {
	  /* copying POINTs */

	  gaiaAddPointToGeomCollXYZM (new_geom, point->X, point->Y, point->Z,
				      point->M);


	  point = point->Next;
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* copying LINESTRINGs */
	  new_line = gaiaAddLinestringToGeomColl (new_geom, line->Points);
	  gaiaCopyLinestringCoords (new_line, line);
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* copying POLYGONs */
	  i_ring = polyg->Exterior;
	  new_polyg =
	      gaiaAddPolygonToGeomColl (new_geom, i_ring->Points,
					polyg->NumInteriors);
	  o_ring = new_polyg->Exterior;
	  /* copying points for the EXTERIOR RING */
	  gaiaCopyRingCoords (o_ring, i_ring);
	  for (ib = 0; ib < new_polyg->NumInteriors; ib++)
	    {
		/* copying each INTERIOR RING [if any] */
		i_ring = polyg->Interiors + ib;
		o_ring = gaiaAddInteriorRing (new_polyg, ib, i_ring->Points);
		gaiaCopyRingCoords (o_ring, i_ring);



















































































	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
................................................................................
    if (mbr1->MaxY >= mbr2->MinY && mbr1->MaxY <= mbr2->MaxY)
	ok_4 = 1;
    if (ok_1 && ok_2 && ok_3 && ok_4)
	return 1;
    return 0;
}

GAIAGEO_DECLARE void
gaiaMakePoint (double x, double y, int srid, unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing a POINT */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 2);	/* [x,y] coords */
................................................................................
    *(ptr + 38) = GAIA_MARK_MBR;	/* MBR signature */
    gaiaExport32 (ptr + 39, GAIA_POINT, 1, endian_arch);	/* class POINT */
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    *(ptr + 59) = GAIA_MARK_END;	/* END signature */
}





















GAIAGEO_DECLARE void


















gaiaMakePointZ (double x, double y, double z, int srid, unsigned char **result,
		int *size)
{
/* build a Blob encoded Geometry representing a POINT Z */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 3);	/* [x,y,z] coords */
................................................................................
    gaiaExport32 (ptr + 39, GAIA_POINTZ, 1, endian_arch);	/* class POINT */
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 59, z, 1, endian_arch);	/* Z */
    *(ptr + 67) = GAIA_MARK_END;	/* END signature */
}























GAIAGEO_DECLARE void



















gaiaMakePointM (double x, double y, double m, int srid, unsigned char **result,
		int *size)
{
/* build a Blob encoded Geometry representing a POINT M */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 3);	/* [x,y,z] coords */
    *result = malloc (*size);
................................................................................
    gaiaExport32 (ptr + 39, GAIA_POINTM, 1, endian_arch);	/* class POINT */
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 59, m, 1, endian_arch);	/* M */
    *(ptr + 67) = GAIA_MARK_END;	/* END signature */
}























GAIAGEO_DECLARE void



















gaiaMakePointZM (double x, double y, double z, double m, int srid,
		 unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing a POINT ZM */
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
/* computing the Blob size and then allocating it */
    *size = 44;			/* header size */
    *size += (sizeof (double) * 4);	/* [x,y,z,m] coords */
................................................................................
    gaiaExport64 (ptr + 43, x, 1, endian_arch);	/* X */
    gaiaExport64 (ptr + 51, y, 1, endian_arch);	/* Y */
    gaiaExport64 (ptr + 59, z, 1, endian_arch);	/* Z */
    gaiaExport64 (ptr + 67, m, 1, endian_arch);	/* M */
    *(ptr + 75) = GAIA_MARK_END;	/* END signature */
}











































GAIAGEO_DECLARE void
gaiaMakeLine (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
	      unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing a LINESTRING (segment) */
    int pts;
    int lns;
................................................................................
    return gaiaMergeGeometries_r (NULL, geom1, geom2);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaMergeGeometries_r (const void *cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
/* mergine two generic Geometries into a single one */
    gaiaGeomCollPtr result;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaLinestringPtr new_ln;
    gaiaPolygonPtr pg;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr rng;
    gaiaRingPtr new_rng;
    int dims1;
    int dims2;
    int dims;
    double x;
    double y;
    double z;
    double m;
    int iv;
    int ib;

    if (geom1 == NULL || geom2 == NULL)
	return NULL;
    if (cache != NULL)
      {
	  if (gaiaIsToxic_r (cache, geom1) || gaiaIsToxic_r (cache, geom2))
	      return NULL;
      }
    else
      {
	  if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	      return NULL;
      }
    dims1 = geom1->DimensionModel;
    dims2 = geom2->DimensionModel;
/* building a new Geometry */
    if (dims1 == dims2)
	dims = dims1;
    else
      {
	  if (dims1 == GAIA_XY_Z_M || dims2 == GAIA_XY_Z_M)
	      dims = GAIA_XY_Z_M;
	  else if (dims1 == GAIA_XY_Z && dims2 == GAIA_XY_M)
	      dims = GAIA_XY_Z_M;
	  else if (dims1 == GAIA_XY_M && dims2 == GAIA_XY_Z)
	      dims = GAIA_XY_Z_M;
	  else if (dims1 == GAIA_XY_Z)
	      dims = GAIA_XY_Z;
	  else if (dims2 == GAIA_XY_Z)
	      dims = GAIA_XY_Z;
	  else if (dims1 == GAIA_XY_M)
	      dims = GAIA_XY_M;
	  else if (dims2 == GAIA_XY_M)
	      dims = GAIA_XY_M;
	  else
	      dims = GAIA_XY;
      }
    if (dims == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else if (dims == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (dims == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = geom1->Srid;

    pt = geom1->FirstPoint;
    while (pt)
      {
	  /* copying POINTs from GEOM-1 */
	  z = 0.0;
	  m = 0.0;
	  if (pt->DimensionModel == GAIA_XY_Z_M)
	    {
		x = pt->X;
		y = pt->Y;
		z = pt->Z;
		m = pt->M;
	    }
	  else if (pt->DimensionModel == GAIA_XY_Z)
	    {
		x = pt->X;
		y = pt->Y;
		z = pt->Z;
	    }
	  else if (pt->DimensionModel == GAIA_XY_M)
	    {
		x = pt->X;
		y = pt->Y;
		m = pt->M;
	    }
	  else
	    {
		x = pt->X;
		y = pt->Y;
	    }
	  if (result->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaAddPointToGeomCollXYZM (result, x, y, z, m);
	    }
	  else if (result->DimensionModel == GAIA_XY_Z)
	    {
		gaiaAddPointToGeomCollXYZ (result, x, y, z);
	    }
	  else if (result->DimensionModel == GAIA_XY_M)
	    {
		gaiaAddPointToGeomCollXYM (result, x, y, m);
	    }
	  else
	    {
		gaiaAddPointToGeomColl (result, x, y);
	    }
	  pt = pt->Next;
      }

    pt = geom2->FirstPoint;
    while (pt)
      {
	  /* copying POINTs from GEOM-2 */
	  z = 0.0;
	  m = 0.0;
................................................................................
		m = pt->M;
	    }
	  else
	    {
		x = pt->X;
		y = pt->Y;
	    }
	  if (result->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaAddPointToGeomCollXYZM (result, x, y, z, m);
	    }
	  else if (result->DimensionModel == GAIA_XY_Z)
	    {
		gaiaAddPointToGeomCollXYZ (result, x, y, z);
	    }
	  else if (result->DimensionModel == GAIA_XY_M)
	    {
		gaiaAddPointToGeomCollXYM (result, x, y, m);
	    }
	  else
	    {
		gaiaAddPointToGeomColl (result, x, y);
	    }
	  pt = pt->Next;
      }

    ln = geom1->FirstLinestring;
    while (ln)
      {
	  /* copying LINESTRINGs from GEOM-1 */
	  new_ln = gaiaAddLinestringToGeomColl (result, ln->Points);
	  for (iv = 0; iv < ln->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (ln->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
		  }
		else if (ln->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
		  }
		else if (ln->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
		  }
		else
		  {
		      gaiaGetPoint (ln->Coords, iv, &x, &y);
		  }
		if (new_ln->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (new_ln->Coords, iv, x, y, z, m);
		  }
		else if (new_ln->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (new_ln->Coords, iv, x, y, z);
		  }
		else if (new_ln->DimensionModel == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (new_ln->Coords, iv, x, y, m);
		  }
		else
		  {
		      gaiaSetPoint (new_ln->Coords, iv, x, y);
		  }
	    }
	  ln = ln->Next;
      }

    ln = geom2->FirstLinestring;
    while (ln)
      {
	  /* copying LINESTRINGs from GEOM-2 */
	  new_ln = gaiaAddLinestringToGeomColl (result, ln->Points);
	  for (iv = 0; iv < ln->Points; iv++)
	    {
		z = 0.0;
		m = 0.0;
		if (ln->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
................................................................................
		else
		  {
		      gaiaSetPoint (new_ln->Coords, iv, x, y);
		  }
	    }
	  ln = ln->Next;
      }

    pg = geom1->FirstPolygon;
    while (pg)
      {
	  /* copying POLYGONs from GEOM-1 */
	  rng = pg->Exterior;
	  new_pg =
	      gaiaAddPolygonToGeomColl (result, rng->Points, pg->NumInteriors);
	  new_rng = new_pg->Exterior;
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* Exterior Ring */
		z = 0.0;
		m = 0.0;
		if (rng->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else if (rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (rng->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		if (new_rng->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (new_rng->Coords, iv, x, y, z, m);
		  }
		else if (new_rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (new_rng->Coords, iv, x, y, z);
		  }
		else if (new_rng->DimensionModel == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (new_rng->Coords, iv, x, y, m);
		  }
		else
		  {
		      gaiaSetPoint (new_rng->Coords, iv, x, y);
		  }
	    }
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* Interior Rings */
		rng = pg->Interiors + ib;
		new_rng = gaiaAddInteriorRing (new_pg, ib, rng->Points);
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      z = 0.0;
		      m = 0.0;
		      if (rng->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			}
		      else if (rng->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			}
		      else if (rng->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			}
		      if (new_rng->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaSetPointXYZM (new_rng->Coords, iv, x, y, z, m);
			}
		      else if (new_rng->DimensionModel == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (new_rng->Coords, iv, x, y, z);
			}
		      else if (new_rng->DimensionModel == GAIA_XY_M)
			{
			    gaiaSetPointXYM (new_rng->Coords, iv, x, y, m);
			}
		      else
			{
			    gaiaSetPoint (new_rng->Coords, iv, x, y);
			}
		  }
	    }
	  pg = pg->Next;
      }

    pg = geom2->FirstPolygon;
    while (pg)
      {
	  /* copying POLYGONs from GEOM-2 */
	  rng = pg->Exterior;
	  new_pg =
	      gaiaAddPolygonToGeomColl (result, rng->Points, pg->NumInteriors);
	  new_rng = new_pg->Exterior;
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* Exterior Ring */
		z = 0.0;
		m = 0.0;
		if (rng->DimensionModel == GAIA_XY_Z_M)
................................................................................
			    gaiaSetPoint (new_rng->Coords, iv, x, y);
			}
		  }
	    }
	  pg = pg->Next;
      }

    return result;
}

GAIAGEO_DECLARE void
gaiaBuildMbr (double x1, double y1, double x2, double y2, int srid,
	      unsigned char **result, int *size)
{
/* build a Blob encoded Geometry representing an MBR */
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMinX (const unsigned char *blob, unsigned int size, double *minx)
{
/* returns the MinX coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();




















    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMaxX (const unsigned char *blob, unsigned int size, double *maxx)
{
/* returns the MaxX coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();




















    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMinY (const unsigned char *blob, unsigned int size, double *miny)
{
/* returns the MinY coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();




















    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................

GAIAGEO_DECLARE int
gaiaGetMbrMaxY (const unsigned char *blob, unsigned int size, double *maxy)
{
/* returns the MaxY coordinate value for a Blob encoded Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();




















    if (size < 45)
	return 0;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................
	little_endian = 0;
    else
	return 0;		/* unknown encoding; neither little-endian nor big-endian */
    *maxy = gaiaImport64 (blob + 30, little_endian, endian_arch);
    return 1;
}


































































































































































































































































GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLocateBetweenMeasures (gaiaGeomCollPtr geom, double m_start, double m_end)
{
/* extracts points/linestrings accordingly to a range of measures */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaLinestringPtr new_line;
................................................................................
	  /* empty result: returning NULL */
	  gaiaFreeGeomColl (new_geom);
	  return NULL;
      }
    return new_geom;
}



































































































































































static int
check_closed_multi_linestring (gaiaGeomCollPtr geom, int single)
{
/* check if :
/   - this geometry is a (multi) Linestring 
/   - all Linestrings are effectively closed
*/

Changes to src/gaiageo/gg_geoscvt.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
...
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
...
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
...
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
...
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
...
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
...
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
...
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
...
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
...
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
...
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
...
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
...
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
...
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
...
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
...
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
...
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
...
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
...
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
...
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
....
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
....
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
....
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
....
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
....
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
....
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
....
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
....
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
....
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
....
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
....
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
....
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
....
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
....
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
....
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
....
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
....
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
....
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
....
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
....
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
....
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
....
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
....
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
....
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
....
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
....
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
....
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
/*

 gg_geoscvt.c -- Gaia / GEOS conversion [Geometry]
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
................................................................................
    GEOSGeometry *geos_int;
    GEOSGeometry *geos_item;
    GEOSGeometry **geos_holes;
    GEOSGeometry **geos_coll;
    GEOSCoordSequence *cs;
    int ring_points;
    int n_items;

#ifdef GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
    if (handle == NULL)
	return NULL;
#endif
    if (!gaia)
	return NULL;


    pt = gaia->FirstPoint;
    while (pt)
      {
	  /* counting how many POINTs are there */
	  pts++;
	  pt = pt->Next;
      }
................................................................................
			    GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
			    break;
			};
		      geos = GEOSGeom_createPoint_r (handle, cs);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      cs = GEOSCoordSeq_create (1, dims);
		      switch (gaia->DimensionModel)
			{
			case GAIA_XY_Z:
			case GAIA_XY_Z_M:
			    GEOSCoordSeq_setX (cs, 0, pt->X);
			    GEOSCoordSeq_setY (cs, 0, pt->Y);
................................................................................
			    break;
			default:
			    GEOSCoordSeq_setX (cs, 0, pt->X);
			    GEOSCoordSeq_setY (cs, 0, pt->Y);
			    break;
			};
		      geos = GEOSGeom_createPoint (cs);
#endif
		  }
	    }
	  break;
      case GAIA_LINESTRING:
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_LINESTRINGS)
	    {
		ln = gaia->FirstLinestring;
		if (handle != NULL)
		    cs = GEOSCoordSeq_create_r (handle, ln->Points, dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    cs = GEOSCoordSeq_create (ln->Points, dims);
#endif
		for (iv = 0; iv < ln->Points; iv++)
		  {
		      switch (ln->DimensionModel)
			{
			case GAIA_XY_Z:
			    gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
			    if (handle != NULL)
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);
#endif
			      }
			    break;
			case GAIA_XY_M:
			    gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
#endif
			      }
			    break;
			case GAIA_XY_Z_M:
			    gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);
#endif
			      }
			    break;
			default:
			    gaiaGetPoint (ln->Coords, iv, &x, &y);
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
#endif
			      }
			    break;
			};
		  }
		if (handle != NULL)
		    geos = GEOSGeom_createLineString_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    geos = GEOSGeom_createLineString (cs);
#endif
	    }
	  break;
      case GAIA_POLYGON:
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_POLYGONS)
	    {
		pg = gaia->FirstPolygon;
		rng = pg->Exterior;
................................................................................
		/* exterior ring */
		ring_points = rng->Points;
		if (cache)
		  {
		      if (gaiaIsNotClosedRing_r (cache, rng))
			  ring_points++;
		  }
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		  {
		      if (gaiaIsNotClosedRing (rng))
			  ring_points++;
		  }
#endif
		if (handle != NULL)
		    cs = GEOSCoordSeq_create_r (handle, ring_points, dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    cs = GEOSCoordSeq_create (ring_points, dims);
#endif
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      switch (rng->DimensionModel)
			{
			case GAIA_XY_Z:
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			    if (iv == 0)
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);
#endif
			      }
			    break;
			case GAIA_XY_M:
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			    if (iv == 0)
			      {
				  /* saving the first vertex */
................................................................................
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
#endif
			      }
			    break;
			case GAIA_XY_Z_M:
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			    if (iv == 0)
			      {
				  /* saving the first vertex */
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);
#endif
			      }
			    break;
			default:
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			    if (iv == 0)
			      {
				  /* saving the first vertex */
................................................................................
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
#endif
			      }
			    break;
			};
		  }
		if (ring_points > rng->Points)
		  {
		      /* ensuring Ring's closure */
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x0);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y0);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z0);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x0);
				  GEOSCoordSeq_setY (cs, iv, y0);
				  GEOSCoordSeq_setZ (cs, iv, z0);
#endif
			      }
			    break;
			default:
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x0);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y0);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, iv, x0);
				  GEOSCoordSeq_setY (cs, iv, y0);
#endif
			      }
			    break;
			};
		  }
		if (handle != NULL)
		    geos_ext = GEOSGeom_createLinearRing_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    geos_ext = GEOSGeom_createLinearRing (cs);
#endif
		geos_holes = NULL;
		if (pg->NumInteriors > 0)
		  {
		      geos_holes =
			  malloc (sizeof (GEOSGeometry *) * pg->NumInteriors);
		      for (ib = 0; ib < pg->NumInteriors; ib++)
			{
................................................................................
			    rng = pg->Interiors + ib;
			    ring_points = rng->Points;
			    if (cache != NULL)
			      {
				  if (gaiaIsNotClosedRing_r (cache, rng))
				      ring_points++;
			      }
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    else
			      {
				  if (gaiaIsNotClosedRing (rng))
				      ring_points++;
			      }
#endif
			    if (handle != NULL)
				cs = GEOSCoordSeq_create_r (handle, ring_points,
							    dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    else
				cs = GEOSCoordSeq_create (ring_points, dims);
#endif
			    for (iv = 0; iv < rng->Points; iv++)
			      {
				  switch (rng->DimensionModel)
				    {
				    case GAIA_XY_Z:
					gaiaGetPointXYZ (rng->Coords, iv, &x,
							 &y, &z);
................................................................................
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					      GEOSCoordSeq_setZ_r (handle, cs,
								   iv, z);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);
					      GEOSCoordSeq_setZ (cs, iv, z);
#endif
					  }
					break;
				    case GAIA_XY_M:
					gaiaGetPointXYM (rng->Coords, iv, &x,
							 &y, &m);
					if (iv == 0)
					  {
................................................................................
					      GEOSCoordSeq_setX_r (handle, cs,
								   iv, x);
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);
#endif
					  }
					break;
				    case GAIA_XY_Z_M:
					gaiaGetPointXYZM (rng->Coords, iv, &x,
							  &y, &z, &m);
					if (iv == 0)
					  {
................................................................................
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					      GEOSCoordSeq_setZ_r (handle, cs,
								   iv, z);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);
					      GEOSCoordSeq_setZ (cs, iv, z);
#endif
					  }
					break;
				    default:
					gaiaGetPoint (rng->Coords, iv, &x, &y);
					if (iv == 0)
					  {
					      /* saving the first vertex */
................................................................................
					      GEOSCoordSeq_setX_r (handle, cs,
								   iv, x);
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);
#endif
					  }
					break;
				    };
			      }
			    if (ring_points > rng->Points)
			      {
				  /* ensuring Ring's closure */
................................................................................
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y0);
					      GEOSCoordSeq_setZ_r (handle, cs,
								   iv, z0);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_setX (cs, iv, x0);
					      GEOSCoordSeq_setY (cs, iv, y0);
					      GEOSCoordSeq_setZ (cs, iv, z0);
#endif
					  }
					break;
				    default:
					if (handle != NULL)
					  {
					      GEOSCoordSeq_setX_r (handle, cs,
								   iv, x0);
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y0);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_setX (cs, iv, x0);
					      GEOSCoordSeq_setY (cs, iv, y0);
#endif
					  }
					break;
				    };
			      }
			    if (handle != NULL)
				geos_int =
				    GEOSGeom_createLinearRing_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    else
				geos_int = GEOSGeom_createLinearRing (cs);
#endif
			    *(geos_holes + ib) = geos_int;
			}
		  }
		if (handle != NULL)
		    geos =
			GEOSGeom_createPolygon_r (handle, geos_ext, geos_holes,
						  pg->NumInteriors);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    geos =
			GEOSGeom_createPolygon (geos_ext, geos_holes,
						pg->NumInteriors);
#endif
		if (geos_holes)
		    free (geos_holes);
	    }
	  break;
      case GAIA_MULTIPOINT:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTIPOLYGON:
................................................................................
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_POINTS)
	    {
		pt = gaia->FirstPoint;
		while (pt)
		  {
		      if (handle != NULL)
			  cs = GEOSCoordSeq_create_r (handle, 1, dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  cs = GEOSCoordSeq_create (1, dims);
#endif
		      switch (pt->DimensionModel)
			{
			case GAIA_XY_Z:
			case GAIA_XY_Z_M:
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, 0, pt->X);
				  GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
				  GEOSCoordSeq_setZ_r (handle, cs, 0, pt->Z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, 0, pt->X);
				  GEOSCoordSeq_setY (cs, 0, pt->Y);
				  GEOSCoordSeq_setZ (cs, 0, pt->Z);
#endif
			      }
			    break;
			default:
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, 0, pt->X);
				  GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_setX (cs, 0, pt->X);
				  GEOSCoordSeq_setY (cs, 0, pt->Y);
#endif
			      }
			    break;
			};
		      if (handle != NULL)
			  geos_item = GEOSGeom_createPoint_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  geos_item = GEOSGeom_createPoint (cs);
#endif
		      *(geos_coll + nItem++) = geos_item;
		      pt = pt->Next;
		  }
	    }
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_LINESTRINGS)
	    {
		ln = gaia->FirstLinestring;
		while (ln)
		  {
		      if (handle != NULL)
			  cs = GEOSCoordSeq_create_r (handle, ln->Points, dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  cs = GEOSCoordSeq_create (ln->Points, dims);
#endif
		      for (iv = 0; iv < ln->Points; iv++)
			{
			    switch (ln->DimensionModel)
			      {
			      case GAIA_XY_Z:
				  gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
				  if (handle != NULL)
................................................................................
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);
#endif
				    }
				  break;
			      case GAIA_XY_M:
				  gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
#endif
				    }
				  break;
			      case GAIA_XY_Z_M:
				  gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z,
						    &m);
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);
#endif
				    }
				  break;
			      default:
				  gaiaGetPoint (ln->Coords, iv, &x, &y);
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
#endif
				    }
				  break;
			      };
			}
		      if (handle != NULL)
			  geos_item = GEOSGeom_createLineString_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  geos_item = GEOSGeom_createLineString (cs);
#endif
		      *(geos_coll + nItem++) = geos_item;
		      ln = ln->Next;
		  }
	    }
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_POLYGONS)
	    {
		pg = gaia->FirstPolygon;
................................................................................
		while (pg)
		  {
		      rng = pg->Exterior;
		      /* exterior ring */
		      ring_points = rng->Points;
		      if (cache != NULL)
			{
			    if (gaiaIsNotClosedRing_r (cache, rng))
				ring_points++;
			}
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			{
			    if (gaiaIsNotClosedRing (rng))
				ring_points++;
			}
#endif
		      if (handle != NULL)
			  cs = GEOSCoordSeq_create_r (handle, ring_points,
						      dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  cs = GEOSCoordSeq_create (ring_points, dims);
#endif
		      for (iv = 0; iv < rng->Points; iv++)
			{
			    switch (rng->DimensionModel)
			      {
			      case GAIA_XY_Z:
				  gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
				  if (iv == 0)
................................................................................
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);
#endif
				    }
				  break;
			      case GAIA_XY_M:
				  gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
				  if (iv == 0)
				    {
					/* saving the first vertex */
................................................................................
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
#endif
				    }
				  break;
			      case GAIA_XY_Z_M:
				  gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z,
						    &m);
				  if (iv == 0)
				    {
................................................................................
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);
#endif
				    }
				  break;
			      default:
				  gaiaGetPoint (rng->Coords, iv, &x, &y);
				  if (iv == 0)
				    {
					/* saving the first vertex */
................................................................................
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
#endif
				    }
				  break;
			      };
			}
		      if (ring_points > rng->Points)
			{
			    /* ensuring Ring's closure */
................................................................................
					GEOSCoordSeq_setY_r (handle, cs, iv,
							     y0);
					GEOSCoordSeq_setZ_r (handle, cs, iv,
							     z0);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x0);
					GEOSCoordSeq_setY (cs, iv, y0);
					GEOSCoordSeq_setZ (cs, iv, z0);
#endif
				    }
				  break;
			      default:
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv,
							     x0);
					GEOSCoordSeq_setY_r (handle, cs, iv,
							     y0);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_setX (cs, iv, x0);
					GEOSCoordSeq_setY (cs, iv, y0);
#endif
				    }
				  break;
			      };
			}
		      if (handle != NULL)
			  geos_ext = GEOSGeom_createLinearRing_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  geos_ext = GEOSGeom_createLinearRing (cs);
#endif
		      geos_holes = NULL;
		      if (pg->NumInteriors > 0)
			{
			    geos_holes =
				malloc (sizeof (GEOSGeometry *) *
					pg->NumInteriors);
			    for (ib = 0; ib < pg->NumInteriors; ib++)
................................................................................
				  rng = pg->Interiors + ib;
				  ring_points = rng->Points;
				  if (cache != NULL)
				    {
					if (gaiaIsNotClosedRing_r (cache, rng))
					    ring_points++;
				    }
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  else
				    {
					if (gaiaIsNotClosedRing (rng))
					    ring_points++;
				    }
#endif
				  if (handle != NULL)
				      cs = GEOSCoordSeq_create_r (handle,
								  ring_points,
								  dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  else
				      cs = GEOSCoordSeq_create (ring_points,
								dims);
#endif
				  for (iv = 0; iv < rng->Points; iv++)
				    {
					switch (rng->DimensionModel)
					  {
					  case GAIA_XY_Z:
					      gaiaGetPointXYZ (rng->Coords, iv,
							       &x, &y, &z);
................................................................................
									 y);
						    GEOSCoordSeq_setZ_r (handle,
									 cs, iv,
									 z);
						}
					      else
						{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);
						    GEOSCoordSeq_setZ (cs, iv,
								       z);
#endif
						}
					      break;
					  case GAIA_XY_M:
					      gaiaGetPointXYM (rng->Coords, iv,
							       &x, &y, &m);
					      if (iv == 0)
						{
................................................................................
									 x);
						    GEOSCoordSeq_setY_r (handle,
									 cs, iv,
									 y);
						}
					      else
						{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);
#endif
						}
					      break;
					  case GAIA_XY_Z_M:
					      gaiaGetPointXYZM (rng->Coords, iv,
								&x, &y, &z, &m);
					      if (iv == 0)
						{
................................................................................
									 y);
						    GEOSCoordSeq_setZ_r (handle,
									 cs, iv,
									 z);
						}
					      else
						{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);
						    GEOSCoordSeq_setZ (cs, iv,
								       z);
#endif
						}
					      break;
					  default:
					      gaiaGetPoint (rng->Coords, iv, &x,
							    &y);
					      if (iv == 0)
						{
................................................................................
									 x);
						    GEOSCoordSeq_setY_r (handle,
									 cs, iv,
									 y);
						}
					      else
						{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);
#endif
						}
					      break;
					  };
				    }
				  if (ring_points > rng->Points)
				    {
					/* ensuring Ring's closure */
................................................................................
									 y0);
						    GEOSCoordSeq_setZ_r (handle,
									 cs, iv,
									 z0);
						}
					      else
						{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
						    GEOSCoordSeq_setX (cs, iv,
								       x0);
						    GEOSCoordSeq_setY (cs, iv,
								       y0);
						    GEOSCoordSeq_setZ (cs, iv,
								       z0);
#endif
						}
					      break;
					  default:
					      if (handle != NULL)
						{
						    GEOSCoordSeq_setX_r (handle,
									 cs, iv,
................................................................................
									 x0);
						    GEOSCoordSeq_setY_r (handle,
									 cs, iv,
									 y0);
						}
					      else
						{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
						    GEOSCoordSeq_setX (cs, iv,
								       x0);
						    GEOSCoordSeq_setY (cs, iv,
								       y0);
#endif
						}
					      break;
					  };
				    }
				  if (handle != NULL)
				      geos_int =
					  GEOSGeom_createLinearRing_r (handle,
								       cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  else
				      geos_int = GEOSGeom_createLinearRing (cs);
#endif
				  *(geos_holes + ib) = geos_int;
			      }
			}
		      if (handle != NULL)
			  geos_item =
			      GEOSGeom_createPolygon_r (handle, geos_ext,
							geos_holes,
							pg->NumInteriors);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  geos_item =
			      GEOSGeom_createPolygon (geos_ext, geos_holes,
						      pg->NumInteriors);
#endif
		      if (geos_holes)
			  free (geos_holes);
		      *(geos_coll + nItem++) = geos_item;
		      pg = pg->Next;
		  }
	    }
	  geos_type = GEOS_GEOMETRYCOLLECTION;
................................................................................
	      geos_type = GEOS_MULTILINESTRING;
	  if (type == GAIA_MULTIPOLYGON)
	      geos_type = GEOS_MULTIPOLYGON;
	  if (handle != NULL)
	      geos =
		  GEOSGeom_createCollection_r (handle, geos_type, geos_coll,
					       n_items);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      geos = GEOSGeom_createCollection (geos_type, geos_coll, n_items);
#endif
	  if (geos_coll)
	      free (geos_coll);
	  break;
      default:
	  geos = NULL;
      };
    if (geos)
      {
	  if (handle != NULL)
	      GEOSSetSRID_r (handle, geos, gaia->Srid);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      GEOSSetSRID (geos, gaia->Srid);
#endif
      }
    return geos;
}

static gaiaGeomCollPtr
fromGeosGeometry (GEOSContextHandle_t handle, const GEOSGeometry * geos,
		  const int dimension_model)
................................................................................
    const GEOSGeometry *geos_ring;
    const GEOSGeometry *geos_item;
    const GEOSGeometry *geos_sub_item;
    gaiaGeomCollPtr gaia = NULL;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;

#ifdef GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
    if (handle == NULL)
	return NULL;
#endif
    if (!geos)
	return NULL;

    if (handle != NULL)
	type = GEOSGeomTypeId_r (handle, geos);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
	type = GEOSGeomTypeId (geos);
#endif
    switch (type)
      {
      case GEOS_POINT:
	  if (dimension_model == GAIA_XY_Z)
	      gaia = gaiaAllocGeomCollXYZ ();
	  else if (dimension_model == GAIA_XY_M)
	      gaia = gaiaAllocGeomCollXYM ();
................................................................................
	    {
		gaia->Srid = GEOSGetSRID_r (handle, geos);
		cs = GEOSGeom_getCoordSeq_r (handle, geos);
		GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		gaia->Srid = GEOSGetSRID (geos);
		cs = GEOSGeom_getCoordSeq (geos);
		GEOSCoordSeq_getDimensions (cs, &dims);
#endif
	    }
	  if (dims == 3)
	    {
		if (handle != NULL)
		  {
		      GEOSCoordSeq_getX_r (handle, cs, 0, &x);
		      GEOSCoordSeq_getY_r (handle, cs, 0, &y);
		      GEOSCoordSeq_getZ_r (handle, cs, 0, &z);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      GEOSCoordSeq_getX (cs, 0, &x);
		      GEOSCoordSeq_getY (cs, 0, &y);
		      GEOSCoordSeq_getZ (cs, 0, &z);
#endif
		  }
	    }
	  else
	    {
		if (handle != NULL)
		  {
		      GEOSCoordSeq_getX_r (handle, cs, 0, &x);
		      GEOSCoordSeq_getY_r (handle, cs, 0, &y);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      GEOSCoordSeq_getX (cs, 0, &x);
		      GEOSCoordSeq_getY (cs, 0, &y);
#endif
		  }
		z = 0.0;
	    }
	  if (dimension_model == GAIA_XY_Z)
	      gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
	  else if (dimension_model == GAIA_XY_M)
	      gaiaAddPointToGeomCollXYM (gaia, x, y, 0.0);
................................................................................
		gaia->Srid = GEOSGetSRID_r (handle, geos);
		cs = GEOSGeom_getCoordSeq_r (handle, geos);
		GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
		GEOSCoordSeq_getSize_r (handle, cs, &points);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		gaia->Srid = GEOSGetSRID (geos);
		cs = GEOSGeom_getCoordSeq (geos);
		GEOSCoordSeq_getDimensions (cs, &dims);
		GEOSCoordSeq_getSize (cs, &points);
#endif
	    }
	  ln = gaiaAddLinestringToGeomColl (gaia, points);
	  for (iv = 0; iv < (int) points; iv++)
	    {
		if (dims == 3)
		  {
		      if (handle != NULL)
................................................................................
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			    GEOSCoordSeq_getZ_r (handle, cs, iv, &z);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);
			    GEOSCoordSeq_getZ (cs, iv, &z);
#endif
			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);
#endif
			}
		      z = 0.0;
		  }
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
		  }
................................................................................
	  else if (dimension_model == GAIA_XY_Z_M)
	      gaia = gaiaAllocGeomCollXYZM ();
	  else
	      gaia = gaiaAllocGeomColl ();
	  gaia->DeclaredType = GAIA_POLYGON;
	  if (handle != NULL)
	      gaia->Srid = GEOSGetSRID_r (handle, geos);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      gaia->Srid = GEOSGetSRID (geos);
#endif
	  /* exterior ring */
	  if (handle != NULL)
	    {
		holes = GEOSGetNumInteriorRings_r (handle, geos);
		geos_ring = GEOSGetExteriorRing_r (handle, geos);
		cs = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
		GEOSCoordSeq_getSize_r (handle, cs, &points);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		holes = GEOSGetNumInteriorRings (geos);
		geos_ring = GEOSGetExteriorRing (geos);
		cs = GEOSGeom_getCoordSeq (geos_ring);
		GEOSCoordSeq_getDimensions (cs, &dims);
		GEOSCoordSeq_getSize (cs, &points);
#endif
	    }
	  pg = gaiaAddPolygonToGeomColl (gaia, points, holes);
	  rng = pg->Exterior;
	  for (iv = 0; iv < (int) points; iv++)
	    {
		if (dims == 3)
		  {
................................................................................
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			    GEOSCoordSeq_getZ_r (handle, cs, iv, &z);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);
			    GEOSCoordSeq_getZ (cs, iv, &z);
#endif
			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);
#endif
			}
		      z = 0.0;
		  }
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
................................................................................
		      geos_ring = GEOSGetInteriorRingN_r (handle, geos, ib);
		      cs = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		      GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
		      GEOSCoordSeq_getSize_r (handle, cs, &points);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      geos_ring = GEOSGetInteriorRingN (geos, ib);
		      cs = GEOSGeom_getCoordSeq (geos_ring);
		      GEOSCoordSeq_getDimensions (cs, &dims);
		      GEOSCoordSeq_getSize (cs, &points);
#endif
		  }
		rng = gaiaAddInteriorRing (pg, ib, points);
		for (iv = 0; iv < (int) points; iv++)
		  {
		      if (dims == 3)
			{
			    if (handle != NULL)
................................................................................
			      {
				  GEOSCoordSeq_getX_r (handle, cs, iv, &x);
				  GEOSCoordSeq_getY_r (handle, cs, iv, &y);
				  GEOSCoordSeq_getZ_r (handle, cs, iv, &z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_getX (cs, iv, &x);
				  GEOSCoordSeq_getY (cs, iv, &y);
				  GEOSCoordSeq_getZ (cs, iv, &z);
#endif
			      }
			}
		      else
			{
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_getX_r (handle, cs, iv, &x);
				  GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_getX (cs, iv, &x);
				  GEOSCoordSeq_getY (cs, iv, &y);
#endif
			      }
			    z = 0.0;
			}
		      if (dimension_model == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			}
................................................................................
	  if (handle != NULL)
	    {
		gaia->Srid = GEOSGetSRID_r (handle, geos);
		nItems = GEOSGetNumGeometries_r (handle, geos);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		gaia->Srid = GEOSGetSRID (geos);
		nItems = GEOSGetNumGeometries (geos);
#endif
	    }
	  for (it = 0; it < nItems; it++)
	    {
		/* looping on elementaty geometries */
		if (handle != NULL)
		  {
		      geos_item = GEOSGetGeometryN_r (handle, geos, it);
		      itemType = GEOSGeomTypeId_r (handle, geos_item);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      geos_item = GEOSGetGeometryN (geos, it);
		      itemType = GEOSGeomTypeId (geos_item);
#endif
		  }
		switch (itemType)
		  {
		  case GEOS_POINT:
		      if (handle != NULL)
			{
			    cs = GEOSGeom_getCoordSeq_r (handle, geos_item);
			    GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    cs = GEOSGeom_getCoordSeq (geos_item);
			    GEOSCoordSeq_getDimensions (cs, &dims);
#endif
			}
		      if (dims == 3)
			{
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_getX_r (handle, cs, 0, &x);
				  GEOSCoordSeq_getY_r (handle, cs, 0, &y);
				  GEOSCoordSeq_getZ_r (handle, cs, 0, &z);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_getX (cs, 0, &x);
				  GEOSCoordSeq_getY (cs, 0, &y);
				  GEOSCoordSeq_getZ (cs, 0, &z);
#endif
			      }
			}
		      else
			{
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_getX_r (handle, cs, 0, &x);
				  GEOSCoordSeq_getY_r (handle, cs, 0, &y);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  GEOSCoordSeq_getX (cs, 0, &x);
				  GEOSCoordSeq_getY (cs, 0, &y);
#endif
			      }
			    z = 0.0;
			}
		      if (dimension_model == GAIA_XY_Z)
			  gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
		      else if (dimension_model == GAIA_XY_M)
			  gaiaAddPointToGeomCollXYM (gaia, x, y, 0.0);
................................................................................
			{
			    cs = GEOSGeom_getCoordSeq_r (handle, geos_item);
			    GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
			    GEOSCoordSeq_getSize_r (handle, cs, &points);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    cs = GEOSGeom_getCoordSeq (geos_item);
			    GEOSCoordSeq_getDimensions (cs, &dims);
			    GEOSCoordSeq_getSize (cs, &points);
#endif
			}
		      ln = gaiaAddLinestringToGeomColl (gaia, points);
		      for (iv = 0; iv < (int) points; iv++)
			{
			    if (dims == 3)
			      {
				  if (handle != NULL)
................................................................................
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
					GEOSCoordSeq_getZ_r (handle, cs, iv,
							     &z);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);
					GEOSCoordSeq_getZ (cs, iv, &z);
#endif
				    }
			      }
			    else
			      {
				  if (handle != NULL)
				    {
					GEOSCoordSeq_getX_r (handle, cs, iv,
							     &x);
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);
#endif
				    }
				  z = 0.0;
			      }
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
			      }
................................................................................
			      }
			}
		      break;
		  case GEOS_MULTILINESTRING:
		      if (handle != NULL)
			  nSubItems =
			      GEOSGetNumGeometries_r (handle, geos_item);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  nSubItems = GEOSGetNumGeometries (geos_item);
#endif
		      for (sub_it = 0; sub_it < nSubItems; sub_it++)
			{
			    /* looping on elementaty geometries */
			    if (handle != NULL)
			      {
				  geos_sub_item =
				      GEOSGetGeometryN_r (handle, geos_item,
................................................................................
							       geos_sub_item);
				  GEOSCoordSeq_getDimensions_r (handle, cs,
								&dims);
				  GEOSCoordSeq_getSize_r (handle, cs, &points);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  geos_sub_item =
				      GEOSGetGeometryN (geos_item, sub_it);
				  cs = GEOSGeom_getCoordSeq (geos_sub_item);
				  GEOSCoordSeq_getDimensions (cs, &dims);
				  GEOSCoordSeq_getSize (cs, &points);
#endif
			      }
			    ln = gaiaAddLinestringToGeomColl (gaia, points);
			    for (iv = 0; iv < (int) points; iv++)
			      {
				  if (dims == 3)
				    {
					if (handle != NULL)
................................................................................
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					      GEOSCoordSeq_getZ_r (handle, cs,
								   iv, &z);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);
					      GEOSCoordSeq_getZ (cs, iv, &z);
#endif
					  }
				    }
				  else
				    {
					if (handle != NULL)
					  {
					      GEOSCoordSeq_getX_r (handle, cs,
								   iv, &x);
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);
#endif
					  }
					z = 0.0;
				    }
				  if (dimension_model == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (ln->Coords, iv, x, y,
							 z);
................................................................................
				GEOSGetExteriorRing_r (handle, geos_item);
			    cs = GEOSGeom_getCoordSeq_r (handle, geos_ring);
			    GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
			    GEOSCoordSeq_getSize_r (handle, cs, &points);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    holes = GEOSGetNumInteriorRings (geos_item);
			    geos_ring = GEOSGetExteriorRing (geos_item);
			    cs = GEOSGeom_getCoordSeq (geos_ring);
			    GEOSCoordSeq_getDimensions (cs, &dims);
			    GEOSCoordSeq_getSize (cs, &points);
#endif
			}
		      pg = gaiaAddPolygonToGeomColl (gaia, points, holes);
		      rng = pg->Exterior;
		      for (iv = 0; iv < (int) points; iv++)
			{
			    if (dims == 3)
			      {
................................................................................
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
					GEOSCoordSeq_getZ_r (handle, cs, iv,
							     &z);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);
					GEOSCoordSeq_getZ (cs, iv, &z);
#endif
				    }
			      }
			    else
			      {
				  if (handle != NULL)
				    {
					GEOSCoordSeq_getX_r (handle, cs, iv,
							     &x);
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);
#endif
				    }
				  z = 0.0;
			      }
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			      }
................................................................................
							       geos_ring);
				  GEOSCoordSeq_getDimensions_r (handle, cs,
								&dims);
				  GEOSCoordSeq_getSize_r (handle, cs, &points);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  geos_ring =
				      GEOSGetInteriorRingN (geos_item, ib);
				  cs = GEOSGeom_getCoordSeq (geos_ring);
				  GEOSCoordSeq_getDimensions (cs, &dims);
				  GEOSCoordSeq_getSize (cs, &points);
#endif
			      }
			    rng = gaiaAddInteriorRing (pg, ib, points);
			    for (iv = 0; iv < (int) points; iv++)
			      {
				  if (dims == 3)
				    {
					if (handle != NULL)
................................................................................
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					      GEOSCoordSeq_getZ_r (handle, cs,
								   iv, &z);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);
					      GEOSCoordSeq_getZ (cs, iv, &z);
#endif
					  }
				    }
				  else
				    {
					if (handle != NULL)
					  {
					      GEOSCoordSeq_getX_r (handle, cs,
								   iv, &x);
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					  }
					else
					  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);
#endif
					  }
					z = 0.0;
				    }
				  if (dimension_model == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (rng->Coords, iv, x, y,
							 z);




|







 







|







 







<
<
<
<
<







 







<
<
<
<
<


<
<







 







<







 







<









<


<







 







<



<











<


<












<



<











<


<






<


<







 







<





<


<


<







 







<



<







 







<


<







 







<



<







 







<


<







 







<



<










<


<






<


<







 







<





<



<


<







 







<



<







 







<


<







 







<



<







 







<


<







 







<



<












<


<







<


<







<




<







 







<


<












<



<










<


<





<


<











<


<







 







<



<











<


<













<



<











<


<






<


<







 







|


<





<



<


<







 







<



<







 







<


<







 







<



<







 







<


<







 







<



<












<


<






<


<







 







<





<




<



<







 







<






<







 







<




<







 







<






<







 







<




<







 







<






<







 







<




<








<


<








<




<







 







<


<










<


<







 







<
<
<
<
<


<


<


<







 







<



<











<



<











<


<







 







<




<







 







<



<











<


<







 







<


<











<





<







 







<



<











<


<







 







<




<







 







<



<











<


<







 







<


<











<


<











<


<











<



<











<


<







 







<



<







 







<



<













<


<







 







<


<







 







<





<







 







<



<













<


<







 







<





<







 







<



<













<


<







 







<





<







 







<



<













<


<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
50
51
52
53
54
55
56





57
58
59
60
61
62
63
..
94
95
96
97
98
99
100





101
102


103
104
105
106
107
108
109
...
211
212
213
214
215
216
217

218
219
220
221
222
223
224
...
226
227
228
229
230
231
232

233
234
235
236
237
238
239
240
241

242
243

244
245
246
247
248
249
250
...
251
252
253
254
255
256
257

258
259
260

261
262
263
264
265
266
267
268
269
270
271

272
273

274
275
276
277
278
279
280
281
282
283
284
285

286
287
288

289
290
291
292
293
294
295
296
297
298
299

300
301

302
303
304
305
306
307

308
309

310
311
312
313
314
315
316
...
317
318
319
320
321
322
323

324
325
326
327
328

329
330

331
332

333
334
335
336
337
338
339
...
347
348
349
350
351
352
353

354
355
356

357
358
359
360
361
362
363
...
367
368
369
370
371
372
373

374
375

376
377
378
379
380
381
382
...
388
389
390
391
392
393
394

395
396
397

398
399
400
401
402
403
404
...
408
409
410
411
412
413
414

415
416

417
418
419
420
421
422
423
...
430
431
432
433
434
435
436

437
438
439

440
441
442
443
444
445
446
447
448
449

450
451

452
453
454
455
456
457

458
459

460
461
462
463
464
465
466
...
468
469
470
471
472
473
474

475
476
477
478
479

480
481
482

483
484

485
486
487
488
489
490
491
...
503
504
505
506
507
508
509

510
511
512

513
514
515
516
517
518
519
...
526
527
528
529
530
531
532

533
534

535
536
537
538
539
540
541
...
551
552
553
554
555
556
557

558
559
560

561
562
563
564
565
566
567
...
573
574
575
576
577
578
579

580
581

582
583
584
585
586
587
588
...
598
599
600
601
602
603
604

605
606
607

608
609
610
611
612
613
614
615
616
617
618
619

620
621

622
623
624
625
626
627
628

629
630

631
632
633
634
635
636
637

638
639
640
641

642
643
644
645
646
647
648
...
672
673
674
675
676
677
678

679
680

681
682
683
684
685
686
687
688
689
690
691
692

693
694
695

696
697
698
699
700
701
702
703
704
705

706
707

708
709
710
711
712

713
714

715
716
717
718
719
720
721
722
723
724
725

726
727

728
729
730
731
732
733
734
...
735
736
737
738
739
740
741

742
743
744

745
746
747
748
749
750
751
752
753
754
755

756
757

758
759
760
761
762
763
764
765
766
767
768
769
770

771
772
773

774
775
776
777
778
779
780
781
782
783
784

785
786

787
788
789
790
791
792

793
794

795
796
797
798
799
800
801
...
802
803
804
805
806
807
808
809
810
811

812
813
814
815
816

817
818
819

820
821

822
823
824
825
826
827
828
...
836
837
838
839
840
841
842

843
844
845

846
847
848
849
850
851
852
...
856
857
858
859
860
861
862

863
864

865
866
867
868
869
870
871
...
878
879
880
881
882
883
884

885
886
887

888
889
890
891
892
893
894
...
898
899
900
901
902
903
904

905
906

907
908
909
910
911
912
913
...
923
924
925
926
927
928
929

930
931
932

933
934
935
936
937
938
939
940
941
942
943
944

945
946

947
948
949
950
951
952

953
954

955
956
957
958
959
960
961
...
964
965
966
967
968
969
970

971
972
973
974
975

976
977
978
979

980
981
982

983
984
985
986
987
988
989
....
1004
1005
1006
1007
1008
1009
1010

1011
1012
1013
1014
1015
1016

1017
1018
1019
1020
1021
1022
1023
....
1032
1033
1034
1035
1036
1037
1038

1039
1040
1041
1042

1043
1044
1045
1046
1047
1048
1049
....
1062
1063
1064
1065
1066
1067
1068

1069
1070
1071
1072
1073
1074

1075
1076
1077
1078
1079
1080
1081
....
1090
1091
1092
1093
1094
1095
1096

1097
1098
1099
1100

1101
1102
1103
1104
1105
1106
1107
....
1120
1121
1122
1123
1124
1125
1126

1127
1128
1129
1130
1131
1132

1133
1134
1135
1136
1137
1138
1139
....
1140
1141
1142
1143
1144
1145
1146

1147
1148
1149
1150

1151
1152
1153
1154
1155
1156
1157
1158

1159
1160

1161
1162
1163
1164
1165
1166
1167
1168

1169
1170
1171
1172

1173
1174
1175
1176
1177
1178
1179
....
1183
1184
1185
1186
1187
1188
1189

1190
1191

1192
1193
1194
1195
1196
1197
1198
1199
1200
1201

1202
1203

1204
1205
1206
1207
1208
1209
1210
....
1228
1229
1230
1231
1232
1233
1234





1235
1236

1237
1238

1239
1240

1241
1242
1243
1244
1245
1246
1247
....
1254
1255
1256
1257
1258
1259
1260

1261
1262
1263

1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274

1275
1276
1277

1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288

1289
1290

1291
1292
1293
1294
1295
1296
1297
....
1315
1316
1317
1318
1319
1320
1321

1322
1323
1324
1325

1326
1327
1328
1329
1330
1331
1332
....
1333
1334
1335
1336
1337
1338
1339

1340
1341
1342

1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353

1354
1355

1356
1357
1358
1359
1360
1361
1362
....
1382
1383
1384
1385
1386
1387
1388

1389
1390

1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401

1402
1403
1404
1405
1406

1407
1408
1409
1410
1411
1412
1413
....
1415
1416
1417
1418
1419
1420
1421

1422
1423
1424

1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435

1436
1437

1438
1439
1440
1441
1442
1443
1444
....
1463
1464
1465
1466
1467
1468
1469

1470
1471
1472
1473

1474
1475
1476
1477
1478
1479
1480
....
1481
1482
1483
1484
1485
1486
1487

1488
1489
1490

1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501

1502
1503

1504
1505
1506
1507
1508
1509
1510
....
1546
1547
1548
1549
1550
1551
1552

1553
1554

1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565

1566
1567

1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578

1579
1580

1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591

1592
1593
1594

1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605

1606
1607

1608
1609
1610
1611
1612
1613
1614
....
1622
1623
1624
1625
1626
1627
1628

1629
1630
1631

1632
1633
1634
1635
1636
1637
1638
....
1642
1643
1644
1645
1646
1647
1648

1649
1650
1651

1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664

1665
1666

1667
1668
1669
1670
1671
1672
1673
....
1686
1687
1688
1689
1690
1691
1692

1693
1694

1695
1696
1697
1698
1699
1700
1701
....
1704
1705
1706
1707
1708
1709
1710

1711
1712
1713
1714
1715

1716
1717
1718
1719
1720
1721
1722
....
1726
1727
1728
1729
1730
1731
1732

1733
1734
1735

1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748

1749
1750

1751
1752
1753
1754
1755
1756
1757
....
1783
1784
1785
1786
1787
1788
1789

1790
1791
1792
1793
1794

1795
1796
1797
1798
1799
1800
1801
....
1806
1807
1808
1809
1810
1811
1812

1813
1814
1815

1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828

1829
1830

1831
1832
1833
1834
1835
1836
1837
....
1861
1862
1863
1864
1865
1866
1867

1868
1869
1870
1871
1872

1873
1874
1875
1876
1877
1878
1879
....
1883
1884
1885
1886
1887
1888
1889

1890
1891
1892

1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905

1906
1907

1908
1909
1910
1911
1912
1913
1914
/*

 gg_geoscvt.c -- Gaia / GEOS conversion [Geometry]
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
................................................................................
    GEOSGeometry *geos_int;
    GEOSGeometry *geos_item;
    GEOSGeometry **geos_holes;
    GEOSGeometry **geos_coll;
    GEOSCoordSequence *cs;
    int ring_points;
    int n_items;





    if (!gaia)
	return NULL;


    pt = gaia->FirstPoint;
    while (pt)
      {
	  /* counting how many POINTs are there */
	  pts++;
	  pt = pt->Next;
      }
................................................................................
			    GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
			    break;
			};
		      geos = GEOSGeom_createPoint_r (handle, cs);
		  }
		else
		  {

		      cs = GEOSCoordSeq_create (1, dims);
		      switch (gaia->DimensionModel)
			{
			case GAIA_XY_Z:
			case GAIA_XY_Z_M:
			    GEOSCoordSeq_setX (cs, 0, pt->X);
			    GEOSCoordSeq_setY (cs, 0, pt->Y);
................................................................................
			    break;
			default:
			    GEOSCoordSeq_setX (cs, 0, pt->X);
			    GEOSCoordSeq_setY (cs, 0, pt->Y);
			    break;
			};
		      geos = GEOSGeom_createPoint (cs);

		  }
	    }
	  break;
      case GAIA_LINESTRING:
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_LINESTRINGS)
	    {
		ln = gaia->FirstLinestring;
		if (handle != NULL)
		    cs = GEOSCoordSeq_create_r (handle, ln->Points, dims);

		else
		    cs = GEOSCoordSeq_create (ln->Points, dims);

		for (iv = 0; iv < ln->Points; iv++)
		  {
		      switch (ln->DimensionModel)
			{
			case GAIA_XY_Z:
			    gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
			    if (handle != NULL)
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);

			      }
			    break;
			case GAIA_XY_M:
			    gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);

			      }
			    break;
			case GAIA_XY_Z_M:
			    gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);

			      }
			    break;
			default:
			    gaiaGetPoint (ln->Coords, iv, &x, &y);
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);

			      }
			    break;
			};
		  }
		if (handle != NULL)
		    geos = GEOSGeom_createLineString_r (handle, cs);

		else
		    geos = GEOSGeom_createLineString (cs);

	    }
	  break;
      case GAIA_POLYGON:
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_POLYGONS)
	    {
		pg = gaia->FirstPolygon;
		rng = pg->Exterior;
................................................................................
		/* exterior ring */
		ring_points = rng->Points;
		if (cache)
		  {
		      if (gaiaIsNotClosedRing_r (cache, rng))
			  ring_points++;
		  }

		else
		  {
		      if (gaiaIsNotClosedRing (rng))
			  ring_points++;
		  }

		if (handle != NULL)
		    cs = GEOSCoordSeq_create_r (handle, ring_points, dims);

		else
		    cs = GEOSCoordSeq_create (ring_points, dims);

		for (iv = 0; iv < rng->Points; iv++)
		  {
		      switch (rng->DimensionModel)
			{
			case GAIA_XY_Z:
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			    if (iv == 0)
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);

			      }
			    break;
			case GAIA_XY_M:
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			    if (iv == 0)
			      {
				  /* saving the first vertex */
................................................................................
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);

			      }
			    break;
			case GAIA_XY_Z_M:
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			    if (iv == 0)
			      {
				  /* saving the first vertex */
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);
				  GEOSCoordSeq_setZ (cs, iv, z);

			      }
			    break;
			default:
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			    if (iv == 0)
			      {
				  /* saving the first vertex */
................................................................................
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x);
				  GEOSCoordSeq_setY (cs, iv, y);

			      }
			    break;
			};
		  }
		if (ring_points > rng->Points)
		  {
		      /* ensuring Ring's closure */
................................................................................
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x0);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y0);
				  GEOSCoordSeq_setZ_r (handle, cs, iv, z0);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x0);
				  GEOSCoordSeq_setY (cs, iv, y0);
				  GEOSCoordSeq_setZ (cs, iv, z0);

			      }
			    break;
			default:
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, iv, x0);
				  GEOSCoordSeq_setY_r (handle, cs, iv, y0);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, iv, x0);
				  GEOSCoordSeq_setY (cs, iv, y0);

			      }
			    break;
			};
		  }
		if (handle != NULL)
		    geos_ext = GEOSGeom_createLinearRing_r (handle, cs);

		else
		    geos_ext = GEOSGeom_createLinearRing (cs);

		geos_holes = NULL;
		if (pg->NumInteriors > 0)
		  {
		      geos_holes =
			  malloc (sizeof (GEOSGeometry *) * pg->NumInteriors);
		      for (ib = 0; ib < pg->NumInteriors; ib++)
			{
................................................................................
			    rng = pg->Interiors + ib;
			    ring_points = rng->Points;
			    if (cache != NULL)
			      {
				  if (gaiaIsNotClosedRing_r (cache, rng))
				      ring_points++;
			      }

			    else
			      {
				  if (gaiaIsNotClosedRing (rng))
				      ring_points++;
			      }

			    if (handle != NULL)
				cs = GEOSCoordSeq_create_r (handle, ring_points,
							    dims);

			    else
				cs = GEOSCoordSeq_create (ring_points, dims);

			    for (iv = 0; iv < rng->Points; iv++)
			      {
				  switch (rng->DimensionModel)
				    {
				    case GAIA_XY_Z:
					gaiaGetPointXYZ (rng->Coords, iv, &x,
							 &y, &z);
................................................................................
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					      GEOSCoordSeq_setZ_r (handle, cs,
								   iv, z);
					  }
					else
					  {

					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);
					      GEOSCoordSeq_setZ (cs, iv, z);

					  }
					break;
				    case GAIA_XY_M:
					gaiaGetPointXYM (rng->Coords, iv, &x,
							 &y, &m);
					if (iv == 0)
					  {
................................................................................
					      GEOSCoordSeq_setX_r (handle, cs,
								   iv, x);
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					  }
					else
					  {

					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);

					  }
					break;
				    case GAIA_XY_Z_M:
					gaiaGetPointXYZM (rng->Coords, iv, &x,
							  &y, &z, &m);
					if (iv == 0)
					  {
................................................................................
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					      GEOSCoordSeq_setZ_r (handle, cs,
								   iv, z);
					  }
					else
					  {

					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);
					      GEOSCoordSeq_setZ (cs, iv, z);

					  }
					break;
				    default:
					gaiaGetPoint (rng->Coords, iv, &x, &y);
					if (iv == 0)
					  {
					      /* saving the first vertex */
................................................................................
					      GEOSCoordSeq_setX_r (handle, cs,
								   iv, x);
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y);
					  }
					else
					  {

					      GEOSCoordSeq_setX (cs, iv, x);
					      GEOSCoordSeq_setY (cs, iv, y);

					  }
					break;
				    };
			      }
			    if (ring_points > rng->Points)
			      {
				  /* ensuring Ring's closure */
................................................................................
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y0);
					      GEOSCoordSeq_setZ_r (handle, cs,
								   iv, z0);
					  }
					else
					  {

					      GEOSCoordSeq_setX (cs, iv, x0);
					      GEOSCoordSeq_setY (cs, iv, y0);
					      GEOSCoordSeq_setZ (cs, iv, z0);

					  }
					break;
				    default:
					if (handle != NULL)
					  {
					      GEOSCoordSeq_setX_r (handle, cs,
								   iv, x0);
					      GEOSCoordSeq_setY_r (handle, cs,
								   iv, y0);
					  }
					else
					  {

					      GEOSCoordSeq_setX (cs, iv, x0);
					      GEOSCoordSeq_setY (cs, iv, y0);

					  }
					break;
				    };
			      }
			    if (handle != NULL)
				geos_int =
				    GEOSGeom_createLinearRing_r (handle, cs);

			    else
				geos_int = GEOSGeom_createLinearRing (cs);

			    *(geos_holes + ib) = geos_int;
			}
		  }
		if (handle != NULL)
		    geos =
			GEOSGeom_createPolygon_r (handle, geos_ext, geos_holes,
						  pg->NumInteriors);

		else
		    geos =
			GEOSGeom_createPolygon (geos_ext, geos_holes,
						pg->NumInteriors);

		if (geos_holes)
		    free (geos_holes);
	    }
	  break;
      case GAIA_MULTIPOINT:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTIPOLYGON:
................................................................................
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_POINTS)
	    {
		pt = gaia->FirstPoint;
		while (pt)
		  {
		      if (handle != NULL)
			  cs = GEOSCoordSeq_create_r (handle, 1, dims);

		      else
			  cs = GEOSCoordSeq_create (1, dims);

		      switch (pt->DimensionModel)
			{
			case GAIA_XY_Z:
			case GAIA_XY_Z_M:
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, 0, pt->X);
				  GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
				  GEOSCoordSeq_setZ_r (handle, cs, 0, pt->Z);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, 0, pt->X);
				  GEOSCoordSeq_setY (cs, 0, pt->Y);
				  GEOSCoordSeq_setZ (cs, 0, pt->Z);

			      }
			    break;
			default:
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_setX_r (handle, cs, 0, pt->X);
				  GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
			      }
			    else
			      {

				  GEOSCoordSeq_setX (cs, 0, pt->X);
				  GEOSCoordSeq_setY (cs, 0, pt->Y);

			      }
			    break;
			};
		      if (handle != NULL)
			  geos_item = GEOSGeom_createPoint_r (handle, cs);

		      else
			  geos_item = GEOSGeom_createPoint (cs);

		      *(geos_coll + nItem++) = geos_item;
		      pt = pt->Next;
		  }
	    }
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_LINESTRINGS)
	    {
		ln = gaia->FirstLinestring;
		while (ln)
		  {
		      if (handle != NULL)
			  cs = GEOSCoordSeq_create_r (handle, ln->Points, dims);

		      else
			  cs = GEOSCoordSeq_create (ln->Points, dims);

		      for (iv = 0; iv < ln->Points; iv++)
			{
			    switch (ln->DimensionModel)
			      {
			      case GAIA_XY_Z:
				  gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
				  if (handle != NULL)
................................................................................
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);

				    }
				  break;
			      case GAIA_XY_M:
				  gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);

				    }
				  break;
			      case GAIA_XY_Z_M:
				  gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z,
						    &m);
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);

				    }
				  break;
			      default:
				  gaiaGetPoint (ln->Coords, iv, &x, &y);
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);

				    }
				  break;
			      };
			}
		      if (handle != NULL)
			  geos_item = GEOSGeom_createLineString_r (handle, cs);

		      else
			  geos_item = GEOSGeom_createLineString (cs);

		      *(geos_coll + nItem++) = geos_item;
		      ln = ln->Next;
		  }
	    }
	  if (mode == GAIA2GEOS_ALL || mode == GAIA2GEOS_ONLY_POLYGONS)
	    {
		pg = gaia->FirstPolygon;
................................................................................
		while (pg)
		  {
		      rng = pg->Exterior;
		      /* exterior ring */
		      ring_points = rng->Points;
		      if (cache != NULL)
			{
			    if (gaiaIsNotClosedRing_r (handle, rng))
				ring_points++;
			}

		      else
			{
			    if (gaiaIsNotClosedRing (rng))
				ring_points++;
			}

		      if (handle != NULL)
			  cs = GEOSCoordSeq_create_r (handle, ring_points,
						      dims);

		      else
			  cs = GEOSCoordSeq_create (ring_points, dims);

		      for (iv = 0; iv < rng->Points; iv++)
			{
			    switch (rng->DimensionModel)
			      {
			      case GAIA_XY_Z:
				  gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
				  if (iv == 0)
................................................................................
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);

				    }
				  break;
			      case GAIA_XY_M:
				  gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
				  if (iv == 0)
				    {
					/* saving the first vertex */
................................................................................
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);

				    }
				  break;
			      case GAIA_XY_Z_M:
				  gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z,
						    &m);
				  if (iv == 0)
				    {
................................................................................
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
					GEOSCoordSeq_setZ_r (handle, cs, iv, z);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);
					GEOSCoordSeq_setZ (cs, iv, z);

				    }
				  break;
			      default:
				  gaiaGetPoint (rng->Coords, iv, &x, &y);
				  if (iv == 0)
				    {
					/* saving the first vertex */
................................................................................
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv, x);
					GEOSCoordSeq_setY_r (handle, cs, iv, y);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x);
					GEOSCoordSeq_setY (cs, iv, y);

				    }
				  break;
			      };
			}
		      if (ring_points > rng->Points)
			{
			    /* ensuring Ring's closure */
................................................................................
					GEOSCoordSeq_setY_r (handle, cs, iv,
							     y0);
					GEOSCoordSeq_setZ_r (handle, cs, iv,
							     z0);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x0);
					GEOSCoordSeq_setY (cs, iv, y0);
					GEOSCoordSeq_setZ (cs, iv, z0);

				    }
				  break;
			      default:
				  if (handle != NULL)
				    {
					GEOSCoordSeq_setX_r (handle, cs, iv,
							     x0);
					GEOSCoordSeq_setY_r (handle, cs, iv,
							     y0);
				    }
				  else
				    {

					GEOSCoordSeq_setX (cs, iv, x0);
					GEOSCoordSeq_setY (cs, iv, y0);

				    }
				  break;
			      };
			}
		      if (handle != NULL)
			  geos_ext = GEOSGeom_createLinearRing_r (handle, cs);

		      else
			  geos_ext = GEOSGeom_createLinearRing (cs);

		      geos_holes = NULL;
		      if (pg->NumInteriors > 0)
			{
			    geos_holes =
				malloc (sizeof (GEOSGeometry *) *
					pg->NumInteriors);
			    for (ib = 0; ib < pg->NumInteriors; ib++)
................................................................................
				  rng = pg->Interiors + ib;
				  ring_points = rng->Points;
				  if (cache != NULL)
				    {
					if (gaiaIsNotClosedRing_r (cache, rng))
					    ring_points++;
				    }

				  else
				    {
					if (gaiaIsNotClosedRing (rng))
					    ring_points++;
				    }

				  if (handle != NULL)
				      cs = GEOSCoordSeq_create_r (handle,
								  ring_points,
								  dims);

				  else
				      cs = GEOSCoordSeq_create (ring_points,
								dims);

				  for (iv = 0; iv < rng->Points; iv++)
				    {
					switch (rng->DimensionModel)
					  {
					  case GAIA_XY_Z:
					      gaiaGetPointXYZ (rng->Coords, iv,
							       &x, &y, &z);
................................................................................
									 y);
						    GEOSCoordSeq_setZ_r (handle,
									 cs, iv,
									 z);
						}
					      else
						{

						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);
						    GEOSCoordSeq_setZ (cs, iv,
								       z);

						}
					      break;
					  case GAIA_XY_M:
					      gaiaGetPointXYM (rng->Coords, iv,
							       &x, &y, &m);
					      if (iv == 0)
						{
................................................................................
									 x);
						    GEOSCoordSeq_setY_r (handle,
									 cs, iv,
									 y);
						}
					      else
						{

						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);

						}
					      break;
					  case GAIA_XY_Z_M:
					      gaiaGetPointXYZM (rng->Coords, iv,
								&x, &y, &z, &m);
					      if (iv == 0)
						{
................................................................................
									 y);
						    GEOSCoordSeq_setZ_r (handle,
									 cs, iv,
									 z);
						}
					      else
						{

						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);
						    GEOSCoordSeq_setZ (cs, iv,
								       z);

						}
					      break;
					  default:
					      gaiaGetPoint (rng->Coords, iv, &x,
							    &y);
					      if (iv == 0)
						{
................................................................................
									 x);
						    GEOSCoordSeq_setY_r (handle,
									 cs, iv,
									 y);
						}
					      else
						{

						    GEOSCoordSeq_setX (cs, iv,
								       x);
						    GEOSCoordSeq_setY (cs, iv,
								       y);

						}
					      break;
					  };
				    }
				  if (ring_points > rng->Points)
				    {
					/* ensuring Ring's closure */
................................................................................
									 y0);
						    GEOSCoordSeq_setZ_r (handle,
									 cs, iv,
									 z0);
						}
					      else
						{

						    GEOSCoordSeq_setX (cs, iv,
								       x0);
						    GEOSCoordSeq_setY (cs, iv,
								       y0);
						    GEOSCoordSeq_setZ (cs, iv,
								       z0);

						}
					      break;
					  default:
					      if (handle != NULL)
						{
						    GEOSCoordSeq_setX_r (handle,
									 cs, iv,
................................................................................
									 x0);
						    GEOSCoordSeq_setY_r (handle,
									 cs, iv,
									 y0);
						}
					      else
						{

						    GEOSCoordSeq_setX (cs, iv,
								       x0);
						    GEOSCoordSeq_setY (cs, iv,
								       y0);

						}
					      break;
					  };
				    }
				  if (handle != NULL)
				      geos_int =
					  GEOSGeom_createLinearRing_r (handle,
								       cs);

				  else
				      geos_int = GEOSGeom_createLinearRing (cs);

				  *(geos_holes + ib) = geos_int;
			      }
			}
		      if (handle != NULL)
			  geos_item =
			      GEOSGeom_createPolygon_r (handle, geos_ext,
							geos_holes,
							pg->NumInteriors);

		      else
			  geos_item =
			      GEOSGeom_createPolygon (geos_ext, geos_holes,
						      pg->NumInteriors);

		      if (geos_holes)
			  free (geos_holes);
		      *(geos_coll + nItem++) = geos_item;
		      pg = pg->Next;
		  }
	    }
	  geos_type = GEOS_GEOMETRYCOLLECTION;
................................................................................
	      geos_type = GEOS_MULTILINESTRING;
	  if (type == GAIA_MULTIPOLYGON)
	      geos_type = GEOS_MULTIPOLYGON;
	  if (handle != NULL)
	      geos =
		  GEOSGeom_createCollection_r (handle, geos_type, geos_coll,
					       n_items);

	  else
	      geos = GEOSGeom_createCollection (geos_type, geos_coll, n_items);

	  if (geos_coll)
	      free (geos_coll);
	  break;
      default:
	  geos = NULL;
      };
    if (geos)
      {
	  if (handle != NULL)
	      GEOSSetSRID_r (handle, geos, gaia->Srid);

	  else
	      GEOSSetSRID (geos, gaia->Srid);

      }
    return geos;
}

static gaiaGeomCollPtr
fromGeosGeometry (GEOSContextHandle_t handle, const GEOSGeometry * geos,
		  const int dimension_model)
................................................................................
    const GEOSGeometry *geos_ring;
    const GEOSGeometry *geos_item;
    const GEOSGeometry *geos_sub_item;
    gaiaGeomCollPtr gaia = NULL;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;





    if (!geos)
	return NULL;

    if (handle != NULL)
	type = GEOSGeomTypeId_r (handle, geos);

    else
	type = GEOSGeomTypeId (geos);

    switch (type)
      {
      case GEOS_POINT:
	  if (dimension_model == GAIA_XY_Z)
	      gaia = gaiaAllocGeomCollXYZ ();
	  else if (dimension_model == GAIA_XY_M)
	      gaia = gaiaAllocGeomCollXYM ();
................................................................................
	    {
		gaia->Srid = GEOSGetSRID_r (handle, geos);
		cs = GEOSGeom_getCoordSeq_r (handle, geos);
		GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
	    }
	  else
	    {

		gaia->Srid = GEOSGetSRID (geos);
		cs = GEOSGeom_getCoordSeq (geos);
		GEOSCoordSeq_getDimensions (cs, &dims);

	    }
	  if (dims == 3)
	    {
		if (handle != NULL)
		  {
		      GEOSCoordSeq_getX_r (handle, cs, 0, &x);
		      GEOSCoordSeq_getY_r (handle, cs, 0, &y);
		      GEOSCoordSeq_getZ_r (handle, cs, 0, &z);
		  }
		else
		  {

		      GEOSCoordSeq_getX (cs, 0, &x);
		      GEOSCoordSeq_getY (cs, 0, &y);
		      GEOSCoordSeq_getZ (cs, 0, &z);

		  }
	    }
	  else
	    {
		if (handle != NULL)
		  {
		      GEOSCoordSeq_getX_r (handle, cs, 0, &x);
		      GEOSCoordSeq_getY_r (handle, cs, 0, &y);
		  }
		else
		  {

		      GEOSCoordSeq_getX (cs, 0, &x);
		      GEOSCoordSeq_getY (cs, 0, &y);

		  }
		z = 0.0;
	    }
	  if (dimension_model == GAIA_XY_Z)
	      gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
	  else if (dimension_model == GAIA_XY_M)
	      gaiaAddPointToGeomCollXYM (gaia, x, y, 0.0);
................................................................................
		gaia->Srid = GEOSGetSRID_r (handle, geos);
		cs = GEOSGeom_getCoordSeq_r (handle, geos);
		GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
		GEOSCoordSeq_getSize_r (handle, cs, &points);
	    }
	  else
	    {

		gaia->Srid = GEOSGetSRID (geos);
		cs = GEOSGeom_getCoordSeq (geos);
		GEOSCoordSeq_getDimensions (cs, &dims);
		GEOSCoordSeq_getSize (cs, &points);

	    }
	  ln = gaiaAddLinestringToGeomColl (gaia, points);
	  for (iv = 0; iv < (int) points; iv++)
	    {
		if (dims == 3)
		  {
		      if (handle != NULL)
................................................................................
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			    GEOSCoordSeq_getZ_r (handle, cs, iv, &z);
			}
		      else
			{

			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);
			    GEOSCoordSeq_getZ (cs, iv, &z);

			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			}
		      else
			{

			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);

			}
		      z = 0.0;
		  }
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
		  }
................................................................................
	  else if (dimension_model == GAIA_XY_Z_M)
	      gaia = gaiaAllocGeomCollXYZM ();
	  else
	      gaia = gaiaAllocGeomColl ();
	  gaia->DeclaredType = GAIA_POLYGON;
	  if (handle != NULL)
	      gaia->Srid = GEOSGetSRID_r (handle, geos);

	  else
	      gaia->Srid = GEOSGetSRID (geos);

	  /* exterior ring */
	  if (handle != NULL)
	    {
		holes = GEOSGetNumInteriorRings_r (handle, geos);
		geos_ring = GEOSGetExteriorRing_r (handle, geos);
		cs = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
		GEOSCoordSeq_getSize_r (handle, cs, &points);
	    }
	  else
	    {

		holes = GEOSGetNumInteriorRings (geos);
		geos_ring = GEOSGetExteriorRing (geos);
		cs = GEOSGeom_getCoordSeq (geos_ring);
		GEOSCoordSeq_getDimensions (cs, &dims);
		GEOSCoordSeq_getSize (cs, &points);

	    }
	  pg = gaiaAddPolygonToGeomColl (gaia, points, holes);
	  rng = pg->Exterior;
	  for (iv = 0; iv < (int) points; iv++)
	    {
		if (dims == 3)
		  {
................................................................................
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			    GEOSCoordSeq_getZ_r (handle, cs, iv, &z);
			}
		      else
			{

			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);
			    GEOSCoordSeq_getZ (cs, iv, &z);

			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_getX_r (handle, cs, iv, &x);
			    GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			}
		      else
			{

			    GEOSCoordSeq_getX (cs, iv, &x);
			    GEOSCoordSeq_getY (cs, iv, &y);

			}
		      z = 0.0;
		  }
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
................................................................................
		      geos_ring = GEOSGetInteriorRingN_r (handle, geos, ib);
		      cs = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		      GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
		      GEOSCoordSeq_getSize_r (handle, cs, &points);
		  }
		else
		  {

		      geos_ring = GEOSGetInteriorRingN (geos, ib);
		      cs = GEOSGeom_getCoordSeq (geos_ring);
		      GEOSCoordSeq_getDimensions (cs, &dims);
		      GEOSCoordSeq_getSize (cs, &points);

		  }
		rng = gaiaAddInteriorRing (pg, ib, points);
		for (iv = 0; iv < (int) points; iv++)
		  {
		      if (dims == 3)
			{
			    if (handle != NULL)
................................................................................
			      {
				  GEOSCoordSeq_getX_r (handle, cs, iv, &x);
				  GEOSCoordSeq_getY_r (handle, cs, iv, &y);
				  GEOSCoordSeq_getZ_r (handle, cs, iv, &z);
			      }
			    else
			      {

				  GEOSCoordSeq_getX (cs, iv, &x);
				  GEOSCoordSeq_getY (cs, iv, &y);
				  GEOSCoordSeq_getZ (cs, iv, &z);

			      }
			}
		      else
			{
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_getX_r (handle, cs, iv, &x);
				  GEOSCoordSeq_getY_r (handle, cs, iv, &y);
			      }
			    else
			      {

				  GEOSCoordSeq_getX (cs, iv, &x);
				  GEOSCoordSeq_getY (cs, iv, &y);

			      }
			    z = 0.0;
			}
		      if (dimension_model == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			}
................................................................................
	  if (handle != NULL)
	    {
		gaia->Srid = GEOSGetSRID_r (handle, geos);
		nItems = GEOSGetNumGeometries_r (handle, geos);
	    }
	  else
	    {

		gaia->Srid = GEOSGetSRID (geos);
		nItems = GEOSGetNumGeometries (geos);

	    }
	  for (it = 0; it < nItems; it++)
	    {
		/* looping on elementaty geometries */
		if (handle != NULL)
		  {
		      geos_item = GEOSGetGeometryN_r (handle, geos, it);
		      itemType = GEOSGeomTypeId_r (handle, geos_item);
		  }
		else
		  {

		      geos_item = GEOSGetGeometryN (geos, it);
		      itemType = GEOSGeomTypeId (geos_item);

		  }
		switch (itemType)
		  {
		  case GEOS_POINT:
		      if (handle != NULL)
			{
			    cs = GEOSGeom_getCoordSeq_r (handle, geos_item);
			    GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
			}
		      else
			{

			    cs = GEOSGeom_getCoordSeq (geos_item);
			    GEOSCoordSeq_getDimensions (cs, &dims);

			}
		      if (dims == 3)
			{
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_getX_r (handle, cs, 0, &x);
				  GEOSCoordSeq_getY_r (handle, cs, 0, &y);
				  GEOSCoordSeq_getZ_r (handle, cs, 0, &z);
			      }
			    else
			      {

				  GEOSCoordSeq_getX (cs, 0, &x);
				  GEOSCoordSeq_getY (cs, 0, &y);
				  GEOSCoordSeq_getZ (cs, 0, &z);

			      }
			}
		      else
			{
			    if (handle != NULL)
			      {
				  GEOSCoordSeq_getX_r (handle, cs, 0, &x);
				  GEOSCoordSeq_getY_r (handle, cs, 0, &y);
			      }
			    else
			      {

				  GEOSCoordSeq_getX (cs, 0, &x);
				  GEOSCoordSeq_getY (cs, 0, &y);

			      }
			    z = 0.0;
			}
		      if (dimension_model == GAIA_XY_Z)
			  gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
		      else if (dimension_model == GAIA_XY_M)
			  gaiaAddPointToGeomCollXYM (gaia, x, y, 0.0);
................................................................................
			{
			    cs = GEOSGeom_getCoordSeq_r (handle, geos_item);
			    GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
			    GEOSCoordSeq_getSize_r (handle, cs, &points);
			}
		      else
			{

			    cs = GEOSGeom_getCoordSeq (geos_item);
			    GEOSCoordSeq_getDimensions (cs, &dims);
			    GEOSCoordSeq_getSize (cs, &points);

			}
		      ln = gaiaAddLinestringToGeomColl (gaia, points);
		      for (iv = 0; iv < (int) points; iv++)
			{
			    if (dims == 3)
			      {
				  if (handle != NULL)
................................................................................
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
					GEOSCoordSeq_getZ_r (handle, cs, iv,
							     &z);
				    }
				  else
				    {

					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);
					GEOSCoordSeq_getZ (cs, iv, &z);

				    }
			      }
			    else
			      {
				  if (handle != NULL)
				    {
					GEOSCoordSeq_getX_r (handle, cs, iv,
							     &x);
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
				    }
				  else
				    {

					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);

				    }
				  z = 0.0;
			      }
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
			      }
................................................................................
			      }
			}
		      break;
		  case GEOS_MULTILINESTRING:
		      if (handle != NULL)
			  nSubItems =
			      GEOSGetNumGeometries_r (handle, geos_item);

		      else
			  nSubItems = GEOSGetNumGeometries (geos_item);

		      for (sub_it = 0; sub_it < nSubItems; sub_it++)
			{
			    /* looping on elementaty geometries */
			    if (handle != NULL)
			      {
				  geos_sub_item =
				      GEOSGetGeometryN_r (handle, geos_item,
................................................................................
							       geos_sub_item);
				  GEOSCoordSeq_getDimensions_r (handle, cs,
								&dims);
				  GEOSCoordSeq_getSize_r (handle, cs, &points);
			      }
			    else
			      {

				  geos_sub_item =
				      GEOSGetGeometryN (geos_item, sub_it);
				  cs = GEOSGeom_getCoordSeq (geos_sub_item);
				  GEOSCoordSeq_getDimensions (cs, &dims);
				  GEOSCoordSeq_getSize (cs, &points);

			      }
			    ln = gaiaAddLinestringToGeomColl (gaia, points);
			    for (iv = 0; iv < (int) points; iv++)
			      {
				  if (dims == 3)
				    {
					if (handle != NULL)
................................................................................
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					      GEOSCoordSeq_getZ_r (handle, cs,
								   iv, &z);
					  }
					else
					  {

					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);
					      GEOSCoordSeq_getZ (cs, iv, &z);

					  }
				    }
				  else
				    {
					if (handle != NULL)
					  {
					      GEOSCoordSeq_getX_r (handle, cs,
								   iv, &x);
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					  }
					else
					  {

					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);

					  }
					z = 0.0;
				    }
				  if (dimension_model == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (ln->Coords, iv, x, y,
							 z);
................................................................................
				GEOSGetExteriorRing_r (handle, geos_item);
			    cs = GEOSGeom_getCoordSeq_r (handle, geos_ring);
			    GEOSCoordSeq_getDimensions_r (handle, cs, &dims);
			    GEOSCoordSeq_getSize_r (handle, cs, &points);
			}
		      else
			{

			    holes = GEOSGetNumInteriorRings (geos_item);
			    geos_ring = GEOSGetExteriorRing (geos_item);
			    cs = GEOSGeom_getCoordSeq (geos_ring);
			    GEOSCoordSeq_getDimensions (cs, &dims);
			    GEOSCoordSeq_getSize (cs, &points);

			}
		      pg = gaiaAddPolygonToGeomColl (gaia, points, holes);
		      rng = pg->Exterior;
		      for (iv = 0; iv < (int) points; iv++)
			{
			    if (dims == 3)
			      {
................................................................................
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
					GEOSCoordSeq_getZ_r (handle, cs, iv,
							     &z);
				    }
				  else
				    {

					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);
					GEOSCoordSeq_getZ (cs, iv, &z);

				    }
			      }
			    else
			      {
				  if (handle != NULL)
				    {
					GEOSCoordSeq_getX_r (handle, cs, iv,
							     &x);
					GEOSCoordSeq_getY_r (handle, cs, iv,
							     &y);
				    }
				  else
				    {

					GEOSCoordSeq_getX (cs, iv, &x);
					GEOSCoordSeq_getY (cs, iv, &y);

				    }
				  z = 0.0;
			      }
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			      }
................................................................................
							       geos_ring);
				  GEOSCoordSeq_getDimensions_r (handle, cs,
								&dims);
				  GEOSCoordSeq_getSize_r (handle, cs, &points);
			      }
			    else
			      {

				  geos_ring =
				      GEOSGetInteriorRingN (geos_item, ib);
				  cs = GEOSGeom_getCoordSeq (geos_ring);
				  GEOSCoordSeq_getDimensions (cs, &dims);
				  GEOSCoordSeq_getSize (cs, &points);

			      }
			    rng = gaiaAddInteriorRing (pg, ib, points);
			    for (iv = 0; iv < (int) points; iv++)
			      {
				  if (dims == 3)
				    {
					if (handle != NULL)
................................................................................
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					      GEOSCoordSeq_getZ_r (handle, cs,
								   iv, &z);
					  }
					else
					  {

					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);
					      GEOSCoordSeq_getZ (cs, iv, &z);

					  }
				    }
				  else
				    {
					if (handle != NULL)
					  {
					      GEOSCoordSeq_getX_r (handle, cs,
								   iv, &x);
					      GEOSCoordSeq_getY_r (handle, cs,
								   iv, &y);
					  }
					else
					  {

					      GEOSCoordSeq_getX (cs, iv, &x);
					      GEOSCoordSeq_getY (cs, iv, &y);

					  }
					z = 0.0;
				    }
				  if (dimension_model == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (rng->Coords, iv, x, y,
							 z);

Changes to src/gaiageo/gg_gml.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
...
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
...
972
973
974
975
976
977
978


























979
980
981
982
983
984
985
....
1047
1048
1049
1050
1051
1052
1053
1054

1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070


1071

1072
1073
1074
1075
1076

1077
1078
1079
1080
1081
1082
1083
....
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110


1111

1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124

1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
....
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
....
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
....
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
....
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421

1422

1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438

1439


1440
1441
1442
1443
1444
1445
1446
....
1450
1451
1452
1453
1454
1455
1456

1457
1458
1459
1460
1461
1462
1463
....
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585

1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
....
1615
1616
1617
1618
1619
1620
1621

1622
1623
1624
1625
1626
1627
1628
....
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
....
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726

1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
....
1746
1747
1748
1749
1750
1751
1752

1753
1754
1755
1756
1757
1758
1759
....
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
....
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966

1967
1968
1969
1970
1971
1972
1973
....
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
....
1995
1996
1997
1998
1999
2000
2001

2002
2003
2004
2005
2006
2007
2008
2009
....
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
....
2073
2074
2075
2076
2077
2078
2079

2080
2081
2082
2083
2084
2085
2086
2087
....
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154

2155
2156
2157
2158
2159
2160
2161
2162
....
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
....
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230

2231
2232
2233
2234
2235
2236
2237
2238
....
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
....
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290

2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
....
2345
2346
2347
2348
2349
2350
2351

2352
2353
2354
2355


2356
2357
2358
2359
2360
2361
2362
....
2463
2464
2465
2466
2467
2468
2469

2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
....
2500
2501
2502
2503
2504
2505
2506

2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
....
2529
2530
2531
2532
2533
2534
2535

2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
....
2566
2567
2568
2569
2570
2571
2572

2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
....
2595
2596
2597
2598
2599
2600
2601

2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
....
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651

2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
....
2674
2675
2676
2677
2678
2679
2680

2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
....
2711
2712
2713
2714
2715
2716
2717

2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
....
2740
2741
2742
2743
2744
2745
2746

2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
....
2777
2778
2779
2780
2781
2782
2783

2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
....
2806
2807
2808
2809
2810
2811
2812

2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
....
2838
2839
2840
2841
2842
2843
2844

2845
2846
2847
2848
2849
2850
2851
2852
2853
2854

2855
2856
2857
2858
2859
2860
2861
2862
2863
2864

2865
2866
2867
2868
2869
2870
2871
2872
2873
2874

2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
....
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712

3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
....
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
/*

 gg_gml.c -- GML parser/lexer 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2015
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
      }
    len = strlen (str);
    *p = malloc (len + 1);
    strcpy (*p, str);
}

static int
gml_get_srid (gmlNodePtr node)
{
/* attempting to guess the SRID */
    int len;
    gmlAttrPtr attr = node->Attributes;
    while (attr)
      {
	  if (strcmp (attr->Key, "srsName") == 0)
................................................................................
	    }
	  attr = attr->Next;
      }
    return -1;
}

static int
guessGmlSrid (gmlNodePtr node)
{
/* attempting to guess the SRID */
    int srid = -1;
    gmlNodePtr n = node;
    while (n)
      {
	  /* looping on GML Members */
	  srid = gml_get_srid (n);
	  if (srid >= 0)
	      return srid;
	  n = n->Next;
      }
    return srid;
}

static int
gml_get_dimension (gmlNodePtr node)
{
/* attempting to establish if there is a Z coordinate */
    gmlAttrPtr attr = node->Attributes;
    while (attr)
      {
	  if (strcmp (attr->Key, "srsDimension") == 0)
	    {
		if (atoi (attr->Value) == 3)
		    return 3;
		else
		    return 2;
	    }
	  if (strcmp (attr->Key, "dimension") == 0)
	    {
		if (atoi (attr->Value) == 3)
		    return 3;
		else
		    return 2;
	    }
	  attr = attr->Next;
      }
    return -1;
}

static int
gml_check_coord (const char *value)
{
/* checking a GML coordinate */
    int decimal = 0;
    int exp = 0;
    int expsign = 0;
    const char *p = value;
    if (*p == '+' || *p == '-')
	p++;
    while (*p != '\0')
      {
	  if (*p == '.')
	    {
		if (!decimal)
		    decimal = 1;
		else
		    return 0;
	    }
	  else if (*p >= '0' && *p <= '9')
	      ;
	  else if (*p == 'e' || *p == 'E')
	      exp++;
	  else if (*p == '+' || *p == '-')
	    {
		if (!exp)
		    return 0;
		expsign++;
	    }
	  else
	      return 0;
	  p++;
      }
    if (exp > 1 || expsign > 1)
	return 0;
    return 1;
}

static int
gml_check_coords (const char *value)
{
/* extracting GML v2.x coords from a comma-separated string */
    const char *in = value;
    int count = 0;
    char buf[1024];
    char *out = buf;
    *out = '\0';

    while (*in != '\0')
      {
	  if (*in == ',')
	    {
		*out = '\0';
		if (*buf != '\0')
		  {
		      if (!gml_check_coord (buf))
			  return 0;
		      switch (count)
			{
			case 0:
			    count += 1;
			    break;
			case 1:
			    count += 1;
			    break;
			case 2:
			    count += 1;
			    break;
			default:
			    count += 1;
			    break;
			};
		  }
		in++;
		out = buf;
		*out = '\0';
		continue;
	    }
	  *out++ = *in++;
      }
    *out = '\0';
/* parsing the last item */
    if (*buf != '\0')
      {
	  if (!gml_check_coord (buf))
	      return 0;
	  switch (count)
	    {
	    case 0:
		count += 1;
		break;
	    case 1:
		count += 1;
		break;
	    case 2:
		count += 1;
		break;
	    default:
		count += 1;
		break;
	    };
      }
    if (count == 2 || count == 3)
	return count;
    return -1;
}

static int
gml_check_point_v2 (gmlCoordPtr coord)
{
/* Dimensions for GML v2.x <gml:coordinates> [Point] */
    int count = 0;
    gmlCoordPtr c = coord;
    while (c)
      {
	  count = gml_check_coords (c->Value);
	  if (count == 2 || count == 3)
	      return count;
	  c = c->Next;
      }
    return -1;
}

static int
gml_check_point_v3 (gmlCoordPtr coord)
{
/* Dimensions for GML v2.x <gml:pos> [Point] */
    int count = 0;
    gmlCoordPtr c = coord;
    while (c)
      {
	  if (!gml_check_coord (c->Value))
	      return 0;
	  switch (count)
	    {
	    case 0:
		count++;
		break;
	    case 1:
		count++;
		break;
	    case 2:
		count++;
		break;
	    default:
		count++;
		break;
	    };
	  c = c->Next;
      }
    if (count == 2 || count == 3)
	return count;
    return -1;
}

static int
guessGmlDimensions (gmlNodePtr node)
{
    int dims = -1;
    gmlNodePtr n = node;
    while (n)
      {
	  /* looping on GML Members */
	  dims = gml_get_dimension (n);
	  if (dims == 2 || dims == 3)
	      return dims;

	  if (strcmp (n->Tag, "gml:coordinates") == 0
	      || strcmp (n->Tag, "coordinates") == 0)
	    {
		dims = gml_check_point_v2 (n->Coordinates);
		if (dims == 2 || dims == 3)
		    return dims;
	    }
	  if (strcmp (n->Tag, "gml:pos") == 0 || strcmp (n->Tag, "pos") == 0)
	    {
		dims = gml_check_point_v3 (n->Coordinates);
		if (dims == 2 || dims == 3)
		    return dims;
	    }
	  n = n->Next;
      }
    return 2;
}

static int
guessGmlGeometryType (gmlNodePtr node)
{
/* attempting to guess the Geometry Type for a GML node */
    int type = GAIA_GML_UNKNOWN;
................................................................................
    if (strcmp (node->Tag, "gml:MultiGeometry") == 0
	|| strcmp (node->Tag, "MultiGeometry") == 0)
	type = GAIA_GML_MULTIGEOMETRY;
    if (strcmp (node->Tag, "gml:Box") == 0 || strcmp (node->Tag, "Box") == 0)
	type = GAIA_GML_BOX;
    return type;
}



























static int
gml_extract_coords (const char *value, double *x, double *y, double *z,
		    int *count)
{
/* extracting GML v2.x coords from a comma-separated string */
    const char *in = value;
................................................................................
		break;
	    };
      }
    return 1;
}

static int
gml_parse_point_v2 (gmlCoordPtr coord, double *x, double *y, double *z)

{
/* parsing GML v2.x <gml:coordinates> [Point] */
    int count = 0;
    gmlCoordPtr c = coord;
    while (c)
      {
	  if (!gml_extract_coords (c->Value, x, y, z, &count))
	      return 0;
	  c = c->Next;
      }
    if (count == 2)
      {
	  *z = 0.0;
	  return 1;
      }
    if (count == 3)


	return 1;

    return 0;
}

static int
gml_parse_point_v3 (gmlCoordPtr coord, double *x, double *y, double *z)

{
/* parsing GML v2.x <gml:pos> [Point] */
    int count = 0;
    gmlCoordPtr c = coord;
    while (c)
      {
	  if (!gml_check_coord (c->Value))
................................................................................
		count++;
		break;
	    };
	  c = c->Next;
      }
    if (count == 2)
      {
	  *z = 0.0;
	  return 1;
      }
    if (count == 3)


	return 1;

    return 0;
}

static int
gml_parse_point (struct gml_data *p_data, gaiaGeomCollPtr geom, gmlNodePtr node,
		 gmlNodePtr * next)
{
/* parsing a <gml:Point> */
    int srid = geom->Srid;
    int has_z = 0;
    double x;
    double y;
    double z;

    gaiaGeomCollPtr pt;
    gaiaGeomCollPtr last;
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;

    if (strcmp (node->Tag, "gml:coordinates") == 0
	|| strcmp (node->Tag, "coordinates") == 0)
      {
	  /* parsing a GML v.2.x <gml:Point> */
	  if (!gml_parse_point_v2 (node->Coordinates, &x, &y, &z))
	      return 0;
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:coordinates") == 0
	      || strcmp (node->Tag, "coordinates") == 0)
	      ;
................................................................................
	      return 0;
	  *next = node->Next;
	  goto ok;
      }
    if (strcmp (node->Tag, "gml:pos") == 0 || strcmp (node->Tag, "pos") == 0)
      {
	  /* parsing a GML v.3.x <gml:Point> */
	  if (!gml_parse_point_v3 (node->Coordinates, &x, &y, &z))
	      return 0;
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:pos") == 0
	      || strcmp (node->Tag, "pos") == 0)
	      ;
................................................................................
	    {
		*has_z = 0;
		gml_add_point_to_line (dyn, x, y);
		count = 0;
	    }
	  else if (count == 3)
	    {
		*has_z = 1;
		gml_add_point_to_lineZ (dyn, x, y, z);
		count = 0;
	    }
	  else
	      return 0;
	  c = next;
      }
................................................................................
{
/* parsing GML v3.x <gml:posList> [Linestring or Ring] */
    int count = 0;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    gmlCoordPtr c = coord;
    if (has_z < 0)
	has_z = 0;
    while (c)
      {
	  if (!gml_check_coord (c->Value))
	      return 0;
	  if (!has_z)
	    {
		switch (count)
................................................................................
      }
    if (count != 0)
	return 0;
    return 1;
}

static int
gml_parse_pos_chain (gmlNodePtr * xnode, gaiaDynamicLinePtr dyn, int has_z)
{
/* parsing a chain of gml:pos elements */

    int error = 0;

    double x;
    double y;
    double z;
    int count = 0;
    gmlNodePtr last_node = *xnode;
    gmlNodePtr node = *xnode;
    while (node != NULL)
      {
	  if (strcmp (node->Tag, "gml:pos") == 0
	      || strcmp (node->Tag, "pos") == 0)
	      ;
	  else
	      break;
	  if (!gml_parse_point_v3 (node->Coordinates, &x, &y, &z))
	      return 0;
	  if (has_z)

	      gml_add_point_to_lineZ (dyn, x, y, z);


	  else
	      gml_add_point_to_line (dyn, x, y);
	  node = node->Next;
	  if (strcmp (node->Tag, "gml:pos") == 0
	      || strcmp (node->Tag, "pos") == 0)
	      last_node = node;
	  else
................................................................................
	    }
	  count++;
	  node = node->Next;
      }
    if (count >= 2 && error == 0)
      {
	  /* valid <gml:pos> sequence found */

	  *xnode = last_node;
	  return 1;
      }
    return 0;
}

static int
................................................................................
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_linestring (struct gml_data *p_data, gaiaGeomCollPtr geom,
		      gmlNodePtr node, gmlNodePtr * next)
{
/* parsing a <gml:LineString> */
    int srid = geom->Srid;
    int has_z = 0;
    gaiaGeomCollPtr ln;
    gaiaGeomCollPtr last;
    gaiaLinestringPtr new_ln;
    gaiaPointPtr pt;
    int iv;

    int points = 0;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    gmlMapDynAlloc (p_data, GML_DYN_DYNLINE, dyn);
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;

    if (strcmp (node->Tag, "gml:coordinates") == 0
	|| strcmp (node->Tag, "coordinates") == 0)
      {
	  /* parsing a GML v.2.x <gml:LineString> */
	  if (!gml_parse_coordinates (node->Coordinates, dyn, &has_z))
	      goto error;
................................................................................
	  *next = node->Next;
	  goto ok;
      }
    if (strcmp (node->Tag, "gml:posList") == 0
	|| strcmp (node->Tag, "posList") == 0)
      {
	  /* parsing a GML v.3.x <gml:LineString> */

	  if (!gml_parse_posList (node->Coordinates, dyn, has_z))
	      goto error;
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
................................................................................
	  *next = node->Next;
	  goto ok;
      }
    if (strcmp (node->Tag, "gml:pos") == 0 || strcmp (node->Tag, "pos") == 0)
      {
	  /* parsing a GML v.3.x <gml:LineString><gml:pos ...> */
	  gmlNodePtr node2 = node;
	  if (!gml_parse_pos_chain (&node2, dyn, has_z))
	      goto error;
	  node = node2->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LineString") == 0
	      || strcmp (node->Tag, "LineString") == 0)
	      ;
................................................................................
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_curve (struct gml_data *p_data, gaiaGeomCollPtr geom, gmlNodePtr node,
		 gmlNodePtr * next)
{
/* parsing a <gml:Curve> */
    int srid = geom->Srid;
    int has_z = 0;
    gaiaGeomCollPtr ln;
    gaiaGeomCollPtr last;
    gaiaLinestringPtr new_ln;
    gaiaPointPtr pt;
    int iv;

    int points = 0;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    gmlMapDynAlloc (p_data, GML_DYN_DYNLINE, dyn);
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;

    if (strcmp (node->Tag, "gml:segments") == 0
	|| strcmp (node->Tag, "segments") == 0)
      {
	  /* parsing a GML v.3.x <gml:Curve> */
	  node = node->Next;
	  if (node == NULL)
................................................................................
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:LineStringSegment><gml:posList ...> */

		if (!gml_parse_posList (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
................................................................................

	    }
	  else if (strcmp (node->Tag, "gml:pos") == 0
		   || strcmp (node->Tag, "pos") == 0)
	    {
		/* parsing a GML v.3.x <gml:LineStringSegment><gml:pos ...> */
		gmlNodePtr node2 = node;
		if (!gml_parse_pos_chain (&node2, dyn, has_z))
		    goto error;
		node = node2;
		if (node == NULL)
		    goto error;
	    }
	  else
	      goto error;
................................................................................

  error:
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_alt_ring (gmlNodePtr node,
		    int has_z, gmlNodePtr * next, gaiaDynamicLinePtr dyn)
{
/* alternative Ring syntax */
    if (strcmp (node->Tag, "gml:Ring") == 0 || strcmp (node->Tag, "Ring") == 0)
      {
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:curveMember") == 0
	      || strcmp (node->Tag, "curveMember") == 0)
	      ;
	  else
	      return 0;
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:Curve") == 0
	      || strcmp (node->Tag, "Curve") == 0)
	      ;
	  else
	      return 0;
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:segments") == 0
	      || strcmp (node->Tag, "segments") == 0)
	    {
		node = node->Next;
		if (node == NULL)
		    return 0;
		if (strcmp (node->Tag, "gml:LineStringSegment") == 0
		    || strcmp (node->Tag, "LineStringSegment") == 0)
		    ;
		else
		    return 0;
		node = node->Next;
		if (node == NULL)
		    return 0;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		  {
		      if (!gml_parse_posList (node->Coordinates, dyn, has_z))
			  return 0;
		      node = node->Next;
		      if (node == NULL)
			  return 0;
		      if (strcmp (node->Tag, "gml:posList") == 0
			  || strcmp (node->Tag, "posList") == 0)
			  ;
		      else
			  return 0;
		      node = node->Next;
		      if (node == NULL)
			  return 0;
		      if (strcmp (node->Tag, "gml:LineStringSegment") == 0
			  || strcmp (node->Tag, "LineStringSegment") == 0)
			  ;
		      else
			  return 0;
		      node = node->Next;
		      if (node == NULL)
			  return 0;
		      if (strcmp (node->Tag, "gml:segments") == 0
			  || strcmp (node->Tag, "segments") == 0)
			  ;
		      else
			  return 0;
		      node = node->Next;
		      if (node == NULL)
			  return 0;
		      if (strcmp (node->Tag, "gml:Curve") == 0
			  || strcmp (node->Tag, "Curve") == 0)
			  ;
		      else
			  return 0;
		      node = node->Next;
		      if (node == NULL)
			  return 0;
		      if (strcmp (node->Tag, "gml:curveMember") == 0
			  || strcmp (node->Tag, "curveMember") == 0)
			  ;
		      else
			  return 0;
		      node = node->Next;
		      if (node == NULL)
			  return 0;
		      if (strcmp (node->Tag, "gml:Ring") == 0
			  || strcmp (node->Tag, "Ring") == 0)
			  *next = node;
		      return 1;
		  }

	    }
      }
    return 0;
}

static gaiaDynamicLinePtr
gml_parse_ring (struct gml_data *p_data, gmlNodePtr node, int *interior,
		int has_z, gmlNodePtr * next)
{
/* parsing a generic GML ring */
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    gmlMapDynAlloc (p_data, GML_DYN_DYNLINE, dyn);


    if (strcmp (node->Tag, "gml:outerBoundaryIs") == 0
	|| strcmp (node->Tag, "outerBoundaryIs") == 0)
      {
	  /* parsing a GML v.2.x <gml:outerBoundaryIs> */
	  node = node->Next;
	  if (node == NULL)
................................................................................
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:coordinates") == 0
	      || strcmp (node->Tag, "coordinates") == 0)
	    {
		/* parsing a GML v.2.x <gml:coordinates> */
		if (!gml_parse_coordinates (node->Coordinates, dyn, &has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:coordinates") == 0
		    || strcmp (node->Tag, "coordinates") == 0)
		    ;
................................................................................
		else
		    goto error;
	    }
	  else if (strcmp (node->Tag, "gml:posList") == 0
		   || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:posList> */

		if (!gml_parse_posList (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:coordinates") == 0
	      || strcmp (node->Tag, "coordinates") == 0)
	    {
		/* parsing a GML v.2.x <gml:coordinates> */
		if (!gml_parse_coordinates (node->Coordinates, dyn, &has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:coordinates") == 0
		    || strcmp (node->Tag, "coordinates") == 0)
		    ;
................................................................................
		else
		    goto error;
	    }
	  else if (strcmp (node->Tag, "gml:posList") == 0
		   || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:posList> */

		if (!gml_parse_posList (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  /* parsing a GML v.3.x <gml:exterior> */
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;
	  else if (strcmp (node->Tag, "gml:Ring") == 0
		   || strcmp (node->Tag, "Ring") == 0)
	    {
		if (gml_parse_alt_ring (node, has_z, next, dyn))
		  {
		      *interior = 0;
		      node = *next;
		      goto ex_exterior;
		  }
		else
		    goto error;
	    }
	  else
	      goto error;
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:LinearRing><gml:posList ...> */

		if (!gml_parse_posList (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;
	  else
	      goto error;
	ex_exterior:
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:exterior") == 0
	      || strcmp (node->Tag, "exterior") == 0)
	      ;
	  else
................................................................................
	  /* parsing a GML v.3.x <gml:interior> */
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;
	  else if (strcmp (node->Tag, "gml:Ring") == 0
		   || strcmp (node->Tag, "Ring") == 0)
	    {
		if (gml_parse_alt_ring (node, has_z, next, dyn))
		  {
		      *interior = 1;
		      node = *next;
		      goto ex_interior;
		  }
		else
		    goto error;
	    }
	  else
	      goto error;
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:LinearRing><gml:posList ...> */

		if (!gml_parse_posList (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;
	  else
	      goto error;
	ex_interior:
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:interior") == 0
	      || strcmp (node->Tag, "interior") == 0)
	      ;
	  else
................................................................................
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_polygon (struct gml_data *p_data, gaiaGeomCollPtr geom,
		   gmlNodePtr node, gmlNodePtr * next_n)
{
/* parsing a <gml:Polygon> */
    int srid = geom->Srid;
    int has_z = 0;
    int interior;

    int inners;
    int outers;
    int points = 0;
    int iv;
    int ib = 0;
    gaiaGeomCollPtr pg;
    gaiaGeomCollPtr last_g;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr ring;
    gaiaDynamicLinePtr dyn;
    gaiaPointPtr pt;
    gaiaDynamicLinePtr exterior_ring = NULL;
    gmlNodePtr next;
    gmlDynamicRingPtr dyn_rng;
    gmlDynamicPolygonPtr dyn_pg = gml_alloc_dyn_polygon (p_data);
    gmlNodePtr n = node;
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;

    while (n)
      {
	  /* looping on rings */
	  if (strcmp (n->Tag, "gml:Polygon") == 0
	      || strcmp (n->Tag, "Polygon") == 0)
	    {
		*next_n = n->Next;
		break;
	    }
	  dyn = gml_parse_ring (p_data, n, &interior, has_z, &next);
	  if (dyn == NULL)
	      goto error;
	  if (gml_count_dyn_points (dyn) < 4)
	    {
		/* cannot be a valid ring */
		goto error;
	    }
................................................................................
	    }
	  gml_add_polygon_ring (p_data, dyn_pg, dyn, interior, has_z);
	  n = next;
      }
/* ok, GML nodes match as expected */
    inners = 0;
    outers = 0;

    dyn_rng = dyn_pg->first;
    while (dyn_rng)
      {
	  /* verifying the rings collection */


	  if (dyn_rng->interior)
	      inners++;
	  else
	    {
		outers++;
		points = gml_count_dyn_points (dyn_rng->ring);
		exterior_ring = dyn_rng->ring;
................................................................................
}

static int
gml_parse_multi_point (struct gml_data *p_data, gaiaGeomCollPtr geom,
		       gmlNodePtr node)
{
/* parsing a <gml:MultiPoint> */

    int pts;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Point Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiPoint") == 0
................................................................................
		    || strcmp (n2->Tag, "Point") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }

		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_point (p_data, geom, n2, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		pts++;
	    }
	  if (!pts)
................................................................................
}

static int
gml_parse_multi_linestring (struct gml_data *p_data, gaiaGeomCollPtr geom,
			    gmlNodePtr node)
{
/* parsing a <gml:MultiLineString> */

    int lns;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on LineString Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiLineString") == 0
................................................................................
		    || strcmp (n2->Tag, "LineString") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }

		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_linestring (p_data, geom, n2, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		lns++;
	    }
	  if (!lns)
................................................................................
}

static int
gml_parse_multi_curve (struct gml_data *p_data, gaiaGeomCollPtr geom,
		       gmlNodePtr node)
{
/* parsing a <gml:MultiCurve> */

    int lns;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Curve Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiCurve") == 0
................................................................................
	  else
	      return 0;
	  n2 = n->Next;
	  lns = 0;
	  while (n2)
	    {
		/* looping on Curve(s) */
		if (strcmp (n2->Tag, "gml:LineString") == 0
		    || strcmp (n2->Tag, "LineString") == 0)
		  {
		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_linestring (p_data, geom, n2, &next))
			  return 0;
		      n2 = next;
		      if (n2 == NULL)
			  return 0;
		      lns++;
		  }
		if (strcmp (n2->Tag, "gml:Curve") == 0
		    || strcmp (n2->Tag, "Curve") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }

		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_curve (p_data, geom, n2, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		lns++;
	    }
	  if (!lns)
................................................................................
}

static int
gml_parse_multi_polygon (struct gml_data *p_data, gaiaGeomCollPtr geom,
			 gmlNodePtr node)
{
/* parsing a <gml:MultiPolygon> */

    int pgs;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Polygon Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiPolygon") == 0
................................................................................
		    || strcmp (n2->Tag, "Polygon") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }

		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_polygon (p_data, geom, n2, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		pgs++;
	    }
	  if (!pgs)
................................................................................
}

static int
gml_parse_multi_surface (struct gml_data *p_data, gaiaGeomCollPtr geom,
			 gmlNodePtr node)
{
/* parsing a <gml:MultiSurface> */

    int pgs;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Surface Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiSurface") == 0
................................................................................
		    || strcmp (n2->Tag, "Polygon") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }

		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_polygon (p_data, geom, n2, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		pgs++;
	    }
	  if (!pgs)
................................................................................
}

static int
gml_parse_multi_geometry (struct gml_data *p_data, gaiaGeomCollPtr geom,
			  gmlNodePtr node)
{
/* parsing a <gml:MultiGeometry> */

    int elems;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Geometry Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiGeometry") == 0
................................................................................
	  elems = 0;
	  while (n2)
	    {
		/* looping on elements */
		if (strcmp (n2->Tag, "gml:Point") == 0
		    || strcmp (n2->Tag, "Point") == 0)
		  {

		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_point (p_data, geom, n2, &next))
			  return 0;
		      n2 = next;
		  }
		else if (strcmp (n2->Tag, "gml:LineString") == 0
			 || strcmp (n2->Tag, "LineString") == 0)
		  {

		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_linestring (p_data, geom, n2, &next))
			  return 0;
		      n2 = next;
		  }
		else if (strcmp (n2->Tag, "gml:Curve") == 0
			 || strcmp (n2->Tag, "Curve") == 0)
		  {

		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_curve (p_data, geom, n2, &next))
			  return 0;
		      n2 = next;
		  }
		else if (strcmp (n2->Tag, "gml:Polygon") == 0
			 || strcmp (n2->Tag, "Polygon") == 0)
		  {

		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_polygon (p_data, geom, n2, &next))
			  return 0;
		      n2 = next;
		  }
		else
		  {
		      n = n2;
		      break;
................................................................................
gml_build_geometry (const void *cache, struct gml_data *p_data, gmlNodePtr tree,
		    sqlite3 * sqlite_handle)
{
/* attempting to build a geometry from GML nodes */
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr result;
    int geom_type;
    int dims = 2;
    gmlNodePtr next;

    if (tree == NULL)
	return NULL;
    geom_type = guessGmlGeometryType (tree);
    if (geom_type == GAIA_GML_UNKNOWN)
      {
	  /* unsupported main geometry type */
	  return NULL;
      }

/* creating the main geometry */
    dims = guessGmlDimensions (tree);
    if (dims == 2)
	geom = gaiaAllocGeomColl ();
    else
	geom = gaiaAllocGeomCollXYZ ();
    geom->Srid = guessGmlSrid (tree);

    switch (geom_type)
      {
	  /* parsing GML nodes accordingly with declared GML type */
      case GAIA_GML_POINT:
	  geom->DeclaredType = GAIA_POINT;
	  if (!gml_parse_point (p_data, geom, tree->Next, &next))
	      goto error;
	  break;
      case GAIA_GML_LINESTRING:
	  geom->DeclaredType = GAIA_LINESTRING;
	  if (!gml_parse_linestring (p_data, geom, tree->Next, &next))

	      goto error;
	  break;
      case GAIA_GML_CURVE:
	  geom->DeclaredType = GAIA_LINESTRING;
	  if (!gml_parse_curve (p_data, geom, tree->Next, &next))
	      goto error;
	  break;
      case GAIA_GML_POLYGON:
	  geom->DeclaredType = GAIA_POLYGON;
	  if (!gml_parse_polygon (p_data, geom, tree->Next, &next))
	      goto error;
	  if (next != NULL)
	      goto error;
	  break;
      case GAIA_GML_MULTIPOINT:
	  geom->DeclaredType = GAIA_MULTIPOINT;
	  if (!gml_parse_multi_point (p_data, geom, tree->Next))
................................................................................
	    {
		str_data.gml_parse_error = 1;
		break;
	    }
	  tokens->Next = malloc (sizeof (gmlFlexToken));
	  tokens->Next->Next = NULL;
	  gml_xferString (&(tokens->Next->value), str_data.GmlLval.pval);
	  /* Pass the token to the GML parser created from lemon */
	  Parse (pParser, yv, &(tokens->Next->value), &str_data);
	  tokens = tokens->Next;
      }
    /* This denotes the end of a line as well as the end of the parser */
    Parse (pParser, GML_NEWLINE, 0, &str_data);
    ParseFree (pParser, free);
    Gmllex_destroy (scanner);




|







 







|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|






|

|

<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
>












|



>
>
|
>




|
>







 







|



>
>
|
>





|


<
<



>


<
<
<





|







 







|







 







<







 







<
<







 







|


>

>













|


>
|
>
>







 







>







 







|


<
<





>



<
<
<







 







>







 







|







 







|


<
<





>



<
<
<







 







>







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|




>







 







|







 







>
|







 







|







 







>
|







 







<
<
<
<
<
<
<
<
<
<
<
<









>
|







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<









>
|







 







<







 







|


<
<

>


|








|




<
<
<
<









|







 







>




>
>







 







>




<







 







>



|







 







>




<







 







>



|







 







>




<







 







<
<
<
<
<
<
<
<
<
<
<
<
<








>



|







 







>




<







 







>



|







 







>




<







 







>



|







 







>




<







 







>



|






>



|






>



|






>



|







 







<










<

<
<
|
<
<







|




|
>




|




|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
...
706
707
708
709
710
711
712

















713
714
715
716
717
718
719
720
721
722
723
724
725







726
727




















728





































































































































































729
730
731
732
733
734
735
...
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
...
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
...
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944


945
946
947
948
949
950



951
952
953
954
955
956
957
958
959
960
961
962
963
...
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
....
1165
1166
1167
1168
1169
1170
1171

1172
1173
1174
1175
1176
1177
1178
....
1184
1185
1186
1187
1188
1189
1190


1191
1192
1193
1194
1195
1196
1197
....
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
....
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
....
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402


1403
1404
1405
1406
1407
1408
1409
1410
1411



1412
1413
1414
1415
1416
1417
1418
....
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
....
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
....
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540


1541
1542
1543
1544
1545
1546
1547
1548
1549



1550
1551
1552
1553
1554
1555
1556
....
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
....
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
....
1672
1673
1674
1675
1676
1677
1678



































































































1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
....
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
....
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
....
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
....
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
....
1849
1850
1851
1852
1853
1854
1855












1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
....
1891
1892
1893
1894
1895
1896
1897

1898
1899
1900
1901
1902
1903
1904
....
1913
1914
1915
1916
1917
1918
1919












1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
....
1955
1956
1957
1958
1959
1960
1961

1962
1963
1964
1965
1966
1967
1968
....
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985


1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003




2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
....
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
....
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170

2171
2172
2173
2174
2175
2176
2177
....
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
....
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237

2238
2239
2240
2241
2242
2243
2244
....
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
....
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304

2305
2306
2307
2308
2309
2310
2311
....
2322
2323
2324
2325
2326
2327
2328













2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
....
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371

2372
2373
2374
2375
2376
2377
2378
....
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
....
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438

2439
2440
2441
2442
2443
2444
2445
....
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
....
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505

2506
2507
2508
2509
2510
2511
2512
....
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
....
3367
3368
3369
3370
3371
3372
3373

3374
3375
3376
3377
3378
3379
3380
3381
3382
3383

3384


3385


3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
....
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
/*

 gg_gml.c -- GML parser/lexer 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2013
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
      }
    len = strlen (str);
    *p = malloc (len + 1);
    strcpy (*p, str);
}

static int
guessGmlSrid (gmlNodePtr node)
{
/* attempting to guess the SRID */
    int len;
    gmlAttrPtr attr = node->Attributes;
    while (attr)
      {
	  if (strcmp (attr->Key, "srsName") == 0)
................................................................................
	    }
	  attr = attr->Next;
      }
    return -1;
}

static int

















gml_get_srsDimension (gmlNodePtr node)
{
/* attempting to establis if there is a Z coordinate */
    gmlAttrPtr attr = node->Attributes;
    while (attr)
      {
	  if (strcmp (attr->Key, "srsDimension") == 0)
	    {
		if (atoi (attr->Value) == 3)
		    return 1;
		else
		    return 0;
	    }







	  attr = attr->Next;
      }




















    return 0;





































































































































































}

static int
guessGmlGeometryType (gmlNodePtr node)
{
/* attempting to guess the Geometry Type for a GML node */
    int type = GAIA_GML_UNKNOWN;
................................................................................
    if (strcmp (node->Tag, "gml:MultiGeometry") == 0
	|| strcmp (node->Tag, "MultiGeometry") == 0)
	type = GAIA_GML_MULTIGEOMETRY;
    if (strcmp (node->Tag, "gml:Box") == 0 || strcmp (node->Tag, "Box") == 0)
	type = GAIA_GML_BOX;
    return type;
}

static int
gml_check_coord (const char *value)
{
/* checking a GML coordinate */
    int decimal = 0;
    const char *p = value;
    if (*p == '+' || *p == '-')
	p++;
    while (*p != '\0')
      {
	  if (*p == '.')
	    {
		if (!decimal)
		    decimal = 1;
		else
		    return 0;
	    }
	  else if (*p >= '0' && *p <= '9')
	      ;
	  else
	      return 0;
	  p++;
      }
    return 1;
}

static int
gml_extract_coords (const char *value, double *x, double *y, double *z,
		    int *count)
{
/* extracting GML v2.x coords from a comma-separated string */
    const char *in = value;
................................................................................
		break;
	    };
      }
    return 1;
}

static int
gml_parse_point_v2 (gmlCoordPtr coord, double *x, double *y, double *z,
		    int *has_z)
{
/* parsing GML v2.x <gml:coordinates> [Point] */
    int count = 0;
    gmlCoordPtr c = coord;
    while (c)
      {
	  if (!gml_extract_coords (c->Value, x, y, z, &count))
	      return 0;
	  c = c->Next;
      }
    if (count == 2)
      {
	  *has_z = 0;
	  return 1;
      }
    if (count == 3)
      {
	  *has_z = 1;
	  return 1;
      }
    return 0;
}

static int
gml_parse_point_v3 (gmlCoordPtr coord, double *x, double *y, double *z,
		    int *has_z)
{
/* parsing GML v2.x <gml:pos> [Point] */
    int count = 0;
    gmlCoordPtr c = coord;
    while (c)
      {
	  if (!gml_check_coord (c->Value))
................................................................................
		count++;
		break;
	    };
	  c = c->Next;
      }
    if (count == 2)
      {
	  *has_z = 0;
	  return 1;
      }
    if (count == 3)
      {
	  *has_z = 1;
	  return 1;
      }
    return 0;
}

static int
gml_parse_point (struct gml_data *p_data, gaiaGeomCollPtr geom, gmlNodePtr node,
		 int srid, gmlNodePtr * next)
{
/* parsing a <gml:Point> */


    double x;
    double y;
    double z;
    int has_z;
    gaiaGeomCollPtr pt;
    gaiaGeomCollPtr last;




    if (strcmp (node->Tag, "gml:coordinates") == 0
	|| strcmp (node->Tag, "coordinates") == 0)
      {
	  /* parsing a GML v.2.x <gml:Point> */
	  if (!gml_parse_point_v2 (node->Coordinates, &x, &y, &z, &has_z))
	      return 0;
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:coordinates") == 0
	      || strcmp (node->Tag, "coordinates") == 0)
	      ;
................................................................................
	      return 0;
	  *next = node->Next;
	  goto ok;
      }
    if (strcmp (node->Tag, "gml:pos") == 0 || strcmp (node->Tag, "pos") == 0)
      {
	  /* parsing a GML v.3.x <gml:Point> */
	  if (!gml_parse_point_v3 (node->Coordinates, &x, &y, &z, &has_z))
	      return 0;
	  node = node->Next;
	  if (node == NULL)
	      return 0;
	  if (strcmp (node->Tag, "gml:pos") == 0
	      || strcmp (node->Tag, "pos") == 0)
	      ;
................................................................................
	    {
		*has_z = 0;
		gml_add_point_to_line (dyn, x, y);
		count = 0;
	    }
	  else if (count == 3)
	    {

		gml_add_point_to_lineZ (dyn, x, y, z);
		count = 0;
	    }
	  else
	      return 0;
	  c = next;
      }
................................................................................
{
/* parsing GML v3.x <gml:posList> [Linestring or Ring] */
    int count = 0;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    gmlCoordPtr c = coord;


    while (c)
      {
	  if (!gml_check_coord (c->Value))
	      return 0;
	  if (!has_z)
	    {
		switch (count)
................................................................................
      }
    if (count != 0)
	return 0;
    return 1;
}

static int
gml_parse_pos_chain (gmlNodePtr * xnode, gaiaDynamicLinePtr dyn, int *x_has_z)
{
/* parsing a chain of gml:pos elements */
    int has_z;
    int error = 0;
    int dim_3d = 0;
    double x;
    double y;
    double z;
    int count = 0;
    gmlNodePtr last_node = *xnode;
    gmlNodePtr node = *xnode;
    while (node != NULL)
      {
	  if (strcmp (node->Tag, "gml:pos") == 0
	      || strcmp (node->Tag, "pos") == 0)
	      ;
	  else
	      break;
	  if (!gml_parse_point_v3 (node->Coordinates, &x, &y, &z, &has_z))
	      return 0;
	  if (has_z)
	    {
		gml_add_point_to_lineZ (dyn, x, y, z);
		dim_3d = 1;
	    }
	  else
	      gml_add_point_to_line (dyn, x, y);
	  node = node->Next;
	  if (strcmp (node->Tag, "gml:pos") == 0
	      || strcmp (node->Tag, "pos") == 0)
	      last_node = node;
	  else
................................................................................
	    }
	  count++;
	  node = node->Next;
      }
    if (count >= 2 && error == 0)
      {
	  /* valid <gml:pos> sequence found */
	  *x_has_z = dim_3d;
	  *xnode = last_node;
	  return 1;
      }
    return 0;
}

static int
................................................................................
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_linestring (struct gml_data *p_data, gaiaGeomCollPtr geom,
		      gmlNodePtr node, int srid, gmlNodePtr * next)
{
/* parsing a <gml:LineString> */


    gaiaGeomCollPtr ln;
    gaiaGeomCollPtr last;
    gaiaLinestringPtr new_ln;
    gaiaPointPtr pt;
    int iv;
    int has_z = 1;
    int points = 0;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    gmlMapDynAlloc (p_data, GML_DYN_DYNLINE, dyn);




    if (strcmp (node->Tag, "gml:coordinates") == 0
	|| strcmp (node->Tag, "coordinates") == 0)
      {
	  /* parsing a GML v.2.x <gml:LineString> */
	  if (!gml_parse_coordinates (node->Coordinates, dyn, &has_z))
	      goto error;
................................................................................
	  *next = node->Next;
	  goto ok;
      }
    if (strcmp (node->Tag, "gml:posList") == 0
	|| strcmp (node->Tag, "posList") == 0)
      {
	  /* parsing a GML v.3.x <gml:LineString> */
	  has_z = gml_get_srsDimension (node);
	  if (!gml_parse_posList (node->Coordinates, dyn, has_z))
	      goto error;
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
................................................................................
	  *next = node->Next;
	  goto ok;
      }
    if (strcmp (node->Tag, "gml:pos") == 0 || strcmp (node->Tag, "pos") == 0)
      {
	  /* parsing a GML v.3.x <gml:LineString><gml:pos ...> */
	  gmlNodePtr node2 = node;
	  if (!gml_parse_pos_chain (&node2, dyn, &has_z))
	      goto error;
	  node = node2->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LineString") == 0
	      || strcmp (node->Tag, "LineString") == 0)
	      ;
................................................................................
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_curve (struct gml_data *p_data, gaiaGeomCollPtr geom, gmlNodePtr node,
		 int srid, gmlNodePtr * next)
{
/* parsing a <gml:Curve> */


    gaiaGeomCollPtr ln;
    gaiaGeomCollPtr last;
    gaiaLinestringPtr new_ln;
    gaiaPointPtr pt;
    int iv;
    int has_z = 1;
    int points = 0;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    gmlMapDynAlloc (p_data, GML_DYN_DYNLINE, dyn);




    if (strcmp (node->Tag, "gml:segments") == 0
	|| strcmp (node->Tag, "segments") == 0)
      {
	  /* parsing a GML v.3.x <gml:Curve> */
	  node = node->Next;
	  if (node == NULL)
................................................................................
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:LineStringSegment><gml:posList ...> */
		has_z = gml_get_srsDimension (node);
		if (!gml_parse_posList (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
................................................................................

	    }
	  else if (strcmp (node->Tag, "gml:pos") == 0
		   || strcmp (node->Tag, "pos") == 0)
	    {
		/* parsing a GML v.3.x <gml:LineStringSegment><gml:pos ...> */
		gmlNodePtr node2 = node;
		if (!gml_parse_pos_chain (&node2, dyn, &has_z))
		    goto error;
		node = node2;
		if (node == NULL)
		    goto error;
	    }
	  else
	      goto error;
................................................................................

  error:
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}




































































































static gaiaDynamicLinePtr
gml_parse_ring (struct gml_data *p_data, gmlNodePtr node, int *interior,
		int *has_z, gmlNodePtr * next)
{
/* parsing a generic GML ring */
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    gmlMapDynAlloc (p_data, GML_DYN_DYNLINE, dyn);
    *has_z = 1;

    if (strcmp (node->Tag, "gml:outerBoundaryIs") == 0
	|| strcmp (node->Tag, "outerBoundaryIs") == 0)
      {
	  /* parsing a GML v.2.x <gml:outerBoundaryIs> */
	  node = node->Next;
	  if (node == NULL)
................................................................................
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:coordinates") == 0
	      || strcmp (node->Tag, "coordinates") == 0)
	    {
		/* parsing a GML v.2.x <gml:coordinates> */
		if (!gml_parse_coordinates (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:coordinates") == 0
		    || strcmp (node->Tag, "coordinates") == 0)
		    ;
................................................................................
		else
		    goto error;
	    }
	  else if (strcmp (node->Tag, "gml:posList") == 0
		   || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:posList> */
		*has_z = gml_get_srsDimension (node);
		if (!gml_parse_posList (node->Coordinates, dyn, *has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:coordinates") == 0
	      || strcmp (node->Tag, "coordinates") == 0)
	    {
		/* parsing a GML v.2.x <gml:coordinates> */
		if (!gml_parse_coordinates (node->Coordinates, dyn, has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:coordinates") == 0
		    || strcmp (node->Tag, "coordinates") == 0)
		    ;
................................................................................
		else
		    goto error;
	    }
	  else if (strcmp (node->Tag, "gml:posList") == 0
		   || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:posList> */
		*has_z = gml_get_srsDimension (node);
		if (!gml_parse_posList (node->Coordinates, dyn, *has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  /* parsing a GML v.3.x <gml:exterior> */
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;












	  else
	      goto error;
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:LinearRing><gml:posList ...> */
		*has_z = gml_get_srsDimension (node);
		if (!gml_parse_posList (node->Coordinates, dyn, *has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;
	  else
	      goto error;

	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:exterior") == 0
	      || strcmp (node->Tag, "exterior") == 0)
	      ;
	  else
................................................................................
	  /* parsing a GML v.3.x <gml:interior> */
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;












	  else
	      goto error;
	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:posList") == 0
	      || strcmp (node->Tag, "posList") == 0)
	    {
		/* parsing a GML v.3.x <gml:LinearRing><gml:posList ...> */
		*has_z = gml_get_srsDimension (node);
		if (!gml_parse_posList (node->Coordinates, dyn, *has_z))
		    goto error;
		node = node->Next;
		if (node == NULL)
		    goto error;
		if (strcmp (node->Tag, "gml:posList") == 0
		    || strcmp (node->Tag, "posList") == 0)
		    ;
................................................................................
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:LinearRing") == 0
	      || strcmp (node->Tag, "LinearRing") == 0)
	      ;
	  else
	      goto error;

	  node = node->Next;
	  if (node == NULL)
	      goto error;
	  if (strcmp (node->Tag, "gml:interior") == 0
	      || strcmp (node->Tag, "interior") == 0)
	      ;
	  else
................................................................................
    gmlMapDynClean (p_data, dyn);
    gaiaFreeDynamicLine (dyn);
    return 0;
}

static int
gml_parse_polygon (struct gml_data *p_data, gaiaGeomCollPtr geom,
		   gmlNodePtr node, int srid, gmlNodePtr * next_n)
{
/* parsing a <gml:Polygon> */


    int interior;
    int has_z;
    int inners;
    int outers;
    int points;
    int iv;
    int ib = 0;
    gaiaGeomCollPtr pg;
    gaiaGeomCollPtr last_g;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr ring;
    gaiaDynamicLinePtr dyn;
    gaiaPointPtr pt;
    gaiaDynamicLinePtr exterior_ring;
    gmlNodePtr next;
    gmlDynamicRingPtr dyn_rng;
    gmlDynamicPolygonPtr dyn_pg = gml_alloc_dyn_polygon (p_data);
    gmlNodePtr n = node;




    while (n)
      {
	  /* looping on rings */
	  if (strcmp (n->Tag, "gml:Polygon") == 0
	      || strcmp (n->Tag, "Polygon") == 0)
	    {
		*next_n = n->Next;
		break;
	    }
	  dyn = gml_parse_ring (p_data, n, &interior, &has_z, &next);
	  if (dyn == NULL)
	      goto error;
	  if (gml_count_dyn_points (dyn) < 4)
	    {
		/* cannot be a valid ring */
		goto error;
	    }
................................................................................
	    }
	  gml_add_polygon_ring (p_data, dyn_pg, dyn, interior, has_z);
	  n = next;
      }
/* ok, GML nodes match as expected */
    inners = 0;
    outers = 0;
    has_z = 1;
    dyn_rng = dyn_pg->first;
    while (dyn_rng)
      {
	  /* verifying the rings collection */
	  if (dyn_rng->has_z == 0)
	      has_z = 0;
	  if (dyn_rng->interior)
	      inners++;
	  else
	    {
		outers++;
		points = gml_count_dyn_points (dyn_rng->ring);
		exterior_ring = dyn_rng->ring;
................................................................................
}

static int
gml_parse_multi_point (struct gml_data *p_data, gaiaGeomCollPtr geom,
		       gmlNodePtr node)
{
/* parsing a <gml:MultiPoint> */
    int srid;
    int pts;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Point Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiPoint") == 0
................................................................................
		    || strcmp (n2->Tag, "Point") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }
		srid = guessGmlSrid (n2);
		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_point (p_data, geom, n2, srid, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		pts++;
	    }
	  if (!pts)
................................................................................
}

static int
gml_parse_multi_linestring (struct gml_data *p_data, gaiaGeomCollPtr geom,
			    gmlNodePtr node)
{
/* parsing a <gml:MultiLineString> */
    int srid;
    int lns;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on LineString Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiLineString") == 0
................................................................................
		    || strcmp (n2->Tag, "LineString") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }
		srid = guessGmlSrid (n2);
		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_linestring (p_data, geom, n2, srid, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		lns++;
	    }
	  if (!lns)
................................................................................
}

static int
gml_parse_multi_curve (struct gml_data *p_data, gaiaGeomCollPtr geom,
		       gmlNodePtr node)
{
/* parsing a <gml:MultiCurve> */
    int srid;
    int lns;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Curve Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiCurve") == 0
................................................................................
	  else
	      return 0;
	  n2 = n->Next;
	  lns = 0;
	  while (n2)
	    {
		/* looping on Curve(s) */













		if (strcmp (n2->Tag, "gml:Curve") == 0
		    || strcmp (n2->Tag, "Curve") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }
		srid = guessGmlSrid (n2);
		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_curve (p_data, geom, n2, srid, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		lns++;
	    }
	  if (!lns)
................................................................................
}

static int
gml_parse_multi_polygon (struct gml_data *p_data, gaiaGeomCollPtr geom,
			 gmlNodePtr node)
{
/* parsing a <gml:MultiPolygon> */
    int srid;
    int pgs;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Polygon Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiPolygon") == 0
................................................................................
		    || strcmp (n2->Tag, "Polygon") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }
		srid = guessGmlSrid (n2);
		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_polygon (p_data, geom, n2, srid, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		pgs++;
	    }
	  if (!pgs)
................................................................................
}

static int
gml_parse_multi_surface (struct gml_data *p_data, gaiaGeomCollPtr geom,
			 gmlNodePtr node)
{
/* parsing a <gml:MultiSurface> */
    int srid;
    int pgs;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Surface Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiSurface") == 0
................................................................................
		    || strcmp (n2->Tag, "Polygon") == 0)
		    ;
		else
		  {
		      n = n2;
		      break;
		  }
		srid = guessGmlSrid (n2);
		n2 = n2->Next;
		if (n2 == NULL)
		    return 0;
		if (!gml_parse_polygon (p_data, geom, n2, srid, &next))
		    return 0;
		n2 = next;
		if (n2 == NULL)
		    return 0;
		pgs++;
	    }
	  if (!pgs)
................................................................................
}

static int
gml_parse_multi_geometry (struct gml_data *p_data, gaiaGeomCollPtr geom,
			  gmlNodePtr node)
{
/* parsing a <gml:MultiGeometry> */
    int srid;
    int elems;
    gmlNodePtr n2;
    gmlNodePtr next;
    gmlNodePtr n = node;

    while (n)
      {
	  /* looping on Geometry Members */
	  if (n->Next == NULL)
	    {
		/* verifying the last GML node */
		if (strcmp (n->Tag, "gml:MultiGeometry") == 0
................................................................................
	  elems = 0;
	  while (n2)
	    {
		/* looping on elements */
		if (strcmp (n2->Tag, "gml:Point") == 0
		    || strcmp (n2->Tag, "Point") == 0)
		  {
		      srid = guessGmlSrid (n2);
		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_point (p_data, geom, n2, srid, &next))
			  return 0;
		      n2 = next;
		  }
		else if (strcmp (n2->Tag, "gml:LineString") == 0
			 || strcmp (n2->Tag, "LineString") == 0)
		  {
		      srid = guessGmlSrid (n2);
		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_linestring (p_data, geom, n2, srid, &next))
			  return 0;
		      n2 = next;
		  }
		else if (strcmp (n2->Tag, "gml:Curve") == 0
			 || strcmp (n2->Tag, "Curve") == 0)
		  {
		      srid = guessGmlSrid (n2);
		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_curve (p_data, geom, n2, srid, &next))
			  return 0;
		      n2 = next;
		  }
		else if (strcmp (n2->Tag, "gml:Polygon") == 0
			 || strcmp (n2->Tag, "Polygon") == 0)
		  {
		      srid = guessGmlSrid (n2);
		      n2 = n2->Next;
		      if (n2 == NULL)
			  return 0;
		      if (!gml_parse_polygon (p_data, geom, n2, srid, &next))
			  return 0;
		      n2 = next;
		  }
		else
		  {
		      n = n2;
		      break;
................................................................................
gml_build_geometry (const void *cache, struct gml_data *p_data, gmlNodePtr tree,
		    sqlite3 * sqlite_handle)
{
/* attempting to build a geometry from GML nodes */
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr result;
    int geom_type;

    gmlNodePtr next;

    if (tree == NULL)
	return NULL;
    geom_type = guessGmlGeometryType (tree);
    if (geom_type == GAIA_GML_UNKNOWN)
      {
	  /* unsupported main geometry type */
	  return NULL;
      }

/* creating the main geometry */


    geom = gaiaAllocGeomColl ();


    geom->Srid = guessGmlSrid (tree);

    switch (geom_type)
      {
	  /* parsing GML nodes accordingly with declared GML type */
      case GAIA_GML_POINT:
	  geom->DeclaredType = GAIA_POINT;
	  if (!gml_parse_point (p_data, geom, tree->Next, geom->Srid, &next))
	      goto error;
	  break;
      case GAIA_GML_LINESTRING:
	  geom->DeclaredType = GAIA_LINESTRING;
	  if (!gml_parse_linestring
	      (p_data, geom, tree->Next, geom->Srid, &next))
	      goto error;
	  break;
      case GAIA_GML_CURVE:
	  geom->DeclaredType = GAIA_LINESTRING;
	  if (!gml_parse_curve (p_data, geom, tree->Next, geom->Srid, &next))
	      goto error;
	  break;
      case GAIA_GML_POLYGON:
	  geom->DeclaredType = GAIA_POLYGON;
	  if (!gml_parse_polygon (p_data, geom, tree->Next, geom->Srid, &next))
	      goto error;
	  if (next != NULL)
	      goto error;
	  break;
      case GAIA_GML_MULTIPOINT:
	  geom->DeclaredType = GAIA_MULTIPOINT;
	  if (!gml_parse_multi_point (p_data, geom, tree->Next))
................................................................................
	    {
		str_data.gml_parse_error = 1;
		break;
	    }
	  tokens->Next = malloc (sizeof (gmlFlexToken));
	  tokens->Next->Next = NULL;
	  gml_xferString (&(tokens->Next->value), str_data.GmlLval.pval);
	  /* Pass the token to the wkt parser created from lemon */
	  Parse (pParser, yv, &(tokens->Next->value), &str_data);
	  tokens = tokens->Next;
      }
    /* This denotes the end of a line as well as the end of the parser */
    Parse (pParser, GML_NEWLINE, 0, &str_data);
    ParseFree (pParser, free);
    Gmllex_destroy (scanner);

Changes to src/gaiageo/gg_kml.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
...
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
....
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
....
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
/*

 gg_kml.c -- KML parser/lexer 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2015
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
}

static int
kml_check_coord (const char *value)
{
/* checking a KML coordinate */
    int decimal = 0;
    int exp = 0;
    int expsign = 0;
    const char *p = value;
    if (*p == '+' || *p == '-')
	p++;
    while (*p != '\0')
      {
	  if (*p == '.')
	    {
................................................................................
		if (!decimal)
		    decimal = 1;
		else
		    return 0;
	    }
	  else if (*p >= '0' && *p <= '9')
	      ;
	  else if (*p == 'e' || *p == 'E')
	      exp++;
	  else if (*p == '+' || *p == '-')
	    {
		if (!exp)
		    return 0;
		expsign++;
	    }
	  else
	      return 0;
	  p++;
      }
    if (exp > 1 || expsign > 1)
	return 0;
    return 1;
}

static int
kml_extract_coords (const char *value, double *x, double *y, double *z,
		    int *count)
{
................................................................................
		   kmlNodePtr node, kmlNodePtr * next_n)
{
/* parsing a <Polygon> */
    int interior;
    int has_z;
    int inners;
    int outers;
    int points = 0;
    int iv;
    int ib = 0;
    gaiaGeomCollPtr pg;
    gaiaGeomCollPtr last_g;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr ring;
    gaiaDynamicLinePtr dyn;
    gaiaPointPtr pt;
    gaiaDynamicLinePtr exterior_ring = NULL;
    kmlNodePtr next;
    kmlDynamicRingPtr dyn_rng;
    kmlDynamicPolygonPtr dyn_pg = kml_alloc_dyn_polygon (p_data);
    kmlNodePtr n = node;
    while (n)
      {
	  /* looping on rings */
................................................................................
    int xy = 0;
    int xyz = 0;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg = NULL;
    gaiaPointPtr save_pt = NULL;
    gaiaLinestringPtr save_ln = NULL;
    gaiaPolygonPtr save_pg = NULL;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    int ib;
    gaiaGeomCollPtr g;




|







 







|







 







<
<







 







<
<
<
<
<
<
<
<




<
<







 







|








|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
666
667
668
669
670
671
672


673
674
675
676
677
678
679
...
680
681
682
683
684
685
686








687
688
689
690


691
692
693
694
695
696
697
....
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
....
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
/*

 gg_kml.c -- KML parser/lexer 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011-2013
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
}

static int
kml_check_coord (const char *value)
{
/* checking a KML coordinate */
    int decimal = 0;


    const char *p = value;
    if (*p == '+' || *p == '-')
	p++;
    while (*p != '\0')
      {
	  if (*p == '.')
	    {
................................................................................
		if (!decimal)
		    decimal = 1;
		else
		    return 0;
	    }
	  else if (*p >= '0' && *p <= '9')
	      ;








	  else
	      return 0;
	  p++;
      }


    return 1;
}

static int
kml_extract_coords (const char *value, double *x, double *y, double *z,
		    int *count)
{
................................................................................
		   kmlNodePtr node, kmlNodePtr * next_n)
{
/* parsing a <Polygon> */
    int interior;
    int has_z;
    int inners;
    int outers;
    int points;
    int iv;
    int ib = 0;
    gaiaGeomCollPtr pg;
    gaiaGeomCollPtr last_g;
    gaiaPolygonPtr new_pg;
    gaiaRingPtr ring;
    gaiaDynamicLinePtr dyn;
    gaiaPointPtr pt;
    gaiaDynamicLinePtr exterior_ring;
    kmlNodePtr next;
    kmlDynamicRingPtr dyn_rng;
    kmlDynamicPolygonPtr dyn_pg = kml_alloc_dyn_polygon (p_data);
    kmlNodePtr n = node;
    while (n)
      {
	  /* looping on rings */
................................................................................
    int xy = 0;
    int xyz = 0;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaPointPtr save_pt = NULL;
    gaiaLinestringPtr save_ln = NULL;
    gaiaPolygonPtr save_pg = NULL;
    gaiaRingPtr i_ring;
    gaiaRingPtr o_ring;
    int ib;
    gaiaGeomCollPtr g;

Added src/gaiageo/gg_lwgeom.c.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
/*

 gg_lwgeom.c -- Gaia LWGEOM support
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module (wrapping liblwgeom APIs) has been entierely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale

*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>
#include <spatialite.h>
#include <spatialite/debug.h>

#include <spatialite/gaiageo.h>

#ifdef ENABLE_LWGEOM		/* enabling LWGEOM support */

#include <liblwgeom.h>

/* GLOBAL variables */
char *gaia_lwgeom_error_msg = NULL;
char *gaia_lwgeom_warning_msg = NULL;

const char splitelwgeomversion[] = LIBLWGEOM_VERSION;

SPATIALITE_PRIVATE const char *
splite_lwgeom_version (void)
{
    return splitelwgeomversion;
}

static void
lwgaia_noticereporter (const char *fmt, va_list ap)
{
    char *msg;
    if (!lw_vasprintf (&msg, fmt, ap))
      {
	  va_end (ap);
	  return;
      }
    spatialite_e ("LWGEOM notice: %s\n", msg);
    gaiaSetLwGeomWarningMsg (msg);
    free (msg);
}

static void
lwgaia_errorreporter (const char *fmt, va_list ap)
{
    char *msg;
    if (!lw_vasprintf (&msg, fmt, ap))
      {
	  va_end (ap);
	  return;
      }
    spatialite_e ("LWGEOM error: %s\n", msg);
    gaiaSetLwGeomErrorMsg (msg);
    free (msg);
}

#ifndef POSTGIS_2_1
/* liblwgeom initializion function: required by PostGIS 2.0.x */
void
lwgeom_init_allocators (void)
{
/* Set up liblwgeom to run in stand-alone mode using the
* usual system memory handling functions. */
    lwalloc_var = default_allocator;
    lwrealloc_var = default_reallocator;
    lwfree_var = default_freeor;
    lwnotice_var = lwgaia_noticereporter;
    lwerror_var = lwgaia_errorreporter;
}
#else
/* liblwgeom initialization function: required by PostGIS 2.1.x */
SPATIALITE_PRIVATE void
splite_lwgeom_init (void)
{
    lwgeom_set_handlers (NULL, NULL, NULL, lwgaia_errorreporter,
			 lwgaia_noticereporter);
}
#endif

GAIAGEO_DECLARE void
gaiaResetLwGeomMsg ()
{
/* resets the LWGEOM error and warning messages */
    if (gaia_lwgeom_error_msg != NULL)
	free (gaia_lwgeom_error_msg);
    if (gaia_lwgeom_warning_msg != NULL)
	free (gaia_lwgeom_warning_msg);
    gaia_lwgeom_error_msg = NULL;
    gaia_lwgeom_warning_msg = NULL;
}

GAIAGEO_DECLARE const char *
gaiaGetLwGeomErrorMsg ()
{
/* setting the latest LWGEOM error message */
    return gaia_lwgeom_error_msg;
}

GAIAGEO_DECLARE const char *
gaiaGetLwGeomWarningMsg ()
{
/* return the latest LWGEOM error message */
    return gaia_lwgeom_warning_msg;
}

GAIAGEO_DECLARE void
gaiaSetLwGeomErrorMsg (const char *msg)
{
/* setting the latest LWGEOM error message */
    int len;
    if (gaia_lwgeom_error_msg != NULL)
	free (gaia_lwgeom_error_msg);
    gaia_lwgeom_error_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    gaia_lwgeom_error_msg = malloc (len + 1);
    strcpy (gaia_lwgeom_error_msg, msg);
}

GAIAGEO_DECLARE void
gaiaSetLwGeomWarningMsg (const char *msg)
{
/* return the latest LWGEOM error message */
    int len;
    if (gaia_lwgeom_warning_msg != NULL)
	free (gaia_lwgeom_warning_msg);
    gaia_lwgeom_warning_msg = NULL;
    if (msg == NULL)
	return;
    len = strlen (msg);
    gaia_lwgeom_warning_msg = malloc (len + 1);
    strcpy (gaia_lwgeom_warning_msg, msg);
}

static int
check_unclosed_ring (gaiaRingPtr rng)
{
/* checks if a Ring is closed or not */
    double x0;
    double y0;
    double z0 = 0.0;
    double m0 = 0.0;
    double x1;
    double y1;
    double z1 = 0.0;
    double m1 = 0.0;
    int last = rng->Points - 1;
    if (rng->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (rng->Coords, 0, &x0, &y0, &z0);
      }
    else if (rng->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (rng->Coords, 0, &x0, &y0, &m0);
      }
    else if (rng->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (rng->Coords, 0, &x0, &y0, &z0, &m0);
      }
    else
      {
	  gaiaGetPoint (rng->Coords, 0, &x0, &y0);
      }
    if (rng->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (rng->Coords, last, &x1, &y1, &z1);
      }
    else if (rng->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (rng->Coords, last, &x1, &y1, &m1);
      }
    else if (rng->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (rng->Coords, last, &x1, &y1, &z1, &m1);
      }
    else
      {
	  gaiaGetPoint (rng->Coords, last, &x1, &y1);
      }
    if (x0 == x1 && y0 == y1 && z0 == z1 && m0 == m1)
	return 0;
    return 1;
}

static LWGEOM *
toLWGeom (const gaiaGeomCollPtr gaia)
{
/* converting a GAIA Geometry into a LWGEOM Geometry */
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    int has_z;
    int has_m;
    int ngeoms;
    int numg;
    int ib;
    int iv;
    int type;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    int close_ring;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    POINTARRAY *pa;
    POINTARRAY **ppaa;
    POINT4D point;
    LWGEOM **geoms;

    if (!gaia)
	return NULL;
    pt = gaia->FirstPoint;
    while (pt)
      {
	  /* counting how many POINTs are there */
	  pts++;
	  pt = pt->Next;
      }
    ln = gaia->FirstLinestring;
    while (ln)
      {
	  /* counting how many LINESTRINGs are there */
	  lns++;
	  ln = ln->Next;
      }
    pg = gaia->FirstPolygon;
    while (pg)
      {
	  /* counting how many POLYGONs are there */
	  pgs++;
	  pg = pg->Next;
      }
    if (pts == 0 && lns == 0 && pgs == 0)
	return NULL;

    if (pts == 1 && lns == 0 && pgs == 0)
      {
	  /* single Point */
	  pt = gaia->FirstPoint;
	  has_z = 0;
	  has_m = 0;
	  if (gaia->DimensionModel == GAIA_XY_Z
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_z = 1;
	  if (gaia->DimensionModel == GAIA_XY_M
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_m = 1;
	  pa = ptarray_construct (has_z, has_m, 1);
	  point.x = pt->X;
	  point.y = pt->Y;
	  if (has_z)
	      point.z = pt->Z;
	  if (has_m)
	      point.m = pt->M;
	  ptarray_set_point4d (pa, 0, &point);
	  return (LWGEOM *) lwpoint_construct (gaia->Srid, NULL, pa);
      }
    else if (pts == 0 && lns == 1 && pgs == 0)
      {
	  /* single Linestring */
	  ln = gaia->FirstLinestring;
	  has_z = 0;
	  has_m = 0;
	  if (gaia->DimensionModel == GAIA_XY_Z
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_z = 1;
	  if (gaia->DimensionModel == GAIA_XY_M
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_m = 1;
	  pa = ptarray_construct (has_z, has_m, ln->Points);
	  for (iv = 0; iv < ln->Points; iv++)
	    {
		/* copying vertices */
		if (gaia->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
		  }
		else if (gaia->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
		  }
		else if (gaia->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (ln->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (pa, iv, &point);
	    }
	  return (LWGEOM *) lwline_construct (gaia->Srid, NULL, pa);
      }
    else if (pts == 0 && lns == 0 && pgs == 1)
      {
	  /* single Polygon */
	  pg = gaia->FirstPolygon;
	  has_z = 0;
	  has_m = 0;
	  if (gaia->DimensionModel == GAIA_XY_Z
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_z = 1;
	  if (gaia->DimensionModel == GAIA_XY_M
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_m = 1;
	  ngeoms = pg->NumInteriors;
	  ppaa = lwalloc (sizeof (POINTARRAY *) * (ngeoms + 1));
	  rng = pg->Exterior;
	  close_ring = check_unclosed_ring (rng);
	  if (close_ring)
	      ppaa[0] = ptarray_construct (has_z, has_m, rng->Points + 1);
	  else
	      ppaa[0] = ptarray_construct (has_z, has_m, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* copying vertices - Exterior Ring */
		if (gaia->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (gaia->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else if (gaia->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ppaa[0], iv, &point);
	    }
	  if (close_ring)
	    {
		/* making an unclosed ring to be closed */
		if (gaia->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
		  }
		else if (gaia->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
		  }
		else if (gaia->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, 0, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ppaa[0], rng->Points, &point);
	    }
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* copying vertices - Interior Rings */
		rng = pg->Interiors + ib;
		close_ring = check_unclosed_ring (rng);
		if (close_ring)
		    ppaa[1 + ib] =
			ptarray_construct (has_z, has_m, rng->Points + 1);
		else
		    ppaa[1 + ib] =
			ptarray_construct (has_z, has_m, rng->Points);
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ppaa[1 + ib], iv, &point);
		  }
		if (close_ring)
		  {
		      /* making an unclosed ring to be closed */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, 0, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ppaa[1 + ib], rng->Points, &point);
		  }
	    }
	  return (LWGEOM *) lwpoly_construct (gaia->Srid, NULL, ngeoms + 1,
					      ppaa);
      }
    else
      {
	  /* some Collection */
	  switch (gaia->DeclaredType)
	    {
	    case GAIA_POINT:
		type = POINTTYPE;
		break;
	    case GAIA_LINESTRING:
		type = LINETYPE;
		break;
	    case GAIA_POLYGON:
		type = POLYGONTYPE;
		break;
	    case GAIA_MULTIPOINT:
		type = MULTIPOINTTYPE;
		break;
	    case GAIA_MULTILINESTRING:
		type = MULTILINETYPE;
		break;
	    case GAIA_MULTIPOLYGON:
		type = MULTIPOLYGONTYPE;
		break;
	    case GAIA_GEOMETRYCOLLECTION:
		type = COLLECTIONTYPE;
		break;
	    default:
		if (lns == 0 && pgs == 0)
		    type = MULTIPOINTTYPE;
		else if (pts == 0 && pgs == 0)
		    type = MULTILINETYPE;
		else if (pts == 0 && lns == 0)
		    type = MULTIPOLYGONTYPE;
		else
		    type = COLLECTIONTYPE;
		break;
	    };
	  numg = pts + lns + pgs;
	  geoms = lwalloc (sizeof (LWGEOM *) * numg);

	  numg = 0;
	  pt = gaia->FirstPoint;
	  while (pt)
	    {
		/* copying POINTs */
		has_z = 0;
		has_m = 0;
		if (gaia->DimensionModel == GAIA_XY_Z
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_z = 1;
		if (gaia->DimensionModel == GAIA_XY_M
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_m = 1;
		pa = ptarray_construct (has_z, has_m, 1);
		point.x = pt->X;
		point.y = pt->Y;
		if (has_z)
		    point.z = pt->Z;
		if (has_m)
		    point.m = pt->M;
		ptarray_set_point4d (pa, 0, &point);
		geoms[numg++] =
		    (LWGEOM *) lwpoint_construct (gaia->Srid, NULL, pa);
		pt = pt->Next;
	    }
	  ln = gaia->FirstLinestring;
	  while (ln)
	    {
		/* copying LINESTRINGs */
		has_z = 0;
		has_m = 0;
		if (gaia->DimensionModel == GAIA_XY_Z
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_z = 1;
		if (gaia->DimensionModel == GAIA_XY_M
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_m = 1;
		pa = ptarray_construct (has_z, has_m, ln->Points);
		for (iv = 0; iv < ln->Points; iv++)
		  {
		      /* copying vertices */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (ln->Coords, iv, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (pa, iv, &point);
		  }
		geoms[numg++] =
		    (LWGEOM *) lwline_construct (gaia->Srid, NULL, pa);
		ln = ln->Next;
	    }
	  pg = gaia->FirstPolygon;
	  while (pg)
	    {
		/* copying POLYGONs */
		has_z = 0;
		has_m = 0;
		if (gaia->DimensionModel == GAIA_XY_Z
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_z = 1;
		if (gaia->DimensionModel == GAIA_XY_M
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_m = 1;
		ngeoms = pg->NumInteriors;
		ppaa = lwalloc (sizeof (POINTARRAY *) * (ngeoms + 1));
		rng = pg->Exterior;
		close_ring = check_unclosed_ring (rng);
		if (close_ring)
		    ppaa[0] = ptarray_construct (has_z, has_m, rng->Points + 1);
		else
		    ppaa[0] = ptarray_construct (has_z, has_m, rng->Points);
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      /* copying vertices - Exterior Ring */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ppaa[0], iv, &point);
		  }
		if (close_ring)
		  {
		      /* making an unclosed ring to be closed */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, 0, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ppaa[0], rng->Points, &point);
		  }
		for (ib = 0; ib < pg->NumInteriors; ib++)
		  {
		      /* copying vertices - Interior Rings */
		      rng = pg->Interiors + ib;
		      close_ring = check_unclosed_ring (rng);
		      if (close_ring)
			  ppaa[1 + ib] =
			      ptarray_construct (has_z, has_m, rng->Points + 1);
		      else
			  ppaa[1 + ib] =
			      ptarray_construct (has_z, has_m, rng->Points);
		      for (iv = 0; iv < rng->Points; iv++)
			{
			    if (gaia->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (rng->Coords, iv, &x, &y,
						    &z, &m);
			      }
			    else
			      {
				  gaiaGetPoint (rng->Coords, iv, &x, &y);
			      }
			    point.x = x;
			    point.y = y;
			    if (has_z)
				point.z = z;
			    if (has_m)
				point.m = m;
			    ptarray_set_point4d (ppaa[1 + ib], iv, &point);
			}
		      if (close_ring)
			{
			    /* making an unclosed ring to be closed */
			    if (gaia->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z,
						    &m);
			      }
			    else
			      {
				  gaiaGetPoint (rng->Coords, 0, &x, &y);
			      }
			    point.x = x;
			    point.y = y;
			    if (has_z)
				point.z = z;
			    if (has_m)
				point.m = m;
			    ptarray_set_point4d (ppaa[1 + ib], rng->Points,
						 &point);
			}
		  }
		geoms[numg++] =
		    (LWGEOM *) lwpoly_construct (gaia->Srid, NULL, ngeoms + 1,
						 ppaa);
		pg = pg->Next;
	    }
	  return (LWGEOM *) lwcollection_construct (type, gaia->Srid, NULL,
						    numg, geoms);
      }
    return NULL;
}

static gaiaGeomCollPtr
fromLWGeomIncremental (gaiaGeomCollPtr gaia, const LWGEOM * lwgeom)
{
/* converting a LWGEOM Geometry into a GAIA Geometry */
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    int dimension_model = gaia->DimensionModel;
    int declared_type = gaia->DeclaredType;
    LWGEOM *lwg2 = NULL;
    LWPOINT *lwp = NULL;
    LWLINE *lwl = NULL;
    LWPOLY *lwpoly = NULL;
    LWCOLLECTION *lwc = NULL;
    POINTARRAY *pa;
    POINT4D pt4d;
    int has_z;
    int has_m;
    int iv;
    int ib;
    int ngeoms;
    int ng;
    double x;
    double y;
    double z;
    double m;

    if (lwgeom == NULL)
	return NULL;
    if (lwgeom_is_empty (lwgeom))
	return NULL;

    switch (lwgeom->type)
      {
      case POINTTYPE:
	  lwp = (LWPOINT *) lwgeom;
	  has_z = 0;
	  has_m = 0;
	  pa = lwp->point;
	  if (FLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  if (FLAGS_GET_M (pa->flags))
	      has_m = 1;
	  getPoint4d_p (pa, 0, &pt4d);
	  x = pt4d.x;
	  y = pt4d.y;
	  if (has_z)
	      z = pt4d.z;
	  else
	      z = 0.0;
	  if (has_m)
	      m = pt4d.m;
	  else
	      m = 0.0;
	  if (dimension_model == GAIA_XY_Z)
	      gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
	  else if (dimension_model == GAIA_XY_M)
	      gaiaAddPointToGeomCollXYM (gaia, x, y, m);
	  else if (dimension_model == GAIA_XY_Z_M)
	      gaiaAddPointToGeomCollXYZM (gaia, x, y, z, m);
	  else
	      gaiaAddPointToGeomColl (gaia, x, y);
	  if (declared_type == GAIA_MULTIPOINT)
	      gaia->DeclaredType = GAIA_MULTIPOINT;
	  else if (declared_type == GAIA_GEOMETRYCOLLECTION)
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
	  else
	      gaia->DeclaredType = GAIA_POINT;
	  break;
      case LINETYPE:
	  lwl = (LWLINE *) lwgeom;
	  has_z = 0;
	  has_m = 0;
	  pa = lwl->points;
	  if (FLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  if (FLAGS_GET_M (pa->flags))
	      has_m = 1;
	  ln = gaiaAddLinestringToGeomColl (gaia, pa->npoints);
	  for (iv = 0; iv < pa->npoints; iv++)
	    {
		/* copying LINESTRING vertices */
		getPoint4d_p (pa, iv, &pt4d);
		x = pt4d.x;
		y = pt4d.y;
		if (has_z)
		    z = pt4d.z;
		else
		    z = 0.0;
		if (has_m)
		    m = pt4d.m;
		else
		    m = 0.0;
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
		  }
		else if (dimension_model == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (ln->Coords, iv, x, y, m);
		  }
		else if (dimension_model == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (ln->Coords, iv, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (ln->Coords, iv, x, y);
		  }
	    }
	  if (declared_type == GAIA_MULTILINESTRING)
	      gaia->DeclaredType = GAIA_MULTILINESTRING;
	  else if (declared_type == GAIA_GEOMETRYCOLLECTION)
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
	  else
	      gaia->DeclaredType = GAIA_LINESTRING;
	  break;
      case POLYGONTYPE:
	  lwpoly = (LWPOLY *) lwgeom;
	  has_z = 0;
	  has_m = 0;
	  pa = lwpoly->rings[0];
	  if (FLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  if (FLAGS_GET_M (pa->flags))
	      has_m = 1;
	  pg = gaiaAddPolygonToGeomColl (gaia, pa->npoints, lwpoly->nrings - 1);
	  rng = pg->Exterior;
	  for (iv = 0; iv < pa->npoints; iv++)
	    {
		/* copying Exterion Ring vertices */
		getPoint4d_p (pa, iv, &pt4d);
		x = pt4d.x;
		y = pt4d.y;
		if (has_z)
		    z = pt4d.z;
		else
		    z = 0.0;
		if (has_m)
		    m = pt4d.m;
		else
		    m = 0.0;
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
		else if (dimension_model == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (rng->Coords, iv, x, y, m);
		  }
		else if (dimension_model == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (rng->Coords, iv, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (rng->Coords, iv, x, y);
		  }
	    }
	  for (ib = 1; ib < lwpoly->nrings; ib++)
	    {
		has_z = 0;
		has_m = 0;
		pa = lwpoly->rings[ib];
		if (FLAGS_GET_Z (pa->flags))
		    has_z = 1;
		if (FLAGS_GET_M (pa->flags))
		    has_m = 1;
		rng = gaiaAddInteriorRing (pg, ib - 1, pa->npoints);
		for (iv = 0; iv < pa->npoints; iv++)
		  {
		      /* copying Exterion Ring vertices */
		      getPoint4d_p (pa, iv, &pt4d);
		      x = pt4d.x;
		      y = pt4d.y;
		      if (has_z)
			  z = pt4d.z;
		      else
			  z = 0.0;
		      if (has_m)
			  m = pt4d.m;
		      else
			  m = 0.0;
		      if (dimension_model == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			}
		      else if (dimension_model == GAIA_XY_M)
			{
			    gaiaSetPointXYM (rng->Coords, iv, x, y, m);
			}
		      else if (dimension_model == GAIA_XY_Z_M)
			{
			    gaiaSetPointXYZM (rng->Coords, iv, x, y, z, m);
			}
		      else
			{
			    gaiaSetPoint (rng->Coords, iv, x, y);
			}
		  }
	    }
	  if (declared_type == GAIA_MULTIPOLYGON)
	      gaia->DeclaredType = GAIA_MULTIPOLYGON;
	  else if (declared_type == GAIA_GEOMETRYCOLLECTION)
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
	  else
	      gaia->DeclaredType = GAIA_POLYGON;
	  break;
      case MULTIPOINTTYPE:
      case MULTILINETYPE:
      case MULTIPOLYGONTYPE:
      case COLLECTIONTYPE:
	  if (lwgeom->type == MULTIPOINTTYPE)
	    {
		if (declared_type == GAIA_GEOMETRYCOLLECTION)
		    gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
		else
		    gaia->DeclaredType = GAIA_MULTIPOINT;
	    }
	  else if (lwgeom->type == MULTILINETYPE)
	    {
		if (declared_type == GAIA_GEOMETRYCOLLECTION)
		    gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
		else
		    gaia->DeclaredType = GAIA_MULTILINESTRING;
	    }
	  else if (lwgeom->type == MULTIPOLYGONTYPE)
	    {
		if (declared_type == GAIA_GEOMETRYCOLLECTION)
		    gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
		else
		    gaia->DeclaredType = GAIA_MULTIPOLYGON;
	    }
	  else
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;

	  lwc = (LWCOLLECTION *) lwgeom;
	  ngeoms = lwc->ngeoms;
	  if (ngeoms == 0)
	    {
		gaiaFreeGeomColl (gaia);
		gaia = NULL;
		break;
	    }
	  for (ng = 0; ng < ngeoms; ++ng)
	    {
		/* looping on elementary geometries */
		lwg2 = lwc->geoms[ng];
		switch (lwg2->type)
		  {
		  case POINTTYPE:
		      lwp = (LWPOINT *) lwg2;
		      has_z = 0;
		      has_m = 0;
		      pa = lwp->point;
		      if (FLAGS_GET_Z (pa->flags))
			  has_z = 1;
		      if (FLAGS_GET_M (pa->flags))
			  has_m = 1;
		      getPoint4d_p (pa, 0, &pt4d);
		      x = pt4d.x;
		      y = pt4d.y;
		      if (has_z)
			  z = pt4d.z;
		      else
			  z = 0.0;
		      if (has_m)
			  m = pt4d.m;
		      else
			  m = 0.0;
		      if (dimension_model == GAIA_XY_Z)
			  gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
		      else if (dimension_model == GAIA_XY_M)
			  gaiaAddPointToGeomCollXYM (gaia, x, y, m);
		      else if (dimension_model == GAIA_XY_Z_M)
			  gaiaAddPointToGeomCollXYZM (gaia, x, y, z, m);
		      else
			  gaiaAddPointToGeomColl (gaia, x, y);
		      break;
		  case LINETYPE:
		      lwl = (LWLINE *) lwg2;
		      has_z = 0;
		      has_m = 0;
		      pa = lwl->points;
		      if (FLAGS_GET_Z (pa->flags))
			  has_z = 1;
		      if (FLAGS_GET_M (pa->flags))
			  has_m = 1;
		      ln = gaiaAddLinestringToGeomColl (gaia, pa->npoints);
		      for (iv = 0; iv < pa->npoints; iv++)
			{
			    /* copying LINESTRING vertices */
			    getPoint4d_p (pa, iv, &pt4d);
			    x = pt4d.x;
			    y = pt4d.y;
			    if (has_z)
				z = pt4d.z;
			    else
				z = 0.0;
			    if (has_m)
				m = pt4d.m;
			    else
				m = 0.0;
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
			      }
			    else if (dimension_model == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (ln->Coords, iv, x, y, m);
			      }
			    else if (dimension_model == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (ln->Coords, iv, x, y, z, m);
			      }
			    else
			      {
				  gaiaSetPoint (ln->Coords, iv, x, y);
			      }
			}
		      break;
		  case POLYGONTYPE:
		      lwpoly = (LWPOLY *) lwg2;
		      has_z = 0;
		      has_m = 0;
		      pa = lwpoly->rings[0];
		      if (FLAGS_GET_Z (pa->flags))
			  has_z = 1;
		      if (FLAGS_GET_M (pa->flags))
			  has_m = 1;
		      pg = gaiaAddPolygonToGeomColl (gaia, pa->npoints,
						     lwpoly->nrings - 1);
		      rng = pg->Exterior;
		      for (iv = 0; iv < pa->npoints; iv++)
			{
			    /* copying Exterion Ring vertices */
			    getPoint4d_p (pa, iv, &pt4d);
			    x = pt4d.x;
			    y = pt4d.y;
			    if (has_z)
				z = pt4d.z;
			    else
				z = 0.0;
			    if (has_m)
				m = pt4d.m;
			    else
				m = 0.0;
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			      }
			    else if (dimension_model == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (rng->Coords, iv, x, y, m);
			      }
			    else if (dimension_model == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (rng->Coords, iv, x, y, z,
						    m);
			      }
			    else
			      {
				  gaiaSetPoint (rng->Coords, iv, x, y);
			      }
			}
		      for (ib = 1; ib < lwpoly->nrings; ib++)
			{
			    has_z = 0;
			    has_m = 0;
			    pa = lwpoly->rings[ib];
			    if (FLAGS_GET_Z (pa->flags))
				has_z = 1;
			    if (FLAGS_GET_M (pa->flags))
				has_m = 1;
			    rng = gaiaAddInteriorRing (pg, ib - 1, pa->npoints);
			    for (iv = 0; iv < pa->npoints; iv++)
			      {
				  /* copying Exterion Ring vertices */
				  getPoint4d_p (pa, iv, &pt4d);
				  x = pt4d.x;
				  y = pt4d.y;
				  if (has_z)
				      z = pt4d.z;
				  else
				      z = 0.0;
				  if (has_m)
				      m = pt4d.m;
				  else
				      m = 0.0;
				  if (dimension_model == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (rng->Coords, iv, x,
							 y, z);
				    }
				  else if (dimension_model == GAIA_XY_M)
				    {
					gaiaSetPointXYM (rng->Coords, iv, x,
							 y, m);
				    }
				  else if (dimension_model == GAIA_XY_Z_M)
				    {
					gaiaSetPointXYZM (rng->Coords, iv, x,
							  y, z, m);
				    }
				  else
				    {
					gaiaSetPoint (rng->Coords, iv, x, y);
				    }
			      }
			}
		      break;
		  };
	    }
	  break;
      default:
	  gaiaFreeGeomColl (gaia);
	  gaia = NULL;
	  break;
      };

    return gaia;
}

static gaiaGeomCollPtr
fromLWGeom (const LWGEOM * lwgeom, const int dimension_model,
	    const int declared_type)
{
/* converting a LWGEOM Geometry into a GAIA Geometry */
    gaiaGeomCollPtr gaia = NULL;

    if (lwgeom == NULL)
	return NULL;
    if (lwgeom_is_empty (lwgeom))
	return NULL;

    if (dimension_model == GAIA_XY_Z)
	gaia = gaiaAllocGeomCollXYZ ();
    else if (dimension_model == GAIA_XY_M)
	gaia = gaiaAllocGeomCollXYM ();
    else if (dimension_model == GAIA_XY_Z_M)
	gaia = gaiaAllocGeomCollXYZM ();
    else
	gaia = gaiaAllocGeomColl ();
    gaia->DeclaredType = declared_type;
    fromLWGeomIncremental (gaia, lwgeom);

    return gaia;
}

static int
check_valid_type (const LWGEOM * lwgeom, int declared_type)
{
/* checking if the geometry type is a valid one */
    int ret = 0;
    switch (lwgeom->type)
      {
      case POINTTYPE:
      case MULTIPOINTTYPE:
	  if (declared_type == GAIA_POINT || declared_type == GAIA_POINTZ
	      || declared_type == GAIA_POINTM || declared_type == GAIA_POINTZM)
	      ret = 1;
	  if (declared_type == GAIA_MULTIPOINT
	      || declared_type == GAIA_MULTIPOINTZ
	      || declared_type == GAIA_MULTIPOINTM
	      || declared_type == GAIA_MULTIPOINTZM)
	      ret = 1;
	  break;
      case LINETYPE:
      case MULTILINETYPE:
	  if (declared_type == GAIA_LINESTRING
	      || declared_type == GAIA_LINESTRINGZ
	      || declared_type == GAIA_LINESTRINGM
	      || declared_type == GAIA_LINESTRINGZM)
	      ret = 1;
	  if (declared_type == GAIA_MULTILINESTRING
	      || declared_type == GAIA_MULTILINESTRINGZ
	      || declared_type == GAIA_MULTILINESTRINGM
	      || declared_type == GAIA_MULTILINESTRINGZM)
	      ret = 1;
	  break;
      case POLYGONTYPE:
      case MULTIPOLYGONTYPE:
	  if (declared_type == GAIA_POLYGON || declared_type == GAIA_POLYGONZ
	      || declared_type == GAIA_POLYGONM
	      || declared_type == GAIA_POLYGONZM)
	      ret = 1;
	  if (declared_type == GAIA_MULTIPOLYGON
	      || declared_type == GAIA_MULTIPOLYGONZ
	      || declared_type == GAIA_MULTIPOLYGONM
	      || declared_type == GAIA_MULTIPOLYGONZM)
	      ret = 1;
	  break;
      case COLLECTIONTYPE:
	  if (declared_type == GAIA_GEOMETRYCOLLECTION
	      || declared_type == GAIA_GEOMETRYCOLLECTIONZ
	      || declared_type == GAIA_GEOMETRYCOLLECTIONM
	      || declared_type == GAIA_GEOMETRYCOLLECTIONZM)
	      ret = 1;
	  break;
      };
    return ret;
}

static gaiaGeomCollPtr
fromLWGeomValidated (const LWGEOM * lwgeom, const int dimension_model,
		     const int declared_type)
{
/* 
/ converting a LWGEOM Geometry into a GAIA Geometry 
/ first collection - validated items
*/
    gaiaGeomCollPtr gaia = NULL;
    LWGEOM *lwg2 = NULL;
    LWCOLLECTION *lwc = NULL;
    int ngeoms;

    if (lwgeom == NULL)
	return NULL;
    if (lwgeom_is_empty (lwgeom))
	return NULL;

    switch (lwgeom->type)
      {
      case COLLECTIONTYPE:
	  lwc = (LWCOLLECTION *) lwgeom;
	  ngeoms = lwc->ngeoms;
	  if (ngeoms <= 2)
	    {
		lwg2 = lwc->geoms[0];
		if (check_valid_type (lwg2, declared_type))
		    gaia = fromLWGeom (lwg2, dimension_model, declared_type);
	    }
	  break;
      default:
	  if (check_valid_type (lwgeom, declared_type))
	      gaia = fromLWGeom (lwgeom, dimension_model, declared_type);
	  if (gaia == NULL)
	    {
		/* Andrea Peri: 2013-05-02 returning anyway the LWGEOM geometry,
		   / even if it has a mismatching type */
		int type = -1;
		switch (lwgeom->type)
		  {
		  case POINTTYPE:
		      type = GAIA_POINT;
		      break;
		  case LINETYPE:
		      type = GAIA_LINESTRING;
		      break;
		  case POLYGONTYPE:
		      type = GAIA_POLYGON;
		      break;
		  case MULTIPOINTTYPE:
		      type = GAIA_MULTIPOINT;
		      break;
		  case MULTILINETYPE:
		      type = GAIA_MULTILINESTRING;
		      break;
		  case MULTIPOLYGONTYPE:
		      type = GAIA_MULTIPOLYGON;
		      break;
		  };
		if (type >= 0)
		    gaia = fromLWGeom (lwgeom, dimension_model, type);
	    }
	  break;
      }
    return gaia;
}

static gaiaGeomCollPtr
fromLWGeomDiscarded (const LWGEOM * lwgeom, const int dimension_model,
		     const int declared_type)
{
/* 
/ converting a LWGEOM Geometry into a GAIA Geometry 
/ second collection - discarded items
*/
    gaiaGeomCollPtr gaia = NULL;
    LWGEOM *lwg2 = NULL;
    LWCOLLECTION *lwc = NULL;
    int ngeoms;
    int ig;

    if (lwgeom == NULL)
	return NULL;
    if (lwgeom_is_empty (lwgeom))
	return NULL;

    if (lwgeom->type == COLLECTIONTYPE)
      {
	  if (dimension_model == GAIA_XY_Z)
	      gaia = gaiaAllocGeomCollXYZ ();
	  else if (dimension_model == GAIA_XY_M)
	      gaia = gaiaAllocGeomCollXYM ();
	  else if (dimension_model == GAIA_XY_Z_M)
	      gaia = gaiaAllocGeomCollXYZM ();
	  else
	      gaia = gaiaAllocGeomColl ();
	  lwc = (LWCOLLECTION *) lwgeom;
	  ngeoms = lwc->ngeoms;
	  for (ig = 0; ig < ngeoms; ig++)
	    {
		lwg2 = lwc->geoms[ig];
		if (!check_valid_type (lwg2, declared_type))
		    fromLWGeomIncremental (gaia, lwg2);
	    }
      }
/*
Andrea Peri: 2013-05-02
when a single geometry is returned by LWGEOM it's always "valid"
and there are no discarded items at all

    else if (!check_valid_type (lwgeom, declared_type))
	gaia = fromLWGeom (lwgeom, dimension_model, declared_type);
*/
    return gaia;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaMakeValid (gaiaGeomCollPtr geom)
{
/* wrapping LWGEOM MakeValid [collecting valid items] */
    LWGEOM *g1;
    LWGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom);
    g2 = lwgeom_make_valid (g1);
    if (!g2)
      {
	  lwgeom_free (g1);
	  goto done;
      }
    result = fromLWGeomValidated (g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    lwgeom_free (g1);
    lwgeom_free (g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaMakeValidDiscarded (gaiaGeomCollPtr geom)
{
/* wrapping LWGEOM MakeValid [collecting discarder items] */
    LWGEOM *g1;
    LWGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom);
    g2 = lwgeom_make_valid (g1);
    if (!g2)
      {
	  lwgeom_free (g1);
	  goto done;
      }
    result = fromLWGeomDiscarded (g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    lwgeom_free (g1);
    lwgeom_free (g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSegmentize (gaiaGeomCollPtr geom, double dist)
{
/* wrapping LWGEOM Segmentize */
    LWGEOM *g1;
    LWGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;
    if (dist <= 0.0)
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom);
    g2 = lwgeom_segmentize2d (g1, dist);
    if (!g2)
      {
	  lwgeom_free (g1);
	  goto done;
      }
    result = fromLWGeom (g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    lwgeom_free (g1);
    lwgeom_free (g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

static int
check_split_args (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
{
/* testing Split arguments */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int i_lns = 0;
    int i_pgs = 0;
    int b_pts = 0;
    int b_lns = 0;

    if (!input)
	return 0;
    if (!blade)
	return 0;

/* testing the Input type */
    if (input->FirstPoint != NULL)
      {
	  /* Point(s) on Input is forbidden !!!! */
	  return 0;
      }
    ln = input->FirstLinestring;
    while (ln)
      {
	  /* counting how many Linestrings are there */
	  i_lns++;
	  ln = ln->Next;
      }
    pg = input->FirstPolygon;
    while (pg)
      {
	  /* counting how many Polygons are there */
	  i_pgs++;
	  pg = pg->Next;
      }
    if (i_lns + i_pgs == 0)
      {
	  /* empty Input */
	  return 0;
      }

/* testing the Blade type */
    pt = blade->FirstPoint;
    while (pt)
      {
	  /* counting how many Points are there */
	  b_pts++;
	  pt = pt->Next;
      }
    if (b_pts > 1)
      {
	  /* MultiPoint on Blade is forbidden !!!! */
	  return 0;
      }
    ln = blade->FirstLinestring;
    while (ln)
      {
	  /* counting how many Linestrings are there */
	  b_lns++;
	  ln = ln->Next;
      }
    if (b_lns > 1)
      {
	  /* MultiLinestring on Blade is forbidden !!!! */
	  return 0;
      }
    if (blade->FirstPolygon != NULL)
      {
	  /* Polygon(s) on Blade is forbidden !!!! */
	  return 0;
      }
    if (b_pts + b_lns == 0)
      {
	  /* empty Blade */
	  return 0;
      }
    if (b_pts + b_lns > 1)
      {
	  /* invalid Blade [point + linestring] */
	  return 0;
      }

/* compatibility check */
    if (b_lns == 1)
      {
	  /* Linestring blade is always valid */
	  return 1;
      }
    if (i_lns >= 1 && b_pts == 1)
      {
	  /* Linestring or MultiLinestring input and Point blade is allowed */
	  return 1;
      }

    return 0;
}

static void
set_split_gtype (gaiaGeomCollPtr geom)
{
/* assignign the actual geometry type */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
    int lns = 0;
    int pgs = 0;

    pt = geom->FirstPoint;
    while (pt)
      {
	  /* counting how many Points are there */
	  pts++;
	  pt = pt->Next;
      }
    ln = geom->FirstLinestring;
    while (ln)
      {
	  /* counting how many Linestrings are there */
	  lns++;
	  ln = ln->Next;
      }
    pg = geom->FirstPolygon;
    while (pg)
      {
	  /* counting how many Polygons are there */
	  pgs++;
	  pg = pg->Next;
      }

    if (pts == 1 && lns == 0 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_POINT;
	  return;
      }
    if (pts > 1 && lns == 0 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_MULTIPOINT;
	  return;
      }
    if (pts == 0 && lns == 1 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_LINESTRING;
	  return;
      }
    if (pts == 0 && lns > 1 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_MULTILINESTRING;
	  return;
      }
    if (pts == 0 && lns == 0 && pgs == 1)
      {
	  geom->DeclaredType = GAIA_POLYGON;
	  return;
      }
    if (pts == 0 && lns == 0 && pgs > 1)
      {
	  geom->DeclaredType = GAIA_MULTIPOLYGON;
	  return;
      }
    geom->DeclaredType = GAIA_GEOMETRYCOLLECTION;
}

static LWGEOM *
toLWGeomLinestring (gaiaLinestringPtr ln, int srid)
{
/* converting a GAIA Linestring into a LWGEOM Geometry */
    int iv;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    int has_z = 0;
    int has_m = 0;
    POINTARRAY *pa;
    POINT4D point;

    if (ln->DimensionModel == GAIA_XY_Z || ln->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    if (ln->DimensionModel == GAIA_XY_M || ln->DimensionModel == GAIA_XY_Z_M)
	has_m = 1;
    pa = ptarray_construct (has_z, has_m, ln->Points);
    for (iv = 0; iv < ln->Points; iv++)
      {
	  /* copying vertices */
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  if (has_m)
	      point.m = m;
	  ptarray_set_point4d (pa, iv, &point);
      }
    return (LWGEOM *) lwline_construct (srid, NULL, pa);
}

static LWGEOM *
toLWGeomPolygon (gaiaPolygonPtr pg, int srid)
{
/* converting a GAIA Linestring into a LWGEOM Geometry */
    int iv;
    int ib;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    int ngeoms;
    int has_z = 0;
    int has_m = 0;
    int close_ring;
    gaiaRingPtr rng;
    POINTARRAY **ppaa;
    POINT4D point;

    if (pg->DimensionModel == GAIA_XY_Z || pg->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    if (pg->DimensionModel == GAIA_XY_M || pg->DimensionModel == GAIA_XY_Z_M)
	has_m = 1;
    ngeoms = pg->NumInteriors;
    ppaa = lwalloc (sizeof (POINTARRAY *) * (ngeoms + 1));
    rng = pg->Exterior;
    close_ring = check_unclosed_ring (rng);
    if (close_ring)
	ppaa[0] = ptarray_construct (has_z, has_m, rng->Points + 1);
    else
	ppaa[0] = ptarray_construct (has_z, has_m, rng->Points);
    for (iv = 0; iv < rng->Points; iv++)
      {
	  /* copying vertices - Exterior Ring */
	  if (pg->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
	    }
	  else if (pg->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
	    }
	  else if (pg->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  if (has_m)
	      point.m = m;
	  ptarray_set_point4d (ppaa[0], iv, &point);
      }
    if (close_ring)
      {
	  /* making an unclosed ring to be closed */
	  if (pg->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
	    }
	  else if (pg->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
	    }
	  else if (pg->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, 0, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  if (has_m)
	      point.m = m;
	  ptarray_set_point4d (ppaa[0], rng->Points, &point);
      }
    for (ib = 0; ib < pg->NumInteriors; ib++)
      {
	  /* copying vertices - Interior Rings */
	  rng = pg->Interiors + ib;
	  close_ring = check_unclosed_ring (rng);
	  if (close_ring)
	      ppaa[1 + ib] = ptarray_construct (has_z, has_m, rng->Points + 1);
	  else
	      ppaa[1 + ib] = ptarray_construct (has_z, has_m, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		if (pg->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (pg->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else if (pg->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ppaa[1 + ib], iv, &point);
	    }
	  if (close_ring)
	    {
		/* making an unclosed ring to be closed */
		if (pg->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
		  }
		else if (pg->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
		  }
		else if (pg->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, 0, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ppaa[0], rng->Points, &point);
	    }
      }
    return (LWGEOM *) lwpoly_construct (srid, NULL, ngeoms + 1, ppaa);
}

static gaiaGeomCollPtr
fromLWGeomLeft (gaiaGeomCollPtr gaia, const LWGEOM * lwgeom)
{
/* 
/ converting a LWGEOM Geometry into a GAIA Geometry 
/ collecting "left side" items
*/
    LWGEOM *lwg2 = NULL;
    LWCOLLECTION *lwc = NULL;
    int ngeoms;
    int ig;

    if (lwgeom == NULL)
	return NULL;
    if (lwgeom_is_empty (lwgeom))
	return NULL;

    if (lwgeom->type == COLLECTIONTYPE)
      {
	  lwc = (LWCOLLECTION *) lwgeom;
	  ngeoms = lwc->ngeoms;
	  for (ig = 0; ig < ngeoms; ig += 2)
	    {
		lwg2 = lwc->geoms[ig];
		fromLWGeomIncremental (gaia, lwg2);
	    }
      }
    else
	gaia = fromLWGeom (lwgeom, gaia->DimensionModel, gaia->DeclaredType);

    return gaia;
}

static gaiaGeomCollPtr
fromLWGeomRight (gaiaGeomCollPtr gaia, const LWGEOM * lwgeom)
{
/* 
/ converting a LWGEOM Geometry into a GAIA Geometry 
/ collecting "right side" items
*/
    LWGEOM *lwg2 = NULL;
    LWCOLLECTION *lwc = NULL;
    int ngeoms;
    int ig;

    if (lwgeom == NULL)
	return NULL;
    if (lwgeom_is_empty (lwgeom))
	return NULL;

    if (lwgeom->type == COLLECTIONTYPE)
      {
	  lwc = (LWCOLLECTION *) lwgeom;
	  ngeoms = lwc->ngeoms;
	  for (ig = 1; ig < ngeoms; ig += 2)
	    {
		lwg2 = lwc->geoms[ig];
		fromLWGeomIncremental (gaia, lwg2);
	    }
      }

    return gaia;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSplit (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
{
/* wrapping LWGEOM Split */
    LWGEOM *g1;
    LWGEOM *g2;
    LWGEOM *g3;
    gaiaGeomCollPtr result = NULL;

    if (!check_split_args (input, blade))
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (input);
    g2 = toLWGeom (blade);
    g3 = lwgeom_split (g1, g2);
    if (!g3)
      {
	  lwgeom_free (g1);
	  lwgeom_free (g2);
	  goto done;
      }
    result = fromLWGeom (g3, input->DimensionModel, input->DeclaredType);
    spatialite_init_geos ();
    lwgeom_free (g1);
    lwgeom_free (g2);
    lwgeom_free (g3);
    if (result == NULL)
	goto done;
    result->Srid = input->Srid;
    set_split_gtype (result);

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSplitLeft (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
{
/* wrapping LWGEOM Split [left half] */
    LWGEOM *g1;
    LWGEOM *g2;
    LWGEOM *g3;
    gaiaGeomCollPtr result = NULL;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;

    if (!check_split_args (input, blade))
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    if (input->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (input->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else if (input->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomColl ();

    g2 = toLWGeom (blade);

    ln = input->FirstLinestring;
    while (ln)
      {
	  /* splitting some Linestring */
	  g1 = toLWGeomLinestring (ln, input->Srid);
	  g3 = lwgeom_split (g1, g2);
	  if (g3)
	    {
		result = fromLWGeomLeft (result, g3);
		lwgeom_free (g3);
	    }
	  spatialite_init_geos ();
	  lwgeom_free (g1);
	  ln = ln->Next;
      }
    pg = input->FirstPolygon;
    while (pg)
      {
	  /* splitting some Polygon */
	  g1 = toLWGeomPolygon (pg, input->Srid);
	  g3 = lwgeom_split (g1, g2);
	  if (g3)
	    {
		result = fromLWGeomLeft (result, g3);
		lwgeom_free (g3);
	    }
	  spatialite_init_geos ();
	  lwgeom_free (g1);
	  pg = pg->Next;
      }

    lwgeom_free (g2);
    if (result == NULL)
	goto done;
    if (result->FirstPoint == NULL && result->FirstLinestring == NULL
	&& result->FirstPolygon == NULL)
      {
	  gaiaFreeGeomColl (result);
	  result = NULL;
	  goto done;
      }
    result->Srid = input->Srid;
    set_split_gtype (result);

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSplitRight (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
{
/* wrapping LWGEOM Split [right half] */
    LWGEOM *g1;
    LWGEOM *g2;
    LWGEOM *g3;
    gaiaGeomCollPtr result = NULL;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;

    if (!check_split_args (input, blade))
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    if (input->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (input->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else if (input->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomColl ();

    g2 = toLWGeom (blade);

    ln = input->FirstLinestring;
    while (ln)
      {
	  /* splitting some Linestring */
	  g1 = toLWGeomLinestring (ln, input->Srid);
	  g3 = lwgeom_split (g1, g2);
	  if (g3)
	    {
		result = fromLWGeomRight (result, g3);
		lwgeom_free (g3);
	    }
	  spatialite_init_geos ();
	  lwgeom_free (g1);
	  ln = ln->Next;
      }
    pg = input->FirstPolygon;
    while (pg)
      {
	  /* splitting some Polygon */
	  g1 = toLWGeomPolygon (pg, input->Srid);
	  g3 = lwgeom_split (g1, g2);
	  if (g3)
	    {
		result = fromLWGeomRight (result, g3);
		lwgeom_free (g3);
	    }
	  spatialite_init_geos ();
	  lwgeom_free (g1);
	  pg = pg->Next;
      }

    lwgeom_free (g2);
    if (result == NULL)
	goto done;
    if (result->FirstPoint == NULL && result->FirstLinestring == NULL
	&& result->FirstPolygon == NULL)
      {
	  gaiaFreeGeomColl (result);
	  result = NULL;
	  goto done;
      }
    result->Srid = input->Srid;
    set_split_gtype (result);

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

GAIAGEO_DECLARE int
gaiaAzimuth (double xa, double ya, double xb, double yb, double *azimuth)
{
/* wrapping LWGEOM Azimuth */
    POINT2D pt1;
    POINT2D pt2;
    double az;
    int ret = 1;
    pt1.x = xa;
    pt1.y = ya;
    pt2.x = xb;
    pt2.y = yb;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    if (!azimuth_pt_pt (&pt1, &pt2, &az))
	ret = 0;
    *azimuth = az;

/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE int
gaiaEllipsoidAzimuth (double xa, double ya, double xb, double yb, double a,
		      double b, double *azimuth)
{
/* wrapping LWGEOM AzimuthSpheroid */
    LWPOINT *pt1 = lwpoint_make2d (0, xa, ya);
    LWPOINT *pt2 = lwpoint_make2d (0, xb, yb);
    SPHEROID ellips;
    int ret = 1;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    spheroid_init (&ellips, a, b);
    *azimuth = lwgeom_azumith_spheroid (pt1, pt2, &ellips);
    lwpoint_free (pt1);
    lwpoint_free (pt2);

/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE int
gaiaProjectedPoint (double x1, double y1, double a, double b, double distance,
		    double azimuth, double *x2, double *y2)
{
/* wrapping LWGEOM Project */
    LWPOINT *pt1 = lwpoint_make2d (0, x1, y1);
    LWPOINT *pt2;
    SPHEROID ellips;
    int ret = 0;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    spheroid_init (&ellips, a, b);
    pt2 = lwgeom_project_spheroid (pt1, &ellips, distance, azimuth);
    lwpoint_free (pt1);
    if (pt2 != NULL)
      {
	  *x2 = lwpoint_get_x (pt2);
	  *y2 = lwpoint_get_y (pt2);
	  lwpoint_free (pt2);
	  ret = 1;
      }

/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeodesicArea (gaiaGeomCollPtr geom, double a, double b, int use_ellipsoid,
		  double *area)
{
/* wrapping LWGEOM AreaSphere and AreaSpheroid */
    LWGEOM *g = toLWGeom (geom);
    SPHEROID ellips;
    GBOX gbox;
    double tolerance = 1e-12;
    int ret = 1;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    spheroid_init (&ellips, a, b);
    if (g == NULL)
      {
	  ret = 0;
	  goto done;
      }
    lwgeom_calculate_gbox_geodetic (g, &gbox);
    if (use_ellipsoid)
      {
	  /* testing for "forbidden" calculations on the ellipsoid */
	  if ((gbox.zmax + tolerance) >= 1.0 || (gbox.zmin - tolerance) <= -1.0)
	      use_ellipsoid = 0;	/* can't circle the poles */
	  if (gbox.zmax > 0.0 && gbox.zmin < 0.0)
	      use_ellipsoid = 0;	/* can't cross the equator */
      }
    if (use_ellipsoid)
	*area = lwgeom_area_spheroid (g, &ellips);
    else
	*area = lwgeom_area_sphere (g, &ellips);
    lwgeom_free (g);

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE char *
gaiaGeoHash (gaiaGeomCollPtr geom, int precision)
{
/* wrapping LWGEOM GeoHash */
    LWGEOM *g;
    char *result;
    char *geo_hash = NULL;
    int len;

    if (!geom)
	return NULL;
    gaiaMbrGeometry (geom);
    if (geom->MinX < -180.0 || geom->MaxX > 180.0 || geom->MinY < -90.0
	|| geom->MaxY > 90.0)
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g = toLWGeom (geom);
    result = lwgeom_geohash (g, precision);
    lwgeom_free (g);
    if (result == NULL)
	goto done;
    len = strlen (result);
    if (len == 0)
      {
	  lwfree (result);
	  goto done;
      }
    geo_hash = malloc (len + 1);
    strcpy (geo_hash, result);
    lwfree (result);

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return geo_hash;
}

GAIAGEO_DECLARE char *
gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs, int precision, int options,
	   const char *defid)
{
/* wrapping LWGEOM AsX3D */
    LWGEOM *g;
    char *result;
    char *x3d = NULL;
    int len;

    if (!geom)
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    gaiaMbrGeometry (geom);
    g = toLWGeom (geom);
    result = lwgeom_to_x3d3 (g, (char *) srs, precision, options, defid);
    lwgeom_free (g);
    if (result == NULL)
	goto done;
    len = strlen (result);
    if (len == 0)
      {
	  lwfree (result);
	  goto done;
      }
    x3d = malloc (len + 1);
    strcpy (x3d, result);
    lwfree (result);

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return x3d;
}

GAIAGEO_DECLARE int
gaia3DDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
{
/* wrapping LWGEOM mindistance3d */
    LWGEOM *g1;
    LWGEOM *g2;
    double d;
    int ret = 1;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom1);
    g2 = toLWGeom (geom2);

    d = lwgeom_mindistance3d (g1, g2);
    lwgeom_free (g1);
    lwgeom_free (g2);
    *dist = d;

/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE int
gaiaMaxDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
{
/* wrapping LWGEOM maxdistance2d */
    LWGEOM *g1;
    LWGEOM *g2;
    double d;
    int ret = 1;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom1);
    g2 = toLWGeom (geom2);

    d = lwgeom_maxdistance2d (g1, g2);
    lwgeom_free (g1);
    lwgeom_free (g2);
    *dist = d;

/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE int
gaia3DMaxDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double *dist)
{
/* wrapping LWGEOM maxdistance2d */
    LWGEOM *g1;
    LWGEOM *g2;
    double d;
    int ret = 1;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom1);
    g2 = toLWGeom (geom2);

    d = lwgeom_maxdistance3d (g1, g2);
    lwgeom_free (g1);
    lwgeom_free (g2);
    *dist = d;

/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return ret;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaNodeLines (gaiaGeomCollPtr geom)
{
/* wrapping LWGEOM lwgeom_node */
    LWGEOM *g1;
    LWGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;

/* locking the semaphore */
    splite_lwgeom_semaphore_lock ();

    g1 = toLWGeom (geom);
    g2 = lwgeom_node (g1);
    if (!g2)
      {
	  lwgeom_free (g1);
	  goto done;
      }
    result = fromLWGeom (g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    lwgeom_free (g1);
    lwgeom_free (g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
/* unlocking the semaphore */
    splite_lwgeom_semaphore_unlock ();
    return result;
}

#endif /* end enabling LWGEOM support */

Changes to src/gaiageo/gg_matrix.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
/*

 gg_matrix.c -- Gaia Affine Transform Matrix support
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
#include <spatialite/gaiamatrix.h>
#include <spatialite_private.h>

#define MATRIX_MAGIC_START		0x00
#define MATRIX_MAGIC_DELIMITER	0x3a
#define MATRIX_MAGIC_END		0xb3

struct at_matrix
{
................................................................................
			}
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}

static double
matrix_determinant (struct at_matrix *matrix)
{
/* computing the Determinant for a 4x4 Matrix */
    double m00 = matrix->xx;
    double m01 = matrix->xy;
    double m02 = matrix->xz;
    double m03 = matrix->xoff;
    double m10 = matrix->yx;
    double m11 = matrix->yy;
    double m12 = matrix->yz;
    double m13 = matrix->yoff;
    double m20 = matrix->zx;
    double m21 = matrix->zy;
    double m22 = matrix->zz;
    double m23 = matrix->zoff;
    double m30 = matrix->w1;
    double m31 = matrix->w2;
    double m32 = matrix->w3;
    double m33 = matrix->w4;
    double value =
	m03 * m12 * m21 * m30 - m02 * m13 * m21 * m30 - m03 * m11 * m22 * m30 +
	m01 * m13 * m22 * m30 + m02 * m11 * m23 * m30 - m01 * m12 * m23 * m30 -
	m03 * m12 * m20 * m31 + m02 * m13 * m20 * m31 + m03 * m10 * m22 * m31 -
	m00 * m13 * m22 * m31 - m02 * m10 * m23 * m31 + m00 * m12 * m23 * m31 +
	m03 * m11 * m20 * m32 - m01 * m13 * m20 * m32 - m03 * m10 * m21 * m32 +
	m00 * m13 * m21 * m32 + m01 * m10 * m23 * m32 - m00 * m11 * m23 * m32 -
	m02 * m11 * m20 * m33 + m01 * m12 * m20 * m33 + m02 * m10 * m21 * m33 -
	m00 * m12 * m21 * m33 - m01 * m10 * m22 * m33 + m00 * m11 * m22 * m33;
    return value;
}

GAIAMATRIX_DECLARE double
gaia_matrix_determinant (const unsigned char *blob, int blob_sz)
{
/* computing the Determinant from a BLOB-AMT object */
    double det;
    struct at_matrix matrix;
    if (!gaia_matrix_is_valid (blob, blob_sz))
	return 0.0;
    if (!blob_matrix_decode (&matrix, blob, blob_sz))
	return 0.0;

/* computing the Determinant */
    det = matrix_determinant (&matrix);
    return det;
}


static void
matrix_invert (struct at_matrix *matrix, double determinant)
{
/* inverting a Matrix */
    double m00 = matrix->xx;
    double m01 = matrix->xy;
    double m02 = matrix->xz;
    double m03 = matrix->xoff;
    double m10 = matrix->yx;
    double m11 = matrix->yy;
    double m12 = matrix->yz;
    double m13 = matrix->yoff;
    double m20 = matrix->zx;
    double m21 = matrix->zy;
    double m22 = matrix->zz;
    double m23 = matrix->zoff;
    double m30 = matrix->w1;
    double m31 = matrix->w2;
    double m32 = matrix->w3;
    double m33 = matrix->w4;
    double scale = 1.0 / determinant;
    double r00 =
	m12 * m23 * m31 - m13 * m22 * m31 + m13 * m21 * m32 - m11 * m23 * m32 -
	m12 * m21 * m33 + m11 * m22 * m33;
    double r01 =
	m03 * m22 * m31 - m02 * m23 * m31 - m03 * m21 * m32 + m01 * m23 * m32 +
	m02 * m21 * m33 - m01 * m22 * m33;
    double r02 =
	m02 * m13 * m31 - m03 * m12 * m31 + m03 * m11 * m32 - m01 * m13 * m32 -
	m02 * m11 * m33 + m01 * m12 * m33;
    double r03 =
	m03 * m12 * m21 - m02 * m13 * m21 - m03 * m11 * m22 + m01 * m13 * m22 +
	m02 * m11 * m23 - m01 * m12 * m23;
    double r10 =
	m13 * m22 * m30 - m12 * m23 * m30 - m13 * m20 * m32 + m10 * m23 * m32 +
	m12 * m20 * m33 - m10 * m22 * m33;
    double r11 =
	m02 * m23 * m30 - m03 * m22 * m30 + m03 * m20 * m32 - m00 * m23 * m32 -
	m02 * m20 * m33 + m00 * m22 * m33;
    double r12 =
	m03 * m12 * m30 - m02 * m13 * m30 - m03 * m10 * m32 + m00 * m13 * m32 +
	m02 * m10 * m33 - m00 * m12 * m33;
    double r13 =
	m02 * m13 * m20 - m03 * m12 * m20 + m03 * m10 * m22 - m00 * m13 * m22 -
	m02 * m10 * m23 + m00 * m12 * m23;
    double r20 =
	m11 * m23 * m30 - m13 * m21 * m30 + m13 * m20 * m31 - m10 * m23 * m31 -
	m11 * m20 * m33 + m10 * m21 * m33;
    double r21 =
	m03 * m21 * m30 - m01 * m23 * m30 - m03 * m20 * m31 + m00 * m23 * m31 +
	m01 * m20 * m33 - m00 * m21 * m33;
    double r22 =
	m01 * m13 * m30 - m03 * m11 * m30 + m03 * m10 * m31 - m00 * m13 * m31 -
	m01 * m10 * m33 + m00 * m11 * m33;
    double r23 =
	m03 * m11 * m20 - m01 * m13 * m20 - m03 * m10 * m21 + m00 * m13 * m21 +
	m01 * m10 * m23 - m00 * m11 * m23;
    double r30 =
	m12 * m21 * m30 - m11 * m22 * m30 - m12 * m20 * m31 + m10 * m22 * m31 +
	m11 * m20 * m32 - m10 * m21 * m32;
    double r31 =
	m01 * m22 * m30 - m02 * m21 * m30 + m02 * m20 * m31 - m00 * m22 * m31 -
	m01 * m20 * m32 + m00 * m21 * m32;
    double r32 =
	m02 * m11 * m30 - m01 * m12 * m30 - m02 * m10 * m31 + m00 * m12 * m31 +
	m01 * m10 * m32 - m00 * m11 * m32;
    double r33 =
	m01 * m12 * m20 - m02 * m11 * m20 + m02 * m10 * m21 - m00 * m12 * m21 -
	m01 * m10 * m22 + m00 * m11 * m22;
    matrix->xx = r00 * scale;
    matrix->xy = r01 * scale;
    matrix->xz = r02 * scale;
    matrix->xoff = r03 * scale;
    matrix->yx = r10 * scale;
    matrix->yy = r11 * scale;
    matrix->yz = r12 * scale;
    matrix->yoff = r13 * scale;
    matrix->zx = r20 * scale;
    matrix->zy = r21 * scale;
    matrix->zz = r22 * scale;
    matrix->zoff = r23 * scale;
    matrix->w1 = r30 * scale;
    matrix->w2 = r31 * scale;
    matrix->w3 = r32 * scale;
    matrix->w4 = r33 * scale;
}

GAIAMATRIX_DECLARE int
gaia_matrix_invert (const unsigned char *iblob, int iblob_sz,
		    unsigned char **oblob, int *oblob_sz)
{
/*
* creating a BLOB-serialized Affine Transform Matrix
* by Inverting another Matrix
*/
    double det;
    struct at_matrix matrix;

    *oblob = NULL;
    *oblob_sz = 0;
    if (!gaia_matrix_is_valid (iblob, iblob_sz))
	return 0;
    if (!blob_matrix_decode (&matrix, iblob, iblob_sz))
	return 0;
    det = matrix_determinant (&matrix);
    if (det == 0.0)
	return 0;

/* creating the Inverse Matrix */
    matrix_invert (&matrix, det);
    return blob_matrix_encode (&matrix, oblob, oblob_sz);
}




|







 







|







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
54
55
56
57
58
59
60

61
62
63
64
65
66
67
...
662
663
664
665
666
667
668


































































































































































/*

 gg_matrix.c -- Gaia Affine Transform Matrix support
    
 version 4.3, 2015 April 28

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
#include <spatialite/gaiamatrix.h>


#define MATRIX_MAGIC_START		0x00
#define MATRIX_MAGIC_DELIMITER	0x3a
#define MATRIX_MAGIC_END		0xb3

struct at_matrix
{
................................................................................
			}
		  }
	    }
	  polyg = polyg->Next;
      }
    return new_geom;
}


































































































































































Changes to src/gaiageo/gg_relations.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
...
599
600
601
602
603
604
605
606
607
608
609
610

611
612
613
614
615
616
617
618
619
620
621
...
631
632
633
634
635
636
637
638
639
640
641
642

643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
...
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
...
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
...
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
...
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
...
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
...
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
...
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
....
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
....
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
....
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
....
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
....
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
....
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
....
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
....
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
....
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
....
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
....
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795

1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
....
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853

1854
1855
1856
1857
1858
1859
1860
....
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
....
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926

1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
....
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983

1984
1985
1986
1987
1988
1989
1990
....
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
....
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
....
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
....
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
....
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
....
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245

2246
2247
2248
2249
2250
2251
2252
....
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
....
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
....
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
....
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
....
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
....
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
....
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
....
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
....
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
....
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
....
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
....
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
....
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
....
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893

2894
2895
2896
2897
2898
2899
2900
....
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
....
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
....
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
....
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
....
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
....
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230

3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
....
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
....
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
....
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
....
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
....
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
....
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
....
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
....
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
....
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
....
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
....
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
....
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
....
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
....
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
....
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
....
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
....
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
....
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
....
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
....
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
....
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
....
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
....
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
....
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
....
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
....
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
....
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
....
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
/*

 gg_relations.c -- Gaia spatial relations
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
................................................................................
char *gaia_geos_warning_msg = NULL;
char *gaia_geosaux_error_msg = NULL;

SPATIALITE_PRIVATE void
splite_free_geos_cache_item (struct splite_geos_cache_item *p)
{
#ifndef OMIT_GEOS		/* including GEOS */
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (p->preparedGeosGeom)
	GEOSPreparedGeom_destroy (p->preparedGeosGeom);
    if (p->geosGeom)
	GEOSGeom_destroy (p->geosGeom);
#endif
#endif
    p->geosGeom = NULL;
    p->preparedGeosGeom = NULL;
}

SPATIALITE_PRIVATE void
splite_free_geos_cache_item_r (const void *p_cache,
................................................................................
   the SRID and the Type; so are assumed to represent 
   a valid signature */
    if (memcmp (blob, p->gaiaBlob, 46) == 0)
	return 1;
    return 0;
}

static int
sniffTinyPointBlob (const unsigned char *blob, const int size)
{
/* sniffing for a possible TinyPoint BLOB */
    if (size == 24 || size == 32 || size == 40)
	;
    else
	return 0;
    if (*(blob + 0) != GAIA_MARK_START)
	return 0;
    if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	|| *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	;
    else
	return 0;
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return 0;
    return 1;
}

static void
tinyPoint2Geom (const unsigned char *tiny, unsigned char **geom, int *geom_sz)
{
/* quickly converting from BLOB-TinyPoint to BLOB-Geometry */
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    int srid;
    int type;
    double x;
    double y;
    double z;
    double m;
    unsigned char *blob;
    int blob_sz;

/* parsing the BLOB-TinyPoint */
    if (*(tiny + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
	little_endian = 1;
    else
	little_endian = 0;
    srid = gaiaImport32 (tiny + 2, little_endian, endian_arch);
    if (*(tiny + 6) == GAIA_TINYPOINT_XYZ)
	type = GAIA_POINTZ;
    else if (*(tiny + 6) == GAIA_TINYPOINT_XYM)
	type = GAIA_POINTM;
    else if (*(tiny + 6) == GAIA_TINYPOINT_XYZM)
	type = GAIA_POINTZM;
    else
	type = GAIA_POINT;
    x = gaiaImport64 (tiny + 7, little_endian, endian_arch);
    y = gaiaImport64 (tiny + 15, little_endian, endian_arch);
    if (type == GAIA_POINTZ)
	z = gaiaImport64 (tiny + 23, little_endian, endian_arch);
    if (type == GAIA_POINTM)
	m = gaiaImport64 (tiny + 23, little_endian, endian_arch);
    if (type == GAIA_POINTZM)
      {
	  z = gaiaImport64 (tiny + 23, little_endian, endian_arch);
	  m = gaiaImport64 (tiny + 31, little_endian, endian_arch);
      }

/* allocating and initializing the BLOB-Geometry */
    switch (type)
      {
      case GAIA_POINT:
	  blob_sz = 60;
	  break;
      case GAIA_POINTZ:
      case GAIA_POINTM:
	  blob_sz = 68;
	  break;
      case GAIA_POINTZM:
	  blob_sz = 76;
	  break;
      };
    blob = malloc (blob_sz);

    *geom = blob;
    *geom_sz = blob_sz;
    switch (type)
      {
      case GAIA_POINT:
	  *blob = GAIA_MARK_START;	/* START signature */
	  *(blob + 1) = GAIA_LITTLE_ENDIAN;	/* byte ordering */
	  gaiaExport32 (blob + 2, srid, 1, endian_arch);	/* the SRID */
	  gaiaExport64 (blob + 6, x, 1, endian_arch);	/* MBR - minimum X */
	  gaiaExport64 (blob + 14, y, 1, endian_arch);	/* MBR - minimum Y */
	  gaiaExport64 (blob + 22, x, 1, endian_arch);	/* MBR - maximum X */
	  gaiaExport64 (blob + 30, y, 1, endian_arch);	/* MBR - maximum Y */
	  *(blob + 38) = GAIA_MARK_MBR;	/* MBR signature */
	  gaiaExport32 (blob + 39, GAIA_POINT, 1, endian_arch);	/* class POINT */
	  gaiaExport64 (blob + 43, x, 1, endian_arch);	/* X */
	  gaiaExport64 (blob + 51, y, 1, endian_arch);	/* Y */
	  *(blob + 59) = GAIA_MARK_END;	/* END signature */
	  break;
      case GAIA_POINTZ:
	  *blob = GAIA_MARK_START;	/* START signature */
	  *(blob + 1) = GAIA_LITTLE_ENDIAN;	/* byte ordering */
	  gaiaExport32 (blob + 2, srid, 1, endian_arch);	/* the SRID */
	  gaiaExport64 (blob + 6, x, 1, endian_arch);	/* MBR - minimum X */
	  gaiaExport64 (blob + 14, y, 1, endian_arch);	/* MBR - minimum Y */
	  gaiaExport64 (blob + 22, x, 1, endian_arch);	/* MBR - maximum X */
	  gaiaExport64 (blob + 30, y, 1, endian_arch);	/* MBR - maximum Y */
	  *(blob + 38) = GAIA_MARK_MBR;	/* MBR signature */
	  gaiaExport32 (blob + 39, GAIA_POINTZ, 1, endian_arch);	/* class POINT XYZ */
	  gaiaExport64 (blob + 43, x, 1, endian_arch);	/* X */
	  gaiaExport64 (blob + 51, y, 1, endian_arch);	/* Y */
	  gaiaExport64 (blob + 59, z, 1, endian_arch);	/* Z */
	  *(blob + 67) = GAIA_MARK_END;	/* END signature */
	  break;
      case GAIA_POINTM:
	  *blob = GAIA_MARK_START;	/* START signature */
	  *(blob + 1) = GAIA_LITTLE_ENDIAN;	/* byte ordering */
	  gaiaExport32 (blob + 2, srid, 1, endian_arch);	/* the SRID */
	  gaiaExport64 (blob + 6, x, 1, endian_arch);	/* MBR - minimum X */
	  gaiaExport64 (blob + 14, y, 1, endian_arch);	/* MBR - minimum Y */
	  gaiaExport64 (blob + 22, x, 1, endian_arch);	/* MBR - maximum X */
	  gaiaExport64 (blob + 30, y, 1, endian_arch);	/* MBR - maximum Y */
	  *(blob + 38) = GAIA_MARK_MBR;	/* MBR signature */
	  gaiaExport32 (blob + 39, GAIA_POINTM, 1, endian_arch);	/* class POINT XYM */
	  gaiaExport64 (blob + 43, x, 1, endian_arch);	/* X */
	  gaiaExport64 (blob + 51, y, 1, endian_arch);	/* Y */
	  gaiaExport64 (blob + 59, m, 1, endian_arch);	/* M */
	  *(blob + 67) = GAIA_MARK_END;	/* END signature */
	  break;
      case GAIA_POINTZM:
	  *blob = GAIA_MARK_START;	/* START signature */
	  *(blob + 1) = GAIA_LITTLE_ENDIAN;	/* byte ordering */
	  gaiaExport32 (blob + 2, srid, 1, endian_arch);	/* the SRID */
	  gaiaExport64 (blob + 6, x, 1, endian_arch);	/* MBR - minimum X */
	  gaiaExport64 (blob + 14, y, 1, endian_arch);	/* MBR - minimum Y */
	  gaiaExport64 (blob + 22, x, 1, endian_arch);	/* MBR - maximum X */
	  gaiaExport64 (blob + 30, y, 1, endian_arch);	/* MBR - maximum Y */
	  *(blob + 38) = GAIA_MARK_MBR;	/* MBR signature */
	  gaiaExport32 (blob + 39, GAIA_POINTZM, 1, endian_arch);	/* class POINT XYZM */
	  gaiaExport64 (blob + 43, x, 1, endian_arch);	/* X */
	  gaiaExport64 (blob + 51, y, 1, endian_arch);	/* Y */
	  gaiaExport64 (blob + 59, z, 1, endian_arch);	/* M */
	  gaiaExport64 (blob + 67, m, 1, endian_arch);	/* Z */
	  *(blob + 75) = GAIA_MARK_END;	/* END signature */
	  break;
      };
}

static int
evalGeosCache (struct splite_internal_cache *cache, gaiaGeomCollPtr geom1,
	       const unsigned char *blob1, const int size1,
	       gaiaGeomCollPtr geom2, const unsigned char *blob2,
	       const int size2, GEOSPreparedGeometry ** gPrep,
	       gaiaGeomCollPtr * geom)
{
/* handling the internal GEOS cache */
    struct splite_geos_cache_item *p1 = &(cache->cacheItem1);
    struct splite_geos_cache_item *p2 = &(cache->cacheItem2);
    uLong crc1;
    uLong crc2;
    unsigned char *tiny1 = NULL;
    unsigned char *tiny2 = NULL;
    unsigned char *p_blob1;
    unsigned char *p_blob2;
    int sz1;
    int sz2;
    int tiny_sz;
    int retcode;
    GEOSContextHandle_t handle = NULL;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    handle = cache->GEOS_handle;
    if (handle == NULL)
	return 0;

    if (sniffTinyPointBlob (blob1, size1))
      {
	  tinyPoint2Geom (blob1, &tiny1, &tiny_sz);
	  p_blob1 = tiny1;
	  sz1 = tiny_sz;
      }
    else
      {
	  p_blob1 = (unsigned char *) blob1;
	  sz1 = size1;
      }
    if (sniffTinyPointBlob (blob2, size2))
      {
	  tinyPoint2Geom (blob2, &tiny2, &tiny_sz);
	  p_blob2 = tiny2;
	  sz2 = tiny_sz;
      }
    else
      {
	  p_blob2 = (unsigned char *) blob2;
	  sz2 = size2;
      }
    crc1 = crc32 (0L, p_blob1, sz1);
    crc2 = crc32 (0L, p_blob2, sz2);

/* checking the first cache item */
    if (evalGeosCacheItem (p_blob1, sz1, crc1, p1))
      {
	  /* found a matching item */
	  if (p1->preparedGeosGeom == NULL)
	    {
		/* preparing the GeosGeometries */
		p1->geosGeom = gaiaToGeos_r (cache, geom1);
		if (p1->geosGeom)
................................................................................
		  }
	    }
	  if (p1->preparedGeosGeom)
	    {
		/* returning the corresponding GeosPreparedGeometry */
		*gPrep = p1->preparedGeosGeom;
		*geom = geom2;
		retcode = 1;
		goto end;
	    }
	  retcode = 0;
	  goto end;

      }

/* checking the second cache item */
    if (evalGeosCacheItem (p_blob2, sz2, crc2, p2))
      {
	  /* found a matching item */
	  if (p2->preparedGeosGeom == NULL)
	    {
		/* preparing the GeosGeometries */
		p2->geosGeom = gaiaToGeos_r (cache, geom2);
		if (p2->geosGeom)
................................................................................
		  }
	    }
	  if (p2->preparedGeosGeom)
	    {
		/* returning the corresponding GeosPreparedGeometry */
		*gPrep = p2->preparedGeosGeom;
		*geom = geom1;
		retcode = 1;
		goto end;
	    }
	  retcode = 0;
	  goto end;

      }

/* updating the GEOS cache item#1 */
    memcpy (p1->gaiaBlob, p_blob1, 46);
    p1->gaiaBlobSize = sz1;
    p1->crc32 = crc1;
    if (p1->preparedGeosGeom)
	GEOSPreparedGeom_destroy_r (handle, p1->preparedGeosGeom);
    if (p1->geosGeom)
	GEOSGeom_destroy_r (handle, p1->geosGeom);
    p1->geosGeom = NULL;
    p1->preparedGeosGeom = NULL;

/* updating the GEOS cache item#2 */
    memcpy (p2->gaiaBlob, p_blob2, 46);
    p2->gaiaBlobSize = sz2;
    p2->crc32 = crc2;
    if (p2->preparedGeosGeom)
	GEOSPreparedGeom_destroy_r (handle, p2->preparedGeosGeom);
    if (p2->geosGeom)
	GEOSGeom_destroy_r (handle, p2->geosGeom);
    p2->geosGeom = NULL;
    p2->preparedGeosGeom = NULL;
    retcode = 0;

  end:
    if (tiny1 != NULL)
	free (tiny1);
    if (tiny2 != NULL)
	free (tiny2);
    return retcode;
}

GAIAGEO_DECLARE int
gaiaGeomCollEquals (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries are "spatially equal" */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSEquals (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollEquals_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollIntersects (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially intersects" */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSIntersects (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollIntersects_r (const void *p_cache, gaiaGeomCollPtr geom1,
			  gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries are "spatially disjoint" */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 1;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSDisjoint (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollDisjoint_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially overlaps" */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSOverlaps (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollOverlaps_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCrosses (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially crosses" */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSCrosses (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCrosses_r (const void *p_cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollTouches (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially touches" */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSTouches (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollTouches_r (const void *p_cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollWithin (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if GEOM-1 is completely contained within GEOM-2 */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSWithin (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollWithin_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollContains (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if GEOM-1 completely contains GEOM-2 */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSContains (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollContains_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2)
{
................................................................................
}

GAIAGEO_DECLARE int
gaiaGeomCollRelate (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		    const char *pattern)
{
/* checks if if GEOM-1 and GEOM-2 have a spatial relationship as specified by the pattern Matrix */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSRelatePattern (g1, g2, pattern);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret == 2)
	return -1;
#else
    if (geom1 == NULL || geom2 == NULL || pattern == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollRelate_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2, const char *pattern)
{
................................................................................
    GEOSGeom_destroy_r (handle, g1);
    GEOSGeom_destroy_r (handle, g2);
    if (ret == 2)
	return -1;
    return ret;
}

GAIAGEO_DECLARE char *
gaiaGeomCollRelateBoundaryNodeRule (gaiaGeomCollPtr geom1,
				    gaiaGeomCollPtr geom2, int mode)
{
/* return the intesection matrix [DE-9IM] of GEOM-1 and GEOM-2 */
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    int bnr;
    char *retMatrix;
    char *matrix;
    int len;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return NULL;
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    switch (mode)
      {
      case 2:
	  bnr = GEOSRELATE_BNR_ENDPOINT;
	  break;
      case 3:
	  bnr = GEOSRELATE_BNR_MULTIVALENT_ENDPOINT;
	  break;
      case 4:
	  bnr = GEOSRELATE_BNR_MONOVALENT_ENDPOINT;
	  break;
      default:
	  bnr = GEOSRELATE_BNR_MOD2;
	  break;
      };
    retMatrix = GEOSRelateBoundaryNodeRule (g1, g2, bnr);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (retMatrix == NULL)
	return NULL;
    len = strlen (retMatrix);
    matrix = malloc (len + 1);
    strcpy (matrix, retMatrix);
    GEOSFree (retMatrix);
    return matrix;
#else
    if (geom1 == NULL || geom2 == NULL || mode == 0)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return NULL;
}

GAIAGEO_DECLARE char *
gaiaGeomCollRelateBoundaryNodeRule_r (const void *p_cache,
				      gaiaGeomCollPtr geom1,
				      gaiaGeomCollPtr geom2, int mode)
{
/* return the intesection matrix [DE-9IM] of GEOM-1 and GEOM-2 */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    int bnr;
    char *retMatrix;
    char *matrix;
    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    GEOSContextHandle_t handle = NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    handle = cache->GEOS_handle;
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic_r (cache, geom1) || gaiaIsToxic_r (cache, geom2))
	return NULL;
    g1 = gaiaToGeos_r (cache, geom1);
    g2 = gaiaToGeos_r (cache, geom2);
    switch (mode)
      {
      case 2:
	  bnr = GEOSRELATE_BNR_ENDPOINT;
	  break;
      case 3:
	  bnr = GEOSRELATE_BNR_MULTIVALENT_ENDPOINT;
	  break;
      case 4:
	  bnr = GEOSRELATE_BNR_MONOVALENT_ENDPOINT;
	  break;
      default:
	  bnr = GEOSRELATE_BNR_MOD2;
	  break;
      };
    retMatrix = GEOSRelateBoundaryNodeRule_r (handle, g1, g2, bnr);
    GEOSGeom_destroy_r (handle, g1);
    GEOSGeom_destroy_r (handle, g2);
    if (retMatrix == NULL)
	return NULL;
    len = strlen (retMatrix);
    matrix = malloc (len + 1);
    strcpy (matrix, retMatrix);
    GEOSFree_r (handle, retMatrix);
    return matrix;
}

GAIAGEO_DECLARE int
gaiaIntersectionMatrixPatternMatch (const char *matrix, const char *pattern)
{
/* evalutes if an intersection matrix [DE-9IM]  matches a matrix pattern */
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    int ret;
    gaiaResetGeosMsg ();
    if (matrix == NULL || pattern == NULL)
	return -1;
    ret = GEOSRelatePatternMatch (matrix, pattern);
    if (ret == 0 || ret == 1)
	return ret;
#else
    if (matrix == NULL || pattern == NULL)
	matrix = NULL;		/* silencing stupid compiler warnings */
#endif
    return -1;
}

GAIAGEO_DECLARE int
gaiaIntersectionMatrixPatternMatch_r (const void *p_cache, const char *matrix,
				      const char *pattern)
{
/* evalutes is an intersection matrix [DE-9IM]  matches a matrix pattern */
    int ret;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    GEOSContextHandle_t handle = NULL;
    if (cache == NULL)
	return -1;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return -1;
    handle = cache->GEOS_handle;
    if (handle == NULL)
	return -1;
    gaiaResetGeosMsg_r (cache);
    if (matrix == NULL || pattern == NULL)
	return -1;
    ret = GEOSRelatePatternMatch_r (handle, matrix, pattern);
    if (ret == 0 || ret == 1)
	return ret;
    return -1;
}

GAIAGEO_DECLARE int
gaiaGeomCollLength (gaiaGeomCollPtr geom, double *xlength)
{
/* computes the total length for this Geometry */
    int ret = 0;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    double length;

    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSLength (g, &length);
    GEOSGeom_destroy (g);
    if (ret)
	*xlength = length;
#else
    if (geom == NULL || xlength == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollLength_r (const void *p_cache, gaiaGeomCollPtr geom,
		      double *xlength)
{
................................................................................
}

GAIAGEO_DECLARE int
gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom, int perimeter,
			       double *xlength)
{
/* computes the total length or perimeter for this Geometry */
    int ret = 0;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    double length;

    GEOSGeometry *g;
    int mode = GAIA2GEOS_ONLY_LINESTRINGS;
    if (perimeter)
	mode = GAIA2GEOS_ONLY_POLYGONS;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
................................................................................
	  *xlength = 0.0;
	  return 1;
      }
    ret = GEOSLength (g, &length);
    GEOSGeom_destroy (g);
    if (ret)
	*xlength = length;
#else
    if (geom == NULL || perimeter == 0 || xlength == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollLengthOrPerimeter_r (const void *p_cache, gaiaGeomCollPtr geom,
				 int perimeter, double *xlength)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollArea (gaiaGeomCollPtr geom, double *xarea)
{
/* computes the total area for this Geometry */
    int ret = 0;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    double area;

    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSArea (g, &area);
    GEOSGeom_destroy (g);
    if (ret)
	*xarea = area;
#else
    if (geom == NULL || xarea == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollArea_r (const void *p_cache, gaiaGeomCollPtr geom, double *xarea)
{
/* computes the total area for this Geometry */
................................................................................
}

GAIAGEO_DECLARE int
gaiaGeomCollDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		      double *xdist)
{
/* computes the minimum distance intercurring between GEOM-1 and GEOM-2 */
    int ret = 0;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    double dist;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return 0;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return 0;
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSDistance (g1, g2, &dist);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret)
	*xdist = dist;
#else
    if (geom1 == NULL || geom2 == NULL || xdist == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollDistance_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2, double *xdist)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryIntersection (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial intersection" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo = gaiaFromGeos_XYZM (g3);
    else
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryIntersection_r (const void *p_cache, gaiaGeomCollPtr geom1,
			    gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryUnion (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial union" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo->DeclaredType = GAIA_MULTIPOINT;
    if (geo->DeclaredType == GAIA_LINESTRING &&
	geom1->DeclaredType == GAIA_MULTILINESTRING)
	geo->DeclaredType = GAIA_MULTILINESTRING;
    if (geo->DeclaredType == GAIA_POLYGON &&
	geom1->DeclaredType == GAIA_MULTIPOLYGON)
	geo->DeclaredType = GAIA_MULTIPOLYGON;
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryUnion_r (const void *p_cache, gaiaGeomCollPtr geom1,
		     gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnionCascaded (gaiaGeomCollPtr geom)
{
/* UnionCascaded (single Collection of polygons) */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;

    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaResetGeosMsg ();
................................................................................
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnionCascaded_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* UnionCascaded (single Collection of polygons) */
................................................................................
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial difference" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo = gaiaFromGeos_XYZM (g3);
    else
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryDifference_r (const void *p_cache, gaiaGeomCollPtr geom1,
			  gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometrySymDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial symmetric difference" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo = gaiaFromGeos_XYZM (g3);
    else
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometrySymDifference_r (const void *p_cache, gaiaGeomCollPtr geom1,
			     gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaBoundary (gaiaGeomCollPtr geom)
{
/* builds a new geometry representing the combinatorial boundary of GEOM */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaBoundary_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* builds a new geometry representing the combinatorial boundary of GEOM */
................................................................................
    return geo;
}

GAIAGEO_DECLARE int
gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double *x, double *y)
{
/* returns a Point representing the centroid for this Geometry */
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    gaiaGeomCollPtr geo;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
................................................................................
      {
	  *x = geo->FirstPoint->X;
	  *y = geo->FirstPoint->Y;
	  gaiaFreeGeomColl (geo);
	  return 1;
      }
    gaiaFreeGeomColl (geo);
#else
    if (geom == NULL || x == NULL || y == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return 0;
}

GAIAGEO_DECLARE int
gaiaGeomCollCentroid_r (const void *p_cache, gaiaGeomCollPtr geom, double *x,
			double *y)
{
................................................................................
    return 0;
}

GAIAGEO_DECLARE int
gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, double *y)
{
/* returns a Point guaranteed to lie on the Surface */
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    gaiaGeomCollPtr geo;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
................................................................................
      {
	  *x = geo->FirstPoint->X;
	  *y = geo->FirstPoint->Y;
	  gaiaFreeGeomColl (geo);
	  return 1;
      }
    gaiaFreeGeomColl (geo);
#else
    if (geom == NULL || x == NULL || y == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return 0;
}

GAIAGEO_DECLARE int
gaiaGetPointOnSurface_r (const void *p_cache, gaiaGeomCollPtr geom, double *x,
			 double *y)
{
................................................................................
    if (geom->DimensionModel == GAIA_XY_Z)
	geo = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
	geo = gaiaFromGeos_XYM_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	geo = gaiaFromGeos_XYZM_r (cache, g2);
    else
	geo = gaiaFromGeos_XYZ_r (cache, g2);
    GEOSGeom_destroy_r (handle, g2);
    if (geo == NULL)
	return 0;
    if (geo->FirstPoint)
      {
	  *x = geo->FirstPoint->X;
	  *y = geo->FirstPoint->Y;
................................................................................
    return 0;
}

GAIAGEO_DECLARE int
gaiaIsSimple (gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a simple one */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return -1;
    if (gaiaIsToxic (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSisSimple (g);
    GEOSGeom_destroy (g);
    if (ret == 2)
	return -1;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsSimple_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a simple one */
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsRing (gaiaLinestringPtr line)
{
/* checks if this LINESTRING can be a valid RING */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    gaiaGeomCollPtr geo;
    gaiaLinestringPtr line2;

    int iv;
    double x;
    double y;
    double z;
    double m;
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
................................................................................
      }
    g = gaiaToGeos (geo);
    gaiaFreeGeomColl (geo);
    ret = GEOSisRing (g);
    GEOSGeom_destroy (g);
    if (ret == 2)
	return -1;
#else
    if (line == NULL)
	line = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsRing_r (const void *p_cache, gaiaLinestringPtr line)
{
/* checks if this LINESTRING can be a valid RING */
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsValid (gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a valid one */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return -1;
    if (gaiaIsToxic (geom))
	return 0;
    if (gaiaIsNotClosedGeomColl (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSisValid (g);
    GEOSGeom_destroy (g);
    if (ret == 2)
	return -1;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsValid_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a valid one */
................................................................................
}

GAIAGEO_DECLARE char *
gaiaIsValidReason (gaiaGeomCollPtr geom)
{
/* return a TEXT string stating if a Geometry is valid
/ and if not valid, a reason why */
    char *text = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    int len;
    const char *str;
    char *gstr;
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
      {
................................................................................
    GEOSGeom_destroy (g);
    if (gstr == NULL)
	return NULL;
    len = strlen (gstr);
    text = malloc (len + 1);
    strcpy (text, gstr);
    GEOSFree (gstr);
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return text;
}

GAIAGEO_DECLARE char *
gaiaIsValidReason_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* return a TEXT string stating if a Geometry is valid
................................................................................
      {
	  str = "Invalid: NULL Geometry";
	  len = strlen (str);
	  text = malloc (len + 1);
	  strcpy (text, str);
	  return text;
      }
    if (gaiaIsToxic_r (cache, geom))
      {
	  str = "Invalid: Toxic Geometry ... too few points";
	  len = strlen (str);
	  text = malloc (len + 1);
	  strcpy (text, str);
	  return text;
      }
    if (gaiaIsNotClosedGeomColl_r (cache, geom))
      {
	  str = "Invalid: Unclosed Rings were detected";
	  len = strlen (str);
	  text = malloc (len + 1);
	  strcpy (text, str);
	  return text;
      }
................................................................................
    text = malloc (len + 1);
    strcpy (text, gstr);
    GEOSFree_r (handle, gstr);
    return text;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaIsValidDetailEx (gaiaGeomCollPtr geom, int esri_flag)
{
/* return a Geometry detail causing a Geometry to be invalid */
    gaiaGeomCollPtr detail = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    char *reason = NULL;
    GEOSGeometry *g;
    GEOSGeometry *d = NULL;

    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
    if (gaiaIsNotClosedGeomColl (geom))
	return NULL;
    g = gaiaToGeos (geom);
    if (esri_flag)
	esri_flag = GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE;
    GEOSisValidDetail (g, esri_flag, &reason, &d);
    GEOSGeom_destroy (g);
    if (reason != NULL)
	GEOSFree (reason);
    if (d == NULL)
	return NULL;
    detail = gaiaFromGeos_XY (d);
    GEOSGeom_destroy (d);
#else
    if (geom == NULL && esri_flag == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return detail;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaIsValidDetail (gaiaGeomCollPtr geom)
{
/* return a Geometry detail causing a Geometry to be invalid */
    return gaiaIsValidDetailEx (geom, 0);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaIsValidDetailEx_r (const void *p_cache, gaiaGeomCollPtr geom, int esri_flag)
{
/* return a Geometry detail causing a Geometry to be invalid */
    char *reason = NULL;
    GEOSGeometry *g;
    GEOSGeometry *d = NULL;
    gaiaGeomCollPtr detail;
    struct splite_internal_cache *cache =
................................................................................
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
    if (gaiaIsNotClosedGeomColl_r (cache, geom))
	return NULL;
    g = gaiaToGeos_r (cache, geom);
    if (esri_flag)
	esri_flag = GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE;
    GEOSisValidDetail_r (handle, g, esri_flag, &reason, &d);
    GEOSGeom_destroy_r (handle, g);
    if (reason != NULL)
	GEOSFree_r (handle, reason);
    if (d == NULL)
	return NULL;
    detail = gaiaFromGeos_XY_r (cache, d);
    GEOSGeom_destroy_r (handle, d);
    return detail;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaIsValidDetail_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* return a Geometry detail causing a Geometry to be invalid */
    return gaiaIsValidDetailEx_r (p_cache, geom, 0);
}

GAIAGEO_DECLARE int
gaiaIsClosedGeom_r (const void *cache, gaiaGeomCollPtr geom)
{
/* checks if this geometry is a closed linestring (or multilinestring) */
    int ret = 0;
    gaiaLinestringPtr ln;
    if (cache != NULL)
................................................................................
    return gaiaIsClosedGeom_r (NULL, geom);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplify (gaiaGeomCollPtr geom, double tolerance)
{
/* builds a simplified geometry using the Douglas-Peuker algorihtm */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL || tolerance == 0.0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplify_r (const void *p_cache, gaiaGeomCollPtr geom,
			double tolerance)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, double tolerance)
{
/* builds a simplified geometry using the Douglas-Peuker algorihtm [preserving topology] */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL || tolerance == 0.0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology_r (const void *p_cache,
					gaiaGeomCollPtr geom, double tolerance)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConvexHull (gaiaGeomCollPtr geom)
{
/* builds a geometry that is the convex hull of GEOM */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConvexHull_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* builds a geometry that is the convex hull of GEOM */
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollBuffer (gaiaGeomCollPtr geom, double radius, int points)
{
/* builds a geometry that is the GIS buffer of GEOM */
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL || radius == 0.0 || points == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollBuffer_r (const void *p_cache, gaiaGeomCollPtr geom, double radius,
		      int points)
{
................................................................................
    int ib;
    double x;
    double y;
    double z;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;

#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return;
#endif

    if (handle != NULL)
      {
	  geos_ring = GEOSGetExteriorRing_r (handle, geos);
	  interiors = GEOSGetNumInteriorRings_r (handle, geos);
	  coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
	  GEOSCoordSeq_getDimensions_r (handle, coords, &geos_dims);
	  GEOSCoordSeq_getSize_r (handle, coords, &pts);
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  geos_ring = GEOSGetExteriorRing (geos);
	  interiors = GEOSGetNumInteriorRings (geos);
	  coords = GEOSGeom_getCoordSeq (geos_ring);
	  GEOSCoordSeq_getDimensions (coords, &geos_dims);
	  GEOSCoordSeq_getSize (coords, &pts);
#endif
      }

    pg = gaiaAddPolygonToGeomColl (result, pts, interiors);
/* setting up the Exterior ring */
    rng = pg->Exterior;
    for (iv = 0; iv < (int) pts; iv++)
      {
................................................................................
		  {
		      GEOSCoordSeq_getX_r (handle, coords, iv, &x);
		      GEOSCoordSeq_getY_r (handle, coords, iv, &y);
		      GEOSCoordSeq_getZ_r (handle, coords, iv, &z);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      GEOSCoordSeq_getX (coords, iv, &x);
		      GEOSCoordSeq_getY (coords, iv, &y);
		      GEOSCoordSeq_getZ (coords, iv, &z);
#endif
		  }
	    }
	  else
	    {
		if (handle != NULL)
		  {
		      GEOSCoordSeq_getX_r (handle, coords, iv, &x);
		      GEOSCoordSeq_getY_r (handle, coords, iv, &y);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      GEOSCoordSeq_getX (coords, iv, &x);
		      GEOSCoordSeq_getY (coords, iv, &y);
#endif
		  }
		z = 0.0;
	    }
	  if (rng->DimensionModel == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
	    }
................................................................................
		geos_ring = GEOSGetInteriorRingN_r (handle, geos, ib);
		coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		GEOSCoordSeq_getDimensions_r (handle, coords, &geos_dims);
		GEOSCoordSeq_getSize_r (handle, coords, &pts);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		geos_ring = GEOSGetInteriorRingN (geos, ib);
		coords = GEOSGeom_getCoordSeq (geos_ring);
		GEOSCoordSeq_getDimensions (coords, &geos_dims);
		GEOSCoordSeq_getSize (coords, &pts);
#endif
	    }
	  rng = gaiaAddInteriorRing (pg, ib, pts);
	  for (iv = 0; iv < (int) pts; iv++)
	    {
		if (geos_dims == 3)
		  {
		      if (handle != NULL)
................................................................................
			{
			    GEOSCoordSeq_getX_r (handle, coords, iv, &x);
			    GEOSCoordSeq_getY_r (handle, coords, iv, &y);
			    GEOSCoordSeq_getZ_r (handle, coords, iv, &z);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_getX (coords, iv, &x);
			    GEOSCoordSeq_getY (coords, iv, &y);
			    GEOSCoordSeq_getZ (coords, iv, &z);
#endif
			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_getX_r (handle, coords, iv, &x);
			    GEOSCoordSeq_getY_r (handle, coords, iv, &y);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_getX (coords, iv, &x);
			    GEOSCoordSeq_getY (coords, iv, &y);
#endif
			}
		      z = 0.0;
		  }
		if (rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
................................................................................
	  if (handle != NULL)
	    {
		GEOSCoordSeq_getX_r (handle, cs, iv, &x);
		GEOSCoordSeq_getY_r (handle, cs, iv, &y);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		GEOSCoordSeq_getX (cs, iv, &x);
		GEOSCoordSeq_getY (cs, iv, &y);
#endif
	    }
	  if (x < *min_x)
	      *min_x = x;
	  if (x > *max_x)
	      *max_x = x;
	  if (y < *min_y)
	      *min_y = y;
................................................................................
    int iv;
    int interiors;
    int geos_dims = 2;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    int items;
    int error = 0;
    double x;
    double y;
    double z;
    double m;
    gaiaGeomCollPtr result = NULL;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
................................................................................
    double max_y1;
    double min_x2;
    double max_x2;
    double min_y2;
    double max_y2;
    int ret;

#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return NULL;
#endif
    if (!geom)
	return NULL;

    if (cache != NULL)
	ret = gaiaIsToxic_r (cache, geom);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
	ret = gaiaIsToxic (geom);
#endif
    if (ret)
	return NULL;

    pt = geom->FirstPoint;
    while (pt)
      {
	  pts++;
	  pt = pt->Next;
      }
    pg = geom->FirstPolygon;
................................................................................

/* initializing GEOS linestrings */
    ln = geom->FirstLinestring;
    while (ln)
      {
	  if (handle != NULL)
	      cs = GEOSCoordSeq_create_r (handle, ln->Points, geos_dims);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      cs = GEOSCoordSeq_create (ln->Points, geos_dims);
#endif
	  for (iv = 0; iv < ln->Points; iv++)
	    {
		/* exterior ring segments */
		z = 0.0;
		if (ln->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
................................................................................
			{
			    GEOSCoordSeq_setX_r (handle, cs, iv, x);
			    GEOSCoordSeq_setY_r (handle, cs, iv, y);
			    GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_setX (cs, iv, x);
			    GEOSCoordSeq_setY (cs, iv, y);
			    GEOSCoordSeq_setZ (cs, iv, z);
#endif
			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_setX_r (handle, cs, iv, x);
			    GEOSCoordSeq_setY_r (handle, cs, iv, y);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    GEOSCoordSeq_setX (cs, iv, x);
			    GEOSCoordSeq_setY (cs, iv, y);
#endif
			}
		  }
	    }
	  if (handle != NULL)
	      *p_item++ = GEOSGeom_createLineString_r (handle, cs);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      *p_item++ = GEOSGeom_createLineString (cs);
#endif
	  ln = ln->Next;
      }

/* calling GEOSPolygonize */
    if (handle != NULL)
	geos = GEOSPolygonize_r (handle, geos_list, lns);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
	geos = GEOSPolygonize (geos_list, lns);
#endif
    if (geos == NULL)
	goto cleanup;

/*
/ 
/ GEOSPolygonize is expected to return a collection of Polygons
/
................................................................................
/
/ we must check this, so to *not* return Polygons representing holes
/
*/
    error = 0;
    if (handle != NULL)
	items = GEOSGetNumGeometries_r (handle, geos);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
	items = GEOSGetNumGeometries (geos);
#endif
    for (ig = 0; ig < items; ig++)
      {
	  /* looping on elementaty GEOS geometries */
	  if (handle != NULL)
	    {
		geos_item = GEOSGetGeometryN_r (handle, geos, ig);
		if (GEOSGeomTypeId_r (handle, geos_item) != GEOS_POLYGON)
................................................................................
		      /* not a Polygon ... ouch ... */
		      error = 1;
		      goto cleanup;
		  }
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		geos_item = GEOSGetGeometryN (geos, ig);
		if (GEOSGeomTypeId (geos_item) != GEOS_POLYGON)
		  {
		      /* not a Polygon ... ouch ... */
		      error = 1;
		      goto cleanup;
		  }
#endif
	    }
      }

/* identifying valid Polygons [excluding holes] */
    valid_polygons = malloc (items);
    for (ig = 0; ig < items; ig++)
	valid_polygons[ig] = 'Y';
................................................................................
	  if (handle != NULL)
	    {
		geos_item = GEOSGetGeometryN_r (handle, geos, ig);
		interiors = GEOSGetNumInteriorRings_r (handle, geos_item);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		geos_item = GEOSGetGeometryN (geos, ig);
		interiors = GEOSGetNumInteriorRings (geos_item);
#endif
	    }
	  for (ib = 0; ib < interiors; ib++)
	    {
		/* looping on any interior ring */
		if (handle != NULL)
		  {
		      geos_ring =
			  GEOSGetInteriorRingN_r (handle, geos_item, ib);
		      coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		      GEOSCoordSeq_getSize_r (handle, coords, &pts1);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      geos_ring = GEOSGetInteriorRingN (geos_item, ib);
		      coords = GEOSGeom_getCoordSeq (geos_ring);
		      GEOSCoordSeq_getSize (coords, &pts1);
#endif
		  }
		auxGeosMbr (handle, coords, pts1, &min_x1, &min_y1, &max_x1,
			    &max_y1);
		for (iv = 0; iv < items; iv++)
		  {
		      if (iv == ig)
			{
................................................................................
			    geos_ring =
				GEOSGetExteriorRing_r (handle, geos_item2);
			    coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
			    GEOSCoordSeq_getSize_r (handle, coords, &pts2);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    geos_item2 = GEOSGetGeometryN (geos, iv);
			    if (GEOSGetNumInteriorRings (geos_item2) > 0)
			      {
				  /* this Polygon contains holes [surely valid] */
				  continue;
			      }
			    geos_ring = GEOSGetExteriorRing (geos_item2);
			    coords = GEOSGeom_getCoordSeq (geos_ring);
			    GEOSCoordSeq_getSize (coords, &pts2);
#endif
			}
		      if (pts1 == pts2)
			{
			    auxGeosMbr (handle, coords, pts2, &min_x2, &min_y2,
					&max_x2, &max_y2);
			    if (min_x1 == min_x2 && min_y1 == min_y2
				&& max_x1 == max_x2 && max_y1 == max_y2)
................................................................................
	result->DeclaredType = GAIA_MULTIPOLYGON;

    for (ig = 0; ig < items; ig++)
      {
	  /* looping on GEOS Polygons */
	  if (handle != NULL)
	      geos_item = GEOSGetGeometryN_r (handle, geos, ig);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      geos_item = GEOSGetGeometryN (geos, ig);
#endif
	  if (valid_polygons[ig] == 'Y')
	      auxFromGeosPolygon (handle, geos_item, result);
      }

  cleanup:
    if (valid_polygons != NULL)
	free (valid_polygons);
................................................................................
	  p_item = (GEOSGeometry **) geos_list;
	  for (iv = 0; iv < lns; iv++)
	    {
		if (*p_item != NULL)
		  {
		      if (handle != NULL)
			  GEOSGeom_destroy_r (handle, *p_item);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      else
			  GEOSGeom_destroy (*p_item);
#endif
		  }
		p_item++;
	    }
	  p_item = (GEOSGeometry **) geos_list;
	  free (p_item);
      }
    if (geos != NULL)
      {
	  if (handle != NULL)
	      GEOSGeom_destroy_r (handle, geos);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      GEOSGeom_destroy (geos);
#endif
      }
    if (error || result->FirstPolygon == NULL)
      {
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    return result;
................................................................................
    return gaiaPolygonizeCommon (cache, handle, geom, force_multi);
}

GAIAGEO_DECLARE int
gaiaGeomCollCovers (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if geom1 "spatially covers" geom2 */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;

/* quick check based on MBRs comparison */
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSCovers (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret == 2)
	return -1;
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCovers_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if geom1 is "spatially covered by" geom2 */
    int ret = -1;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;

/* quick check based on MBRs comparison */
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSCoveredBy (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret == 2)
	return -1;
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCoveredBy_r (const void *p_cache, gaiaGeomCollPtr geom1,
			 gaiaGeomCollPtr geom2)
{




|







 







|







 







<
<
<
<
<







 







<




<







 








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<
|





|
|
<
<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|







 







|
<

<
<
>



|







 







|
<

<
<
>



|
|









|
|







<

<
<
<
<
<
|






|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



<
<

>











<
<
<
<







 







<
<

>







 







<
<
<
<







 







<
<

>











<
<
<
<







 







<
<

>







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







<
<


>







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







<







 







<
<
<
<







 







<







 







<
<
<
<







 







|







 







|
<











<
<
<
<







 







<
<


>







 







<
<
<
<







 







|
<













<
<
<
<







 







|
<







 







<
<
<
<







 







|







|







 







|


<
<



>








<
<
|







<
<
<
<




<
<
<
<
<
<
<
|







 







|


<
<
|










<
<
<
<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







<
<
<
<
<










<





<







 







<



<











<


<







 







<




<







 







<



<











<


<







 







<


<







 







|







 







<
<
<
<


<


<


<


<







 







<


<







 







<



<











<


<





<


<






<


<







 







<


<







 







<







<







 







<


<













<



<







 







<









<







 







<


<







 







<


<










<


<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
52
53
54
55
56
57
58





59
60
61
62
63
64
65
..
69
70
71
72
73
74
75

76
77
78
79

80
81
82
83
84
85
86
...
368
369
370
371
372
373
374
375
















































































































































376
377

378
379
380
381
382
383
384
385








386
387
388
389
390
391
392
393
394
395

























396
397
398
399
400
401
402
403
404
...
414
415
416
417
418
419
420
421

422


423
424
425
426
427
428
429
430
431
432
433
434
...
444
445
446
447
448
449
450
451

452


453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476

477





478
479
480
481
482
483
484
485

486
487
488
489
490
491
492
...
496
497
498
499
500
501
502




503
504
505
506
507
508
509
...
540
541
542
543
544
545
546
547

548
549
550
551
552
553
554
...
558
559
560
561
562
563
564




565
566
567
568
569
570
571
...
652
653
654
655
656
657
658
659

660
661
662
663
664
665
666
...
670
671
672
673
674
675
676




677
678
679
680
681
682
683
...
765
766
767
768
769
770
771
772

773
774
775
776
777
778
779
...
783
784
785
786
787
788
789




790
791
792
793
794
795
796
...
878
879
880
881
882
883
884
885

886
887
888
889
890
891
892
...
896
897
898
899
900
901
902




903
904
905
906
907
908
909
...
991
992
993
994
995
996
997
998

999
1000
1001
1002
1003
1004
1005
....
1009
1010
1011
1012
1013
1014
1015




1016
1017
1018
1019
1020
1021
1022
....
1104
1105
1106
1107
1108
1109
1110
1111

1112
1113
1114
1115
1116
1117
1118
....
1122
1123
1124
1125
1126
1127
1128




1129
1130
1131
1132
1133
1134
1135
....
1220
1221
1222
1223
1224
1225
1226
1227

1228
1229
1230
1231
1232
1233
1234
....
1238
1239
1240
1241
1242
1243
1244




1245
1246
1247
1248
1249
1250
1251
....
1337
1338
1339
1340
1341
1342
1343
1344

1345
1346
1347
1348
1349
1350
1351
....
1352
1353
1354
1355
1356
1357
1358




1359
1360
1361
1362
1363
1364
1365
....
1389
1390
1391
1392
1393
1394
1395












































































































1396













































1397
1398
1399


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412




1413
1414
1415
1416
1417
1418
1419
....
1446
1447
1448
1449
1450
1451
1452


1453
1454
1455
1456
1457
1458
1459
1460
1461
....
1467
1468
1469
1470
1471
1472
1473




1474
1475
1476
1477
1478
1479
1480
....
1514
1515
1516
1517
1518
1519
1520


1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533




1534
1535
1536
1537
1538
1539
1540
....
1566
1567
1568
1569
1570
1571
1572


1573
1574
1575
1576
1577
1578
1579
1580
1581
....
1582
1583
1584
1585
1586
1587
1588




1589
1590
1591
1592
1593
1594
1595
....
1624
1625
1626
1627
1628
1629
1630
1631

1632
1633
1634
1635
1636
1637
1638
....
1657
1658
1659
1660
1661
1662
1663




1664
1665
1666
1667
1668
1669
1670
....
1716
1717
1718
1719
1720
1721
1722
1723

1724
1725
1726
1727
1728
1729
1730
....
1751
1752
1753
1754
1755
1756
1757




1758
1759
1760
1761
1762
1763
1764
....
1812
1813
1814
1815
1816
1817
1818


1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
....
1868
1869
1870
1871
1872
1873
1874




1875
1876
1877
1878
1879
1880
1881
....
1949
1950
1951
1952
1953
1954
1955
1956

1957
1958
1959
1960
1961
1962
1963
....
1977
1978
1979
1980
1981
1982
1983




1984
1985
1986
1987
1988
1989
1990
....
2031
2032
2033
2034
2035
2036
2037
2038

2039
2040
2041
2042
2043
2044
2045
....
2059
2060
2061
2062
2063
2064
2065




2066
2067
2068
2069
2070
2071
2072
....
2113
2114
2115
2116
2117
2118
2119
2120

2121
2122
2123
2124
2125
2126
2127
....
2138
2139
2140
2141
2142
2143
2144




2145
2146
2147
2148
2149
2150
2151
....
2188
2189
2190
2191
2192
2193
2194

2195
2196
2197
2198
2199
2200
2201
....
2222
2223
2224
2225
2226
2227
2228




2229
2230
2231
2232
2233
2234
2235
....
2282
2283
2284
2285
2286
2287
2288

2289
2290
2291
2292
2293
2294
2295
....
2316
2317
2318
2319
2320
2321
2322




2323
2324
2325
2326
2327
2328
2329
....
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
....
2376
2377
2378
2379
2380
2381
2382
2383

2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394




2395
2396
2397
2398
2399
2400
2401
....
2425
2426
2427
2428
2429
2430
2431


2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
....
2494
2495
2496
2497
2498
2499
2500




2501
2502
2503
2504
2505
2506
2507
....
2588
2589
2590
2591
2592
2593
2594
2595

2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608




2609
2610
2611
2612
2613
2614
2615
....
2642
2643
2644
2645
2646
2647
2648
2649

2650
2651
2652
2653
2654
2655
2656
....
2681
2682
2683
2684
2685
2686
2687




2688
2689
2690
2691
2692
2693
2694
....
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
....
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752


2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764


2765
2766
2767
2768
2769
2770
2771
2772




2773
2774
2775
2776







2777
2778
2779
2780
2781
2782
2783
2784
....
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802


2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813







2814
2815
2816
2817
2818
2819
2820
....
2876
2877
2878
2879
2880
2881
2882
2883

2884
2885
2886
2887
2888
2889
2890
....
2901
2902
2903
2904
2905
2906
2907




2908
2909
2910
2911
2912
2913
2914
....
2952
2953
2954
2955
2956
2957
2958
2959

2960
2961
2962
2963
2964
2965
2966
....
2977
2978
2979
2980
2981
2982
2983




2984
2985
2986
2987
2988
2989
2990
....
3028
3029
3030
3031
3032
3033
3034
3035

3036
3037
3038
3039
3040
3041
3042
....
3053
3054
3055
3056
3057
3058
3059




3060
3061
3062
3063
3064
3065
3066
....
3103
3104
3105
3106
3107
3108
3109
3110

3111
3112
3113
3114
3115
3116
3117
....
3128
3129
3130
3131
3132
3133
3134




3135
3136
3137
3138
3139
3140
3141
....
3193
3194
3195
3196
3197
3198
3199





3200
3201
3202
3203
3204
3205
3206
3207
3208
3209

3210
3211
3212
3213
3214

3215
3216
3217
3218
3219
3220
3221
....
3225
3226
3227
3228
3229
3230
3231

3232
3233
3234

3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245

3246
3247

3248
3249
3250
3251
3252
3253
3254
....
3274
3275
3276
3277
3278
3279
3280

3281
3282
3283
3284

3285
3286
3287
3288
3289
3290
3291
....
3292
3293
3294
3295
3296
3297
3298

3299
3300
3301

3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312

3313
3314

3315
3316
3317
3318
3319
3320
3321
....
3353
3354
3355
3356
3357
3358
3359

3360
3361

3362
3363
3364
3365
3366
3367
3368
....
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
....
3411
3412
3413
3414
3415
3416
3417




3418
3419

3420
3421

3422
3423

3424
3425

3426
3427
3428
3429
3430
3431
3432
....
3461
3462
3463
3464
3465
3466
3467

3468
3469

3470
3471
3472
3473
3474
3475
3476
....
3493
3494
3495
3496
3497
3498
3499

3500
3501
3502

3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513

3514
3515

3516
3517
3518
3519
3520

3521
3522

3523
3524
3525
3526
3527
3528

3529
3530

3531
3532
3533
3534
3535
3536
3537
....
3540
3541
3542
3543
3544
3545
3546

3547
3548

3549
3550
3551
3552
3553
3554
3555
....
3557
3558
3559
3560
3561
3562
3563

3564
3565
3566
3567
3568
3569
3570

3571
3572
3573
3574
3575
3576
3577
....
3581
3582
3583
3584
3585
3586
3587

3588
3589

3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602

3603
3604
3605

3606
3607
3608
3609
3610
3611
3612
....
3630
3631
3632
3633
3634
3635
3636

3637
3638
3639
3640
3641
3642
3643
3644
3645

3646
3647
3648
3649
3650
3651
3652
....
3675
3676
3677
3678
3679
3680
3681

3682
3683

3684
3685
3686
3687
3688
3689
3690
....
3694
3695
3696
3697
3698
3699
3700

3701
3702

3703
3704
3705
3706
3707
3708
3709
3710
3711
3712

3713
3714

3715
3716
3717
3718
3719
3720
3721
....
3748
3749
3750
3751
3752
3753
3754
3755

3756
3757
3758
3759
3760
3761
3762
....
3766
3767
3768
3769
3770
3771
3772




3773
3774
3775
3776
3777
3778
3779
....
3866
3867
3868
3869
3870
3871
3872
3873

3874
3875
3876
3877
3878
3879
3880
....
3884
3885
3886
3887
3888
3889
3890




3891
3892
3893
3894
3895
3896
3897
/*

 gg_relations.c -- Gaia spatial relations
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
................................................................................
char *gaia_geos_warning_msg = NULL;
char *gaia_geosaux_error_msg = NULL;

SPATIALITE_PRIVATE void
splite_free_geos_cache_item (struct splite_geos_cache_item *p)
{
#ifndef OMIT_GEOS		/* including GEOS */

    if (p->preparedGeosGeom)
	GEOSPreparedGeom_destroy (p->preparedGeosGeom);
    if (p->geosGeom)
	GEOSGeom_destroy (p->geosGeom);

#endif
    p->geosGeom = NULL;
    p->preparedGeosGeom = NULL;
}

SPATIALITE_PRIVATE void
splite_free_geos_cache_item_r (const void *p_cache,
................................................................................
   the SRID and the Type; so are assumed to represent 
   a valid signature */
    if (memcmp (blob, p->gaiaBlob, 46) == 0)
	return 1;
    return 0;
}

static int
















































































































































evalGeosCache (struct splite_internal_cache *cache, gaiaGeomCollPtr geom1,
	       unsigned char *blob1, int size1, gaiaGeomCollPtr geom2,

	       unsigned char *blob2, int size2, GEOSPreparedGeometry ** gPrep,
	       gaiaGeomCollPtr * geom)
{
/* handling the internal GEOS cache */
    struct splite_geos_cache_item *p1 = &(cache->cacheItem1);
    struct splite_geos_cache_item *p2 = &(cache->cacheItem2);
    uLong crc1 = crc32 (0L, blob1, size1);
    uLong crc2 = crc32 (0L, blob2, size2);








    GEOSContextHandle_t handle = NULL;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    handle = cache->GEOS_handle;
    if (handle == NULL)
	return 0;


























/* checking the first cache item */
    if (evalGeosCacheItem (blob1, size1, crc1, p1))
      {
	  /* found a matching item */
	  if (p1->preparedGeosGeom == NULL)
	    {
		/* preparing the GeosGeometries */
		p1->geosGeom = gaiaToGeos_r (cache, geom1);
		if (p1->geosGeom)
................................................................................
		  }
	    }
	  if (p1->preparedGeosGeom)
	    {
		/* returning the corresponding GeosPreparedGeometry */
		*gPrep = p1->preparedGeosGeom;
		*geom = geom2;
		return 1;

	    }


	  return 0;
      }

/* checking the second cache item */
    if (evalGeosCacheItem (blob2, size2, crc2, p2))
      {
	  /* found a matching item */
	  if (p2->preparedGeosGeom == NULL)
	    {
		/* preparing the GeosGeometries */
		p2->geosGeom = gaiaToGeos_r (cache, geom2);
		if (p2->geosGeom)
................................................................................
		  }
	    }
	  if (p2->preparedGeosGeom)
	    {
		/* returning the corresponding GeosPreparedGeometry */
		*gPrep = p2->preparedGeosGeom;
		*geom = geom1;
		return 1;

	    }


	  return 0;
      }

/* updating the GEOS cache item#1 */
    memcpy (p1->gaiaBlob, blob1, 46);
    p1->gaiaBlobSize = size1;
    p1->crc32 = crc1;
    if (p1->preparedGeosGeom)
	GEOSPreparedGeom_destroy_r (handle, p1->preparedGeosGeom);
    if (p1->geosGeom)
	GEOSGeom_destroy_r (handle, p1->geosGeom);
    p1->geosGeom = NULL;
    p1->preparedGeosGeom = NULL;

/* updating the GEOS cache item#2 */
    memcpy (p2->gaiaBlob, blob2, 46);
    p2->gaiaBlobSize = size2;
    p2->crc32 = crc2;
    if (p2->preparedGeosGeom)
	GEOSPreparedGeom_destroy_r (handle, p2->preparedGeosGeom);
    if (p2->geosGeom)
	GEOSGeom_destroy_r (handle, p2->geosGeom);
    p2->geosGeom = NULL;
    p2->preparedGeosGeom = NULL;







    return 0;
}

GAIAGEO_DECLARE int
gaiaGeomCollEquals (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries are "spatially equal" */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSEquals (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollEquals_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollIntersects (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially intersects" */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSIntersects (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollIntersects_r (const void *p_cache, gaiaGeomCollPtr geom1,
			  gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollDisjoint (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries are "spatially disjoint" */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 1;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSDisjoint (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollDisjoint_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollOverlaps (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially overlaps" */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSOverlaps (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollOverlaps_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCrosses (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially crosses" */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSCrosses (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCrosses_r (const void *p_cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollTouches (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if two Geometries do "spatially touches" */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSTouches (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollTouches_r (const void *p_cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollWithin (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if GEOM-1 is completely contained within GEOM-2 */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSWithin (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollWithin_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollContains (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if GEOM-1 completely contains GEOM-2 */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
	return 0;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSContains (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollContains_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2)
{
................................................................................
}

GAIAGEO_DECLARE int
gaiaGeomCollRelate (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		    const char *pattern)
{
/* checks if if GEOM-1 and GEOM-2 have a spatial relationship as specified by the pattern Matrix */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return -1;
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSRelatePattern (g1, g2, pattern);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret == 2)
	return -1;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollRelate_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2, const char *pattern)
{
................................................................................
    GEOSGeom_destroy_r (handle, g1);
    GEOSGeom_destroy_r (handle, g2);
    if (ret == 2)
	return -1;
    return ret;
}













































































































GAIAGEO_DECLARE int













































gaiaGeomCollLength (gaiaGeomCollPtr geom, double *xlength)
{
/* computes the total length for this Geometry */


    double length;
    int ret;
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSLength (g, &length);
    GEOSGeom_destroy (g);
    if (ret)
	*xlength = length;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollLength_r (const void *p_cache, gaiaGeomCollPtr geom,
		      double *xlength)
{
................................................................................
}

GAIAGEO_DECLARE int
gaiaGeomCollLengthOrPerimeter (gaiaGeomCollPtr geom, int perimeter,
			       double *xlength)
{
/* computes the total length or perimeter for this Geometry */


    double length;
    int ret;
    GEOSGeometry *g;
    int mode = GAIA2GEOS_ONLY_LINESTRINGS;
    if (perimeter)
	mode = GAIA2GEOS_ONLY_POLYGONS;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
................................................................................
	  *xlength = 0.0;
	  return 1;
      }
    ret = GEOSLength (g, &length);
    GEOSGeom_destroy (g);
    if (ret)
	*xlength = length;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollLengthOrPerimeter_r (const void *p_cache, gaiaGeomCollPtr geom,
				 int perimeter, double *xlength)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollArea (gaiaGeomCollPtr geom, double *xarea)
{
/* computes the total area for this Geometry */


    double area;
    int ret;
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSArea (g, &area);
    GEOSGeom_destroy (g);
    if (ret)
	*xarea = area;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollArea_r (const void *p_cache, gaiaGeomCollPtr geom, double *xarea)
{
/* computes the total area for this Geometry */
................................................................................
}

GAIAGEO_DECLARE int
gaiaGeomCollDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		      double *xdist)
{
/* computes the minimum distance intercurring between GEOM-1 and GEOM-2 */


    double dist;
    int ret;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return 0;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
	return 0;
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSDistance (g1, g2, &dist);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret)
	*xdist = dist;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollDistance_r (const void *p_cache, gaiaGeomCollPtr geom1,
			gaiaGeomCollPtr geom2, double *xdist)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryIntersection (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial intersection" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo = gaiaFromGeos_XYZM (g3);
    else
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryIntersection_r (const void *p_cache, gaiaGeomCollPtr geom1,
			    gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryUnion (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial union" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo->DeclaredType = GAIA_MULTIPOINT;
    if (geo->DeclaredType == GAIA_LINESTRING &&
	geom1->DeclaredType == GAIA_MULTILINESTRING)
	geo->DeclaredType = GAIA_MULTILINESTRING;
    if (geo->DeclaredType == GAIA_POLYGON &&
	geom1->DeclaredType == GAIA_MULTIPOLYGON)
	geo->DeclaredType = GAIA_MULTIPOLYGON;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryUnion_r (const void *p_cache, gaiaGeomCollPtr geom1,
		     gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnionCascaded (gaiaGeomCollPtr geom)
{
/* UnionCascaded (single Collection of polygons) */


    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaResetGeosMsg ();
................................................................................
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnionCascaded_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* UnionCascaded (single Collection of polygons) */
................................................................................
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial difference" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo = gaiaFromGeos_XYZM (g3);
    else
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometryDifference_r (const void *p_cache, gaiaGeomCollPtr geom1,
			  gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometrySymDifference (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* builds a new geometry representing the "spatial symmetric difference" of GEOM-1 and GEOM-2 */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;
    if (gaiaIsToxic (geom1) || gaiaIsToxic (geom2))
................................................................................
	geo = gaiaFromGeos_XYZM (g3);
    else
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeometrySymDifference_r (const void *p_cache, gaiaGeomCollPtr geom1,
			     gaiaGeomCollPtr geom2)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaBoundary (gaiaGeomCollPtr geom)
{
/* builds a new geometry representing the combinatorial boundary of GEOM */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaBoundary_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* builds a new geometry representing the combinatorial boundary of GEOM */
................................................................................
    return geo;
}

GAIAGEO_DECLARE int
gaiaGeomCollCentroid (gaiaGeomCollPtr geom, double *x, double *y)
{
/* returns a Point representing the centroid for this Geometry */

    gaiaGeomCollPtr geo;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
................................................................................
      {
	  *x = geo->FirstPoint->X;
	  *y = geo->FirstPoint->Y;
	  gaiaFreeGeomColl (geo);
	  return 1;
      }
    gaiaFreeGeomColl (geo);




    return 0;
}

GAIAGEO_DECLARE int
gaiaGeomCollCentroid_r (const void *p_cache, gaiaGeomCollPtr geom, double *x,
			double *y)
{
................................................................................
    return 0;
}

GAIAGEO_DECLARE int
gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, double *y)
{
/* returns a Point guaranteed to lie on the Surface */

    gaiaGeomCollPtr geo;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return 0;
    if (gaiaIsToxic (geom))
................................................................................
      {
	  *x = geo->FirstPoint->X;
	  *y = geo->FirstPoint->Y;
	  gaiaFreeGeomColl (geo);
	  return 1;
      }
    gaiaFreeGeomColl (geo);




    return 0;
}

GAIAGEO_DECLARE int
gaiaGetPointOnSurface_r (const void *p_cache, gaiaGeomCollPtr geom, double *x,
			 double *y)
{
................................................................................
    if (geom->DimensionModel == GAIA_XY_Z)
	geo = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
	geo = gaiaFromGeos_XYM_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	geo = gaiaFromGeos_XYZM_r (cache, g2);
    else
	geo = gaiaFromGeos_XY_r (cache, g2);
    GEOSGeom_destroy_r (handle, g2);
    if (geo == NULL)
	return 0;
    if (geo->FirstPoint)
      {
	  *x = geo->FirstPoint->X;
	  *y = geo->FirstPoint->Y;
................................................................................
    return 0;
}

GAIAGEO_DECLARE int
gaiaIsSimple (gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a simple one */
    int ret;

    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return -1;
    if (gaiaIsToxic (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSisSimple (g);
    GEOSGeom_destroy (g);
    if (ret == 2)
	return -1;




    return ret;
}

GAIAGEO_DECLARE int
gaiaIsSimple_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a simple one */
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsRing (gaiaLinestringPtr line)
{
/* checks if this LINESTRING can be a valid RING */


    gaiaGeomCollPtr geo;
    gaiaLinestringPtr line2;
    int ret;
    int iv;
    double x;
    double y;
    double z;
    double m;
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
................................................................................
      }
    g = gaiaToGeos (geo);
    gaiaFreeGeomColl (geo);
    ret = GEOSisRing (g);
    GEOSGeom_destroy (g);
    if (ret == 2)
	return -1;




    return ret;
}

GAIAGEO_DECLARE int
gaiaIsRing_r (const void *p_cache, gaiaLinestringPtr line)
{
/* checks if this LINESTRING can be a valid RING */
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaIsValid (gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a valid one */
    int ret;

    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
	return -1;
    if (gaiaIsToxic (geom))
	return 0;
    if (gaiaIsNotClosedGeomColl (geom))
	return 0;
    g = gaiaToGeos (geom);
    ret = GEOSisValid (g);
    GEOSGeom_destroy (g);
    if (ret == 2)
	return -1;




    return ret;
}

GAIAGEO_DECLARE int
gaiaIsValid_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* checks if this GEOMETRYCOLLECTION is a valid one */
................................................................................
}

GAIAGEO_DECLARE char *
gaiaIsValidReason (gaiaGeomCollPtr geom)
{
/* return a TEXT string stating if a Geometry is valid
/ and if not valid, a reason why */
    char *text;

    int len;
    const char *str;
    char *gstr;
    GEOSGeometry *g;
    gaiaResetGeosMsg ();
    if (!geom)
      {
................................................................................
    GEOSGeom_destroy (g);
    if (gstr == NULL)
	return NULL;
    len = strlen (gstr);
    text = malloc (len + 1);
    strcpy (text, gstr);
    GEOSFree (gstr);




    return text;
}

GAIAGEO_DECLARE char *
gaiaIsValidReason_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* return a TEXT string stating if a Geometry is valid
................................................................................
      {
	  str = "Invalid: NULL Geometry";
	  len = strlen (str);
	  text = malloc (len + 1);
	  strcpy (text, str);
	  return text;
      }
    if (gaiaIsToxic (geom))
      {
	  str = "Invalid: Toxic Geometry ... too few points";
	  len = strlen (str);
	  text = malloc (len + 1);
	  strcpy (text, str);
	  return text;
      }
    if (gaiaIsNotClosedGeomColl (geom))
      {
	  str = "Invalid: Unclosed Rings were detected";
	  len = strlen (str);
	  text = malloc (len + 1);
	  strcpy (text, str);
	  return text;
      }
................................................................................
    text = malloc (len + 1);
    strcpy (text, gstr);
    GEOSFree_r (handle, gstr);
    return text;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaIsValidDetail (gaiaGeomCollPtr geom)
{
/* return a Geometry detail causing a Geometry to be invalid */


    char *reason = NULL;
    GEOSGeometry *g;
    GEOSGeometry *d = NULL;
    gaiaGeomCollPtr detail;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
    if (gaiaIsNotClosedGeomColl (geom))
	return NULL;
    g = gaiaToGeos (geom);


    GEOSisValidDetail (g, 0, &reason, &d);
    GEOSGeom_destroy (g);
    if (reason != NULL)
	GEOSFree (reason);
    if (d == NULL)
	return NULL;
    detail = gaiaFromGeos_XY (d);
    GEOSGeom_destroy (d);




    return detail;
}

GAIAGEO_DECLARE gaiaGeomCollPtr







gaiaIsValidDetail_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* return a Geometry detail causing a Geometry to be invalid */
    char *reason = NULL;
    GEOSGeometry *g;
    GEOSGeometry *d = NULL;
    gaiaGeomCollPtr detail;
    struct splite_internal_cache *cache =
................................................................................
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
    if (gaiaIsNotClosedGeomColl (geom))
	return NULL;
    g = gaiaToGeos_r (cache, geom);


    GEOSisValidDetail_r (handle, g, 0, &reason, &d);
    GEOSGeom_destroy_r (handle, g);
    if (reason != NULL)
	GEOSFree_r (handle, reason);
    if (d == NULL)
	return NULL;
    detail = gaiaFromGeos_XY_r (cache, d);
    GEOSGeom_destroy_r (handle, d);
    return detail;
}








GAIAGEO_DECLARE int
gaiaIsClosedGeom_r (const void *cache, gaiaGeomCollPtr geom)
{
/* checks if this geometry is a closed linestring (or multilinestring) */
    int ret = 0;
    gaiaLinestringPtr ln;
    if (cache != NULL)
................................................................................
    return gaiaIsClosedGeom_r (NULL, geom);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplify (gaiaGeomCollPtr geom, double tolerance)
{
/* builds a simplified geometry using the Douglas-Peuker algorihtm */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplify_r (const void *p_cache, gaiaGeomCollPtr geom,
			double tolerance)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, double tolerance)
{
/* builds a simplified geometry using the Douglas-Peuker algorihtm [preserving topology] */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology_r (const void *p_cache,
					gaiaGeomCollPtr geom, double tolerance)
{
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConvexHull (gaiaGeomCollPtr geom)
{
/* builds a geometry that is the convex hull of GEOM */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConvexHull_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* builds a geometry that is the convex hull of GEOM */
................................................................................
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollBuffer (gaiaGeomCollPtr geom, double radius, int points)
{
/* builds a geometry that is the GIS buffer of GEOM */
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollBuffer_r (const void *p_cache, gaiaGeomCollPtr geom, double radius,
		      int points)
{
................................................................................
    int ib;
    double x;
    double y;
    double z;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;






    if (handle != NULL)
      {
	  geos_ring = GEOSGetExteriorRing_r (handle, geos);
	  interiors = GEOSGetNumInteriorRings_r (handle, geos);
	  coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
	  GEOSCoordSeq_getDimensions_r (handle, coords, &geos_dims);
	  GEOSCoordSeq_getSize_r (handle, coords, &pts);
      }
    else
      {

	  geos_ring = GEOSGetExteriorRing (geos);
	  interiors = GEOSGetNumInteriorRings (geos);
	  coords = GEOSGeom_getCoordSeq (geos_ring);
	  GEOSCoordSeq_getDimensions (coords, &geos_dims);
	  GEOSCoordSeq_getSize (coords, &pts);

      }

    pg = gaiaAddPolygonToGeomColl (result, pts, interiors);
/* setting up the Exterior ring */
    rng = pg->Exterior;
    for (iv = 0; iv < (int) pts; iv++)
      {
................................................................................
		  {
		      GEOSCoordSeq_getX_r (handle, coords, iv, &x);
		      GEOSCoordSeq_getY_r (handle, coords, iv, &y);
		      GEOSCoordSeq_getZ_r (handle, coords, iv, &z);
		  }
		else
		  {

		      GEOSCoordSeq_getX (coords, iv, &x);
		      GEOSCoordSeq_getY (coords, iv, &y);
		      GEOSCoordSeq_getZ (coords, iv, &z);

		  }
	    }
	  else
	    {
		if (handle != NULL)
		  {
		      GEOSCoordSeq_getX_r (handle, coords, iv, &x);
		      GEOSCoordSeq_getY_r (handle, coords, iv, &y);
		  }
		else
		  {

		      GEOSCoordSeq_getX (coords, iv, &x);
		      GEOSCoordSeq_getY (coords, iv, &y);

		  }
		z = 0.0;
	    }
	  if (rng->DimensionModel == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
	    }
................................................................................
		geos_ring = GEOSGetInteriorRingN_r (handle, geos, ib);
		coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		GEOSCoordSeq_getDimensions_r (handle, coords, &geos_dims);
		GEOSCoordSeq_getSize_r (handle, coords, &pts);
	    }
	  else
	    {

		geos_ring = GEOSGetInteriorRingN (geos, ib);
		coords = GEOSGeom_getCoordSeq (geos_ring);
		GEOSCoordSeq_getDimensions (coords, &geos_dims);
		GEOSCoordSeq_getSize (coords, &pts);

	    }
	  rng = gaiaAddInteriorRing (pg, ib, pts);
	  for (iv = 0; iv < (int) pts; iv++)
	    {
		if (geos_dims == 3)
		  {
		      if (handle != NULL)
................................................................................
			{
			    GEOSCoordSeq_getX_r (handle, coords, iv, &x);
			    GEOSCoordSeq_getY_r (handle, coords, iv, &y);
			    GEOSCoordSeq_getZ_r (handle, coords, iv, &z);
			}
		      else
			{

			    GEOSCoordSeq_getX (coords, iv, &x);
			    GEOSCoordSeq_getY (coords, iv, &y);
			    GEOSCoordSeq_getZ (coords, iv, &z);

			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_getX_r (handle, coords, iv, &x);
			    GEOSCoordSeq_getY_r (handle, coords, iv, &y);
			}
		      else
			{

			    GEOSCoordSeq_getX (coords, iv, &x);
			    GEOSCoordSeq_getY (coords, iv, &y);

			}
		      z = 0.0;
		  }
		if (rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
................................................................................
	  if (handle != NULL)
	    {
		GEOSCoordSeq_getX_r (handle, cs, iv, &x);
		GEOSCoordSeq_getY_r (handle, cs, iv, &y);
	    }
	  else
	    {

		GEOSCoordSeq_getX (cs, iv, &x);
		GEOSCoordSeq_getY (cs, iv, &y);

	    }
	  if (x < *min_x)
	      *min_x = x;
	  if (x > *max_x)
	      *max_x = x;
	  if (y < *min_y)
	      *min_y = y;
................................................................................
    int iv;
    int interiors;
    int geos_dims = 2;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    int items;
    int error;
    double x;
    double y;
    double z;
    double m;
    gaiaGeomCollPtr result = NULL;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
................................................................................
    double max_y1;
    double min_x2;
    double max_x2;
    double min_y2;
    double max_y2;
    int ret;





    if (!geom)
	return NULL;

    if (cache != NULL)
	ret = gaiaIsToxic_r (cache, geom);

    else
	ret = gaiaIsToxic (geom);

    if (ret)
	return NULL;

    pt = geom->FirstPoint;
    while (pt)
      {
	  pts++;
	  pt = pt->Next;
      }
    pg = geom->FirstPolygon;
................................................................................

/* initializing GEOS linestrings */
    ln = geom->FirstLinestring;
    while (ln)
      {
	  if (handle != NULL)
	      cs = GEOSCoordSeq_create_r (handle, ln->Points, geos_dims);

	  else
	      cs = GEOSCoordSeq_create (ln->Points, geos_dims);

	  for (iv = 0; iv < ln->Points; iv++)
	    {
		/* exterior ring segments */
		z = 0.0;
		if (ln->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
................................................................................
			{
			    GEOSCoordSeq_setX_r (handle, cs, iv, x);
			    GEOSCoordSeq_setY_r (handle, cs, iv, y);
			    GEOSCoordSeq_setZ_r (handle, cs, iv, z);
			}
		      else
			{

			    GEOSCoordSeq_setX (cs, iv, x);
			    GEOSCoordSeq_setY (cs, iv, y);
			    GEOSCoordSeq_setZ (cs, iv, z);

			}
		  }
		else
		  {
		      if (handle != NULL)
			{
			    GEOSCoordSeq_setX_r (handle, cs, iv, x);
			    GEOSCoordSeq_setY_r (handle, cs, iv, y);
			}
		      else
			{

			    GEOSCoordSeq_setX (cs, iv, x);
			    GEOSCoordSeq_setY (cs, iv, y);

			}
		  }
	    }
	  if (handle != NULL)
	      *p_item++ = GEOSGeom_createLineString_r (handle, cs);

	  else
	      *p_item++ = GEOSGeom_createLineString (cs);

	  ln = ln->Next;
      }

/* calling GEOSPolygonize */
    if (handle != NULL)
	geos = GEOSPolygonize_r (handle, geos_list, lns);

    else
	geos = GEOSPolygonize (geos_list, lns);

    if (geos == NULL)
	goto cleanup;

/*
/ 
/ GEOSPolygonize is expected to return a collection of Polygons
/
................................................................................
/
/ we must check this, so to *not* return Polygons representing holes
/
*/
    error = 0;
    if (handle != NULL)
	items = GEOSGetNumGeometries_r (handle, geos);

    else
	items = GEOSGetNumGeometries (geos);

    for (ig = 0; ig < items; ig++)
      {
	  /* looping on elementaty GEOS geometries */
	  if (handle != NULL)
	    {
		geos_item = GEOSGetGeometryN_r (handle, geos, ig);
		if (GEOSGeomTypeId_r (handle, geos_item) != GEOS_POLYGON)
................................................................................
		      /* not a Polygon ... ouch ... */
		      error = 1;
		      goto cleanup;
		  }
	    }
	  else
	    {

		geos_item = GEOSGetGeometryN (geos, ig);
		if (GEOSGeomTypeId (geos_item) != GEOS_POLYGON)
		  {
		      /* not a Polygon ... ouch ... */
		      error = 1;
		      goto cleanup;
		  }

	    }
      }

/* identifying valid Polygons [excluding holes] */
    valid_polygons = malloc (items);
    for (ig = 0; ig < items; ig++)
	valid_polygons[ig] = 'Y';
................................................................................
	  if (handle != NULL)
	    {
		geos_item = GEOSGetGeometryN_r (handle, geos, ig);
		interiors = GEOSGetNumInteriorRings_r (handle, geos_item);
	    }
	  else
	    {

		geos_item = GEOSGetGeometryN (geos, ig);
		interiors = GEOSGetNumInteriorRings (geos_item);

	    }
	  for (ib = 0; ib < interiors; ib++)
	    {
		/* looping on any interior ring */
		if (handle != NULL)
		  {
		      geos_ring =
			  GEOSGetInteriorRingN_r (handle, geos_item, ib);
		      coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
		      GEOSCoordSeq_getSize_r (handle, coords, &pts1);
		  }
		else
		  {

		      geos_ring = GEOSGetInteriorRingN (geos_item, ib);
		      coords = GEOSGeom_getCoordSeq (geos_ring);
		      GEOSCoordSeq_getSize (coords, &pts1);

		  }
		auxGeosMbr (handle, coords, pts1, &min_x1, &min_y1, &max_x1,
			    &max_y1);
		for (iv = 0; iv < items; iv++)
		  {
		      if (iv == ig)
			{
................................................................................
			    geos_ring =
				GEOSGetExteriorRing_r (handle, geos_item2);
			    coords = GEOSGeom_getCoordSeq_r (handle, geos_ring);
			    GEOSCoordSeq_getSize_r (handle, coords, &pts2);
			}
		      else
			{

			    geos_item2 = GEOSGetGeometryN (geos, iv);
			    if (GEOSGetNumInteriorRings (geos_item2) > 0)
			      {
				  /* this Polygon contains holes [surely valid] */
				  continue;
			      }
			    geos_ring = GEOSGetExteriorRing (geos_item2);
			    coords = GEOSGeom_getCoordSeq (geos_ring);
			    GEOSCoordSeq_getSize (coords, &pts2);

			}
		      if (pts1 == pts2)
			{
			    auxGeosMbr (handle, coords, pts2, &min_x2, &min_y2,
					&max_x2, &max_y2);
			    if (min_x1 == min_x2 && min_y1 == min_y2
				&& max_x1 == max_x2 && max_y1 == max_y2)
................................................................................
	result->DeclaredType = GAIA_MULTIPOLYGON;

    for (ig = 0; ig < items; ig++)
      {
	  /* looping on GEOS Polygons */
	  if (handle != NULL)
	      geos_item = GEOSGetGeometryN_r (handle, geos, ig);

	  else
	      geos_item = GEOSGetGeometryN (geos, ig);

	  if (valid_polygons[ig] == 'Y')
	      auxFromGeosPolygon (handle, geos_item, result);
      }

  cleanup:
    if (valid_polygons != NULL)
	free (valid_polygons);
................................................................................
	  p_item = (GEOSGeometry **) geos_list;
	  for (iv = 0; iv < lns; iv++)
	    {
		if (*p_item != NULL)
		  {
		      if (handle != NULL)
			  GEOSGeom_destroy_r (handle, *p_item);

		      else
			  GEOSGeom_destroy (*p_item);

		  }
		p_item++;
	    }
	  p_item = (GEOSGeometry **) geos_list;
	  free (p_item);
      }
    if (geos != NULL)
      {
	  if (handle != NULL)
	      GEOSGeom_destroy_r (handle, geos);

	  else
	      GEOSGeom_destroy (geos);

      }
    if (error || result->FirstPolygon == NULL)
      {
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    return result;
................................................................................
    return gaiaPolygonizeCommon (cache, handle, geom, force_multi);
}

GAIAGEO_DECLARE int
gaiaGeomCollCovers (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if geom1 "spatially covers" geom2 */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;

/* quick check based on MBRs comparison */
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSCovers (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret == 2)
	return -1;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCovers_r (const void *p_cache, gaiaGeomCollPtr geom1,
		      gaiaGeomCollPtr geom2)
{
................................................................................
    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCoveredBy (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* checks if geom1 is "spatially covered by" geom2 */
    int ret;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return -1;

/* quick check based on MBRs comparison */
................................................................................
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSCoveredBy (g1, g2);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret == 2)
	return -1;




    return ret;
}

GAIAGEO_DECLARE int
gaiaGeomCollCoveredBy_r (const void *p_cache, gaiaGeomCollPtr geom1,
			 gaiaGeomCollPtr geom2)
{

Changes to src/gaiageo/gg_relations_ext.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
...
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
...
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
...
436
437
438
439
440
441
442
443
444
445

446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
....
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
....
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
....
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217

1218
1219
1220
1221
1222
1223
1224
....
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
....
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
....
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
....
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
....
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
....
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661

1662
1663
1664
1665
1666
1667
1668
....
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
....
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
....
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
....
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974



1975
1976
1977
1978
1979
1980
1981
....
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
....
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
....
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
....
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
....
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
....
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
....
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
....
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
....
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
....
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
....
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
....
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
....
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
....
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
....
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
....
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
....
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
....
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
....
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
....
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
....
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
....
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
....
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
....
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
....
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
....
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
....
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
....
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
....
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
....
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
....
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517

3518
3519
3520
3521
3522
3523
3524
....
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
....
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601

3602
3603
3604
3605
3606
3607
3608
....
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
....
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683

3684
3685
3686
3687
3688
3689
3690
....
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
....
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
....
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202

4203
4204
4205
4206
4207
4208
4209
....
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
....
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
....
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
....
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
....
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
....
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724

4725
4726
4727
4728
4729
4730
4731
....
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
/*

 gg_relations_ext.c -- Gaia spatial relations [advanced]
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
................................................................................
		 int left_right)
{
/*
// builds a geometry that is the OffsetCurve of GEOM 
// (which is expected to be of the LINESTRING type)
//
*/
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
    int lns = 0;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL || radius == 0.0 || points == 0 || left_right == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaOffsetCurve_r (const void *p_cache, gaiaGeomCollPtr geom, double radius,
		   int points, int left_right)
{
................................................................................
		       int left_right)
{
/*
// builds a geometry that is the SingleSided BUFFER of GEOM 
// (which is expected to be of the LINESTRING type)
//
*/
    gaiaGeomCollPtr geo = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSBufferParams *params = NULL;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;
#else
    if (geom == NULL || radius == 0.0 || points == 0 || left_right == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSingleSidedBuffer_r (const void *p_cache, gaiaGeomCollPtr geom,
			 double radius, int points, int left_right)
{
................................................................................
gaiaHausdorffDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		       double *xdist)
{
/* 
/ computes the (discrete) Hausdorff distance intercurring 
/ between GEOM-1 and GEOM-2 
*/
    int ret = 0;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    double dist;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return 0;
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSHausdorffDistance (g1, g2, &dist);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret)
	*xdist = dist;
#else
    if (geom1 == NULL || geom2 == NULL || xdist == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return ret;
}

GAIAGEO_DECLARE int
gaiaHausdorffDistance_r (const void *p_cache, gaiaGeomCollPtr geom1,
			 gaiaGeomCollPtr geom2, double *xdist)
{
................................................................................
gaiaSharedPaths (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/*
// builds a geometry containing Shared Paths commons to GEOM1 & GEOM2 
// (which are expected to be of the LINESTRING/MULTILINESTRING type)
//
*/
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    gaiaGeomCollPtr geo;
    gaiaGeomCollPtr line1;
    gaiaGeomCollPtr line2;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1)
................................................................................
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;
    result = arrange_shared_paths (geo);
    gaiaFreeGeomColl (geo);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSharedPaths_r (const void *p_cache, gaiaGeomCollPtr geom1,
		   gaiaGeomCollPtr geom2)
{
................................................................................
gaiaLineInterpolatePoint (gaiaGeomCollPtr geom, double fraction)
{
/*
 * attempts to intepolate a point on line at dist "fraction" 
 *
 * the fraction is expressed into the range from 0.0 to 1.0
 */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    int pts = 0;
    int lns = 0;
    int pgs = 0;

    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    GEOSGeometry *g;
    GEOSGeometry *g_pt;
    double length;
    double projection;
................................................................................
	result = gaiaFromGeos_XYZM (g_pt);
    else
	result = gaiaFromGeos_XY (g_pt);
    GEOSGeom_destroy (g_pt);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;
#else
    if (geom == NULL || fraction == 0.0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolatePoint_r (const void *p_cache, gaiaGeomCollPtr geom,
			    double fraction)
{
................................................................................
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    GEOSGeometry *g;
    GEOSGeometry *g_pt;
    double length;
    double current_length = 0.0;
    GEOSContextHandle_t handle = NULL;

    if (cache != NULL)
      {
	  if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	      return NULL;
	  handle = cache->GEOS_handle;
	  if (handle == NULL)
	      return NULL;
      }
#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return NULL;
#endif
    if (!geom)
	return NULL;
    if (distance <= 0.0)
	return NULL;

/* checking if a single Linestring has been passed */
    pt = geom->FirstPoint;
................................................................................
	    {
		GEOSGeom_destroy_r (handle, g);
		return NULL;
	    }
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  g = gaiaToGeos (geom);
	  if (GEOSLength (g, &length))
	    {
		if (length <= distance)
		  {
		      /* the line is too short to apply interpolation */
		      GEOSGeom_destroy (g);
................................................................................
		  }
	    }
	  else
	    {
		GEOSGeom_destroy (g);
		return NULL;
	    }
#endif
      }

/* creating the MultiPoint [always supporting M] */
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomCollXYM ();
    if (result == NULL)
      {
	  if (cache != NULL)
	    {
		GEOSGeom_destroy_r (handle, g);
		return NULL;
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		GEOSGeom_destroy (g);
		return NULL;
#endif
	    }
      }

    while (1)
      {
	  /* increasing the current distance */
	  current_length += distance;
	  if (current_length >= length)
	      break;
	  /* interpolating a point */
	  if (handle != NULL)
	      g_pt = GEOSInterpolate_r (handle, g, current_length);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      g_pt = GEOSInterpolate (g, current_length);
#endif
	  if (!g_pt)
	      goto error;
	  if (geom->DimensionModel == GAIA_XY_Z)
	    {
		if (cache != NULL)
		    xpt = gaiaFromGeos_XYZ_r (cache, g_pt);
		else
................................................................................
		if (!pt)
		    goto error;
		gaiaAddPointToGeomCollXYM (result, pt->X, pt->Y,
					   current_length);
	    }
	  if (handle != NULL)
	      GEOSGeom_destroy_r (handle, g_pt);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  else
	      GEOSGeom_destroy (g_pt);
#endif
	  gaiaFreeGeomColl (xpt);
      }
    if (handle != NULL)
	GEOSGeom_destroy_r (handle, g);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
	GEOSGeom_destroy (g);
#endif
    result->Srid = geom->Srid;
    result->DeclaredType = GAIA_MULTIPOINT;
    return result;

  error:
    if (handle != NULL)
      {
	  if (g_pt)
	      GEOSGeom_destroy_r (handle, g_pt);
	  GEOSGeom_destroy_r (handle, g);
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  if (g_pt)
	      GEOSGeom_destroy (g_pt);
	  GEOSGeom_destroy (g);
#endif
      }
    gaiaFreeGeomColl (result);
    return NULL;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr geom, double distance)
................................................................................
{
/* 
 * attempts to compute the location of the closest point on LineString 
 * to the given Point, as a fraction of total 2d line length 
 *
 * the fraction is expressed into the range from 0.0 to 1.0
 */
    double result = -1.0;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    int pts1 = 0;
    int lns1 = 0;
    int pgs1 = 0;
    int pts2 = 0;
    int lns2 = 0;
    int pgs2 = 0;
    double length;
    double projection;

    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
................................................................................
	  /* normalizing as a fraction between 0.0 and 1.0 */
	  result = projection / length;
      }
    else
	result = -1.0;
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
#else
    if (geom1 == NULL || geom2 == NULL)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE double
gaiaLineLocatePoint_r (const void *p_cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
................................................................................
    int i_start = -1;
    int i_end = -1;
    int points;
    double x;
    double y;
    double z;
    double m;
    double x0;
    double y0;
    unsigned int dims;
    GEOSContextHandle_t handle = NULL;

    if (cache != NULL)
      {
	  if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	      return NULL;
	  handle = cache->GEOS_handle;
	  if (handle == NULL)
	      return NULL;
      }
#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return NULL;
#endif
    if (!geom)
	return NULL;

/* checking if a single Linestring has been passed */
    pt = geom->FirstPoint;
    while (pt)
      {
................................................................................
	    }
	  g_start = GEOSInterpolate_r (handle, g, start);
	  g_end = GEOSInterpolate_r (handle, g, end);
	  GEOSGeom_destroy_r (handle, g);
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  g = gaiaToGeos (geom);
	  if (GEOSLength (g, &length))
	    {
		start = length * start_fraction;
		end = length * end_fraction;
	    }
	  else
................................................................................
	    {
		GEOSGeom_destroy (g);
		return NULL;
	    }
	  g_start = GEOSInterpolate (g, start);
	  g_end = GEOSInterpolate (g, end);
	  GEOSGeom_destroy (g);
#endif
      }
    if (!g_start || !g_end)
	return NULL;

/* identifying first and last valid vertex */
    x0 = 0.0;
    y0 = 0.0;
    ln = geom->FirstLinestring;
    for (iv = 0; iv < ln->Points; iv++)
      {



	  switch (ln->DimensionModel)
	    {
	    case GAIA_XY_Z:
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
		break;
	    case GAIA_XY_M:
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
................................................................................
		      segm = GEOSGeom_createLineString_r (handle, cs);
		      GEOSLength_r (handle, segm, &length);
		      total += length;
		      GEOSGeom_destroy_r (handle, segm);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      cs = GEOSCoordSeq_create (2, 2);
		      GEOSCoordSeq_setX (cs, 0, x0);
		      GEOSCoordSeq_setY (cs, 0, y0);
		      GEOSCoordSeq_setX (cs, 1, x);
		      GEOSCoordSeq_setY (cs, 1, y);
		      segm = GEOSGeom_createLineString (cs);
		      GEOSLength (segm, &length);
		      total += length;
		      GEOSGeom_destroy (segm);
#endif
		  }
		if (total > start && i_start < 0)
		    i_start = iv;
		if (total < end)
		    i_end = iv;
	    }
	  x0 = x;
................................................................................
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy_r (handle, g_start);
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  in_cs = GEOSGeom_getCoordSeq (g_start);
	  GEOSCoordSeq_getDimensions (in_cs, &dims);
	  if (dims == 3)
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		GEOSCoordSeq_getZ (in_cs, 0, &z);
................................................................................
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy (g_start);
#endif
      }
    switch (out->DimensionModel)
      {
      case GAIA_XY_Z:
	  gaiaSetPointXYZ (out->Coords, points, x, y, z);
	  break;
      case GAIA_XY_M:
................................................................................
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy_r (handle, g_end);
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  in_cs = GEOSGeom_getCoordSeq (g_end);
	  GEOSCoordSeq_getDimensions (in_cs, &dims);
	  if (dims == 3)
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		GEOSCoordSeq_getZ (in_cs, 0, &z);
................................................................................
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy (g_end);
#endif
      }
    switch (out->DimensionModel)
      {
      case GAIA_XY_Z:
	  gaiaSetPointXYZ (out->Coords, points, x, y, z);
	  break;
      case GAIA_XY_M:
................................................................................
    double y;
    double z;
    double m;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    GEOSGeometry *geos = NULL;
    GEOSGeometry *geos_item;
    GEOSGeometry **geos_coll;
    GEOSCoordSequence *cs;

#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return NULL;
#endif
    if (!gaia)
	return NULL;

    pt = gaia->FirstPoint;
    while (pt)
      {
	  /* counting how many POINTs are there */
	  pts++;
	  pt = pt->Next;
      }
................................................................................
		      GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
		      break;
		  };
		geos_item = GEOSGeom_createPoint_r (handle, cs);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		cs = GEOSCoordSeq_create (1, dims);
		switch (pt->DimensionModel)
		  {
		  case GAIA_XY_Z:
		  case GAIA_XY_Z_M:
		      GEOSCoordSeq_setX (cs, 0, pt->X);
		      GEOSCoordSeq_setY (cs, 0, pt->Y);
................................................................................
		      break;
		  default:
		      GEOSCoordSeq_setX (cs, 0, pt->X);
		      GEOSCoordSeq_setY (cs, 0, pt->Y);
		      break;
		  };
		geos_item = GEOSGeom_createPoint (cs);
#endif
	    }
	  *(geos_coll + nItem++) = geos_item;
	  pt = pt->Next;
      }
    ln = gaia->FirstLinestring;
    while (ln)
      {
................................................................................
			    GEOSCoordSeq_setX_r (handle, cs, 0, x);
			    GEOSCoordSeq_setY_r (handle, cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint_r (handle, cs);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      cs = GEOSCoordSeq_create (1, dims);
		      if (dims == 3)
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			    GEOSCoordSeq_setZ (cs, 0, z);
			}
		      else
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint (cs);
#endif
		  }
		*(geos_coll + nItem++) = geos_item;
	    }
	  ln = ln->Next;
      }
    pg = gaia->FirstPolygon;
    while (pg)
................................................................................
			    GEOSCoordSeq_setX_r (handle, cs, 0, x);
			    GEOSCoordSeq_setY_r (handle, cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint_r (handle, cs);
		  }
		else
		  {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		      cs = GEOSCoordSeq_create (1, dims);
		      if (dims == 3)
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			    GEOSCoordSeq_setZ (cs, 0, z);
			}
		      else
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint (cs);
#endif
		  }
		*(geos_coll + nItem++) = geos_item;
	    }
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* interior ring */
		rng = pg->Interiors + ib;
................................................................................
				  GEOSCoordSeq_setX_r (handle, cs, 0, x);
				  GEOSCoordSeq_setY_r (handle, cs, 0, y);
			      }
			    geos_item = GEOSGeom_createPoint_r (handle, cs);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    cs = GEOSCoordSeq_create (1, dims);
			    if (dims == 3)
			      {
				  GEOSCoordSeq_setX (cs, 0, x);
				  GEOSCoordSeq_setY (cs, 0, y);
				  GEOSCoordSeq_setZ (cs, 0, z);
			      }
			    else
			      {
				  GEOSCoordSeq_setX (cs, 0, x);
				  GEOSCoordSeq_setY (cs, 0, y);
			      }
			    geos_item = GEOSGeom_createPoint (cs);
#endif
			}
		      *(geos_coll + nItem++) = geos_item;
		  }
	    }
	  pg = pg->Next;
      }
    if (handle != NULL)
................................................................................
      {
	  geos =
	      GEOSGeom_createCollection_r (handle, GEOS_MULTIPOINT, geos_coll,
					   pts);
	  free (geos_coll);
	  GEOSSetSRID_r (handle, geos, gaia->Srid);
      }
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
      {
	  geos = GEOSGeom_createCollection (GEOS_MULTIPOINT, geos_coll, pts);
	  free (geos_coll);
	  GEOSSetSRID (geos, gaia->Srid);
      }
#endif
    return geos;
}

static GEOSGeometry *
buildGeosSegments (GEOSContextHandle_t handle, const gaiaGeomCollPtr gaia)
{
/* converting a GAIA Geometry into a GEOS Geometry of SEGMENTS */
................................................................................
    int iv;
    int ib;
    int nItem;
    double x;
    double y;
    double z;
    double m;
    double x0 = 0.0;
    double y0 = 0.0;
    double z0 = 0.0;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    GEOSGeometry *geos = NULL;
    GEOSGeometry *geos_item;
    GEOSGeometry **geos_coll;
    GEOSCoordSequence *cs;

#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return NULL;
#endif
    if (!gaia)
	return NULL;

    ln = gaia->FirstLinestring;
    while (ln)
      {
	  /* counting how many SEGMENTs are there */
	  segms += ln->Points - 1;
	  ln = ln->Next;
      }
................................................................................
				  GEOSCoordSeq_setY_r (handle, cs, 1, y);
			      }
			    geos_item =
				GEOSGeom_createLineString_r (handle, cs);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    cs = GEOSCoordSeq_create (2, dims);
			    if (dims == 3)
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setZ (cs, 0, z0);
				  GEOSCoordSeq_setX (cs, 1, x);
................................................................................
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setX (cs, 1, x);
				  GEOSCoordSeq_setY (cs, 1, y);
			      }
			    geos_item = GEOSGeom_createLineString (cs);
#endif
			}
		      *(geos_coll + nItem++) = geos_item;
		  }
		x0 = x;
		y0 = y;
		z0 = z;
	    }
................................................................................
				  GEOSCoordSeq_setY_r (handle, cs, 1, y);
			      }
			    geos_item =
				GEOSGeom_createLineString_r (handle, cs);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    cs = GEOSCoordSeq_create (2, dims);
			    if (dims == 3)
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setZ (cs, 0, z0);
				  GEOSCoordSeq_setX (cs, 1, x);
................................................................................
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setX (cs, 1, x);
				  GEOSCoordSeq_setY (cs, 1, y);
			      }
			    geos_item = GEOSGeom_createLineString (cs);
#endif
			}
		      *(geos_coll + nItem++) = geos_item;
		  }
		x0 = x;
		y0 = y;
		z0 = z;
	    }
................................................................................
					GEOSCoordSeq_setY_r (handle, cs, 1, y);
				    }
				  geos_item =
				      GEOSGeom_createLineString_r (handle, cs);
			      }
			    else
			      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
				  cs = GEOSCoordSeq_create (2, dims);
				  if (dims == 3)
				    {
					GEOSCoordSeq_setX (cs, 0, x0);
					GEOSCoordSeq_setY (cs, 0, y0);
					GEOSCoordSeq_setZ (cs, 0, z0);
					GEOSCoordSeq_setX (cs, 1, x);
................................................................................
				    {
					GEOSCoordSeq_setX (cs, 0, x0);
					GEOSCoordSeq_setY (cs, 0, y0);
					GEOSCoordSeq_setX (cs, 1, x);
					GEOSCoordSeq_setY (cs, 1, y);
				    }
				  geos_item = GEOSGeom_createLineString (cs);
#endif
			      }
			    *(geos_coll + nItem++) = geos_item;
			}
		      x0 = x;
		      y0 = y;
		      z0 = z;
		  }
................................................................................
      {
	  geos =
	      GEOSGeom_createCollection_r (handle, GEOS_MULTILINESTRING,
					   geos_coll, segms);
	  free (geos_coll);
	  GEOSSetSRID_r (handle, geos, gaia->Srid);
      }
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    else
      {
	  geos =
	      GEOSGeom_createCollection (GEOS_MULTILINESTRING, geos_coll,
					 segms);
	  free (geos_coll);
	  GEOSSetSRID (geos, gaia->Srid);
      }
#endif
    return geos;
}

static gaiaGeomCollPtr
gaiaShortestLineCommon (struct splite_internal_cache *cache,
			gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* attempts to compute the shortest line between two geometries */
    GEOSGeometry *g1_points;
    GEOSGeometry *g1_segments;
    const GEOSGeometry *g1_item;
    GEOSGeometry *g2_points;
    GEOSGeometry *g2_segments;
    const GEOSGeometry *g2_item;
    const GEOSCoordSequence *cs;
    GEOSGeometry *g_pt;
    gaiaGeomCollPtr result = NULL;
    gaiaLinestringPtr ln;
    int nItems1;
    int nItems2;
    int it1;
    int it2;
    unsigned int dims;
    double x_ini = 0.0;
    double y_ini = 0.0;
    double z_ini = 0.0;
    double x_fin = 0.0;
    double y_fin = 0.0;
    double z_fin = 0.0;
    double dist;
    double min_dist = DBL_MAX;
    double projection;
    GEOSContextHandle_t handle = NULL;

    if (cache != NULL)
      {
	  if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	      return NULL;
	  handle = cache->GEOS_handle;
	  if (handle == NULL)
	      return NULL;
      }
#ifdef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    if (handle == NULL)
	return NULL;
#endif
    if (!geom1 || !geom2)
	return NULL;

    g1_points = buildGeosPoints (handle, geom1);
    g1_segments = buildGeosSegments (handle, geom1);
    g2_points = buildGeosPoints (handle, geom2);
    g2_segments = buildGeosSegments (handle, geom2);
................................................................................
	  if (handle != NULL)
	    {
		nItems1 = GEOSGetNumGeometries_r (handle, g1_points);
		nItems2 = GEOSGetNumGeometries_r (handle, g2_points);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		nItems1 = GEOSGetNumGeometries (g1_points);
		nItems2 = GEOSGetNumGeometries (g2_points);
#endif
	    }
	  for (it1 = 0; it1 < nItems1; it1++)
	    {
		if (handle != NULL)
		    g1_item = GEOSGetGeometryN_r (handle, g1_points, it1);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    g1_item = GEOSGetGeometryN (g1_points, it1);
#endif
		for (it2 = 0; it2 < nItems2; it2++)
		  {
		      int distret;
		      if (handle != NULL)
			{
			    g2_item =
				GEOSGetGeometryN_r (handle, g2_points, it2);
			    distret =
				GEOSDistance_r (handle, g1_item, g2_item,
						&dist);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    g2_item = GEOSGetGeometryN (g2_points, it2);
			    distret = GEOSDistance (g1_item, g2_item, &dist);
#endif
			}
		      if (distret)
			{
			    if (dist < min_dist)
			      {
				  /* saving min-dist points */
				  min_dist = dist;
................................................................................
					      GEOSCoordSeq_getY_r (handle, cs,
								   0, &y_fin);
					      z_fin = 0.0;
					  }
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					cs = GEOSGeom_getCoordSeq (g1_item);
					GEOSCoordSeq_getDimensions (cs, &dims);
					if (dims == 3)
					  {
					      GEOSCoordSeq_getX (cs, 0, &x_ini);
					      GEOSCoordSeq_getY (cs, 0, &y_ini);
					      GEOSCoordSeq_getZ (cs, 0, &z_ini);
................................................................................
					  }
					else
					  {
					      GEOSCoordSeq_getX (cs, 0, &x_fin);
					      GEOSCoordSeq_getY (cs, 0, &y_fin);
					      z_fin = 0.0;
					  }
#endif
				    }
			      }
			}
		  }
	    }
      }

................................................................................
	  if (handle != NULL)
	    {
		nItems1 = GEOSGetNumGeometries_r (handle, g1_points);
		nItems2 = GEOSGetNumGeometries_r (handle, g2_segments);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		nItems1 = GEOSGetNumGeometries (g1_points);
		nItems2 = GEOSGetNumGeometries (g2_segments);
#endif
	    }
	  for (it1 = 0; it1 < nItems1; it1++)
	    {
		if (handle != NULL)
		    g1_item = GEOSGetGeometryN_r (handle, g1_points, it1);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    g1_item = GEOSGetGeometryN (g1_points, it1);
#endif
		for (it2 = 0; it2 < nItems2; it2++)
		  {
		      int distret;
		      if (handle != NULL)
			{
			    g2_item =
				GEOSGetGeometryN_r (handle, g2_segments, it2);
			    distret =
				GEOSDistance_r (handle, g1_item, g2_item,
						&dist);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    g2_item = GEOSGetGeometryN (g2_segments, it2);
			    distret = GEOSDistance (g1_item, g2_item, &dist);
#endif
			}
		      if (distret)
			{
			    if (dist < min_dist)
			      {
				  /* saving min-dist points */
				  if (handle != NULL)
................................................................................
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy_r (handle, g_pt);
					  }
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					projection =
					    GEOSProject (g2_item, g1_item);
					g_pt =
					    GEOSInterpolate (g2_item,
							     projection);
					if (g_pt)
					  {
................................................................................
								       &x_fin);
						    GEOSCoordSeq_getY (cs, 0,
								       &y_fin);
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy (g_pt);
					  }
#endif
				    }
			      }
			}
		  }
	    }
      }

................................................................................
	  if (handle != NULL)
	    {
		nItems1 = GEOSGetNumGeometries_r (handle, g1_segments);
		nItems2 = GEOSGetNumGeometries_r (handle, g2_points);
	    }
	  else
	    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		nItems1 = GEOSGetNumGeometries (g1_segments);
		nItems2 = GEOSGetNumGeometries (g2_points);
#endif
	    }
	  for (it1 = 0; it1 < nItems1; it1++)
	    {
		if (handle != NULL)
		    g1_item = GEOSGetGeometryN_r (handle, g1_segments, it1);
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
		else
		    g1_item = GEOSGetGeometryN (g1_segments, it1);
#endif
		for (it2 = 0; it2 < nItems2; it2++)
		  {
		      int distret;
		      if (handle != NULL)
			{
			    g2_item =
				GEOSGetGeometryN_r (handle, g2_points, it2);
			    distret =
				GEOSDistance_r (handle, g1_item, g2_item,
						&dist);
			}
		      else
			{
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
			    g2_item = GEOSGetGeometryN (g2_points, it2);
			    distret = GEOSDistance (g1_item, g2_item, &dist);
#endif
			}
		      if (distret)
			{
			    if (dist < min_dist)
			      {
				  /* saving min-dist points */
				  if (handle != NULL)
................................................................................
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy_r (handle, g_pt);
					  }
				    }
				  else
				    {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
					projection =
					    GEOSProject (g1_item, g2_item);
					g_pt =
					    GEOSInterpolate (g1_item,
							     projection);
					if (g_pt)
					  {
................................................................................
								       &x_fin);
						    GEOSCoordSeq_getY (cs, 0,
								       &y_fin);
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy (g_pt);
					  }
#endif
				    }
			      }
			}
		  }
	    }
      }
    if (handle != NULL)
................................................................................
	  if (g2_points)
	      GEOSGeom_destroy_r (handle, g2_points);
	  if (g2_segments)
	      GEOSGeom_destroy_r (handle, g2_segments);
      }
    else
      {
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
	  if (g1_points)
	      GEOSGeom_destroy (g1_points);
	  if (g1_segments)
	      GEOSGeom_destroy (g1_segments);
	  if (g2_points)
	      GEOSGeom_destroy (g2_points);
	  if (g2_segments)
	      GEOSGeom_destroy (g2_segments);
#endif
      }
    if (min_dist == DBL_MAX || min_dist <= 0.0)
	return NULL;

/* building the shortest line */
    switch (geom1->DimensionModel)
      {
................................................................................
    return gaiaShortestLineCommon (cache, geom1, geom2);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSnap (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance)
{
/* attempts to "snap" geom1 on geom2 using the given tolerance */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;

    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    g3 = GEOSSnap (g1, g2, tolerance);
................................................................................
	result = gaiaFromGeos_XYZM (g3);
    else
	result = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (result == NULL)
	return NULL;
    result->Srid = geom1->Srid;
#else
    if (geom1 == NULL || geom2 == NULL || tolerance == 0.0)
	geom1 = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSnap_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
	    double tolerance)
{
................................................................................
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineMerge (gaiaGeomCollPtr geom)
{
/* attempts to reassemble lines from a collection of sparse fragments */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;

    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;

    g1 = gaiaToGeos (geom);
................................................................................
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineMerge_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* attempts to reassemble lines from a collection of sparse fragments */
................................................................................
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnaryUnion (gaiaGeomCollPtr geom)
{
/* Unary Union (single Collection) */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;

    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
    g1 = gaiaToGeos (geom);
    g2 = GEOSUnaryUnion (g1);
................................................................................
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;
#else
    if (geom == NULL)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnaryUnion_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* Unary Union (single Collection) */
................................................................................
    double z;
    double m;

    new_ln = gaiaAddLinestringToGeomColl (result, pts);

    for (iv = i_start; iv <= i_end; iv++)
      {
	  m = 0.0;
	  z = 0.0;
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
................................................................................
#ifdef GEOS_ADVANCED		/* GEOS advanced features - 3.4.0 */

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaDelaunayTriangulation (gaiaGeomCollPtr geom, double tolerance,
			   int only_edges)
{
/* Delaunay Triangulation */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;

    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    g1 = gaiaToGeos (geom);
    g2 = GEOSDelaunayTriangulation (g1, tolerance, only_edges);
    GEOSGeom_destroy (g1);
    if (!g2)
................................................................................
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
#else
    if (geom == NULL || tolerance == 0.0 || only_edges == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaDelaunayTriangulation_r (const void *p_cache, gaiaGeomCollPtr geom,
			     double tolerance, int only_edges)
{
................................................................................
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom)
	return NULL;
    g1 = gaiaToGeos_r (cache, geom);
    g2 = GEOSDelaunayTriangulation_r (handle, g1, tolerance, only_edges);
    GEOSGeom_destroy_r (handle, g1);
    if (!g2)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
	result = gaiaFromGeos_XYM_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
................................................................................
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
    return result;
}

#ifdef GEOS_REENTRANT		/* only if GEOS >= 3.5.0 directly supporting Voronoj */
static gaiaGeomCollPtr
voronoj_envelope (gaiaGeomCollPtr geom, double extra_frame_size)
{
/* building the extended envelope for Voronoj */
    gaiaGeomCollPtr bbox;
    gaiaPolygonPtr pg;
    gaiaRingPtr rect;
    double minx;
    double miny;
    double maxx;
    double maxy;
    double ext_x;
    double ext_y;
    double delta;
    double delta2;

    gaiaMbrGeometry (geom);
/* setting the frame extent */
    if (extra_frame_size < 0.0)
	extra_frame_size = 5.0;
    ext_x = geom->MaxX - geom->MinX;
    ext_y = geom->MaxY - geom->MinY;
    delta = (ext_x * extra_frame_size) / 100.0;
    delta2 = (ext_y * extra_frame_size) / 100.0;
    if (delta2 > delta)
	delta = delta2;
    minx = geom->MinX - delta;
    miny = geom->MinY - delta;
    maxx = geom->MaxX + delta;
    maxy = geom->MaxY + delta;

/* building the frame */
    if (geom->DimensionModel == GAIA_XY_Z)
	bbox = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
	bbox = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	bbox = gaiaAllocGeomCollXYZM ();
    else
	bbox = gaiaAllocGeomColl ();
    bbox->Srid = geom->Srid;
    bbox->DeclaredType = GAIA_POLYGON;
    pg = gaiaAddPolygonToGeomColl (bbox, 5, 0);
    rect = pg->Exterior;
    if (geom->DimensionModel == GAIA_XY_Z)
      {
	  gaiaSetPointXYZ (rect->Coords, 0, minx, miny, 0.0);
	  gaiaSetPointXYZ (rect->Coords, 1, maxx, miny, 0.0);
	  gaiaSetPointXYZ (rect->Coords, 2, maxx, maxy, 0.0);
	  gaiaSetPointXYZ (rect->Coords, 3, minx, maxy, 0.0);
	  gaiaSetPointXYZ (rect->Coords, 4, minx, miny, 0.0);
      }
    else if (geom->DimensionModel == GAIA_XY_M)
      {
	  gaiaSetPointXYM (rect->Coords, 0, minx, miny, 0.0);
	  gaiaSetPointXYM (rect->Coords, 1, maxx, miny, 0.0);
	  gaiaSetPointXYM (rect->Coords, 2, maxx, maxy, 0.0);
	  gaiaSetPointXYM (rect->Coords, 3, minx, maxy, 0.0);
	  gaiaSetPointXYM (rect->Coords, 4, minx, miny, 0.0);
      }
    else if (geom->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaSetPointXYZM (rect->Coords, 0, minx, miny, 0.0, 0.0);
	  gaiaSetPointXYZM (rect->Coords, 1, maxx, miny, 0.0, 0.0);
	  gaiaSetPointXYZM (rect->Coords, 2, maxx, maxy, 0.0, 0.0);
	  gaiaSetPointXYZM (rect->Coords, 3, minx, maxy, 0.0, 0.0);
	  gaiaSetPointXYZM (rect->Coords, 4, minx, miny, 0.0, 0.0);
      }
    else
      {
	  gaiaSetPoint (rect->Coords, 0, minx, miny);	/* vertex # 1 */
	  gaiaSetPoint (rect->Coords, 1, maxx, miny);	/* vertex # 2 */
	  gaiaSetPoint (rect->Coords, 2, maxx, maxy);	/* vertex # 3 */
	  gaiaSetPoint (rect->Coords, 3, minx, maxy);	/* vertex # 4 */
	  gaiaSetPoint (rect->Coords, 4, minx, miny);	/* vertex # 5 [same as vertex # 1 to close the polygon] */
      }

    return bbox;
}

static int
voronoj_mbr_contains (gaiaGeomCollPtr g1, gaiaGeomCollPtr g2)
{
/* checks if MBR#1 fully contains MBR#2 */
    if (g2->MinX < g1->MinX)
	return 0;
    if (g2->MaxX > g1->MaxX)
	return 0;
    if (g2->MinY < g1->MinY)
	return 0;
    if (g2->MaxY > g1->MaxY)
	return 0;
    return 1;
}

static int
voronoj_mbr_overlaps (gaiaGeomCollPtr g1, gaiaGeomCollPtr g2)
{
/* checks if two MBRs do overlap */
    if (g1->MaxX < g2->MinX)
	return 0;
    if (g1->MinX > g2->MaxX)
	return 0;
    if (g1->MaxY < g2->MinY)
	return 0;
    if (g1->MinY > g2->MaxY)
	return 0;
    return 1;
}

static gaiaGeomCollPtr
voronoj_postprocess (struct splite_internal_cache *cache, gaiaGeomCollPtr raw,
		     gaiaGeomCollPtr envelope, int only_edges)
{
/* postprocessing the result returned by GEOS Voronoj */
    gaiaGeomCollPtr candidate;
    gaiaGeomCollPtr result;
    gaiaGeomCollPtr framed;
    gaiaPolygonPtr pg;
    gaiaPolygonPtr new_pg;

    if (raw->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (raw->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else if (raw->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = raw->Srid;
    result->DeclaredType = GAIA_MULTIPOLYGON;

    if (raw->DimensionModel == GAIA_XY_Z)
	candidate = gaiaAllocGeomCollXYZ ();
    else if (raw->DimensionModel == GAIA_XY_M)
	candidate = gaiaAllocGeomCollXYM ();
    else if (raw->DimensionModel == GAIA_XY_Z_M)
	candidate = gaiaAllocGeomCollXYZM ();
    else
	candidate = gaiaAllocGeomColl ();
    candidate->Srid = raw->Srid;
    candidate->DeclaredType = GAIA_POLYGON;

    gaiaMbrGeometry (raw);
    gaiaMbrGeometry (envelope);
    pg = raw->FirstPolygon;
    while (pg != NULL)
      {
	  candidate->FirstPolygon = pg;
	  candidate->LastPolygon = pg;
	  candidate->MinX = pg->MinX;
	  candidate->MinY = pg->MinY;
	  candidate->MaxX = pg->MaxX;
	  candidate->MaxY = pg->MaxY;
	  if (voronoj_mbr_contains (envelope, candidate))
	    {
		/* copying a Polygon fully contained within the frame */
		new_pg = gaiaClonePolygon (pg);
		if (result->FirstPolygon == NULL)
		    result->FirstPolygon = new_pg;
		if (result->LastPolygon != NULL)
		    result->LastPolygon->Next = new_pg;
		result->LastPolygon = new_pg;
	    }
	  else if (voronoj_mbr_overlaps (envelope, candidate))
	    {
		/* found a polygon only partially contained within the frame */
		new_pg = gaiaClonePolygon (pg);
		candidate->FirstPolygon = new_pg;
		candidate->LastPolygon = new_pg;
		if (cache == NULL)
		    framed = gaiaGeometryIntersection (envelope, candidate);
		else
		    framed =
			gaiaGeometryIntersection_r (cache, envelope, candidate);
		candidate->FirstPolygon = NULL;
		candidate->LastPolygon = NULL;
		gaiaFreePolygon (new_pg);
		if (framed)
		  {
		      /* copying all framed polygons into the result */
		      gaiaPolygonPtr pg2 = framed->FirstPolygon;
		      while (pg2 != NULL)
			{
			    if (result->FirstPolygon == NULL)
				result->FirstPolygon = pg2;
			    if (result->LastPolygon != NULL)
				result->LastPolygon->Next = pg2;
			    result->LastPolygon = pg2;
			    pg2 = pg2->Next;
			}
		      framed->FirstPolygon = NULL;
		      framed->LastPolygon = NULL;
		      gaiaFreeGeomColl (framed);
		  }
	    }
	  pg = pg->Next;
      }

    candidate->FirstPolygon = NULL;
    candidate->LastPolygon = NULL;
    gaiaFreeGeomColl (candidate);
    gaiaFreeGeomColl (raw);
    if (only_edges)
      {
	  gaiaGeomCollPtr lines = gaiaLinearize (result, 1);
	  gaiaFreeGeomColl (result);
	  return lines;
      }
    return result;
}
#endif

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaVoronojDiagram (gaiaGeomCollPtr geom, double extra_frame_size,
		    double tolerance, int only_edges)
{
/* Voronoj Diagram */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
#ifdef GEOS_REENTRANT
    GEOSGeometry *env;
    gaiaGeomCollPtr envelope;
#else
    void *voronoj;
    gaiaPolygonPtr pg;
    int pgs = 0;
    int errs = 0;
#endif
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    g1 = gaiaToGeos (geom);
#ifdef GEOS_REENTRANT		/* GEOS >= 3.5.0 directly supports Voronoj */
    envelope = voronoj_envelope (geom, extra_frame_size);
    env = gaiaToGeos (envelope);
    g2 = GEOSVoronoiDiagram (g1, env, tolerance, 0);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (env);
    if (!g2)
      {
	  gaiaFreeGeomColl (envelope);
	  return NULL;
      }
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ (g2);
    else if (geom->DimensionModel == GAIA_XY_M)
	result = gaiaFromGeos_XYM (g2);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    result = voronoj_postprocess (NULL, result, envelope, only_edges);
    gaiaFreeGeomColl (envelope);
    if (result == NULL)
	return NULL;
#else
    g2 = GEOSDelaunayTriangulation (g1, tolerance, 0);
    GEOSGeom_destroy (g1);
    if (!g2)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ (g2);
    else if (geom->DimensionModel == GAIA_XY_M)
................................................................................
    voronoj_free (voronoj);

    result->Srid = geom->Srid;
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
#endif /* end GEOS_REENTRANT */
#else
    if (geom == NULL || extra_frame_size == 0.0 || tolerance == 0.0
	|| only_edges == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif /* end GEOS_USE_ONLY_R_API */
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaVoronojDiagram_r (const void *p_cache, gaiaGeomCollPtr geom,
		      double extra_frame_size, double tolerance, int only_edges)
{
/* Voronoj Diagram */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;
#ifdef GEOS_REENTRANT
    GEOSGeometry *env;
    gaiaGeomCollPtr envelope;
#else
    gaiaPolygonPtr pg;
    int pgs = 0;
    int errs = 0;
    void *voronoj;
#endif
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    GEOSContextHandle_t handle = NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
................................................................................
    handle = cache->GEOS_handle;
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom)
	return NULL;
    g1 = gaiaToGeos_r (cache, geom);
#ifdef GEOS_REENTRANT		/* GEOS >= 3.5.0 directly supports Voronoj */
    envelope = voronoj_envelope (geom, extra_frame_size);
    env = gaiaToGeos_r (cache, envelope);
    g2 = GEOSVoronoiDiagram_r (handle, g1, env, tolerance, 0);
    GEOSGeom_destroy_r (handle, g1);
    GEOSGeom_destroy_r (handle, env);
    if (!g2)
      {
	  gaiaFreeGeomColl (envelope);
	  return NULL;
      }
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
	result = gaiaFromGeos_XYM_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	result = gaiaFromGeos_XYZM_r (cache, g2);
    else
	result = gaiaFromGeos_XY_r (cache, g2);
    GEOSGeom_destroy_r (handle, g2);
    result = voronoj_postprocess (cache, result, envelope, only_edges);
    gaiaFreeGeomColl (envelope);
    if (result == NULL)
	return NULL;
#else
    g2 = GEOSDelaunayTriangulation_r (handle, g1, tolerance, 0);
    GEOSGeom_destroy_r (handle, g1);
    if (!g2)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
................................................................................
    voronoj_free (voronoj);

    result->Srid = geom->Srid;
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
#endif /* end GEOS_REENTRANT */
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConcaveHull (gaiaGeomCollPtr geom, double factor, double tolerance,
		 int allow_holes)
{
/* Concave Hull */
    gaiaGeomCollPtr result = NULL;
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    GEOSGeometry *g1;
    GEOSGeometry *g2;

    gaiaGeomCollPtr concave_hull;
    gaiaPolygonPtr pg;
    int pgs = 0;
    int errs = 0;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
................................................................................
			    allow_holes);
    gaiaFreeGeomColl (result);
    if (!concave_hull)
	return NULL;
    result = concave_hull;

    result->Srid = geom->Srid;
#else
    if (geom == NULL || factor == 0.0 || tolerance == 0.0 || allow_holes == 0)
	geom = NULL;		/* silencing stupid compiler warnings */
#endif
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConcaveHull_r (const void *p_cache, gaiaGeomCollPtr geom, double factor,
		   double tolerance, int allow_holes)
{




|







 







|







 







<
<
<
<
<







 







|
<







 







<
<
<
<







 







|
<







 







<
<
<
<







 







<
<

>












<
<
<
<







 







|
<
|







 







<
<
<
<







 







<
<



>







 







<
<
<
<







 







<









<
<
<
<







 







<







 







<










<
<
<
<
<
<
<
<
|
|
<
<











<


<







 







<


<




<


<













<



<







 







<
<








>







 







<
<
<
<







 







<
<


<









<
<
<
<







 







<







 







<





<
<



>
>
>







 







<









<







 







<







 







<







 







<







 







<







 







|



<
<
<
<
<


<







 







<







 







<







 







<













<







 







<













<







 







<













<







 







<






<







 







|
|
|



|



<
<
<
<
<


<







 







<







 







<







 







<







 







<







 







<







 







<







 







<








<







|








|






|
|
|
|
|
|




<









<
<
<
<







 







<


<





<


<













<


<







 







<







 







<







 







<


<





<


<













<


<







 







<







 







<







 







<


<





<


<













<


<







 







<







 







<







 







<








<







 







<
<



>







 







<
<
<
<







 







<
<


>







 







<
<
<
<







 







<
<


>







 







<
<
<
<







 







<
<







 







<
<


>







 







<
<
<
<







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<
<


<
<
|
<
<



|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<











<
<
<
<




<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<








<
<


>







 







<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
52
53
54
55
56
57
58





59
60
61
62
63
64
65
..
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85
...
135
136
137
138
139
140
141




142
143
144
145
146
147
148
...
235
236
237
238
239
240
241
242

243
244
245
246
247
248
249
...
311
312
313
314
315
316
317




318
319
320
321
322
323
324
...
421
422
423
424
425
426
427


428
429
430
431
432
433
434
435
436
437
438
439
440
441




442
443
444
445
446
447
448
....
1053
1054
1055
1056
1057
1058
1059
1060

1061
1062
1063
1064
1065
1066
1067
1068
....
1100
1101
1102
1103
1104
1105
1106




1107
1108
1109
1110
1111
1112
1113
....
1181
1182
1183
1184
1185
1186
1187


1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
....
1251
1252
1253
1254
1255
1256
1257




1258
1259
1260
1261
1262
1263
1264
....
1368
1369
1370
1371
1372
1373
1374

1375
1376
1377
1378
1379
1380
1381
1382
1383




1384
1385
1386
1387
1388
1389
1390
....
1426
1427
1428
1429
1430
1431
1432

1433
1434
1435
1436
1437
1438
1439
....
1441
1442
1443
1444
1445
1446
1447

1448
1449
1450
1451
1452
1453
1454
1455
1456
1457








1458
1459


1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470

1471
1472

1473
1474
1475
1476
1477
1478
1479
....
1526
1527
1528
1529
1530
1531
1532

1533
1534

1535
1536
1537
1538

1539
1540

1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553

1554
1555
1556

1557
1558
1559
1560
1561
1562
1563
....
1590
1591
1592
1593
1594
1595
1596


1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
....
1668
1669
1670
1671
1672
1673
1674




1675
1676
1677
1678
1679
1680
1681
....
1808
1809
1810
1811
1812
1813
1814


1815
1816

1817
1818
1819
1820
1821
1822
1823
1824
1825




1826
1827
1828
1829
1830
1831
1832
....
1875
1876
1877
1878
1879
1880
1881

1882
1883
1884
1885
1886
1887
1888
....
1889
1890
1891
1892
1893
1894
1895

1896
1897
1898
1899
1900


1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
....
1932
1933
1934
1935
1936
1937
1938

1939
1940
1941
1942
1943
1944
1945
1946
1947

1948
1949
1950
1951
1952
1953
1954
....
2002
2003
2004
2005
2006
2007
2008

2009
2010
2011
2012
2013
2014
2015
....
2019
2020
2021
2022
2023
2024
2025

2026
2027
2028
2029
2030
2031
2032
....
2102
2103
2104
2105
2106
2107
2108

2109
2110
2111
2112
2113
2114
2115
....
2119
2120
2121
2122
2123
2124
2125

2126
2127
2128
2129
2130
2131
2132
....
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192





2193
2194

2195
2196
2197
2198
2199
2200
2201
....
2253
2254
2255
2256
2257
2258
2259

2260
2261
2262
2263
2264
2265
2266
....
2268
2269
2270
2271
2272
2273
2274

2275
2276
2277
2278
2279
2280
2281
....
2312
2313
2314
2315
2316
2317
2318

2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331

2332
2333
2334
2335
2336
2337
2338
....
2372
2373
2374
2375
2376
2377
2378

2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391

2392
2393
2394
2395
2396
2397
2398
....
2430
2431
2432
2433
2434
2435
2436

2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449

2450
2451
2452
2453
2454
2455
2456
....
2457
2458
2459
2460
2461
2462
2463

2464
2465
2466
2467
2468
2469

2470
2471
2472
2473
2474
2475
2476
....
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495





2496
2497

2498
2499
2500
2501
2502
2503
2504
....
2574
2575
2576
2577
2578
2579
2580

2581
2582
2583
2584
2585
2586
2587
....
2592
2593
2594
2595
2596
2597
2598

2599
2600
2601
2602
2603
2604
2605
....
2651
2652
2653
2654
2655
2656
2657

2658
2659
2660
2661
2662
2663
2664
....
2669
2670
2671
2672
2673
2674
2675

2676
2677
2678
2679
2680
2681
2682
....
2726
2727
2728
2729
2730
2731
2732

2733
2734
2735
2736
2737
2738
2739
....
2744
2745
2746
2747
2748
2749
2750

2751
2752
2753
2754
2755
2756
2757
....
2762
2763
2764
2765
2766
2767
2768

2769
2770
2771
2772
2773
2774
2775
2776

2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809

2810
2811
2812
2813
2814
2815
2816
2817
2818




2819
2820
2821
2822
2823
2824
2825
....
2830
2831
2832
2833
2834
2835
2836

2837
2838

2839
2840
2841
2842
2843

2844
2845

2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858

2859
2860

2861
2862
2863
2864
2865
2866
2867
....
2910
2911
2912
2913
2914
2915
2916

2917
2918
2919
2920
2921
2922
2923
....
2938
2939
2940
2941
2942
2943
2944

2945
2946
2947
2948
2949
2950
2951
....
2955
2956
2957
2958
2959
2960
2961

2962
2963

2964
2965
2966
2967
2968

2969
2970

2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983

2984
2985

2986
2987
2988
2989
2990
2991
2992
....
3053
3054
3055
3056
3057
3058
3059

3060
3061
3062
3063
3064
3065
3066
....
3104
3105
3106
3107
3108
3109
3110

3111
3112
3113
3114
3115
3116
3117
....
3121
3122
3123
3124
3125
3126
3127

3128
3129

3130
3131
3132
3133
3134

3135
3136

3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149

3150
3151

3152
3153
3154
3155
3156
3157
3158
....
3219
3220
3221
3222
3223
3224
3225

3226
3227
3228
3229
3230
3231
3232
....
3270
3271
3272
3273
3274
3275
3276

3277
3278
3279
3280
3281
3282
3283
....
3289
3290
3291
3292
3293
3294
3295

3296
3297
3298
3299
3300
3301
3302
3303

3304
3305
3306
3307
3308
3309
3310
....
3371
3372
3373
3374
3375
3376
3377


3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
....
3398
3399
3400
3401
3402
3403
3404




3405
3406
3407
3408
3409
3410
3411
....
3451
3452
3453
3454
3455
3456
3457


3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
....
3477
3478
3479
3480
3481
3482
3483




3484
3485
3486
3487
3488
3489
3490
....
3528
3529
3530
3531
3532
3533
3534


3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
....
3553
3554
3555
3556
3557
3558
3559




3560
3561
3562
3563
3564
3565
3566
....
3781
3782
3783
3784
3785
3786
3787


3788
3789
3790
3791
3792
3793
3794
....
4040
4041
4042
4043
4044
4045
4046


4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
....
4067
4068
4069
4070
4071
4072
4073




4074
4075
4076
4077
4078
4079
4080
....
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
....
4116
4117
4118
4119
4120
4121
4122






















































































































































































































4123
4124
4125
4126
4127


4128
4129


4130


4131
4132
4133
4134
4135
4136
4137
4138

























4139
4140
4141
4142
4143
4144
4145
....
4184
4185
4186
4187
4188
4189
4190






4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201




4202
4203
4204
4205

4206
4207
4208
4209
4210
4211
4212
....
4214
4215
4216
4217
4218
4219
4220

























4221
4222
4223
4224
4225
4226
4227
....
4267
4268
4269
4270
4271
4272
4273

4274
4275
4276
4277
4278
4279
4280
4281


4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
....
4327
4328
4329
4330
4331
4332
4333




4334
4335
4336
4337
4338
4339
4340
/*

 gg_relations_ext.c -- Gaia spatial relations [advanced]
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
................................................................................
		 int left_right)
{
/*
// builds a geometry that is the OffsetCurve of GEOM 
// (which is expected to be of the LINESTRING type)
//
*/
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
    int lns = 0;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaOffsetCurve_r (const void *p_cache, gaiaGeomCollPtr geom, double radius,
		   int points, int left_right)
{
................................................................................
		       int left_right)
{
/*
// builds a geometry that is the SingleSided BUFFER of GEOM 
// (which is expected to be of the LINESTRING type)
//
*/
    gaiaGeomCollPtr geo;

    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSBufferParams *params = NULL;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
................................................................................
	geo = gaiaFromGeos_XYZM (g2);
    else
	geo = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom->Srid;




    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSingleSidedBuffer_r (const void *p_cache, gaiaGeomCollPtr geom,
			 double radius, int points, int left_right)
{
................................................................................
gaiaHausdorffDistance (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
		       double *xdist)
{
/* 
/ computes the (discrete) Hausdorff distance intercurring 
/ between GEOM-1 and GEOM-2 
*/


    double dist;
    int ret;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return 0;
    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    ret = GEOSHausdorffDistance (g1, g2, &dist);
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);
    if (ret)
	*xdist = dist;




    return ret;
}

GAIAGEO_DECLARE int
gaiaHausdorffDistance_r (const void *p_cache, gaiaGeomCollPtr geom1,
			 gaiaGeomCollPtr geom2, double *xdist)
{
................................................................................
gaiaSharedPaths (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/*
// builds a geometry containing Shared Paths commons to GEOM1 & GEOM2 
// (which are expected to be of the LINESTRING/MULTILINESTRING type)
//
*/
    gaiaGeomCollPtr geo;

    gaiaGeomCollPtr result;
    gaiaGeomCollPtr line1;
    gaiaGeomCollPtr line2;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaResetGeosMsg ();
    if (!geom1)
................................................................................
	geo = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (geo == NULL)
	return NULL;
    geo->Srid = geom1->Srid;
    result = arrange_shared_paths (geo);
    gaiaFreeGeomColl (geo);




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSharedPaths_r (const void *p_cache, gaiaGeomCollPtr geom1,
		   gaiaGeomCollPtr geom2)
{
................................................................................
gaiaLineInterpolatePoint (gaiaGeomCollPtr geom, double fraction)
{
/*
 * attempts to intepolate a point on line at dist "fraction" 
 *
 * the fraction is expressed into the range from 0.0 to 1.0
 */


    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaGeomCollPtr result;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    GEOSGeometry *g;
    GEOSGeometry *g_pt;
    double length;
    double projection;
................................................................................
	result = gaiaFromGeos_XYZM (g_pt);
    else
	result = gaiaFromGeos_XY (g_pt);
    GEOSGeom_destroy (g_pt);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolatePoint_r (const void *p_cache, gaiaGeomCollPtr geom,
			    double fraction)
{
................................................................................
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    GEOSGeometry *g;
    GEOSGeometry *g_pt;
    double length;
    double current_length = 0.0;
    GEOSContextHandle_t handle = NULL;

    if (cache != NULL)
      {
	  if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	      return NULL;
	  handle = cache->GEOS_handle;
	  if (handle == NULL)
	      return NULL;
      }




    if (!geom)
	return NULL;
    if (distance <= 0.0)
	return NULL;

/* checking if a single Linestring has been passed */
    pt = geom->FirstPoint;
................................................................................
	    {
		GEOSGeom_destroy_r (handle, g);
		return NULL;
	    }
      }
    else
      {

	  g = gaiaToGeos (geom);
	  if (GEOSLength (g, &length))
	    {
		if (length <= distance)
		  {
		      /* the line is too short to apply interpolation */
		      GEOSGeom_destroy (g);
................................................................................
		  }
	    }
	  else
	    {
		GEOSGeom_destroy (g);
		return NULL;
	    }

      }

/* creating the MultiPoint [always supporting M] */
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomCollXYM ();
    if (result == NULL)
      {








	  GEOSGeom_destroy (g);
	  return NULL;


      }

    while (1)
      {
	  /* increasing the current distance */
	  current_length += distance;
	  if (current_length >= length)
	      break;
	  /* interpolating a point */
	  if (handle != NULL)
	      g_pt = GEOSInterpolate_r (handle, g, current_length);

	  else
	      g_pt = GEOSInterpolate (g, current_length);

	  if (!g_pt)
	      goto error;
	  if (geom->DimensionModel == GAIA_XY_Z)
	    {
		if (cache != NULL)
		    xpt = gaiaFromGeos_XYZ_r (cache, g_pt);
		else
................................................................................
		if (!pt)
		    goto error;
		gaiaAddPointToGeomCollXYM (result, pt->X, pt->Y,
					   current_length);
	    }
	  if (handle != NULL)
	      GEOSGeom_destroy_r (handle, g_pt);

	  else
	      GEOSGeom_destroy (g_pt);

	  gaiaFreeGeomColl (xpt);
      }
    if (handle != NULL)
	GEOSGeom_destroy_r (handle, g);

    else
	GEOSGeom_destroy (g);

    result->Srid = geom->Srid;
    result->DeclaredType = GAIA_MULTIPOINT;
    return result;

  error:
    if (handle != NULL)
      {
	  if (g_pt)
	      GEOSGeom_destroy_r (handle, g_pt);
	  GEOSGeom_destroy_r (handle, g);
      }
    else
      {

	  if (g_pt)
	      GEOSGeom_destroy (g_pt);
	  GEOSGeom_destroy (g);

      }
    gaiaFreeGeomColl (result);
    return NULL;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineInterpolateEquidistantPoints (gaiaGeomCollPtr geom, double distance)
................................................................................
{
/* 
 * attempts to compute the location of the closest point on LineString 
 * to the given Point, as a fraction of total 2d line length 
 *
 * the fraction is expressed into the range from 0.0 to 1.0
 */


    int pts1 = 0;
    int lns1 = 0;
    int pgs1 = 0;
    int pts2 = 0;
    int lns2 = 0;
    int pgs2 = 0;
    double length;
    double projection;
    double result;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
................................................................................
	  /* normalizing as a fraction between 0.0 and 1.0 */
	  result = projection / length;
      }
    else
	result = -1.0;
    GEOSGeom_destroy (g1);
    GEOSGeom_destroy (g2);




    return result;
}

GAIAGEO_DECLARE double
gaiaLineLocatePoint_r (const void *p_cache, gaiaGeomCollPtr geom1,
		       gaiaGeomCollPtr geom2)
{
................................................................................
    int i_start = -1;
    int i_end = -1;
    int points;
    double x;
    double y;
    double z;
    double m;


    unsigned int dims;
    GEOSContextHandle_t handle = NULL;

    if (cache != NULL)
      {
	  if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	      return NULL;
	  handle = cache->GEOS_handle;
	  if (handle == NULL)
	      return NULL;
      }




    if (!geom)
	return NULL;

/* checking if a single Linestring has been passed */
    pt = geom->FirstPoint;
    while (pt)
      {
................................................................................
	    }
	  g_start = GEOSInterpolate_r (handle, g, start);
	  g_end = GEOSInterpolate_r (handle, g, end);
	  GEOSGeom_destroy_r (handle, g);
      }
    else
      {

	  g = gaiaToGeos (geom);
	  if (GEOSLength (g, &length))
	    {
		start = length * start_fraction;
		end = length * end_fraction;
	    }
	  else
................................................................................
	    {
		GEOSGeom_destroy (g);
		return NULL;
	    }
	  g_start = GEOSInterpolate (g, start);
	  g_end = GEOSInterpolate (g, end);
	  GEOSGeom_destroy (g);

      }
    if (!g_start || !g_end)
	return NULL;

/* identifying first and last valid vertex */


    ln = geom->FirstLinestring;
    for (iv = 0; iv < ln->Points; iv++)
      {

	  double x0;
	  double y0;
	  switch (ln->DimensionModel)
	    {
	    case GAIA_XY_Z:
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
		break;
	    case GAIA_XY_M:
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
................................................................................
		      segm = GEOSGeom_createLineString_r (handle, cs);
		      GEOSLength_r (handle, segm, &length);
		      total += length;
		      GEOSGeom_destroy_r (handle, segm);
		  }
		else
		  {

		      cs = GEOSCoordSeq_create (2, 2);
		      GEOSCoordSeq_setX (cs, 0, x0);
		      GEOSCoordSeq_setY (cs, 0, y0);
		      GEOSCoordSeq_setX (cs, 1, x);
		      GEOSCoordSeq_setY (cs, 1, y);
		      segm = GEOSGeom_createLineString (cs);
		      GEOSLength (segm, &length);
		      total += length;
		      GEOSGeom_destroy (segm);

		  }
		if (total > start && i_start < 0)
		    i_start = iv;
		if (total < end)
		    i_end = iv;
	    }
	  x0 = x;
................................................................................
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy_r (handle, g_start);
      }
    else
      {

	  in_cs = GEOSGeom_getCoordSeq (g_start);
	  GEOSCoordSeq_getDimensions (in_cs, &dims);
	  if (dims == 3)
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		GEOSCoordSeq_getZ (in_cs, 0, &z);
................................................................................
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy (g_start);

      }
    switch (out->DimensionModel)
      {
      case GAIA_XY_Z:
	  gaiaSetPointXYZ (out->Coords, points, x, y, z);
	  break;
      case GAIA_XY_M:
................................................................................
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy_r (handle, g_end);
      }
    else
      {

	  in_cs = GEOSGeom_getCoordSeq (g_end);
	  GEOSCoordSeq_getDimensions (in_cs, &dims);
	  if (dims == 3)
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		GEOSCoordSeq_getZ (in_cs, 0, &z);
................................................................................
	    {
		GEOSCoordSeq_getX (in_cs, 0, &x);
		GEOSCoordSeq_getY (in_cs, 0, &y);
		z = 0.0;
		m = 0.0;
	    }
	  GEOSGeom_destroy (g_end);

      }
    switch (out->DimensionModel)
      {
      case GAIA_XY_Z:
	  gaiaSetPointXYZ (out->Coords, points, x, y, z);
	  break;
      case GAIA_XY_M:
................................................................................
    double y;
    double z;
    double m;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    GEOSGeometry *geos;
    GEOSGeometry *geos_item;
    GEOSGeometry **geos_coll;
    GEOSCoordSequence *cs;





    if (!gaia)
	return NULL;

    pt = gaia->FirstPoint;
    while (pt)
      {
	  /* counting how many POINTs are there */
	  pts++;
	  pt = pt->Next;
      }
................................................................................
		      GEOSCoordSeq_setY_r (handle, cs, 0, pt->Y);
		      break;
		  };
		geos_item = GEOSGeom_createPoint_r (handle, cs);
	    }
	  else
	    {

		cs = GEOSCoordSeq_create (1, dims);
		switch (pt->DimensionModel)
		  {
		  case GAIA_XY_Z:
		  case GAIA_XY_Z_M:
		      GEOSCoordSeq_setX (cs, 0, pt->X);
		      GEOSCoordSeq_setY (cs, 0, pt->Y);
................................................................................
		      break;
		  default:
		      GEOSCoordSeq_setX (cs, 0, pt->X);
		      GEOSCoordSeq_setY (cs, 0, pt->Y);
		      break;
		  };
		geos_item = GEOSGeom_createPoint (cs);

	    }
	  *(geos_coll + nItem++) = geos_item;
	  pt = pt->Next;
      }
    ln = gaia->FirstLinestring;
    while (ln)
      {
................................................................................
			    GEOSCoordSeq_setX_r (handle, cs, 0, x);
			    GEOSCoordSeq_setY_r (handle, cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint_r (handle, cs);
		  }
		else
		  {

		      cs = GEOSCoordSeq_create (1, dims);
		      if (dims == 3)
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			    GEOSCoordSeq_setZ (cs, 0, z);
			}
		      else
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint (cs);

		  }
		*(geos_coll + nItem++) = geos_item;
	    }
	  ln = ln->Next;
      }
    pg = gaia->FirstPolygon;
    while (pg)
................................................................................
			    GEOSCoordSeq_setX_r (handle, cs, 0, x);
			    GEOSCoordSeq_setY_r (handle, cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint_r (handle, cs);
		  }
		else
		  {

		      cs = GEOSCoordSeq_create (1, dims);
		      if (dims == 3)
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			    GEOSCoordSeq_setZ (cs, 0, z);
			}
		      else
			{
			    GEOSCoordSeq_setX (cs, 0, x);
			    GEOSCoordSeq_setY (cs, 0, y);
			}
		      geos_item = GEOSGeom_createPoint (cs);

		  }
		*(geos_coll + nItem++) = geos_item;
	    }
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* interior ring */
		rng = pg->Interiors + ib;
................................................................................
				  GEOSCoordSeq_setX_r (handle, cs, 0, x);
				  GEOSCoordSeq_setY_r (handle, cs, 0, y);
			      }
			    geos_item = GEOSGeom_createPoint_r (handle, cs);
			}
		      else
			{

			    cs = GEOSCoordSeq_create (1, dims);
			    if (dims == 3)
			      {
				  GEOSCoordSeq_setX (cs, 0, x);
				  GEOSCoordSeq_setY (cs, 0, y);
				  GEOSCoordSeq_setZ (cs, 0, z);
			      }
			    else
			      {
				  GEOSCoordSeq_setX (cs, 0, x);
				  GEOSCoordSeq_setY (cs, 0, y);
			      }
			    geos_item = GEOSGeom_createPoint (cs);

			}
		      *(geos_coll + nItem++) = geos_item;
		  }
	    }
	  pg = pg->Next;
      }
    if (handle != NULL)
................................................................................
      {
	  geos =
	      GEOSGeom_createCollection_r (handle, GEOS_MULTIPOINT, geos_coll,
					   pts);
	  free (geos_coll);
	  GEOSSetSRID_r (handle, geos, gaia->Srid);
      }

    else
      {
	  geos = GEOSGeom_createCollection (GEOS_MULTIPOINT, geos_coll, pts);
	  free (geos_coll);
	  GEOSSetSRID (geos, gaia->Srid);
      }

    return geos;
}

static GEOSGeometry *
buildGeosSegments (GEOSContextHandle_t handle, const gaiaGeomCollPtr gaia)
{
/* converting a GAIA Geometry into a GEOS Geometry of SEGMENTS */
................................................................................
    int iv;
    int ib;
    int nItem;
    double x;
    double y;
    double z;
    double m;
    double x0;
    double y0;
    double z0;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    GEOSGeometry *geos;
    GEOSGeometry *geos_item;
    GEOSGeometry **geos_coll;
    GEOSCoordSequence *cs;





    if (!gaia)
	return NULL;

    ln = gaia->FirstLinestring;
    while (ln)
      {
	  /* counting how many SEGMENTs are there */
	  segms += ln->Points - 1;
	  ln = ln->Next;
      }
................................................................................
				  GEOSCoordSeq_setY_r (handle, cs, 1, y);
			      }
			    geos_item =
				GEOSGeom_createLineString_r (handle, cs);
			}
		      else
			{

			    cs = GEOSCoordSeq_create (2, dims);
			    if (dims == 3)
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setZ (cs, 0, z0);
				  GEOSCoordSeq_setX (cs, 1, x);
................................................................................
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setX (cs, 1, x);
				  GEOSCoordSeq_setY (cs, 1, y);
			      }
			    geos_item = GEOSGeom_createLineString (cs);

			}
		      *(geos_coll + nItem++) = geos_item;
		  }
		x0 = x;
		y0 = y;
		z0 = z;
	    }
................................................................................
				  GEOSCoordSeq_setY_r (handle, cs, 1, y);
			      }
			    geos_item =
				GEOSGeom_createLineString_r (handle, cs);
			}
		      else
			{

			    cs = GEOSCoordSeq_create (2, dims);
			    if (dims == 3)
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setZ (cs, 0, z0);
				  GEOSCoordSeq_setX (cs, 1, x);
................................................................................
			      {
				  GEOSCoordSeq_setX (cs, 0, x0);
				  GEOSCoordSeq_setY (cs, 0, y0);
				  GEOSCoordSeq_setX (cs, 1, x);
				  GEOSCoordSeq_setY (cs, 1, y);
			      }
			    geos_item = GEOSGeom_createLineString (cs);

			}
		      *(geos_coll + nItem++) = geos_item;
		  }
		x0 = x;
		y0 = y;
		z0 = z;
	    }
................................................................................
					GEOSCoordSeq_setY_r (handle, cs, 1, y);
				    }
				  geos_item =
				      GEOSGeom_createLineString_r (handle, cs);
			      }
			    else
			      {

				  cs = GEOSCoordSeq_create (2, dims);
				  if (dims == 3)
				    {
					GEOSCoordSeq_setX (cs, 0, x0);
					GEOSCoordSeq_setY (cs, 0, y0);
					GEOSCoordSeq_setZ (cs, 0, z0);
					GEOSCoordSeq_setX (cs, 1, x);
................................................................................
				    {
					GEOSCoordSeq_setX (cs, 0, x0);
					GEOSCoordSeq_setY (cs, 0, y0);
					GEOSCoordSeq_setX (cs, 1, x);
					GEOSCoordSeq_setY (cs, 1, y);
				    }
				  geos_item = GEOSGeom_createLineString (cs);

			      }
			    *(geos_coll + nItem++) = geos_item;
			}
		      x0 = x;
		      y0 = y;
		      z0 = z;
		  }
................................................................................
      {
	  geos =
	      GEOSGeom_createCollection_r (handle, GEOS_MULTILINESTRING,
					   geos_coll, segms);
	  free (geos_coll);
	  GEOSSetSRID_r (handle, geos, gaia->Srid);
      }

    else
      {
	  geos =
	      GEOSGeom_createCollection (GEOS_MULTILINESTRING, geos_coll,
					 segms);
	  free (geos_coll);
	  GEOSSetSRID (geos, gaia->Srid);
      }

    return geos;
}

static gaiaGeomCollPtr
gaiaShortestLineCommon (struct splite_internal_cache *cache,
			gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2)
{
/* attempts to compute the the shortest line between two geometries */
    GEOSGeometry *g1_points;
    GEOSGeometry *g1_segments;
    const GEOSGeometry *g1_item;
    GEOSGeometry *g2_points;
    GEOSGeometry *g2_segments;
    const GEOSGeometry *g2_item;
    const GEOSCoordSequence *cs;
    GEOSGeometry *g_pt;
    gaiaGeomCollPtr result;
    gaiaLinestringPtr ln;
    int nItems1;
    int nItems2;
    int it1;
    int it2;
    unsigned int dims;
    double x_ini;
    double y_ini;
    double z_ini;
    double x_fin;
    double y_fin;
    double z_fin;
    double dist;
    double min_dist = DBL_MAX;
    double projection;
    GEOSContextHandle_t handle = NULL;

    if (cache != NULL)
      {
	  if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	      || cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	      return NULL;
	  handle = cache->GEOS_handle;
	  if (handle == NULL)
	      return NULL;
      }




    if (!geom1 || !geom2)
	return NULL;

    g1_points = buildGeosPoints (handle, geom1);
    g1_segments = buildGeosSegments (handle, geom1);
    g2_points = buildGeosPoints (handle, geom2);
    g2_segments = buildGeosSegments (handle, geom2);
................................................................................
	  if (handle != NULL)
	    {
		nItems1 = GEOSGetNumGeometries_r (handle, g1_points);
		nItems2 = GEOSGetNumGeometries_r (handle, g2_points);
	    }
	  else
	    {

		nItems1 = GEOSGetNumGeometries (g1_points);
		nItems2 = GEOSGetNumGeometries (g2_points);

	    }
	  for (it1 = 0; it1 < nItems1; it1++)
	    {
		if (handle != NULL)
		    g1_item = GEOSGetGeometryN_r (handle, g1_points, it1);

		else
		    g1_item = GEOSGetGeometryN (g1_points, it1);

		for (it2 = 0; it2 < nItems2; it2++)
		  {
		      int distret;
		      if (handle != NULL)
			{
			    g2_item =
				GEOSGetGeometryN_r (handle, g2_points, it2);
			    distret =
				GEOSDistance_r (handle, g1_item, g2_item,
						&dist);
			}
		      else
			{

			    g2_item = GEOSGetGeometryN (g2_points, it2);
			    distret = GEOSDistance (g1_item, g2_item, &dist);

			}
		      if (distret)
			{
			    if (dist < min_dist)
			      {
				  /* saving min-dist points */
				  min_dist = dist;
................................................................................
					      GEOSCoordSeq_getY_r (handle, cs,
								   0, &y_fin);
					      z_fin = 0.0;
					  }
				    }
				  else
				    {

					cs = GEOSGeom_getCoordSeq (g1_item);
					GEOSCoordSeq_getDimensions (cs, &dims);
					if (dims == 3)
					  {
					      GEOSCoordSeq_getX (cs, 0, &x_ini);
					      GEOSCoordSeq_getY (cs, 0, &y_ini);
					      GEOSCoordSeq_getZ (cs, 0, &z_ini);
................................................................................
					  }
					else
					  {
					      GEOSCoordSeq_getX (cs, 0, &x_fin);
					      GEOSCoordSeq_getY (cs, 0, &y_fin);
					      z_fin = 0.0;
					  }

				    }
			      }
			}
		  }
	    }
      }

................................................................................
	  if (handle != NULL)
	    {
		nItems1 = GEOSGetNumGeometries_r (handle, g1_points);
		nItems2 = GEOSGetNumGeometries_r (handle, g2_segments);
	    }
	  else
	    {

		nItems1 = GEOSGetNumGeometries (g1_points);
		nItems2 = GEOSGetNumGeometries (g2_segments);

	    }
	  for (it1 = 0; it1 < nItems1; it1++)
	    {
		if (handle != NULL)
		    g1_item = GEOSGetGeometryN_r (handle, g1_points, it1);

		else
		    g1_item = GEOSGetGeometryN (g1_points, it1);

		for (it2 = 0; it2 < nItems2; it2++)
		  {
		      int distret;
		      if (handle != NULL)
			{
			    g2_item =
				GEOSGetGeometryN_r (handle, g2_segments, it2);
			    distret =
				GEOSDistance_r (handle, g1_item, g2_item,
						&dist);
			}
		      else
			{

			    g2_item = GEOSGetGeometryN (g2_segments, it2);
			    distret = GEOSDistance (g1_item, g2_item, &dist);

			}
		      if (distret)
			{
			    if (dist < min_dist)
			      {
				  /* saving min-dist points */
				  if (handle != NULL)
................................................................................
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy_r (handle, g_pt);
					  }
				    }
				  else
				    {

					projection =
					    GEOSProject (g2_item, g1_item);
					g_pt =
					    GEOSInterpolate (g2_item,
							     projection);
					if (g_pt)
					  {
................................................................................
								       &x_fin);
						    GEOSCoordSeq_getY (cs, 0,
								       &y_fin);
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy (g_pt);
					  }

				    }
			      }
			}
		  }
	    }
      }

................................................................................
	  if (handle != NULL)
	    {
		nItems1 = GEOSGetNumGeometries_r (handle, g1_segments);
		nItems2 = GEOSGetNumGeometries_r (handle, g2_points);
	    }
	  else
	    {

		nItems1 = GEOSGetNumGeometries (g1_segments);
		nItems2 = GEOSGetNumGeometries (g2_points);

	    }
	  for (it1 = 0; it1 < nItems1; it1++)
	    {
		if (handle != NULL)
		    g1_item = GEOSGetGeometryN_r (handle, g1_segments, it1);

		else
		    g1_item = GEOSGetGeometryN (g1_segments, it1);

		for (it2 = 0; it2 < nItems2; it2++)
		  {
		      int distret;
		      if (handle != NULL)
			{
			    g2_item =
				GEOSGetGeometryN_r (handle, g2_points, it2);
			    distret =
				GEOSDistance_r (handle, g1_item, g2_item,
						&dist);
			}
		      else
			{

			    g2_item = GEOSGetGeometryN (g2_points, it2);
			    distret = GEOSDistance (g1_item, g2_item, &dist);

			}
		      if (distret)
			{
			    if (dist < min_dist)
			      {
				  /* saving min-dist points */
				  if (handle != NULL)
................................................................................
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy_r (handle, g_pt);
					  }
				    }
				  else
				    {

					projection =
					    GEOSProject (g1_item, g2_item);
					g_pt =
					    GEOSInterpolate (g1_item,
							     projection);
					if (g_pt)
					  {
................................................................................
								       &x_fin);
						    GEOSCoordSeq_getY (cs, 0,
								       &y_fin);
						    z_fin = 0.0;
						}
					      GEOSGeom_destroy (g_pt);
					  }

				    }
			      }
			}
		  }
	    }
      }
    if (handle != NULL)
................................................................................
	  if (g2_points)
	      GEOSGeom_destroy_r (handle, g2_points);
	  if (g2_segments)
	      GEOSGeom_destroy_r (handle, g2_segments);
      }
    else
      {

	  if (g1_points)
	      GEOSGeom_destroy (g1_points);
	  if (g1_segments)
	      GEOSGeom_destroy (g1_segments);
	  if (g2_points)
	      GEOSGeom_destroy (g2_points);
	  if (g2_segments)
	      GEOSGeom_destroy (g2_segments);

      }
    if (min_dist == DBL_MAX || min_dist <= 0.0)
	return NULL;

/* building the shortest line */
    switch (geom1->DimensionModel)
      {
................................................................................
    return gaiaShortestLineCommon (cache, geom1, geom2);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSnap (gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2, double tolerance)
{
/* attempts to "snap" geom1 on geom2 using the given tolerance */


    GEOSGeometry *g1;
    GEOSGeometry *g2;
    GEOSGeometry *g3;
    gaiaGeomCollPtr result;
    gaiaResetGeosMsg ();
    if (!geom1 || !geom2)
	return NULL;

    g1 = gaiaToGeos (geom1);
    g2 = gaiaToGeos (geom2);
    g3 = GEOSSnap (g1, g2, tolerance);
................................................................................
	result = gaiaFromGeos_XYZM (g3);
    else
	result = gaiaFromGeos_XY (g3);
    GEOSGeom_destroy (g3);
    if (result == NULL)
	return NULL;
    result->Srid = geom1->Srid;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSnap_r (const void *p_cache, gaiaGeomCollPtr geom1, gaiaGeomCollPtr geom2,
	    double tolerance)
{
................................................................................
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineMerge (gaiaGeomCollPtr geom)
{
/* attempts to reassemble lines from a collection of sparse fragments */


    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;

    g1 = gaiaToGeos (geom);
................................................................................
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineMerge_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* attempts to reassemble lines from a collection of sparse fragments */
................................................................................
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnaryUnion (gaiaGeomCollPtr geom)
{
/* Unary Union (single Collection) */


    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    if (gaiaIsToxic (geom))
	return NULL;
    g1 = gaiaToGeos (geom);
    g2 = GEOSUnaryUnion (g1);
................................................................................
	result = gaiaFromGeos_XYZM (g2);
    else
	result = gaiaFromGeos_XY (g2);
    GEOSGeom_destroy (g2);
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaUnaryUnion_r (const void *p_cache, gaiaGeomCollPtr geom)
{
/* Unary Union (single Collection) */
................................................................................
    double z;
    double m;

    new_ln = gaiaAddLinestringToGeomColl (result, pts);

    for (iv = i_start; iv <= i_end; iv++)
      {


	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
................................................................................
#ifdef GEOS_ADVANCED		/* GEOS advanced features - 3.4.0 */

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaDelaunayTriangulation (gaiaGeomCollPtr geom, double tolerance,
			   int only_edges)
{
/* Delaunay Triangulation */


    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    g1 = gaiaToGeos (geom);
    g2 = GEOSDelaunayTriangulation (g1, tolerance, only_edges);
    GEOSGeom_destroy (g1);
    if (!g2)
................................................................................
    if (result == NULL)
	return NULL;
    result->Srid = geom->Srid;
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaDelaunayTriangulation_r (const void *p_cache, gaiaGeomCollPtr geom,
			     double tolerance, int only_edges)
{
................................................................................
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom)
	return NULL;
    g1 = gaiaToGeos_r (cache, geom);
    g2 = GEOSDelaunayTriangulation_r (handle, g1, tolerance, only_edges);
    GEOSGeom_destroy (g1);
    if (!g2)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
	result = gaiaFromGeos_XYM_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
................................................................................
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;
    return result;
}























































































































































































































GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaVoronojDiagram (gaiaGeomCollPtr geom, double extra_frame_size,
		    double tolerance, int only_edges)
{
/* Voronoj Diagram */


    GEOSGeometry *g1;
    GEOSGeometry *g2;


    gaiaGeomCollPtr result;


    gaiaPolygonPtr pg;
    int pgs = 0;
    int errs = 0;
    void *voronoj;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
    g1 = gaiaToGeos (geom);

























    g2 = GEOSDelaunayTriangulation (g1, tolerance, 0);
    GEOSGeom_destroy (g1);
    if (!g2)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ (g2);
    else if (geom->DimensionModel == GAIA_XY_M)
................................................................................
    voronoj_free (voronoj);

    result->Srid = geom->Srid;
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;






    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaVoronojDiagram_r (const void *p_cache, gaiaGeomCollPtr geom,
		      double extra_frame_size, double tolerance, int only_edges)
{
/* Voronoj Diagram */
    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;




    gaiaPolygonPtr pg;
    int pgs = 0;
    int errs = 0;
    void *voronoj;

    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    GEOSContextHandle_t handle = NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
................................................................................
    handle = cache->GEOS_handle;
    if (handle == NULL)
	return NULL;
    gaiaResetGeosMsg_r (cache);
    if (!geom)
	return NULL;
    g1 = gaiaToGeos_r (cache, geom);

























    g2 = GEOSDelaunayTriangulation_r (handle, g1, tolerance, 0);
    GEOSGeom_destroy_r (handle, g1);
    if (!g2)
	return NULL;
    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaFromGeos_XYZ_r (cache, g2);
    else if (geom->DimensionModel == GAIA_XY_M)
................................................................................
    voronoj_free (voronoj);

    result->Srid = geom->Srid;
    if (only_edges)
	result->DeclaredType = GAIA_MULTILINESTRING;
    else
	result->DeclaredType = GAIA_MULTIPOLYGON;

    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConcaveHull (gaiaGeomCollPtr geom, double factor, double tolerance,
		 int allow_holes)
{
/* Concave Hull */


    GEOSGeometry *g1;
    GEOSGeometry *g2;
    gaiaGeomCollPtr result;
    gaiaGeomCollPtr concave_hull;
    gaiaPolygonPtr pg;
    int pgs = 0;
    int errs = 0;
    gaiaResetGeosMsg ();
    if (!geom)
	return NULL;
................................................................................
			    allow_holes);
    gaiaFreeGeomColl (result);
    if (!concave_hull)
	return NULL;
    result = concave_hull;

    result->Srid = geom->Srid;




    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaConcaveHull_r (const void *p_cache, gaiaGeomCollPtr geom, double factor,
		   double tolerance, int allow_holes)
{

Deleted src/gaiageo/gg_rttopo.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
/*

 gg_rttopo.c -- Gaia RTTOPO support
    
 version 4.5, 2016 April 18

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module (wrapping liblwgeom APIs) has been entierely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale

HISTORY:
this module was previously name gg_lwgeom.c and was based on liblwgeom;
the current version depends on the newer RTTOPO support

*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <math.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>
#include <spatialite/sqlite.h>
#include <spatialite.h>
#include <spatialite/debug.h>

#include <spatialite/gaiageo.h>

#ifdef ENABLE_RTTOPO		/* enabling RTTOPO support */

#include <librttopo_geom.h>

extern char *rtgeom_to_encoded_polyline (const RTCTX * ctx, const RTGEOM * geom,
					 int precision);
static RTGEOM *rtgeom_from_encoded_polyline (const RTCTX * ctx,
					     const char *encodedpolyline,
					     int precision);

SPATIALITE_PRIVATE const char *
splite_rttopo_version (void)
{
    return rtgeom_version ();
}

GAIAGEO_DECLARE void
gaiaResetRtTopoMsg (const void *p_cache)
{
/* Resets the RTTOPO error and warning messages to an empty state */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

    if (cache->gaia_rttopo_error_msg)
	free (cache->gaia_rttopo_error_msg);
    if (cache->gaia_rttopo_warning_msg)
	free (cache->gaia_rttopo_warning_msg);
    cache->gaia_rttopo_error_msg = NULL;
    cache->gaia_rttopo_warning_msg = NULL;
}

GAIAGEO_DECLARE const char *
gaiaGetRtTopoErrorMsg (const void *p_cache)
{
/* Return the latest RTTOPO error message (if any) */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;

    return cache->gaia_rttopo_error_msg;
}

GAIAGEO_DECLARE void
gaiaSetRtTopoErrorMsg (const void *p_cache, const char *msg)
{
/* Sets the RTTOPO error message */
    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

    if (cache->gaia_rttopo_error_msg)
	free (cache->gaia_rttopo_error_msg);
    cache->gaia_rttopo_error_msg = NULL;
    if (msg == NULL)
	return;

    len = strlen (msg);
    cache->gaia_rttopo_error_msg = malloc (len + 1);
    strcpy (cache->gaia_rttopo_error_msg, msg);
}

GAIAGEO_DECLARE const char *
gaiaGetRtTopoWarningMsg (const void *p_cache)
{
/* Return the latest RTTOPO warning message (if any) */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;

    return cache->gaia_rttopo_warning_msg;
}

GAIAGEO_DECLARE void
gaiaSetRtTopoWarningMsg (const void *p_cache, const char *msg)
{
/* Sets the RTTOPO warning message */
    int len;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

    if (cache->gaia_rttopo_warning_msg)
	free (cache->gaia_rttopo_warning_msg);
    cache->gaia_rttopo_warning_msg = NULL;
    if (msg == NULL)
	return;

    len = strlen (msg);
    cache->gaia_rttopo_warning_msg = malloc (len + 1);
    strcpy (cache->gaia_rttopo_warning_msg, msg);
}

static int
check_unclosed_ring (gaiaRingPtr rng)
{
/* checks if a Ring is closed or not */
    double x0;
    double y0;
    double z0 = 0.0;
    double m0 = 0.0;
    double x1;
    double y1;
    double z1 = 0.0;
    double m1 = 0.0;
    int last = rng->Points - 1;
    if (rng->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (rng->Coords, 0, &x0, &y0, &z0);
      }
    else if (rng->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (rng->Coords, 0, &x0, &y0, &m0);
      }
    else if (rng->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (rng->Coords, 0, &x0, &y0, &z0, &m0);
      }
    else
      {
	  gaiaGetPoint (rng->Coords, 0, &x0, &y0);
      }
    if (rng->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (rng->Coords, last, &x1, &y1, &z1);
      }
    else if (rng->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (rng->Coords, last, &x1, &y1, &m1);
      }
    else if (rng->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (rng->Coords, last, &x1, &y1, &z1, &m1);
      }
    else
      {
	  gaiaGetPoint (rng->Coords, last, &x1, &y1);
      }
    if (x0 == x1 && y0 == y1 && z0 == z1 && m0 == m1)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE void *
toRTGeom (const void *pctx, const void *pgaia)
{
/* converting a GAIA Geometry into a RTGEOM Geometry */
    const RTCTX *ctx = (const RTCTX *) pctx;
    const gaiaGeomCollPtr gaia = (const gaiaGeomCollPtr) pgaia;
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    int has_z;
    int has_m;
    int ngeoms;
    int numg;
    int ib;
    int iv;
    int type;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    int close_ring;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    RTPOINTARRAY *pa;
    RTPOINTARRAY **ppaa;
    RTPOINT4D point;
    RTGEOM **geoms;

    if (!gaia)
	return NULL;
    pt = gaia->FirstPoint;
    while (pt)
      {
	  /* counting how many POINTs are there */
	  pts++;
	  pt = pt->Next;
      }
    ln = gaia->FirstLinestring;
    while (ln)
      {
	  /* counting how many LINESTRINGs are there */
	  lns++;
	  ln = ln->Next;
      }
    pg = gaia->FirstPolygon;
    while (pg)
      {
	  /* counting how many POLYGONs are there */
	  pgs++;
	  pg = pg->Next;
      }
    if (pts == 0 && lns == 0 && pgs == 0)
	return NULL;

    if (pts == 1 && lns == 0 && pgs == 0)
      {
	  /* single Point */
	  pt = gaia->FirstPoint;
	  has_z = 0;
	  has_m = 0;
	  if (gaia->DimensionModel == GAIA_XY_Z
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_z = 1;
	  if (gaia->DimensionModel == GAIA_XY_M
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_m = 1;
	  pa = ptarray_construct (ctx, has_z, has_m, 1);
	  point.x = pt->X;
	  point.y = pt->Y;
	  if (has_z)
	      point.z = pt->Z;
	  if (has_m)
	      point.m = pt->M;
	  ptarray_set_point4d (ctx, pa, 0, &point);
	  return (RTGEOM *) rtpoint_construct (ctx, gaia->Srid, NULL, pa);
      }
    else if (pts == 0 && lns == 1 && pgs == 0)
      {
	  /* single Linestring */
	  ln = gaia->FirstLinestring;
	  has_z = 0;
	  has_m = 0;
	  if (gaia->DimensionModel == GAIA_XY_Z
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_z = 1;
	  if (gaia->DimensionModel == GAIA_XY_M
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_m = 1;
	  pa = ptarray_construct (ctx, has_z, has_m, ln->Points);
	  for (iv = 0; iv < ln->Points; iv++)
	    {
		/* copying vertices */
		if (gaia->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
		  }
		else if (gaia->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
		  }
		else if (gaia->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (ln->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ctx, pa, iv, &point);
	    }
	  return (RTGEOM *) rtline_construct (ctx, gaia->Srid, NULL, pa);
      }
    else if (pts == 0 && lns == 0 && pgs == 1)
      {
	  /* single Polygon */
	  pg = gaia->FirstPolygon;
	  has_z = 0;
	  has_m = 0;
	  if (gaia->DimensionModel == GAIA_XY_Z
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_z = 1;
	  if (gaia->DimensionModel == GAIA_XY_M
	      || gaia->DimensionModel == GAIA_XY_Z_M)
	      has_m = 1;
	  ngeoms = pg->NumInteriors;
	  ppaa = rtalloc (ctx, sizeof (RTPOINTARRAY *) * (ngeoms + 1));
	  rng = pg->Exterior;
	  close_ring = check_unclosed_ring (rng);
	  if (close_ring)
	      ppaa[0] = ptarray_construct (ctx, has_z, has_m, rng->Points + 1);
	  else
	      ppaa[0] = ptarray_construct (ctx, has_z, has_m, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* copying vertices - Exterior Ring */
		if (gaia->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (gaia->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else if (gaia->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ctx, ppaa[0], iv, &point);
	    }
	  if (close_ring)
	    {
		/* making an unclosed ring to be closed */
		if (gaia->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
		  }
		else if (gaia->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
		  }
		else if (gaia->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, 0, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ctx, ppaa[0], rng->Points, &point);
	    }
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* copying vertices - Interior Rings */
		rng = pg->Interiors + ib;
		close_ring = check_unclosed_ring (rng);
		if (close_ring)
		    ppaa[1 + ib] =
			ptarray_construct (ctx, has_z, has_m, rng->Points + 1);
		else
		    ppaa[1 + ib] =
			ptarray_construct (ctx, has_z, has_m, rng->Points);
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ctx, ppaa[1 + ib], iv, &point);
		  }
		if (close_ring)
		  {
		      /* making an unclosed ring to be closed */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, 0, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ctx, ppaa[1 + ib], rng->Points,
					   &point);
		  }
	    }
	  return (RTGEOM *) rtpoly_construct (ctx, gaia->Srid, NULL, ngeoms + 1,
					      ppaa);
      }
    else
      {
	  /* some Collection */
	  switch (gaia->DeclaredType)
	    {
	    case GAIA_POINT:
		type = RTPOINTTYPE;
		break;
	    case GAIA_LINESTRING:
		type = RTLINETYPE;
		break;
	    case GAIA_POLYGON:
		type = RTPOLYGONTYPE;
		break;
	    case GAIA_MULTIPOINT:
		type = RTMULTIPOINTTYPE;
		break;
	    case GAIA_MULTILINESTRING:
		type = RTMULTILINETYPE;
		break;
	    case GAIA_MULTIPOLYGON:
		type = RTMULTIPOLYGONTYPE;
		break;
	    case GAIA_GEOMETRYCOLLECTION:
		type = RTCOLLECTIONTYPE;
		break;
	    default:
		if (lns == 0 && pgs == 0)
		    type = RTMULTIPOINTTYPE;
		else if (pts == 0 && pgs == 0)
		    type = RTMULTILINETYPE;
		else if (pts == 0 && lns == 0)
		    type = RTMULTIPOLYGONTYPE;
		else
		    type = RTCOLLECTIONTYPE;
		break;
	    };
	  numg = pts + lns + pgs;
	  geoms = rtalloc (ctx, sizeof (RTGEOM *) * numg);

	  numg = 0;
	  pt = gaia->FirstPoint;
	  while (pt)
	    {
		/* copying POINTs */
		has_z = 0;
		has_m = 0;
		if (gaia->DimensionModel == GAIA_XY_Z
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_z = 1;
		if (gaia->DimensionModel == GAIA_XY_M
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_m = 1;
		pa = ptarray_construct (ctx, has_z, has_m, 1);
		point.x = pt->X;
		point.y = pt->Y;
		if (has_z)
		    point.z = pt->Z;
		if (has_m)
		    point.m = pt->M;
		ptarray_set_point4d (ctx, pa, 0, &point);
		geoms[numg++] =
		    (RTGEOM *) rtpoint_construct (ctx, gaia->Srid, NULL, pa);
		pt = pt->Next;
	    }
	  ln = gaia->FirstLinestring;
	  while (ln)
	    {
		/* copying LINESTRINGs */
		has_z = 0;
		has_m = 0;
		if (gaia->DimensionModel == GAIA_XY_Z
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_z = 1;
		if (gaia->DimensionModel == GAIA_XY_M
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_m = 1;
		pa = ptarray_construct (ctx, has_z, has_m, ln->Points);
		for (iv = 0; iv < ln->Points; iv++)
		  {
		      /* copying vertices */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (ln->Coords, iv, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ctx, pa, iv, &point);
		  }
		geoms[numg++] =
		    (RTGEOM *) rtline_construct (ctx, gaia->Srid, NULL, pa);
		ln = ln->Next;
	    }
	  pg = gaia->FirstPolygon;
	  while (pg)
	    {
		/* copying POLYGONs */
		has_z = 0;
		has_m = 0;
		if (gaia->DimensionModel == GAIA_XY_Z
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_z = 1;
		if (gaia->DimensionModel == GAIA_XY_M
		    || gaia->DimensionModel == GAIA_XY_Z_M)
		    has_m = 1;
		ngeoms = pg->NumInteriors;
		ppaa = rtalloc (ctx, sizeof (RTPOINTARRAY *) * (ngeoms + 1));
		rng = pg->Exterior;
		close_ring = check_unclosed_ring (rng);
		if (close_ring)
		    ppaa[0] =
			ptarray_construct (ctx, has_z, has_m, rng->Points + 1);
		else
		    ppaa[0] =
			ptarray_construct (ctx, has_z, has_m, rng->Points);
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      /* copying vertices - Exterior Ring */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ctx, ppaa[0], iv, &point);
		  }
		if (close_ring)
		  {
		      /* making an unclosed ring to be closed */
		      if (gaia->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
			}
		      else if (gaia->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
			}
		      else if (gaia->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, 0, &x, &y);
			}
		      point.x = x;
		      point.y = y;
		      if (has_z)
			  point.z = z;
		      if (has_m)
			  point.m = m;
		      ptarray_set_point4d (ctx, ppaa[0], rng->Points, &point);
		  }
		for (ib = 0; ib < pg->NumInteriors; ib++)
		  {
		      /* copying vertices - Interior Rings */
		      rng = pg->Interiors + ib;
		      close_ring = check_unclosed_ring (rng);
		      if (close_ring)
			  ppaa[1 + ib] =
			      ptarray_construct (ctx, has_z, has_m,
						 rng->Points + 1);
		      else
			  ppaa[1 + ib] =
			      ptarray_construct (ctx, has_z, has_m,
						 rng->Points);
		      for (iv = 0; iv < rng->Points; iv++)
			{
			    if (gaia->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (rng->Coords, iv, &x, &y,
						    &z, &m);
			      }
			    else
			      {
				  gaiaGetPoint (rng->Coords, iv, &x, &y);
			      }
			    point.x = x;
			    point.y = y;
			    if (has_z)
				point.z = z;
			    if (has_m)
				point.m = m;
			    ptarray_set_point4d (ctx, ppaa[1 + ib], iv, &point);
			}
		      if (close_ring)
			{
			    /* making an unclosed ring to be closed */
			    if (gaia->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
			      }
			    else if (gaia->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (rng->Coords, 0, &x, &y,
						    &z, &m);
			      }
			    else
			      {
				  gaiaGetPoint (rng->Coords, 0, &x, &y);
			      }
			    point.x = x;
			    point.y = y;
			    if (has_z)
				point.z = z;
			    if (has_m)
				point.m = m;
			    ptarray_set_point4d (ctx, ppaa[1 + ib], rng->Points,
						 &point);
			}
		  }
		geoms[numg++] =
		    (RTGEOM *) rtpoly_construct (ctx, gaia->Srid, NULL,
						 ngeoms + 1, ppaa);
		pg = pg->Next;
	    }
	  return (RTGEOM *) rtcollection_construct (ctx, type, gaia->Srid, NULL,
						    numg, geoms);
      }
    return NULL;
}

static gaiaGeomCollPtr
fromRTGeomIncremental (const RTCTX * ctx, gaiaGeomCollPtr gaia,
		       const RTGEOM * rtgeom)
{
/* converting a RTGEOM Geometry into a GAIA Geometry */
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    int dimension_model = gaia->DimensionModel;
    int declared_type = gaia->DeclaredType;
    RTGEOM *rtg2 = NULL;
    RTPOINT *rtp = NULL;
    RTLINE *rtl = NULL;
    RTPOLY *rtpoly = NULL;
    RTCOLLECTION *rtc = NULL;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int has_z;
    int has_m;
    int iv;
    int ib;
    int ngeoms;
    int ng;
    double x;
    double y;
    double z;
    double m;

    if (rtgeom == NULL)
	return NULL;
    if (rtgeom_is_empty (ctx, rtgeom))
	return NULL;

    switch (rtgeom->type)
      {
      case RTPOINTTYPE:
	  rtp = (RTPOINT *) rtgeom;
	  has_z = 0;
	  has_m = 0;
	  pa = rtp->point;
	  if (RTFLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  if (RTFLAGS_GET_M (pa->flags))
	      has_m = 1;
	  rt_getPoint4d_p (ctx, pa, 0, &pt4d);
	  x = pt4d.x;
	  y = pt4d.y;
	  if (has_z)
	      z = pt4d.z;
	  else
	      z = 0.0;
	  if (has_m)
	      m = pt4d.m;
	  else
	      m = 0.0;
	  if (dimension_model == GAIA_XY_Z)
	      gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
	  else if (dimension_model == GAIA_XY_M)
	      gaiaAddPointToGeomCollXYM (gaia, x, y, m);
	  else if (dimension_model == GAIA_XY_Z_M)
	      gaiaAddPointToGeomCollXYZM (gaia, x, y, z, m);
	  else
	      gaiaAddPointToGeomColl (gaia, x, y);
	  if (declared_type == GAIA_MULTIPOINT)
	      gaia->DeclaredType = GAIA_MULTIPOINT;
	  else if (declared_type == GAIA_GEOMETRYCOLLECTION)
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
	  else
	      gaia->DeclaredType = GAIA_POINT;
	  break;
      case RTLINETYPE:
	  rtl = (RTLINE *) rtgeom;
	  has_z = 0;
	  has_m = 0;
	  pa = rtl->points;
	  if (RTFLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  if (RTFLAGS_GET_M (pa->flags))
	      has_m = 1;
	  ln = gaiaAddLinestringToGeomColl (gaia, pa->npoints);
	  for (iv = 0; iv < pa->npoints; iv++)
	    {
		/* copying LINESTRING vertices */
		rt_getPoint4d_p (ctx, pa, iv, &pt4d);
		x = pt4d.x;
		y = pt4d.y;
		if (has_z)
		    z = pt4d.z;
		else
		    z = 0.0;
		if (has_m)
		    m = pt4d.m;
		else
		    m = 0.0;
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
		  }
		else if (dimension_model == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (ln->Coords, iv, x, y, m);
		  }
		else if (dimension_model == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (ln->Coords, iv, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (ln->Coords, iv, x, y);
		  }
	    }
	  if (declared_type == GAIA_MULTILINESTRING)
	      gaia->DeclaredType = GAIA_MULTILINESTRING;
	  else if (declared_type == GAIA_GEOMETRYCOLLECTION)
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
	  else
	      gaia->DeclaredType = GAIA_LINESTRING;
	  break;
      case RTPOLYGONTYPE:
	  rtpoly = (RTPOLY *) rtgeom;
	  has_z = 0;
	  has_m = 0;
	  pa = rtpoly->rings[0];
	  if (RTFLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  if (RTFLAGS_GET_M (pa->flags))
	      has_m = 1;
	  pg = gaiaAddPolygonToGeomColl (gaia, pa->npoints, rtpoly->nrings - 1);
	  rng = pg->Exterior;
	  for (iv = 0; iv < pa->npoints; iv++)
	    {
		/* copying Exterion Ring vertices */
		rt_getPoint4d_p (ctx, pa, iv, &pt4d);
		x = pt4d.x;
		y = pt4d.y;
		if (has_z)
		    z = pt4d.z;
		else
		    z = 0.0;
		if (has_m)
		    m = pt4d.m;
		else
		    m = 0.0;
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
		else if (dimension_model == GAIA_XY_M)
		  {
		      gaiaSetPointXYM (rng->Coords, iv, x, y, m);
		  }
		else if (dimension_model == GAIA_XY_Z_M)
		  {
		      gaiaSetPointXYZM (rng->Coords, iv, x, y, z, m);
		  }
		else
		  {
		      gaiaSetPoint (rng->Coords, iv, x, y);
		  }
	    }
	  for (ib = 1; ib < rtpoly->nrings; ib++)
	    {
		has_z = 0;
		has_m = 0;
		pa = rtpoly->rings[ib];
		if (RTFLAGS_GET_Z (pa->flags))
		    has_z = 1;
		if (RTFLAGS_GET_M (pa->flags))
		    has_m = 1;
		rng = gaiaAddInteriorRing (pg, ib - 1, pa->npoints);
		for (iv = 0; iv < pa->npoints; iv++)
		  {
		      /* copying Exterion Ring vertices */
		      rt_getPoint4d_p (ctx, pa, iv, &pt4d);
		      x = pt4d.x;
		      y = pt4d.y;
		      if (has_z)
			  z = pt4d.z;
		      else
			  z = 0.0;
		      if (has_m)
			  m = pt4d.m;
		      else
			  m = 0.0;
		      if (dimension_model == GAIA_XY_Z)
			{
			    gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			}
		      else if (dimension_model == GAIA_XY_M)
			{
			    gaiaSetPointXYM (rng->Coords, iv, x, y, m);
			}
		      else if (dimension_model == GAIA_XY_Z_M)
			{
			    gaiaSetPointXYZM (rng->Coords, iv, x, y, z, m);
			}
		      else
			{
			    gaiaSetPoint (rng->Coords, iv, x, y);
			}
		  }
	    }
	  if (declared_type == GAIA_MULTIPOLYGON)
	      gaia->DeclaredType = GAIA_MULTIPOLYGON;
	  else if (declared_type == GAIA_GEOMETRYCOLLECTION)
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
	  else
	      gaia->DeclaredType = GAIA_POLYGON;
	  break;
      case RTMULTIPOINTTYPE:
      case RTMULTILINETYPE:
      case RTMULTIPOLYGONTYPE:
      case RTCOLLECTIONTYPE:
	  if (rtgeom->type == RTMULTIPOINTTYPE)
	    {
		if (declared_type == GAIA_GEOMETRYCOLLECTION)
		    gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
		else
		    gaia->DeclaredType = GAIA_MULTIPOINT;
	    }
	  else if (rtgeom->type == RTMULTILINETYPE)
	    {
		if (declared_type == GAIA_GEOMETRYCOLLECTION)
		    gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
		else
		    gaia->DeclaredType = GAIA_MULTILINESTRING;
	    }
	  else if (rtgeom->type == RTMULTIPOLYGONTYPE)
	    {
		if (declared_type == GAIA_GEOMETRYCOLLECTION)
		    gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;
		else
		    gaia->DeclaredType = GAIA_MULTIPOLYGON;
	    }
	  else
	      gaia->DeclaredType = GAIA_GEOMETRYCOLLECTION;

	  rtc = (RTCOLLECTION *) rtgeom;
	  ngeoms = rtc->ngeoms;
	  if (ngeoms == 0)
	    {
		gaiaFreeGeomColl (gaia);
		gaia = NULL;
		break;
	    }
	  for (ng = 0; ng < ngeoms; ++ng)
	    {
		/* looping on elementary geometries */
		rtg2 = rtc->geoms[ng];
		switch (rtg2->type)
		  {
		  case RTPOINTTYPE:
		      rtp = (RTPOINT *) rtg2;
		      has_z = 0;
		      has_m = 0;
		      pa = rtp->point;
		      if (RTFLAGS_GET_Z (pa->flags))
			  has_z = 1;
		      if (RTFLAGS_GET_M (pa->flags))
			  has_m = 1;
		      rt_getPoint4d_p (ctx, pa, 0, &pt4d);
		      x = pt4d.x;
		      y = pt4d.y;
		      if (has_z)
			  z = pt4d.z;
		      else
			  z = 0.0;
		      if (has_m)
			  m = pt4d.m;
		      else
			  m = 0.0;
		      if (dimension_model == GAIA_XY_Z)
			  gaiaAddPointToGeomCollXYZ (gaia, x, y, z);
		      else if (dimension_model == GAIA_XY_M)
			  gaiaAddPointToGeomCollXYM (gaia, x, y, m);
		      else if (dimension_model == GAIA_XY_Z_M)
			  gaiaAddPointToGeomCollXYZM (gaia, x, y, z, m);
		      else
			  gaiaAddPointToGeomColl (gaia, x, y);
		      break;
		  case RTLINETYPE:
		      rtl = (RTLINE *) rtg2;
		      has_z = 0;
		      has_m = 0;
		      pa = rtl->points;
		      if (RTFLAGS_GET_Z (pa->flags))
			  has_z = 1;
		      if (RTFLAGS_GET_M (pa->flags))
			  has_m = 1;
		      ln = gaiaAddLinestringToGeomColl (gaia, pa->npoints);
		      for (iv = 0; iv < pa->npoints; iv++)
			{
			    /* copying LINESTRING vertices */
			    rt_getPoint4d_p (ctx, pa, iv, &pt4d);
			    x = pt4d.x;
			    y = pt4d.y;
			    if (has_z)
				z = pt4d.z;
			    else
				z = 0.0;
			    if (has_m)
				m = pt4d.m;
			    else
				m = 0.0;
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
			      }
			    else if (dimension_model == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (ln->Coords, iv, x, y, m);
			      }
			    else if (dimension_model == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (ln->Coords, iv, x, y, z, m);
			      }
			    else
			      {
				  gaiaSetPoint (ln->Coords, iv, x, y);
			      }
			}
		      break;
		  case RTPOLYGONTYPE:
		      rtpoly = (RTPOLY *) rtg2;
		      has_z = 0;
		      has_m = 0;
		      pa = rtpoly->rings[0];
		      if (RTFLAGS_GET_Z (pa->flags))
			  has_z = 1;
		      if (RTFLAGS_GET_M (pa->flags))
			  has_m = 1;
		      pg = gaiaAddPolygonToGeomColl (gaia, pa->npoints,
						     rtpoly->nrings - 1);
		      rng = pg->Exterior;
		      for (iv = 0; iv < pa->npoints; iv++)
			{
			    /* copying Exterion Ring vertices */
			    rt_getPoint4d_p (ctx, pa, iv, &pt4d);
			    x = pt4d.x;
			    y = pt4d.y;
			    if (has_z)
				z = pt4d.z;
			    else
				z = 0.0;
			    if (has_m)
				m = pt4d.m;
			    else
				m = 0.0;
			    if (dimension_model == GAIA_XY_Z)
			      {
				  gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
			      }
			    else if (dimension_model == GAIA_XY_M)
			      {
				  gaiaSetPointXYM (rng->Coords, iv, x, y, m);
			      }
			    else if (dimension_model == GAIA_XY_Z_M)
			      {
				  gaiaSetPointXYZM (rng->Coords, iv, x, y, z,
						    m);
			      }
			    else
			      {
				  gaiaSetPoint (rng->Coords, iv, x, y);
			      }
			}
		      for (ib = 1; ib < rtpoly->nrings; ib++)
			{
			    has_z = 0;
			    has_m = 0;
			    pa = rtpoly->rings[ib];
			    if (RTFLAGS_GET_Z (pa->flags))
				has_z = 1;
			    if (RTFLAGS_GET_M (pa->flags))
				has_m = 1;
			    rng = gaiaAddInteriorRing (pg, ib - 1, pa->npoints);
			    for (iv = 0; iv < pa->npoints; iv++)
			      {
				  /* copying Exterion Ring vertices */
				  rt_getPoint4d_p (ctx, pa, iv, &pt4d);
				  x = pt4d.x;
				  y = pt4d.y;
				  if (has_z)
				      z = pt4d.z;
				  else
				      z = 0.0;
				  if (has_m)
				      m = pt4d.m;
				  else
				      m = 0.0;
				  if (dimension_model == GAIA_XY_Z)
				    {
					gaiaSetPointXYZ (rng->Coords, iv, x,
							 y, z);
				    }
				  else if (dimension_model == GAIA_XY_M)
				    {
					gaiaSetPointXYM (rng->Coords, iv, x,
							 y, m);
				    }
				  else if (dimension_model == GAIA_XY_Z_M)
				    {
					gaiaSetPointXYZM (rng->Coords, iv, x,
							  y, z, m);
				    }
				  else
				    {
					gaiaSetPoint (rng->Coords, iv, x, y);
				    }
			      }
			}
		      break;
		  };
	    }
	  break;
      default:
	  gaiaFreeGeomColl (gaia);
	  gaia = NULL;
	  break;
      };

    return gaia;
}

SPATIALITE_PRIVATE void *
fromRTGeom (const void *pctx, const void *prtgeom, const int dimension_model,
	    const int declared_type)
{
/* converting a RTGEOM Geometry into a GAIA Geometry */
    gaiaGeomCollPtr gaia = NULL;
    const RTCTX *ctx = (const RTCTX *) pctx;
    const RTGEOM *rtgeom = (const RTGEOM *) prtgeom;

    if (rtgeom == NULL)
	return NULL;
    if (rtgeom_is_empty (ctx, rtgeom))
	return NULL;

    if (dimension_model == GAIA_XY_Z)
	gaia = gaiaAllocGeomCollXYZ ();
    else if (dimension_model == GAIA_XY_M)
	gaia = gaiaAllocGeomCollXYM ();
    else if (dimension_model == GAIA_XY_Z_M)
	gaia = gaiaAllocGeomCollXYZM ();
    else
	gaia = gaiaAllocGeomColl ();
    gaia->DeclaredType = declared_type;
    fromRTGeomIncremental (ctx, gaia, rtgeom);

    return gaia;
}

static int
check_valid_type (const RTGEOM * rtgeom, int declared_type)
{
/* checking if the geometry type is a valid one */
    int ret = 0;
    switch (rtgeom->type)
      {
      case RTPOINTTYPE:
      case RTMULTIPOINTTYPE:
	  if (declared_type == GAIA_POINT || declared_type == GAIA_POINTZ
	      || declared_type == GAIA_POINTM || declared_type == GAIA_POINTZM)
	      ret = 1;
	  if (declared_type == GAIA_MULTIPOINT
	      || declared_type == GAIA_MULTIPOINTZ
	      || declared_type == GAIA_MULTIPOINTM
	      || declared_type == GAIA_MULTIPOINTZM)
	      ret = 1;
	  break;
      case RTLINETYPE:
      case RTMULTILINETYPE:
	  if (declared_type == GAIA_LINESTRING
	      || declared_type == GAIA_LINESTRINGZ
	      || declared_type == GAIA_LINESTRINGM
	      || declared_type == GAIA_LINESTRINGZM)
	      ret = 1;
	  if (declared_type == GAIA_MULTILINESTRING
	      || declared_type == GAIA_MULTILINESTRINGZ
	      || declared_type == GAIA_MULTILINESTRINGM
	      || declared_type == GAIA_MULTILINESTRINGZM)
	      ret = 1;
	  break;
      case RTPOLYGONTYPE:
      case RTMULTIPOLYGONTYPE:
	  if (declared_type == GAIA_POLYGON || declared_type == GAIA_POLYGONZ
	      || declared_type == GAIA_POLYGONM
	      || declared_type == GAIA_POLYGONZM)
	      ret = 1;
	  if (declared_type == GAIA_MULTIPOLYGON
	      || declared_type == GAIA_MULTIPOLYGONZ
	      || declared_type == GAIA_MULTIPOLYGONM
	      || declared_type == GAIA_MULTIPOLYGONZM)
	      ret = 1;
	  break;
      case RTCOLLECTIONTYPE:
	  if (declared_type == GAIA_GEOMETRYCOLLECTION
	      || declared_type == GAIA_GEOMETRYCOLLECTIONZ
	      || declared_type == GAIA_GEOMETRYCOLLECTIONM
	      || declared_type == GAIA_GEOMETRYCOLLECTIONZM)
	      ret = 1;
	  break;
      };
    return ret;
}

static gaiaGeomCollPtr
fromRTGeomValidated (const RTCTX * ctx, const RTGEOM * rtgeom,
		     const int dimension_model, const int declared_type)
{
/* 
/ converting a RTGEOM Geometry into a GAIA Geometry 
/ first collection - validated items
*/
    gaiaGeomCollPtr gaia = NULL;
    RTGEOM *rtg2 = NULL;
    RTCOLLECTION *rtc = NULL;
    int ngeoms;

    if (rtgeom == NULL)
	return NULL;
    if (rtgeom_is_empty (ctx, rtgeom))
	return NULL;

    switch (rtgeom->type)
      {
      case RTCOLLECTIONTYPE:
	  rtc = (RTCOLLECTION *) rtgeom;
	  ngeoms = rtc->ngeoms;
	  if (ngeoms <= 2)
	    {
		rtg2 = rtc->geoms[0];
		if (check_valid_type (rtg2, declared_type))
		    gaia =
			fromRTGeom (ctx, rtg2, dimension_model, declared_type);
	    }
	  break;
      default:
	  if (check_valid_type (rtgeom, declared_type))
	      gaia = fromRTGeom (ctx, rtgeom, dimension_model, declared_type);
	  if (gaia == NULL)
	    {
		/* Andrea Peri: 2013-05-02 returning anyway the RTGEOM geometry,
		   / even if it has a mismatching type */
		int type = -1;
		switch (rtgeom->type)
		  {
		  case RTPOINTTYPE:
		      type = GAIA_POINT;
		      break;
		  case RTLINETYPE:
		      type = GAIA_LINESTRING;
		      break;
		  case RTPOLYGONTYPE:
		      type = GAIA_POLYGON;
		      break;
		  case RTMULTIPOINTTYPE:
		      type = GAIA_MULTIPOINT;
		      break;
		  case RTMULTILINETYPE:
		      type = GAIA_MULTILINESTRING;
		      break;
		  case RTMULTIPOLYGONTYPE:
		      type = GAIA_MULTIPOLYGON;
		      break;
		  };
		if (type >= 0)
		    gaia = fromRTGeom (ctx, rtgeom, dimension_model, type);
	    }
	  break;
      }
    return gaia;
}

static gaiaGeomCollPtr
fromRTGeomDiscarded (const RTCTX * ctx, const RTGEOM * rtgeom,
		     const int dimension_model, const int declared_type)
{
/* 
/ converting a RTGEOM Geometry into a GAIA Geometry 
/ second collection - discarded items
*/
    gaiaGeomCollPtr gaia = NULL;
    RTGEOM *rtg2 = NULL;
    RTCOLLECTION *rtc = NULL;
    int ngeoms;
    int ig;

    if (rtgeom == NULL)
	return NULL;
    if (rtgeom_is_empty (ctx, rtgeom))
	return NULL;

    if (rtgeom->type == RTCOLLECTIONTYPE)
      {
	  if (dimension_model == GAIA_XY_Z)
	      gaia = gaiaAllocGeomCollXYZ ();
	  else if (dimension_model == GAIA_XY_M)
	      gaia = gaiaAllocGeomCollXYM ();
	  else if (dimension_model == GAIA_XY_Z_M)
	      gaia = gaiaAllocGeomCollXYZM ();
	  else
	      gaia = gaiaAllocGeomColl ();
	  rtc = (RTCOLLECTION *) rtgeom;
	  ngeoms = rtc->ngeoms;
	  for (ig = 0; ig < ngeoms; ig++)
	    {
		rtg2 = rtc->geoms[ig];
		if (!check_valid_type (rtg2, declared_type))
		    fromRTGeomIncremental (ctx, gaia, rtg2);
	    }
      }
/*
Andrea Peri: 2013-05-02
when a single geometry is returned by RTGEOM it's always "valid"
and there are no discarded items at all

    else if (!check_valid_type (lwgeom, declared_type))
	gaia = fromRTGeom (lwgeom, dimension_model, declared_type);
*/
    return gaia;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaMakeValid (const void *p_cache, gaiaGeomCollPtr geom)
{
/* wrapping RTGEOM MakeValid [collecting valid items] */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g1 = toRTGeom (ctx, geom);
    g2 = rtgeom_make_valid (ctx, g1);
    if (!g2)
      {
	  rtgeom_free (ctx, g1);
	  goto done;
      }
    result =
	fromRTGeomValidated (ctx, g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaMakeValidDiscarded (const void *p_cache, gaiaGeomCollPtr geom)
{
/* wrapping RTGEOM MakeValid [collecting discarder items] */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g1 = toRTGeom (ctx, geom);
    g2 = rtgeom_make_valid (ctx, g1);
    if (!g2)
      {
	  rtgeom_free (ctx, g1);
	  goto done;
      }
    result =
	fromRTGeomDiscarded (ctx, g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSegmentize (const void *p_cache, gaiaGeomCollPtr geom, double dist)
{
/* wrapping RTGEOM Segmentize */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;
    if (dist <= 0.0)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g1 = toRTGeom (ctx, geom);
    g2 = rtgeom_segmentize2d (ctx, g1, dist);
    if (!g2)
      {
	  rtgeom_free (ctx, g1);
	  goto done;
      }
    result = fromRTGeom (ctx, g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
    return result;
}

static int
check_split_args (gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
{
/* testing Split arguments */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int i_lns = 0;
    int i_pgs = 0;
    int b_pts = 0;
    int b_lns = 0;

    if (!input)
	return 0;
    if (!blade)
	return 0;

/* testing the Input type */
    if (input->FirstPoint != NULL)
      {
	  /* Point(s) on Input is forbidden !!!! */
	  return 0;
      }
    ln = input->FirstLinestring;
    while (ln)
      {
	  /* counting how many Linestrings are there */
	  i_lns++;
	  ln = ln->Next;
      }
    pg = input->FirstPolygon;
    while (pg)
      {
	  /* counting how many Polygons are there */
	  i_pgs++;
	  pg = pg->Next;
      }
    if (i_lns + i_pgs == 0)
      {
	  /* empty Input */
	  return 0;
      }

/* testing the Blade type */
    pt = blade->FirstPoint;
    while (pt)
      {
	  /* counting how many Points are there */
	  b_pts++;
	  pt = pt->Next;
      }
    ln = blade->FirstLinestring;
    while (ln)
      {
	  /* counting how many Linestrings are there */
	  b_lns++;
	  ln = ln->Next;
      }
    if (blade->FirstPolygon != NULL)
      {
	  /* Polygon(s) on Blade is forbidden !!!! */
	  return 0;
      }
    if (b_pts + b_lns == 0)
      {
	  /* empty Blade */
	  return 0;
      }
    if (b_pts >= 1 && b_lns >= 1)
      {
	  /* invalid Blade [point + linestring] */
	  return 0;
      }

/* compatibility check */
    if (b_lns >= 1)
      {
	  /* Linestring blade is always valid */
	  return 1;
      }
    if (i_lns >= 1 && b_pts >= 1)
      {
	  /* Linestring or MultiLinestring input and Point blade is allowed */
	  return 1;
      }

    return 0;
}

static void
set_split_gtype (gaiaGeomCollPtr geom)
{
/* assignign the actual geometry type */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int pts = 0;
    int lns = 0;
    int pgs = 0;

    pt = geom->FirstPoint;
    while (pt)
      {
	  /* counting how many Points are there */
	  pts++;
	  pt = pt->Next;
      }
    ln = geom->FirstLinestring;
    while (ln)
      {
	  /* counting how many Linestrings are there */
	  lns++;
	  ln = ln->Next;
      }
    pg = geom->FirstPolygon;
    while (pg)
      {
	  /* counting how many Polygons are there */
	  pgs++;
	  pg = pg->Next;
      }

    if (pts == 1 && lns == 0 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_POINT;
	  return;
      }
    if (pts > 1 && lns == 0 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_MULTIPOINT;
	  return;
      }
    if (pts == 0 && lns == 1 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_LINESTRING;
	  return;
      }
    if (pts == 0 && lns > 1 && pgs == 0)
      {
	  geom->DeclaredType = GAIA_MULTILINESTRING;
	  return;
      }
    if (pts == 0 && lns == 0 && pgs == 1)
      {
	  geom->DeclaredType = GAIA_POLYGON;
	  return;
      }
    if (pts == 0 && lns == 0 && pgs > 1)
      {
	  geom->DeclaredType = GAIA_MULTIPOLYGON;
	  return;
      }
    geom->DeclaredType = GAIA_GEOMETRYCOLLECTION;
}

static RTGEOM *
toRTGeomLinestring (const RTCTX * ctx, gaiaLinestringPtr ln, int srid)
{
/* converting a GAIA Linestring into a RTGEOM Geometry */
    int iv;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    int has_z = 0;
    int has_m = 0;
    RTPOINTARRAY *pa;
    RTPOINT4D point;

    if (ln->DimensionModel == GAIA_XY_Z || ln->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    if (ln->DimensionModel == GAIA_XY_M || ln->DimensionModel == GAIA_XY_Z_M)
	has_m = 1;
    pa = ptarray_construct (ctx, has_z, has_m, ln->Points);
    for (iv = 0; iv < ln->Points; iv++)
      {
	  /* copying vertices */
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  if (has_m)
	      point.m = m;
	  ptarray_set_point4d (ctx, pa, iv, &point);
      }
    return (RTGEOM *) rtline_construct (ctx, srid, NULL, pa);
}

static RTGEOM *
toRTGeomPolygon (const RTCTX * ctx, gaiaPolygonPtr pg, int srid)
{
/* converting a GAIA Linestring into a RTGEOM Geometry */
    int iv;
    int ib;
    double x = 0.0;
    double y = 0.0;
    double z = 0.0;
    double m = 0.0;
    int ngeoms;
    int has_z = 0;
    int has_m = 0;
    int close_ring;
    gaiaRingPtr rng;
    RTPOINTARRAY **ppaa;
    RTPOINT4D point;

    if (pg->DimensionModel == GAIA_XY_Z || pg->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    if (pg->DimensionModel == GAIA_XY_M || pg->DimensionModel == GAIA_XY_Z_M)
	has_m = 1;
    ngeoms = pg->NumInteriors;
    ppaa = rtalloc (ctx, sizeof (RTPOINTARRAY *) * (ngeoms + 1));
    rng = pg->Exterior;
    close_ring = check_unclosed_ring (rng);
    if (close_ring)
	ppaa[0] = ptarray_construct (ctx, has_z, has_m, rng->Points + 1);
    else
	ppaa[0] = ptarray_construct (ctx, has_z, has_m, rng->Points);
    for (iv = 0; iv < rng->Points; iv++)
      {
	  /* copying vertices - Exterior Ring */
	  if (pg->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
	    }
	  else if (pg->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
	    }
	  else if (pg->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  if (has_m)
	      point.m = m;
	  ptarray_set_point4d (ctx, ppaa[0], iv, &point);
      }
    if (close_ring)
      {
	  /* making an unclosed ring to be closed */
	  if (pg->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
	    }
	  else if (pg->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
	    }
	  else if (pg->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, 0, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  if (has_m)
	      point.m = m;
	  ptarray_set_point4d (ctx, ppaa[0], rng->Points, &point);
      }
    for (ib = 0; ib < pg->NumInteriors; ib++)
      {
	  /* copying vertices - Interior Rings */
	  rng = pg->Interiors + ib;
	  close_ring = check_unclosed_ring (rng);
	  if (close_ring)
	      ppaa[1 + ib] =
		  ptarray_construct (ctx, has_z, has_m, rng->Points + 1);
	  else
	      ppaa[1 + ib] = ptarray_construct (ctx, has_z, has_m, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		if (pg->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (pg->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else if (pg->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ctx, ppaa[1 + ib], iv, &point);
	    }
	  if (close_ring)
	    {
		/* making an unclosed ring to be closed */
		if (pg->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
		  }
		else if (pg->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
		  }
		else if (pg->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, 0, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		if (has_m)
		    point.m = m;
		ptarray_set_point4d (ctx, ppaa[0], rng->Points, &point);
	    }
      }
    return (RTGEOM *) rtpoly_construct (ctx, srid, NULL, ngeoms + 1, ppaa);
}

static gaiaGeomCollPtr
fromRTGeomLeft (const RTCTX * ctx, gaiaGeomCollPtr gaia, const RTGEOM * rtgeom)
{
/* 
/ converting a RTGEOM Geometry into a GAIA Geometry 
/ collecting "left side" items
*/
    RTGEOM *rtg2 = NULL;
    RTCOLLECTION *rtc = NULL;
    int ngeoms;
    int ig;

    if (rtgeom == NULL)
	return NULL;
    if (rtgeom_is_empty (ctx, rtgeom))
	return NULL;

    if (rtgeom->type == RTCOLLECTIONTYPE)
      {
	  rtc = (RTCOLLECTION *) rtgeom;
	  ngeoms = rtc->ngeoms;
	  for (ig = 0; ig < ngeoms; ig += 2)
	    {
		rtg2 = rtc->geoms[ig];
		fromRTGeomIncremental (ctx, gaia, rtg2);
	    }
      }
    else
	gaia =
	    fromRTGeom (ctx, rtgeom, gaia->DimensionModel, gaia->DeclaredType);

    return gaia;
}

static gaiaGeomCollPtr
fromRTGeomRight (const RTCTX * ctx, gaiaGeomCollPtr gaia, const RTGEOM * rtgeom)
{
/* 
/ converting a RTGEOM Geometry into a GAIA Geometry 
/ collecting "right side" items
*/
    RTGEOM *rtg2 = NULL;
    RTCOLLECTION *rtc = NULL;
    int ngeoms;
    int ig;

    if (rtgeom == NULL)
	return NULL;
    if (rtgeom_is_empty (ctx, rtgeom))
	return NULL;

    if (rtgeom->type == RTCOLLECTIONTYPE)
      {
	  rtc = (RTCOLLECTION *) rtgeom;
	  ngeoms = rtc->ngeoms;
	  for (ig = 1; ig < ngeoms; ig += 2)
	    {
		rtg2 = rtc->geoms[ig];
		fromRTGeomIncremental (ctx, gaia, rtg2);
	    }
      }

    return gaia;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSplit (const void *p_cache, gaiaGeomCollPtr input, gaiaGeomCollPtr blade)
{
/* wrapping RTGEOM Split */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    RTGEOM *g3;
    gaiaGeomCollPtr result = NULL;

    if (!check_split_args (input, blade))
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g1 = toRTGeom (ctx, input);
    g2 = toRTGeom (ctx, blade);
    g3 = rtgeom_split (ctx, g1, g2);
    if (!g3)
      {
	  rtgeom_free (ctx, g1);
	  rtgeom_free (ctx, g2);
	  goto done;
      }
    result = fromRTGeom (ctx, g3, input->DimensionModel, input->DeclaredType);
    spatialite_init_geos ();
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    rtgeom_free (ctx, g3);
    if (result == NULL)
	goto done;
    result->Srid = input->Srid;
    set_split_gtype (result);

  done:
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSplitLeft (const void *p_cache, gaiaGeomCollPtr input,
	       gaiaGeomCollPtr blade)
{
/* wrapping RTGEOM Split [left half] */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    RTGEOM *g3;
    gaiaGeomCollPtr result = NULL;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;

    if (!check_split_args (input, blade))
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    if (input->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (input->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else if (input->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomColl ();

    g2 = toRTGeom (ctx, blade);

    ln = input->FirstLinestring;
    while (ln)
      {
	  /* splitting some Linestring */
	  g1 = toRTGeomLinestring (ctx, ln, input->Srid);
	  g3 = rtgeom_split (ctx, g1, g2);
	  if (g3)
	    {
		result = fromRTGeomLeft (ctx, result, g3);
		rtgeom_free (ctx, g3);
	    }
	  spatialite_init_geos ();
	  rtgeom_free (ctx, g1);
	  ln = ln->Next;
      }
    pg = input->FirstPolygon;
    while (pg)
      {
	  /* splitting some Polygon */
	  g1 = toRTGeomPolygon (ctx, pg, input->Srid);
	  g3 = rtgeom_split (ctx, g1, g2);
	  if (g3)
	    {
		result = fromRTGeomLeft (ctx, result, g3);
		rtgeom_free (ctx, g3);
	    }
	  spatialite_init_geos ();
	  rtgeom_free (ctx, g1);
	  pg = pg->Next;
      }

    rtgeom_free (ctx, g2);
    if (result == NULL)
	goto done;
    if (result->FirstPoint == NULL && result->FirstLinestring == NULL
	&& result->FirstPolygon == NULL)
      {
	  gaiaFreeGeomColl (result);
	  result = NULL;
	  goto done;
      }
    result->Srid = input->Srid;
    set_split_gtype (result);

  done:
    return result;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaSplitRight (const void *p_cache, gaiaGeomCollPtr input,
		gaiaGeomCollPtr blade)
{
/* wrapping RTGEOM Split [right half] */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    RTGEOM *g3;
    gaiaGeomCollPtr result = NULL;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;

    if (!check_split_args (input, blade))
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    if (input->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (input->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else if (input->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomColl ();

    g2 = toRTGeom (ctx, blade);

    ln = input->FirstLinestring;
    while (ln)
      {
	  /* splitting some Linestring */
	  g1 = toRTGeomLinestring (ctx, ln, input->Srid);
	  g3 = rtgeom_split (ctx, g1, g2);
	  if (g3)
	    {
		result = fromRTGeomRight (ctx, result, g3);
		rtgeom_free (ctx, g3);
	    }
	  spatialite_init_geos ();
	  rtgeom_free (ctx, g1);
	  ln = ln->Next;
      }
    pg = input->FirstPolygon;
    while (pg)
      {
	  /* splitting some Polygon */
	  g1 = toRTGeomPolygon (ctx, pg, input->Srid);
	  g3 = rtgeom_split (ctx, g1, g2);
	  if (g3)
	    {
		result = fromRTGeomRight (ctx, result, g3);
		rtgeom_free (ctx, g3);
	    }
	  spatialite_init_geos ();
	  rtgeom_free (ctx, g1);
	  pg = pg->Next;
      }

    rtgeom_free (ctx, g2);
    if (result == NULL)
	goto done;
    if (result->FirstPoint == NULL && result->FirstLinestring == NULL
	&& result->FirstPolygon == NULL)
      {
	  gaiaFreeGeomColl (result);
	  result = NULL;
	  goto done;
      }
    result->Srid = input->Srid;
    set_split_gtype (result);

  done:
    return result;
}

GAIAGEO_DECLARE int
gaiaAzimuth (const void *p_cache, double xa, double ya, double xb, double yb,
	     double *azimuth)
{
/* wrapping RTGEOM Azimuth */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTPOINT2D pt1;
    RTPOINT2D pt2;
    double az;
    int ret = 1;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    pt1.x = xa;
    pt1.y = ya;
    pt2.x = xb;
    pt2.y = yb;

    if (!azimuth_pt_pt (ctx, &pt1, &pt2, &az))
	ret = 0;
    *azimuth = az;

    return ret;
}

GAIAGEO_DECLARE int
gaiaEllipsoidAzimuth (const void *p_cache, double xa, double ya, double xb,
		      double yb, double a, double b, double *azimuth)
{
/* wrapping RTGEOM AzimuthSpheroid */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTPOINT *pt1;
    RTPOINT *pt2;
    SPHEROID ellips;
    int ret = 1;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    pt1 = rtpoint_make2d (ctx, 0, xa, ya);
    pt2 = rtpoint_make2d (ctx, 0, xb, yb);
    spheroid_init (ctx, &ellips, a, b);
    *azimuth = rtgeom_azumith_spheroid (ctx, pt1, pt2, &ellips);
    rtpoint_free (ctx, pt1);
    rtpoint_free (ctx, pt2);

    return ret;
}

GAIAGEO_DECLARE int
gaiaProjectedPoint (const void *p_cache, double x1, double y1, double a,
		    double b, double distance, double azimuth, double *x2,
		    double *y2)
{
/* wrapping RTGEOM Project */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTPOINT *pt1;
    RTPOINT *pt2;
    SPHEROID ellips;
    int ret = 0;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    pt1 = rtpoint_make2d (ctx, 0, x1, y1);
    spheroid_init (ctx, &ellips, a, b);
    pt2 = rtgeom_project_spheroid (ctx, pt1, &ellips, distance, azimuth);
    rtpoint_free (ctx, pt1);
    if (pt2 != NULL)
      {
	  *x2 = rtpoint_get_x (ctx, pt2);
	  *y2 = rtpoint_get_y (ctx, pt2);
	  rtpoint_free (ctx, pt2);
	  ret = 1;
      }

    return ret;
}

GAIAGEO_DECLARE int
gaiaGeodesicArea (const void *p_cache, gaiaGeomCollPtr geom, double a, double b,
		  int use_ellipsoid, double *area)
{
/* wrapping RTGEOM AreaSphere and AreaSpheroid */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g;
    SPHEROID ellips;
    RTGBOX gbox;
    double tolerance = 1e-12;
    int ret = 1;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    g = toRTGeom (ctx, geom);
    spheroid_init (ctx, &ellips, a, b);
    if (g == NULL)
      {
	  ret = 0;
	  goto done;
      }
    rtgeom_calculate_gbox_geodetic (ctx, g, &gbox);
    if (use_ellipsoid)
      {
	  /* testing for "forbidden" calculations on the ellipsoid */
	  if ((gbox.zmax + tolerance) >= 1.0 || (gbox.zmin - tolerance) <= -1.0)
	      use_ellipsoid = 0;	/* can't circle the poles */
	  if (gbox.zmax > 0.0 && gbox.zmin < 0.0)
	      use_ellipsoid = 0;	/* can't cross the equator */
      }
    if (use_ellipsoid)
	*area = rtgeom_area_spheroid (ctx, g, &ellips);
    else
	*area = rtgeom_area_sphere (ctx, g, &ellips);
    rtgeom_free (ctx, g);

  done:
    return ret;
}

GAIAGEO_DECLARE char *
gaiaGeoHash (const void *p_cache, gaiaGeomCollPtr geom, int precision)
{
/* wrapping RTGEOM GeoHash */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g;
    char *result;
    char *geo_hash = NULL;
    int len;

    if (!geom)
	return NULL;
    gaiaMbrGeometry (geom);
    if (geom->MinX < -180.0 || geom->MaxX > 180.0 || geom->MinY < -90.0
	|| geom->MaxY > 90.0)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g = toRTGeom (ctx, geom);
    result = rtgeom_geohash (ctx, g, precision);
    rtgeom_free (ctx, g);
    if (result == NULL)
	goto done;
    len = strlen (result);
    if (len == 0)
      {
	  rtfree (ctx, result);
	  goto done;
      }
    geo_hash = malloc (len + 1);
    strcpy (geo_hash, result);
    rtfree (ctx, result);

  done:
    return geo_hash;
}

GAIAGEO_DECLARE char *
gaiaAsX3D (const void *p_cache, gaiaGeomCollPtr geom, const char *srs,
	   int precision, int options, const char *defid)
{
/* wrapping RTGEOM AsX3D */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g;
    char *result;
    char *x3d = NULL;
    int len;

    if (!geom)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    gaiaMbrGeometry (geom);
    g = toRTGeom (ctx, geom);
    result = rtgeom_to_x3d3 (ctx, g, (char *) srs, precision, options, defid);
    rtgeom_free (ctx, g);
    if (result == NULL)
	goto done;
    len = strlen (result);
    if (len == 0)
      {
	  rtfree (ctx, result);
	  goto done;
      }
    x3d = malloc (len + 1);
    strcpy (x3d, result);
    rtfree (ctx, result);

  done:
    return x3d;
}

GAIAGEO_DECLARE int
gaia3DDistance (const void *p_cache, gaiaGeomCollPtr geom1,
		gaiaGeomCollPtr geom2, double *dist)
{
/* wrapping RTGEOM mindistance3d */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    double d;
    int ret = 1;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    g1 = toRTGeom (ctx, geom1);
    g2 = toRTGeom (ctx, geom2);

    d = rtgeom_mindistance3d (ctx, g1, g2);
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    *dist = d;

    return ret;
}

GAIAGEO_DECLARE int
gaiaMaxDistance (const void *p_cache, gaiaGeomCollPtr geom1,
		 gaiaGeomCollPtr geom2, double *dist)
{
/* wrapping RTGEOM maxdistance2d */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    double d;
    int ret = 1;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    g1 = toRTGeom (ctx, geom1);
    g2 = toRTGeom (ctx, geom2);

    d = rtgeom_maxdistance2d (ctx, g1, g2);
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    *dist = d;

    return ret;
}

GAIAGEO_DECLARE int
gaia3DMaxDistance (const void *p_cache, gaiaGeomCollPtr geom1,
		   gaiaGeomCollPtr geom2, double *dist)
{
/* wrapping RTGEOM maxdistance2d */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    double d;
    int ret = 1;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    g1 = toRTGeom (ctx, geom1);
    g2 = toRTGeom (ctx, geom2);

    d = rtgeom_maxdistance3d (ctx, g1, g2);
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    *dist = d;

    return ret;
}

static RTLINE *
linestring2rtline (const RTCTX * ctx, gaiaLinestringPtr ln, int srid)
{
/* converting a Linestring into an RTLINE */
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    int iv;
    double x;
    double y;
    double z;
    double m;
    int has_z = 0;

    if (ln->DimensionModel == GAIA_XY_Z || ln->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;

    pa = ptarray_construct (ctx, has_z, 0, ln->Points);
    for (iv = 0; iv < ln->Points; iv++)
      {
	  /* copying vertices */
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  else
	      point.z = 0.0;
	  point.m = 0.0;
	  ptarray_set_point4d (ctx, pa, iv, &point);
      }
    return rtline_construct (ctx, srid, NULL, pa);
}

GAIAGEO_DECLARE int
gaia3dLength (const void *p_cache, gaiaGeomCollPtr geom, double *length)
{
/* wrapping RTGEOM rtline_length */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTLINE *line;
    gaiaLinestringPtr ln;
    double l = 0.0;
    int ret = 0;

    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  ret = 1;
	  line = linestring2rtline (ctx, ln, geom->Srid);
	  l += rtgeom_length (ctx, (RTGEOM *) line);
	  rtline_free (ctx, line);
	  ln = ln->Next;
      }
    *length = l;

    return ret;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaNodeLines (const void *p_cache, gaiaGeomCollPtr geom)
{
/* wrapping RTGEOM rtgeom_node */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g1;
    RTGEOM *g2;
    gaiaGeomCollPtr result = NULL;

    if (!geom)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g1 = toRTGeom (ctx, geom);
    g2 = rtgeom_node (ctx, g1);
    if (!g2)
      {
	  rtgeom_free (ctx, g1);
	  goto done;
      }
    result = fromRTGeom (ctx, g2, geom->DimensionModel, geom->DeclaredType);
    spatialite_init_geos ();
    rtgeom_free (ctx, g1);
    rtgeom_free (ctx, g2);
    if (result == NULL)
	goto done;
    result->Srid = geom->Srid;

  done:
    return result;
}

GAIAGEO_DECLARE int
gaiaToTWKB (const void *p_cache, gaiaGeomCollPtr geom,
	    unsigned char precision_xy, unsigned char precision_z,
	    unsigned char precision_m, int with_size, int with_bbox,
	    unsigned char **twkb, int *size_twkb)
{
/* wrapping RTGEOM rtgeom_to_twkb */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    unsigned char variant = 0;
    RTGEOM *g;
    unsigned char *p_twkb;
    size_t twkb_size;

    *twkb = NULL;
    *size_twkb = 0;

    if (!geom)
	return 0;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (with_size)
	variant |= TWKB_SIZE;
    if (with_bbox)
	variant |= TWKB_BBOX;

    g = toRTGeom (ctx, geom);
    p_twkb =
	rtgeom_to_twkb (ctx, g, variant, precision_xy, precision_z, precision_m,
			&twkb_size);
    rtgeom_free (ctx, g);

    if (p_twkb == NULL)
	return 0;
    *twkb = p_twkb;
    *size_twkb = twkb_size;
    return 1;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaFromTWKB (const void *p_cache, const unsigned char *twkb, int twkb_size,
	      int srid)
{
/* wrapping RTGEOM rtgeom_from_twkb */
    const RTCTX *ctx = NULL;
    int dims = GAIA_XY_Z_M;
    int type = GAIA_GEOMETRYCOLLECTION;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g;
    gaiaGeomCollPtr result;

    if (twkb == NULL)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g = rtgeom_from_twkb (ctx, (unsigned char *) twkb, twkb_size, 0);
    if (g == NULL)
	return NULL;
    if ((*(twkb + 0) & 0x01) == 0x01)
	type = GAIA_POINT;
    if ((*(twkb + 0) & 0x02) == 0x02)
	type = GAIA_LINESTRING;
    if ((*(twkb + 0) & 0x03) == 0x03)
	type = GAIA_POLYGON;
    if ((*(twkb + 0) & 0x04) == 0x04)
	type = GAIA_MULTIPOINT;
    if ((*(twkb + 0) & 0x05) == 0x05)
	type = GAIA_MULTILINESTRING;
    if ((*(twkb + 0) & 0x06) == 0x06)
	type = GAIA_MULTIPOLYGON;
    if ((*(twkb + 0) & 0x07) == 0x07)
	type = GAIA_GEOMETRYCOLLECTION;
    if ((*(twkb + 1) & 0x08) == 0x08)
      {
	  if ((*(twkb + 2) & 0x01) == 0x01)
	      dims = GAIA_XY_Z;
	  if ((*(twkb + 2) & 0x02) == 0x02)
	      dims = GAIA_XY_M;
	  if ((*(twkb + 2) & 0x03) == 0x03)
	      dims = GAIA_XY_Z_M;
      }
    else
	dims = GAIA_XY;
    result = fromRTGeom (ctx, g, dims, type);
    spatialite_init_geos ();
    rtgeom_free (ctx, g);
    if (result != NULL)
	result->Srid = srid;
    return result;
}

GAIAGEO_DECLARE int
gaiaAsEncodedPolyLine (const void *p_cache, gaiaGeomCollPtr geom,
		       unsigned char precision, char **encoded, int *len)
{
/* wrapping RTGEOM rtline_to_encoded_polyline */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g;
    char *p_encoded;

    *encoded = NULL;
    *len = 0;

    if (!geom)
	return 0;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    g = toRTGeom (ctx, geom);
    p_encoded = rtgeom_to_encoded_polyline (ctx, g, precision);
    rtgeom_free (ctx, g);

    if (p_encoded == NULL)
	return 0;
    *encoded = p_encoded;
    *len = strlen (p_encoded);
    return 1;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaLineFromEncodedPolyline (const void *p_cache, const char *encoded,
			     unsigned char precision)
{
/* wrapping RTGEOM rtline_from_encoded_polyline */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    RTGEOM *g;
    gaiaGeomCollPtr result;
    int dims = GAIA_XY;
    int type = GAIA_LINESTRING;

    if (encoded == NULL)
	return NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    g = rtgeom_from_encoded_polyline (ctx, encoded, precision);
    if (g == NULL)
	return NULL;
    result = fromRTGeom (ctx, g, dims, type);
    spatialite_init_geos ();
    rtgeom_free (ctx, g);
    if (result != NULL)
	result->Srid = 4326;
    return result;
}

static RTGEOM *
rtgeom_from_encoded_polyline (const RTCTX * ctx, const char *encodedpolyline,
			      int precision)
{
/*
 * RTTOPO lacks an implementation of rtgeom_from_encoded_polyline
 * 
 * this simply is a rearranged version of the original code available
 * on LWGOEM lwin_encoded_polyline.c
 * 
 * Copyright 2014 Kashif Rasul <kashif.rasul@gmail.com>
 * 
 * the original code was released under the terms of the GNU General 
 * Public License as published by the Free Software Foundation, either
 *  version 2 of the License, or (at your option) any later version.
*/
    RTGEOM *geom = NULL;
    RTPOINTARRAY *pa = NULL;
    int length = strlen (encodedpolyline);
    int idx = 0;
    double scale = pow (10, precision);

    float latitude = 0.0f;
    float longitude = 0.0f;

    pa = ptarray_construct_empty (ctx, RT_FALSE, RT_FALSE, 1);

    while (idx < length)
      {
	  RTPOINT4D pt;
	  char byte = 0;

	  int res = 0;
	  char shift = 0;
	  do
	    {
		byte = encodedpolyline[idx++] - 63;
		res |= (byte & 0x1F) << shift;
		shift += 5;
	    }
	  while (byte >= 0x20);
	  float deltaLat = ((res & 1) ? ~(res >> 1) : (res >> 1));
	  latitude += deltaLat;

	  shift = 0;
	  res = 0;
	  do
	    {
		byte = encodedpolyline[idx++] - 63;
		res |= (byte & 0x1F) << shift;
		shift += 5;
	    }
	  while (byte >= 0x20);
	  float deltaLon = ((res & 1) ? ~(res >> 1) : (res >> 1));
	  longitude += deltaLon;

	  pt.x = longitude / scale;
	  pt.y = latitude / scale;
	  pt.m = pt.z = 0.0;
	  ptarray_append_point (ctx, pa, &pt, RT_FALSE);
      }

    geom = (RTGEOM *) rtline_construct (ctx, 4326, NULL, pa);
    rtgeom_add_bbox (ctx, geom);

    return geom;
}


#endif /* end enabling RTTOPO support */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/gaiageo/gg_shape.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
...
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
....
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
....
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
....
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725

1726
1727
1728
1729
1730
1731
1732
1733
....
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
....
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
....
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
....
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
....
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
....
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
....
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
....
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
....
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
....
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
....
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
....
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
/*

 gg_shape.c -- Gaia shapefile handling
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	|| shape == GAIA_SHP_POLYLINEZ || shape == GAIA_SHP_POLYLINEM
	|| shape == GAIA_SHP_POLYGON || shape == GAIA_SHP_POLYGONZ
	|| shape == GAIA_SHP_POLYGONM || shape == GAIA_SHP_MULTIPOINT
	|| shape == GAIA_SHP_MULTIPOINTZ || shape == GAIA_SHP_MULTIPOINTM)
	;
    else
	goto unsupported;
    shp->MinX = gaiaImport64 (buf_shp + 36, GAIA_LITTLE_ENDIAN, endian_arch);
    shp->MinY = gaiaImport64 (buf_shp + 44, GAIA_LITTLE_ENDIAN, endian_arch);
    shp->MaxX = gaiaImport64 (buf_shp + 52, GAIA_LITTLE_ENDIAN, endian_arch);
    shp->MaxY = gaiaImport64 (buf_shp + 60, GAIA_LITTLE_ENDIAN, endian_arch);
/* reading DBF file header */
    rd = fread (bf, sizeof (unsigned char), 32, fl_dbf);
    if (rd != 32)
	goto error;
    switch (*bf)
      {
	  /* checks the DBF magic number */
................................................................................
	  if (suffix == 'Z')
	      break;
	  else
	      suffix++;
      }
}

static void
convert_dbf_colname_case (char *buf, int colname_case)
{
/* converts a DBF column-name to Lower- or Upper-case */
    char *p = buf;
    while (*p != '\0')
      {
	  if (colname_case == GAIA_DBF_COLNAME_LOWERCASE)
	    {
		if (*p >= 'A' && *p <= 'Z')
		    *p = *p - 'A' + 'a';
	    }
	  if (colname_case == GAIA_DBF_COLNAME_UPPERCASE)
	    {
		if (*p >= 'a' && *p <= 'z')
		    *p = *p - 'a' + 'A';
	    }
	  p++;
      }
}

GAIAGEO_DECLARE void
gaiaOpenShpWrite (gaiaShapefilePtr shp, const char *path, int shape,
		  gaiaDbfListPtr dbf_list, const char *charFrom,
		  const char *charTo)
{
/* trying to create the shapefile */
    gaiaOpenShpWriteEx (shp, path, shape, dbf_list, charFrom, charTo,
			GAIA_DBF_COLNAME_CASE_IGNORE);
}

GAIAGEO_DECLARE void
gaiaOpenShpWriteEx (gaiaShapefilePtr shp, const char *path, int shape,
		    gaiaDbfListPtr dbf_list, const char *charFrom,
		    const char *charTo, int colname_case)
{
/* trying to create the shapefile */
    FILE *fl_shx = NULL;
    FILE *fl_shp = NULL;
    FILE *fl_dbf = NULL;
    char xpath[1024];
    unsigned char *buf_shp = NULL;
    int buf_size = 1024;
................................................................................
	  else
	    {
		memcpy (buf, utf8buf, 2048 - utf8len);
		buf[2048 - utf8len] = '\0';
		if (strlen (buf) > 10)
		    sprintf (buf, "FLD#%d", defaultId++);
	    }
	  convert_dbf_colname_case (buf, colname_case);
	  memcpy (buf_shp, buf, strlen (buf));
	  *(buf_shp + 11) = fld->Type;
	  *(buf_shp + 16) = fld->Length;
	  *(buf_shp + 17) = fld->Decimals;
	  fwrite (buf_shp, 1, 32, fl_dbf);
	  dbf_size += 32;
	  fld = fld->Next;
................................................................................
		      int text_dates)
{
/* trying to read an entity from shapefile */
    unsigned char buf[512];
    int len;
    int rd;
    int skpos;
    gaia_off_t offset;
    int off_shp;
    int sz;
    int shape;
    double x;
    double y;
    double z;
    double m;
................................................................................
    gaiaRingPtr ring = NULL;
    gaiaDbfFieldPtr pFld;
    struct shp_ring_collection ringsColl;
/* initializing the RING collection */
    ringsColl.First = NULL;
    ringsColl.Last = NULL;
/* positioning and reading the SHX file */
    offset = 100 + ((gaia_off_t) current_row * (gaia_off_t) 8);	/* 100 bytes for the header + current row displacement; each SHX row = 8 bytes */
    skpos = gaia_fseek (shp->flShx, offset, SEEK_SET);
    if (skpos != 0)
	goto eof;
    rd = fread (buf, sizeof (unsigned char), 8, shp->flShx);
    if (rd != 8)
	goto eof;
    off_shp = gaiaImport32 (buf, GAIA_BIG_ENDIAN, shp->endian_arch);
/* positioning and reading the DBF file */
    offset =
	shp->DbfHdsz +
	((gaia_off_t) current_row * (gaia_off_t) (shp->DbfReclen));
    skpos = gaia_fseek (shp->flDbf, offset, SEEK_SET);
    if (skpos != 0)
	goto error;
    rd = fread (shp->BufDbf, sizeof (unsigned char), shp->DbfReclen,
		shp->flDbf);
    if (rd != shp->DbfReclen)
	goto error;
    if (*(shp->BufDbf) == '*')
	goto dbf_deleted;
/* positioning and reading corresponding SHP entity - geometry */
    offset = (gaia_off_t) off_shp *2;

    skpos = gaia_fseek (shp->flShp, offset, SEEK_SET);
    if (skpos != 0)
	goto error;
    rd = fread (buf, sizeof (unsigned char), 12, shp->flShp);
    if (rd != 12)
	goto error;
    sz = gaiaImport32 (buf + 4, GAIA_BIG_ENDIAN, shp->endian_arch);
    shape = gaiaImport32 (buf + 8, GAIA_LITTLE_ENDIAN, shp->endian_arch);
................................................................................
	    }
	  geom->DeclaredType = GAIA_POINT;
	  geom->Srid = srid;
      }
    if (shape == GAIA_SHP_POLYLINE)
      {
	  /* shape polyline */
	  int extra_check = 0;
	  rd = fread (shp->BufShp, sizeof (unsigned char), 32, shp->flShp);
	  if (rd != 32)
	      goto error;
	  rd = fread (shp->BufShp, sizeof (unsigned char), (sz * 2) - 36,
		      shp->flShp);
	  if (rd != (sz * 2) - 36)
	    {
		if (rd == (sz * 2) - 44)
		  {
		      /* sandro 2018-02-17
		       * it could be some defective SHP badly computing the
		       * expected record length.
		       * some unknown software producing defective shapefiles
		       * of the 2D PolyLine type has been positively identified;
		       * all record lengths were constantly declaring 4 extra words,
		       * possibly because the Record Number and the Content Length 
		       * fields were wrongly included into the record length 
		       * calculation.
		       */
		      extra_check = 1;
		  }
		else
		    goto error;
	    }
	  n = gaiaImport32 (shp->BufShp, GAIA_LITTLE_ENDIAN, shp->endian_arch);
	  n1 = gaiaImport32 (shp->BufShp + 4, GAIA_LITTLE_ENDIAN,
			     shp->endian_arch);
	  if (extra_check)
	    {
		/* checking the expected buffer size */
		int expected = 8 + (n * 4) + (n1 * 16);
		if (rd != expected)
		    goto error;
	    }
	  base = 8 + (n * 4);
	  start = 0;
	  for (ind = 0; ind < n; ind++)
	    {
		if (ind < (n - 1))
		    end =
			gaiaImport32 (shp->BufShp + 8 + ((ind + 1) * 4),
................................................................................
	free (shp->LastError);
    sprintf (errMsg, "'%s' is corrupted / has invalid format", shp->Path);
    len = strlen (errMsg);
    shp->LastError = malloc (len + 1);
    strcpy (shp->LastError, errMsg);
    shp_free_rings (&ringsColl);
    return 0;
  dbf_deleted:
    if (shp->LastError)
	free (shp->LastError);
    shp->LastError = NULL;
    return -1;
  conversion_error:
    if (shp->LastError)
	free (shp->LastError);
    sprintf (errMsg, "Invalid character sequence");
    len = strlen (errMsg);
    shp->LastError = malloc (len + 1);
    strcpy (shp->LastError, errMsg);
................................................................................
	    case 'C':
		memset (shp->BufDbf + fld->Offset + 1, ' ', fld->Length);
		if (fld->Value)
		  {
		      if (fld->Value->Type == GAIA_TEXT_VALUE)
			{
			    len = strlen (fld->Value->TxtValue);
			    dynbuf = malloc (2048 + len + 1);
			    strcpy (dynbuf, fld->Value->TxtValue);
			    if (len > 512)
			      {
				  dynbuf[512] = '\0';
				  len = strlen (dynbuf);
			      }
			    utf8len = 2048;
................................................................................
    int endian_arch = shp->endian_arch;
    double minx = shp->MinX;
    double miny = shp->MinY;
    double maxx = shp->MaxX;
    double maxy = shp->MaxY;
    unsigned char *buf_shp = shp->BufShp;
/* writing the SHP file header */
    gaia_fseek (fl_shp, 0, SEEK_SET);	/* repositioning at SHP file start */
    gaiaExport32 (buf_shp, 9994, GAIA_BIG_ENDIAN, endian_arch);	/* SHP magic number */
    gaiaExport32 (buf_shp + 4, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 8, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 12, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 16, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 20, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 24, shp_size, GAIA_BIG_ENDIAN, endian_arch);	/* SHP file size - measured in 16 bits words !!! */
................................................................................
    gaiaExport64 (buf_shp + 60, maxy, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 68, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 76, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 84, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 92, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    fwrite (buf_shp, 1, 100, fl_shp);
/* writing the SHX file header */
    gaia_fseek (fl_shx, 0, SEEK_SET);	/* repositioning at SHX file start */
    gaiaExport32 (buf_shp, 9994, GAIA_BIG_ENDIAN, endian_arch);	/* SHP magic number */
    gaiaExport32 (buf_shp + 4, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 8, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 12, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 16, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 20, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 24, shx_size, GAIA_BIG_ENDIAN, endian_arch);	/* SHXfile size - measured in 16 bits words !!! */
................................................................................
    gaiaExport64 (buf_shp + 76, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 84, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 92, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    fwrite (buf_shp, 1, 100, fl_shx);
/* writing the DBF file header */
    *buf_shp = 0x1a;		/* DBF - this is theEOF marker */
    fwrite (buf_shp, 1, 1, fl_dbf);
    gaia_fseek (fl_dbf, 0, SEEK_SET);	/* repositioning at DBF file start */
    memset (buf_shp, '\0', 32);
    *buf_shp = 0x03;		/* DBF magic number */
    *(buf_shp + 1) = 1;		/* this is supposed to be the last update date [Year, Month, Day], but we ignore it at all */
    *(buf_shp + 2) = 1;
    *(buf_shp + 3) = 1;
    gaiaExport32 (buf_shp + 4, dbf_recno, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports # records in this DBF */
    gaiaExport16 (buf_shp + 8, (short) dbf_size, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports the file header size */
................................................................................
{
/* analyzing the SHP content, in order to detect if there are LINESTRINGS or MULTILINESTRINGS 
/ the same check is needed in order to detect if there are POLYGONS or MULTIPOLYGONS 
 */
    unsigned char buf[512];
    int rd;
    int skpos;
    gaia_off_t offset;
    int off_shp;
    int sz;
    int shape;
    int points;
    int n;
    int n1;
    int base;
................................................................................
    int hasM = 0;
    int current_row = 0;

    gaiaRingPtr ring = NULL;
    while (1)
      {
	  /* positioning and reading the SHX file */
	  offset = 100 + ((gaia_off_t) current_row * (gaia_off_t) 8);	/* 100 bytes for the header + current row displacement; each SHX row = 8 bytes */
	  skpos = gaia_fseek (shp->flShx, offset, SEEK_SET);
	  if (skpos != 0)
	      goto exit;
	  rd = fread (buf, sizeof (unsigned char), 8, shp->flShx);
	  if (rd != 8)
	      goto exit;
	  off_shp = gaiaImport32 (buf, GAIA_BIG_ENDIAN, shp->endian_arch);
	  /* positioning and reading corresponding SHP entity - geometry */
	  offset = (gaia_off_t) off_shp *2;
	  skpos = gaia_fseek (shp->flShp, offset, SEEK_SET);
	  if (skpos != 0)
	      goto exit;
	  rd = fread (buf, sizeof (unsigned char), 12, shp->flShp);
	  if (rd != 12)
	      goto exit;
	  sz = gaiaImport32 (buf + 4, GAIA_BIG_ENDIAN, shp->endian_arch);
	  shape = gaiaImport32 (buf + 8, GAIA_LITTLE_ENDIAN, shp->endian_arch);
................................................................................
    return;
}

GAIAGEO_DECLARE void
gaiaOpenDbfWrite (gaiaDbfPtr dbf, const char *path, const char *charFrom,
		  const char *charTo)
{
/* trying to create the DBF file */
    gaiaOpenDbfWriteEx (dbf, path, charFrom, charTo,
			GAIA_DBF_COLNAME_CASE_IGNORE);
}

GAIAGEO_DECLARE void
gaiaOpenDbfWriteEx (gaiaDbfPtr dbf, const char *path, const char *charFrom,
		    const char *charTo, int colname_case)
{
/* trying to create the DBF file */
    FILE *fl_dbf = NULL;
    unsigned char bf[1024];
    unsigned char *dbf_buf = NULL;
    gaiaDbfFieldPtr fld;
    char *sys_err;
    char errMsg[1024];
................................................................................
	  else
	    {
		memcpy (buf, utf8buf, 2048 - utf8len);
		buf[2048 - utf8len] = '\0';
		if (strlen (buf) > 10)
		    sprintf (buf, "FLD#%d", defaultId++);
	    }
	  convert_dbf_colname_case (buf, colname_case);
	  memcpy (bf, buf, strlen (buf));
	  *(bf + 11) = fld->Type;
	  *(bf + 16) = fld->Length;
	  *(bf + 17) = fld->Decimals;
	  fwrite (bf, 1, 32, fl_dbf);
	  dbf_size += 32;
	  fld = fld->Next;
................................................................................
    int dbf_reclen = dbf->DbfReclen;
    int dbf_recno = dbf->DbfRecno;
    int endian_arch = dbf->endian_arch;
    unsigned char bf[64];
/* writing the DBF file header */
    *bf = 0x1a;			/* DBF - this is theEOF marker */
    fwrite (bf, 1, 1, fl_dbf);
    gaia_fseek (fl_dbf, 0, SEEK_SET);	/* repositioning at DBF file start */
    memset (bf, '\0', 32);
    *bf = 0x03;			/* DBF magic number */
    *(bf + 1) = 1;		/* this is supposed to be the last update date [Year, Month, Day], but we ignore it at all */
    *(bf + 2) = 1;
    *(bf + 3) = 1;
    gaiaExport32 (bf + 4, dbf_recno, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports # records in this DBF */
    gaiaExport16 (bf + 8, (short) dbf_size, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports the file header size */
................................................................................
GAIAGEO_DECLARE int
gaiaReadDbfEntity_ex (gaiaDbfPtr dbf, int current_row, int *deleted,
		      int text_dates)
{
/* trying to read an entity from DBF */
    int rd;
    int skpos;
    gaia_off_t offset;
    int len;
    char errMsg[1024];
    gaiaDbfFieldPtr pFld;
/* positioning and reading the DBF file */
    offset =
	dbf->DbfHdsz +
	((gaia_off_t) current_row * (gaia_off_t) (dbf->DbfReclen));
    skpos = gaia_fseek (dbf->flDbf, offset, SEEK_SET);
    if (skpos != 0)
	goto eof;
    rd = fread (dbf->BufDbf, sizeof (unsigned char), dbf->DbfReclen,
		dbf->flDbf);
    if (rd != dbf->DbfReclen)
	goto eof;
/* setting up the current DBF ENTITY */




|







 







|







 







<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<
<
<
<
<
<
<
<
<
<







 







<







 







|







 







|
|







<
|
<
|






<
<

<
>
|







 







<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<



<
<
<
<
<
<
<







 







<
<
<
<
<







 







|







 







|







 







|







 







|







 







|







 







|
|







|
|







 







<
<
<
<
<
<
<
<
<







 







<







 







|







 







|




<
|
<
|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
523
524
525
526
527
528
529




530
531
532
533
534
535
536
...
903
904
905
906
907
908
909





















910
911
912
913
914










915
916
917
918
919
920
921
....
1037
1038
1039
1040
1041
1042
1043

1044
1045
1046
1047
1048
1049
1050
....
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
....
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675

1676

1677
1678
1679
1680
1681
1682
1683


1684

1685
1686
1687
1688
1689
1690
1691
1692
1693
....
1813
1814
1815
1816
1817
1818
1819

1820
1821
1822
1823
1824
1825
















1826

1827
1828
1829







1830
1831
1832
1833
1834
1835
1836
....
2528
2529
2530
2531
2532
2533
2534





2535
2536
2537
2538
2539
2540
2541
....
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
....
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
....
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
....
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
....
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
....
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
....
4875
4876
4877
4878
4879
4880
4881









4882
4883
4884
4885
4886
4887
4888
....
4968
4969
4970
4971
4972
4973
4974

4975
4976
4977
4978
4979
4980
4981
....
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
....
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183

5184

5185
5186
5187
5188
5189
5190
5191
5192
/*

 gg_shape.c -- Gaia shapefile handling
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	|| shape == GAIA_SHP_POLYLINEZ || shape == GAIA_SHP_POLYLINEM
	|| shape == GAIA_SHP_POLYGON || shape == GAIA_SHP_POLYGONZ
	|| shape == GAIA_SHP_POLYGONM || shape == GAIA_SHP_MULTIPOINT
	|| shape == GAIA_SHP_MULTIPOINTZ || shape == GAIA_SHP_MULTIPOINTM)
	;
    else
	goto unsupported;




/* reading DBF file header */
    rd = fread (bf, sizeof (unsigned char), 32, fl_dbf);
    if (rd != 32)
	goto error;
    switch (*bf)
      {
	  /* checks the DBF magic number */
................................................................................
	  if (suffix == 'Z')
	      break;
	  else
	      suffix++;
      }
}






















GAIAGEO_DECLARE void
gaiaOpenShpWrite (gaiaShapefilePtr shp, const char *path, int shape,
		  gaiaDbfListPtr dbf_list, const char *charFrom,
		  const char *charTo)
{










/* trying to create the shapefile */
    FILE *fl_shx = NULL;
    FILE *fl_shp = NULL;
    FILE *fl_dbf = NULL;
    char xpath[1024];
    unsigned char *buf_shp = NULL;
    int buf_size = 1024;
................................................................................
	  else
	    {
		memcpy (buf, utf8buf, 2048 - utf8len);
		buf[2048 - utf8len] = '\0';
		if (strlen (buf) > 10)
		    sprintf (buf, "FLD#%d", defaultId++);
	    }

	  memcpy (buf_shp, buf, strlen (buf));
	  *(buf_shp + 11) = fld->Type;
	  *(buf_shp + 16) = fld->Length;
	  *(buf_shp + 17) = fld->Decimals;
	  fwrite (buf_shp, 1, 32, fl_dbf);
	  dbf_size += 32;
	  fld = fld->Next;
................................................................................
		      int text_dates)
{
/* trying to read an entity from shapefile */
    unsigned char buf[512];
    int len;
    int rd;
    int skpos;
    int offset;
    int off_shp;
    int sz;
    int shape;
    double x;
    double y;
    double z;
    double m;
................................................................................
    gaiaRingPtr ring = NULL;
    gaiaDbfFieldPtr pFld;
    struct shp_ring_collection ringsColl;
/* initializing the RING collection */
    ringsColl.First = NULL;
    ringsColl.Last = NULL;
/* positioning and reading the SHX file */
    offset = 100 + (current_row * 8);	/* 100 bytes for the header + current row displacement; each SHX row = 8 bytes */
    skpos = fseek (shp->flShx, offset, SEEK_SET);
    if (skpos != 0)
	goto eof;
    rd = fread (buf, sizeof (unsigned char), 8, shp->flShx);
    if (rd != 8)
	goto eof;
    off_shp = gaiaImport32 (buf, GAIA_BIG_ENDIAN, shp->endian_arch);
/* positioning and reading the DBF file */

    offset = shp->DbfHdsz + (current_row * shp->DbfReclen);

    skpos = fseek (shp->flDbf, offset, SEEK_SET);
    if (skpos != 0)
	goto error;
    rd = fread (shp->BufDbf, sizeof (unsigned char), shp->DbfReclen,
		shp->flDbf);
    if (rd != shp->DbfReclen)
	goto error;


/* positioning and reading corresponding SHP entity - geometry */

    offset = off_shp * 2;
    skpos = fseek (shp->flShp, offset, SEEK_SET);
    if (skpos != 0)
	goto error;
    rd = fread (buf, sizeof (unsigned char), 12, shp->flShp);
    if (rd != 12)
	goto error;
    sz = gaiaImport32 (buf + 4, GAIA_BIG_ENDIAN, shp->endian_arch);
    shape = gaiaImport32 (buf + 8, GAIA_LITTLE_ENDIAN, shp->endian_arch);
................................................................................
	    }
	  geom->DeclaredType = GAIA_POINT;
	  geom->Srid = srid;
      }
    if (shape == GAIA_SHP_POLYLINE)
      {
	  /* shape polyline */

	  rd = fread (shp->BufShp, sizeof (unsigned char), 32, shp->flShp);
	  if (rd != 32)
	      goto error;
	  rd = fread (shp->BufShp, sizeof (unsigned char), (sz * 2) - 36,
		      shp->flShp);
	  if (rd != (sz * 2) - 36)
















	      goto error;

	  n = gaiaImport32 (shp->BufShp, GAIA_LITTLE_ENDIAN, shp->endian_arch);
	  n1 = gaiaImport32 (shp->BufShp + 4, GAIA_LITTLE_ENDIAN,
			     shp->endian_arch);







	  base = 8 + (n * 4);
	  start = 0;
	  for (ind = 0; ind < n; ind++)
	    {
		if (ind < (n - 1))
		    end =
			gaiaImport32 (shp->BufShp + 8 + ((ind + 1) * 4),
................................................................................
	free (shp->LastError);
    sprintf (errMsg, "'%s' is corrupted / has invalid format", shp->Path);
    len = strlen (errMsg);
    shp->LastError = malloc (len + 1);
    strcpy (shp->LastError, errMsg);
    shp_free_rings (&ringsColl);
    return 0;





  conversion_error:
    if (shp->LastError)
	free (shp->LastError);
    sprintf (errMsg, "Invalid character sequence");
    len = strlen (errMsg);
    shp->LastError = malloc (len + 1);
    strcpy (shp->LastError, errMsg);
................................................................................
	    case 'C':
		memset (shp->BufDbf + fld->Offset + 1, ' ', fld->Length);
		if (fld->Value)
		  {
		      if (fld->Value->Type == GAIA_TEXT_VALUE)
			{
			    len = strlen (fld->Value->TxtValue);
			    dynbuf = malloc (len + 1);
			    strcpy (dynbuf, fld->Value->TxtValue);
			    if (len > 512)
			      {
				  dynbuf[512] = '\0';
				  len = strlen (dynbuf);
			      }
			    utf8len = 2048;
................................................................................
    int endian_arch = shp->endian_arch;
    double minx = shp->MinX;
    double miny = shp->MinY;
    double maxx = shp->MaxX;
    double maxy = shp->MaxY;
    unsigned char *buf_shp = shp->BufShp;
/* writing the SHP file header */
    fseek (fl_shp, 0, SEEK_SET);	/* repositioning at SHP file start */
    gaiaExport32 (buf_shp, 9994, GAIA_BIG_ENDIAN, endian_arch);	/* SHP magic number */
    gaiaExport32 (buf_shp + 4, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 8, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 12, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 16, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 20, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 24, shp_size, GAIA_BIG_ENDIAN, endian_arch);	/* SHP file size - measured in 16 bits words !!! */
................................................................................
    gaiaExport64 (buf_shp + 60, maxy, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 68, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 76, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 84, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 92, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    fwrite (buf_shp, 1, 100, fl_shp);
/* writing the SHX file header */
    fseek (fl_shx, 0, SEEK_SET);	/* repositioning at SHX file start */
    gaiaExport32 (buf_shp, 9994, GAIA_BIG_ENDIAN, endian_arch);	/* SHP magic number */
    gaiaExport32 (buf_shp + 4, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 8, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 12, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 16, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 20, 0, GAIA_BIG_ENDIAN, endian_arch);
    gaiaExport32 (buf_shp + 24, shx_size, GAIA_BIG_ENDIAN, endian_arch);	/* SHXfile size - measured in 16 bits words !!! */
................................................................................
    gaiaExport64 (buf_shp + 76, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 84, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    gaiaExport64 (buf_shp + 92, 0.0, GAIA_LITTLE_ENDIAN, endian_arch);
    fwrite (buf_shp, 1, 100, fl_shx);
/* writing the DBF file header */
    *buf_shp = 0x1a;		/* DBF - this is theEOF marker */
    fwrite (buf_shp, 1, 1, fl_dbf);
    fseek (fl_dbf, 0, SEEK_SET);	/* repositioning at DBF file start */
    memset (buf_shp, '\0', 32);
    *buf_shp = 0x03;		/* DBF magic number */
    *(buf_shp + 1) = 1;		/* this is supposed to be the last update date [Year, Month, Day], but we ignore it at all */
    *(buf_shp + 2) = 1;
    *(buf_shp + 3) = 1;
    gaiaExport32 (buf_shp + 4, dbf_recno, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports # records in this DBF */
    gaiaExport16 (buf_shp + 8, (short) dbf_size, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports the file header size */
................................................................................
{
/* analyzing the SHP content, in order to detect if there are LINESTRINGS or MULTILINESTRINGS 
/ the same check is needed in order to detect if there are POLYGONS or MULTIPOLYGONS 
 */
    unsigned char buf[512];
    int rd;
    int skpos;
    int offset;
    int off_shp;
    int sz;
    int shape;
    int points;
    int n;
    int n1;
    int base;
................................................................................
    int hasM = 0;
    int current_row = 0;

    gaiaRingPtr ring = NULL;
    while (1)
      {
	  /* positioning and reading the SHX file */
	  offset = 100 + (current_row * 8);	/* 100 bytes for the header + current row displacement; each SHX row = 8 bytes */
	  skpos = fseek (shp->flShx, offset, SEEK_SET);
	  if (skpos != 0)
	      goto exit;
	  rd = fread (buf, sizeof (unsigned char), 8, shp->flShx);
	  if (rd != 8)
	      goto exit;
	  off_shp = gaiaImport32 (buf, GAIA_BIG_ENDIAN, shp->endian_arch);
	  /* positioning and reading corresponding SHP entity - geometry */
	  offset = off_shp * 2;
	  skpos = fseek (shp->flShp, offset, SEEK_SET);
	  if (skpos != 0)
	      goto exit;
	  rd = fread (buf, sizeof (unsigned char), 12, shp->flShp);
	  if (rd != 12)
	      goto exit;
	  sz = gaiaImport32 (buf + 4, GAIA_BIG_ENDIAN, shp->endian_arch);
	  shape = gaiaImport32 (buf + 8, GAIA_LITTLE_ENDIAN, shp->endian_arch);
................................................................................
    return;
}

GAIAGEO_DECLARE void
gaiaOpenDbfWrite (gaiaDbfPtr dbf, const char *path, const char *charFrom,
		  const char *charTo)
{









/* trying to create the DBF file */
    FILE *fl_dbf = NULL;
    unsigned char bf[1024];
    unsigned char *dbf_buf = NULL;
    gaiaDbfFieldPtr fld;
    char *sys_err;
    char errMsg[1024];
................................................................................
	  else
	    {
		memcpy (buf, utf8buf, 2048 - utf8len);
		buf[2048 - utf8len] = '\0';
		if (strlen (buf) > 10)
		    sprintf (buf, "FLD#%d", defaultId++);
	    }

	  memcpy (bf, buf, strlen (buf));
	  *(bf + 11) = fld->Type;
	  *(bf + 16) = fld->Length;
	  *(bf + 17) = fld->Decimals;
	  fwrite (bf, 1, 32, fl_dbf);
	  dbf_size += 32;
	  fld = fld->Next;
................................................................................
    int dbf_reclen = dbf->DbfReclen;
    int dbf_recno = dbf->DbfRecno;
    int endian_arch = dbf->endian_arch;
    unsigned char bf[64];
/* writing the DBF file header */
    *bf = 0x1a;			/* DBF - this is theEOF marker */
    fwrite (bf, 1, 1, fl_dbf);
    fseek (fl_dbf, 0, SEEK_SET);	/* repositioning at DBF file start */
    memset (bf, '\0', 32);
    *bf = 0x03;			/* DBF magic number */
    *(bf + 1) = 1;		/* this is supposed to be the last update date [Year, Month, Day], but we ignore it at all */
    *(bf + 2) = 1;
    *(bf + 3) = 1;
    gaiaExport32 (bf + 4, dbf_recno, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports # records in this DBF */
    gaiaExport16 (bf + 8, (short) dbf_size, GAIA_LITTLE_ENDIAN, endian_arch);	/* exports the file header size */
................................................................................
GAIAGEO_DECLARE int
gaiaReadDbfEntity_ex (gaiaDbfPtr dbf, int current_row, int *deleted,
		      int text_dates)
{
/* trying to read an entity from DBF */
    int rd;
    int skpos;
    int offset;
    int len;
    char errMsg[1024];
    gaiaDbfFieldPtr pFld;
/* positioning and reading the DBF file */

    offset = dbf->DbfHdsz + (current_row * dbf->DbfReclen);

    skpos = fseek (dbf->flDbf, offset, SEEK_SET);
    if (skpos != 0)
	goto eof;
    rd = fread (dbf->BufDbf, sizeof (unsigned char), dbf->DbfReclen,
		dbf->flDbf);
    if (rd != dbf->DbfReclen)
	goto eof;
/* setting up the current DBF ENTITY */

Changes to src/gaiageo/gg_transform.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
...
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
...
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
...
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
...
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
...
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
....
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
....
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
....
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
....
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
....
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
....
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
....
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
....
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
....
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
....
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
....
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
....
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
....
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
....
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
....
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
....
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
....
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
....
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
....
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
....
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
....
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
....
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
....
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
....
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
....
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
/*

 gg_transform.c -- Gaia PROJ.4 wrapping
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* shifting LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* shifting POLYGONs */
	  m = 0.0;
	  z = 0.0;
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* shifting LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* shifting POLYGONs */
	  m = 0.0;
	  z = 0.0;
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* shifting LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* shifting POLYGONs */
	  m = 0.0;
	  z = 0.0;
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* scaling LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* scaling POLYGONs */
	  m = 0.0;
	  z = 0.0;
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* scaling the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* rotating LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* rotating POLYGONs */
	  m = 0.0;
	  z = 0.0;
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* rotating the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
		  {
		      gaiaSetPoint (ring->Coords, iv, nx, ny);
		  }
	    }
	  for (ib = 0; ib < polyg->NumInteriors; ib++)
	    {
		/* rotating the INTERIOR RINGs */
		m = 0.0;
		z = 0.0;
		ring = polyg->Interiors + ib;
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* swapping LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {
		m = 0.0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* swapping POLYGONs */
	  m = 0.0;
	  z = 0.0;
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
		  {
		      gaiaSetPoint (ring->Coords, iv, x, y);
		  }
	    }
	  for (ib = 0; ib < polyg->NumInteriors; ib++)
	    {
		/* swapping the INTERIOR RINGs */
		m = 0.0;
		z = 0.0;
		ring = polyg->Interiors + ib;
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
................................................................................
{
/* converts an ANGLE from degrees to radians */
    return degs * DEG_TO_RAD;
}

static gaiaGeomCollPtr
gaiaTransformCommon (projCtx handle, gaiaGeomCollPtr org, char *proj_from,
		     char *proj_to, int ignore_zm)
{
/* creates a new GEOMETRY reprojecting coordinates from the original one */
    int ib;
    int cnt;
    int i;
    double *xx;
    double *yy;
    double *zz;
    double *old_zz = NULL;
    double *mm = NULL;
    double x;
    double y;
    double z = 0.0;
    double m = 0.0;
    int error = 0;
    int from_angle;
................................................................................
      }
    if (cnt)
      {
	  /* reprojecting POINTs */
	  xx = malloc (sizeof (double) * cnt);
	  yy = malloc (sizeof (double) * cnt);
	  zz = malloc (sizeof (double) * cnt);
	  if (ignore_zm
	      && (org->DimensionModel == GAIA_XY_Z
		  || org->DimensionModel == GAIA_XY_Z_M))
	      old_zz = malloc (sizeof (double) * cnt);
	  if (org->DimensionModel == GAIA_XY_M
	      || org->DimensionModel == GAIA_XY_Z_M)
	      mm = malloc (sizeof (double) * cnt);
	  i = 0;
	  pt = org->FirstPoint;
	  while (pt)
	    {
................................................................................
		      yy[i] = pt->Y;
		  }
		if (org->DimensionModel == GAIA_XY_Z
		    || org->DimensionModel == GAIA_XY_Z_M)
		    zz[i] = pt->Z;
		else
		    zz[i] = 0.0;
		if (ignore_zm
		    && (org->DimensionModel == GAIA_XY_Z
			|| org->DimensionModel == GAIA_XY_Z_M))
		  {
		      zz[i] = 0.0;
		      old_zz[i] = pt->Z;
		  }
		if (org->DimensionModel == GAIA_XY_M
		    || org->DimensionModel == GAIA_XY_Z_M)
		    mm[i] = pt->M;
		i++;
		pt = pt->Next;
	    }
	  /* applying reprojection        */
................................................................................
			    y = yy[i];
			}
		      if (org->DimensionModel == GAIA_XY_Z
			  || org->DimensionModel == GAIA_XY_Z_M)
			  z = zz[i];
		      else
			  z = 0.0;
		      if (ignore_zm
			  && (org->DimensionModel == GAIA_XY_Z
			      || org->DimensionModel == GAIA_XY_Z_M))
			  z = old_zz[i];
		      if (org->DimensionModel == GAIA_XY_M
			  || org->DimensionModel == GAIA_XY_Z_M)
			  m = mm[i];
		      else
			  m = 0.0;
		      if (dst->DimensionModel == GAIA_XY_Z)
			  gaiaAddPointToGeomCollXYZ (dst, x, y, z);
................................................................................
		  }
	    }
	  else
	      error = 1;
	  free (xx);
	  free (yy);
	  free (zz);
	  if (old_zz != NULL)
	      free (old_zz);
	  if (org->DimensionModel == GAIA_XY_M
	      || org->DimensionModel == GAIA_XY_Z_M)
	      free (mm);
      }
    if (error)
	goto stop;
    ln = org->FirstLinestring;
................................................................................
    while (ln)
      {
	  /* reprojecting LINESTRINGs */
	  cnt = ln->Points;
	  xx = malloc (sizeof (double) * cnt);
	  yy = malloc (sizeof (double) * cnt);
	  zz = malloc (sizeof (double) * cnt);
	  if (ignore_zm
	      && (ln->DimensionModel == GAIA_XY_Z
		  || ln->DimensionModel == GAIA_XY_Z_M))
	      old_zz = malloc (sizeof (double) * cnt);
	  if (ln->DimensionModel == GAIA_XY_M
	      || ln->DimensionModel == GAIA_XY_Z_M)
	      mm = malloc (sizeof (double) * cnt);
	  for (i = 0; i < cnt; i++)
	    {
		/* inserting points to be converted in temporary arrays */
		if (ln->DimensionModel == GAIA_XY_Z)
................................................................................
		      yy[i] = y;
		  }
		if (ln->DimensionModel == GAIA_XY_Z
		    || ln->DimensionModel == GAIA_XY_Z_M)
		    zz[i] = z;
		else
		    zz[i] = 0.0;
		if (ignore_zm
		    && (ln->DimensionModel == GAIA_XY_Z
			|| ln->DimensionModel == GAIA_XY_Z_M))
		  {
		      zz[i] = 0.0;
		      old_zz[i] = z;
		  }
		if (ln->DimensionModel == GAIA_XY_M
		    || ln->DimensionModel == GAIA_XY_Z_M)
		    mm[i] = m;
	    }
	  /* applying reprojection        */
	  if (pj_transform (from_cs, to_cs, cnt, 0, xx, yy, zz) == 0)
	    {
................................................................................
			    y = yy[i];
			}
		      if (ln->DimensionModel == GAIA_XY_Z
			  || ln->DimensionModel == GAIA_XY_Z_M)
			  z = zz[i];
		      else
			  z = 0.0;
		      if (ignore_zm
			  && (ln->DimensionModel == GAIA_XY_Z
			      || ln->DimensionModel == GAIA_XY_Z_M))
			  z = old_zz[i];
		      if (ln->DimensionModel == GAIA_XY_M
			  || ln->DimensionModel == GAIA_XY_Z_M)
			  m = mm[i];
		      else
			  m = 0.0;
		      if (dst_ln->DimensionModel == GAIA_XY_Z)
			{
................................................................................
		  }
	    }
	  else
	      error = 1;
	  free (xx);
	  free (yy);
	  free (zz);
	  if (old_zz != NULL)
	      free (old_zz);
	  if (ln->DimensionModel == GAIA_XY_M
	      || ln->DimensionModel == GAIA_XY_Z_M)
	      free (mm);
	  if (error)
	      goto stop;
	  ln = ln->Next;
      }
................................................................................
	  /* reprojecting POLYGONs */
	  rng = pg->Exterior;
	  cnt = rng->Points;
	  dst_pg = gaiaAddPolygonToGeomColl (dst, cnt, pg->NumInteriors);
	  xx = malloc (sizeof (double) * cnt);
	  yy = malloc (sizeof (double) * cnt);
	  zz = malloc (sizeof (double) * cnt);
	  if (ignore_zm
	      && (org->DimensionModel == GAIA_XY_Z
		  || org->DimensionModel == GAIA_XY_Z_M))
	      old_zz = malloc (sizeof (double) * cnt);
	  if (rng->DimensionModel == GAIA_XY_M
	      || rng->DimensionModel == GAIA_XY_Z_M)
	      mm = malloc (sizeof (double) * cnt);
	  for (i = 0; i < cnt; i++)
	    {
		/* inserting points to be converted in temporary arrays [EXTERIOR RING] */
		if (rng->DimensionModel == GAIA_XY_Z)
................................................................................
		      yy[i] = y;
		  }
		if (rng->DimensionModel == GAIA_XY_Z
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    zz[i] = z;
		else
		    zz[i] = 0.0;
		if (ignore_zm
		    && (rng->DimensionModel == GAIA_XY_Z
			|| rng->DimensionModel == GAIA_XY_Z_M))
		  {
		      zz[i] = 0.0;
		      old_zz[i] = z;
		  }
		if (rng->DimensionModel == GAIA_XY_M
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    mm[i] = m;
	    }
	  /* applying reprojection        */
	  if (pj_transform (from_cs, to_cs, cnt, 0, xx, yy, zz) == 0)
	    {
................................................................................
			    y = yy[i];
			}
		      if (rng->DimensionModel == GAIA_XY_Z
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  z = zz[i];
		      else
			  z = 0.0;
		      if (ignore_zm
			  && (rng->DimensionModel == GAIA_XY_Z
			      || rng->DimensionModel == GAIA_XY_Z_M))
			  z = old_zz[i];
		      if (rng->DimensionModel == GAIA_XY_M
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  m = mm[i];
		      else
			  m = 0.0;
		      if (dst_rng->DimensionModel == GAIA_XY_Z)
			{
................................................................................
		  }
	    }
	  else
	      error = 1;
	  free (xx);
	  free (yy);
	  free (zz);
	  if (old_zz != NULL)
	      free (old_zz);
	  if (rng->DimensionModel == GAIA_XY_M
	      || rng->DimensionModel == GAIA_XY_Z_M)
	      free (mm);
	  if (error)
	      goto stop;
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* processing INTERIOR RINGS */
		rng = pg->Interiors + ib;
		cnt = rng->Points;
		xx = malloc (sizeof (double) * cnt);
		yy = malloc (sizeof (double) * cnt);
		zz = malloc (sizeof (double) * cnt);
		if (ignore_zm
		    && (org->DimensionModel == GAIA_XY_Z
			|| org->DimensionModel == GAIA_XY_Z_M))
		    old_zz = malloc (sizeof (double) * cnt);
		if (rng->DimensionModel == GAIA_XY_M
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    mm = malloc (sizeof (double) * cnt);
		for (i = 0; i < cnt; i++)
		  {
		      /* inserting points to be converted in temporary arrays [INTERIOR RING] */
		      if (rng->DimensionModel == GAIA_XY_Z)
................................................................................
			    yy[i] = y;
			}
		      if (rng->DimensionModel == GAIA_XY_Z
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  zz[i] = z;
		      else
			  zz[i] = 0.0;
		      if (ignore_zm
			  && (rng->DimensionModel == GAIA_XY_Z
			      || rng->DimensionModel == GAIA_XY_Z_M))
			{
			    zz[i] = 0.0;
			    old_zz[i] = z;
			}
		      if (rng->DimensionModel == GAIA_XY_M
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  mm[i] = m;
		  }
		/* applying reprojection        */
		if (pj_transform (from_cs, to_cs, cnt, 0, xx, yy, zz) == 0)
		  {
................................................................................
				  y = yy[i];
			      }
			    if (rng->DimensionModel == GAIA_XY_Z
				|| rng->DimensionModel == GAIA_XY_Z_M)
				z = zz[i];
			    else
				z = 0.0;
			    if (ignore_zm
				&& (rng->DimensionModel == GAIA_XY_Z
				    || rng->DimensionModel == GAIA_XY_Z_M))
				z = old_zz[i];
			    if (rng->DimensionModel == GAIA_XY_M
				|| rng->DimensionModel == GAIA_XY_Z_M)
				m = mm[i];
			    else
				m = 0.0;
			    if (dst_rng->DimensionModel == GAIA_XY_Z)
			      {
................................................................................
			}
		  }
		else
		    error = 1;
		free (xx);
		free (yy);
		free (zz);
		if (old_zz != NULL)
		    free (old_zz);
		if (rng->DimensionModel == GAIA_XY_M
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    free (mm);
		if (error)
		    goto stop;
	    }
	  pg = pg->Next;
................................................................................
      }
    return dst;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTransform (gaiaGeomCollPtr org, char *proj_from, char *proj_to)
{
    return gaiaTransformCommon (NULL, org, proj_from, proj_to, 0);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTransform_r (const void *p_cache, gaiaGeomCollPtr org, char *proj_from,
		 char *proj_to)
{
    struct splite_internal_cache *cache =
................................................................................
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    handle = cache->PROJ_handle;
    if (handle == NULL)
	return NULL;
    return gaiaTransformCommon (handle, org, proj_from, proj_to, 0);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTransformXY (gaiaGeomCollPtr org, char *proj_from, char *proj_to)
{
    return gaiaTransformCommon (NULL, org, proj_from, proj_to, 1);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTransformXY_r (const void *p_cache, gaiaGeomCollPtr org, char *proj_from,
		   char *proj_to)
{
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    projCtx handle = NULL;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    handle = cache->PROJ_handle;
    if (handle == NULL)
	return NULL;
    return gaiaTransformCommon (handle, org, proj_from, proj_to, 1);
}

#endif /* end including PROJ.4 */




|







 







|







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







<
<







 







|








<







 







<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<







 







<
<







 







<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<







 







<
<







 







<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<







 







<
<













<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<







 







<
<







 







|







 







|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
266
267
268
269
270
271
272


273
274
275
276
277
278
279
...
307
308
309
310
311
312
313


314
315
316
317
318
319
320
...
427
428
429
430
431
432
433


434
435
436
437
438
439
440
...
469
470
471
472
473
474
475


476
477
478
479
480
481
482
...
589
590
591
592
593
594
595


596
597
598
599
600
601
602
...
632
633
634
635
636
637
638


639
640
641
642
643
644
645
...
951
952
953
954
955
956
957


958
959
960
961
962
963
964
...
992
993
994
995
996
997
998


999
1000
1001
1002
1003
1004
1005
....
1115
1116
1117
1118
1119
1120
1121


1122
1123
1124
1125
1126
1127
1128
....
1156
1157
1158
1159
1160
1161
1162


1163
1164
1165
1166
1167
1168
1169
....
1198
1199
1200
1201
1202
1203
1204


1205
1206
1207
1208
1209
1210
1211
....
1439
1440
1441
1442
1443
1444
1445


1446
1447
1448
1449
1450
1451
1452
....
1481
1482
1483
1484
1485
1486
1487


1488
1489
1490
1491
1492
1493
1494
....
1524
1525
1526
1527
1528
1529
1530


1531
1532
1533
1534
1535
1536
1537
....
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611

1612
1613
1614
1615
1616
1617
1618
....
1669
1670
1671
1672
1673
1674
1675




1676
1677
1678
1679
1680
1681
1682
....
1692
1693
1694
1695
1696
1697
1698







1699
1700
1701
1702
1703
1704
1705
....
1719
1720
1721
1722
1723
1724
1725




1726
1727
1728
1729
1730
1731
1732
....
1739
1740
1741
1742
1743
1744
1745


1746
1747
1748
1749
1750
1751
1752
....
1753
1754
1755
1756
1757
1758
1759




1760
1761
1762
1763
1764
1765
1766
....
1790
1791
1792
1793
1794
1795
1796







1797
1798
1799
1800
1801
1802
1803
....
1817
1818
1819
1820
1821
1822
1823




1824
1825
1826
1827
1828
1829
1830
....
1845
1846
1847
1848
1849
1850
1851


1852
1853
1854
1855
1856
1857
1858
....
1862
1863
1864
1865
1866
1867
1868




1869
1870
1871
1872
1873
1874
1875
....
1899
1900
1901
1902
1903
1904
1905







1906
1907
1908
1909
1910
1911
1912
....
1926
1927
1928
1929
1930
1931
1932




1933
1934
1935
1936
1937
1938
1939
....
1954
1955
1956
1957
1958
1959
1960


1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973




1974
1975
1976
1977
1978
1979
1980
....
2004
2005
2006
2007
2008
2009
2010







2011
2012
2013
2014
2015
2016
2017
....
2031
2032
2033
2034
2035
2036
2037




2038
2039
2040
2041
2042
2043
2044
....
2060
2061
2062
2063
2064
2065
2066


2067
2068
2069
2070
2071
2072
2073
....
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
....
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
























2148
/*

 gg_transform.c -- Gaia PROJ.4 wrapping
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* shifting LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {


		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* shifting POLYGONs */


	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* shifting LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {


		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* shifting POLYGONs */


	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* shifting LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {


		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* shifting POLYGONs */


	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* scaling LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {


		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* scaling POLYGONs */


	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* scaling the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* rotating LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {


		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* rotating POLYGONs */


	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* rotating the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
		  {
		      gaiaSetPoint (ring->Coords, iv, nx, ny);
		  }
	    }
	  for (ib = 0; ib < polyg->NumInteriors; ib++)
	    {
		/* rotating the INTERIOR RINGs */


		ring = polyg->Interiors + ib;
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
................................................................................
      }
    line = geom->FirstLinestring;
    while (line)
      {
	  /* swapping LINESTRINGs */
	  for (iv = 0; iv < line->Points; iv++)
	    {


		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
................................................................................
	    }
	  line = line->Next;
      }
    polyg = geom->FirstPolygon;
    while (polyg)
      {
	  /* swapping POLYGONs */


	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* shifting the EXTERIOR RING */
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
................................................................................
		  {
		      gaiaSetPoint (ring->Coords, iv, x, y);
		  }
	    }
	  for (ib = 0; ib < polyg->NumInteriors; ib++)
	    {
		/* swapping the INTERIOR RINGs */


		ring = polyg->Interiors + ib;
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
................................................................................
{
/* converts an ANGLE from degrees to radians */
    return degs * DEG_TO_RAD;
}

static gaiaGeomCollPtr
gaiaTransformCommon (projCtx handle, gaiaGeomCollPtr org, char *proj_from,
		     char *proj_to)
{
/* creates a new GEOMETRY reprojecting coordinates from the original one */
    int ib;
    int cnt;
    int i;
    double *xx;
    double *yy;
    double *zz;

    double *mm = NULL;
    double x;
    double y;
    double z = 0.0;
    double m = 0.0;
    int error = 0;
    int from_angle;
................................................................................
      }
    if (cnt)
      {
	  /* reprojecting POINTs */
	  xx = malloc (sizeof (double) * cnt);
	  yy = malloc (sizeof (double) * cnt);
	  zz = malloc (sizeof (double) * cnt);




	  if (org->DimensionModel == GAIA_XY_M
	      || org->DimensionModel == GAIA_XY_Z_M)
	      mm = malloc (sizeof (double) * cnt);
	  i = 0;
	  pt = org->FirstPoint;
	  while (pt)
	    {
................................................................................
		      yy[i] = pt->Y;
		  }
		if (org->DimensionModel == GAIA_XY_Z
		    || org->DimensionModel == GAIA_XY_Z_M)
		    zz[i] = pt->Z;
		else
		    zz[i] = 0.0;







		if (org->DimensionModel == GAIA_XY_M
		    || org->DimensionModel == GAIA_XY_Z_M)
		    mm[i] = pt->M;
		i++;
		pt = pt->Next;
	    }
	  /* applying reprojection        */
................................................................................
			    y = yy[i];
			}
		      if (org->DimensionModel == GAIA_XY_Z
			  || org->DimensionModel == GAIA_XY_Z_M)
			  z = zz[i];
		      else
			  z = 0.0;




		      if (org->DimensionModel == GAIA_XY_M
			  || org->DimensionModel == GAIA_XY_Z_M)
			  m = mm[i];
		      else
			  m = 0.0;
		      if (dst->DimensionModel == GAIA_XY_Z)
			  gaiaAddPointToGeomCollXYZ (dst, x, y, z);
................................................................................
		  }
	    }
	  else
	      error = 1;
	  free (xx);
	  free (yy);
	  free (zz);


	  if (org->DimensionModel == GAIA_XY_M
	      || org->DimensionModel == GAIA_XY_Z_M)
	      free (mm);
      }
    if (error)
	goto stop;
    ln = org->FirstLinestring;
................................................................................
    while (ln)
      {
	  /* reprojecting LINESTRINGs */
	  cnt = ln->Points;
	  xx = malloc (sizeof (double) * cnt);
	  yy = malloc (sizeof (double) * cnt);
	  zz = malloc (sizeof (double) * cnt);




	  if (ln->DimensionModel == GAIA_XY_M
	      || ln->DimensionModel == GAIA_XY_Z_M)
	      mm = malloc (sizeof (double) * cnt);
	  for (i = 0; i < cnt; i++)
	    {
		/* inserting points to be converted in temporary arrays */
		if (ln->DimensionModel == GAIA_XY_Z)
................................................................................
		      yy[i] = y;
		  }
		if (ln->DimensionModel == GAIA_XY_Z
		    || ln->DimensionModel == GAIA_XY_Z_M)
		    zz[i] = z;
		else
		    zz[i] = 0.0;







		if (ln->DimensionModel == GAIA_XY_M
		    || ln->DimensionModel == GAIA_XY_Z_M)
		    mm[i] = m;
	    }
	  /* applying reprojection        */
	  if (pj_transform (from_cs, to_cs, cnt, 0, xx, yy, zz) == 0)
	    {
................................................................................
			    y = yy[i];
			}
		      if (ln->DimensionModel == GAIA_XY_Z
			  || ln->DimensionModel == GAIA_XY_Z_M)
			  z = zz[i];
		      else
			  z = 0.0;




		      if (ln->DimensionModel == GAIA_XY_M
			  || ln->DimensionModel == GAIA_XY_Z_M)
			  m = mm[i];
		      else
			  m = 0.0;
		      if (dst_ln->DimensionModel == GAIA_XY_Z)
			{
................................................................................
		  }
	    }
	  else
	      error = 1;
	  free (xx);
	  free (yy);
	  free (zz);


	  if (ln->DimensionModel == GAIA_XY_M
	      || ln->DimensionModel == GAIA_XY_Z_M)
	      free (mm);
	  if (error)
	      goto stop;
	  ln = ln->Next;
      }
................................................................................
	  /* reprojecting POLYGONs */
	  rng = pg->Exterior;
	  cnt = rng->Points;
	  dst_pg = gaiaAddPolygonToGeomColl (dst, cnt, pg->NumInteriors);
	  xx = malloc (sizeof (double) * cnt);
	  yy = malloc (sizeof (double) * cnt);
	  zz = malloc (sizeof (double) * cnt);




	  if (rng->DimensionModel == GAIA_XY_M
	      || rng->DimensionModel == GAIA_XY_Z_M)
	      mm = malloc (sizeof (double) * cnt);
	  for (i = 0; i < cnt; i++)
	    {
		/* inserting points to be converted in temporary arrays [EXTERIOR RING] */
		if (rng->DimensionModel == GAIA_XY_Z)
................................................................................
		      yy[i] = y;
		  }
		if (rng->DimensionModel == GAIA_XY_Z
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    zz[i] = z;
		else
		    zz[i] = 0.0;







		if (rng->DimensionModel == GAIA_XY_M
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    mm[i] = m;
	    }
	  /* applying reprojection        */
	  if (pj_transform (from_cs, to_cs, cnt, 0, xx, yy, zz) == 0)
	    {
................................................................................
			    y = yy[i];
			}
		      if (rng->DimensionModel == GAIA_XY_Z
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  z = zz[i];
		      else
			  z = 0.0;




		      if (rng->DimensionModel == GAIA_XY_M
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  m = mm[i];
		      else
			  m = 0.0;
		      if (dst_rng->DimensionModel == GAIA_XY_Z)
			{
................................................................................
		  }
	    }
	  else
	      error = 1;
	  free (xx);
	  free (yy);
	  free (zz);


	  if (rng->DimensionModel == GAIA_XY_M
	      || rng->DimensionModel == GAIA_XY_Z_M)
	      free (mm);
	  if (error)
	      goto stop;
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		/* processing INTERIOR RINGS */
		rng = pg->Interiors + ib;
		cnt = rng->Points;
		xx = malloc (sizeof (double) * cnt);
		yy = malloc (sizeof (double) * cnt);
		zz = malloc (sizeof (double) * cnt);




		if (rng->DimensionModel == GAIA_XY_M
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    mm = malloc (sizeof (double) * cnt);
		for (i = 0; i < cnt; i++)
		  {
		      /* inserting points to be converted in temporary arrays [INTERIOR RING] */
		      if (rng->DimensionModel == GAIA_XY_Z)
................................................................................
			    yy[i] = y;
			}
		      if (rng->DimensionModel == GAIA_XY_Z
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  zz[i] = z;
		      else
			  zz[i] = 0.0;







		      if (rng->DimensionModel == GAIA_XY_M
			  || rng->DimensionModel == GAIA_XY_Z_M)
			  mm[i] = m;
		  }
		/* applying reprojection        */
		if (pj_transform (from_cs, to_cs, cnt, 0, xx, yy, zz) == 0)
		  {
................................................................................
				  y = yy[i];
			      }
			    if (rng->DimensionModel == GAIA_XY_Z
				|| rng->DimensionModel == GAIA_XY_Z_M)
				z = zz[i];
			    else
				z = 0.0;




			    if (rng->DimensionModel == GAIA_XY_M
				|| rng->DimensionModel == GAIA_XY_Z_M)
				m = mm[i];
			    else
				m = 0.0;
			    if (dst_rng->DimensionModel == GAIA_XY_Z)
			      {
................................................................................
			}
		  }
		else
		    error = 1;
		free (xx);
		free (yy);
		free (zz);


		if (rng->DimensionModel == GAIA_XY_M
		    || rng->DimensionModel == GAIA_XY_Z_M)
		    free (mm);
		if (error)
		    goto stop;
	    }
	  pg = pg->Next;
................................................................................
      }
    return dst;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTransform (gaiaGeomCollPtr org, char *proj_from, char *proj_to)
{
    return gaiaTransformCommon (NULL, org, proj_from, proj_to);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaTransform_r (const void *p_cache, gaiaGeomCollPtr org, char *proj_from,
		 char *proj_to)
{
    struct splite_internal_cache *cache =
................................................................................
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    handle = cache->PROJ_handle;
    if (handle == NULL)
	return NULL;
    return gaiaTransformCommon (handle, org, proj_from, proj_to);
}

























#endif /* end including PROJ.4 */

Changes to src/gaiageo/gg_vanuatu.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 gg_vanuatu.c -- WKT parser/lexer 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

The Vanuatu Team - University of Toronto - Supervisor:
Greg Wilson	gvwilson@cs.toronto.ca

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or




|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 gg_vanuatu.c -- WKT parser/lexer 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

The Vanuatu Team - University of Toronto - Supervisor:
Greg Wilson	gvwilson@cs.toronto.ca

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or

Changes to src/gaiageo/gg_voronoj.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
....
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
/*

 gg_voronoj.c -- Voronoj Diagram implementation
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
{
/* a struct to implement StandardVariation and Variance for Concave Hull */
    double mean;
    double quot;
    double count;
};

#ifndef GEOS_REENTRANT		/* GEOS >= 3.5.0 directly supports Voronoj */

static double *
voronoj_sorted_up (struct voronoj_aux *voronoj, int *count)
{
/* returning a sorted array of coordinates */
    double *array = NULL;
    int cnt = 0;
    int ok = 1;
................................................................................
    double d;
    double mx;
    double my;
    double slope;
    double intercept = 0.0;
    double minx = DBL_MAX;
    double miny = DBL_MAX;
    double maxx = -DBL_MAX;
    double maxy = -DBL_MAX;
    double ext_x;
    double ext_y;
    double delta;
    double delta2;

/* allocating the Voronoj struct */
    voronoj = malloc (sizeof (struct voronoj_aux));
................................................................................
	  ptn = pt->next;
	  free (pt);
	  pt = ptn;
      }
    free (voronoj);
}

#endif /* END GEOS_REENTRANT - GEOS >= 3.5.0 */

SPATIALITE_PRIVATE int
delaunay_triangle_check (void *ppg)
{
/* test if it's really a triangle */
    gaiaPolygonPtr pg = (gaiaPolygonPtr) ppg;
    gaiaRingPtr rng = pg->Exterior;
    if (rng->Points == 4 && pg->NumInteriors == 0)




|







 







|







 







<
<







 







|
|







 







<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
119
120
121
122
123
124
125


126
127
128
129
130
131
132
...
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
....
1476
1477
1478
1479
1480
1481
1482


1483
1484
1485
1486
1487
1488
1489
/*

 gg_voronoj.c -- Voronoj Diagram implementation
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
{
/* a struct to implement StandardVariation and Variance for Concave Hull */
    double mean;
    double quot;
    double count;
};



static double *
voronoj_sorted_up (struct voronoj_aux *voronoj, int *count)
{
/* returning a sorted array of coordinates */
    double *array = NULL;
    int cnt = 0;
    int ok = 1;
................................................................................
    double d;
    double mx;
    double my;
    double slope;
    double intercept = 0.0;
    double minx = DBL_MAX;
    double miny = DBL_MAX;
    double maxx = DBL_MIN;
    double maxy = DBL_MIN;
    double ext_x;
    double ext_y;
    double delta;
    double delta2;

/* allocating the Voronoj struct */
    voronoj = malloc (sizeof (struct voronoj_aux));
................................................................................
	  ptn = pt->next;
	  free (pt);
	  pt = ptn;
      }
    free (voronoj);
}



SPATIALITE_PRIVATE int
delaunay_triangle_check (void *ppg)
{
/* test if it's really a triangle */
    gaiaPolygonPtr pg = (gaiaPolygonPtr) ppg;
    gaiaRingPtr rng = pg->Exterior;
    if (rng->Points == 4 && pg->NumInteriors == 0)

Changes to src/gaiageo/gg_wkb.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
....
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
....
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
....
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
....
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
....
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
....
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
/*

 gg_wkb.c -- Gaia common support for WKB encoded geometries
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>
#include <spatialite/geopackage.h>

static void
ParseWkbPoint (gaiaGeomCollPtr geo)
{
/* decodes a POINT from WKB */
    double x;
    double y;
................................................................................
		break;
	    default:
		break;
	    };
      }
}

static gaiaGeomCollPtr
doParseTinyPointBlob (const unsigned char *blob, unsigned int size)
{
/* decoding from SpatiaLite TinyPoint BLOB to GEOMETRY */
    unsigned char pointType;
    int type;
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    gaiaGeomCollPtr geo = NULL;

    if (size < 24)
	return NULL;		/* cannot be an internal BLOB TinyPoint geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return NULL;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return NULL;		/* failed to recognize END signature */
    if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
	little_endian = 1;
    else if (*(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	little_endian = 0;
    else
	return NULL;		/* unknown encoding; nor little-endian neither big-endian */

    pointType = *(blob + 6);
    geo = gaiaAllocGeomColl ();
    geo->Srid = gaiaImport32 (blob + 2, little_endian, endian_arch);
    geo->endian_arch = (char) endian_arch;
    geo->endian = (char) little_endian;
    geo->blob = blob;
    geo->size = size;
    geo->offset = 7;
    switch (pointType)
      {
	  /* setting up DimensionModel */
      case GAIA_TINYPOINT_XYZ:
	  type = GAIA_POINTZ;
	  geo->DimensionModel = GAIA_XY_Z;
	  break;
      case GAIA_TINYPOINT_XYM:
	  type = GAIA_POINTM;
	  geo->DimensionModel = GAIA_XY_M;
	  break;
      case GAIA_TINYPOINT_XYZM:
	  type = GAIA_POINTZM;
	  geo->DimensionModel = GAIA_XY_Z_M;
	  break;
      default:
	  type = GAIA_POINT;
	  geo->DimensionModel = GAIA_XY;
	  break;
      };
    switch (type)
      {
	  /* parsing elementary geometries */
      case GAIA_POINT:
	  ParseWkbPoint (geo);
	  break;
      case GAIA_POINTZ:
	  ParseWkbPointZ (geo);
	  break;
      case GAIA_POINTM:
	  ParseWkbPointM (geo);
	  break;
      case GAIA_POINTZM:
	  ParseWkbPointZM (geo);
	  break;
      default:
	  break;
      };
    geo->MinX = geo->FirstPoint->X;
    geo->MinY = geo->FirstPoint->Y;
    geo->MaxX = geo->FirstPoint->X;
    geo->MaxY = geo->FirstPoint->Y;
    geo->DeclaredType = GAIA_POINT;
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaFromSpatiaLiteBlobWkbEx (const unsigned char *blob, unsigned int size,
			     int gpkg_mode, int gpkg_amphibious)
{
/* decoding from SpatiaLite BLOB to GEOMETRY */
    int type;
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    gaiaGeomCollPtr geo = NULL;

    if (gpkg_amphibious || gpkg_mode)
      {
#ifdef ENABLE_GEOPACKAGE	/* GEOPACKAGE enabled: supporting GPKG geometries */
	  if (gaiaIsValidGPB (blob, size))
	    {
		geo = gaiaFromGeoPackageGeometryBlob (blob, size);
		if (geo != NULL)
		    return geo;
	    }
	  if (gpkg_mode)
	      return NULL;	/* must accept only GPKG geometries */
#else
	  ;
#endif /* end GEOPACKAGE: supporting GPKG geometries */
      }

    if (size == 24 || size == 32 || size == 40)
      {
	  /* testing for a possible TinyPoint BLOB */
	  if (*(blob + 0) == GAIA_MARK_START &&
	      (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	       || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      && *(blob + (size - 1)) == GAIA_MARK_END)
	      return doParseTinyPointBlob (blob, size);
      }

    if (size < 45)
	return NULL;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return NULL;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return NULL;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................
      default:
	  geo->DeclaredType = GAIA_UNKNOWN;
	  break;
      };
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaFromSpatiaLiteBlobWkb (const unsigned char *blob, unsigned int size)
{
/* 
* decoding from SpatiaLite BLOB to GEOMETRY 
* convenience method - always disabling GPKG compatibility Modes
*/
    return gaiaFromSpatiaLiteBlobWkbEx (blob, size, 0, 0);
}

static gaiaGeomCollPtr
doParseTinyPointBlobMbr (const unsigned char *blob, unsigned int size)
{
/* decoding from SpatiaLite TinyPoint BLOB (MBR only) */
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    double x;
    double y;
    gaiaGeomCollPtr geo = NULL;
    gaiaPolygonPtr polyg;
    gaiaRingPtr ring;

    if (size < 24)
	return NULL;		/* cannot be an internal BLOB TinyPoint geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return NULL;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return NULL;		/* failed to recognize END signature */
    if (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN)
	little_endian = 1;
    else if (*(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	little_endian = 0;
    else
	return NULL;		/* unknown encoding; nor little-endian neither big-endian */

    x = gaiaImport64 (blob + 7, little_endian, endian_arch);
    y = gaiaImport64 (blob + 15, little_endian, endian_arch);

    geo = gaiaAllocGeomColl ();
    polyg = gaiaAddPolygonToGeomColl (geo, 5, 0);
    ring = polyg->Exterior;
    gaiaSetPoint (ring->Coords, 0, x, y);	/* vertex # 1 */
    gaiaSetPoint (ring->Coords, 1, x, y);	/* vertex # 2 */
    gaiaSetPoint (ring->Coords, 2, x, y);	/* vertex # 3 */
    gaiaSetPoint (ring->Coords, 3, x, y);	/* vertex # 4 */
    gaiaSetPoint (ring->Coords, 4, x, y);	/* vertex # 5 [same as vertex # 1 to close the polygon] */
    return geo;
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaFromSpatiaLiteBlobMbr (const unsigned char *blob, unsigned int size)
{
/* decoding from SpatiaLite BLOB to GEOMETRY [MBR only] */
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    double minx;
    double miny;
    double maxx;
    double maxy;
    gaiaGeomCollPtr geo = NULL;
    gaiaPolygonPtr polyg;
    gaiaRingPtr ring;

    if (size == 24 || size == 32 || size == 40)
      {
	  /* testing for a possible TinyPoint BLOB */
	  if (*(blob + 0) == GAIA_MARK_START &&
	      (*(blob + 1) == GAIA_TINYPOINT_LITTLE_ENDIAN
	       || *(blob + 1) == GAIA_TINYPOINT_BIG_ENDIAN)
	      && *(blob + (size - 1)) == GAIA_MARK_END)
	      return doParseTinyPointBlobMbr (blob, size);
      }
    if (size < 45)
	return NULL;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return NULL;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return NULL;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................
    gaiaSetPoint (ring->Coords, 2, maxx, maxy);	/* vertex # 3 */
    gaiaSetPoint (ring->Coords, 3, minx, maxy);	/* vertex # 4 */
    gaiaSetPoint (ring->Coords, 4, minx, miny);	/* vertex # 5 [same as vertex # 1 to close the polygon] */
    return geo;
}

GAIAGEO_DECLARE void
gaiaToSpatiaLiteBlobWkbEx (gaiaGeomCollPtr geom, unsigned char **result,
			   int *size, int gpkg_mode)
{
/* simply defaults to gaiaToSpatiaLiteBlobWkbEx2 tiny_point=FALSE */
    gaiaToSpatiaLiteBlobWkbEx2 (geom, result, size, gpkg_mode, 0);
}

static void
doEncodeTinyPointBlob (gaiaGeomCollPtr geom, unsigned char **result, int *size)
{
/* encoding a TinyPoint BLOB */
    int sz;
    unsigned char *blob;
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();
    gaiaPointPtr point = geom->FirstPoint;

/* compunting the BLOB size */
    if (geom->DimensionModel == GAIA_XY_Z)
	sz = 32;
    else if (geom->DimensionModel == GAIA_XY_M)
	sz = 32;
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	sz = 40;
    else
	sz = 24;
/* allocating the BLOB */
    blob = malloc (sz);
    ptr = blob;
/* and finally we build the BLOB */
    *ptr = GAIA_MARK_START;	/* START signature */
    ptr++;
    *(ptr) = GAIA_TINYPOINT_LITTLE_ENDIAN;	/* byte ordering */
    ptr++;
    gaiaExport32 (ptr, geom->Srid, 1, endian_arch);	/* the SRID */
    ptr += 4;
    if (geom->DimensionModel == GAIA_XY_Z)
	*ptr = GAIA_TINYPOINT_XYZ;
    else if (geom->DimensionModel == GAIA_XY_M)
	*ptr = GAIA_TINYPOINT_XYM;
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	*ptr = GAIA_TINYPOINT_XYZM;
    else
	*ptr = GAIA_TINYPOINT_XY;
    ptr++;
    gaiaExport64 (ptr, point->X, 1, endian_arch);	/* X */
    ptr += 8;
    gaiaExport64 (ptr, point->Y, 1, endian_arch);	/* Y */
    ptr += 8;
    if (geom->DimensionModel == GAIA_XY_Z)
      {
	  gaiaExport64 (ptr, point->Z, 1, endian_arch);	/* Z */
	  ptr += 8;
      }
    else if (geom->DimensionModel == GAIA_XY_M)
      {
	  gaiaExport64 (ptr, point->M, 1, endian_arch);	/* M */
	  ptr += 8;
      }
    else if (geom->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaExport64 (ptr, point->Z, 1, endian_arch);	/* Z */
	  ptr += 8;
	  gaiaExport64 (ptr, point->M, 1, endian_arch);	/* M */
	  ptr += 8;
      }
    *ptr = GAIA_MARK_END;	/* END signature */

    *result = blob;
    *size = sz;
}

GAIAGEO_DECLARE void
gaiaToSpatiaLiteBlobWkbEx2 (gaiaGeomCollPtr geom, unsigned char **result,
			    int *size, int gpkg_mode, int tiny_point)
{
/* builds the SpatiaLite BLOB representation for this GEOMETRY */
    int ib;
    int iv;
    double x;
    double y;
    double z = 0.0;
................................................................................
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    gaiaPointPtr point = NULL;
    gaiaLinestringPtr line = NULL;
    gaiaPolygonPtr polyg = NULL;
    int endian_arch = gaiaEndianArch ();
    gaiaMbrGeometry (geom);

    if (gpkg_mode)
      {
#ifdef ENABLE_GEOPACKAGE	/* only if GeoPackage support is enabled */
	  /* GeoPackage Mode enabled */
	  gaiaToGPB (geom, result, size);
#endif /* end GEOPACKAGE conditional */
	  return;
      }

/* how many entities, and of what kind, do we have ? */
    pt = geom->FirstPoint;
    while (pt)
      {
	  point = pt;
	  entities++;
	  n_points++;
................................................................................
    while (pg)
      {
	  polyg = pg;
	  entities++;
	  n_polygons++;
	  pg = pg->Next;
      }

    *size = 0;
    *result = NULL;
    if (n_points == 0 && n_polygons == 0 && n_linestrings == 0)
	return;
    if (n_points == 1 && n_linestrings == 0 && n_polygons == 0 && entities == 1
	&& geom->DeclaredType != GAIA_MULTIPOINT
	&& geom->DeclaredType != GAIA_GEOMETRYCOLLECTION && tiny_point)
      {
	  /* using the TinyPoint BLOB encoding */
	  doEncodeTinyPointBlob (geom, result, size);
	  return;
      }

/* ok, we can determine the geometry class */
    if (n_points == 1 && n_linestrings == 0 && n_polygons == 0)
      {
	  if (geom->DeclaredType == GAIA_MULTIPOINT)
	    {
		if (geom->DimensionModel == GAIA_XY_Z)
		    type = GAIA_MULTIPOINTZ;
................................................................................
		  }
		polyg = polyg->Next;
	    }
	  *ptr = GAIA_MARK_END;	/* END signature */
      };
}

GAIAGEO_DECLARE void
gaiaToSpatiaLiteBlobWkb (gaiaGeomCollPtr geom, unsigned char **result,
			 int *size)
{
/* 
* builds the SpatiaLite BLOB representation for this GEOMETRY 
* convenience method - always disabling GPKG compatibility Modes
*/
    gaiaToSpatiaLiteBlobWkbEx (geom, result, size, 0);
}

GAIAGEO_DECLARE void
gaiaToCompressedBlobWkb (gaiaGeomCollPtr geom, unsigned char **result,
			 int *size)
{
/* 
/ builds the SpatiaLite BLOB representation for this GEOMETRY 
/ geometry-compression will be applied to LINESTRINGs and RINGs




|







 







|







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
<
<
<







 







|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<







 







<




<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
54
55
56
57
58
59
60

61
62
63
64
65
66
67
....
1066
1067
1068
1069
1070
1071
1072













































































1073
1074

1075
1076
1077
1078
1079
1080



























1081
1082
1083
1084
1085
1086
1087
....
1284
1285
1286
1287
1288
1289
1290

















































1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303










1304
1305
1306
1307
1308
1309
1310
....
1327
1328
1329
1330
1331
1332
1333
1334
1335









































































1336
1337
1338
1339
1340
1341
1342
....
1352
1353
1354
1355
1356
1357
1358










1359
1360
1361
1362
1363
1364
1365
....
1377
1378
1379
1380
1381
1382
1383

1384
1385
1386
1387









1388
1389
1390
1391
1392
1393
1394
....
2210
2211
2212
2213
2214
2215
2216











2217
2218
2219
2220
2221
2222
2223
/*

 gg_wkb.c -- Gaia common support for WKB encoded geometries
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>

#include <spatialite/gaiageo.h>


static void
ParseWkbPoint (gaiaGeomCollPtr geo)
{
/* decodes a POINT from WKB */
    double x;
    double y;
................................................................................
		break;
	    default:
		break;
	    };
      }
}














































































GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaFromSpatiaLiteBlobWkb (const unsigned char *blob, unsigned int size)

{
/* decoding from SpatiaLite BLOB to GEOMETRY */
    int type;
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    gaiaGeomCollPtr geo = NULL;



























    if (size < 45)
	return NULL;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return NULL;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return NULL;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................
      default:
	  geo->DeclaredType = GAIA_UNKNOWN;
	  break;
      };
    return geo;
}


















































GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaFromSpatiaLiteBlobMbr (const unsigned char *blob, unsigned int size)
{
/* decoding from SpatiaLite BLOB to GEOMETRY [MBR only] */
    int little_endian;
    int endian_arch = gaiaEndianArch ();
    double minx;
    double miny;
    double maxx;
    double maxy;
    gaiaGeomCollPtr geo = NULL;
    gaiaPolygonPtr polyg;
    gaiaRingPtr ring;










    if (size < 45)
	return NULL;		/* cannot be an internal BLOB WKB geometry */
    if (*(blob + 0) != GAIA_MARK_START)
	return NULL;		/* failed to recognize START signature */
    if (*(blob + (size - 1)) != GAIA_MARK_END)
	return NULL;		/* failed to recognize END signature */
    if (*(blob + 38) != GAIA_MARK_MBR)
................................................................................
    gaiaSetPoint (ring->Coords, 2, maxx, maxy);	/* vertex # 3 */
    gaiaSetPoint (ring->Coords, 3, minx, maxy);	/* vertex # 4 */
    gaiaSetPoint (ring->Coords, 4, minx, miny);	/* vertex # 5 [same as vertex # 1 to close the polygon] */
    return geo;
}

GAIAGEO_DECLARE void
gaiaToSpatiaLiteBlobWkb (gaiaGeomCollPtr geom, unsigned char **result,
			 int *size)









































































{
/* builds the SpatiaLite BLOB representation for this GEOMETRY */
    int ib;
    int iv;
    double x;
    double y;
    double z = 0.0;
................................................................................
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    gaiaPointPtr point = NULL;
    gaiaLinestringPtr line = NULL;
    gaiaPolygonPtr polyg = NULL;
    int endian_arch = gaiaEndianArch ();
    gaiaMbrGeometry (geom);










/* how many entities, and of what kind, do we have ? */
    pt = geom->FirstPoint;
    while (pt)
      {
	  point = pt;
	  entities++;
	  n_points++;
................................................................................
    while (pg)
      {
	  polyg = pg;
	  entities++;
	  n_polygons++;
	  pg = pg->Next;
      }

    *size = 0;
    *result = NULL;
    if (n_points == 0 && n_polygons == 0 && n_linestrings == 0)
	return;









/* ok, we can determine the geometry class */
    if (n_points == 1 && n_linestrings == 0 && n_polygons == 0)
      {
	  if (geom->DeclaredType == GAIA_MULTIPOINT)
	    {
		if (geom->DimensionModel == GAIA_XY_Z)
		    type = GAIA_MULTIPOINTZ;
................................................................................
		  }
		polyg = polyg->Next;
	    }
	  *ptr = GAIA_MARK_END;	/* END signature */
      };
}












GAIAGEO_DECLARE void
gaiaToCompressedBlobWkb (gaiaGeomCollPtr geom, unsigned char **result,
			 int *size)
{
/* 
/ builds the SpatiaLite BLOB representation for this GEOMETRY 
/ geometry-compression will be applied to LINESTRINGs and RINGs

Changes to src/gaiageo/gg_wkt.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
...
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
...
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
...
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
...
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
...
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
...
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
...
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
...
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
...
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
....
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
....
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
....
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
....
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
....
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
....
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
....
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
....
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
....
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
....
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
....
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
....
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
....
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
....
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
....
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
....
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
....
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
....
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
....
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
....
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
/*

 gg_wkt.c -- Gaia common support for WKT encoded geometries
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

static void
gaiaOutPoint (gaiaOutBufferPtr out_buf, gaiaPointPtr point, int precision)
{
/* formats a WKT POINT */
    char *buf_x;
    char *buf_y;
    char *buf;
    if (precision < 0)
	buf_x = sqlite3_mprintf ("%1.6f", point->X);
    else
	buf_x = sqlite3_mprintf ("%.*f", precision, point->X);
    gaiaOutClean (buf_x);
    if (precision < 0)
	buf_y = sqlite3_mprintf ("%1.6f", point->Y);
    else
	buf_y = sqlite3_mprintf ("%.*f", precision, point->Y);
    gaiaOutClean (buf_y);
    buf = sqlite3_mprintf ("%s %s", buf_x, buf_y);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

GAIAGEO_DECLARE void
gaiaOutPointZex (gaiaOutBufferPtr out_buf, gaiaPointPtr point, int precision)
{
/* formats a WKT POINTZ */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf;
    if (precision < 0)
	buf_x = sqlite3_mprintf ("%1.6f", point->X);
    else
	buf_x = sqlite3_mprintf ("%.*f", precision, point->X);
    gaiaOutClean (buf_x);
    if (precision < 0)
	buf_y = sqlite3_mprintf ("%1.6f", point->Y);
    else
	buf_y = sqlite3_mprintf ("%.*f", precision, point->Y);
    gaiaOutClean (buf_y);
    if (precision < 0)
	buf_z = sqlite3_mprintf ("%1.6f", point->Z);
    else
	buf_z = sqlite3_mprintf ("%.*f", precision, point->Z);
    gaiaOutClean (buf_z);
    buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_z);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    sqlite3_free (buf_z);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

GAIAGEO_DECLARE void
gaiaOutPointZ (gaiaOutBufferPtr out_buf, gaiaPointPtr point)
{
/* 
* formats a WKT POINTZ 
* convenience method - default decimal precision
*/
    gaiaOutPointZex (out_buf, point, -1);
}

static void
gaiaOutPointM (gaiaOutBufferPtr out_buf, gaiaPointPtr point, int precision)
{
/* formats a WKT POINTM */
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf;
    if (precision < 0)
	buf_x = sqlite3_mprintf ("%1.6f", point->X);
    else
	buf_x = sqlite3_mprintf ("%.*f", precision, point->X);
    gaiaOutClean (buf_x);
    if (precision < 0)
	buf_y = sqlite3_mprintf ("%1.6f", point->Y);
    else
	buf_y = sqlite3_mprintf ("%.*f", precision, point->Y);
    gaiaOutClean (buf_y);
    if (precision < 0)
	buf_m = sqlite3_mprintf ("%1.6f", point->M);
    else
	buf_m = sqlite3_mprintf ("%.*f", precision, point->M);
    gaiaOutClean (buf_m);
    buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_m);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    sqlite3_free (buf_m);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

static void
gaiaOutPointZM (gaiaOutBufferPtr out_buf, gaiaPointPtr point, int precision)
{
/* formats a WKT POINTZM */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf_m;
    char *buf;
    if (precision < 0)
	buf_x = sqlite3_mprintf ("%1.6f", point->X);
    else
	buf_x = sqlite3_mprintf ("%.*f", precision, point->X);
    gaiaOutClean (buf_x);
    if (precision < 0)
	buf_y = sqlite3_mprintf ("%1.6f", point->Y);
    else
	buf_y = sqlite3_mprintf ("%.*f", precision, point->Y);
    gaiaOutClean (buf_y);
    if (precision < 0)
	buf_z = sqlite3_mprintf ("%1.6f", point->Z);
    else
	buf_z = sqlite3_mprintf ("%.*f", precision, point->Z);
    gaiaOutClean (buf_z);
    if (precision < 0)
	buf_m = sqlite3_mprintf ("%1.6f", point->M);
    else
	buf_m = sqlite3_mprintf ("%.*f", precision, point->M);
    gaiaOutClean (buf_m);
    buf = sqlite3_mprintf ("%s %s %s %s", buf_x, buf_y, buf_z, buf_m);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    sqlite3_free (buf_z);
    sqlite3_free (buf_m);
    gaiaAppendToOutBuffer (out_buf, buf);
................................................................................
	  sqlite3_free (buf_y);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

static void
gaiaOutLinestring (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line,
		   int precision)
{
/* formats a WKT LINESTRING */
    char *buf_x;
    char *buf_y;
    char *buf;
    double x;
    double y;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPoint (line->Coords, iv, &x, &y);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (iv > 0)
	      buf = sqlite3_mprintf (", %s %s", buf_x, buf_y);
	  else
	      buf = sqlite3_mprintf ("%s %s", buf_x, buf_y);
	  sqlite3_free (buf_x);
	  sqlite3_free (buf_y);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

GAIAGEO_DECLARE void
gaiaOutLinestringZex (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line,
		      int precision)
{
/* formats a WKT LINESTRINGZ */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf;
    double x;
    double y;
    double z;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (precision < 0)
	      buf_z = sqlite3_mprintf ("%1.6f", z);
	  else
	      buf_z = sqlite3_mprintf ("%.*f", precision, z);
	  gaiaOutClean (buf_z);
	  if (iv > 0)
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_z);
	  else
	      buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_z);
	  sqlite3_free (buf_x);
	  sqlite3_free (buf_y);
	  sqlite3_free (buf_z);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

GAIAGEO_DECLARE void
gaiaOutLinestringZ (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line)
{
/*
* formats a WKT LINESTRINGZ 
* convenience method - default decimal precision
*/
    gaiaOutLinestringZex (out_buf, line, -1);
}

static void
gaiaOutLinestringM (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line,
		    int precision)
{
/* formats a WKT LINESTRINGM */
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf;
    double x;
    double y;
    double m;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (precision < 0)
	      buf_m = sqlite3_mprintf ("%1.6f", m);
	  else
	      buf_m = sqlite3_mprintf ("%.*f", precision, m);
	  gaiaOutClean (buf_m);
	  if (iv > 0)
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_m);
	  else
	      buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_m);
	  sqlite3_free (buf_x);
	  sqlite3_free (buf_y);
................................................................................
	  sqlite3_free (buf_m);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

static void
gaiaOutLinestringZM (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line,
		     int precision)
{
/* formats a WKT LINESTRINGZM */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf_m;
    char *buf;
................................................................................
    double y;
    double z;
    double m;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPointXYZM (line->Coords, iv, &x, &y, &z, &m);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (precision < 0)
	      buf_z = sqlite3_mprintf ("%1.6f", z);
	  else
	      buf_z = sqlite3_mprintf ("%.*f", precision, z);
	  gaiaOutClean (buf_z);
	  if (precision < 0)
	      buf_m = sqlite3_mprintf ("%1.6f", m);
	  else
	      buf_m = sqlite3_mprintf ("%.*f", precision, m);
	  gaiaOutClean (buf_m);
	  if (iv > 0)
	      buf =
		  sqlite3_mprintf (", %s %s %s %s", buf_x, buf_y, buf_z, buf_m);
	  else
	      buf = sqlite3_mprintf ("%s %s %s %s", buf_x, buf_y, buf_z, buf_m);
	  sqlite3_free (buf_x);
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

static void
gaiaOutPolygon (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg, int precision)
{
/* formats a WKT POLYGON */
    char *buf_x;
    char *buf_y;
    char *buf;
    int ib;
    int iv;
    double x;
    double y;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPoint (ring->Coords, iv, &x, &y);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (iv == 0)
	      buf = sqlite3_mprintf ("(%s %s", buf_x, buf_y);
	  else if (iv == (ring->Points - 1))
	      buf = sqlite3_mprintf (", %s %s)", buf_x, buf_y);
	  else
	      buf = sqlite3_mprintf (", %s %s", buf_x, buf_y);
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPoint (ring->Coords, iv, &x, &y);
		if (precision < 0)
		    buf_x = sqlite3_mprintf ("%1.6f", x);
		else
		    buf_x = sqlite3_mprintf ("%.*f", precision, x);
		gaiaOutClean (buf_x);
		if (precision < 0)
		    buf_y = sqlite3_mprintf ("%1.6f", y);
		else
		    buf_y = sqlite3_mprintf ("%.*f", precision, y);
		gaiaOutClean (buf_y);
		if (iv == 0)
		    buf = sqlite3_mprintf (", (%s %s", buf_x, buf_y);
		else if (iv == (ring->Points - 1))
		    buf = sqlite3_mprintf (", %s %s)", buf_x, buf_y);
		else
		    buf = sqlite3_mprintf (", %s %s", buf_x, buf_y);
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

GAIAGEO_DECLARE void
gaiaOutPolygonZex (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg,
		   int precision)
{
/* formats a WKT POLYGONZ */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf;
    int ib;
................................................................................
    double x;
    double y;
    double z;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (precision < 0)
	      buf_z = sqlite3_mprintf ("%1.6f", z);
	  else
	      buf_z = sqlite3_mprintf ("%.*f", precision, z);
	  gaiaOutClean (buf_z);
	  if (iv == 0)
	      buf = sqlite3_mprintf ("(%s %s %s", buf_x, buf_y, buf_z);
	  else if (iv == (ring->Points - 1))
	      buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_z);
	  else
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_z);
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
		if (precision < 0)
		    buf_x = sqlite3_mprintf ("%1.6f", x);
		else
		    buf_x = sqlite3_mprintf ("%.*f", precision, x);
		gaiaOutClean (buf_x);
		if (precision < 0)
		    buf_y = sqlite3_mprintf ("%1.6f", y);
		else
		    buf_y = sqlite3_mprintf ("%.*f", precision, y);
		gaiaOutClean (buf_y);
		if (precision < 0)
		    buf_z = sqlite3_mprintf ("%1.6f", z);
		else
		    buf_z = sqlite3_mprintf ("%.*f", precision, z);
		gaiaOutClean (buf_z);
		if (iv == 0)
		    buf = sqlite3_mprintf (", (%s %s %s", buf_x, buf_y, buf_z);
		else if (iv == (ring->Points - 1))
		    buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_z);
		else
		    buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_z);
................................................................................
		sqlite3_free (buf_z);
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

GAIAGEO_DECLARE void
gaiaOutPolygonZ (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg)
{
/* 
* formats a WKT POLYGONZ
* convenience method - default decimal precision
*/
    gaiaOutPolygonZex (out_buf, polyg, -1);
}

static void
gaiaOutPolygonM (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg, int precision)
{
/* formats a WKT POLYGONM */
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf;
    int ib;
................................................................................
    double x;
    double y;
    double m;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPointXYM (ring->Coords, iv, &x, &y, &m);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (precision < 0)
	      buf_m = sqlite3_mprintf ("%1.6f", m);
	  else
	      buf_m = sqlite3_mprintf ("%.*f", precision, m);
	  gaiaOutClean (buf_m);
	  if (iv == 0)
	      buf = sqlite3_mprintf ("(%s %s %s", buf_x, buf_y, buf_m);
	  else if (iv == (ring->Points - 1))
	      buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_m);
	  else
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_m);
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPointXYM (ring->Coords, iv, &x, &y, &m);
		if (precision < 0)
		    buf_x = sqlite3_mprintf ("%1.6f", x);
		else
		    buf_x = sqlite3_mprintf ("%.*f", precision, x);
		gaiaOutClean (buf_x);
		if (precision < 0)
		    buf_y = sqlite3_mprintf ("%1.6f", y);
		else
		    buf_y = sqlite3_mprintf ("%.*f", precision, y);
		gaiaOutClean (buf_y);
		if (precision < 0)
		    buf_m = sqlite3_mprintf ("%1.6f", m);
		else
		    buf_m = sqlite3_mprintf ("%.*f", precision, m);
		gaiaOutClean (buf_m);
		if (iv == 0)
		    buf = sqlite3_mprintf (", (%s %s %s", buf_x, buf_y, buf_m);
		else if (iv == (ring->Points - 1))
		    buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_m);
		else
		    buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_m);
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

static void
gaiaOutPolygonZM (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg, int precision)
{
/* formats a WKT POLYGONZM */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf_m;
    char *buf;
................................................................................
    double y;
    double z;
    double m;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPointXYZM (ring->Coords, iv, &x, &y, &z, &m);
	  if (precision < 0)
	      buf_x = sqlite3_mprintf ("%1.6f", x);
	  else
	      buf_x = sqlite3_mprintf ("%.*f", precision, x);
	  gaiaOutClean (buf_x);
	  if (precision < 0)
	      buf_y = sqlite3_mprintf ("%1.6f", y);
	  else
	      buf_y = sqlite3_mprintf ("%.*f", precision, y);
	  gaiaOutClean (buf_y);
	  if (precision < 0)
	      buf_z = sqlite3_mprintf ("%1.6f", z);
	  else
	      buf_z = sqlite3_mprintf ("%.*f", precision, z);
	  gaiaOutClean (buf_z);
	  if (precision < 0)
	      buf_m = sqlite3_mprintf ("%1.6f", m);
	  else
	      buf_m = sqlite3_mprintf ("%.*f", precision, m);
	  gaiaOutClean (buf_m);
	  if (iv == 0)
	      buf =
		  sqlite3_mprintf ("(%s %s %s %s", buf_x, buf_y, buf_z, buf_m);
	  else if (iv == (ring->Points - 1))
	      buf =
		  sqlite3_mprintf (", %s %s %s %s)", buf_x, buf_y, buf_z,
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPointXYZM (ring->Coords, iv, &x, &y, &z, &m);
		if (precision < 0)
		    buf_x = sqlite3_mprintf ("%1.6f", x);
		else
		    buf_x = sqlite3_mprintf ("%.*f", precision, x);
		gaiaOutClean (buf_x);
		if (precision < 0)
		    buf_y = sqlite3_mprintf ("%1.6f", y);
		else
		    buf_y = sqlite3_mprintf ("%.*f", precision, y);
		gaiaOutClean (buf_y);
		if (precision < 0)
		    buf_z = sqlite3_mprintf ("%1.6f", z);
		else
		    buf_z = sqlite3_mprintf ("%.*f", precision, z);
		gaiaOutClean (buf_z);
		if (precision < 0)
		    buf_m = sqlite3_mprintf ("%1.6f", m);
		else
		    buf_m = sqlite3_mprintf ("%.*f", precision, m);
		gaiaOutClean (buf_m);
		if (iv == 0)
		    buf =
			sqlite3_mprintf (", (%s %s %s %s", buf_x, buf_y, buf_z,
					 buf_m);
		else if (iv == (ring->Points - 1))
		    buf =
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

GAIAGEO_DECLARE void
gaiaOutWktEx (gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int precision)
{
/* prints the WKT representation of current geometry */
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
................................................................................
	  point = geom->FirstPoint;
	  while (point)
	    {
		if (point->DimensionModel == GAIA_XY_Z)
		  {
		      /* processing POINTZ */
		      gaiaAppendToOutBuffer (out_buf, "POINT Z(");
		      gaiaOutPointZex (out_buf, point, precision);
		  }
		else if (point->DimensionModel == GAIA_XY_M)
		  {
		      /* processing POINTM */
		      gaiaAppendToOutBuffer (out_buf, "POINT M(");
		      gaiaOutPointM (out_buf, point, precision);
		  }
		else if (point->DimensionModel == GAIA_XY_Z_M)
		  {
		      /* processing POINTZM */
		      gaiaAppendToOutBuffer (out_buf, "POINT ZM(");
		      gaiaOutPointZM (out_buf, point, precision);
		  }
		else
		  {
		      /* processing POINT */
		      gaiaAppendToOutBuffer (out_buf, "POINT(");
		      gaiaOutPoint (out_buf, point, precision);
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
		point = point->Next;
	    }
	  line = geom->FirstLinestring;
	  while (line)
	    {
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      /* processing LINESTRINGZ */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING Z(");
		      gaiaOutLinestringZex (out_buf, line, precision);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      /* processing LINESTRINGM */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING M(");
		      gaiaOutLinestringM (out_buf, line, precision);
		  }
		else if (line->DimensionModel == GAIA_XY_Z_M)
		  {
		      /* processing LINESTRINGZM */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING ZM(");
		      gaiaOutLinestringZM (out_buf, line, precision);
		  }
		else
		  {
		      /* processing LINESTRING */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING(");
		      gaiaOutLinestring (out_buf, line, precision);
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
		line = line->Next;
	    }
	  polyg = geom->FirstPolygon;
	  while (polyg)
	    {
		if (polyg->DimensionModel == GAIA_XY_Z)
		  {
		      /* processing POLYGONZ */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON Z(");
		      gaiaOutPolygonZex (out_buf, polyg, precision);
		  }
		else if (polyg->DimensionModel == GAIA_XY_M)
		  {
		      /* processing POLYGONM */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON M(");
		      gaiaOutPolygonM (out_buf, polyg, precision);
		  }
		else if (polyg->DimensionModel == GAIA_XY_Z_M)
		  {
		      /* processing POLYGONZM */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON ZM(");
		      gaiaOutPolygonZM (out_buf, polyg, precision);
		  }
		else
		  {
		      /* processing POLYGON */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON(");
		      gaiaOutPolygon (out_buf, polyg, precision);
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
		polyg = polyg->Next;
	    }
      }
    else
      {
................................................................................
		point = geom->FirstPoint;
		while (point)
		  {
		      if (point->DimensionModel == GAIA_XY_Z)
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPointZex (out_buf, point, precision);
			}
		      else if (point->DimensionModel == GAIA_XY_M)
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPointM (out_buf, point, precision);
			}
		      else if (point->DimensionModel == GAIA_XY_Z_M)
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPointZM (out_buf, point, precision);
			}
		      else
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPoint (out_buf, point, precision);
			}
		      point = point->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
	  else if (pts == 0 && lns > 0 && pgs == 0
		   && geom->DeclaredType == GAIA_MULTILINESTRING)
................................................................................
		  {
		      if (line != geom->FirstLinestring)
			  gaiaAppendToOutBuffer (out_buf, ", (");
		      else
			  gaiaAppendToOutBuffer (out_buf, "(");
		      if (line->DimensionModel == GAIA_XY_Z)
			{
			    gaiaOutLinestringZex (out_buf, line, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (line->DimensionModel == GAIA_XY_M)
			{
			    gaiaOutLinestringM (out_buf, line, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (line->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaOutLinestringZM (out_buf, line, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else
			{
			    gaiaOutLinestring (out_buf, line, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      line = line->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
	  else if (pts == 0 && lns == 0 && pgs > 0
................................................................................
		  {
		      if (polyg != geom->FirstPolygon)
			  gaiaAppendToOutBuffer (out_buf, ", (");
		      else
			  gaiaAppendToOutBuffer (out_buf, "(");
		      if (polyg->DimensionModel == GAIA_XY_Z)
			{
			    gaiaOutPolygonZex (out_buf, polyg, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (polyg->DimensionModel == GAIA_XY_M)
			{
			    gaiaOutPolygonM (out_buf, polyg, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (polyg->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaOutPolygonZM (out_buf, polyg, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else
			{
			    gaiaOutPolygon (out_buf, polyg, precision);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      polyg = polyg->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
	  else
................................................................................
		      /* processing POINTs */
		      if (ie > 0)
			  gaiaAppendToOutBuffer (out_buf, ", ");
		      ie++;
		      if (point->DimensionModel == GAIA_XY_Z)
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT Z(");
			    gaiaOutPointZex (out_buf, point, precision);
			}
		      else if (point->DimensionModel == GAIA_XY_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT M(");
			    gaiaOutPointM (out_buf, point, precision);
			}
		      else if (point->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT ZM(");
			    gaiaOutPointZM (out_buf, point, precision);
			}
		      else
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT(");
			    gaiaOutPoint (out_buf, point, precision);
			}
		      gaiaAppendToOutBuffer (out_buf, ")");
		      point = point->Next;
		  }
		line = geom->FirstLinestring;
		while (line)
		  {
................................................................................
		      /* processing LINESTRINGs */
		      if (ie > 0)
			  gaiaAppendToOutBuffer (out_buf, ", ");
		      ie++;
		      if (line->DimensionModel == GAIA_XY_Z)
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING Z(");
			    gaiaOutLinestringZex (out_buf, line, precision);
			}
		      else if (line->DimensionModel == GAIA_XY_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING M(");
			    gaiaOutLinestringM (out_buf, line, precision);
			}
		      else if (line->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING ZM(");
			    gaiaOutLinestringZM (out_buf, line, precision);
			}
		      else
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING(");
			    gaiaOutLinestring (out_buf, line, precision);
			}
		      gaiaAppendToOutBuffer (out_buf, ")");
		      line = line->Next;
		  }
		polyg = geom->FirstPolygon;
		while (polyg)
		  {
................................................................................
		      /* processing POLYGONs */
		      if (ie > 0)
			  gaiaAppendToOutBuffer (out_buf, ", ");
		      ie++;
		      if (polyg->DimensionModel == GAIA_XY_Z)
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON Z(");
			    gaiaOutPolygonZex (out_buf, polyg, precision);
			}
		      else if (polyg->DimensionModel == GAIA_XY_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON M(");
			    gaiaOutPolygonM (out_buf, polyg, precision);
			}
		      else if (polyg->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON ZM(");
			    gaiaOutPolygonZM (out_buf, polyg, precision);
			}
		      else
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON(");
			    gaiaOutPolygon (out_buf, polyg, precision);
			}
		      gaiaAppendToOutBuffer (out_buf, ")");
		      polyg = polyg->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
      }
}

GAIAGEO_DECLARE void
gaiaOutWkt (gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom)
{
/* 
* prints the WKT representation of current geometry 
* convenience method - default decimal precision
*/
    gaiaOutWktEx (out_buf, geom, -1);
}

GAIAGEO_DECLARE void
gaiaOutWktStrict (gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int precision)
{
/* 
 * prints the WKT representation of current geometry 
 * strictly conformant 2D WKT implementation
*/
................................................................................
		  }
	    }
	  gaiaAppendToOutBuffer (out_buf, buf);
	  for (iv = 0; iv < line->Points; iv++)
	    {
		/* exporting vertices */
		has_z = 0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
................................................................................
		  }
	    }
	  gaiaAppendToOutBuffer (out_buf, buf);
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* exporting vertices [Interior Ring] */
		has_z = 0;
		z = 0.0;
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
		  }
		else if (ring->DimensionModel == GAIA_XY_M)
		  {
................................................................................
		      strcat (buf, "<gml:coordinates>");
		  }
		gaiaAppendToOutBuffer (out_buf, buf);
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      /* exporting vertices [Interior Ring] */
		      has_z = 0;
		      z = 0.0;
		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    has_z = 1;
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
		      else if (ring->DimensionModel == GAIA_XY_M)
			{
................................................................................
    int multi_count = 0;
    char *bbox;
    char crs[2048];
    char *buf;
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf_z = NULL;
    char endJson[16];
    if (!geom)
	return;
    if (precision > 18)
	precision = 18;

    if (options != 0)
................................................................................
		/* opening a further LineString */
		gaiaAppendToOutBuffer (out_buf, ",[");
	    }
	  for (iv = 0; iv < line->Points; iv++)
	    {
		/* exporting vertices */
		has_z = 0;
		z = 0.0;
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
................................................................................
		gaiaAppendToOutBuffer (out_buf, ",[");
	    }
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* exporting vertices [Interior Ring] */
		has_z = 0;
		z = 0.0;
		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
		  }
		else if (ring->DimensionModel == GAIA_XY_M)
		  {
................................................................................
	    {
		/* interior rings */
		ring = polyg->Interiors + ib;
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      /* exporting vertices [Interior Ring] */
		      has_z = 0;
		      z = 0.0;
		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    has_z = 1;
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
		      else if (ring->DimensionModel == GAIA_XY_M)
			{




|







 







|







 







|





<
|
<
<

<
|
<
<









|






<
|
<
<

<
|
<
<

<
|
<
<









<
<
<
<
<
<
<
<
<
<

|






<
|
<
<

<
|
<
<

<
|
<
<










|







<
|
<
<

<
|
<
<

<
|
<
<

<
|
<
<







 







|
<











<
|
<
<

<
|
<
<













|
<













<
|
<
<

<
|
<
<

<
|
<
<













<
<
<
<
<
<
<
<
<
<

|
<













<
|
<
<

<
|
<
<

<
|
<
<







 







|
<







 







<
|
<
<

<
|
<
<

<
|
<
<

<
|
<
<







 







|













<
|
<
<

<
|
<
<







 







<
|
<
<

<
|
<
<







 







|
<







 







<
|
<
<

<
|
<
<

<
|
<
<







 







<
|
<
<

<
|
<
<

<
|
<
<







 







<
<
<
<
<
<
<
<
<
<

|







 







<
|
<
<

<
|
<
<

<
|
<
<







 







<
|
<
<

<
|
<
<

<
|
<
<







 







|







 







<
|
<
<

<
|
<
<

<
|
<
<

<
|
<
<







 







<
|
<
<

<
|
<
<

<
|
<
<

<
|
<
<







 







|







 







|





|





|





|











|





|





|





|











|





|





|





|







 







|





|





|





|







 







|




|




|




|







 







|




|




|




|







 







|




|




|




|







 







|




|




|




|







 







|




|




|




|









<
<
<
<
<
<
<
<
<
<







 







<







 







<







 







<







 







|







 







<







 







<







 







<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
161
162
163
164
165
166
167
168
169
170
171
172
173

174


175

176


177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

193


194

195


196

197


198
199
200
201
202
203
204
205
206










207
208
209
210
211
212
213
214

215


216

217


218

219


220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237

238


239

240


241

242


243

244


245
246
247
248
249
250
251
...
383
384
385
386
387
388
389
390

391
392
393
394
395
396
397
398
399
400
401

402


403

404


405
406
407
408
409
410
411
412
413
414
415
416
417
418

419
420
421
422
423
424
425
426
427
428
429
430
431

432


433

434


435

436


437
438
439
440
441
442
443
444
445
446
447
448
449










450
451

452
453
454
455
456
457
458
459
460
461
462
463
464

465


466

467


468

469


470
471
472
473
474
475
476
...
477
478
479
480
481
482
483
484

485
486
487
488
489
490
491
...
493
494
495
496
497
498
499

500


501

502


503

504


505

506


507
508
509
510
511
512
513
...
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756

757


758

759


760
761
762
763
764
765
766
...
771
772
773
774
775
776
777

778


779

780


781
782
783
784
785
786
787
...
790
791
792
793
794
795
796
797

798
799
800
801
802
803
804
...
806
807
808
809
810
811
812

813


814

815


816

817


818
819
820
821
822
823
824
...
830
831
832
833
834
835
836

837


838

839


840

841


842
843
844
845
846
847
848
...
851
852
853
854
855
856
857










858
859
860
861
862
863
864
865
866
...
868
869
870
871
872
873
874

875


876

877


878

879


880
881
882
883
884
885
886
...
892
893
894
895
896
897
898

899


900

901


902

903


904
905
906
907
908
909
910
...
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
...
932
933
934
935
936
937
938

939


940

941


942

943


944

945


946
947
948
949
950
951
952
...
963
964
965
966
967
968
969

970


971

972


973

974


975

976


977
978
979
980
981
982
983
....
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
....
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
....
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
....
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
....
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
....
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
....
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
....
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625










1626
1627
1628
1629
1630
1631
1632
....
3266
3267
3268
3269
3270
3271
3272

3273
3274
3275
3276
3277
3278
3279
....
3443
3444
3445
3446
3447
3448
3449

3450
3451
3452
3453
3454
3455
3456
....
3555
3556
3557
3558
3559
3560
3561

3562
3563
3564
3565
3566
3567
3568
....
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
....
3949
3950
3951
3952
3953
3954
3955

3956
3957
3958
3959
3960
3961
3962
....
4034
4035
4036
4037
4038
4039
4040

4041
4042
4043
4044
4045
4046
4047
....
4098
4099
4100
4101
4102
4103
4104

4105
4106
4107
4108
4109
4110
4111
/*

 gg_wkt.c -- Gaia common support for WKT encoded geometries
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

static void
gaiaOutPoint (gaiaOutBufferPtr out_buf, gaiaPointPtr point)
{
/* formats a WKT POINT */
    char *buf_x;
    char *buf_y;
    char *buf;

    buf_x = sqlite3_mprintf ("%1.6f", point->X);


    gaiaOutClean (buf_x);

    buf_y = sqlite3_mprintf ("%1.6f", point->Y);


    gaiaOutClean (buf_y);
    buf = sqlite3_mprintf ("%s %s", buf_x, buf_y);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

GAIAGEO_DECLARE void
gaiaOutPointZ (gaiaOutBufferPtr out_buf, gaiaPointPtr point)
{
/* formats a WKT POINTZ */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf;

    buf_x = sqlite3_mprintf ("%1.6f", point->X);


    gaiaOutClean (buf_x);

    buf_y = sqlite3_mprintf ("%1.6f", point->Y);


    gaiaOutClean (buf_y);

    buf_z = sqlite3_mprintf ("%1.6f", point->Z);


    gaiaOutClean (buf_z);
    buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_z);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    sqlite3_free (buf_z);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}











static void
gaiaOutPointM (gaiaOutBufferPtr out_buf, gaiaPointPtr point)
{
/* formats a WKT POINTM */
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf;

    buf_x = sqlite3_mprintf ("%1.6f", point->X);


    gaiaOutClean (buf_x);

    buf_y = sqlite3_mprintf ("%1.6f", point->Y);


    gaiaOutClean (buf_y);

    buf_m = sqlite3_mprintf ("%1.6f", point->M);


    gaiaOutClean (buf_m);
    buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_m);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    sqlite3_free (buf_m);
    gaiaAppendToOutBuffer (out_buf, buf);
    sqlite3_free (buf);
}

static void
gaiaOutPointZM (gaiaOutBufferPtr out_buf, gaiaPointPtr point)
{
/* formats a WKT POINTZM */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf_m;
    char *buf;

    buf_x = sqlite3_mprintf ("%1.6f", point->X);


    gaiaOutClean (buf_x);

    buf_y = sqlite3_mprintf ("%1.6f", point->Y);


    gaiaOutClean (buf_y);

    buf_z = sqlite3_mprintf ("%1.6f", point->Z);


    gaiaOutClean (buf_z);

    buf_m = sqlite3_mprintf ("%1.6f", point->M);


    gaiaOutClean (buf_m);
    buf = sqlite3_mprintf ("%s %s %s %s", buf_x, buf_y, buf_z, buf_m);
    sqlite3_free (buf_x);
    sqlite3_free (buf_y);
    sqlite3_free (buf_z);
    sqlite3_free (buf_m);
    gaiaAppendToOutBuffer (out_buf, buf);
................................................................................
	  sqlite3_free (buf_y);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

static void
gaiaOutLinestring (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line)

{
/* formats a WKT LINESTRING */
    char *buf_x;
    char *buf_y;
    char *buf;
    double x;
    double y;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPoint (line->Coords, iv, &x, &y);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);
	  if (iv > 0)
	      buf = sqlite3_mprintf (", %s %s", buf_x, buf_y);
	  else
	      buf = sqlite3_mprintf ("%s %s", buf_x, buf_y);
	  sqlite3_free (buf_x);
	  sqlite3_free (buf_y);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

GAIAGEO_DECLARE void
gaiaOutLinestringZ (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line)

{
/* formats a WKT LINESTRINGZ */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf;
    double x;
    double y;
    double z;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);

	  buf_z = sqlite3_mprintf ("%1.6f", z);


	  gaiaOutClean (buf_z);
	  if (iv > 0)
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_z);
	  else
	      buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_z);
	  sqlite3_free (buf_x);
	  sqlite3_free (buf_y);
	  sqlite3_free (buf_z);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}











static void
gaiaOutLinestringM (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line)

{
/* formats a WKT LINESTRINGM */
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf;
    double x;
    double y;
    double m;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPointXYM (line->Coords, iv, &x, &y, &m);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);

	  buf_m = sqlite3_mprintf ("%1.6f", m);


	  gaiaOutClean (buf_m);
	  if (iv > 0)
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_m);
	  else
	      buf = sqlite3_mprintf ("%s %s %s", buf_x, buf_y, buf_m);
	  sqlite3_free (buf_x);
	  sqlite3_free (buf_y);
................................................................................
	  sqlite3_free (buf_m);
	  gaiaAppendToOutBuffer (out_buf, buf);
	  sqlite3_free (buf);
      }
}

static void
gaiaOutLinestringZM (gaiaOutBufferPtr out_buf, gaiaLinestringPtr line)

{
/* formats a WKT LINESTRINGZM */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf_m;
    char *buf;
................................................................................
    double y;
    double z;
    double m;
    int iv;
    for (iv = 0; iv < line->Points; iv++)
      {
	  gaiaGetPointXYZM (line->Coords, iv, &x, &y, &z, &m);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);

	  buf_z = sqlite3_mprintf ("%1.6f", z);


	  gaiaOutClean (buf_z);

	  buf_m = sqlite3_mprintf ("%1.6f", m);


	  gaiaOutClean (buf_m);
	  if (iv > 0)
	      buf =
		  sqlite3_mprintf (", %s %s %s %s", buf_x, buf_y, buf_z, buf_m);
	  else
	      buf = sqlite3_mprintf ("%s %s %s %s", buf_x, buf_y, buf_z, buf_m);
	  sqlite3_free (buf_x);
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

static void
gaiaOutPolygon (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg)
{
/* formats a WKT POLYGON */
    char *buf_x;
    char *buf_y;
    char *buf;
    int ib;
    int iv;
    double x;
    double y;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPoint (ring->Coords, iv, &x, &y);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);
	  if (iv == 0)
	      buf = sqlite3_mprintf ("(%s %s", buf_x, buf_y);
	  else if (iv == (ring->Points - 1))
	      buf = sqlite3_mprintf (", %s %s)", buf_x, buf_y);
	  else
	      buf = sqlite3_mprintf (", %s %s", buf_x, buf_y);
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPoint (ring->Coords, iv, &x, &y);

		buf_x = sqlite3_mprintf ("%1.6f", x);


		gaiaOutClean (buf_x);

		buf_y = sqlite3_mprintf ("%1.6f", y);


		gaiaOutClean (buf_y);
		if (iv == 0)
		    buf = sqlite3_mprintf (", (%s %s", buf_x, buf_y);
		else if (iv == (ring->Points - 1))
		    buf = sqlite3_mprintf (", %s %s)", buf_x, buf_y);
		else
		    buf = sqlite3_mprintf (", %s %s", buf_x, buf_y);
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

GAIAGEO_DECLARE void
gaiaOutPolygonZ (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg)

{
/* formats a WKT POLYGONZ */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf;
    int ib;
................................................................................
    double x;
    double y;
    double z;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);

	  buf_z = sqlite3_mprintf ("%1.6f", z);


	  gaiaOutClean (buf_z);
	  if (iv == 0)
	      buf = sqlite3_mprintf ("(%s %s %s", buf_x, buf_y, buf_z);
	  else if (iv == (ring->Points - 1))
	      buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_z);
	  else
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_z);
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);

		buf_x = sqlite3_mprintf ("%1.6f", x);


		gaiaOutClean (buf_x);

		buf_y = sqlite3_mprintf ("%1.6f", y);


		gaiaOutClean (buf_y);

		buf_z = sqlite3_mprintf ("%1.6f", z);


		gaiaOutClean (buf_z);
		if (iv == 0)
		    buf = sqlite3_mprintf (", (%s %s %s", buf_x, buf_y, buf_z);
		else if (iv == (ring->Points - 1))
		    buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_z);
		else
		    buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_z);
................................................................................
		sqlite3_free (buf_z);
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}











static void
gaiaOutPolygonM (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg)
{
/* formats a WKT POLYGONM */
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf;
    int ib;
................................................................................
    double x;
    double y;
    double m;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPointXYM (ring->Coords, iv, &x, &y, &m);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);

	  buf_m = sqlite3_mprintf ("%1.6f", m);


	  gaiaOutClean (buf_m);
	  if (iv == 0)
	      buf = sqlite3_mprintf ("(%s %s %s", buf_x, buf_y, buf_m);
	  else if (iv == (ring->Points - 1))
	      buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_m);
	  else
	      buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_m);
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPointXYM (ring->Coords, iv, &x, &y, &m);

		buf_x = sqlite3_mprintf ("%1.6f", x);


		gaiaOutClean (buf_x);

		buf_y = sqlite3_mprintf ("%1.6f", y);


		gaiaOutClean (buf_y);

		buf_m = sqlite3_mprintf ("%1.6f", m);


		gaiaOutClean (buf_m);
		if (iv == 0)
		    buf = sqlite3_mprintf (", (%s %s %s", buf_x, buf_y, buf_m);
		else if (iv == (ring->Points - 1))
		    buf = sqlite3_mprintf (", %s %s %s)", buf_x, buf_y, buf_m);
		else
		    buf = sqlite3_mprintf (", %s %s %s", buf_x, buf_y, buf_m);
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

static void
gaiaOutPolygonZM (gaiaOutBufferPtr out_buf, gaiaPolygonPtr polyg)
{
/* formats a WKT POLYGONZM */
    char *buf_x;
    char *buf_y;
    char *buf_z;
    char *buf_m;
    char *buf;
................................................................................
    double y;
    double z;
    double m;
    gaiaRingPtr ring = polyg->Exterior;
    for (iv = 0; iv < ring->Points; iv++)
      {
	  gaiaGetPointXYZM (ring->Coords, iv, &x, &y, &z, &m);

	  buf_x = sqlite3_mprintf ("%1.6f", x);


	  gaiaOutClean (buf_x);

	  buf_y = sqlite3_mprintf ("%1.6f", y);


	  gaiaOutClean (buf_y);

	  buf_z = sqlite3_mprintf ("%1.6f", z);


	  gaiaOutClean (buf_z);

	  buf_m = sqlite3_mprintf ("%1.6f", m);


	  gaiaOutClean (buf_m);
	  if (iv == 0)
	      buf =
		  sqlite3_mprintf ("(%s %s %s %s", buf_x, buf_y, buf_z, buf_m);
	  else if (iv == (ring->Points - 1))
	      buf =
		  sqlite3_mprintf (", %s %s %s %s)", buf_x, buf_y, buf_z,
................................................................................
      }
    for (ib = 0; ib < polyg->NumInteriors; ib++)
      {
	  ring = polyg->Interiors + ib;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		gaiaGetPointXYZM (ring->Coords, iv, &x, &y, &z, &m);

		buf_x = sqlite3_mprintf ("%1.6f", x);


		gaiaOutClean (buf_x);

		buf_y = sqlite3_mprintf ("%1.6f", y);


		gaiaOutClean (buf_y);

		buf_z = sqlite3_mprintf ("%1.6f", z);


		gaiaOutClean (buf_z);

		buf_m = sqlite3_mprintf ("%1.6f", m);


		gaiaOutClean (buf_m);
		if (iv == 0)
		    buf =
			sqlite3_mprintf (", (%s %s %s %s", buf_x, buf_y, buf_z,
					 buf_m);
		else if (iv == (ring->Points - 1))
		    buf =
................................................................................
		gaiaAppendToOutBuffer (out_buf, buf);
		sqlite3_free (buf);
	    }
      }
}

GAIAGEO_DECLARE void
gaiaOutWkt (gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom)
{
/* prints the WKT representation of current geometry */
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    gaiaPointPtr point;
    gaiaLinestringPtr line;
................................................................................
	  point = geom->FirstPoint;
	  while (point)
	    {
		if (point->DimensionModel == GAIA_XY_Z)
		  {
		      /* processing POINTZ */
		      gaiaAppendToOutBuffer (out_buf, "POINT Z(");
		      gaiaOutPointZ (out_buf, point);
		  }
		else if (point->DimensionModel == GAIA_XY_M)
		  {
		      /* processing POINTM */
		      gaiaAppendToOutBuffer (out_buf, "POINT M(");
		      gaiaOutPointM (out_buf, point);
		  }
		else if (point->DimensionModel == GAIA_XY_Z_M)
		  {
		      /* processing POINTZM */
		      gaiaAppendToOutBuffer (out_buf, "POINT ZM(");
		      gaiaOutPointZM (out_buf, point);
		  }
		else
		  {
		      /* processing POINT */
		      gaiaAppendToOutBuffer (out_buf, "POINT(");
		      gaiaOutPoint (out_buf, point);
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
		point = point->Next;
	    }
	  line = geom->FirstLinestring;
	  while (line)
	    {
		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      /* processing LINESTRINGZ */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING Z(");
		      gaiaOutLinestringZ (out_buf, line);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
		      /* processing LINESTRINGM */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING M(");
		      gaiaOutLinestringM (out_buf, line);
		  }
		else if (line->DimensionModel == GAIA_XY_Z_M)
		  {
		      /* processing LINESTRINGZM */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING ZM(");
		      gaiaOutLinestringZM (out_buf, line);
		  }
		else
		  {
		      /* processing LINESTRING */
		      gaiaAppendToOutBuffer (out_buf, "LINESTRING(");
		      gaiaOutLinestring (out_buf, line);
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
		line = line->Next;
	    }
	  polyg = geom->FirstPolygon;
	  while (polyg)
	    {
		if (polyg->DimensionModel == GAIA_XY_Z)
		  {
		      /* processing POLYGONZ */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON Z(");
		      gaiaOutPolygonZ (out_buf, polyg);
		  }
		else if (polyg->DimensionModel == GAIA_XY_M)
		  {
		      /* processing POLYGONM */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON M(");
		      gaiaOutPolygonM (out_buf, polyg);
		  }
		else if (polyg->DimensionModel == GAIA_XY_Z_M)
		  {
		      /* processing POLYGONZM */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON ZM(");
		      gaiaOutPolygonZM (out_buf, polyg);
		  }
		else
		  {
		      /* processing POLYGON */
		      gaiaAppendToOutBuffer (out_buf, "POLYGON(");
		      gaiaOutPolygon (out_buf, polyg);
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
		polyg = polyg->Next;
	    }
      }
    else
      {
................................................................................
		point = geom->FirstPoint;
		while (point)
		  {
		      if (point->DimensionModel == GAIA_XY_Z)
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPointZ (out_buf, point);
			}
		      else if (point->DimensionModel == GAIA_XY_M)
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPointM (out_buf, point);
			}
		      else if (point->DimensionModel == GAIA_XY_Z_M)
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPointZM (out_buf, point);
			}
		      else
			{
			    if (point != geom->FirstPoint)
				gaiaAppendToOutBuffer (out_buf, ", ");
			    gaiaOutPoint (out_buf, point);
			}
		      point = point->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
	  else if (pts == 0 && lns > 0 && pgs == 0
		   && geom->DeclaredType == GAIA_MULTILINESTRING)
................................................................................
		  {
		      if (line != geom->FirstLinestring)
			  gaiaAppendToOutBuffer (out_buf, ", (");
		      else
			  gaiaAppendToOutBuffer (out_buf, "(");
		      if (line->DimensionModel == GAIA_XY_Z)
			{
			    gaiaOutLinestringZ (out_buf, line);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (line->DimensionModel == GAIA_XY_M)
			{
			    gaiaOutLinestringM (out_buf, line);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (line->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaOutLinestringZM (out_buf, line);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else
			{
			    gaiaOutLinestring (out_buf, line);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      line = line->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
	  else if (pts == 0 && lns == 0 && pgs > 0
................................................................................
		  {
		      if (polyg != geom->FirstPolygon)
			  gaiaAppendToOutBuffer (out_buf, ", (");
		      else
			  gaiaAppendToOutBuffer (out_buf, "(");
		      if (polyg->DimensionModel == GAIA_XY_Z)
			{
			    gaiaOutPolygonZ (out_buf, polyg);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (polyg->DimensionModel == GAIA_XY_M)
			{
			    gaiaOutPolygonM (out_buf, polyg);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else if (polyg->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaOutPolygonZM (out_buf, polyg);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      else
			{
			    gaiaOutPolygon (out_buf, polyg);
			    gaiaAppendToOutBuffer (out_buf, ")");
			}
		      polyg = polyg->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
	  else
................................................................................
		      /* processing POINTs */
		      if (ie > 0)
			  gaiaAppendToOutBuffer (out_buf, ", ");
		      ie++;
		      if (point->DimensionModel == GAIA_XY_Z)
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT Z(");
			    gaiaOutPointZ (out_buf, point);
			}
		      else if (point->DimensionModel == GAIA_XY_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT M(");
			    gaiaOutPointM (out_buf, point);
			}
		      else if (point->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT ZM(");
			    gaiaOutPointZM (out_buf, point);
			}
		      else
			{
			    gaiaAppendToOutBuffer (out_buf, "POINT(");
			    gaiaOutPoint (out_buf, point);
			}
		      gaiaAppendToOutBuffer (out_buf, ")");
		      point = point->Next;
		  }
		line = geom->FirstLinestring;
		while (line)
		  {
................................................................................
		      /* processing LINESTRINGs */
		      if (ie > 0)
			  gaiaAppendToOutBuffer (out_buf, ", ");
		      ie++;
		      if (line->DimensionModel == GAIA_XY_Z)
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING Z(");
			    gaiaOutLinestringZ (out_buf, line);
			}
		      else if (line->DimensionModel == GAIA_XY_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING M(");
			    gaiaOutLinestringM (out_buf, line);
			}
		      else if (line->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING ZM(");
			    gaiaOutLinestringZM (out_buf, line);
			}
		      else
			{
			    gaiaAppendToOutBuffer (out_buf, "LINESTRING(");
			    gaiaOutLinestring (out_buf, line);
			}
		      gaiaAppendToOutBuffer (out_buf, ")");
		      line = line->Next;
		  }
		polyg = geom->FirstPolygon;
		while (polyg)
		  {
................................................................................
		      /* processing POLYGONs */
		      if (ie > 0)
			  gaiaAppendToOutBuffer (out_buf, ", ");
		      ie++;
		      if (polyg->DimensionModel == GAIA_XY_Z)
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON Z(");
			    gaiaOutPolygonZ (out_buf, polyg);
			}
		      else if (polyg->DimensionModel == GAIA_XY_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON M(");
			    gaiaOutPolygonM (out_buf, polyg);
			}
		      else if (polyg->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON ZM(");
			    gaiaOutPolygonZM (out_buf, polyg);
			}
		      else
			{
			    gaiaAppendToOutBuffer (out_buf, "POLYGON(");
			    gaiaOutPolygon (out_buf, polyg);
			}
		      gaiaAppendToOutBuffer (out_buf, ")");
		      polyg = polyg->Next;
		  }
		gaiaAppendToOutBuffer (out_buf, ")");
	    }
      }
}











GAIAGEO_DECLARE void
gaiaOutWktStrict (gaiaOutBufferPtr out_buf, gaiaGeomCollPtr geom, int precision)
{
/* 
 * prints the WKT representation of current geometry 
 * strictly conformant 2D WKT implementation
*/
................................................................................
		  }
	    }
	  gaiaAppendToOutBuffer (out_buf, buf);
	  for (iv = 0; iv < line->Points; iv++)
	    {
		/* exporting vertices */
		has_z = 0;

		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
................................................................................
		  }
	    }
	  gaiaAppendToOutBuffer (out_buf, buf);
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* exporting vertices [Interior Ring] */
		has_z = 0;

		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
		  }
		else if (ring->DimensionModel == GAIA_XY_M)
		  {
................................................................................
		      strcat (buf, "<gml:coordinates>");
		  }
		gaiaAppendToOutBuffer (out_buf, buf);
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      /* exporting vertices [Interior Ring] */
		      has_z = 0;

		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    has_z = 1;
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
		      else if (ring->DimensionModel == GAIA_XY_M)
			{
................................................................................
    int multi_count = 0;
    char *bbox;
    char crs[2048];
    char *buf;
    char *buf_x;
    char *buf_y;
    char *buf_m;
    char *buf_z;
    char endJson[16];
    if (!geom)
	return;
    if (precision > 18)
	precision = 18;

    if (options != 0)
................................................................................
		/* opening a further LineString */
		gaiaAppendToOutBuffer (out_buf, ",[");
	    }
	  for (iv = 0; iv < line->Points; iv++)
	    {
		/* exporting vertices */
		has_z = 0;

		if (line->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (line->Coords, iv, &x, &y, &z);
		  }
		else if (line->DimensionModel == GAIA_XY_M)
		  {
................................................................................
		gaiaAppendToOutBuffer (out_buf, ",[");
	    }
	  ring = polyg->Exterior;
	  for (iv = 0; iv < ring->Points; iv++)
	    {
		/* exporting vertices [Interior Ring] */
		has_z = 0;

		if (ring->DimensionModel == GAIA_XY_Z)
		  {
		      has_z = 1;
		      gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
		  }
		else if (ring->DimensionModel == GAIA_XY_M)
		  {
................................................................................
	    {
		/* interior rings */
		ring = polyg->Interiors + ib;
		for (iv = 0; iv < ring->Points; iv++)
		  {
		      /* exporting vertices [Interior Ring] */
		      has_z = 0;

		      if (ring->DimensionModel == GAIA_XY_Z)
			{
			    has_z = 1;
			    gaiaGetPointXYZ (ring->Coords, iv, &x, &y, &z);
			}
		      else if (ring->DimensionModel == GAIA_XY_M)
			{

Changes to src/gaiageo/gg_xml.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
...
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
....
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
....
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
....
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
....
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
....
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
....
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
....
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
....
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
....
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
....
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
....
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
....
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
....
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
/*

 gg_xml.c -- XML Document implementation
    
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	  node = node->next;
      }
}

static void
sniff_payload (xmlDocPtr xml_doc, int *is_iso_metadata,
	       int *is_sld_se_vector_style, int *is_sld_se_raster_style,
	       int *is_sld_style, int *is_svg, int *is_gpx)
{
/* sniffing the payload type */
    xmlNodePtr root = xmlDocGetRootElement (xml_doc);
    *is_iso_metadata = 0;
    *is_sld_se_vector_style = 0;
    *is_sld_se_raster_style = 0;
    *is_svg = 0;
    *is_gpx = 0;
    if (root->name != NULL)
      {
	  const char *name = (const char *) (root->name);
	  if (strcmp (name, "MD_Metadata") == 0)
	      *is_iso_metadata = 1;
	  if (strcmp (name, "FeatureTypeStyle") == 0
	      || strcmp (name, "PointSymbolizer") == 0
................................................................................
		      /* vector style */
		      *is_sld_se_vector_style = 1;
		  }
		*is_sld_style = 1;
	    }
	  if (strcmp (name, "svg") == 0)
	      *is_svg = 1;
	  if (strcmp (name, "gpx") == 0)
	      *is_gpx = 1;
      }
}

static void
find_iso_ids (xmlNodePtr node, const char *name, char **string, int *open_tag,
	      int *char_string, int *count)
{
................................................................................
    xmlSchemaParserCtxtPtr parser_ctxt;
    xmlSchemaValidCtxtPtr valid_ctxt;
    int is_iso_metadata = 0;
    int is_sld_se_vector_style = 0;
    int is_sld_se_raster_style = 0;
    int is_sld_style = 0;
    int is_svg = 0;
    int is_gpx = 0;
    int len;
    int zip_len;
    short uri_len = 0;
    short fileid_len = 0;
    short parentid_len = 0;
    short name_len = 0;
    short title_len = 0;
................................................................................
    char *fileIdentifier = NULL;
    char *parentIdentifier = NULL;
    char *name = NULL;
    char *title = NULL;
    char *abstract = NULL;
    unsigned char *geometry = NULL;
    uLong crc;
    Bytef *zip_buf = NULL;
    unsigned char *buf;
    unsigned char *ptr;
    unsigned char flags = 0x00;
    int endian_arch = gaiaEndianArch ();
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    gaiaOutBufferPtr parsingBuf = NULL;
................................................................................
		return;
	    }
	  xmlSchemaFreeValidCtxt (valid_ctxt);
      }

/* testing for special cases: ISO Metadata, SLD/SE Styles and SVG */
    sniff_payload (xml_doc, &is_iso_metadata, &is_sld_se_vector_style,
		   &is_sld_se_raster_style, &is_sld_style, &is_svg, &is_gpx);
    if (is_iso_metadata)
	retrieve_iso_identifiers (xml_doc, &fileIdentifier,
				  &parentIdentifier, &title, &abstract,
				  &geometry, &geometry_len);
    if (is_sld_style)
	retrieve_sld_identifiers (xml_doc, &name, &title, &abstract);
    else if (is_sld_se_vector_style || is_sld_se_raster_style)
................................................................................
	*parsing_errors = parsingBuf->Buffer;
    if (schema_validation_errors && schemaValidationBuf)
	*schema_validation_errors = schemaValidationBuf->Buffer;

/* computing the XmlBLOB size */
    len = 39;			/* fixed header-footer size */
    if (schemaURI)
	uri_len = (short) strlen ((const char *) schemaURI);
    if (fileIdentifier)
	fileid_len = (short) strlen ((const char *) fileIdentifier);
    if (parentIdentifier)
	parentid_len = strlen ((const char *) parentIdentifier);
    if (name)
	name_len = (short) strlen ((const char *) name);
    if (title)
	title_len = (short) strlen ((const char *) title);
    if (abstract)
	abstract_len = (short) strlen ((const char *) abstract);
    len += zip_len;
    len += uri_len;
    len += fileid_len;
    len += parentid_len;
    len += name_len;
    len += title_len;
    len += abstract_len;
................................................................................
	flags |= GAIA_XML_SLD_SE_VECTOR_STYLE;
    if (is_sld_se_raster_style)
	flags |= GAIA_XML_SLD_SE_RASTER_STYLE;
    if (is_sld_style)
	flags |= GAIA_XML_SLD_STYLE;
    if (is_svg)
	flags |= GAIA_XML_SVG;
    if (is_gpx)
	flags |= GAIA_XML_GPX;
    *(buf + 1) = flags;		/* XmlBLOB flags */
    *(buf + 2) = GAIA_XML_HEADER;	/* HEADER signature */
    gaiaExport32 (buf + 3, xml_len, 1, endian_arch);	/* the uncompressed XMLDocument size */
    gaiaExport32 (buf + 7, zip_len, 1, endian_arch);	/* the compressed XMLDocument size */
    gaiaExport16 (buf + 11, uri_len, 1, endian_arch);	/* the SchemaURI length in bytes */
    *(buf + 13) = GAIA_XML_SCHEMA;	/* SCHEMA signature */
    ptr = buf + 14;
................................................................................
			unsigned char **result, int *out_size)
{
/* Return another XmlBLOB buffer compressed / uncompressed */
    int in_compressed = 0;
    int little_endian = 0;
    unsigned char flag;
    int in_xml_len;
    int in_zip_len = 0;
    short uri_len;
    short fileid_len;
    short parentid_len;
    short name_len;
    short title_len;
    short abstract_len;
    short geometry_len;
    int out_xml_len;
    int out_zip_len;
    uLong crc;
    Bytef *zip_buf = NULL;
    int len;
    char *schemaURI;
    char *fileIdentifier;
    char *parentIdentifier;
    char *name;
    char *title;
    char *abstract;
    unsigned char *geometry;
    int is_iso_metadata = 0;
    int is_sld_se_vector_style = 0;
    int is_sld_se_raster_style = 0;
    int is_sld_style = 0;
    int is_svg = 0;
    int is_gpx = 0;
    unsigned char *xml = NULL;
    unsigned char *buf;
    unsigned char *ptr;
    unsigned char flags;
    int legacy_blob = 0;
    int endian_arch = gaiaEndianArch ();

    *result = NULL;
................................................................................
	is_sld_se_vector_style = 1;
    if ((flag & GAIA_XML_SLD_SE_RASTER_STYLE) == GAIA_XML_SLD_SE_RASTER_STYLE)
	is_sld_se_raster_style = 1;
    if ((flag & GAIA_XML_SLD_STYLE) == GAIA_XML_SLD_STYLE)
	is_sld_style = 1;
    if ((flag & GAIA_XML_SVG) == GAIA_XML_SVG)
	is_svg = 1;
    if ((flag & GAIA_XML_GPX) == GAIA_XML_GPX)
	is_gpx = 1;
    in_xml_len = gaiaImport32 (blob + 3, little_endian, endian_arch);
    in_zip_len = gaiaImport32 (blob + 7, little_endian, endian_arch);
    uri_len = gaiaImport16 (blob + 11, little_endian, endian_arch);
    ptr = (unsigned char *) blob + 14;
    if (uri_len)
      {
	  schemaURI = (char *) ptr;
................................................................................
	flags |= GAIA_XML_SLD_SE_VECTOR_STYLE;
    if (is_sld_se_raster_style)
	flags |= GAIA_XML_SLD_SE_RASTER_STYLE;
    if (is_sld_style)
	flags |= GAIA_XML_SLD_STYLE;
    if (is_svg)
	flags |= GAIA_XML_SVG;
    if (is_gpx)
	flags |= GAIA_XML_GPX;
    *(buf + 1) = flags;		/* XmlBLOB flags */
    *(buf + 2) = GAIA_XML_HEADER;	/* HEADER signature */
    gaiaExport32 (buf + 3, out_xml_len, 1, endian_arch);	/* the uncompressed XMLDocument size */
    gaiaExport32 (buf + 7, out_zip_len, 1, endian_arch);	/* the compressed XMLDocument size */
    gaiaExport16 (buf + 11, uri_len, 1, endian_arch);	/* the SchemaURI length in bytes */
    *(buf + 13) = GAIA_XML_SCHEMA;	/* SCHEMA signature */
    ptr = buf + 14;
................................................................................
    return ret;
}

GAIAGEO_DECLARE char *
gaiaXmlTextFromBlob (const unsigned char *blob, int blob_size, int indent)
{
/* attempting to extract an XMLDocument from within an XmlBLOB buffer */

#ifndef OMIT_ICONV	/* only if ICONV is supported */
    int compressed = 0;
    int little_endian = 0;
    unsigned char flag;
    const unsigned char *ptr;
    int xml_len;
    int zip_len;
    short uri_len;
................................................................................
    if (out)
      {
	  xmlSetGenericErrorFunc ((void *) stderr, NULL);
	  return (char *) out;
      }
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    return NULL;
    
#else
	if (blob != NULL && blob_size == 0 && indent == 0)
	blob = NULL;	/* silencing stupid compiler warnings */
#endif
	return NULL;
}

GAIAGEO_DECLARE void
gaiaXmlFromBlob (const unsigned char *blob, int blob_size, int indent,
		 unsigned char **result, int *res_size)
{
/* attempting to extract an XMLDocument from within an XmlBLOB buffer */
................................................................................
	  xmlSetGenericErrorFunc ((void *) stderr, NULL);
	  return;
      }
    gaiaXmlFormat (xml_doc, &out, &out_len, xml_doc->encoding, indent);
    free (xml);
    xmlFreeDoc (xml_doc);
    *result = out;
    if (*(out + out_len - 1) == '\0' && out_len > 0)
	out_len -= 1;
    *res_size = out_len;
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
}

GAIAGEO_DECLARE int
gaiaXmlLoad (const void *p_cache, const char *path_or_url,
	     unsigned char **result, int *size, char **parsing_errors)
................................................................................
	sld_style = 1;
    return sld_style;
}

GAIAGEO_DECLARE int
gaiaIsSvgXmlBlob (const unsigned char *blob, int blob_size)
{
/* Checks if a valid XmlBLOB buffer does actually contains an SVG image or not */
    int svg = 0;
    unsigned char flag;

/* validity check */
    if (!gaiaIsValidXmlBlob (blob, blob_size))
	return -1;		/* cannot be an XmlBLOB */
    flag = *(blob + 1);
    if ((flag & GAIA_XML_SVG) == GAIA_XML_SVG)
	svg = 1;
    return svg;
}

GAIAGEO_DECLARE int
gaiaIsGpxXmlBlob (const unsigned char *blob, int blob_size)
{
/* Checks if a valid XmlBLOB buffer does actually contains a GPX document or not */
    int gpx = 0;
    unsigned char flag;

/* validity check */
    if (!gaiaIsValidXmlBlob (blob, blob_size))
	return -1;		/* cannot be an XmlBLOB */
    flag = *(blob + 1);
    if ((flag & GAIA_XML_GPX) == GAIA_XML_GPX)
	gpx = 1;
    return gpx;
}

GAIAGEO_DECLARE int
gaiaXmlBlobGetDocumentSize (const unsigned char *blob, int blob_size)
{
/* Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer */
    int little_endian = 0;
    unsigned char flag;
    int xml_len;
................................................................................
	  return encoding;
      }
    xmlFreeDoc (xml_doc);
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    return NULL;
}

static void
parse_gpx_trkpt_values (xmlNodePtr node, double *x, double *y)
{
/* fetching values from a GPX <trkpt> tag */
    struct _xmlAttr *attr;

    *x = 0.0;
    *y = 0.0;

    attr = node->properties;
    while (attr != NULL)
      {
	  /* attributes */
	  if (attr->type == XML_ATTRIBUTE_NODE)
	    {
		const char *name = (const char *) (attr->name);
		xmlNode *text = attr->children;
		if (strcmp (name, "lat") == 0 && text != NULL)
		    *y = atof ((const char *) (text->content));
		if (strcmp (name, "lon") == 0 && text != NULL)
		    *x = atof ((const char *) (text->content));
	    }
	  attr = attr->next;
      }
}

static double
gpx_time2m (sqlite3_stmt * stmt, const char *timestamp)
{
/* transforming a timestamp into an M-value */
    double m = 0.0;
    int ret;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, timestamp, strlen (timestamp), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_FLOAT)
		    m = sqlite3_column_double (stmt, 0);
	    }
      }
    return m;
}

static void
parse_gpx_trkpt_children (xmlNodePtr node, sqlite3_stmt * stmt, double *z,
			  double *m)
{
/* parsing the children of a GPX <trkpt> tag */
    xmlNode *text;
    *z = 0.0;
    *m = 1721059.500000;	/* 0000-01-01T00:00:00Z */

    while (node)
      {
	  if (node->type == XML_ELEMENT_NODE)
	    {
		const char *name = (const char *) (node->name);
		if (strcmp (name, "ele") == 0)
		  {
		      text = node->children;
		      if (text != NULL)
			  *z = atof ((const char *) (text->content));
		  }
		if (strcmp (name, "time") == 0)
		  {
		      text = node->children;
		      if (text != NULL)
			  *m = gpx_time2m (stmt,
					   (const char *) (text->content));
		  }
	    }
	  node = node->next;
      }
}

static void
parse_gpx_trkpt_tag (xmlNodePtr node, sqlite3_stmt * stmt,
		     gaiaDynamicLinePtr dyn)
{
/* parsing a GPX <trkpt> tag */

    while (node)
      {
	  if (node->type == XML_ELEMENT_NODE)
	    {
		const char *name = (const char *) (node->name);
		if (strcmp (name, "trkpt") == 0)
		  {
		      double x;
		      double y;
		      double z;
		      double m;
		      parse_gpx_trkpt_values (node, &x, &y);
		      parse_gpx_trkpt_children (node->children, stmt, &z, &m);
		      gaiaAppendPointZMToDynamicLine (dyn, x, y, z, m);
		  }
	    }
	  node = node->next;
      }
}

static void
gpx_copy_line (gaiaDynamicLinePtr dyn, gaiaGeomCollPtr geom)
{
/* copying a Linestring from a DynamicLine */
    gaiaPointPtr pt;
    int pts = 0;
    gaiaLinestringPtr ln;
    int iv;

    pt = dyn->First;
    while (pt != NULL)
      {
	  /* counting how many points */
	  pts++;
	  pt = pt->Next;
      }
    if (pts < 2)
	return;

    ln = gaiaAddLinestringToGeomColl (geom, pts);
    iv = 0;
    pt = dyn->First;
    while (pt != NULL)
      {
	  /* copying points */
	  gaiaSetPointXYZM (ln->Coords, iv, pt->X, pt->Y, pt->Z, pt->M);
	  iv++;
	  pt = pt->Next;
      }
}

static void
parse_gpx_trkseg_tag (xmlNodePtr node, sqlite3_stmt * stmt,
		      gaiaGeomCollPtr geom)
{
/* parsing a GPX <trkseg> tag */

    while (node)
      {
	  if (node->type == XML_ELEMENT_NODE)
	    {
		const char *name = (const char *) (node->name);
		if (strcmp (name, "trkseg") == 0)
		  {
		      gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
		      parse_gpx_trkpt_tag (node->children, stmt, dyn);
		      gpx_copy_line (dyn, geom);
		      gaiaFreeDynamicLine (dyn);
		  }
	    }
	  node = node->next;
      }
}

static void
parse_gpx_trk_tag (xmlNodePtr node, sqlite3_stmt * stmt, gaiaGeomCollPtr geom)
{
/* parsing a GPX <trk> tag */

    while (node)
      {
	  if (node->type == XML_ELEMENT_NODE)
	    {
		const char *name = (const char *) (node->name);
		if (strcmp (name, "trk") == 0)
		    parse_gpx_trkseg_tag (node->children, stmt, geom);
	    }
	  node = node->next;
      }
}

static void
parse_gpx_tag (xmlNodePtr node, sqlite3_stmt * stmt, gaiaGeomCollPtr geom)
{
/* parsing a GPX document */

    while (node)
      {
	  if (node->type == XML_ELEMENT_NODE)
	    {
		const char *name = (const char *) (node->name);
		if (strcmp (name, "gpx") == 0)
		    parse_gpx_trk_tag (node->children, stmt, geom);
	    }
	  node = node->next;
      }
}

static void
parse_gpx (xmlDocPtr xml_doc, sqlite3_stmt * stmt, gaiaGeomCollPtr geom)
{
/* attempting to parse a GPX document */
    xmlNodePtr root = xmlDocGetRootElement (xml_doc);
    parse_gpx_tag (root, stmt, geom);
}

GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaXmlBlobMLineFromGPX (const unsigned char *blob, int blob_size,
			 sqlite3 * sqlite)
{
/* Return a MultiLinestring Geometry from a valid XmlBLOB buffer of the GPX type */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt = NULL;
    int compressed = 0;
    int little_endian = 0;
    unsigned char flag;
    const unsigned char *ptr;
    int xml_len;
    int zip_len;
    short uri_len;
    short fileid_len;
    short parentid_len;
    short name_len;
    short title_len;
    short abstract_len;
    short geometry_len;
    unsigned char *xml;
    xmlDocPtr xml_doc;
    int legacy_blob = 0;
    int endian_arch = gaiaEndianArch ();
    xmlGenericErrorFunc silentError = (xmlGenericErrorFunc) spliteSilentError;
    gaiaGeomCollPtr geom = NULL;

/* validity check */
    if (!gaiaIsValidXmlBlob (blob, blob_size))
	return NULL;		/* cannot be an XmlBLOB */
    if (!gaiaIsGpxXmlBlob (blob, blob_size))
	return NULL;		/* not a GPX document */
    if (*(blob + 2) == GAIA_XML_LEGACY_HEADER)
	legacy_blob = 1;
    flag = *(blob + 1);
    if ((flag & GAIA_XML_LITTLE_ENDIAN) == GAIA_XML_LITTLE_ENDIAN)
	little_endian = 1;
    if ((flag & GAIA_XML_COMPRESSED) == GAIA_XML_COMPRESSED)
	compressed = 1;
    xml_len = gaiaImport32 (blob + 3, little_endian, endian_arch);
    zip_len = gaiaImport32 (blob + 7, little_endian, endian_arch);
    ptr = blob + 11;
    uri_len = gaiaImport16 (ptr, little_endian, endian_arch);
    ptr += 3 + uri_len;
    fileid_len = gaiaImport16 (ptr, little_endian, endian_arch);
    ptr += 3 + fileid_len;
    parentid_len = gaiaImport16 (ptr, little_endian, endian_arch);
    ptr += 3 + parentid_len;
    if (!legacy_blob)
      {
	  name_len = gaiaImport16 (ptr, little_endian, endian_arch);
	  ptr += 3 + name_len;
      }
    title_len = gaiaImport16 (ptr, little_endian, endian_arch);
    ptr += 3 + title_len;
    abstract_len = gaiaImport16 (ptr, little_endian, endian_arch);
    ptr += 3 + abstract_len;
    geometry_len = gaiaImport16 (ptr, little_endian, endian_arch);
    ptr += 3 + geometry_len;
    ptr++;
    if (compressed)
      {
	  /* unzipping the XML payload */
	  uLong refLen = xml_len;
	  const Bytef *in = ptr;
	  xml = malloc (xml_len + 1);
	  if (uncompress (xml, &refLen, in, zip_len) != Z_OK)
	    {
		/* uncompress error */
		spatialite_e ("XmlBLOB DEFLATE uncompress error\n");
		free (xml);
		return NULL;
	    }
	  *(xml + xml_len) = '\0';
      }
    else
      {
	  /* just copying the uncompressed XML payload */
	  xml = malloc (xml_len + 1);
	  memcpy (xml, ptr, xml_len);
	  *(xml + xml_len) = '\0';
      }
/* attempting to parse the GPX document */
    xmlSetGenericErrorFunc (NULL, silentError);
    xml_doc =
	xmlReadMemory ((const char *) xml, xml_len, "noname.xml", NULL, 0);
    if (xml_doc == NULL)
      {
	  /* parsing error; not a well-formed XML */
	  xmlSetGenericErrorFunc ((void *) stderr, NULL);
	  return NULL;
      }
    free (xml);

/* creating a prepared SQL statement transforming timestamps into M-values */
    sql = "SELECT julianday(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	goto end;

    geom = gaiaAllocGeomCollXYZM ();
    geom->Srid = 4326;
    geom->DeclaredType = GAIA_MULTILINESTRING;
    parse_gpx (xml_doc, stmt, geom);
    sqlite3_finalize (stmt);

    if (geom->FirstLinestring == NULL)
      {
	  /* empty geometry: returning NULL */
	  gaiaFreeGeomColl (geom);
	  geom = NULL;
      }

  end:
    xmlFreeDoc (xml_doc);
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    return geom;
}

GAIAGEO_DECLARE char *
gaia_libxml2_version (void)
{
/* return the current LIBXML2 version */
    int len;
    char *version;
    const char *ver = LIBXML_DOTTED_VERSION;




|







 







|







 







|







<







 







<
<







 







<







 







|







 







|







 







|

|



|

|

|







 







<
<







 







|










|













<
|







 







<
<







 







<
<







 







<
<







 







<
<
<
<
<
<







 







<
<







 







|












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448

449
450
451
452
453
454
455
...
483
484
485
486
487
488
489


490
491
492
493
494
495
496
....
1463
1464
1465
1466
1467
1468
1469

1470
1471
1472
1473
1474
1475
1476
....
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
....
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
....
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
....
1678
1679
1680
1681
1682
1683
1684


1685
1686
1687
1688
1689
1690
1691
....
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826

1827
1828
1829
1830
1831
1832
1833
1834
....
1850
1851
1852
1853
1854
1855
1856


1857
1858
1859
1860
1861
1862
1863
....
2011
2012
2013
2014
2015
2016
2017


2018
2019
2020
2021
2022
2023
2024
....
2583
2584
2585
2586
2587
2588
2589


2590
2591
2592
2593
2594
2595
2596
....
2723
2724
2725
2726
2727
2728
2729






2730
2731
2732
2733
2734
2735
2736
....
2831
2832
2833
2834
2835
2836
2837


2838
2839
2840
2841
2842
2843
2844
....
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
















3038
3039
3040
3041
3042
3043
3044
....
4213
4214
4215
4216
4217
4218
4219





































































































































































































































































































































4220
4221
4222
4223
4224
4225
4226
/*

 gg_xml.c -- XML Document implementation
    
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	  node = node->next;
      }
}

static void
sniff_payload (xmlDocPtr xml_doc, int *is_iso_metadata,
	       int *is_sld_se_vector_style, int *is_sld_se_raster_style,
	       int *is_sld_style, int *is_svg)
{
/* sniffing the payload type */
    xmlNodePtr root = xmlDocGetRootElement (xml_doc);
    *is_iso_metadata = 0;
    *is_sld_se_vector_style = 0;
    *is_sld_se_raster_style = 0;
    *is_svg = 0;

    if (root->name != NULL)
      {
	  const char *name = (const char *) (root->name);
	  if (strcmp (name, "MD_Metadata") == 0)
	      *is_iso_metadata = 1;
	  if (strcmp (name, "FeatureTypeStyle") == 0
	      || strcmp (name, "PointSymbolizer") == 0
................................................................................
		      /* vector style */
		      *is_sld_se_vector_style = 1;
		  }
		*is_sld_style = 1;
	    }
	  if (strcmp (name, "svg") == 0)
	      *is_svg = 1;


      }
}

static void
find_iso_ids (xmlNodePtr node, const char *name, char **string, int *open_tag,
	      int *char_string, int *count)
{
................................................................................
    xmlSchemaParserCtxtPtr parser_ctxt;
    xmlSchemaValidCtxtPtr valid_ctxt;
    int is_iso_metadata = 0;
    int is_sld_se_vector_style = 0;
    int is_sld_se_raster_style = 0;
    int is_sld_style = 0;
    int is_svg = 0;

    int len;
    int zip_len;
    short uri_len = 0;
    short fileid_len = 0;
    short parentid_len = 0;
    short name_len = 0;
    short title_len = 0;
................................................................................
    char *fileIdentifier = NULL;
    char *parentIdentifier = NULL;
    char *name = NULL;
    char *title = NULL;
    char *abstract = NULL;
    unsigned char *geometry = NULL;
    uLong crc;
    Bytef *zip_buf;
    unsigned char *buf;
    unsigned char *ptr;
    unsigned char flags = 0x00;
    int endian_arch = gaiaEndianArch ();
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    gaiaOutBufferPtr parsingBuf = NULL;
................................................................................
		return;
	    }
	  xmlSchemaFreeValidCtxt (valid_ctxt);
      }

/* testing for special cases: ISO Metadata, SLD/SE Styles and SVG */
    sniff_payload (xml_doc, &is_iso_metadata, &is_sld_se_vector_style,
		   &is_sld_se_raster_style, &is_sld_style, &is_svg);
    if (is_iso_metadata)
	retrieve_iso_identifiers (xml_doc, &fileIdentifier,
				  &parentIdentifier, &title, &abstract,
				  &geometry, &geometry_len);
    if (is_sld_style)
	retrieve_sld_identifiers (xml_doc, &name, &title, &abstract);
    else if (is_sld_se_vector_style || is_sld_se_raster_style)
................................................................................
	*parsing_errors = parsingBuf->Buffer;
    if (schema_validation_errors && schemaValidationBuf)
	*schema_validation_errors = schemaValidationBuf->Buffer;

/* computing the XmlBLOB size */
    len = 39;			/* fixed header-footer size */
    if (schemaURI)
	uri_len = strlen ((const char *) schemaURI);
    if (fileIdentifier)
	fileid_len = strlen ((const char *) fileIdentifier);
    if (parentIdentifier)
	parentid_len = strlen ((const char *) parentIdentifier);
    if (name)
	name_len = strlen ((const char *) name);
    if (title)
	title_len = strlen ((const char *) title);
    if (abstract)
	abstract_len = strlen ((const char *) abstract);
    len += zip_len;
    len += uri_len;
    len += fileid_len;
    len += parentid_len;
    len += name_len;
    len += title_len;
    len += abstract_len;
................................................................................
	flags |= GAIA_XML_SLD_SE_VECTOR_STYLE;
    if (is_sld_se_raster_style)
	flags |= GAIA_XML_SLD_SE_RASTER_STYLE;
    if (is_sld_style)
	flags |= GAIA_XML_SLD_STYLE;
    if (is_svg)
	flags |= GAIA_XML_SVG;


    *(buf + 1) = flags;		/* XmlBLOB flags */
    *(buf + 2) = GAIA_XML_HEADER;	/* HEADER signature */
    gaiaExport32 (buf + 3, xml_len, 1, endian_arch);	/* the uncompressed XMLDocument size */
    gaiaExport32 (buf + 7, zip_len, 1, endian_arch);	/* the compressed XMLDocument size */
    gaiaExport16 (buf + 11, uri_len, 1, endian_arch);	/* the SchemaURI length in bytes */
    *(buf + 13) = GAIA_XML_SCHEMA;	/* SCHEMA signature */
    ptr = buf + 14;
................................................................................
			unsigned char **result, int *out_size)
{
/* Return another XmlBLOB buffer compressed / uncompressed */
    int in_compressed = 0;
    int little_endian = 0;
    unsigned char flag;
    int in_xml_len;
    int in_zip_len;
    short uri_len;
    short fileid_len;
    short parentid_len;
    short name_len;
    short title_len;
    short abstract_len;
    short geometry_len;
    int out_xml_len;
    int out_zip_len;
    uLong crc;
    Bytef *zip_buf;
    int len;
    char *schemaURI;
    char *fileIdentifier;
    char *parentIdentifier;
    char *name;
    char *title;
    char *abstract;
    unsigned char *geometry;
    int is_iso_metadata = 0;
    int is_sld_se_vector_style = 0;
    int is_sld_se_raster_style = 0;
    int is_sld_style = 0;
    int is_svg = 0;

    unsigned char *xml;
    unsigned char *buf;
    unsigned char *ptr;
    unsigned char flags;
    int legacy_blob = 0;
    int endian_arch = gaiaEndianArch ();

    *result = NULL;
................................................................................
	is_sld_se_vector_style = 1;
    if ((flag & GAIA_XML_SLD_SE_RASTER_STYLE) == GAIA_XML_SLD_SE_RASTER_STYLE)
	is_sld_se_raster_style = 1;
    if ((flag & GAIA_XML_SLD_STYLE) == GAIA_XML_SLD_STYLE)
	is_sld_style = 1;
    if ((flag & GAIA_XML_SVG) == GAIA_XML_SVG)
	is_svg = 1;


    in_xml_len = gaiaImport32 (blob + 3, little_endian, endian_arch);
    in_zip_len = gaiaImport32 (blob + 7, little_endian, endian_arch);
    uri_len = gaiaImport16 (blob + 11, little_endian, endian_arch);
    ptr = (unsigned char *) blob + 14;
    if (uri_len)
      {
	  schemaURI = (char *) ptr;
................................................................................
	flags |= GAIA_XML_SLD_SE_VECTOR_STYLE;
    if (is_sld_se_raster_style)
	flags |= GAIA_XML_SLD_SE_RASTER_STYLE;
    if (is_sld_style)
	flags |= GAIA_XML_SLD_STYLE;
    if (is_svg)
	flags |= GAIA_XML_SVG;


    *(buf + 1) = flags;		/* XmlBLOB flags */
    *(buf + 2) = GAIA_XML_HEADER;	/* HEADER signature */
    gaiaExport32 (buf + 3, out_xml_len, 1, endian_arch);	/* the uncompressed XMLDocument size */
    gaiaExport32 (buf + 7, out_zip_len, 1, endian_arch);	/* the compressed XMLDocument size */
    gaiaExport16 (buf + 11, uri_len, 1, endian_arch);	/* the SchemaURI length in bytes */
    *(buf + 13) = GAIA_XML_SCHEMA;	/* SCHEMA signature */
    ptr = buf + 14;
................................................................................
    return ret;
}

GAIAGEO_DECLARE char *
gaiaXmlTextFromBlob (const unsigned char *blob, int blob_size, int indent)
{
/* attempting to extract an XMLDocument from within an XmlBLOB buffer */


    int compressed = 0;
    int little_endian = 0;
    unsigned char flag;
    const unsigned char *ptr;
    int xml_len;
    int zip_len;
    short uri_len;
................................................................................
    if (out)
      {
	  xmlSetGenericErrorFunc ((void *) stderr, NULL);
	  return (char *) out;
      }
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    return NULL;






}

GAIAGEO_DECLARE void
gaiaXmlFromBlob (const unsigned char *blob, int blob_size, int indent,
		 unsigned char **result, int *res_size)
{
/* attempting to extract an XMLDocument from within an XmlBLOB buffer */
................................................................................
	  xmlSetGenericErrorFunc ((void *) stderr, NULL);
	  return;
      }
    gaiaXmlFormat (xml_doc, &out, &out_len, xml_doc->encoding, indent);
    free (xml);
    xmlFreeDoc (xml_doc);
    *result = out;


    *res_size = out_len;
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
}

GAIAGEO_DECLARE int
gaiaXmlLoad (const void *p_cache, const char *path_or_url,
	     unsigned char **result, int *size, char **parsing_errors)
................................................................................
	sld_style = 1;
    return sld_style;
}

GAIAGEO_DECLARE int
gaiaIsSvgXmlBlob (const unsigned char *blob, int blob_size)
{
/* Checks if a valid XmlBLOB buffer does actually contains an SLD/SE Style or not */
    int svg = 0;
    unsigned char flag;

/* validity check */
    if (!gaiaIsValidXmlBlob (blob, blob_size))
	return -1;		/* cannot be an XmlBLOB */
    flag = *(blob + 1);
    if ((flag & GAIA_XML_SVG) == GAIA_XML_SVG)
	svg = 1;
    return svg;
}

















GAIAGEO_DECLARE int
gaiaXmlBlobGetDocumentSize (const unsigned char *blob, int blob_size)
{
/* Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer */
    int little_endian = 0;
    unsigned char flag;
    int xml_len;
................................................................................
	  return encoding;
      }
    xmlFreeDoc (xml_doc);
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    return NULL;
}






































































































































































































































































































































GAIAGEO_DECLARE char *
gaia_libxml2_version (void)
{
/* return the current LIBXML2 version */
    int len;
    char *version;
    const char *ver = LIBXML_DOTTED_VERSION;

Changes to src/gaiageo/lemon/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
324
325
326
327
328
329
330

331
332
333
334
335
336
337
...
618
619
620
621
622
623
624
625
626
627
628
629
630
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo/lemon

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/lemon/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/lemon/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
	ps ps-am tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
141
142
143
144
145
146
147

148
149
150
151
152
153
154
...
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
...
608
609
610
611
612
613
614


615
616
617
618
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo/lemon
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/lemon/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/lemon/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
	ps ps-am tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/gaiageo/lemon/lemon_src/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
263
264
265
266
267
268
269

270
271
272
273
274
275
276
...
437
438
439
440
441
442
443
444
445
446
447
448
449
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo/lemon/lemon_src

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/lemon/lemon_src/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/lemon/lemon_src/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
427
428
429
430
431
432
433


434
435
436
437
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/gaiageo/lemon/lemon_src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gaiageo/lemon/lemon_src/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/gaiageo/lemon/lemon_src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/gaiageo/lemon/lemon_src/lemon.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

229
230

231
232
233
234
235
236
237
238
239
240
241
242



243
244
245
246




247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
...
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319



320
321
322
323



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
...
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
...
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
...
434
435
436
437
438
439
440

441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
...
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538

539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585


586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
...
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
...
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698

699
700
701
702











703


704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802

803
804
805
806
807
808
809
...
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830

831
832
833
834
835
836
837
838
...
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893

894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
...
945
946
947
948
949
950
951
952
953

954
955
956
957
958
959
960
...
990
991
992
993
994
995
996

997

998
999
1000
1001
1002
1003
1004
....
1006
1007
1008
1009
1010
1011
1012
1013


1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
....
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
....
1059
1060
1061
1062
1063
1064
1065

1066
1067
1068
1069
1070
1071
1072
1073
....
1094
1095
1096
1097
1098
1099
1100
1101

1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136

1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178

1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
....
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222

1223
1224
1225
1226
1227
1228
1229
....
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247

1248
1249
1250
1251
1252
1253
1254
....
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
....
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312

1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342

1343
1344
1345
1346
1347
1348
1349
....
1359
1360
1361
1362
1363
1364
1365
1366


1367
1368
1369
1370
1371
1372
1373
....
1387
1388
1389
1390
1391
1392
1393
1394

1395
1396
1397
1398
1399
1400
1401
....
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475

1476
1477
1478
1479
1480
1481
1482
....
1485
1486
1487
1488
1489
1490
1491





























1492





1493
1494


1495










1496
1497
1498















1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607


1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
....
1671
1672
1673
1674
1675
1676
1677
1678
1679

1680
1681
1682

1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
....
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754

1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770


1771
1772
1773
1774
1775
1776
1777
....
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
....
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
....
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904



1905
1906
1907
1908
1909
1910
1911
....
1919
1920
1921
1922
1923
1924
1925
1926

1927
1928
1929
1930
1931
1932
1933
....
1940
1941
1942
1943
1944
1945
1946
1947


1948
1949
1950
1951
1952
1953
1954
....
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983


1984
1985
1986
1987
1988
1989
1990
....
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022

2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
....
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069


2070

2071
2072
2073
2074
2075
2076
2077
....
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107

2108
2109
2110
2111
2112
2113
2114

2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
....
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175






2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227

2228
2229
2230
2231
2232
2233
2234
2235
2236
....
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
....
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
....
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
....
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
....
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
....
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
....
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
....
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
....
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
....
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
....
2801
2802
2803
2804
2805
2806
2807

2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
....
2829
2830
2831
2832
2833
2834
2835
2836
2837

2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
....
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
....
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982

2983

2984
2985
2986
2987
2988
2989
2990
2991
2992


2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005

3006
3007
3008
3009
3010
3011
3012
....
3018
3019
3020
3021
3022
3023
3024
3025


3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049

3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085

3086
3087
3088
3089
3090
3091
3092
3093
....
3104
3105
3106
3107
3108
3109
3110
3111












3112
3113
3114
3115
3116
3117
3118
3119
3120


3121
3122
3123

3124
3125
3126
3127
3128

3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
....
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194

3195
3196
3197
3198
3199
3200

3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250

3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
....
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321

3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336

3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365


3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
....
3392
3393
3394
3395
3396
3397
3398
3399




3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
....
3417
3418
3419
3420
3421
3422
3423
3424

3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
....
3472
3473
3474
3475
3476
3477
3478
3479



3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491




3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518

3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
....
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559


3560
3561
3562
3563
3564
3565
3566
....
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588

3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
....
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798

3799
3800
3801


3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813

3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838

3839
3840
3841
3842
3843
3844
3845
3846
3847
3848


3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881

3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
....
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
....
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
....
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016


4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060

4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075

4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
....
4147
4148
4149
4150
4151
4152
4153

4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
....
4165
4166
4167
4168
4169
4170
4171


4172
4173
4174
4175
4176
4177
4178

4179
4180
4181
4182








4183


4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200


4201
4202


4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290

4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
....
4317
4318
4319
4320
4321
4322
4323

4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349

4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
....
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
....
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
....
4411
4412
4413
4414
4415
4416
4417
4418
4419

4420

4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
....
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
....
4578
4579
4580
4581
4582
4583
4584

4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627

4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
....
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
....
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
....
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766

4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813

4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830

4831
4832
4833
4834
4835
4836
4837


4838
4839
4840
4841
4842
4843
4844
4845
4846
4847


4848
4849
4850
4851
4852
4853
4854
....
4866
4867
4868
4869
4870
4871
4872
4873

4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884

4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
....
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930

4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944

4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
....
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967

4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
....
4992
4993
4994
4995
4996
4997
4998
4999

5000
5001
5002
5003
5004
5005
5006
5007
5008
....
5010
5011
5012
5013
5014
5015
5016
5017

5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
....
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058

5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
....
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097

5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110

5111

5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
....
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134

5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
....
5161
5162
5163
5164
5165
5166
5167
5168

5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184

5185
5186
5187
5188
5189
5190
5191
....
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221

5222
5223
5224
5225
5226
5227
5228
5229


5230
5231
5232
5233
5234
5235
5236
....
5237
5238
5239
5240
5241
5242
5243

5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
....
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294

5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307

5308

5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
....
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331

5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
....
5358
5359
5360
5361
5362
5363
5364
5365

5366
5367
5368
5369
5370
5371
5372
5373
5374
....
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396

5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
....
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434

5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448

5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471

5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
....
5496
5497
5498
5499
5500
5501
5502
5503

5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520

5521
5522
5523
5524
5525
5526
5527
5528
*/
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>

#define ISSPACE(X) isspace((unsigned char)(X))
#define ISDIGIT(X) isdigit((unsigned char)(X))
#define ISALNUM(X) isalnum((unsigned char)(X))
#define ISALPHA(X) isalpha((unsigned char)(X))
#define ISUPPER(X) isupper((unsigned char)(X))
#define ISLOWER(X) islower((unsigned char)(X))


#ifndef __WIN32__
#   if defined(_WIN32) || defined(WIN32)
#       define __WIN32__
#   endif
#endif

#ifdef __WIN32__
#ifdef __cplusplus
extern "C" {
#endif
extern int access(const char *path, int mode);
#ifdef __cplusplus
}
#endif
#else
#include <unistd.h>
#endif

/* #define PRIVATE static */
#define PRIVATE

#ifdef TEST
#define MAXRHS 5       /* Set low to exercise exception code */
#else
#define MAXRHS 1000
#endif

static int showPrecedenceConflict = 0;
static char *msort(char*,char**,int(*)(const char*,const char*));

/*
** Compilers are getting increasingly pedantic about type conversions
** as C evolves ever closer to Ada....  To work around the latest problems
** we have to define the following variant of strlen().
*/
#define lemonStrlen(X)   ((int)strlen(X))

/*
** Compilers are starting to complain about the use of sprintf() and strcpy(),
** saying they are unsafe.  So we define our own versions of those routines too.
**
** There are three routines here:  lemon_sprintf(), lemon_vsprintf(), and
** lemon_addtext(). The first two are replacements for sprintf() and vsprintf().
** The third is a helper routine for vsnprintf() that adds texts to the end of a
** buffer, making sure the buffer is always zero-terminated.
**
** The string formatter is a minimal subset of stdlib sprintf() supporting only
** a few simply conversions:
**
**   %d
**   %s
**   %.*s
**
*/
static void lemon_addtext(
  char *zBuf,           /* The buffer to which text is added */
  int *pnUsed,          /* Slots of the buffer used so far */
  const char *zIn,      /* Text to add */
  int nIn,              /* Bytes of text to add.  -1 to use strlen() */
  int iWidth            /* Field width.  Negative to left justify */
){
  if( nIn<0 ) for(nIn=0; zIn[nIn]; nIn++){}
  while( iWidth>nIn ){ zBuf[(*pnUsed)++] = ' '; iWidth--; }
  if( nIn==0 ) return;
  memcpy(&zBuf[*pnUsed], zIn, nIn);
  *pnUsed += nIn;
  while( (-iWidth)>nIn ){ zBuf[(*pnUsed)++] = ' '; iWidth++; }
  zBuf[*pnUsed] = 0;
}
static int lemon_vsprintf(char *str, const char *zFormat, va_list ap){
  int i, j, k, c;
  int nUsed = 0;
  const char *z;
  char zTemp[50];
  str[0] = 0;
  for(i=j=0; (c = zFormat[i])!=0; i++){
    if( c=='%' ){
      int iWidth = 0;
      lemon_addtext(str, &nUsed, &zFormat[j], i-j, 0);
      c = zFormat[++i];
      if( ISDIGIT(c) || (c=='-' && ISDIGIT(zFormat[i+1])) ){
        if( c=='-' ) i++;
        while( ISDIGIT(zFormat[i]) ) iWidth = iWidth*10 + zFormat[i++] - '0';
        if( c=='-' ) iWidth = -iWidth;
        c = zFormat[i];
      }
      if( c=='d' ){
        int v = va_arg(ap, int);
        if( v<0 ){
          lemon_addtext(str, &nUsed, "-", 1, iWidth);
          v = -v;
        }else if( v==0 ){
          lemon_addtext(str, &nUsed, "0", 1, iWidth);
        }
        k = 0;
        while( v>0 ){
          k++;
          zTemp[sizeof(zTemp)-k] = (v%10) + '0';
          v /= 10;
        }
        lemon_addtext(str, &nUsed, &zTemp[sizeof(zTemp)-k], k, iWidth);
      }else if( c=='s' ){
        z = va_arg(ap, const char*);
        lemon_addtext(str, &nUsed, z, -1, iWidth);
      }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){
        i += 2;
        k = va_arg(ap, int);
        z = va_arg(ap, const char*);
        lemon_addtext(str, &nUsed, z, k, iWidth);
      }else if( c=='%' ){
        lemon_addtext(str, &nUsed, "%", 1, 0);
      }else{
        fprintf(stderr, "illegal format\n");
        exit(1);
      }
      j = i+1;
    }
  }
  lemon_addtext(str, &nUsed, &zFormat[j], i-j, 0);
  return nUsed;
}
static int lemon_sprintf(char *str, const char *format, ...){
  va_list ap;
  int rc;
  va_start(ap, format);
  rc = lemon_vsprintf(str, format, ap);
  va_end(ap);
  return rc;
}
static void lemon_strcpy(char *dest, const char *src){
  while( (*(dest++) = *(src++))!=0 ){}
}
static void lemon_strcat(char *dest, const char *src){
  while( *dest ) dest++;
  lemon_strcpy(dest, src);
}


/* a few forward declarations... */
struct rule;
struct lemon;
struct action;

static struct action *Action_new(void);
static struct action *Action_sort(struct action *);

/********** From the file "build.h" ************************************/
void FindRulePrecedences(struct lemon*);
void FindFirstSets(struct lemon*);
void FindStates(struct lemon*);
void FindLinks(struct lemon*);
void FindFollowSets(struct lemon*);
void FindActions(struct lemon*);

/********* From the file "configlist.h" *********************************/
void Configlist_init(void);
struct config *Configlist_add(struct rule *, int);
struct config *Configlist_addbasis(struct rule *, int);
void Configlist_closure(struct lemon *);
void Configlist_sort(void);
void Configlist_sortbasis(void);
struct config *Configlist_return(void);
struct config *Configlist_basis(void);
void Configlist_eat(struct config *);
void Configlist_reset(void);

/********* From the file "error.h" ***************************************/
void ErrorMsg(const char *, int,const char *, ...);

/****** From the file "option.h" ******************************************/

enum option_type { OPT_FLAG=1,  OPT_INT,  OPT_DBL,  OPT_STR,
         OPT_FFLAG, OPT_FINT, OPT_FDBL, OPT_FSTR};
struct s_options {
  enum option_type type;
  const char *label;
  char *arg;
  const char *message;
};
int    OptInit(char**,struct s_options*,FILE*);
int    OptNArgs(void);
char  *OptArg(int);
void   OptErr(int);
void   OptPrint(void);

/******** From the file "parse.h" *****************************************/
void Parse(struct lemon *lemp);

/********* From the file "plink.h" ***************************************/
struct plink *Plink_new(void);
void Plink_add(struct plink **, struct config *);
void Plink_copy(struct plink **, struct plink *);
void Plink_delete(struct plink *);

/********** From the file "report.h" *************************************/
void Reprint(struct lemon *);
void ReportOutput(struct lemon *);
void ReportTable(struct lemon *, int);
void ReportHeader(struct lemon *);
void CompressTables(struct lemon *);
void ResortStates(struct lemon *);

/********** From the file "set.h" ****************************************/
void  SetSize(int);             /* All sets will be of size N */
char *SetNew(void);               /* A new set for element 0..N */
void  SetFree(char*);             /* Deallocate a set */

int SetAdd(char*,int);            /* Add element to a set */
int SetUnion(char *,char *);    /* A <- A U B, thru element N */

#define SetFind(X,Y) (X[Y])       /* True if Y is in set X */

/********** From the file "struct.h" *************************************/
/*
** Principal data structures for the LEMON parser generator.
*/

typedef enum {LEMON_FALSE=0, LEMON_TRUE} Boolean;

/* Symbols (terminals and nonterminals) of the grammar are stored
** in the following: */
enum symbol_type {



  TERMINAL,
  NONTERMINAL,
  MULTITERMINAL
};




enum e_assoc {
    LEFT,
    RIGHT,
    NONE,
    UNK
};
struct symbol {
  const char *name;        /* Name of the symbol */
  int index;               /* Index number for this symbol */
  enum symbol_type type;   /* Symbols are all either TERMINALS or NTs */
  struct rule *rule;       /* Linked list of rules of this (if an NT) */
  struct symbol *fallback; /* fallback token in case this token doesn't parse */
  int prec;                /* Precedence if defined (-1 otherwise) */
  enum e_assoc assoc;      /* Associativity if precedence is defined */
  char *firstset;          /* First-set for all rules of this symbol */
  Boolean lambda;          /* True if NT and can generate an empty string */
  int useCnt;              /* Number of times used */
  char *destructor;        /* Code which executes whenever this symbol is
                           ** popped from the stack during error processing */
  int destLineno;          /* Line number for start of destructor.  Set to
                           ** -1 for duplicate destructors. */
  char *datatype;          /* The data type of information held by this
                           ** object. Only used if type==NONTERMINAL */
  int dtnum;               /* The data type number.  In the parser, the value
                           ** stack is a union.  The .yy%d element of this
                           ** union is the correct data type for this object */
  /* The following fields are used by MULTITERMINALs only */
  int nsubsym;             /* Number of constituent symbols in the MULTI */
................................................................................
  struct symbol **subsym;  /* Array of constituent symbols */
};

/* Each production rule in the grammar is stored in the following
** structure.  */
struct rule {
  struct symbol *lhs;      /* Left-hand side of the rule */
  const char *lhsalias;    /* Alias for the LHS (NULL if none) */
  int lhsStart;            /* True if left-hand side is the start symbol */
  int ruleline;            /* Line number for the rule */
  int nrhs;                /* Number of RHS symbols */
  struct symbol **rhs;     /* The RHS symbols */
  const char **rhsalias;   /* An alias for each RHS symbol (NULL if none) */
  int line;                /* Line number at which code begins */
  const char *code;        /* The code executed when this rule is reduced */
  const char *codePrefix;  /* Setup code before code[] above */
  const char *codeSuffix;  /* Breakdown code after code[] above */
  int noCode;              /* True if this rule has no associated C code */
  int codeEmitted;         /* True if the code has been emitted already */
  struct symbol *precsym;  /* Precedence symbol for this rule */
  int index;               /* An index number for this rule */
  int iRule;               /* Rule number as used in the generated tables */
  Boolean canReduce;       /* True if this rule is ever reduced */
  Boolean doesReduce;      /* Reduce actions occur after optimization */
  struct rule *nextlhs;    /* Next rule with the same LHS */
  struct rule *next;       /* Next rule in the global list */
};

/* A configuration is a production rule of the grammar together with
** a mark (dot) showing how much of that rule has been processed so far.
** Configurations also contain a follow-set which is a list of terminal
** symbols which are allowed to immediately follow the end of the rule.
** Every configuration is recorded as an instance of the following: */
enum cfgstatus {
  COMPLETE,
  INCOMPLETE
};
struct config {
  struct rule *rp;         /* The rule upon which the configuration is based */
  int dot;                 /* The parse point */
  char *fws;               /* Follow-set for this configuration only */
  struct plink *fplp;      /* Follow-set forward propagation links */
  struct plink *bplp;      /* Follow-set backwards propagation links */
  struct state *stp;       /* Pointer to state which contains this */
  enum cfgstatus status;   /* used during followset and shift computations */



  struct config *next;     /* Next configuration in the state */
  struct config *bp;       /* The next basis configuration */
};




enum e_action {
  SHIFT,
  ACCEPT,
  REDUCE,
  ERROR,
  SSCONFLICT,              /* A shift/shift conflict */
  SRCONFLICT,              /* Was a reduce, but part of a conflict */
  RRCONFLICT,              /* Was a reduce, but part of a conflict */
  SH_RESOLVED,             /* Was a shift.  Precedence resolved conflict */
  RD_RESOLVED,             /* Was reduce.  Precedence resolved conflict */
  NOT_USED,                /* Deleted by compression */
  SHIFTREDUCE              /* Shift first, then reduce */
};

/* Every shift or reduce operation is stored as one of the following */
struct action {
  struct symbol *sp;       /* The look-ahead symbol */
  enum e_action type;
  union {
    struct state *stp;     /* The new state, if a shift */
    struct rule *rp;       /* The rule, if a reduce */
  } x;
  struct symbol *spOpt;    /* SHIFTREDUCE optimization to this symbol */
  struct action *next;     /* Next action for this state */
  struct action *collide;  /* Next action with the same hash */
};

/* Each state of the generated parser's finite state machine
** is encoded as an instance of the following structure. */
struct state {
  struct config *bp;       /* The basis configurations for this state */
  struct config *cfp;      /* All configurations in this set */
  int statenum;            /* Sequential number for this state */
  struct action *ap;       /* List of actions for this state */
  int nTknAct, nNtAct;     /* Number of actions on terminals and nonterminals */
  int iTknOfst, iNtOfst;   /* yy_action[] offset for terminals and nonterms */
  int iDfltReduce;         /* Default action is to REDUCE by this rule */
  struct rule *pDfltReduce;/* The default REDUCE rule. */
  int autoReduce;          /* True if this is an auto-reduce state */
};
#define NO_OFFSET (-2147483647)

/* A followset propagation link indicates that the contents of one
** configuration followset should be propagated to another whenever
** the first changes. */
struct plink {
................................................................................
/* The state vector for the entire parser generator is recorded as
** follows.  (LEMON uses no global variables and makes little use of
** static variables.  Fields in the following structure can be thought
** of as begin global variables in the program.) */
struct lemon {
  struct state **sorted;   /* Table of states sorted by state number */
  struct rule *rule;       /* List of all rules */
  struct rule *startRule;  /* First rule */
  int nstate;              /* Number of states */
  int nxstate;             /* nstate with tail degenerate states removed */
  int nrule;               /* Number of rules */
  int nsymbol;             /* Number of terminal and nonterminal symbols */
  int nterminal;           /* Number of terminal symbols */
  int minShiftReduce;      /* Minimum shift-reduce action value */
  int errAction;           /* Error action value */
  int accAction;           /* Accept action value */
  int noAction;            /* No-op action value */
  int minReduce;           /* Minimum reduce action */
  int maxAction;           /* Maximum action value of any kind */
  struct symbol **symbols; /* Sorted array of pointers to symbols */
  int errorcnt;            /* Number of errors */
  struct symbol *errsym;   /* The error symbol */
  struct symbol *wildcard; /* Token that matches anything */
  char *name;              /* Name of the generated parser */
  char *arg;               /* Declaration of the 3th argument to parser */
  char *tokentype;         /* Type of terminal symbols in the parser stack */
................................................................................
  char *extracode;         /* Code appended to the generated file */
  char *tokendest;         /* Code to execute to destroy token data */
  char *vardest;           /* Code for the default non-terminal destructor */
  char *filename;          /* Name of the input file */
  char *outname;           /* Name of the current output file */
  char *tokenprefix;       /* A prefix added to token names in the .h file */
  int nconflict;           /* Number of parsing conflicts */
  int nactiontab;          /* Number of entries in the yy_action[] table */
  int nlookaheadtab;       /* Number of entries in yy_lookahead[] */
  int tablesize;           /* Total table size of all tables in bytes */
  int basisflag;           /* Print only basis configurations */
  int has_fallback;        /* True if any %fallback is seen in the grammar */
  int nolinenosflag;       /* True if #line statements should not be printed */
  char *argv0;             /* Name of the program */
};

#define MemoryCheck(X) if((X)==0){ \
................................................................................
** by the associative array code building program "aagen".
** Do not edit this file!  Instead, edit the specification
** file, then rerun aagen.
*/
/*
** Code for processing tables in the LEMON parser generator.
*/

/* Routines for handling a strings */

const char *Strsafe(const char *);

void Strsafe_init(void);
int Strsafe_insert(const char *);
const char *Strsafe_find(const char *);

/* Routines for handling symbols of the grammar */

struct symbol *Symbol_new(const char *);
int Symbolcmpp(const void *, const void *);
void Symbol_init(void);
int Symbol_insert(struct symbol *, const char *);
struct symbol *Symbol_find(const char *);
struct symbol *Symbol_Nth(int);
int Symbol_count(void);
struct symbol **Symbol_arrayof(void);

/* Routines to manage the state table */

int Configcmp(const char *, const char *);
struct state *State_new(void);
void State_init(void);
int State_insert(struct state *, struct config *);
struct state *State_find(struct config *);
struct state **State_arrayof(void);

/* Routines used for efficiency in Configlist_add */

void Configtable_init(void);
int Configtable_insert(struct config *);
struct config *Configtable_find(struct config *);
void Configtable_clear(int(*)(struct config *));

/****************** From the file "action.c" *******************************/
/*
** Routines processing parser actions in the LEMON parser generator.
*/

/* Allocate a new parser action */
static struct action *Action_new(void){
  static struct action *freelist = 0;
  struct action *newaction;

  if( freelist==0 ){
    int i;
    int amt = 100;
    freelist = (struct action *)calloc(amt, sizeof(struct action));
    if( freelist==0 ){
      fprintf(stderr,"Unable to allocate memory for a new parser action.");
      exit(1);
    }
    for(i=0; i<amt-1; i++) freelist[i].next = &freelist[i+1];
    freelist[amt-1].next = 0;
  }
  newaction = freelist;
  freelist = freelist->next;
  return newaction;
}

/* Compare two actions for sorting purposes.  Return negative, zero, or
** positive if the first action is less than, equal to, or greater than
** the first
*/
static int actioncmp(
................................................................................
  struct action *ap2
){
  int rc;
  rc = ap1->sp->index - ap2->sp->index;
  if( rc==0 ){
    rc = (int)ap1->type - (int)ap2->type;
  }
  if( rc==0 && (ap1->type==REDUCE || ap1->type==SHIFTREDUCE) ){
    rc = ap1->x.rp->index - ap2->x.rp->index;
  }
  if( rc==0 ){
    rc = (int) (ap2 - ap1);
  }
  return rc;
}

/* Sort parser actions */
static struct action *Action_sort(
  struct action *ap
){
  ap = (struct action *)msort((char *)ap,(char **)&ap->next,
                              (int(*)(const char*,const char*))actioncmp);
  return ap;
}

void Action_add(
  struct action **app,
  enum e_action type,
  struct symbol *sp,
  char *arg
){

  struct action *newaction;
  newaction = Action_new();
  newaction->next = *app;
  *app = newaction;
  newaction->type = type;
  newaction->sp = sp;
  newaction->spOpt = 0;
  if( type==SHIFT ){
    newaction->x.stp = (struct state *)arg;
  }else{
    newaction->x.rp = (struct rule *)arg;
  }
}
/********************** New code to implement the "acttab" module ***********/
/*
** This module implements routines use to construct the yy_action[] table.
*/

/*
** The state of the yy_action table under construction is an instance of
** the following structure.
**
** The yy_action table maps the pair (state_number, lookahead) into an
** action_number.  The table is an array of integers pairs.  The state_number
** determines an initial offset into the yy_action array.  The lookahead
** value is then added to this initial offset to get an index X into the
** yy_action array. If the aAction[X].lookahead equals the value of the
** of the lookahead input, then the value of the action_number output is
** aAction[X].action.  If the lookaheads do not match then the
** default action for the state_number is returned.
**
** All actions associated with a single state_number are first entered
** into aLookahead[] using multiple calls to acttab_action().  Then the
** actions for that single state_number are placed into the aAction[]
** array with a single call to acttab_insert().  The acttab_insert() call
** also resets the aLookahead[] array in preparation for the next
** state number.
*/
struct lookahead_action {
  int lookahead;             /* Value of the lookahead token */
  int action;                /* Action to take on the given lookahead */
};
typedef struct acttab acttab;
struct acttab {
  int nAction;                 /* Number of used slots in aAction[] */
  int nActionAlloc;            /* Slots allocated for aAction[] */
  struct lookahead_action


    *aAction,                  /* The yy_action[] table under construction */
    *aLookahead;               /* A single new transaction set */
  int mnLookahead;             /* Minimum aLookahead[].lookahead */
  int mnAction;                /* Action associated with mnLookahead */
  int mxLookahead;             /* Maximum aLookahead[].lookahead */
  int nLookahead;              /* Used slots in aLookahead[] */
  int nLookaheadAlloc;         /* Slots allocated in aLookahead[] */
  int nterminal;               /* Number of terminal symbols */
  int nsymbol;                 /* total number of symbols */
};

/* Return the number of entries in the yy_action table */
#define acttab_lookahead_size(X) ((X)->nAction)

/* The value for the N-th entry in yy_action */
#define acttab_yyaction(X,N)  ((X)->aAction[N].action)

/* The value for the N-th entry in yy_lookahead */
#define acttab_yylookahead(X,N)  ((X)->aAction[N].lookahead)

................................................................................
void acttab_free(acttab *p){
  free( p->aAction );
  free( p->aLookahead );
  free( p );
}

/* Allocate a new acttab structure */
acttab *acttab_alloc(int nsymbol, int nterminal){
  acttab *p = (acttab *) calloc( 1, sizeof(*p) );
  if( p==0 ){
    fprintf(stderr,"Unable to allocate memory for a new acttab.");
    exit(1);
  }
  memset(p, 0, sizeof(*p));
  p->nsymbol = nsymbol;
  p->nterminal = nterminal;
  return p;
}

/* Add a new action to the current transaction set.
**
** This routine is called once for each lookahead for a particular
** state.
*/
void acttab_action(acttab *p, int lookahead, int action){
  if( p->nLookahead>=p->nLookaheadAlloc ){
    p->nLookaheadAlloc += 25;
    p->aLookahead = (struct lookahead_action *) realloc( p->aLookahead,
                             sizeof(p->aLookahead[0])*p->nLookaheadAlloc );
    if( p->aLookahead==0 ){
      fprintf(stderr,"malloc failed\n");
      exit(1);
    }
  }
  if( p->nLookahead==0 ){
................................................................................

/*
** Add the transaction set built up with prior calls to acttab_action()
** into the current action table.  Then reset the transaction set back
** to an empty set in preparation for a new round of acttab_action() calls.
**
** Return the offset into the action table of the new transaction.
**
** If the makeItSafe parameter is true, then the offset is chosen so that
** it is impossible to overread the yy_lookaside[] table regardless of
** the lookaside token.  This is done for the terminal symbols, as they
** come from external inputs and can contain syntax errors.  When makeItSafe
** is false, there is more flexibility in selecting offsets, resulting in
** a smaller table.  For non-terminal symbols, which are never syntax errors,
** makeItSafe can be false.
*/
int acttab_insert(acttab *p, int makeItSafe){
  int i, j, k, n, end;
  assert( p->nLookahead>0 );

  /* Make sure we have enough space to hold the expanded action table
  ** in the worst case.  The worst case occurs if the transaction set
  ** must be appended to the current action table
  */
  n = p->nsymbol + 1;
  if( p->nAction + n >= p->nActionAlloc ){
    int oldAlloc = p->nActionAlloc;
    p->nActionAlloc = p->nAction + n + p->nActionAlloc + 20;
    p->aAction = (struct lookahead_action *) realloc( p->aAction,
                          sizeof(p->aAction[0])*p->nActionAlloc);
    if( p->aAction==0 ){
      fprintf(stderr,"malloc failed\n");
      exit(1);
    }
    for(i=oldAlloc; i<p->nActionAlloc; i++){
      p->aAction[i].lookahead = -1;
      p->aAction[i].action = -1;
    }
  }

  /* Scan the existing action table looking for an offset that is a
  ** duplicate of the current transaction set.  Fall out of the loop
  ** if and when the duplicate is found.

  **
  ** i is the index in p->aAction[] where p->mnLookahead is inserted.
  */
  end = makeItSafe ? p->mnLookahead : 0;











  for(i=p->nAction-1; i>=end; i--){


    if( p->aAction[i].lookahead==p->mnLookahead ){
      /* All lookaheads and actions in the aLookahead[] transaction
      ** must match against the candidate aAction[i] entry. */
      if( p->aAction[i].action!=p->mnAction ) continue;
      for(j=0; j<p->nLookahead; j++){
        k = p->aLookahead[j].lookahead - p->mnLookahead + i;
        if( k<0 || k>=p->nAction ) break;
        if( p->aLookahead[j].lookahead!=p->aAction[k].lookahead ) break;
        if( p->aLookahead[j].action!=p->aAction[k].action ) break;
      }
      if( j<p->nLookahead ) continue;

      /* No possible lookahead value that is not in the aLookahead[]
      ** transaction is allowed to match aAction[i] */
      n = 0;
      for(j=0; j<p->nAction; j++){
        if( p->aAction[j].lookahead<0 ) continue;
        if( p->aAction[j].lookahead==j+p->mnLookahead-i ) n++;
      }
      if( n==p->nLookahead ){
        break;  /* An exact match is found at offset i */
      }
    }
  }

  /* If no existing offsets exactly match the current transaction, find an
  ** an empty offset in the aAction[] table in which we can add the
  ** aLookahead[] transaction.
  */
  if( i<end ){
    /* Look for holes in the aAction[] table that fit the current
    ** aLookahead[] transaction.  Leave i set to the offset of the hole.
    ** If no holes are found, i is left at p->nAction, which means the
    ** transaction will be appended. */
    i = makeItSafe ? p->mnLookahead : 0;
    for(; i<p->nActionAlloc - p->mxLookahead; i++){
      if( p->aAction[i].lookahead<0 ){
        for(j=0; j<p->nLookahead; j++){
          k = p->aLookahead[j].lookahead - p->mnLookahead + i;
          if( k<0 ) break;
          if( p->aAction[k].lookahead>=0 ) break;
        }
        if( j<p->nLookahead ) continue;
        for(j=0; j<p->nAction; j++){
          if( p->aAction[j].lookahead==j+p->mnLookahead-i ) break;
        }
        if( j==p->nAction ){
          break;  /* Fits in empty slots */
        }
      }
    }
  }
  /* Insert transaction set at index i. */
#if 0
  printf("Acttab:");
  for(j=0; j<p->nLookahead; j++){
    printf(" %d", p->aLookahead[j].lookahead);
  }
  printf(" inserted at %d\n", i);
#endif
  for(j=0; j<p->nLookahead; j++){
    k = p->aLookahead[j].lookahead - p->mnLookahead + i;
    p->aAction[k] = p->aLookahead[j];
    if( k>=p->nAction ) p->nAction = k+1;
  }
  if( makeItSafe && i+p->nterminal>=p->nAction ) p->nAction = i+p->nterminal+1;
  p->nLookahead = 0;

  /* Return the offset that is added to the lookahead in order to get the
  ** index into yy_action of the action */
  return i - p->mnLookahead;
}

/*
** Return the size of the action table without the trailing syntax error
** entries.
*/
int acttab_action_size(acttab *p){
  int n = p->nAction;
  while( n>0 && p->aAction[n-1].lookahead<0 ){ n--; }
  return n;
}

/********************** From the file "build.c" *****************************/
/*
** Routines to construction the finite state machine for the LEMON
** parser generator.
*/

/* Find a precedence symbol of every rule in the grammar.
**
** Those rules which have a precedence symbol coded in the input
** grammar using the "[symbol]" construct will already have the
** rp->precsym field filled.  Other rules take as their precedence
** symbol the first RHS symbol with a defined precedence.  If there
** are not RHS symbols with a defined precedence, the precedence
** symbol field is left blank.
*/
void FindRulePrecedences(struct lemon *xp)

{
  struct rule *rp;
  for(rp=xp->rule; rp; rp=rp->next){
    if( rp->precsym==0 ){
      int i, j;
      for(i=0; i<rp->nrhs && rp->precsym==0; i++){
        struct symbol *sp = rp->rhs[i];
................................................................................
            if( sp->subsym[j]->prec>=0 ){
              rp->precsym = sp->subsym[j];
              break;
            }
          }
        }else if( sp->prec>=0 ){
          rp->precsym = rp->rhs[i];
        }
      }
    }
  }
  return;
}

/* Find all nonterminals which will generate the empty string.
** Then go back and compute the first sets of every nonterminal.
** The first set is the set of all terminal symbols which can begin
** a string generated by that nonterminal.
*/

void FindFirstSets(struct lemon *lemp)
{
  int i, j;
  struct rule *rp;
  int progress;

  for(i=0; i<lemp->nsymbol; i++){
    lemp->symbols[i]->lambda = LEMON_FALSE;
................................................................................

  /* First compute all lambdas */
  do{
    progress = 0;
    for(rp=lemp->rule; rp; rp=rp->next){
      if( rp->lhs->lambda ) continue;
      for(i=0; i<rp->nrhs; i++){
        struct symbol *sp = rp->rhs[i];
        assert( sp->type==NONTERMINAL || sp->lambda==LEMON_FALSE );
        if( sp->lambda==LEMON_FALSE ) break;
      }
      if( i==rp->nrhs ){
        rp->lhs->lambda = LEMON_TRUE;
        progress = 1;
      }
    }
  }while( progress );
................................................................................
          progress += SetAdd(s1->firstset,s2->index);
          break;
        }else if( s2->type==MULTITERMINAL ){
          for(j=0; j<s2->nsubsym; j++){
            progress += SetAdd(s1->firstset,s2->subsym[j]->index);
          }
          break;
        }else if( s1==s2 ){
          if( s1->lambda==LEMON_FALSE ) break;
        }else{
          progress += SetUnion(s1->firstset,s2->firstset);
          if( s2->lambda==LEMON_FALSE ) break;
        }
      }
    }
  }while( progress );
  return;
}

/* Compute all LR(0) states for the grammar.  Links
** are added to between some states so that the LR(1) follow sets
** can be computed later.
*/
PRIVATE struct state *getstate(struct lemon *);  /* forward reference */

void FindStates(struct lemon *lemp)
{
  struct symbol *sp;
  struct rule *rp;

  Configlist_init();

  /* Find the start symbol */
  if( lemp->start ){
    sp = Symbol_find(lemp->start);
    if( sp==0 ){
      ErrorMsg(lemp->filename,0,
"The specified start symbol \"%s\" is not \
in a nonterminal of the grammar.  \"%s\" will be used as the start \
symbol instead.",lemp->start,lemp->startRule->lhs->name);
      lemp->errorcnt++;
      sp = lemp->startRule->lhs;
    }
  }else{
    sp = lemp->startRule->lhs;
  }

  /* Make sure the start symbol doesn't occur on the right-hand side of
  ** any rule.  Report an error if it does.  (YACC would generate a new
  ** start symbol in this case.) */
  for(rp=lemp->rule; rp; rp=rp->next){
    int i;
................................................................................
  (void)getstate(lemp);
  return;
}

/* Return a pointer to a state which is described by the configuration
** list which has been built from calls to Configlist_add.
*/
PRIVATE void buildshifts(struct lemon *, struct state *); /* Forwd ref */
PRIVATE struct state *getstate(struct lemon *lemp)

{
  struct config *cfp, *bp;
  struct state *stp;

  /* Extract the sorted basis of the new state.  The basis was constructed
  ** by prior calls to "Configlist_addbasis()". */
  Configlist_sortbasis();
................................................................................
  }
  return stp;
}

/*
** Return true if two symbols are the same.
*/

int same_symbol(struct symbol *a, struct symbol *b)

{
  int i;
  if( a==b ) return 1;
  if( a->type!=MULTITERMINAL ) return 0;
  if( b->type!=MULTITERMINAL ) return 0;
  if( a->nsubsym!=b->nsubsym ) return 0;
  for(i=0; i<a->nsubsym; i++){
................................................................................
  }
  return 1;
}

/* Construct all successor states to the given state.  A "successor"
** state is any state which can be reached by a shift action.
*/
PRIVATE void buildshifts(struct lemon *lemp, struct state *stp)


{
  struct config *cfp;  /* For looping thru the config closure of "stp" */
  struct config *bcfp; /* For the inner loop on config closure of "stp" */
  struct config *newcfg;  /* */
  struct symbol *sp;   /* Symbol following the dot in configuration "cfp" */
  struct symbol *bsp;  /* Symbol following the dot in configuration "bcfp" */
  struct state *newstp; /* A pointer to a successor state */

  /* Each configuration becomes complete after it contibutes to a successor
  ** state.  Initially, all configurations are incomplete */
  for(cfp=stp->cfp; cfp; cfp=cfp->next) cfp->status = INCOMPLETE;
................................................................................
    ** construction but with the dot shifted one symbol to the right. */
    for(bcfp=cfp; bcfp; bcfp=bcfp->next){
      if( bcfp->status==COMPLETE ) continue;    /* Already used */
      if( bcfp->dot>=bcfp->rp->nrhs ) continue; /* Can't shift this one */
      bsp = bcfp->rp->rhs[bcfp->dot];           /* Get symbol after dot */
      if( !same_symbol(bsp,sp) ) continue;      /* Must be same as for "cfp" */
      bcfp->status = COMPLETE;                  /* Mark this config as used */
      newcfg = Configlist_addbasis(bcfp->rp,bcfp->dot+1);
      Plink_add(&newcfg->bplp,bcfp);
    }

    /* Get a pointer to the state described by the basis configuration set
    ** constructed in the preceding loop */
    newstp = getstate(lemp);

    /* The state "newstp" is reached from the state "stp" by a shift action
................................................................................
    }
  }
}

/*
** Construct the propagation links
*/

void FindLinks(struct lemon *lemp)
{
  int i;
  struct config *cfp, *other;
  struct state *stp;
  struct plink *plp;

  /* Housekeeping detail:
................................................................................
}

/* Compute all followsets.
**
** A followset is the set of all symbols which can come immediately
** after a configuration.
*/
void FindFollowSets(struct lemon *lemp)

{
  int i;
  struct config *cfp;
  struct plink *plp;
  int progress;
  int change;

  for(i=0; i<lemp->nstate; i++){
    for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
      cfp->status = INCOMPLETE;
    }
  }

  do{
    progress = 0;
    for(i=0; i<lemp->nstate; i++){
      for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
        if( cfp->status==COMPLETE ) continue;
        for(plp=cfp->fplp; plp; plp=plp->next){
          change = SetUnion(plp->cfp->fws,cfp->fws);
          if( change ){
            plp->cfp->status = INCOMPLETE;
            progress = 1;
          }
        }
        cfp->status = COMPLETE;
      }
    }
  }while( progress );
}

static int resolve_conflict(struct action *,struct action *);

/* Compute the reduce actions, and resolve conflicts.
*/

void FindActions(struct lemon *lemp)
{
  int i,j;
  struct config *cfp;
  struct state *stp;
  struct symbol *sp;
  struct rule *rp;

  /* Add all of the reduce actions
  ** A reduce action is added for each element of the followset of
  ** a configuration which has its dot at the extreme right.
  */
  for(i=0; i<lemp->nstate; i++){   /* Loop over all states */
    stp = lemp->sorted[i];
    for(cfp=stp->cfp; cfp; cfp=cfp->next){  /* Loop over all configurations */
      if( cfp->rp->nrhs==cfp->dot ){        /* Is dot at extreme right? */
        for(j=0; j<lemp->nterminal; j++){
          if( SetFind(cfp->fws,j) ){
            /* Add a reduce action to the state "stp" which will reduce by the
            ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */
            Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp);
          }
        }
      }
    }
  }

  /* Add the accepting token */
  if( lemp->start ){
    sp = Symbol_find(lemp->start);
    if( sp==0 ) sp = lemp->startRule->lhs;
  }else{
    sp = lemp->startRule->lhs;
  }
  /* Add to the first state (which is always the starting state of the
  ** finite state machine) an action to ACCEPT if the lookahead is the
  ** start nonterminal.  */
  Action_add(&lemp->sorted[0]->ap,ACCEPT,sp,0);

  /* Resolve conflicts */
  for(i=0; i<lemp->nstate; i++){
    struct action *ap, *nap;

    stp = lemp->sorted[i];
    /* assert( stp->ap ); */
    stp->ap = Action_sort(stp->ap);
    for(ap=stp->ap; ap && ap->next; ap=ap->next){
      for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){
         /* The two actions "ap" and "nap" have the same lookahead.
         ** Figure out which one should be used */
         lemp->nconflict += resolve_conflict(ap,nap);
      }
    }
  }

  /* Report an error for each rule that can never be reduced. */
  for(rp=lemp->rule; rp; rp=rp->next) rp->canReduce = LEMON_FALSE;
  for(i=0; i<lemp->nstate; i++){
................................................................................
**   is not associated with the error rule.  If neither or both
**   actions are associated with an error rule, then try to
**   use precedence to resolve the conflict.
**
** If either action is a SHIFT, then it must be apx.  This
** function won't work if apx->type==REDUCE and apy->type==SHIFT.
*/
static int resolve_conflict(
  struct action *apx,
  struct action *apy
){

  struct symbol *spx, *spy;
  int errcnt = 0;
  assert( apx->sp==apy->sp );  /* Otherwise there would be no conflict */
  if( apx->type==SHIFT && apy->type==SHIFT ){
    apy->type = SSCONFLICT;
    errcnt++;
  }
................................................................................
  if( apx->type==SHIFT && apy->type==REDUCE ){
    spx = apx->sp;
    spy = apy->x.rp->precsym;
    if( spy==0 || spx->prec<0 || spy->prec<0 ){
      /* Not enough precedence information. */
      apy->type = SRCONFLICT;
      errcnt++;
    }else if( spx->prec>spy->prec ){    /* higher precedence wins */
      apy->type = RD_RESOLVED;
    }else if( spx->prec<spy->prec ){
      apx->type = SH_RESOLVED;
    }else if( spx->prec==spy->prec && spx->assoc==RIGHT ){ /* Use operator */
      apy->type = RD_RESOLVED;                             /* associativity */
    }else if( spx->prec==spy->prec && spx->assoc==LEFT ){  /* to break tie */
      apx->type = SH_RESOLVED;
    }else{
      assert( spx->prec==spy->prec && spx->assoc==NONE );
      apx->type = ERROR;

    }
  }else if( apx->type==REDUCE && apy->type==REDUCE ){
    spx = apx->x.rp->precsym;
    spy = apy->x.rp->precsym;
    if( spx==0 || spy==0 || spx->prec<0 ||
    spy->prec<0 || spx->prec==spy->prec ){
      apy->type = RRCONFLICT;
................................................................................
      errcnt++;
    }else if( spx->prec>spy->prec ){
      apy->type = RD_RESOLVED;
    }else if( spx->prec<spy->prec ){
      apx->type = RD_RESOLVED;
    }
  }else{
    assert(
      apx->type==SH_RESOLVED ||
      apx->type==RD_RESOLVED ||
      apx->type==SSCONFLICT ||
      apx->type==SRCONFLICT ||
      apx->type==RRCONFLICT ||
      apy->type==SH_RESOLVED ||
      apy->type==RD_RESOLVED ||
................................................................................
static struct config *freelist = 0;      /* List of free configurations */
static struct config *current = 0;       /* Top of list of configurations */
static struct config **currentend = 0;   /* Last on list of configs */
static struct config *basis = 0;         /* Top of list of basis configs */
static struct config **basisend = 0;     /* End of list of basis configs */

/* Return a pointer to a new configuration */
PRIVATE struct config *newconfig(void){
  struct config *newcfg;
  if( freelist==0 ){
    int i;
    int amt = 3;
    freelist = (struct config *)calloc( amt, sizeof(struct config) );
    if( freelist==0 ){
      fprintf(stderr,"Unable to allocate memory for a new configuration.");
      exit(1);
    }
    for(i=0; i<amt-1; i++) freelist[i].next = &freelist[i+1];
    freelist[amt-1].next = 0;
  }
  newcfg = freelist;
  freelist = freelist->next;
  return newcfg;
}

/* The configuration "old" is no longer used */
PRIVATE void deleteconfig(struct config *old)

{
  old->next = freelist;
  freelist = old;
}

/* Initialized the configuration list builder */
void Configlist_init(void){
  current = 0;
  currentend = &current;
  basis = 0;
  basisend = &basis;
  Configtable_init();
  return;
}

/* Initialized the configuration list builder */
void Configlist_reset(void){
  current = 0;
  currentend = &current;
  basis = 0;
  basisend = &basis;
  Configtable_clear(0);
  return;
}

/* Add another configuration to the configuration list */
struct config *Configlist_add(
  struct rule *rp,    /* The rule */
  int dot             /* Index into the RHS of the rule where the dot goes */
){

  struct config *cfp, model;

  assert( currentend!=0 );
  model.rp = rp;
  model.dot = dot;
  cfp = Configtable_find(&model);
  if( cfp==0 ){
................................................................................
    currentend = &cfp->next;
    Configtable_insert(cfp);
  }
  return cfp;
}

/* Add a basis configuration to the configuration list */
struct config *Configlist_addbasis(struct rule *rp, int dot)


{
  struct config *cfp, model;

  assert( basisend!=0 );
  assert( currentend!=0 );
  model.rp = rp;
  model.dot = dot;
................................................................................
    basisend = &cfp->bp;
    Configtable_insert(cfp);
  }
  return cfp;
}

/* Compute the closure of the configuration list */
void Configlist_closure(struct lemon *lemp)

{
  struct config *cfp, *newcfp;
  struct rule *rp, *newrp;
  struct symbol *sp, *xsp;
  int i, dot;

  assert( currentend!=0 );
................................................................................
            break;
          }else if( xsp->type==MULTITERMINAL ){
            int k;
            for(k=0; k<xsp->nsubsym; k++){
              SetAdd(newcfp->fws, xsp->subsym[k]->index);
            }
            break;
          }else{
            SetUnion(newcfp->fws,xsp->firstset);
            if( xsp->lambda==LEMON_FALSE ) break;
          }
        }
        if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp);
      }
    }
  }
  return;
}

/* Sort the configuration list */
void Configlist_sort(void){
  current = (struct config*)msort((char*)current,(char**)&(current->next),
                                  Configcmp);
  currentend = 0;
  return;
}

/* Sort the basis configuration list */
void Configlist_sortbasis(void){
  basis = (struct config*)msort((char*)current,(char**)&(current->bp),
                                Configcmp);
  basisend = 0;
  return;
}

/* Return a pointer to the head of the configuration list and
** reset the list */
struct config *Configlist_return(void){
  struct config *old;
  old = current;
  current = 0;
  currentend = 0;
  return old;
}

/* Return a pointer to the head of the configuration list and
** reset the list */
struct config *Configlist_basis(void){
  struct config *old;
  old = basis;
  basis = 0;
  basisend = 0;
  return old;
}

/* Free all elements of the given configuration list */
void Configlist_eat(struct config *cfp)

{
  struct config *nextcfp;
  for(; cfp; cfp=nextcfp){
    nextcfp = cfp->next;
    assert( cfp->fplp==0 );
    assert( cfp->bplp==0 );
    if( cfp->fws ) SetFree(cfp->fws);
................................................................................
  return;
}
/***************** From the file "error.c" *********************************/
/*
** Code for printing error message.
*/






























void ErrorMsg(const char *filename, int lineno, const char *format, ...){





  va_list ap;
  fprintf(stderr, "%s:%d: ", filename, lineno);


  va_start(ap, format);










  vfprintf(stderr,format,ap);
  va_end(ap);
  fprintf(stderr, "\n");















}
/**************** From the file "main.c" ************************************/
/*
** Main program file for the LEMON parser generator.
*/

/* Report an out-of-memory condition and abort.  This function
** is used mostly by the "MemoryCheck" macro in struct.h
*/
void memory_error(void){
  fprintf(stderr,"Out of memory.  Aborting...\n");
  exit(1);
}

static int nDefine = 0;      /* Number of -D options on the command line */
static char **azDefine = 0;  /* Name of the -D macros */

/* This routine is called with the argument to each -D command-line option.
** Add the macro defined to the azDefine array.
*/
static void handle_D_option(char *z){
  char **paz;
  nDefine++;
  azDefine = (char **) realloc(azDefine, sizeof(azDefine[0])*nDefine);
  if( azDefine==0 ){
    fprintf(stderr,"out of memory\n");
    exit(1);
  }
  paz = &azDefine[nDefine-1];
  *paz = (char *) malloc( lemonStrlen(z)+1 );
  if( *paz==0 ){
    fprintf(stderr,"out of memory\n");
    exit(1);
  }
  lemon_strcpy(*paz, z);
  for(z=*paz; *z && *z!='='; z++){}
  *z = 0;
}

static char *user_templatename = NULL;
static void handle_T_option(char *z){
  user_templatename = (char *) malloc( lemonStrlen(z)+1 );
  if( user_templatename==0 ){
    memory_error();
  }
  lemon_strcpy(user_templatename, z);
}

/* Merge together to lists of rules ordered by rule.iRule */
static struct rule *Rule_merge(struct rule *pA, struct rule *pB){
  struct rule *pFirst = 0;
  struct rule **ppPrev = &pFirst;
  while( pA && pB ){
    if( pA->iRule<pB->iRule ){
      *ppPrev = pA;
      ppPrev = &pA->next;
      pA = pA->next;
    }else{
      *ppPrev = pB;
      ppPrev = &pB->next;
      pB = pB->next;
    }
  }
  if( pA ){
    *ppPrev = pA;
  }else{
    *ppPrev = pB;
  }
  return pFirst;
}

/*
** Sort a list of rules in order of increasing iRule value
*/
static struct rule *Rule_sort(struct rule *rp){
  int i;
  struct rule *pNext;
  struct rule *x[32];
  memset(x, 0, sizeof(x));
  while( rp ){
    pNext = rp->next;
    rp->next = 0;
    for(i=0; i<sizeof(x)/sizeof(x[0]) && x[i]; i++){
      rp = Rule_merge(x[i], rp);
      x[i] = 0;
    }
    x[i] = rp;
    rp = pNext;
  }
  rp = 0;
  for(i=0; i<sizeof(x)/sizeof(x[0]); i++){
    rp = Rule_merge(x[i], rp);
  }
  return rp;
}

/* forward reference */
static const char *minimum_size_type(int lwr, int upr, int *pnByte);

/* Print a single line of the "Parser Stats" output
*/
static void stats_line(const char *zLabel, int iValue){
  int nLabel = lemonStrlen(zLabel);
  printf("  %s%.*s %5d\n", zLabel,
         35-nLabel, "................................",
         iValue);
}

/* The main program.  Parse the command line and do it... */


int main(int argc, char **argv)
{
  static int version = 0;
  static int rpflag = 0;
  static int basisflag = 0;
  static int compress = 0;
  static int quiet = 0;
  static int statistics = 0;
  static int mhflag = 0;
  static int nolinenosflag = 0;
  static int noResort = 0;
  static struct s_options options[] = {
    {OPT_FLAG, "b", (char*)&basisflag, "Print only the basis in report."},
    {OPT_FLAG, "c", (char*)&compress, "Don't compress the action table."},
    {OPT_FSTR, "D", (char*)handle_D_option, "Define an %ifdef macro."},
    {OPT_FSTR, "f", 0, "Ignored.  (Placeholder for -f compiler options.)"},
    {OPT_FLAG, "g", (char*)&rpflag, "Print grammar without actions."},
    {OPT_FSTR, "I", 0, "Ignored.  (Placeholder for '-I' compiler options.)"},
    {OPT_FLAG, "m", (char*)&mhflag, "Output a makeheaders compatible file."},
    {OPT_FLAG, "l", (char*)&nolinenosflag, "Do not print #line statements."},
    {OPT_FSTR, "O", 0, "Ignored.  (Placeholder for '-O' compiler options.)"},
    {OPT_FLAG, "p", (char*)&showPrecedenceConflict,
                    "Show conflicts resolved by precedence rules"},
    {OPT_FLAG, "q", (char*)&quiet, "(Quiet) Don't print the report file."},
    {OPT_FLAG, "r", (char*)&noResort, "Do not sort or renumber states"},
    {OPT_FLAG, "s", (char*)&statistics,
                                   "Print parser stats to standard output."},
    {OPT_FLAG, "x", (char*)&version, "Print the version number."},
    {OPT_FSTR, "T", (char*)handle_T_option, "Specify a template file."},
    {OPT_FSTR, "W", 0, "Ignored.  (Placeholder for '-W' compiler options.)"},
    {OPT_FLAG,0,0,0}
  };
  int i;
  int exitcode;
  struct lemon lem;
  struct rule *rp;

  OptInit(argv,options,stderr);
  if( version ){
     printf("Lemon version 1.0\n");
     exit(0);
  }
  if( OptNArgs()!=1 ){
    fprintf(stderr,"Exactly one filename argument is required.\n");
    exit(1);
  }
  memset(&lem, 0, sizeof(lem));
  lem.errorcnt = 0;
................................................................................
  if( lem.errorcnt ) exit(lem.errorcnt);
  if( lem.nrule==0 ){
    fprintf(stderr,"Empty grammar.\n");
    exit(1);
  }

  /* Count and index the symbols of the grammar */
  Symbol_new("{default}");
  lem.nsymbol = Symbol_count();

  lem.symbols = Symbol_arrayof();
  for(i=0; i<lem.nsymbol; i++) lem.symbols[i]->index = i;
  qsort(lem.symbols,lem.nsymbol,sizeof(struct symbol*), Symbolcmpp);

  for(i=0; i<lem.nsymbol; i++) lem.symbols[i]->index = i;
  while( lem.symbols[i-1]->type==MULTITERMINAL ){ i--; }
  assert( strcmp(lem.symbols[i-1]->name,"{default}")==0 );
  lem.nsymbol = i - 1;
  for(i=1; ISUPPER(lem.symbols[i]->name[0]); i++);
  lem.nterminal = i;

  /* Assign sequential rule numbers.  Start with 0.  Put rules that have no
  ** reduce action C-code associated with them last, so that the switch()
  ** statement that selects reduction actions will have a smaller jump table.
  */
  for(i=0, rp=lem.rule; rp; rp=rp->next){
    rp->iRule = rp->code ? i++ : -1;
  }
  for(rp=lem.rule; rp; rp=rp->next){
    if( rp->iRule<0 ) rp->iRule = i++;
  }
  lem.startRule = lem.rule;
  lem.rule = Rule_sort(lem.rule);

  /* Generate a reprint of the grammar, if requested on the command line */
  if( rpflag ){
    Reprint(&lem);
  }else{
    /* Initialize the size for all follow and first sets */
    SetSize(lem.nterminal+1);

................................................................................
    /* Compute the action tables */
    FindActions(&lem);

    /* Compress the action tables */
    if( compress==0 ) CompressTables(&lem);

    /* Reorder and renumber the states so that states with fewer choices
    ** occur at the end.  This is an optimization that helps make the
    ** generated parser tables smaller. */
    if( noResort==0 ) ResortStates(&lem);

    /* Generate a report of the parser generated.  (the "y.output" file) */
    if( !quiet ) ReportOutput(&lem);

    /* Generate the source code for the parser */
    ReportTable(&lem, mhflag);

    /* Produce a header file for use by the scanner.  (This step is
    ** omitted if the "-m" option is used because makeheaders will
    ** generate the file for us.) */
    if( !mhflag ) ReportHeader(&lem);
  }
  if( statistics ){
    printf("Parser statistics:\n");
    stats_line("terminal symbols", lem.nterminal);
    stats_line("non-terminal symbols", lem.nsymbol - lem.nterminal);

    stats_line("total symbols", lem.nsymbol);
    stats_line("rules", lem.nrule);
    stats_line("states", lem.nxstate);
    stats_line("conflicts", lem.nconflict);
    stats_line("action table entries", lem.nactiontab);
    stats_line("lookahead table entries", lem.nlookaheadtab);
    stats_line("total table size (bytes)", lem.tablesize);
  }
  if( lem.nconflict > 0 ){
    fprintf(stderr,"%d parsing conflicts.\n",lem.nconflict);
  }

  /* return 0 on success, 1 on failure. */
  exitcode = ((lem.errorcnt > 0) || (lem.nconflict > 0)) ? 1 : 0;
  exit(exitcode);
  return (exitcode);


}
/******************** From the file "msort.c" *******************************/
/*
** A generic merge-sort program.
**
** USAGE:
** Let "ptr" be a pointer to some structure which is at the head of
................................................................................
** ALGORITHM:
** Merge-sort.
*/

/*
** Return a pointer to the next structure in the linked list.
*/
#define NEXT(A) (*(char**)(((char*)A)+offset))

/*
** Inputs:
**   a:       A sorted, null-terminated linked list.  (May be null).
**   b:       A sorted, null-terminated linked list.  (May be null).
**   cmp:     A pointer to the comparison function.
**   offset:  Offset in the structure to the "next" field.
................................................................................
  char *ptr, *head;

  if( a==0 ){
    head = b;
  }else if( b==0 ){
    head = a;
  }else{
    if( (*cmp)(a,b)<=0 ){
      ptr = a;
      a = NEXT(a);
    }else{
      ptr = b;
      b = NEXT(b);
    }
    head = ptr;
    while( a && b ){
      if( (*cmp)(a,b)<=0 ){
        NEXT(ptr) = a;
        ptr = a;
        a = NEXT(a);
      }else{
        NEXT(ptr) = b;
        ptr = b;
        b = NEXT(b);
................................................................................
  char **next,
  int (*cmp)(const char*,const char*)
){
  unsigned long offset;
  char *ep;
  char *set[LISTSIZE];
  int i;
  offset = (unsigned long)((char*)next - (char*)list);
  for(i=0; i<LISTSIZE; i++) set[i] = 0;
  while( list ){
    ep = list;
    list = NEXT(list);
    NEXT(ep) = 0;
    for(i=0; i<LISTSIZE-1 && set[i]!=0; i++){
      ep = merge(ep,set[i],cmp,offset);
      set[i] = 0;
    }
    set[i] = ep;
  }
  ep = 0;
  for(i=0; i<LISTSIZE; i++) if( set[i] ) ep = merge(set[i],ep,cmp,offset);
  return ep;
}
/************************ From the file "option.c" **************************/
static char **argv;
static struct s_options *op;
static FILE *errstream;

#define ISOPT(X) ((X)[0]=='-'||(X)[0]=='+'||strchr((X),'=')!=0)

/*
** Print the command line with a carrot pointing to the k-th character
** of the n-th field.
*/
static void errline(int n, int k, FILE *err)



{
  int spcnt, i;
  if( argv[0] ) fprintf(err,"%s",argv[0]);
  spcnt = lemonStrlen(argv[0]) + 1;
  for(i=1; i<n && argv[i]; i++){
    fprintf(err," %s",argv[i]);
    spcnt += lemonStrlen(argv[i])+1;
................................................................................
  }
}

/*
** Return the index of the N-th non-switch argument.  Return -1
** if N is out of range.
*/
static int argindex(int n)

{
  int i;
  int dashdash = 0;
  if( argv!=0 && *argv!=0 ){
    for(i=1; argv[i]; i++){
      if( dashdash || !ISOPT(argv[i]) ){
        if( n==0 ) return i;
................................................................................
}

static char emsg[] = "Command line syntax error: ";

/*
** Process a flag command line argument.
*/
static int handleflags(int i, FILE *err)


{
  int v;
  int errcnt = 0;
  int j;
  for(j=0; op[j].label; j++){
    if( strncmp(&argv[i][1],op[j].label,lemonStrlen(op[j].label))==0 ) break;
  }
................................................................................
  v = argv[i][0]=='-' ? 1 : 0;
  if( op[j].label==0 ){
    if( err ){
      fprintf(err,"%sundefined option.\n",emsg);
      errline(i,1,err);
    }
    errcnt++;
  }else if( op[j].arg==0 ){
    /* Ignore this option */
  }else if( op[j].type==OPT_FLAG ){
    *((int*)op[j].arg) = v;
  }else if( op[j].type==OPT_FFLAG ){
    (*(void(*)(int))(op[j].arg))(v);
  }else if( op[j].type==OPT_FSTR ){
    (*(void(*)(char *))(op[j].arg))(&argv[i][2]);
  }else{
    if( err ){
      fprintf(err,"%smissing argument on switch.\n",emsg);
      errline(i,1,err);
    }
    errcnt++;
  }
  return errcnt;
}

/*
** Process a command line switch which has an argument.
*/
static int handleswitch(int i, FILE *err)


{
  int lv = 0;
  double dv = 0.0;
  char *sv = 0, *end;
  char *cp;
  int j;
  int errcnt = 0;
................................................................................
        errcnt++;
        break;
      case OPT_DBL:
      case OPT_FDBL:
        dv = strtod(cp,&end);
        if( *end ){
          if( err ){
            fprintf(err,
               "%sillegal character in floating-point argument.\n",emsg);
            errline(i,(int)((char*)end-(char*)argv[i]),err);

          }
          errcnt++;
        }
        break;
      case OPT_INT:
      case OPT_FINT:
        lv = strtol(cp,&end,0);
        if( *end ){
          if( err ){
            fprintf(err,"%sillegal character in integer argument.\n",emsg);
            errline(i,(int)((char*)end-(char*)argv[i]),err);
          }
          errcnt++;
        }
        break;
      case OPT_STR:
      case OPT_FSTR:
        sv = cp;
................................................................................
      case OPT_FLAG:
      case OPT_FFLAG:
        break;
      case OPT_DBL:
        *(double*)(op[j].arg) = dv;
        break;
      case OPT_FDBL:
        (*(void(*)(double))(op[j].arg))(dv);
        break;
      case OPT_INT:
        *(int*)(op[j].arg) = lv;
        break;
      case OPT_FINT:
        (*(void(*)(int))(op[j].arg))((int)lv);
        break;
      case OPT_STR:
        *(char**)(op[j].arg) = sv;
        break;
      case OPT_FSTR:
        (*(void(*)(char *))(op[j].arg))(sv);
        break;
    }
  }
  return errcnt;
}



int OptInit(char **a, struct s_options *o, FILE *err)

{
  int errcnt = 0;
  argv = a;
  op = o;
  errstream = err;
  if( argv && *argv && op ){
    int i;
................................................................................
    fprintf(err,"Valid command line options for \"%s\" are:\n",*a);
    OptPrint();
    exit(1);
  }
  return 0;
}

int OptNArgs(void){
  int cnt = 0;
  int dashdash = 0;
  int i;
  if( argv!=0 && argv[0]!=0 ){
    for(i=1; argv[i]; i++){
      if( dashdash || !ISOPT(argv[i]) ) cnt++;
      if( strcmp(argv[i],"--")==0 ) dashdash = 1;
    }
  }
  return cnt;
}

char *OptArg(int n)

{
  int i;
  i = argindex(n);
  return i>=0 ? argv[i] : 0;
}

void OptErr(int n)

{
  int i;
  i = argindex(n);
  if( i>=0 ) errline(i,0,errstream);
}

void OptPrint(void){
  int i;
  int max, len;
  max = 0;
  for(i=0; op[i].label; i++){
    len = lemonStrlen(op[i].label) + 1;
    switch( op[i].type ){
      case OPT_FLAG:
................................................................................
    switch( op[i].type ){
      case OPT_FLAG:
      case OPT_FFLAG:
        fprintf(errstream,"  -%-*s  %s\n",max,op[i].label,op[i].message);
        break;
      case OPT_INT:
      case OPT_FINT:
        fprintf(errstream,"  -%s<integer>%*s  %s\n",op[i].label,
          (int)(max-lemonStrlen(op[i].label)-9),"",op[i].message);
        break;
      case OPT_DBL:
      case OPT_FDBL:
        fprintf(errstream,"  -%s<real>%*s  %s\n",op[i].label,
          (int)(max-lemonStrlen(op[i].label)-6),"",op[i].message);
        break;
      case OPT_STR:
      case OPT_FSTR:
        fprintf(errstream,"  -%s<string>%*s  %s\n",op[i].label,
          (int)(max-lemonStrlen(op[i].label)-8),"",op[i].message);
        break;
    }
  }
}
/*********************** From the file "parse.c" ****************************/
/*
** Input file parser for the LEMON parser generator.
*/

/* The state of the parser */






enum e_state {
  INITIALIZE,
  WAITING_FOR_DECL_OR_RULE,
  WAITING_FOR_DECL_KEYWORD,
  WAITING_FOR_DECL_ARG,
  WAITING_FOR_PRECEDENCE_SYMBOL,
  WAITING_FOR_ARROW,
  IN_RHS,
  LHS_ALIAS_1,
  LHS_ALIAS_2,
  LHS_ALIAS_3,
  RHS_ALIAS_1,
  RHS_ALIAS_2,
  PRECEDENCE_MARK_1,
  PRECEDENCE_MARK_2,
  RESYNC_AFTER_RULE_ERROR,
  RESYNC_AFTER_DECL_ERROR,
  WAITING_FOR_DESTRUCTOR_SYMBOL,
  WAITING_FOR_DATATYPE_SYMBOL,
  WAITING_FOR_FALLBACK_ID,
  WAITING_FOR_WILDCARD_ID,
  WAITING_FOR_CLASS_ID,
  WAITING_FOR_CLASS_TOKEN,
  WAITING_FOR_TOKEN_NAME
};
struct pstate {
  char *filename;       /* Name of the input file */
  int tokenlineno;      /* Linenumber at which current token starts */
  int errorcnt;         /* Number of errors so far */
  char *tokenstart;     /* Text of current token */
  struct lemon *gp;     /* Global state vector */
  enum e_state state;        /* The state of the parser */
  struct symbol *fallback;   /* The fallback token */
  struct symbol *tkclass;    /* Token class symbol */
  struct symbol *lhs;        /* Left-hand side of current rule */
  const char *lhsalias;      /* Alias for the LHS */
  int nrhs;                  /* Number of right-hand side symbols seen */
  struct symbol *rhs[MAXRHS];  /* RHS symbols */
  const char *alias[MAXRHS]; /* Aliases for each RHS symbol (or NULL) */
  struct rule *prevrule;     /* Previous rule parsed */
  const char *declkeyword;   /* Keyword of a declaration */
  char **declargslot;        /* Where the declaration argument should be put */
  int insertLineMacro;       /* Add #line before declaration insert */
  int *decllinenoslot;       /* Where to write declaration line number */
  enum e_assoc declassoc;    /* Assign this association to decl arguments */
  int preccounter;           /* Assign this precedence to decl arguments */
  struct rule *firstrule;    /* Pointer to first rule in the grammar */
  struct rule *lastrule;     /* Pointer to the most recently parsed rule */
};

/* Parse a single token */
static void parseonetoken(struct pstate *psp)

{
  const char *x;
  x = Strsafe(psp->tokenstart);     /* Save the token permanently */
#if 0
  printf("%s:%d: Token=[%s] state=%d\n",psp->filename,psp->tokenlineno,
    x,psp->state);
#endif
  switch( psp->state ){
    case INITIALIZE:
................................................................................
      psp->preccounter = 0;
      psp->firstrule = psp->lastrule = 0;
      psp->gp->nrule = 0;
      /* Fall thru to next case */
    case WAITING_FOR_DECL_OR_RULE:
      if( x[0]=='%' ){
        psp->state = WAITING_FOR_DECL_KEYWORD;
      }else if( ISLOWER(x[0]) ){
        psp->lhs = Symbol_new(x);
        psp->nrhs = 0;
        psp->lhsalias = 0;
        psp->state = WAITING_FOR_ARROW;
      }else if( x[0]=='{' ){
        if( psp->prevrule==0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
"There is no prior rule upon which to attach the code \
fragment which begins on this line.");
          psp->errorcnt++;
        }else if( psp->prevrule->code!=0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
"Code fragment beginning on this line is not the first \
to follow the previous rule.");
          psp->errorcnt++;
        }else{
          psp->prevrule->line = psp->tokenlineno;
          psp->prevrule->code = &x[1];
          psp->prevrule->noCode = 0;
        }
      }else if( x[0]=='[' ){
        psp->state = PRECEDENCE_MARK_1;
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Token \"%s\" should be either \"%%\" or a nonterminal name.",
          x);
        psp->errorcnt++;
      }
      break;
    case PRECEDENCE_MARK_1:
      if( !ISUPPER(x[0]) ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "The precedence symbol must be a terminal.");
        psp->errorcnt++;
      }else if( psp->prevrule==0 ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "There is no prior rule to assign precedence \"[%s]\".",x);
        psp->errorcnt++;
................................................................................
          "Expected to see a \":\" following the LHS symbol \"%s\".",
          psp->lhs->name);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case LHS_ALIAS_1:
      if( ISALPHA(x[0]) ){
        psp->lhsalias = x;
        psp->state = LHS_ALIAS_2;
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "\"%s\" is not a valid alias for the LHS \"%s\"\n",
          x,psp->lhs->name);
        psp->errorcnt++;
................................................................................
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case IN_RHS:
      if( x[0]=='.' ){
        struct rule *rp;
        rp = (struct rule *)calloc( sizeof(struct rule) +
             sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs, 1);
        if( rp==0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Can't allocate enough memory for this rule.");
          psp->errorcnt++;
          psp->prevrule = 0;
        }else{
          int i;
          rp->ruleline = psp->tokenlineno;
          rp->rhs = (struct symbol**)&rp[1];
          rp->rhsalias = (const char**)&(rp->rhs[psp->nrhs]);
          for(i=0; i<psp->nrhs; i++){
            rp->rhs[i] = psp->rhs[i];
            rp->rhsalias[i] = psp->alias[i];
          }
          rp->lhs = psp->lhs;
          rp->lhsalias = psp->lhsalias;
          rp->nrhs = psp->nrhs;
          rp->code = 0;
          rp->noCode = 1;
          rp->precsym = 0;
          rp->index = psp->gp->nrule++;
          rp->nextlhs = rp->lhs->rule;
          rp->lhs->rule = rp;
          rp->next = 0;
          if( psp->firstrule==0 ){
            psp->firstrule = psp->lastrule = rp;
          }else{
            psp->lastrule->next = rp;
            psp->lastrule = rp;
          }
          psp->prevrule = rp;
        }
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( ISALPHA(x[0]) ){
        if( psp->nrhs>=MAXRHS ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Too many symbols on RHS of rule beginning at \"%s\".",
            x);
          psp->errorcnt++;
          psp->state = RESYNC_AFTER_RULE_ERROR;
        }else{
          psp->rhs[psp->nrhs] = Symbol_new(x);
          psp->alias[psp->nrhs] = 0;
          psp->nrhs++;
        }
      }else if( (x[0]=='|' || x[0]=='/') && psp->nrhs>0 ){
        struct symbol *msp = psp->rhs[psp->nrhs-1];
        if( msp->type!=MULTITERMINAL ){
          struct symbol *origsp = msp;
          msp = (struct symbol *) calloc(1,sizeof(*msp));
          memset(msp, 0, sizeof(*msp));
          msp->type = MULTITERMINAL;
          msp->nsubsym = 1;
          msp->subsym = (struct symbol **) calloc(1,sizeof(struct symbol*));
          msp->subsym[0] = origsp;
          msp->name = origsp->name;
          psp->rhs[psp->nrhs-1] = msp;
        }
        msp->nsubsym++;
        msp->subsym = (struct symbol **) realloc(msp->subsym,
          sizeof(struct symbol*)*msp->nsubsym);
        msp->subsym[msp->nsubsym-1] = Symbol_new(&x[1]);
        if( ISLOWER(x[1]) || ISLOWER(msp->subsym[0]->name[0]) ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Cannot form a compound containing a non-terminal");
          psp->errorcnt++;
        }
      }else if( x[0]=='(' && psp->nrhs>0 ){
        psp->state = RHS_ALIAS_1;
      }else{
................................................................................
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Illegal character on RHS of rule: \"%s\".",x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case RHS_ALIAS_1:
      if( ISALPHA(x[0]) ){
        psp->alias[psp->nrhs-1] = x;
        psp->state = RHS_ALIAS_2;
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "\"%s\" is not a valid alias for the RHS symbol \"%s\"\n",
          x,psp->rhs[psp->nrhs-1]->name);
        psp->errorcnt++;
................................................................................
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Missing \")\" following LHS alias name \"%s\".",psp->lhsalias);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case WAITING_FOR_DECL_KEYWORD:
      if( ISALPHA(x[0]) ){
        psp->declkeyword = x;
        psp->declargslot = 0;
        psp->decllinenoslot = 0;
        psp->insertLineMacro = 1;
        psp->state = WAITING_FOR_DECL_ARG;
        if( strcmp(x,"name")==0 ){
          psp->declargslot = &(psp->gp->name);
          psp->insertLineMacro = 0;
        }else if( strcmp(x,"include")==0 ){
          psp->declargslot = &(psp->gp->include);
        }else if( strcmp(x,"code")==0 ){
          psp->declargslot = &(psp->gp->extracode);
        }else if( strcmp(x,"token_destructor")==0 ){
          psp->declargslot = &psp->gp->tokendest;
        }else if( strcmp(x,"default_destructor")==0 ){
          psp->declargslot = &psp->gp->vardest;
        }else if( strcmp(x,"token_prefix")==0 ){
          psp->declargslot = &psp->gp->tokenprefix;
          psp->insertLineMacro = 0;
        }else if( strcmp(x,"syntax_error")==0 ){
          psp->declargslot = &(psp->gp->error);
        }else if( strcmp(x,"parse_accept")==0 ){
          psp->declargslot = &(psp->gp->accept);
        }else if( strcmp(x,"parse_failure")==0 ){
          psp->declargslot = &(psp->gp->failure);
        }else if( strcmp(x,"stack_overflow")==0 ){
          psp->declargslot = &(psp->gp->overflow);
        }else if( strcmp(x,"extra_argument")==0 ){
          psp->declargslot = &(psp->gp->arg);
          psp->insertLineMacro = 0;
        }else if( strcmp(x,"token_type")==0 ){
          psp->declargslot = &(psp->gp->tokentype);
          psp->insertLineMacro = 0;
................................................................................
          psp->preccounter++;
          psp->declassoc = RIGHT;
          psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
        }else if( strcmp(x,"nonassoc")==0 ){
          psp->preccounter++;
          psp->declassoc = NONE;
          psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
        }else if( strcmp(x,"destructor")==0 ){
          psp->state = WAITING_FOR_DESTRUCTOR_SYMBOL;
        }else if( strcmp(x,"type")==0 ){
          psp->state = WAITING_FOR_DATATYPE_SYMBOL;
        }else if( strcmp(x,"fallback")==0 ){
          psp->fallback = 0;
          psp->state = WAITING_FOR_FALLBACK_ID;
        }else if( strcmp(x,"token")==0 ){
          psp->state = WAITING_FOR_TOKEN_NAME;
        }else if( strcmp(x,"wildcard")==0 ){
          psp->state = WAITING_FOR_WILDCARD_ID;
        }else if( strcmp(x,"token_class")==0 ){
          psp->state = WAITING_FOR_CLASS_ID;
        }else{
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Unknown declaration keyword: \"%%%s\".",x);
          psp->errorcnt++;
          psp->state = RESYNC_AFTER_DECL_ERROR;
        }
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Illegal declaration keyword: \"%s\".",x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }
      break;
    case WAITING_FOR_DESTRUCTOR_SYMBOL:
      if( !ISALPHA(x[0]) ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Symbol name missing after %%destructor keyword");
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }else{
        struct symbol *sp = Symbol_new(x);
        psp->declargslot = &sp->destructor;
        psp->decllinenoslot = &sp->destLineno;
        psp->insertLineMacro = 1;
        psp->state = WAITING_FOR_DECL_ARG;
      }
      break;
    case WAITING_FOR_DATATYPE_SYMBOL:
      if( !ISALPHA(x[0]) ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Symbol name missing after %%type keyword");
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }else{
        struct symbol *sp = Symbol_find(x);
        if((sp) && (sp->datatype)){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Symbol %%type \"%s\" already defined", x);
          psp->errorcnt++;
          psp->state = RESYNC_AFTER_DECL_ERROR;
        }else{
          if (!sp){
            sp = Symbol_new(x);
          }
          psp->declargslot = &sp->datatype;
          psp->insertLineMacro = 0;
          psp->state = WAITING_FOR_DECL_ARG;
        }
      }
      break;
    case WAITING_FOR_PRECEDENCE_SYMBOL:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( ISUPPER(x[0]) ){
        struct symbol *sp;
        sp = Symbol_new(x);
        if( sp->prec>=0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Symbol \"%s\" has already be given a precedence.",x);
          psp->errorcnt++;
        }else{
          sp->prec = psp->preccounter;
          sp->assoc = psp->declassoc;
        }
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Can't assign a precedence to \"%s\".",x);
        psp->errorcnt++;
      }
      break;
    case WAITING_FOR_DECL_ARG:
      if( x[0]=='{' || x[0]=='\"' || ISALNUM(x[0]) ){
        const char *zOld, *zNew;
        char *zBuf, *z;
        int nOld, n, nLine = 0, nNew, nBack;
        int addLineMacro;
        char zLine[50];
        zNew = x;
        if( zNew[0]=='"' || zNew[0]=='{' ) zNew++;
        nNew = lemonStrlen(zNew);
        if( *psp->declargslot ){
          zOld = *psp->declargslot;
................................................................................
        n = nOld + nNew + 20;
        addLineMacro = !psp->gp->nolinenosflag && psp->insertLineMacro &&
                        (psp->decllinenoslot==0 || psp->decllinenoslot[0]!=0);
        if( addLineMacro ){
          for(z=psp->filename, nBack=0; *z; z++){
            if( *z=='\\' ) nBack++;
          }
          lemon_sprintf(zLine, "#line %d ", psp->tokenlineno);
          nLine = lemonStrlen(zLine);
          n += nLine + lemonStrlen(psp->filename) + nBack;
        }
        *psp->declargslot = (char *) realloc(*psp->declargslot, n);
        zBuf = *psp->declargslot + nOld;
        if( addLineMacro ){
          if( nOld && zBuf[-1]!='\n' ){
            *(zBuf++) = '\n';
          }
          memcpy(zBuf, zLine, nLine);
          zBuf += nLine;
          *(zBuf++) = '"';
................................................................................
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }
      break;
    case WAITING_FOR_FALLBACK_ID:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( !ISUPPER(x[0]) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%fallback argument \"%s\" should be a token", x);
        psp->errorcnt++;
      }else{
        struct symbol *sp = Symbol_new(x);
        if( psp->fallback==0 ){
          psp->fallback = sp;
................................................................................
            "More than one fallback assigned to token %s", x);
          psp->errorcnt++;
        }else{
          sp->fallback = psp->fallback;
          psp->gp->has_fallback = 1;
        }
      }
      break;
    case WAITING_FOR_TOKEN_NAME:
      /* Tokens do not have to be declared before use.  But they can be
      ** in order to control their assigned integer number.  The number for
      ** each token is assigned when it is first seen.  So by including
      **
      **     %token ONE TWO THREE
      **
      ** early in the grammar file, that assigns small consecutive values
      ** to each of the tokens ONE TWO and THREE.
      */
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( !ISUPPER(x[0]) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%token argument \"%s\" should be a token", x);
        psp->errorcnt++;
      }else{
        (void)Symbol_new(x);
      }
      break;
    case WAITING_FOR_WILDCARD_ID:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( !ISUPPER(x[0]) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%wildcard argument \"%s\" should be a token", x);
        psp->errorcnt++;
      }else{
        struct symbol *sp = Symbol_new(x);
        if( psp->gp->wildcard==0 ){
          psp->gp->wildcard = sp;
        }else{
          ErrorMsg(psp->filename, psp->tokenlineno,
            "Extra wildcard to token: %s", x);
          psp->errorcnt++;
        }
      }
      break;
    case WAITING_FOR_CLASS_ID:
      if( !ISLOWER(x[0]) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%token_class must be followed by an identifier: ", x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
     }else if( Symbol_find(x) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "Symbol \"%s\" already used", x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }else{
        psp->tkclass = Symbol_new(x);
        psp->tkclass->type = MULTITERMINAL;
        psp->state = WAITING_FOR_CLASS_TOKEN;
      }
      break;
    case WAITING_FOR_CLASS_TOKEN:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( ISUPPER(x[0]) || ((x[0]=='|' || x[0]=='/') && ISUPPER(x[1])) ){
        struct symbol *msp = psp->tkclass;
        msp->nsubsym++;
        msp->subsym = (struct symbol **) realloc(msp->subsym,
          sizeof(struct symbol*)*msp->nsubsym);
        if( !ISUPPER(x[0]) ) x++;
        msp->subsym[msp->nsubsym-1] = Symbol_new(x);
      }else{
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%token_class argument \"%s\" should be a token", x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }
      break;
    case RESYNC_AFTER_RULE_ERROR:
/*      if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
**      break; */
    case RESYNC_AFTER_DECL_ERROR:
      if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
      if( x[0]=='%' ) psp->state = WAITING_FOR_DECL_KEYWORD;
................................................................................
  int exclude = 0;
  int start = 0;
  int lineno = 1;
  int start_lineno = 1;
  for(i=0; z[i]; i++){
    if( z[i]=='\n' ) lineno++;
    if( z[i]!='%' || (i>0 && z[i-1]!='\n') ) continue;
    if( strncmp(&z[i],"%endif",6)==0 && ISSPACE(z[i+6]) ){
      if( exclude ){
        exclude--;
        if( exclude==0 ){
          for(j=start; j<i; j++) if( z[j]!='\n' ) z[j] = ' ';
        }
      }
      for(j=i; z[j] && z[j]!='\n'; j++) z[j] = ' ';
    }else if( (strncmp(&z[i],"%ifdef",6)==0 && ISSPACE(z[i+6]))
          || (strncmp(&z[i],"%ifndef",7)==0 && ISSPACE(z[i+7])) ){
      if( exclude ){
        exclude++;
      }else{
        for(j=i+7; ISSPACE(z[j]); j++){}
        for(n=0; z[j+n] && !ISSPACE(z[j+n]); n++){}
        exclude = 1;
        for(k=0; k<nDefine; k++){
          if( strncmp(azDefine[k],&z[j],n)==0 && lemonStrlen(azDefine[k])==n ){
            exclude = 0;
            break;
          }
        }
................................................................................
}

/* In spite of its name, this function is really a scanner.  It read
** in the entire input file (all at once) then tokenizes it.  Each
** token is passed to the function "parseonetoken" which builds all
** the appropriate data structures in the global state vector "gp".
*/

void Parse(struct lemon *gp)
{
  struct pstate ps;
  FILE *fp;
  char *filebuf;
  unsigned int filesize;
  int lineno;
  int c;
  char *cp, *nextcp;
  int startline = 0;

  memset(&ps, '\0', sizeof(ps));
  ps.gp = gp;
................................................................................
    gp->errorcnt++;
    return;
  }
  fseek(fp,0,2);
  filesize = ftell(fp);
  rewind(fp);
  filebuf = (char *)malloc( filesize+1 );
  if( filesize>100000000 || filebuf==0 ){
    ErrorMsg(ps.filename,0,"Input file too large.");

    gp->errorcnt++;
    fclose(fp);
    return;
  }
  if( fread(filebuf,1,filesize,fp)!=filesize ){
    ErrorMsg(ps.filename,0,"Can't read in all %d bytes of this file.",
      filesize);
    free(filebuf);
    gp->errorcnt++;
    fclose(fp);
    return;
  }
  fclose(fp);
  filebuf[filesize] = 0;

  /* Make an initial pass through the file to handle %ifdef and %ifndef */
  preprocess_input(filebuf);

  /* Now scan the text of the input file */
  lineno = 1;
  for(cp=filebuf; (c= *cp)!=0; ){
    if( c=='\n' ) lineno++;              /* Keep track of the line number */
    if( ISSPACE(c) ){ cp++; continue; }  /* Skip all white space */
    if( c=='/' && cp[1]=='/' ){          /* Skip C++ style comments */
      cp+=2;
      while( (c= *cp)!=0 && c!='\n' ) cp++;
      continue;
    }
    if( c=='/' && cp[1]=='*' ){          /* Skip C style comments */
      cp+=2;
................................................................................
          int prevc;
          cp = &cp[2];
          prevc = 0;
          while( (c= *cp)!=0 && (c!='/' || prevc!='*') ){
            if( c=='\n' ) lineno++;
            prevc = c;
            cp++;
          }
        }else if( c=='/' && cp[1]=='/' ){  /* Skip C++ style comments too */
          cp = &cp[2];
          while( (c= *cp)!=0 && c!='\n' ) cp++;
          if( c ) lineno++;
        }else if( c=='\'' || c=='\"' ){    /* String a character literals */
          int startchar, prevc;
          startchar = c;
          prevc = 0;
          for(cp++; (c= *cp)!=0 && (c!=startchar || prevc=='\\'); cp++){
            if( c=='\n' ) lineno++;
            if( prevc=='\\' ) prevc = 0;
            else              prevc = c;
          }
        }
      }
      if( c==0 ){
        ErrorMsg(ps.filename,ps.tokenlineno,
"C code starting on this line is not terminated before the end of the file.");
        ps.errorcnt++;
        nextcp = cp;
      }else{
        nextcp = cp+1;
      }
    }else if( ISALNUM(c) ){          /* Identifiers */
      while( (c= *cp)!=0 && (ISALNUM(c) || c=='_') ) cp++;
      nextcp = cp;
    }else if( c==':' && cp[1]==':' && cp[2]=='=' ){ /* The operator "::=" */
      cp += 3;
      nextcp = cp;
    }else if( (c=='/' || c=='|') && ISALPHA(cp[1]) ){
      cp += 2;
      while( (c = *cp)!=0 && (ISALNUM(c) || c=='_') ) cp++;
      nextcp = cp;
    }else{                          /* All other (one character) operators */
      cp++;
      nextcp = cp;
    }
    c = *cp;
    *cp = 0;                        /* Null terminate the token */
    parseonetoken(&ps);             /* Parse the token */
    *cp = (char)c;                  /* Restore the buffer */
    cp = nextcp;
  }
  free(filebuf);                    /* Release the buffer after parsing */
  gp->rule = ps.firstrule;
  gp->errorcnt = ps.errorcnt;
}
/*************************** From the file "plink.c" *********************/
................................................................................
/*
** Routines processing configuration follow-set propagation links
** in the LEMON parser generator.
*/
static struct plink *plink_freelist = 0;

/* Allocate a new plink */
struct plink *Plink_new(void){
  struct plink *newlink;

  if( plink_freelist==0 ){
    int i;
    int amt = 100;
    plink_freelist = (struct plink *)calloc( amt, sizeof(struct plink) );
    if( plink_freelist==0 ){
      fprintf(stderr,
      "Unable to allocate memory for a new follow-set propagation link.\n");
      exit(1);
    }
    for(i=0; i<amt-1; i++) plink_freelist[i].next = &plink_freelist[i+1];
    plink_freelist[amt-1].next = 0;
  }
  newlink = plink_freelist;
  plink_freelist = plink_freelist->next;
  return newlink;
}

/* Add a plink to a plink list */

void Plink_add(struct plink **plpp, struct config *cfp)

{
  struct plink *newlink;
  newlink = Plink_new();
  newlink->next = *plpp;
  *plpp = newlink;
  newlink->cfp = cfp;
}

/* Transfer every plink on the list "from" to the list "to" */


void Plink_copy(struct plink **to, struct plink *from)
{
  struct plink *nextpl;
  while( from ){
    nextpl = from->next;
    from->next = *to;
    *to = from;
    from = nextpl;
  }
}

/* Delete every plink on the list */
void Plink_delete(struct plink *plp)

{
  struct plink *nextpl;

  while( plp ){
    nextpl = plp->next;
    plp->next = plink_freelist;
    plink_freelist = plp;
................................................................................
** Procedures for generating reports and tables in the LEMON parser generator.
*/

/* Generate a filename with the given suffix.  Space to hold the
** name comes from malloc() and must be freed by the calling
** function.
*/
PRIVATE char *file_makename(struct lemon *lemp, const char *suffix)


{
  char *name;
  char *cp;

  name = (char*)malloc( lemonStrlen(lemp->filename) + lemonStrlen(suffix) + 5 );
  if( name==0 ){
    fprintf(stderr,"Can't allocate space for a filename.\n");
    exit(1);
  }
  lemon_strcpy(name,lemp->filename);
  cp = strrchr(name,'.');
  if( cp ) *cp = 0;
  lemon_strcat(name,suffix);
  return name;
}

/* Open a file with a name based on the name of the input file,
** but with a different (specified) suffix, and return a pointer
** to the stream */
PRIVATE FILE *file_open(
  struct lemon *lemp,
  const char *suffix,
  const char *mode
){

  FILE *fp;

  if( lemp->outname ) free(lemp->outname);
  lemp->outname = file_makename(lemp, suffix);
  fp = fopen(lemp->outname,mode);
  if( fp==0 && *mode=='w' ){
    fprintf(stderr,"Can't open file \"%s\".\n",lemp->outname);
    lemp->errorcnt++;
    return 0;
  }
  return fp;
}

/* Print the text of a rule
*/
void rule_print(FILE *out, struct rule *rp){
  int i, j;
  fprintf(out, "%s",rp->lhs->name);
  /*    if( rp->lhsalias ) fprintf(out,"(%s)",rp->lhsalias); */
  fprintf(out," ::=");
  for(i=0; i<rp->nrhs; i++){
    struct symbol *sp = rp->rhs[i];
    if( sp->type==MULTITERMINAL ){
      fprintf(out," %s", sp->subsym[0]->name);
      for(j=1; j<sp->nsubsym; j++){
        fprintf(out,"|%s", sp->subsym[j]->name);
      }
    }else{
      fprintf(out," %s", sp->name);
    }
    /* if( rp->rhsalias[i] ) fprintf(out,"(%s)",rp->rhsalias[i]); */
  }
}

/* Duplicate the input file without comments and without actions
** on rules */

void Reprint(struct lemon *lemp)
{
  struct rule *rp;
  struct symbol *sp;
  int i, j, maxlen, len, ncolumns, skip;
  printf("// Reprint of input file \"%s\".\n// Symbols:\n",lemp->filename);
  maxlen = 10;
  for(i=0; i<lemp->nsymbol; i++){
................................................................................
      sp = lemp->symbols[j];
      assert( sp->index==j );
      printf(" %3d %-*.*s",j,maxlen,maxlen,sp->name);
    }
    printf("\n");
  }
  for(rp=lemp->rule; rp; rp=rp->next){
    rule_print(stdout, rp);












    printf(".");
    if( rp->precsym ) printf(" [%s]",rp->precsym->name);
    /* if( rp->code ) printf("\n    %s",rp->code); */
    printf("\n");
  }
}

/* Print a single rule.
*/


void RulePrint(FILE *fp, struct rule *rp, int iCursor){
  struct symbol *sp;
  int i, j;

  fprintf(fp,"%s ::=",rp->lhs->name);
  for(i=0; i<=rp->nrhs; i++){
    if( i==iCursor ) fprintf(fp," *");
    if( i==rp->nrhs ) break;
    sp = rp->rhs[i];

    if( sp->type==MULTITERMINAL ){
      fprintf(fp," %s", sp->subsym[0]->name);
      for(j=1; j<sp->nsubsym; j++){
        fprintf(fp,"|%s",sp->subsym[j]->name);
      }
    }else{
      fprintf(fp," %s", sp->name);
    }
  }
}

/* Print the rule for a configuration.
*/
void ConfigPrint(FILE *fp, struct config *cfp){
  RulePrint(fp, cfp->rp, cfp->dot);
}

/* #define TEST */
#if 0
/* Print a set */
PRIVATE void SetPrint(out,set,lemp)
FILE *out;
char *set;
struct lemon *lemp;
................................................................................
  }
}
#endif

/* Print an action to the given file descriptor.  Return FALSE if
** nothing was actually printed.
*/
int PrintAction(
  struct action *ap,          /* The action to print */
  FILE *fp,                   /* Print the action here */
  int indent                  /* Indent by this amount */
){
  int result = 1;
  switch( ap->type ){
    case SHIFT: {
      struct state *stp = ap->x.stp;
      fprintf(fp,"%*s shift        %-7d",indent,ap->sp->name,stp->statenum);

      break;
    }
    case REDUCE: {
      struct rule *rp = ap->x.rp;
      fprintf(fp,"%*s reduce       %-7d",indent,ap->sp->name,rp->iRule);
      RulePrint(fp, rp, -1);

      break;
    }
    case SHIFTREDUCE: {
      struct rule *rp = ap->x.rp;
      fprintf(fp,"%*s shift-reduce %-7d",indent,ap->sp->name,rp->iRule);
      RulePrint(fp, rp, -1);
      break;
    }
    case ACCEPT:
      fprintf(fp,"%*s accept",indent,ap->sp->name);
      break;
    case ERROR:
      fprintf(fp,"%*s error",indent,ap->sp->name);
      break;
    case SRCONFLICT:
    case RRCONFLICT:
      fprintf(fp,"%*s reduce       %-7d ** Parsing conflict **",
        indent,ap->sp->name,ap->x.rp->iRule);
      break;
    case SSCONFLICT:
      fprintf(fp,"%*s shift        %-7d ** Parsing conflict **",
        indent,ap->sp->name,ap->x.stp->statenum);
      break;
    case SH_RESOLVED:
      if( showPrecedenceConflict ){
        fprintf(fp,"%*s shift        %-7d -- dropped by precedence",
                indent,ap->sp->name,ap->x.stp->statenum);
      }else{
        result = 0;
      }
      break;
    case RD_RESOLVED:
      if( showPrecedenceConflict ){
        fprintf(fp,"%*s reduce %-7d -- dropped by precedence",
                indent,ap->sp->name,ap->x.rp->iRule);
      }else{
        result = 0;
      }
      break;
    case NOT_USED:
      result = 0;
      break;
  }
  if( result && ap->spOpt ){
    fprintf(fp,"  /* because %s==%s */", ap->sp->name, ap->spOpt->name);
  }
  return result;
}

/* Generate the "*.out" log file */

void ReportOutput(struct lemon *lemp)
{
  int i;
  struct state *stp;
  struct config *cfp;
  struct action *ap;
  FILE *fp;

  fp = file_open(lemp,".out","wb");
  if( fp==0 ) return;
  for(i=0; i<lemp->nxstate; i++){
    stp = lemp->sorted[i];
    fprintf(fp,"State %d:\n",stp->statenum);
    if( lemp->basisflag ) cfp=stp->bp;
    else                  cfp=stp->cfp;
    while( cfp ){
      char buf[20];
      if( cfp->dot==cfp->rp->nrhs ){
        lemon_sprintf(buf,"(%d)",cfp->rp->iRule);
        fprintf(fp,"    %5s ",buf);
      }else{
        fprintf(fp,"          ");
      }
      ConfigPrint(fp,cfp);
      fprintf(fp,"\n");
#if 0
................................................................................
  }
  fclose(fp);
  return;
}

/* Search for the file "name" which is in the same directory as
** the exacutable */
PRIVATE char *pathsearch(char *argv0, char *name, int modemask)
{
  const char *pathlist;
  char *pathbufptr;
  char *pathbuf;

  char *path,*cp;
  char c;

#ifdef __WIN32__
  cp = strrchr(argv0,'\\');
#else
  cp = strrchr(argv0,'/');
#endif
  if( cp ){
    c = *cp;
    *cp = 0;
    path = (char *)malloc( lemonStrlen(argv0) + lemonStrlen(name) + 2 );
    if( path ) lemon_sprintf(path,"%s/%s",argv0,name);
    *cp = c;
  }else{

    pathlist = getenv("PATH");
    if( pathlist==0 ) pathlist = ".:/bin:/usr/bin";
    pathbuf = (char *) malloc( lemonStrlen(pathlist) + 1 );
    path = (char *)malloc( lemonStrlen(pathlist)+lemonStrlen(name)+2 );
    if( (pathbuf != 0) && (path!=0) ){
      pathbufptr = pathbuf;
      lemon_strcpy(pathbuf, pathlist);
      while( *pathbuf ){
        cp = strchr(pathbuf,':');
        if( cp==0 ) cp = &pathbuf[lemonStrlen(pathbuf)];
        c = *cp;
        *cp = 0;
        lemon_sprintf(path,"%s/%s",pathbuf,name);
        *cp = c;
        if( c==0 ) pathbuf[0] = 0;
        else pathbuf = &cp[1];
        if( access(path,modemask)==0 ) break;
      }
      free(pathbufptr);
    }
  }
  return path;
}

/* Given an action, compute the integer value for that action
** which is to be put in the action table of the generated machine.
** Return negative if no action should be generated.
*/
PRIVATE int compute_action(struct lemon *lemp, struct action *ap)


{
  int act;
  switch( ap->type ){
    case SHIFT:  act = ap->x.stp->statenum;                        break;
    case SHIFTREDUCE: {
      /* Since a SHIFT is inherient after a prior REDUCE, convert any
      ** SHIFTREDUCE action with a nonterminal on the LHS into a simple
      ** REDUCE action: */
      if( ap->sp->index>=lemp->nterminal ){
        act = lemp->minReduce + ap->x.rp->iRule;
      }else{
        act = lemp->minShiftReduce + ap->x.rp->iRule;
      }
      break;
    }
    case REDUCE: act = lemp->minReduce + ap->x.rp->iRule;          break;
    case ERROR:  act = lemp->errAction;                            break;
    case ACCEPT: act = lemp->accAction;                            break;
    default:     act = -1; break;
  }
  return act;
}

#define LINESIZE 1000
/* The next cluster of routines are for reading the template file
................................................................................
/* The first function transfers data from "in" to "out" until
** a line is seen which begins with "%%".  The line number is
** tracked.
**
** if name!=0, then any word that begin with "Parse" is changed to
** begin with *name instead.
*/
PRIVATE void tplt_xfer(char *name, FILE *in, FILE *out, int *lineno)




{
  int i, iStart;
  char line[LINESIZE];
  while( fgets(line,LINESIZE,in) && (line[0]!='%' || line[1]!='%') ){
    (*lineno)++;
    iStart = 0;
    if( name ){
      for(i=0; line[i]; i++){
        if( line[i]=='P' && strncmp(&line[i],"Parse",5)==0
          && (i==0 || !ISALPHA(line[i-1]))
        ){
          if( i>iStart ) fprintf(out,"%.*s",i-iStart,&line[iStart]);
          fprintf(out,"%s",name);
          i += 4;
          iStart = i+1;
        }
      }
................................................................................
    }
    fprintf(out,"%s",&line[iStart]);
  }
}

/* The next function finds the template file and opens it, returning
** a pointer to the opened file. */
PRIVATE FILE *tplt_open(struct lemon *lemp)

{
  static char templatename[] = "lempar.c";
  char buf[1000];
  FILE *in;
  char *tpltname;
  char *cp;

  /* first, see if user specified a template filename on the command line. */
  if (user_templatename != 0) {
    if( access(user_templatename,004)==-1 ){
      fprintf(stderr,"Can't find the parser driver template file \"%s\".\n",
        user_templatename);
      lemp->errorcnt++;
      return 0;
    }
    in = fopen(user_templatename,"rb");
    if( in==0 ){
      fprintf(stderr,"Can't open the template file \"%s\".\n",
              user_templatename);
      lemp->errorcnt++;
      return 0;
    }
    return in;
  }

  cp = strrchr(lemp->filename,'.');
  if( cp ){
    lemon_sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename);
  }else{
    lemon_sprintf(buf,"%s.lt",lemp->filename);
  }
  if( access(buf,004)==0 ){
    tpltname = buf;
  }else if( access(templatename,004)==0 ){
    tpltname = templatename;
  }else{
    tpltname = pathsearch(lemp->argv0,templatename,0);
................................................................................
    lemp->errorcnt++;
    return 0;
  }
  return in;
}

/* Print a #line directive line to the output file. */
PRIVATE void tplt_linedir(FILE *out, int lineno, char *filename)



{
  fprintf(out,"#line %d \"",lineno);
  while( *filename ){
    if( *filename == '\\' ) putc('\\',out);
    putc(*filename,out);
    filename++;
  }
  fprintf(out,"\"\n");
}

/* Print a string to the file and keep the linenumber up to date */
PRIVATE void tplt_print(FILE *out, struct lemon *lemp, char *str, int *lineno)




{
  if( str==0 ) return;
  while( *str ){
    putc(*str,out);
    if( *str=='\n' ) (*lineno)++;
    str++;
  }
  if( str[-1]!='\n' ){
    putc('\n',out);
    (*lineno)++;
  }
  if (!lemp->nolinenosflag) {
    (*lineno)++; tplt_linedir(out,*lineno,lemp->outname);
  }
  return;
}

/*
** The following routine emits code for the destructor for the
** symbol sp
*/
void emit_destructor_code(
  FILE *out,
  struct symbol *sp,
  struct lemon *lemp,
  int *lineno
){

 char *cp = 0;

 if( sp->type==TERMINAL ){
   cp = lemp->tokendest;
   if( cp==0 ) return;
   fprintf(out,"{\n"); (*lineno)++;
 }else if( sp->destructor ){
   cp = sp->destructor;
   fprintf(out,"{\n"); (*lineno)++;
   if( !lemp->nolinenosflag ){
     (*lineno)++;
     tplt_linedir(out,sp->destLineno,lemp->filename);
   }
 }else if( lemp->vardest ){
   cp = lemp->vardest;
   if( cp==0 ) return;
   fprintf(out,"{\n"); (*lineno)++;
 }else{
   assert( 0 );  /* Cannot happen */
 }
................................................................................
     cp++;
     continue;
   }
   if( *cp=='\n' ) (*lineno)++;
   fputc(*cp,out);
 }
 fprintf(out,"\n"); (*lineno)++;
 if (!lemp->nolinenosflag) {
   (*lineno)++; tplt_linedir(out,*lineno,lemp->outname);
 }
 fprintf(out,"}\n"); (*lineno)++;
 return;
}

/*
** Return TRUE (non-zero) if the given symbol has a destructor.
*/
int has_destructor(struct symbol *sp, struct lemon *lemp)


{
  int ret;
  if( sp->type==TERMINAL ){
    ret = lemp->tokendest!=0;
  }else{
    ret = lemp->vardest!=0 || sp->destructor!=0;
  }
................................................................................
** n bytes of zText are stored.  If n==0 then all of zText up to the first
** \000 terminator is stored.  zText can contain up to two instances of
** %d.  The values of p1 and p2 are written into the first and second
** %d.
**
** If n==-1, then the previous character is overwritten.
*/
PRIVATE char *append_str(const char *zText, int n, int p1, int p2){
  static char empty[1] = { 0 };
  static char *z = 0;
  static int alloced = 0;
  static int used = 0;
  int c;
  char zInt[40];

  if( zText==0 ){
    if( used==0 && z!=0 ) z[0] = 0;
    used = 0;
    return z;
  }
  if( n<=0 ){
    if( n<0 ){
      used += n;
      assert( used>=0 );
    }
    n = lemonStrlen(zText);
  }
  if( (int) (n+sizeof(zInt)*2+used) >= alloced ){
    alloced = n + sizeof(zInt)*2 + used + 200;
    z = (char *) realloc(z,  alloced);
  }
  if( z==0 ) return empty;
  while( n-- > 0 ){
    c = *(zText++);
    if( c=='%' && n>0 && zText[0]=='d' ){
      lemon_sprintf(zInt, "%d", p1);
      p1 = p2;
      lemon_strcpy(&z[used], zInt);
      used += lemonStrlen(&z[used]);
      zText++;
      n--;
    }else{
      z[used++] = (char)c;
    }
  }
  z[used] = 0;
  return z;
}

/*
** Write and transform the rp->code string so that symbols are expanded.
** Populate the rp->codePrefix and rp->codeSuffix strings, as appropriate.
**
** Return 1 if the expanded code requires that "yylhsminor" local variable
** to be defined.
*/
PRIVATE int translate_code(struct lemon *lemp, struct rule *rp){
  char *cp, *xp;
  int i;
  int rc = 0;            /* True if yylhsminor is used */
  int dontUseRhs0 = 0;   /* If true, use of left-most RHS label is illegal */
  const char *zSkip = 0; /* The zOvwrt comment within rp->code, or NULL */
  char lhsused = 0;      /* True if the LHS element has been used */
  char lhsdirect;        /* True if LHS writes directly into stack */
  char used[MAXRHS];     /* True for each RHS element which is used */
  char zLhs[50];         /* Convert the LHS symbol into this string */
  char zOvwrt[900];      /* Comment that to allow LHS to overwrite RHS */

  for(i=0; i<rp->nrhs; i++) used[i] = 0;
  lhsused = 0;

  if( rp->code==0 ){
    static char newlinestr[2] = { '\n', '\0' };
    rp->code = newlinestr;
    rp->line = rp->ruleline;
    rp->noCode = 1;
  }else{
    rp->noCode = 0;
  }


  if( rp->nrhs==0 ){
    /* If there are no RHS symbols, then writing directly to the LHS is ok */
    lhsdirect = 1;
  }else if( rp->rhsalias[0]==0 ){
    /* The left-most RHS symbol has no value.  LHS direct is ok.  But
    ** we have to call the distructor on the RHS symbol first. */
    lhsdirect = 1;
    if( has_destructor(rp->rhs[0],lemp) ){
      append_str(0,0,0,0);
      append_str("  yy_destructor(yypParser,%d,&yymsp[%d].minor);\n", 0,
                 rp->rhs[0]->index,1-rp->nrhs);
      rp->codePrefix = Strsafe(append_str(0,0,0,0));
      rp->noCode = 0;
    }
  }else if( rp->lhsalias==0 ){
    /* There is no LHS value symbol. */
    lhsdirect = 1;
  }else if( strcmp(rp->lhsalias,rp->rhsalias[0])==0 ){
    /* The LHS symbol and the left-most RHS symbol are the same, so
    ** direct writing is allowed */
    lhsdirect = 1;
    lhsused = 1;
    used[0] = 1;
    if( rp->lhs->dtnum!=rp->rhs[0]->dtnum ){
      ErrorMsg(lemp->filename,rp->ruleline,
        "%s(%s) and %s(%s) share the same label but have "
        "different datatypes.",
        rp->lhs->name, rp->lhsalias, rp->rhs[0]->name, rp->rhsalias[0]);
      lemp->errorcnt++;
    }
  }else{
    lemon_sprintf(zOvwrt, "/*%s-overwrites-%s*/",
                  rp->lhsalias, rp->rhsalias[0]);
    zSkip = strstr(rp->code, zOvwrt);
    if( zSkip!=0 ){
      /* The code contains a special comment that indicates that it is safe
      ** for the LHS label to overwrite left-most RHS label. */
      lhsdirect = 1;
    }else{
      lhsdirect = 0;
    }
  }
  if( lhsdirect ){
    sprintf(zLhs, "yymsp[%d].minor.yy%d",1-rp->nrhs,rp->lhs->dtnum);
  }else{
    rc = 1;
    sprintf(zLhs, "yylhsminor.yy%d",rp->lhs->dtnum);
  }

  append_str(0,0,0,0);

  /* This const cast is wrong but harmless, if we're careful. */
  for(cp=(char *)rp->code; *cp; cp++){
    if( cp==zSkip ){
      append_str(zOvwrt,0,0,0);
      cp += lemonStrlen(zOvwrt)-1;
      dontUseRhs0 = 1;
      continue;
    }
    if( ISALPHA(*cp) && (cp==rp->code || (!ISALNUM(cp[-1]) && cp[-1]!='_')) ){
      char saved;
      for(xp= &cp[1]; ISALNUM(*xp) || *xp=='_'; xp++);
      saved = *xp;
      *xp = 0;
      if( rp->lhsalias && strcmp(cp,rp->lhsalias)==0 ){
        append_str(zLhs,0,0,0);
        cp = xp;
        lhsused = 1;
      }else{
        for(i=0; i<rp->nrhs; i++){
          if( rp->rhsalias[i] && strcmp(cp,rp->rhsalias[i])==0 ){
            if( i==0 && dontUseRhs0 ){
              ErrorMsg(lemp->filename,rp->ruleline,
                 "Label %s used after '%s'.",
                 rp->rhsalias[0], zOvwrt);
              lemp->errorcnt++;
            }else if( cp!=rp->code && cp[-1]=='@' ){
              /* If the argument is of the form @X then substituted
              ** the token number of X, not the value of X */
              append_str("yymsp[%d].major",-1,i-rp->nrhs+1,0);
            }else{
              struct symbol *sp = rp->rhs[i];
              int dtnum;
              if( sp->type==MULTITERMINAL ){
................................................................................
        }
      }
      *xp = saved;
    }
    append_str(cp, 1, 0, 0);
  } /* End loop */

  /* Main code generation completed */
  cp = append_str(0,0,0,0);
  if( cp && cp[0] ) rp->code = Strsafe(cp);
  append_str(0,0,0,0);

  /* Check to make sure the LHS has been used */
  if( rp->lhsalias && !lhsused ){
    ErrorMsg(lemp->filename,rp->ruleline,
      "Label \"%s\" for \"%s(%s)\" is never used.",
        rp->lhsalias,rp->lhs->name,rp->lhsalias);
    lemp->errorcnt++;
  }

  /* Generate destructor code for RHS minor values which are not referenced.
  ** Generate error messages for unused labels and duplicate labels.
  */
  for(i=0; i<rp->nrhs; i++){
    if( rp->rhsalias[i] ){
      if( i>0 ){
        int j;
        if( rp->lhsalias && strcmp(rp->lhsalias,rp->rhsalias[i])==0 ){
          ErrorMsg(lemp->filename,rp->ruleline,
            "%s(%s) has the same label as the LHS but is not the left-most "
            "symbol on the RHS.",
            rp->rhs[i]->name, rp->rhsalias);
          lemp->errorcnt++;
        }
        for(j=0; j<i; j++){
          if( rp->rhsalias[j] && strcmp(rp->rhsalias[j],rp->rhsalias[i])==0 ){
            ErrorMsg(lemp->filename,rp->ruleline,
              "Label %s used for multiple symbols on the RHS of a rule.",
              rp->rhsalias[i]);
            lemp->errorcnt++;
            break;
          }
        }
      }
      if( !used[i] ){
        ErrorMsg(lemp->filename,rp->ruleline,
          "Label %s for \"%s(%s)\" is never used.",
          rp->rhsalias[i],rp->rhs[i]->name,rp->rhsalias[i]);
        lemp->errorcnt++;
      }

    }else if( i>0 && has_destructor(rp->rhs[i],lemp) ){
      append_str("  yy_destructor(yypParser,%d,&yymsp[%d].minor);\n", 0,
         rp->rhs[i]->index,i-rp->nrhs+1);


    }
  }

  /* If unable to write LHS values directly into the stack, write the
  ** saved LHS value now. */
  if( lhsdirect==0 ){
    append_str("  yymsp[%d].minor.yy%d = ", 0, 1-rp->nrhs, rp->lhs->dtnum);
    append_str(zLhs, 0, 0, 0);
    append_str(";\n", 0, 0, 0);
  }

  /* Suffix code generation complete */

  cp = append_str(0,0,0,0);
  if( cp && cp[0] ){
    rp->codeSuffix = Strsafe(cp);
    rp->noCode = 0;
  }

  return rc;
}

/*
** Generate code which executes when the rule "rp" is reduced.  Write
** the code to "out".  Make sure lineno stays up-to-date.
*/
PRIVATE void emit_code(
  FILE *out,
  struct rule *rp,
  struct lemon *lemp,
  int *lineno
){
 const char *cp;

 /* Setup code prior to the #line directive */
 if( rp->codePrefix && rp->codePrefix[0] ){
   fprintf(out, "{%s", rp->codePrefix);
   for(cp=rp->codePrefix; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; }

 }

 /* Generate code to do the reduce action */
 if( rp->code ){
   if( !lemp->nolinenosflag ){
     (*lineno)++;
     tplt_linedir(out,rp->line,lemp->filename);
   }
   fprintf(out,"{%s",rp->code);
   for(cp=rp->code; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; }


   fprintf(out,"}\n"); (*lineno)++;
   if( !lemp->nolinenosflag ){
     (*lineno)++;
     tplt_linedir(out,*lineno,lemp->outname);
   }
 }

 /* Generate breakdown code that occurs after the #line directive */
 if( rp->codeSuffix && rp->codeSuffix[0] ){
   fprintf(out, "%s", rp->codeSuffix);
   for(cp=rp->codeSuffix; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; }
 }

 if( rp->codePrefix ){
   fprintf(out, "}\n"); (*lineno)++;
 }

 return;
}

/*
** Print the definition of the union used for the parser's data stack.
** This union contains fields for every possible data type for tokens
** and nonterminals.  In the process of computing and printing this
** union, also set the ".dtnum" field of every terminal and nonterminal
** symbol.
*/
void print_stack_union(
  FILE *out,                  /* The output stream */
  struct lemon *lemp,         /* The main info structure for this parser */
  int *plineno,               /* Pointer to the line number */
  int mhflag                  /* True if generating makeheaders output */
){

  int lineno = *plineno;    /* The line number of the output */
  char **types;             /* A hash table of datatypes */
  int arraysize;            /* Size of the "types" array */
  int maxdtlength;          /* Maximum length of any ".datatype" field. */
  char *stddt;              /* Standardized name for a datatype */
  int i,j;                  /* Loop counters */
  unsigned hash;            /* For hashing the name of a type */
  const char *name;         /* Name of the parser */

  /* Allocate and initialize types[] and allocate stddt[] */
  arraysize = lemp->nsymbol * 2;
  types = (char**)calloc( arraysize, sizeof(char*) );
  if( types==0 ){
    fprintf(stderr,"Out of memory.\n");
    exit(1);
  }
  for(i=0; i<arraysize; i++) types[i] = 0;
  maxdtlength = 0;
  if( lemp->vartype ){
    maxdtlength = lemonStrlen(lemp->vartype);
  }
  for(i=0; i<lemp->nsymbol; i++){
    int len;
    struct symbol *sp = lemp->symbols[i];
    if( sp->datatype==0 ) continue;
    len = lemonStrlen(sp->datatype);
    if( len>maxdtlength ) maxdtlength = len;
  }
  stddt = (char*)malloc( maxdtlength*2 + 1 );
  if( stddt==0 ){
    fprintf(stderr,"Out of memory.\n");
    exit(1);
  }

  /* Build a hash table of datatypes. The ".dtnum" field of each symbol
  ** is filled in with the hash index plus 1.  A ".dtnum" value of 0 is
  ** used for terminal symbols.  If there is no %default_type defined then
................................................................................
    if( sp->type!=NONTERMINAL || (sp->datatype==0 && lemp->vartype==0) ){
      sp->dtnum = 0;
      continue;
    }
    cp = sp->datatype;
    if( cp==0 ) cp = lemp->vartype;
    j = 0;
    while( ISSPACE(*cp) ) cp++;
    while( *cp ) stddt[j++] = *cp++;
    while( j>0 && ISSPACE(stddt[j-1]) ) j--;
    stddt[j] = 0;
    if( lemp->tokentype && strcmp(stddt, lemp->tokentype)==0 ){
      sp->dtnum = 0;
      continue;
    }
    hash = 0;
    for(j=0; stddt[j]; j++){
................................................................................
    hash = (hash & 0x7fffffff)%arraysize;
    while( types[hash] ){
      if( strcmp(types[hash],stddt)==0 ){
        sp->dtnum = hash + 1;
        break;
      }
      hash++;
      if( hash>=(unsigned)arraysize ) hash = 0;
    }
    if( types[hash]==0 ){
      sp->dtnum = hash + 1;
      types[hash] = (char*)malloc( lemonStrlen(stddt)+1 );
      if( types[hash]==0 ){
        fprintf(stderr,"Out of memory.\n");
        exit(1);
      }
      lemon_strcpy(types[hash],stddt);
    }
  }

  /* Print out the definition of YYTOKENTYPE and YYMINORTYPE */
  name = lemp->name ? lemp->name : "Parse";
  lineno = *plineno;
  if( mhflag ){ fprintf(out,"#if INTERFACE\n"); lineno++; }
................................................................................
  free(types);
  fprintf(out,"} YYMINORTYPE;\n"); lineno++;
  *plineno = lineno;
}

/*
** Return the name of a C datatype able to represent values between
** lwr and upr, inclusive.  If pnByte!=NULL then also write the sizeof
** for that type (1, 2, or 4) into *pnByte.
*/
static const char *minimum_size_type(int lwr, int upr, int *pnByte){
  const char *zType = "int";
  int nByte = 4;
  if( lwr>=0 ){
    if( upr<=255 ){
      zType = "unsigned char";
      nByte = 1;
    }else if( upr<65535 ){
      zType = "unsigned short int";
      nByte = 2;
    }else{
      zType = "unsigned int";
      nByte = 4;
    }
  }else if( lwr>=-127 && upr<=127 ){
    zType = "signed char";
    nByte = 1;
  }else if( lwr>=-32767 && upr<32767 ){
    zType = "short";
    nByte = 2;


  }
  if( pnByte ) *pnByte = nByte;
  return zType;
}

/*
** Each state contains a set of token transaction and a set of
** nonterminal transactions.  Each of these sets makes an instance
** of the following structure.  An array of these structures is used
** to order the creation of entries in the yy_action[] table.
*/
struct axset {
  struct state *stp;   /* A pointer to a state */
  int isTkn;           /* True to use tokens.  False for non-terminals */
  int nAction;         /* Number of actions */
  int iOrder;          /* Original order of action sets */
};

/*
** Compare to axset structures for sorting purposes
*/
static int axset_compare(const void *a, const void *b){
  struct axset *p1 = (struct axset*)a;
  struct axset *p2 = (struct axset*)b;
  int c;
  c = p2->nAction - p1->nAction;
  if( c==0 ){
    c = p1->iOrder - p2->iOrder;
  }
  assert( c!=0 || p1==p2 );
  return c;
}

/*
** Write text on "out" that describes the rule "rp".
*/
static void writeRuleText(FILE *out, struct rule *rp){
  int j;
  fprintf(out,"%s ::=", rp->lhs->name);
  for(j=0; j<rp->nrhs; j++){
    struct symbol *sp = rp->rhs[j];
    if( sp->type!=MULTITERMINAL ){
      fprintf(out," %s", sp->name);
    }else{

      int k;
      fprintf(out," %s", sp->subsym[0]->name);
      for(k=1; k<sp->nsubsym; k++){
        fprintf(out,"|%s",sp->subsym[k]->name);
      }
    }
  }
}


/* Generate C source code for the parser */
void ReportTable(
  struct lemon *lemp,
  int mhflag     /* Output in makeheaders format if true */
){

  FILE *out, *in;
  char line[LINESIZE];
  int  lineno;
  struct state *stp;
  struct action *ap;
  struct rule *rp;
  struct acttab *pActtab;
  int i, j, n, sz;
  int szActionType;     /* sizeof(YYACTIONTYPE) */
  int szCodeType;       /* sizeof(YYCODETYPE)   */
  const char *name;
  int mnTknOfst, mxTknOfst;
  int mnNtOfst, mxNtOfst;
  struct axset *ax;

  lemp->minShiftReduce = lemp->nstate;
  lemp->errAction = lemp->minShiftReduce + lemp->nrule;
  lemp->accAction = lemp->errAction + 1;
  lemp->noAction = lemp->accAction + 1;
  lemp->minReduce = lemp->noAction + 1;
  lemp->maxAction = lemp->minReduce + lemp->nrule;

  in = tplt_open(lemp);
  if( in==0 ) return;
  out = file_open(lemp,".c","wb");
  if( out==0 ){
    fclose(in);
    return;
  }
  lineno = 1;
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the include code, if any */
  tplt_print(out,lemp,lemp->include,&lineno);
  if( mhflag ){
    char *incName = file_makename(lemp, ".h");
    fprintf(out,"#include \"%s\"\n", incName); lineno++;
    free(incName);
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate #defines for all tokens */
  if( mhflag ){
    const char *prefix;
    fprintf(out,"#if INTERFACE\n"); lineno++;
    if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
    else                    prefix = "";
    for(i=1; i<lemp->nterminal; i++){
      fprintf(out,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
      lineno++;
    }
    fprintf(out,"#endif\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the defines */
  fprintf(out,"#define YYCODETYPE %s\n",
    minimum_size_type(0, lemp->nsymbol+1, &szCodeType)); lineno++;
  fprintf(out,"#define YYNOCODE %d\n",lemp->nsymbol+1);  lineno++;
  fprintf(out,"#define YYACTIONTYPE %s\n",
    minimum_size_type(0,lemp->maxAction,&szActionType)); lineno++;
  if( lemp->wildcard ){
    fprintf(out,"#define YYWILDCARD %d\n",
       lemp->wildcard->index); lineno++;
  }
  print_stack_union(out,lemp,&lineno,mhflag);
  fprintf(out, "#ifndef YYSTACKDEPTH\n"); lineno++;
  if( lemp->stacksize ){
................................................................................
  }
  fprintf(out, "#endif\n"); lineno++;
  if( mhflag ){
    fprintf(out,"#if INTERFACE\n"); lineno++;
  }
  name = lemp->name ? lemp->name : "Parse";
  if( lemp->arg && lemp->arg[0] ){

    i = lemonStrlen(lemp->arg);
    while( i>=1 && ISSPACE(lemp->arg[i-1]) ) i--;
    while( i>=1 && (ISALNUM(lemp->arg[i-1]) || lemp->arg[i-1]=='_') ) i--;
    fprintf(out,"#define %sARG_SDECL %s;\n",name,lemp->arg);  lineno++;
    fprintf(out,"#define %sARG_PDECL ,%s\n",name,lemp->arg);  lineno++;
    fprintf(out,"#define %sARG_FETCH %s = yypParser->%s\n",
                 name,lemp->arg,&lemp->arg[i]);  lineno++;
    fprintf(out,"#define %sARG_STORE yypParser->%s = %s\n",
                 name,&lemp->arg[i],&lemp->arg[i]);  lineno++;
  }else{
................................................................................
    fprintf(out,"#define %sARG_PDECL\n",name);  lineno++;
    fprintf(out,"#define %sARG_FETCH\n",name); lineno++;
    fprintf(out,"#define %sARG_STORE\n",name); lineno++;
  }
  if( mhflag ){
    fprintf(out,"#endif\n"); lineno++;
  }


  if( lemp->errsym->useCnt ){
    fprintf(out,"#define YYERRORSYMBOL %d\n",lemp->errsym->index); lineno++;
    fprintf(out,"#define YYERRSYMDT yy%d\n",lemp->errsym->dtnum); lineno++;
  }
  if( lemp->has_fallback ){
    fprintf(out,"#define YYFALLBACK 1\n");  lineno++;
  }


  /* Compute the action table, but do not output it yet.  The action
  ** table must be computed before generating the YYNSTATE macro because
  ** we need to know how many states can be eliminated.








  */


  ax = (struct axset *) calloc(lemp->nxstate*2, sizeof(ax[0]));
  if( ax==0 ){
    fprintf(stderr,"malloc failed\n");
    exit(1);
  }
  for(i=0; i<lemp->nxstate; i++){
    stp = lemp->sorted[i];
    ax[i*2].stp = stp;
    ax[i*2].isTkn = 1;
    ax[i*2].nAction = stp->nTknAct;
    ax[i*2+1].stp = stp;
    ax[i*2+1].isTkn = 0;
    ax[i*2+1].nAction = stp->nNtAct;
  }
  mxTknOfst = mnTknOfst = 0;
  mxNtOfst = mnNtOfst = 0;
  /* In an effort to minimize the action table size, use the heuristic


  ** of placing the largest action sets first */
  for(i=0; i<lemp->nxstate*2; i++) ax[i].iOrder = i;


  qsort(ax, lemp->nxstate*2, sizeof(ax[0]), axset_compare);
  pActtab = acttab_alloc(lemp->nsymbol, lemp->nterminal);
  for(i=0; i<lemp->nxstate*2 && ax[i].nAction>0; i++){
    stp = ax[i].stp;
    if( ax[i].isTkn ){
      for(ap=stp->ap; ap; ap=ap->next){
        int action;
        if( ap->sp->index>=lemp->nterminal ) continue;
        action = compute_action(lemp, ap);
        if( action<0 ) continue;
        acttab_action(pActtab, ap->sp->index, action);
      }
      stp->iTknOfst = acttab_insert(pActtab, 1);
      if( stp->iTknOfst<mnTknOfst ) mnTknOfst = stp->iTknOfst;
      if( stp->iTknOfst>mxTknOfst ) mxTknOfst = stp->iTknOfst;
    }else{
      for(ap=stp->ap; ap; ap=ap->next){
        int action;
        if( ap->sp->index<lemp->nterminal ) continue;
        if( ap->sp->index==lemp->nsymbol ) continue;
        action = compute_action(lemp, ap);
        if( action<0 ) continue;
        acttab_action(pActtab, ap->sp->index, action);
      }
      stp->iNtOfst = acttab_insert(pActtab, 0);
      if( stp->iNtOfst<mnNtOfst ) mnNtOfst = stp->iNtOfst;
      if( stp->iNtOfst>mxNtOfst ) mxNtOfst = stp->iNtOfst;
    }
#if 0  /* Uncomment for a trace of how the yy_action[] table fills out */
    { int jj, nn;
      for(jj=nn=0; jj<pActtab->nAction; jj++){
        if( pActtab->aAction[jj].action<0 ) nn++;
      }
      printf("%4d: State %3d %s n: %2d size: %5d freespace: %d\n",
             i, stp->statenum, ax[i].isTkn ? "Token" : "Var  ",
             ax[i].nAction, pActtab->nAction, nn);
    }
#endif
  }
  free(ax);

  /* Mark rules that are actually used for reduce actions after all
  ** optimizations have been applied
  */
  for(rp=lemp->rule; rp; rp=rp->next) rp->doesReduce = LEMON_FALSE;
  for(i=0; i<lemp->nxstate; i++){
    for(ap=lemp->sorted[i]->ap; ap; ap=ap->next){
      if( ap->type==REDUCE || ap->type==SHIFTREDUCE ){
        ap->x.rp->doesReduce = 1;
      }
    }
  }

  /* Finish rendering the constants now that the action table has
  ** been computed */
  fprintf(out,"#define YYNSTATE             %d\n",lemp->nxstate);  lineno++;
  fprintf(out,"#define YYNRULE              %d\n",lemp->nrule);  lineno++;
  fprintf(out,"#define YYNTOKEN             %d\n",lemp->nterminal); lineno++;
  fprintf(out,"#define YY_MAX_SHIFT         %d\n",lemp->nxstate-1); lineno++;
  i = lemp->minShiftReduce;
  fprintf(out,"#define YY_MIN_SHIFTREDUCE   %d\n",i); lineno++;
  i += lemp->nrule;
  fprintf(out,"#define YY_MAX_SHIFTREDUCE   %d\n", i-1); lineno++;
  fprintf(out,"#define YY_ERROR_ACTION      %d\n", lemp->errAction); lineno++;
  fprintf(out,"#define YY_ACCEPT_ACTION     %d\n", lemp->accAction); lineno++;
  fprintf(out,"#define YY_NO_ACTION         %d\n", lemp->noAction); lineno++;
  fprintf(out,"#define YY_MIN_REDUCE        %d\n", lemp->minReduce); lineno++;
  i = lemp->minReduce + lemp->nrule;
  fprintf(out,"#define YY_MAX_REDUCE        %d\n", i-1); lineno++;
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Now output the action table and its associates:
  **
  **  yy_action[]        A single table containing all actions.
  **  yy_lookahead[]     A table containing the lookahead for each entry in
  **                     yy_action.  Used to detect hash collisions.
  **  yy_shift_ofst[]    For each state, the offset into yy_action for
  **                     shifting terminals.
  **  yy_reduce_ofst[]   For each state, the offset into yy_action for
  **                     shifting non-terminals after a reduce.
  **  yy_default[]       Default action for each state.
  */

  /* Output the yy_action table */
  lemp->nactiontab = n = acttab_action_size(pActtab);
  lemp->tablesize += n*szActionType;
  fprintf(out,"#define YY_ACTTAB_COUNT (%d)\n", n); lineno++;
  fprintf(out,"static const YYACTIONTYPE yy_action[] = {\n"); lineno++;

  for(i=j=0; i<n; i++){
    int action = acttab_yyaction(pActtab, i);
    if( action<0 ) action = lemp->noAction;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", action);
    if( j==9 || i==n-1 ){
      fprintf(out, "\n"); lineno++;
      j = 0;
    }else{
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the yy_lookahead table */
  lemp->nlookaheadtab = n = acttab_lookahead_size(pActtab);
  lemp->tablesize += n*szCodeType;
  fprintf(out,"static const YYCODETYPE yy_lookahead[] = {\n"); lineno++;
  for(i=j=0; i<n; i++){
    int la = acttab_yylookahead(pActtab, i);
    if( la<0 ) la = lemp->nsymbol;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", la);
    if( j==9 || i==n-1 ){
................................................................................
    }else{
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the yy_shift_ofst[] table */

  n = lemp->nxstate;
  while( n>0 && lemp->sorted[n-1]->iTknOfst==NO_OFFSET ) n--;
  fprintf(out, "#define YY_SHIFT_COUNT    (%d)\n", n-1); lineno++;
  fprintf(out, "#define YY_SHIFT_MIN      (%d)\n", mnTknOfst); lineno++;
  fprintf(out, "#define YY_SHIFT_MAX      (%d)\n", mxTknOfst); lineno++;
  fprintf(out, "static const %s yy_shift_ofst[] = {\n",
       minimum_size_type(mnTknOfst, lemp->nterminal+lemp->nactiontab, &sz));
       lineno++;
  lemp->tablesize += n*sz;
  for(i=j=0; i<n; i++){
    int ofst;
    stp = lemp->sorted[i];
    ofst = stp->iTknOfst;
    if( ofst==NO_OFFSET ) ofst = lemp->nactiontab;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", ofst);
    if( j==9 || i==n-1 ){
      fprintf(out, "\n"); lineno++;
      j = 0;
    }else{
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the yy_reduce_ofst[] table */

  n = lemp->nxstate;
  while( n>0 && lemp->sorted[n-1]->iNtOfst==NO_OFFSET ) n--;
  fprintf(out, "#define YY_REDUCE_COUNT (%d)\n", n-1); lineno++;
  fprintf(out, "#define YY_REDUCE_MIN   (%d)\n", mnNtOfst); lineno++;
  fprintf(out, "#define YY_REDUCE_MAX   (%d)\n", mxNtOfst); lineno++;
  fprintf(out, "static const %s yy_reduce_ofst[] = {\n",
          minimum_size_type(mnNtOfst-1, mxNtOfst, &sz)); lineno++;
  lemp->tablesize += n*sz;
  for(i=j=0; i<n; i++){
    int ofst;
    stp = lemp->sorted[i];
    ofst = stp->iNtOfst;
    if( ofst==NO_OFFSET ) ofst = mnNtOfst - 1;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", ofst);
................................................................................
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the default action table */
  fprintf(out, "static const YYACTIONTYPE yy_default[] = {\n"); lineno++;
  n = lemp->nxstate;
  lemp->tablesize += n*szActionType;
  for(i=j=0; i<n; i++){
    stp = lemp->sorted[i];
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    if( stp->iDfltReduce<0 ){
      fprintf(out, " %4d,", lemp->errAction);
    }else{
      fprintf(out, " %4d,", stp->iDfltReduce + lemp->minReduce);
    }
    if( j==9 || i==n-1 ){
      fprintf(out, "\n"); lineno++;
      j = 0;
    }else{
      j++;
    }
  }
................................................................................
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the table of fallback tokens.
  */
  if( lemp->has_fallback ){
    int mx = lemp->nterminal - 1;
    while( mx>0 && lemp->symbols[mx]->fallback==0 ){ mx--; }
    lemp->tablesize += (mx+1)*szCodeType;
    for(i=0; i<=mx; i++){
      struct symbol *p = lemp->symbols[i];
      if( p->fallback==0 ){
        fprintf(out, "    0,  /* %10s => nothing */\n", p->name);
      }else{
        fprintf(out, "  %3d,  /* %10s => %s */\n", p->fallback->index,
          p->name, p->fallback->name);
................................................................................
    }
  }
  tplt_xfer(lemp->name, in, out, &lineno);

  /* Generate a table containing the symbolic name of every symbol
  */
  for(i=0; i<lemp->nsymbol; i++){
    lemon_sprintf(line,"\"%s\",",lemp->symbols[i]->name);
    fprintf(out,"  /* %4d */ \"%s\",\n",i, lemp->symbols[i]->name); lineno++;

  }

  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate a table containing a text string that describes every
  ** rule in the rule set of the grammar.  This information is used
  ** when tracing REDUCE actions.
  */
  for(i=0, rp=lemp->rule; rp; rp=rp->next, i++){
    assert( rp->iRule==i );
    fprintf(out," /* %3d */ \"", i);
    writeRuleText(out, rp);
    fprintf(out,"\",\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which executes every time a symbol is popped from
  ** the stack while processing errors or while destroying the parser.
  ** (In other words, generate the %destructor actions)
  */
  if( lemp->tokendest ){
    int once = 1;
    for(i=0; i<lemp->nsymbol; i++){
      struct symbol *sp = lemp->symbols[i];
      if( sp==0 || sp->type!=TERMINAL ) continue;
................................................................................
    struct symbol *dflt_sp = 0;
    int once = 1;
    for(i=0; i<lemp->nsymbol; i++){
      struct symbol *sp = lemp->symbols[i];
      if( sp==0 || sp->type==TERMINAL ||
          sp->index<=0 || sp->destructor!=0 ) continue;
      if( once ){
        fprintf(out, "      /* Default NON-TERMINAL Destructor */\n");lineno++;
        once = 0;
      }
      fprintf(out,"    case %d: /* %s */\n", sp->index, sp->name); lineno++;
      dflt_sp = sp;
    }
    if( dflt_sp!=0 ){
      emit_destructor_code(out,dflt_sp,lemp,&lineno);
    }
    fprintf(out,"      break;\n"); lineno++;
  }
  for(i=0; i<lemp->nsymbol; i++){
    struct symbol *sp = lemp->symbols[i];
    if( sp==0 || sp->type==TERMINAL || sp->destructor==0 ) continue;
    if( sp->destLineno<0 ) continue;  /* Already emitted */
    fprintf(out,"    case %d: /* %s */\n", sp->index, sp->name); lineno++;

    /* Combine duplicate destructors into a single case */
    for(j=i+1; j<lemp->nsymbol; j++){
      struct symbol *sp2 = lemp->symbols[j];
      if( sp2 && sp2->type!=TERMINAL && sp2->destructor
          && sp2->dtnum==sp->dtnum
          && strcmp(sp->destructor,sp2->destructor)==0 ){
         fprintf(out,"    case %d: /* %s */\n",
                 sp2->index, sp2->name); lineno++;
         sp2->destLineno = -1;  /* Avoid emitting this destructor again */
      }
    }

    emit_destructor_code(out,lemp->symbols[i],lemp,&lineno);
    fprintf(out,"      break;\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which executes whenever the parser stack overflows */
  tplt_print(out,lemp,lemp->overflow,&lineno);
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the table of rule information
  **
  ** Note: This code depends on the fact that rules are number
  ** sequentually beginning with 0.
  */
  for(i=0, rp=lemp->rule; rp; rp=rp->next, i++){
    fprintf(out,"  { %4d, %4d }, /* (%d) ",rp->lhs->index,-rp->nrhs,i);
    rule_print(out, rp);
    fprintf(out," */\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which execution during each REDUCE action */
  i = 0;
  for(rp=lemp->rule; rp; rp=rp->next){
    i += translate_code(lemp, rp);
  }
  if( i ){
    fprintf(out,"        YYMINORTYPE yylhsminor;\n"); lineno++;
  }
  /* First output rules other than the default: rule */
  for(rp=lemp->rule; rp; rp=rp->next){
    struct rule *rp2;               /* Other rules with the same action */
    if( rp->codeEmitted ) continue;
    if( rp->noCode ){
      /* No C code actions, so this will be part of the "default:" rule */
      continue;
    }
    fprintf(out,"      case %d: /* ", rp->iRule);
    writeRuleText(out, rp);
    fprintf(out, " */\n"); lineno++;
    for(rp2=rp->next; rp2; rp2=rp2->next){
      if( rp2->code==rp->code && rp2->codePrefix==rp->codePrefix
             && rp2->codeSuffix==rp->codeSuffix ){
        fprintf(out,"      case %d: /* ", rp2->iRule);
        writeRuleText(out, rp2);
        fprintf(out," */ yytestcase(yyruleno==%d);\n", rp2->iRule); lineno++;
        rp2->codeEmitted = 1;
      }
    }
    emit_code(out,rp,lemp,&lineno);
    fprintf(out,"        break;\n"); lineno++;
    rp->codeEmitted = 1;
  }
  /* Finally, output the default: rule.  We choose as the default: all
  ** empty actions. */
  fprintf(out,"      default:\n"); lineno++;
  for(rp=lemp->rule; rp; rp=rp->next){
    if( rp->codeEmitted ) continue;
    assert( rp->noCode );
    fprintf(out,"      /* (%d) ", rp->iRule);
    writeRuleText(out, rp);
    if( rp->doesReduce ){
      fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp->iRule); lineno++;
    }else{
      fprintf(out, " (OPTIMIZED OUT) */ assert(yyruleno!=%d);\n",
              rp->iRule); lineno++;
    }
  }
  fprintf(out,"        break;\n"); lineno++;
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which executes if a parse fails */
  tplt_print(out,lemp,lemp->failure,&lineno);
  tplt_xfer(lemp->name,in,out,&lineno);
................................................................................

  fclose(in);
  fclose(out);
  return;
}

/* Generate a header file for the parser */

void ReportHeader(struct lemon *lemp)
{
  FILE *out, *in;
  const char *prefix;
  char line[LINESIZE];
  char pattern[LINESIZE];
  int i;

  if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
  else                    prefix = "";
  in = file_open(lemp,".h","rb");
  if( in ){
    int nextChar;
    for(i=1; i<lemp->nterminal && fgets(line,LINESIZE,in); i++){
      lemon_sprintf(pattern,"#define %s%-30s %3d\n",
                    prefix,lemp->symbols[i]->name,i);
      if( strcmp(line,pattern) ) break;
    }
    nextChar = fgetc(in);
    fclose(in);
    if( i==lemp->nterminal && nextChar==EOF ){
      /* No change in the file.  Don't rewrite it. */
      return;
    }
  }
  out = file_open(lemp,".h","wb");
  if( out ){
    for(i=1; i<lemp->nterminal; i++){
      fprintf(out,"#define %s%-30s %3d\n",prefix,lemp->symbols[i]->name,i);
    }
    fclose(out);
  }
  return;
}

/* Reduce the size of the action tables, if possible, by making use
** of defaults.
**
** In this version, we take the most frequent REDUCE action and make
** it the default.  Except, there is no default if the wildcard token
** is a possible look-ahead.
*/
void CompressTables(struct lemon *lemp)

{
  struct state *stp;
  struct action *ap, *ap2, *nextap;
  struct rule *rp, *rp2, *rbest;
  int nbest, n;
  int i;
  int usesWildcard;

  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
................................................................................
        if( rp2==rp ) n++;
      }
      if( n>nbest ){
        nbest = n;
        rbest = rp;
      }
    }

    /* Do not make a default if the number of rules to default
    ** is not at least 1 or if the wildcard token is a possible
    ** lookahead.
    */
    if( nbest<1 || usesWildcard ) continue;


................................................................................
    }
    assert( ap );
    ap->sp = Symbol_new("{default}");
    for(ap=ap->next; ap; ap=ap->next){
      if( ap->type==REDUCE && ap->x.rp==rbest ) ap->type = NOT_USED;
    }
    stp->ap = Action_sort(stp->ap);

    for(ap=stp->ap; ap; ap=ap->next){
      if( ap->type==SHIFT ) break;
      if( ap->type==REDUCE && ap->x.rp!=rbest ) break;
    }
    if( ap==0 ){
      stp->autoReduce = 1;
      stp->pDfltReduce = rbest;
    }
  }

  /* Make a second pass over all states and actions.  Convert
  ** every action that is a SHIFT to an autoReduce state into
  ** a SHIFTREDUCE action.
  */
  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
    for(ap=stp->ap; ap; ap=ap->next){
      struct state *pNextState;
      if( ap->type!=SHIFT ) continue;
      pNextState = ap->x.stp;
      if( pNextState->autoReduce && pNextState->pDfltReduce!=0 ){
        ap->type = SHIFTREDUCE;
        ap->x.rp = pNextState->pDfltReduce;
      }
    }
  }

  /* If a SHIFTREDUCE action specifies a rule that has a single RHS term
  ** (meaning that the SHIFTREDUCE will land back in the state where it
  ** started) and if there is no C-code associated with the reduce action,
  ** then we can go ahead and convert the action to be the same as the
  ** action for the RHS of the rule.
  */
  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
    for(ap=stp->ap; ap; ap=nextap){
      nextap = ap->next;
      if( ap->type!=SHIFTREDUCE ) continue;
      rp = ap->x.rp;
      if( rp->noCode==0 ) continue;
      if( rp->nrhs!=1 ) continue;
#if 1
      /* Only apply this optimization to non-terminals.  It would be OK to
      ** apply it to terminal symbols too, but that makes the parser tables
      ** larger. */
      if( ap->sp->index<lemp->nterminal ) continue;
#endif
      /* If we reach this point, it means the optimization can be applied */
      nextap = ap;
      for(ap2=stp->ap; ap2 && (ap2==ap || ap2->sp!=rp->lhs); ap2=ap2->next){}
      assert( ap2!=0 );
      ap->spOpt = ap2->sp;
      ap->type = ap2->type;
      ap->x = ap2->x;
    }
  }
}


/*
** Compare two states for sorting purposes.  The smaller state is the
** one with the most non-terminal actions.  If they have the same number
................................................................................
  const struct state *pA = *(const struct state**)a;
  const struct state *pB = *(const struct state**)b;
  int n;

  n = pB->nNtAct - pA->nNtAct;
  if( n==0 ){
    n = pB->nTknAct - pA->nTknAct;
    if( n==0 ){
      n = pB->statenum - pA->statenum;
    }
  }
  assert( n!=0 );
  return n;
}


/*
** Renumber and resort states so that states with fewer choices
** occur at the end.  Except, keep state 0 as the first state.
*/

void ResortStates(struct lemon *lemp)
{
  int i;
  struct state *stp;
  struct action *ap;

  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
    stp->nTknAct = stp->nNtAct = 0;
    stp->iDfltReduce = -1; /* Init dflt action to "syntax error" */
    stp->iTknOfst = NO_OFFSET;
    stp->iNtOfst = NO_OFFSET;
    for(ap=stp->ap; ap; ap=ap->next){
      int iAction = compute_action(lemp,ap);
      if( iAction>=0 ){
        if( ap->sp->index<lemp->nterminal ){
          stp->nTknAct++;
        }else if( ap->sp->index<lemp->nsymbol ){
          stp->nNtAct++;
        }else{
          assert( stp->autoReduce==0 || stp->pDfltReduce==ap->x.rp );
          stp->iDfltReduce = iAction;
        }
      }
    }
  }
  qsort(&lemp->sorted[1], lemp->nstate-1, sizeof(lemp->sorted[0]),
        stateResortCompare);
  for(i=0; i<lemp->nstate; i++){
    lemp->sorted[i]->statenum = i;
  }
  lemp->nxstate = lemp->nstate;
  while( lemp->nxstate>1 && lemp->sorted[lemp->nxstate-1]->autoReduce ){
    lemp->nxstate--;
  }
}


/***************** From the file "set.c" ************************************/
/*
** Set manipulation routines for the LEMON parser generator.
*/

static int size = 0;

/* Set the set size */
void SetSize(int n)

{
  size = n+1;
}

/* Allocate a new set */
char *SetNew(void){
  char *s;
  s = (char*)calloc( size, 1);
  if( s==0 ){
    extern void memory_error();
    memory_error();
  }
  return s;
}

/* Deallocate a set */
void SetFree(char *s)

{
  free(s);
}

/* Add a new element to the set.  Return TRUE if the element was added
** and FALSE if it was already there. */
int SetAdd(char *s, int e)


{
  int rv;
  assert( e>=0 && e<size );
  rv = s[e];
  s[e] = 1;
  return !rv;
}

/* Add every element of s2 to s1.  Return TRUE if s1 changes. */
int SetUnion(char *s1, char *s2)


{
  int i, progress;
  progress = 0;
  for(i=0; i<size; i++){
    if( s2[i]==0 ) continue;
    if( s1[i]==0 ){
      progress = 1;
................................................................................
** Do not edit this file!  Instead, edit the specification
** file, then rerun aagen.
*/
/*
** Code for processing tables in the LEMON parser generator.
*/

PRIVATE unsigned strhash(const char *x)

{
  unsigned h = 0;
  while( *x ) h = h*13 + *(x++);
  return h;
}

/* Works like strdup, sort of.  Save a string in malloced memory, but
** keep strings in a table so that the same string is not in more
** than one place.
*/
const char *Strsafe(const char *y)

{
  const char *z;
  char *cpy;

  if( y==0 ) return 0;
  z = Strsafe_find(y);
  if( z==0 && (cpy=(char *)malloc( lemonStrlen(y)+1 ))!=0 ){
    lemon_strcpy(cpy,y);
    z = cpy;
    Strsafe_insert(z);
  }
  MemoryCheck(z);
  return z;
}

/* There is one instance of the following structure for each
................................................................................
  struct s_x1node **ht;  /* Hash table for lookups */
};

/* There is one instance of this structure for every data element
** in an associative array of type "x1".
*/
typedef struct s_x1node {
  const char *data;        /* The data */
  struct s_x1node *next;   /* Next entry with the same hash */
  struct s_x1node **from;  /* Previous link */
} x1node;

/* There is only one instance of the array, which is the following */
static struct s_x1 *x1a;

/* Allocate a new associative array */
void Strsafe_init(void){
  if( x1a ) return;
  x1a = (struct s_x1*)malloc( sizeof(struct s_x1) );
  if( x1a ){
    x1a->size = 1024;
    x1a->count = 0;

    x1a->tbl = (x1node*)calloc(1024, sizeof(x1node) + sizeof(x1node*));
    if( x1a->tbl==0 ){
      free(x1a);
      x1a = 0;
    }else{
      int i;
      x1a->ht = (x1node**)&(x1a->tbl[1024]);
      for(i=0; i<1024; i++) x1a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */
int Strsafe_insert(const char *data)

{
  x1node *np;
  unsigned h;
  unsigned ph;

  if( x1a==0 ) return 0;
  ph = strhash(data);
  h = ph & (x1a->size-1);
  np = x1a->ht[h];
  while( np ){
    if( strcmp(np->data,data)==0 ){
................................................................................
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x1a->count>=x1a->size ){
    /* Need to make the hash table bigger */
    int i,arrSize;
    struct s_x1 array;
    array.size = arrSize = x1a->size*2;
    array.count = x1a->count;

    array.tbl = (x1node*)calloc(arrSize, sizeof(x1node) + sizeof(x1node*));
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x1node**)&(array.tbl[arrSize]);
    for(i=0; i<arrSize; i++) array.ht[i] = 0;
    for(i=0; i<x1a->count; i++){
      x1node *oldnp, *newnp;
      oldnp = &(x1a->tbl[i]);
      h = strhash(oldnp->data) & (arrSize-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
    }
................................................................................
  x1a->ht[h] = np;
  np->from = &(x1a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
const char *Strsafe_find(const char *key)

{
  unsigned h;
  x1node *np;

  if( x1a==0 ) return 0;
  h = strhash(key) & (x1a->size-1);
  np = x1a->ht[h];
  while( np ){
    if( strcmp(np->data,key)==0 ) break;
................................................................................
  }
  return np ? np->data : 0;
}

/* Return a pointer to the (terminal or nonterminal) symbol "x".
** Create a new symbol if this is the first time "x" has been seen.
*/
struct symbol *Symbol_new(const char *x)

{
  struct symbol *sp;

  sp = Symbol_find(x);
  if( sp==0 ){
    sp = (struct symbol *)calloc(1, sizeof(struct symbol) );
    MemoryCheck(sp);
    sp->name = Strsafe(x);
    sp->type = ISUPPER(*x) ? TERMINAL : NONTERMINAL;
    sp->rule = 0;
    sp->fallback = 0;
    sp->prec = -1;
    sp->assoc = UNK;
    sp->firstset = 0;
    sp->lambda = LEMON_FALSE;
    sp->destructor = 0;
................................................................................
    sp->useCnt = 0;
    Symbol_insert(sp,sp->name);
  }
  sp->useCnt++;
  return sp;
}

/* Compare two symbols for sorting purposes.  Return negative,
** zero, or positive if a is less then, equal to, or greater
** than b.
**
** Symbols that begin with upper case letters (terminals or tokens)
** must sort before symbols that begin with lower case letters
** (non-terminals).  And MULTITERMINAL symbols (created using the
** %token_class directive) must sort at the very end. Other than
** that, the order does not matter.
**
** We find experimentally that leaving the symbols in their original
** order (the order they appeared in the grammar file) gives the
** smallest parser tables in SQLite.
*/
int Symbolcmpp(const void *_a, const void *_b)
{

  const struct symbol *a = *(const struct symbol **) _a;
  const struct symbol *b = *(const struct symbol **) _b;
  int i1 = a->type==MULTITERMINAL ? 3 : a->name[0]>'Z' ? 2 : 1;
  int i2 = b->type==MULTITERMINAL ? 3 : b->name[0]>'Z' ? 2 : 1;
  return i1==i2 ? a->index - b->index : i1 - i2;
}

/* There is one instance of the following structure for each
** associative array of type "x2".
*/
struct s_x2 {
  int size;               /* The number of available slots. */
................................................................................
  struct s_x2node **ht;  /* Hash table for lookups */
};

/* There is one instance of this structure for every data element
** in an associative array of type "x2".
*/
typedef struct s_x2node {
  struct symbol *data;     /* The data */
  const char *key;         /* The key */
  struct s_x2node *next;   /* Next entry with the same hash */
  struct s_x2node **from;  /* Previous link */
} x2node;

/* There is only one instance of the array, which is the following */
static struct s_x2 *x2a;

/* Allocate a new associative array */
void Symbol_init(void){
  if( x2a ) return;
  x2a = (struct s_x2*)malloc( sizeof(struct s_x2) );
  if( x2a ){
    x2a->size = 128;
    x2a->count = 0;

    x2a->tbl = (x2node*)calloc(128, sizeof(x2node) + sizeof(x2node*));
    if( x2a->tbl==0 ){
      free(x2a);
      x2a = 0;
    }else{
      int i;
      x2a->ht = (x2node**)&(x2a->tbl[128]);
      for(i=0; i<128; i++) x2a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */

int Symbol_insert(struct symbol *data, const char *key)

{
  x2node *np;
  unsigned h;
  unsigned ph;

  if( x2a==0 ) return 0;
  ph = strhash(key);
  h = ph & (x2a->size-1);
  np = x2a->ht[h];
  while( np ){
    if( strcmp(np->key,key)==0 ){
................................................................................
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x2a->count>=x2a->size ){
    /* Need to make the hash table bigger */
    int i,arrSize;
    struct s_x2 array;
    array.size = arrSize = x2a->size*2;
    array.count = x2a->count;

    array.tbl = (x2node*)calloc(arrSize, sizeof(x2node) + sizeof(x2node*));
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x2node**)&(array.tbl[arrSize]);
    for(i=0; i<arrSize; i++) array.ht[i] = 0;
    for(i=0; i<x2a->count; i++){
      x2node *oldnp, *newnp;
      oldnp = &(x2a->tbl[i]);
      h = strhash(oldnp->key) & (arrSize-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->key = oldnp->key;
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
................................................................................
  x2a->ht[h] = np;
  np->from = &(x2a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
struct symbol *Symbol_find(const char *key)

{
  unsigned h;
  x2node *np;

  if( x2a==0 ) return 0;
  h = strhash(key) & (x2a->size-1);
  np = x2a->ht[h];
  while( np ){
    if( strcmp(np->key,key)==0 ) break;
    np = np->next;
  }
  return np ? np->data : 0;
}

/* Return the n-th data.  Return NULL if n is out of range. */
struct symbol *Symbol_Nth(int n)

{
  struct symbol *data;
  if( x2a && n>0 && n<=x2a->count ){
    data = x2a->tbl[n-1].data;
  }else{
    data = 0;
  }
................................................................................

/* Return an array of pointers to all data in the table.
** The array is obtained from malloc.  Return NULL if memory allocation
** problems, or if the array is empty. */
struct symbol **Symbol_arrayof()
{
  struct symbol **array;
  int i,arrSize;
  if( x2a==0 ) return 0;
  arrSize = x2a->count;
  array = (struct symbol **)calloc(arrSize, sizeof(struct symbol *));
  if( array ){
    for(i=0; i<arrSize; i++) array[i] = x2a->tbl[i].data;
  }
  return array;
}

/* Compare two configurations */
int Configcmp(const char *_a,const char *_b)
{
  const struct config *a = (struct config *) _a;
  const struct config *b = (struct config *) _b;

  int x;
  x = a->rp->index - b->rp->index;
  if( x==0 ) x = a->dot - b->dot;
  return x;
}

/* Compare two states */
PRIVATE int statecmp(struct config *a, struct config *b)


{
  int rc;
  for(rc=0; rc==0 && a && b;  a=a->bp, b=b->bp){
    rc = a->rp->index - b->rp->index;
    if( rc==0 ) rc = a->dot - b->dot;
  }
  if( rc==0 ){
................................................................................
    if( a ) rc = 1;
    if( b ) rc = -1;
  }
  return rc;
}

/* Hash a state */

PRIVATE unsigned statehash(struct config *a)
{
  unsigned h=0;
  while( a ){
    h = h*571 + a->rp->index*37 + a->dot;
    a = a->bp;
  }
  return h;
}

/* Allocate a new state structure */
struct state *State_new()
{
  struct state *newstate;
  newstate = (struct state *)calloc(1, sizeof(struct state) );
  MemoryCheck(newstate);
  return newstate;
}

/* There is one instance of the following structure for each
** associative array of type "x3".
*/
struct s_x3 {
  int size;               /* The number of available slots. */
................................................................................
  struct s_x3node **from;  /* Previous link */
} x3node;

/* There is only one instance of the array, which is the following */
static struct s_x3 *x3a;

/* Allocate a new associative array */
void State_init(void){
  if( x3a ) return;
  x3a = (struct s_x3*)malloc( sizeof(struct s_x3) );
  if( x3a ){
    x3a->size = 128;
    x3a->count = 0;

    x3a->tbl = (x3node*)calloc(128, sizeof(x3node) + sizeof(x3node*));
    if( x3a->tbl==0 ){
      free(x3a);
      x3a = 0;
    }else{
      int i;
      x3a->ht = (x3node**)&(x3a->tbl[128]);
      for(i=0; i<128; i++) x3a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */

int State_insert(struct state *data, struct config *key)

{
  x3node *np;
  unsigned h;
  unsigned ph;

  if( x3a==0 ) return 0;
  ph = statehash(key);
  h = ph & (x3a->size-1);
  np = x3a->ht[h];
  while( np ){
    if( statecmp(np->key,key)==0 ){
................................................................................
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x3a->count>=x3a->size ){
    /* Need to make the hash table bigger */
    int i,arrSize;
    struct s_x3 array;
    array.size = arrSize = x3a->size*2;
    array.count = x3a->count;

    array.tbl = (x3node*)calloc(arrSize, sizeof(x3node) + sizeof(x3node*));
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x3node**)&(array.tbl[arrSize]);
    for(i=0; i<arrSize; i++) array.ht[i] = 0;
    for(i=0; i<x3a->count; i++){
      x3node *oldnp, *newnp;
      oldnp = &(x3a->tbl[i]);
      h = statehash(oldnp->key) & (arrSize-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->key = oldnp->key;
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
................................................................................
  x3a->ht[h] = np;
  np->from = &(x3a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
struct state *State_find(struct config *key)

{
  unsigned h;
  x3node *np;

  if( x3a==0 ) return 0;
  h = statehash(key) & (x3a->size-1);
  np = x3a->ht[h];
  while( np ){
    if( statecmp(np->key,key)==0 ) break;
................................................................................
  }
  return np ? np->data : 0;
}

/* Return an array of pointers to all data in the table.
** The array is obtained from malloc.  Return NULL if memory allocation
** problems, or if the array is empty. */
struct state **State_arrayof(void)
{
  struct state **array;
  int i,arrSize;
  if( x3a==0 ) return 0;
  arrSize = x3a->count;
  array = (struct state **)calloc(arrSize, sizeof(struct state *));
  if( array ){
    for(i=0; i<arrSize; i++) array[i] = x3a->tbl[i].data;
  }
  return array;
}

/* Hash a configuration */

PRIVATE unsigned confighash(struct config *a)
{
  unsigned h=0;
  h = h*571 + a->rp->index*37 + a->dot;
  return h;
}

/* There is one instance of the following structure for each
** associative array of type "x4".
*/
................................................................................
  struct s_x4node **from;  /* Previous link */
} x4node;

/* There is only one instance of the array, which is the following */
static struct s_x4 *x4a;

/* Allocate a new associative array */
void Configtable_init(void){
  if( x4a ) return;
  x4a = (struct s_x4*)malloc( sizeof(struct s_x4) );
  if( x4a ){
    x4a->size = 64;
    x4a->count = 0;

    x4a->tbl = (x4node*)calloc(64, sizeof(x4node) + sizeof(x4node*));
    if( x4a->tbl==0 ){
      free(x4a);
      x4a = 0;
    }else{
      int i;
      x4a->ht = (x4node**)&(x4a->tbl[64]);
      for(i=0; i<64; i++) x4a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */
int Configtable_insert(struct config *data)

{
  x4node *np;
  unsigned h;
  unsigned ph;

  if( x4a==0 ) return 0;
  ph = confighash(data);
  h = ph & (x4a->size-1);
  np = x4a->ht[h];
  while( np ){
    if( Configcmp((const char *) np->data,(const char *) data)==0 ){
      /* An existing entry with the same key is found. */
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x4a->count>=x4a->size ){
    /* Need to make the hash table bigger */
    int i,arrSize;
    struct s_x4 array;
    array.size = arrSize = x4a->size*2;
    array.count = x4a->count;

    array.tbl = (x4node*)calloc(arrSize, sizeof(x4node) + sizeof(x4node*));
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x4node**)&(array.tbl[arrSize]);
    for(i=0; i<arrSize; i++) array.ht[i] = 0;
    for(i=0; i<x4a->count; i++){
      x4node *oldnp, *newnp;
      oldnp = &(x4a->tbl[i]);
      h = confighash(oldnp->data) & (arrSize-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
    }
................................................................................
  x4a->ht[h] = np;
  np->from = &(x4a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
struct config *Configtable_find(struct config *key)

{
  int h;
  x4node *np;

  if( x4a==0 ) return 0;
  h = confighash(key) & (x4a->size-1);
  np = x4a->ht[h];
  while( np ){
    if( Configcmp((const char *) np->data,(const char *) key)==0 ) break;
    np = np->next;
  }
  return np ? np->data : 0;
}

/* Remove all data from the table.  Pass each data to the function "f"
** as it is removed.  ("f" may be null to avoid this step.) */
void Configtable_clear(int(*f)(struct config *))

{
  int i;
  if( x4a==0 || x4a->count==0 ) return;
  if( f ) for(i=0; i<x4a->count; i++) (*f)(x4a->tbl[i].data);
  for(i=0; i<x4a->size; i++) x4a->ht[i] = 0;
  x4a->count = 0;
  return;
}







<
<
<
<
<
<
<
<



|




<
<
<
|
<
<
<













<









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
|
|
|
|
|


|
|
|
|
|
|
|
|
|
|





>
|
|
<
<
|

|

|
|
|
|
|


|


|
|
|
|


|
|
|
|
|
|


|
|
|
>
|
|
>











|
>
>
>
|
|
|
<
>
>
>
>
|




<
<
<
<
<
<
<
<
|





|
<







 







|




|

|
<
<
<
<


<

<









<
<
<
<







|
>
>
>




>
>
>
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
|




<










|


|
<
<







 







<

<



<
<
<
<
<
<







 







<
<
|







 







>


|

|
|
|



|
|
|
|
|
|
|
|



|
|
|
|
|
|



|
|
|
|
<








|












|

|







 







|


<
<
<












|
|
|
|
|
<
>
|
|
|
|
|
|
<

|

|









|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<




|
>
>
|






<
<



|







 







|
|





<
<



|
<
<
<




|







 







<
<
<
<
<
<
<
<

|
|






|



|











|
|
|
>



<
>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
<
<








<
<
<






|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<





<







<
<
<
<
<
<
<
<
<
<







|







|
>







 







|











>
|







 







|
|
<







 







|

|


|










|
>
|













|

|


|







 







|
|
>







 







>
|
>







 







|
>
>



|







 







|
|







 







>
|







 







|
>












|










|
|






|



>
|







|













|







|

|









>







|







 







|
|
|
|
>







 







|









|
>







 







|







 







|
|











|

|



|
>






|









|









|
|
|
<
>







 







|
>
>







 







|
>







 







|


|
|








|
|
<





|
|
<






|









|








|
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>

<
>
>

>
>
>
>
>
>
>
>
>
>
|

<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









|













|





|




|




<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

>
>
|









<




<

<


<
<
<

<



<
<



<

<




|







 







<

>

|
|
>
|
<
<
<
|


<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<
|













|
<
|
>
|
<
<
<
<
<
<

|


<
<
<
<
<
>
>







 







|







 







|








|







 







|












|













|
>
>
>







 







|
>







 







|
>
>







 







<
<



|

|













|
>
>







 







<
|
<
>










|







 







|





|





|






>
>
|
>







 







|












|
>






|
>






|







 







|




|




|











>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
|

<

|


|

|










|
>

|







 







|







|


|







<
|










|







 







|







 







|






|



|



|




<







|


|

|

|






|



|




|



|





<
|

|







 







|







 







|








|

|

|

|

|


|

|

|

|







 







|

|




<
<


<
<





|








|

|











|

|



|
<
<
<
<
<
<
<
<
<
|
|
|
<





|






|


|







|
|
<
|







 







|



|
|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







|
|



|
|







 







>
|




|







 







|
|
>

<







<












|







 







|
|



|







|
|









|
|




|

|








|







 







|
|













|

|



>
|
>

|
|
|
|
|



>
>
|











|
>







 







|
>
>




|




|


|






|
|
|
|
<
>













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

>
|







 







|
>
>
>
>
>
>
>
>
>
>
>
>







|
|
>
>
|


>


|


>

<



<
<




<
<
<
<
<
<







 







|
<
<
<
<


|
<
<
>

<
|
<
<
<
>

<
<
<
<
<
<
<








|
|


|



<
<
<
<
<
<
<

<
<
<
<
<
<
<




<
<
<



|
>
|









|







|







 







|
|
|
|
|
>












|


>


<

|
<
<
|
|
|


|

|
|


<









|
>
>



|
|
<
<
<
<
<
<
<
<
<
<
<
|
|







 







|
>
>
>
>









|







 







|
>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|

|







 







|
>
>
>











|
>
>
>
>












|








|
|
|
|
|
<
>









<
<
|
<







 







|
|








|
>
>







 







|
<





>

<










|

|

|



|

|




|







|
|
|
<
<

|


<
<
<
|
<
|
<
<





<
|

<
<
<


<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
|

|



|





<
<
<
<
<
|







 







<
<
<
<
<








|
|
<

|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
<
>
|
|
|
>
>
|
|
|
<
<
<
<
<
<
<
<
<
>
|
<
|
<

|
<
|
<
|



|
|
|
|
|
<
<
|
<
<
<
<
>
|
<


<
<
|
<

|
>
>

<
<
|
<
<
<
<
<
<
<
<
<
|
<
<











|
|
|
|
|
<
>






|
|




<
<
<
<













|







 







|

|







 







|








|







 







|
<

|
<
<


|
<

|
<

|
<


|
<

|
<
>
>

<
<












<








<
|
<
<
<
<
<










<
|
<
>

<









|
|
|
<
>







|
<
<
|




<
<
<
<
<
<
<













|
|
|





|













|


|







 







>

|
|







 







>
>

|
|




>

<
|
|
>
>
>
>
>
>
>
>

>
>
|




|










<
>
>
|
<
>
>
|
|
|









|











|



<
<
<
<
|
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<

>


|












<
<







 







>
|

<
<
|
|
|
<
<




|












>
|

<
<
|
|
|
<







 







|
<



<
<
<
|
<







 







<







 







|
|
>

>







|







|







 







|













<










|












|




|
|
<
<




<

|
<
<
<




|
|
<
<
<
|



|
<
|

|
|




|





|
|
|

<
|
<
<
<
<







 







>
|


|








<

|
<


<

|







|

|











|
>


|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
|
<
<








>
|








|



|
<





|
<









<
<
<
<











|
>





|










|
>






|
>
>









|
>
>







 







|
>

|
|







|
>

|
<



|
|
<







 







|








|





>
|












|
>


|
|







 







|

|

>
|

|
|



|







 







|
>

|







 







|
>








|







 







|
<
<



<
<
|





|
<
>
|
|
<
<
<







 







|
|








|





>
|












>
|
>


|
|







 







|

|

>
|

|
|



|







 







|
>

|













|
>







 







|

|
|

|





|
<
|
|
>







|
>
>







 







>
|

|










|
|
|
|







 







|





>
|












>
|
>


|
|







 







|

|

>
|

|
|



|







 







|
>

|







 







|


|

|
|

|





>
|

|







 







|





>
|












|
>


|
|






|








|

|

>
|

|
|



|







 







|
>








|







|
>








8
9
10
11
12
13
14








15
16
17
18
19
20
21
22



23



24
25
26
27
28
29
30
31
32
33
34
35
36

37
38
39
40
41
42
43
44
45










































































































46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75


76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

129
130
131
132
133
134
135
136
137








138
139
140
141
142
143
144

145
146
147
148
149
150
151
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166




167
168

169

170
171
172
173
174
175
176
177
178




179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207






208
209
210
211
212

213
214
215
216
217
218
219
220
221
222
223
224
225
226


227
228
229
230
231
232
233
...
238
239
240
241
242
243
244

245

246
247
248






249
250
251
252
253
254
255
...
264
265
266
267
268
269
270


271
272
273
274
275
276
277
278
...
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
...
362
363
364
365
366
367
368
369
370
371



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388

389
390
391
392
393
394
395

396
397
398
399
400
401
402
403
404
405
406
407
408
409
















410




411
412
413
414
415
416
417
418
419
420
421
422
423
424


425
426
427
428
429
430
431
432
433
434
435
...
437
438
439
440
441
442
443
444
445
446
447
448
449
450


451
452
453
454



455
456
457
458
459
460
461
462
463
464
465
466
...
481
482
483
484
485
486
487








488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519

520
521
522
523
524
525
526
527
528
529
530
531
532
533
534


535
536
537
538
539
540
541
542



543
544
545
546
547
548
549
550
551
552




























553







554
555
556
557
558

559
560
561
562
563
564
565










566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
...
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
...
624
625
626
627
628
629
630
631
632

633
634
635
636
637
638
639
...
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
...
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
...
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
...
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
...
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
...
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
...
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
....
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
....
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
....
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
....
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134

1135
1136
1137
1138
1139
1140
1141
1142
....
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
....
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
....
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236

1237
1238
1239
1240
1241
1242
1243

1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
....
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322

1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337

1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391





1392































































1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405

1406
1407
1408
1409

1410

1411
1412



1413

1414
1415
1416


1417
1418
1419

1420

1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
....
1448
1449
1450
1451
1452
1453
1454

1455
1456
1457
1458
1459
1460
1461



1462
1463
1464













1465
1466
1467
1468
1469
1470
1471
....
1491
1492
1493
1494
1495
1496
1497
1498

1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513

1514
1515
1516






1517
1518
1519
1520





1521
1522
1523
1524
1525
1526
1527
1528
1529
....
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
....
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
....
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
....
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
....
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
....
1713
1714
1715
1716
1717
1718
1719


1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
....
1771
1772
1773
1774
1775
1776
1777

1778

1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
....
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
....
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
....
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964










1965
1966

1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
....
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021

2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
....
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
....
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127

2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167

2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
....
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
....
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
....
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268


2269
2270


2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305









2306
2307
2308

2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333

2334
2335
2336
2337
2338
2339
2340
2341
....
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
....
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
....
2402
2403
2404
2405
2406
2407
2408




















2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426


































2427
2428
2429
2430
2431
2432
2433
....
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
....
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
....
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526

2527
2528
2529
2530
2531
2532
2533

2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
....
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
....
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
....
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741

2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755





















2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
....
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818

2819
2820
2821


2822
2823
2824
2825






2826
2827
2828
2829
2830
2831
2832
....
2858
2859
2860
2861
2862
2863
2864
2865




2866
2867
2868


2869
2870

2871



2872
2873







2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889







2890







2891
2892
2893
2894



2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
....
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989

2990
2991


2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002

3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019











3020
3021
3022
3023
3024
3025
3026
3027
3028
....
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
....
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074


















3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
....
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149

3150
3151
3152
3153
3154
3155
3156
3157
3158
3159


3160

3161
3162
3163
3164
3165
3166
3167
....
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
....
3206
3207
3208
3209
3210
3211
3212
3213

3214
3215
3216
3217
3218
3219
3220

3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256


3257
3258
3259
3260



3261

3262


3263
3264
3265
3266
3267

3268
3269



3270
3271









3272











































3273






3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285





3286
3287
3288
3289
3290
3291
3292
3293
....
3304
3305
3306
3307
3308
3309
3310





3311
3312
3313
3314
3315
3316
3317
3318
3319
3320

3321
3322



3323

















3324
3325
3326

3327
3328
3329
3330
3331
3332
3333
3334
3335









3336
3337

3338

3339
3340

3341

3342
3343
3344
3345
3346
3347
3348
3349
3350


3351




3352
3353

3354
3355


3356

3357
3358
3359
3360
3361


3362









3363


3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379

3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392




3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
....
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
....
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
....
3482
3483
3484
3485
3486
3487
3488
3489

3490
3491


3492
3493
3494

3495
3496

3497
3498

3499
3500
3501

3502
3503

3504
3505
3506


3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518

3519
3520
3521
3522
3523
3524
3525
3526

3527





3528
3529
3530
3531
3532
3533
3534
3535
3536
3537

3538

3539
3540

3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552

3553
3554
3555
3556
3557
3558
3559
3560
3561


3562
3563
3564
3565
3566







3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
....
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
....
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652

3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681

3682
3683
3684

3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714




3715






3716
3717










































3718



3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735


3736
3737
3738
3739
3740
3741
3742
....
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754


3755
3756
3757


3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777


3778
3779
3780

3781
3782
3783
3784
3785
3786
3787
....
3792
3793
3794
3795
3796
3797
3798
3799

3800
3801
3802



3803

3804
3805
3806
3807
3808
3809
3810
....
3812
3813
3814
3815
3816
3817
3818

3819
3820
3821
3822
3823
3824
3825
....
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
....
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896

3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926


3927
3928
3929
3930

3931
3932



3933
3934
3935
3936
3937
3938



3939
3940
3941
3942
3943

3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961

3962




3963
3964
3965
3966
3967
3968
3969
....
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000

4001
4002

4003
4004

4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
....
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
....
4075
4076
4077
4078
4079
4080
4081
























































4082
4083
4084
4085
4086
4087
4088
....
4093
4094
4095
4096
4097
4098
4099


4100


4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123

4124
4125
4126
4127
4128
4129

4130
4131
4132
4133
4134
4135
4136
4137
4138




4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
....
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231

4232
4233
4234
4235
4236

4237
4238
4239
4240
4241
4242
4243
....
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
....
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
....
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
....
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
....
4384
4385
4386
4387
4388
4389
4390
4391


4392
4393
4394


4395
4396
4397
4398
4399
4400
4401

4402
4403
4404



4405
4406
4407
4408
4409
4410
4411
....
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
....
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
....
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
....
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565

4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
....
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
....
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
....
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
....
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
....
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
....
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
....
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
*/
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>









#ifndef __WIN32__
#   if defined(_WIN32) || defined(WIN32)
#	define __WIN32__
#   endif
#endif

#ifdef __WIN32__



extern int access();



#else
#include <unistd.h>
#endif

/* #define PRIVATE static */
#define PRIVATE

#ifdef TEST
#define MAXRHS 5       /* Set low to exercise exception code */
#else
#define MAXRHS 1000
#endif


static char *msort(char*,char**,int(*)(const char*,const char*));

/*
** Compilers are getting increasingly pedantic about type conversions
** as C evolves ever closer to Ada....  To work around the latest problems
** we have to define the following variant of strlen().
*/
#define lemonStrlen(X)   ((int)strlen(X))











































































































static struct action *Action_new(void);
static struct action *Action_sort(struct action *);

/********** From the file "build.h" ************************************/
void FindRulePrecedences();
void FindFirstSets();
void FindStates();
void FindLinks();
void FindFollowSets();
void FindActions();

/********* From the file "configlist.h" *********************************/
void Configlist_init(/* void */);
struct config *Configlist_add(/* struct rule *, int */);
struct config *Configlist_addbasis(/* struct rule *, int */);
void Configlist_closure(/* void */);
void Configlist_sort(/* void */);
void Configlist_sortbasis(/* void */);
struct config *Configlist_return(/* void */);
struct config *Configlist_basis(/* void */);
void Configlist_eat(/* struct config * */);
void Configlist_reset(/* void */);

/********* From the file "error.h" ***************************************/
void ErrorMsg(const char *, int,const char *, ...);

/****** From the file "option.h" ******************************************/
struct s_options {
  enum { OPT_FLAG=1,  OPT_INT,  OPT_DBL,  OPT_STR,
         OPT_FFLAG, OPT_FINT, OPT_FDBL, OPT_FSTR} type;


  char *label;
  char *arg;
  char *message;
};
int    OptInit(/* char**,struct s_options*,FILE* */);
int    OptNArgs(/* void */);
char  *OptArg(/* int */);
void   OptErr(/* int */);
void   OptPrint(/* void */);

/******** From the file "parse.h" *****************************************/
void Parse(/* struct lemon *lemp */);

/********* From the file "plink.h" ***************************************/
struct plink *Plink_new(/* void */);
void Plink_add(/* struct plink **, struct config * */);
void Plink_copy(/* struct plink **, struct plink * */);
void Plink_delete(/* struct plink * */);

/********** From the file "report.h" *************************************/
void Reprint(/* struct lemon * */);
void ReportOutput(/* struct lemon * */);
void ReportTable(/* struct lemon * */);
void ReportHeader(/* struct lemon * */);
void CompressTables(/* struct lemon * */);
void ResortStates(/* struct lemon * */);

/********** From the file "set.h" ****************************************/
void  SetSize(/* int N */);             /* All sets will be of size N */
char *SetNew(/* void */);               /* A new set for element 0..N */
void  SetFree(/* char* */);             /* Deallocate a set */

int SetAdd(/* char*,int */);            /* Add element to a set */
int SetUnion(/* char *A,char *B */);    /* A <- A U B, thru element N */

#define SetFind(X,Y) (X[Y])       /* True if Y is in set X */

/********** From the file "struct.h" *************************************/
/*
** Principal data structures for the LEMON parser generator.
*/

typedef enum {LEMON_FALSE=0, LEMON_TRUE} Boolean;

/* Symbols (terminals and nonterminals) of the grammar are stored
** in the following: */
struct symbol {
  char *name;              /* Name of the symbol */
  int index;               /* Index number for this symbol */
  enum {
    TERMINAL,
    NONTERMINAL,
    MULTITERMINAL

  } type;                  /* Symbols are all either TERMINALS or NTs */
  struct rule *rule;       /* Linked list of rules of this (if an NT) */
  struct symbol *fallback; /* fallback token in case this token doesn't parse */
  int prec;                /* Precedence if defined (-1 otherwise) */
  enum e_assoc {
    LEFT,
    RIGHT,
    NONE,
    UNK








  } assoc;                 /* Associativity if precedence is defined */
  char *firstset;          /* First-set for all rules of this symbol */
  Boolean lambda;          /* True if NT and can generate an empty string */
  int useCnt;              /* Number of times used */
  char *destructor;        /* Code which executes whenever this symbol is
                           ** popped from the stack during error processing */
  int destLineno;          /* Line number for start of destructor */

  char *datatype;          /* The data type of information held by this
                           ** object. Only used if type==NONTERMINAL */
  int dtnum;               /* The data type number.  In the parser, the value
                           ** stack is a union.  The .yy%d element of this
                           ** union is the correct data type for this object */
  /* The following fields are used by MULTITERMINALs only */
  int nsubsym;             /* Number of constituent symbols in the MULTI */
................................................................................
  struct symbol **subsym;  /* Array of constituent symbols */
};

/* Each production rule in the grammar is stored in the following
** structure.  */
struct rule {
  struct symbol *lhs;      /* Left-hand side of the rule */
  char *lhsalias;          /* Alias for the LHS (NULL if none) */
  int lhsStart;            /* True if left-hand side is the start symbol */
  int ruleline;            /* Line number for the rule */
  int nrhs;                /* Number of RHS symbols */
  struct symbol **rhs;     /* The RHS symbols */
  char **rhsalias;         /* An alias for each RHS symbol (NULL if none) */
  int line;                /* Line number at which code begins */
  char *code;              /* The code executed when this rule is reduced */




  struct symbol *precsym;  /* Precedence symbol for this rule */
  int index;               /* An index number for this rule */

  Boolean canReduce;       /* True if this rule is ever reduced */

  struct rule *nextlhs;    /* Next rule with the same LHS */
  struct rule *next;       /* Next rule in the global list */
};

/* A configuration is a production rule of the grammar together with
** a mark (dot) showing how much of that rule has been processed so far.
** Configurations also contain a follow-set which is a list of terminal
** symbols which are allowed to immediately follow the end of the rule.
** Every configuration is recorded as an instance of the following: */




struct config {
  struct rule *rp;         /* The rule upon which the configuration is based */
  int dot;                 /* The parse point */
  char *fws;               /* Follow-set for this configuration only */
  struct plink *fplp;      /* Follow-set forward propagation links */
  struct plink *bplp;      /* Follow-set backwards propagation links */
  struct state *stp;       /* Pointer to state which contains this */
  enum {
    COMPLETE,              /* The status is used during followset and */
    INCOMPLETE             /*    shift computations */
  } status;
  struct config *next;     /* Next configuration in the state */
  struct config *bp;       /* The next basis configuration */
};

/* Every shift or reduce operation is stored as one of the following */
struct action {
  struct symbol *sp;       /* The look-ahead symbol */
  enum e_action {
    SHIFT,
    ACCEPT,
    REDUCE,
    ERROR,
    SSCONFLICT,              /* A shift/shift conflict */
    SRCONFLICT,              /* Was a reduce, but part of a conflict */
    RRCONFLICT,              /* Was a reduce, but part of a conflict */
    SH_RESOLVED,             /* Was a shift.  Precedence resolved conflict */
    RD_RESOLVED,             /* Was reduce.  Precedence resolved conflict */
    NOT_USED                 /* Deleted by compression */






  } type;
  union {
    struct state *stp;     /* The new state, if a shift */
    struct rule *rp;       /* The rule, if a reduce */
  } x;

  struct action *next;     /* Next action for this state */
  struct action *collide;  /* Next action with the same hash */
};

/* Each state of the generated parser's finite state machine
** is encoded as an instance of the following structure. */
struct state {
  struct config *bp;       /* The basis configurations for this state */
  struct config *cfp;      /* All configurations in this set */
  int statenum;            /* Sequential number for this state */
  struct action *ap;       /* Array of actions for this state */
  int nTknAct, nNtAct;     /* Number of actions on terminals and nonterminals */
  int iTknOfst, iNtOfst;   /* yy_action[] offset for terminals and nonterms */
  int iDflt;               /* Default action */


};
#define NO_OFFSET (-2147483647)

/* A followset propagation link indicates that the contents of one
** configuration followset should be propagated to another whenever
** the first changes. */
struct plink {
................................................................................
/* The state vector for the entire parser generator is recorded as
** follows.  (LEMON uses no global variables and makes little use of
** static variables.  Fields in the following structure can be thought
** of as begin global variables in the program.) */
struct lemon {
  struct state **sorted;   /* Table of states sorted by state number */
  struct rule *rule;       /* List of all rules */

  int nstate;              /* Number of states */

  int nrule;               /* Number of rules */
  int nsymbol;             /* Number of terminal and nonterminal symbols */
  int nterminal;           /* Number of terminal symbols */






  struct symbol **symbols; /* Sorted array of pointers to symbols */
  int errorcnt;            /* Number of errors */
  struct symbol *errsym;   /* The error symbol */
  struct symbol *wildcard; /* Token that matches anything */
  char *name;              /* Name of the generated parser */
  char *arg;               /* Declaration of the 3th argument to parser */
  char *tokentype;         /* Type of terminal symbols in the parser stack */
................................................................................
  char *extracode;         /* Code appended to the generated file */
  char *tokendest;         /* Code to execute to destroy token data */
  char *vardest;           /* Code for the default non-terminal destructor */
  char *filename;          /* Name of the input file */
  char *outname;           /* Name of the current output file */
  char *tokenprefix;       /* A prefix added to token names in the .h file */
  int nconflict;           /* Number of parsing conflicts */


  int tablesize;           /* Size of the parse tables */
  int basisflag;           /* Print only basis configurations */
  int has_fallback;        /* True if any %fallback is seen in the grammar */
  int nolinenosflag;       /* True if #line statements should not be printed */
  char *argv0;             /* Name of the program */
};

#define MemoryCheck(X) if((X)==0){ \
................................................................................
** by the associative array code building program "aagen".
** Do not edit this file!  Instead, edit the specification
** file, then rerun aagen.
*/
/*
** Code for processing tables in the LEMON parser generator.
*/

/* Routines for handling a strings */

char *Strsafe();

void Strsafe_init(/* void */);
int Strsafe_insert(/* char * */);
char *Strsafe_find(/* char * */);

/* Routines for handling symbols of the grammar */

struct symbol *Symbol_new();
int Symbolcmpp(/* struct symbol **, struct symbol ** */);
void Symbol_init(/* void */);
int Symbol_insert(/* struct symbol *, char * */);
struct symbol *Symbol_find(/* char * */);
struct symbol *Symbol_Nth(/* int */);
int Symbol_count(/*  */);
struct symbol **Symbol_arrayof(/*  */);

/* Routines to manage the state table */

int Configcmp(/* struct config *, struct config * */);
struct state *State_new();
void State_init(/* void */);
int State_insert(/* struct state *, struct config * */);
struct state *State_find(/* struct config * */);
struct state **State_arrayof(/*  */);

/* Routines used for efficiency in Configlist_add */

void Configtable_init(/* void */);
int Configtable_insert(/* struct config * */);
struct config *Configtable_find(/* struct config * */);
void Configtable_clear(/* int(*)(struct config *) */);

/****************** From the file "action.c" *******************************/
/*
** Routines processing parser actions in the LEMON parser generator.
*/

/* Allocate a new parser action */
static struct action *Action_new(void){
  static struct action *freelist = 0;
  struct action *new;

  if( freelist==0 ){
    int i;
    int amt = 100;
    freelist = (struct action *)calloc(amt, sizeof(struct action));
    if( freelist==0 ){
      fprintf(stderr,"Unable to allocate memory for a new parser action.");
      exit(1);
    }
    for(i=0; i<amt-1; i++) freelist[i].next = &freelist[i+1];
    freelist[amt-1].next = 0;
  }
  new = freelist;
  freelist = freelist->next;
  return new;
}

/* Compare two actions for sorting purposes.  Return negative, zero, or
** positive if the first action is less than, equal to, or greater than
** the first
*/
static int actioncmp(
................................................................................
  struct action *ap2
){
  int rc;
  rc = ap1->sp->index - ap2->sp->index;
  if( rc==0 ){
    rc = (int)ap1->type - (int)ap2->type;
  }
  if( rc==0 && ap1->type==REDUCE ){
    rc = ap1->x.rp->index - ap2->x.rp->index;
  }



  return rc;
}

/* Sort parser actions */
static struct action *Action_sort(
  struct action *ap
){
  ap = (struct action *)msort((char *)ap,(char **)&ap->next,
                              (int(*)(const char*,const char*))actioncmp);
  return ap;
}

void Action_add(app,type,sp,arg)
struct action **app;
enum e_action type;
struct symbol *sp;
char *arg;

{
  struct action *new;
  new = Action_new();
  new->next = *app;
  *app = new;
  new->type = type;
  new->sp = sp;

  if( type==SHIFT ){
    new->x.stp = (struct state *)arg;
  }else{
    new->x.rp = (struct rule *)arg;
  }
}
/********************** New code to implement the "acttab" module ***********/
/*
** This module implements routines use to construct the yy_action[] table.
*/

/*
** The state of the yy_action table under construction is an instance of
** the following structure
















*/




typedef struct acttab acttab;
struct acttab {
  int nAction;                 /* Number of used slots in aAction[] */
  int nActionAlloc;            /* Slots allocated for aAction[] */
  struct {
    int lookahead;             /* Value of the lookahead token */
    int action;                /* Action to take on the given lookahead */
  } *aAction,                  /* The yy_action[] table under construction */
    *aLookahead;               /* A single new transaction set */
  int mnLookahead;             /* Minimum aLookahead[].lookahead */
  int mnAction;                /* Action associated with mnLookahead */
  int mxLookahead;             /* Maximum aLookahead[].lookahead */
  int nLookahead;              /* Used slots in aLookahead[] */
  int nLookaheadAlloc;         /* Slots allocated in aLookahead[] */


};

/* Return the number of entries in the yy_action table */
#define acttab_size(X) ((X)->nAction)

/* The value for the N-th entry in yy_action */
#define acttab_yyaction(X,N)  ((X)->aAction[N].action)

/* The value for the N-th entry in yy_lookahead */
#define acttab_yylookahead(X,N)  ((X)->aAction[N].lookahead)

................................................................................
void acttab_free(acttab *p){
  free( p->aAction );
  free( p->aLookahead );
  free( p );
}

/* Allocate a new acttab structure */
acttab *acttab_alloc(void){
  acttab *p = calloc( 1, sizeof(*p) );
  if( p==0 ){
    fprintf(stderr,"Unable to allocate memory for a new acttab.");
    exit(1);
  }
  memset(p, 0, sizeof(*p));


  return p;
}

/* Add a new action to the current transaction set



*/
void acttab_action(acttab *p, int lookahead, int action){
  if( p->nLookahead>=p->nLookaheadAlloc ){
    p->nLookaheadAlloc += 25;
    p->aLookahead = realloc( p->aLookahead,
                             sizeof(p->aLookahead[0])*p->nLookaheadAlloc );
    if( p->aLookahead==0 ){
      fprintf(stderr,"malloc failed\n");
      exit(1);
    }
  }
  if( p->nLookahead==0 ){
................................................................................

/*
** Add the transaction set built up with prior calls to acttab_action()
** into the current action table.  Then reset the transaction set back
** to an empty set in preparation for a new round of acttab_action() calls.
**
** Return the offset into the action table of the new transaction.








*/
int acttab_insert(acttab *p){
  int i, j, k, n;
  assert( p->nLookahead>0 );

  /* Make sure we have enough space to hold the expanded action table
  ** in the worst case.  The worst case occurs if the transaction set
  ** must be appended to the current action table
  */
  n = p->mxLookahead + 1;
  if( p->nAction + n >= p->nActionAlloc ){
    int oldAlloc = p->nActionAlloc;
    p->nActionAlloc = p->nAction + n + p->nActionAlloc + 20;
    p->aAction = realloc( p->aAction,
                          sizeof(p->aAction[0])*p->nActionAlloc);
    if( p->aAction==0 ){
      fprintf(stderr,"malloc failed\n");
      exit(1);
    }
    for(i=oldAlloc; i<p->nActionAlloc; i++){
      p->aAction[i].lookahead = -1;
      p->aAction[i].action = -1;
    }
  }

  /* Scan the existing action table looking for an offset where we can
  ** insert the current transaction set.  Fall out of the loop when that
  ** offset is found.  In the worst case, we fall out of the loop when
  ** i reaches p->nAction, which means we append the new transaction set.
  **
  ** i is the index in p->aAction[] where p->mnLookahead is inserted.
  */

  for(i=0; i<p->nAction+p->mnLookahead; i++){
    if( p->aAction[i].lookahead<0 ){
      for(j=0; j<p->nLookahead; j++){
        k = p->aLookahead[j].lookahead - p->mnLookahead + i;
        if( k<0 ) break;
        if( p->aAction[k].lookahead>=0 ) break;
      }
      if( j<p->nLookahead ) continue;
      for(j=0; j<p->nAction; j++){
        if( p->aAction[j].lookahead==j+p->mnLookahead-i ) break;
      }
      if( j==p->nAction ){
        break;  /* Fits in empty slots */
      }
    }else if( p->aAction[i].lookahead==p->mnLookahead ){


      if( p->aAction[i].action!=p->mnAction ) continue;
      for(j=0; j<p->nLookahead; j++){
        k = p->aLookahead[j].lookahead - p->mnLookahead + i;
        if( k<0 || k>=p->nAction ) break;
        if( p->aLookahead[j].lookahead!=p->aAction[k].lookahead ) break;
        if( p->aLookahead[j].action!=p->aAction[k].action ) break;
      }
      if( j<p->nLookahead ) continue;



      n = 0;
      for(j=0; j<p->nAction; j++){
        if( p->aAction[j].lookahead<0 ) continue;
        if( p->aAction[j].lookahead==j+p->mnLookahead-i ) n++;
      }
      if( n==p->nLookahead ){
        break;  /* Same as a prior transaction set */
      }
    }
  }




























  /* Insert transaction set at index i. */







  for(j=0; j<p->nLookahead; j++){
    k = p->aLookahead[j].lookahead - p->mnLookahead + i;
    p->aAction[k] = p->aLookahead[j];
    if( k>=p->nAction ) p->nAction = k+1;
  }

  p->nLookahead = 0;

  /* Return the offset that is added to the lookahead in order to get the
  ** index into yy_action of the action */
  return i - p->mnLookahead;
}











/********************** From the file "build.c" *****************************/
/*
** Routines to construction the finite state machine for the LEMON
** parser generator.
*/

/* Find a precedence symbol of every rule in the grammar.
** 
** Those rules which have a precedence symbol coded in the input
** grammar using the "[symbol]" construct will already have the
** rp->precsym field filled.  Other rules take as their precedence
** symbol the first RHS symbol with a defined precedence.  If there
** are not RHS symbols with a defined precedence, the precedence
** symbol field is left blank.
*/
void FindRulePrecedences(xp)
struct lemon *xp;
{
  struct rule *rp;
  for(rp=xp->rule; rp; rp=rp->next){
    if( rp->precsym==0 ){
      int i, j;
      for(i=0; i<rp->nrhs && rp->precsym==0; i++){
        struct symbol *sp = rp->rhs[i];
................................................................................
            if( sp->subsym[j]->prec>=0 ){
              rp->precsym = sp->subsym[j];
              break;
            }
          }
        }else if( sp->prec>=0 ){
          rp->precsym = rp->rhs[i];
	}
      }
    }
  }
  return;
}

/* Find all nonterminals which will generate the empty string.
** Then go back and compute the first sets of every nonterminal.
** The first set is the set of all terminal symbols which can begin
** a string generated by that nonterminal.
*/
void FindFirstSets(lemp)
struct lemon *lemp;
{
  int i, j;
  struct rule *rp;
  int progress;

  for(i=0; i<lemp->nsymbol; i++){
    lemp->symbols[i]->lambda = LEMON_FALSE;
................................................................................

  /* First compute all lambdas */
  do{
    progress = 0;
    for(rp=lemp->rule; rp; rp=rp->next){
      if( rp->lhs->lambda ) continue;
      for(i=0; i<rp->nrhs; i++){
         struct symbol *sp = rp->rhs[i];
         if( sp->type!=TERMINAL || sp->lambda==LEMON_FALSE ) break;

      }
      if( i==rp->nrhs ){
        rp->lhs->lambda = LEMON_TRUE;
        progress = 1;
      }
    }
  }while( progress );
................................................................................
          progress += SetAdd(s1->firstset,s2->index);
          break;
        }else if( s2->type==MULTITERMINAL ){
          for(j=0; j<s2->nsubsym; j++){
            progress += SetAdd(s1->firstset,s2->subsym[j]->index);
          }
          break;
	}else if( s1==s2 ){
          if( s1->lambda==LEMON_FALSE ) break;
	}else{
          progress += SetUnion(s1->firstset,s2->firstset);
          if( s2->lambda==LEMON_FALSE ) break;
	}
      }
    }
  }while( progress );
  return;
}

/* Compute all LR(0) states for the grammar.  Links
** are added to between some states so that the LR(1) follow sets
** can be computed later.
*/
PRIVATE struct state *getstate(/* struct lemon * */);  /* forward reference */
void FindStates(lemp)
struct lemon *lemp;
{
  struct symbol *sp;
  struct rule *rp;

  Configlist_init();

  /* Find the start symbol */
  if( lemp->start ){
    sp = Symbol_find(lemp->start);
    if( sp==0 ){
      ErrorMsg(lemp->filename,0,
"The specified start symbol \"%s\" is not \
in a nonterminal of the grammar.  \"%s\" will be used as the start \
symbol instead.",lemp->start,lemp->rule->lhs->name);
      lemp->errorcnt++;
      sp = lemp->rule->lhs;
    }
  }else{
    sp = lemp->rule->lhs;
  }

  /* Make sure the start symbol doesn't occur on the right-hand side of
  ** any rule.  Report an error if it does.  (YACC would generate a new
  ** start symbol in this case.) */
  for(rp=lemp->rule; rp; rp=rp->next){
    int i;
................................................................................
  (void)getstate(lemp);
  return;
}

/* Return a pointer to a state which is described by the configuration
** list which has been built from calls to Configlist_add.
*/
PRIVATE void buildshifts(/* struct lemon *, struct state * */); /* Forwd ref */
PRIVATE struct state *getstate(lemp)
struct lemon *lemp;
{
  struct config *cfp, *bp;
  struct state *stp;

  /* Extract the sorted basis of the new state.  The basis was constructed
  ** by prior calls to "Configlist_addbasis()". */
  Configlist_sortbasis();
................................................................................
  }
  return stp;
}

/*
** Return true if two symbols are the same.
*/
int same_symbol(a,b)
struct symbol *a;
struct symbol *b;
{
  int i;
  if( a==b ) return 1;
  if( a->type!=MULTITERMINAL ) return 0;
  if( b->type!=MULTITERMINAL ) return 0;
  if( a->nsubsym!=b->nsubsym ) return 0;
  for(i=0; i<a->nsubsym; i++){
................................................................................
  }
  return 1;
}

/* Construct all successor states to the given state.  A "successor"
** state is any state which can be reached by a shift action.
*/
PRIVATE void buildshifts(lemp,stp)
struct lemon *lemp;
struct state *stp;     /* The state from which successors are computed */
{
  struct config *cfp;  /* For looping thru the config closure of "stp" */
  struct config *bcfp; /* For the inner loop on config closure of "stp" */
  struct config *new;  /* */
  struct symbol *sp;   /* Symbol following the dot in configuration "cfp" */
  struct symbol *bsp;  /* Symbol following the dot in configuration "bcfp" */
  struct state *newstp; /* A pointer to a successor state */

  /* Each configuration becomes complete after it contibutes to a successor
  ** state.  Initially, all configurations are incomplete */
  for(cfp=stp->cfp; cfp; cfp=cfp->next) cfp->status = INCOMPLETE;
................................................................................
    ** construction but with the dot shifted one symbol to the right. */
    for(bcfp=cfp; bcfp; bcfp=bcfp->next){
      if( bcfp->status==COMPLETE ) continue;    /* Already used */
      if( bcfp->dot>=bcfp->rp->nrhs ) continue; /* Can't shift this one */
      bsp = bcfp->rp->rhs[bcfp->dot];           /* Get symbol after dot */
      if( !same_symbol(bsp,sp) ) continue;      /* Must be same as for "cfp" */
      bcfp->status = COMPLETE;                  /* Mark this config as used */
      new = Configlist_addbasis(bcfp->rp,bcfp->dot+1);
      Plink_add(&new->bplp,bcfp);
    }

    /* Get a pointer to the state described by the basis configuration set
    ** constructed in the preceding loop */
    newstp = getstate(lemp);

    /* The state "newstp" is reached from the state "stp" by a shift action
................................................................................
    }
  }
}

/*
** Construct the propagation links
*/
void FindLinks(lemp)
struct lemon *lemp;
{
  int i;
  struct config *cfp, *other;
  struct state *stp;
  struct plink *plp;

  /* Housekeeping detail:
................................................................................
}

/* Compute all followsets.
**
** A followset is the set of all symbols which can come immediately
** after a configuration.
*/
void FindFollowSets(lemp)
struct lemon *lemp;
{
  int i;
  struct config *cfp;
  struct plink *plp;
  int progress;
  int change;

  for(i=0; i<lemp->nstate; i++){
    for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
      cfp->status = INCOMPLETE;
    }
  }
  
  do{
    progress = 0;
    for(i=0; i<lemp->nstate; i++){
      for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){
        if( cfp->status==COMPLETE ) continue;
        for(plp=cfp->fplp; plp; plp=plp->next){
          change = SetUnion(plp->cfp->fws,cfp->fws);
          if( change ){
            plp->cfp->status = INCOMPLETE;
            progress = 1;
	  }
	}
        cfp->status = COMPLETE;
      }
    }
  }while( progress );
}

static int resolve_conflict();

/* Compute the reduce actions, and resolve conflicts.
*/
void FindActions(lemp)
struct lemon *lemp;
{
  int i,j;
  struct config *cfp;
  struct state *stp;
  struct symbol *sp;
  struct rule *rp;

  /* Add all of the reduce actions 
  ** A reduce action is added for each element of the followset of
  ** a configuration which has its dot at the extreme right.
  */
  for(i=0; i<lemp->nstate; i++){   /* Loop over all states */
    stp = lemp->sorted[i];
    for(cfp=stp->cfp; cfp; cfp=cfp->next){  /* Loop over all configurations */
      if( cfp->rp->nrhs==cfp->dot ){        /* Is dot at extreme right? */
        for(j=0; j<lemp->nterminal; j++){
          if( SetFind(cfp->fws,j) ){
            /* Add a reduce action to the state "stp" which will reduce by the
            ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */
            Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp);
          }
	}
      }
    }
  }

  /* Add the accepting token */
  if( lemp->start ){
    sp = Symbol_find(lemp->start);
    if( sp==0 ) sp = lemp->rule->lhs;
  }else{
    sp = lemp->rule->lhs;
  }
  /* Add to the first state (which is always the starting state of the
  ** finite state machine) an action to ACCEPT if the lookahead is the
  ** start nonterminal.  */
  Action_add(&lemp->sorted[0]->ap,ACCEPT,sp,0);

  /* Resolve conflicts */
  for(i=0; i<lemp->nstate; i++){
    struct action *ap, *nap;
    struct state *stp;
    stp = lemp->sorted[i];
    /* assert( stp->ap ); */
    stp->ap = Action_sort(stp->ap);
    for(ap=stp->ap; ap && ap->next; ap=ap->next){
      for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){
         /* The two actions "ap" and "nap" have the same lookahead.
         ** Figure out which one should be used */
         lemp->nconflict += resolve_conflict(ap,nap,lemp->errsym);
      }
    }
  }

  /* Report an error for each rule that can never be reduced. */
  for(rp=lemp->rule; rp; rp=rp->next) rp->canReduce = LEMON_FALSE;
  for(i=0; i<lemp->nstate; i++){
................................................................................
**   is not associated with the error rule.  If neither or both
**   actions are associated with an error rule, then try to
**   use precedence to resolve the conflict.
**
** If either action is a SHIFT, then it must be apx.  This
** function won't work if apx->type==REDUCE and apy->type==SHIFT.
*/
static int resolve_conflict(apx,apy,errsym)
struct action *apx;
struct action *apy;
struct symbol *errsym;   /* The error symbol (if defined.  NULL otherwise) */
{
  struct symbol *spx, *spy;
  int errcnt = 0;
  assert( apx->sp==apy->sp );  /* Otherwise there would be no conflict */
  if( apx->type==SHIFT && apy->type==SHIFT ){
    apy->type = SSCONFLICT;
    errcnt++;
  }
................................................................................
  if( apx->type==SHIFT && apy->type==REDUCE ){
    spx = apx->sp;
    spy = apy->x.rp->precsym;
    if( spy==0 || spx->prec<0 || spy->prec<0 ){
      /* Not enough precedence information. */
      apy->type = SRCONFLICT;
      errcnt++;
    }else if( spx->prec>spy->prec ){    /* Lower precedence wins */
      apy->type = RD_RESOLVED;
    }else if( spx->prec<spy->prec ){
      apx->type = SH_RESOLVED;
    }else if( spx->prec==spy->prec && spx->assoc==RIGHT ){ /* Use operator */
      apy->type = RD_RESOLVED;                             /* associativity */
    }else if( spx->prec==spy->prec && spx->assoc==LEFT ){  /* to break tie */
      apx->type = SH_RESOLVED;
    }else{
      assert( spx->prec==spy->prec && spx->assoc==NONE );
      apy->type = SRCONFLICT;
      errcnt++;
    }
  }else if( apx->type==REDUCE && apy->type==REDUCE ){
    spx = apx->x.rp->precsym;
    spy = apy->x.rp->precsym;
    if( spx==0 || spy==0 || spx->prec<0 ||
    spy->prec<0 || spx->prec==spy->prec ){
      apy->type = RRCONFLICT;
................................................................................
      errcnt++;
    }else if( spx->prec>spy->prec ){
      apy->type = RD_RESOLVED;
    }else if( spx->prec<spy->prec ){
      apx->type = RD_RESOLVED;
    }
  }else{
    assert( 
      apx->type==SH_RESOLVED ||
      apx->type==RD_RESOLVED ||
      apx->type==SSCONFLICT ||
      apx->type==SRCONFLICT ||
      apx->type==RRCONFLICT ||
      apy->type==SH_RESOLVED ||
      apy->type==RD_RESOLVED ||
................................................................................
static struct config *freelist = 0;      /* List of free configurations */
static struct config *current = 0;       /* Top of list of configurations */
static struct config **currentend = 0;   /* Last on list of configs */
static struct config *basis = 0;         /* Top of list of basis configs */
static struct config **basisend = 0;     /* End of list of basis configs */

/* Return a pointer to a new configuration */
PRIVATE struct config *newconfig(){
  struct config *new;
  if( freelist==0 ){
    int i;
    int amt = 3;
    freelist = (struct config *)calloc( amt, sizeof(struct config) );
    if( freelist==0 ){
      fprintf(stderr,"Unable to allocate memory for a new configuration.");
      exit(1);
    }
    for(i=0; i<amt-1; i++) freelist[i].next = &freelist[i+1];
    freelist[amt-1].next = 0;
  }
  new = freelist;
  freelist = freelist->next;
  return new;
}

/* The configuration "old" is no longer used */
PRIVATE void deleteconfig(old)
struct config *old;
{
  old->next = freelist;
  freelist = old;
}

/* Initialized the configuration list builder */
void Configlist_init(){
  current = 0;
  currentend = &current;
  basis = 0;
  basisend = &basis;
  Configtable_init();
  return;
}

/* Initialized the configuration list builder */
void Configlist_reset(){
  current = 0;
  currentend = &current;
  basis = 0;
  basisend = &basis;
  Configtable_clear(0);
  return;
}

/* Add another configuration to the configuration list */
struct config *Configlist_add(rp,dot)
struct rule *rp;    /* The rule */
int dot;            /* Index into the RHS of the rule where the dot goes */

{
  struct config *cfp, model;

  assert( currentend!=0 );
  model.rp = rp;
  model.dot = dot;
  cfp = Configtable_find(&model);
  if( cfp==0 ){
................................................................................
    currentend = &cfp->next;
    Configtable_insert(cfp);
  }
  return cfp;
}

/* Add a basis configuration to the configuration list */
struct config *Configlist_addbasis(rp,dot)
struct rule *rp;
int dot;
{
  struct config *cfp, model;

  assert( basisend!=0 );
  assert( currentend!=0 );
  model.rp = rp;
  model.dot = dot;
................................................................................
    basisend = &cfp->bp;
    Configtable_insert(cfp);
  }
  return cfp;
}

/* Compute the closure of the configuration list */
void Configlist_closure(lemp)
struct lemon *lemp;
{
  struct config *cfp, *newcfp;
  struct rule *rp, *newrp;
  struct symbol *sp, *xsp;
  int i, dot;

  assert( currentend!=0 );
................................................................................
            break;
          }else if( xsp->type==MULTITERMINAL ){
            int k;
            for(k=0; k<xsp->nsubsym; k++){
              SetAdd(newcfp->fws, xsp->subsym[k]->index);
            }
            break;
	  }else{
            SetUnion(newcfp->fws,xsp->firstset);
            if( xsp->lambda==LEMON_FALSE ) break;
	  }
	}
        if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp);
      }
    }
  }
  return;
}

/* Sort the configuration list */
void Configlist_sort(){
  current = (struct config *)msort((char *)current,(char **)&(current->next),Configcmp);

  currentend = 0;
  return;
}

/* Sort the basis configuration list */
void Configlist_sortbasis(){
  basis = (struct config *)msort((char *)current,(char **)&(current->bp),Configcmp);

  basisend = 0;
  return;
}

/* Return a pointer to the head of the configuration list and
** reset the list */
struct config *Configlist_return(){
  struct config *old;
  old = current;
  current = 0;
  currentend = 0;
  return old;
}

/* Return a pointer to the head of the configuration list and
** reset the list */
struct config *Configlist_basis(){
  struct config *old;
  old = basis;
  basis = 0;
  basisend = 0;
  return old;
}

/* Free all elements of the given configuration list */
void Configlist_eat(cfp)
struct config *cfp;
{
  struct config *nextcfp;
  for(; cfp; cfp=nextcfp){
    nextcfp = cfp->next;
    assert( cfp->fplp==0 );
    assert( cfp->bplp==0 );
    if( cfp->fws ) SetFree(cfp->fws);
................................................................................
  return;
}
/***************** From the file "error.c" *********************************/
/*
** Code for printing error message.
*/

/* Find a good place to break "msg" so that its length is at least "min"
** but no more than "max".  Make the point as close to max as possible.
*/
static int findbreak(msg,min,max)
char *msg;
int min;
int max;
{
  int i,spot;
  char c;
  for(i=spot=min; i<=max; i++){
    c = msg[i];
    if( c=='\t' ) msg[i] = ' ';
    if( c=='\n' ){ msg[i] = ' '; spot = i; break; }
    if( c==0 ){ spot = i; break; }
    if( c=='-' && i<max-1 ) spot = i+1;
    if( c==' ' ) spot = i;
  }
  return spot;
}

/*
** The error message is split across multiple lines if necessary.  The
** splits occur at a space, if there is a space available near the end
** of the line.
*/
#define ERRMSGSIZE  10000 /* Hope this is big enough.  No way to error check */
#define LINEWIDTH      79 /* Max width of any output line */
#define PREFIXLIMIT    30 /* Max width of the prefix on each line */
void ErrorMsg(const char *filename, int lineno, const char *format, ...){
  char errmsg[ERRMSGSIZE];
  char prefix[PREFIXLIMIT+10];
  int errmsgsize;
  int prefixsize;
  int availablewidth;
  va_list ap;

  int end, restart, base;

  va_start(ap, format);
  /* Prepare a prefix to be prepended to every output line */
  if( lineno>0 ){
    sprintf(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno);
  }else{
    sprintf(prefix,"%.*s: ",PREFIXLIMIT-10,filename);
  }
  prefixsize = lemonStrlen(prefix);
  availablewidth = LINEWIDTH - prefixsize;

  /* Generate the error message */
  vsprintf(errmsg,format,ap);
  va_end(ap);

  errmsgsize = lemonStrlen(errmsg);
  /* Remove trailing '\n's from the error message. */
  while( errmsgsize>0 && errmsg[errmsgsize-1]=='\n' ){
     errmsg[--errmsgsize] = 0;
  }

  /* Print the error message */
  base = 0;
  while( errmsg[base]!=0 ){
    end = restart = findbreak(&errmsg[base],0,availablewidth);
    restart += base;
    while( errmsg[restart]==' ' ) restart++;
    fprintf(stdout,"%s%.*s\n",prefix,end,&errmsg[base]);
    base = restart;
  }
}
/**************** From the file "main.c" ************************************/
/*
** Main program file for the LEMON parser generator.
*/

/* Report an out-of-memory condition and abort.  This function
** is used mostly by the "MemoryCheck" macro in struct.h
*/
void memory_error(){
  fprintf(stderr,"Out of memory.  Aborting...\n");
  exit(1);
}

static int nDefine = 0;      /* Number of -D options on the command line */
static char **azDefine = 0;  /* Name of the -D macros */

/* This routine is called with the argument to each -D command-line option.
** Add the macro defined to the azDefine array.
*/
static void handle_D_option(char *z){
  char **paz;
  nDefine++;
  azDefine = realloc(azDefine, sizeof(azDefine[0])*nDefine);
  if( azDefine==0 ){
    fprintf(stderr,"out of memory\n");
    exit(1);
  }
  paz = &azDefine[nDefine-1];
  *paz = malloc( lemonStrlen(z)+1 );
  if( *paz==0 ){
    fprintf(stderr,"out of memory\n");
    exit(1);
  }
  strcpy(*paz, z);
  for(z=*paz; *z && *z!='='; z++){}
  *z = 0;
}






































































/* The main program.  Parse the command line and do it... */
int main(argc,argv)
int argc;
char **argv;
{
  static int version = 0;
  static int rpflag = 0;
  static int basisflag = 0;
  static int compress = 0;
  static int quiet = 0;
  static int statistics = 0;
  static int mhflag = 0;
  static int nolinenosflag = 0;

  static struct s_options options[] = {
    {OPT_FLAG, "b", (char*)&basisflag, "Print only the basis in report."},
    {OPT_FLAG, "c", (char*)&compress, "Don't compress the action table."},
    {OPT_FSTR, "D", (char*)handle_D_option, "Define an %ifdef macro."},

    {OPT_FLAG, "g", (char*)&rpflag, "Print grammar without actions."},

    {OPT_FLAG, "m", (char*)&mhflag, "Output a makeheaders compatible file."},
    {OPT_FLAG, "l", (char*)&nolinenosflag, "Do not print #line statements."},



    {OPT_FLAG, "q", (char*)&quiet, "(Quiet) Don't print the report file."},

    {OPT_FLAG, "s", (char*)&statistics,
                                   "Print parser stats to standard output."},
    {OPT_FLAG, "x", (char*)&version, "Print the version number."},


    {OPT_FLAG,0,0,0}
  };
  int i;

  struct lemon lem;


  OptInit(argv,options,stderr);
  if( version ){
     printf("Lemon version 1.0\n");
     exit(0); 
  }
  if( OptNArgs()!=1 ){
    fprintf(stderr,"Exactly one filename argument is required.\n");
    exit(1);
  }
  memset(&lem, 0, sizeof(lem));
  lem.errorcnt = 0;
................................................................................
  if( lem.errorcnt ) exit(lem.errorcnt);
  if( lem.nrule==0 ){
    fprintf(stderr,"Empty grammar.\n");
    exit(1);
  }

  /* Count and index the symbols of the grammar */

  lem.nsymbol = Symbol_count();
  Symbol_new("{default}");
  lem.symbols = Symbol_arrayof();
  for(i=0; i<=lem.nsymbol; i++) lem.symbols[i]->index = i;
  qsort(lem.symbols,lem.nsymbol+1,sizeof(struct symbol*),
        (int(*)())Symbolcmpp);
  for(i=0; i<=lem.nsymbol; i++) lem.symbols[i]->index = i;



  for(i=1; isupper(lem.symbols[i]->name[0]); i++);
  lem.nterminal = i;














  /* Generate a reprint of the grammar, if requested on the command line */
  if( rpflag ){
    Reprint(&lem);
  }else{
    /* Initialize the size for all follow and first sets */
    SetSize(lem.nterminal+1);

................................................................................
    /* Compute the action tables */
    FindActions(&lem);

    /* Compress the action tables */
    if( compress==0 ) CompressTables(&lem);

    /* Reorder and renumber the states so that states with fewer choices
    ** occur at the end. */

    ResortStates(&lem);

    /* Generate a report of the parser generated.  (the "y.output" file) */
    if( !quiet ) ReportOutput(&lem);

    /* Generate the source code for the parser */
    ReportTable(&lem, mhflag);

    /* Produce a header file for use by the scanner.  (This step is
    ** omitted if the "-m" option is used because makeheaders will
    ** generate the file for us.) */
    if( !mhflag ) ReportHeader(&lem);
  }
  if( statistics ){
    printf("Parser statistics: %d terminals, %d nonterminals, %d rules\n",

      lem.nterminal, lem.nsymbol - lem.nterminal, lem.nrule);
    printf("                   %d states, %d parser table entries, %d conflicts\n",
      lem.nstate, lem.tablesize, lem.nconflict);






  }
  if( lem.nconflict ){
    fprintf(stderr,"%d parsing conflicts.\n",lem.nconflict);
  }





  exit(lem.errorcnt + lem.nconflict);
  return (lem.errorcnt + lem.nconflict);
}
/******************** From the file "msort.c" *******************************/
/*
** A generic merge-sort program.
**
** USAGE:
** Let "ptr" be a pointer to some structure which is at the head of
................................................................................
** ALGORITHM:
** Merge-sort.
*/

/*
** Return a pointer to the next structure in the linked list.
*/
#define NEXT(A) (*(char**)(((unsigned long)A)+offset))

/*
** Inputs:
**   a:       A sorted, null-terminated linked list.  (May be null).
**   b:       A sorted, null-terminated linked list.  (May be null).
**   cmp:     A pointer to the comparison function.
**   offset:  Offset in the structure to the "next" field.
................................................................................
  char *ptr, *head;

  if( a==0 ){
    head = b;
  }else if( b==0 ){
    head = a;
  }else{
    if( (*cmp)(a,b)<0 ){
      ptr = a;
      a = NEXT(a);
    }else{
      ptr = b;
      b = NEXT(b);
    }
    head = ptr;
    while( a && b ){
      if( (*cmp)(a,b)<0 ){
        NEXT(ptr) = a;
        ptr = a;
        a = NEXT(a);
      }else{
        NEXT(ptr) = b;
        ptr = b;
        b = NEXT(b);
................................................................................
  char **next,
  int (*cmp)(const char*,const char*)
){
  unsigned long offset;
  char *ep;
  char *set[LISTSIZE];
  int i;
  offset = (unsigned long)next - (unsigned long)list;
  for(i=0; i<LISTSIZE; i++) set[i] = 0;
  while( list ){
    ep = list;
    list = NEXT(list);
    NEXT(ep) = 0;
    for(i=0; i<LISTSIZE-1 && set[i]!=0; i++){
      ep = merge(ep,set[i],cmp,offset);
      set[i] = 0;
    }
    set[i] = ep;
  }
  ep = 0;
  for(i=0; i<LISTSIZE; i++) if( set[i] ) ep = merge(ep,set[i],cmp,offset);
  return ep;
}
/************************ From the file "option.c" **************************/
static char **argv;
static struct s_options *op;
static FILE *errstream;

#define ISOPT(X) ((X)[0]=='-'||(X)[0]=='+'||strchr((X),'=')!=0)

/*
** Print the command line with a carrot pointing to the k-th character
** of the n-th field.
*/
static void errline(n,k,err)
int n;
int k;
FILE *err;
{
  int spcnt, i;
  if( argv[0] ) fprintf(err,"%s",argv[0]);
  spcnt = lemonStrlen(argv[0]) + 1;
  for(i=1; i<n && argv[i]; i++){
    fprintf(err," %s",argv[i]);
    spcnt += lemonStrlen(argv[i])+1;
................................................................................
  }
}

/*
** Return the index of the N-th non-switch argument.  Return -1
** if N is out of range.
*/
static int argindex(n)
int n;
{
  int i;
  int dashdash = 0;
  if( argv!=0 && *argv!=0 ){
    for(i=1; argv[i]; i++){
      if( dashdash || !ISOPT(argv[i]) ){
        if( n==0 ) return i;
................................................................................
}

static char emsg[] = "Command line syntax error: ";

/*
** Process a flag command line argument.
*/
static int handleflags(i,err)
int i;
FILE *err;
{
  int v;
  int errcnt = 0;
  int j;
  for(j=0; op[j].label; j++){
    if( strncmp(&argv[i][1],op[j].label,lemonStrlen(op[j].label))==0 ) break;
  }
................................................................................
  v = argv[i][0]=='-' ? 1 : 0;
  if( op[j].label==0 ){
    if( err ){
      fprintf(err,"%sundefined option.\n",emsg);
      errline(i,1,err);
    }
    errcnt++;


  }else if( op[j].type==OPT_FLAG ){
    *((int*)op[j].arg) = v;
  }else if( op[j].type==OPT_FFLAG ){
    (*(void(*)())(op[j].arg))(v);
  }else if( op[j].type==OPT_FSTR ){
    (*(void(*)())(op[j].arg))(&argv[i][2]);
  }else{
    if( err ){
      fprintf(err,"%smissing argument on switch.\n",emsg);
      errline(i,1,err);
    }
    errcnt++;
  }
  return errcnt;
}

/*
** Process a command line switch which has an argument.
*/
static int handleswitch(i,err)
int i;
FILE *err;
{
  int lv = 0;
  double dv = 0.0;
  char *sv = 0, *end;
  char *cp;
  int j;
  int errcnt = 0;
................................................................................
        errcnt++;
        break;
      case OPT_DBL:
      case OPT_FDBL:
        dv = strtod(cp,&end);
        if( *end ){
          if( err ){

            fprintf(err,"%sillegal character in floating-point argument.\n",emsg);

            errline(i,((unsigned long)end)-(unsigned long)argv[i],err);
          }
          errcnt++;
        }
        break;
      case OPT_INT:
      case OPT_FINT:
        lv = strtol(cp,&end,0);
        if( *end ){
          if( err ){
            fprintf(err,"%sillegal character in integer argument.\n",emsg);
            errline(i,((unsigned long)end)-(unsigned long)argv[i],err);
          }
          errcnt++;
        }
        break;
      case OPT_STR:
      case OPT_FSTR:
        sv = cp;
................................................................................
      case OPT_FLAG:
      case OPT_FFLAG:
        break;
      case OPT_DBL:
        *(double*)(op[j].arg) = dv;
        break;
      case OPT_FDBL:
        (*(void(*)())(op[j].arg))(dv);
        break;
      case OPT_INT:
        *(int*)(op[j].arg) = lv;
        break;
      case OPT_FINT:
        (*(void(*)())(op[j].arg))((int)lv);
        break;
      case OPT_STR:
        *(char**)(op[j].arg) = sv;
        break;
      case OPT_FSTR:
        (*(void(*)())(op[j].arg))(sv);
        break;
    }
  }
  return errcnt;
}

int OptInit(a,o,err)
char **a;
struct s_options *o;
FILE *err;
{
  int errcnt = 0;
  argv = a;
  op = o;
  errstream = err;
  if( argv && *argv && op ){
    int i;
................................................................................
    fprintf(err,"Valid command line options for \"%s\" are:\n",*a);
    OptPrint();
    exit(1);
  }
  return 0;
}

int OptNArgs(){
  int cnt = 0;
  int dashdash = 0;
  int i;
  if( argv!=0 && argv[0]!=0 ){
    for(i=1; argv[i]; i++){
      if( dashdash || !ISOPT(argv[i]) ) cnt++;
      if( strcmp(argv[i],"--")==0 ) dashdash = 1;
    }
  }
  return cnt;
}

char *OptArg(n)
int n;
{
  int i;
  i = argindex(n);
  return i>=0 ? argv[i] : 0;
}

void OptErr(n)
int n;
{
  int i;
  i = argindex(n);
  if( i>=0 ) errline(i,0,errstream);
}

void OptPrint(){
  int i;
  int max, len;
  max = 0;
  for(i=0; op[i].label; i++){
    len = lemonStrlen(op[i].label) + 1;
    switch( op[i].type ){
      case OPT_FLAG:
................................................................................
    switch( op[i].type ){
      case OPT_FLAG:
      case OPT_FFLAG:
        fprintf(errstream,"  -%-*s  %s\n",max,op[i].label,op[i].message);
        break;
      case OPT_INT:
      case OPT_FINT:
        fprintf(errstream,"  %s=<integer>%*s  %s\n",op[i].label,
          (int)(max-lemonStrlen(op[i].label)-9),"",op[i].message);
        break;
      case OPT_DBL:
      case OPT_FDBL:
        fprintf(errstream,"  %s=<real>%*s  %s\n",op[i].label,
          (int)(max-lemonStrlen(op[i].label)-6),"",op[i].message);
        break;
      case OPT_STR:
      case OPT_FSTR:
        fprintf(errstream,"  %s=<string>%*s  %s\n",op[i].label,
          (int)(max-lemonStrlen(op[i].label)-8),"",op[i].message);
        break;
    }
  }
}
/*********************** From the file "parse.c" ****************************/
/*
** Input file parser for the LEMON parser generator.
*/

/* The state of the parser */
struct pstate {
  char *filename;       /* Name of the input file */
  int tokenlineno;      /* Linenumber at which current token starts */
  int errorcnt;         /* Number of errors so far */
  char *tokenstart;     /* Text of current token */
  struct lemon *gp;     /* Global state vector */
  enum e_state {
    INITIALIZE,
    WAITING_FOR_DECL_OR_RULE,
    WAITING_FOR_DECL_KEYWORD,
    WAITING_FOR_DECL_ARG,
    WAITING_FOR_PRECEDENCE_SYMBOL,
    WAITING_FOR_ARROW,
    IN_RHS,
    LHS_ALIAS_1,
    LHS_ALIAS_2,
    LHS_ALIAS_3,
    RHS_ALIAS_1,
    RHS_ALIAS_2,
    PRECEDENCE_MARK_1,
    PRECEDENCE_MARK_2,
    RESYNC_AFTER_RULE_ERROR,
    RESYNC_AFTER_DECL_ERROR,
    WAITING_FOR_DESTRUCTOR_SYMBOL,
    WAITING_FOR_DATATYPE_SYMBOL,
    WAITING_FOR_FALLBACK_ID,
    WAITING_FOR_WILDCARD_ID










  } state;                   /* The state of the parser */
  struct symbol *fallback;   /* The fallback token */

  struct symbol *lhs;        /* Left-hand side of current rule */
  char *lhsalias;            /* Alias for the LHS */
  int nrhs;                  /* Number of right-hand side symbols seen */
  struct symbol *rhs[MAXRHS];  /* RHS symbols */
  char *alias[MAXRHS];       /* Aliases for each RHS symbol (or NULL) */
  struct rule *prevrule;     /* Previous rule parsed */
  char *declkeyword;         /* Keyword of a declaration */
  char **declargslot;        /* Where the declaration argument should be put */
  int insertLineMacro;       /* Add #line before declaration insert */
  int *decllinenoslot;       /* Where to write declaration line number */
  enum e_assoc declassoc;    /* Assign this association to decl arguments */
  int preccounter;           /* Assign this precedence to decl arguments */
  struct rule *firstrule;    /* Pointer to first rule in the grammar */
  struct rule *lastrule;     /* Pointer to the most recently parsed rule */
};

/* Parse a single token */
static void parseonetoken(psp)
struct pstate *psp;
{
  char *x;
  x = Strsafe(psp->tokenstart);     /* Save the token permanently */
#if 0
  printf("%s:%d: Token=[%s] state=%d\n",psp->filename,psp->tokenlineno,
    x,psp->state);
#endif
  switch( psp->state ){
    case INITIALIZE:
................................................................................
      psp->preccounter = 0;
      psp->firstrule = psp->lastrule = 0;
      psp->gp->nrule = 0;
      /* Fall thru to next case */
    case WAITING_FOR_DECL_OR_RULE:
      if( x[0]=='%' ){
        psp->state = WAITING_FOR_DECL_KEYWORD;
      }else if( islower(x[0]) ){
        psp->lhs = Symbol_new(x);
        psp->nrhs = 0;
        psp->lhsalias = 0;
        psp->state = WAITING_FOR_ARROW;
      }else if( x[0]=='{' ){
        if( psp->prevrule==0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
"There is no prior rule opon which to attach the code \
fragment which begins on this line.");
          psp->errorcnt++;
	}else if( psp->prevrule->code!=0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
"Code fragment beginning on this line is not the first \
to follow the previous rule.");
          psp->errorcnt++;
        }else{
          psp->prevrule->line = psp->tokenlineno;
          psp->prevrule->code = &x[1];

	}
      }else if( x[0]=='[' ){
        psp->state = PRECEDENCE_MARK_1;
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Token \"%s\" should be either \"%%\" or a nonterminal name.",
          x);
        psp->errorcnt++;
      }
      break;
    case PRECEDENCE_MARK_1:
      if( !isupper(x[0]) ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "The precedence symbol must be a terminal.");
        psp->errorcnt++;
      }else if( psp->prevrule==0 ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "There is no prior rule to assign precedence \"[%s]\".",x);
        psp->errorcnt++;
................................................................................
          "Expected to see a \":\" following the LHS symbol \"%s\".",
          psp->lhs->name);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case LHS_ALIAS_1:
      if( isalpha(x[0]) ){
        psp->lhsalias = x;
        psp->state = LHS_ALIAS_2;
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "\"%s\" is not a valid alias for the LHS \"%s\"\n",
          x,psp->lhs->name);
        psp->errorcnt++;
................................................................................
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case IN_RHS:
      if( x[0]=='.' ){
        struct rule *rp;
        rp = (struct rule *)calloc( sizeof(struct rule) + 
             sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs, 1);
        if( rp==0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Can't allocate enough memory for this rule.");
          psp->errorcnt++;
          psp->prevrule = 0;
	}else{
          int i;
          rp->ruleline = psp->tokenlineno;
          rp->rhs = (struct symbol**)&rp[1];
          rp->rhsalias = (char**)&(rp->rhs[psp->nrhs]);
          for(i=0; i<psp->nrhs; i++){
            rp->rhs[i] = psp->rhs[i];
            rp->rhsalias[i] = psp->alias[i];
	  }
          rp->lhs = psp->lhs;
          rp->lhsalias = psp->lhsalias;
          rp->nrhs = psp->nrhs;
          rp->code = 0;

          rp->precsym = 0;
          rp->index = psp->gp->nrule++;
          rp->nextlhs = rp->lhs->rule;
          rp->lhs->rule = rp;
          rp->next = 0;
          if( psp->firstrule==0 ){
            psp->firstrule = psp->lastrule = rp;
	  }else{
            psp->lastrule->next = rp;
            psp->lastrule = rp;
	  }
          psp->prevrule = rp;
	}
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( isalpha(x[0]) ){
        if( psp->nrhs>=MAXRHS ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Too many symbols on RHS of rule beginning at \"%s\".",
            x);
          psp->errorcnt++;
          psp->state = RESYNC_AFTER_RULE_ERROR;
	}else{
          psp->rhs[psp->nrhs] = Symbol_new(x);
          psp->alias[psp->nrhs] = 0;
          psp->nrhs++;
	}
      }else if( (x[0]=='|' || x[0]=='/') && psp->nrhs>0 ){
        struct symbol *msp = psp->rhs[psp->nrhs-1];
        if( msp->type!=MULTITERMINAL ){
          struct symbol *origsp = msp;
          msp = calloc(1,sizeof(*msp));
          memset(msp, 0, sizeof(*msp));
          msp->type = MULTITERMINAL;
          msp->nsubsym = 1;
          msp->subsym = calloc(1,sizeof(struct symbol*));
          msp->subsym[0] = origsp;
          msp->name = origsp->name;
          psp->rhs[psp->nrhs-1] = msp;
        }
        msp->nsubsym++;

        msp->subsym = realloc(msp->subsym, sizeof(struct symbol*)*msp->nsubsym);
        msp->subsym[msp->nsubsym-1] = Symbol_new(&x[1]);
        if( islower(x[1]) || islower(msp->subsym[0]->name[0]) ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Cannot form a compound containing a non-terminal");
          psp->errorcnt++;
        }
      }else if( x[0]=='(' && psp->nrhs>0 ){
        psp->state = RHS_ALIAS_1;
      }else{
................................................................................
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Illegal character on RHS of rule: \"%s\".",x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case RHS_ALIAS_1:
      if( isalpha(x[0]) ){
        psp->alias[psp->nrhs-1] = x;
        psp->state = RHS_ALIAS_2;
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "\"%s\" is not a valid alias for the RHS symbol \"%s\"\n",
          x,psp->rhs[psp->nrhs-1]->name);
        psp->errorcnt++;
................................................................................
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Missing \")\" following LHS alias name \"%s\".",psp->lhsalias);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_RULE_ERROR;
      }
      break;
    case WAITING_FOR_DECL_KEYWORD:
      if( isalpha(x[0]) ){
        psp->declkeyword = x;
        psp->declargslot = 0;
        psp->decllinenoslot = 0;
        psp->insertLineMacro = 1;
        psp->state = WAITING_FOR_DECL_ARG;
        if( strcmp(x,"name")==0 ){
          psp->declargslot = &(psp->gp->name);
          psp->insertLineMacro = 0;
	}else if( strcmp(x,"include")==0 ){
          psp->declargslot = &(psp->gp->include);
	}else if( strcmp(x,"code")==0 ){
          psp->declargslot = &(psp->gp->extracode);
	}else if( strcmp(x,"token_destructor")==0 ){
          psp->declargslot = &psp->gp->tokendest;
	}else if( strcmp(x,"default_destructor")==0 ){
          psp->declargslot = &psp->gp->vardest;
	}else if( strcmp(x,"token_prefix")==0 ){
          psp->declargslot = &psp->gp->tokenprefix;
          psp->insertLineMacro = 0;
	}else if( strcmp(x,"syntax_error")==0 ){
          psp->declargslot = &(psp->gp->error);
	}else if( strcmp(x,"parse_accept")==0 ){
          psp->declargslot = &(psp->gp->accept);
	}else if( strcmp(x,"parse_failure")==0 ){
          psp->declargslot = &(psp->gp->failure);
	}else if( strcmp(x,"stack_overflow")==0 ){
          psp->declargslot = &(psp->gp->overflow);
        }else if( strcmp(x,"extra_argument")==0 ){
          psp->declargslot = &(psp->gp->arg);
          psp->insertLineMacro = 0;
        }else if( strcmp(x,"token_type")==0 ){
          psp->declargslot = &(psp->gp->tokentype);
          psp->insertLineMacro = 0;
................................................................................
          psp->preccounter++;
          psp->declassoc = RIGHT;
          psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
        }else if( strcmp(x,"nonassoc")==0 ){
          psp->preccounter++;
          psp->declassoc = NONE;
          psp->state = WAITING_FOR_PRECEDENCE_SYMBOL;
	}else if( strcmp(x,"destructor")==0 ){
          psp->state = WAITING_FOR_DESTRUCTOR_SYMBOL;
	}else if( strcmp(x,"type")==0 ){
          psp->state = WAITING_FOR_DATATYPE_SYMBOL;
        }else if( strcmp(x,"fallback")==0 ){
          psp->fallback = 0;
          psp->state = WAITING_FOR_FALLBACK_ID;


        }else if( strcmp(x,"wildcard")==0 ){
          psp->state = WAITING_FOR_WILDCARD_ID;


        }else{
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Unknown declaration keyword: \"%%%s\".",x);
          psp->errorcnt++;
          psp->state = RESYNC_AFTER_DECL_ERROR;
	}
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Illegal declaration keyword: \"%s\".",x);
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }
      break;
    case WAITING_FOR_DESTRUCTOR_SYMBOL:
      if( !isalpha(x[0]) ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Symbol name missing after %destructor keyword");
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }else{
        struct symbol *sp = Symbol_new(x);
        psp->declargslot = &sp->destructor;
        psp->decllinenoslot = &sp->destLineno;
        psp->insertLineMacro = 1;
        psp->state = WAITING_FOR_DECL_ARG;
      }
      break;
    case WAITING_FOR_DATATYPE_SYMBOL:
      if( !isalpha(x[0]) ){
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Symbol name missing after %destructor keyword");
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }else{
        struct symbol *sp = Symbol_new(x);









        psp->declargslot = &sp->datatype;
        psp->insertLineMacro = 0;
        psp->state = WAITING_FOR_DECL_ARG;

      }
      break;
    case WAITING_FOR_PRECEDENCE_SYMBOL:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( isupper(x[0]) ){
        struct symbol *sp;
        sp = Symbol_new(x);
        if( sp->prec>=0 ){
          ErrorMsg(psp->filename,psp->tokenlineno,
            "Symbol \"%s\" has already be given a precedence.",x);
          psp->errorcnt++;
	}else{
          sp->prec = psp->preccounter;
          sp->assoc = psp->declassoc;
	}
      }else{
        ErrorMsg(psp->filename,psp->tokenlineno,
          "Can't assign a precedence to \"%s\".",x);
        psp->errorcnt++;
      }
      break;
    case WAITING_FOR_DECL_ARG:
      if( x[0]=='{' || x[0]=='\"' || isalnum(x[0]) ){
        char *zOld, *zNew, *zBuf, *z;

        int nOld, n, nLine, nNew, nBack;
        int addLineMacro;
        char zLine[50];
        zNew = x;
        if( zNew[0]=='"' || zNew[0]=='{' ) zNew++;
        nNew = lemonStrlen(zNew);
        if( *psp->declargslot ){
          zOld = *psp->declargslot;
................................................................................
        n = nOld + nNew + 20;
        addLineMacro = !psp->gp->nolinenosflag && psp->insertLineMacro &&
                        (psp->decllinenoslot==0 || psp->decllinenoslot[0]!=0);
        if( addLineMacro ){
          for(z=psp->filename, nBack=0; *z; z++){
            if( *z=='\\' ) nBack++;
          }
          sprintf(zLine, "#line %d ", psp->tokenlineno);
          nLine = lemonStrlen(zLine);
          n += nLine + lemonStrlen(psp->filename) + nBack;
        }
        *psp->declargslot = zBuf = realloc(*psp->declargslot, n);
        zBuf += nOld;
        if( addLineMacro ){
          if( nOld && zBuf[-1]!='\n' ){
            *(zBuf++) = '\n';
          }
          memcpy(zBuf, zLine, nLine);
          zBuf += nLine;
          *(zBuf++) = '"';
................................................................................
        psp->errorcnt++;
        psp->state = RESYNC_AFTER_DECL_ERROR;
      }
      break;
    case WAITING_FOR_FALLBACK_ID:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( !isupper(x[0]) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%fallback argument \"%s\" should be a token", x);
        psp->errorcnt++;
      }else{
        struct symbol *sp = Symbol_new(x);
        if( psp->fallback==0 ){
          psp->fallback = sp;
................................................................................
            "More than one fallback assigned to token %s", x);
          psp->errorcnt++;
        }else{
          sp->fallback = psp->fallback;
          psp->gp->has_fallback = 1;
        }
      }




















      break;
    case WAITING_FOR_WILDCARD_ID:
      if( x[0]=='.' ){
        psp->state = WAITING_FOR_DECL_OR_RULE;
      }else if( !isupper(x[0]) ){
        ErrorMsg(psp->filename, psp->tokenlineno,
          "%%wildcard argument \"%s\" should be a token", x);
        psp->errorcnt++;
      }else{
        struct symbol *sp = Symbol_new(x);
        if( psp->gp->wildcard==0 ){
          psp->gp->wildcard = sp;
        }else{
          ErrorMsg(psp->filename, psp->tokenlineno,
            "Extra wildcard to token: %s", x);
          psp->errorcnt++;
        }
      }


































      break;
    case RESYNC_AFTER_RULE_ERROR:
/*      if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
**      break; */
    case RESYNC_AFTER_DECL_ERROR:
      if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE;
      if( x[0]=='%' ) psp->state = WAITING_FOR_DECL_KEYWORD;
................................................................................
  int exclude = 0;
  int start = 0;
  int lineno = 1;
  int start_lineno = 1;
  for(i=0; z[i]; i++){
    if( z[i]=='\n' ) lineno++;
    if( z[i]!='%' || (i>0 && z[i-1]!='\n') ) continue;
    if( strncmp(&z[i],"%endif",6)==0 && isspace(z[i+6]) ){
      if( exclude ){
        exclude--;
        if( exclude==0 ){
          for(j=start; j<i; j++) if( z[j]!='\n' ) z[j] = ' ';
        }
      }
      for(j=i; z[j] && z[j]!='\n'; j++) z[j] = ' ';
    }else if( (strncmp(&z[i],"%ifdef",6)==0 && isspace(z[i+6]))
          || (strncmp(&z[i],"%ifndef",7)==0 && isspace(z[i+7])) ){
      if( exclude ){
        exclude++;
      }else{
        for(j=i+7; isspace(z[j]); j++){}
        for(n=0; z[j+n] && !isspace(z[j+n]); n++){}
        exclude = 1;
        for(k=0; k<nDefine; k++){
          if( strncmp(azDefine[k],&z[j],n)==0 && lemonStrlen(azDefine[k])==n ){
            exclude = 0;
            break;
          }
        }
................................................................................
}

/* In spite of its name, this function is really a scanner.  It read
** in the entire input file (all at once) then tokenizes it.  Each
** token is passed to the function "parseonetoken" which builds all
** the appropriate data structures in the global state vector "gp".
*/
void Parse(gp)
struct lemon *gp;
{
  struct pstate ps;
  FILE *fp;
  char *filebuf;
  int filesize;
  int lineno;
  int c;
  char *cp, *nextcp;
  int startline = 0;

  memset(&ps, '\0', sizeof(ps));
  ps.gp = gp;
................................................................................
    gp->errorcnt++;
    return;
  }
  fseek(fp,0,2);
  filesize = ftell(fp);
  rewind(fp);
  filebuf = (char *)malloc( filesize+1 );
  if( filebuf==0 ){
    ErrorMsg(ps.filename,0,"Can't allocate %d of memory to hold this file.",
      filesize+1);
    gp->errorcnt++;

    return;
  }
  if( fread(filebuf,1,filesize,fp)!=filesize ){
    ErrorMsg(ps.filename,0,"Can't read in all %d bytes of this file.",
      filesize);
    free(filebuf);
    gp->errorcnt++;

    return;
  }
  fclose(fp);
  filebuf[filesize] = 0;

  /* Make an initial pass through the file to handle %ifdef and %ifndef */
  preprocess_input(filebuf);

  /* Now scan the text of the input file */
  lineno = 1;
  for(cp=filebuf; (c= *cp)!=0; ){
    if( c=='\n' ) lineno++;              /* Keep track of the line number */
    if( isspace(c) ){ cp++; continue; }  /* Skip all white space */
    if( c=='/' && cp[1]=='/' ){          /* Skip C++ style comments */
      cp+=2;
      while( (c= *cp)!=0 && c!='\n' ) cp++;
      continue;
    }
    if( c=='/' && cp[1]=='*' ){          /* Skip C style comments */
      cp+=2;
................................................................................
          int prevc;
          cp = &cp[2];
          prevc = 0;
          while( (c= *cp)!=0 && (c!='/' || prevc!='*') ){
            if( c=='\n' ) lineno++;
            prevc = c;
            cp++;
	  }
	}else if( c=='/' && cp[1]=='/' ){  /* Skip C++ style comments too */
          cp = &cp[2];
          while( (c= *cp)!=0 && c!='\n' ) cp++;
          if( c ) lineno++;
	}else if( c=='\'' || c=='\"' ){    /* String a character literals */
          int startchar, prevc;
          startchar = c;
          prevc = 0;
          for(cp++; (c= *cp)!=0 && (c!=startchar || prevc=='\\'); cp++){
            if( c=='\n' ) lineno++;
            if( prevc=='\\' ) prevc = 0;
            else              prevc = c;
	  }
	}
      }
      if( c==0 ){
        ErrorMsg(ps.filename,ps.tokenlineno,
"C code starting on this line is not terminated before the end of the file.");
        ps.errorcnt++;
        nextcp = cp;
      }else{
        nextcp = cp+1;
      }
    }else if( isalnum(c) ){          /* Identifiers */
      while( (c= *cp)!=0 && (isalnum(c) || c=='_') ) cp++;
      nextcp = cp;
    }else if( c==':' && cp[1]==':' && cp[2]=='=' ){ /* The operator "::=" */
      cp += 3;
      nextcp = cp;
    }else if( (c=='/' || c=='|') && isalpha(cp[1]) ){
      cp += 2;
      while( (c = *cp)!=0 && (isalnum(c) || c=='_') ) cp++;
      nextcp = cp;
    }else{                          /* All other (one character) operators */
      cp++;
      nextcp = cp;
    }
    c = *cp;
    *cp = 0;                        /* Null terminate the token */
    parseonetoken(&ps);             /* Parse the token */
    *cp = c;                        /* Restore the buffer */
    cp = nextcp;
  }
  free(filebuf);                    /* Release the buffer after parsing */
  gp->rule = ps.firstrule;
  gp->errorcnt = ps.errorcnt;
}
/*************************** From the file "plink.c" *********************/
................................................................................
/*
** Routines processing configuration follow-set propagation links
** in the LEMON parser generator.
*/
static struct plink *plink_freelist = 0;

/* Allocate a new plink */
struct plink *Plink_new(){
  struct plink *new;

  if( plink_freelist==0 ){
    int i;
    int amt = 100;
    plink_freelist = (struct plink *)calloc( amt, sizeof(struct plink) );
    if( plink_freelist==0 ){
      fprintf(stderr,
      "Unable to allocate memory for a new follow-set propagation link.\n");
      exit(1);
    }
    for(i=0; i<amt-1; i++) plink_freelist[i].next = &plink_freelist[i+1];
    plink_freelist[amt-1].next = 0;
  }
  new = plink_freelist;
  plink_freelist = plink_freelist->next;
  return new;
}

/* Add a plink to a plink list */
void Plink_add(plpp,cfp)
struct plink **plpp;
struct config *cfp;
{
  struct plink *new;
  new = Plink_new();
  new->next = *plpp;
  *plpp = new;
  new->cfp = cfp;
}

/* Transfer every plink on the list "from" to the list "to" */
void Plink_copy(to,from)
struct plink **to;
struct plink *from;
{
  struct plink *nextpl;
  while( from ){
    nextpl = from->next;
    from->next = *to;
    *to = from;
    from = nextpl;
  }
}

/* Delete every plink on the list */
void Plink_delete(plp)
struct plink *plp;
{
  struct plink *nextpl;

  while( plp ){
    nextpl = plp->next;
    plp->next = plink_freelist;
    plink_freelist = plp;
................................................................................
** Procedures for generating reports and tables in the LEMON parser generator.
*/

/* Generate a filename with the given suffix.  Space to hold the
** name comes from malloc() and must be freed by the calling
** function.
*/
PRIVATE char *file_makename(lemp,suffix)
struct lemon *lemp;
char *suffix;
{
  char *name;
  char *cp;

  name = malloc( lemonStrlen(lemp->filename) + lemonStrlen(suffix) + 5 );
  if( name==0 ){
    fprintf(stderr,"Can't allocate space for a filename.\n");
    exit(1);
  }
  strcpy(name,lemp->filename);
  cp = strrchr(name,'.');
  if( cp ) *cp = 0;
  strcat(name,suffix);
  return name;
}

/* Open a file with a name based on the name of the input file,
** but with a different (specified) suffix, and return a pointer
** to the stream */
PRIVATE FILE *file_open(lemp,suffix,mode)
struct lemon *lemp;
char *suffix;
char *mode;

{
  FILE *fp;

  if( lemp->outname ) free(lemp->outname);
  lemp->outname = file_makename(lemp, suffix);
  fp = fopen(lemp->outname,mode);
  if( fp==0 && *mode=='w' ){
    fprintf(stderr,"Can't open file \"%s\".\n",lemp->outname);
    lemp->errorcnt++;
    return 0;
  }
  return fp;
}






















/* Duplicate the input file without comments and without actions 
** on rules */
void Reprint(lemp)
struct lemon *lemp;
{
  struct rule *rp;
  struct symbol *sp;
  int i, j, maxlen, len, ncolumns, skip;
  printf("// Reprint of input file \"%s\".\n// Symbols:\n",lemp->filename);
  maxlen = 10;
  for(i=0; i<lemp->nsymbol; i++){
................................................................................
      sp = lemp->symbols[j];
      assert( sp->index==j );
      printf(" %3d %-*.*s",j,maxlen,maxlen,sp->name);
    }
    printf("\n");
  }
  for(rp=lemp->rule; rp; rp=rp->next){
    printf("%s",rp->lhs->name);
    /*    if( rp->lhsalias ) printf("(%s)",rp->lhsalias); */
    printf(" ::=");
    for(i=0; i<rp->nrhs; i++){
      sp = rp->rhs[i];
      printf(" %s", sp->name);
      if( sp->type==MULTITERMINAL ){
        for(j=1; j<sp->nsubsym; j++){
          printf("|%s", sp->subsym[j]->name);
        }
      }
      /* if( rp->rhsalias[i] ) printf("(%s)",rp->rhsalias[i]); */
    }
    printf(".");
    if( rp->precsym ) printf(" [%s]",rp->precsym->name);
    /* if( rp->code ) printf("\n    %s",rp->code); */
    printf("\n");
  }
}

void ConfigPrint(fp,cfp)
FILE *fp;
struct config *cfp;
{
  struct rule *rp;
  struct symbol *sp;
  int i, j;
  rp = cfp->rp;
  fprintf(fp,"%s ::=",rp->lhs->name);
  for(i=0; i<=rp->nrhs; i++){
    if( i==cfp->dot ) fprintf(fp," *");
    if( i==rp->nrhs ) break;
    sp = rp->rhs[i];
    fprintf(fp," %s", sp->name);
    if( sp->type==MULTITERMINAL ){

      for(j=1; j<sp->nsubsym; j++){
        fprintf(fp,"|%s",sp->subsym[j]->name);
      }


    }
  }
}







/* #define TEST */
#if 0
/* Print a set */
PRIVATE void SetPrint(out,set,lemp)
FILE *out;
char *set;
struct lemon *lemp;
................................................................................
  }
}
#endif

/* Print an action to the given file descriptor.  Return FALSE if
** nothing was actually printed.
*/
int PrintAction(struct action *ap, FILE *fp, int indent){




  int result = 1;
  switch( ap->type ){
    case SHIFT:


      fprintf(fp,"%*s shift  %d",indent,ap->sp->name,ap->x.stp->statenum);
      break;

    case REDUCE:



      fprintf(fp,"%*s reduce %d",indent,ap->sp->name,ap->x.rp->index);
      break;







    case ACCEPT:
      fprintf(fp,"%*s accept",indent,ap->sp->name);
      break;
    case ERROR:
      fprintf(fp,"%*s error",indent,ap->sp->name);
      break;
    case SRCONFLICT:
    case RRCONFLICT:
      fprintf(fp,"%*s reduce %-3d ** Parsing conflict **",
        indent,ap->sp->name,ap->x.rp->index);
      break;
    case SSCONFLICT:
      fprintf(fp,"%*s shift  %d ** Parsing conflict **", 
        indent,ap->sp->name,ap->x.stp->statenum);
      break;
    case SH_RESOLVED:







    case RD_RESOLVED:







    case NOT_USED:
      result = 0;
      break;
  }



  return result;
}

/* Generate the "y.output" log file */
void ReportOutput(lemp)
struct lemon *lemp;
{
  int i;
  struct state *stp;
  struct config *cfp;
  struct action *ap;
  FILE *fp;

  fp = file_open(lemp,".out","wb");
  if( fp==0 ) return;
  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
    fprintf(fp,"State %d:\n",stp->statenum);
    if( lemp->basisflag ) cfp=stp->bp;
    else                  cfp=stp->cfp;
    while( cfp ){
      char buf[20];
      if( cfp->dot==cfp->rp->nrhs ){
        sprintf(buf,"(%d)",cfp->rp->index);
        fprintf(fp,"    %5s ",buf);
      }else{
        fprintf(fp,"          ");
      }
      ConfigPrint(fp,cfp);
      fprintf(fp,"\n");
#if 0
................................................................................
  }
  fclose(fp);
  return;
}

/* Search for the file "name" which is in the same directory as
** the exacutable */
PRIVATE char *pathsearch(argv0,name,modemask)
char *argv0;
char *name;
int modemask;
{
  char *pathlist;
  char *path,*cp;
  char c;

#ifdef __WIN32__
  cp = strrchr(argv0,'\\');
#else
  cp = strrchr(argv0,'/');
#endif
  if( cp ){
    c = *cp;
    *cp = 0;
    path = (char *)malloc( lemonStrlen(argv0) + lemonStrlen(name) + 2 );
    if( path ) sprintf(path,"%s/%s",argv0,name);
    *cp = c;
  }else{
    extern char *getenv();
    pathlist = getenv("PATH");
    if( pathlist==0 ) pathlist = ".:/bin:/usr/bin";

    path = (char *)malloc( lemonStrlen(pathlist)+lemonStrlen(name)+2 );
    if( path!=0 ){


      while( *pathlist ){
        cp = strchr(pathlist,':');
        if( cp==0 ) cp = &pathlist[lemonStrlen(pathlist)];
        c = *cp;
        *cp = 0;
        sprintf(path,"%s/%s",pathlist,name);
        *cp = c;
        if( c==0 ) pathlist = "";
        else pathlist = &cp[1];
        if( access(path,modemask)==0 ) break;
      }

    }
  }
  return path;
}

/* Given an action, compute the integer value for that action
** which is to be put in the action table of the generated machine.
** Return negative if no action should be generated.
*/
PRIVATE int compute_action(lemp,ap)
struct lemon *lemp;
struct action *ap;
{
  int act;
  switch( ap->type ){
    case SHIFT:  act = ap->x.stp->statenum;            break;
    case REDUCE: act = ap->x.rp->index + lemp->nstate; break;











    case ERROR:  act = lemp->nstate + lemp->nrule;     break;
    case ACCEPT: act = lemp->nstate + lemp->nrule + 1; break;
    default:     act = -1; break;
  }
  return act;
}

#define LINESIZE 1000
/* The next cluster of routines are for reading the template file
................................................................................
/* The first function transfers data from "in" to "out" until
** a line is seen which begins with "%%".  The line number is
** tracked.
**
** if name!=0, then any word that begin with "Parse" is changed to
** begin with *name instead.
*/
PRIVATE void tplt_xfer(name,in,out,lineno)
char *name;
FILE *in;
FILE *out;
int *lineno;
{
  int i, iStart;
  char line[LINESIZE];
  while( fgets(line,LINESIZE,in) && (line[0]!='%' || line[1]!='%') ){
    (*lineno)++;
    iStart = 0;
    if( name ){
      for(i=0; line[i]; i++){
        if( line[i]=='P' && strncmp(&line[i],"Parse",5)==0
          && (i==0 || !isalpha(line[i-1]))
        ){
          if( i>iStart ) fprintf(out,"%.*s",i-iStart,&line[iStart]);
          fprintf(out,"%s",name);
          i += 4;
          iStart = i+1;
        }
      }
................................................................................
    }
    fprintf(out,"%s",&line[iStart]);
  }
}

/* The next function finds the template file and opens it, returning
** a pointer to the opened file. */
PRIVATE FILE *tplt_open(lemp)
struct lemon *lemp;
{
  static char templatename[] = "lempar.c";
  char buf[1000];
  FILE *in;
  char *tpltname;
  char *cp;



















  cp = strrchr(lemp->filename,'.');
  if( cp ){
    sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename);
  }else{
    sprintf(buf,"%s.lt",lemp->filename);
  }
  if( access(buf,004)==0 ){
    tpltname = buf;
  }else if( access(templatename,004)==0 ){
    tpltname = templatename;
  }else{
    tpltname = pathsearch(lemp->argv0,templatename,0);
................................................................................
    lemp->errorcnt++;
    return 0;
  }
  return in;
}

/* Print a #line directive line to the output file. */
PRIVATE void tplt_linedir(out,lineno,filename)
FILE *out;
int lineno;
char *filename;
{
  fprintf(out,"#line %d \"",lineno);
  while( *filename ){
    if( *filename == '\\' ) putc('\\',out);
    putc(*filename,out);
    filename++;
  }
  fprintf(out,"\"\n");
}

/* Print a string to the file and keep the linenumber up to date */
PRIVATE void tplt_print(out,lemp,str,lineno)
FILE *out;
struct lemon *lemp;
char *str;
int *lineno;
{
  if( str==0 ) return;
  while( *str ){
    putc(*str,out);
    if( *str=='\n' ) (*lineno)++;
    str++;
  }
  if( str[-1]!='\n' ){
    putc('\n',out);
    (*lineno)++;
  }
  if (!lemp->nolinenosflag) {
    (*lineno)++; tplt_linedir(out,*lineno,lemp->outname); 
  }
  return;
}

/*
** The following routine emits code for the destructor for the
** symbol sp
*/
void emit_destructor_code(out,sp,lemp,lineno)
FILE *out;
struct symbol *sp;
struct lemon *lemp;
int *lineno;

{
 char *cp = 0;

 if( sp->type==TERMINAL ){
   cp = lemp->tokendest;
   if( cp==0 ) return;
   fprintf(out,"{\n"); (*lineno)++;
 }else if( sp->destructor ){
   cp = sp->destructor;
   fprintf(out,"{\n"); (*lineno)++;


   if (!lemp->nolinenosflag) { (*lineno)++; tplt_linedir(out,sp->destLineno,lemp->filename); }

 }else if( lemp->vardest ){
   cp = lemp->vardest;
   if( cp==0 ) return;
   fprintf(out,"{\n"); (*lineno)++;
 }else{
   assert( 0 );  /* Cannot happen */
 }
................................................................................
     cp++;
     continue;
   }
   if( *cp=='\n' ) (*lineno)++;
   fputc(*cp,out);
 }
 fprintf(out,"\n"); (*lineno)++;
 if (!lemp->nolinenosflag) { 
   (*lineno)++; tplt_linedir(out,*lineno,lemp->outname); 
 }
 fprintf(out,"}\n"); (*lineno)++;
 return;
}

/*
** Return TRUE (non-zero) if the given symbol has a destructor.
*/
int has_destructor(sp, lemp)
struct symbol *sp;
struct lemon *lemp;
{
  int ret;
  if( sp->type==TERMINAL ){
    ret = lemp->tokendest!=0;
  }else{
    ret = lemp->vardest!=0 || sp->destructor!=0;
  }
................................................................................
** n bytes of zText are stored.  If n==0 then all of zText up to the first
** \000 terminator is stored.  zText can contain up to two instances of
** %d.  The values of p1 and p2 are written into the first and second
** %d.
**
** If n==-1, then the previous character is overwritten.
*/
PRIVATE char *append_str(char *zText, int n, int p1, int p2){

  static char *z = 0;
  static int alloced = 0;
  static int used = 0;
  int c;
  char zInt[40];

  if( zText==0 ){

    used = 0;
    return z;
  }
  if( n<=0 ){
    if( n<0 ){
      used += n;
      assert( used>=0 );
    }
    n = lemonStrlen(zText);
  }
  if( n+sizeof(zInt)*2+used >= alloced ){
    alloced = n + sizeof(zInt)*2 + used + 200;
    z = realloc(z,  alloced);
  }
  if( z==0 ) return "";
  while( n-- > 0 ){
    c = *(zText++);
    if( c=='%' && n>0 && zText[0]=='d' ){
      sprintf(zInt, "%d", p1);
      p1 = p2;
      strcpy(&z[used], zInt);
      used += lemonStrlen(&z[used]);
      zText++;
      n--;
    }else{
      z[used++] = c;
    }
  }
  z[used] = 0;
  return z;
}

/*
** zCode is a string that is the action associated with a rule.  Expand
** the symbols in this string so that the refer to elements of the parser
** stack.


*/
PRIVATE void translate_code(struct lemon *lemp, struct rule *rp){
  char *cp, *xp;
  int i;



  char lhsused = 0;    /* True if the LHS element has been used */

  char used[MAXRHS];   /* True for each RHS element which is used */



  for(i=0; i<rp->nrhs; i++) used[i] = 0;
  lhsused = 0;

  if( rp->code==0 ){

    rp->code = "\n";
    rp->line = rp->ruleline;



  }










  append_str(0,0,0,0);











































  for(cp=rp->code; *cp; cp++){






    if( isalpha(*cp) && (cp==rp->code || (!isalnum(cp[-1]) && cp[-1]!='_')) ){
      char saved;
      for(xp= &cp[1]; isalnum(*xp) || *xp=='_'; xp++);
      saved = *xp;
      *xp = 0;
      if( rp->lhsalias && strcmp(cp,rp->lhsalias)==0 ){
        append_str("yygotominor.yy%d",0,rp->lhs->dtnum,0);
        cp = xp;
        lhsused = 1;
      }else{
        for(i=0; i<rp->nrhs; i++){
          if( rp->rhsalias[i] && strcmp(cp,rp->rhsalias[i])==0 ){





            if( cp!=rp->code && cp[-1]=='@' ){
              /* If the argument is of the form @X then substituted
              ** the token number of X, not the value of X */
              append_str("yymsp[%d].major",-1,i-rp->nrhs+1,0);
            }else{
              struct symbol *sp = rp->rhs[i];
              int dtnum;
              if( sp->type==MULTITERMINAL ){
................................................................................
        }
      }
      *xp = saved;
    }
    append_str(cp, 1, 0, 0);
  } /* End loop */






  /* Check to make sure the LHS has been used */
  if( rp->lhsalias && !lhsused ){
    ErrorMsg(lemp->filename,rp->ruleline,
      "Label \"%s\" for \"%s(%s)\" is never used.",
        rp->lhsalias,rp->lhs->name,rp->lhsalias);
    lemp->errorcnt++;
  }

  /* Generate destructor code for RHS symbols which are not used in the
  ** reduce code */

  for(i=0; i<rp->nrhs; i++){
    if( rp->rhsalias[i] && !used[i] ){



      ErrorMsg(lemp->filename,rp->ruleline,

















        "Label %s for \"%s(%s)\" is never used.",
        rp->rhsalias[i],rp->rhs[i]->name,rp->rhsalias[i]);
      lemp->errorcnt++;

    }else if( rp->rhsalias[i]==0 ){
      if( has_destructor(rp->rhs[i],lemp) ){
        append_str("  yy_destructor(yypParser,%d,&yymsp[%d].minor);\n", 0,
           rp->rhs[i]->index,i-rp->nrhs+1);
      }else{
        /* No destructor defined for this term */
      }
    }
  }









  if( rp->code ){
    cp = append_str(0,0,0,0);

    rp->code = Strsafe(cp?cp:"");

  }
}



/* 
** Generate code which executes when the rule "rp" is reduced.  Write
** the code to "out".  Make sure lineno stays up-to-date.
*/
PRIVATE void emit_code(out,rp,lemp,lineno)
FILE *out;
struct rule *rp;
struct lemon *lemp;
int *lineno;


{




 char *cp;


 /* Generate code to do the reduce action */
 if( rp->code ){


   if (!lemp->nolinenosflag) { (*lineno)++; tplt_linedir(out,rp->line,lemp->filename); }

   fprintf(out,"{%s",rp->code);
   for(cp=rp->code; *cp; cp++){
     if( *cp=='\n' ) (*lineno)++;
   } /* End loop */
   fprintf(out,"}\n"); (*lineno)++;


   if (!lemp->nolinenosflag) { (*lineno)++; tplt_linedir(out,*lineno,lemp->outname); }









 } /* End if( rp->code ) */



 return;
}

/*
** Print the definition of the union used for the parser's data stack.
** This union contains fields for every possible data type for tokens
** and nonterminals.  In the process of computing and printing this
** union, also set the ".dtnum" field of every terminal and nonterminal
** symbol.
*/
void print_stack_union(out,lemp,plineno,mhflag)
FILE *out;                  /* The output stream */
struct lemon *lemp;         /* The main info structure for this parser */
int *plineno;               /* Pointer to the line number */
int mhflag;                 /* True if generating makeheaders output */

{
  int lineno = *plineno;    /* The line number of the output */
  char **types;             /* A hash table of datatypes */
  int arraysize;            /* Size of the "types" array */
  int maxdtlength;          /* Maximum length of any ".datatype" field. */
  char *stddt;              /* Standardized name for a datatype */
  int i,j;                  /* Loop counters */
  int hash;                 /* For hashing the name of a type */
  char *name;               /* Name of the parser */

  /* Allocate and initialize types[] and allocate stddt[] */
  arraysize = lemp->nsymbol * 2;
  types = (char**)calloc( arraysize, sizeof(char*) );




  for(i=0; i<arraysize; i++) types[i] = 0;
  maxdtlength = 0;
  if( lemp->vartype ){
    maxdtlength = lemonStrlen(lemp->vartype);
  }
  for(i=0; i<lemp->nsymbol; i++){
    int len;
    struct symbol *sp = lemp->symbols[i];
    if( sp->datatype==0 ) continue;
    len = lemonStrlen(sp->datatype);
    if( len>maxdtlength ) maxdtlength = len;
  }
  stddt = (char*)malloc( maxdtlength*2 + 1 );
  if( types==0 || stddt==0 ){
    fprintf(stderr,"Out of memory.\n");
    exit(1);
  }

  /* Build a hash table of datatypes. The ".dtnum" field of each symbol
  ** is filled in with the hash index plus 1.  A ".dtnum" value of 0 is
  ** used for terminal symbols.  If there is no %default_type defined then
................................................................................
    if( sp->type!=NONTERMINAL || (sp->datatype==0 && lemp->vartype==0) ){
      sp->dtnum = 0;
      continue;
    }
    cp = sp->datatype;
    if( cp==0 ) cp = lemp->vartype;
    j = 0;
    while( isspace(*cp) ) cp++;
    while( *cp ) stddt[j++] = *cp++;
    while( j>0 && isspace(stddt[j-1]) ) j--;
    stddt[j] = 0;
    if( lemp->tokentype && strcmp(stddt, lemp->tokentype)==0 ){
      sp->dtnum = 0;
      continue;
    }
    hash = 0;
    for(j=0; stddt[j]; j++){
................................................................................
    hash = (hash & 0x7fffffff)%arraysize;
    while( types[hash] ){
      if( strcmp(types[hash],stddt)==0 ){
        sp->dtnum = hash + 1;
        break;
      }
      hash++;
      if( hash>=arraysize ) hash = 0;
    }
    if( types[hash]==0 ){
      sp->dtnum = hash + 1;
      types[hash] = (char*)malloc( lemonStrlen(stddt)+1 );
      if( types[hash]==0 ){
        fprintf(stderr,"Out of memory.\n");
        exit(1);
      }
      strcpy(types[hash],stddt);
    }
  }

  /* Print out the definition of YYTOKENTYPE and YYMINORTYPE */
  name = lemp->name ? lemp->name : "Parse";
  lineno = *plineno;
  if( mhflag ){ fprintf(out,"#if INTERFACE\n"); lineno++; }
................................................................................
  free(types);
  fprintf(out,"} YYMINORTYPE;\n"); lineno++;
  *plineno = lineno;
}

/*
** Return the name of a C datatype able to represent values between
** lwr and upr, inclusive.

*/
static const char *minimum_size_type(int lwr, int upr){


  if( lwr>=0 ){
    if( upr<=255 ){
      return "unsigned char";

    }else if( upr<65535 ){
      return "unsigned short int";

    }else{
      return "unsigned int";

    }
  }else if( lwr>=-127 && upr<=127 ){
    return "signed char";

  }else if( lwr>=-32767 && upr<32767 ){
    return "short";

  }else{
    return "int";
  }


}

/*
** Each state contains a set of token transaction and a set of
** nonterminal transactions.  Each of these sets makes an instance
** of the following structure.  An array of these structures is used
** to order the creation of entries in the yy_action[] table.
*/
struct axset {
  struct state *stp;   /* A pointer to a state */
  int isTkn;           /* True to use tokens.  False for non-terminals */
  int nAction;         /* Number of actions */

};

/*
** Compare to axset structures for sorting purposes
*/
static int axset_compare(const void *a, const void *b){
  struct axset *p1 = (struct axset*)a;
  struct axset *p2 = (struct axset*)b;

  return p2->nAction - p1->nAction;





}

/*
** Write text on "out" that describes the rule "rp".
*/
static void writeRuleText(FILE *out, struct rule *rp){
  int j;
  fprintf(out,"%s ::=", rp->lhs->name);
  for(j=0; j<rp->nrhs; j++){
    struct symbol *sp = rp->rhs[j];

    fprintf(out," %s", sp->name);

    if( sp->type==MULTITERMINAL ){
      int k;

      for(k=1; k<sp->nsubsym; k++){
        fprintf(out,"|%s",sp->subsym[k]->name);
      }
    }
  }
}


/* Generate C source code for the parser */
void ReportTable(lemp, mhflag)
struct lemon *lemp;
int mhflag;     /* Output in makeheaders format if true */

{
  FILE *out, *in;
  char line[LINESIZE];
  int  lineno;
  struct state *stp;
  struct action *ap;
  struct rule *rp;
  struct acttab *pActtab;
  int i, j, n;


  char *name;
  int mnTknOfst, mxTknOfst;
  int mnNtOfst, mxNtOfst;
  struct axset *ax;








  in = tplt_open(lemp);
  if( in==0 ) return;
  out = file_open(lemp,".c","wb");
  if( out==0 ){
    fclose(in);
    return;
  }
  lineno = 1;
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the include code, if any */
  tplt_print(out,lemp,lemp->include,&lineno);
  if( mhflag ){
    char *name = file_makename(lemp, ".h");
    fprintf(out,"#include \"%s\"\n", name); lineno++;
    free(name);
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate #defines for all tokens */
  if( mhflag ){
    char *prefix;
    fprintf(out,"#if INTERFACE\n"); lineno++;
    if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
    else                    prefix = "";
    for(i=1; i<lemp->nterminal; i++){
      fprintf(out,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
      lineno++;
    }
    fprintf(out,"#endif\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the defines */
  fprintf(out,"#define YYCODETYPE %s\n",
    minimum_size_type(0, lemp->nsymbol+1)); lineno++;
  fprintf(out,"#define YYNOCODE %d\n",lemp->nsymbol+1);  lineno++;
  fprintf(out,"#define YYACTIONTYPE %s\n",
    minimum_size_type(0, lemp->nstate+lemp->nrule+5));  lineno++;
  if( lemp->wildcard ){
    fprintf(out,"#define YYWILDCARD %d\n",
       lemp->wildcard->index); lineno++;
  }
  print_stack_union(out,lemp,&lineno,mhflag);
  fprintf(out, "#ifndef YYSTACKDEPTH\n"); lineno++;
  if( lemp->stacksize ){
................................................................................
  }
  fprintf(out, "#endif\n"); lineno++;
  if( mhflag ){
    fprintf(out,"#if INTERFACE\n"); lineno++;
  }
  name = lemp->name ? lemp->name : "Parse";
  if( lemp->arg && lemp->arg[0] ){
    int i;
    i = lemonStrlen(lemp->arg);
    while( i>=1 && isspace(lemp->arg[i-1]) ) i--;
    while( i>=1 && (isalnum(lemp->arg[i-1]) || lemp->arg[i-1]=='_') ) i--;
    fprintf(out,"#define %sARG_SDECL %s;\n",name,lemp->arg);  lineno++;
    fprintf(out,"#define %sARG_PDECL ,%s\n",name,lemp->arg);  lineno++;
    fprintf(out,"#define %sARG_FETCH %s = yypParser->%s\n",
                 name,lemp->arg,&lemp->arg[i]);  lineno++;
    fprintf(out,"#define %sARG_STORE yypParser->%s = %s\n",
                 name,&lemp->arg[i],&lemp->arg[i]);  lineno++;
  }else{
................................................................................
    fprintf(out,"#define %sARG_PDECL\n",name);  lineno++;
    fprintf(out,"#define %sARG_FETCH\n",name); lineno++;
    fprintf(out,"#define %sARG_STORE\n",name); lineno++;
  }
  if( mhflag ){
    fprintf(out,"#endif\n"); lineno++;
  }
  fprintf(out,"#define YYNSTATE %d\n",lemp->nstate);  lineno++;
  fprintf(out,"#define YYNRULE %d\n",lemp->nrule);  lineno++;
  if( lemp->errsym->useCnt ){
    fprintf(out,"#define YYERRORSYMBOL %d\n",lemp->errsym->index);  lineno++;
    fprintf(out,"#define YYERRSYMDT yy%d\n",lemp->errsym->dtnum);  lineno++;
  }
  if( lemp->has_fallback ){
    fprintf(out,"#define YYFALLBACK 1\n");  lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);


  /* Generate the action table and its associates:
  **
  **  yy_action[]        A single table containing all actions.
  **  yy_lookahead[]     A table containing the lookahead for each entry in
  **                     yy_action.  Used to detect hash collisions.
  **  yy_shift_ofst[]    For each state, the offset into yy_action for
  **                     shifting terminals.
  **  yy_reduce_ofst[]   For each state, the offset into yy_action for
  **                     shifting non-terminals after a reduce.
  **  yy_default[]       Default action for each state.
  */

  /* Compute the actions on all states and count them up */
  ax = calloc(lemp->nstate*2, sizeof(ax[0]));
  if( ax==0 ){
    fprintf(stderr,"malloc failed\n");
    exit(1);
  }
  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
    ax[i*2].stp = stp;
    ax[i*2].isTkn = 1;
    ax[i*2].nAction = stp->nTknAct;
    ax[i*2+1].stp = stp;
    ax[i*2+1].isTkn = 0;
    ax[i*2+1].nAction = stp->nNtAct;
  }
  mxTknOfst = mnTknOfst = 0;
  mxNtOfst = mnNtOfst = 0;


  /* Compute the action table.  In order to try to keep the size of the
  ** action table to a minimum, the heuristic of placing the largest action

  ** sets first is used.
  */
  qsort(ax, lemp->nstate*2, sizeof(ax[0]), axset_compare);
  pActtab = acttab_alloc();
  for(i=0; i<lemp->nstate*2 && ax[i].nAction>0; i++){
    stp = ax[i].stp;
    if( ax[i].isTkn ){
      for(ap=stp->ap; ap; ap=ap->next){
        int action;
        if( ap->sp->index>=lemp->nterminal ) continue;
        action = compute_action(lemp, ap);
        if( action<0 ) continue;
        acttab_action(pActtab, ap->sp->index, action);
      }
      stp->iTknOfst = acttab_insert(pActtab);
      if( stp->iTknOfst<mnTknOfst ) mnTknOfst = stp->iTknOfst;
      if( stp->iTknOfst>mxTknOfst ) mxTknOfst = stp->iTknOfst;
    }else{
      for(ap=stp->ap; ap; ap=ap->next){
        int action;
        if( ap->sp->index<lemp->nterminal ) continue;
        if( ap->sp->index==lemp->nsymbol ) continue;
        action = compute_action(lemp, ap);
        if( action<0 ) continue;
        acttab_action(pActtab, ap->sp->index, action);
      }
      stp->iNtOfst = acttab_insert(pActtab);
      if( stp->iNtOfst<mnNtOfst ) mnNtOfst = stp->iNtOfst;
      if( stp->iNtOfst>mxNtOfst ) mxNtOfst = stp->iNtOfst;
    }




  }






  free(ax);











































  /* Output the yy_action table */



  fprintf(out,"static const YYACTIONTYPE yy_action[] = {\n"); lineno++;
  n = acttab_size(pActtab);
  for(i=j=0; i<n; i++){
    int action = acttab_yyaction(pActtab, i);
    if( action<0 ) action = lemp->nstate + lemp->nrule + 2;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", action);
    if( j==9 || i==n-1 ){
      fprintf(out, "\n"); lineno++;
      j = 0;
    }else{
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the yy_lookahead table */


  fprintf(out,"static const YYCODETYPE yy_lookahead[] = {\n"); lineno++;
  for(i=j=0; i<n; i++){
    int la = acttab_yylookahead(pActtab, i);
    if( la<0 ) la = lemp->nsymbol;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", la);
    if( j==9 || i==n-1 ){
................................................................................
    }else{
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the yy_shift_ofst[] table */
  fprintf(out, "#define YY_SHIFT_USE_DFLT (%d)\n", mnTknOfst-1); lineno++;
  n = lemp->nstate;
  while( n>0 && lemp->sorted[n-1]->iTknOfst==NO_OFFSET ) n--;


  fprintf(out, "#define YY_SHIFT_MAX %d\n", n-1); lineno++;
  fprintf(out, "static const %s yy_shift_ofst[] = {\n", 
          minimum_size_type(mnTknOfst-1, mxTknOfst)); lineno++;


  for(i=j=0; i<n; i++){
    int ofst;
    stp = lemp->sorted[i];
    ofst = stp->iTknOfst;
    if( ofst==NO_OFFSET ) ofst = mnTknOfst - 1;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", ofst);
    if( j==9 || i==n-1 ){
      fprintf(out, "\n"); lineno++;
      j = 0;
    }else{
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the yy_reduce_ofst[] table */
  fprintf(out, "#define YY_REDUCE_USE_DFLT (%d)\n", mnNtOfst-1); lineno++;
  n = lemp->nstate;
  while( n>0 && lemp->sorted[n-1]->iNtOfst==NO_OFFSET ) n--;


  fprintf(out, "#define YY_REDUCE_MAX %d\n", n-1); lineno++;
  fprintf(out, "static const %s yy_reduce_ofst[] = {\n", 
          minimum_size_type(mnNtOfst-1, mxNtOfst)); lineno++;

  for(i=j=0; i<n; i++){
    int ofst;
    stp = lemp->sorted[i];
    ofst = stp->iNtOfst;
    if( ofst==NO_OFFSET ) ofst = mnNtOfst - 1;
    if( j==0 ) fprintf(out," /* %5d */ ", i);
    fprintf(out, " %4d,", ofst);
................................................................................
      j++;
    }
  }
  fprintf(out, "};\n"); lineno++;

  /* Output the default action table */
  fprintf(out, "static const YYACTIONTYPE yy_default[] = {\n"); lineno++;
  n = lemp->nstate;

  for(i=j=0; i<n; i++){
    stp = lemp->sorted[i];
    if( j==0 ) fprintf(out," /* %5d */ ", i);



    fprintf(out, " %4d,", stp->iDflt);

    if( j==9 || i==n-1 ){
      fprintf(out, "\n"); lineno++;
      j = 0;
    }else{
      j++;
    }
  }
................................................................................
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the table of fallback tokens.
  */
  if( lemp->has_fallback ){
    int mx = lemp->nterminal - 1;
    while( mx>0 && lemp->symbols[mx]->fallback==0 ){ mx--; }

    for(i=0; i<=mx; i++){
      struct symbol *p = lemp->symbols[i];
      if( p->fallback==0 ){
        fprintf(out, "    0,  /* %10s => nothing */\n", p->name);
      }else{
        fprintf(out, "  %3d,  /* %10s => %s */\n", p->fallback->index,
          p->name, p->fallback->name);
................................................................................
    }
  }
  tplt_xfer(lemp->name, in, out, &lineno);

  /* Generate a table containing the symbolic name of every symbol
  */
  for(i=0; i<lemp->nsymbol; i++){
    sprintf(line,"\"%s\",",lemp->symbols[i]->name);
    fprintf(out,"  %-15s",line);
    if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; }
  }
  if( (i&3)!=0 ){ fprintf(out,"\n"); lineno++; }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate a table containing a text string that describes every
  ** rule in the rule set of the grammar.  This information is used
  ** when tracing REDUCE actions.
  */
  for(i=0, rp=lemp->rule; rp; rp=rp->next, i++){
    assert( rp->index==i );
    fprintf(out," /* %3d */ \"", i);
    writeRuleText(out, rp);
    fprintf(out,"\",\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which executes every time a symbol is popped from
  ** the stack while processing errors or while destroying the parser. 
  ** (In other words, generate the %destructor actions)
  */
  if( lemp->tokendest ){
    int once = 1;
    for(i=0; i<lemp->nsymbol; i++){
      struct symbol *sp = lemp->symbols[i];
      if( sp==0 || sp->type!=TERMINAL ) continue;
................................................................................
    struct symbol *dflt_sp = 0;
    int once = 1;
    for(i=0; i<lemp->nsymbol; i++){
      struct symbol *sp = lemp->symbols[i];
      if( sp==0 || sp->type==TERMINAL ||
          sp->index<=0 || sp->destructor!=0 ) continue;
      if( once ){
        fprintf(out, "      /* Default NON-TERMINAL Destructor */\n"); lineno++;
        once = 0;
      }
      fprintf(out,"    case %d: /* %s */\n", sp->index, sp->name); lineno++;
      dflt_sp = sp;
    }
    if( dflt_sp!=0 ){
      emit_destructor_code(out,dflt_sp,lemp,&lineno);
    }
    fprintf(out,"      break;\n"); lineno++;
  }
  for(i=0; i<lemp->nsymbol; i++){
    struct symbol *sp = lemp->symbols[i];
    if( sp==0 || sp->type==TERMINAL || sp->destructor==0 ) continue;

    fprintf(out,"    case %d: /* %s */\n", sp->index, sp->name); lineno++;

    /* Combine duplicate destructors into a single case */
    for(j=i+1; j<lemp->nsymbol; j++){
      struct symbol *sp2 = lemp->symbols[j];
      if( sp2 && sp2->type!=TERMINAL && sp2->destructor
          && sp2->dtnum==sp->dtnum
          && strcmp(sp->destructor,sp2->destructor)==0 ){
         fprintf(out,"    case %d: /* %s */\n",
                 sp2->index, sp2->name); lineno++;
         sp2->destructor = 0;
      }
    }

    emit_destructor_code(out,lemp->symbols[i],lemp,&lineno);
    fprintf(out,"      break;\n"); lineno++;
  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which executes whenever the parser stack overflows */
  tplt_print(out,lemp,lemp->overflow,&lineno);
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate the table of rule information 
  **
  ** Note: This code depends on the fact that rules are number
  ** sequentually beginning with 0.
  */
  for(rp=lemp->rule; rp; rp=rp->next){
    fprintf(out,"  { %d, %d },\n",rp->lhs->index,rp->nrhs); lineno++;


  }
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which execution during each REDUCE action */

  for(rp=lemp->rule; rp; rp=rp->next){
    translate_code(lemp, rp);



  }
  /* First output rules other than the default: rule */
  for(rp=lemp->rule; rp; rp=rp->next){
    struct rule *rp2;               /* Other rules with the same action */
    if( rp->code==0 ) continue;
    if( rp->code[0]=='\n' && rp->code[1]==0 ) continue; /* Will be default: */



    fprintf(out,"      case %d: /* ", rp->index);
    writeRuleText(out, rp);
    fprintf(out, " */\n"); lineno++;
    for(rp2=rp->next; rp2; rp2=rp2->next){
      if( rp2->code==rp->code ){

        fprintf(out,"      case %d: /* ", rp2->index);
        writeRuleText(out, rp2);
        fprintf(out," */ yytestcase(yyruleno==%d);\n", rp2->index); lineno++;
        rp2->code = 0;
      }
    }
    emit_code(out,rp,lemp,&lineno);
    fprintf(out,"        break;\n"); lineno++;
    rp->code = 0;
  }
  /* Finally, output the default: rule.  We choose as the default: all
  ** empty actions. */
  fprintf(out,"      default:\n"); lineno++;
  for(rp=lemp->rule; rp; rp=rp->next){
    if( rp->code==0 ) continue;
    assert( rp->code[0]=='\n' && rp->code[1]==0 );
    fprintf(out,"      /* (%d) ", rp->index);
    writeRuleText(out, rp);

    fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp->index); lineno++;




  }
  fprintf(out,"        break;\n"); lineno++;
  tplt_xfer(lemp->name,in,out,&lineno);

  /* Generate code which executes if a parse fails */
  tplt_print(out,lemp,lemp->failure,&lineno);
  tplt_xfer(lemp->name,in,out,&lineno);
................................................................................

  fclose(in);
  fclose(out);
  return;
}

/* Generate a header file for the parser */
void ReportHeader(lemp)
struct lemon *lemp;
{
  FILE *out, *in;
  char *prefix;
  char line[LINESIZE];
  char pattern[LINESIZE];
  int i;

  if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
  else                    prefix = "";
  in = file_open(lemp,".h","rb");
  if( in ){

    for(i=1; i<lemp->nterminal && fgets(line,LINESIZE,in); i++){
      sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);

      if( strcmp(line,pattern) ) break;
    }

    fclose(in);
    if( i==lemp->nterminal ){
      /* No change in the file.  Don't rewrite it. */
      return;
    }
  }
  out = file_open(lemp,".h","wb");
  if( out ){
    for(i=1; i<lemp->nterminal; i++){
      fprintf(out,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
    }
    fclose(out);  
  }
  return;
}

/* Reduce the size of the action tables, if possible, by making use
** of defaults.
**
** In this version, we take the most frequent REDUCE action and make
** it the default.  Except, there is no default if the wildcard token
** is a possible look-ahead.
*/
void CompressTables(lemp)
struct lemon *lemp;
{
  struct state *stp;
  struct action *ap, *ap2;
  struct rule *rp, *rp2, *rbest;
  int nbest, n;
  int i;
  int usesWildcard;

  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
................................................................................
        if( rp2==rp ) n++;
      }
      if( n>nbest ){
        nbest = n;
        rbest = rp;
      }
    }
 
    /* Do not make a default if the number of rules to default
    ** is not at least 1 or if the wildcard token is a possible
    ** lookahead.
    */
    if( nbest<1 || usesWildcard ) continue;


................................................................................
    }
    assert( ap );
    ap->sp = Symbol_new("{default}");
    for(ap=ap->next; ap; ap=ap->next){
      if( ap->type==REDUCE && ap->x.rp==rbest ) ap->type = NOT_USED;
    }
    stp->ap = Action_sort(stp->ap);
























































  }
}


/*
** Compare two states for sorting purposes.  The smaller state is the
** one with the most non-terminal actions.  If they have the same number
................................................................................
  const struct state *pA = *(const struct state**)a;
  const struct state *pB = *(const struct state**)b;
  int n;

  n = pB->nNtAct - pA->nNtAct;
  if( n==0 ){
    n = pB->nTknAct - pA->nTknAct;


  }


  return n;
}


/*
** Renumber and resort states so that states with fewer choices
** occur at the end.  Except, keep state 0 as the first state.
*/
void ResortStates(lemp)
struct lemon *lemp;
{
  int i;
  struct state *stp;
  struct action *ap;

  for(i=0; i<lemp->nstate; i++){
    stp = lemp->sorted[i];
    stp->nTknAct = stp->nNtAct = 0;
    stp->iDflt = lemp->nstate + lemp->nrule;
    stp->iTknOfst = NO_OFFSET;
    stp->iNtOfst = NO_OFFSET;
    for(ap=stp->ap; ap; ap=ap->next){
      if( compute_action(lemp,ap)>=0 ){

        if( ap->sp->index<lemp->nterminal ){
          stp->nTknAct++;
        }else if( ap->sp->index<lemp->nsymbol ){
          stp->nNtAct++;
        }else{
          stp->iDflt = compute_action(lemp, ap);

        }
      }
    }
  }
  qsort(&lemp->sorted[1], lemp->nstate-1, sizeof(lemp->sorted[0]),
        stateResortCompare);
  for(i=0; i<lemp->nstate; i++){
    lemp->sorted[i]->statenum = i;
  }




}


/***************** From the file "set.c" ************************************/
/*
** Set manipulation routines for the LEMON parser generator.
*/

static int size = 0;

/* Set the set size */
void SetSize(n)
int n;
{
  size = n+1;
}

/* Allocate a new set */
char *SetNew(){
  char *s;
  s = (char*)calloc( size, 1);
  if( s==0 ){
    extern void memory_error();
    memory_error();
  }
  return s;
}

/* Deallocate a set */
void SetFree(s)
char *s;
{
  free(s);
}

/* Add a new element to the set.  Return TRUE if the element was added
** and FALSE if it was already there. */
int SetAdd(s,e)
char *s;
int e;
{
  int rv;
  assert( e>=0 && e<size );
  rv = s[e];
  s[e] = 1;
  return !rv;
}

/* Add every element of s2 to s1.  Return TRUE if s1 changes. */
int SetUnion(s1,s2)
char *s1;
char *s2;
{
  int i, progress;
  progress = 0;
  for(i=0; i<size; i++){
    if( s2[i]==0 ) continue;
    if( s1[i]==0 ){
      progress = 1;
................................................................................
** Do not edit this file!  Instead, edit the specification
** file, then rerun aagen.
*/
/*
** Code for processing tables in the LEMON parser generator.
*/

PRIVATE int strhash(x)
char *x;
{
  int h = 0;
  while( *x) h = h*13 + *(x++);
  return h;
}

/* Works like strdup, sort of.  Save a string in malloced memory, but
** keep strings in a table so that the same string is not in more
** than one place.
*/
char *Strsafe(y)
char *y;
{
  char *z;


  if( y==0 ) return 0;
  z = Strsafe_find(y);
  if( z==0 && (z=malloc( lemonStrlen(y)+1 ))!=0 ){
    strcpy(z,y);

    Strsafe_insert(z);
  }
  MemoryCheck(z);
  return z;
}

/* There is one instance of the following structure for each
................................................................................
  struct s_x1node **ht;  /* Hash table for lookups */
};

/* There is one instance of this structure for every data element
** in an associative array of type "x1".
*/
typedef struct s_x1node {
  char *data;                  /* The data */
  struct s_x1node *next;   /* Next entry with the same hash */
  struct s_x1node **from;  /* Previous link */
} x1node;

/* There is only one instance of the array, which is the following */
static struct s_x1 *x1a;

/* Allocate a new associative array */
void Strsafe_init(){
  if( x1a ) return;
  x1a = (struct s_x1*)malloc( sizeof(struct s_x1) );
  if( x1a ){
    x1a->size = 1024;
    x1a->count = 0;
    x1a->tbl = (x1node*)malloc( 
      (sizeof(x1node) + sizeof(x1node*))*1024 );
    if( x1a->tbl==0 ){
      free(x1a);
      x1a = 0;
    }else{
      int i;
      x1a->ht = (x1node**)&(x1a->tbl[1024]);
      for(i=0; i<1024; i++) x1a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */
int Strsafe_insert(data)
char *data;
{
  x1node *np;
  int h;
  int ph;

  if( x1a==0 ) return 0;
  ph = strhash(data);
  h = ph & (x1a->size-1);
  np = x1a->ht[h];
  while( np ){
    if( strcmp(np->data,data)==0 ){
................................................................................
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x1a->count>=x1a->size ){
    /* Need to make the hash table bigger */
    int i,size;
    struct s_x1 array;
    array.size = size = x1a->size*2;
    array.count = x1a->count;
    array.tbl = (x1node*)malloc(
      (sizeof(x1node) + sizeof(x1node*))*size );
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x1node**)&(array.tbl[size]);
    for(i=0; i<size; i++) array.ht[i] = 0;
    for(i=0; i<x1a->count; i++){
      x1node *oldnp, *newnp;
      oldnp = &(x1a->tbl[i]);
      h = strhash(oldnp->data) & (size-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
    }
................................................................................
  x1a->ht[h] = np;
  np->from = &(x1a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
char *Strsafe_find(key)
char *key;
{
  int h;
  x1node *np;

  if( x1a==0 ) return 0;
  h = strhash(key) & (x1a->size-1);
  np = x1a->ht[h];
  while( np ){
    if( strcmp(np->data,key)==0 ) break;
................................................................................
  }
  return np ? np->data : 0;
}

/* Return a pointer to the (terminal or nonterminal) symbol "x".
** Create a new symbol if this is the first time "x" has been seen.
*/
struct symbol *Symbol_new(x)
char *x;
{
  struct symbol *sp;

  sp = Symbol_find(x);
  if( sp==0 ){
    sp = (struct symbol *)calloc(1, sizeof(struct symbol) );
    MemoryCheck(sp);
    sp->name = Strsafe(x);
    sp->type = isupper(*x) ? TERMINAL : NONTERMINAL;
    sp->rule = 0;
    sp->fallback = 0;
    sp->prec = -1;
    sp->assoc = UNK;
    sp->firstset = 0;
    sp->lambda = LEMON_FALSE;
    sp->destructor = 0;
................................................................................
    sp->useCnt = 0;
    Symbol_insert(sp,sp->name);
  }
  sp->useCnt++;
  return sp;
}

/* Compare two symbols for working purposes


**
** Symbols that begin with upper case letters (terminals or tokens)
** must sort before symbols that begin with lower case letters


** (non-terminals).  Other than that, the order does not matter.
**
** We find experimentally that leaving the symbols in their original
** order (the order they appeared in the grammar file) gives the
** smallest parser tables in SQLite.
*/
int Symbolcmpp(struct symbol **a, struct symbol **b){

  int i1 = (**a).index + 10000000*((**a).name[0]>'Z');
  int i2 = (**b).index + 10000000*((**b).name[0]>'Z');
  return i1-i2;



}

/* There is one instance of the following structure for each
** associative array of type "x2".
*/
struct s_x2 {
  int size;               /* The number of available slots. */
................................................................................
  struct s_x2node **ht;  /* Hash table for lookups */
};

/* There is one instance of this structure for every data element
** in an associative array of type "x2".
*/
typedef struct s_x2node {
  struct symbol *data;                  /* The data */
  char *key;                   /* The key */
  struct s_x2node *next;   /* Next entry with the same hash */
  struct s_x2node **from;  /* Previous link */
} x2node;

/* There is only one instance of the array, which is the following */
static struct s_x2 *x2a;

/* Allocate a new associative array */
void Symbol_init(){
  if( x2a ) return;
  x2a = (struct s_x2*)malloc( sizeof(struct s_x2) );
  if( x2a ){
    x2a->size = 128;
    x2a->count = 0;
    x2a->tbl = (x2node*)malloc( 
      (sizeof(x2node) + sizeof(x2node*))*128 );
    if( x2a->tbl==0 ){
      free(x2a);
      x2a = 0;
    }else{
      int i;
      x2a->ht = (x2node**)&(x2a->tbl[128]);
      for(i=0; i<128; i++) x2a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */
int Symbol_insert(data,key)
struct symbol *data;
char *key;
{
  x2node *np;
  int h;
  int ph;

  if( x2a==0 ) return 0;
  ph = strhash(key);
  h = ph & (x2a->size-1);
  np = x2a->ht[h];
  while( np ){
    if( strcmp(np->key,key)==0 ){
................................................................................
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x2a->count>=x2a->size ){
    /* Need to make the hash table bigger */
    int i,size;
    struct s_x2 array;
    array.size = size = x2a->size*2;
    array.count = x2a->count;
    array.tbl = (x2node*)malloc(
      (sizeof(x2node) + sizeof(x2node*))*size );
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x2node**)&(array.tbl[size]);
    for(i=0; i<size; i++) array.ht[i] = 0;
    for(i=0; i<x2a->count; i++){
      x2node *oldnp, *newnp;
      oldnp = &(x2a->tbl[i]);
      h = strhash(oldnp->key) & (size-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->key = oldnp->key;
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
................................................................................
  x2a->ht[h] = np;
  np->from = &(x2a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
struct symbol *Symbol_find(key)
char *key;
{
  int h;
  x2node *np;

  if( x2a==0 ) return 0;
  h = strhash(key) & (x2a->size-1);
  np = x2a->ht[h];
  while( np ){
    if( strcmp(np->key,key)==0 ) break;
    np = np->next;
  }
  return np ? np->data : 0;
}

/* Return the n-th data.  Return NULL if n is out of range. */
struct symbol *Symbol_Nth(n)
int n;
{
  struct symbol *data;
  if( x2a && n>0 && n<=x2a->count ){
    data = x2a->tbl[n-1].data;
  }else{
    data = 0;
  }
................................................................................

/* Return an array of pointers to all data in the table.
** The array is obtained from malloc.  Return NULL if memory allocation
** problems, or if the array is empty. */
struct symbol **Symbol_arrayof()
{
  struct symbol **array;
  int i,size;
  if( x2a==0 ) return 0;
  size = x2a->count;
  array = (struct symbol **)calloc(size, sizeof(struct symbol *));
  if( array ){
    for(i=0; i<size; i++) array[i] = x2a->tbl[i].data;
  }
  return array;
}

/* Compare two configurations */
int Configcmp(a,b)

struct config *a;
struct config *b;
{
  int x;
  x = a->rp->index - b->rp->index;
  if( x==0 ) x = a->dot - b->dot;
  return x;
}

/* Compare two states */
PRIVATE int statecmp(a,b)
struct config *a;
struct config *b;
{
  int rc;
  for(rc=0; rc==0 && a && b;  a=a->bp, b=b->bp){
    rc = a->rp->index - b->rp->index;
    if( rc==0 ) rc = a->dot - b->dot;
  }
  if( rc==0 ){
................................................................................
    if( a ) rc = 1;
    if( b ) rc = -1;
  }
  return rc;
}

/* Hash a state */
PRIVATE int statehash(a)
struct config *a;
{
  int h=0;
  while( a ){
    h = h*571 + a->rp->index*37 + a->dot;
    a = a->bp;
  }
  return h;
}

/* Allocate a new state structure */
struct state *State_new()
{
  struct state *new;
  new = (struct state *)calloc(1, sizeof(struct state) );
  MemoryCheck(new);
  return new;
}

/* There is one instance of the following structure for each
** associative array of type "x3".
*/
struct s_x3 {
  int size;               /* The number of available slots. */
................................................................................
  struct s_x3node **from;  /* Previous link */
} x3node;

/* There is only one instance of the array, which is the following */
static struct s_x3 *x3a;

/* Allocate a new associative array */
void State_init(){
  if( x3a ) return;
  x3a = (struct s_x3*)malloc( sizeof(struct s_x3) );
  if( x3a ){
    x3a->size = 128;
    x3a->count = 0;
    x3a->tbl = (x3node*)malloc( 
      (sizeof(x3node) + sizeof(x3node*))*128 );
    if( x3a->tbl==0 ){
      free(x3a);
      x3a = 0;
    }else{
      int i;
      x3a->ht = (x3node**)&(x3a->tbl[128]);
      for(i=0; i<128; i++) x3a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */
int State_insert(data,key)
struct state *data;
struct config *key;
{
  x3node *np;
  int h;
  int ph;

  if( x3a==0 ) return 0;
  ph = statehash(key);
  h = ph & (x3a->size-1);
  np = x3a->ht[h];
  while( np ){
    if( statecmp(np->key,key)==0 ){
................................................................................
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x3a->count>=x3a->size ){
    /* Need to make the hash table bigger */
    int i,size;
    struct s_x3 array;
    array.size = size = x3a->size*2;
    array.count = x3a->count;
    array.tbl = (x3node*)malloc(
      (sizeof(x3node) + sizeof(x3node*))*size );
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x3node**)&(array.tbl[size]);
    for(i=0; i<size; i++) array.ht[i] = 0;
    for(i=0; i<x3a->count; i++){
      x3node *oldnp, *newnp;
      oldnp = &(x3a->tbl[i]);
      h = statehash(oldnp->key) & (size-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->key = oldnp->key;
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
................................................................................
  x3a->ht[h] = np;
  np->from = &(x3a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
struct state *State_find(key)
struct config *key;
{
  int h;
  x3node *np;

  if( x3a==0 ) return 0;
  h = statehash(key) & (x3a->size-1);
  np = x3a->ht[h];
  while( np ){
    if( statecmp(np->key,key)==0 ) break;
................................................................................
  }
  return np ? np->data : 0;
}

/* Return an array of pointers to all data in the table.
** The array is obtained from malloc.  Return NULL if memory allocation
** problems, or if the array is empty. */
struct state **State_arrayof()
{
  struct state **array;
  int i,size;
  if( x3a==0 ) return 0;
  size = x3a->count;
  array = (struct state **)malloc( sizeof(struct state *)*size );
  if( array ){
    for(i=0; i<size; i++) array[i] = x3a->tbl[i].data;
  }
  return array;
}

/* Hash a configuration */
PRIVATE int confighash(a)
struct config *a;
{
  int h=0;
  h = h*571 + a->rp->index*37 + a->dot;
  return h;
}

/* There is one instance of the following structure for each
** associative array of type "x4".
*/
................................................................................
  struct s_x4node **from;  /* Previous link */
} x4node;

/* There is only one instance of the array, which is the following */
static struct s_x4 *x4a;

/* Allocate a new associative array */
void Configtable_init(){
  if( x4a ) return;
  x4a = (struct s_x4*)malloc( sizeof(struct s_x4) );
  if( x4a ){
    x4a->size = 64;
    x4a->count = 0;
    x4a->tbl = (x4node*)malloc( 
      (sizeof(x4node) + sizeof(x4node*))*64 );
    if( x4a->tbl==0 ){
      free(x4a);
      x4a = 0;
    }else{
      int i;
      x4a->ht = (x4node**)&(x4a->tbl[64]);
      for(i=0; i<64; i++) x4a->ht[i] = 0;
    }
  }
}
/* Insert a new record into the array.  Return TRUE if successful.
** Prior data with the same key is NOT overwritten */
int Configtable_insert(data)
struct config *data;
{
  x4node *np;
  int h;
  int ph;

  if( x4a==0 ) return 0;
  ph = confighash(data);
  h = ph & (x4a->size-1);
  np = x4a->ht[h];
  while( np ){
    if( Configcmp(np->data,data)==0 ){
      /* An existing entry with the same key is found. */
      /* Fail because overwrite is not allows. */
      return 0;
    }
    np = np->next;
  }
  if( x4a->count>=x4a->size ){
    /* Need to make the hash table bigger */
    int i,size;
    struct s_x4 array;
    array.size = size = x4a->size*2;
    array.count = x4a->count;
    array.tbl = (x4node*)malloc(
      (sizeof(x4node) + sizeof(x4node*))*size );
    if( array.tbl==0 ) return 0;  /* Fail due to malloc failure */
    array.ht = (x4node**)&(array.tbl[size]);
    for(i=0; i<size; i++) array.ht[i] = 0;
    for(i=0; i<x4a->count; i++){
      x4node *oldnp, *newnp;
      oldnp = &(x4a->tbl[i]);
      h = confighash(oldnp->data) & (size-1);
      newnp = &(array.tbl[i]);
      if( array.ht[h] ) array.ht[h]->from = &(newnp->next);
      newnp->next = array.ht[h];
      newnp->data = oldnp->data;
      newnp->from = &(array.ht[h]);
      array.ht[h] = newnp;
    }
................................................................................
  x4a->ht[h] = np;
  np->from = &(x4a->ht[h]);
  return 1;
}

/* Return a pointer to data assigned to the given key.  Return NULL
** if no such key. */
struct config *Configtable_find(key)
struct config *key;
{
  int h;
  x4node *np;

  if( x4a==0 ) return 0;
  h = confighash(key) & (x4a->size-1);
  np = x4a->ht[h];
  while( np ){
    if( Configcmp(np->data,key)==0 ) break;
    np = np->next;
  }
  return np ? np->data : 0;
}

/* Remove all data from the table.  Pass each data to the function "f"
** as it is removed.  ("f" may be null to avoid this step.) */
void Configtable_clear(f)
int(*f)(/* struct config * */);
{
  int i;
  if( x4a==0 || x4a->count==0 ) return;
  if( f ) for(i=0; i<x4a->count; i++) (*f)(x4a->tbl[i].data);
  for(i=0; i<x4a->size; i++) x4a->ht[i] = 0;
  x4a->count = 0;
  return;
}

Changes to src/gaiageo/lemon/lemon_src/lempar.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83


84
85
86
87
88
89
90







91
92
93
94
95
96
97
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136


137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
...
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
...
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294

295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360








361
362

363
364
365
366
367
368
369
370

371
372
373
374
375
376
377
...
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400


401
402

403

404
405
406
407
408
409
410
411
412
413

414


415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435







436
437
438
439
440
441
442



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498




499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515

516
517
518
519

520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557

558
559
560
561
562
563
564
565
566
567




568
569
570
571
572
573
574
575
576
577
578
579
580
581

582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599

600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673



674






675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706

707
708
709
710
711
712
713

714
715
716
717
718
719
720
721
722
723
724
725
726








727
728
729
730
731
732

733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782






783
784
785
786
787
788
789
...
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
...
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
...
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882

883
884
885
886






887







888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916

917
918
919
920
921
922
923
924
925
926
...
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961

962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977


978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
...
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/
%%
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
%%
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions


*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
%%
/************* End control #defines *******************************************/








/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
................................................................................
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if

** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.


**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.

**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
%%
/********** End of lemon-generated parsing tables *****************************/


/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
%%
};
#endif /* YYFALLBACK */

................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */
  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */
#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */
#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
%%
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
%%
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];

#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
void ParseInit(void *yypParser){
  yyParser *pParser = (yyParser*)yypParser;
#ifdef YYTRACKMAXSTACKDEPTH
  pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  pParser->yytos = NULL;
  pParser->yystack = NULL;
  pParser->yystksz = 0;
  if( yyGrowStack(pParser) ){
    pParser->yystack = &pParser->yystk0;
    pParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  pParser->yyerrcnt = -1;
#endif
  pParser->yytos = pParser->yystack;
  pParser->yystack[0].stateno = 0;
  pParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ) ParseInit(pParser);
  return pParser;








}
#endif /* Parse_ENGINEALWAYSONSTACK */



/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.

*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
................................................................................
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
%%
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.


*/
static void yy_pop_parser_stack(yyParser *pParser){

  yyStackEntry *yytos;

  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif

  yy_destructor(pParser, yytos->major, &yytos->minor);


}

/*
** Clear all secondary memory allocations from the parser
*/
void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.







*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;



#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.




*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );

    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){

#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */

      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.




*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );
#endif
  i = yy_reduce_ofst[stateno];

  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
   ParseARG_FETCH;

#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
%%
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;



  yyTraceShift(yypParser, yyNewState, "Shift");






}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
%%
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */

  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG

  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */









  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){

      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
%%
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");






}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
................................................................................
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
%%
/************ End %parse_failure code *****************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){
  ParseARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
%%
/************ End %syntax_error code ******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
................................................................................
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
%%
/*********** End %parse_accept code *******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
................................................................................
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){
  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */


  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  yyendofinput = (yymajor==0);






#endif







  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    int stateno = yypParser->yytos->stateno;
    if( stateno < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno-YY_MIN_REDUCE);
    }
  }
#endif

  do{
    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact >= YY_MIN_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;

    }else{
      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
      }
................................................................................
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);
      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{

        while( yypParser->yytos >= yypParser->yystack
            && yymx != YYERRORSYMBOL
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){


          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
................................................................................
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);
      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      if( yyendofinput ){
        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif
  return;
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<


<
<
<
<
<
<
<
<
<
>
>

<
<
<
<

<
>
>
>
>
>
>
>







 







|


|
<

|

|

|


<
<
<

|

|
<

<
>
|
>
>

|


|
>











|
<

<
>

|
|







<
<
<
<







 







<
<
<
<


|










|

|

<

<




<


<







 







|





|












|
<

|

<



<
<
<
<
<
|
<


<
>


|
|


<

<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












|

|
|
|
>
>
>
>
>
>
>
>
|
<
>
|

|
|
|
<
<
<
>







 







|


<

<









>
>

|
>
|
>
|
<
<

|





>
|
>
>


|
<
<
<
<
<
<
<
<
<
<
<
<
|


<
<
<
>
>
>
>
>
>
>





|
|
>
>
>

<
|

<







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






>
>
>
>

|




|

|
<
<
<
<
<
|
<
<
>
|
<
|
|
>










|
<
<





<
<
<
<
<
<
<
|
<



|
<






>
|
|
|
|
<





>
>
>
>







|



|


>



|



|








|

>





|


<

<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|


|

|
|
<



<
|
|



|
|
|
|




|
<
<
<


|
>
>
>
|
>
>
>
>
>
>






|
|









<
<
<
<
<
<



|
<
<



>



|
<
<

>
|
<
<
<
<
<
<
|
|
|
<


>
>
>
>
>
>
>
>
|
|
|
|
|
<
>
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>







 







|


<

<










|


|
<

<







 







|
<
<
<


<

<







 







|
<

<





>

|
<
|
>
>
>
>
>
>

>
>
>
>
>
>
>




<
<
|
<
<
<
<
<





|
|
<
|
<

<

|
<
<
<
>


<







 







|

|







|


>
|
|
|
|
|



|


<
<
<


>
>
|












|







 







|





<
<
<




|
<
<
<
<
<
<
<
<
<
<
<
<


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46


















47
48
49
50
51
52


53
54









55
56
57




58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
..
81
82
83
84
85
86
87
88
89
90
91

92
93
94
95
96
97
98
99



100
101
102
103

104

105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

127

128
129
130
131
132
133
134
135
136
137
138




139
140
141
142
143
144
145
...
150
151
152
153
154
155
156




157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

174

175
176
177
178

179
180

181
182
183
184
185
186
187
...
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236

237
238
239

240
241
242





243

244
245

246
247
248
249
250
251
252

253

254
255
256





































257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282

283
284
285
286
287
288



289
290
291
292
293
294
295
296
...
298
299
300
301
302
303
304
305
306
307

308

309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325


326
327
328
329
330
331
332
333
334
335
336
337
338
339












340
341
342



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

361
362

363
364
365
366
367
368
369
370





































371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389





390


391
392

393
394
395
396
397
398
399
400
401
402
403
404
405
406


407
408
409
410
411







412

413
414
415
416

417
418
419
420
421
422
423
424
425
426
427

428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478

479

480
481
482





















483
484
485
486
487
488
489
490
491
492
493
494
495
496

497
498
499

500
501
502
503
504
505
506
507
508
509
510
511
512
513



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543






544
545
546
547


548
549
550
551
552
553
554
555


556
557
558






559
560
561

562
563
564
565
566
567
568
569
570
571
572
573
574
575
576

577
578
579
580
















581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
...
626
627
628
629
630
631
632
633
634
635

636

637
638
639
640
641
642
643
644
645
646
647
648
649
650

651

652
653
654
655
656
657
658
...
660
661
662
663
664
665
666
667



668
669

670

671
672
673
674
675
676
677
...
693
694
695
696
697
698
699
700

701

702
703
704
705
706
707
708
709

710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728


729





730
731
732
733
734
735
736

737

738

739
740



741
742
743

744
745
746
747
748
749
750
...
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797



798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
...
823
824
825
826
827
828
829
830
831
832
833
834
835



836
837
838
839
840












841
842
/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>
%%
/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
/* 
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands. 
**
** Each symbol here is a terminal symbol in the grammar.
*/
%%
/* Make sure the INTERFACE macro is defined.
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/* The next thing included is series of defines which control
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 terminals
**                       and nonterminals.  "int" is used otherwise.
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
**                       to no legal terminal or nonterminal number.  This
**                       number is used to fill in empty slots of the hash 
**                       table.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       have fall-back values which should be used if the
**                       original value of the token will not parse.
**    YYACTIONTYPE       is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 rules and
**                       states combined.  "int" is used otherwise.
**    ParseTOKENTYPE     is the data type used for minor tokens given 
**                       directly to the parser from the tokenizer.
**    YYMINORTYPE        is the data type used for all minor tokens.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for base tokens is called "yy0".


















**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser


**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar









**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
*/




%%

#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)

/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static const YYMINORTYPE yyzerominor = { 0 };

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
................................................................................
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.

**
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
**
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
**
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**



** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]

**

** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
*/

%%

#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.




*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
%%
};
#endif /* YYFALLBACK */

................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.




*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number */
  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  int yyidx;                    /* Index of top element in stack */
#ifdef YYTRACKMAXSTACKDEPTH
  int yyidxMax;                 /* Maximum value of yyidx */
#endif

  int yyerrcnt;                 /* Shifts left before out of the error */

  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */

#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */

#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
%%
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
%%
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.

*/
static void yyGrowStack(yyParser *p){
  int newSize;

  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;





  pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));

  if( pNew ){
    p->yystack = pNew;

    p->yystksz = newSize;
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
              yyTracePrompt, p->yystksz);
    }
#endif

  }

}
#endif






































/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(size_t)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
  if( pParser ){
    pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
    pParser->yyidxMax = 0;
#endif
#if YYSTACKDEPTH<=0
    pParser->yystack = NULL;
    pParser->yystksz = 0;
    yyGrowStack(pParser);
#endif
  }

  return pParser;
}

/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to



** the value.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
................................................................................
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are not used
    ** inside the C code.
    */

%%

    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
**
** Return the major token number for the symbol popped.
*/
static int yy_pop_parser_stack(yyParser *pParser){
  YYCODETYPE yymajor;
  yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

  if( pParser->yyidx<0 ) return 0;


#ifndef NDEBUG
  if( yyTraceFILE && pParser->yyidx>=0 ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yymajor = yytos->major;
  yy_destructor(pParser, yymajor, &yytos->minor);
  pParser->yyidx--;
  return yymajor;
}

/* 












** Deallocate and destroy a parser.  Destructors are all called for
** all stack elements before shutting the parser down.
**



** Inputs:
** <ul>
** <li>  A pointer to the parser.  This should be a pointer
**       obtained from ParseAlloc.
** <li>  A pointer to a function used to reclaim memory obtained
**       from malloc.
** </ul>
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
  yyParser *pParser = (yyParser*)p;
  if( pParser==0 ) return;
  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  free(pParser->yystack);
#endif

  (*freeProc)((void*)pParser);
}


/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyidxMax;





































}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yystack[pParser->yyidx].stateno;
 
  if( stateno>YY_SHIFT_MAX || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){





    return yy_default[stateno];


  }
  assert( iLookAhead!=YYNOCODE );

  i += iLookAhead;
  if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
    if( iLookAhead>0 ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        return yy_find_shift_action(pParser, iFallback);


      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;







        if( j>=0 && j<YY_SZ_ACTTAB && yy_lookahead[j]==YYWILDCARD ){

#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);

          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
    }
    return yy_default[stateno];
  }else{
    return yy_action[i];
  }

}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_MAX ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_MAX );
#endif
  i = yy_reduce_ofst[stateno];
  assert( i!=YY_REDUCE_USE_DFLT );
  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_SZ_ACTTAB );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
   ParseARG_FETCH;
   yypParser->yyidx--;
#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will execute if the parser
   ** stack every overflows */

%%

   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}






















/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  YYMINORTYPE *yypMinor         /* Pointer to the minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yyidx++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( yypParser->yyidx>yypParser->yyidxMax ){
    yypParser->yyidxMax = yypParser->yyidx;

  }
#endif
#if YYSTACKDEPTH>0 

  if( yypParser->yyidx>=YYSTACKDEPTH ){
    yyStackOverflow(yypParser, yypMinor);
    return;
  }
#else
  if( yypParser->yyidx>=yypParser->yystksz ){
    yyGrowStack(yypParser);
    if( yypParser->yyidx>=yypParser->yystksz ){
      yyStackOverflow(yypParser, yypMinor);
      return;
    }
  }
#endif
  yytos = &yypParser->yystack[yypParser->yyidx];



  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor = *yypMinor;
#ifndef NDEBUG
  if( yyTraceFILE && yypParser->yyidx>0 ){
    int i;
    fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
    fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
    for(i=1; i<=yypParser->yyidx; i++)
      fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
    fprintf(yyTraceFILE,"\n");
  }
#endif
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
  unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
} yyRuleInfo[] = {
%%
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.






*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  int yyruleno                 /* Number of the rule by which to reduce */


){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  yymsp = &yypParser->yystack[yypParser->yyidx];


#ifndef NDEBUG
  if( yyTraceFILE && yyruleno>=0 
        && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){






    fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
      yyRuleName[yyruleno]);
  }

#endif /* NDEBUG */

  /* Silence complaints from purify about yygotominor being uninitialized
  ** in some cases when it is copied into the stack after the following
  ** switch.  yygotominor is uninitialized when a rule reduces that does
  ** not set the value of its left-hand side nonterminal.  Leaving the
  ** value of the nonterminal uninitialized is utterly harmless as long
  ** as the value is never used.  So really the only thing this code
  ** accomplishes is to quieten purify.  
  **
  ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
  ** without this code, their parser segfaults.  I'm not sure what there
  ** parser is doing to make this happen.  This is the second bug report
  ** from wireshark this week.  Clearly they are stressing Lemon in ways
  ** that it has not been previously stressed...  (SQLite ticket #2172)

  */
  /*memset(&yygotominor, 0, sizeof(yygotominor));*/
  yygotominor = yyzerominor;


















  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
%%
  };
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yypParser->yyidx -= yysize;
  yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
  if( yyact < YYNSTATE ){
#ifdef NDEBUG
    /* If we are not debugging and the reduce action popped at least
    ** one element off the stack, then we can push the new element back
    ** onto the stack here, and skip the stack overflow test in yy_shift().
    ** That gives a significant speed improvement. */
    if( yysize ){
      yypParser->yyidx++;
      yymsp -= yysize-1;
      yymsp->stateno = (YYACTIONTYPE)yyact;
      yymsp->major = (YYCODETYPE)yygoto;
      yymsp->minor = yygotominor;
    }else
#endif
    {
      yy_shift(yypParser,yyact,yygoto,&yygotominor);
    }
  }else{
    assert( yyact == YYNSTATE + YYNRULE + 1 );
    yy_accept(yypParser);
  }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
................................................................................
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */

%%

  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  YYMINORTYPE yyminor            /* The minor type of the error token */
){
  ParseARG_FETCH;
#define TOKEN (yyminor.yy0)

%%

  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
................................................................................
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);



  /* Here code is inserted which will be executed whenever the
  ** parser accepts */

%%

  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
................................................................................
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){
  YYMINORTYPE yyminorunion;
  int yyact;            /* The parser action. */

  int yyendofinput;     /* True if we are at the end of input */

#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */

  /* (re)initialize the parser, if necessary */
  yypParser = (yyParser*)yyp;
  if( yypParser->yyidx<0 ){

#if YYSTACKDEPTH<=0
    if( yypParser->yystksz <=0 ){
      /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
      yyminorunion = yyzerominor;
      yyStackOverflow(yypParser, &yyminorunion);
      return;
    }
#endif
    yypParser->yyidx = 0;
    yypParser->yyerrcnt = -1;
    yypParser->yystack[0].stateno = 0;
    yypParser->yystack[0].major = 0;
  }
  yyminorunion.yy0 = yyminor;
  yyendofinput = (yymajor==0);
  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){


    fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);





  }
#endif

  do{
    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact<YYNSTATE ){
      assert( !yyendofinput );  /* Impossible to shift the $ token */

      yy_shift(yypParser,yyact,yymajor,&yyminorunion);

      yypParser->yyerrcnt--;

      yymajor = YYNOCODE;
    }else if( yyact < YYNSTATE + YYNRULE ){



      yy_reduce(yypParser,yyact-YYNSTATE);
    }else{
      assert( yyact == YY_ERROR_ACTION );

#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
      }
................................................................................
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminorunion);
      }
      yymx = yypParser->yystack[yypParser->yyidx].major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion);
        yymajor = YYNOCODE;
      }else{
         while(
          yypParser->yyidx >= 0 &&
          yymx != YYERRORSYMBOL &&
          (yyact = yy_find_reduce_action(
                        yypParser->yystack[yypParser->yyidx].stateno,
                        YYERRORSYMBOL)) >= YYNSTATE
        ){
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yyidx < 0 || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);



          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
          YYMINORTYPE u2;
          u2.YYERRSYMDT = 0;
          yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor,yyminorunion);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
................................................................................
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor,yyminorunion);
      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      if( yyendofinput ){
        yy_parse_failed(yypParser);



      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );












  return;
}

Changes to src/gaiageo/lex.Ewkt.c.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90



91
92








93
94
95
96
97
98
99
100
101
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194





195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

286
287
288
289

290
291

292
293
294
295
296
297
298
299
300
301
302
...
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364

365
366
367
368
369
370
371





372
373
374
375
376
377
378
379
380
381
382
383
384



385
386
387
388
389
390
391
392
393
394
395

396
397
398
399
400
401
402
403
404
405

406
407
408
409
410




411
412
413
414
415
416
417
418
419
420
421
422
423
424
425

426
427
428
429
430
431
432
433



434
435
436
437
438
439
440
441
442
443
444
445




446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504










505
506
507
508
509
510
511
512
513
514
515










516
517
518
519
520
521
522
523
524
525
526
527
528
529
530



531
532
533
534
535
536
537
538
...
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838

839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871

872
873
874
875
876

877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907

908
909

910
911
912

913

914
915
916

917

918


919
920
921

922


923
924
925

926


927
928
929

930


931
932
933

934


935
936
937

938


939




940
941

942


943
944
945

946


947
948
949

950


951
952
953


954

955
956
957


958

959
960
961

962


963
964
965


966

967
968
969


970

971
972
973


974

975
976
977



978
979
980
981
982

983


984
985
986

987
988
989



990
991
992
993
994
995
996
997
998

999
1000
1001
1002
1003
1004
1005

1006
1007
1008
1009
1010
1011
1012
1013
1014
1015

1016
1017
1018

1019
1020
1021
1022
1023
1024
1025
1026
1027

1028
1029
1030
1031

1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045

1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063

1064
1065
1066
1067
1068
1069
1070

1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403












1404
1405
1406
1407
1408
1409

1410
1411
1412

1413
1414

1415
1416
1417
1418
1419
1420

1421
1422
1423
1424
1425
1426
1427
1428

1429
1430

1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459

1460
1461
1462

1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475

1476
1477
1478
1479

1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502

1503
1504
1505

1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516

1517
1518




1519
1520
1521
1522
1523

1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538

1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551

1552
1553
1554

1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581

1582
1583
1584

1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612

1613
1614
1615

1616
1617
1618
1619
1620
1621
1622
1623
1624

1625
1626
1627
1628
1629
1630
1631
1632

1633
1634
1635
1636

1637
1638
1639

1640
1641
1642
1643
1644
1645
1646
1647
1648

1649
1650
1651

1652
1653
1654
1655
1656
1657
1658
1659

1660
1661
1662
1663
1664
1665
1666
1667
1668

1669
1670
1671
1672

1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683


1684
1685
1686
1687
1688
1689
1690
1691
1692
1693

1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719

1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733

1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766

1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
....
1790
1791
1792
1793
1794
1795
1796

1797
1798
1799

1800
1801
1802
1803
1804
1805

1806
1807
1808

1809
1810
1811
1812
1813
1814
1815
1816
1817
1818

1819
1820
1821

1822
1823
1824
1825
1826
1827
1828
1829
1830
1831

1832
1833
1834

1835
1836
1837
1838
1839
1840

1841
1842
1843

1844
1845
1846
1847
1848
1849

1850
1851
1852

1853
1854
1855
1856
1857
1858
1859

1860
1861
1862

1863
1864
1865
1866
1867
1868
1869

1870
1871
1872

1873
1874
1875
1876
1877
1878
1879
1880

1881
1882

1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894

1895
1896
1897

1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911

1912
1913
1914

1915
1916
1917

1918
1919
1920

1921
1922
1923

1924
1925
1926

1927
1928
1929

1930
1931
1932

1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944

1945
1946
1947
1948

1949
1950
1951
1952
1953
1954
1955

1956
1957
1958
1959
1960
1961

1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981

1982
1983
1984
1985
1986


1987
1988

1989
1990
1991
1992
1993
1994
1995

1996
1997
1998
1999
2000
2001

2002
2003
2004

2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035

2036
2037
2038

2039
2040
2041
2042


2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073

2074
2075
2076
2077
2078
2079
2080
2081

2082
2083
2084
2085
2086
2087
2088
2089
2090
2091

2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102

2103
2104
2105
2106
2107
2108
2109
2110
2111

2112
2113

2114
2115
2116
2117
2118
2119
2120
2121
2122

2123
2124
2125
2126
2127



#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;


/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* TODO: this is always defined, so inline it */
#define yyconst const




#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))








#else
#define yynoreturn
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE Ewktrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )






#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via Ewktrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void Ewktrestart (FILE *input_file ,yyscan_t yyscanner );
void Ewkt_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE Ewkt_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void Ewkt_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void Ewkt_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void Ewktpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void Ewktpop_buffer_state (yyscan_t yyscanner );

static void Ewktensure_buffer_stack (yyscan_t yyscanner );
static void Ewkt_load_buffer_state (yyscan_t yyscanner );
static void Ewkt_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );


#define YY_FLUSH_BUFFER Ewkt_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE Ewkt_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );

YY_BUFFER_STATE Ewkt_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE Ewkt_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );


void *Ewktalloc (yy_size_t ,yyscan_t yyscanner );
void *Ewktrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void Ewktfree (void * ,yyscan_t yyscanner );

#define yy_new_buffer Ewkt_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        Ewktensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);

static int yy_get_next_buffer (yyscan_t yyscanner );
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 22
#define YY_END_OF_BUFFER 23
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[150] =
    {   0,
        0,    0,   23,   21,   19,   20,    3,    4,   21,    2,
       21,    1,    1,   21,   21,   21,   21,    1,    1,    1,
        1,    1,    1,    1,    1,    0,    0,    0,    0,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    0,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    0,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    5,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    0,    0,    0,


        0,    6,    0,    1,    1,    1,    1,    0,    0,    0,
        0,    9,    0,    0,    0,    0,    0,   10,    0,    0,
        0,    0,    0,    0,    7,    0,   11,    0,    0,    8,
        0,   12,    0,    0,    0,   15,    0,    0,   16,    0,
        0,    0,   13,    0,   14,    0,   17,   18,    0
    } ;






static yyconst YY_CHAR yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    1,    1,    1,    1,    1,    1,    4,
        5,    1,    6,    7,    8,    9,    1,   10,   10,   10,
       10,   10,   10,   10,   10,   10,   10,    1,    1,    1,
        1,    1,    1,    1,    1,    1,   11,    1,   12,    1,
       13,    1,   14,    1,    1,   15,   16,   17,   18,   19,
        1,   20,   21,   22,   23,    1,    1,    1,   24,    1,
        1,    1,    1,    1,    1,    1,    1,    1,   25,    1,




       26,    1,   27,    1,   28,    1,    1,   29,   30,   31,
       32,   33,    1,   34,   35,   36,   37,    1,    1,    1,
       38,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,


        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst YY_CHAR yy_meta[39] =

    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1




    } ;

static yyconst flex_uint16_t yy_base[150] =
    {   0,
        0,    0,  284,  285,  285,  285,  285,  285,   30,  285,
       32,  273,   34,   33,   33,   25,   31,  272,   41,  271,
       45,   46,  270,   56,   67,   46,   52,   55,   65,   64,
      269,   79,   76,  268,   89,   90,   91,  267,  266,  265,
       75,   80,   82,   90,   84,  103,  100,  264,  263,  262,
      117,  104,  261,  260,  259,  258,  257,  256,  123,  255,
      108,  103,  114,  110,  122,  254,  253,  252,  131,  251,
      250,  249,  248,  137,  247,  246,  245,  244,  243,  242,
      114,  118,  129,  135,  134,  241,  240,  237,  235,  234,
      233,  231,  230,  229,  227,  226,  154,  133,  135,  142,


      139,  285,  142,  109,  105,   71,   42,  136,  147,  146,
      164,  152,  161,  159,  168,  164,  159,  285,  166,  172,
      166,  166,  176,  176,  180,  178,  188,  188,  192,  285,
      188,  285,  192,  199,  198,  197,  204,  199,  285,  195,
      206,  210,  212,  214,  285,  217,  219,  285,  285
    } ;

static yyconst flex_int16_t yy_def[150] =



    {   0,
      149,    1,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,





      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,    0
    } ;

static yyconst flex_uint16_t yy_nxt[324] =
    {   0,
        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        4,    4,   14,    4,   15,   16,    4,    4,   17,    4,
        4,    4,    4,    4,    4,    4,   14,    4,   15,   16,
        4,    4,   17,    4,    4,    4,    4,    4,   18,   19,
       20,   21,   23,   24,   26,   25,   27,   28,   29,   31,
       19,  107,   32,   34,   21,   22,   35,   36,   26,   25,
       27,   28,   29,   41,   23,   24,   32,   25,   42,   43,
       35,   36,   38,   30,   39,   46,   40,   41,   44,   45,
      106,   25,   42,   43,   48,   33,   49,   51,   50,   46,
       61,   62,   44,   45,   53,   56,   54,   57,   55,   58,

       37,   51,   59,   63,   61,   62,   64,   65,   66,   47,
       67,   69,   68,   52,  105,   74,   59,   63,  104,   81,
       64,   65,   71,   82,   72,   69,   73,   83,   78,   74,
       79,   84,   80,   81,   85,   98,   88,   82,   89,   99,
       90,   83,   93,  100,   94,   84,   95,  101,   85,   98,
      102,  103,  108,   99,  109,  110,  111,  100,  112,  113,
      114,  101,  115,   97,  102,  103,  108,  118,  109,  110,
      111,  119,  112,  113,  114,  120,  115,  116,  117,  121,
      122,  118,  123,  124,  125,  119,  126,  127,  128,  120,
      129,  116,  117,  121,  122,  130,  123,  124,  125,  131,

      126,  127,  128,  132,  129,  133,  134,  135,  136,  130,
      137,  138,  139,  131,  140,  141,  142,  132,  143,  133,
      134,  135,  136,  144,  137,  138,  139,  145,  140,  141,
      142,  146,  143,  147,  148,   96,   95,  144,  107,  106,
       92,  145,   91,   90,  105,  146,  104,  147,  148,   87,
       86,   80,   97,   96,   77,   76,   75,   73,   92,   91,
       70,   68,   87,   86,   60,   58,   77,   76,   55,   55,
       75,   50,   50,   70,   40,   40,   60,   52,   47,   37,
       33,   30,   22,  149,    3,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,

      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149
    } ;

static yyconst flex_int16_t yy_chk[324] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    9,    9,
       11,   11,   13,   13,   14,   13,   15,   16,   17,   19,
       19,  107,   19,   21,   21,   22,   21,   22,   14,   13,
       15,   16,   17,   26,   24,   24,   19,   24,   27,   28,
       21,   22,   25,   30,   25,   30,   25,   26,   29,   29,
      106,   24,   27,   28,   32,   33,   32,   33,   32,   30,
       41,   42,   29,   29,   35,   36,   35,   36,   35,   36,











       37,   33,   37,   43,   41,   42,   44,   45,   46,   47,
       46,   47,   46,   52,  105,   52,   37,   43,  104,   61,
       44,   45,   51,   62,   51,   47,   51,   63,   59,   52,
       59,   64,   59,   61,   65,   81,   69,   62,   69,   82,
       69,   63,   74,   83,   74,   64,   74,   83,   65,   81,
       84,   85,   98,   82,   99,  100,  101,   83,  103,  108,
      109,   83,  110,   97,   84,   85,   98,  112,   99,  100,
      101,  113,  103,  108,  109,  114,  110,  111,  111,  115,
      116,  112,  117,  119,  120,  113,  121,  122,  123,  114,
      124,  111,  111,  115,  116,  125,  117,  119,  120,  126,











      121,  122,  123,  127,  124,  128,  129,  131,  133,  125,
      134,  135,  136,  126,  137,  138,  140,  127,  141,  128,
      129,  131,  133,  142,  134,  135,  136,  143,  137,  138,
      140,  144,  141,  146,  147,   96,   95,  142,   94,   93,
       92,  143,   91,   90,   89,  144,   88,  146,  147,   87,
       86,   80,   79,   78,   77,   76,   75,   73,   72,   71,
       70,   68,   67,   66,   60,   58,   57,   56,   55,   54,
       53,   50,   49,   48,   40,   39,   38,   34,   31,   23,
       20,   18,   12,    3,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,

      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
      149,  149,  149



    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct ewkt_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

int Ewktlex_init (yyscan_t* scanner);

int Ewktlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int Ewktlex_destroy (yyscan_t yyscanner );

int Ewktget_debug (yyscan_t yyscanner );

void Ewktset_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE Ewktget_extra (yyscan_t yyscanner );

void Ewktset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *Ewktget_in (yyscan_t yyscanner );

void Ewktset_in  (FILE * _in_str ,yyscan_t yyscanner );

FILE *Ewktget_out (yyscan_t yyscanner );

void Ewktset_out  (FILE * _out_str ,yyscan_t yyscanner );

			int Ewktget_leng (yyscan_t yyscanner );

char *Ewktget_text (yyscan_t yyscanner );

int Ewktget_lineno (yyscan_t yyscanner );

void Ewktset_lineno (int _line_number ,yyscan_t yyscanner );

int Ewktget_column  (yyscan_t yyscanner );

void Ewktset_column (int _column_no ,yyscan_t yyscanner );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int Ewktwrap (yyscan_t yyscanner );
#else
extern int Ewktwrap (yyscan_t yyscanner );
#endif
#endif

#ifndef YY_NO_UNPUT
    
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
#else
static int input (yyscan_t yyscanner );
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {

			Ewktensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				Ewkt_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
		}

		Ewkt_load_buffer_state(yyscanner );
		}

	{

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = yyg->yy_start;
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				yyg->yy_last_accepting_state = yy_current_state;
				yyg->yy_last_accepting_cpos = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )

				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 150 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}

			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 285 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = yyg->yy_hold_char;
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			goto yy_find_action;

case 1:
YY_RULE_SETUP
{ Ewktget_extra(yyscanner)->ewkt_col += (int) strlen(yytext);  Ewktget_extra(yyscanner)->EwktLval.dval = atof(yytext); return EWKT_NUM; }
	YY_BREAK

case 2:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_COMMA; }
	YY_BREAK
case 3:

YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_OPEN_BRACKET; }
	YY_BREAK
case 4:

YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_CLOSE_BRACKET; }


	YY_BREAK
case 5:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POINT; }


	YY_BREAK
case 6:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POINT_M; }


	YY_BREAK
case 7:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_LINESTRING; }


	YY_BREAK
case 8:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_LINESTRING_M; }


	YY_BREAK
case 9:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POLYGON; }


	YY_BREAK




case 10:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_POLYGON_M; }


	YY_BREAK
case 11:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_MULTIPOINT; }


	YY_BREAK
case 12:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_MULTIPOINT_M; }


	YY_BREAK
case 13:
YY_RULE_SETUP


{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_MULTILINESTRING; }

	YY_BREAK
case 14:
YY_RULE_SETUP


{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_MULTILINESTRING_M; }

	YY_BREAK
case 15:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_MULTIPOLYGON; }


	YY_BREAK
case 16:
YY_RULE_SETUP


{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_MULTIPOLYGON_M; }

	YY_BREAK
case 17:
YY_RULE_SETUP


{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_GEOMETRYCOLLECTION; }

	YY_BREAK
case 18:
YY_RULE_SETUP


{ Ewktget_extra(yyscanner)->EwktLval.dval = 0; return EWKT_GEOMETRYCOLLECTION_M; }

	YY_BREAK
case 19:
YY_RULE_SETUP



{ Ewktget_extra(yyscanner)->ewkt_col += (int) strlen(yytext); }               /* ignore but count white space */
	YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->ewkt_col = 0; Ewktget_extra(yyscanner)->ewkt_line++; }


	YY_BREAK
case 21:
YY_RULE_SETUP

{ Ewktget_extra(yyscanner)->ewkt_col += (int) strlen(yytext); return -1; }
	YY_BREAK
case 22:



YY_RULE_SETUP
ECHO;
	YY_BREAK
case YY_STATE_EOF(INITIAL):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */

		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )

			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * Ewktlex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */

			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;

			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */

		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;


			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);


			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
				}
			}


		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( Ewktwrap(yyscanner ) )

					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of Ewktlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = yyg->yytext_ptr;
	yy_size_t number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					Ewktrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			Ewktrestart(yyin  ,yyscanner);
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Ewktrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	yyg->yy_n_chars += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 150 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
{
	int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
	char *yy_cp = yyg->yy_c_buf_p;

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 150 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
	yy_is_jam = (yy_current_state == 149);

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (yyscan_t yyscanner)
#else
    static int input  (yyscan_t yyscanner)
#endif

{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					Ewktrestart(yyin ,yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( Ewktwrap(yyscanner ) )
						return 0;

					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput(yyscanner);
#else
					return input(yyscanner);
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
	yyg->yy_hold_char = *++yyg->yy_c_buf_p;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */













/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */

    void Ewktrestart  (FILE * input_file , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! YY_CURRENT_BUFFER ){

        Ewktensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            Ewkt_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
	}

	Ewkt_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);

	Ewkt_load_buffer_state(yyscanner );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
    void Ewkt_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	/* TODO. We should be able to replace this entire function body
	 * with
	 *		Ewktpop_buffer_state();
	 *		Ewktpush_buffer_state(new_buffer);
     */
	Ewktensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	Ewkt_load_buffer_state(yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (Ewktwrap()) processing, but the only time this flag
	 * is looked at is after Ewktwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}


static void Ewkt_load_buffer_state  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE Ewkt_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) Ewktalloc(sizeof( struct yy_buffer_state ) ,yyscanner );

	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in Ewkt_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) Ewktalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in Ewkt_create_buffer()" );

	b->yy_is_our_buffer = 1;

	Ewkt_init_buffer(b,file ,yyscanner);

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with Ewkt_create_buffer()
 * @param yyscanner The scanner object.
 */

    void Ewkt_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		Ewktfree((void *) b->yy_ch_buf ,yyscanner );

	Ewktfree((void *) b ,yyscanner );

}





/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a Ewktrestart() or at EOF.
 */
    static void Ewkt_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)


{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	Ewkt_flush_buffer(b ,yyscanner);

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then Ewkt_init_buffer was _probably_
     * called from Ewktrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){

        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */

    void Ewkt_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		Ewkt_load_buffer_state(yyscanner );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */

void Ewktpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (new_buffer == NULL)
		return;

	Ewktensure_buffer_stack(yyscanner);

	/* This block is copied from Ewkt_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from Ewkt_switch_to_buffer. */
	Ewkt_load_buffer_state(yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */

void Ewktpop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!YY_CURRENT_BUFFER)
		return;

	Ewkt_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {

		Ewkt_load_buffer_state(yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */

static void Ewktensure_buffer_stack (yyscan_t yyscanner)
{
	int num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if (!yyg->yy_buffer_stack) {


		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		yyg->yy_buffer_stack = (struct yy_buffer_state**)Ewktalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in Ewktensure_buffer_stack()" );
								  
		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));

				
		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){


		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)Ewktrealloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in Ewktensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));

		yyg->yy_buffer_stack_max = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE Ewkt_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)


{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return NULL;

	b = (YY_BUFFER_STATE) Ewktalloc(sizeof( struct yy_buffer_state ) ,yyscanner );

	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in Ewkt_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	Ewkt_switch_to_buffer(b ,yyscanner );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to Ewktlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       Ewkt_scan_bytes() instead.
 */

YY_BUFFER_STATE Ewkt_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
    
	return Ewkt_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to Ewktlex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE Ewkt_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	yy_size_t i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) _yybytes_len + 2;
	buf = (char *) Ewktalloc(n ,yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in Ewkt_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = Ewkt_scan_buffer(buf,n ,yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in Ewkt_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif


static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */

YY_EXTRA_TYPE Ewktget_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */

int Ewktget_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */

int Ewktget_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */

FILE *Ewktget_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */

FILE *Ewktget_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */

int Ewktget_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */


char *Ewktget_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */

void Ewktset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyextra = user_defined ;
}

/** Set the current line number.
 * @param _line_number line number
 * @param yyscanner The scanner object.
 */
void Ewktset_lineno (int  _line_number , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "Ewktset_lineno called with no buffer" );
    
    yylineno = _line_number;
}

/** Set the current column.
 * @param _column_no column number
 * @param yyscanner The scanner object.
 */

void Ewktset_column (int  _column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "Ewktset_column called with no buffer" );
    
    yycolumn = _column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see Ewkt_switch_to_buffer
 */

void Ewktset_in (FILE *  _in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyin = _in_str ;
}


void Ewktset_out (FILE *  _out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyout = _out_str ;
}


int Ewktget_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yy_flex_debug;
}


void Ewktset_debug (int  _bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yy_flex_debug = _bdebug ;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* Ewktlex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */


int Ewktlex_init(yyscan_t* ptr_yy_globals)

{
    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) Ewktalloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));


    return yy_init_globals ( *ptr_yy_globals );
}

/* Ewktlex_init_extra has the same functionality as Ewktlex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to Ewktalloc in
 * the yyextra field.
 */

int Ewktlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )

{
    struct yyguts_t dummy_yyguts;

    Ewktset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }
	
    *ptr_yy_globals = (yyscan_t) Ewktalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );


	
    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }
    
    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    
    Ewktset_extra (yy_user_defined, *ptr_yy_globals);
    
    return yy_init_globals ( *ptr_yy_globals );
}


static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from Ewktlex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = NULL;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = NULL;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * Ewktlex_init()
     */
    return 0;
}

/* Ewktlex_destroy is for both reentrant and non-reentrant scanners. */

int Ewktlex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		Ewkt_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );


		YY_CURRENT_BUFFER_LVALUE = NULL;
		Ewktpop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	Ewktfree(yyg->yy_buffer_stack ,yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        Ewktfree(yyg->yy_start_stack ,yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * Ewktlex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    Ewktfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN

static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif


void *Ewktalloc (yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	return malloc(size);
}

void *Ewktrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);

}


void Ewktfree (void * ptr , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	free( (char *) ptr );	/* see Ewktrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"


int Ewktwrap(yyscan_t yyscanner )
{
  return 1;
}

>
>







|
|







 







|


>







 







|

|

|
|

>
>
>
|
<
>
>
>
>
>
>
>
>

|







 







|







 







<
<
<
<
<
<
<

<











<
<
<
<
<




|
<
|





|










>
>
>
>
>



|
|

|
|

|
|
|
|

|
|
|
|

|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|



|
|
|
|
|

|



|
|
|
|
|
|
|
|
|
|


|







 







|
|
|
|
|
|
|

|
|
|
>



|
>
|
|
>

|
|
|







 







|
|
>
|
|






|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>

|
|
|
|
|
|
>
>
>
>
>

<
<
<
<
<
|
|
|
|
|
|
|
>
>
>

<
<
<
|
|
|
|
|
|
<
>

|
|
|
|
|
<
|

|
>
|
|
|
|
|
>
>
>
>
|

|
<
<
<
<
|
|
|
|
|
|
|
<
>
|
|
<
<
<
|

|
>
>
>
|
|
|
|
|
|
|
<
<
<
<

>
>
>
>
|
|
|
|
|
|

|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|
<
<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
>
>
>
>

<
<
<
<
<
<
<
<
<
<
>
>
>
>
>
>
>
>
>
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
>
|







 







|






|
|
|











|








|

|

|

|




|

|

|

|

|

|

|

|

|

|

|

|

|

|

|







|

|

<
<
<
<



|



|





|

|






<
<
<
<

<







|










|












|







 







|









|
|
|
|

|
|
|


|


|
|

|
|

|
|

|
>
|
|
|
|

|
|

<
<
|
|
|

|
|

|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
>
|
|
|
|

|
|
|
|
|
|
|
|

|

|

|
|
|
|
|
|
|
|

|
|
<
<
>
|
<
>
|
|
<
>
|
>
|
<
|
>
|
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
>
>
>
>
|
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
>
|
>
|
<
<
>
>
|
>
|
<
<
>
|
>
>
|
<
<
>
>
|
>
|
<
<
>
>
|
>
|
<
<
>
>
|
>
|
<
<
>
>
>
|
|
<

|
>
|
>
>
|
<
<
>
|
<
<
>
>
>
|
<
<
|
<

|

|
>
|

|
|
|
<
|
>
|
|
|
|
|
|
|
|
|
|
>
|
|
|
>
|

|
|
|
|
|
|
|
>
|
|
|

>
|

|

|
|
|
|
|
|
|
|

|
>

|

|
|




|

|
|


|
|

>
|
|
|
|
|

<
>
|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>






>
|

<
>

|
>
|
|
|
|

<
>
|






|
>

<
>

|
|
|
|

|
|
|

|
|
|
|
|
|
|

|
|

|
|
|
|
|
|


>
|

<
>
|
|
|
|








|
>

|
|
|
>
|
|

|

|
|
|
|
|
|

|

|

|






>
|

<
>

|
|

|
|

|
|

<
>


>
>
>
>




|
>
|
<
|
|

|

|
|





|
>
|
|
|

|
|
|






>
|

<
>
|
|

|

|
|
|
|
|
|

|

|
|

|
|








>
|

<
>
|
|

|

|
|
|
|
|
|
|
|

|
|
|
|

|
|
|






>
|

<
>
|
|

|
|
|
|

|
>
|
|
|





>
|

|
<
>

|
|
>
|
|
|
|
|
|
|
<
|
>
|
|
|
>
|
|
|
|
|

|
|
>
|
|

|
|
|
|
<
|
>
|

|
|
>
|
|








<
>
>

|
|
|
|
|
|
|

|
>
|
|

|
|
|
|
|
|
|
|
|

|

|










>
|

|
|




|
|



|
>

|
|
|
|
|
|
|
|
|
|

|
|

|

|
|
|

|
|
|
|

|






>
|

<
<
|
|









|







 







>
|

<
>






>
|

<
>
|
|
|
|






>
|

<
>
|
|
|
|






>
|

<
>






>
|

<
>






>
|

<
>







>
|

<
>







>
|

<
>
|



|


|
>

<
>

|
|
|
|
|



|


>
|

<
>

|
|
|
|
|




|



>
|

<
>
|


>
|

<
>
|


>
|

<
>



>
|

<
>
|











>
|
|
<
|
>
|
|
|

|

|
>
|
|
|


<
>

|










|
|





|
>
|
|
|
|
<
>
>
|
|
>
|
|
|
|

|
<
>
|

|
|


>
|

<
>




|


|





|






|
|









>
|

<
>


|
<
>
>
|
|
|

|
|
|


|
|



|


|









<
<
<
|
>
|
|
|
|




>
|

|
|
|

|



>
|

<
|
<


<
<
<
|
>
|
|
|
|
|
|
|
|
<
>


>
|

<
<
|




>
|

|

<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159







160

161
162
163
164
165
166
167
168
169
170
171





172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
...
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

372
373
374
375
376
377
378
379
380
381
382
383
384
385





386
387
388
389
390
391
392
393
394
395
396



397
398
399
400
401
402

403
404
405
406
407
408
409

410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425




426
427
428
429
430
431
432

433
434
435



436
437
438
439
440
441
442
443
444
445
446
447
448




449
450
451
452
453
454
455
456
457
458
459
460
461
462
463



































464
465
466











467
468
469
470
471
472
473
474
475
476
477










478
479
480
481
482
483
484
485
486
487
488














489
490
491
492
493
494
495
496
497
498
499
...
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648




649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670




671

672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
...
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799


800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858


859
860

861
862
863

864
865
866
867

868
869
870
871
872
873
874
875


876
877
878
879
880


881
882
883
884
885


886
887
888
889
890


891
892
893
894
895


896
897
898
899
900
901
902
903
904
905

906
907
908
909
910


911
912
913
914
915


916
917
918
919
920


921
922
923
924
925


926
927
928
929
930


931
932
933
934
935


936
937
938
939
940


941
942
943
944
945


946
947
948
949
950


951
952
953
954
955

956
957
958
959
960
961
962


963
964


965
966
967
968


969

970
971
972
973
974
975
976
977
978
979

980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051

1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406

1407
1408
1409
1410
1411
1412
1413
1414
1415

1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426

1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459

1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505

1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516

1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530

1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560

1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591

1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623

1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646

1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658

1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680

1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697

1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788


1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
....
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817

1818
1819
1820
1821
1822
1823
1824
1825
1826
1827

1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841

1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855

1856
1857
1858
1859
1860
1861
1862
1863
1864
1865

1866
1867
1868
1869
1870
1871
1872
1873
1874
1875

1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886

1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897

1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908

1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924

1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942

1943
1944
1945
1946
1947
1948
1949

1950
1951
1952
1953
1954
1955
1956

1957
1958
1959
1960
1961
1962
1963

1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979

1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994

1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020

2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031

2032
2033
2034
2035
2036
2037
2038
2039
2040
2041

2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076

2077
2078
2079
2080

2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109



2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133

2134

2135
2136



2137
2138
2139
2140
2141
2142
2143
2144
2145
2146

2147
2148
2149
2150
2151
2152


2153
2154
2155
2156
2157
2158
2159
2160
2161
2162


#line 3 "lex.Ewkt.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)


#define YY_USE_CONST

#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void *yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE Ewktrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE







#define YY_BUF_SIZE 16384

#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif






#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

#define YY_LESS_LINENO(n)


/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
    FILE *yy_input_file;

    char *yy_ch_buf;		/* input buffer */
    char *yy_buf_pos;		/* current position in input buffer */

    /* Size of input buffer in bytes, not including room for EOB
     * characters.
     */
    yy_size_t yy_buf_size;

    /* Number of characters read into yy_ch_buf, not including EOB
     * characters.
     */
    int yy_n_chars;

    /* Whether we "own" the buffer - i.e., we know we created it,
     * and can realloc() it to grow it, and should free() it to
     * delete it.
     */
    int yy_is_our_buffer;

    /* Whether this is an "interactive" input source; if so, and
     * if we're using stdio for input, then we want to use getc()
     * instead of fread(), to make sure we stop fetching input after
     * each newline.
     */
    int yy_is_interactive;

    /* Whether we're considered to be at the beginning of a line.
     * If so, '^' rules will be active on the next match, otherwise
     * not.
     */
    int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

    /* Whether to try to fill the input buffer when we reach the
     * end of it.
     */
    int yy_fill_buffer;

    int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
    /* When an EOF's been seen but there's still some text to process
     * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     * shouldn't try reading from the input source any more.  We might
     * still have a bunch of tokens to match, though, because of
     * possible backing-up.
     *
     * When we actually see the EOF, we change the status to "new"
     * (via Ewktrestart()), so that the user can continue scanning by
     * just pointing yyin at a new input file.
     */
#define YY_BUFFER_EOF_PENDING 2

};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void Ewktrestart (FILE * input_file, yyscan_t yyscanner);
void Ewkt_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
YY_BUFFER_STATE Ewkt_create_buffer (FILE * file, int size, yyscan_t yyscanner);
void Ewkt_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void Ewkt_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void Ewktpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
void Ewktpop_buffer_state (yyscan_t yyscanner);

static void Ewktensure_buffer_stack (yyscan_t yyscanner);
static void Ewkt_load_buffer_state (yyscan_t yyscanner);
static void Ewkt_init_buffer (YY_BUFFER_STATE b, FILE * file,
			      yyscan_t yyscanner);

#define YY_FLUSH_BUFFER Ewkt_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE Ewkt_scan_buffer (char *base, yy_size_t size,
				  yyscan_t yyscanner);
YY_BUFFER_STATE Ewkt_scan_string (yyconst char *yy_str, yyscan_t yyscanner);
YY_BUFFER_STATE Ewkt_scan_bytes (yyconst char *bytes, int len,
				 yyscan_t yyscanner);

void *Ewktalloc (yy_size_t, yyscan_t yyscanner);
void *Ewktrealloc (void *, yy_size_t, yyscan_t yyscanner);
void Ewktfree (void *, yyscan_t yyscanner);

#define yy_new_buffer Ewkt_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        Ewktensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner);
static yy_state_type yy_try_NUL_trans (yy_state_type current_state,
				       yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner);
static void yy_fatal_error (yyconst char msg[], yyscan_t yyscanner);

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (size_t) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 22
#define YY_END_OF_BUFFER 23
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
{
    flex_int32_t yy_verify;
    flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[93] = { 0,
    0, 0, 23, 21, 19, 20, 3, 4, 21, 2,
    21, 1, 21, 21, 21, 21, 1, 1, 1, 1,
    0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
    0, 0, 1, 1, 0, 0, 0, 0, 0, 0,
    0, 0, 5, 0, 0, 0, 0, 0, 6, 0,
    0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
    10, 0, 0, 0, 0, 0, 0, 7, 0, 11,
    0, 0, 8, 0, 12, 0, 0, 0, 15, 0,
    0, 16, 0, 0, 0, 13, 0, 14, 0, 17,
    18, 0

};

static yyconst flex_int32_t yy_ec[256] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 2, 1, 1, 1, 1, 1, 1, 1, 4,
    5, 1, 6, 7, 8, 9, 1, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 11, 1, 12, 1,
    13, 1, 14, 1, 1, 15, 16, 17, 18, 19,
    1, 20, 21, 22, 23, 1, 1, 1, 24, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 25, 1,






    26, 1, 27, 1, 28, 1, 1, 29, 30, 31,
    32, 33, 1, 34, 35, 36, 37, 1, 1, 1,
    38, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,




    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1

};

static yyconst flex_int32_t yy_meta[39] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1

};

static yyconst flex_int16_t yy_base[93] = { 0,
    0, 0, 187, 188, 188, 188, 188, 188, 174, 188,
    173, 30, 29, 28, 20, 26, 36, 38, 172, 40,
    33, 35, 38, 45, 171, 166, 165, 38, 49, 40,
    46, 40, 164, 163, 57, 49, 57, 50, 66, 58,
    59, 72, 66, 70, 69, 70, 78, 79, 188, 81,
    75, 86, 90, 94, 94, 104, 99, 105, 101, 95,
    188, 102, 112, 105, 105, 115, 120, 120, 115, 122,
    125, 129, 188, 125, 188, 129, 135, 134, 137, 143,
    138, 188, 134, 150, 150, 149, 148, 188, 154, 156,
    188, 188
};

static yyconst flex_int16_t yy_def[93] = { 0,




    92, 1, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,

    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 0



};

static yyconst flex_int16_t yy_nxt[227] = { 0,
    4, 5, 6, 7, 8, 9, 10, 11, 4, 12,
    4, 4, 13, 4, 14, 15, 4, 4, 16, 4,
    4, 4, 4, 4, 4, 4, 13, 4, 14, 15,
    4, 4, 16, 4, 4, 4, 4, 4, 19, 20,
    21, 22, 23, 24, 25, 17, 26, 18, 19, 20,
    28, 29, 30, 35, 21, 22, 23, 24, 31, 32,
    36, 37, 38, 39, 28, 29, 30, 35, 40, 41,
    42, 43, 31, 32, 36, 37, 38, 39, 44, 45,
    46, 49, 40, 41, 42, 43, 47, 50, 51, 52,
    48, 53, 44, 45, 46, 49, 54, 55, 56, 57,





    47, 50, 51, 52, 48, 53, 58, 59, 60, 61,
    54, 55, 56, 57, 62, 63, 64, 65, 66, 67,
    58, 59, 60, 61, 68, 69, 70, 71, 62, 63,
    64, 65, 66, 67, 72, 73, 74, 75, 68, 69,
    70, 71, 76, 77, 78, 79, 80, 81, 72, 73,
    74, 75, 82, 83, 84, 85, 76, 77, 78, 79,
    80, 81, 86, 87, 88, 89, 82, 83, 84, 85,
    90, 91, 34, 33, 27, 34, 86, 87, 88, 89,
    33, 27, 18, 17, 90, 91, 92, 3, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,

    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92



































};

static yyconst flex_int16_t yy_chk[227] = { 0,











    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 12, 12,
    13, 14, 15, 16, 17, 17, 18, 18, 20, 20,
    21, 22, 23, 28, 13, 14, 15, 16, 24, 24,
    29, 30, 31, 32, 21, 22, 23, 28, 35, 36,
    37, 38, 24, 24, 29, 30, 31, 32, 39, 40,
    41, 43, 35, 36, 37, 38, 42, 44, 45, 46,
    42, 47, 39, 40, 41, 43, 48, 50, 51, 52,











    42, 44, 45, 46, 42, 47, 53, 54, 54, 55,
    48, 50, 51, 52, 56, 57, 58, 59, 60, 62,
    53, 54, 54, 55, 63, 64, 65, 66, 56, 57,
    58, 59, 60, 62, 67, 68, 69, 70, 63, 64,
    65, 66, 71, 72, 74, 76, 77, 78, 67, 68,
    69, 70, 79, 80, 81, 83, 71, 72, 74, 76,
    77, 78, 84, 85, 86, 87, 79, 80, 81, 83,
    89, 90, 34, 33, 27, 26, 84, 85, 86, 87,
    25, 19, 11, 9, 89, 90, 3, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,















    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
    92, 92, 92, 92, 92, 92
};

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct ewkt_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
{

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top;	/**< index of top of stack. */
    size_t yy_buffer_stack_max;	/**< capacity of stack. */
    YY_BUFFER_STATE *yy_buffer_stack;  /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char *yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

};				/* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner);

int Ewktlex_init (yyscan_t * scanner);

int Ewktlex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t * scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int Ewktlex_destroy (yyscan_t yyscanner);

int Ewktget_debug (yyscan_t yyscanner);

void Ewktset_debug (int debug_flag, yyscan_t yyscanner);

YY_EXTRA_TYPE Ewktget_extra (yyscan_t yyscanner);

void Ewktset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);

FILE *Ewktget_in (yyscan_t yyscanner);

void Ewktset_in (FILE * in_str, yyscan_t yyscanner);

FILE *Ewktget_out (yyscan_t yyscanner);

void Ewktset_out (FILE * out_str, yyscan_t yyscanner);

int Ewktget_leng (yyscan_t yyscanner);

char *Ewktget_text (yyscan_t yyscanner);

int Ewktget_lineno (yyscan_t yyscanner);

void Ewktset_lineno (int line_number, yyscan_t yyscanner);

int Ewktget_column (yyscan_t yyscanner);

void Ewktset_column (int column_no, yyscan_t yyscanner);

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int Ewktwrap (yyscan_t yyscanner);
#else
extern int Ewktwrap (yyscan_t yyscanner);
#endif




#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *, yyconst char *, int, yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char *, yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner);
#else
static int input (yyscan_t yyscanner);
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE




#define YY_READ_BUF_SIZE 8192

#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		unsigned n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
    register yy_state_type yy_current_state;
    register char *yy_cp, *yy_bp;
    register int yy_act;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_init)
      {
	  yyg->yy_init = 1;

#ifdef YY_USER_INIT
	  YY_USER_INIT;
#endif

	  if (!yyg->yy_start)
	      yyg->yy_start = 1;	/* first start state */

	  if (!yyin)
	      yyin = stdin;

	  if (!yyout)
	      yyout = stdout;

	  if (!YY_CURRENT_BUFFER)
	    {
		Ewktensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
		    Ewkt_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
	    }

	  Ewkt_load_buffer_state (yyscanner);
      }



    while (1)			/* loops until end-of-file is reached */
      {
	  yy_cp = yyg->yy_c_buf_p;

	  /* Support of yytext. */
	  *yy_cp = yyg->yy_hold_char;

	  /* yy_bp points to the position in yy_ch_buf of the start of
	   * the current run.
	   */
	  yy_bp = yy_cp;

	  yy_current_state = yyg->yy_start;
	yy_match:
	  do
	    {
		register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI (*yy_cp)];
		if (yy_accept[yy_current_state])
		  {
		      yyg->yy_last_accepting_state = yy_current_state;
		      yyg->yy_last_accepting_cpos = yy_cp;
		  }
		while (yy_chk[yy_base[yy_current_state] + yy_c] !=
		       yy_current_state)
		  {
		      yy_current_state = (int) yy_def[yy_current_state];
		      if (yy_current_state >= 93)
			  yy_c = yy_meta[(unsigned int) yy_c];
		  }
		yy_current_state =
		    yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		++yy_cp;
	    }
	  while (yy_base[yy_current_state] != 188);

	yy_find_action:
	  yy_act = yy_accept[yy_current_state];
	  if (yy_act == 0)
	    {			/* have to back up */
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		yy_act = yy_accept[yy_current_state];
	    }

	  YY_DO_BEFORE_ACTION;

	do_action:		/* This label is used only to access EOF actions. */

	  switch (yy_act)
	    {			/* beginning of action switch */
	    case 0:		/* must back up */
		/* undo the effects of YY_DO_BEFORE_ACTION */
		*yy_cp = yyg->yy_hold_char;
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		goto yy_find_action;

	    case 1:
		YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->ewkt_col +=

			(int) strlen (yytext);
		    Ewktget_extra (yyscanner)->EwktLval.dval = atof (yytext);
		    return EWKT_NUM;

		}
		YY_BREAK case 2:YY_RULE_SETUP
		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;

		    return EWKT_COMMA;
		}
		YY_BREAK case 3:YY_RULE_SETUP
		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_OPEN_BRACKET;
		}
		YY_BREAK case 4:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_CLOSE_BRACKET;
		}
		YY_BREAK case 5:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_POINT;
		}
		YY_BREAK case 6:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_POINT_M;
		}
		YY_BREAK case 7:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_LINESTRING;
		}
		YY_BREAK case 8:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_LINESTRING_M;
		}
		YY_BREAK case 9:YY_RULE_SETUP
		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_POLYGON;
		}
		YY_BREAK case 10:YY_RULE_SETUP

		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_POLYGON_M;
		}
		YY_BREAK case 11:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_MULTIPOINT;
		}
		YY_BREAK case 12:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_MULTIPOINT_M;
		}
		YY_BREAK case 13:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_MULTILINESTRING;
		}
		YY_BREAK case 14:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_MULTILINESTRING_M;
		}
		YY_BREAK case 15:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_MULTIPOLYGON;
		}
		YY_BREAK case 16:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_MULTIPOLYGON_M;
		}
		YY_BREAK case 17:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_GEOMETRYCOLLECTION;
		}
		YY_BREAK case 18:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->EwktLval.dval = 0;
		    return EWKT_GEOMETRYCOLLECTION_M;
		}
		YY_BREAK case 19:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->ewkt_col +=
			(int) strlen (yytext);
		}		/* ignore but count white space */
		YY_BREAK case 20:

/* rule 20 can match eol */
		  YY_RULE_SETUP
		{
		    Ewktget_extra (yyscanner)->ewkt_col = 0;
		    Ewktget_extra (yyscanner)->ewkt_line++;
		}
		YY_BREAK case 21:YY_RULE_SETUP


		{
		    Ewktget_extra (yyscanner)->ewkt_col +=


			(int) strlen (yytext);
		    return -1;
		}
		YY_BREAK case 22:YY_RULE_SETUP ECHO;


		YY_BREAK case YY_STATE_EOF (INITIAL):yyterminate ();


	    case YY_END_OF_BUFFER:
		{
		    /* Amount of text matched not including the EOB char. */
		    int yy_amount_of_matched_text =
			(int) (yy_cp - yyg->yytext_ptr) - 1;

		    /* Undo the effects of YY_DO_BEFORE_ACTION. */
		    *yy_cp = yyg->yy_hold_char;
		    YY_RESTORE_YY_MORE_OFFSET

			if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status ==
			    YY_BUFFER_NEW)
		      {
			  /* We're scanning a new file or input source.  It's
			   * possible that this happened because the user
			   * just pointed yyin at a new source and called
			   * Ewktlex().  If so, then we have to assure
			   * consistency between YY_CURRENT_BUFFER and our
			   * globals.  Here is the right place to do so, because
			   * this is the first action (other than possibly a
			   * back-up) that will match for the new input source.
			   */
			  yyg->yy_n_chars =
			      YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
			      YY_BUFFER_NORMAL;
		      }

		    /* Note that here we test for yy_c_buf_p "<=" to the position
		     * of the first EOB in the buffer, since yy_c_buf_p will
		     * already have been incremented past the NUL character
		     * (since all states make transitions on EOB to the
		     * end-of-buffer state).  Contrast this with the test
		     * in input().
		     */
		    if (yyg->yy_c_buf_p <=
			&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
		      {		/* This was really a NUL. */
			  yy_state_type yy_next_state;

			  yyg->yy_c_buf_p =
			      yyg->yytext_ptr + yy_amount_of_matched_text;

			  yy_current_state = yy_get_previous_state (yyscanner);

			  /* Okay, we're now positioned to make the NUL
			   * transition.  We couldn't have
			   * yy_get_previous_state() go ahead and do it
			   * for us because it doesn't know how to deal
			   * with the possibility of jamming (and we don't
			   * want to build jamming into it because then it
			   * will run more slowly).
			   */

			  yy_next_state =
			      yy_try_NUL_trans (yy_current_state, yyscanner);

			  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			  if (yy_next_state)
			    {
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
			    }

			  else
			    {
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
			    }
		      }

		    else
			switch (yy_get_next_buffer (yyscanner))
			  {
			  case EOB_ACT_END_OF_FILE:
			      {
				  yyg->yy_did_buffer_switch_on_eof = 0;


				  if (Ewktwrap (yyscanner))
				    {
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p =
					    yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF (YY_START);
					goto do_action;
				    }

				  else
				    {
					if (!yyg->yy_did_buffer_switch_on_eof)
					    YY_NEW_FILE;
				    }
				  break;
			      }

			  case EOB_ACT_CONTINUE_SCAN:
			      yyg->yy_c_buf_p =
				  yyg->yytext_ptr + yy_amount_of_matched_text;

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_match;

			  case EOB_ACT_LAST_MATCH:
			      yyg->yy_c_buf_p =
				  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->
								       yy_n_chars];

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_find_action;
			  }
		    break;
		}

	    default:
		YY_FATAL_ERROR
		    ("fatal flex scanner internal error--no action found");
	    }			/* end of action switch */
      }				/* end of scanning one token */
}				/* end of Ewktlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int
yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    register char *source = yyg->yytext_ptr;
    register int number_to_move, i;
    int ret_val;

    if (yyg->yy_c_buf_p >
	&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1])
	YY_FATAL_ERROR
	    ("fatal flex scanner internal error--end of buffer missed");

    if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0)
      {				/* Don't try to fill the buffer, so this is an EOF. */
	  if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1)
	    {
		/* We matched a single character, the EOB, so
		 * treat this as a final EOF.
		 */
		return EOB_ACT_END_OF_FILE;
	    }

	  else
	    {
		/* We matched some text prior to the EOB, first
		 * process it.
		 */
		return EOB_ACT_LAST_MATCH;
	    }
      }

    /* Try to read more data. */

    /* First move last chars to start of buffer. */
    number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

    for (i = 0; i < number_to_move; ++i)
	*(dest++) = *(source++);

    if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING)
	/* don't do the read, it's not guaranteed to return an EOF,
	 * just force an EOF
	 */
	YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

    else
      {
	  int num_to_read =
	      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

	  while (num_to_read <= 0)
	    {			/* Not enough room in the buffer - grow it. */

		/* just a shorter name for the current buffer */
		YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

		int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf);

		if (b->yy_is_our_buffer)
		  {
		      int new_size = b->yy_buf_size * 2;

		      if (new_size <= 0)
			  b->yy_buf_size += b->yy_buf_size / 8;
		      else
			  b->yy_buf_size *= 2;

		      b->yy_ch_buf = (char *)
			  /* Include room in for 2 EOB chars. */
			  Ewktrealloc ((void *) b->yy_ch_buf,
				       b->yy_buf_size + 2, yyscanner);
		  }
		else
		    /* Can't grow it, we don't own it. */
		    b->yy_ch_buf = 0;

		if (!b->yy_ch_buf)
		    YY_FATAL_ERROR
			("fatal error - scanner input buffer overflow");

		yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

		num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
		    number_to_move - 1;

	    }

	  if (num_to_read > YY_READ_BUF_SIZE)
	      num_to_read = YY_READ_BUF_SIZE;

	  /* Read in more data. */
	  YY_INPUT ((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
		    yyg->yy_n_chars, (size_t) num_to_read);

	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    if (yyg->yy_n_chars == 0)
      {
	  if (number_to_move == YY_MORE_ADJ)
	    {
		ret_val = EOB_ACT_END_OF_FILE;
		Ewktrestart (yyin, yyscanner);
	    }

	  else
	    {
		ret_val = EOB_ACT_LAST_MATCH;
		YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
		    YY_BUFFER_EOF_PENDING;
	    }
      }

    else
	ret_val = EOB_ACT_CONTINUE_SCAN;

    if ((yy_size_t) (yyg->yy_n_chars + number_to_move) >
	YY_CURRENT_BUFFER_LVALUE->yy_buf_size)
      {
	  /* Extend the array by 50%, plus the number we really need. */
	  yy_size_t new_size =
	      yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
	  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf =
	      (char *) Ewktrealloc ((void *)
				    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,
				    new_size, yyscanner);
	  if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
	      YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()");
      }

    yyg->yy_n_chars += number_to_move;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] =
	YY_END_OF_BUFFER_CHAR;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] =
	YY_END_OF_BUFFER_CHAR;

    yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

    return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type
yy_get_previous_state (yyscan_t yyscanner)
{
    register yy_state_type yy_current_state;
    register char *yy_cp;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    yy_current_state = yyg->yy_start;

    for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p;
	 ++yy_cp)
      {
	  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI (*yy_cp)] : 1);
	  if (yy_accept[yy_current_state])
	    {
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
	    }
	  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
	    {
		yy_current_state = (int) yy_def[yy_current_state];
		if (yy_current_state >= 93)
		    yy_c = yy_meta[(unsigned int) yy_c];
	    }
	  yy_current_state =
	      yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      }

    return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state, yyscan_t yyscanner)
{
    register int yy_is_jam;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;	/* This var may be unused depending upon options. */
    register char *yy_cp = yyg->yy_c_buf_p;

    register YY_CHAR yy_c = 1;
    if (yy_accept[yy_current_state])
      {
	  yyg->yy_last_accepting_state = yy_current_state;
	  yyg->yy_last_accepting_cpos = yy_cp;
      }
    while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
      {
	  yy_current_state = (int) yy_def[yy_current_state];
	  if (yy_current_state >= 93)
	      yy_c = yy_meta[(unsigned int) yy_c];
      }
    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    yy_is_jam = (yy_current_state == 92);

    return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int
yyinput (yyscan_t yyscanner)
#else
static int
input (yyscan_t yyscanner)
#endif
{
    int c;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    *yyg->yy_c_buf_p = yyg->yy_hold_char;

    if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR)
      {
	  /* yy_c_buf_p now points to the character we want to return.
	   * If this occurs *before* the EOB characters, then it's a
	   * valid NUL; if not, then we've hit the end of the buffer.
	   */
	  if (yyg->yy_c_buf_p <
	      &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
	      /* This was really a NUL. */
	      *yyg->yy_c_buf_p = '\0';

	  else
	    {			/* need more input */
		int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
		++yyg->yy_c_buf_p;

		switch (yy_get_next_buffer (yyscanner))
		  {
		  case EOB_ACT_LAST_MATCH:
		      /* This happens because yy_g_n_b()
		       * sees that we've accumulated a
		       * token and flags that we need to
		       * try matching the token before
		       * proceeding.  But for input(),
		       * there's no matching to consider.
		       * So convert the EOB_ACT_LAST_MATCH
		       * to EOB_ACT_END_OF_FILE.
		       */

		      /* Reset buffer status. */
		      Ewktrestart (yyin, yyscanner);

		   /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE:
		      {
			  if (Ewktwrap (yyscanner))
			      return EOF;

			  if (!yyg->yy_did_buffer_switch_on_eof)
			      YY_NEW_FILE;
#ifdef __cplusplus
			  return yyinput (yyscanner);
#else
			  return input (yyscanner);
#endif
		      }

		  case EOB_ACT_CONTINUE_SCAN:
		      yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
		      break;
		  }
	    }
      }

    c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
    *yyg->yy_c_buf_p = '\0';	/* preserve yytext */
    yyg->yy_hold_char = *++yyg->yy_c_buf_p;

    return c;
}
#endif /* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
void
Ewktrestart (FILE * input_file, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
      {
	  Ewktensure_buffer_stack (yyscanner);
	  YY_CURRENT_BUFFER_LVALUE =
	      Ewkt_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
      }


    Ewkt_init_buffer (YY_CURRENT_BUFFER, input_file, yyscanner);
    Ewkt_load_buffer_state (yyscanner);
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
void
Ewkt_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* TODO. We should be able to replace this entire function body
     * with
     *              Ewktpop_buffer_state();
     *              Ewktpush_buffer_state(new_buffer);
     */
    Ewktensure_buffer_stack (yyscanner);
    if (YY_CURRENT_BUFFER == new_buffer)
	return;

    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    YY_CURRENT_BUFFER_LVALUE = new_buffer;
    Ewkt_load_buffer_state (yyscanner);

    /* We don't actually know whether we did this switch during
     * EOF (Ewktwrap()) processing, but the only time this flag
     * is looked at is after Ewktwrap() is called, so it's safe
     * to go ahead and always set it.
     */
    yyg->yy_did_buffer_switch_on_eof = 1;
}

static void
Ewkt_load_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
YY_BUFFER_STATE
Ewkt_create_buffer (FILE * file, int size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    b = (YY_BUFFER_STATE) Ewktalloc (sizeof (struct yy_buffer_state),
				     yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in Ewkt_create_buffer()");

    b->yy_buf_size = size;

    /* yy_ch_buf has to be 2 characters longer than the size given because
     * we need to put in 2 end-of-buffer characters.
     */
    b->yy_ch_buf = (char *) Ewktalloc (b->yy_buf_size + 2, yyscanner);
    if (!b->yy_ch_buf)
	YY_FATAL_ERROR ("out of dynamic memory in Ewkt_create_buffer()");

    b->yy_is_our_buffer = 1;

    Ewkt_init_buffer (b, file, yyscanner);

    return b;
}

/** Destroy the buffer.
 * @param b a buffer created with Ewkt_create_buffer()
 * @param yyscanner The scanner object.
 */
void
Ewkt_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!b)
	return;

    if (b == YY_CURRENT_BUFFER)	/* Not sure if we should pop here. */
	YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

    if (b->yy_is_our_buffer)
	Ewktfree ((void *) b->yy_ch_buf, yyscanner);


    Ewktfree ((void *) b, yyscanner);
}

#ifndef __cplusplus
extern int isatty (int);
#endif /* __cplusplus */

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a Ewktrestart() or at EOF.
 */
static void
Ewkt_init_buffer (YY_BUFFER_STATE b, FILE * file, yyscan_t yyscanner)
{

    int oerrno = errno;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    Ewkt_flush_buffer (b, yyscanner);

    b->yy_input_file = file;
    b->yy_fill_buffer = 1;

    /* If b is the current buffer, then Ewkt_init_buffer was _probably_
     * called from Ewktrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER)
      {
	  b->yy_bs_lineno = 1;
	  b->yy_bs_column = 0;
      }

    b->yy_is_interactive = file ? (isatty (fileno (file)) > 0) : 0;

    errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */
void
Ewkt_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!b)
	return;

    b->yy_n_chars = 0;

    /* We always need two end-of-buffer characters.  The first causes
     * a transition to the end-of-buffer state.  The second causes
     * a jam in that state.
     */
    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

    b->yy_buf_pos = &b->yy_ch_buf[0];

    b->yy_at_bol = 1;
    b->yy_buffer_status = YY_BUFFER_NEW;

    if (b == YY_CURRENT_BUFFER)
	Ewkt_load_buffer_state (yyscanner);
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */
void
Ewktpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (new_buffer == NULL)
	return;

    Ewktensure_buffer_stack (yyscanner);

    /* This block is copied from Ewkt_switch_to_buffer. */
    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    /* Only push if top exists. Otherwise, replace top. */
    if (YY_CURRENT_BUFFER)
	yyg->yy_buffer_stack_top++;
    YY_CURRENT_BUFFER_LVALUE = new_buffer;

    /* copied from Ewkt_switch_to_buffer. */
    Ewkt_load_buffer_state (yyscanner);
    yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
void
Ewktpop_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!YY_CURRENT_BUFFER)
	return;

    Ewkt_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
    YY_CURRENT_BUFFER_LVALUE = NULL;
    if (yyg->yy_buffer_stack_top > 0)
	--yyg->yy_buffer_stack_top;

    if (YY_CURRENT_BUFFER)
      {
	  Ewkt_load_buffer_state (yyscanner);
	  yyg->yy_did_buffer_switch_on_eof = 1;
      }
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void
Ewktensure_buffer_stack (yyscan_t yyscanner)
{
    int num_to_alloc;

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_buffer_stack)
      {

	  /* First allocation is just for 2 elements, since we don't know if this
	   * scanner will even need a stack. We use 2 instead of 1 to avoid an
	   * immediate realloc on the next call.
	   */
	  num_to_alloc = 1;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) Ewktalloc
	      (num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in Ewktensure_buffer_stack()");

	  memset (yyg->yy_buffer_stack, 0,
		  num_to_alloc * sizeof (struct yy_buffer_state *));

	  yyg->yy_buffer_stack_max = num_to_alloc;
	  yyg->yy_buffer_stack_top = 0;
	  return;
      }

    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1)
      {

	  /* Increase the buffer to prepare for a possible push. */
	  int grow_size = 8 /* arbitrary grow size */ ;

	  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) Ewktrealloc
	      (yyg->yy_buffer_stack,
	       num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in Ewktensure_buffer_stack()");

	  /* zero only the new slots. */
	  memset (yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0,
		  grow_size * sizeof (struct yy_buffer_state *));
	  yyg->yy_buffer_stack_max = num_to_alloc;
      }
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */

YY_BUFFER_STATE
Ewkt_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    if (size < 2 ||
	base[size - 2] != YY_END_OF_BUFFER_CHAR ||
	base[size - 1] != YY_END_OF_BUFFER_CHAR)
	/* They forgot to leave room for the EOB's. */
	return 0;

    b = (YY_BUFFER_STATE) Ewktalloc (sizeof (struct yy_buffer_state),
				     yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in Ewkt_scan_buffer()");

    b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;

    Ewkt_switch_to_buffer (b, yyscanner);

    return b;
}

/** Setup the input buffer state to scan a string. The next call to Ewktlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       Ewkt_scan_bytes() instead.
 */
YY_BUFFER_STATE
Ewkt_scan_string (yyconst char *yystr, yyscan_t yyscanner)
{

    return Ewkt_scan_bytes (yystr, strlen (yystr), yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to Ewktlex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE
Ewkt_scan_bytes (yyconst char *yybytes, int _yybytes_len, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;
    char *buf;
    yy_size_t n;
    int i;

    /* Get memory for full buffer, including space for trailing EOB's. */
    n = _yybytes_len + 2;
    buf = (char *) Ewktalloc (n, yyscanner);
    if (!buf)
	YY_FATAL_ERROR ("out of dynamic memory in Ewkt_scan_bytes()");

    for (i = 0; i < _yybytes_len; ++i)
	buf[i] = yybytes[i];

    buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR;

    b = Ewkt_scan_buffer (buf, n, yyscanner);
    if (!b)
	YY_FATAL_ERROR ("bad buffer in Ewkt_scan_bytes()");

    /* It's okay to grow etc. this buffer, and we should throw it
     * away when we're done.
     */
    b->yy_is_our_buffer = 1;

    return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void
yy_fatal_error (yyconst char *msg, yyscan_t yyscanner)
{


    (void) fprintf (stderr, "%s\n", msg);
    exit (YY_EXIT_FAILURE);
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE
Ewktget_extra (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int
Ewktget_lineno (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int
Ewktget_column (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *
Ewktget_in (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *
Ewktget_out (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
int
Ewktget_leng (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *
Ewktget_text (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void
Ewktset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyextra = user_defined;
}

/** Set the current line number.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
Ewktset_lineno (int line_number, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* lineno is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("Ewktset_lineno called with no buffer", yyscanner);

    yylineno = line_number;
}

/** Set the current column.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
Ewktset_column (int column_no, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* column is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("Ewktset_column called with no buffer", yyscanner);

    yycolumn = column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see Ewkt_switch_to_buffer
 */
void
Ewktset_in (FILE * in_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyin = in_str;
}

void
Ewktset_out (FILE * out_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyout = out_str;
}

int
Ewktget_debug (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yy_flex_debug;
}

void
Ewktset_debug (int bdebug, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yy_flex_debug = bdebug;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* Ewktlex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */

int
Ewktlex_init (yyscan_t * ptr_yy_globals)
{

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }

    *ptr_yy_globals = (yyscan_t) Ewktalloc (sizeof (struct yyguts_t), NULL);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    return yy_init_globals (*ptr_yy_globals);
}

/* Ewktlex_init_extra has the same functionality as Ewktlex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to Ewktalloc in
 * the yyextra field.
 */

int
Ewktlex_init_extra (YY_EXTRA_TYPE yy_user_defined, yyscan_t * ptr_yy_globals)
{
    struct yyguts_t dummy_yyguts;

    Ewktset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }


    *ptr_yy_globals =
	(yyscan_t) Ewktalloc (sizeof (struct yyguts_t), &dummy_yyguts);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in
       yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    Ewktset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals (*ptr_yy_globals);
}

static int
yy_init_globals (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from Ewktlex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = 0;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = (char *) 0;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack = NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * Ewktlex_init()
     */
    return 0;
}

/* Ewktlex_destroy is for both reentrant and non-reentrant scanners. */
int
Ewktlex_destroy (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* Pop the buffer stack, destroying each element. */
    while (YY_CURRENT_BUFFER)

      {
	  Ewkt_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
	  YY_CURRENT_BUFFER_LVALUE = NULL;
	  Ewktpop_buffer_state (yyscanner);
      }

    /* Destroy the stack itself. */
    Ewktfree (yyg->yy_buffer_stack, yyscanner);
    yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
    Ewktfree (yyg->yy_start_stack, yyscanner);
    yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * Ewktlex() is called, initialization will occur. */
    yy_init_globals (yyscanner);

    /* Destroy the main struct (reentrant only). */
    Ewktfree (yyscanner, yyscanner);
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr



static void
yy_flex_strncpy (char *s1, yyconst char *s2, int n, yyscan_t yyscanner)
{
    register int i;
    for (i = 0; i < n; ++i)
	s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int
yy_flex_strlen (yyconst char *s, yyscan_t yyscanner)
{
    register int n;
    for (n = 0; s[n]; ++n)
	;

    return n;
}
#endif

void *
Ewktalloc (yy_size_t size, yyscan_t yyscanner)
{

    return (void *) malloc (size);

}




void *
Ewktrealloc (void *ptr, yy_size_t size, yyscan_t yyscanner)
{
    /* The cast to (char *) in the following accommodates both
     * implementations that use char* generic pointers, and those
     * that use void* generic pointers.  It works with the latter
     * because both ANSI C and C++ allow castless assignment from
     * any pointer type to void*, and deal with argument conversions
     * as though doing an assignment.
     */

    return (void *) realloc ((char *) ptr, size);
}

void
Ewktfree (void *ptr, yyscan_t yyscanner)
{


    free ((char *) ptr);	/* see Ewktrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

int
Ewktwrap (yyscan_t yyscanner)
{
    return 1;
}

Changes to src/gaiageo/lex.GeoJson.c.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90



91
92








93
94
95
96
97
98
99
100
101
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194





195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
268
269
270
271
272
273
274
275
276
277

278
279
280
281
282
283
284
285

286
287
288
289

290
291

292
293
294
295
296
297
298
299
300
301
302
...
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365

366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383







384
385
386
387

388
389
390
391
392
393
394



395
396
397
398
399
400
401
402
403
404
405

406
407
408
409
410
411
412
413
414
415

416
417
418
419
420
421



422
423
424
425
426
427
428
429
430
431
432
433
434

435
436
437
438
439
440
441
442
443
444
445


446
447
448
449
450







451
452
453
454
455
456
457
458
459
460
461
462
463
464






465
466
467
468
469
470
471
472
473
474
475






476
477
478
479
480





481
482
483
484
485
486
487
488
489
490
491
492
493
494
495

496
497
498
499
500
501
502
503
504
505
506





507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522





523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
...
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
...
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872

873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905

906
907
908
909
910

911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941

942
943

944
945

946

947
948







949
950







951

952


953
954
955

956


957
958
959

960


961
962
963

964


965
966
967

968


969
970
971


972

973
974
975

976


977
978
979

980


981
982
983

984


985
986
987

988


989
990
991

992


993
994
995

996


997
998
999

1000


1001
1002
1003

1004


1005
1006
1007

1008


1009
1010
1011

1012


1013
1014
1015

1016


1017
1018
1019


1020

1021
1022
1023

1024


1025
1026
1027


1028

1029
1030
1031



1032
1033
1034
1035
1036

1037


1038
1039
1040

1041
1042
1043



1044
1045
1046
1047
1048
1049
1050
1051
1052

1053
1054
1055
1056
1057
1058
1059

1060
1061
1062
1063
1064
1065
1066
1067
1068
1069

1070
1071
1072

1073
1074
1075
1076
1077
1078
1079
1080
1081

1082
1083
1084
1085

1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099

1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117

1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457












1458
1459
1460
1461
1462
1463

1464
1465
1466

1467
1468

1469
1470
1471
1472
1473
1474

1475
1476
1477
1478
1479
1480
1481
1482

1483
1484

1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513

1514
1515
1516

1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529

1530
1531
1532
1533

1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556

1557
1558
1559

1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570

1571
1572




1573
1574
1575
1576
1577

1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592

1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605

1606
1607
1608

1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635

1636
1637
1638

1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666

1667
1668
1669

1670
1671
1672
1673
1674
1675
1676
1677
1678

1679
1680
1681
1682
1683
1684
1685
1686

1687
1688
1689
1690

1691
1692
1693

1694
1695
1696
1697
1698
1699
1700
1701
1702

1703
1704
1705

1706
1707
1708
1709
1710
1711
1712
1713

1714
1715
1716
1717
1718
1719
1720
1721
1722

1723
1724
1725
1726

1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737


1738
1739
1740
1741
1742
1743
1744
1745
1746
1747

1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773

1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787

1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820

1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
....
1844
1845
1846
1847
1848
1849
1850

1851
1852
1853

1854
1855
1856
1857
1858
1859

1860
1861
1862

1863
1864
1865
1866
1867
1868
1869
1870
1871
1872

1873
1874
1875

1876
1877
1878
1879
1880
1881
1882
1883
1884
1885

1886
1887
1888

1889
1890
1891
1892
1893
1894

1895
1896
1897

1898
1899
1900
1901
1902
1903

1904
1905
1906

1907
1908
1909
1910
1911
1912
1913

1914
1915
1916

1917
1918
1919
1920
1921
1922
1923

1924
1925
1926

1927
1928
1929
1930
1931
1932
1933

1934
1935
1936

1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948

1949
1950
1951

1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965

1966
1967
1968

1969
1970
1971

1972
1973
1974

1975
1976
1977

1978
1979
1980

1981
1982
1983

1984
1985
1986

1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998

1999
2000
2001
2002

2003
2004
2005
2006
2007
2008
2009

2010
2011
2012
2013
2014
2015

2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035

2036
2037
2038
2039
2040


2041
2042

2043
2044
2045
2046
2047
2048
2049

2050
2051
2052
2053
2054
2055

2056
2057
2058

2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089

2090
2091
2092

2093
2094
2095

2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127

2128
2129
2130
2131
2132
2133
2134
2135

2136
2137
2138
2139
2140
2141
2142
2143
2144
2145

2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156

2157
2158
2159
2160
2161
2162
2163
2164
2165

2166
2167

2168
2169
2170
2171
2172
2173
2174
2175
2176

2177
2178
2179
2180
2181



#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;


/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* TODO: this is always defined, so inline it */
#define yyconst const




#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))








#else
#define yynoreturn
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE GeoJsonrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )






#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via GeoJsonrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void GeoJsonrestart (FILE *input_file ,yyscan_t yyscanner );
void GeoJson_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE GeoJson_create_buffer (FILE *file,int size ,yyscan_t yyscanner );

void GeoJson_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void GeoJson_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void GeoJsonpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void GeoJsonpop_buffer_state (yyscan_t yyscanner );

static void GeoJsonensure_buffer_stack (yyscan_t yyscanner );
static void GeoJson_load_buffer_state (yyscan_t yyscanner );
static void GeoJson_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );


#define YY_FLUSH_BUFFER GeoJson_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE GeoJson_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );

YY_BUFFER_STATE GeoJson_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE GeoJson_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );


void *GeoJsonalloc (yy_size_t ,yyscan_t yyscanner );
void *GeoJsonrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void GeoJsonfree (void * ,yyscan_t yyscanner );

#define yy_new_buffer GeoJson_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        GeoJsonensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);

static int yy_get_next_buffer (yyscan_t yyscanner );
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 27
#define YY_END_OF_BUFFER 28
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[239] =
    {   0,
        0,    0,   28,   26,   24,   25,   26,   26,    4,   26,
        1,    1,    5,    8,    9,    6,    7,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    1,
        1,    0,    1,    1,    1,    1,    1,    1,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    0,    0,    0,    0,    0,    0,    0,    0,   16,


        0,    0,    0,    0,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    0,    0,    0,   13,    0,    0,   14,
        0,   10,    0,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    0,    0,    0,    0,    0,
        0,   17,    0,    0,    0,    0,    0,    1,    1,    1,
        1,    2,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,   19,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,

       18,    0,   20,    0,    0,   12,   15,    0,    0,    0,
        0,   11,    0,    0,    0,   22,    0,    0,    0,    0,
        0,    0,    0,    0,   21,    0,    0,    0,    0,    0,
       23,    0,    0,    0,    0,    0,    3,    0
    } ;

static yyconst YY_CHAR yy_ec[256] =







    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    2,    1,    4,    1,    1,    1,    1,    1,    1,
        1,    1,    5,    6,    7,    8,    1,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,   10,    1,    1,
        1,    1,    1,    1,    1,    1,   11,    1,   12,    1,
       13,    1,    1,    1,    1,   14,   15,    1,    1,   16,
        1,    1,   17,    1,    1,    1,    1,    1,    1,    1,
       18,    1,   19,    1,    1,    1,   20,   21,   22,   23,




       24,   25,   26,    1,   27,    1,    1,   28,   29,   30,
       31,   32,    1,   33,   34,   35,   36,    1,    1,   37,
       38,    1,   39,    1,   40,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,


        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst YY_CHAR yy_meta[41] =

    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1
    } ;




static yyconst flex_uint16_t yy_base[240] =
    {   0,
        0,   39,  302,  303,  303,  303,   68,    3,  303,   12,
      292,    5,  303,  303,  303,  303,  303,  284,  275,  271,
      261,  265,  274,    0,  270,  273,  259,  253,  257,  280,
       14,   15,  279,   44,   50,  278,   52,   23,  269,  254,
      254,  255,    7,  251,  250,  246,  248,  249,  246,  244,
      245,   61,  265,   58,   63,  264,   86,   92,   93,  263,
      262,  261,  256,  239,  243,  231,  235,  226,  226,  229,
      257,  231,  235,  226,  233,  246,  101,  100,  246,  245,
      244,  106,  107,  243,  242,  241,  240,  239,  238,  113,
      237,  235,  220,  226,  215,  206,  214,  235,  215,  303,


      213,  232,  211,  230,  202,  223,  222,  221,  116,  220,
      219,  218,  217,  121,  216,  215,  214,  213,  212,  211,
       62,  184,  183,   72,  213,  185,  303,  188,  179,  303,
      180,  303,  186,  202,  201,  200,  199,  198,  197,  196,
      195,  194,  193,  192,  191,  190,   46,  165,  164,  169,
      164,  303,  164,  163,  159,  156,  168,  180,  179,  178,
      177,  303,  147,  157,  153,    9,  178,  161,  153,  152,
      168,  166,  146,  151,  144,  135,  303,  137,  147,  146,
      146,  137,  141,  149,  130,  138,  139,  128,  127,  136,
      131,  154,  122,  152,  124,  120,  149,  148,  126,  122,



      303,  116,  303,  118,  143,  303,  303,  136,  121,  117,
      139,  303,  120,  119,  110,  303,  106,  103,  110,  101,
      107,  129,  104,   76,  303,   84,   62,   61,   62,   37,
      303,   12,   14,  120,    6,  128,  303,  303,    0







    } ;

static yyconst flex_int16_t yy_def[240] =
    {   0,
      239,  239,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,







      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,







      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,    0,  238





    } ;

static yyconst flex_uint16_t yy_nxt[344] =
    {   0,
        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
       30,   31,   36,   37,  236,   32,   38,   14,   15,   33,
       34,   53,   31,  234,  233,   54,   18,   60,   38,   61,
       45,   62,   46,   67,   68,  175,  176,   54,   16,   17,
        5,    6,    7,    8,    9,   10,   11,   12,   13,  162,
       29,   56,   34,  232,  147,   57,   14,   15,   35,   36,
       37,   58,   79,   38,   80,  231,   81,   57,  146,   52,
      147,   55,   77,   58,   82,   38,  230,   16,   17,   18,
       19,   20,   21,   22,   77,  150,   82,  151,   23,   24,
       84,  229,   85,   25,   86,  228,   87,   26,   88,   27,


       89,   59,   28,   29,   90,  106,  227,  107,   78,  108,
      111,  109,  112,  226,  113,   83,   90,  118,  114,  119,
      136,  120,  137,  109,  138,  141,  235,  142,  236,  143,
      114,  237,  225,  224,  223,  222,  236,  221,  220,  219,
      218,  217,  216,  215,  214,  213,  212,  211,  210,  209,
      208,  207,  206,  205,  204,  203,  202,  201,  200,  199,
      198,  197,  196,  195,  194,  193,  192,  191,  190,  189,
      188,  187,  186,  185,  184,  183,  182,  181,  180,  179,
      178,  177,  174,  173,  172,  161,  160,  159,  158,  171,
      170,  169,  168,  167,  166,  165,  164,  163,  147,  145,






      144,  143,  161,  160,  140,  139,  138,  159,  158,  135,
      134,  157,  156,  155,  154,  153,  152,  149,  148,  120,
      145,  144,  117,  116,  115,  113,  140,  139,  110,  108,
      135,  134,  133,  132,  131,  130,  129,  128,  127,  126,
      125,  124,  123,  122,  121,   91,   89,  117,  116,   86,
       86,  115,   81,   81,  110,  105,  104,  103,  102,  101,
      100,   99,   98,   97,   96,   95,   94,   93,   92,   62,
       62,   91,   83,   78,   76,   75,   74,   73,   72,   71,
       70,   69,   66,   65,   64,   63,   59,   55,   52,   51,
       50,   49,   48,   47,   44,   43,   42,   41,   40,   39,

       35,  238,    3,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238





    } ;

static yyconst flex_int16_t yy_chk[344] =
    {   0,
      239,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        8,    8,   12,   12,  235,   10,   12,    1,    1,   10,
       10,   31,   31,  233,  232,   31,   32,   38,   12,   38,
       24,   38,   24,   43,   43,  166,  166,   31,    1,    1,
        2,    2,    2,    2,    2,    2,    2,    2,    2,  147,
       32,   34,   34,  230,  147,   34,    2,    2,   35,   37,
       37,   35,   54,   37,   54,  229,   54,   34,  121,   52,
      121,   55,   52,   35,   55,   37,  228,    2,    2,    7,
        7,    7,    7,    7,   52,  124,   55,  124,    7,    7,
       57,  227,   57,    7,   57,  226,   58,    7,   58,    7,

       58,   59,    7,    7,   59,   77,  224,   77,   78,   77,
       82,   78,   82,  223,   82,   83,   59,   90,   83,   90,
      109,   90,  109,   78,  109,  114,  234,  114,  234,  114,
       83,  236,  222,  221,  220,  219,  236,  218,  217,  215,
      214,  213,  211,  210,  209,  208,  205,  204,  202,  200,
      199,  198,  197,  196,  195,  194,  193,  192,  191,  190,
      189,  188,  187,  186,  185,  184,  183,  182,  181,  180,
      179,  178,  176,  175,  174,  173,  172,  171,  170,  169,
      168,  167,  165,  164,  163,  161,  160,  159,  158,  157,
      156,  155,  154,  153,  151,  150,  149,  148,  146,  145,

      144,  143,  142,  141,  140,  139,  138,  137,  136,  135,
      134,  133,  131,  129,  128,  126,  125,  123,  122,  120,
      119,  118,  117,  116,  115,  113,  112,  111,  110,  108,
      107,  106,  105,  104,  103,  102,  101,   99,   98,   97,
       96,   95,   94,   93,   92,   91,   89,   88,   87,   86,
       85,   84,   81,   80,   79,   76,   75,   74,   73,   72,
       71,   70,   69,   68,   67,   66,   65,   64,   63,   62,
       61,   60,   56,   53,   51,   50,   49,   48,   47,   46,
       45,   44,   42,   41,   40,   39,   36,   33,   30,   29,
       28,   27,   26,   25,   23,   22,   21,   20,   19,   18,

       11,    3,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238
    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct geoJson_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

int GeoJsonlex_init (yyscan_t* scanner);

int GeoJsonlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int GeoJsonlex_destroy (yyscan_t yyscanner );

int GeoJsonget_debug (yyscan_t yyscanner );

void GeoJsonset_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE GeoJsonget_extra (yyscan_t yyscanner );

void GeoJsonset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *GeoJsonget_in (yyscan_t yyscanner );

void GeoJsonset_in  (FILE * _in_str ,yyscan_t yyscanner );

FILE *GeoJsonget_out (yyscan_t yyscanner );

void GeoJsonset_out  (FILE * _out_str ,yyscan_t yyscanner );

			int GeoJsonget_leng (yyscan_t yyscanner );

char *GeoJsonget_text (yyscan_t yyscanner );

int GeoJsonget_lineno (yyscan_t yyscanner );

void GeoJsonset_lineno (int _line_number ,yyscan_t yyscanner );

int GeoJsonget_column  (yyscan_t yyscanner );

void GeoJsonset_column (int _column_no ,yyscan_t yyscanner );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int GeoJsonwrap (yyscan_t yyscanner );
#else
extern int GeoJsonwrap (yyscan_t yyscanner );
#endif
#endif

#ifndef YY_NO_UNPUT
    
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
#else
static int input (yyscan_t yyscanner );
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {

			GeoJsonensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				GeoJson_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
		}

		GeoJson_load_buffer_state(yyscanner );
		}

	{

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = yyg->yy_start;
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				yyg->yy_last_accepting_state = yy_current_state;
				yyg->yy_last_accepting_cpos = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )

				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 239 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}

			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 303 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = yyg->yy_hold_char;
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			goto yy_find_action;

case 1:
YY_RULE_SETUP
{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = atof(yytext); return GEOJSON_NUM; }
	YY_BREAK

case 2:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.ival = atoi(yytext+6); return GEOJSON_SHORT_SRID; }
	YY_BREAK

case 3:

YY_RULE_SETUP
{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext);  GeoJsonget_extra(yyscanner)->GeoJsonLval.ival = atoi(yytext+22); return GEOJSON_LONG_SRID; }







	YY_BREAK
case 4:







YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COMMA; }


	YY_BREAK
case 5:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COLON; }


	YY_BREAK
case 6:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_OPEN_BRACE; }


	YY_BREAK
case 7:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_CLOSE_BRACE; }


	YY_BREAK
case 8:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_OPEN_BRACKET; }


	YY_BREAK
case 9:
YY_RULE_SETUP


{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_CLOSE_BRACKET; }

	YY_BREAK
case 10:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_TYPE; }


	YY_BREAK
case 11:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_COORDS; }


	YY_BREAK
case 12:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_GEOMS; }


	YY_BREAK
case 13:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_BBOX; }


	YY_BREAK
case 14:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_NAME; }


	YY_BREAK
case 15:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_PROPS; }


	YY_BREAK
case 16:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_CRS; }


	YY_BREAK
case 17:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_POINT; }


	YY_BREAK
case 18:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_LINESTRING; }


	YY_BREAK
case 19:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_POLYGON; }


	YY_BREAK
case 20:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_MULTIPOINT; }


	YY_BREAK
case 21:
YY_RULE_SETUP


{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_MULTILINESTRING; }

	YY_BREAK
case 22:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_MULTIPOLYGON; }


	YY_BREAK
case 23:
YY_RULE_SETUP


{ GeoJsonget_extra(yyscanner)->GeoJsonLval.dval = 0; return GEOJSON_GEOMETRYCOLLECTION; }

	YY_BREAK
case 24:
YY_RULE_SETUP



{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext); }               /* ignore but count white space */
	YY_BREAK
case 25:
/* rule 25 can match eol */
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->geoJson_col = 0; GeoJsonget_extra(yyscanner)->geoJson_line++; }


	YY_BREAK
case 26:
YY_RULE_SETUP

{ GeoJsonget_extra(yyscanner)->geoJson_col += (int) strlen(yytext); return -1; }
	YY_BREAK
case 27:



YY_RULE_SETUP
ECHO;
	YY_BREAK
case YY_STATE_EOF(INITIAL):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */

		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )

			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * GeoJsonlex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */

			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;

			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */

		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;


			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);


			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
				}
			}


		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( GeoJsonwrap(yyscanner ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of GeoJsonlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = yyg->yytext_ptr;
	yy_size_t number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					GeoJsonrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			GeoJsonrestart(yyin  ,yyscanner);
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) GeoJsonrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	yyg->yy_n_chars += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 239 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
{
	int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
	char *yy_cp = yyg->yy_c_buf_p;

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 239 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
	yy_is_jam = (yy_current_state == 238);

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (yyscan_t yyscanner)
#else
    static int input  (yyscan_t yyscanner)
#endif

{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					GeoJsonrestart(yyin ,yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( GeoJsonwrap(yyscanner ) )
						return 0;

					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput(yyscanner);
#else
					return input(yyscanner);
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
	yyg->yy_hold_char = *++yyg->yy_c_buf_p;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */













/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */

    void GeoJsonrestart  (FILE * input_file , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! YY_CURRENT_BUFFER ){

        GeoJsonensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            GeoJson_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
	}

	GeoJson_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);

	GeoJson_load_buffer_state(yyscanner );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
    void GeoJson_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	/* TODO. We should be able to replace this entire function body
	 * with
	 *		GeoJsonpop_buffer_state();
	 *		GeoJsonpush_buffer_state(new_buffer);
     */
	GeoJsonensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	GeoJson_load_buffer_state(yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (GeoJsonwrap()) processing, but the only time this flag
	 * is looked at is after GeoJsonwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}


static void GeoJson_load_buffer_state  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE GeoJson_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) GeoJsonalloc(sizeof( struct yy_buffer_state ) ,yyscanner );

	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in GeoJson_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) GeoJsonalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in GeoJson_create_buffer()" );

	b->yy_is_our_buffer = 1;

	GeoJson_init_buffer(b,file ,yyscanner);

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with GeoJson_create_buffer()
 * @param yyscanner The scanner object.
 */

    void GeoJson_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		GeoJsonfree((void *) b->yy_ch_buf ,yyscanner );

	GeoJsonfree((void *) b ,yyscanner );

}





/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a GeoJsonrestart() or at EOF.
 */
    static void GeoJson_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)


{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	GeoJson_flush_buffer(b ,yyscanner);

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then GeoJson_init_buffer was _probably_
     * called from GeoJsonrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){

        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */

    void GeoJson_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		GeoJson_load_buffer_state(yyscanner );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */

void GeoJsonpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (new_buffer == NULL)
		return;

	GeoJsonensure_buffer_stack(yyscanner);

	/* This block is copied from GeoJson_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from GeoJson_switch_to_buffer. */
	GeoJson_load_buffer_state(yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */

void GeoJsonpop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!YY_CURRENT_BUFFER)
		return;

	GeoJson_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {

		GeoJson_load_buffer_state(yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */

static void GeoJsonensure_buffer_stack (yyscan_t yyscanner)
{
	int num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if (!yyg->yy_buffer_stack) {


		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		yyg->yy_buffer_stack = (struct yy_buffer_state**)GeoJsonalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in GeoJsonensure_buffer_stack()" );
								  
		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));

				
		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){


		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)GeoJsonrealloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in GeoJsonensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));

		yyg->yy_buffer_stack_max = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE GeoJson_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)


{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return NULL;

	b = (YY_BUFFER_STATE) GeoJsonalloc(sizeof( struct yy_buffer_state ) ,yyscanner );

	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in GeoJson_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	GeoJson_switch_to_buffer(b ,yyscanner );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to GeoJsonlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       GeoJson_scan_bytes() instead.
 */

YY_BUFFER_STATE GeoJson_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
    
	return GeoJson_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to GeoJsonlex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE GeoJson_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	yy_size_t i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) _yybytes_len + 2;
	buf = (char *) GeoJsonalloc(n ,yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in GeoJson_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = GeoJson_scan_buffer(buf,n ,yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in GeoJson_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif


static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */

YY_EXTRA_TYPE GeoJsonget_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */

int GeoJsonget_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */

int GeoJsonget_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */

FILE *GeoJsonget_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */

FILE *GeoJsonget_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */

int GeoJsonget_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */


char *GeoJsonget_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */

void GeoJsonset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyextra = user_defined ;
}

/** Set the current line number.
 * @param _line_number line number
 * @param yyscanner The scanner object.
 */

void GeoJsonset_lineno (int  _line_number , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "GeoJsonset_lineno called with no buffer" );
    
    yylineno = _line_number;
}

/** Set the current column.
 * @param _column_no column number
 * @param yyscanner The scanner object.
 */

void GeoJsonset_column (int  _column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "GeoJsonset_column called with no buffer" );
    
    yycolumn = _column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see GeoJson_switch_to_buffer
 */

void GeoJsonset_in (FILE *  _in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyin = _in_str ;
}


void GeoJsonset_out (FILE *  _out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyout = _out_str ;
}


int GeoJsonget_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yy_flex_debug;
}


void GeoJsonset_debug (int  _bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yy_flex_debug = _bdebug ;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* GeoJsonlex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */


int GeoJsonlex_init(yyscan_t* ptr_yy_globals)

{
    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) GeoJsonalloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));


    return yy_init_globals ( *ptr_yy_globals );
}

/* GeoJsonlex_init_extra has the same functionality as GeoJsonlex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to GeoJsonalloc in
 * the yyextra field.
 */

int GeoJsonlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )

{
    struct yyguts_t dummy_yyguts;

    GeoJsonset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }
	
    *ptr_yy_globals = (yyscan_t) GeoJsonalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );


	
    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }
    
    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    
    GeoJsonset_extra (yy_user_defined, *ptr_yy_globals);
    
    return yy_init_globals ( *ptr_yy_globals );
}


static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from GeoJsonlex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = NULL;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = NULL;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * GeoJsonlex_init()
     */
    return 0;
}

/* GeoJsonlex_destroy is for both reentrant and non-reentrant scanners. */

int GeoJsonlex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){

		GeoJson_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		GeoJsonpop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	GeoJsonfree(yyg->yy_buffer_stack ,yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        GeoJsonfree(yyg->yy_start_stack ,yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * GeoJsonlex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    GeoJsonfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN

static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif


void *GeoJsonalloc (yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	return malloc(size);
}

void *GeoJsonrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);

}


void GeoJsonfree (void * ptr , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	free( (char *) ptr );	/* see GeoJsonrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"


int GeoJsonwrap(yyscan_t yyscanner )
{
  return 1;
}

>
>







|
|







 







|


>







 







|

|

|
|

>
>
>
|
<
>
>
>
>
>
>
>
>

|







 







|







 







<
<
<
<
<
<
<

<











<
<
<
<
<




|
<
|





|










>
>
>
>
>



|
|

|
|

|
|
|
|

|
|
|
|

|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|



|
|
|
|
|

|



|
|
|
|
|
|
|
|
|
|


|







 







|
|
|
>
|
|
|
|

|
|
|
>



|
>
|
|
>

|
|
|







 







|
|
>
|
|






|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

>
|
|
|
|
|
|
|
<
<
<
|
<
<
<
<
|

|
>
>
>
>
>
>
>
|
|
|
<
>
|
|
|
|
|
|
|
>
>
>

<
<
<
|
|
|
|
|
|
<
>

|
|
|
|
|
<
|

|
>
|
|
|
|
|
|
>
>
>

<
<
<
|
|
|
|
|
|
|
|
|
>

<
|
|
|
|
|
|
|
|
|
>
>

<
<
|
|
>
>
>
>
>
>
>
|

|
<
<
<
<
<
<
<
|
|
|
|
>
>
>
>
>
>

<
<
<
<
<
<
|
|
|
|
>
>
>
>
>
>

<
<
<
<
>
>
>
>
>
|

|
<
<
<
<
<
<
<
|
|
|
|
<
>
|
|
|
|
|
<
<
<
<
<

>
>
>
>
>
|
|
|
|
|
<
<
<
<
<

<
<
<
<
<
>
>
>
>
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|






|
|
|











|








|

|

|

|




|

|

|

|

|

|

|

|

|

|

|

|

|

|

|







|

|

<
<
<
<



|



|





|

|






<
<
<
<

<







|










|












|







 







|









|
|
|
|

|
|
|


|


|
|

|
|

|
|

|
>
|
|
|
|

|
|

<
<
|
|
|

|
|

|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
>
|
|
|
|

|
|
|
|
|
|
|
|

|

|

|
|
|
|
|
|
|
|

|
|
<
<
>
|
<
>
|
<
>
|
>
|
<
>
>
>
>
>
>
>
|
<
>
>
>
>
>
>
>
|
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
>
|
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
>
|
>
|
<
<
>
|
>
>
|
<
<
>
>
|
>
|
<
<
>
>
>
|
|
<

|
>
|
>
>
|
<
<
>
|
<
<
>
>
>
|
<
<
|
<

|

|
>
|

|
|
|
<
|
>
|
|
|
|
|
|
|
|
|
|
>
|
|
|
>
|

|
|
|
|
|
|
|
>
|
|
|

>
|

|

|
|
|
|
|
|
|
|

|
>

|

|
|




|

|
|


|
|

>
|
|
|
|
|

|
|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>






>
|

<
>

|
>
|
|
|
|

<
>
|






|
>

<
>

|
|
|
|

|
|
|

|
|
|
|
|
|
|

|
|

|
|
|
|
|
|


>
|

<
>
|
|
|
|








|
>

|
|
|
>
|
|

|

|
|
|
|
|
|

|

|

|






>
|

<
>

|
|

|
|

|
|

<
>


>
>
>
>




|
>
|
<
|
|

|

|
|





|
>
|
|
|

|
|
|






>
|

<
>
|
|

|

|
|
|
|
|
|

|

|
|

|
|








>
|

<
>
|
|

|

|
|
|
|
|
|
|
|

|
|
|
|

|
|
|






>
|

<
>
|
|

|
|
|
|

|
>
|
|
|





>
|

|
<
>

|
|
>
|
|
|
|
|
|
|
<
|
>
|
|
|
>
|
|
|
|
|

|
|
>
|
|

|
|
|
|
<
|
>
|

|
|
>
|
|








<
>
>

|
|
|
|
|
|
|

|
>
|
|

|
|
|
|
|
|
|
|
|

|

|










>
|

|
|




|
|



|
>

|
|
|
|
|
|
|
|
|
|

|
|

|

|
|
|

|
|
|
|

|






>
|

<
<
|
|









|







 







>
|

<
>






>
|

<
>
|
|
|
|






>
|

<
>
|
|
|
|






>
|

<
>






>
|

<
>






>
|

<
>







>
|

<
>







>
|

<
>
|



|


>
|

<
>

|
|
|
|
|



|


>
|

<
>

|
|
|
|
|




|



>
|

<
>
|


>
|

<
>
|


>
|

<
>



>
|

<
>
|











>
|
|
<
|
>
|
|
|

|

|
>
|
|
|


<
>

|










|
|





|
>
|
|
|
|
<
>
>
|
|
>
|
|
|
|

|
<
>
|

|
|


>
|

<
>




|


|





|






|
|









>
|

<
>


|
>
|
|
|
|

|
|
|


|
|



|


|









<
<
<
|
>
|
|
|
|




>
|

|
|
|

|



>
|

<
|
<


<
<
<
|
>
|
|
|
|
|
|
|
|
<
>


>
|

<
<
|




>
|

|

<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159







160

161
162
163
164
165
166
167
168
169
170
171





172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
...
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372

373
374
375
376
377
378
379
380
381



382




383
384
385
386
387
388
389
390
391
392
393
394
395

396
397
398
399
400
401
402
403
404
405
406
407



408
409
410
411
412
413

414
415
416
417
418
419
420

421
422
423
424
425
426
427
428
429
430
431
432
433
434



435
436
437
438
439
440
441
442
443
444
445

446
447
448
449
450
451
452
453
454
455
456
457


458
459
460
461
462
463
464
465
466
467
468
469







470
471
472
473
474
475
476
477
478
479
480






481
482
483
484
485
486
487
488
489
490
491




492
493
494
495
496
497
498
499







500
501
502
503

504
505
506
507
508
509





510
511
512
513
514
515
516
517
518
519
520





521





522
523
524
525
526
527










































528
529
530
531
532
533
534
...
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683




684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705




706

707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
...
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834


835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893


894
895

896
897

898
899
900
901

902
903
904
905
906
907
908
909

910
911
912
913
914
915
916
917
918
919
920
921
922


923
924
925
926
927


928
929
930
931
932


933
934
935
936
937


938
939
940
941
942


943
944
945
946
947


948
949
950
951
952


953
954
955
956
957


958
959
960
961
962


963
964
965
966
967


968
969
970
971
972


973
974
975
976
977


978
979
980
981
982


983
984
985
986
987


988
989
990
991
992


993
994
995
996
997


998
999
1000
1001
1002


1003
1004
1005
1006
1007


1008
1009
1010
1011
1012


1013
1014
1015
1016
1017


1018
1019
1020
1021
1022

1023
1024
1025
1026
1027
1028
1029


1030
1031


1032
1033
1034
1035


1036

1037
1038
1039
1040
1041
1042
1043
1044
1045
1046

1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473

1474
1475
1476
1477
1478
1479
1480
1481
1482

1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493

1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526

1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572

1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583

1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597

1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627

1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658

1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690

1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713

1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725

1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747

1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764

1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855


1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
....
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884

1885
1886
1887
1888
1889
1890
1891
1892
1893
1894

1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908

1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922

1923
1924
1925
1926
1927
1928
1929
1930
1931
1932

1933
1934
1935
1936
1937
1938
1939
1940
1941
1942

1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953

1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964

1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975

1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991

1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009

2010
2011
2012
2013
2014
2015
2016

2017
2018
2019
2020
2021
2022
2023

2024
2025
2026
2027
2028
2029
2030

2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046

2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061

2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087

2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098

2099
2100
2101
2102
2103
2104
2105
2106
2107
2108

2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143

2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176



2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200

2201

2202
2203



2204
2205
2206
2207
2208
2209
2210
2211
2212
2213

2214
2215
2216
2217
2218
2219


2220
2221
2222
2223
2224
2225
2226
2227
2228
2229


#line 3 "lex.GeoJson.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)


#define YY_USE_CONST

#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void *yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE GeoJsonrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE







#define YY_BUF_SIZE 16384

#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif






#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

#define YY_LESS_LINENO(n)


/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
    FILE *yy_input_file;

    char *yy_ch_buf;		/* input buffer */
    char *yy_buf_pos;		/* current position in input buffer */

    /* Size of input buffer in bytes, not including room for EOB
     * characters.
     */
    yy_size_t yy_buf_size;

    /* Number of characters read into yy_ch_buf, not including EOB
     * characters.
     */
    int yy_n_chars;

    /* Whether we "own" the buffer - i.e., we know we created it,
     * and can realloc() it to grow it, and should free() it to
     * delete it.
     */
    int yy_is_our_buffer;

    /* Whether this is an "interactive" input source; if so, and
     * if we're using stdio for input, then we want to use getc()
     * instead of fread(), to make sure we stop fetching input after
     * each newline.
     */
    int yy_is_interactive;

    /* Whether we're considered to be at the beginning of a line.
     * If so, '^' rules will be active on the next match, otherwise
     * not.
     */
    int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

    /* Whether to try to fill the input buffer when we reach the
     * end of it.
     */
    int yy_fill_buffer;

    int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
    /* When an EOF's been seen but there's still some text to process
     * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     * shouldn't try reading from the input source any more.  We might
     * still have a bunch of tokens to match, though, because of
     * possible backing-up.
     *
     * When we actually see the EOF, we change the status to "new"
     * (via GeoJsonrestart()), so that the user can continue scanning by
     * just pointing yyin at a new input file.
     */
#define YY_BUFFER_EOF_PENDING 2

};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void GeoJsonrestart (FILE * input_file, yyscan_t yyscanner);
void GeoJson_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
YY_BUFFER_STATE GeoJson_create_buffer (FILE * file, int size,
				       yyscan_t yyscanner);
void GeoJson_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void GeoJson_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void GeoJsonpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
void GeoJsonpop_buffer_state (yyscan_t yyscanner);

static void GeoJsonensure_buffer_stack (yyscan_t yyscanner);
static void GeoJson_load_buffer_state (yyscan_t yyscanner);
static void GeoJson_init_buffer (YY_BUFFER_STATE b, FILE * file,
				 yyscan_t yyscanner);

#define YY_FLUSH_BUFFER GeoJson_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE GeoJson_scan_buffer (char *base, yy_size_t size,
				     yyscan_t yyscanner);
YY_BUFFER_STATE GeoJson_scan_string (yyconst char *yy_str, yyscan_t yyscanner);
YY_BUFFER_STATE GeoJson_scan_bytes (yyconst char *bytes, int len,
				    yyscan_t yyscanner);

void *GeoJsonalloc (yy_size_t, yyscan_t yyscanner);
void *GeoJsonrealloc (void *, yy_size_t, yyscan_t yyscanner);
void GeoJsonfree (void *, yyscan_t yyscanner);

#define yy_new_buffer GeoJson_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        GeoJsonensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner);
static yy_state_type yy_try_NUL_trans (yy_state_type current_state,
				       yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner);
static void yy_fatal_error (yyconst char msg[], yyscan_t yyscanner);

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (size_t) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 27
#define YY_END_OF_BUFFER 28
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
{
    flex_int32_t yy_verify;
    flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[182] = { 0,
    0, 0, 28, 26, 24, 25, 26, 26, 4, 26,
    1, 5, 8, 9, 6, 7, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
    1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
    0, 0, 0, 16, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 13, 0, 0, 14, 0,
    10, 0, 0, 0, 0, 0, 0, 0, 17, 0,


    0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 18, 0, 20, 0, 0, 12, 15,
    0, 0, 0, 0, 11, 0, 0, 0, 22, 0,
    0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
    0, 0, 0, 23, 0, 0, 0, 0, 0, 3,



    0




};

static yyconst flex_int32_t yy_ec[256] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 2, 1, 4, 1, 1, 1, 1, 1, 1,
    1, 1, 5, 6, 7, 8, 1, 9, 9, 9,
    9, 9, 9, 9, 9, 9, 9, 10, 1, 1,
    1, 1, 1, 1, 1, 1, 11, 1, 12, 1,
    13, 1, 1, 1, 1, 14, 15, 1, 1, 16,
    1, 1, 17, 1, 1, 1, 1, 1, 1, 1,
    18, 1, 19, 1, 1, 1, 20, 21, 22, 23,


    24, 25, 26, 1, 27, 1, 1, 28, 29, 30,
    31, 32, 1, 33, 34, 35, 36, 1, 1, 37,
    38, 1, 39, 1, 40, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,




    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1

};

static yyconst flex_int32_t yy_meta[41] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1

};

static yyconst flex_int16_t yy_base[183] = { 0,
    0, 39, 203, 204, 204, 204, 68, 193, 204, 4,
    3, 204, 204, 204, 204, 204, 185, 176, 172, 162,
    166, 175, 0, 171, 174, 160, 154, 158, 6, 11,
    8, 181, 12, 172, 157, 157, 158, 0, 154, 153,
    149, 151, 152, 149, 147, 148, 168, 167, 166, 161,
    144, 148, 136, 140, 131, 131, 134, 162, 136, 140,
    131, 138, 151, 151, 150, 148, 133, 139, 128, 119,
    127, 148, 128, 204, 126, 145, 124, 143, 115, 15,
    110, 109, 16, 139, 111, 204, 114, 105, 204, 106,
    204, 112, 128, 25, 103, 102, 107, 102, 204, 102,




    101, 97, 94, 106, 204, 89, 99, 95, 8, 120,
    103, 95, 94, 110, 108, 88, 93, 86, 77, 204,
    79, 89, 88, 88, 79, 83, 91, 72, 80, 81,
    68, 67, 75, 69, 92, 60, 89, 61, 57, 84,
    83, 61, 57, 204, 44, 204, 46, 71, 204, 204,
    64, 49, 45, 67, 204, 48, 47, 38, 204, 34,
    31, 39, 30, 36, 58, 51, 29, 204, 47, 25,
    38, 49, 21, 204, 24, 16, 43, 16, 47, 204,
    204, 0
};


static yyconst flex_int16_t yy_def[183] = { 0,
    182, 182, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,



    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    0, 181
};

static yyconst flex_int16_t yy_nxt[245] = { 0,







    4, 5, 6, 7, 8, 9, 10, 30, 11, 12,
    32, 33, 31, 47, 29, 48, 31, 13, 14, 32,
    33, 93, 17, 94, 179, 177, 54, 55, 105, 97,
    40, 98, 41, 94, 118, 119, 176, 175, 15, 16,
    5, 6, 7, 8, 9, 10, 28, 11, 12, 178,
    180, 179, 174, 173, 172, 179, 13, 14, 171, 170,
    169, 168, 167, 166, 165, 164, 163, 162, 161, 160,
    159, 158, 157, 156, 155, 154, 153, 15, 16, 17,
    18, 19, 20, 21, 152, 151, 150, 149, 22, 23,
    148, 147, 146, 24, 145, 144, 143, 25, 142, 26,







    141, 140, 27, 28, 139, 138, 137, 136, 135, 134,
    133, 132, 131, 130, 129, 128, 127, 126, 125, 124,
    123, 122, 121, 120, 117, 116, 115, 114, 113, 112,
    111, 110, 109, 108, 107, 106, 94, 104, 103, 102,
    101, 100, 99, 96, 95, 92, 91, 90, 89, 88,
    87, 86, 85, 84, 83, 82, 81, 80, 65, 64,
    79, 78, 77, 76, 75, 74, 73, 72, 71, 70,
    69, 68, 67, 66, 49, 65, 64, 63, 62, 61,
    60, 59, 58, 57, 56, 53, 52, 51, 50, 49,
    46, 45, 44, 43, 42, 39, 38, 37, 36, 35,





    34, 29, 181, 3, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181
};

static yyconst flex_int16_t yy_chk[245] = { 0,







    182, 1, 1, 1, 1, 1, 1, 10, 1, 1,
    11, 11, 10, 29, 29, 31, 31, 1, 1, 33,
    33, 80, 30, 80, 178, 176, 38, 38, 94, 83,
    23, 83, 23, 94, 109, 109, 175, 173, 1, 1,

    2, 2, 2, 2, 2, 2, 30, 2, 2, 177,
    179, 177, 172, 171, 170, 179, 2, 2, 169, 167,
    166, 165, 164, 163, 162, 161, 160, 158, 157, 156,
    154, 153, 152, 151, 148, 147, 145, 2, 2, 7,
    7, 7, 7, 7, 143, 142, 141, 140, 7, 7,
    139, 138, 137, 7, 136, 135, 134, 7, 133, 7,






    132, 131, 7, 7, 130, 129, 128, 127, 126, 125,
    124, 123, 122, 121, 119, 118, 117, 116, 115, 114,
    113, 112, 111, 110, 108, 107, 106, 104, 103, 102,
    101, 100, 98, 97, 96, 95, 93, 92, 90, 88,
    87, 85, 84, 82, 81, 79, 78, 77, 76, 75,
    73, 72, 71, 70, 69, 68, 67, 66, 65, 64,
    63, 62, 61, 60, 59, 58, 57, 56, 55, 54,
    53, 52, 51, 50, 49, 48, 47, 46, 45, 44,
    43, 42, 41, 40, 39, 37, 36, 35, 34, 32,
    28, 27, 26, 25, 24, 22, 21, 20, 19, 18,











    17, 8, 3, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
    181, 181, 181, 181
};











































/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct geoJson_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
{

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top;	/**< index of top of stack. */
    size_t yy_buffer_stack_max;	/**< capacity of stack. */
    YY_BUFFER_STATE *yy_buffer_stack;  /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char *yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

};				/* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner);

int GeoJsonlex_init (yyscan_t * scanner);

int GeoJsonlex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t * scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int GeoJsonlex_destroy (yyscan_t yyscanner);

int GeoJsonget_debug (yyscan_t yyscanner);

void GeoJsonset_debug (int debug_flag, yyscan_t yyscanner);

YY_EXTRA_TYPE GeoJsonget_extra (yyscan_t yyscanner);

void GeoJsonset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);

FILE *GeoJsonget_in (yyscan_t yyscanner);

void GeoJsonset_in (FILE * in_str, yyscan_t yyscanner);

FILE *GeoJsonget_out (yyscan_t yyscanner);

void GeoJsonset_out (FILE * out_str, yyscan_t yyscanner);

int GeoJsonget_leng (yyscan_t yyscanner);

char *GeoJsonget_text (yyscan_t yyscanner);

int GeoJsonget_lineno (yyscan_t yyscanner);

void GeoJsonset_lineno (int line_number, yyscan_t yyscanner);

int GeoJsonget_column (yyscan_t yyscanner);

void GeoJsonset_column (int column_no, yyscan_t yyscanner);

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int GeoJsonwrap (yyscan_t yyscanner);
#else
extern int GeoJsonwrap (yyscan_t yyscanner);
#endif




#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *, yyconst char *, int, yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char *, yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner);
#else
static int input (yyscan_t yyscanner);
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE




#define YY_READ_BUF_SIZE 8192

#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		unsigned n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
    register yy_state_type yy_current_state;
    register char *yy_cp, *yy_bp;
    register int yy_act;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_init)
      {
	  yyg->yy_init = 1;

#ifdef YY_USER_INIT
	  YY_USER_INIT;
#endif

	  if (!yyg->yy_start)
	      yyg->yy_start = 1;	/* first start state */

	  if (!yyin)
	      yyin = stdin;

	  if (!yyout)
	      yyout = stdout;

	  if (!YY_CURRENT_BUFFER)
	    {
		GeoJsonensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
		    GeoJson_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
	    }

	  GeoJson_load_buffer_state (yyscanner);
      }



    while (1)			/* loops until end-of-file is reached */
      {
	  yy_cp = yyg->yy_c_buf_p;

	  /* Support of yytext. */
	  *yy_cp = yyg->yy_hold_char;

	  /* yy_bp points to the position in yy_ch_buf of the start of
	   * the current run.
	   */
	  yy_bp = yy_cp;

	  yy_current_state = yyg->yy_start;
	yy_match:
	  do
	    {
		register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI (*yy_cp)];
		if (yy_accept[yy_current_state])
		  {
		      yyg->yy_last_accepting_state = yy_current_state;
		      yyg->yy_last_accepting_cpos = yy_cp;
		  }
		while (yy_chk[yy_base[yy_current_state] + yy_c] !=
		       yy_current_state)
		  {
		      yy_current_state = (int) yy_def[yy_current_state];
		      if (yy_current_state >= 182)
			  yy_c = yy_meta[(unsigned int) yy_c];
		  }
		yy_current_state =
		    yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		++yy_cp;
	    }
	  while (yy_base[yy_current_state] != 204);

	yy_find_action:
	  yy_act = yy_accept[yy_current_state];
	  if (yy_act == 0)
	    {			/* have to back up */
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		yy_act = yy_accept[yy_current_state];
	    }

	  YY_DO_BEFORE_ACTION;

	do_action:		/* This label is used only to access EOF actions. */

	  switch (yy_act)
	    {			/* beginning of action switch */
	    case 0:		/* must back up */
		/* undo the effects of YY_DO_BEFORE_ACTION */
		*yy_cp = yyg->yy_hold_char;
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		goto yy_find_action;

	    case 1:
		YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->geoJson_col +=

			(int) strlen (yytext);
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval =

			atof (yytext);
		    return GEOJSON_NUM;
		}
		YY_BREAK case 2:YY_RULE_SETUP

		{
		    GeoJsonget_extra (yyscanner)->geoJson_col +=
			(int) strlen (yytext);
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.ival =
			atoi (yytext + 6);
		    return GEOJSON_SHORT_SRID;
		}
		YY_BREAK case 3:YY_RULE_SETUP

		{
		    GeoJsonget_extra (yyscanner)->geoJson_col +=
			(int) strlen (yytext);
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.ival =
			atoi (yytext + 22);
		    return GEOJSON_LONG_SRID;
		}
		YY_BREAK case 4:YY_RULE_SETUP
		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_COMMA;
		}
		YY_BREAK case 5:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_COLON;
		}
		YY_BREAK case 6:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_OPEN_BRACE;
		}
		YY_BREAK case 7:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_CLOSE_BRACE;
		}
		YY_BREAK case 8:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_OPEN_BRACKET;
		}
		YY_BREAK case 9:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_CLOSE_BRACKET;
		}
		YY_BREAK case 10:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_TYPE;
		}
		YY_BREAK case 11:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_COORDS;
		}
		YY_BREAK case 12:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_GEOMS;
		}
		YY_BREAK case 13:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_BBOX;
		}
		YY_BREAK case 14:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_NAME;
		}
		YY_BREAK case 15:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_PROPS;
		}
		YY_BREAK case 16:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_CRS;
		}
		YY_BREAK case 17:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_POINT;
		}
		YY_BREAK case 18:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_LINESTRING;
		}
		YY_BREAK case 19:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_POLYGON;
		}
		YY_BREAK case 20:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_MULTIPOINT;
		}
		YY_BREAK case 21:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_MULTILINESTRING;
		}
		YY_BREAK case 22:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_MULTIPOLYGON;
		}
		YY_BREAK case 23:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->GeoJsonLval.dval = 0;
		    return GEOJSON_GEOMETRYCOLLECTION;
		}
		YY_BREAK case 24:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->geoJson_col +=
			(int) strlen (yytext);
		}		/* ignore but count white space */
		YY_BREAK case 25:

/* rule 25 can match eol */
		  YY_RULE_SETUP
		{
		    GeoJsonget_extra (yyscanner)->geoJson_col = 0;
		    GeoJsonget_extra (yyscanner)->geoJson_line++;
		}
		YY_BREAK case 26:YY_RULE_SETUP


		{
		    GeoJsonget_extra (yyscanner)->geoJson_col +=


			(int) strlen (yytext);
		    return -1;
		}
		YY_BREAK case 27:YY_RULE_SETUP ECHO;


		YY_BREAK case YY_STATE_EOF (INITIAL):yyterminate ();


	    case YY_END_OF_BUFFER:
		{
		    /* Amount of text matched not including the EOB char. */
		    int yy_amount_of_matched_text =
			(int) (yy_cp - yyg->yytext_ptr) - 1;

		    /* Undo the effects of YY_DO_BEFORE_ACTION. */
		    *yy_cp = yyg->yy_hold_char;
		    YY_RESTORE_YY_MORE_OFFSET

			if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status ==
			    YY_BUFFER_NEW)
		      {
			  /* We're scanning a new file or input source.  It's
			   * possible that this happened because the user
			   * just pointed yyin at a new source and called
			   * GeoJsonlex().  If so, then we have to assure
			   * consistency between YY_CURRENT_BUFFER and our
			   * globals.  Here is the right place to do so, because
			   * this is the first action (other than possibly a
			   * back-up) that will match for the new input source.
			   */
			  yyg->yy_n_chars =
			      YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
			      YY_BUFFER_NORMAL;
		      }

		    /* Note that here we test for yy_c_buf_p "<=" to the position
		     * of the first EOB in the buffer, since yy_c_buf_p will
		     * already have been incremented past the NUL character
		     * (since all states make transitions on EOB to the
		     * end-of-buffer state).  Contrast this with the test
		     * in input().
		     */
		    if (yyg->yy_c_buf_p <=
			&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
		      {		/* This was really a NUL. */
			  yy_state_type yy_next_state;

			  yyg->yy_c_buf_p =
			      yyg->yytext_ptr + yy_amount_of_matched_text;

			  yy_current_state = yy_get_previous_state (yyscanner);

			  /* Okay, we're now positioned to make the NUL
			   * transition.  We couldn't have
			   * yy_get_previous_state() go ahead and do it
			   * for us because it doesn't know how to deal
			   * with the possibility of jamming (and we don't
			   * want to build jamming into it because then it
			   * will run more slowly).
			   */

			  yy_next_state =
			      yy_try_NUL_trans (yy_current_state, yyscanner);

			  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			  if (yy_next_state)
			    {
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
			    }

			  else
			    {
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
			    }
		      }

		    else
			switch (yy_get_next_buffer (yyscanner))
			  {
			  case EOB_ACT_END_OF_FILE:
			      {
				  yyg->yy_did_buffer_switch_on_eof = 0;

				  if (GeoJsonwrap (yyscanner))
				    {
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p =
					    yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF (YY_START);
					goto do_action;
				    }

				  else
				    {
					if (!yyg->yy_did_buffer_switch_on_eof)
					    YY_NEW_FILE;
				    }
				  break;
			      }

			  case EOB_ACT_CONTINUE_SCAN:
			      yyg->yy_c_buf_p =
				  yyg->yytext_ptr + yy_amount_of_matched_text;

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_match;

			  case EOB_ACT_LAST_MATCH:
			      yyg->yy_c_buf_p =
				  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->
								       yy_n_chars];

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_find_action;
			  }
		    break;
		}

	    default:
		YY_FATAL_ERROR
		    ("fatal flex scanner internal error--no action found");
	    }			/* end of action switch */
      }				/* end of scanning one token */
}				/* end of GeoJsonlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int
yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    register char *source = yyg->yytext_ptr;
    register int number_to_move, i;
    int ret_val;

    if (yyg->yy_c_buf_p >
	&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1])
	YY_FATAL_ERROR
	    ("fatal flex scanner internal error--end of buffer missed");

    if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0)
      {				/* Don't try to fill the buffer, so this is an EOF. */
	  if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1)
	    {
		/* We matched a single character, the EOB, so
		 * treat this as a final EOF.
		 */
		return EOB_ACT_END_OF_FILE;
	    }

	  else
	    {
		/* We matched some text prior to the EOB, first
		 * process it.
		 */
		return EOB_ACT_LAST_MATCH;
	    }
      }

    /* Try to read more data. */

    /* First move last chars to start of buffer. */
    number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

    for (i = 0; i < number_to_move; ++i)
	*(dest++) = *(source++);

    if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING)
	/* don't do the read, it's not guaranteed to return an EOF,
	 * just force an EOF
	 */
	YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

    else
      {
	  int num_to_read =
	      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

	  while (num_to_read <= 0)
	    {			/* Not enough room in the buffer - grow it. */

		/* just a shorter name for the current buffer */
		YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

		int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf);

		if (b->yy_is_our_buffer)
		  {
		      int new_size = b->yy_buf_size * 2;

		      if (new_size <= 0)
			  b->yy_buf_size += b->yy_buf_size / 8;
		      else
			  b->yy_buf_size *= 2;

		      b->yy_ch_buf = (char *)
			  /* Include room in for 2 EOB chars. */
			  GeoJsonrealloc ((void *) b->yy_ch_buf,
					  b->yy_buf_size + 2, yyscanner);
		  }
		else
		    /* Can't grow it, we don't own it. */
		    b->yy_ch_buf = 0;

		if (!b->yy_ch_buf)
		    YY_FATAL_ERROR
			("fatal error - scanner input buffer overflow");

		yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

		num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
		    number_to_move - 1;

	    }

	  if (num_to_read > YY_READ_BUF_SIZE)
	      num_to_read = YY_READ_BUF_SIZE;

	  /* Read in more data. */
	  YY_INPUT ((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
		    yyg->yy_n_chars, (size_t) num_to_read);

	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    if (yyg->yy_n_chars == 0)
      {
	  if (number_to_move == YY_MORE_ADJ)
	    {
		ret_val = EOB_ACT_END_OF_FILE;
		GeoJsonrestart (yyin, yyscanner);
	    }

	  else
	    {
		ret_val = EOB_ACT_LAST_MATCH;
		YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
		    YY_BUFFER_EOF_PENDING;
	    }
      }

    else
	ret_val = EOB_ACT_CONTINUE_SCAN;

    if ((yy_size_t) (yyg->yy_n_chars + number_to_move) >
	YY_CURRENT_BUFFER_LVALUE->yy_buf_size)
      {
	  /* Extend the array by 50%, plus the number we really need. */
	  yy_size_t new_size =
	      yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
	  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf =
	      (char *) GeoJsonrealloc ((void *)
				       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,
				       new_size, yyscanner);
	  if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
	      YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()");
      }

    yyg->yy_n_chars += number_to_move;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] =
	YY_END_OF_BUFFER_CHAR;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] =
	YY_END_OF_BUFFER_CHAR;

    yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

    return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type
yy_get_previous_state (yyscan_t yyscanner)
{
    register yy_state_type yy_current_state;
    register char *yy_cp;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    yy_current_state = yyg->yy_start;

    for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p;
	 ++yy_cp)
      {
	  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI (*yy_cp)] : 1);
	  if (yy_accept[yy_current_state])
	    {
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
	    }
	  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
	    {
		yy_current_state = (int) yy_def[yy_current_state];
		if (yy_current_state >= 182)
		    yy_c = yy_meta[(unsigned int) yy_c];
	    }
	  yy_current_state =
	      yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      }

    return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state, yyscan_t yyscanner)
{
    register int yy_is_jam;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;	/* This var may be unused depending upon options. */
    register char *yy_cp = yyg->yy_c_buf_p;

    register YY_CHAR yy_c = 1;
    if (yy_accept[yy_current_state])
      {
	  yyg->yy_last_accepting_state = yy_current_state;
	  yyg->yy_last_accepting_cpos = yy_cp;
      }
    while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
      {
	  yy_current_state = (int) yy_def[yy_current_state];
	  if (yy_current_state >= 182)
	      yy_c = yy_meta[(unsigned int) yy_c];
      }
    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    yy_is_jam = (yy_current_state == 181);

    return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int
yyinput (yyscan_t yyscanner)
#else
static int
input (yyscan_t yyscanner)
#endif
{
    int c;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    *yyg->yy_c_buf_p = yyg->yy_hold_char;

    if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR)
      {
	  /* yy_c_buf_p now points to the character we want to return.
	   * If this occurs *before* the EOB characters, then it's a
	   * valid NUL; if not, then we've hit the end of the buffer.
	   */
	  if (yyg->yy_c_buf_p <
	      &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
	      /* This was really a NUL. */
	      *yyg->yy_c_buf_p = '\0';

	  else
	    {			/* need more input */
		int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
		++yyg->yy_c_buf_p;

		switch (yy_get_next_buffer (yyscanner))
		  {
		  case EOB_ACT_LAST_MATCH:
		      /* This happens because yy_g_n_b()
		       * sees that we've accumulated a
		       * token and flags that we need to
		       * try matching the token before
		       * proceeding.  But for input(),
		       * there's no matching to consider.
		       * So convert the EOB_ACT_LAST_MATCH
		       * to EOB_ACT_END_OF_FILE.
		       */

		      /* Reset buffer status. */
		      GeoJsonrestart (yyin, yyscanner);

		   /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE:
		      {
			  if (GeoJsonwrap (yyscanner))
			      return EOF;

			  if (!yyg->yy_did_buffer_switch_on_eof)
			      YY_NEW_FILE;
#ifdef __cplusplus
			  return yyinput (yyscanner);
#else
			  return input (yyscanner);
#endif
		      }

		  case EOB_ACT_CONTINUE_SCAN:
		      yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
		      break;
		  }
	    }
      }

    c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
    *yyg->yy_c_buf_p = '\0';	/* preserve yytext */
    yyg->yy_hold_char = *++yyg->yy_c_buf_p;

    return c;
}
#endif /* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
void
GeoJsonrestart (FILE * input_file, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
      {
	  GeoJsonensure_buffer_stack (yyscanner);
	  YY_CURRENT_BUFFER_LVALUE =
	      GeoJson_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
      }


    GeoJson_init_buffer (YY_CURRENT_BUFFER, input_file, yyscanner);
    GeoJson_load_buffer_state (yyscanner);
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
void
GeoJson_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* TODO. We should be able to replace this entire function body
     * with
     *              GeoJsonpop_buffer_state();
     *              GeoJsonpush_buffer_state(new_buffer);
     */
    GeoJsonensure_buffer_stack (yyscanner);
    if (YY_CURRENT_BUFFER == new_buffer)
	return;

    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    YY_CURRENT_BUFFER_LVALUE = new_buffer;
    GeoJson_load_buffer_state (yyscanner);

    /* We don't actually know whether we did this switch during
     * EOF (GeoJsonwrap()) processing, but the only time this flag
     * is looked at is after GeoJsonwrap() is called, so it's safe
     * to go ahead and always set it.
     */
    yyg->yy_did_buffer_switch_on_eof = 1;
}

static void
GeoJson_load_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
YY_BUFFER_STATE
GeoJson_create_buffer (FILE * file, int size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    b = (YY_BUFFER_STATE) GeoJsonalloc (sizeof (struct yy_buffer_state),
					yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in GeoJson_create_buffer()");

    b->yy_buf_size = size;

    /* yy_ch_buf has to be 2 characters longer than the size given because
     * we need to put in 2 end-of-buffer characters.
     */
    b->yy_ch_buf = (char *) GeoJsonalloc (b->yy_buf_size + 2, yyscanner);
    if (!b->yy_ch_buf)
	YY_FATAL_ERROR ("out of dynamic memory in GeoJson_create_buffer()");

    b->yy_is_our_buffer = 1;

    GeoJson_init_buffer (b, file, yyscanner);

    return b;
}

/** Destroy the buffer.
 * @param b a buffer created with GeoJson_create_buffer()
 * @param yyscanner The scanner object.
 */
void
GeoJson_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!b)
	return;

    if (b == YY_CURRENT_BUFFER)	/* Not sure if we should pop here. */
	YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

    if (b->yy_is_our_buffer)
	GeoJsonfree ((void *) b->yy_ch_buf, yyscanner);


    GeoJsonfree ((void *) b, yyscanner);
}

#ifndef __cplusplus
extern int isatty (int);
#endif /* __cplusplus */

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a GeoJsonrestart() or at EOF.
 */
static void
GeoJson_init_buffer (YY_BUFFER_STATE b, FILE * file, yyscan_t yyscanner)
{

    int oerrno = errno;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    GeoJson_flush_buffer (b, yyscanner);

    b->yy_input_file = file;
    b->yy_fill_buffer = 1;

    /* If b is the current buffer, then GeoJson_init_buffer was _probably_
     * called from GeoJsonrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER)
      {
	  b->yy_bs_lineno = 1;
	  b->yy_bs_column = 0;
      }

    b->yy_is_interactive = file ? (isatty (fileno (file)) > 0) : 0;

    errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */
void
GeoJson_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!b)
	return;

    b->yy_n_chars = 0;

    /* We always need two end-of-buffer characters.  The first causes
     * a transition to the end-of-buffer state.  The second causes
     * a jam in that state.
     */
    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

    b->yy_buf_pos = &b->yy_ch_buf[0];

    b->yy_at_bol = 1;
    b->yy_buffer_status = YY_BUFFER_NEW;

    if (b == YY_CURRENT_BUFFER)
	GeoJson_load_buffer_state (yyscanner);
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */
void
GeoJsonpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (new_buffer == NULL)
	return;

    GeoJsonensure_buffer_stack (yyscanner);

    /* This block is copied from GeoJson_switch_to_buffer. */
    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    /* Only push if top exists. Otherwise, replace top. */
    if (YY_CURRENT_BUFFER)
	yyg->yy_buffer_stack_top++;
    YY_CURRENT_BUFFER_LVALUE = new_buffer;

    /* copied from GeoJson_switch_to_buffer. */
    GeoJson_load_buffer_state (yyscanner);
    yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
void
GeoJsonpop_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!YY_CURRENT_BUFFER)
	return;

    GeoJson_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
    YY_CURRENT_BUFFER_LVALUE = NULL;
    if (yyg->yy_buffer_stack_top > 0)
	--yyg->yy_buffer_stack_top;

    if (YY_CURRENT_BUFFER)
      {
	  GeoJson_load_buffer_state (yyscanner);
	  yyg->yy_did_buffer_switch_on_eof = 1;
      }
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void
GeoJsonensure_buffer_stack (yyscan_t yyscanner)
{
    int num_to_alloc;

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_buffer_stack)
      {

	  /* First allocation is just for 2 elements, since we don't know if this
	   * scanner will even need a stack. We use 2 instead of 1 to avoid an
	   * immediate realloc on the next call.
	   */
	  num_to_alloc = 1;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) GeoJsonalloc
	      (num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in GeoJsonensure_buffer_stack()");

	  memset (yyg->yy_buffer_stack, 0,
		  num_to_alloc * sizeof (struct yy_buffer_state *));

	  yyg->yy_buffer_stack_max = num_to_alloc;
	  yyg->yy_buffer_stack_top = 0;
	  return;
      }

    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1)
      {

	  /* Increase the buffer to prepare for a possible push. */
	  int grow_size = 8 /* arbitrary grow size */ ;

	  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) GeoJsonrealloc
	      (yyg->yy_buffer_stack,
	       num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in GeoJsonensure_buffer_stack()");

	  /* zero only the new slots. */
	  memset (yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0,
		  grow_size * sizeof (struct yy_buffer_state *));
	  yyg->yy_buffer_stack_max = num_to_alloc;
      }
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */

YY_BUFFER_STATE
GeoJson_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    if (size < 2 ||
	base[size - 2] != YY_END_OF_BUFFER_CHAR ||
	base[size - 1] != YY_END_OF_BUFFER_CHAR)
	/* They forgot to leave room for the EOB's. */
	return 0;

    b = (YY_BUFFER_STATE) GeoJsonalloc (sizeof (struct yy_buffer_state),
					yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in GeoJson_scan_buffer()");

    b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;

    GeoJson_switch_to_buffer (b, yyscanner);

    return b;
}

/** Setup the input buffer state to scan a string. The next call to GeoJsonlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       GeoJson_scan_bytes() instead.
 */
YY_BUFFER_STATE
GeoJson_scan_string (yyconst char *yystr, yyscan_t yyscanner)
{

    return GeoJson_scan_bytes (yystr, strlen (yystr), yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to GeoJsonlex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE
GeoJson_scan_bytes (yyconst char *yybytes, int _yybytes_len, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;
    char *buf;
    yy_size_t n;
    int i;

    /* Get memory for full buffer, including space for trailing EOB's. */
    n = _yybytes_len + 2;
    buf = (char *) GeoJsonalloc (n, yyscanner);
    if (!buf)
	YY_FATAL_ERROR ("out of dynamic memory in GeoJson_scan_bytes()");

    for (i = 0; i < _yybytes_len; ++i)
	buf[i] = yybytes[i];

    buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR;

    b = GeoJson_scan_buffer (buf, n, yyscanner);
    if (!b)
	YY_FATAL_ERROR ("bad buffer in GeoJson_scan_bytes()");

    /* It's okay to grow etc. this buffer, and we should throw it
     * away when we're done.
     */
    b->yy_is_our_buffer = 1;

    return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void
yy_fatal_error (yyconst char *msg, yyscan_t yyscanner)
{


    (void) fprintf (stderr, "%s\n", msg);
    exit (YY_EXIT_FAILURE);
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE
GeoJsonget_extra (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int
GeoJsonget_lineno (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int
GeoJsonget_column (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *
GeoJsonget_in (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *
GeoJsonget_out (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
int
GeoJsonget_leng (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *
GeoJsonget_text (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void
GeoJsonset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyextra = user_defined;
}

/** Set the current line number.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
GeoJsonset_lineno (int line_number, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* lineno is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("GeoJsonset_lineno called with no buffer", yyscanner);

    yylineno = line_number;
}

/** Set the current column.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
GeoJsonset_column (int column_no, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* column is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("GeoJsonset_column called with no buffer", yyscanner);

    yycolumn = column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see GeoJson_switch_to_buffer
 */
void
GeoJsonset_in (FILE * in_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyin = in_str;
}

void
GeoJsonset_out (FILE * out_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyout = out_str;
}

int
GeoJsonget_debug (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yy_flex_debug;
}

void
GeoJsonset_debug (int bdebug, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yy_flex_debug = bdebug;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* GeoJsonlex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */

int
GeoJsonlex_init (yyscan_t * ptr_yy_globals)
{

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }

    *ptr_yy_globals = (yyscan_t) GeoJsonalloc (sizeof (struct yyguts_t), NULL);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    return yy_init_globals (*ptr_yy_globals);
}

/* GeoJsonlex_init_extra has the same functionality as GeoJsonlex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to GeoJsonalloc in
 * the yyextra field.
 */

int
GeoJsonlex_init_extra (YY_EXTRA_TYPE yy_user_defined, yyscan_t * ptr_yy_globals)
{
    struct yyguts_t dummy_yyguts;

    GeoJsonset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }


    *ptr_yy_globals =
	(yyscan_t) GeoJsonalloc (sizeof (struct yyguts_t), &dummy_yyguts);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in
       yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    GeoJsonset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals (*ptr_yy_globals);
}

static int
yy_init_globals (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from GeoJsonlex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = 0;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = (char *) 0;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack = NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * GeoJsonlex_init()
     */
    return 0;
}

/* GeoJsonlex_destroy is for both reentrant and non-reentrant scanners. */
int
GeoJsonlex_destroy (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* Pop the buffer stack, destroying each element. */
    while (YY_CURRENT_BUFFER)
      {
	  GeoJson_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
	  YY_CURRENT_BUFFER_LVALUE = NULL;
	  GeoJsonpop_buffer_state (yyscanner);
      }

    /* Destroy the stack itself. */
    GeoJsonfree (yyg->yy_buffer_stack, yyscanner);
    yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
    GeoJsonfree (yyg->yy_start_stack, yyscanner);
    yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * GeoJsonlex() is called, initialization will occur. */
    yy_init_globals (yyscanner);

    /* Destroy the main struct (reentrant only). */
    GeoJsonfree (yyscanner, yyscanner);
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr



static void
yy_flex_strncpy (char *s1, yyconst char *s2, int n, yyscan_t yyscanner)
{
    register int i;
    for (i = 0; i < n; ++i)
	s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int
yy_flex_strlen (yyconst char *s, yyscan_t yyscanner)
{
    register int n;
    for (n = 0; s[n]; ++n)
	;

    return n;
}
#endif

void *
GeoJsonalloc (yy_size_t size, yyscan_t yyscanner)
{

    return (void *) malloc (size);

}




void *
GeoJsonrealloc (void *ptr, yy_size_t size, yyscan_t yyscanner)
{
    /* The cast to (char *) in the following accommodates both
     * implementations that use char* generic pointers, and those
     * that use void* generic pointers.  It works with the latter
     * because both ANSI C and C++ allow castless assignment from
     * any pointer type to void*, and deal with argument conversions
     * as though doing an assignment.
     */

    return (void *) realloc ((char *) ptr, size);
}

void
GeoJsonfree (void *ptr, yyscan_t yyscanner)
{


    free ((char *) ptr);	/* see GeoJsonrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

int
GeoJsonwrap (yyscan_t yyscanner)
{
    return 1;
}

Changes to src/gaiageo/lex.Gml.c.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90



91
92








93
94
95
96
97
98
99
100
101
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194





195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

286
287
288
289

290
291

292
293
294
295
296
297
298
299
300
301
302
...
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

360
361
362
363
364
365
366
367
368
369
370
371


372
373
374
375
376
377
378
379
380
381
382


383
384
385
386
387
388
389
390
391
392
393

394
395
396
397
398
399
400
401



402
403
404
405
406
407
408



409
410
411
412
413
414
415
416
417




418
419
420
421
422
423
424
425
426




427
428
429
430
431
432
433
434
...
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
...
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734

735
736
737

738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767

768
769
770
771
772

773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801

802


803
804
805

806


807
808
809

810


811
812
813

814


815
816
817

818



819
820
821
822

823



824
825
826
827





828
829
830
831




832
833
834
835
836





837
838
839


840
841
842


843
844
845
846
847
848
849
850
851

852
853
854
855
856
857
858

859
860
861
862
863
864
865
866
867
868

869
870
871

872
873
874
875
876
877
878
879
880

881
882
883
884

885
886
887
888
889
890
891
892
893
894
895
896
897
898

899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916

917
918
919
920
921
922
923

924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256











1257
1258
1259
1260
1261
1262

1263
1264
1265

1266
1267

1268
1269
1270

1271
1272
1273

1274
1275
1276
1277
1278
1279
1280
1281

1282
1283

1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312

1313
1314
1315

1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328

1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355

1356
1357
1358

1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369

1370
1371




1372
1373
1374
1375
1376

1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391

1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404

1405
1406
1407

1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434

1435
1436
1437

1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465

1466
1467
1468

1469
1470
1471
1472
1473
1474
1475
1476
1477

1478
1479
1480
1481
1482
1483
1484
1485

1486
1487
1488
1489

1490
1491
1492

1493
1494
1495
1496
1497
1498
1499
1500
1501

1502
1503
1504

1505
1506
1507
1508
1509
1510
1511
1512

1513
1514
1515
1516
1517
1518
1519
1520
1521

1522
1523
1524
1525

1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536


1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572

1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586

1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619

1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
....
1643
1644
1645
1646
1647
1648
1649

1650
1651
1652

1653
1654
1655
1656
1657
1658

1659
1660
1661

1662
1663
1664
1665
1666
1667
1668
1669
1670
1671

1672
1673
1674

1675
1676
1677
1678
1679
1680
1681
1682
1683
1684

1685
1686
1687

1688
1689
1690
1691
1692
1693

1694
1695
1696

1697
1698
1699
1700
1701
1702

1703
1704
1705

1706
1707
1708
1709
1710
1711
1712

1713
1714
1715

1716
1717
1718
1719
1720
1721
1722

1723
1724
1725

1726
1727
1728
1729
1730
1731
1732

1733
1734
1735

1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747

1748
1749
1750

1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764

1765
1766
1767

1768
1769
1770

1771
1772
1773

1774
1775
1776

1777
1778
1779

1780
1781
1782

1783
1784
1785

1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797

1798
1799
1800
1801

1802
1803
1804
1805
1806
1807
1808

1809
1810
1811
1812
1813
1814

1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834

1835
1836
1837
1838
1839


1840
1841

1842
1843
1844
1845
1846
1847
1848

1849
1850
1851
1852
1853
1854

1855
1856
1857

1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888

1889
1890
1891

1892
1893
1894

1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926

1927
1928
1929
1930
1931
1932
1933
1934

1935
1936
1937
1938
1939
1940
1941
1942
1943
1944

1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955

1956
1957
1958
1959
1960
1961
1962
1963
1964

1965
1966

1967
1968
1969
1970
1971
1972
1973
1974
1975

1976
1977
1978
1979
1980



#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;


/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* TODO: this is always defined, so inline it */
#define yyconst const




#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))








#else
#define yynoreturn
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE Gmlrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )






#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via Gmlrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void Gmlrestart (FILE *input_file ,yyscan_t yyscanner );
void Gml_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE Gml_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void Gml_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void Gml_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void Gmlpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void Gmlpop_buffer_state (yyscan_t yyscanner );

static void Gmlensure_buffer_stack (yyscan_t yyscanner );
static void Gml_load_buffer_state (yyscan_t yyscanner );
static void Gml_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );


#define YY_FLUSH_BUFFER Gml_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE Gml_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );

YY_BUFFER_STATE Gml_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE Gml_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );


void *Gmlalloc (yy_size_t ,yyscan_t yyscanner );
void *Gmlrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void Gmlfree (void * ,yyscan_t yyscanner );

#define yy_new_buffer Gml_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        Gmlensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);

static int yy_get_next_buffer (yyscan_t yyscanner );
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 11
#define YY_END_OF_BUFFER 12
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[21] =
    {   0,
        5,    5,   12,   10,    8,    9,   10,    5,    1,    3,
        2,    4,    7,    5,    0,    6,    5,    7,    5,    0
    } ;

static yyconst YY_CHAR yy_ec[256] =

    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    4,    1,    1,    1,    1,    1,    1,
        1,    1,    5,    5,    5,    5,    6,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    8,    1,    9,
       10,   11,    1,    1,   12,   12,   12,   12,   13,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
        1,    1,    1,    1,   12,    1,   12,   12,   12,   12,



       13,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,



        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst YY_CHAR yy_meta[14] =
    {   0,
        1,    1,    1,    1,    2,    1,    3,    4,    5,    1,

        5,    4,    3
    } ;

static yyconst flex_uint16_t yy_base[24] =
    {   0,
        0,    0,   19,   31,   31,   31,   14,    0,   31,   31,
       31,   31,    0,    9,   11,   31,    0,    0,    0,   31,
       22,   25,   26



    } ;

static yyconst flex_int16_t yy_def[24] =
    {   0,
       20,    1,   20,   20,   20,   20,   21,   22,   20,   20,
       20,   20,   23,   20,   21,   20,   22,   23,   14,    0,
       20,   20,   20



    } ;

static yyconst flex_uint16_t yy_nxt[45] =
    {   0,
        4,    5,    6,    7,    8,    9,    8,    4,   10,   11,
       12,   13,   14,   17,   16,   19,   18,   16,   20,   20,
       18,   19,   15,   15,   15,   15,   17,   17,   18,   18,
        3,   20,   20,   20,   20,   20,   20,   20,   20,   20,
       20,   20,   20,   20




    } ;

static yyconst flex_int16_t yy_chk[45] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,   14,   15,   14,   14,    7,    3,    0,
       14,   14,   21,   21,   21,   21,   22,   22,   23,   23,
       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
       20,   20,   20,   20




    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct gml_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

int Gmllex_init (yyscan_t* scanner);

int Gmllex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int Gmllex_destroy (yyscan_t yyscanner );

int Gmlget_debug (yyscan_t yyscanner );

void Gmlset_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE Gmlget_extra (yyscan_t yyscanner );

void Gmlset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *Gmlget_in (yyscan_t yyscanner );

void Gmlset_in  (FILE * _in_str ,yyscan_t yyscanner );

FILE *Gmlget_out (yyscan_t yyscanner );

void Gmlset_out  (FILE * _out_str ,yyscan_t yyscanner );

			int Gmlget_leng (yyscan_t yyscanner );

char *Gmlget_text (yyscan_t yyscanner );

int Gmlget_lineno (yyscan_t yyscanner );

void Gmlset_lineno (int _line_number ,yyscan_t yyscanner );

int Gmlget_column  (yyscan_t yyscanner );

void Gmlset_column (int _column_no ,yyscan_t yyscanner );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int Gmlwrap (yyscan_t yyscanner );
#else
extern int Gmlwrap (yyscan_t yyscanner );
#endif
#endif

#ifndef YY_NO_UNPUT
    
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
#else
static int input (yyscan_t yyscanner );
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {

			Gmlensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				Gml_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);

		}

		Gml_load_buffer_state(yyscanner );
		}

	{

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = yyg->yy_start;
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				yyg->yy_last_accepting_state = yy_current_state;
				yyg->yy_last_accepting_cpos = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )

				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 21 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}

			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 31 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = yyg->yy_hold_char;
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			goto yy_find_action;

case 1:
YY_RULE_SETUP

{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_END; }


	YY_BREAK
case 2:
YY_RULE_SETUP

{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_EQ; }


	YY_BREAK
case 3:
YY_RULE_SETUP

{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_OPEN; }


	YY_BREAK
case 4:
YY_RULE_SETUP

{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); return GML_CLOSE; }


	YY_BREAK
case 5:
YY_RULE_SETUP

{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_COORD; }



	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP

{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_VALUE; }



	YY_BREAK
case 7:
YY_RULE_SETUP
{ gml_saveString(&(Gmlget_extra(yyscanner)->GmlLval.pval), yytext); return GML_KEYWORD; }





	YY_BREAK
case 8:
YY_RULE_SETUP
{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col += (int) strlen(yytext); }               /* ignore but count white space */




	YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col = 0; Gmlget_extra(yyscanner)->gml_line++; }





	YY_BREAK
case 10:
YY_RULE_SETUP


{ gml_freeString(&(Gmlget_extra(yyscanner)->GmlLval.pval)); Gmlget_extra(yyscanner)->gml_col += (int) strlen(yytext); return -1; }
	YY_BREAK
case 11:


YY_RULE_SETUP
ECHO;
	YY_BREAK
case YY_STATE_EOF(INITIAL):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */

		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )

			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * Gmllex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */

			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;

			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */

		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;


			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);


			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
				}
			}


		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( Gmlwrap(yyscanner ) )

					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of Gmllex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = yyg->yytext_ptr;
	yy_size_t number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					Gmlrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			Gmlrestart(yyin  ,yyscanner);
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Gmlrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	yyg->yy_n_chars += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 21 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
{
	int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
	char *yy_cp = yyg->yy_c_buf_p;

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 21 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
	yy_is_jam = (yy_current_state == 20);

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (yyscan_t yyscanner)
#else
    static int input  (yyscan_t yyscanner)
#endif

{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					Gmlrestart(yyin ,yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( Gmlwrap(yyscanner ) )
						return 0;

					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput(yyscanner);
#else
					return input(yyscanner);
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
	yyg->yy_hold_char = *++yyg->yy_c_buf_p;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */












/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */

    void Gmlrestart  (FILE * input_file , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! YY_CURRENT_BUFFER ){

        Gmlensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            Gml_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);

	}

	Gml_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);

	Gml_load_buffer_state(yyscanner );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
    void Gml_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	/* TODO. We should be able to replace this entire function body
	 * with
	 *		Gmlpop_buffer_state();
	 *		Gmlpush_buffer_state(new_buffer);
     */
	Gmlensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	Gml_load_buffer_state(yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (Gmlwrap()) processing, but the only time this flag
	 * is looked at is after Gmlwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}


static void Gml_load_buffer_state  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE Gml_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) Gmlalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in Gml_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) Gmlalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in Gml_create_buffer()" );

	b->yy_is_our_buffer = 1;

	Gml_init_buffer(b,file ,yyscanner);

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with Gml_create_buffer()
 * @param yyscanner The scanner object.
 */

    void Gml_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		Gmlfree((void *) b->yy_ch_buf ,yyscanner );

	Gmlfree((void *) b ,yyscanner );

}





/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a Gmlrestart() or at EOF.
 */
    static void Gml_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)


{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	Gml_flush_buffer(b ,yyscanner);

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then Gml_init_buffer was _probably_
     * called from Gmlrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){

        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */

    void Gml_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		Gml_load_buffer_state(yyscanner );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */

void Gmlpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (new_buffer == NULL)
		return;

	Gmlensure_buffer_stack(yyscanner);

	/* This block is copied from Gml_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from Gml_switch_to_buffer. */
	Gml_load_buffer_state(yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */

void Gmlpop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!YY_CURRENT_BUFFER)
		return;

	Gml_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {

		Gml_load_buffer_state(yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */

static void Gmlensure_buffer_stack (yyscan_t yyscanner)
{
	int num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if (!yyg->yy_buffer_stack) {


		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		yyg->yy_buffer_stack = (struct yy_buffer_state**)Gmlalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in Gmlensure_buffer_stack()" );
								  
		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));

				
		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){


		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)Gmlrealloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in Gmlensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));

		yyg->yy_buffer_stack_max = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE Gml_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)


{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return NULL;

	b = (YY_BUFFER_STATE) Gmlalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in Gml_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	Gml_switch_to_buffer(b ,yyscanner );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to Gmllex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       Gml_scan_bytes() instead.
 */

YY_BUFFER_STATE Gml_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
    
	return Gml_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to Gmllex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE Gml_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	yy_size_t i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) _yybytes_len + 2;
	buf = (char *) Gmlalloc(n ,yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in Gml_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = Gml_scan_buffer(buf,n ,yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in Gml_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif


static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */

YY_EXTRA_TYPE Gmlget_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */

int Gmlget_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */

int Gmlget_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */

FILE *Gmlget_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */

FILE *Gmlget_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */

int Gmlget_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */


char *Gmlget_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */

void Gmlset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyextra = user_defined ;
}

/** Set the current line number.
 * @param _line_number line number
 * @param yyscanner The scanner object.
 */

void Gmlset_lineno (int  _line_number , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "Gmlset_lineno called with no buffer" );
    
    yylineno = _line_number;
}

/** Set the current column.
 * @param _column_no column number
 * @param yyscanner The scanner object.
 */

void Gmlset_column (int  _column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "Gmlset_column called with no buffer" );
    
    yycolumn = _column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see Gml_switch_to_buffer
 */

void Gmlset_in (FILE *  _in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyin = _in_str ;
}


void Gmlset_out (FILE *  _out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyout = _out_str ;
}


int Gmlget_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yy_flex_debug;
}


void Gmlset_debug (int  _bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yy_flex_debug = _bdebug ;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* Gmllex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */


int Gmllex_init(yyscan_t* ptr_yy_globals)

{
    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) Gmlalloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));


    return yy_init_globals ( *ptr_yy_globals );
}

/* Gmllex_init_extra has the same functionality as Gmllex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to Gmlalloc in
 * the yyextra field.
 */

int Gmllex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )

{
    struct yyguts_t dummy_yyguts;

    Gmlset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }
	
    *ptr_yy_globals = (yyscan_t) Gmlalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );


	
    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }
    
    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    
    Gmlset_extra (yy_user_defined, *ptr_yy_globals);
    
    return yy_init_globals ( *ptr_yy_globals );
}


static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from Gmllex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = NULL;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = NULL;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * Gmllex_init()
     */
    return 0;
}

/* Gmllex_destroy is for both reentrant and non-reentrant scanners. */

int Gmllex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){

		Gml_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		Gmlpop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	Gmlfree(yyg->yy_buffer_stack ,yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        Gmlfree(yyg->yy_start_stack ,yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * Gmllex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    Gmlfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN

static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif


void *Gmlalloc (yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	return malloc(size);
}

void *Gmlrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);

}


void Gmlfree (void * ptr , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	free( (char *) ptr );	/* see Gmlrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"


int Gmlwrap(yyscan_t yyscanner )
{
  return 1;
}

>
>







|
|







 







|


>







 







|

|

|
|

>
>
>
|
<
>
>
>
>
>
>
>
>

|







 







|







 







<
<
<
<
<
<
<

<











<
<
<
<
<




|
<
|





|










>
>
>
>
>



|
|

|
|

|
|
|
|

|
|
|
|

|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|



|
|
|
|
|

|



|
|
|
|
|
|
|
|
|
|


|







 







|
|
|
|
|
|
|

|
|
|
>



|
>
|
|
>

|
|
|







 







|
|
>
|
|






|









|
|
|
|
|
|
|
<
|

|
>
|
|
|
|
|
|
|
|
|
<
<

>
>
|
|
|
|
|
|
|
|
<
<

>
>
|
|
|
|
<
<
|

|
<
<
>
|
|

|
<
<
<
<
>
>
>
|

|
<
<
<
<
>
>
>
|

|
<
<
<
<
<
<
>
>
>
>
|

|
<
<
<
<
<
<
>
>
>
>
|







 







|






|
|
|











|








|

|

|

|




|

|

|

|

|

|

|

|

|

|

|

|

|

|

|







|

|

<
<
<
<



|



|





|

|






<
<
<
<

<







|










|












|







 







|









|
|
|
|

|
|
|


|


|
|

|
|

|
|

|
>
|
|
<
>
|

|
|

<
<
|
|
|

|
|

|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
>
|
|
|
|

|
|
|
|
|
|
|
|

|

|

|
|
|
|
|
|
|
|

|
|
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
>
|
<

|
>
|
>
>
>
|
<
<
<
>
>
>
>
>
|
<
<
<
>
>
>
>
|
<

|
<
>
>
>
>
>
|
<
<
>
>
|
<
<
>
>
|
<
<
|
<

|

|
>
|

|
|
|
<
|
>
|
|
|
|
|
|
|
|
|
|
>
|
|
|
>
|

|
|
|
|
|
|
|
>
|
|
|

>
|

|

|
|
|
|
|
|
|
|

|
>

|

|
|




|

|
|


|
|

>
|
|
|
|
|

<
>
|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>






>
|

<
>

|
>
|
|
<
>
|

<
>
|






|
>

<
>

|
|
|
|

|
|
|

|
|
|
|
|
|
|

|
|

|
|
|
|
|
|


>
|

<
>
|
|
|
|








|
>

|
|
|
|
|

|

|
|
|
|
|
|

|

|

|






>
|

<
>

|
|

|
|

|
|

<
>


>
>
>
>




|
>
|
<
|
|

|

|
|





|
>
|
|
|

|
|
|






>
|

<
>
|
|

|

|
|
|
|
|
|

|

|
|

|
|








>
|

<
>
|
|

|

|
|
|
|
|
|
|
|

|
|
|
|

|
|
|






>
|

<
>
|
|

|
|
|
|

|
>
|
|
|





>
|

|
<
>

|
|
>
|
|
|
|
|
|
|
<
|
>
|
|
|
>
|
|
|
|
|

|
|
>
|
|

|
|
|
|
<
|
>
|

|
|
>
|
|








<
>
>

|
|
|
|
|
|
|

|
|
|

|
|
|
|
|
|
|
|
|

|

|










>
|

|
|




|
|



|
>

|
|
|
|
|
|
|
|
|
|

|
|

|

|
|
|

|
|
|
|

|






>
|

<
<
|
|









|







 







>
|

<
>






>
|

<
>
|
|
|
|






>
|

<
>
|
|
|
|






>
|

<
>






>
|

<
>






>
|

<
>







>
|

<
>







>
|

<
>
|



|


>
|

<
>

|
|
|
|
|



|


>
|

<
>

|
|
|
|
|




|



>
|

<
>
|


>
|

<
>
|


>
|

<
>



>
|

<
>
|











>
|
|
<
|
>
|
|
|

|

|
>
|
|
|


<
>

|










|
|





|
>
|
|
|
|
<
>
>
|
|
>
|
|
|
|

|
<
>
|

|
|


>
|

<
>




|


|





|






|
|









>
|

<
>


|
>
|
|
|
|

|
|
|


|
|



|


|









<
<
<
|
>
|
|
|
|




>
|

|
|
|

|



>
|

<
|
<


<
<
<
|
>
|
|
|
|
|
|
|
|
<
>


>
|

<
<
|




>
|

|

<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159







160

161
162
163
164
165
166
167
168
169
170
171





172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
...
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363

364
365
366
367
368
369
370
371
372
373
374
375
376


377
378
379
380
381
382
383
384
385
386
387


388
389
390
391
392
393
394


395
396
397


398
399
400
401
402




403
404
405
406
407
408




409
410
411
412
413
414






415
416
417
418
419
420
421






422
423
424
425
426
427
428
429
430
431
432
433
...
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582




583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604




605

606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
...
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727

728
729
730
731
732
733


734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797


798
799
800
801
802


803
804
805
806
807


808
809
810
811
812


813
814
815
816
817
818

819
820
821
822
823
824
825
826



827
828
829
830
831
832



833
834
835
836
837

838
839

840
841
842
843
844
845


846
847
848


849
850
851


852

853
854
855
856
857
858
859
860
861
862

863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934

935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288

1289
1290
1291
1292
1293
1294

1295
1296
1297

1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308

1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341

1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386

1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397

1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411

1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441

1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472

1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504

1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527

1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539

1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561

1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578

1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668


1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
....
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697

1698
1699
1700
1701
1702
1703
1704
1705
1706
1707

1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721

1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735

1736
1737
1738
1739
1740
1741
1742
1743
1744
1745

1746
1747
1748
1749
1750
1751
1752
1753
1754
1755

1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766

1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777

1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788

1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804

1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822

1823
1824
1825
1826
1827
1828
1829

1830
1831
1832
1833
1834
1835
1836

1837
1838
1839
1840
1841
1842
1843

1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859

1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874

1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900

1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911

1912
1913
1914
1915
1916
1917
1918
1919
1920
1921

1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956

1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989



1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013

2014

2015
2016



2017
2018
2019
2020
2021
2022
2023
2024
2025
2026

2027
2028
2029
2030
2031
2032


2033
2034
2035
2036
2037
2038
2039
2040
2041
2042


#line 3 "lex.Gml.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)


#define YY_USE_CONST

#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void *yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE Gmlrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE







#define YY_BUF_SIZE 16384

#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif






#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

#define YY_LESS_LINENO(n)


/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
    FILE *yy_input_file;

    char *yy_ch_buf;		/* input buffer */
    char *yy_buf_pos;		/* current position in input buffer */

    /* Size of input buffer in bytes, not including room for EOB
     * characters.
     */
    yy_size_t yy_buf_size;

    /* Number of characters read into yy_ch_buf, not including EOB
     * characters.
     */
    int yy_n_chars;

    /* Whether we "own" the buffer - i.e., we know we created it,
     * and can realloc() it to grow it, and should free() it to
     * delete it.
     */
    int yy_is_our_buffer;

    /* Whether this is an "interactive" input source; if so, and
     * if we're using stdio for input, then we want to use getc()
     * instead of fread(), to make sure we stop fetching input after
     * each newline.
     */
    int yy_is_interactive;

    /* Whether we're considered to be at the beginning of a line.
     * If so, '^' rules will be active on the next match, otherwise
     * not.
     */
    int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

    /* Whether to try to fill the input buffer when we reach the
     * end of it.
     */
    int yy_fill_buffer;

    int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
    /* When an EOF's been seen but there's still some text to process
     * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     * shouldn't try reading from the input source any more.  We might
     * still have a bunch of tokens to match, though, because of
     * possible backing-up.
     *
     * When we actually see the EOF, we change the status to "new"
     * (via Gmlrestart()), so that the user can continue scanning by
     * just pointing yyin at a new input file.
     */
#define YY_BUFFER_EOF_PENDING 2

};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void Gmlrestart (FILE * input_file, yyscan_t yyscanner);
void Gml_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
YY_BUFFER_STATE Gml_create_buffer (FILE * file, int size, yyscan_t yyscanner);
void Gml_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void Gml_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void Gmlpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
void Gmlpop_buffer_state (yyscan_t yyscanner);

static void Gmlensure_buffer_stack (yyscan_t yyscanner);
static void Gml_load_buffer_state (yyscan_t yyscanner);
static void Gml_init_buffer (YY_BUFFER_STATE b, FILE * file,
			     yyscan_t yyscanner);

#define YY_FLUSH_BUFFER Gml_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE Gml_scan_buffer (char *base, yy_size_t size,
				 yyscan_t yyscanner);
YY_BUFFER_STATE Gml_scan_string (yyconst char *yy_str, yyscan_t yyscanner);
YY_BUFFER_STATE Gml_scan_bytes (yyconst char *bytes, int len,
				yyscan_t yyscanner);

void *Gmlalloc (yy_size_t, yyscan_t yyscanner);
void *Gmlrealloc (void *, yy_size_t, yyscan_t yyscanner);
void Gmlfree (void *, yyscan_t yyscanner);

#define yy_new_buffer Gml_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        Gmlensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner);
static yy_state_type yy_try_NUL_trans (yy_state_type current_state,
				       yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner);
static void yy_fatal_error (yyconst char msg[], yyscan_t yyscanner);

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (size_t) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 11
#define YY_END_OF_BUFFER 12
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
{
    flex_int32_t yy_verify;
    flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[19] = { 0,
    5, 5, 12, 10, 8, 9, 10, 5, 1, 3,
    2, 4, 7, 0, 6, 5, 7, 0

};

static yyconst flex_int32_t yy_ec[256] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 2, 1, 4, 1, 1, 1, 1, 1, 1,
    1, 1, 5, 5, 5, 5, 6, 7, 7, 7,
    7, 7, 7, 7, 7, 7, 7, 8, 1, 9,
    10, 11, 1, 1, 12, 12, 12, 12, 12, 12,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    1, 1, 1, 1, 12, 1, 12, 12, 12, 12,



    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    12, 12, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,



    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1


};

static yyconst flex_int32_t yy_meta[13] = { 0,


    1, 1, 1, 1, 2, 1, 3, 4, 5, 1,
    5, 4
};

static yyconst flex_int16_t yy_base[22] = { 0,




    0, 0, 23, 24, 24, 24, 18, 0, 24, 24,
    24, 24, 0, 17, 24, 0, 0, 24, 12, 15,
    16
};

static yyconst flex_int16_t yy_def[22] = { 0,




    18, 1, 18, 18, 18, 18, 19, 20, 18, 18,
    18, 18, 21, 19, 18, 20, 21, 0, 18, 18,
    18
};

static yyconst flex_int16_t yy_nxt[37] = { 0,






    4, 5, 6, 7, 8, 9, 8, 4, 10, 11,
    12, 13, 14, 14, 14, 14, 16, 16, 17, 17,
    15, 15, 18, 3, 18, 18, 18, 18, 18, 18,
    18, 18, 18, 18, 18, 18
};

static yyconst flex_int16_t yy_chk[37] = { 0,






    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 19, 19, 19, 19, 20, 20, 21, 21,
    14, 7, 3, 18, 18, 18, 18, 18, 18, 18,
    18, 18, 18, 18, 18, 18
};

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct gml_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
{

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top;	/**< index of top of stack. */
    size_t yy_buffer_stack_max;	/**< capacity of stack. */
    YY_BUFFER_STATE *yy_buffer_stack;  /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char *yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

};				/* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner);

int Gmllex_init (yyscan_t * scanner);

int Gmllex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t * scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int Gmllex_destroy (yyscan_t yyscanner);

int Gmlget_debug (yyscan_t yyscanner);

void Gmlset_debug (int debug_flag, yyscan_t yyscanner);

YY_EXTRA_TYPE Gmlget_extra (yyscan_t yyscanner);

void Gmlset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);

FILE *Gmlget_in (yyscan_t yyscanner);

void Gmlset_in (FILE * in_str, yyscan_t yyscanner);

FILE *Gmlget_out (yyscan_t yyscanner);

void Gmlset_out (FILE * out_str, yyscan_t yyscanner);

int Gmlget_leng (yyscan_t yyscanner);

char *Gmlget_text (yyscan_t yyscanner);

int Gmlget_lineno (yyscan_t yyscanner);

void Gmlset_lineno (int line_number, yyscan_t yyscanner);

int Gmlget_column (yyscan_t yyscanner);

void Gmlset_column (int column_no, yyscan_t yyscanner);

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int Gmlwrap (yyscan_t yyscanner);
#else
extern int Gmlwrap (yyscan_t yyscanner);
#endif




#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *, yyconst char *, int, yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char *, yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner);
#else
static int input (yyscan_t yyscanner);
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE




#define YY_READ_BUF_SIZE 8192

#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		unsigned n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
    register yy_state_type yy_current_state;
    register char *yy_cp, *yy_bp;
    register int yy_act;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_init)
      {
	  yyg->yy_init = 1;

#ifdef YY_USER_INIT
	  YY_USER_INIT;
#endif

	  if (!yyg->yy_start)
	      yyg->yy_start = 1;	/* first start state */

	  if (!yyin)
	      yyin = stdin;

	  if (!yyout)
	      yyout = stdout;

	  if (!YY_CURRENT_BUFFER)
	    {
		Gmlensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =

		    Gml_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
	    }

	  Gml_load_buffer_state (yyscanner);
      }



    while (1)			/* loops until end-of-file is reached */
      {
	  yy_cp = yyg->yy_c_buf_p;

	  /* Support of yytext. */
	  *yy_cp = yyg->yy_hold_char;

	  /* yy_bp points to the position in yy_ch_buf of the start of
	   * the current run.
	   */
	  yy_bp = yy_cp;

	  yy_current_state = yyg->yy_start;
	yy_match:
	  do
	    {
		register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI (*yy_cp)];
		if (yy_accept[yy_current_state])
		  {
		      yyg->yy_last_accepting_state = yy_current_state;
		      yyg->yy_last_accepting_cpos = yy_cp;
		  }
		while (yy_chk[yy_base[yy_current_state] + yy_c] !=
		       yy_current_state)
		  {
		      yy_current_state = (int) yy_def[yy_current_state];
		      if (yy_current_state >= 19)
			  yy_c = yy_meta[(unsigned int) yy_c];
		  }
		yy_current_state =
		    yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		++yy_cp;
	    }
	  while (yy_base[yy_current_state] != 24);

	yy_find_action:
	  yy_act = yy_accept[yy_current_state];
	  if (yy_act == 0)
	    {			/* have to back up */
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		yy_act = yy_accept[yy_current_state];
	    }

	  YY_DO_BEFORE_ACTION;

	do_action:		/* This label is used only to access EOF actions. */

	  switch (yy_act)
	    {			/* beginning of action switch */
	    case 0:		/* must back up */
		/* undo the effects of YY_DO_BEFORE_ACTION */
		*yy_cp = yyg->yy_hold_char;
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		goto yy_find_action;

	    case 1:
		YY_RULE_SETUP
		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    return GML_END;
		}
		YY_BREAK case 2:YY_RULE_SETUP


		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    return GML_EQ;
		}
		YY_BREAK case 3:YY_RULE_SETUP


		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    return GML_OPEN;
		}
		YY_BREAK case 4:YY_RULE_SETUP


		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    return GML_CLOSE;
		}
		YY_BREAK case 5:YY_RULE_SETUP


		{
		    gml_saveString (&(Gmlget_extra (yyscanner)->GmlLval.pval),
				    yytext);
		    return GML_COORD;
		}
		YY_BREAK case 6:

/* rule 6 can match eol */
		  YY_RULE_SETUP
		{
		    gml_saveString (&(Gmlget_extra (yyscanner)->GmlLval.pval),
				    yytext);
		    return GML_VALUE;
		}
		YY_BREAK case 7:YY_RULE_SETUP



		{
		    gml_saveString (&(Gmlget_extra (yyscanner)->GmlLval.pval),
				    yytext);
		    return GML_KEYWORD;
		}
		YY_BREAK case 8:YY_RULE_SETUP



		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    Gmlget_extra (yyscanner)->gml_col += (int) strlen (yytext);
		}		/* ignore but count white space */
		YY_BREAK case 9:

/* rule 9 can match eol */
		  YY_RULE_SETUP

		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    Gmlget_extra (yyscanner)->gml_col = 0;
		    Gmlget_extra (yyscanner)->gml_line++;
		}
		YY_BREAK case 10:YY_RULE_SETUP


		{
		    gml_freeString (&(Gmlget_extra (yyscanner)->GmlLval.pval));
		    Gmlget_extra (yyscanner)->gml_col += (int) strlen (yytext);


		    return -1;
		}
		YY_BREAK case 11:YY_RULE_SETUP ECHO;


		YY_BREAK case YY_STATE_EOF (INITIAL):yyterminate ();


	    case YY_END_OF_BUFFER:
		{
		    /* Amount of text matched not including the EOB char. */
		    int yy_amount_of_matched_text =
			(int) (yy_cp - yyg->yytext_ptr) - 1;

		    /* Undo the effects of YY_DO_BEFORE_ACTION. */
		    *yy_cp = yyg->yy_hold_char;
		    YY_RESTORE_YY_MORE_OFFSET

			if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status ==
			    YY_BUFFER_NEW)
		      {
			  /* We're scanning a new file or input source.  It's
			   * possible that this happened because the user
			   * just pointed yyin at a new source and called
			   * Gmllex().  If so, then we have to assure
			   * consistency between YY_CURRENT_BUFFER and our
			   * globals.  Here is the right place to do so, because
			   * this is the first action (other than possibly a
			   * back-up) that will match for the new input source.
			   */
			  yyg->yy_n_chars =
			      YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
			      YY_BUFFER_NORMAL;
		      }

		    /* Note that here we test for yy_c_buf_p "<=" to the position
		     * of the first EOB in the buffer, since yy_c_buf_p will
		     * already have been incremented past the NUL character
		     * (since all states make transitions on EOB to the
		     * end-of-buffer state).  Contrast this with the test
		     * in input().
		     */
		    if (yyg->yy_c_buf_p <=
			&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
		      {		/* This was really a NUL. */
			  yy_state_type yy_next_state;

			  yyg->yy_c_buf_p =
			      yyg->yytext_ptr + yy_amount_of_matched_text;

			  yy_current_state = yy_get_previous_state (yyscanner);

			  /* Okay, we're now positioned to make the NUL
			   * transition.  We couldn't have
			   * yy_get_previous_state() go ahead and do it
			   * for us because it doesn't know how to deal
			   * with the possibility of jamming (and we don't
			   * want to build jamming into it because then it
			   * will run more slowly).
			   */

			  yy_next_state =
			      yy_try_NUL_trans (yy_current_state, yyscanner);

			  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			  if (yy_next_state)
			    {
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
			    }

			  else
			    {
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
			    }
		      }

		    else
			switch (yy_get_next_buffer (yyscanner))
			  {
			  case EOB_ACT_END_OF_FILE:
			      {
				  yyg->yy_did_buffer_switch_on_eof = 0;


				  if (Gmlwrap (yyscanner))
				    {
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p =
					    yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF (YY_START);
					goto do_action;
				    }

				  else
				    {
					if (!yyg->yy_did_buffer_switch_on_eof)
					    YY_NEW_FILE;
				    }
				  break;
			      }

			  case EOB_ACT_CONTINUE_SCAN:
			      yyg->yy_c_buf_p =
				  yyg->yytext_ptr + yy_amount_of_matched_text;

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_match;

			  case EOB_ACT_LAST_MATCH:
			      yyg->yy_c_buf_p =
				  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->
								       yy_n_chars];

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_find_action;
			  }
		    break;
		}

	    default:
		YY_FATAL_ERROR
		    ("fatal flex scanner internal error--no action found");
	    }			/* end of action switch */
      }				/* end of scanning one token */
}				/* end of Gmllex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int
yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    register char *source = yyg->yytext_ptr;
    register int number_to_move, i;
    int ret_val;

    if (yyg->yy_c_buf_p >
	&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1])
	YY_FATAL_ERROR
	    ("fatal flex scanner internal error--end of buffer missed");

    if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0)
      {				/* Don't try to fill the buffer, so this is an EOF. */
	  if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1)
	    {
		/* We matched a single character, the EOB, so
		 * treat this as a final EOF.
		 */
		return EOB_ACT_END_OF_FILE;
	    }

	  else
	    {
		/* We matched some text prior to the EOB, first
		 * process it.
		 */
		return EOB_ACT_LAST_MATCH;
	    }
      }

    /* Try to read more data. */

    /* First move last chars to start of buffer. */
    number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

    for (i = 0; i < number_to_move; ++i)
	*(dest++) = *(source++);

    if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING)
	/* don't do the read, it's not guaranteed to return an EOF,
	 * just force an EOF
	 */
	YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

    else
      {
	  int num_to_read =
	      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

	  while (num_to_read <= 0)
	    {			/* Not enough room in the buffer - grow it. */

		/* just a shorter name for the current buffer */
		YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

		int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf);

		if (b->yy_is_our_buffer)
		  {
		      int new_size = b->yy_buf_size * 2;

		      if (new_size <= 0)
			  b->yy_buf_size += b->yy_buf_size / 8;
		      else
			  b->yy_buf_size *= 2;

		      b->yy_ch_buf = (char *)
			  /* Include room in for 2 EOB chars. */
			  Gmlrealloc ((void *) b->yy_ch_buf, b->yy_buf_size + 2,
				      yyscanner);
		  }
		else
		    /* Can't grow it, we don't own it. */
		    b->yy_ch_buf = 0;

		if (!b->yy_ch_buf)
		    YY_FATAL_ERROR
			("fatal error - scanner input buffer overflow");

		yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

		num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
		    number_to_move - 1;

	    }

	  if (num_to_read > YY_READ_BUF_SIZE)
	      num_to_read = YY_READ_BUF_SIZE;

	  /* Read in more data. */
	  YY_INPUT ((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
		    yyg->yy_n_chars, (size_t) num_to_read);

	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    if (yyg->yy_n_chars == 0)
      {
	  if (number_to_move == YY_MORE_ADJ)
	    {
		ret_val = EOB_ACT_END_OF_FILE;
		Gmlrestart (yyin, yyscanner);
	    }

	  else
	    {
		ret_val = EOB_ACT_LAST_MATCH;
		YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
		    YY_BUFFER_EOF_PENDING;
	    }
      }

    else
	ret_val = EOB_ACT_CONTINUE_SCAN;

    if ((yy_size_t) (yyg->yy_n_chars + number_to_move) >
	YY_CURRENT_BUFFER_LVALUE->yy_buf_size)
      {
	  /* Extend the array by 50%, plus the number we really need. */
	  yy_size_t new_size =
	      yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
	  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf =
	      (char *) Gmlrealloc ((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,
				   new_size, yyscanner);
	  if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
	      YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()");
      }

    yyg->yy_n_chars += number_to_move;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] =
	YY_END_OF_BUFFER_CHAR;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] =
	YY_END_OF_BUFFER_CHAR;

    yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

    return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type
yy_get_previous_state (yyscan_t yyscanner)
{
    register yy_state_type yy_current_state;
    register char *yy_cp;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    yy_current_state = yyg->yy_start;

    for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p;
	 ++yy_cp)
      {
	  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI (*yy_cp)] : 1);
	  if (yy_accept[yy_current_state])
	    {
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
	    }
	  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
	    {
		yy_current_state = (int) yy_def[yy_current_state];
		if (yy_current_state >= 19)
		    yy_c = yy_meta[(unsigned int) yy_c];
	    }
	  yy_current_state =
	      yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      }

    return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state, yyscan_t yyscanner)
{
    register int yy_is_jam;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;	/* This var may be unused depending upon options. */
    register char *yy_cp = yyg->yy_c_buf_p;

    register YY_CHAR yy_c = 1;
    if (yy_accept[yy_current_state])
      {
	  yyg->yy_last_accepting_state = yy_current_state;
	  yyg->yy_last_accepting_cpos = yy_cp;
      }
    while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
      {
	  yy_current_state = (int) yy_def[yy_current_state];
	  if (yy_current_state >= 19)
	      yy_c = yy_meta[(unsigned int) yy_c];
      }
    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    yy_is_jam = (yy_current_state == 18);

    return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int
yyinput (yyscan_t yyscanner)
#else
static int
input (yyscan_t yyscanner)
#endif
{
    int c;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    *yyg->yy_c_buf_p = yyg->yy_hold_char;

    if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR)
      {
	  /* yy_c_buf_p now points to the character we want to return.
	   * If this occurs *before* the EOB characters, then it's a
	   * valid NUL; if not, then we've hit the end of the buffer.
	   */
	  if (yyg->yy_c_buf_p <
	      &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
	      /* This was really a NUL. */
	      *yyg->yy_c_buf_p = '\0';

	  else
	    {			/* need more input */
		int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
		++yyg->yy_c_buf_p;

		switch (yy_get_next_buffer (yyscanner))
		  {
		  case EOB_ACT_LAST_MATCH:
		      /* This happens because yy_g_n_b()
		       * sees that we've accumulated a
		       * token and flags that we need to
		       * try matching the token before
		       * proceeding.  But for input(),
		       * there's no matching to consider.
		       * So convert the EOB_ACT_LAST_MATCH
		       * to EOB_ACT_END_OF_FILE.
		       */

		      /* Reset buffer status. */
		      Gmlrestart (yyin, yyscanner);

		   /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE:
		      {
			  if (Gmlwrap (yyscanner))
			      return EOF;

			  if (!yyg->yy_did_buffer_switch_on_eof)
			      YY_NEW_FILE;
#ifdef __cplusplus
			  return yyinput (yyscanner);
#else
			  return input (yyscanner);
#endif
		      }

		  case EOB_ACT_CONTINUE_SCAN:
		      yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
		      break;
		  }
	    }
      }

    c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
    *yyg->yy_c_buf_p = '\0';	/* preserve yytext */
    yyg->yy_hold_char = *++yyg->yy_c_buf_p;

    return c;
}
#endif /* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
void
Gmlrestart (FILE * input_file, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
      {
	  Gmlensure_buffer_stack (yyscanner);
	  YY_CURRENT_BUFFER_LVALUE =

	      Gml_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
      }


    Gml_init_buffer (YY_CURRENT_BUFFER, input_file, yyscanner);
    Gml_load_buffer_state (yyscanner);
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
void
Gml_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* TODO. We should be able to replace this entire function body
     * with
     *              Gmlpop_buffer_state();
     *              Gmlpush_buffer_state(new_buffer);
     */
    Gmlensure_buffer_stack (yyscanner);
    if (YY_CURRENT_BUFFER == new_buffer)
	return;

    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    YY_CURRENT_BUFFER_LVALUE = new_buffer;
    Gml_load_buffer_state (yyscanner);

    /* We don't actually know whether we did this switch during
     * EOF (Gmlwrap()) processing, but the only time this flag
     * is looked at is after Gmlwrap() is called, so it's safe
     * to go ahead and always set it.
     */
    yyg->yy_did_buffer_switch_on_eof = 1;
}

static void
Gml_load_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
YY_BUFFER_STATE
Gml_create_buffer (FILE * file, int size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    b = (YY_BUFFER_STATE) Gmlalloc (sizeof (struct yy_buffer_state), yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in Gml_create_buffer()");

    b->yy_buf_size = size;

    /* yy_ch_buf has to be 2 characters longer than the size given because
     * we need to put in 2 end-of-buffer characters.
     */
    b->yy_ch_buf = (char *) Gmlalloc (b->yy_buf_size + 2, yyscanner);
    if (!b->yy_ch_buf)
	YY_FATAL_ERROR ("out of dynamic memory in Gml_create_buffer()");

    b->yy_is_our_buffer = 1;

    Gml_init_buffer (b, file, yyscanner);

    return b;
}

/** Destroy the buffer.
 * @param b a buffer created with Gml_create_buffer()
 * @param yyscanner The scanner object.
 */
void
Gml_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!b)
	return;

    if (b == YY_CURRENT_BUFFER)	/* Not sure if we should pop here. */
	YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

    if (b->yy_is_our_buffer)
	Gmlfree ((void *) b->yy_ch_buf, yyscanner);


    Gmlfree ((void *) b, yyscanner);
}

#ifndef __cplusplus
extern int isatty (int);
#endif /* __cplusplus */

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a Gmlrestart() or at EOF.
 */
static void
Gml_init_buffer (YY_BUFFER_STATE b, FILE * file, yyscan_t yyscanner)
{

    int oerrno = errno;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    Gml_flush_buffer (b, yyscanner);

    b->yy_input_file = file;
    b->yy_fill_buffer = 1;

    /* If b is the current buffer, then Gml_init_buffer was _probably_
     * called from Gmlrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER)
      {
	  b->yy_bs_lineno = 1;
	  b->yy_bs_column = 0;
      }

    b->yy_is_interactive = file ? (isatty (fileno (file)) > 0) : 0;

    errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */
void
Gml_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!b)
	return;

    b->yy_n_chars = 0;

    /* We always need two end-of-buffer characters.  The first causes
     * a transition to the end-of-buffer state.  The second causes
     * a jam in that state.
     */
    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

    b->yy_buf_pos = &b->yy_ch_buf[0];

    b->yy_at_bol = 1;
    b->yy_buffer_status = YY_BUFFER_NEW;

    if (b == YY_CURRENT_BUFFER)
	Gml_load_buffer_state (yyscanner);
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */
void
Gmlpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (new_buffer == NULL)
	return;

    Gmlensure_buffer_stack (yyscanner);

    /* This block is copied from Gml_switch_to_buffer. */
    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    /* Only push if top exists. Otherwise, replace top. */
    if (YY_CURRENT_BUFFER)
	yyg->yy_buffer_stack_top++;
    YY_CURRENT_BUFFER_LVALUE = new_buffer;

    /* copied from Gml_switch_to_buffer. */
    Gml_load_buffer_state (yyscanner);
    yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
void
Gmlpop_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!YY_CURRENT_BUFFER)
	return;

    Gml_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
    YY_CURRENT_BUFFER_LVALUE = NULL;
    if (yyg->yy_buffer_stack_top > 0)
	--yyg->yy_buffer_stack_top;

    if (YY_CURRENT_BUFFER)
      {
	  Gml_load_buffer_state (yyscanner);
	  yyg->yy_did_buffer_switch_on_eof = 1;
      }
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void
Gmlensure_buffer_stack (yyscan_t yyscanner)
{
    int num_to_alloc;

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_buffer_stack)
      {

	  /* First allocation is just for 2 elements, since we don't know if this
	   * scanner will even need a stack. We use 2 instead of 1 to avoid an
	   * immediate realloc on the next call.
	   */
	  num_to_alloc = 1;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) Gmlalloc
	      (num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in Gmlensure_buffer_stack()");

	  memset (yyg->yy_buffer_stack, 0,
		  num_to_alloc * sizeof (struct yy_buffer_state *));

	  yyg->yy_buffer_stack_max = num_to_alloc;
	  yyg->yy_buffer_stack_top = 0;
	  return;
      }

    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1)
      {

	  /* Increase the buffer to prepare for a possible push. */
	  int grow_size = 8 /* arbitrary grow size */ ;

	  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) Gmlrealloc
	      (yyg->yy_buffer_stack,
	       num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in Gmlensure_buffer_stack()");

	  /* zero only the new slots. */
	  memset (yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0,
		  grow_size * sizeof (struct yy_buffer_state *));
	  yyg->yy_buffer_stack_max = num_to_alloc;
      }
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */

YY_BUFFER_STATE
Gml_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    if (size < 2 ||
	base[size - 2] != YY_END_OF_BUFFER_CHAR ||
	base[size - 1] != YY_END_OF_BUFFER_CHAR)
	/* They forgot to leave room for the EOB's. */
	return 0;

    b = (YY_BUFFER_STATE) Gmlalloc (sizeof (struct yy_buffer_state), yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in Gml_scan_buffer()");

    b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;

    Gml_switch_to_buffer (b, yyscanner);

    return b;
}

/** Setup the input buffer state to scan a string. The next call to Gmllex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       Gml_scan_bytes() instead.
 */
YY_BUFFER_STATE
Gml_scan_string (yyconst char *yystr, yyscan_t yyscanner)
{

    return Gml_scan_bytes (yystr, strlen (yystr), yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to Gmllex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE
Gml_scan_bytes (yyconst char *yybytes, int _yybytes_len, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;
    char *buf;
    yy_size_t n;
    int i;

    /* Get memory for full buffer, including space for trailing EOB's. */
    n = _yybytes_len + 2;
    buf = (char *) Gmlalloc (n, yyscanner);
    if (!buf)
	YY_FATAL_ERROR ("out of dynamic memory in Gml_scan_bytes()");

    for (i = 0; i < _yybytes_len; ++i)
	buf[i] = yybytes[i];

    buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR;

    b = Gml_scan_buffer (buf, n, yyscanner);
    if (!b)
	YY_FATAL_ERROR ("bad buffer in Gml_scan_bytes()");

    /* It's okay to grow etc. this buffer, and we should throw it
     * away when we're done.
     */
    b->yy_is_our_buffer = 1;

    return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void
yy_fatal_error (yyconst char *msg, yyscan_t yyscanner)
{


    (void) fprintf (stderr, "%s\n", msg);
    exit (YY_EXIT_FAILURE);
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE
Gmlget_extra (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int
Gmlget_lineno (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int
Gmlget_column (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *
Gmlget_in (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *
Gmlget_out (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
int
Gmlget_leng (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *
Gmlget_text (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void
Gmlset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyextra = user_defined;
}

/** Set the current line number.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
Gmlset_lineno (int line_number, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* lineno is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("Gmlset_lineno called with no buffer", yyscanner);

    yylineno = line_number;
}

/** Set the current column.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
Gmlset_column (int column_no, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* column is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("Gmlset_column called with no buffer", yyscanner);

    yycolumn = column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see Gml_switch_to_buffer
 */
void
Gmlset_in (FILE * in_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyin = in_str;
}

void
Gmlset_out (FILE * out_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyout = out_str;
}

int
Gmlget_debug (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yy_flex_debug;
}

void
Gmlset_debug (int bdebug, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yy_flex_debug = bdebug;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* Gmllex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */

int
Gmllex_init (yyscan_t * ptr_yy_globals)
{

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }

    *ptr_yy_globals = (yyscan_t) Gmlalloc (sizeof (struct yyguts_t), NULL);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    return yy_init_globals (*ptr_yy_globals);
}

/* Gmllex_init_extra has the same functionality as Gmllex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to Gmlalloc in
 * the yyextra field.
 */

int
Gmllex_init_extra (YY_EXTRA_TYPE yy_user_defined, yyscan_t * ptr_yy_globals)
{
    struct yyguts_t dummy_yyguts;

    Gmlset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }


    *ptr_yy_globals =
	(yyscan_t) Gmlalloc (sizeof (struct yyguts_t), &dummy_yyguts);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in
       yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    Gmlset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals (*ptr_yy_globals);
}

static int
yy_init_globals (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from Gmllex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = 0;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = (char *) 0;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack = NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * Gmllex_init()
     */
    return 0;
}

/* Gmllex_destroy is for both reentrant and non-reentrant scanners. */
int
Gmllex_destroy (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* Pop the buffer stack, destroying each element. */
    while (YY_CURRENT_BUFFER)
      {
	  Gml_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
	  YY_CURRENT_BUFFER_LVALUE = NULL;
	  Gmlpop_buffer_state (yyscanner);
      }

    /* Destroy the stack itself. */
    Gmlfree (yyg->yy_buffer_stack, yyscanner);
    yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
    Gmlfree (yyg->yy_start_stack, yyscanner);
    yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * Gmllex() is called, initialization will occur. */
    yy_init_globals (yyscanner);

    /* Destroy the main struct (reentrant only). */
    Gmlfree (yyscanner, yyscanner);
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr



static void
yy_flex_strncpy (char *s1, yyconst char *s2, int n, yyscan_t yyscanner)
{
    register int i;
    for (i = 0; i < n; ++i)
	s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int
yy_flex_strlen (yyconst char *s, yyscan_t yyscanner)
{
    register int n;
    for (n = 0; s[n]; ++n)
	;

    return n;
}
#endif

void *
Gmlalloc (yy_size_t size, yyscan_t yyscanner)
{

    return (void *) malloc (size);

}




void *
Gmlrealloc (void *ptr, yy_size_t size, yyscan_t yyscanner)
{
    /* The cast to (char *) in the following accommodates both
     * implementations that use char* generic pointers, and those
     * that use void* generic pointers.  It works with the latter
     * because both ANSI C and C++ allow castless assignment from
     * any pointer type to void*, and deal with argument conversions
     * as though doing an assignment.
     */

    return (void *) realloc ((char *) ptr, size);
}

void
Gmlfree (void *ptr, yyscan_t yyscanner)
{


    free ((char *) ptr);	/* see Gmlrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

int
Gmlwrap (yyscan_t yyscanner)
{
    return 1;
}

Changes to src/gaiageo/lex.Kml.c.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90



91
92








93
94
95
96
97
98
99
100
101
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194





195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

286
287
288
289

290
291

292
293
294
295
296
297
298
299
300
301
302
...
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

360
361
362
363
364
365
366
367
368
369
370
371


372
373
374
375
376
377
378
379
380
381
382


383
384
385
386
387
388
389
390
391
392
393

394
395
396
397
398
399
400
401



402
403
404
405
406
407
408



409
410
411
412
413
414
415
416
417




418
419
420
421
422
423
424
425
426




427
428
429
430
431
432
433
434
...
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
...
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734

735
736
737

738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767

768
769
770
771
772

773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801

802


803
804
805

806


807
808
809

810


811
812
813

814


815
816
817

818



819
820
821
822

823



824
825
826
827





828
829
830
831




832
833
834
835
836





837
838
839


840
841
842


843
844
845
846
847
848
849
850
851

852
853
854
855
856
857
858

859
860
861
862
863
864
865
866
867
868

869
870
871

872
873
874
875
876
877
878
879
880

881
882
883
884

885
886
887
888
889
890
891
892
893
894
895
896
897
898

899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916

917
918
919
920
921
922
923

924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256











1257
1258
1259
1260
1261
1262

1263
1264
1265

1266
1267

1268
1269
1270

1271
1272
1273

1274
1275
1276
1277
1278
1279
1280
1281

1282
1283

1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312

1313
1314
1315

1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328

1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355

1356
1357
1358

1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369

1370
1371




1372
1373
1374
1375
1376

1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391

1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404

1405
1406
1407

1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434

1435
1436
1437

1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465

1466
1467
1468

1469
1470
1471
1472
1473
1474
1475
1476
1477

1478
1479
1480
1481
1482
1483
1484
1485

1486
1487
1488
1489

1490
1491
1492

1493
1494
1495
1496
1497
1498
1499
1500
1501

1502
1503
1504

1505
1506
1507
1508
1509
1510
1511
1512

1513
1514
1515
1516
1517
1518
1519
1520
1521

1522
1523
1524
1525

1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536


1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572

1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586

1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619

1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
....
1643
1644
1645
1646
1647
1648
1649

1650
1651
1652

1653
1654
1655
1656
1657
1658

1659
1660
1661

1662
1663
1664
1665
1666
1667
1668
1669
1670
1671

1672
1673
1674

1675
1676
1677
1678
1679
1680
1681
1682
1683
1684

1685
1686
1687

1688
1689
1690
1691
1692
1693

1694
1695
1696

1697
1698
1699
1700
1701
1702

1703
1704
1705

1706
1707
1708
1709
1710
1711
1712

1713
1714
1715

1716
1717
1718
1719
1720
1721
1722

1723
1724
1725

1726
1727
1728
1729
1730
1731
1732

1733
1734
1735

1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747

1748
1749
1750

1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764

1765
1766
1767

1768
1769
1770

1771
1772
1773

1774
1775
1776

1777
1778
1779

1780
1781
1782

1783
1784
1785

1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797

1798
1799
1800
1801

1802
1803
1804
1805
1806
1807
1808

1809
1810
1811
1812
1813
1814

1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834

1835
1836
1837
1838
1839


1840
1841

1842
1843
1844
1845
1846
1847
1848

1849
1850
1851
1852
1853
1854

1855
1856
1857

1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888

1889
1890
1891

1892
1893
1894

1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926

1927
1928
1929
1930
1931
1932
1933
1934

1935
1936
1937
1938
1939
1940
1941
1942
1943
1944

1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955

1956
1957
1958
1959
1960
1961
1962
1963
1964

1965
1966

1967
1968
1969
1970
1971
1972
1973
1974
1975

1976
1977
1978
1979
1980



#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;


/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* TODO: this is always defined, so inline it */
#define yyconst const




#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))








#else
#define yynoreturn
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE Kmlrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )






#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via Kmlrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void Kmlrestart (FILE *input_file ,yyscan_t yyscanner );
void Kml_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE Kml_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void Kml_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void Kml_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void Kmlpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void Kmlpop_buffer_state (yyscan_t yyscanner );

static void Kmlensure_buffer_stack (yyscan_t yyscanner );
static void Kml_load_buffer_state (yyscan_t yyscanner );
static void Kml_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );


#define YY_FLUSH_BUFFER Kml_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE Kml_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );

YY_BUFFER_STATE Kml_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE Kml_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );


void *Kmlalloc (yy_size_t ,yyscan_t yyscanner );
void *Kmlrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void Kmlfree (void * ,yyscan_t yyscanner );

#define yy_new_buffer Kml_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        Kmlensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);

static int yy_get_next_buffer (yyscan_t yyscanner );
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 11
#define YY_END_OF_BUFFER 12
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[21] =
    {   0,
        5,    5,   12,   10,    8,    9,   10,    5,    1,    3,
        2,    4,    7,    5,    0,    6,    5,    7,    5,    0
    } ;

static yyconst YY_CHAR yy_ec[256] =

    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    4,    1,    1,    1,    1,    1,    1,
        1,    1,    5,    5,    5,    5,    6,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    8,    1,    9,
       10,   11,    1,    1,   12,   12,   12,   12,   13,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
        1,    1,    1,    1,   12,    1,   12,   12,   12,   12,



       13,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,



        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst YY_CHAR yy_meta[14] =
    {   0,
        1,    1,    1,    1,    2,    1,    3,    4,    5,    1,

        5,    4,    3
    } ;

static yyconst flex_uint16_t yy_base[24] =
    {   0,
        0,    0,   19,   31,   31,   31,   14,    0,   31,   31,
       31,   31,    0,    9,   11,   31,    0,    0,    0,   31,
       22,   25,   26



    } ;

static yyconst flex_int16_t yy_def[24] =
    {   0,
       20,    1,   20,   20,   20,   20,   21,   22,   20,   20,
       20,   20,   23,   20,   21,   20,   22,   23,   14,    0,
       20,   20,   20



    } ;

static yyconst flex_uint16_t yy_nxt[45] =
    {   0,
        4,    5,    6,    7,    8,    9,    8,    4,   10,   11,
       12,   13,   14,   17,   16,   19,   18,   16,   20,   20,
       18,   19,   15,   15,   15,   15,   17,   17,   18,   18,
        3,   20,   20,   20,   20,   20,   20,   20,   20,   20,
       20,   20,   20,   20




    } ;

static yyconst flex_int16_t yy_chk[45] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,   14,   15,   14,   14,    7,    3,    0,
       14,   14,   21,   21,   21,   21,   22,   22,   23,   23,
       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
       20,   20,   20,   20




    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct kml_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

int Kmllex_init (yyscan_t* scanner);

int Kmllex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int Kmllex_destroy (yyscan_t yyscanner );

int Kmlget_debug (yyscan_t yyscanner );

void Kmlset_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE Kmlget_extra (yyscan_t yyscanner );

void Kmlset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *Kmlget_in (yyscan_t yyscanner );

void Kmlset_in  (FILE * _in_str ,yyscan_t yyscanner );

FILE *Kmlget_out (yyscan_t yyscanner );

void Kmlset_out  (FILE * _out_str ,yyscan_t yyscanner );

			int Kmlget_leng (yyscan_t yyscanner );

char *Kmlget_text (yyscan_t yyscanner );

int Kmlget_lineno (yyscan_t yyscanner );

void Kmlset_lineno (int _line_number ,yyscan_t yyscanner );

int Kmlget_column  (yyscan_t yyscanner );

void Kmlset_column (int _column_no ,yyscan_t yyscanner );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int Kmlwrap (yyscan_t yyscanner );
#else
extern int Kmlwrap (yyscan_t yyscanner );
#endif
#endif

#ifndef YY_NO_UNPUT
    
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
#else
static int input (yyscan_t yyscanner );
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {

			Kmlensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				Kml_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);

		}

		Kml_load_buffer_state(yyscanner );
		}

	{

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = yyg->yy_start;
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				yyg->yy_last_accepting_state = yy_current_state;
				yyg->yy_last_accepting_cpos = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )

				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 21 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}

			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 31 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = yyg->yy_hold_char;
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			goto yy_find_action;

case 1:
YY_RULE_SETUP

{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_END; }


	YY_BREAK
case 2:
YY_RULE_SETUP

{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_EQ; }


	YY_BREAK
case 3:
YY_RULE_SETUP

{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_OPEN; }


	YY_BREAK
case 4:
YY_RULE_SETUP

{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); return KML_CLOSE; }


	YY_BREAK
case 5:
YY_RULE_SETUP

{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_COORD; }



	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP

{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_VALUE; }



	YY_BREAK
case 7:
YY_RULE_SETUP
{ kml_saveString(&(Kmlget_extra(yyscanner)->KmlLval.pval), yytext); return KML_KEYWORD; }





	YY_BREAK
case 8:
YY_RULE_SETUP
{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col += (int) strlen(yytext); }               /* ignore but count white space */




	YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col = 0; Kmlget_extra(yyscanner)->kml_line++; }





	YY_BREAK
case 10:
YY_RULE_SETUP


{ kml_freeString(&(Kmlget_extra(yyscanner)->KmlLval.pval)); Kmlget_extra(yyscanner)->kml_col += (int) strlen(yytext); return -1; }
	YY_BREAK
case 11:


YY_RULE_SETUP
ECHO;
	YY_BREAK
case YY_STATE_EOF(INITIAL):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */

		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )

			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * Kmllex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */

			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;

			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */

		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;


			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);


			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
				}
			}


		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( Kmlwrap(yyscanner ) )

					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of Kmllex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = yyg->yytext_ptr;
	yy_size_t number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					Kmlrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			Kmlrestart(yyin  ,yyscanner);
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) Kmlrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	yyg->yy_n_chars += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 21 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
{
	int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
	char *yy_cp = yyg->yy_c_buf_p;

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 21 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
	yy_is_jam = (yy_current_state == 20);

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (yyscan_t yyscanner)
#else
    static int input  (yyscan_t yyscanner)
#endif

{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					Kmlrestart(yyin ,yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( Kmlwrap(yyscanner ) )
						return 0;

					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput(yyscanner);
#else
					return input(yyscanner);
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
	yyg->yy_hold_char = *++yyg->yy_c_buf_p;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */












/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */

    void Kmlrestart  (FILE * input_file , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! YY_CURRENT_BUFFER ){

        Kmlensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            Kml_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);

	}

	Kml_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);

	Kml_load_buffer_state(yyscanner );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
    void Kml_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	/* TODO. We should be able to replace this entire function body
	 * with
	 *		Kmlpop_buffer_state();
	 *		Kmlpush_buffer_state(new_buffer);
     */
	Kmlensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	Kml_load_buffer_state(yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (Kmlwrap()) processing, but the only time this flag
	 * is looked at is after Kmlwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}


static void Kml_load_buffer_state  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE Kml_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) Kmlalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in Kml_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) Kmlalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in Kml_create_buffer()" );

	b->yy_is_our_buffer = 1;

	Kml_init_buffer(b,file ,yyscanner);

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with Kml_create_buffer()
 * @param yyscanner The scanner object.
 */

    void Kml_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		Kmlfree((void *) b->yy_ch_buf ,yyscanner );

	Kmlfree((void *) b ,yyscanner );

}





/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a Kmlrestart() or at EOF.
 */
    static void Kml_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)


{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	Kml_flush_buffer(b ,yyscanner);

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then Kml_init_buffer was _probably_
     * called from Kmlrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){

        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */

    void Kml_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		Kml_load_buffer_state(yyscanner );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */

void Kmlpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (new_buffer == NULL)
		return;

	Kmlensure_buffer_stack(yyscanner);

	/* This block is copied from Kml_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from Kml_switch_to_buffer. */
	Kml_load_buffer_state(yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */

void Kmlpop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!YY_CURRENT_BUFFER)
		return;

	Kml_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {

		Kml_load_buffer_state(yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */

static void Kmlensure_buffer_stack (yyscan_t yyscanner)
{
	int num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if (!yyg->yy_buffer_stack) {


		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		yyg->yy_buffer_stack = (struct yy_buffer_state**)Kmlalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in Kmlensure_buffer_stack()" );
								  
		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));

				
		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){


		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)Kmlrealloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in Kmlensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));

		yyg->yy_buffer_stack_max = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE Kml_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)


{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return NULL;

	b = (YY_BUFFER_STATE) Kmlalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in Kml_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	Kml_switch_to_buffer(b ,yyscanner );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to Kmllex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       Kml_scan_bytes() instead.
 */

YY_BUFFER_STATE Kml_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
    
	return Kml_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to Kmllex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE Kml_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	yy_size_t i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) _yybytes_len + 2;
	buf = (char *) Kmlalloc(n ,yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in Kml_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = Kml_scan_buffer(buf,n ,yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in Kml_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif


static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */

YY_EXTRA_TYPE Kmlget_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */

int Kmlget_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */

int Kmlget_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */

FILE *Kmlget_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */

FILE *Kmlget_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */

int Kmlget_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */


char *Kmlget_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */

void Kmlset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyextra = user_defined ;
}

/** Set the current line number.
 * @param _line_number line number
 * @param yyscanner The scanner object.
 */

void Kmlset_lineno (int  _line_number , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "Kmlset_lineno called with no buffer" );
    
    yylineno = _line_number;
}

/** Set the current column.
 * @param _column_no column number
 * @param yyscanner The scanner object.
 */

void Kmlset_column (int  _column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "Kmlset_column called with no buffer" );
    
    yycolumn = _column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see Kml_switch_to_buffer
 */

void Kmlset_in (FILE *  _in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyin = _in_str ;
}


void Kmlset_out (FILE *  _out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyout = _out_str ;
}


int Kmlget_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yy_flex_debug;
}


void Kmlset_debug (int  _bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yy_flex_debug = _bdebug ;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* Kmllex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */


int Kmllex_init(yyscan_t* ptr_yy_globals)

{
    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) Kmlalloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));


    return yy_init_globals ( *ptr_yy_globals );
}

/* Kmllex_init_extra has the same functionality as Kmllex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to Kmlalloc in
 * the yyextra field.
 */

int Kmllex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )

{
    struct yyguts_t dummy_yyguts;

    Kmlset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }
	
    *ptr_yy_globals = (yyscan_t) Kmlalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );


	
    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }
    
    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    
    Kmlset_extra (yy_user_defined, *ptr_yy_globals);
    
    return yy_init_globals ( *ptr_yy_globals );
}


static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from Kmllex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = NULL;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = NULL;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * Kmllex_init()
     */
    return 0;
}

/* Kmllex_destroy is for both reentrant and non-reentrant scanners. */

int Kmllex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){

		Kml_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		Kmlpop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	Kmlfree(yyg->yy_buffer_stack ,yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        Kmlfree(yyg->yy_start_stack ,yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * Kmllex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    Kmlfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN

static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif


void *Kmlalloc (yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	return malloc(size);
}

void *Kmlrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);

}


void Kmlfree (void * ptr , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	free( (char *) ptr );	/* see Kmlrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"


int Kmlwrap(yyscan_t yyscanner )
{
  return 1;
}

>
>







|
|







 







|


>







 







|

|

|
|

>
>
>
|
<
>
>
>
>
>
>
>
>

|







 







|







 







<
<
<
<
<
<
<

<











<
<
<
<
<




|
<
|





|










>
>
>
>
>



|
|

|
|

|
|
|
|

|
|
|
|

|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|



|
|
|
|
|

|



|
|
|
|
|
|
|
|
|
|


|







 







|
|
|
|
|
|
|

|
|
|
>



|
>
|
|
>

|
|
|







 







|
|
>
|
|






|









|
|
|
|
|
|
|
<
|

|
>
|
|
|
|
|
|
|
|
|
<
<

>
>
|
|
|
|
|
|
|
|
<
<

>
>
|
|
|
|
<
<
|

|
<
<
>
|
|

|
<
<
<
<
>
>
>
|

|
<
<
<
<
>
>
>
|

|
<
<
<
<
<
<
>
>
>
>
|

|
<
<
<
<
<
<
>
>
>
>
|







 







|






|
|
|











|








|

|

|

|




|

|

|

|

|

|

|

|

|

|

|

|

|

|

|







|

|

<
<
<
<



|



|





|

|






<
<
<
<

<







|










|












|







 







|









|
|
|
|

|
|
|


|


|
|

|
|

|
|

|
>
|
|
<
>
|

|
|

<
<
|
|
|

|
|

|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
>
|
|
|
|

|
|
|
|
|
|
|
|

|

|

|
|
|
|
|
|
|
|

|
|
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
|
<
<
>
|
>
>
>
|
<

|
>
|
>
>
>
|
<
<
<
>
>
>
>
>
|
<
<
<
>
>
>
>
|
<

|
<
>
>
>
>
>
|
<
<
>
>
|
<
<
>
>
|
<
<
|
<

|

|
>
|

|
|
|
<
|
>
|
|
|
|
|
|
|
|
|
|
>
|
|
|
>
|

|
|
|
|
|
|
|
>
|
|
|

>
|

|

|
|
|
|
|
|
|
|

|
>

|

|
|




|

|
|


|
|

>
|
|
|
|
|

<
>
|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>






>
|

<
>

|
>
|
|
<
>
|

<
>
|






|
>

<
>

|
|
|
|

|
|
|

|
|
|
|
|
|
|

|
|

|
|
|
|
|
|


>
|

<
>
|
|
|
|








|
>

|
|
|
|
|

|

|
|
|
|
|
|

|

|

|






>
|

<
>

|
|

|
|

|
|

<
>


>
>
>
>




|
>
|
<
|
|

|

|
|





|
>
|
|
|

|
|
|






>
|

<
>
|
|

|

|
|
|
|
|
|

|

|
|

|
|








>
|

<
>
|
|

|

|
|
|
|
|
|
|
|

|
|
|
|

|
|
|






>
|

<
>
|
|

|
|
|
|

|
>
|
|
|





>
|

|
<
>

|
|
>
|
|
|
|
|
|
|
<
|
>
|
|
|
>
|
|
|
|
|

|
|
>
|
|

|
|
|
|
<
|
>
|

|
|
>
|
|








<
>
>

|
|
|
|
|
|
|

|
|
|

|
|
|
|
|
|
|
|
|

|

|










>
|

|
|




|
|



|
>

|
|
|
|
|
|
|
|
|
|

|
|

|

|
|
|

|
|
|
|

|






>
|

<
<
|
|









|







 







>
|

<
>






>
|

<
>
|
|
|
|






>
|

<
>
|
|
|
|






>
|

<
>






>
|

<
>






>
|

<
>







>
|

<
>







>
|

<
>
|



|


>
|

<
>

|
|
|
|
|



|


>
|

<
>

|
|
|
|
|




|



>
|

<
>
|


>
|

<
>
|


>
|

<
>



>
|

<
>
|











>
|
|
<
|
>
|
|
|

|

|
>
|
|
|


<
>

|










|
|





|
>
|
|
|
|
<
>
>
|
|
>
|
|
|
|

|
<
>
|

|
|


>
|

<
>




|


|





|






|
|









>
|

<
>


|
>
|
|
|
|

|
|
|


|
|



|


|









<
<
<
|
>
|
|
|
|




>
|

|
|
|

|



>
|

<
|
<


<
<
<
|
>
|
|
|
|
|
|
|
|
<
>


>
|

<
<
|




>
|

|

<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159







160

161
162
163
164
165
166
167
168
169
170
171





172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
...
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363

364
365
366
367
368
369
370
371
372
373
374
375
376


377
378
379
380
381
382
383
384
385
386
387


388
389
390
391
392
393
394


395
396
397


398
399
400
401
402




403
404
405
406
407
408




409
410
411
412
413
414






415
416
417
418
419
420
421






422
423
424
425
426
427
428
429
430
431
432
433
...
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582




583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604




605

606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
...
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727

728
729
730
731
732
733


734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797


798
799
800
801
802


803
804
805
806
807


808
809
810
811
812


813
814
815
816
817
818

819
820
821
822
823
824
825
826



827
828
829
830
831
832



833
834
835
836
837

838
839

840
841
842
843
844
845


846
847
848


849
850
851


852

853
854
855
856
857
858
859
860
861
862

863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934

935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288

1289
1290
1291
1292
1293
1294

1295
1296
1297

1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308

1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341

1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386

1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397

1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411

1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441

1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472

1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504

1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527

1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539

1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561

1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578

1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668


1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
....
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697

1698
1699
1700
1701
1702
1703
1704
1705
1706
1707

1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721

1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735

1736
1737
1738
1739
1740
1741
1742
1743
1744
1745

1746
1747
1748
1749
1750
1751
1752
1753
1754
1755

1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766

1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777

1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788

1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804

1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822

1823
1824
1825
1826
1827
1828
1829

1830
1831
1832
1833
1834
1835
1836

1837
1838
1839
1840
1841
1842
1843

1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859

1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874

1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900

1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911

1912
1913
1914
1915
1916
1917
1918
1919
1920
1921

1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956

1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989



1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013

2014

2015
2016



2017
2018
2019
2020
2021
2022
2023
2024
2025
2026

2027
2028
2029
2030
2031
2032


2033
2034
2035
2036
2037
2038
2039
2040
2041
2042


#line 3 "lex.Kml.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)


#define YY_USE_CONST

#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void *yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE Kmlrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE







#define YY_BUF_SIZE 16384

#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif






#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

#define YY_LESS_LINENO(n)


/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
    FILE *yy_input_file;

    char *yy_ch_buf;		/* input buffer */
    char *yy_buf_pos;		/* current position in input buffer */

    /* Size of input buffer in bytes, not including room for EOB
     * characters.
     */
    yy_size_t yy_buf_size;

    /* Number of characters read into yy_ch_buf, not including EOB
     * characters.
     */
    int yy_n_chars;

    /* Whether we "own" the buffer - i.e., we know we created it,
     * and can realloc() it to grow it, and should free() it to
     * delete it.
     */
    int yy_is_our_buffer;

    /* Whether this is an "interactive" input source; if so, and
     * if we're using stdio for input, then we want to use getc()
     * instead of fread(), to make sure we stop fetching input after
     * each newline.
     */
    int yy_is_interactive;

    /* Whether we're considered to be at the beginning of a line.
     * If so, '^' rules will be active on the next match, otherwise
     * not.
     */
    int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

    /* Whether to try to fill the input buffer when we reach the
     * end of it.
     */
    int yy_fill_buffer;

    int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
    /* When an EOF's been seen but there's still some text to process
     * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     * shouldn't try reading from the input source any more.  We might
     * still have a bunch of tokens to match, though, because of
     * possible backing-up.
     *
     * When we actually see the EOF, we change the status to "new"
     * (via Kmlrestart()), so that the user can continue scanning by
     * just pointing yyin at a new input file.
     */
#define YY_BUFFER_EOF_PENDING 2

};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void Kmlrestart (FILE * input_file, yyscan_t yyscanner);
void Kml_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
YY_BUFFER_STATE Kml_create_buffer (FILE * file, int size, yyscan_t yyscanner);
void Kml_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void Kml_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void Kmlpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner);
void Kmlpop_buffer_state (yyscan_t yyscanner);

static void Kmlensure_buffer_stack (yyscan_t yyscanner);
static void Kml_load_buffer_state (yyscan_t yyscanner);
static void Kml_init_buffer (YY_BUFFER_STATE b, FILE * file,
			     yyscan_t yyscanner);

#define YY_FLUSH_BUFFER Kml_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE Kml_scan_buffer (char *base, yy_size_t size,
				 yyscan_t yyscanner);
YY_BUFFER_STATE Kml_scan_string (yyconst char *yy_str, yyscan_t yyscanner);
YY_BUFFER_STATE Kml_scan_bytes (yyconst char *bytes, int len,
				yyscan_t yyscanner);

void *Kmlalloc (yy_size_t, yyscan_t yyscanner);
void *Kmlrealloc (void *, yy_size_t, yyscan_t yyscanner);
void Kmlfree (void *, yyscan_t yyscanner);

#define yy_new_buffer Kml_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        Kmlensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner);
static yy_state_type yy_try_NUL_trans (yy_state_type current_state,
				       yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner);
static void yy_fatal_error (yyconst char msg[], yyscan_t yyscanner);

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (size_t) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 11
#define YY_END_OF_BUFFER 12
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
{
    flex_int32_t yy_verify;
    flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[19] = { 0,
    5, 5, 12, 10, 8, 9, 10, 5, 1, 3,
    2, 4, 7, 0, 6, 5, 7, 0

};

static yyconst flex_int32_t yy_ec[256] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 2, 1, 4, 1, 1, 1, 1, 1, 1,
    1, 1, 5, 5, 5, 5, 6, 7, 7, 7,
    7, 7, 7, 7, 7, 7, 7, 8, 1, 9,
    10, 11, 1, 1, 12, 12, 12, 12, 12, 12,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    1, 1, 1, 1, 12, 1, 12, 12, 12, 12,



    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
    12, 12, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,



    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1


};

static yyconst flex_int32_t yy_meta[13] = { 0,


    1, 1, 1, 1, 2, 1, 3, 4, 5, 1,
    5, 4
};

static yyconst flex_int16_t yy_base[22] = { 0,




    0, 0, 23, 24, 24, 24, 18, 0, 24, 24,
    24, 24, 0, 17, 24, 0, 0, 24, 12, 15,
    16
};

static yyconst flex_int16_t yy_def[22] = { 0,




    18, 1, 18, 18, 18, 18, 19, 20, 18, 18,
    18, 18, 21, 19, 18, 20, 21, 0, 18, 18,
    18
};

static yyconst flex_int16_t yy_nxt[37] = { 0,






    4, 5, 6, 7, 8, 9, 8, 4, 10, 11,
    12, 13, 14, 14, 14, 14, 16, 16, 17, 17,
    15, 15, 18, 3, 18, 18, 18, 18, 18, 18,
    18, 18, 18, 18, 18, 18
};

static yyconst flex_int16_t yy_chk[37] = { 0,






    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 19, 19, 19, 19, 20, 20, 21, 21,
    14, 7, 3, 18, 18, 18, 18, 18, 18, 18,
    18, 18, 18, 18, 18, 18
};

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct kml_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
{

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top;	/**< index of top of stack. */
    size_t yy_buffer_stack_max;	/**< capacity of stack. */
    YY_BUFFER_STATE *yy_buffer_stack;  /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char *yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

};				/* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner);

int Kmllex_init (yyscan_t * scanner);

int Kmllex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t * scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int Kmllex_destroy (yyscan_t yyscanner);

int Kmlget_debug (yyscan_t yyscanner);

void Kmlset_debug (int debug_flag, yyscan_t yyscanner);

YY_EXTRA_TYPE Kmlget_extra (yyscan_t yyscanner);

void Kmlset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);

FILE *Kmlget_in (yyscan_t yyscanner);

void Kmlset_in (FILE * in_str, yyscan_t yyscanner);

FILE *Kmlget_out (yyscan_t yyscanner);

void Kmlset_out (FILE * out_str, yyscan_t yyscanner);

int Kmlget_leng (yyscan_t yyscanner);

char *Kmlget_text (yyscan_t yyscanner);

int Kmlget_lineno (yyscan_t yyscanner);

void Kmlset_lineno (int line_number, yyscan_t yyscanner);

int Kmlget_column (yyscan_t yyscanner);

void Kmlset_column (int column_no, yyscan_t yyscanner);

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int Kmlwrap (yyscan_t yyscanner);
#else
extern int Kmlwrap (yyscan_t yyscanner);
#endif




#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *, yyconst char *, int, yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char *, yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner);
#else
static int input (yyscan_t yyscanner);
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE




#define YY_READ_BUF_SIZE 8192

#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		unsigned n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
    register yy_state_type yy_current_state;
    register char *yy_cp, *yy_bp;
    register int yy_act;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_init)
      {
	  yyg->yy_init = 1;

#ifdef YY_USER_INIT
	  YY_USER_INIT;
#endif

	  if (!yyg->yy_start)
	      yyg->yy_start = 1;	/* first start state */

	  if (!yyin)
	      yyin = stdin;

	  if (!yyout)
	      yyout = stdout;

	  if (!YY_CURRENT_BUFFER)
	    {
		Kmlensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =

		    Kml_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
	    }

	  Kml_load_buffer_state (yyscanner);
      }



    while (1)			/* loops until end-of-file is reached */
      {
	  yy_cp = yyg->yy_c_buf_p;

	  /* Support of yytext. */
	  *yy_cp = yyg->yy_hold_char;

	  /* yy_bp points to the position in yy_ch_buf of the start of
	   * the current run.
	   */
	  yy_bp = yy_cp;

	  yy_current_state = yyg->yy_start;
	yy_match:
	  do
	    {
		register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI (*yy_cp)];
		if (yy_accept[yy_current_state])
		  {
		      yyg->yy_last_accepting_state = yy_current_state;
		      yyg->yy_last_accepting_cpos = yy_cp;
		  }
		while (yy_chk[yy_base[yy_current_state] + yy_c] !=
		       yy_current_state)
		  {
		      yy_current_state = (int) yy_def[yy_current_state];
		      if (yy_current_state >= 19)
			  yy_c = yy_meta[(unsigned int) yy_c];
		  }
		yy_current_state =
		    yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		++yy_cp;
	    }
	  while (yy_base[yy_current_state] != 24);

	yy_find_action:
	  yy_act = yy_accept[yy_current_state];
	  if (yy_act == 0)
	    {			/* have to back up */
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		yy_act = yy_accept[yy_current_state];
	    }

	  YY_DO_BEFORE_ACTION;

	do_action:		/* This label is used only to access EOF actions. */

	  switch (yy_act)
	    {			/* beginning of action switch */
	    case 0:		/* must back up */
		/* undo the effects of YY_DO_BEFORE_ACTION */
		*yy_cp = yyg->yy_hold_char;
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		goto yy_find_action;

	    case 1:
		YY_RULE_SETUP
		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    return KML_END;
		}
		YY_BREAK case 2:YY_RULE_SETUP


		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    return KML_EQ;
		}
		YY_BREAK case 3:YY_RULE_SETUP


		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    return KML_OPEN;
		}
		YY_BREAK case 4:YY_RULE_SETUP


		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    return KML_CLOSE;
		}
		YY_BREAK case 5:YY_RULE_SETUP


		{
		    kml_saveString (&(Kmlget_extra (yyscanner)->KmlLval.pval),
				    yytext);
		    return KML_COORD;
		}
		YY_BREAK case 6:

/* rule 6 can match eol */
		  YY_RULE_SETUP
		{
		    kml_saveString (&(Kmlget_extra (yyscanner)->KmlLval.pval),
				    yytext);
		    return KML_VALUE;
		}
		YY_BREAK case 7:YY_RULE_SETUP



		{
		    kml_saveString (&(Kmlget_extra (yyscanner)->KmlLval.pval),
				    yytext);
		    return KML_KEYWORD;
		}
		YY_BREAK case 8:YY_RULE_SETUP



		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    Kmlget_extra (yyscanner)->kml_col += (int) strlen (yytext);
		}		/* ignore but count white space */
		YY_BREAK case 9:

/* rule 9 can match eol */
		  YY_RULE_SETUP

		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    Kmlget_extra (yyscanner)->kml_col = 0;
		    Kmlget_extra (yyscanner)->kml_line++;
		}
		YY_BREAK case 10:YY_RULE_SETUP


		{
		    kml_freeString (&(Kmlget_extra (yyscanner)->KmlLval.pval));
		    Kmlget_extra (yyscanner)->kml_col += (int) strlen (yytext);


		    return -1;
		}
		YY_BREAK case 11:YY_RULE_SETUP ECHO;


		YY_BREAK case YY_STATE_EOF (INITIAL):yyterminate ();


	    case YY_END_OF_BUFFER:
		{
		    /* Amount of text matched not including the EOB char. */
		    int yy_amount_of_matched_text =
			(int) (yy_cp - yyg->yytext_ptr) - 1;

		    /* Undo the effects of YY_DO_BEFORE_ACTION. */
		    *yy_cp = yyg->yy_hold_char;
		    YY_RESTORE_YY_MORE_OFFSET

			if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status ==
			    YY_BUFFER_NEW)
		      {
			  /* We're scanning a new file or input source.  It's
			   * possible that this happened because the user
			   * just pointed yyin at a new source and called
			   * Kmllex().  If so, then we have to assure
			   * consistency between YY_CURRENT_BUFFER and our
			   * globals.  Here is the right place to do so, because
			   * this is the first action (other than possibly a
			   * back-up) that will match for the new input source.
			   */
			  yyg->yy_n_chars =
			      YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
			      YY_BUFFER_NORMAL;
		      }

		    /* Note that here we test for yy_c_buf_p "<=" to the position
		     * of the first EOB in the buffer, since yy_c_buf_p will
		     * already have been incremented past the NUL character
		     * (since all states make transitions on EOB to the
		     * end-of-buffer state).  Contrast this with the test
		     * in input().
		     */
		    if (yyg->yy_c_buf_p <=
			&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
		      {		/* This was really a NUL. */
			  yy_state_type yy_next_state;

			  yyg->yy_c_buf_p =
			      yyg->yytext_ptr + yy_amount_of_matched_text;

			  yy_current_state = yy_get_previous_state (yyscanner);

			  /* Okay, we're now positioned to make the NUL
			   * transition.  We couldn't have
			   * yy_get_previous_state() go ahead and do it
			   * for us because it doesn't know how to deal
			   * with the possibility of jamming (and we don't
			   * want to build jamming into it because then it
			   * will run more slowly).
			   */

			  yy_next_state =
			      yy_try_NUL_trans (yy_current_state, yyscanner);

			  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			  if (yy_next_state)
			    {
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
			    }

			  else
			    {
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
			    }
		      }

		    else
			switch (yy_get_next_buffer (yyscanner))
			  {
			  case EOB_ACT_END_OF_FILE:
			      {
				  yyg->yy_did_buffer_switch_on_eof = 0;


				  if (Kmlwrap (yyscanner))
				    {
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p =
					    yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF (YY_START);
					goto do_action;
				    }

				  else
				    {
					if (!yyg->yy_did_buffer_switch_on_eof)
					    YY_NEW_FILE;
				    }
				  break;
			      }

			  case EOB_ACT_CONTINUE_SCAN:
			      yyg->yy_c_buf_p =
				  yyg->yytext_ptr + yy_amount_of_matched_text;

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_match;

			  case EOB_ACT_LAST_MATCH:
			      yyg->yy_c_buf_p =
				  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->
								       yy_n_chars];

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_find_action;
			  }
		    break;
		}

	    default:
		YY_FATAL_ERROR
		    ("fatal flex scanner internal error--no action found");
	    }			/* end of action switch */
      }				/* end of scanning one token */
}				/* end of Kmllex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int
yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    register char *source = yyg->yytext_ptr;
    register int number_to_move, i;
    int ret_val;

    if (yyg->yy_c_buf_p >
	&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1])
	YY_FATAL_ERROR
	    ("fatal flex scanner internal error--end of buffer missed");

    if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0)
      {				/* Don't try to fill the buffer, so this is an EOF. */
	  if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1)
	    {
		/* We matched a single character, the EOB, so
		 * treat this as a final EOF.
		 */
		return EOB_ACT_END_OF_FILE;
	    }

	  else
	    {
		/* We matched some text prior to the EOB, first
		 * process it.
		 */
		return EOB_ACT_LAST_MATCH;
	    }
      }

    /* Try to read more data. */

    /* First move last chars to start of buffer. */
    number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

    for (i = 0; i < number_to_move; ++i)
	*(dest++) = *(source++);

    if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING)
	/* don't do the read, it's not guaranteed to return an EOF,
	 * just force an EOF
	 */
	YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

    else
      {
	  int num_to_read =
	      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

	  while (num_to_read <= 0)
	    {			/* Not enough room in the buffer - grow it. */

		/* just a shorter name for the current buffer */
		YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

		int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf);

		if (b->yy_is_our_buffer)
		  {
		      int new_size = b->yy_buf_size * 2;

		      if (new_size <= 0)
			  b->yy_buf_size += b->yy_buf_size / 8;
		      else
			  b->yy_buf_size *= 2;

		      b->yy_ch_buf = (char *)
			  /* Include room in for 2 EOB chars. */
			  Kmlrealloc ((void *) b->yy_ch_buf, b->yy_buf_size + 2,
				      yyscanner);
		  }
		else
		    /* Can't grow it, we don't own it. */
		    b->yy_ch_buf = 0;

		if (!b->yy_ch_buf)
		    YY_FATAL_ERROR
			("fatal error - scanner input buffer overflow");

		yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

		num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
		    number_to_move - 1;

	    }

	  if (num_to_read > YY_READ_BUF_SIZE)
	      num_to_read = YY_READ_BUF_SIZE;

	  /* Read in more data. */
	  YY_INPUT ((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
		    yyg->yy_n_chars, (size_t) num_to_read);

	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    if (yyg->yy_n_chars == 0)
      {
	  if (number_to_move == YY_MORE_ADJ)
	    {
		ret_val = EOB_ACT_END_OF_FILE;
		Kmlrestart (yyin, yyscanner);
	    }

	  else
	    {
		ret_val = EOB_ACT_LAST_MATCH;
		YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
		    YY_BUFFER_EOF_PENDING;
	    }
      }

    else
	ret_val = EOB_ACT_CONTINUE_SCAN;

    if ((yy_size_t) (yyg->yy_n_chars + number_to_move) >
	YY_CURRENT_BUFFER_LVALUE->yy_buf_size)
      {
	  /* Extend the array by 50%, plus the number we really need. */
	  yy_size_t new_size =
	      yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
	  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf =
	      (char *) Kmlrealloc ((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,
				   new_size, yyscanner);
	  if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
	      YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()");
      }

    yyg->yy_n_chars += number_to_move;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] =
	YY_END_OF_BUFFER_CHAR;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] =
	YY_END_OF_BUFFER_CHAR;

    yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

    return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type
yy_get_previous_state (yyscan_t yyscanner)
{
    register yy_state_type yy_current_state;
    register char *yy_cp;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    yy_current_state = yyg->yy_start;

    for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p;
	 ++yy_cp)
      {
	  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI (*yy_cp)] : 1);
	  if (yy_accept[yy_current_state])
	    {
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
	    }
	  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
	    {
		yy_current_state = (int) yy_def[yy_current_state];
		if (yy_current_state >= 19)
		    yy_c = yy_meta[(unsigned int) yy_c];
	    }
	  yy_current_state =
	      yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      }

    return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state, yyscan_t yyscanner)
{
    register int yy_is_jam;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;	/* This var may be unused depending upon options. */
    register char *yy_cp = yyg->yy_c_buf_p;

    register YY_CHAR yy_c = 1;
    if (yy_accept[yy_current_state])
      {
	  yyg->yy_last_accepting_state = yy_current_state;
	  yyg->yy_last_accepting_cpos = yy_cp;
      }
    while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
      {
	  yy_current_state = (int) yy_def[yy_current_state];
	  if (yy_current_state >= 19)
	      yy_c = yy_meta[(unsigned int) yy_c];
      }
    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    yy_is_jam = (yy_current_state == 18);

    return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int
yyinput (yyscan_t yyscanner)
#else
static int
input (yyscan_t yyscanner)
#endif
{
    int c;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    *yyg->yy_c_buf_p = yyg->yy_hold_char;

    if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR)
      {
	  /* yy_c_buf_p now points to the character we want to return.
	   * If this occurs *before* the EOB characters, then it's a
	   * valid NUL; if not, then we've hit the end of the buffer.
	   */
	  if (yyg->yy_c_buf_p <
	      &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
	      /* This was really a NUL. */
	      *yyg->yy_c_buf_p = '\0';

	  else
	    {			/* need more input */
		int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
		++yyg->yy_c_buf_p;

		switch (yy_get_next_buffer (yyscanner))
		  {
		  case EOB_ACT_LAST_MATCH:
		      /* This happens because yy_g_n_b()
		       * sees that we've accumulated a
		       * token and flags that we need to
		       * try matching the token before
		       * proceeding.  But for input(),
		       * there's no matching to consider.
		       * So convert the EOB_ACT_LAST_MATCH
		       * to EOB_ACT_END_OF_FILE.
		       */

		      /* Reset buffer status. */
		      Kmlrestart (yyin, yyscanner);

		   /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE:
		      {
			  if (Kmlwrap (yyscanner))
			      return EOF;

			  if (!yyg->yy_did_buffer_switch_on_eof)
			      YY_NEW_FILE;
#ifdef __cplusplus
			  return yyinput (yyscanner);
#else
			  return input (yyscanner);
#endif
		      }

		  case EOB_ACT_CONTINUE_SCAN:
		      yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
		      break;
		  }
	    }
      }

    c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
    *yyg->yy_c_buf_p = '\0';	/* preserve yytext */
    yyg->yy_hold_char = *++yyg->yy_c_buf_p;

    return c;
}
#endif /* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
void
Kmlrestart (FILE * input_file, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
      {
	  Kmlensure_buffer_stack (yyscanner);
	  YY_CURRENT_BUFFER_LVALUE =

	      Kml_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
      }


    Kml_init_buffer (YY_CURRENT_BUFFER, input_file, yyscanner);
    Kml_load_buffer_state (yyscanner);
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
void
Kml_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* TODO. We should be able to replace this entire function body
     * with
     *              Kmlpop_buffer_state();
     *              Kmlpush_buffer_state(new_buffer);
     */
    Kmlensure_buffer_stack (yyscanner);
    if (YY_CURRENT_BUFFER == new_buffer)
	return;

    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    YY_CURRENT_BUFFER_LVALUE = new_buffer;
    Kml_load_buffer_state (yyscanner);

    /* We don't actually know whether we did this switch during
     * EOF (Kmlwrap()) processing, but the only time this flag
     * is looked at is after Kmlwrap() is called, so it's safe
     * to go ahead and always set it.
     */
    yyg->yy_did_buffer_switch_on_eof = 1;
}

static void
Kml_load_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
YY_BUFFER_STATE
Kml_create_buffer (FILE * file, int size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    b = (YY_BUFFER_STATE) Kmlalloc (sizeof (struct yy_buffer_state), yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in Kml_create_buffer()");

    b->yy_buf_size = size;

    /* yy_ch_buf has to be 2 characters longer than the size given because
     * we need to put in 2 end-of-buffer characters.
     */
    b->yy_ch_buf = (char *) Kmlalloc (b->yy_buf_size + 2, yyscanner);
    if (!b->yy_ch_buf)
	YY_FATAL_ERROR ("out of dynamic memory in Kml_create_buffer()");

    b->yy_is_our_buffer = 1;

    Kml_init_buffer (b, file, yyscanner);

    return b;
}

/** Destroy the buffer.
 * @param b a buffer created with Kml_create_buffer()
 * @param yyscanner The scanner object.
 */
void
Kml_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!b)
	return;

    if (b == YY_CURRENT_BUFFER)	/* Not sure if we should pop here. */
	YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

    if (b->yy_is_our_buffer)
	Kmlfree ((void *) b->yy_ch_buf, yyscanner);


    Kmlfree ((void *) b, yyscanner);
}

#ifndef __cplusplus
extern int isatty (int);
#endif /* __cplusplus */

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a Kmlrestart() or at EOF.
 */
static void
Kml_init_buffer (YY_BUFFER_STATE b, FILE * file, yyscan_t yyscanner)
{

    int oerrno = errno;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    Kml_flush_buffer (b, yyscanner);

    b->yy_input_file = file;
    b->yy_fill_buffer = 1;

    /* If b is the current buffer, then Kml_init_buffer was _probably_
     * called from Kmlrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER)
      {
	  b->yy_bs_lineno = 1;
	  b->yy_bs_column = 0;
      }

    b->yy_is_interactive = file ? (isatty (fileno (file)) > 0) : 0;

    errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */
void
Kml_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!b)
	return;

    b->yy_n_chars = 0;

    /* We always need two end-of-buffer characters.  The first causes
     * a transition to the end-of-buffer state.  The second causes
     * a jam in that state.
     */
    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

    b->yy_buf_pos = &b->yy_ch_buf[0];

    b->yy_at_bol = 1;
    b->yy_buffer_status = YY_BUFFER_NEW;

    if (b == YY_CURRENT_BUFFER)
	Kml_load_buffer_state (yyscanner);
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */
void
Kmlpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (new_buffer == NULL)
	return;

    Kmlensure_buffer_stack (yyscanner);

    /* This block is copied from Kml_switch_to_buffer. */
    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    /* Only push if top exists. Otherwise, replace top. */
    if (YY_CURRENT_BUFFER)
	yyg->yy_buffer_stack_top++;
    YY_CURRENT_BUFFER_LVALUE = new_buffer;

    /* copied from Kml_switch_to_buffer. */
    Kml_load_buffer_state (yyscanner);
    yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
void
Kmlpop_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!YY_CURRENT_BUFFER)
	return;

    Kml_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
    YY_CURRENT_BUFFER_LVALUE = NULL;
    if (yyg->yy_buffer_stack_top > 0)
	--yyg->yy_buffer_stack_top;

    if (YY_CURRENT_BUFFER)
      {
	  Kml_load_buffer_state (yyscanner);
	  yyg->yy_did_buffer_switch_on_eof = 1;
      }
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void
Kmlensure_buffer_stack (yyscan_t yyscanner)
{
    int num_to_alloc;

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_buffer_stack)
      {

	  /* First allocation is just for 2 elements, since we don't know if this
	   * scanner will even need a stack. We use 2 instead of 1 to avoid an
	   * immediate realloc on the next call.
	   */
	  num_to_alloc = 1;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) Kmlalloc
	      (num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in Kmlensure_buffer_stack()");

	  memset (yyg->yy_buffer_stack, 0,
		  num_to_alloc * sizeof (struct yy_buffer_state *));

	  yyg->yy_buffer_stack_max = num_to_alloc;
	  yyg->yy_buffer_stack_top = 0;
	  return;
      }

    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1)
      {

	  /* Increase the buffer to prepare for a possible push. */
	  int grow_size = 8 /* arbitrary grow size */ ;

	  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) Kmlrealloc
	      (yyg->yy_buffer_stack,
	       num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in Kmlensure_buffer_stack()");

	  /* zero only the new slots. */
	  memset (yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0,
		  grow_size * sizeof (struct yy_buffer_state *));
	  yyg->yy_buffer_stack_max = num_to_alloc;
      }
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */

YY_BUFFER_STATE
Kml_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    if (size < 2 ||
	base[size - 2] != YY_END_OF_BUFFER_CHAR ||
	base[size - 1] != YY_END_OF_BUFFER_CHAR)
	/* They forgot to leave room for the EOB's. */
	return 0;

    b = (YY_BUFFER_STATE) Kmlalloc (sizeof (struct yy_buffer_state), yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in Kml_scan_buffer()");

    b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;

    Kml_switch_to_buffer (b, yyscanner);

    return b;
}

/** Setup the input buffer state to scan a string. The next call to Kmllex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       Kml_scan_bytes() instead.
 */
YY_BUFFER_STATE
Kml_scan_string (yyconst char *yystr, yyscan_t yyscanner)
{

    return Kml_scan_bytes (yystr, strlen (yystr), yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to Kmllex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE
Kml_scan_bytes (yyconst char *yybytes, int _yybytes_len, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;
    char *buf;
    yy_size_t n;
    int i;

    /* Get memory for full buffer, including space for trailing EOB's. */
    n = _yybytes_len + 2;
    buf = (char *) Kmlalloc (n, yyscanner);
    if (!buf)
	YY_FATAL_ERROR ("out of dynamic memory in Kml_scan_bytes()");

    for (i = 0; i < _yybytes_len; ++i)
	buf[i] = yybytes[i];

    buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR;

    b = Kml_scan_buffer (buf, n, yyscanner);
    if (!b)
	YY_FATAL_ERROR ("bad buffer in Kml_scan_bytes()");

    /* It's okay to grow etc. this buffer, and we should throw it
     * away when we're done.
     */
    b->yy_is_our_buffer = 1;

    return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void
yy_fatal_error (yyconst char *msg, yyscan_t yyscanner)
{


    (void) fprintf (stderr, "%s\n", msg);
    exit (YY_EXIT_FAILURE);
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE
Kmlget_extra (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int
Kmlget_lineno (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int
Kmlget_column (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *
Kmlget_in (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *
Kmlget_out (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
int
Kmlget_leng (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *
Kmlget_text (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void
Kmlset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyextra = user_defined;
}

/** Set the current line number.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
Kmlset_lineno (int line_number, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* lineno is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("Kmlset_lineno called with no buffer", yyscanner);

    yylineno = line_number;
}

/** Set the current column.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
Kmlset_column (int column_no, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* column is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("Kmlset_column called with no buffer", yyscanner);

    yycolumn = column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see Kml_switch_to_buffer
 */
void
Kmlset_in (FILE * in_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyin = in_str;
}

void
Kmlset_out (FILE * out_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyout = out_str;
}

int
Kmlget_debug (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yy_flex_debug;
}

void
Kmlset_debug (int bdebug, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yy_flex_debug = bdebug;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* Kmllex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */

int
Kmllex_init (yyscan_t * ptr_yy_globals)
{

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }

    *ptr_yy_globals = (yyscan_t) Kmlalloc (sizeof (struct yyguts_t), NULL);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    return yy_init_globals (*ptr_yy_globals);
}

/* Kmllex_init_extra has the same functionality as Kmllex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to Kmlalloc in
 * the yyextra field.
 */

int
Kmllex_init_extra (YY_EXTRA_TYPE yy_user_defined, yyscan_t * ptr_yy_globals)
{
    struct yyguts_t dummy_yyguts;

    Kmlset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }


    *ptr_yy_globals =
	(yyscan_t) Kmlalloc (sizeof (struct yyguts_t), &dummy_yyguts);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in
       yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    Kmlset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals (*ptr_yy_globals);
}

static int
yy_init_globals (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from Kmllex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = 0;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = (char *) 0;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack = NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * Kmllex_init()
     */
    return 0;
}

/* Kmllex_destroy is for both reentrant and non-reentrant scanners. */
int
Kmllex_destroy (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* Pop the buffer stack, destroying each element. */
    while (YY_CURRENT_BUFFER)
      {
	  Kml_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
	  YY_CURRENT_BUFFER_LVALUE = NULL;
	  Kmlpop_buffer_state (yyscanner);
      }

    /* Destroy the stack itself. */
    Kmlfree (yyg->yy_buffer_stack, yyscanner);
    yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
    Kmlfree (yyg->yy_start_stack, yyscanner);
    yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * Kmllex() is called, initialization will occur. */
    yy_init_globals (yyscanner);

    /* Destroy the main struct (reentrant only). */
    Kmlfree (yyscanner, yyscanner);
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr



static void
yy_flex_strncpy (char *s1, yyconst char *s2, int n, yyscan_t yyscanner)
{
    register int i;
    for (i = 0; i < n; ++i)
	s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int
yy_flex_strlen (yyconst char *s, yyscan_t yyscanner)
{
    register int n;
    for (n = 0; s[n]; ++n)
	;

    return n;
}
#endif

void *
Kmlalloc (yy_size_t size, yyscan_t yyscanner)
{

    return (void *) malloc (size);

}




void *
Kmlrealloc (void *ptr, yy_size_t size, yyscan_t yyscanner)
{
    /* The cast to (char *) in the following accommodates both
     * implementations that use char* generic pointers, and those
     * that use void* generic pointers.  It works with the latter
     * because both ANSI C and C++ allow castless assignment from
     * any pointer type to void*, and deal with argument conversions
     * as though doing an assignment.
     */

    return (void *) realloc ((char *) ptr, size);
}

void
Kmlfree (void *ptr, yyscan_t yyscanner)
{


    free ((char *) ptr);	/* see Kmlrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

int
Kmlwrap (yyscan_t yyscanner)
{
    return 1;
}

Changes to src/gaiageo/lex.VanuatuWkt.c.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90



91
92








93
94
95
96
97
98
99
100
101
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194





195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
...
268
269
270
271
272
273
274
275
276

277

278
279
280

281
282
283
284
285

286
287
288
289

290

291

292
293
294
295
296
297
298
299
300
301
302
...
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365

366
367
368
369
370
371
372
373
374
375






376
377
378
379
380

381
382
383
384
385
386




387
388
389
390
391
392
393
394
395
396
397

398
399
400
401
402
403
404
405
406
407
408
409
410
411
412








413
414
415
416
417
418
419
420
421
422
423
424
425
426







427
428
429
430
431
432
433
434


435
436
437
438
439
440
441
442
443
444
445
446
447
448

449
450
451
452
453
454
455
456
457



458
459
460
461
462
463
464
465
466
467
468
469
470


471
472
473
474
475
476
477
478
479
480
481



482
483
484
485
486
487
488
489
490
491
492



493
494
495
496
497
498
499
500
501
502

503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
...
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
...
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183


































































1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515












1516
1517
1518
1519
1520
1521
1522

1523
1524

1525
1526

1527
1528
1529
1530
1531
1532

1533
1534
1535
1536
1537
1538
1539
1540

1541
1542

1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571

1572
1573
1574

1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587

1588
1589
1590
1591

1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614

1615
1616
1617

1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628

1629
1630




1631
1632
1633
1634
1635

1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650

1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663

1664
1665
1666

1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693

1694
1695
1696

1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724

1725
1726
1727

1728
1729
1730
1731
1732
1733
1734
1735
1736

1737
1738
1739
1740
1741
1742
1743
1744

1745
1746
1747
1748

1749
1750
1751

1752
1753
1754
1755
1756
1757
1758
1759
1760

1761
1762
1763

1764
1765
1766
1767
1768
1769
1770
1771

1772
1773
1774
1775
1776
1777
1778
1779
1780

1781
1782
1783
1784

1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795


1796
1797
1798
1799
1800
1801
1802
1803
1804
1805

1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831

1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845


1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878

1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
....
1902
1903
1904
1905
1906
1907
1908

1909
1910
1911

1912
1913
1914
1915
1916
1917

1918
1919
1920

1921
1922
1923
1924
1925
1926
1927
1928
1929
1930

1931
1932
1933

1934
1935
1936
1937
1938
1939
1940
1941
1942
1943

1944
1945
1946

1947
1948
1949
1950
1951
1952

1953
1954
1955

1956
1957
1958
1959
1960
1961

1962
1963
1964

1965
1966
1967
1968
1969
1970
1971

1972
1973
1974

1975
1976
1977
1978
1979
1980
1981

1982
1983
1984

1985
1986
1987
1988
1989
1990
1991

1992
1993
1994

1995
1996
1997
1998

1999
2000
2001
2002
2003
2004
2005
2006

2007
2008
2009

2010
2011
2012
2013

2014
2015
2016
2017
2018
2019
2020
2021
2022
2023

2024
2025
2026

2027
2028
2029

2030
2031
2032

2033
2034
2035

2036
2037
2038

2039
2040
2041

2042
2043
2044

2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056

2057
2058
2059
2060

2061
2062
2063
2064

2065
2066
2067

2068
2069
2070
2071
2072
2073

2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087

2088
2089
2090
2091
2092
2093

2094
2095
2096
2097
2098


2099
2100

2101
2102
2103
2104
2105
2106
2107

2108
2109
2110
2111
2112
2113

2114
2115
2116

2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147

2148
2149
2150

2151
2152
2153

2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185

2186
2187
2188
2189
2190
2191
2192
2193

2194
2195
2196
2197
2198
2199
2200
2201
2202
2203

2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214

2215
2216
2217
2218
2219
2220
2221
2222
2223

2224
2225

2226
2227
2228
2229
2230
2231
2232
2233
2234

2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
....
2252
2253
2254
2255
2256
2257
2258
2259



#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;


/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* TODO: this is always defined, so inline it */
#define yyconst const




#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))








#else
#define yynoreturn
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE VanuatuWktrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )






#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via VanuatuWktrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void VanuatuWktrestart (FILE *input_file ,yyscan_t yyscanner );
void VanuatuWkt_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );

YY_BUFFER_STATE VanuatuWkt_create_buffer (FILE *file,int size ,yyscan_t yyscanner );

void VanuatuWkt_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void VanuatuWkt_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void VanuatuWktpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );

void VanuatuWktpop_buffer_state (yyscan_t yyscanner );

static void VanuatuWktensure_buffer_stack (yyscan_t yyscanner );
static void VanuatuWkt_load_buffer_state (yyscan_t yyscanner );
static void VanuatuWkt_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );


#define YY_FLUSH_BUFFER VanuatuWkt_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE VanuatuWkt_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );

YY_BUFFER_STATE VanuatuWkt_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );

YY_BUFFER_STATE VanuatuWkt_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );


void *VanuatuWktalloc (yy_size_t ,yyscan_t yyscanner );
void *VanuatuWktrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void VanuatuWktfree (void * ,yyscan_t yyscanner );

#define yy_new_buffer VanuatuWkt_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        VanuatuWktensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ,yyscan_t yyscanner);

static int yy_get_next_buffer (yyscan_t yyscanner );
static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 36
#define YY_END_OF_BUFFER 37
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[171] =
    {   0,
        0,    0,   37,   35,   33,   34,    3,    4,   35,    2,
       35,    1,    1,   35,   35,   35,   35,    1,    1,    1,
        1,    1,    1,    1,    1,    0,    0,    0,    0,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    0,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    0,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        0,    0,    0,    5,    0,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    0,    0,    0,


        0,    0,    7,    6,    0,    1,    1,    1,    1,    0,
        0,    0,    0,    8,   13,    0,    0,    0,    0,    0,
        0,   15,   14,    0,    0,    0,    0,    0,   16,    0,
        9,    0,   17,    0,    0,    0,   11,   10,    0,    0,
       19,   18,    0,    0,   12,    0,   20,   25,    0,    0,
        0,   27,   26,    0,    0,   28,    0,   21,    0,    0,
       23,   22,    0,   24,   29,    0,   31,   30,   32,    0
    } ;

static yyconst YY_CHAR yy_ec[256] =






    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    1,    1,    1,    1,    1,    1,    4,

        5,    1,    6,    7,    8,    9,    1,   10,   10,   10,
       10,   10,   10,   10,   10,   10,   10,    1,    1,    1,
        1,    1,    1,    1,    1,    1,   11,    1,   12,    1,
       13,    1,   14,    1,    1,   15,   16,   17,   18,   19,
        1,   20,   21,   22,   23,    1,    1,    1,   24,   25,
        1,    1,    1,    1,    1,    1,    1,    1,   26,    1,





       27,    1,   28,    1,   29,    1,    1,   30,   31,   32,
       33,   34,    1,   35,   36,   37,   38,    1,    1,    1,
       39,   40,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,


        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst YY_CHAR yy_meta[41] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1








    } ;

static yyconst flex_uint16_t yy_base[171] =
    {   0,
        0,    0,  328,  329,  329,  329,  329,  329,   32,  329,
       34,  317,   36,   35,   35,   27,   33,  316,   43,  315,
       47,   48,  314,   59,   70,   49,   55,   58,   69,   67,
      313,   83,   80,  312,   94,   95,   85,  310,  309,  308,
       65,   94,   86,   92,   86,  105,  104,  307,  306,  305,
      112,  107,  304,  303,  301,  300,  299,  298,  120,  297,
      115,  108,  118,  111,  122,  295,  294,  292,  130,  291,
      290,  289,  288,  131,  286,  285,  283,  282,  281,  279,
      121,  123,  134,  149,  128,  276,  275,  271,  270,  267,
      259,  258,  254,  247,  225,  224,  220,  134,  135,  142,








      139,    0,  329,  146,  146,  149,   75,   51,   44,  142,
      153,  156,  161,  329,  181,  168,  168,  174,  170,  168,
        0,  329,  177,  177,  183,  177,  177,  190,  329,  189,
      213,  183,  220,  191,  202,    0,  329,  209,  206,    0,
      329,  211,  211,  219,  329,  219,  329,  247,  226,  222,
        0,  329,  231,  233,  243,  329,  244,  263,  241,    0,
      329,  245,  250,  329,  281,    0,  329,  259,  329,  329


    } ;

static yyconst flex_int16_t yy_def[171] =
    {   0,
      170,    1,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,


      170,   84,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      115,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  131,  170,  170,  170,  133,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      148,  170,  170,  170,  170,  170,  170,  170,  170,  158,
      170,  170,  170,  170,  170,  165,  170,  170,  170,    0
    } ;




static yyconst flex_uint16_t yy_nxt[370] =
    {   0,
        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
        4,    4,   14,    4,   15,   16,    4,    4,   17,    4,
        4,    4,    4,    4,    4,    4,    4,   14,    4,   15,
       16,    4,    4,   17,    4,    4,    4,    4,    4,    4,
       18,   19,   20,   21,   23,   24,   26,   25,   27,   28,
       29,   31,   19,  109,   32,   34,   21,   22,   35,   36,
      108,   26,   25,   27,   28,   29,   41,   23,   24,   32,
       25,   42,   43,   35,   36,   38,   30,   39,   46,   40,
       61,   41,   44,   45,  107,   25,   42,   43,   48,   33,
       49,   51,   50,   46,   37,   61,   59,   44,   45,   53,



       56,   54,   57,   55,   58,   62,   51,   63,   64,   65,
       66,   59,   67,   47,   68,   69,   52,   71,   74,   72,
       62,   73,   63,   64,   65,   78,   81,   79,   82,   80,
       69,   83,   84,   74,   85,   88,   93,   89,   94,   90,
       95,   81,   98,   82,   99,  105,   83,   84,  100,   85,
      102,  102,  101,  110,  111,  112,  113,   98,  106,   99,
      105,  114,  115,  100,  103,  116,  117,  101,  110,  111,
      112,  113,  118,  104,  119,  120,  114,  115,  124,  103,
      116,  117,  121,  121,  125,  126,  127,  118,  104,  119,
      120,  128,  129,  124,  130,  131,  122,  132,  133,  125,




      126,  127,  134,  135,  139,  123,  128,  129,  143,  130,
      131,  122,  132,  133,  136,  136,  144,  134,  135,  139,
      123,  140,  140,  143,  145,  146,  147,  148,  137,   97,
      149,  144,  150,   96,   95,  141,  154,  138,  155,  145,
      146,  147,  148,  137,  142,  149,  156,  150,  151,  151,
      141,  154,  138,  155,  157,  158,  109,  159,  163,  142,
      164,  156,  152,  108,  160,  160,  165,   92,   91,  157,
      158,  153,  159,  163,  169,  164,   90,  152,  161,  107,
      106,  165,  166,  166,   87,   86,  153,  162,   80,  169,
       97,   96,   77,  161,   76,   75,  167,   73,   92,   91,




       70,   68,  162,   87,   86,  168,   60,   58,   77,   76,
       55,  167,   55,   75,   50,   50,   70,   40,   40,   60,
      168,   52,   47,   37,   33,   30,   22,  170,    3,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170
    } ;


static yyconst flex_int16_t yy_chk[370] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        9,    9,   11,   11,   13,   13,   14,   13,   15,   16,
       17,   19,   19,  109,   19,   21,   21,   22,   21,   22,
      108,   14,   13,   15,   16,   17,   26,   24,   24,   19,
       24,   27,   28,   21,   22,   25,   30,   25,   30,   25,
       41,   26,   29,   29,  107,   24,   27,   28,   32,   33,
       32,   33,   32,   30,   37,   41,   37,   29,   29,   35,

       36,   35,   36,   35,   36,   42,   33,   43,   44,   45,
       46,   37,   46,   47,   46,   47,   52,   51,   52,   51,
       42,   51,   43,   44,   45,   59,   61,   59,   62,   59,
       47,   63,   64,   52,   65,   69,   74,   69,   74,   69,
       74,   61,   81,   62,   82,   85,   63,   64,   83,   65,
       84,   84,   83,   98,   99,  100,  101,   81,  106,   82,
       85,  104,  105,   83,   84,  110,  111,   83,   98,   99,
      100,  101,  112,   84,  113,  113,  104,  105,  116,   84,
      110,  111,  115,  115,  117,  118,  119,  112,   84,  113,
      113,  120,  123,  116,  124,  125,  115,  126,  127,  117,

      118,  119,  128,  130,  132,  115,  120,  123,  134,  124,
      125,  115,  126,  127,  131,  131,  135,  128,  130,  132,
      115,  133,  133,  134,  138,  139,  142,  143,  131,   97,
      144,  135,  146,   96,   95,  133,  149,  131,  150,  138,
      139,  142,  143,  131,  133,  144,  153,  146,  148,  148,
      133,  149,  131,  150,  154,  155,   94,  157,  159,  133,
      162,  153,  148,   93,  158,  158,  163,   92,   91,  154,
      155,  148,  157,  159,  168,  162,   90,  148,  158,   89,
       88,  163,  165,  165,   87,   86,  148,  158,   80,  168,
       79,   78,   77,  158,   76,   75,  165,   73,   72,   71,

       70,   68,  158,   67,   66,  165,   60,   58,   57,   56,
       55,  165,   54,   53,   50,   49,   48,   40,   39,   38,
      165,   34,   31,   23,   20,   18,   12,    3,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170
    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct vanuatu_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

int VanuatuWktlex_init (yyscan_t* scanner);

int VanuatuWktlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int VanuatuWktlex_destroy (yyscan_t yyscanner );

int VanuatuWktget_debug (yyscan_t yyscanner );

void VanuatuWktset_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE VanuatuWktget_extra (yyscan_t yyscanner );

void VanuatuWktset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *VanuatuWktget_in (yyscan_t yyscanner );

void VanuatuWktset_in  (FILE * _in_str ,yyscan_t yyscanner );

FILE *VanuatuWktget_out (yyscan_t yyscanner );

void VanuatuWktset_out  (FILE * _out_str ,yyscan_t yyscanner );

			int VanuatuWktget_leng (yyscan_t yyscanner );

char *VanuatuWktget_text (yyscan_t yyscanner );

int VanuatuWktget_lineno (yyscan_t yyscanner );

void VanuatuWktset_lineno (int _line_number ,yyscan_t yyscanner );

int VanuatuWktget_column  (yyscan_t yyscanner );

void VanuatuWktset_column (int _column_no ,yyscan_t yyscanner );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int VanuatuWktwrap (yyscan_t yyscanner );
#else
extern int VanuatuWktwrap (yyscan_t yyscanner );
#endif
#endif

#ifndef YY_NO_UNPUT
    
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
#else
static int input (yyscan_t yyscanner );
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			VanuatuWktensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				VanuatuWkt_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
		}

		VanuatuWkt_load_buffer_state(yyscanner );
		}

	{

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = yyg->yy_start;
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				yyg->yy_last_accepting_state = yy_current_state;
				yyg->yy_last_accepting_cpos = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 171 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 329 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = yyg->yy_hold_char;
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			goto yy_find_action;

case 1:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->vanuatu_col += (int) strlen(yytext);  VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = atof(yytext); return VANUATU_NUM; }
	YY_BREAK
case 2:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_COMMA; }
	YY_BREAK
case 3:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_OPEN_BRACKET; }
	YY_BREAK
case 4:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_CLOSE_BRACKET; }
	YY_BREAK
case 5:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT; }
	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_Z; }
	YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_M; }
	YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POINT_ZM; }
	YY_BREAK
case 9:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_LINESTRING; }
	YY_BREAK
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_LINESTRING_Z; }
	YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_LINESTRING_M; }
	YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_LINESTRING_ZM; }
	YY_BREAK
case 13:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POLYGON; }
	YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POLYGON_Z; }
	YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POLYGON_M; }
	YY_BREAK
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_POLYGON_ZM; }
	YY_BREAK
case 17:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOINT; }
	YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOINT_Z; }
	YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOINT_M; }
	YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOINT_ZM; }
	YY_BREAK
case 21:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTILINESTRING; }
	YY_BREAK
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTILINESTRING_Z; }
	YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTILINESTRING_M; }
	YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTILINESTRING_ZM; }	
	YY_BREAK
case 25:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOLYGON; }
	YY_BREAK
case 26:
/* rule 26 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOLYGON_Z; }
	YY_BREAK
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOLYGON_M; }
	YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_MULTIPOLYGON_ZM; }
	YY_BREAK
case 29:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_GEOMETRYCOLLECTION; }
	YY_BREAK
case 30:
/* rule 30 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_GEOMETRYCOLLECTION_Z; }
	YY_BREAK
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_GEOMETRYCOLLECTION_M; }
	YY_BREAK
case 32:
/* rule 32 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->VanuatuWktlval.dval = 0; return VANUATU_GEOMETRYCOLLECTION_ZM; }
	YY_BREAK
case 33:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->vanuatu_col += (int) strlen(yytext); }               /* ignore but count white space */
	YY_BREAK
case 34:
/* rule 34 can match eol */
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->vanuatu_col = 0; VanuatuWktget_extra(yyscanner)->vanuatu_line++; }
	YY_BREAK
case 35:
YY_RULE_SETUP
{ VanuatuWktget_extra(yyscanner)->vanuatu_col += (int) strlen(yytext); return -1; }
	YY_BREAK
case 36:
YY_RULE_SETUP
ECHO;
	YY_BREAK
case YY_STATE_EOF(INITIAL):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * VanuatuWktlex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);

			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( VanuatuWktwrap(yyscanner ) )
					{


































































					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of VanuatuWktlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = yyg->yytext_ptr;
	yy_size_t number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					VanuatuWktrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			VanuatuWktrestart(yyin  ,yyscanner);
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) VanuatuWktrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	yyg->yy_n_chars += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 171 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
{
	int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
	char *yy_cp = yyg->yy_c_buf_p;

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 171 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
	yy_is_jam = (yy_current_state == 170);

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (yyscan_t yyscanner)
#else
    static int input  (yyscan_t yyscanner)
#endif

{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					VanuatuWktrestart(yyin ,yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( VanuatuWktwrap(yyscanner ) )
						return 0;

					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput(yyscanner);
#else
					return input(yyscanner);
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
	yyg->yy_hold_char = *++yyg->yy_c_buf_p;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */













/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void VanuatuWktrestart  (FILE * input_file , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! YY_CURRENT_BUFFER ){

        VanuatuWktensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            VanuatuWkt_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
	}

	VanuatuWkt_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);

	VanuatuWkt_load_buffer_state(yyscanner );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
    void VanuatuWkt_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)

{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	/* TODO. We should be able to replace this entire function body
	 * with
	 *		VanuatuWktpop_buffer_state();
	 *		VanuatuWktpush_buffer_state(new_buffer);
     */
	VanuatuWktensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	VanuatuWkt_load_buffer_state(yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (VanuatuWktwrap()) processing, but the only time this flag
	 * is looked at is after VanuatuWktwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}


static void VanuatuWkt_load_buffer_state  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE VanuatuWkt_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)

{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) VanuatuWktalloc(sizeof( struct yy_buffer_state ) ,yyscanner );

	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in VanuatuWkt_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) VanuatuWktalloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in VanuatuWkt_create_buffer()" );

	b->yy_is_our_buffer = 1;

	VanuatuWkt_init_buffer(b,file ,yyscanner);

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with VanuatuWkt_create_buffer()
 * @param yyscanner The scanner object.
 */

    void VanuatuWkt_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		VanuatuWktfree((void *) b->yy_ch_buf ,yyscanner );

	VanuatuWktfree((void *) b ,yyscanner );

}





/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a VanuatuWktrestart() or at EOF.
 */
    static void VanuatuWkt_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)


{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	VanuatuWkt_flush_buffer(b ,yyscanner);

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then VanuatuWkt_init_buffer was _probably_
     * called from VanuatuWktrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){

        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */

    void VanuatuWkt_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		VanuatuWkt_load_buffer_state(yyscanner );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */

void VanuatuWktpush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (new_buffer == NULL)
		return;

	VanuatuWktensure_buffer_stack(yyscanner);

	/* This block is copied from VanuatuWkt_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from VanuatuWkt_switch_to_buffer. */
	VanuatuWkt_load_buffer_state(yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */

void VanuatuWktpop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!YY_CURRENT_BUFFER)
		return;

	VanuatuWkt_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {

		VanuatuWkt_load_buffer_state(yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */

static void VanuatuWktensure_buffer_stack (yyscan_t yyscanner)
{
	int num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


	if (!yyg->yy_buffer_stack) {


		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		yyg->yy_buffer_stack = (struct yy_buffer_state**)VanuatuWktalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in VanuatuWktensure_buffer_stack()" );
								  
		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));

				
		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){


		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)VanuatuWktrealloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )

			YY_FATAL_ERROR( "out of dynamic memory in VanuatuWktensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));

		yyg->yy_buffer_stack_max = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE VanuatuWkt_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)


{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return NULL;

	b = (YY_BUFFER_STATE) VanuatuWktalloc(sizeof( struct yy_buffer_state ) ,yyscanner );

	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in VanuatuWkt_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	VanuatuWkt_switch_to_buffer(b ,yyscanner );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to VanuatuWktlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       VanuatuWkt_scan_bytes() instead.
 */

YY_BUFFER_STATE VanuatuWkt_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
    
	return VanuatuWkt_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to VanuatuWktlex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE VanuatuWkt_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)


{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	yy_size_t i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) _yybytes_len + 2;
	buf = (char *) VanuatuWktalloc(n ,yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in VanuatuWkt_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = VanuatuWkt_scan_buffer(buf,n ,yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in VanuatuWkt_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif


static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        yy_size_t yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */

YY_EXTRA_TYPE VanuatuWktget_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */

int VanuatuWktget_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */

int VanuatuWktget_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */

FILE *VanuatuWktget_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */

FILE *VanuatuWktget_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */

int VanuatuWktget_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */


char *VanuatuWktget_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */

void VanuatuWktset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyextra = user_defined ;
}

/** Set the current line number.
 * @param _line_number line number
 * @param yyscanner The scanner object.
 */

void VanuatuWktset_lineno (int  _line_number , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "VanuatuWktset_lineno called with no buffer" );

    
    yylineno = _line_number;
}

/** Set the current column.
 * @param _column_no column number
 * @param yyscanner The scanner object.
 */

void VanuatuWktset_column (int  _column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "VanuatuWktset_column called with no buffer" );

    
    yycolumn = _column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see VanuatuWkt_switch_to_buffer
 */

void VanuatuWktset_in (FILE *  _in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyin = _in_str ;
}


void VanuatuWktset_out (FILE *  _out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yyout = _out_str ;
}


int VanuatuWktget_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    return yy_flex_debug;
}


void VanuatuWktset_debug (int  _bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yy_flex_debug = _bdebug ;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* VanuatuWktlex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */


int VanuatuWktlex_init(yyscan_t* ptr_yy_globals)

{
    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }


    *ptr_yy_globals = (yyscan_t) VanuatuWktalloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));


    return yy_init_globals ( *ptr_yy_globals );
}

/* VanuatuWktlex_init_extra has the same functionality as VanuatuWktlex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to VanuatuWktalloc in
 * the yyextra field.
 */

int VanuatuWktlex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )


{
    struct yyguts_t dummy_yyguts;

    VanuatuWktset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){

        errno = EINVAL;
        return 1;
    }
	
    *ptr_yy_globals = (yyscan_t) VanuatuWktalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );


	
    if (*ptr_yy_globals == NULL){

        errno = ENOMEM;
        return 1;
    }
    
    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    
    VanuatuWktset_extra (yy_user_defined, *ptr_yy_globals);
    
    return yy_init_globals ( *ptr_yy_globals );
}


static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from VanuatuWktlex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = NULL;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = NULL;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * VanuatuWktlex_init()
     */
    return 0;
}

/* VanuatuWktlex_destroy is for both reentrant and non-reentrant scanners. */

int VanuatuWktlex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;


    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){

		VanuatuWkt_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		VanuatuWktpop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	VanuatuWktfree(yyg->yy_buffer_stack ,yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        VanuatuWktfree(yyg->yy_start_stack ,yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * VanuatuWktlex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

    /* Destroy the main struct (reentrant only). */
    VanuatuWktfree ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN

static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif


void *VanuatuWktalloc (yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	return malloc(size);
}

void *VanuatuWktrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;


	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);

}


void VanuatuWktfree (void * ptr , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	free( (char *) ptr );	/* see VanuatuWktrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"


int VanuatuWktwrap(yyscan_t yyscanner )
{
  return 1;
}

/******************************************************************************
** This is the end of the code that was created by Team Vanuatu
** of The University of Toronto.

Authors:
................................................................................
Yong Jian			yong.jian@utoronto.ca

Supervisor:
Greg Wilson			gvwilson@cs.toronto.ca

-------------------------------------------------------------------------------
*/

>
>







|
|







 







|


>







 







|

|

|
|

>
>
>
|
<
>
>
>
>
>
>
>
>

|







 







|







 







<
<
<
<
<
<
<

<











<
<
<
<
<




|
<
|





|










>
>
>
>
>



|
|

|
|

|
|
|
|

|
|
|
|

|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|



|
|
|
|
|

|



|
|
|
|
|
|
|
|
|
|


|







 







|
|
>
|
>
|
|
|
>
|

|
|
|
>



|
>
|
>
|
>

|
|
|







 







|
|
>
|
|






|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<

>
|
<
<
<
<
<
<
|

|
>
>
>
>
>
>
|
|
|
|
<
>
|
|
|
|
|
|
>
>
>
>

<
<
<
<
|
|
|
|
|
|
>

<
|
|
|
|
|
|

|
|
|
|
|
|
>
>
>
>
>
>
>
>
|

|
<
<
<
<
<
<
<
<
|
|
|
>
>
>
>
>
>
>

<
<
<
<
<
<
<
>
>
|

|
<
<
|
|
|
|
|
|
|
|
|
>

<
|
|
|
|
|
|
|
>
>
>

<
<
<
|
|
|
|
|
|
|
|
|
>
>

<
<
|
|
|
|
|
|
|
|
>
>
>

<
<
<
|
|
|
|
|
|
|
>
>
>

<
<
<
|
|
|
|
|
<
>
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







 







|






|
|
|











|








|

|

|

|




|

|

|

|

|

|

|

|

|

|

|

|

|

|

|







|

|

<
<
<
<



|



|





|

|






<
<
<
<

<







|










|












|







 







|









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>






|
>

<
>

|
>
|
|
|
|

<
>
|






|
>

<
>

|
|
|
|

|
|
|

|
|
|
|
|
|
|

|
|

|
|
|
|
|
|


>
|

<
>
|
|
|
|








|
>

|
|
|
>
|
|

|

|
|
|
|
|
|

|

|

|






>
|

<
>

|
|

|
|

|
|

<
>


>
>
>
>




|
>
|
<
|
|

|

|
|





|
>
|
|
|

|
|
|






>
|

<
>
|
|

|

|
|
|
|
|
|

|

|
|

|
|








>
|

<
>
|
|

|

|
|
|
|
|
|
|
|

|
|
|
|

|
|
|






>
|

<
>
|
|

|
|
|
|

|
>
|
|
|





>
|

|
<
>

|
|
>
|
|
|
|
|
|
|
<
|
>
|
|
|
>
|
|
|
|
|

|
|
>
|
|

|
|
|
|
<
|
>
|

|
|
>
|
|








<
>
>

|
|
|
|
|
|
|

|
>
|
|

|
|
|
|
|
|
|
|
|

|

|










>
|

|
|




|
|



|
>
>

|
|
|
|
|
|
|
|
|
|

|
|

|

|
|
|

|
|
|
|

|






>
|

<
<
|
|









|







 







>
|

<
>






>
|

<
>
|
|
|
|






>
|

<
>
|
|
|
|






>
|

<
>






>
|

<
>






>
|

<
>







>
|

<
>







>
|

<
>
|



|


>
|

<
>

|
|
|
>
|
|



|


>
|

<
>

|
|
|
>
|
|




|



>
|

<
>
|


>
|

<
>
|


>
|

<
>



>
|

<
>
|











>
|
|
<
|
>
|
|
|

>
|

|
>
|
|
|


<
>

|










|
|
>





|
>
|
|
|
|
<
>
>
|
|
>
|
|
|
|

|
<
>
|

|
|


>
|

<
>




|


|





|






|
|









>
|

<
>


|
>
|
|
|
|

|
|
|


|
|



|


|









<
<
<
|
>
|
|
|
|




>
|

|
|
|

|



>
|

<
|
<


<
<
<
|
>
|
|
|
|
|
|
|
|
<
>


>
|

<
<
|




>
|

|







 







<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
153
154
155
156
157
158
159







160

161
162
163
164
165
166
167
168
169
170
171





172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375

376
377
378






379
380
381
382
383
384
385
386
387
388
389
390
391

392
393
394
395
396
397
398
399
400
401
402
403




404
405
406
407
408
409
410
411

412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435








436
437
438
439
440
441
442
443
444
445
446







447
448
449
450
451


452
453
454
455
456
457
458
459
460
461
462

463
464
465
466
467
468
469
470
471
472
473



474
475
476
477
478
479
480
481
482
483
484
485


486
487
488
489
490
491
492
493
494
495
496
497



498
499
500
501
502
503
504
505
506
507
508



509
510
511
512
513

514
515
516
517
518






































519
520
521
522
523
524
525
526
...
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696




697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718




719

720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567

1568
1569
1570
1571
1572
1573
1574
1575
1576

1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587

1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620

1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666

1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677

1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691

1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721

1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752

1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784

1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807

1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819

1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841

1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858

1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950


1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
....
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979

1980
1981
1982
1983
1984
1985
1986
1987
1988
1989

1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003

2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017

2018
2019
2020
2021
2022
2023
2024
2025
2026
2027

2028
2029
2030
2031
2032
2033
2034
2035
2036
2037

2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048

2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059

2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070

2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087

2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106

2107
2108
2109
2110
2111
2112
2113

2114
2115
2116
2117
2118
2119
2120

2121
2122
2123
2124
2125
2126
2127

2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143

2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159

2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186

2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197

2198
2199
2200
2201
2202
2203
2204
2205
2206
2207

2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242

2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275



2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299

2300

2301
2302



2303
2304
2305
2306
2307
2308
2309
2310
2311
2312

2313
2314
2315
2316
2317
2318


2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
....
2342
2343
2344
2345
2346
2347
2348


#line 3 "lex.VanuatuWkt.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
................................................................................
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
................................................................................
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else /* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)


#define YY_USE_CONST

#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
................................................................................
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void *yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
................................................................................
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE VanuatuWktrestart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE







#define YY_BUF_SIZE 16384

#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif






#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

#define YY_LESS_LINENO(n)


/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
    FILE *yy_input_file;

    char *yy_ch_buf;		/* input buffer */
    char *yy_buf_pos;		/* current position in input buffer */

    /* Size of input buffer in bytes, not including room for EOB
     * characters.
     */
    yy_size_t yy_buf_size;

    /* Number of characters read into yy_ch_buf, not including EOB
     * characters.
     */
    int yy_n_chars;

    /* Whether we "own" the buffer - i.e., we know we created it,
     * and can realloc() it to grow it, and should free() it to
     * delete it.
     */
    int yy_is_our_buffer;

    /* Whether this is an "interactive" input source; if so, and
     * if we're using stdio for input, then we want to use getc()
     * instead of fread(), to make sure we stop fetching input after
     * each newline.
     */
    int yy_is_interactive;

    /* Whether we're considered to be at the beginning of a line.
     * If so, '^' rules will be active on the next match, otherwise
     * not.
     */
    int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

    /* Whether to try to fill the input buffer when we reach the
     * end of it.
     */
    int yy_fill_buffer;

    int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
    /* When an EOF's been seen but there's still some text to process
     * then we mark the buffer as YY_EOF_PENDING, to indicate that we
     * shouldn't try reading from the input source any more.  We might
     * still have a bunch of tokens to match, though, because of
     * possible backing-up.
     *
     * When we actually see the EOF, we change the status to "new"
     * (via VanuatuWktrestart()), so that the user can continue scanning by
     * just pointing yyin at a new input file.
     */
#define YY_BUFFER_EOF_PENDING 2

};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
................................................................................
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void VanuatuWktrestart (FILE * input_file, yyscan_t yyscanner);
void VanuatuWkt_switch_to_buffer (YY_BUFFER_STATE new_buffer,
				  yyscan_t yyscanner);
YY_BUFFER_STATE VanuatuWkt_create_buffer (FILE * file, int size,
					  yyscan_t yyscanner);
void VanuatuWkt_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void VanuatuWkt_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner);
void VanuatuWktpush_buffer_state (YY_BUFFER_STATE new_buffer,
				  yyscan_t yyscanner);
void VanuatuWktpop_buffer_state (yyscan_t yyscanner);

static void VanuatuWktensure_buffer_stack (yyscan_t yyscanner);
static void VanuatuWkt_load_buffer_state (yyscan_t yyscanner);
static void VanuatuWkt_init_buffer (YY_BUFFER_STATE b, FILE * file,
				    yyscan_t yyscanner);

#define YY_FLUSH_BUFFER VanuatuWkt_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE VanuatuWkt_scan_buffer (char *base, yy_size_t size,
					yyscan_t yyscanner);
YY_BUFFER_STATE VanuatuWkt_scan_string (yyconst char *yy_str,
					yyscan_t yyscanner);
YY_BUFFER_STATE VanuatuWkt_scan_bytes (yyconst char *bytes, int len,
				       yyscan_t yyscanner);

void *VanuatuWktalloc (yy_size_t, yyscan_t yyscanner);
void *VanuatuWktrealloc (void *, yy_size_t, yyscan_t yyscanner);
void VanuatuWktfree (void *, yyscan_t yyscanner);

#define yy_new_buffer VanuatuWkt_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        VanuatuWktensure_buffer_stack (yyscanner); \
................................................................................

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

static yy_state_type yy_get_previous_state (yyscan_t yyscanner);
static yy_state_type yy_try_NUL_trans (yy_state_type current_state,
				       yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner);
static void yy_fatal_error (yyconst char msg[], yyscan_t yyscanner);

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
	yyleng = (size_t) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yyg->yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 36
#define YY_END_OF_BUFFER 37
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
{
    flex_int32_t yy_verify;
    flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[114] = { 0,
    0, 0, 37, 35, 33, 34, 3, 4, 35, 2,
    35, 1, 35, 35, 35, 35, 1, 1, 1, 1,
    0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
    0, 0, 1, 1, 0, 0, 0, 0, 0, 0,
    0, 0, 5, 0, 0, 0, 0, 0, 0, 7,
    6, 0, 0, 0, 0, 0, 8, 13, 0, 0,
    0, 0, 0, 0, 15, 14, 0, 0, 0, 0,
    0, 16, 0, 9, 0, 17, 0, 0, 0, 11,
    10, 0, 0, 19, 18, 0, 0, 12, 0, 20,
    25, 0, 0, 0, 27, 26, 0, 0, 28, 0,


    21, 0, 0, 23, 22, 0, 24, 29, 0, 31,
    30, 32, 0






};

static yyconst flex_int32_t yy_ec[256] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 2, 1, 1, 1, 1, 1, 1, 1, 4,
    5, 1, 6, 7, 8, 9, 1, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 11, 1, 12, 1,
    13, 1, 14, 1, 1, 15, 16, 17, 18, 19,
    1, 20, 21, 22, 23, 1, 1, 1, 24, 25,
    1, 1, 1, 1, 1, 1, 1, 1, 26, 1,


    27, 1, 28, 1, 29, 1, 1, 30, 31, 32,
    33, 34, 1, 35, 36, 37, 38, 1, 1, 1,
    39, 40, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,





    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1
};


static yyconst flex_int32_t yy_meta[41] = { 0,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1
};

static yyconst flex_int16_t yy_base[115] = { 0,
    0, 33, 211, 255, 255, 255, 255, 255, 192, 255,
    191, 2, 2, 3, 4, 0, 11, 13, 185, 15,
    26, 28, 32, 36, 162, 161, 154, 37, 42, 33,
    39, 33, 71, 16, 46, 53, 61, 54, 64, 56,
    57, 65, 80, 67, 66, 67, 74, 79, 0, 255,
    82, 87, 82, 93, 91, 95, 255, 112, 105, 100,
    106, 109, 103, 0, 255, 113, 112, 121, 114, 114,
    125, 255, 124, 144, 118, 154, 130, 143, 0, 255,
    143, 141, 0, 255, 146, 148, 154, 255, 153, 255,
    184, 157, 161, 0, 255, 172, 167, 177, 255, 177,

    194, 174, 0, 255, 182, 182, 255, 214, 0, 255,
    192, 255, 255, 0
};

static yyconst flex_int16_t yy_def[115] = { 0,








    114, 114, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 43, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 58, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 74, 113,
    113, 113, 76, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 91, 113, 113, 113, 113, 113, 113,








    113, 113, 101, 113, 113, 113, 113, 113, 108, 113,
    113, 113, 0, 113
};

static yyconst flex_int16_t yy_nxt[296] = { 0,


    4, 5, 6, 7, 8, 9, 10, 11, 113, 12,
    19, 20, 13, 21, 14, 15, 22, 24, 16, 25,
    17, 26, 18, 19, 20, 34, 23, 13, 21, 14,
    15, 22, 24, 16, 5, 6, 7, 8, 9, 10,
    11, 23, 12, 28, 29, 13, 30, 14, 15, 31,
    32, 16, 35, 36, 37, 38, 39, 40, 28, 29,
    13, 30, 14, 15, 31, 32, 16, 35, 36, 37,
    38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
    33, 49, 49, 48, 52, 53, 54, 55, 41, 42,
    43, 44, 45, 46, 47, 50, 56, 57, 48, 52,


    53, 54, 55, 58, 51, 59, 60, 61, 62, 63,
    50, 56, 57, 64, 64, 67, 68, 69, 58, 51,
    59, 60, 61, 62, 63, 70, 71, 65, 72, 73,
    67, 68, 69, 74, 75, 76, 66, 77, 78, 82,
    70, 71, 65, 72, 73, 79, 79, 86, 74, 75,
    76, 66, 77, 78, 82, 83, 83, 87, 88, 80,
    89, 90, 86, 27, 91, 92, 93, 97, 81, 84,
    34, 33, 87, 88, 80, 89, 90, 98, 85, 91,
    92, 93, 97, 81, 84, 94, 94, 99, 100, 101,
    102, 106, 98, 85, 27, 103, 103, 107, 108, 95,




    18, 17, 99, 100, 101, 102, 106, 112, 96, 104,
    113, 113, 107, 108, 95, 109, 109, 113, 105, 113,
    113, 113, 112, 96, 104, 113, 113, 113, 113, 110,
    113, 113, 113, 105, 113, 113, 113, 113, 111, 113,
    113, 113, 113, 113, 110, 113, 113, 113, 113, 113,
    113, 113, 113, 111, 3, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113
};



static yyconst flex_int16_t yy_chk[296] = { 0,
    114, 1, 1, 1, 1, 1, 1, 1, 0, 1,
    12, 12, 1, 13, 1, 1, 14, 16, 1, 17,
    17, 18, 18, 20, 20, 34, 15, 1, 13, 1,
    1, 14, 16, 1, 2, 2, 2, 2, 2, 2,
    2, 15, 2, 21, 22, 2, 23, 2, 2, 24,
    24, 2, 28, 29, 30, 31, 32, 35, 21, 22,
    2, 23, 2, 2, 24, 24, 2, 28, 29, 30,
    31, 32, 35, 36, 37, 38, 39, 40, 41, 42,
    33, 43, 43, 42, 44, 45, 46, 47, 36, 37,
    38, 39, 40, 41, 42, 43, 48, 51, 42, 44,




    45, 46, 47, 52, 43, 53, 54, 55, 56, 56,
    43, 48, 51, 58, 58, 59, 60, 61, 52, 43,
    53, 54, 55, 56, 56, 62, 63, 58, 66, 67,
    59, 60, 61, 68, 69, 70, 58, 71, 73, 75,
    62, 63, 58, 66, 67, 74, 74, 77, 68, 69,
    70, 58, 71, 73, 75, 76, 76, 78, 81, 74,
    82, 85, 77, 27, 86, 87, 89, 92, 74, 76,
    26, 25, 78, 81, 74, 82, 85, 93, 76, 86,
    87, 89, 92, 74, 76, 91, 91, 96, 97, 98,
    100, 102, 93, 76, 19, 101, 101, 105, 106, 91,




    11, 9, 96, 97, 98, 100, 102, 111, 91, 101,
    3, 0, 105, 106, 91, 108, 108, 0, 101, 0,
    0, 0, 111, 91, 101, 0, 0, 0, 0, 108,
    0, 0, 0, 101, 0, 0, 0, 0, 108, 0,
    0, 0, 0, 0, 108, 0, 0, 0, 0, 0,

    0, 0, 0, 108, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
    113, 113, 113, 113, 113






































};

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
................................................................................
#include <unistd.h>
#endif

#define YY_EXTRA_TYPE struct vanuatu_data *

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
{

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top;	/**< index of top of stack. */
    size_t yy_buffer_stack_max;	/**< capacity of stack. */
    YY_BUFFER_STATE *yy_buffer_stack;  /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char *yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

};				/* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner);

int VanuatuWktlex_init (yyscan_t * scanner);

int VanuatuWktlex_init_extra (YY_EXTRA_TYPE user_defined, yyscan_t * scanner);

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int VanuatuWktlex_destroy (yyscan_t yyscanner);

int VanuatuWktget_debug (yyscan_t yyscanner);

void VanuatuWktset_debug (int debug_flag, yyscan_t yyscanner);

YY_EXTRA_TYPE VanuatuWktget_extra (yyscan_t yyscanner);

void VanuatuWktset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner);

FILE *VanuatuWktget_in (yyscan_t yyscanner);

void VanuatuWktset_in (FILE * in_str, yyscan_t yyscanner);

FILE *VanuatuWktget_out (yyscan_t yyscanner);

void VanuatuWktset_out (FILE * out_str, yyscan_t yyscanner);

int VanuatuWktget_leng (yyscan_t yyscanner);

char *VanuatuWktget_text (yyscan_t yyscanner);

int VanuatuWktget_lineno (yyscan_t yyscanner);

void VanuatuWktset_lineno (int line_number, yyscan_t yyscanner);

int VanuatuWktget_column (yyscan_t yyscanner);

void VanuatuWktset_column (int column_no, yyscan_t yyscanner);

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int VanuatuWktwrap (yyscan_t yyscanner);
#else
extern int VanuatuWktwrap (yyscan_t yyscanner);
#endif




#endif

#ifndef yytext_ptr
static void yy_flex_strncpy (char *, yyconst char *, int, yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char *, yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner);
#else
static int input (yyscan_t yyscanner);
#endif

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE




#define YY_READ_BUF_SIZE 8192

#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		unsigned n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
................................................................................
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
    register yy_state_type yy_current_state;
    register char *yy_cp, *yy_bp;
    register int yy_act;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_init)
      {
	  yyg->yy_init = 1;

#ifdef YY_USER_INIT
	  YY_USER_INIT;
#endif

	  if (!yyg->yy_start)
	      yyg->yy_start = 1;	/* first start state */

	  if (!yyin)
	      yyin = stdin;

	  if (!yyout)
	      yyout = stdout;

	  if (!YY_CURRENT_BUFFER)
	    {
		VanuatuWktensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
		    VanuatuWkt_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
	    }

	  VanuatuWkt_load_buffer_state (yyscanner);
      }

    while (1)			/* loops until end-of-file is reached */
      {
	  yy_cp = yyg->yy_c_buf_p;

	  /* Support of yytext. */
	  *yy_cp = yyg->yy_hold_char;

	  /* yy_bp points to the position in yy_ch_buf of the start of
	   * the current run.
	   */
	  yy_bp = yy_cp;

	  yy_current_state = yyg->yy_start;
	yy_match:
	  do
	    {
		register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI (*yy_cp)];
		if (yy_accept[yy_current_state])
		  {
		      yyg->yy_last_accepting_state = yy_current_state;
		      yyg->yy_last_accepting_cpos = yy_cp;
		  }
		while (yy_chk[yy_base[yy_current_state] + yy_c] !=
		       yy_current_state)
		  {
		      yy_current_state = (int) yy_def[yy_current_state];
		      if (yy_current_state >= 114)
			  yy_c = yy_meta[(unsigned int) yy_c];
		  }
		yy_current_state =
		    yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		++yy_cp;
	    }
	  while (yy_base[yy_current_state] != 255);

	yy_find_action:
	  yy_act = yy_accept[yy_current_state];
	  if (yy_act == 0)
	    {			/* have to back up */
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		yy_act = yy_accept[yy_current_state];
	    }

	  YY_DO_BEFORE_ACTION;

	do_action:		/* This label is used only to access EOF actions. */

	  switch (yy_act)
	    {			/* beginning of action switch */
	    case 0:		/* must back up */
		/* undo the effects of YY_DO_BEFORE_ACTION */
		*yy_cp = yyg->yy_hold_char;
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;
		goto yy_find_action;

	    case 1:
		YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->vanuatu_col +=
			(int) strlen (yytext);
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval =
			atof (yytext);
		    return VANUATU_NUM;
		}
		YY_BREAK case 2:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_COMMA;
		}
		YY_BREAK case 3:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_OPEN_BRACKET;
		}
		YY_BREAK case 4:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_CLOSE_BRACKET;
		}
		YY_BREAK case 5:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POINT;
		}
		YY_BREAK case 6:
/* rule 6 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POINT_Z;
		}
		YY_BREAK case 7:
/* rule 7 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POINT_M;
		}
		YY_BREAK case 8:
/* rule 8 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POINT_ZM;
		}
		YY_BREAK case 9:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_LINESTRING;
		}
		YY_BREAK case 10:
/* rule 10 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_LINESTRING_Z;
		}
		YY_BREAK case 11:
/* rule 11 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_LINESTRING_M;
		}
		YY_BREAK case 12:
/* rule 12 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_LINESTRING_ZM;
		}
		YY_BREAK case 13:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POLYGON;
		}
		YY_BREAK case 14:
/* rule 14 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POLYGON_Z;
		}
		YY_BREAK case 15:
/* rule 15 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POLYGON_M;
		}
		YY_BREAK case 16:
/* rule 16 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_POLYGON_ZM;
		}
		YY_BREAK case 17:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOINT;
		}
		YY_BREAK case 18:
/* rule 18 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOINT_Z;
		}
		YY_BREAK case 19:
/* rule 19 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOINT_M;
		}
		YY_BREAK case 20:
/* rule 20 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOINT_ZM;
		}
		YY_BREAK case 21:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTILINESTRING;
		}
		YY_BREAK case 22:
/* rule 22 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTILINESTRING_Z;
		}
		YY_BREAK case 23:
/* rule 23 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTILINESTRING_M;
		}
		YY_BREAK case 24:
/* rule 24 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTILINESTRING_ZM;
		}
		YY_BREAK case 25:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOLYGON;
		}
		YY_BREAK case 26:
/* rule 26 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOLYGON_Z;
		}
		YY_BREAK case 27:
/* rule 27 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOLYGON_M;
		}
		YY_BREAK case 28:
/* rule 28 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_MULTIPOLYGON_ZM;
		}
		YY_BREAK case 29:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_GEOMETRYCOLLECTION;
		}
		YY_BREAK case 30:
/* rule 30 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_GEOMETRYCOLLECTION_Z;
		}
		YY_BREAK case 31:
/* rule 31 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_GEOMETRYCOLLECTION_M;
		}
		YY_BREAK case 32:
/* rule 32 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->VanuatuWktlval.dval = 0;
		    return VANUATU_GEOMETRYCOLLECTION_ZM;
		}
		YY_BREAK case 33:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->vanuatu_col +=
			(int) strlen (yytext);
		}		/* ignore but count white space */
		YY_BREAK case 34:
/* rule 34 can match eol */
		  YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->vanuatu_col = 0;
		    VanuatuWktget_extra (yyscanner)->vanuatu_line++;
		}
		YY_BREAK case 35:YY_RULE_SETUP
		{
		    VanuatuWktget_extra (yyscanner)->vanuatu_col +=
			(int) strlen (yytext);
		    return -1;
		}
		YY_BREAK case 36:YY_RULE_SETUP ECHO;
		YY_BREAK case YY_STATE_EOF (INITIAL):yyterminate ();

	    case YY_END_OF_BUFFER:
		{
		    /* Amount of text matched not including the EOB char. */
		    int yy_amount_of_matched_text =
			(int) (yy_cp - yyg->yytext_ptr) - 1;

		    /* Undo the effects of YY_DO_BEFORE_ACTION. */
		    *yy_cp = yyg->yy_hold_char;
		    YY_RESTORE_YY_MORE_OFFSET
			if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status ==
			    YY_BUFFER_NEW)
		      {
			  /* We're scanning a new file or input source.  It's
			   * possible that this happened because the user
			   * just pointed yyin at a new source and called
			   * VanuatuWktlex().  If so, then we have to assure
			   * consistency between YY_CURRENT_BUFFER and our
			   * globals.  Here is the right place to do so, because
			   * this is the first action (other than possibly a
			   * back-up) that will match for the new input source.
			   */
			  yyg->yy_n_chars =
			      YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
			      YY_BUFFER_NORMAL;
		      }

		    /* Note that here we test for yy_c_buf_p "<=" to the position
		     * of the first EOB in the buffer, since yy_c_buf_p will
		     * already have been incremented past the NUL character
		     * (since all states make transitions on EOB to the
		     * end-of-buffer state).  Contrast this with the test
		     * in input().
		     */
		    if (yyg->yy_c_buf_p <=
			&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
		      {		/* This was really a NUL. */
			  yy_state_type yy_next_state;

			  yyg->yy_c_buf_p =
			      yyg->yytext_ptr + yy_amount_of_matched_text;

			  yy_current_state = yy_get_previous_state (yyscanner);

			  /* Okay, we're now positioned to make the NUL
			   * transition.  We couldn't have
			   * yy_get_previous_state() go ahead and do it
			   * for us because it doesn't know how to deal
			   * with the possibility of jamming (and we don't
			   * want to build jamming into it because then it
			   * will run more slowly).
			   */

			  yy_next_state =
			      yy_try_NUL_trans (yy_current_state, yyscanner);

			  yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			  if (yy_next_state)
			    {
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
			    }

			  else
			    {
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
			    }
		      }

		    else
			switch (yy_get_next_buffer (yyscanner))
			  {
			  case EOB_ACT_END_OF_FILE:
			      {
				  yyg->yy_did_buffer_switch_on_eof = 0;

				  if (VanuatuWktwrap (yyscanner))
				    {
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p =
					    yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF (YY_START);
					goto do_action;
				    }

				  else
				    {
					if (!yyg->yy_did_buffer_switch_on_eof)
					    YY_NEW_FILE;
				    }
				  break;
			      }

			  case EOB_ACT_CONTINUE_SCAN:
			      yyg->yy_c_buf_p =
				  yyg->yytext_ptr + yy_amount_of_matched_text;

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_match;

			  case EOB_ACT_LAST_MATCH:
			      yyg->yy_c_buf_p =
				  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->
								       yy_n_chars];

			      yy_current_state =
				  yy_get_previous_state (yyscanner);

			      yy_cp = yyg->yy_c_buf_p;
			      yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
			      goto yy_find_action;
			  }
		    break;
		}

	    default:
		YY_FATAL_ERROR
		    ("fatal flex scanner internal error--no action found");
	    }			/* end of action switch */
      }				/* end of scanning one token */
}				/* end of VanuatuWktlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int
yy_get_next_buffer (yyscan_t yyscanner)
{
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
    register char *source = yyg->yytext_ptr;
    register int number_to_move, i;
    int ret_val;

    if (yyg->yy_c_buf_p >
	&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1])
	YY_FATAL_ERROR
	    ("fatal flex scanner internal error--end of buffer missed");

    if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0)
      {				/* Don't try to fill the buffer, so this is an EOF. */
	  if (yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1)
	    {
		/* We matched a single character, the EOB, so
		 * treat this as a final EOF.
		 */
		return EOB_ACT_END_OF_FILE;
	    }

	  else
	    {
		/* We matched some text prior to the EOB, first
		 * process it.
		 */
		return EOB_ACT_LAST_MATCH;
	    }
      }

    /* Try to read more data. */

    /* First move last chars to start of buffer. */
    number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;

    for (i = 0; i < number_to_move; ++i)
	*(dest++) = *(source++);

    if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING)
	/* don't do the read, it's not guaranteed to return an EOF,
	 * just force an EOF
	 */
	YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

    else
      {
	  int num_to_read =
	      YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

	  while (num_to_read <= 0)
	    {			/* Not enough room in the buffer - grow it. */

		/* just a shorter name for the current buffer */
		YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

		int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf);

		if (b->yy_is_our_buffer)
		  {
		      int new_size = b->yy_buf_size * 2;

		      if (new_size <= 0)
			  b->yy_buf_size += b->yy_buf_size / 8;
		      else
			  b->yy_buf_size *= 2;

		      b->yy_ch_buf = (char *)
			  /* Include room in for 2 EOB chars. */
			  VanuatuWktrealloc ((void *) b->yy_ch_buf,
					     b->yy_buf_size + 2, yyscanner);
		  }
		else
		    /* Can't grow it, we don't own it. */
		    b->yy_ch_buf = 0;

		if (!b->yy_ch_buf)
		    YY_FATAL_ERROR
			("fatal error - scanner input buffer overflow");

		yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

		num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
		    number_to_move - 1;

	    }

	  if (num_to_read > YY_READ_BUF_SIZE)
	      num_to_read = YY_READ_BUF_SIZE;

	  /* Read in more data. */
	  YY_INPUT ((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
		    yyg->yy_n_chars, (size_t) num_to_read);

	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    if (yyg->yy_n_chars == 0)
      {
	  if (number_to_move == YY_MORE_ADJ)
	    {
		ret_val = EOB_ACT_END_OF_FILE;
		VanuatuWktrestart (yyin, yyscanner);
	    }

	  else
	    {
		ret_val = EOB_ACT_LAST_MATCH;
		YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
		    YY_BUFFER_EOF_PENDING;
	    }
      }

    else
	ret_val = EOB_ACT_CONTINUE_SCAN;

    if ((yy_size_t) (yyg->yy_n_chars + number_to_move) >
	YY_CURRENT_BUFFER_LVALUE->yy_buf_size)
      {
	  /* Extend the array by 50%, plus the number we really need. */
	  yy_size_t new_size =
	      yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
	  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf =
	      (char *) VanuatuWktrealloc ((void *)
					  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,
					  new_size, yyscanner);
	  if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
	      YY_FATAL_ERROR ("out of dynamic memory in yy_get_next_buffer()");
      }

    yyg->yy_n_chars += number_to_move;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] =
	YY_END_OF_BUFFER_CHAR;
    YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] =
	YY_END_OF_BUFFER_CHAR;

    yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

    return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type
yy_get_previous_state (yyscan_t yyscanner)
{
    register yy_state_type yy_current_state;
    register char *yy_cp;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    yy_current_state = yyg->yy_start;

    for (yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p;
	 ++yy_cp)
      {
	  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI (*yy_cp)] : 1);
	  if (yy_accept[yy_current_state])
	    {
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
	    }
	  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
	    {
		yy_current_state = (int) yy_def[yy_current_state];
		if (yy_current_state >= 114)
		    yy_c = yy_meta[(unsigned int) yy_c];
	    }
	  yy_current_state =
	      yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      }

    return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state, yyscan_t yyscanner)
{
    register int yy_is_jam;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;	/* This var may be unused depending upon options. */
    register char *yy_cp = yyg->yy_c_buf_p;

    register YY_CHAR yy_c = 1;
    if (yy_accept[yy_current_state])
      {
	  yyg->yy_last_accepting_state = yy_current_state;
	  yyg->yy_last_accepting_cpos = yy_cp;
      }
    while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state)
      {
	  yy_current_state = (int) yy_def[yy_current_state];
	  if (yy_current_state >= 114)
	      yy_c = yy_meta[(unsigned int) yy_c];
      }
    yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
    yy_is_jam = (yy_current_state == 113);

    return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int
yyinput (yyscan_t yyscanner)
#else
static int
input (yyscan_t yyscanner)
#endif
{
    int c;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    *yyg->yy_c_buf_p = yyg->yy_hold_char;

    if (*yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR)
      {
	  /* yy_c_buf_p now points to the character we want to return.
	   * If this occurs *before* the EOB characters, then it's a
	   * valid NUL; if not, then we've hit the end of the buffer.
	   */
	  if (yyg->yy_c_buf_p <
	      &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars])
	      /* This was really a NUL. */
	      *yyg->yy_c_buf_p = '\0';

	  else
	    {			/* need more input */
		int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
		++yyg->yy_c_buf_p;

		switch (yy_get_next_buffer (yyscanner))
		  {
		  case EOB_ACT_LAST_MATCH:
		      /* This happens because yy_g_n_b()
		       * sees that we've accumulated a
		       * token and flags that we need to
		       * try matching the token before
		       * proceeding.  But for input(),
		       * there's no matching to consider.
		       * So convert the EOB_ACT_LAST_MATCH
		       * to EOB_ACT_END_OF_FILE.
		       */

		      /* Reset buffer status. */
		      VanuatuWktrestart (yyin, yyscanner);

		   /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE:
		      {
			  if (VanuatuWktwrap (yyscanner))
			      return EOF;

			  if (!yyg->yy_did_buffer_switch_on_eof)
			      YY_NEW_FILE;
#ifdef __cplusplus
			  return yyinput (yyscanner);
#else
			  return input (yyscanner);
#endif
		      }

		  case EOB_ACT_CONTINUE_SCAN:
		      yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
		      break;
		  }
	    }
      }

    c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
    *yyg->yy_c_buf_p = '\0';	/* preserve yytext */
    yyg->yy_hold_char = *++yyg->yy_c_buf_p;

    return c;
}
#endif /* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
void
VanuatuWktrestart (FILE * input_file, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
      {
	  VanuatuWktensure_buffer_stack (yyscanner);
	  YY_CURRENT_BUFFER_LVALUE =
	      VanuatuWkt_create_buffer (yyin, YY_BUF_SIZE, yyscanner);
      }


    VanuatuWkt_init_buffer (YY_CURRENT_BUFFER, input_file, yyscanner);
    VanuatuWkt_load_buffer_state (yyscanner);
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
void
VanuatuWkt_switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* TODO. We should be able to replace this entire function body
     * with
     *              VanuatuWktpop_buffer_state();
     *              VanuatuWktpush_buffer_state(new_buffer);
     */
    VanuatuWktensure_buffer_stack (yyscanner);
    if (YY_CURRENT_BUFFER == new_buffer)
	return;

    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    YY_CURRENT_BUFFER_LVALUE = new_buffer;
    VanuatuWkt_load_buffer_state (yyscanner);

    /* We don't actually know whether we did this switch during
     * EOF (VanuatuWktwrap()) processing, but the only time this flag
     * is looked at is after VanuatuWktwrap() is called, so it's safe
     * to go ahead and always set it.
     */
    yyg->yy_did_buffer_switch_on_eof = 1;
}

static void
VanuatuWkt_load_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
    yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
    yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
YY_BUFFER_STATE
VanuatuWkt_create_buffer (FILE * file, int size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    b = (YY_BUFFER_STATE) VanuatuWktalloc (sizeof (struct yy_buffer_state),
					   yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in VanuatuWkt_create_buffer()");

    b->yy_buf_size = size;

    /* yy_ch_buf has to be 2 characters longer than the size given because
     * we need to put in 2 end-of-buffer characters.
     */
    b->yy_ch_buf = (char *) VanuatuWktalloc (b->yy_buf_size + 2, yyscanner);
    if (!b->yy_ch_buf)
	YY_FATAL_ERROR ("out of dynamic memory in VanuatuWkt_create_buffer()");

    b->yy_is_our_buffer = 1;

    VanuatuWkt_init_buffer (b, file, yyscanner);

    return b;
}

/** Destroy the buffer.
 * @param b a buffer created with VanuatuWkt_create_buffer()
 * @param yyscanner The scanner object.
 */
void
VanuatuWkt_delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!b)
	return;

    if (b == YY_CURRENT_BUFFER)	/* Not sure if we should pop here. */
	YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

    if (b->yy_is_our_buffer)
	VanuatuWktfree ((void *) b->yy_ch_buf, yyscanner);


    VanuatuWktfree ((void *) b, yyscanner);
}

#ifndef __cplusplus
extern int isatty (int);
#endif /* __cplusplus */

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a VanuatuWktrestart() or at EOF.
 */
static void
VanuatuWkt_init_buffer (YY_BUFFER_STATE b, FILE * file, yyscan_t yyscanner)
{

    int oerrno = errno;
    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    VanuatuWkt_flush_buffer (b, yyscanner);

    b->yy_input_file = file;
    b->yy_fill_buffer = 1;

    /* If b is the current buffer, then VanuatuWkt_init_buffer was _probably_
     * called from VanuatuWktrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER)
      {
	  b->yy_bs_lineno = 1;
	  b->yy_bs_column = 0;
      }

    b->yy_is_interactive = file ? (isatty (fileno (file)) > 0) : 0;

    errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */
void
VanuatuWkt_flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!b)
	return;

    b->yy_n_chars = 0;

    /* We always need two end-of-buffer characters.  The first causes
     * a transition to the end-of-buffer state.  The second causes
     * a jam in that state.
     */
    b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

    b->yy_buf_pos = &b->yy_ch_buf[0];

    b->yy_at_bol = 1;
    b->yy_buffer_status = YY_BUFFER_NEW;

    if (b == YY_CURRENT_BUFFER)
	VanuatuWkt_load_buffer_state (yyscanner);
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */
void
VanuatuWktpush_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (new_buffer == NULL)
	return;

    VanuatuWktensure_buffer_stack (yyscanner);

    /* This block is copied from VanuatuWkt_switch_to_buffer. */
    if (YY_CURRENT_BUFFER)
      {
	  /* Flush out information for old buffer. */
	  *yyg->yy_c_buf_p = yyg->yy_hold_char;
	  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
	  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
      }

    /* Only push if top exists. Otherwise, replace top. */
    if (YY_CURRENT_BUFFER)
	yyg->yy_buffer_stack_top++;
    YY_CURRENT_BUFFER_LVALUE = new_buffer;

    /* copied from VanuatuWkt_switch_to_buffer. */
    VanuatuWkt_load_buffer_state (yyscanner);
    yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
void
VanuatuWktpop_buffer_state (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    if (!YY_CURRENT_BUFFER)
	return;

    VanuatuWkt_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
    YY_CURRENT_BUFFER_LVALUE = NULL;
    if (yyg->yy_buffer_stack_top > 0)
	--yyg->yy_buffer_stack_top;

    if (YY_CURRENT_BUFFER)
      {
	  VanuatuWkt_load_buffer_state (yyscanner);
	  yyg->yy_did_buffer_switch_on_eof = 1;
      }
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void
VanuatuWktensure_buffer_stack (yyscan_t yyscanner)
{
    int num_to_alloc;

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!yyg->yy_buffer_stack)
      {

	  /* First allocation is just for 2 elements, since we don't know if this
	   * scanner will even need a stack. We use 2 instead of 1 to avoid an
	   * immediate realloc on the next call.
	   */
	  num_to_alloc = 1;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) VanuatuWktalloc
	      (num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in VanuatuWktensure_buffer_stack()");

	  memset (yyg->yy_buffer_stack, 0,
		  num_to_alloc * sizeof (struct yy_buffer_state *));

	  yyg->yy_buffer_stack_max = num_to_alloc;
	  yyg->yy_buffer_stack_top = 0;
	  return;
      }

    if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1)
      {

	  /* Increase the buffer to prepare for a possible push. */
	  int grow_size = 8 /* arbitrary grow size */ ;

	  num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
	  yyg->yy_buffer_stack = (struct yy_buffer_state **) VanuatuWktrealloc
	      (yyg->yy_buffer_stack,
	       num_to_alloc * sizeof (struct yy_buffer_state *), yyscanner);

	  if (!yyg->yy_buffer_stack)
	      YY_FATAL_ERROR
		  ("out of dynamic memory in VanuatuWktensure_buffer_stack()");

	  /* zero only the new slots. */
	  memset (yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0,
		  grow_size * sizeof (struct yy_buffer_state *));
	  yyg->yy_buffer_stack_max = num_to_alloc;
      }
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */

YY_BUFFER_STATE
VanuatuWkt_scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;

    if (size < 2 ||
	base[size - 2] != YY_END_OF_BUFFER_CHAR ||
	base[size - 1] != YY_END_OF_BUFFER_CHAR)
	/* They forgot to leave room for the EOB's. */
	return 0;

    b = (YY_BUFFER_STATE) VanuatuWktalloc (sizeof (struct yy_buffer_state),
					   yyscanner);
    if (!b)
	YY_FATAL_ERROR ("out of dynamic memory in VanuatuWkt_scan_buffer()");

    b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
    b->yy_buf_pos = b->yy_ch_buf = base;
    b->yy_is_our_buffer = 0;
    b->yy_input_file = 0;
    b->yy_n_chars = b->yy_buf_size;
    b->yy_is_interactive = 0;
    b->yy_at_bol = 1;
    b->yy_fill_buffer = 0;
    b->yy_buffer_status = YY_BUFFER_NEW;

    VanuatuWkt_switch_to_buffer (b, yyscanner);

    return b;
}

/** Setup the input buffer state to scan a string. The next call to VanuatuWktlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       VanuatuWkt_scan_bytes() instead.
 */
YY_BUFFER_STATE
VanuatuWkt_scan_string (yyconst char *yystr, yyscan_t yyscanner)
{

    return VanuatuWkt_scan_bytes (yystr, strlen (yystr), yyscanner);
}

/** Setup the input buffer state to scan the given bytes. The next call to VanuatuWktlex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE
VanuatuWkt_scan_bytes (yyconst char *yybytes, int _yybytes_len,
		       yyscan_t yyscanner)
{
    YY_BUFFER_STATE b;
    char *buf;
    yy_size_t n;
    int i;

    /* Get memory for full buffer, including space for trailing EOB's. */
    n = _yybytes_len + 2;
    buf = (char *) VanuatuWktalloc (n, yyscanner);
    if (!buf)
	YY_FATAL_ERROR ("out of dynamic memory in VanuatuWkt_scan_bytes()");

    for (i = 0; i < _yybytes_len; ++i)
	buf[i] = yybytes[i];

    buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR;

    b = VanuatuWkt_scan_buffer (buf, n, yyscanner);
    if (!b)
	YY_FATAL_ERROR ("bad buffer in VanuatuWkt_scan_bytes()");

    /* It's okay to grow etc. this buffer, and we should throw it
     * away when we're done.
     */
    b->yy_is_our_buffer = 1;

    return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void
yy_fatal_error (yyconst char *msg, yyscan_t yyscanner)
{


    (void) fprintf (stderr, "%s\n", msg);
    exit (YY_EXIT_FAILURE);
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
................................................................................
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE
VanuatuWktget_extra (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int
VanuatuWktget_lineno (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int
VanuatuWktget_column (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    if (!YY_CURRENT_BUFFER)
	return 0;

    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *
VanuatuWktget_in (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *
VanuatuWktget_out (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
int
VanuatuWktget_leng (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *
VanuatuWktget_text (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void
VanuatuWktset_extra (YY_EXTRA_TYPE user_defined, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyextra = user_defined;
}

/** Set the current line number.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
VanuatuWktset_lineno (int line_number, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* lineno is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("VanuatuWktset_lineno called with no buffer",
			yyscanner);

    yylineno = line_number;
}

/** Set the current column.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void
VanuatuWktset_column (int column_no, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* column is only valid if an input buffer exists. */
    if (!YY_CURRENT_BUFFER)
	yy_fatal_error ("VanuatuWktset_column called with no buffer",
			yyscanner);

    yycolumn = column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see VanuatuWkt_switch_to_buffer
 */
void
VanuatuWktset_in (FILE * in_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyin = in_str;
}

void
VanuatuWktset_out (FILE * out_str, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yyout = out_str;
}

int
VanuatuWktget_debug (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    return yy_flex_debug;
}

void
VanuatuWktset_debug (int bdebug, yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    yy_flex_debug = bdebug;
}

/* Accessor methods for yylval and yylloc */

/* User-visible API */

/* VanuatuWktlex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */

int
VanuatuWktlex_init (yyscan_t * ptr_yy_globals)
{

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }

    *ptr_yy_globals =
	(yyscan_t) VanuatuWktalloc (sizeof (struct yyguts_t), NULL);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    return yy_init_globals (*ptr_yy_globals);
}

/* VanuatuWktlex_init_extra has the same functionality as VanuatuWktlex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to VanuatuWktalloc in
 * the yyextra field.
 */

int
VanuatuWktlex_init_extra (YY_EXTRA_TYPE yy_user_defined,
			  yyscan_t * ptr_yy_globals)
{
    struct yyguts_t dummy_yyguts;

    VanuatuWktset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL)
      {
	  errno = EINVAL;
	  return 1;
      }


    *ptr_yy_globals =
	(yyscan_t) VanuatuWktalloc (sizeof (struct yyguts_t), &dummy_yyguts);

    if (*ptr_yy_globals == NULL)
      {
	  errno = ENOMEM;
	  return 1;
      }

    /* By setting to 0xAA, we expose bugs in
       yy_init_globals. Leave at 0x00 for releases. */

    memset (*ptr_yy_globals, 0x00, sizeof (struct yyguts_t));

    VanuatuWktset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals (*ptr_yy_globals);
}

static int
yy_init_globals (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from VanuatuWktlex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = 0;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = (char *) 0;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack = NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * VanuatuWktlex_init()
     */
    return 0;
}

/* VanuatuWktlex_destroy is for both reentrant and non-reentrant scanners. */
int
VanuatuWktlex_destroy (yyscan_t yyscanner)
{

    struct yyguts_t *yyg = (struct yyguts_t *) yyscanner;

    /* Pop the buffer stack, destroying each element. */
    while (YY_CURRENT_BUFFER)
      {
	  VanuatuWkt_delete_buffer (YY_CURRENT_BUFFER, yyscanner);
	  YY_CURRENT_BUFFER_LVALUE = NULL;
	  VanuatuWktpop_buffer_state (yyscanner);
      }

    /* Destroy the stack itself. */
    VanuatuWktfree (yyg->yy_buffer_stack, yyscanner);
    yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
    VanuatuWktfree (yyg->yy_start_stack, yyscanner);
    yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * VanuatuWktlex() is called, initialization will occur. */
    yy_init_globals (yyscanner);

    /* Destroy the main struct (reentrant only). */
    VanuatuWktfree (yyscanner, yyscanner);
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr



static void
yy_flex_strncpy (char *s1, yyconst char *s2, int n, yyscan_t yyscanner)
{
    register int i;
    for (i = 0; i < n; ++i)
	s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int
yy_flex_strlen (yyconst char *s, yyscan_t yyscanner)
{
    register int n;
    for (n = 0; s[n]; ++n)
	;

    return n;
}
#endif

void *
VanuatuWktalloc (yy_size_t size, yyscan_t yyscanner)
{

    return (void *) malloc (size);

}




void *
VanuatuWktrealloc (void *ptr, yy_size_t size, yyscan_t yyscanner)
{
    /* The cast to (char *) in the following accommodates both
     * implementations that use char* generic pointers, and those
     * that use void* generic pointers.  It works with the latter
     * because both ANSI C and C++ allow castless assignment from
     * any pointer type to void*, and deal with argument conversions
     * as though doing an assignment.
     */

    return (void *) realloc ((char *) ptr, size);
}

void
VanuatuWktfree (void *ptr, yyscan_t yyscanner)
{


    free ((char *) ptr);	/* see VanuatuWktrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

int
VanuatuWktwrap (yyscan_t yyscanner)
{
    return 1;
}

/******************************************************************************
** This is the end of the code that was created by Team Vanuatu
** of The University of Toronto.

Authors:
................................................................................
Yong Jian			yong.jian@utoronto.ca

Supervisor:
Greg Wilson			gvwilson@cs.toronto.ca

-------------------------------------------------------------------------------
*/

Changes to src/gaiageo/vanuatuWkt.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82


83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109


110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160


161
162
163
164
165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180


181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309

310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406


















407
408
409


410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
...
433
434
435
436
437
438
439
440
441
442
443
444
445
446


447
448
449
450
451
452
453
454
455
456
457


458
459

460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
...
493
494
495
496
497
498
499

500

501
502

503

504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148




1149
1150
1151
1152
1153


1154
1155
1156


1157
1158
1159
1160

1161
1162
1163


1164
1165
1166


1167
1168
1169
1170

1171
1172
1173
1174
1175
1176
1177
1178
1179


1180

1181
1182

1183
1184
1185
1186


1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022




















































































































































































































































































































































































































































































































































2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033


2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054


2055
2056
2057
2058


2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
....
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096


2097
2098
2099
2100
2101
2102
2103
2104
2105
2106

2107
2108
2109

2110







2111







2112
2113
2114
2115
2116
2117
2118


2119
2120
2121
2122
2123
2124
2125
2126
2127

2128
2129
2130
2131
2132
2133




2134
2135
2136
2137
2138
2139
2140





2141

2142
2143
2144
2145
2146
2147
2148
2149


2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173


2174
2175
2176

2177
2178

2179
2180
2181
2182
2183

2184

2185
2186


2187

2188
2189
2190
2191


2192
2193
2194



2195
2196
2197
2198
2199
2200

2201
2202




2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216


2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230


2231
2232
2233

2234

2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255

2256
2257
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/

/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    ParseTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions


*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 133
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE void *
typedef union {

  int yyinit;
  ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct vanuatu_data *p_data ;
#define ParseARG_PDECL , struct vanuatu_data *p_data 
#define ParseARG_FETCH  struct vanuatu_data *p_data  = yypParser->p_data 
#define ParseARG_STORE yypParser->p_data  = p_data 
#define YYNSTATE             315
#define YYNRULE              201
#define YYNTOKEN             34
#define YY_MAX_SHIFT         314
#define YY_MIN_SHIFTREDUCE   490
#define YY_MAX_SHIFTREDUCE   690
#define YY_ERROR_ACTION      691


#define YY_ACCEPT_ACTION     692
#define YY_NO_ACTION         693
#define YY_MIN_REDUCE        694
#define YY_MAX_REDUCE        894
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if

** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.


**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.

**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (603)
static const YYACTIONTYPE yy_action[] = {


 /*     0 */   314,  314,  314,  314,  314,  314,  694,  695,  696,  697,
 /*    10 */   698,  699,  700,  701,  702,  703,  704,  705,  706,  707,
 /*    20 */   708,  709,  710,  711,  712,  713,  714,  715,  716,  717,
 /*    30 */   718,  719,  720,  721,  887,  187,  313,  224,  174,  311,
 /*    40 */   309,  307,  228,  173,  221,  218,  215,  212,  209,  203,
 /*    50 */   197,  191,  185,  178,  170,  162,  153,  148,  143,  138,
 /*    60 */   133,  128,  123,  118,  113,   96,   79,   62,  307,  307,
 /*    70 */   309,  309,  692,    1,  212,  212,  215,  215,  191,  191,
 /*    80 */   197,  197,  162,  162,  170,  170,  138,  138,  143,  143,
 /*    90 */   118,  118,  123,  123,   54,   47,   71,   64,  311,  311,
 /*   100 */   530,  157,  313,  224,  218,  218,  156,  313,  203,  203,
 /*   110 */   221,    2,  178,  178,  209,  221,  148,  148,  185,  209,
 /*   120 */   128,  128,  153,  185,   88,   81,  133,  153,  161,  166,
 /*   130 */   105,  133,  226,  530,  165,   98,   60,   59,   58,   57,
 /*   140 */    56,   55,   61,   52,   51,   50,   49,   48,   77,   76,
 /*   150 */    75,   74,   73,   72,  230,   46,   78,   69,   68,   67,
 /*   160 */    66,   65,  279,    3,  224,   94,   93,   92,   91,   90,
 /*   170 */    89,   95,   86,   85,   84,   83,   82,  231,  232,  111,
 /*   180 */   110,  109,  108,  107,  106,  112,  103,  102,  101,  100,
 /*   190 */    99,  182,  169,  177,  184,  181,  229,  530,  530,  530,
 /*   200 */   280,  281,  224,  224,  193,  284,  285,  226,  226,  226,
 /*   210 */   286,  199,  289,  226,  205,  228,  228,  290,  291,  229,
 /*   220 */   294,  228,  228,  295,  296,  229,  233,  213,  229,  229,
 /*   230 */   226,  210,  211,  224,  224,  299,  214,  224,  301,  226,
 /*   240 */   216,  226,  217,  303,  228,  219,  228,  228,  220,  308,
 /*   250 */   229,  305,  226,  229,  310,  306,  229,  224,  228,  312,
 /*   260 */   234,  235,   53,    4,  229,  886,    5,    6,    7,  885,
 /*   270 */     8,    9,  884,  115,  190,  883,  117,  196,  882,  881,
 /*   280 */   122,  880,  236,  826,  120,  237,  202,  125,   63,  238,
 /*   290 */   127,  130,  208,  132,  239,  114,  240,  241,   32,  242,
 /*   300 */   135,   70,  871,  870,  137,  116,  140,   35,  869,  868,
 /*   310 */   142,  145,   80,  867,  866,  865,  243,   38,  825,  147,
 /*   320 */   139,  129,  244,  245,  246,  247,  248,  249,  856,   87,
 /*   330 */   855,  854,  853,   97,  852,  851,  850,  250,  824,  251,
 /*   340 */   252,  819,  253,  254,  255,  256,  841,  104,  840,  839,
 /*   350 */   838,  822,  837,  836,  835,  257,  823,  258,  810,  259,
 /*   360 */   119,  121,  809,  816,  260,  124,  808,  813,  261,  126,
 /*   370 */   806,  131,  807,  794,  262,  134,  136,  150,  141,   41,
 /*   380 */   152,  144,  146,  803,  263,  161,  149,  155,  151,  742,
 /*   390 */   793,  154,  266,   30,  800,  267,  268,  158,  159,  264,
 /*   400 */   160,   10,  164,  792,  169,  740,  163,  269,  797,   33,
 /*   410 */   782,  265,  270,  791,  271,  167,  168,   11,  172,  781,
 /*   420 */   177,  171,  738,  272,   36,  274,  175,  176,  273,   12,
 /*   430 */   180,  184,  780,  736,  179,  275,   39,  277,  276,  183,
 /*   440 */    13,  779,  188,  278,   17,  194,  283,  775,  778,  186,
 /*   450 */    21,  282,  762,  200,  189,  288,   25,  206,  192,  761,
 /*   460 */    29,  750,  753,  287,  195,  772,  292,  198,  760,  201,
 /*   470 */   769,  293,  298,  759,  748,  204,  300,  297,  674,  207,
 /*   480 */   754,  746,  302,  752,  733,  673,  744,  304,  222,  223,
 /*   490 */   672,  671,  751,  670,  732,  225,  731,  669,  227,  730,
 /*   500 */   668,  659,  658,  657,  656,  655,  654,  653,  644,  643,
 /*   510 */   642,  641,  640,  639,  638,  629,  628,  627,  626,  625,
 /*   520 */   624,  623,  616,  613,  610,  607,  600,  597,  594,  591,
 /*   530 */   586,  582,  525,  585,  581,  524,  584,  580,  523,  583,
 /*   540 */   579,  522,  572,  693,  693,  693,  562,  569,   14,   15,
 /*   550 */    16,  693,  693,  693,  561,  566,   18,   19,   20,  693,
 /*   560 */   693,  693,  560,  563,   22,   23,   24,  693,  693,  693,
 /*   570 */   559,  554,   26,   27,   28,  693,  553,  693,  552,  693,
 /*   580 */    31,  551,   34,  685,   37,  521,   42,  693,   40,  520,
 /*   590 */    43,  693,  693,  519,   44,  693,  693,  693,  518,  693,
 /*   600 */   693,  693,   45,
};

static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    37,   38,   39,   40,   41,   42,   43,   44,   45,   46,
 /*    10 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
 /*    20 */    57,   58,   59,   60,   61,   62,   63,   64,   65,   66,
 /*    30 */    67,   68,   69,   70,    0,   74,    2,   76,   72,    5,
 /*    40 */     6,    7,   76,   77,   10,   11,   12,   13,   14,   15,
 /*    50 */    16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
 /*    60 */    26,   27,   28,   29,   30,   31,   32,   33,    7,    7,
 /*    70 */     6,    6,   35,   36,   13,   13,   12,   12,   17,   17,
 /*    80 */    16,   16,   21,   21,   20,   20,   25,   25,   24,   24,
 /*    90 */    29,   29,   28,   28,   33,   33,   32,   32,    5,    5,
 /*   100 */     8,   74,    2,   76,   11,   11,   79,    2,   15,   15,
 /*   110 */    10,    9,   19,   19,   14,   10,   23,   23,   18,   14,
 /*   120 */    27,   27,   22,   18,   31,   31,   26,   22,    3,   73,
 /*   130 */    30,   26,   76,    8,   78,   30,   64,   65,   66,   67,
 /*   140 */    68,   69,   64,   65,   66,   67,   68,   69,   50,   51,
 /*   150 */    52,   53,   54,   55,  131,  127,   50,   51,   52,   53,
 /*   160 */    54,   55,   74,    3,   76,   57,   58,   59,   60,   61,
 /*   170 */    62,   57,   58,   59,   60,   61,   62,  131,  131,   43,
 /*   180 */    44,   45,   46,   47,   48,   43,   44,   45,   46,   47,
 /*   190 */    48,   71,    3,    3,    3,   75,   76,    8,    8,    8,
 /*   200 */    74,   74,   76,   76,   73,   73,   73,   76,   76,   76,
 /*   210 */    73,   72,   72,   76,   71,   76,   76,   72,   72,   76,
 /*   220 */    71,   76,   76,   71,   71,   76,  131,   73,   76,   76,
 /*   230 */    76,   74,   74,   76,   76,   74,   73,   76,   73,   76,
 /*   240 */    72,   76,   72,   72,   76,   71,   76,   76,   71,   73,
 /*   250 */    76,   71,   76,   76,   72,   74,   76,   76,   76,   71,
 /*   260 */   131,  131,  127,    9,   76,  131,    3,    9,    3,  131,
 /*   270 */     9,    3,  131,    9,    3,  131,    3,    3,  131,  131,
 /*   280 */     3,  131,  131,  127,    9,  130,    3,    9,  126,  130,
 /*   290 */     3,    9,    3,    3,  130,   95,  130,  130,    3,  130,
 /*   300 */     9,  126,  130,  130,    3,   95,    9,    3,  130,  130,
 /*   310 */     3,    9,  125,  130,  130,  130,  130,    3,  126,    3,
 /*   320 */    90,   92,  129,  129,  129,  129,  129,  129,  129,  125,
 /*   330 */   129,  129,  129,  124,  129,  129,  129,  129,  125,  128,
 /*   340 */   128,  122,  128,  128,  128,  128,  128,  124,  128,  128,
 /*   350 */   128,  123,  128,  128,  128,  128,  124,  123,  119,  122,
 /*   360 */    94,   94,  118,  121,  121,   93,  117,  120,  120,   93,
 /*   370 */   115,   92,  116,  111,  115,   91,   91,    9,   90,    3,
 /*   380 */     3,   89,   89,  114,  114,    3,   88,    9,   88,   83,
 /*   390 */   110,   79,   83,    9,  113,   87,   76,   76,   76,  113,
 /*   400 */    76,    3,    9,  109,    3,   82,   78,   82,  112,    9,
 /*   410 */   107,  112,   86,  108,   76,   76,   76,    3,    9,  106,
 /*   420 */     3,   77,   81,   81,    9,   76,   76,   76,   85,    3,
 /*   430 */     9,    3,  105,   80,   75,   80,    9,   76,   84,   76,
 /*   440 */     3,  104,    9,   87,    3,    9,   86,  101,  103,  102,
 /*   450 */     3,  103,   95,    9,  102,   85,    3,    9,  100,   94,
 /*   460 */     3,   87,   90,  101,  100,   99,   99,   98,   93,   98,
 /*   470 */    97,   84,   87,   92,   86,   96,   86,   97,    4,   96,
 /*   480 */    91,   85,   85,   89,   76,    4,   84,   84,   76,   76,
 /*   490 */     4,    4,   88,    4,   76,   76,   76,    4,   76,   76,
 /*   500 */     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
 /*   510 */     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
 /*   520 */     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
 /*   530 */     4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
 /*   540 */     4,    4,    4,  132,  132,  132,    4,    4,    9,    9,
 /*   550 */     9,  132,  132,  132,    4,    4,    9,    9,    9,  132,
 /*   560 */   132,  132,    4,    4,    9,    9,    9,  132,  132,  132,
 /*   570 */     4,    4,    9,    9,    9,  132,    4,  132,    4,  132,
 /*   580 */     9,    4,    9,    1,    9,    4,    3,  132,    9,    4,
 /*   590 */     3,  132,  132,    4,    3,  132,  132,  132,    4,  132,
 /*   600 */   132,  132,    3,  132,  132,  132,  132,  132,  132,  132,
 /*   610 */   132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
 /*   620 */   132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
 /*   630 */   132,  132,  132,  132,  132,  132,  132,
};
#define YY_SHIFT_COUNT    (314)

#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (599)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */   603,   34,   61,   62,   64,   65,   93,   94,  100,  105,
 /*    10 */   125,  189,  190,  191,   92,   92,   92,   92,   92,   92,
 /*    20 */    92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
 /*    30 */    92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
 /*    40 */    92,   92,   92,   92,   92,   92,  102,  160,  102,  102,
 /*    50 */   102,  102,  102,  102,  160,  102,  102,  102,  102,  102,
 /*    60 */   102,  102,  160,  254,  263,  254,  254,  254,  254,  254,
 /*    70 */   254,  263,  254,  254,  254,  254,  254,  254,  254,  263,
 /*    80 */   258,  265,  258,  258,  258,  258,  258,  258,  265,  258,
 /*    90 */   258,  258,  258,  258,  258,  258,  265,  261,  268,  261,
 /*   100 */   261,  261,  261,  261,  261,  268,  261,  261,  261,  261,
 /*   110 */   261,  261,  261,  268,  264,  271,  264,  271,  273,  275,
 /*   120 */   274,  275,  274,  277,  278,  283,  278,  283,  287,  282,
 /*   130 */   289,  282,  289,  290,  291,  295,  291,  295,  301,  297,
 /*   140 */   304,  297,  304,  307,  302,  314,  302,  314,  316,  368,
 /*   150 */   376,  368,  376,  377,  378,  382,  378,  384,   92,   92,
 /*   160 */    92,   92,  398,  393,  401,  393,  400,   92,   92,   92,
 /*   170 */   414,  409,  417,  409,  415,   92,   92,   92,  426,  421,
 /*   180 */   428,  421,  427,   92,   92,  437,  433,  384,  441,  433,
 /*   190 */   441,  271,  436,  400,  447,  436,  447,  274,  444,  415,
 /*   200 */   453,  444,  453,  283,  448,  427,  457,  448,  457,  289,
 /*   210 */   384,  384,  295,  400,  400,  304,  415,  415,  314,  427,
 /*   220 */   427,  376,   92,   92,   92,   92,   92,   92,   92,   92,
 /*   230 */   474,  481,  486,  487,  489,  493,  496,  497,  498,  499,
 /*   240 */   500,  501,  502,  503,  504,  505,  506,  507,  508,  509,
 /*   250 */   510,  511,  512,  513,  514,  515,  516,  517,  518,  519,
 /*   260 */   520,  521,  522,  523,  524,  525,  526,  527,  528,  529,
 /*   270 */   530,  531,  532,  533,  534,  535,  536,  537,  538,  539,
 /*   280 */   540,  541,  542,  543,  547,  548,  549,  550,  551,  555,
 /*   290 */   556,  557,  558,  559,  563,  564,  565,  566,  567,  571,
 /*   300 */   572,  573,  574,  575,  577,  579,  581,  583,  585,  587,
 /*   310 */   589,  591,  594,  599,  582,
};

#define YY_REDUCE_COUNT (229)
#define YY_REDUCE_MIN   (-39)
#define YY_REDUCE_MAX   (423)
static const short yy_reduce_ofst[] = {
 /*     0 */    37,  -37,   72,   78,   98,  106,  108,  114,  136,  142,
 /*    10 */    27,   56,  -34,  120,  -39,   88,  126,  127,  131,  132,
 /*    20 */   133,  137,  139,  140,  145,  146,  143,  149,  152,  153,
 /*    30 */   157,  158,  161,  154,  163,  165,  168,  170,  171,  174,
 /*    40 */   177,  180,  181,  176,  182,  188,   23,   28,   46,   47,
 /*    50 */    95,  129,  130,  134,  135,  138,  141,  144,  147,  148,
 /*    60 */   150,  151,  156,  155,  162,  159,  164,  166,  167,  169,
 /*    70 */   172,  175,  173,  178,  179,  183,  184,  185,  186,  192,
 /*    80 */   193,  187,  194,  195,  196,  197,  198,  199,  204,  201,
 /*    90 */   202,  203,  205,  206,  207,  208,  213,  211,  209,  212,
 /*   100 */   214,  215,  216,  217,  218,  223,  220,  221,  222,  224,
 /*   110 */   225,  226,  227,  232,  228,  200,  234,  210,  239,  219,
 /*   120 */   266,  237,  267,  244,  242,  272,  243,  276,  249,  247,
 /*   130 */   229,  248,  279,  256,  255,  284,  259,  285,  262,  269,
 /*   140 */   230,  270,  288,  280,  281,  292,  286,  293,  294,  296,
 /*   150 */   298,  299,  300,  305,  306,  312,  309,  308,  320,  321,
 /*   160 */   322,  324,  303,  323,  328,  325,  326,  338,  339,  340,
 /*   170 */   313,  341,  344,  342,  343,  349,  350,  351,  327,  353,
 /*   180 */   359,  355,  354,  361,  363,  337,  345,  356,  347,  348,
 /*   190 */   352,  357,  346,  360,  358,  362,  364,  365,  366,  370,
 /*   200 */   369,  367,  371,  375,  373,  387,  379,  380,  383,  381,
 /*   210 */   374,  385,  389,  388,  390,  372,  396,  397,  394,  402,
 /*   220 */   403,  404,  408,  412,  413,  418,  419,  420,  422,  423,
};

static const YYACTIONTYPE yy_default[] = {
 /*     0 */   888,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*    10 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*    20 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*    30 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*    40 */   691,  691,  691,  691,  691,  691,  879,  691,  879,  879,
 /*    50 */   879,  879,  879,  879,  691,  879,  879,  879,  879,  879,
 /*    60 */   879,  879,  691,  864,  691,  864,  864,  864,  864,  864,
 /*    70 */   864,  691,  864,  864,  864,  864,  864,  864,  864,  691,
 /*    80 */   849,  691,  849,  849,  849,  849,  849,  849,  691,  849,
 /*    90 */   849,  849,  849,  849,  849,  849,  691,  834,  691,  834,
 /*   100 */   834,  834,  834,  834,  834,  691,  834,  834,  834,  834,
 /*   110 */   834,  834,  834,  691,  821,  691,  821,  691,  691,  818,
 /*   120 */   691,  818,  691,  691,  815,  691,  815,  691,  691,  812,
 /*   130 */   691,  812,  691,  691,  805,  691,  805,  691,  691,  802,
 /*   140 */   691,  802,  691,  691,  799,  691,  799,  691,  691,  796,
 /*   150 */   691,  796,  691,  691,  741,  691,  741,  749,  691,  691,
 /*   160 */   691,  691,  691,  739,  691,  739,  747,  691,  691,  691,
 /*   170 */   691,  737,  691,  737,  745,  691,  691,  691,  691,  735,
 /*   180 */   691,  735,  743,  691,  691,  691,  777,  749,  691,  777,
 /*   190 */   691,  691,  774,  747,  691,  774,  691,  691,  771,  745,
 /*   200 */   691,  771,  691,  691,  768,  743,  691,  768,  691,  691,
 /*   210 */   749,  749,  691,  747,  747,  691,  745,  745,  691,  743,
 /*   220 */   743,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   230 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   240 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   250 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   260 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   270 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   280 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   290 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   300 */   691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
 /*   310 */   691,  691,  691,  691,  691,


















};
/********** End of lemon-generated parsing tables *****************************/



/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */


  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */


#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */

#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  ParseARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/

void ParseTrace(FILE *TraceFILE, char *zTracePrompt){

  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;

  if( yyTraceFILE==0 ) yyTracePrompt = 0;

  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "VANUATU_NEWLINE",
  /*    2 */ "VANUATU_POINT",
  /*    3 */ "VANUATU_OPEN_BRACKET",
  /*    4 */ "VANUATU_CLOSE_BRACKET",
  /*    5 */ "VANUATU_POINT_M",
  /*    6 */ "VANUATU_POINT_Z",
  /*    7 */ "VANUATU_POINT_ZM",
  /*    8 */ "VANUATU_NUM",
  /*    9 */ "VANUATU_COMMA",
  /*   10 */ "VANUATU_LINESTRING",
  /*   11 */ "VANUATU_LINESTRING_M",
  /*   12 */ "VANUATU_LINESTRING_Z",
  /*   13 */ "VANUATU_LINESTRING_ZM",
  /*   14 */ "VANUATU_POLYGON",
  /*   15 */ "VANUATU_POLYGON_M",
  /*   16 */ "VANUATU_POLYGON_Z",
  /*   17 */ "VANUATU_POLYGON_ZM",
  /*   18 */ "VANUATU_MULTIPOINT",
  /*   19 */ "VANUATU_MULTIPOINT_M",
  /*   20 */ "VANUATU_MULTIPOINT_Z",
  /*   21 */ "VANUATU_MULTIPOINT_ZM",
  /*   22 */ "VANUATU_MULTILINESTRING",
  /*   23 */ "VANUATU_MULTILINESTRING_M",
  /*   24 */ "VANUATU_MULTILINESTRING_Z",
  /*   25 */ "VANUATU_MULTILINESTRING_ZM",
  /*   26 */ "VANUATU_MULTIPOLYGON",
  /*   27 */ "VANUATU_MULTIPOLYGON_M",
  /*   28 */ "VANUATU_MULTIPOLYGON_Z",
  /*   29 */ "VANUATU_MULTIPOLYGON_ZM",
  /*   30 */ "VANUATU_GEOMETRYCOLLECTION",
  /*   31 */ "VANUATU_GEOMETRYCOLLECTION_M",
  /*   32 */ "VANUATU_GEOMETRYCOLLECTION_Z",
  /*   33 */ "VANUATU_GEOMETRYCOLLECTION_ZM",
  /*   34 */ "error",
  /*   35 */ "main",
  /*   36 */ "in",
  /*   37 */ "state",
  /*   38 */ "program",
  /*   39 */ "geo_text",
  /*   40 */ "geo_textz",
  /*   41 */ "geo_textm",
  /*   42 */ "geo_textzm",
  /*   43 */ "point",
  /*   44 */ "linestring",
  /*   45 */ "polygon",
  /*   46 */ "multipoint",
  /*   47 */ "multilinestring",
  /*   48 */ "multipolygon",
  /*   49 */ "geocoll",
  /*   50 */ "pointz",
  /*   51 */ "linestringz",
  /*   52 */ "polygonz",
  /*   53 */ "multipointz",
  /*   54 */ "multilinestringz",
  /*   55 */ "multipolygonz",
  /*   56 */ "geocollz",
  /*   57 */ "pointm",
  /*   58 */ "linestringm",
  /*   59 */ "polygonm",
  /*   60 */ "multipointm",
  /*   61 */ "multilinestringm",
  /*   62 */ "multipolygonm",
  /*   63 */ "geocollm",
  /*   64 */ "pointzm",
  /*   65 */ "linestringzm",
  /*   66 */ "polygonzm",
  /*   67 */ "multipointzm",
  /*   68 */ "multilinestringzm",
  /*   69 */ "multipolygonzm",
  /*   70 */ "geocollzm",
  /*   71 */ "point_coordxy",
  /*   72 */ "point_coordxym",
  /*   73 */ "point_coordxyz",
  /*   74 */ "point_coordxyzm",
  /*   75 */ "point_brkt_coordxy",
  /*   76 */ "coord",
  /*   77 */ "point_brkt_coordxym",
  /*   78 */ "point_brkt_coordxyz",
  /*   79 */ "point_brkt_coordxyzm",
  /*   80 */ "extra_brkt_pointsxy",
  /*   81 */ "extra_brkt_pointsxym",
  /*   82 */ "extra_brkt_pointsxyz",
  /*   83 */ "extra_brkt_pointsxyzm",
  /*   84 */ "extra_pointsxy",
  /*   85 */ "extra_pointsxym",
  /*   86 */ "extra_pointsxyz",
  /*   87 */ "extra_pointsxyzm",
  /*   88 */ "linestring_text",
  /*   89 */ "linestring_textm",
  /*   90 */ "linestring_textz",
  /*   91 */ "linestring_textzm",
  /*   92 */ "polygon_text",
  /*   93 */ "polygon_textm",
  /*   94 */ "polygon_textz",
  /*   95 */ "polygon_textzm",
  /*   96 */ "ring",
  /*   97 */ "extra_rings",
  /*   98 */ "ringm",
  /*   99 */ "extra_ringsm",
  /*  100 */ "ringz",
  /*  101 */ "extra_ringsz",
  /*  102 */ "ringzm",
  /*  103 */ "extra_ringszm",
  /*  104 */ "multipoint_text",
  /*  105 */ "multipoint_textm",
  /*  106 */ "multipoint_textz",
  /*  107 */ "multipoint_textzm",
  /*  108 */ "multilinestring_text",
  /*  109 */ "multilinestring_textm",
  /*  110 */ "multilinestring_textz",
  /*  111 */ "multilinestring_textzm",
  /*  112 */ "multilinestring_text2",
  /*  113 */ "multilinestring_textm2",
  /*  114 */ "multilinestring_textz2",
  /*  115 */ "multilinestring_textzm2",
  /*  116 */ "multipolygon_text",
  /*  117 */ "multipolygon_textm",
  /*  118 */ "multipolygon_textz",
  /*  119 */ "multipolygon_textzm",
  /*  120 */ "multipolygon_text2",
  /*  121 */ "multipolygon_textm2",
  /*  122 */ "multipolygon_textz2",
  /*  123 */ "multipolygon_textzm2",
  /*  124 */ "geocoll_text",
  /*  125 */ "geocoll_textm",
  /*  126 */ "geocoll_textz",
  /*  127 */ "geocoll_textzm",
  /*  128 */ "geocoll_text2",
  /*  129 */ "geocoll_textm2",
  /*  130 */ "geocoll_textz2",
  /*  131 */ "geocoll_textzm2",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "geo_text ::= point",
 /*   1 */ "geo_text ::= linestring",
 /*   2 */ "geo_text ::= polygon",
 /*   3 */ "geo_text ::= multipoint",
 /*   4 */ "geo_text ::= multilinestring",
 /*   5 */ "geo_text ::= multipolygon",
 /*   6 */ "geo_text ::= geocoll",
 /*   7 */ "geo_textz ::= pointz",
 /*   8 */ "geo_textz ::= linestringz",
 /*   9 */ "geo_textz ::= polygonz",
 /*  10 */ "geo_textz ::= multipointz",
 /*  11 */ "geo_textz ::= multilinestringz",
 /*  12 */ "geo_textz ::= multipolygonz",
 /*  13 */ "geo_textz ::= geocollz",
 /*  14 */ "geo_textm ::= pointm",
 /*  15 */ "geo_textm ::= linestringm",
 /*  16 */ "geo_textm ::= polygonm",
 /*  17 */ "geo_textm ::= multipointm",
 /*  18 */ "geo_textm ::= multilinestringm",
 /*  19 */ "geo_textm ::= multipolygonm",
 /*  20 */ "geo_textm ::= geocollm",
 /*  21 */ "geo_textzm ::= pointzm",
 /*  22 */ "geo_textzm ::= linestringzm",
 /*  23 */ "geo_textzm ::= polygonzm",
 /*  24 */ "geo_textzm ::= multipointzm",
 /*  25 */ "geo_textzm ::= multilinestringzm",
 /*  26 */ "geo_textzm ::= multipolygonzm",
 /*  27 */ "geo_textzm ::= geocollzm",
 /*  28 */ "point ::= VANUATU_POINT VANUATU_OPEN_BRACKET point_coordxy VANUATU_CLOSE_BRACKET",
 /*  29 */ "pointm ::= VANUATU_POINT_M VANUATU_OPEN_BRACKET point_coordxym VANUATU_CLOSE_BRACKET",
 /*  30 */ "pointz ::= VANUATU_POINT_Z VANUATU_OPEN_BRACKET point_coordxyz VANUATU_CLOSE_BRACKET",
 /*  31 */ "pointzm ::= VANUATU_POINT_ZM VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_CLOSE_BRACKET",
 /*  32 */ "point_brkt_coordxy ::= VANUATU_OPEN_BRACKET coord coord VANUATU_CLOSE_BRACKET",
 /*  33 */ "point_brkt_coordxym ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET",
 /*  34 */ "point_brkt_coordxyz ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET",
 /*  35 */ "point_brkt_coordxyzm ::= VANUATU_OPEN_BRACKET coord coord coord coord VANUATU_CLOSE_BRACKET",
 /*  36 */ "point_coordxy ::= coord coord",
 /*  37 */ "point_coordxym ::= coord coord coord",
 /*  38 */ "point_coordxyz ::= coord coord coord",
 /*  39 */ "point_coordxyzm ::= coord coord coord coord",
 /*  40 */ "coord ::= VANUATU_NUM",
 /*  41 */ "extra_brkt_pointsxy ::=",
 /*  42 */ "extra_brkt_pointsxy ::= VANUATU_COMMA point_brkt_coordxy extra_brkt_pointsxy",
 /*  43 */ "extra_brkt_pointsxym ::=",
 /*  44 */ "extra_brkt_pointsxym ::= VANUATU_COMMA point_brkt_coordxym extra_brkt_pointsxym",
 /*  45 */ "extra_brkt_pointsxyz ::=",
 /*  46 */ "extra_brkt_pointsxyz ::= VANUATU_COMMA point_brkt_coordxyz extra_brkt_pointsxyz",
 /*  47 */ "extra_brkt_pointsxyzm ::=",
 /*  48 */ "extra_brkt_pointsxyzm ::= VANUATU_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm",
 /*  49 */ "extra_pointsxy ::=",
 /*  50 */ "extra_pointsxy ::= VANUATU_COMMA point_coordxy extra_pointsxy",
 /*  51 */ "extra_pointsxym ::=",
 /*  52 */ "extra_pointsxym ::= VANUATU_COMMA point_coordxym extra_pointsxym",
 /*  53 */ "extra_pointsxyz ::=",
 /*  54 */ "extra_pointsxyz ::= VANUATU_COMMA point_coordxyz extra_pointsxyz",
 /*  55 */ "extra_pointsxyzm ::=",
 /*  56 */ "extra_pointsxyzm ::= VANUATU_COMMA point_coordxyzm extra_pointsxyzm",
 /*  57 */ "linestring ::= VANUATU_LINESTRING linestring_text",
 /*  58 */ "linestringm ::= VANUATU_LINESTRING_M linestring_textm",
 /*  59 */ "linestringz ::= VANUATU_LINESTRING_Z linestring_textz",
 /*  60 */ "linestringzm ::= VANUATU_LINESTRING_ZM linestring_textzm",
 /*  61 */ "linestring_text ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET",
 /*  62 */ "linestring_textm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET",
 /*  63 */ "linestring_textz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET",
 /*  64 */ "linestring_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET",
 /*  65 */ "polygon ::= VANUATU_POLYGON polygon_text",
 /*  66 */ "polygonm ::= VANUATU_POLYGON_M polygon_textm",
 /*  67 */ "polygonz ::= VANUATU_POLYGON_Z polygon_textz",
 /*  68 */ "polygonzm ::= VANUATU_POLYGON_ZM polygon_textzm",
 /*  69 */ "polygon_text ::= VANUATU_OPEN_BRACKET ring extra_rings VANUATU_CLOSE_BRACKET",
 /*  70 */ "polygon_textm ::= VANUATU_OPEN_BRACKET ringm extra_ringsm VANUATU_CLOSE_BRACKET",
 /*  71 */ "polygon_textz ::= VANUATU_OPEN_BRACKET ringz extra_ringsz VANUATU_CLOSE_BRACKET",
 /*  72 */ "polygon_textzm ::= VANUATU_OPEN_BRACKET ringzm extra_ringszm VANUATU_CLOSE_BRACKET",
 /*  73 */ "ring ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET",
 /*  74 */ "extra_rings ::=",
 /*  75 */ "extra_rings ::= VANUATU_COMMA ring extra_rings",
 /*  76 */ "ringm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET",
 /*  77 */ "extra_ringsm ::=",
 /*  78 */ "extra_ringsm ::= VANUATU_COMMA ringm extra_ringsm",
 /*  79 */ "ringz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET",
 /*  80 */ "extra_ringsz ::=",
 /*  81 */ "extra_ringsz ::= VANUATU_COMMA ringz extra_ringsz",
 /*  82 */ "ringzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET",
 /*  83 */ "extra_ringszm ::=",
 /*  84 */ "extra_ringszm ::= VANUATU_COMMA ringzm extra_ringszm",
 /*  85 */ "multipoint ::= VANUATU_MULTIPOINT multipoint_text",
 /*  86 */ "multipointm ::= VANUATU_MULTIPOINT_M multipoint_textm",
 /*  87 */ "multipointz ::= VANUATU_MULTIPOINT_Z multipoint_textz",
 /*  88 */ "multipointzm ::= VANUATU_MULTIPOINT_ZM multipoint_textzm",
 /*  89 */ "multipoint_text ::= VANUATU_OPEN_BRACKET point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET",
 /*  90 */ "multipoint_textm ::= VANUATU_OPEN_BRACKET point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET",
 /*  91 */ "multipoint_textz ::= VANUATU_OPEN_BRACKET point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET",
 /*  92 */ "multipoint_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET",
 /*  93 */ "multipoint_text ::= VANUATU_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy VANUATU_CLOSE_BRACKET",
 /*  94 */ "multipoint_textm ::= VANUATU_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym VANUATU_CLOSE_BRACKET",
 /*  95 */ "multipoint_textz ::= VANUATU_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz VANUATU_CLOSE_BRACKET",
 /*  96 */ "multipoint_textzm ::= VANUATU_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm VANUATU_CLOSE_BRACKET",
 /*  97 */ "multilinestring ::= VANUATU_MULTILINESTRING multilinestring_text",
 /*  98 */ "multilinestringm ::= VANUATU_MULTILINESTRING_M multilinestring_textm",
 /*  99 */ "multilinestringz ::= VANUATU_MULTILINESTRING_Z multilinestring_textz",
 /* 100 */ "multilinestringzm ::= VANUATU_MULTILINESTRING_ZM multilinestring_textzm",
 /* 101 */ "multilinestring_text ::= VANUATU_OPEN_BRACKET linestring_text multilinestring_text2 VANUATU_CLOSE_BRACKET",
 /* 102 */ "multilinestring_text2 ::=",
 /* 103 */ "multilinestring_text2 ::= VANUATU_COMMA linestring_text multilinestring_text2",
 /* 104 */ "multilinestring_textm ::= VANUATU_OPEN_BRACKET linestring_textm multilinestring_textm2 VANUATU_CLOSE_BRACKET",
 /* 105 */ "multilinestring_textm2 ::=",
 /* 106 */ "multilinestring_textm2 ::= VANUATU_COMMA linestring_textm multilinestring_textm2",
 /* 107 */ "multilinestring_textz ::= VANUATU_OPEN_BRACKET linestring_textz multilinestring_textz2 VANUATU_CLOSE_BRACKET",
 /* 108 */ "multilinestring_textz2 ::=",
 /* 109 */ "multilinestring_textz2 ::= VANUATU_COMMA linestring_textz multilinestring_textz2",
 /* 110 */ "multilinestring_textzm ::= VANUATU_OPEN_BRACKET linestring_textzm multilinestring_textzm2 VANUATU_CLOSE_BRACKET",
 /* 111 */ "multilinestring_textzm2 ::=",
 /* 112 */ "multilinestring_textzm2 ::= VANUATU_COMMA linestring_textzm multilinestring_textzm2",
 /* 113 */ "multipolygon ::= VANUATU_MULTIPOLYGON multipolygon_text",
 /* 114 */ "multipolygonm ::= VANUATU_MULTIPOLYGON_M multipolygon_textm",
 /* 115 */ "multipolygonz ::= VANUATU_MULTIPOLYGON_Z multipolygon_textz",
 /* 116 */ "multipolygonzm ::= VANUATU_MULTIPOLYGON_ZM multipolygon_textzm",
 /* 117 */ "multipolygon_text ::= VANUATU_OPEN_BRACKET polygon_text multipolygon_text2 VANUATU_CLOSE_BRACKET",
 /* 118 */ "multipolygon_text2 ::=",
 /* 119 */ "multipolygon_text2 ::= VANUATU_COMMA polygon_text multipolygon_text2",
 /* 120 */ "multipolygon_textm ::= VANUATU_OPEN_BRACKET polygon_textm multipolygon_textm2 VANUATU_CLOSE_BRACKET",
 /* 121 */ "multipolygon_textm2 ::=",
 /* 122 */ "multipolygon_textm2 ::= VANUATU_COMMA polygon_textm multipolygon_textm2",
 /* 123 */ "multipolygon_textz ::= VANUATU_OPEN_BRACKET polygon_textz multipolygon_textz2 VANUATU_CLOSE_BRACKET",
 /* 124 */ "multipolygon_textz2 ::=",
 /* 125 */ "multipolygon_textz2 ::= VANUATU_COMMA polygon_textz multipolygon_textz2",
 /* 126 */ "multipolygon_textzm ::= VANUATU_OPEN_BRACKET polygon_textzm multipolygon_textzm2 VANUATU_CLOSE_BRACKET",
 /* 127 */ "multipolygon_textzm2 ::=",
 /* 128 */ "multipolygon_textzm2 ::= VANUATU_COMMA polygon_textzm multipolygon_textzm2",
 /* 129 */ "geocoll ::= VANUATU_GEOMETRYCOLLECTION geocoll_text",
 /* 130 */ "geocollm ::= VANUATU_GEOMETRYCOLLECTION_M geocoll_textm",
 /* 131 */ "geocollz ::= VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz",
 /* 132 */ "geocollzm ::= VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm",
 /* 133 */ "geocoll_text ::= VANUATU_OPEN_BRACKET point geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 134 */ "geocoll_text ::= VANUATU_OPEN_BRACKET linestring geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 135 */ "geocoll_text ::= VANUATU_OPEN_BRACKET polygon geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 136 */ "geocoll_text ::= VANUATU_OPEN_BRACKET multipoint geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 137 */ "geocoll_text ::= VANUATU_OPEN_BRACKET multilinestring geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 138 */ "geocoll_text ::= VANUATU_OPEN_BRACKET multipolygon geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 139 */ "geocoll_text ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 VANUATU_CLOSE_BRACKET",
 /* 140 */ "geocoll_text2 ::=",
 /* 141 */ "geocoll_text2 ::= VANUATU_COMMA point geocoll_text2",
 /* 142 */ "geocoll_text2 ::= VANUATU_COMMA linestring geocoll_text2",
 /* 143 */ "geocoll_text2 ::= VANUATU_COMMA polygon geocoll_text2",
 /* 144 */ "geocoll_text2 ::= VANUATU_COMMA multipoint geocoll_text2",
 /* 145 */ "geocoll_text2 ::= VANUATU_COMMA multilinestring geocoll_text2",
 /* 146 */ "geocoll_text2 ::= VANUATU_COMMA multipolygon geocoll_text2",
 /* 147 */ "geocoll_text2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2",
 /* 148 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET pointm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 149 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET linestringm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 150 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET polygonm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 151 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET multipointm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 152 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET multilinestringm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 153 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET multipolygonm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 154 */ "geocoll_textm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 VANUATU_CLOSE_BRACKET",
 /* 155 */ "geocoll_textm2 ::=",
 /* 156 */ "geocoll_textm2 ::= VANUATU_COMMA pointm geocoll_textm2",
 /* 157 */ "geocoll_textm2 ::= VANUATU_COMMA linestringm geocoll_textm2",
 /* 158 */ "geocoll_textm2 ::= VANUATU_COMMA polygonm geocoll_textm2",
 /* 159 */ "geocoll_textm2 ::= VANUATU_COMMA multipointm geocoll_textm2",
 /* 160 */ "geocoll_textm2 ::= VANUATU_COMMA multilinestringm geocoll_textm2",
 /* 161 */ "geocoll_textm2 ::= VANUATU_COMMA multipolygonm geocoll_textm2",
 /* 162 */ "geocoll_textm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2",
 /* 163 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET pointz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 164 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET linestringz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 165 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET polygonz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 166 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET multipointz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 167 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET multilinestringz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 168 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET multipolygonz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 169 */ "geocoll_textz ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 VANUATU_CLOSE_BRACKET",
 /* 170 */ "geocoll_textz2 ::=",
 /* 171 */ "geocoll_textz2 ::= VANUATU_COMMA pointz geocoll_textz2",
 /* 172 */ "geocoll_textz2 ::= VANUATU_COMMA linestringz geocoll_textz2",
 /* 173 */ "geocoll_textz2 ::= VANUATU_COMMA polygonz geocoll_textz2",
 /* 174 */ "geocoll_textz2 ::= VANUATU_COMMA multipointz geocoll_textz2",
 /* 175 */ "geocoll_textz2 ::= VANUATU_COMMA multilinestringz geocoll_textz2",
 /* 176 */ "geocoll_textz2 ::= VANUATU_COMMA multipolygonz geocoll_textz2",
 /* 177 */ "geocoll_textz2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2",
 /* 178 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET pointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 179 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET linestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 180 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET polygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 181 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET multipointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 182 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET multilinestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 183 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET multipolygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 184 */ "geocoll_textzm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
 /* 185 */ "geocoll_textzm2 ::=",
 /* 186 */ "geocoll_textzm2 ::= VANUATU_COMMA pointzm geocoll_textzm2",
 /* 187 */ "geocoll_textzm2 ::= VANUATU_COMMA linestringzm geocoll_textzm2",
 /* 188 */ "geocoll_textzm2 ::= VANUATU_COMMA polygonzm geocoll_textzm2",
 /* 189 */ "geocoll_textzm2 ::= VANUATU_COMMA multipointzm geocoll_textzm2",
 /* 190 */ "geocoll_textzm2 ::= VANUATU_COMMA multilinestringzm geocoll_textzm2",
 /* 191 */ "geocoll_textzm2 ::= VANUATU_COMMA multipolygonzm geocoll_textzm2",
 /* 192 */ "geocoll_textzm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2",
 /* 193 */ "main ::= in",
 /* 194 */ "in ::=",
 /* 195 */ "in ::= in state VANUATU_NEWLINE",
 /* 196 */ "state ::= program",
 /* 197 */ "program ::= geo_text",
 /* 198 */ "program ::= geo_textz",
 /* 199 */ "program ::= geo_textm",
 /* 200 */ "program ::= geo_textzm",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to ParseAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
static void ParseInit(void *yypParser){
  yyParser *pParser = (yyParser*)yypParser;
#ifdef YYTRACKMAXSTACKDEPTH
  pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  pParser->yytos = NULL;
  pParser->yystack = NULL;
  pParser->yystksz = 0;
  if( yyGrowStack(pParser) ){
    pParser->yystack = &pParser->yystk0;
    pParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  pParser->yyerrcnt = -1;
#endif
  pParser->yytos = pParser->yystack;
  pParser->yystack[0].stateno = 0;
  pParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ) ParseInit(pParser);
  return pParser;
}
#endif /* Parse_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  ParseARG_FETCH;
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
static void ParseFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef Parse_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void ParseFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  ParseFinalize(p);
  (*freeProc)(p);
}
#endif /* Parse_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int ParseCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i+YYNTOKEN<=(int)sizeof(yy_lookahead)/sizeof(yy_lookahead[0]) );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.




*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){


  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){


    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );

#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );


  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){


    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );

  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){


   ParseARG_FETCH;

#ifndef NDEBUG
   if( yyTraceFILE ){

     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);


   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/

     spatialite_e( "Giving up.  Parser stack overflow\n");
/******** End %stack_overflow code ********************************************/
   ParseARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;       /* Symbol on the left-hand side of the rule */
  signed char nrhs;     /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = {
  {   39,   -1 }, /* (0) geo_text ::= point */
  {   39,   -1 }, /* (1) geo_text ::= linestring */
  {   39,   -1 }, /* (2) geo_text ::= polygon */
  {   39,   -1 }, /* (3) geo_text ::= multipoint */
  {   39,   -1 }, /* (4) geo_text ::= multilinestring */
  {   39,   -1 }, /* (5) geo_text ::= multipolygon */
  {   39,   -1 }, /* (6) geo_text ::= geocoll */
  {   40,   -1 }, /* (7) geo_textz ::= pointz */
  {   40,   -1 }, /* (8) geo_textz ::= linestringz */
  {   40,   -1 }, /* (9) geo_textz ::= polygonz */
  {   40,   -1 }, /* (10) geo_textz ::= multipointz */
  {   40,   -1 }, /* (11) geo_textz ::= multilinestringz */
  {   40,   -1 }, /* (12) geo_textz ::= multipolygonz */
  {   40,   -1 }, /* (13) geo_textz ::= geocollz */
  {   41,   -1 }, /* (14) geo_textm ::= pointm */
  {   41,   -1 }, /* (15) geo_textm ::= linestringm */
  {   41,   -1 }, /* (16) geo_textm ::= polygonm */
  {   41,   -1 }, /* (17) geo_textm ::= multipointm */
  {   41,   -1 }, /* (18) geo_textm ::= multilinestringm */
  {   41,   -1 }, /* (19) geo_textm ::= multipolygonm */
  {   41,   -1 }, /* (20) geo_textm ::= geocollm */
  {   42,   -1 }, /* (21) geo_textzm ::= pointzm */
  {   42,   -1 }, /* (22) geo_textzm ::= linestringzm */
  {   42,   -1 }, /* (23) geo_textzm ::= polygonzm */
  {   42,   -1 }, /* (24) geo_textzm ::= multipointzm */
  {   42,   -1 }, /* (25) geo_textzm ::= multilinestringzm */
  {   42,   -1 }, /* (26) geo_textzm ::= multipolygonzm */
  {   42,   -1 }, /* (27) geo_textzm ::= geocollzm */
  {   43,   -4 }, /* (28) point ::= VANUATU_POINT VANUATU_OPEN_BRACKET point_coordxy VANUATU_CLOSE_BRACKET */
  {   57,   -4 }, /* (29) pointm ::= VANUATU_POINT_M VANUATU_OPEN_BRACKET point_coordxym VANUATU_CLOSE_BRACKET */
  {   50,   -4 }, /* (30) pointz ::= VANUATU_POINT_Z VANUATU_OPEN_BRACKET point_coordxyz VANUATU_CLOSE_BRACKET */
  {   64,   -4 }, /* (31) pointzm ::= VANUATU_POINT_ZM VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_CLOSE_BRACKET */
  {   75,   -4 }, /* (32) point_brkt_coordxy ::= VANUATU_OPEN_BRACKET coord coord VANUATU_CLOSE_BRACKET */
  {   77,   -5 }, /* (33) point_brkt_coordxym ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET */
  {   78,   -5 }, /* (34) point_brkt_coordxyz ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET */
  {   79,   -6 }, /* (35) point_brkt_coordxyzm ::= VANUATU_OPEN_BRACKET coord coord coord coord VANUATU_CLOSE_BRACKET */
  {   71,   -2 }, /* (36) point_coordxy ::= coord coord */
  {   72,   -3 }, /* (37) point_coordxym ::= coord coord coord */
  {   73,   -3 }, /* (38) point_coordxyz ::= coord coord coord */
  {   74,   -4 }, /* (39) point_coordxyzm ::= coord coord coord coord */
  {   76,   -1 }, /* (40) coord ::= VANUATU_NUM */
  {   80,    0 }, /* (41) extra_brkt_pointsxy ::= */
  {   80,   -3 }, /* (42) extra_brkt_pointsxy ::= VANUATU_COMMA point_brkt_coordxy extra_brkt_pointsxy */
  {   81,    0 }, /* (43) extra_brkt_pointsxym ::= */
  {   81,   -3 }, /* (44) extra_brkt_pointsxym ::= VANUATU_COMMA point_brkt_coordxym extra_brkt_pointsxym */
  {   82,    0 }, /* (45) extra_brkt_pointsxyz ::= */
  {   82,   -3 }, /* (46) extra_brkt_pointsxyz ::= VANUATU_COMMA point_brkt_coordxyz extra_brkt_pointsxyz */
  {   83,    0 }, /* (47) extra_brkt_pointsxyzm ::= */
  {   83,   -3 }, /* (48) extra_brkt_pointsxyzm ::= VANUATU_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm */
  {   84,    0 }, /* (49) extra_pointsxy ::= */
  {   84,   -3 }, /* (50) extra_pointsxy ::= VANUATU_COMMA point_coordxy extra_pointsxy */
  {   85,    0 }, /* (51) extra_pointsxym ::= */
  {   85,   -3 }, /* (52) extra_pointsxym ::= VANUATU_COMMA point_coordxym extra_pointsxym */
  {   86,    0 }, /* (53) extra_pointsxyz ::= */
  {   86,   -3 }, /* (54) extra_pointsxyz ::= VANUATU_COMMA point_coordxyz extra_pointsxyz */
  {   87,    0 }, /* (55) extra_pointsxyzm ::= */
  {   87,   -3 }, /* (56) extra_pointsxyzm ::= VANUATU_COMMA point_coordxyzm extra_pointsxyzm */
  {   44,   -2 }, /* (57) linestring ::= VANUATU_LINESTRING linestring_text */
  {   58,   -2 }, /* (58) linestringm ::= VANUATU_LINESTRING_M linestring_textm */
  {   51,   -2 }, /* (59) linestringz ::= VANUATU_LINESTRING_Z linestring_textz */
  {   65,   -2 }, /* (60) linestringzm ::= VANUATU_LINESTRING_ZM linestring_textzm */
  {   88,   -6 }, /* (61) linestring_text ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
  {   89,   -6 }, /* (62) linestring_textm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
  {   90,   -6 }, /* (63) linestring_textz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
  {   91,   -6 }, /* (64) linestring_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
  {   45,   -2 }, /* (65) polygon ::= VANUATU_POLYGON polygon_text */
  {   59,   -2 }, /* (66) polygonm ::= VANUATU_POLYGON_M polygon_textm */
  {   52,   -2 }, /* (67) polygonz ::= VANUATU_POLYGON_Z polygon_textz */
  {   66,   -2 }, /* (68) polygonzm ::= VANUATU_POLYGON_ZM polygon_textzm */
  {   92,   -4 }, /* (69) polygon_text ::= VANUATU_OPEN_BRACKET ring extra_rings VANUATU_CLOSE_BRACKET */
  {   93,   -4 }, /* (70) polygon_textm ::= VANUATU_OPEN_BRACKET ringm extra_ringsm VANUATU_CLOSE_BRACKET */
  {   94,   -4 }, /* (71) polygon_textz ::= VANUATU_OPEN_BRACKET ringz extra_ringsz VANUATU_CLOSE_BRACKET */
  {   95,   -4 }, /* (72) polygon_textzm ::= VANUATU_OPEN_BRACKET ringzm extra_ringszm VANUATU_CLOSE_BRACKET */
  {   96,  -10 }, /* (73) ring ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
  {   97,    0 }, /* (74) extra_rings ::= */
  {   97,   -3 }, /* (75) extra_rings ::= VANUATU_COMMA ring extra_rings */
  {   98,  -10 }, /* (76) ringm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
  {   99,    0 }, /* (77) extra_ringsm ::= */
  {   99,   -3 }, /* (78) extra_ringsm ::= VANUATU_COMMA ringm extra_ringsm */
  {  100,  -10 }, /* (79) ringz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
  {  101,    0 }, /* (80) extra_ringsz ::= */
  {  101,   -3 }, /* (81) extra_ringsz ::= VANUATU_COMMA ringz extra_ringsz */
  {  102,  -10 }, /* (82) ringzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
  {  103,    0 }, /* (83) extra_ringszm ::= */
  {  103,   -3 }, /* (84) extra_ringszm ::= VANUATU_COMMA ringzm extra_ringszm */
  {   46,   -2 }, /* (85) multipoint ::= VANUATU_MULTIPOINT multipoint_text */
  {   60,   -2 }, /* (86) multipointm ::= VANUATU_MULTIPOINT_M multipoint_textm */
  {   53,   -2 }, /* (87) multipointz ::= VANUATU_MULTIPOINT_Z multipoint_textz */
  {   67,   -2 }, /* (88) multipointzm ::= VANUATU_MULTIPOINT_ZM multipoint_textzm */
  {  104,   -4 }, /* (89) multipoint_text ::= VANUATU_OPEN_BRACKET point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
  {  105,   -4 }, /* (90) multipoint_textm ::= VANUATU_OPEN_BRACKET point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
  {  106,   -4 }, /* (91) multipoint_textz ::= VANUATU_OPEN_BRACKET point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
  {  107,   -4 }, /* (92) multipoint_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
  {  104,   -4 }, /* (93) multipoint_text ::= VANUATU_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy VANUATU_CLOSE_BRACKET */
  {  105,   -4 }, /* (94) multipoint_textm ::= VANUATU_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym VANUATU_CLOSE_BRACKET */
  {  106,   -4 }, /* (95) multipoint_textz ::= VANUATU_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz VANUATU_CLOSE_BRACKET */
  {  107,   -4 }, /* (96) multipoint_textzm ::= VANUATU_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm VANUATU_CLOSE_BRACKET */
  {   47,   -2 }, /* (97) multilinestring ::= VANUATU_MULTILINESTRING multilinestring_text */
  {   61,   -2 }, /* (98) multilinestringm ::= VANUATU_MULTILINESTRING_M multilinestring_textm */
  {   54,   -2 }, /* (99) multilinestringz ::= VANUATU_MULTILINESTRING_Z multilinestring_textz */
  {   68,   -2 }, /* (100) multilinestringzm ::= VANUATU_MULTILINESTRING_ZM multilinestring_textzm */
  {  108,   -4 }, /* (101) multilinestring_text ::= VANUATU_OPEN_BRACKET linestring_text multilinestring_text2 VANUATU_CLOSE_BRACKET */
  {  112,    0 }, /* (102) multilinestring_text2 ::= */
  {  112,   -3 }, /* (103) multilinestring_text2 ::= VANUATU_COMMA linestring_text multilinestring_text2 */
  {  109,   -4 }, /* (104) multilinestring_textm ::= VANUATU_OPEN_BRACKET linestring_textm multilinestring_textm2 VANUATU_CLOSE_BRACKET */
  {  113,    0 }, /* (105) multilinestring_textm2 ::= */
  {  113,   -3 }, /* (106) multilinestring_textm2 ::= VANUATU_COMMA linestring_textm multilinestring_textm2 */
  {  110,   -4 }, /* (107) multilinestring_textz ::= VANUATU_OPEN_BRACKET linestring_textz multilinestring_textz2 VANUATU_CLOSE_BRACKET */
  {  114,    0 }, /* (108) multilinestring_textz2 ::= */
  {  114,   -3 }, /* (109) multilinestring_textz2 ::= VANUATU_COMMA linestring_textz multilinestring_textz2 */
  {  111,   -4 }, /* (110) multilinestring_textzm ::= VANUATU_OPEN_BRACKET linestring_textzm multilinestring_textzm2 VANUATU_CLOSE_BRACKET */
  {  115,    0 }, /* (111) multilinestring_textzm2 ::= */
  {  115,   -3 }, /* (112) multilinestring_textzm2 ::= VANUATU_COMMA linestring_textzm multilinestring_textzm2 */
  {   48,   -2 }, /* (113) multipolygon ::= VANUATU_MULTIPOLYGON multipolygon_text */
  {   62,   -2 }, /* (114) multipolygonm ::= VANUATU_MULTIPOLYGON_M multipolygon_textm */
  {   55,   -2 }, /* (115) multipolygonz ::= VANUATU_MULTIPOLYGON_Z multipolygon_textz */
  {   69,   -2 }, /* (116) multipolygonzm ::= VANUATU_MULTIPOLYGON_ZM multipolygon_textzm */
  {  116,   -4 }, /* (117) multipolygon_text ::= VANUATU_OPEN_BRACKET polygon_text multipolygon_text2 VANUATU_CLOSE_BRACKET */
  {  120,    0 }, /* (118) multipolygon_text2 ::= */
  {  120,   -3 }, /* (119) multipolygon_text2 ::= VANUATU_COMMA polygon_text multipolygon_text2 */
  {  117,   -4 }, /* (120) multipolygon_textm ::= VANUATU_OPEN_BRACKET polygon_textm multipolygon_textm2 VANUATU_CLOSE_BRACKET */
  {  121,    0 }, /* (121) multipolygon_textm2 ::= */
  {  121,   -3 }, /* (122) multipolygon_textm2 ::= VANUATU_COMMA polygon_textm multipolygon_textm2 */
  {  118,   -4 }, /* (123) multipolygon_textz ::= VANUATU_OPEN_BRACKET polygon_textz multipolygon_textz2 VANUATU_CLOSE_BRACKET */
  {  122,    0 }, /* (124) multipolygon_textz2 ::= */
  {  122,   -3 }, /* (125) multipolygon_textz2 ::= VANUATU_COMMA polygon_textz multipolygon_textz2 */
  {  119,   -4 }, /* (126) multipolygon_textzm ::= VANUATU_OPEN_BRACKET polygon_textzm multipolygon_textzm2 VANUATU_CLOSE_BRACKET */
  {  123,    0 }, /* (127) multipolygon_textzm2 ::= */
  {  123,   -3 }, /* (128) multipolygon_textzm2 ::= VANUATU_COMMA polygon_textzm multipolygon_textzm2 */
  {   49,   -2 }, /* (129) geocoll ::= VANUATU_GEOMETRYCOLLECTION geocoll_text */
  {   63,   -2 }, /* (130) geocollm ::= VANUATU_GEOMETRYCOLLECTION_M geocoll_textm */
  {   56,   -2 }, /* (131) geocollz ::= VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz */
  {   70,   -2 }, /* (132) geocollzm ::= VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm */
  {  124,   -4 }, /* (133) geocoll_text ::= VANUATU_OPEN_BRACKET point geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  124,   -4 }, /* (134) geocoll_text ::= VANUATU_OPEN_BRACKET linestring geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  124,   -4 }, /* (135) geocoll_text ::= VANUATU_OPEN_BRACKET polygon geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  124,   -4 }, /* (136) geocoll_text ::= VANUATU_OPEN_BRACKET multipoint geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  124,   -4 }, /* (137) geocoll_text ::= VANUATU_OPEN_BRACKET multilinestring geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  124,   -4 }, /* (138) geocoll_text ::= VANUATU_OPEN_BRACKET multipolygon geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  124,   -5 }, /* (139) geocoll_text ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 VANUATU_CLOSE_BRACKET */
  {  128,    0 }, /* (140) geocoll_text2 ::= */
  {  128,   -3 }, /* (141) geocoll_text2 ::= VANUATU_COMMA point geocoll_text2 */
  {  128,   -3 }, /* (142) geocoll_text2 ::= VANUATU_COMMA linestring geocoll_text2 */
  {  128,   -3 }, /* (143) geocoll_text2 ::= VANUATU_COMMA polygon geocoll_text2 */
  {  128,   -3 }, /* (144) geocoll_text2 ::= VANUATU_COMMA multipoint geocoll_text2 */
  {  128,   -3 }, /* (145) geocoll_text2 ::= VANUATU_COMMA multilinestring geocoll_text2 */
  {  128,   -3 }, /* (146) geocoll_text2 ::= VANUATU_COMMA multipolygon geocoll_text2 */
  {  128,   -4 }, /* (147) geocoll_text2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 */
  {  125,   -4 }, /* (148) geocoll_textm ::= VANUATU_OPEN_BRACKET pointm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  125,   -4 }, /* (149) geocoll_textm ::= VANUATU_OPEN_BRACKET linestringm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  125,   -4 }, /* (150) geocoll_textm ::= VANUATU_OPEN_BRACKET polygonm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  125,   -4 }, /* (151) geocoll_textm ::= VANUATU_OPEN_BRACKET multipointm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  125,   -4 }, /* (152) geocoll_textm ::= VANUATU_OPEN_BRACKET multilinestringm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  125,   -4 }, /* (153) geocoll_textm ::= VANUATU_OPEN_BRACKET multipolygonm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  125,   -5 }, /* (154) geocoll_textm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 VANUATU_CLOSE_BRACKET */
  {  129,    0 }, /* (155) geocoll_textm2 ::= */
  {  129,   -3 }, /* (156) geocoll_textm2 ::= VANUATU_COMMA pointm geocoll_textm2 */
  {  129,   -3 }, /* (157) geocoll_textm2 ::= VANUATU_COMMA linestringm geocoll_textm2 */
  {  129,   -3 }, /* (158) geocoll_textm2 ::= VANUATU_COMMA polygonm geocoll_textm2 */
  {  129,   -3 }, /* (159) geocoll_textm2 ::= VANUATU_COMMA multipointm geocoll_textm2 */
  {  129,   -3 }, /* (160) geocoll_textm2 ::= VANUATU_COMMA multilinestringm geocoll_textm2 */
  {  129,   -3 }, /* (161) geocoll_textm2 ::= VANUATU_COMMA multipolygonm geocoll_textm2 */
  {  129,   -4 }, /* (162) geocoll_textm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 */
  {  126,   -4 }, /* (163) geocoll_textz ::= VANUATU_OPEN_BRACKET pointz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  126,   -4 }, /* (164) geocoll_textz ::= VANUATU_OPEN_BRACKET linestringz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  126,   -4 }, /* (165) geocoll_textz ::= VANUATU_OPEN_BRACKET polygonz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  126,   -4 }, /* (166) geocoll_textz ::= VANUATU_OPEN_BRACKET multipointz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  126,   -4 }, /* (167) geocoll_textz ::= VANUATU_OPEN_BRACKET multilinestringz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  126,   -4 }, /* (168) geocoll_textz ::= VANUATU_OPEN_BRACKET multipolygonz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  126,   -5 }, /* (169) geocoll_textz ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 VANUATU_CLOSE_BRACKET */
  {  130,    0 }, /* (170) geocoll_textz2 ::= */
  {  130,   -3 }, /* (171) geocoll_textz2 ::= VANUATU_COMMA pointz geocoll_textz2 */
  {  130,   -3 }, /* (172) geocoll_textz2 ::= VANUATU_COMMA linestringz geocoll_textz2 */
  {  130,   -3 }, /* (173) geocoll_textz2 ::= VANUATU_COMMA polygonz geocoll_textz2 */
  {  130,   -3 }, /* (174) geocoll_textz2 ::= VANUATU_COMMA multipointz geocoll_textz2 */
  {  130,   -3 }, /* (175) geocoll_textz2 ::= VANUATU_COMMA multilinestringz geocoll_textz2 */
  {  130,   -3 }, /* (176) geocoll_textz2 ::= VANUATU_COMMA multipolygonz geocoll_textz2 */
  {  130,   -4 }, /* (177) geocoll_textz2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 */
  {  127,   -4 }, /* (178) geocoll_textzm ::= VANUATU_OPEN_BRACKET pointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  127,   -4 }, /* (179) geocoll_textzm ::= VANUATU_OPEN_BRACKET linestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  127,   -4 }, /* (180) geocoll_textzm ::= VANUATU_OPEN_BRACKET polygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  127,   -4 }, /* (181) geocoll_textzm ::= VANUATU_OPEN_BRACKET multipointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  127,   -4 }, /* (182) geocoll_textzm ::= VANUATU_OPEN_BRACKET multilinestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  127,   -4 }, /* (183) geocoll_textzm ::= VANUATU_OPEN_BRACKET multipolygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  127,   -5 }, /* (184) geocoll_textzm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
  {  131,    0 }, /* (185) geocoll_textzm2 ::= */
  {  131,   -3 }, /* (186) geocoll_textzm2 ::= VANUATU_COMMA pointzm geocoll_textzm2 */
  {  131,   -3 }, /* (187) geocoll_textzm2 ::= VANUATU_COMMA linestringzm geocoll_textzm2 */
  {  131,   -3 }, /* (188) geocoll_textzm2 ::= VANUATU_COMMA polygonzm geocoll_textzm2 */
  {  131,   -3 }, /* (189) geocoll_textzm2 ::= VANUATU_COMMA multipointzm geocoll_textzm2 */
  {  131,   -3 }, /* (190) geocoll_textzm2 ::= VANUATU_COMMA multilinestringzm geocoll_textzm2 */
  {  131,   -3 }, /* (191) geocoll_textzm2 ::= VANUATU_COMMA multipolygonzm geocoll_textzm2 */
  {  131,   -4 }, /* (192) geocoll_textzm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 */
  {   35,   -1 }, /* (193) main ::= in */
  {   36,    0 }, /* (194) in ::= */
  {   36,   -3 }, /* (195) in ::= in state VANUATU_NEWLINE */
  {   37,   -1 }, /* (196) state ::= program */
  {   38,   -1 }, /* (197) program ::= geo_text */
  {   38,   -1 }, /* (198) program ::= geo_textz */
  {   38,   -1 }, /* (199) program ::= geo_textm */
  {   38,   -1 }, /* (200) program ::= geo_textzm */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  ParseARG_FETCH;
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* geo_text ::= point */
      case 1: /* geo_text ::= linestring */ yytestcase(yyruleno==1);
      case 2: /* geo_text ::= polygon */ yytestcase(yyruleno==2);
      case 3: /* geo_text ::= multipoint */ yytestcase(yyruleno==3);
      case 4: /* geo_text ::= multilinestring */ yytestcase(yyruleno==4);
      case 5: /* geo_text ::= multipolygon */ yytestcase(yyruleno==5);
      case 6: /* geo_text ::= geocoll */ yytestcase(yyruleno==6);
      case 7: /* geo_textz ::= pointz */ yytestcase(yyruleno==7);
      case 8: /* geo_textz ::= linestringz */ yytestcase(yyruleno==8);
      case 9: /* geo_textz ::= polygonz */ yytestcase(yyruleno==9);
      case 10: /* geo_textz ::= multipointz */ yytestcase(yyruleno==10);
      case 11: /* geo_textz ::= multilinestringz */ yytestcase(yyruleno==11);
      case 12: /* geo_textz ::= multipolygonz */ yytestcase(yyruleno==12);
      case 13: /* geo_textz ::= geocollz */ yytestcase(yyruleno==13);
      case 14: /* geo_textm ::= pointm */ yytestcase(yyruleno==14);
      case 15: /* geo_textm ::= linestringm */ yytestcase(yyruleno==15);
      case 16: /* geo_textm ::= polygonm */ yytestcase(yyruleno==16);
      case 17: /* geo_textm ::= multipointm */ yytestcase(yyruleno==17);
      case 18: /* geo_textm ::= multilinestringm */ yytestcase(yyruleno==18);
      case 19: /* geo_textm ::= multipolygonm */ yytestcase(yyruleno==19);
      case 20: /* geo_textm ::= geocollm */ yytestcase(yyruleno==20);
      case 21: /* geo_textzm ::= pointzm */ yytestcase(yyruleno==21);
      case 22: /* geo_textzm ::= linestringzm */ yytestcase(yyruleno==22);
      case 23: /* geo_textzm ::= polygonzm */ yytestcase(yyruleno==23);
      case 24: /* geo_textzm ::= multipointzm */ yytestcase(yyruleno==24);
      case 25: /* geo_textzm ::= multilinestringzm */ yytestcase(yyruleno==25);
      case 26: /* geo_textzm ::= multipolygonzm */ yytestcase(yyruleno==26);
      case 27: /* geo_textzm ::= geocollzm */ yytestcase(yyruleno==27);
{ p_data->result = yymsp[0].minor.yy0; }
        break;
      case 28: /* point ::= VANUATU_POINT VANUATU_OPEN_BRACKET point_coordxy VANUATU_CLOSE_BRACKET */
{ yymsp[-3].minor.yy0 = vanuatu_buildGeomFromPoint( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0); }
        break;
      case 29: /* pointm ::= VANUATU_POINT_M VANUATU_OPEN_BRACKET point_coordxym VANUATU_CLOSE_BRACKET */
      case 30: /* pointz ::= VANUATU_POINT_Z VANUATU_OPEN_BRACKET point_coordxyz VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==30);
      case 31: /* pointzm ::= VANUATU_POINT_ZM VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==31);
{ yymsp[-3].minor.yy0 = vanuatu_buildGeomFromPoint( p_data, (gaiaPointPtr)yymsp[-1].minor.yy0);  }
        break;
      case 32: /* point_brkt_coordxy ::= VANUATU_OPEN_BRACKET coord coord VANUATU_CLOSE_BRACKET */
{ yymsp[-3].minor.yy0 = (void *) vanuatu_point_xy( p_data, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 33: /* point_brkt_coordxym ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET */
{ yymsp[-4].minor.yy0 = (void *) vanuatu_point_xym( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 34: /* point_brkt_coordxyz ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET */
{ yymsp[-4].minor.yy0 = (void *) vanuatu_point_xyz( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 35: /* point_brkt_coordxyzm ::= VANUATU_OPEN_BRACKET coord coord coord coord VANUATU_CLOSE_BRACKET */
{ yymsp[-5].minor.yy0 = (void *) vanuatu_point_xyzm( p_data, (double *)yymsp[-4].minor.yy0, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0); }
        break;
      case 36: /* point_coordxy ::= coord coord */
{ yylhsminor.yy0 = (void *) vanuatu_point_xy( p_data, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 37: /* point_coordxym ::= coord coord coord */
{ yylhsminor.yy0 = (void *) vanuatu_point_xym( p_data, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 38: /* point_coordxyz ::= coord coord coord */
{ yylhsminor.yy0 = (void *) vanuatu_point_xyz( p_data, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 39: /* point_coordxyzm ::= coord coord coord coord */
{ yylhsminor.yy0 = (void *) vanuatu_point_xyzm( p_data, (double *)yymsp[-3].minor.yy0, (double *)yymsp[-2].minor.yy0, (double *)yymsp[-1].minor.yy0, (double *)yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy0 = yylhsminor.yy0;
        break;
      case 40: /* coord ::= VANUATU_NUM */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 41: /* extra_brkt_pointsxy ::= */
      case 43: /* extra_brkt_pointsxym ::= */ yytestcase(yyruleno==43);
      case 45: /* extra_brkt_pointsxyz ::= */ yytestcase(yyruleno==45);
      case 47: /* extra_brkt_pointsxyzm ::= */ yytestcase(yyruleno==47);
      case 49: /* extra_pointsxy ::= */ yytestcase(yyruleno==49);
      case 51: /* extra_pointsxym ::= */ yytestcase(yyruleno==51);
      case 53: /* extra_pointsxyz ::= */ yytestcase(yyruleno==53);
      case 55: /* extra_pointsxyzm ::= */ yytestcase(yyruleno==55);
      case 74: /* extra_rings ::= */ yytestcase(yyruleno==74);
      case 77: /* extra_ringsm ::= */ yytestcase(yyruleno==77);
      case 80: /* extra_ringsz ::= */ yytestcase(yyruleno==80);
      case 83: /* extra_ringszm ::= */ yytestcase(yyruleno==83);
      case 102: /* multilinestring_text2 ::= */ yytestcase(yyruleno==102);
      case 105: /* multilinestring_textm2 ::= */ yytestcase(yyruleno==105);
      case 108: /* multilinestring_textz2 ::= */ yytestcase(yyruleno==108);
      case 111: /* multilinestring_textzm2 ::= */ yytestcase(yyruleno==111);
      case 118: /* multipolygon_text2 ::= */ yytestcase(yyruleno==118);
      case 121: /* multipolygon_textm2 ::= */ yytestcase(yyruleno==121);
      case 124: /* multipolygon_textz2 ::= */ yytestcase(yyruleno==124);
      case 127: /* multipolygon_textzm2 ::= */ yytestcase(yyruleno==127);
      case 140: /* geocoll_text2 ::= */ yytestcase(yyruleno==140);
      case 155: /* geocoll_textm2 ::= */ yytestcase(yyruleno==155);
      case 170: /* geocoll_textz2 ::= */ yytestcase(yyruleno==170);
      case 185: /* geocoll_textzm2 ::= */ yytestcase(yyruleno==185);
{ yymsp[1].minor.yy0 = NULL; }
        break;
      case 42: /* extra_brkt_pointsxy ::= VANUATU_COMMA point_brkt_coordxy extra_brkt_pointsxy */
      case 44: /* extra_brkt_pointsxym ::= VANUATU_COMMA point_brkt_coordxym extra_brkt_pointsxym */ yytestcase(yyruleno==44);
      case 46: /* extra_brkt_pointsxyz ::= VANUATU_COMMA point_brkt_coordxyz extra_brkt_pointsxyz */ yytestcase(yyruleno==46);
      case 48: /* extra_brkt_pointsxyzm ::= VANUATU_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm */ yytestcase(yyruleno==48);
      case 50: /* extra_pointsxy ::= VANUATU_COMMA point_coordxy extra_pointsxy */ yytestcase(yyruleno==50);
      case 52: /* extra_pointsxym ::= VANUATU_COMMA point_coordxym extra_pointsxym */ yytestcase(yyruleno==52);
      case 54: /* extra_pointsxyz ::= VANUATU_COMMA point_coordxyz extra_pointsxyz */ yytestcase(yyruleno==54);
      case 56: /* extra_pointsxyzm ::= VANUATU_COMMA point_coordxyzm extra_pointsxyzm */ yytestcase(yyruleno==56);
{ ((gaiaPointPtr)yymsp[-1].minor.yy0)->Next = (gaiaPointPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 57: /* linestring ::= VANUATU_LINESTRING linestring_text */
      case 58: /* linestringm ::= VANUATU_LINESTRING_M linestring_textm */ yytestcase(yyruleno==58);
      case 59: /* linestringz ::= VANUATU_LINESTRING_Z linestring_textz */ yytestcase(yyruleno==59);
      case 60: /* linestringzm ::= VANUATU_LINESTRING_ZM linestring_textzm */ yytestcase(yyruleno==60);
{ yymsp[-1].minor.yy0 = vanuatu_buildGeomFromLinestring( p_data, (gaiaLinestringPtr)yymsp[0].minor.yy0); }
        break;
      case 61: /* linestring_text ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) vanuatu_linestring_xy( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 62: /* linestring_textm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) vanuatu_linestring_xym( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 63: /* linestring_textz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) vanuatu_linestring_xyz( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 64: /* linestring_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   ((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0;
	   yymsp[-5].minor.yy0 = (void *) vanuatu_linestring_xyzm( p_data, (gaiaPointPtr)yymsp[-4].minor.yy0);
	}
        break;
      case 65: /* polygon ::= VANUATU_POLYGON polygon_text */
      case 66: /* polygonm ::= VANUATU_POLYGON_M polygon_textm */ yytestcase(yyruleno==66);
      case 67: /* polygonz ::= VANUATU_POLYGON_Z polygon_textz */ yytestcase(yyruleno==67);
      case 68: /* polygonzm ::= VANUATU_POLYGON_ZM polygon_textzm */ yytestcase(yyruleno==68);
{ yymsp[-1].minor.yy0 = vanuatu_buildGeomFromPolygon( p_data, (gaiaPolygonPtr)yymsp[0].minor.yy0); }
        break;
      case 69: /* polygon_text ::= VANUATU_OPEN_BRACKET ring extra_rings VANUATU_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_polygon_xy( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 70: /* polygon_textm ::= VANUATU_OPEN_BRACKET ringm extra_ringsm VANUATU_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_polygon_xym( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 71: /* polygon_textz ::= VANUATU_OPEN_BRACKET ringz extra_ringsz VANUATU_CLOSE_BRACKET */
{  
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_polygon_xyz( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 72: /* polygon_textzm ::= VANUATU_OPEN_BRACKET ringzm extra_ringszm VANUATU_CLOSE_BRACKET */
{ 
		((gaiaRingPtr)yymsp[-2].minor.yy0)->Next = (gaiaRingPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_polygon_xyzm( p_data, (gaiaRingPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 73: /* ring ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) vanuatu_ring_xy( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 75: /* extra_rings ::= VANUATU_COMMA ring extra_rings */
      case 78: /* extra_ringsm ::= VANUATU_COMMA ringm extra_ringsm */ yytestcase(yyruleno==78);
      case 81: /* extra_ringsz ::= VANUATU_COMMA ringz extra_ringsz */ yytestcase(yyruleno==81);
      case 84: /* extra_ringszm ::= VANUATU_COMMA ringzm extra_ringszm */ yytestcase(yyruleno==84);
{
		((gaiaRingPtr)yymsp[-1].minor.yy0)->Next = (gaiaRingPtr)yymsp[0].minor.yy0;
		yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 76: /* ringm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) vanuatu_ring_xym( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 79: /* ringz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) vanuatu_ring_xyz( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 82: /* ringzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
{
		((gaiaPointPtr)yymsp[-8].minor.yy0)->Next = (gaiaPointPtr)yymsp[-6].minor.yy0; 
		((gaiaPointPtr)yymsp[-6].minor.yy0)->Next = (gaiaPointPtr)yymsp[-4].minor.yy0;
		((gaiaPointPtr)yymsp[-4].minor.yy0)->Next = (gaiaPointPtr)yymsp[-2].minor.yy0; 
		((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0;
		yymsp[-9].minor.yy0 = (void *) vanuatu_ring_xyzm( p_data, (gaiaPointPtr)yymsp[-8].minor.yy0);
	}
        break;
      case 85: /* multipoint ::= VANUATU_MULTIPOINT multipoint_text */
      case 86: /* multipointm ::= VANUATU_MULTIPOINT_M multipoint_textm */ yytestcase(yyruleno==86);
      case 87: /* multipointz ::= VANUATU_MULTIPOINT_Z multipoint_textz */ yytestcase(yyruleno==87);
      case 88: /* multipointzm ::= VANUATU_MULTIPOINT_ZM multipoint_textzm */ yytestcase(yyruleno==88);
      case 97: /* multilinestring ::= VANUATU_MULTILINESTRING multilinestring_text */ yytestcase(yyruleno==97);
      case 98: /* multilinestringm ::= VANUATU_MULTILINESTRING_M multilinestring_textm */ yytestcase(yyruleno==98);
      case 99: /* multilinestringz ::= VANUATU_MULTILINESTRING_Z multilinestring_textz */ yytestcase(yyruleno==99);
      case 100: /* multilinestringzm ::= VANUATU_MULTILINESTRING_ZM multilinestring_textzm */ yytestcase(yyruleno==100);
      case 113: /* multipolygon ::= VANUATU_MULTIPOLYGON multipolygon_text */ yytestcase(yyruleno==113);
      case 114: /* multipolygonm ::= VANUATU_MULTIPOLYGON_M multipolygon_textm */ yytestcase(yyruleno==114);
      case 115: /* multipolygonz ::= VANUATU_MULTIPOLYGON_Z multipolygon_textz */ yytestcase(yyruleno==115);
      case 116: /* multipolygonzm ::= VANUATU_MULTIPOLYGON_ZM multipolygon_textzm */ yytestcase(yyruleno==116);
      case 129: /* geocoll ::= VANUATU_GEOMETRYCOLLECTION geocoll_text */ yytestcase(yyruleno==129);
      case 130: /* geocollm ::= VANUATU_GEOMETRYCOLLECTION_M geocoll_textm */ yytestcase(yyruleno==130);
      case 131: /* geocollz ::= VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz */ yytestcase(yyruleno==131);
      case 132: /* geocollzm ::= VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm */ yytestcase(yyruleno==132);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
        break;
      case 89: /* multipoint_text ::= VANUATU_OPEN_BRACKET point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
      case 93: /* multipoint_text ::= VANUATU_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==93);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipoint_xy( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 90: /* multipoint_textm ::= VANUATU_OPEN_BRACKET point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
      case 94: /* multipoint_textm ::= VANUATU_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==94);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipoint_xym( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 91: /* multipoint_textz ::= VANUATU_OPEN_BRACKET point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
      case 95: /* multipoint_textz ::= VANUATU_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==95);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipoint_xyz( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 92: /* multipoint_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
      case 96: /* multipoint_textzm ::= VANUATU_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==96);
{ 
	   ((gaiaPointPtr)yymsp[-2].minor.yy0)->Next = (gaiaPointPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipoint_xyzm( p_data, (gaiaPointPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 101: /* multilinestring_text ::= VANUATU_OPEN_BRACKET linestring_text multilinestring_text2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multilinestring_xy( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 103: /* multilinestring_text2 ::= VANUATU_COMMA linestring_text multilinestring_text2 */
      case 106: /* multilinestring_textm2 ::= VANUATU_COMMA linestring_textm multilinestring_textm2 */ yytestcase(yyruleno==106);
      case 109: /* multilinestring_textz2 ::= VANUATU_COMMA linestring_textz multilinestring_textz2 */ yytestcase(yyruleno==109);
      case 112: /* multilinestring_textzm2 ::= VANUATU_COMMA linestring_textzm multilinestring_textzm2 */ yytestcase(yyruleno==112);
{ ((gaiaLinestringPtr)yymsp[-1].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 104: /* multilinestring_textm ::= VANUATU_OPEN_BRACKET linestring_textm multilinestring_textm2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multilinestring_xym( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 107: /* multilinestring_textz ::= VANUATU_OPEN_BRACKET linestring_textz multilinestring_textz2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multilinestring_xyz( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 110: /* multilinestring_textzm ::= VANUATU_OPEN_BRACKET linestring_textzm multilinestring_textzm2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaLinestringPtr)yymsp[-2].minor.yy0)->Next = (gaiaLinestringPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multilinestring_xyzm( p_data, (gaiaLinestringPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 117: /* multipolygon_text ::= VANUATU_OPEN_BRACKET polygon_text multipolygon_text2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipolygon_xy( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 119: /* multipolygon_text2 ::= VANUATU_COMMA polygon_text multipolygon_text2 */
      case 122: /* multipolygon_textm2 ::= VANUATU_COMMA polygon_textm multipolygon_textm2 */ yytestcase(yyruleno==122);
      case 125: /* multipolygon_textz2 ::= VANUATU_COMMA polygon_textz multipolygon_textz2 */ yytestcase(yyruleno==125);
      case 128: /* multipolygon_textzm2 ::= VANUATU_COMMA polygon_textzm multipolygon_textzm2 */ yytestcase(yyruleno==128);
{ ((gaiaPolygonPtr)yymsp[-1].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[0].minor.yy0;  yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; }
        break;
      case 120: /* multipolygon_textm ::= VANUATU_OPEN_BRACKET polygon_textm multipolygon_textm2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipolygon_xym( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 123: /* multipolygon_textz ::= VANUATU_OPEN_BRACKET polygon_textz multipolygon_textz2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipolygon_xyz( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 126: /* multipolygon_textzm ::= VANUATU_OPEN_BRACKET polygon_textzm multipolygon_textzm2 VANUATU_CLOSE_BRACKET */
{ 
	   ((gaiaPolygonPtr)yymsp[-2].minor.yy0)->Next = (gaiaPolygonPtr)yymsp[-1].minor.yy0; 
	   yymsp[-3].minor.yy0 = (void *) vanuatu_multipolygon_xyzm( p_data, (gaiaPolygonPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 133: /* geocoll_text ::= VANUATU_OPEN_BRACKET point geocoll_text2 VANUATU_CLOSE_BRACKET */
      case 134: /* geocoll_text ::= VANUATU_OPEN_BRACKET linestring geocoll_text2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==134);
      case 135: /* geocoll_text ::= VANUATU_OPEN_BRACKET polygon geocoll_text2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==135);
      case 136: /* geocoll_text ::= VANUATU_OPEN_BRACKET multipoint geocoll_text2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==136);
      case 137: /* geocoll_text ::= VANUATU_OPEN_BRACKET multilinestring geocoll_text2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==137);
      case 138: /* geocoll_text ::= VANUATU_OPEN_BRACKET multipolygon geocoll_text2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==138);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_geomColl_xy( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 139: /* geocoll_text ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 VANUATU_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) vanuatu_geomColl_xy( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 141: /* geocoll_text2 ::= VANUATU_COMMA point geocoll_text2 */
      case 142: /* geocoll_text2 ::= VANUATU_COMMA linestring geocoll_text2 */ yytestcase(yyruleno==142);
      case 143: /* geocoll_text2 ::= VANUATU_COMMA polygon geocoll_text2 */ yytestcase(yyruleno==143);
      case 144: /* geocoll_text2 ::= VANUATU_COMMA multipoint geocoll_text2 */ yytestcase(yyruleno==144);
      case 145: /* geocoll_text2 ::= VANUATU_COMMA multilinestring geocoll_text2 */ yytestcase(yyruleno==145);
      case 146: /* geocoll_text2 ::= VANUATU_COMMA multipolygon geocoll_text2 */ yytestcase(yyruleno==146);
      case 156: /* geocoll_textm2 ::= VANUATU_COMMA pointm geocoll_textm2 */ yytestcase(yyruleno==156);
      case 157: /* geocoll_textm2 ::= VANUATU_COMMA linestringm geocoll_textm2 */ yytestcase(yyruleno==157);
      case 158: /* geocoll_textm2 ::= VANUATU_COMMA polygonm geocoll_textm2 */ yytestcase(yyruleno==158);
      case 159: /* geocoll_textm2 ::= VANUATU_COMMA multipointm geocoll_textm2 */ yytestcase(yyruleno==159);
      case 160: /* geocoll_textm2 ::= VANUATU_COMMA multilinestringm geocoll_textm2 */ yytestcase(yyruleno==160);
      case 161: /* geocoll_textm2 ::= VANUATU_COMMA multipolygonm geocoll_textm2 */ yytestcase(yyruleno==161);
      case 171: /* geocoll_textz2 ::= VANUATU_COMMA pointz geocoll_textz2 */ yytestcase(yyruleno==171);
      case 172: /* geocoll_textz2 ::= VANUATU_COMMA linestringz geocoll_textz2 */ yytestcase(yyruleno==172);
      case 173: /* geocoll_textz2 ::= VANUATU_COMMA polygonz geocoll_textz2 */ yytestcase(yyruleno==173);
      case 174: /* geocoll_textz2 ::= VANUATU_COMMA multipointz geocoll_textz2 */ yytestcase(yyruleno==174);
      case 175: /* geocoll_textz2 ::= VANUATU_COMMA multilinestringz geocoll_textz2 */ yytestcase(yyruleno==175);
      case 176: /* geocoll_textz2 ::= VANUATU_COMMA multipolygonz geocoll_textz2 */ yytestcase(yyruleno==176);
      case 186: /* geocoll_textzm2 ::= VANUATU_COMMA pointzm geocoll_textzm2 */ yytestcase(yyruleno==186);
      case 187: /* geocoll_textzm2 ::= VANUATU_COMMA linestringzm geocoll_textzm2 */ yytestcase(yyruleno==187);
      case 188: /* geocoll_textzm2 ::= VANUATU_COMMA polygonzm geocoll_textzm2 */ yytestcase(yyruleno==188);
      case 189: /* geocoll_textzm2 ::= VANUATU_COMMA multipointzm geocoll_textzm2 */ yytestcase(yyruleno==189);
      case 190: /* geocoll_textzm2 ::= VANUATU_COMMA multilinestringzm geocoll_textzm2 */ yytestcase(yyruleno==190);
      case 191: /* geocoll_textzm2 ::= VANUATU_COMMA multipolygonzm geocoll_textzm2 */ yytestcase(yyruleno==191);
{
		((gaiaGeomCollPtr)yymsp[-1].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[0].minor.yy0;
		yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 147: /* geocoll_text2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 */
      case 162: /* geocoll_textm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 */ yytestcase(yyruleno==162);
      case 177: /* geocoll_textz2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 */ yytestcase(yyruleno==177);
      case 192: /* geocoll_textzm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 */ yytestcase(yyruleno==192);
{
		((gaiaGeomCollPtr)yymsp[-1].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[0].minor.yy0;
		yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0;
	}
        break;
      case 148: /* geocoll_textm ::= VANUATU_OPEN_BRACKET pointm geocoll_textm2 VANUATU_CLOSE_BRACKET */
      case 149: /* geocoll_textm ::= VANUATU_OPEN_BRACKET linestringm geocoll_textm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==149);
      case 150: /* geocoll_textm ::= VANUATU_OPEN_BRACKET polygonm geocoll_textm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==150);
      case 151: /* geocoll_textm ::= VANUATU_OPEN_BRACKET multipointm geocoll_textm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==151);
      case 152: /* geocoll_textm ::= VANUATU_OPEN_BRACKET multilinestringm geocoll_textm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==152);
      case 153: /* geocoll_textm ::= VANUATU_OPEN_BRACKET multipolygonm geocoll_textm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==153);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_geomColl_xym( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 154: /* geocoll_textm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 VANUATU_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) vanuatu_geomColl_xym( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 163: /* geocoll_textz ::= VANUATU_OPEN_BRACKET pointz geocoll_textz2 VANUATU_CLOSE_BRACKET */
      case 164: /* geocoll_textz ::= VANUATU_OPEN_BRACKET linestringz geocoll_textz2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==164);
      case 165: /* geocoll_textz ::= VANUATU_OPEN_BRACKET polygonz geocoll_textz2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==165);
      case 166: /* geocoll_textz ::= VANUATU_OPEN_BRACKET multipointz geocoll_textz2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==166);
      case 167: /* geocoll_textz ::= VANUATU_OPEN_BRACKET multilinestringz geocoll_textz2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==167);
      case 168: /* geocoll_textz ::= VANUATU_OPEN_BRACKET multipolygonz geocoll_textz2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==168);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_geomColl_xyz( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 169: /* geocoll_textz ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 VANUATU_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) vanuatu_geomColl_xyz( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 178: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET pointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
      case 179: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET linestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==179);
      case 180: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET polygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==180);
      case 181: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET multipointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==181);
      case 182: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET multilinestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==182);
      case 183: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET multipolygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */ yytestcase(yyruleno==183);
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-3].minor.yy0 = (void *) vanuatu_geomColl_xyzm( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      case 184: /* geocoll_textzm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
{ 
		((gaiaGeomCollPtr)yymsp[-2].minor.yy0)->Next = (gaiaGeomCollPtr)yymsp[-1].minor.yy0;
		yymsp[-4].minor.yy0 = (void *) vanuatu_geomColl_xyzm( p_data, (gaiaGeomCollPtr)yymsp[-2].minor.yy0);
	}
        break;
      default:
      /* (193) main ::= in */ yytestcase(yyruleno==193);
      /* (194) in ::= */ yytestcase(yyruleno==194);
      /* (195) in ::= in state VANUATU_NEWLINE */ yytestcase(yyruleno==195);
      /* (196) state ::= program (OPTIMIZED OUT) */ assert(yyruleno!=196);
      /* (197) program ::= geo_text (OPTIMIZED OUT) */ assert(yyruleno!=197);
      /* (198) program ::= geo_textz (OPTIMIZED OUT) */ assert(yyruleno!=198);
      /* (199) program ::= geo_textm (OPTIMIZED OUT) */ assert(yyruleno!=199);
      /* (200) program ::= geo_textzm (OPTIMIZED OUT) */ assert(yyruleno!=200);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */




















































































































































































































































































































































































































































































































































}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
){


  ParseARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/

/* 
** Sandro Furieri 2010 Apr 4
** when the LEMON parser encounters an error
** then this global variable is set 
*/
	p_data->vanuatu_parse_error = 1;
	p_data->result = NULL;
/************ End %syntax_error code ******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){


  ParseARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);


  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void Parse(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
){


  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */


  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)

  yyendofinput = (yymajor==0);







#endif







  ParseARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    int stateno = yypParser->yytos->stateno;
    if( stateno < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",


              yyTracePrompt,yyTokenName[yymajor],stateno);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],stateno-YY_MIN_REDUCE);
    }
  }
#endif

  do{

    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact >= YY_MIN_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY




      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;





    }else{

      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);


      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);


      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){

#ifndef NDEBUG
        if( yyTraceFILE ){

          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);

        yymajor = YYNOCODE;

      }else{
        while( yypParser->yytos >= yypParser->yystack


            && yymx != YYERRORSYMBOL

            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){


          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){



          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;

        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);




        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);


      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);


      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);

      if( yyendofinput ){

        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif

  return;
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<


<
<
<
<
<
<
<
<
<
>
>

<
<
<
<




|
>
|
|





|
|
|
|
|
|
|
<
<
|
>
>
|
|
<
<
<










|











|


|
<

|

|

|


<
<
<

|

|
<

<
>
|
>
>

|


|
>











|
<
<

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

>

<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

<
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

>
|
<
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

>

<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

<

>
>
|
|







<
<
<
<







 







<
<
<
<

|
<
>
>
|
|
|
|





|
<
>
>

<
>

<
|
<
|

|
|
<

|
<







 







>
|
>
|
|
>
|
>
|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





>
>
>
>

|
|
|
<
>
>
|

<
>
>
|
|

<
>

|
<
>
>
|

<
>
>
|
|

<
>
|

|





|
>
>
|
>

|
>
|
|

<
>
>
|
|
<

|
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






|
|
|
|
<
>
>
|
|
<






|
|
<
|





|
|
<
>
>
|

|
<
>
>
|

<
|
<
|
|
|
<
<
|







 







|
|
|
|
|
<
>
>
|
|
<
|
<

|

|

>
|
|
<
>
|
>
>
>
>
>
>
>

>
>
>
>
>
>
>
|


|
<
<
<
>
>
|
<
<
<
|
<


|
>
|
<
<
<
<
<
>
>
>
>
|
<
|
<
<
<
<
>
>
>
>
>
|
>
|
<

|


|
<
>
>
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
|
>

|
>
|
|
|

|
>
|
>
|
<
>
>
|
>
|
|
|
<
>
>
|
|
<
>
>
>
|
|
<
<
<
|
>
|
<
>
>
>
>
|
|
|
|

|
|
|
|
|
|
|
<
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
>
|
|
<
>
|
>
|
<
<
<
|
|

|
<
<
<
<
<
<
<
<
<
|
<
<
<
>
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45


















46
47
48
49
50
51


52
53









54
55
56




57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115



116
117
118
119

120

121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209

210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273

274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340

341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

391
392
393
394
395
396
397
398
399
400
401
402




403
404
405
406
407
408
409
...
413
414
415
416
417
418
419




420
421

422
423
424
425
426
427
428
429
430
431
432
433

434
435
436

437
438

439

440
441
442
443

444
445

446
447
448
449
450
451
452
...
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066























































1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079

1080
1081
1082
1083

1084
1085
1086
1087
1088

1089
1090
1091

1092
1093
1094
1095

1096
1097
1098
1099
1100

1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120

1121
1122
1123
1124

1125
1126

1127
1128





















1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477

2478
2479
2480
2481

2482
2483
2484
2485
2486
2487
2488
2489

2490
2491
2492
2493
2494
2495
2496
2497

2498
2499
2500
2501
2502

2503
2504
2505
2506

2507

2508
2509
2510


2511
2512
2513
2514
2515
2516
2517
2518
....
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537

2538
2539
2540
2541

2542

2543
2544
2545
2546
2547
2548
2549
2550

2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571



2572
2573
2574



2575

2576
2577
2578
2579
2580





2581
2582
2583
2584
2585

2586




2587
2588
2589
2590
2591
2592
2593
2594

2595
2596
2597
2598
2599

2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624

2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642

2643
2644
2645
2646
2647
2648
2649

2650
2651
2652
2653

2654
2655
2656
2657
2658



2659
2660
2661

2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677


2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692

2693
2694
2695
2696

2697
2698
2699
2700



2701
2702
2703
2704









2705



2706
2707
2708
/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
*/
/* First off, code is included that follows the "include" declaration
** in the input grammar file. */
#include <stdio.h>

/* Next is all token values, in a form suitable for use by makeheaders.
** This section will be null unless lemon is run with the -m switch.
*/
/* 
** These constants (all generated automatically by the parser generator)
** specify the various kinds of tokens (terminals) that the parser
** understands. 
**
** Each symbol here is a terminal symbol in the grammar.
*/
/* Make sure the INTERFACE macro is defined.
*/
#ifndef INTERFACE
#define INTERFACE 1
#endif
/* The next thing included is series of defines which control
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 terminals
**                       and nonterminals.  "int" is used otherwise.
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
**                       to no legal terminal or nonterminal number.  This
**                       number is used to fill in empty slots of the hash 
**                       table.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       have fall-back values which should be used if the
**                       original value of the token will not parse.
**    YYACTIONTYPE       is the data type used for storing terminal
**                       and nonterminal numbers.  "unsigned char" is
**                       used if there are fewer than 250 rules and
**                       states combined.  "int" is used otherwise.
**    ParseTOKENTYPE     is the data type used for minor tokens given 
**                       directly to the parser from the tokenizer.
**    YYMINORTYPE        is the data type used for all minor tokens.
**                       This is typically a union of many types, one of
**                       which is ParseTOKENTYPE.  The entry in the union
**                       for base tokens is called "yy0".


















**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    ParseARG_SDECL     A static variable declaration for the %extra_argument
**    ParseARG_PDECL     A parameter declaration for the %extra_argument
**    ParseARG_STORE     Code to store %extra_argument into yypParser
**    ParseARG_FETCH     Code to extract %extra_argument from yypParser


**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar









**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
*/




#define YYCODETYPE unsigned char
#define YYNOCODE 133
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE void *
typedef union
{
    int yyinit;
    ParseTOKENTYPE yy0;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 1000000
#endif
#define ParseARG_SDECL  struct vanuatu_data *p_data ;
#define ParseARG_PDECL , struct vanuatu_data *p_data
#define ParseARG_FETCH  struct vanuatu_data *p_data  = yypParser->p_data
#define ParseARG_STORE yypParser->p_data  = p_data
#define YYNSTATE 490
#define YYNRULE 201
#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)


#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)

/* The yyzerominor constant is used to initialize instances of
** YYMINORTYPE objects to zero. */
static const YYMINORTYPE yyzerominor = { 0 };




/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
#define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.

**
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
**
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
**
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**



** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]

**

** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
*/


static const YYACTIONTYPE yy_action[] = {
    /*     0 */ 230, 316, 317, 318, 319, 320, 321, 322, 323, 324,
    /*    10 */ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
    /*    20 */ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
    /*    30 */ 345, 346, 347, 348, 490, 238, 231, 51, 93, 233,
    /*    40 */ 235, 237, 94, 46, 54, 57, 60, 63, 66, 72,
    /*    50 */ 78, 84, 90, 97, 105, 113, 122, 127, 132, 137,
    /*    60 */ 142, 147, 152, 157, 162, 179, 196, 213, 231, 231,
    /*    70 */ 101, 351, 350, 233, 47, 102, 54, 54, 234, 57,
    /*    80 */ 66, 66, 47, 72, 90, 90, 241, 97, 122, 122,
    /*    90 */ 47, 127, 142, 142, 233, 147, 177, 170, 58, 194,
    /*   100 */ 57, 235, 47, 235, 72, 692, 1, 60, 97, 60,
    /*   110 */ 59, 78, 127, 78, 47, 105, 147, 105, 253, 132,
    /*   120 */ 187, 132, 47, 152, 237, 152, 48, 211, 91, 204,
    /*   130 */ 63, 237, 254, 351, 84, 98, 47, 63, 113, 106,
    /*   140 */ 351, 84, 137, 114, 351, 113, 157, 232, 351, 137,
    /*   150 */ 228, 109, 46, 157, 49, 236, 110, 221, 49, 163,
    /*   160 */ 172, 173, 174, 175, 176, 164, 165, 166, 167, 168,
    /*   170 */ 169, 180, 189, 190, 191, 192, 193, 181, 182, 183,
    /*   180 */ 184, 185, 186, 353, 50, 197, 206, 207, 208, 209,
    /*   190 */ 210, 355, 198, 199, 200, 201, 202, 203, 18, 52,
    /*   200 */ 358, 20, 214, 223, 224, 225, 226, 227, 21, 53,
    /*   210 */ 215, 216, 217, 218, 219, 220, 239, 118, 55, 51,
    /*   220 */ 56, 46, 119, 46, 243, 46, 61, 49, 62, 49,
    /*   230 */ 245, 49, 51, 64, 65, 51, 51, 248, 249, 250,
    /*   240 */ 70, 357, 46, 46, 46, 46, 255, 76, 240, 258,
    /*   250 */ 47, 47, 49, 259, 260, 82, 49, 49, 49, 361,
    /*   260 */ 263, 264, 51, 51, 265, 88, 51, 51, 359, 23,
    /*   270 */ 242, 24, 26, 362, 27, 29, 67, 30, 69, 364,
    /*   280 */ 244, 73, 365, 34, 367, 246, 368, 79, 251, 370,
    /*   290 */ 75, 38, 81, 85, 256, 374, 68, 42, 247, 71,
    /*   300 */ 87, 261, 10, 373, 92, 74, 378, 252, 77, 267,
    /*   310 */ 377, 266, 95, 80, 382, 257, 83, 269, 381, 268,
    /*   320 */ 86, 91, 96, 262, 89, 386, 385, 11, 389, 99,
    /*   330 */ 391, 100, 270, 272, 271, 103, 98, 12, 104, 394,
    /*   340 */ 396, 107, 106, 108, 111, 274, 273, 13, 401, 277,
    /*   350 */ 120, 114, 123, 112, 275, 115, 125, 279, 399, 406,
    /*   360 */ 278, 116, 117, 276, 128, 404, 408, 130, 121, 133,
    /*   370 */ 280, 135, 138, 409, 140, 143, 145, 148, 153, 150,
    /*   380 */ 124, 126, 155, 158, 129, 131, 160, 2, 3, 4,
    /*   390 */ 134, 5, 136, 693, 693, 693, 693, 139, 693, 141,
    /*   400 */ 693, 693, 693, 144, 693, 146, 693, 6, 412, 7,
    /*   410 */ 411, 693, 149, 151, 693, 281, 415, 154, 414, 156,
    /*   420 */ 693, 693, 282, 693, 417, 159, 418, 161, 693, 693,
    /*   430 */ 693, 8, 283, 421, 420, 693, 284, 693, 423, 424,
    /*   440 */ 693, 693, 9, 693, 285, 693, 693, 427, 693, 426,
    /*   450 */ 693, 693, 286, 693, 429, 693, 693, 693, 693, 693,
    /*   460 */ 430, 693, 693, 693, 693, 287, 432, 693, 433, 693,
    /*   470 */ 434, 435, 693, 436, 437, 171, 315, 14, 438, 15,
    /*   480 */ 288, 289, 290, 291, 292, 293, 460, 178, 294, 445,
    /*   490 */ 349, 352, 16, 19, 354, 17, 693, 447, 360, 356,
    /*   500 */ 448, 693, 22, 363, 693, 449, 693, 450, 366, 25,
    /*   510 */ 451, 693, 452, 188, 453, 28, 295, 369, 296, 297,
    /*   520 */ 298, 299, 300, 195, 371, 31, 32, 33, 372, 375,
    /*   530 */ 35, 36, 37, 376, 379, 39, 301, 40, 462, 463,
    /*   540 */ 464, 465, 205, 466, 467, 41, 380, 468, 302, 303,
    /*   550 */ 304, 383, 212, 305, 43, 306, 384, 307, 44, 475,
    /*   560 */ 45, 387, 388, 390, 392, 308, 477, 393, 478, 395,
    /*   570 */ 479, 480, 397, 398, 481, 222, 482, 400, 402, 403,
    /*   580 */ 405, 483, 407, 410, 309, 413, 310, 416, 419, 422,
    /*   590 */ 425, 428, 311, 431, 439, 440, 229, 312, 313, 441,
    /*   600 */ 442, 443, 314, 444, 446, 454, 455, 456, 457, 458,
    /*   610 */ 459, 461, 469, 470, 471, 472, 473, 474, 476, 484,
    /*   620 */ 485, 486, 487, 488, 489,
};

static const YYCODETYPE yy_lookahead[] = {

    /*     0 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
    /*    10 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
    /*    20 */ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
    /*    30 */ 67, 68, 69, 70, 0, 74, 2, 76, 71, 5,
    /*    40 */ 6, 7, 75, 76, 10, 11, 12, 13, 14, 15,
    /*    50 */ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
    /*    60 */ 26, 27, 28, 29, 30, 31, 32, 33, 2, 2,
    /*    70 */ 72, 8, 76, 5, 76, 77, 10, 10, 72, 11,
    /*    80 */ 14, 14, 76, 15, 18, 18, 72, 19, 22, 22,
    /*    90 */ 76, 23, 26, 26, 5, 27, 30, 30, 72, 31,
    /*   100 */ 11, 6, 76, 6, 15, 35, 36, 12, 19, 12,
    /*   110 */ 72, 16, 23, 16, 76, 20, 27, 20, 72, 24,
    /*   120 */ 31, 24, 76, 28, 7, 28, 76, 32, 3, 32,
    /*   130 */ 13, 7, 72, 8, 17, 3, 76, 13, 21, 3,
    /*   140 */ 8, 17, 25, 3, 8, 21, 29, 71, 8, 25,
    /*   150 */ 33, 73, 76, 29, 76, 73, 78, 33, 76, 43,
    /*   160 */ 44, 45, 46, 47, 48, 43, 44, 45, 46, 47,
    /*   170 */ 48, 57, 58, 59, 60, 61, 62, 57, 58, 59,
    /*   180 */ 60, 61, 62, 76, 76, 50, 51, 52, 53, 54,
    /*   190 */ 55, 76, 50, 51, 52, 53, 54, 55, 3, 76,
    /*   200 */ 88, 9, 64, 65, 66, 67, 68, 69, 3, 76,
    /*   210 */ 64, 65, 66, 67, 68, 69, 71, 74, 71, 76,
    /*   220 */ 71, 76, 79, 76, 73, 76, 73, 76, 73, 76,
    /*   230 */ 74, 76, 76, 74, 74, 76, 76, 71, 71, 71,
    /*   240 */ 71, 76, 76, 76, 76, 76, 72, 72, 84, 73,
    /*   250 */ 76, 76, 76, 73, 73, 73, 76, 76, 76, 89,
    /*   260 */ 74, 74, 76, 76, 74, 74, 76, 76, 84, 9,
    /*   270 */ 85, 3, 9, 85, 3, 9, 3, 3, 9, 90,
    /*   280 */ 86, 3, 86, 3, 91, 87, 87, 3, 84, 92,
    /*   290 */ 9, 3, 9, 3, 85, 93, 96, 3, 97, 96,
    /*   300 */ 9, 86, 3, 97, 76, 98, 94, 99, 98, 76,
    /*   310 */ 99, 87, 9, 100, 95, 101, 100, 80, 101, 84,
    /*   320 */ 102, 3, 75, 103, 102, 104, 103, 3, 80, 76,
    /*   330 */ 105, 76, 76, 81, 85, 9, 3, 3, 77, 81,
    /*   340 */ 106, 76, 3, 76, 9, 86, 76, 3, 107, 87,
    /*   350 */ 9, 3, 3, 78, 82, 76, 9, 112, 82, 108,
    /*   360 */ 83, 76, 76, 76, 3, 83, 112, 9, 79, 3,
    /*   370 */ 113, 9, 3, 109, 9, 3, 9, 3, 3, 9,
    /*   380 */ 88, 88, 9, 3, 89, 89, 9, 3, 9, 3,
    /*   390 */ 90, 9, 90, 132, 132, 132, 132, 91, 132, 91,
    /*   400 */ 132, 132, 132, 92, 132, 92, 132, 3, 110, 9,
    /*   410 */ 113, 132, 93, 93, 132, 114, 111, 94, 114, 94,
    /*   420 */ 132, 132, 115, 132, 115, 95, 116, 95, 132, 132,
    /*   430 */ 132, 3, 120, 117, 120, 132, 121, 132, 121, 118,
    /*   440 */ 132, 132, 9, 132, 122, 132, 132, 119, 132, 122,
    /*   450 */ 132, 132, 123, 132, 123, 132, 132, 132, 132, 132,
    /*   460 */ 124, 132, 132, 132, 132, 128, 128, 132, 128, 132,
    /*   470 */ 128, 128, 132, 128, 128, 124, 1, 3, 128, 3,
    /*   480 */ 128, 128, 128, 128, 128, 128, 126, 124, 129, 125,
    /*   490 */ 4, 4, 3, 9, 4, 3, 132, 129, 4, 4,
    /*   500 */ 129, 132, 9, 4, 132, 129, 132, 129, 4, 9,
    /*   510 */ 129, 132, 129, 125, 129, 9, 129, 4, 129, 129,
    /*   520 */ 129, 129, 129, 125, 4, 9, 9, 9, 4, 4,
    /*   530 */ 9, 9, 9, 4, 4, 9, 130, 9, 130, 130,
    /*   540 */ 130, 130, 126, 130, 130, 9, 4, 130, 130, 130,
    /*   550 */ 130, 4, 126, 130, 9, 130, 4, 130, 9, 127,
    /*   560 */ 9, 4, 4, 4, 4, 131, 131, 4, 131, 4,
    /*   570 */ 131, 131, 4, 4, 131, 127, 131, 4, 4, 4,
    /*   580 */ 4, 131, 4, 4, 131, 4, 131, 4, 4, 4,
    /*   590 */ 4, 4, 131, 4, 4, 4, 127, 131, 131, 4,
    /*   600 */ 4, 4, 131, 4, 4, 4, 4, 4, 4, 4,
    /*   610 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
    /*   620 */ 4, 4, 4, 4, 4,
};


#define YY_SHIFT_USE_DFLT (-1)
#define YY_SHIFT_MAX 314
static const short yy_shift_ofst[] = {
    /*     0 */ -1, 34, 66, 67, 68, 89, 95, 97, 117, 124,
    /*    10 */ 125, 132, 136, 140, 63, 63, 63, 63, 63, 63,
    /*    20 */ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
    /*    30 */ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
    /*    40 */ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
    /*    50 */ 63, 63, 63, 63, 195, 192, 192, 205, 260, 260,
    /*    60 */ 268, 263, 263, 271, 266, 266, 273, 274, 269, 274,
    /*    70 */ 192, 269, 278, 280, 281, 280, 260, 281, 284, 288,
    /*    80 */ 283, 288, 263, 283, 290, 294, 291, 294, 266, 291,
    /*    90 */ 299, 63, 63, 192, 303, 318, 303, 324, 63, 63,
    /*   100 */ 63, 260, 326, 333, 326, 334, 63, 63, 63, 263,
    /*   110 */ 335, 339, 335, 344, 63, 63, 63, 63, 266, 341,
    /*   120 */ 348, 341, 349, 195, 347, 195, 347, 361, 205, 358,
    /*   130 */ 205, 358, 366, 268, 362, 268, 362, 369, 271, 365,
    /*   140 */ 271, 365, 372, 273, 367, 273, 367, 374, 278, 370,
    /*   150 */ 278, 370, 375, 284, 373, 284, 373, 380, 290, 377,
    /*   160 */ 290, 377, 384, 379, 379, 379, 379, 379, 379, 379,
    /*   170 */ 384, 379, 379, 379, 379, 379, 379, 384, 379, 386,
    /*   180 */ 382, 382, 382, 382, 382, 382, 382, 386, 382, 382,
    /*   190 */ 382, 382, 382, 382, 386, 382, 404, 400, 400, 400,
    /*   200 */ 400, 400, 400, 400, 404, 400, 400, 400, 400, 400,
    /*   210 */ 400, 404, 400, 428, 433, 433, 433, 433, 433, 433,
    /*   220 */ 433, 428, 433, 433, 433, 433, 433, 433, 428, 433,
    /*   230 */ 475, 474, 486, 476, 487, 489, 490, 492, 495, 484,
    /*   240 */ 494, 493, 499, 500, 504, 506, 513, 520, 516, 517,
    /*   250 */ 518, 524, 525, 521, 522, 523, 529, 530, 526, 528,
    /*   260 */ 536, 542, 547, 545, 549, 551, 552, 557, 558, 559,
    /*   270 */ 560, 563, 565, 568, 569, 573, 574, 575, 576, 578,
    /*   280 */ 579, 581, 583, 584, 585, 586, 587, 589, 590, 591,
    /*   290 */ 595, 596, 597, 599, 600, 601, 602, 603, 604, 605,
    /*   300 */ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
    /*   310 */ 616, 617, 618, 619, 620,
};

#define YY_REDUCE_USE_DFLT (-40)

#define YY_REDUCE_MAX 229
static const short yy_reduce_ofst[] = {
    /*     0 */ 70, -37, 116, 122, 114, 120, 135, 142, 138, 146,
    /*    10 */ -33, -2, 78, 143, 76, 6, 82, -39, 145, 147,
    /*    20 */ 149, 14, 26, 38, 151, 153, 155, 156, 159, 160,
    /*    30 */ 166, 167, 168, 169, 46, 60, 174, 175, 176, 180,
    /*    40 */ 181, 182, 186, 187, 190, 191, -4, 50, 107, 108,
    /*    50 */ 115, 123, 133, 165, 112, 164, 184, 170, 185, 188,
    /*    60 */ 189, 194, 196, 193, 198, 199, 197, 200, 201, 203,
    /*    70 */ 204, 206, 202, 207, 208, 210, 209, 211, 212, 213,
    /*    80 */ 214, 216, 215, 217, 219, 218, 220, 222, 224, 223,
    /*    90 */ 221, 228, 233, 235, 237, 247, 248, 225, 253, 255,
    /*   100 */ 256, 249, 252, 261, 258, 234, 265, 267, 270, 259,
    /*   110 */ 272, 275, 276, 241, 279, 285, 286, 287, 262, 277,
    /*   120 */ 289, 282, 251, 292, 245, 293, 254, 264, 295, 257,
    /*   130 */ 296, 297, 298, 300, 301, 302, 304, 305, 306, 307,
    /*   140 */ 308, 309, 310, 311, 312, 313, 314, 316, 319, 315,
    /*   150 */ 320, 317, 321, 323, 322, 325, 327, 328, 330, 329,
    /*   160 */ 332, 331, 336, 337, 338, 340, 342, 343, 345, 346,
    /*   170 */ 351, 350, 352, 353, 354, 355, 356, 363, 357, 364,
    /*   180 */ 359, 368, 371, 376, 378, 381, 383, 388, 385, 387,
    /*   190 */ 389, 390, 391, 392, 398, 393, 360, 406, 408, 409,
    /*   200 */ 410, 411, 413, 414, 416, 417, 418, 419, 420, 423,
    /*   210 */ 425, 426, 427, 432, 434, 435, 437, 439, 440, 443,
    /*   220 */ 445, 448, 450, 453, 455, 461, 466, 467, 469, 471,
};

static const YYACTIONTYPE yy_default[] = {

    /*     0 */ 491, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*    10 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*    20 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*    30 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*    40 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*    50 */ 691, 691, 691, 691, 691, 547, 547, 691, 549, 549,
    /*    60 */ 691, 551, 551, 691, 553, 553, 691, 691, 572, 691,
    /*    70 */ 547, 572, 691, 691, 575, 691, 549, 575, 691, 691,
    /*    80 */ 578, 691, 551, 578, 691, 691, 581, 691, 553, 581,
    /*    90 */ 691, 691, 691, 547, 539, 691, 539, 691, 691, 691,
    /*   100 */ 691, 549, 541, 691, 541, 691, 691, 691, 691, 551,
    /*   110 */ 543, 691, 543, 691, 691, 691, 691, 691, 553, 545,
    /*   120 */ 691, 545, 691, 691, 600, 691, 600, 691, 691, 603,
    /*   130 */ 691, 603, 691, 691, 606, 691, 606, 691, 691, 609,
    /*   140 */ 691, 609, 691, 691, 616, 691, 616, 691, 691, 619,
    /*   150 */ 691, 619, 691, 691, 622, 691, 622, 691, 691, 625,
    /*   160 */ 691, 625, 691, 638, 638, 638, 638, 638, 638, 638,
    /*   170 */ 691, 638, 638, 638, 638, 638, 638, 691, 638, 691,
    /*   180 */ 653, 653, 653, 653, 653, 653, 653, 691, 653, 653,
    /*   190 */ 653, 653, 653, 653, 691, 653, 691, 668, 668, 668,
    /*   200 */ 668, 668, 668, 668, 691, 668, 668, 668, 668, 668,
    /*   210 */ 668, 691, 668, 691, 683, 683, 683, 683, 683, 683,
    /*   220 */ 683, 691, 683, 683, 683, 683, 683, 683, 691, 683,
    /*   230 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   240 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   250 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   260 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   270 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   280 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   290 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   300 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
    /*   310 */ 691, 691, 691, 691, 691, 492, 493, 494, 495, 496,
    /*   320 */ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
    /*   330 */ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
    /*   340 */ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
    /*   350 */ 534, 538, 527, 535, 528, 536, 529, 537, 555, 548,
    /*   360 */ 559, 556, 550, 560, 557, 552, 561, 558, 554, 562,
    /*   370 */ 563, 567, 571, 573, 564, 568, 574, 576, 565, 569,
    /*   380 */ 577, 579, 566, 570, 580, 582, 583, 530, 587, 540,
    /*   390 */ 591, 584, 531, 588, 542, 592, 585, 532, 589, 544,
    /*   400 */ 593, 586, 533, 590, 546, 594, 595, 599, 601, 596,
    /*   410 */ 602, 604, 597, 605, 607, 598, 608, 610, 611, 615,
    /*   420 */ 617, 612, 618, 620, 613, 621, 623, 614, 624, 626,
    /*   430 */ 627, 631, 639, 640, 641, 642, 643, 644, 645, 632,
    /*   440 */ 633, 634, 635, 636, 637, 628, 646, 654, 655, 656,
    /*   450 */ 657, 658, 659, 660, 647, 648, 649, 650, 651, 652,
    /*   460 */ 629, 661, 669, 670, 671, 672, 673, 674, 675, 662,
    /*   470 */ 663, 664, 665, 666, 667, 630, 676, 684, 685, 686,
    /*   480 */ 687, 688, 689, 690, 677, 678, 679, 680, 681, 682,
};


#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.




*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
................................................................................
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.




*/
struct yyStackEntry

{
    YYACTIONTYPE stateno;	/* The state-number */
    YYCODETYPE major;		/* The major token value.  This is the code
				 ** number for the token at this stack level */
    YYMINORTYPE minor;		/* The user-supplied minor token value.  This
				 ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser

{
    int yyidx;			/* Index of top element in stack */
#ifdef YYTRACKMAXSTACKDEPTH

    int yyidxMax;		/* Maximum value of yyidx */
#endif

    int yyerrcnt;		/* Shifts left before out of the error */

      ParseARG_SDECL		/* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
    int yystksz;		/* Current side of the stack */
    yyStackEntry *yystack;	/* The parser's stack */

#else
      yyStackEntry yystack[YYSTACKDEPTH];	/* The parser's stack */

#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
................................................................................
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void
ParseTrace (FILE * TraceFILE, char *zTracePrompt)
{
    yyTraceFILE = TraceFILE;
    yyTracePrompt = zTracePrompt;
    if (yyTraceFILE == 0)
	yyTracePrompt = 0;
    else if (yyTracePrompt == 0)
	yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = {
    "$", "VANUATU_NEWLINE", "VANUATU_POINT", "VANUATU_OPEN_BRACKET",
    "VANUATU_CLOSE_BRACKET", "VANUATU_POINT_M", "VANUATU_POINT_Z",
    "VANUATU_POINT_ZM",
    "VANUATU_NUM", "VANUATU_COMMA", "VANUATU_LINESTRING",
    "VANUATU_LINESTRING_M",
    "VANUATU_LINESTRING_Z", "VANUATU_LINESTRING_ZM", "VANUATU_POLYGON",
    "VANUATU_POLYGON_M",
    "VANUATU_POLYGON_Z", "VANUATU_POLYGON_ZM", "VANUATU_MULTIPOINT",
    "VANUATU_MULTIPOINT_M",
    "VANUATU_MULTIPOINT_Z", "VANUATU_MULTIPOINT_ZM", "VANUATU_MULTILINESTRING",
    "VANUATU_MULTILINESTRING_M",
    "VANUATU_MULTILINESTRING_Z", "VANUATU_MULTILINESTRING_ZM",
    "VANUATU_MULTIPOLYGON", "VANUATU_MULTIPOLYGON_M",
    "VANUATU_MULTIPOLYGON_Z", "VANUATU_MULTIPOLYGON_ZM",
    "VANUATU_GEOMETRYCOLLECTION", "VANUATU_GEOMETRYCOLLECTION_M",
    "VANUATU_GEOMETRYCOLLECTION_Z", "VANUATU_GEOMETRYCOLLECTION_ZM", "error",
    "main",
    "in", "state", "program", "geo_text",
    "geo_textz", "geo_textm", "geo_textzm", "point",
    "linestring", "polygon", "multipoint", "multilinestring",
    "multipolygon", "geocoll", "pointz", "linestringz",
    "polygonz", "multipointz", "multilinestringz", "multipolygonz",
    "geocollz", "pointm", "linestringm", "polygonm",
    "multipointm", "multilinestringm", "multipolygonm", "geocollm",
    "pointzm", "linestringzm", "polygonzm", "multipointzm",
    "multilinestringzm", "multipolygonzm", "geocollzm", "point_coordxy",
    "point_coordxym", "point_coordxyz", "point_coordxyzm", "point_brkt_coordxy",
    "coord", "point_brkt_coordxym", "point_brkt_coordxyz",
    "point_brkt_coordxyzm",
    "extra_brkt_pointsxy", "extra_brkt_pointsxym", "extra_brkt_pointsxyz",
    "extra_brkt_pointsxyzm",
    "extra_pointsxy", "extra_pointsxym", "extra_pointsxyz", "extra_pointsxyzm",
    "linestring_text", "linestring_textm", "linestring_textz",
    "linestring_textzm",
    "polygon_text", "polygon_textm", "polygon_textz", "polygon_textzm",
    "ring", "extra_rings", "ringm", "extra_ringsm",
    "ringz", "extra_ringsz", "ringzm", "extra_ringszm",
    "multipoint_text", "multipoint_textm", "multipoint_textz",
    "multipoint_textzm",
    "multilinestring_text", "multilinestring_textm", "multilinestring_textz",
    "multilinestring_textzm",
    "multilinestring_text2", "multilinestring_textm2", "multilinestring_textz2",
    "multilinestring_textzm2",
    "multipolygon_text", "multipolygon_textm", "multipolygon_textz",
    "multipolygon_textzm",
    "multipolygon_text2", "multipolygon_textm2", "multipolygon_textz2",
    "multipolygon_textzm2",
    "geocoll_text", "geocoll_textm", "geocoll_textz", "geocoll_textzm",
    "geocoll_text2", "geocoll_textm2", "geocoll_textz2", "geocoll_textzm2",
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
    /*   0 */ "main ::= in",
    /*   1 */ "in ::=",
    /*   2 */ "in ::= in state VANUATU_NEWLINE",
    /*   3 */ "state ::= program",
    /*   4 */ "program ::= geo_text",
    /*   5 */ "program ::= geo_textz",
    /*   6 */ "program ::= geo_textm",
    /*   7 */ "program ::= geo_textzm",
    /*   8 */ "geo_text ::= point",
    /*   9 */ "geo_text ::= linestring",
    /*  10 */ "geo_text ::= polygon",
    /*  11 */ "geo_text ::= multipoint",
    /*  12 */ "geo_text ::= multilinestring",
    /*  13 */ "geo_text ::= multipolygon",
    /*  14 */ "geo_text ::= geocoll",
    /*  15 */ "geo_textz ::= pointz",
    /*  16 */ "geo_textz ::= linestringz",
    /*  17 */ "geo_textz ::= polygonz",
    /*  18 */ "geo_textz ::= multipointz",
    /*  19 */ "geo_textz ::= multilinestringz",
    /*  20 */ "geo_textz ::= multipolygonz",
    /*  21 */ "geo_textz ::= geocollz",
    /*  22 */ "geo_textm ::= pointm",
    /*  23 */ "geo_textm ::= linestringm",
    /*  24 */ "geo_textm ::= polygonm",
    /*  25 */ "geo_textm ::= multipointm",
    /*  26 */ "geo_textm ::= multilinestringm",
    /*  27 */ "geo_textm ::= multipolygonm",
    /*  28 */ "geo_textm ::= geocollm",
    /*  29 */ "geo_textzm ::= pointzm",
    /*  30 */ "geo_textzm ::= linestringzm",
    /*  31 */ "geo_textzm ::= polygonzm",
    /*  32 */ "geo_textzm ::= multipointzm",
    /*  33 */ "geo_textzm ::= multilinestringzm",
    /*  34 */ "geo_textzm ::= multipolygonzm",
    /*  35 */ "geo_textzm ::= geocollzm",
    /*  36 */
    "point ::= VANUATU_POINT VANUATU_OPEN_BRACKET point_coordxy VANUATU_CLOSE_BRACKET",
    /*  37 */
    "pointm ::= VANUATU_POINT_M VANUATU_OPEN_BRACKET point_coordxym VANUATU_CLOSE_BRACKET",
    /*  38 */
    "pointz ::= VANUATU_POINT_Z VANUATU_OPEN_BRACKET point_coordxyz VANUATU_CLOSE_BRACKET",
    /*  39 */
    "pointzm ::= VANUATU_POINT_ZM VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_CLOSE_BRACKET",
    /*  40 */
    "point_brkt_coordxy ::= VANUATU_OPEN_BRACKET coord coord VANUATU_CLOSE_BRACKET",
    /*  41 */
    "point_brkt_coordxym ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET",
    /*  42 */
    "point_brkt_coordxyz ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET",
    /*  43 */
    "point_brkt_coordxyzm ::= VANUATU_OPEN_BRACKET coord coord coord coord VANUATU_CLOSE_BRACKET",
    /*  44 */ "point_coordxy ::= coord coord",
    /*  45 */ "point_coordxym ::= coord coord coord",
    /*  46 */ "point_coordxyz ::= coord coord coord",
    /*  47 */ "point_coordxyzm ::= coord coord coord coord",
    /*  48 */ "coord ::= VANUATU_NUM",
    /*  49 */ "extra_brkt_pointsxy ::=",
    /*  50 */
    "extra_brkt_pointsxy ::= VANUATU_COMMA point_brkt_coordxy extra_brkt_pointsxy",
    /*  51 */ "extra_brkt_pointsxym ::=",
    /*  52 */
    "extra_brkt_pointsxym ::= VANUATU_COMMA point_brkt_coordxym extra_brkt_pointsxym",
    /*  53 */ "extra_brkt_pointsxyz ::=",
    /*  54 */
    "extra_brkt_pointsxyz ::= VANUATU_COMMA point_brkt_coordxyz extra_brkt_pointsxyz",
    /*  55 */ "extra_brkt_pointsxyzm ::=",
    /*  56 */
    "extra_brkt_pointsxyzm ::= VANUATU_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm",
    /*  57 */ "extra_pointsxy ::=",
    /*  58 */ "extra_pointsxy ::= VANUATU_COMMA point_coordxy extra_pointsxy",
    /*  59 */ "extra_pointsxym ::=",
    /*  60 */
    "extra_pointsxym ::= VANUATU_COMMA point_coordxym extra_pointsxym",
    /*  61 */ "extra_pointsxyz ::=",
    /*  62 */
    "extra_pointsxyz ::= VANUATU_COMMA point_coordxyz extra_pointsxyz",
    /*  63 */ "extra_pointsxyzm ::=",
    /*  64 */
    "extra_pointsxyzm ::= VANUATU_COMMA point_coordxyzm extra_pointsxyzm",
    /*  65 */ "linestring ::= VANUATU_LINESTRING linestring_text",
    /*  66 */ "linestringm ::= VANUATU_LINESTRING_M linestring_textm",
    /*  67 */ "linestringz ::= VANUATU_LINESTRING_Z linestring_textz",
    /*  68 */ "linestringzm ::= VANUATU_LINESTRING_ZM linestring_textzm",
    /*  69 */
    "linestring_text ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET",
    /*  70 */
    "linestring_textm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET",
    /*  71 */
    "linestring_textz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET",
    /*  72 */
    "linestring_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET",
    /*  73 */ "polygon ::= VANUATU_POLYGON polygon_text",
    /*  74 */ "polygonm ::= VANUATU_POLYGON_M polygon_textm",
    /*  75 */ "polygonz ::= VANUATU_POLYGON_Z polygon_textz",
    /*  76 */ "polygonzm ::= VANUATU_POLYGON_ZM polygon_textzm",
    /*  77 */
    "polygon_text ::= VANUATU_OPEN_BRACKET ring extra_rings VANUATU_CLOSE_BRACKET",
    /*  78 */
    "polygon_textm ::= VANUATU_OPEN_BRACKET ringm extra_ringsm VANUATU_CLOSE_BRACKET",
    /*  79 */
    "polygon_textz ::= VANUATU_OPEN_BRACKET ringz extra_ringsz VANUATU_CLOSE_BRACKET",
    /*  80 */
    "polygon_textzm ::= VANUATU_OPEN_BRACKET ringzm extra_ringszm VANUATU_CLOSE_BRACKET",
    /*  81 */
    "ring ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET",
    /*  82 */ "extra_rings ::=",
    /*  83 */ "extra_rings ::= VANUATU_COMMA ring extra_rings",
    /*  84 */
    "ringm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET",
    /*  85 */ "extra_ringsm ::=",
    /*  86 */ "extra_ringsm ::= VANUATU_COMMA ringm extra_ringsm",
    /*  87 */
    "ringz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET",
    /*  88 */ "extra_ringsz ::=",
    /*  89 */ "extra_ringsz ::= VANUATU_COMMA ringz extra_ringsz",
    /*  90 */
    "ringzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET",
    /*  91 */ "extra_ringszm ::=",
    /*  92 */ "extra_ringszm ::= VANUATU_COMMA ringzm extra_ringszm",
    /*  93 */ "multipoint ::= VANUATU_MULTIPOINT multipoint_text",
    /*  94 */ "multipointm ::= VANUATU_MULTIPOINT_M multipoint_textm",
    /*  95 */ "multipointz ::= VANUATU_MULTIPOINT_Z multipoint_textz",
    /*  96 */ "multipointzm ::= VANUATU_MULTIPOINT_ZM multipoint_textzm",
    /*  97 */
    "multipoint_text ::= VANUATU_OPEN_BRACKET point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET",
    /*  98 */
    "multipoint_textm ::= VANUATU_OPEN_BRACKET point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET",
    /*  99 */
    "multipoint_textz ::= VANUATU_OPEN_BRACKET point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET",
    /* 100 */
    "multipoint_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET",
    /* 101 */
    "multipoint_text ::= VANUATU_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy VANUATU_CLOSE_BRACKET",
    /* 102 */
    "multipoint_textm ::= VANUATU_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym VANUATU_CLOSE_BRACKET",
    /* 103 */
    "multipoint_textz ::= VANUATU_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz VANUATU_CLOSE_BRACKET",
    /* 104 */
    "multipoint_textzm ::= VANUATU_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm VANUATU_CLOSE_BRACKET",
    /* 105 */
    "multilinestring ::= VANUATU_MULTILINESTRING multilinestring_text",
    /* 106 */
    "multilinestringm ::= VANUATU_MULTILINESTRING_M multilinestring_textm",
    /* 107 */
    "multilinestringz ::= VANUATU_MULTILINESTRING_Z multilinestring_textz",
    /* 108 */
    "multilinestringzm ::= VANUATU_MULTILINESTRING_ZM multilinestring_textzm",
    /* 109 */
    "multilinestring_text ::= VANUATU_OPEN_BRACKET linestring_text multilinestring_text2 VANUATU_CLOSE_BRACKET",
    /* 110 */ "multilinestring_text2 ::=",
    /* 111 */
    "multilinestring_text2 ::= VANUATU_COMMA linestring_text multilinestring_text2",
    /* 112 */
    "multilinestring_textm ::= VANUATU_OPEN_BRACKET linestring_textm multilinestring_textm2 VANUATU_CLOSE_BRACKET",
    /* 113 */ "multilinestring_textm2 ::=",
    /* 114 */
    "multilinestring_textm2 ::= VANUATU_COMMA linestring_textm multilinestring_textm2",
    /* 115 */
    "multilinestring_textz ::= VANUATU_OPEN_BRACKET linestring_textz multilinestring_textz2 VANUATU_CLOSE_BRACKET",
    /* 116 */ "multilinestring_textz2 ::=",
    /* 117 */
    "multilinestring_textz2 ::= VANUATU_COMMA linestring_textz multilinestring_textz2",
    /* 118 */
    "multilinestring_textzm ::= VANUATU_OPEN_BRACKET linestring_textzm multilinestring_textzm2 VANUATU_CLOSE_BRACKET",
    /* 119 */ "multilinestring_textzm2 ::=",
    /* 120 */
    "multilinestring_textzm2 ::= VANUATU_COMMA linestring_textzm multilinestring_textzm2",
    /* 121 */ "multipolygon ::= VANUATU_MULTIPOLYGON multipolygon_text",
    /* 122 */ "multipolygonm ::= VANUATU_MULTIPOLYGON_M multipolygon_textm",
    /* 123 */ "multipolygonz ::= VANUATU_MULTIPOLYGON_Z multipolygon_textz",
    /* 124 */ "multipolygonzm ::= VANUATU_MULTIPOLYGON_ZM multipolygon_textzm",
    /* 125 */
    "multipolygon_text ::= VANUATU_OPEN_BRACKET polygon_text multipolygon_text2 VANUATU_CLOSE_BRACKET",
    /* 126 */ "multipolygon_text2 ::=",
    /* 127 */
    "multipolygon_text2 ::= VANUATU_COMMA polygon_text multipolygon_text2",
    /* 128 */
    "multipolygon_textm ::= VANUATU_OPEN_BRACKET polygon_textm multipolygon_textm2 VANUATU_CLOSE_BRACKET",
    /* 129 */ "multipolygon_textm2 ::=",
    /* 130 */
    "multipolygon_textm2 ::= VANUATU_COMMA polygon_textm multipolygon_textm2",
    /* 131 */
    "multipolygon_textz ::= VANUATU_OPEN_BRACKET polygon_textz multipolygon_textz2 VANUATU_CLOSE_BRACKET",
    /* 132 */ "multipolygon_textz2 ::=",
    /* 133 */
    "multipolygon_textz2 ::= VANUATU_COMMA polygon_textz multipolygon_textz2",
    /* 134 */
    "multipolygon_textzm ::= VANUATU_OPEN_BRACKET polygon_textzm multipolygon_textzm2 VANUATU_CLOSE_BRACKET",
    /* 135 */ "multipolygon_textzm2 ::=",
    /* 136 */
    "multipolygon_textzm2 ::= VANUATU_COMMA polygon_textzm multipolygon_textzm2",
    /* 137 */ "geocoll ::= VANUATU_GEOMETRYCOLLECTION geocoll_text",
    /* 138 */ "geocollm ::= VANUATU_GEOMETRYCOLLECTION_M geocoll_textm",
    /* 139 */ "geocollz ::= VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz",
    /* 140 */ "geocollzm ::= VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm",
    /* 141 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET point geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 142 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET linestring geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 143 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET polygon geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 144 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET multipoint geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 145 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET multilinestring geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 146 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET multipolygon geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 147 */
    "geocoll_text ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 VANUATU_CLOSE_BRACKET",
    /* 148 */ "geocoll_text2 ::=",
    /* 149 */ "geocoll_text2 ::= VANUATU_COMMA point geocoll_text2",
    /* 150 */ "geocoll_text2 ::= VANUATU_COMMA linestring geocoll_text2",
    /* 151 */ "geocoll_text2 ::= VANUATU_COMMA polygon geocoll_text2",
    /* 152 */ "geocoll_text2 ::= VANUATU_COMMA multipoint geocoll_text2",
    /* 153 */ "geocoll_text2 ::= VANUATU_COMMA multilinestring geocoll_text2",
    /* 154 */ "geocoll_text2 ::= VANUATU_COMMA multipolygon geocoll_text2",
    /* 155 */
    "geocoll_text2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2",
    /* 156 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET pointm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 157 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET linestringm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 158 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET polygonm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 159 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET multipointm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 160 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET multilinestringm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 161 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET multipolygonm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 162 */
    "geocoll_textm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 VANUATU_CLOSE_BRACKET",
    /* 163 */ "geocoll_textm2 ::=",
    /* 164 */ "geocoll_textm2 ::= VANUATU_COMMA pointm geocoll_textm2",
    /* 165 */ "geocoll_textm2 ::= VANUATU_COMMA linestringm geocoll_textm2",
    /* 166 */ "geocoll_textm2 ::= VANUATU_COMMA polygonm geocoll_textm2",
    /* 167 */ "geocoll_textm2 ::= VANUATU_COMMA multipointm geocoll_textm2",
    /* 168 */
    "geocoll_textm2 ::= VANUATU_COMMA multilinestringm geocoll_textm2",
    /* 169 */ "geocoll_textm2 ::= VANUATU_COMMA multipolygonm geocoll_textm2",
    /* 170 */
    "geocoll_textm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2",
    /* 171 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET pointz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 172 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET linestringz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 173 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET polygonz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 174 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET multipointz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 175 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET multilinestringz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 176 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET multipolygonz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 177 */
    "geocoll_textz ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 VANUATU_CLOSE_BRACKET",
    /* 178 */ "geocoll_textz2 ::=",
    /* 179 */ "geocoll_textz2 ::= VANUATU_COMMA pointz geocoll_textz2",
    /* 180 */ "geocoll_textz2 ::= VANUATU_COMMA linestringz geocoll_textz2",
    /* 181 */ "geocoll_textz2 ::= VANUATU_COMMA polygonz geocoll_textz2",
    /* 182 */ "geocoll_textz2 ::= VANUATU_COMMA multipointz geocoll_textz2",
    /* 183 */
    "geocoll_textz2 ::= VANUATU_COMMA multilinestringz geocoll_textz2",
    /* 184 */ "geocoll_textz2 ::= VANUATU_COMMA multipolygonz geocoll_textz2",
    /* 185 */
    "geocoll_textz2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2",
    /* 186 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET pointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 187 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET linestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 188 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET polygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 189 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET multipointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 190 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET multilinestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 191 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET multipolygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 192 */
    "geocoll_textzm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 VANUATU_CLOSE_BRACKET",
    /* 193 */ "geocoll_textzm2 ::=",
    /* 194 */ "geocoll_textzm2 ::= VANUATU_COMMA pointzm geocoll_textzm2",
    /* 195 */ "geocoll_textzm2 ::= VANUATU_COMMA linestringzm geocoll_textzm2",
    /* 196 */ "geocoll_textzm2 ::= VANUATU_COMMA polygonzm geocoll_textzm2",
    /* 197 */ "geocoll_textzm2 ::= VANUATU_COMMA multipointzm geocoll_textzm2",
    /* 198 */
    "geocoll_textzm2 ::= VANUATU_COMMA multilinestringzm geocoll_textzm2",
    /* 199 */
    "geocoll_textzm2 ::= VANUATU_COMMA multipolygonzm geocoll_textzm2",
    /* 200 */
    "geocoll_textzm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.
*/
static void
yyGrowStack (yyParser * p)
{
    int newSize;
    yyStackEntry *pNew;

    newSize = p->yystksz * 2 + 100;
    pNew = realloc (p->yystack, newSize * sizeof (pNew[0]));
    if (pNew)
      {
	  p->yystack = pNew;
	  p->yystksz = newSize;
#ifndef NDEBUG
	  if (yyTraceFILE)
	    {
		fprintf (yyTraceFILE, "%sStack grows to %d entries!\n",
			 yyTracePrompt, p->yystksz);
	    }
#endif
      }
}
#endif

/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to Parse and ParseFree.
*/
void *
ParseAlloc (void *(*mallocProc) (size_t))
{
    yyParser *pParser;
    pParser = (yyParser *) (*mallocProc) ((size_t) sizeof (yyParser));
    if (pParser)
      {
	  pParser->yyidx = -1;
#ifdef YYTRACKMAXSTACKDEPTH
	  pParser->yyidxMax = 0;
#endif
#if YYSTACKDEPTH<=0
	  pParser->yystack = NULL;
	  pParser->yystksz = 0;
	  yyGrowStack (pParser);
#endif
      }
    return pParser;
}

/* The following function deletes the value associated with a
** symbol.  The symbol can be either a terminal or nonterminal.
** "yymajor" is the symbol code, and "yypminor" is a pointer to
** the value.
*/
static void
yy_destructor (yyParser * yypParser,	/* The parser */
	       YYCODETYPE yymajor,	/* Type code for object to destroy */
	       YYMINORTYPE * yypminor	/* The object to be destroyed */
    )
{
    ParseARG_FETCH;
    switch (yymajor)
      {
	  /* Here is inserted the actions which take place when a
	   ** terminal or non-terminal is destroyed.  This can happen
	   ** when the symbol is popped from the stack during a
	   ** reduce or during error processing or when a parser is 
	   ** being destroyed before it is finished parsing.
	   **
	   ** Note: during a reduce, the only symbols destroyed are those
	   ** which appear on the RHS of the rule, but which are not used
	   ** inside the C code.
	   */
      default:
	  break;		/* If no destructor action specified: do nothing */
      }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
**
** Return the major token number for the symbol popped.
*/
static int
yy_pop_parser_stack (yyParser * pParser)
{
    YYCODETYPE yymajor;
    yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

    if (pParser->yyidx < 0)
	return 0;
#ifndef NDEBUG
    if (yyTraceFILE && pParser->yyidx >= 0)
      {
	  fprintf (yyTraceFILE, "%sPopping %s\n",
		   yyTracePrompt, yyTokenName[yytos->major]);
      }
#endif
    yymajor = yytos->major;
    yy_destructor (pParser, yymajor, &yytos->minor);
    pParser->yyidx--;
    return yymajor;
}

/* 
** Deallocate and destroy a parser.  Destructors are all called for
** all stack elements before shutting the parser down.
**
** Inputs:
** <ul>
** <li>  A pointer to the parser.  This should be a pointer
**       obtained from ParseAlloc.
** <li>  A pointer to a function used to reclaim memory obtained
**       from malloc.
** </ul>
*/
void
ParseFree (void *p,		/* The parser to be deleted */
	   void (*freeProc) (void *)	/* Function used to reclaim memory */
    )
{
    yyParser *pParser = (yyParser *) p;
    if (pParser == 0)
	return;
    while (pParser->yyidx >= 0)
	yy_pop_parser_stack (pParser);
#if YYSTACKDEPTH<=0
    free (pParser->yystack);
#endif
    (*freeProc) ((void *) pParser);
}

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int
ParseStackPeak (void *p)
{
    yyParser *pParser = (yyParser *) p;
    return pParser->yyidxMax;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_shift_action (yyParser * pParser,	/* The parser */
		      YYCODETYPE iLookAhead	/* The look-ahead token */
    )
{
    int i;
    int stateno = pParser->yystack[pParser->yyidx].stateno;

    if (stateno > YY_SHIFT_MAX
	|| (i = yy_shift_ofst[stateno]) == YY_SHIFT_USE_DFLT)
      {
	  return yy_default[stateno];
      }
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  if (iLookAhead > 0)
	    {
#ifdef YYFALLBACK
		YYCODETYPE iFallback;	/* Fallback token */
		if (iLookAhead < sizeof (yyFallback) / sizeof (yyFallback[0])
		    && (iFallback = yyFallback[iLookAhead]) != 0)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sFALLBACK %s => %s\n",
				     yyTracePrompt, yyTokenName[iLookAhead],
				     yyTokenName[iFallback]);
			}
#endif
		      return yy_find_shift_action (pParser, iFallback);
		  }
#endif
#ifdef YYWILDCARD
		{
		    int j = i - iLookAhead + YYWILDCARD;
		    if (j >= 0 && j < YY_SZ_ACTTAB
			&& yy_lookahead[j] == YYWILDCARD)
		      {
#ifndef NDEBUG
			  if (yyTraceFILE)
			    {
				fprintf (yyTraceFILE, "%sWILDCARD %s => %s\n",
					 yyTracePrompt, yyTokenName[iLookAhead],
					 yyTokenName[YYWILDCARD]);
			    }
#endif /* NDEBUG */
			  return yy_action[j];
		      }
		}
#endif /* YYWILDCARD */
	    }
	  return yy_default[stateno];
      }
    else
      {
	  return yy_action[i];
      }























































}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
**
** If the look-ahead token is YYNOCODE, then check to see if the action is
** independent of the look-ahead.  If it is, return the action, otherwise
** return YY_NO_ACTION.
*/
static int
yy_find_reduce_action (int stateno,	/* Current state number */
		       YYCODETYPE iLookAhead	/* The look-ahead token */

    )
{
    int i;
#ifdef YYERRORSYMBOL

    if (stateno > YY_REDUCE_MAX)
      {
	  return yy_default[stateno];
      }
#else

    assert (stateno <= YY_REDUCE_MAX);
#endif
    i = yy_reduce_ofst[stateno];

    assert (i != YY_REDUCE_USE_DFLT);
    assert (iLookAhead != YYNOCODE);
    i += iLookAhead;
#ifdef YYERRORSYMBOL

    if (i < 0 || i >= YY_SZ_ACTTAB || yy_lookahead[i] != iLookAhead)
      {
	  return yy_default[stateno];
      }
#else

    assert (i >= 0 && i < YY_SZ_ACTTAB);
    assert (yy_lookahead[i] == iLookAhead);
#endif
    return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void
yyStackOverflow (yyParser * yypParser, YYMINORTYPE * yypMinor)
{
    ParseARG_FETCH;
    yypParser->yyidx--;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sStack Overflow!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will execute if the parser
     ** stack every overflows */


    spatialite_e ("Giving up.  Parser stack overflow\n");

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument var */
}






















/*
** Perform a shift action.
*/
static void
yy_shift (yyParser * yypParser,	/* The parser to be shifted */
	  int yyNewState,	/* The new state to shift in */
	  int yyMajor,		/* The major token to shift in */
	  YYMINORTYPE * yypMinor	/* Pointer to the minor token to shift in */
    )
{
    yyStackEntry *yytos;
    yypParser->yyidx++;
#ifdef YYTRACKMAXSTACKDEPTH
    if (yypParser->yyidx > yypParser->yyidxMax)
      {
	  yypParser->yyidxMax = yypParser->yyidx;
      }
#endif
#if YYSTACKDEPTH>0
    if (yypParser->yyidx >= YYSTACKDEPTH)
      {
	  yyStackOverflow (yypParser, yypMinor);
	  return;
      }
#else
    if (yypParser->yyidx >= yypParser->yystksz)
      {
	  yyGrowStack (yypParser);
	  if (yypParser->yyidx >= yypParser->yystksz)
	    {
		yyStackOverflow (yypParser, yypMinor);
		return;
	    }
      }
#endif
    yytos = &yypParser->yystack[yypParser->yyidx];
    yytos->stateno = (YYACTIONTYPE) yyNewState;
    yytos->major = (YYCODETYPE) yyMajor;
    yytos->minor = *yypMinor;
#ifndef NDEBUG
    if (yyTraceFILE && yypParser->yyidx > 0)
      {
	  int i;
	  fprintf (yyTraceFILE, "%sShift %d\n", yyTracePrompt, yyNewState);
	  fprintf (yyTraceFILE, "%sStack:", yyTracePrompt);
	  for (i = 1; i <= yypParser->yyidx; i++)
	      fprintf (yyTraceFILE, " %s",
		       yyTokenName[yypParser->yystack[i].major]);
	  fprintf (yyTraceFILE, "\n");
      }
#endif
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct
{
    YYCODETYPE lhs;		/* Symbol on the left-hand side of the rule */
    unsigned char nrhs;		/* Number of right-hand side symbols in the rule */
} yyRuleInfo[] =
{
    {
    35, 1},
    {
    36, 0},
    {
    36, 3},
    {
    37, 1},
    {
    38, 1},
    {
    38, 1},
    {
    38, 1},
    {
    38, 1},
    {
    39, 1},
    {
    39, 1},
    {
    39, 1},
    {
    39, 1},
    {
    39, 1},
    {
    39, 1},
    {
    39, 1},
    {
    40, 1},
    {
    40, 1},
    {
    40, 1},
    {
    40, 1},
    {
    40, 1},
    {
    40, 1},
    {
    40, 1},
    {
    41, 1},
    {
    41, 1},
    {
    41, 1},
    {
    41, 1},
    {
    41, 1},
    {
    41, 1},
    {
    41, 1},
    {
    42, 1},
    {
    42, 1},
    {
    42, 1},
    {
    42, 1},
    {
    42, 1},
    {
    42, 1},
    {
    42, 1},
    {
    43, 4},
    {
    57, 4},
    {
    50, 4},
    {
    64, 4},
    {
    75, 4},
    {
    77, 5},
    {
    78, 5},
    {
    79, 6},
    {
    71, 2},
    {
    72, 3},
    {
    73, 3},
    {
    74, 4},
    {
    76, 1},
    {
    80, 0},
    {
    80, 3},
    {
    81, 0},
    {
    81, 3},
    {
    82, 0},
    {
    82, 3},
    {
    83, 0},
    {
    83, 3},
    {
    84, 0},
    {
    84, 3},
    {
    85, 0},
    {
    85, 3},
    {
    86, 0},
    {
    86, 3},
    {
    87, 0},
    {
    87, 3},
    {
    44, 2},
    {
    58, 2},
    {
    51, 2},
    {
    65, 2},
    {
    88, 6},
    {
    89, 6},
    {
    90, 6},
    {
    91, 6},
    {
    45, 2},
    {
    59, 2},
    {
    52, 2},
    {
    66, 2},
    {
    92, 4},
    {
    93, 4},
    {
    94, 4},
    {
    95, 4},
    {
    96, 10},
    {
    97, 0},
    {
    97, 3},
    {
    98, 10},
    {
    99, 0},
    {
    99, 3},
    {
    100, 10},
    {
    101, 0},
    {
    101, 3},
    {
    102, 10},
    {
    103, 0},
    {
    103, 3},
    {
    46, 2},
    {
    60, 2},
    {
    53, 2},
    {
    67, 2},
    {
    104, 4},
    {
    105, 4},
    {
    106, 4},
    {
    107, 4},
    {
    104, 4},
    {
    105, 4},
    {
    106, 4},
    {
    107, 4},
    {
    47, 2},
    {
    61, 2},
    {
    54, 2},
    {
    68, 2},
    {
    108, 4},
    {
    112, 0},
    {
    112, 3},
    {
    109, 4},
    {
    113, 0},
    {
    113, 3},
    {
    110, 4},
    {
    114, 0},
    {
    114, 3},
    {
    111, 4},
    {
    115, 0},
    {
    115, 3},
    {
    48, 2},
    {
    62, 2},
    {
    55, 2},
    {
    69, 2},
    {
    116, 4},
    {
    120, 0},
    {
    120, 3},
    {
    117, 4},
    {
    121, 0},
    {
    121, 3},
    {
    118, 4},
    {
    122, 0},
    {
    122, 3},
    {
    119, 4},
    {
    123, 0},
    {
    123, 3},
    {
    49, 2},
    {
    63, 2},
    {
    56, 2},
    {
    70, 2},
    {
    124, 4},
    {
    124, 4},
    {
    124, 4},
    {
    124, 4},
    {
    124, 4},
    {
    124, 4},
    {
    124, 5},
    {
    128, 0},
    {
    128, 3},
    {
    128, 3},
    {
    128, 3},
    {
    128, 3},
    {
    128, 3},
    {
    128, 3},
    {
    128, 4},
    {
    125, 4},
    {
    125, 4},
    {
    125, 4},
    {
    125, 4},
    {
    125, 4},
    {
    125, 4},
    {
    125, 5},
    {
    129, 0},
    {
    129, 3},
    {
    129, 3},
    {
    129, 3},
    {
    129, 3},
    {
    129, 3},
    {
    129, 3},
    {
    129, 4},
    {
    126, 4},
    {
    126, 4},
    {
    126, 4},
    {
    126, 4},
    {
    126, 4},
    {
    126, 4},
    {
    126, 5},
    {
    130, 0},
    {
    130, 3},
    {
    130, 3},
    {
    130, 3},
    {
    130, 3},
    {
    130, 3},
    {
    130, 3},
    {
    130, 4},
    {
    127, 4},
    {
    127, 4},
    {
    127, 4},
    {
    127, 4},
    {
    127, 4},
    {
    127, 4},
    {
    127, 5},
    {
    131, 0},
    {
    131, 3},
    {
    131, 3},
    {
    131, 3},
    {
    131, 3},
    {
    131, 3},
    {
    131, 3},
    {
131, 4},};

static void yy_accept (yyParser *);	/* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
*/
static void
yy_reduce (yyParser * yypParser,	/* The parser */
	   int yyruleno		/* Number of the rule by which to reduce */
    )
{
    int yygoto;			/* The next state */
    int yyact;			/* The next action */
    YYMINORTYPE yygotominor;	/* The LHS of the rule reduced */
    yyStackEntry *yymsp;	/* The top of the parser's stack */
    int yysize;			/* Amount to pop the stack */
    ParseARG_FETCH;
    yymsp = &yypParser->yystack[yypParser->yyidx];
#ifndef NDEBUG
    if (yyTraceFILE && yyruleno >= 0
	&& yyruleno < (int) (sizeof (yyRuleName) / sizeof (yyRuleName[0])))
      {
	  fprintf (yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
		   yyRuleName[yyruleno]);
      }
#endif /* NDEBUG */

    /* Silence complaints from purify about yygotominor being uninitialized
     ** in some cases when it is copied into the stack after the following
     ** switch.  yygotominor is uninitialized when a rule reduces that does
     ** not set the value of its left-hand side nonterminal.  Leaving the
     ** value of the nonterminal uninitialized is utterly harmless as long
     ** as the value is never used.  So really the only thing this code
     ** accomplishes is to quieten purify.  
     **
     ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
     ** without this code, their parser segfaults.  I'm not sure what there
     ** parser is doing to make this happen.  This is the second bug report
     ** from wireshark this week.  Clearly they are stressing Lemon in ways
     ** that it has not been previously stressed...  (SQLite ticket #2172)
     */
    /*memset(&yygotominor, 0, sizeof(yygotominor)); */
    yygotominor = yyzerominor;


    switch (yyruleno)
      {
	  /* Beginning here are the reduction cases.  A typical example
	   ** follows:
	   **   case 0:
	   **  #line <lineno> <grammarfile>
	   **     { ... }           // User supplied code
	   **  #line <lineno> <thisfile>
	   **     break;
	   */
      case 8:			/* geo_text ::= point */
      case 9:			/* geo_text ::= linestring */
	  yytestcase (yyruleno == 9);
      case 10:			/* geo_text ::= polygon */
	  yytestcase (yyruleno == 10);
      case 11:			/* geo_text ::= multipoint */
	  yytestcase (yyruleno == 11);
      case 12:			/* geo_text ::= multilinestring */
	  yytestcase (yyruleno == 12);
      case 13:			/* geo_text ::= multipolygon */
	  yytestcase (yyruleno == 13);
      case 14:			/* geo_text ::= geocoll */
	  yytestcase (yyruleno == 14);
      case 15:			/* geo_textz ::= pointz */
	  yytestcase (yyruleno == 15);
      case 16:			/* geo_textz ::= linestringz */
	  yytestcase (yyruleno == 16);
      case 17:			/* geo_textz ::= polygonz */
	  yytestcase (yyruleno == 17);
      case 18:			/* geo_textz ::= multipointz */
	  yytestcase (yyruleno == 18);
      case 19:			/* geo_textz ::= multilinestringz */
	  yytestcase (yyruleno == 19);
      case 20:			/* geo_textz ::= multipolygonz */
	  yytestcase (yyruleno == 20);
      case 21:			/* geo_textz ::= geocollz */
	  yytestcase (yyruleno == 21);
      case 22:			/* geo_textm ::= pointm */
	  yytestcase (yyruleno == 22);
      case 23:			/* geo_textm ::= linestringm */
	  yytestcase (yyruleno == 23);
      case 24:			/* geo_textm ::= polygonm */
	  yytestcase (yyruleno == 24);
      case 25:			/* geo_textm ::= multipointm */
	  yytestcase (yyruleno == 25);
      case 26:			/* geo_textm ::= multilinestringm */
	  yytestcase (yyruleno == 26);
      case 27:			/* geo_textm ::= multipolygonm */
	  yytestcase (yyruleno == 27);
      case 28:			/* geo_textm ::= geocollm */
	  yytestcase (yyruleno == 28);
      case 29:			/* geo_textzm ::= pointzm */
	  yytestcase (yyruleno == 29);
      case 30:			/* geo_textzm ::= linestringzm */
	  yytestcase (yyruleno == 30);
      case 31:			/* geo_textzm ::= polygonzm */
	  yytestcase (yyruleno == 31);
      case 32:			/* geo_textzm ::= multipointzm */
	  yytestcase (yyruleno == 32);
      case 33:			/* geo_textzm ::= multilinestringzm */
	  yytestcase (yyruleno == 33);
      case 34:			/* geo_textzm ::= multipolygonzm */
	  yytestcase (yyruleno == 34);
      case 35:			/* geo_textzm ::= geocollzm */
	  yytestcase (yyruleno == 35);
	  {
	      p_data->result = yymsp[0].minor.yy0;
	  }
	  break;
      case 36:			/* point ::= VANUATU_POINT VANUATU_OPEN_BRACKET point_coordxy VANUATU_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  vanuatu_buildGeomFromPoint (p_data,
					      (gaiaPointPtr) yymsp[-1].minor.
					      yy0);
	  }
	  break;
      case 37:			/* pointm ::= VANUATU_POINT_M VANUATU_OPEN_BRACKET point_coordxym VANUATU_CLOSE_BRACKET */
      case 38:			/* pointz ::= VANUATU_POINT_Z VANUATU_OPEN_BRACKET point_coordxyz VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 38);
      case 39:			/* pointzm ::= VANUATU_POINT_ZM VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 39);
	  {
	      yygotominor.yy0 =
		  vanuatu_buildGeomFromPoint (p_data,
					      (gaiaPointPtr) yymsp[-1].minor.
					      yy0);
	  }
	  break;
      case 40:			/* point_brkt_coordxy ::= VANUATU_OPEN_BRACKET coord coord VANUATU_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xy (p_data,
					     (double *) yymsp[-2].minor.yy0,
					     (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 41:			/* point_brkt_coordxym ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xym (p_data,
					      (double *) yymsp[-3].minor.yy0,
					      (double *) yymsp[-2].minor.yy0,
					      (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 42:			/* point_brkt_coordxyz ::= VANUATU_OPEN_BRACKET coord coord coord VANUATU_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xyz (p_data,
					      (double *) yymsp[-3].minor.yy0,
					      (double *) yymsp[-2].minor.yy0,
					      (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 43:			/* point_brkt_coordxyzm ::= VANUATU_OPEN_BRACKET coord coord coord coord VANUATU_CLOSE_BRACKET */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xyzm (p_data,
					       (double *) yymsp[-4].minor.yy0,
					       (double *) yymsp[-3].minor.yy0,
					       (double *) yymsp[-2].minor.yy0,
					       (double *) yymsp[-1].minor.yy0);
	  }
	  break;
      case 44:			/* point_coordxy ::= coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xy (p_data,
					     (double *) yymsp[-1].minor.yy0,
					     (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 45:			/* point_coordxym ::= coord coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xym (p_data,
					      (double *) yymsp[-2].minor.yy0,
					      (double *) yymsp[-1].minor.yy0,
					      (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 46:			/* point_coordxyz ::= coord coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xyz (p_data,
					      (double *) yymsp[-2].minor.yy0,
					      (double *) yymsp[-1].minor.yy0,
					      (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 47:			/* point_coordxyzm ::= coord coord coord coord */
	  {
	      yygotominor.yy0 =
		  (void *) vanuatu_point_xyzm (p_data,
					       (double *) yymsp[-3].minor.yy0,
					       (double *) yymsp[-2].minor.yy0,
					       (double *) yymsp[-1].minor.yy0,
					       (double *) yymsp[0].minor.yy0);
	  }
	  break;
      case 48:			/* coord ::= VANUATU_NUM */
      case 93:			/* multipoint ::= VANUATU_MULTIPOINT multipoint_text */
	  yytestcase (yyruleno == 93);
      case 94:			/* multipointm ::= VANUATU_MULTIPOINT_M multipoint_textm */
	  yytestcase (yyruleno == 94);
      case 95:			/* multipointz ::= VANUATU_MULTIPOINT_Z multipoint_textz */
	  yytestcase (yyruleno == 95);
      case 96:			/* multipointzm ::= VANUATU_MULTIPOINT_ZM multipoint_textzm */
	  yytestcase (yyruleno == 96);
      case 105:		/* multilinestring ::= VANUATU_MULTILINESTRING multilinestring_text */
	  yytestcase (yyruleno == 105);
      case 106:		/* multilinestringm ::= VANUATU_MULTILINESTRING_M multilinestring_textm */
	  yytestcase (yyruleno == 106);
      case 107:		/* multilinestringz ::= VANUATU_MULTILINESTRING_Z multilinestring_textz */
	  yytestcase (yyruleno == 107);
      case 108:		/* multilinestringzm ::= VANUATU_MULTILINESTRING_ZM multilinestring_textzm */
	  yytestcase (yyruleno == 108);
      case 121:		/* multipolygon ::= VANUATU_MULTIPOLYGON multipolygon_text */
	  yytestcase (yyruleno == 121);
      case 122:		/* multipolygonm ::= VANUATU_MULTIPOLYGON_M multipolygon_textm */
	  yytestcase (yyruleno == 122);
      case 123:		/* multipolygonz ::= VANUATU_MULTIPOLYGON_Z multipolygon_textz */
	  yytestcase (yyruleno == 123);
      case 124:		/* multipolygonzm ::= VANUATU_MULTIPOLYGON_ZM multipolygon_textzm */
	  yytestcase (yyruleno == 124);
      case 137:		/* geocoll ::= VANUATU_GEOMETRYCOLLECTION geocoll_text */
	  yytestcase (yyruleno == 137);
      case 138:		/* geocollm ::= VANUATU_GEOMETRYCOLLECTION_M geocoll_textm */
	  yytestcase (yyruleno == 138);
      case 139:		/* geocollz ::= VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz */
	  yytestcase (yyruleno == 139);
      case 140:		/* geocollzm ::= VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm */
	  yytestcase (yyruleno == 140);
	  {
	      yygotominor.yy0 = yymsp[0].minor.yy0;
	  }
	  break;
      case 49:			/* extra_brkt_pointsxy ::= */
      case 51:			/* extra_brkt_pointsxym ::= */
	  yytestcase (yyruleno == 51);
      case 53:			/* extra_brkt_pointsxyz ::= */
	  yytestcase (yyruleno == 53);
      case 55:			/* extra_brkt_pointsxyzm ::= */
	  yytestcase (yyruleno == 55);
      case 57:			/* extra_pointsxy ::= */
	  yytestcase (yyruleno == 57);
      case 59:			/* extra_pointsxym ::= */
	  yytestcase (yyruleno == 59);
      case 61:			/* extra_pointsxyz ::= */
	  yytestcase (yyruleno == 61);
      case 63:			/* extra_pointsxyzm ::= */
	  yytestcase (yyruleno == 63);
      case 82:			/* extra_rings ::= */
	  yytestcase (yyruleno == 82);
      case 85:			/* extra_ringsm ::= */
	  yytestcase (yyruleno == 85);
      case 88:			/* extra_ringsz ::= */
	  yytestcase (yyruleno == 88);
      case 91:			/* extra_ringszm ::= */
	  yytestcase (yyruleno == 91);
      case 110:		/* multilinestring_text2 ::= */
	  yytestcase (yyruleno == 110);
      case 113:		/* multilinestring_textm2 ::= */
	  yytestcase (yyruleno == 113);
      case 116:		/* multilinestring_textz2 ::= */
	  yytestcase (yyruleno == 116);
      case 119:		/* multilinestring_textzm2 ::= */
	  yytestcase (yyruleno == 119);
      case 126:		/* multipolygon_text2 ::= */
	  yytestcase (yyruleno == 126);
      case 129:		/* multipolygon_textm2 ::= */
	  yytestcase (yyruleno == 129);
      case 132:		/* multipolygon_textz2 ::= */
	  yytestcase (yyruleno == 132);
      case 135:		/* multipolygon_textzm2 ::= */
	  yytestcase (yyruleno == 135);
      case 148:		/* geocoll_text2 ::= */
	  yytestcase (yyruleno == 148);
      case 163:		/* geocoll_textm2 ::= */
	  yytestcase (yyruleno == 163);
      case 178:		/* geocoll_textz2 ::= */
	  yytestcase (yyruleno == 178);
      case 193:		/* geocoll_textzm2 ::= */
	  yytestcase (yyruleno == 193);
	  {
	      yygotominor.yy0 = NULL;
	  }
	  break;
      case 50:			/* extra_brkt_pointsxy ::= VANUATU_COMMA point_brkt_coordxy extra_brkt_pointsxy */
      case 52:			/* extra_brkt_pointsxym ::= VANUATU_COMMA point_brkt_coordxym extra_brkt_pointsxym */
	  yytestcase (yyruleno == 52);
      case 54:			/* extra_brkt_pointsxyz ::= VANUATU_COMMA point_brkt_coordxyz extra_brkt_pointsxyz */
	  yytestcase (yyruleno == 54);
      case 56:			/* extra_brkt_pointsxyzm ::= VANUATU_COMMA point_brkt_coordxyzm extra_brkt_pointsxyzm */
	  yytestcase (yyruleno == 56);
      case 58:			/* extra_pointsxy ::= VANUATU_COMMA point_coordxy extra_pointsxy */
	  yytestcase (yyruleno == 58);
      case 60:			/* extra_pointsxym ::= VANUATU_COMMA point_coordxym extra_pointsxym */
	  yytestcase (yyruleno == 60);
      case 62:			/* extra_pointsxyz ::= VANUATU_COMMA point_coordxyz extra_pointsxyz */
	  yytestcase (yyruleno == 62);
      case 64:			/* extra_pointsxyzm ::= VANUATU_COMMA point_coordxyzm extra_pointsxyzm */
	  yytestcase (yyruleno == 64);
	  {
	      ((gaiaPointPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 65:			/* linestring ::= VANUATU_LINESTRING linestring_text */
      case 66:			/* linestringm ::= VANUATU_LINESTRING_M linestring_textm */
	  yytestcase (yyruleno == 66);
      case 67:			/* linestringz ::= VANUATU_LINESTRING_Z linestring_textz */
	  yytestcase (yyruleno == 67);
      case 68:			/* linestringzm ::= VANUATU_LINESTRING_ZM linestring_textzm */
	  yytestcase (yyruleno == 68);
	  {
	      yygotominor.yy0 =
		  vanuatu_buildGeomFromLinestring (p_data,
						   (gaiaLinestringPtr)
						   yymsp[0].minor.yy0);
	  }
	  break;
      case 69:			/* linestring_text ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_linestring_xy (p_data,
						  (gaiaPointPtr)
						  yymsp[-4].minor.yy0);
	  }
	  break;
      case 70:			/* linestring_textm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_linestring_xym (p_data,
						   (gaiaPointPtr)
						   yymsp[-4].minor.yy0);
	  }
	  break;
      case 71:			/* linestring_textz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_linestring_xyz (p_data,
						   (gaiaPointPtr)
						   yymsp[-4].minor.yy0);
	  }
	  break;
      case 72:			/* linestring_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_linestring_xyzm (p_data,
						    (gaiaPointPtr)
						    yymsp[-4].minor.yy0);
	  }
	  break;
      case 73:			/* polygon ::= VANUATU_POLYGON polygon_text */
      case 74:			/* polygonm ::= VANUATU_POLYGON_M polygon_textm */
	  yytestcase (yyruleno == 74);
      case 75:			/* polygonz ::= VANUATU_POLYGON_Z polygon_textz */
	  yytestcase (yyruleno == 75);
      case 76:			/* polygonzm ::= VANUATU_POLYGON_ZM polygon_textzm */
	  yytestcase (yyruleno == 76);
	  {
	      yygotominor.yy0 =
		  vanuatu_buildGeomFromPolygon (p_data,
						(gaiaPolygonPtr) yymsp[0].minor.
						yy0);
	  }
	  break;
      case 77:			/* polygon_text ::= VANUATU_OPEN_BRACKET ring extra_rings VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_polygon_xy (p_data,
					       (gaiaRingPtr) yymsp[-2].minor.
					       yy0);
	  }
	  break;
      case 78:			/* polygon_textm ::= VANUATU_OPEN_BRACKET ringm extra_ringsm VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_polygon_xym (p_data,
						(gaiaRingPtr) yymsp[-2].minor.
						yy0);
	  }
	  break;
      case 79:			/* polygon_textz ::= VANUATU_OPEN_BRACKET ringz extra_ringsz VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_polygon_xyz (p_data,
						(gaiaRingPtr) yymsp[-2].minor.
						yy0);
	  }
	  break;
      case 80:			/* polygon_textzm ::= VANUATU_OPEN_BRACKET ringzm extra_ringszm VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaRingPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_polygon_xyzm (p_data,
						 (gaiaRingPtr) yymsp[-2].minor.
						 yy0);
	  }
	  break;
      case 81:			/* ring ::= VANUATU_OPEN_BRACKET point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy VANUATU_COMMA point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_ring_xy (p_data,
					    (gaiaPointPtr) yymsp[-8].minor.yy0);
	  }
	  break;
      case 83:			/* extra_rings ::= VANUATU_COMMA ring extra_rings */
      case 86:			/* extra_ringsm ::= VANUATU_COMMA ringm extra_ringsm */
	  yytestcase (yyruleno == 86);
      case 89:			/* extra_ringsz ::= VANUATU_COMMA ringz extra_ringsz */
	  yytestcase (yyruleno == 89);
      case 92:			/* extra_ringszm ::= VANUATU_COMMA ringzm extra_ringszm */
	  yytestcase (yyruleno == 92);
	  {
	      ((gaiaRingPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaRingPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 84:			/* ringm ::= VANUATU_OPEN_BRACKET point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym VANUATU_COMMA point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_ring_xym (p_data,
					     (gaiaPointPtr) yymsp[-8].minor.
					     yy0);
	  }
	  break;
      case 87:			/* ringz ::= VANUATU_OPEN_BRACKET point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz VANUATU_COMMA point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_ring_xyz (p_data,
					     (gaiaPointPtr) yymsp[-8].minor.
					     yy0);
	  }
	  break;
      case 90:			/* ringzm ::= VANUATU_OPEN_BRACKET point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm VANUATU_COMMA point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPointPtr) yymsp[-8].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-6].minor.yy0;
	      ((gaiaPointPtr) yymsp[-6].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-4].minor.yy0;
	      ((gaiaPointPtr) yymsp[-4].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-2].minor.yy0;
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_ring_xyzm (p_data,
					      (gaiaPointPtr) yymsp[-8].minor.
					      yy0);
	  }
	  break;
      case 97:			/* multipoint_text ::= VANUATU_OPEN_BRACKET point_coordxy extra_pointsxy VANUATU_CLOSE_BRACKET */
      case 101:		/* multipoint_text ::= VANUATU_OPEN_BRACKET point_brkt_coordxy extra_brkt_pointsxy VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 101);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipoint_xy (p_data,
						  (gaiaPointPtr)
						  yymsp[-2].minor.yy0);
	  }
	  break;
      case 98:			/* multipoint_textm ::= VANUATU_OPEN_BRACKET point_coordxym extra_pointsxym VANUATU_CLOSE_BRACKET */
      case 102:		/* multipoint_textm ::= VANUATU_OPEN_BRACKET point_brkt_coordxym extra_brkt_pointsxym VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 102);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipoint_xym (p_data,
						   (gaiaPointPtr)
						   yymsp[-2].minor.yy0);
	  }
	  break;
      case 99:			/* multipoint_textz ::= VANUATU_OPEN_BRACKET point_coordxyz extra_pointsxyz VANUATU_CLOSE_BRACKET */
      case 103:		/* multipoint_textz ::= VANUATU_OPEN_BRACKET point_brkt_coordxyz extra_brkt_pointsxyz VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 103);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipoint_xyz (p_data,
						   (gaiaPointPtr)
						   yymsp[-2].minor.yy0);
	  }
	  break;
      case 100:		/* multipoint_textzm ::= VANUATU_OPEN_BRACKET point_coordxyzm extra_pointsxyzm VANUATU_CLOSE_BRACKET */
      case 104:		/* multipoint_textzm ::= VANUATU_OPEN_BRACKET point_brkt_coordxyzm extra_brkt_pointsxyzm VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 104);
	  {
	      ((gaiaPointPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPointPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipoint_xyzm (p_data,
						    (gaiaPointPtr)
						    yymsp[-2].minor.yy0);
	  }
	  break;
      case 109:		/* multilinestring_text ::= VANUATU_OPEN_BRACKET linestring_text multilinestring_text2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multilinestring_xy (p_data,
						       (gaiaLinestringPtr)
						       yymsp[-2].minor.yy0);
	  }
	  break;
      case 111:		/* multilinestring_text2 ::= VANUATU_COMMA linestring_text multilinestring_text2 */
      case 114:		/* multilinestring_textm2 ::= VANUATU_COMMA linestring_textm multilinestring_textm2 */
	  yytestcase (yyruleno == 114);
      case 117:		/* multilinestring_textz2 ::= VANUATU_COMMA linestring_textz multilinestring_textz2 */
	  yytestcase (yyruleno == 117);
      case 120:		/* multilinestring_textzm2 ::= VANUATU_COMMA linestring_textzm multilinestring_textzm2 */
	  yytestcase (yyruleno == 120);
	  {
	      ((gaiaLinestringPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 112:		/* multilinestring_textm ::= VANUATU_OPEN_BRACKET linestring_textm multilinestring_textm2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multilinestring_xym (p_data,
							(gaiaLinestringPtr)
							yymsp[-2].minor.yy0);
	  }
	  break;
      case 115:		/* multilinestring_textz ::= VANUATU_OPEN_BRACKET linestring_textz multilinestring_textz2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multilinestring_xyz (p_data,
							(gaiaLinestringPtr)
							yymsp[-2].minor.yy0);
	  }
	  break;
      case 118:		/* multilinestring_textzm ::= VANUATU_OPEN_BRACKET linestring_textzm multilinestring_textzm2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaLinestringPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaLinestringPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multilinestring_xyzm (p_data,
							 (gaiaLinestringPtr)
							 yymsp[-2].minor.yy0);
	  }
	  break;
      case 125:		/* multipolygon_text ::= VANUATU_OPEN_BRACKET polygon_text multipolygon_text2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipolygon_xy (p_data,
						    (gaiaPolygonPtr)
						    yymsp[-2].minor.yy0);
	  }
	  break;
      case 127:		/* multipolygon_text2 ::= VANUATU_COMMA polygon_text multipolygon_text2 */
      case 130:		/* multipolygon_textm2 ::= VANUATU_COMMA polygon_textm multipolygon_textm2 */
	  yytestcase (yyruleno == 130);
      case 133:		/* multipolygon_textz2 ::= VANUATU_COMMA polygon_textz multipolygon_textz2 */
	  yytestcase (yyruleno == 133);
      case 136:		/* multipolygon_textzm2 ::= VANUATU_COMMA polygon_textzm multipolygon_textzm2 */
	  yytestcase (yyruleno == 136);
	  {
	      ((gaiaPolygonPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 128:		/* multipolygon_textm ::= VANUATU_OPEN_BRACKET polygon_textm multipolygon_textm2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipolygon_xym (p_data,
						     (gaiaPolygonPtr)
						     yymsp[-2].minor.yy0);
	  }
	  break;
      case 131:		/* multipolygon_textz ::= VANUATU_OPEN_BRACKET polygon_textz multipolygon_textz2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipolygon_xyz (p_data,
						     (gaiaPolygonPtr)
						     yymsp[-2].minor.yy0);
	  }
	  break;
      case 134:		/* multipolygon_textzm ::= VANUATU_OPEN_BRACKET polygon_textzm multipolygon_textzm2 VANUATU_CLOSE_BRACKET */
	  {
	      ((gaiaPolygonPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaPolygonPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_multipolygon_xyzm (p_data,
						      (gaiaPolygonPtr)
						      yymsp[-2].minor.yy0);
	  }
	  break;
      case 141:		/* geocoll_text ::= VANUATU_OPEN_BRACKET point geocoll_text2 VANUATU_CLOSE_BRACKET */
      case 142:		/* geocoll_text ::= VANUATU_OPEN_BRACKET linestring geocoll_text2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 142);
      case 143:		/* geocoll_text ::= VANUATU_OPEN_BRACKET polygon geocoll_text2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 143);
      case 144:		/* geocoll_text ::= VANUATU_OPEN_BRACKET multipoint geocoll_text2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 144);
      case 145:		/* geocoll_text ::= VANUATU_OPEN_BRACKET multilinestring geocoll_text2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 145);
      case 146:		/* geocoll_text ::= VANUATU_OPEN_BRACKET multipolygon geocoll_text2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 146);
      case 147:		/* geocoll_text ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 147);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_geomColl_xy (p_data,
						(gaiaGeomCollPtr)
						yymsp[-2].minor.yy0);
	  }
	  break;
      case 149:		/* geocoll_text2 ::= VANUATU_COMMA point geocoll_text2 */
      case 150:		/* geocoll_text2 ::= VANUATU_COMMA linestring geocoll_text2 */
	  yytestcase (yyruleno == 150);
      case 151:		/* geocoll_text2 ::= VANUATU_COMMA polygon geocoll_text2 */
	  yytestcase (yyruleno == 151);
      case 152:		/* geocoll_text2 ::= VANUATU_COMMA multipoint geocoll_text2 */
	  yytestcase (yyruleno == 152);
      case 153:		/* geocoll_text2 ::= VANUATU_COMMA multilinestring geocoll_text2 */
	  yytestcase (yyruleno == 153);
      case 154:		/* geocoll_text2 ::= VANUATU_COMMA multipolygon geocoll_text2 */
	  yytestcase (yyruleno == 154);
      case 155:		/* geocoll_text2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION geocoll_text geocoll_text2 */
	  yytestcase (yyruleno == 155);
      case 164:		/* geocoll_textm2 ::= VANUATU_COMMA pointm geocoll_textm2 */
	  yytestcase (yyruleno == 164);
      case 165:		/* geocoll_textm2 ::= VANUATU_COMMA linestringm geocoll_textm2 */
	  yytestcase (yyruleno == 165);
      case 166:		/* geocoll_textm2 ::= VANUATU_COMMA polygonm geocoll_textm2 */
	  yytestcase (yyruleno == 166);
      case 167:		/* geocoll_textm2 ::= VANUATU_COMMA multipointm geocoll_textm2 */
	  yytestcase (yyruleno == 167);
      case 168:		/* geocoll_textm2 ::= VANUATU_COMMA multilinestringm geocoll_textm2 */
	  yytestcase (yyruleno == 168);
      case 169:		/* geocoll_textm2 ::= VANUATU_COMMA multipolygonm geocoll_textm2 */
	  yytestcase (yyruleno == 169);
      case 170:		/* geocoll_textm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 */
	  yytestcase (yyruleno == 170);
      case 179:		/* geocoll_textz2 ::= VANUATU_COMMA pointz geocoll_textz2 */
	  yytestcase (yyruleno == 179);
      case 180:		/* geocoll_textz2 ::= VANUATU_COMMA linestringz geocoll_textz2 */
	  yytestcase (yyruleno == 180);
      case 181:		/* geocoll_textz2 ::= VANUATU_COMMA polygonz geocoll_textz2 */
	  yytestcase (yyruleno == 181);
      case 182:		/* geocoll_textz2 ::= VANUATU_COMMA multipointz geocoll_textz2 */
	  yytestcase (yyruleno == 182);
      case 183:		/* geocoll_textz2 ::= VANUATU_COMMA multilinestringz geocoll_textz2 */
	  yytestcase (yyruleno == 183);
      case 184:		/* geocoll_textz2 ::= VANUATU_COMMA multipolygonz geocoll_textz2 */
	  yytestcase (yyruleno == 184);
      case 185:		/* geocoll_textz2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 */
	  yytestcase (yyruleno == 185);
      case 194:		/* geocoll_textzm2 ::= VANUATU_COMMA pointzm geocoll_textzm2 */
	  yytestcase (yyruleno == 194);
      case 195:		/* geocoll_textzm2 ::= VANUATU_COMMA linestringzm geocoll_textzm2 */
	  yytestcase (yyruleno == 195);
      case 196:		/* geocoll_textzm2 ::= VANUATU_COMMA polygonzm geocoll_textzm2 */
	  yytestcase (yyruleno == 196);
      case 197:		/* geocoll_textzm2 ::= VANUATU_COMMA multipointzm geocoll_textzm2 */
	  yytestcase (yyruleno == 197);
      case 198:		/* geocoll_textzm2 ::= VANUATU_COMMA multilinestringzm geocoll_textzm2 */
	  yytestcase (yyruleno == 198);
      case 199:		/* geocoll_textzm2 ::= VANUATU_COMMA multipolygonzm geocoll_textzm2 */
	  yytestcase (yyruleno == 199);
      case 200:		/* geocoll_textzm2 ::= VANUATU_COMMA VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 */
	  yytestcase (yyruleno == 200);
	  {
	      ((gaiaGeomCollPtr) yymsp[-1].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[0].minor.yy0;
	      yygotominor.yy0 = yymsp[-1].minor.yy0;
	  }
	  break;
      case 156:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET pointm geocoll_textm2 VANUATU_CLOSE_BRACKET */
      case 157:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET linestringm geocoll_textm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 157);
      case 158:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET polygonm geocoll_textm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 158);
      case 159:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET multipointm geocoll_textm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 159);
      case 160:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET multilinestringm geocoll_textm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 160);
      case 161:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET multipolygonm geocoll_textm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 161);
      case 162:		/* geocoll_textm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_M geocoll_textm geocoll_textm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 162);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_geomColl_xym (p_data,
						 (gaiaGeomCollPtr)
						 yymsp[-2].minor.yy0);
	  }
	  break;
      case 171:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET pointz geocoll_textz2 VANUATU_CLOSE_BRACKET */
      case 172:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET linestringz geocoll_textz2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 172);
      case 173:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET polygonz geocoll_textz2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 173);
      case 174:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET multipointz geocoll_textz2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 174);
      case 175:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET multilinestringz geocoll_textz2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 175);
      case 176:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET multipolygonz geocoll_textz2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 176);
      case 177:		/* geocoll_textz ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_Z geocoll_textz geocoll_textz2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 177);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_geomColl_xyz (p_data,
						 (gaiaGeomCollPtr)
						 yymsp[-2].minor.yy0);
	  }
	  break;
      case 186:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET pointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
      case 187:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET linestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 187);
      case 188:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET polygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 188);
      case 189:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET multipointzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 189);
      case 190:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET multilinestringzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 190);
      case 191:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET multipolygonzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 191);
      case 192:		/* geocoll_textzm ::= VANUATU_OPEN_BRACKET VANUATU_GEOMETRYCOLLECTION_ZM geocoll_textzm geocoll_textzm2 VANUATU_CLOSE_BRACKET */
	  yytestcase (yyruleno == 192);
	  {
	      ((gaiaGeomCollPtr) yymsp[-2].minor.yy0)->Next =
		  (gaiaGeomCollPtr) yymsp[-1].minor.yy0;
	      yygotominor.yy0 =
		  (void *) vanuatu_geomColl_xyzm (p_data,
						  (gaiaGeomCollPtr)
						  yymsp[-2].minor.yy0);
	  }
	  break;
      default:
	  /* (0) main ::= in */ yytestcase (yyruleno == 0);
	  /* (1) in ::= */ yytestcase (yyruleno == 1);
	  /* (2) in ::= in state VANUATU_NEWLINE */ yytestcase (yyruleno == 2);
	  /* (3) state ::= program */ yytestcase (yyruleno == 3);
	  /* (4) program ::= geo_text */ yytestcase (yyruleno == 4);
	  /* (5) program ::= geo_textz */ yytestcase (yyruleno == 5);
	  /* (6) program ::= geo_textm */ yytestcase (yyruleno == 6);
	  /* (7) program ::= geo_textzm */ yytestcase (yyruleno == 7);
	  break;
      };
    yygoto = yyRuleInfo[yyruleno].lhs;
    yysize = yyRuleInfo[yyruleno].nrhs;
    yypParser->yyidx -= yysize;
    yyact = yy_find_reduce_action (yymsp[-yysize].stateno, (YYCODETYPE) yygoto);
    if (yyact < YYNSTATE)
      {
#ifdef NDEBUG
	  /* If we are not debugging and the reduce action popped at least
	   ** one element off the stack, then we can push the new element back
	   ** onto the stack here, and skip the stack overflow test in yy_shift().
	   ** That gives a significant speed improvement. */
	  if (yysize)
	    {
		yypParser->yyidx++;
		yymsp -= yysize - 1;
		yymsp->stateno = (YYACTIONTYPE) yyact;
		yymsp->major = (YYCODETYPE) yygoto;
		yymsp->minor = yygotominor;
	    }
	  else
#endif
	    {
		yy_shift (yypParser, yyact, yygoto, &yygotominor);
	    }
      }
    else
      {
	  assert (yyact == YYNSTATE + YYNRULE + 1);
	  yy_accept (yypParser);
      }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void
yy_parse_failed (yyParser * yypParser	/* The parser */
    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)
      {
	  fprintf (yyTraceFILE, "%sFail!\n", yyTracePrompt);
      }
#endif
    while (yypParser->yyidx >= 0)
	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser fails */
    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void
yy_syntax_error (yyParser * yypParser,	/* The parser */
		 int yymajor,	/* The major type of the error token */
		 YYMINORTYPE yyminor	/* The minor type of the error token */

    )
{
    ParseARG_FETCH;
#define TOKEN (yyminor.yy0)


/* 
** Sandro Furieri 2010 Apr 4
** when the LEMON parser encounters an error
** then this global variable is set 
*/
    p_data->vanuatu_parse_error = 1;
    p_data->result = NULL;

    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void
yy_accept (yyParser * yypParser	/* The parser */

    )
{
    ParseARG_FETCH;
#ifndef NDEBUG
    if (yyTraceFILE)

      {
	  fprintf (yyTraceFILE, "%sAccept!\n", yyTracePrompt);
      }
#endif

    while (yypParser->yyidx >= 0)

	yy_pop_parser_stack (yypParser);
    /* Here code is inserted which will be executed whenever the
     ** parser accepts */


    ParseARG_STORE;		/* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
................................................................................
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void
Parse (void *yyp,		/* The parser */
       int yymajor,		/* The major token code number */
       ParseTOKENTYPE yyminor	/* The value for the token */
       ParseARG_PDECL		/* Optional %extra_argument parameter */

    )
{
    YYMINORTYPE yyminorunion;
    int yyact;			/* The parser action. */

    int yyendofinput;		/* True if we are at the end of input */

#ifdef YYERRORSYMBOL
    int yyerrorhit = 0;		/* True if yymajor has invoked an error */
#endif
    yyParser *yypParser;	/* The parser */

    /* (re)initialize the parser, if necessary */
    yypParser = (yyParser *) yyp;
    if (yypParser->yyidx < 0)

      {
#if YYSTACKDEPTH<=0
	  if (yypParser->yystksz <= 0)
	    {
		/*memset(&yyminorunion, 0, sizeof(yyminorunion)); */
		yyminorunion = yyzerominor;
		yyStackOverflow (yypParser, &yyminorunion);
		return;
	    }
#endif
	  yypParser->yyidx = 0;
	  yypParser->yyerrcnt = -1;
	  yypParser->yystack[0].stateno = 0;
	  yypParser->yystack[0].major = 0;
      }
    yyminorunion.yy0 = yyminor;
    yyendofinput = (yymajor == 0);
    ParseARG_STORE;

#ifndef NDEBUG
    if (yyTraceFILE)



      {
	  fprintf (yyTraceFILE, "%sInput %s\n", yyTracePrompt,
		   yyTokenName[yymajor]);



      }

#endif

    do
      {
	  yyact = yy_find_shift_action (yypParser, (YYCODETYPE) yymajor);





	  if (yyact < YYNSTATE)
	    {
		assert (!yyendofinput);	/* Impossible to shift the $ token */
		yy_shift (yypParser, yyact, yymajor, &yyminorunion);
		yypParser->yyerrcnt--;

		yymajor = YYNOCODE;




	    }
	  else if (yyact < YYNSTATE + YYNRULE)
	    {
		yy_reduce (yypParser, yyact - YYNSTATE);
	    }
	  else
	    {
		assert (yyact == YY_ERROR_ACTION);

#ifdef YYERRORSYMBOL
		int yymx;
#endif
#ifndef NDEBUG
		if (yyTraceFILE)

		  {
		      fprintf (yyTraceFILE, "%sSyntax Error!\n", yyTracePrompt);
		  }
#endif
#ifdef YYERRORSYMBOL
		/* A syntax error has occurred.
		 ** The response to an error depends upon whether or not the
		 ** grammar defines an error token "ERROR".  
		 **
		 ** This is what we do if the grammar does define ERROR:
		 **
		 **  * Call the %syntax_error function.
		 **
		 **  * Begin popping the stack until we enter a state where
		 **    it is legal to shift the error symbol, then shift
		 **    the error symbol.
		 **
		 **  * Set the error count to three.
		 **
		 **  * Begin accepting and shifting new tokens.  No new error
		 **    processing will occur until three tokens have been
		 **    shifted successfully.
		 **
		 */
		if (yypParser->yyerrcnt < 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yymx = yypParser->yystack[yypParser->yyidx].major;
		if (yymx == YYERRORSYMBOL || yyerrorhit)
		  {
#ifndef NDEBUG
		      if (yyTraceFILE)
			{
			    fprintf (yyTraceFILE, "%sDiscard input token %s\n",
				     yyTracePrompt, yyTokenName[yymajor]);
			}
#endif
		      yy_destructor (yypParser, (YYCODETYPE) yymajor,
				     &yyminorunion);
		      yymajor = YYNOCODE;
		  }
		else

		  {
		      while (yypParser->yyidx >= 0 &&
			     yymx != YYERRORSYMBOL &&
			     (yyact =
			      yy_find_reduce_action (yypParser->yystack
						     [yypParser->yyidx].stateno,
						     YYERRORSYMBOL)) >=

			     YYNSTATE)
			{
			    yy_pop_parser_stack (yypParser);
			}

		      if (yypParser->yyidx < 0 || yymajor == 0)
			{
			    yy_destructor (yypParser, (YYCODETYPE) yymajor,
					   &yyminorunion);
			    yy_parse_failed (yypParser);



			    yymajor = YYNOCODE;
			}
		      else if (yymx != YYERRORSYMBOL)

			{
			    YYMINORTYPE u2;
			    u2.YYERRSYMDT = 0;
			    yy_shift (yypParser, yyact, YYERRORSYMBOL, &u2);
			}
		  }
		yypParser->yyerrcnt = 3;
		yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
		/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
		 ** do any kind of error recovery.  Instead, simply invoke the syntax
		 ** error routine and continue going as if nothing had happened.
		 **
		 ** Applications can set this macro (for example inside %include) if
		 ** they intend to abandon the parse upon the first syntax error seen.
		 */


		yy_syntax_error (yypParser, yymajor, yyminorunion);
		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		yymajor = YYNOCODE;

#else /* YYERRORSYMBOL is not defined */
		/* This is what we do if the grammar does not define ERROR:
		 **
		 **  * Report an error message, and throw away the input token.
		 **
		 **  * If the input token is $, then fail the parse.
		 **
		 ** As before, subsequent error messages are suppressed until
		 ** three input tokens have been successfully shifted.
		 */
		if (yypParser->yyerrcnt <= 0)

		  {
		      yy_syntax_error (yypParser, yymajor, yyminorunion);
		  }
		yypParser->yyerrcnt = 3;

		yy_destructor (yypParser, (YYCODETYPE) yymajor, &yyminorunion);
		if (yyendofinput)
		  {
		      yy_parse_failed (yypParser);



		  }
		yymajor = YYNOCODE;
#endif
	    }









      }



    while (yymajor != YYNOCODE && yypParser->yyidx >= 0);
    return;
}

Changes to src/gaiageo/vanuatuWkt.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#define VANUATU_NEWLINE                  1
#define VANUATU_POINT                    2
#define VANUATU_OPEN_BRACKET             3
#define VANUATU_CLOSE_BRACKET            4
#define VANUATU_POINT_M                  5
#define VANUATU_POINT_Z                  6
#define VANUATU_POINT_ZM                 7
#define VANUATU_NUM                      8
#define VANUATU_COMMA                    9
#define VANUATU_LINESTRING              10
#define VANUATU_LINESTRING_M            11
#define VANUATU_LINESTRING_Z            12
#define VANUATU_LINESTRING_ZM           13
#define VANUATU_POLYGON                 14
#define VANUATU_POLYGON_M               15
#define VANUATU_POLYGON_Z               16
#define VANUATU_POLYGON_ZM              17
#define VANUATU_MULTIPOINT              18
#define VANUATU_MULTIPOINT_M            19
#define VANUATU_MULTIPOINT_Z            20
#define VANUATU_MULTIPOINT_ZM           21
#define VANUATU_MULTILINESTRING         22
#define VANUATU_MULTILINESTRING_M       23
#define VANUATU_MULTILINESTRING_Z       24
#define VANUATU_MULTILINESTRING_ZM      25
#define VANUATU_MULTIPOLYGON            26
#define VANUATU_MULTIPOLYGON_M          27
#define VANUATU_MULTIPOLYGON_Z          28
#define VANUATU_MULTIPOLYGON_ZM         29
#define VANUATU_GEOMETRYCOLLECTION      30
#define VANUATU_GEOMETRYCOLLECTION_M    31
#define VANUATU_GEOMETRYCOLLECTION_Z    32
#define VANUATU_GEOMETRYCOLLECTION_ZM   33
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#define VANUATU_NEWLINE                 1
#define VANUATU_POINT                   2
#define VANUATU_OPEN_BRACKET            3
#define VANUATU_CLOSE_BRACKET           4
#define VANUATU_POINT_M                 5
#define VANUATU_POINT_Z                 6
#define VANUATU_POINT_ZM                7
#define VANUATU_NUM                     8
#define VANUATU_COMMA                   9
#define VANUATU_LINESTRING             10
#define VANUATU_LINESTRING_M           11
#define VANUATU_LINESTRING_Z           12
#define VANUATU_LINESTRING_ZM          13
#define VANUATU_POLYGON                14
#define VANUATU_POLYGON_M              15
#define VANUATU_POLYGON_Z              16
#define VANUATU_POLYGON_ZM             17
#define VANUATU_MULTIPOINT             18
#define VANUATU_MULTIPOINT_M           19
#define VANUATU_MULTIPOINT_Z           20
#define VANUATU_MULTIPOINT_ZM          21
#define VANUATU_MULTILINESTRING        22
#define VANUATU_MULTILINESTRING_M      23
#define VANUATU_MULTILINESTRING_Z      24
#define VANUATU_MULTILINESTRING_ZM     25
#define VANUATU_MULTIPOLYGON           26
#define VANUATU_MULTIPOLYGON_M         27
#define VANUATU_MULTIPOLYGON_Z         28
#define VANUATU_MULTIPOLYGON_ZM        29
#define VANUATU_GEOMETRYCOLLECTION     30
#define VANUATU_GEOMETRYCOLLECTION_M   31
#define VANUATU_GEOMETRYCOLLECTION_Z   32
#define VANUATU_GEOMETRYCOLLECTION_ZM  33

Changes to src/geopackage/Makefile.am.

1
2
3
4
5
6
7
8
9
10
..
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
AM_CFLAGS = $(GCOV_FLAGS)

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgeopackage.la geopackage.la

SHARED_SOURCES = \
	gpkg_add_tile_triggers.c \
	gpkg_get_normal_row.c \
................................................................................

libgeopackage_la_SOURCES = $(SHARED_SOURCES)

libgeopackage_la_CFLAGS = -fvisibility=hidden

geopackage_la_SOURCES = $(SHARED_SOURCES)

geopackage_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
geopackage_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
geopackage_la_CPPFLAGS += -DLOADABLE_EXTENSION
geopackage_la_CPPFLAGS += -fvisibility=hidden
geopackage_la_LDFLAGS = -module
geopackage_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = geopackage_internal.h


|







 







|









1
2
3
4
5
6
7
8
9
10
..
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
AM_CFLAGS = $(GCOV_FLAGS)

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libgeopackage.la geopackage.la

SHARED_SOURCES = \
	gpkg_add_tile_triggers.c \
	gpkg_get_normal_row.c \
................................................................................

libgeopackage_la_SOURCES = $(SHARED_SOURCES)

libgeopackage_la_CFLAGS = -fvisibility=hidden

geopackage_la_SOURCES = $(SHARED_SOURCES)

geopackage_la_CPPFLAGS = @CFLAGS@
geopackage_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
geopackage_la_CPPFLAGS += -DLOADABLE_EXTENSION
geopackage_la_CPPFLAGS += -fvisibility=hidden
geopackage_la_LDFLAGS = -module
geopackage_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = geopackage_internal.h

Changes to src/geopackage/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
...
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
...
379
380
381
382
383
384
385

386
387
388
389
390
391
392
...
876
877
878
879
880
881
882
883
884
885
886
887
888
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/geopackage


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
geopackage_la_LIBADD =
am__objects_1 = geopackage_la-gpkg_add_tile_triggers.lo \
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = $(GCOV_FLAGS)
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgeopackage.la geopackage.la
SHARED_SOURCES = \
	gpkg_add_tile_triggers.c \
	gpkg_get_normal_row.c \
	gpkg_get_normal_zoom.c \
	gpkgGetImageType.c \
	gpkgCreateBaseTables.c \
................................................................................
	gpkg_add_geometry_triggers.c \
	gpkg_add_spatial_index.c \
	gaia_cvt_gpkg.c

libgeopackage_la_SOURCES = $(SHARED_SOURCES)
libgeopackage_la_CFLAGS = -fvisibility=hidden
geopackage_la_SOURCES = $(SHARED_SOURCES)
geopackage_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION \
	-fvisibility=hidden
geopackage_la_LDFLAGS = -module
geopackage_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
EXTRA_DIST = geopackage_internal.h
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/geopackage/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/geopackage/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<







 







|







 







|
<
|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
194
195
196
197
198
199
200

201
202
203
204
205
206
207
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
...
346
347
348
349
350
351
352
353

354
355
356
357
358
359
360
361
...
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
...
866
867
868
869
870
871
872


873
874
875
876
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/geopackage
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
geopackage_la_LIBADD =
am__objects_1 = geopackage_la-gpkg_add_tile_triggers.lo \
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CFLAGS = $(GCOV_FLAGS)
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libgeopackage.la geopackage.la
SHARED_SOURCES = \
	gpkg_add_tile_triggers.c \
	gpkg_get_normal_row.c \
	gpkg_get_normal_zoom.c \
	gpkgGetImageType.c \
	gpkgCreateBaseTables.c \
................................................................................
	gpkg_add_geometry_triggers.c \
	gpkg_add_spatial_index.c \
	gaia_cvt_gpkg.c

libgeopackage_la_SOURCES = $(SHARED_SOURCES)
libgeopackage_la_CFLAGS = -fvisibility=hidden
geopackage_la_SOURCES = $(SHARED_SOURCES)
geopackage_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \

	-DLOADABLE_EXTENSION -fvisibility=hidden
geopackage_la_LDFLAGS = -module
geopackage_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
EXTRA_DIST = geopackage_internal.h
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/geopackage/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/geopackage/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/geopackage/gaia_cvt_gpkg.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
/*

 gaia_cvt_gpkg.c -- implements GPKG DB conversion [both directions]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): Brad Hards <bradh@frogmouth.net>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    char *xgeom;
    char *xtable;
    int ret;
    char *sql_err = NULL;

    xtable = gaiaDoubleQuotedSql (table_name);
    xgeom = gaiaDoubleQuotedSql (geometry_column);
    sql = sqlite3_mprintf ("INSERT OR IGNORE INTO gpkg_contents (table_name, data_type, "
			   "identifier, description, last_change, min_x, min_y, max_x, max_y, srs_id) "
			   "SELECT Lower(%Q), 'features', Lower(%Q), ' ', "
			   "strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now'), Min(ST_MinX(\"%s\")), "
			   "Min(ST_MinY(\"%s\")), Max(ST_MaxX(\"%s\")), Max(ST_MaxY(\"%s\")), %d "
			   "FROM \"%s\"", table_name, table_name, xgeom, xgeom,
			   xgeom, xgeom, srid, xtable);
    free (xgeom);




|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
/*

 gaia_cvt_gpkg.c -- implements GPKG DB conversion [both directions]

 version 4.2, 2014 May 10

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): Brad Hards <bradh@frogmouth.net>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    char *xgeom;
    char *xtable;
    int ret;
    char *sql_err = NULL;

    xtable = gaiaDoubleQuotedSql (table_name);
    xgeom = gaiaDoubleQuotedSql (geometry_column);
    sql = sqlite3_mprintf ("INSERT INTO gpkg_contents (table_name, data_type, "
			   "identifier, description, last_change, min_x, min_y, max_x, max_y, srs_id) "
			   "SELECT Lower(%Q), 'features', Lower(%Q), ' ', "
			   "strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now'), Min(ST_MinX(\"%s\")), "
			   "Min(ST_MinY(\"%s\")), Max(ST_MaxX(\"%s\")), Max(ST_MaxY(\"%s\")), %d "
			   "FROM \"%s\"", table_name, table_name, xgeom, xgeom,
			   xgeom, xgeom, srid, xtable);
    free (xgeom);

Changes to src/geopackage/gpkgAddGeometryColumn.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
...
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    "MULTIPOINT",
    "MULTILINESTRING",
    "MULTIPOLYGON",
    "GEOMCOLLECTION",
    NULL
};

GEOPACKAGE_PRIVATE void
fnct_gpkgAddGeometryColumn (sqlite3_context * context, int argc
			    __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddGeomtryColumn(table_name, geometry_column_name, geometry_type, with_z, with_m, srs_id)
/
/ Adds a geometry column to the specified table
................................................................................
    sqlite = sqlite3_context_db_handle (context);
    
    sql_stmt = sqlite3_mprintf("INSERT OR IGNORE INTO gpkg_contents "
                 "(table_name, data_type, srs_id, min_x, min_y, max_x, max_y) "
                 "VALUES (%Q, 'feature', %i, NULL, NULL, NULL, NULL)",
                 table, srid);

    ret = sqlite3_exec (sqlite, sql_stmt, NULL, NULL, &errMsg);
    sqlite3_free (sql_stmt);
    if (ret != SQLITE_OK)
      {
	  sqlite3_result_error (context, errMsg, -1);
	  sqlite3_free (errMsg);
	  return;
      }

    /* Add column definition to metadata table */
    sql_stmt = sqlite3_mprintf ("INSERT INTO gpkg_geometry_columns "
				"(table_name, column_name, geometry_type_name, srs_id, z, m) "
				"VALUES (%Q, %Q, %Q, %i, %i, %i)",
				table, geometry_column_name, geometry_type_name,
				srid, with_z, with_m);








|







 







|







 







<
<
<
<
<
<
<
<
<







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
...
178
179
180
181
182
183
184









185
186
187
188
189
190
191
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    "MULTIPOINT",
    "MULTILINESTRING",
    "MULTIPOLYGON",
    "GEOMCOLLECTION",
    NULL
};

GEOPACKAGE_DECLARE void
fnct_gpkgAddGeometryColumn (sqlite3_context * context, int argc
			    __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddGeomtryColumn(table_name, geometry_column_name, geometry_type, with_z, with_m, srs_id)
/
/ Adds a geometry column to the specified table
................................................................................
    sqlite = sqlite3_context_db_handle (context);
    
    sql_stmt = sqlite3_mprintf("INSERT OR IGNORE INTO gpkg_contents "
                 "(table_name, data_type, srs_id, min_x, min_y, max_x, max_y) "
                 "VALUES (%Q, 'feature', %i, NULL, NULL, NULL, NULL)",
                 table, srid);










    /* Add column definition to metadata table */
    sql_stmt = sqlite3_mprintf ("INSERT INTO gpkg_geometry_columns "
				"(table_name, column_name, geometry_type_name, srs_id, z, m) "
				"VALUES (%Q, %Q, %Q, %i, %i, %i)",
				table, geometry_column_name, geometry_type_name,
				srid, with_z, with_m);

Changes to src/geopackage/gpkgBinary.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
...
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2014-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
{
    gaiaExport64 (ptr, min_x, 1, endian_arch);
    gaiaExport64 (ptr + sizeof (double), max_x, 1, endian_arch);
    gaiaExport64 (ptr + 2 * sizeof (double), min_y, 1, endian_arch);
    gaiaExport64 (ptr + 3 * sizeof (double), max_y, 1, endian_arch);
}

GEOPACKAGE_DECLARE void
gaiaToGPB (gaiaGeomCollPtr geom, unsigned char **result, int *size)
{
    int wkbOnlyLength;
    unsigned char *wkbOnlyGeometry = NULL;
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();

    gaiaToWkb (geom, &wkbOnlyGeometry, &wkbOnlyLength);
................................................................................
    memcpy (ptr + GEOPACKAGE_HEADER_LEN + GEOPACKAGE_2D_ENVELOPE_LEN,
	    wkbOnlyGeometry, wkbOnlyLength);

    free (wkbOnlyGeometry);
}


GEOPACKAGE_PRIVATE void
fnct_ToGPB (sqlite3_context * context, int argc, sqlite3_value ** argv)
{
/* SQL function:
/ AsGPB(BLOB encoded geometry)
/
/ converts the (spatialite) geometry blob into a GeoPackage format geometry blob
/ or NULL if any error is encountered
*/
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geo = NULL;
    int len;
    unsigned char *p_result = NULL;
    GEOPACKAGE_UNUSED ();	/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) != SQLITE_BLOB)
      {
	  sqlite3_result_null (context);
	  return;
      }
................................................................................
	  return NULL;
      }
    geo->Srid = srid;

    return geo;
}

GEOPACKAGE_PRIVATE void
fnct_GeomFromGPB (sqlite3_context * context, int argc, sqlite3_value ** argv)
{
/* SQL function:
/ GeomFromGPB(GPB encoded geometry)
/
/ returns a geometry created by parsing a GeoPackageBinary encoded blob 
/ or NULL if any error is encountered
................................................................................
	return NULL;
    len = strlen (type);
    gtype = malloc (len + 1);
    strcpy (gtype, type);
    return gtype;
}

GEOPACKAGE_PRIVATE void
fnct_GPKG_IsAssignable (sqlite3_context * context, int argc,
			sqlite3_value ** argv)
{
/* SQL function:
/ GPKG_IsAssignale(expected_type_name TEXT, actual_type_name TEXT)
/
/ returns:
................................................................................
	ret = 1;
    if (strcasecmp (expected, "MULTIPOLYGON") == 0
	&& strcasecmp (actual, "POLYGON") == 0)
	ret = 1;
    sqlite3_result_int (context, ret);
}

GEOPACKAGE_PRIVATE void
fnct_IsValidGPB (sqlite3_context * context, int argc, sqlite3_value ** argv)
{
/* SQL function:
/ IsValidGPB(GPB encoded geometry)
/
/ check for a valid GPB encoded geometry
*/







|







 







|
|







 







|











|







 







|







 







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
...
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
...
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2014
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
{
    gaiaExport64 (ptr, min_x, 1, endian_arch);
    gaiaExport64 (ptr + sizeof (double), max_x, 1, endian_arch);
    gaiaExport64 (ptr + 2 * sizeof (double), min_y, 1, endian_arch);
    gaiaExport64 (ptr + 3 * sizeof (double), max_y, 1, endian_arch);
}

static void
gaiaToGPB (gaiaGeomCollPtr geom, unsigned char **result, unsigned int *size)
{
    int wkbOnlyLength;
    unsigned char *wkbOnlyGeometry = NULL;
    unsigned char *ptr;
    int endian_arch = gaiaEndianArch ();

    gaiaToWkb (geom, &wkbOnlyGeometry, &wkbOnlyLength);
................................................................................
    memcpy (ptr + GEOPACKAGE_HEADER_LEN + GEOPACKAGE_2D_ENVELOPE_LEN,
	    wkbOnlyGeometry, wkbOnlyLength);

    free (wkbOnlyGeometry);
}


GEOPACKAGE_DECLARE void
fnct_ToGPB (sqlite3_context * context, int argc, sqlite3_value ** argv)
{
/* SQL function:
/ AsGPB(BLOB encoded geometry)
/
/ converts the (spatialite) geometry blob into a GeoPackage format geometry blob
/ or NULL if any error is encountered
*/
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geo = NULL;
    unsigned int len;
    unsigned char *p_result = NULL;
    GEOPACKAGE_UNUSED ();	/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) != SQLITE_BLOB)
      {
	  sqlite3_result_null (context);
	  return;
      }
................................................................................
	  return NULL;
      }
    geo->Srid = srid;

    return geo;
}

GEOPACKAGE_DECLARE void
fnct_GeomFromGPB (sqlite3_context * context, int argc, sqlite3_value ** argv)
{
/* SQL function:
/ GeomFromGPB(GPB encoded geometry)
/
/ returns a geometry created by parsing a GeoPackageBinary encoded blob 
/ or NULL if any error is encountered
................................................................................
	return NULL;
    len = strlen (type);
    gtype = malloc (len + 1);
    strcpy (gtype, type);
    return gtype;
}

GEOPACKAGE_DECLARE void
fnct_GPKG_IsAssignable (sqlite3_context * context, int argc,
			sqlite3_value ** argv)
{
/* SQL function:
/ GPKG_IsAssignale(expected_type_name TEXT, actual_type_name TEXT)
/
/ returns:
................................................................................
	ret = 1;
    if (strcasecmp (expected, "MULTIPOLYGON") == 0
	&& strcasecmp (actual, "POLYGON") == 0)
	ret = 1;
    sqlite3_result_int (context, ret);
}

GEOPACKAGE_DECLARE void
fnct_IsValidGPB (sqlite3_context * context, int argc, sqlite3_value ** argv)
{
/* SQL function:
/ IsValidGPB(GPB encoded geometry)
/
/ check for a valid GPB encoded geometry
*/

Changes to src/geopackage/gpkgCreateBaseTables.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
...
115
116
117
118
119
120
121

122
123
124
125
126
127
128
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "config.h"
#include "geopackage_internal.h"

#define GAIA_UNUSED() if (argc || argv) argc = argc;

#ifdef ENABLE_GEOPACKAGE

GEOPACKAGE_PRIVATE void
fnct_gpkgCreateBaseTables (sqlite3_context * context, int argc
			   __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgCreateBaseTables()
/
/ Create base tables for an "empty" GeoPackage
................................................................................
	    "min_y DOUBLE NOT NULL,\n"
	    "max_x DOUBLE NOT NULL,\n"
	    "max_y DOUBLE NOT NULL,\n"
	    "CONSTRAINT fk_gtms_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name),\n"
	    "CONSTRAINT fk_gtms_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id))",

	/* Geopackage specification Table 9 / Table 27 */

	"CREATE TABLE gpkg_tile_matrix (\n"
	    "table_name TEXT NOT NULL,\n"
	    "zoom_level INTEGER NOT NULL,\n"
	    "matrix_width INTEGER NOT NULL,\n"
	    "matrix_height INTEGER NOT NULL,\n"
	    "tile_width INTEGER NOT NULL,\n"
	    "tile_height INTEGER NOT NULL,\n"
................................................................................

	/* GeoPackage specification Table 12 / Table 32 */
	"CREATE TABLE gpkg_data_column_constraints (\n"
	    "constraint_name TEXT NOT NULL,\n"
	    "constraint_type TEXT NOT NULL,\n"
	    "value TEXT,\n"
	    "min NUMERIC,\n"
	    "min_is_inclusive BOOLEAN,\n"
	    "max NUMERIC,\n"
	    "max_is_inclusive BOOLEAN,\n"
	    "description TEXT,\n"
	    "CONSTRAINT gdcc_ntv UNIQUE (constraint_name, constraint_type, value))",

	/* GeoPackage specification Table 14 / Table 33 */
	"CREATE TABLE gpkg_metadata (\n"
	    "id INTEGER CONSTRAINT m_pk PRIMARY KEY ASC NOT NULL UNIQUE,\n"
	    "md_scope TEXT NOT NULL DEFAULT 'dataset',\n"







|







 







|







 







>







 







|

|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "config.h"
#include "geopackage_internal.h"

#define GAIA_UNUSED() if (argc || argv) argc = argc;

#ifdef ENABLE_GEOPACKAGE

GEOPACKAGE_DECLARE void
fnct_gpkgCreateBaseTables (sqlite3_context * context, int argc
			   __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgCreateBaseTables()
/
/ Create base tables for an "empty" GeoPackage
................................................................................
	    "min_y DOUBLE NOT NULL,\n"
	    "max_x DOUBLE NOT NULL,\n"
	    "max_y DOUBLE NOT NULL,\n"
	    "CONSTRAINT fk_gtms_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name),\n"
	    "CONSTRAINT fk_gtms_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id))",

	/* Geopackage specification Table 9 / Table 27 */
	/* TODO: figure out if the defaults are required - https://github.com/opengis/geopackage/issues/67 */
	"CREATE TABLE gpkg_tile_matrix (\n"
	    "table_name TEXT NOT NULL,\n"
	    "zoom_level INTEGER NOT NULL,\n"
	    "matrix_width INTEGER NOT NULL,\n"
	    "matrix_height INTEGER NOT NULL,\n"
	    "tile_width INTEGER NOT NULL,\n"
	    "tile_height INTEGER NOT NULL,\n"
................................................................................

	/* GeoPackage specification Table 12 / Table 32 */
	"CREATE TABLE gpkg_data_column_constraints (\n"
	    "constraint_name TEXT NOT NULL,\n"
	    "constraint_type TEXT NOT NULL,\n"
	    "value TEXT,\n"
	    "min NUMERIC,\n"
	    "minIsInclusive BOOLEAN,\n"
	    "max NUMERIC,\n"
	    "maxIsInclusive BOOLEAN,\n"
	    "description TEXT,\n"
	    "CONSTRAINT gdcc_ntv UNIQUE (constraint_name, constraint_type, value))",

	/* GeoPackage specification Table 14 / Table 33 */
	"CREATE TABLE gpkg_metadata (\n"
	    "id INTEGER CONSTRAINT m_pk PRIMARY KEY ASC NOT NULL UNIQUE,\n"
	    "md_scope TEXT NOT NULL DEFAULT 'dataset',\n"

Changes to src/geopackage/gpkgCreateTilesTable.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgCreateTilesTable (sqlite3_context * context, int argc
			   __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgCreateTilesTable(table_name, srid, min_x, min_y, max_x, max_y)
/
/ Create a new (empty) Tiles table and the triggers for that table







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgCreateTilesTable (sqlite3_context * context, int argc
			   __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgCreateTilesTable(table_name, srid, min_x, min_y, max_x, max_y)
/
/ Create a new (empty) Tiles table and the triggers for that table

Changes to src/geopackage/gpkgCreateTilesZoomLevel.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include <math.h>

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgCreateTilesZoomLevel (sqlite3_context * context, int argc
			       __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgCreateTilesZoomLevel(table_name, zoom_level, extent_width, extent_height)
/
/ Adds a zoom level for the specified table







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include <math.h>

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgCreateTilesZoomLevel (sqlite3_context * context, int argc
			       __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgCreateTilesZoomLevel(table_name, zoom_level, extent_width, extent_height)
/
/ Adds a zoom level for the specified table

Changes to src/geopackage/gpkgGetImageType.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "spatialite/geopackage.h"
#include <spatialite/gaiaexif.h>
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE

GEOPACKAGE_PRIVATE void
fnct_gpkgGetImageType (sqlite3_context * context, int argc UNUSED,
		       sqlite3_value ** argv)
{
/* SQL function:
/ gpkgGetImageType(blob)
/
/ Gets the image type (as a string) of the blob argument, or "unknown" if







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include "spatialite/geopackage.h"
#include <spatialite/gaiaexif.h>
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE

GEOPACKAGE_DECLARE void
fnct_gpkgGetImageType (sqlite3_context * context, int argc UNUSED,
		       sqlite3_value ** argv)
{
/* SQL function:
/ gpkgGetImageType(blob)
/
/ Gets the image type (as a string) of the blob argument, or "unknown" if

Changes to src/geopackage/gpkgInsertEpsgSRID.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgInsertEpsgSRID (sqlite3_context * context, int argc UNUSED,
			 sqlite3_value ** argv)
{
/* SQL function:
/ gpkgInsertEpsgSRID(srid)
/
/ Adds a spatial reference system entry for the specified EPSG identifier







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgInsertEpsgSRID (sqlite3_context * context, int argc UNUSED,
			 sqlite3_value ** argv)
{
/* SQL function:
/ gpkgInsertEpsgSRID(srid)
/
/ Adds a spatial reference system entry for the specified EPSG identifier

Changes to src/geopackage/gpkgMakePoint.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
...
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
...
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
...
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
...
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
...
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
		  GEOPACKAGE_WKB_HEADER_LEN + (2 * sizeof (double)), z, 1,
		  endian_arch);
    gaiaExport64 (ptr + GEOPACKAGE_HEADER_LEN + GEOPACKAGE_4D_ENVELOPE_LEN +
		  GEOPACKAGE_WKB_HEADER_LEN + (3 * sizeof (double)), m, 1,
		  endian_arch);
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePoint (sqlite3_context * context, int argc UNUSED,
		    sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePoint(x, y)
/
/ Creates a GeoPackage geometry POINT
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointWithSRID (sqlite3_context * context, int argc UNUSED,
			    sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePoint(x, y, srid)
/
/ Creates a GeoPackage geometry POINT
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointZ (sqlite3_context * context, int argc UNUSED,
		     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointZ(x, y, z)
/
/ Creates a GeoPackage geometry POINT Z
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointZWithSRID (sqlite3_context * context, int argc UNUSED,
			     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointZ(x, y, z, srid)
/
/ Creates a GeoPackage geometry POINT Z
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointM (sqlite3_context * context, int argc UNUSED,
		     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointM(x, y, m)
/
/ Creates a GeoPackage geometry POINT M
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointMWithSRID (sqlite3_context * context, int argc UNUSED,
			     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointM(x, y, m, srid)
/
/ Creates a GeoPackage geometry POINT M
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointZM (sqlite3_context * context, int argc UNUSED,
		      sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointM(x, y, z, m)
/
/ Creates a GeoPackage geometry POINT ZM
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_PRIVATE void
fnct_gpkgMakePointZMWithSRID (sqlite3_context * context, int argc UNUSED,
			      sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointZM(x, y, z, m, srid)
/
/ Creates a GeoPackage geometry POINT ZM







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
...
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
...
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
...
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
...
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
...
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
		  GEOPACKAGE_WKB_HEADER_LEN + (2 * sizeof (double)), z, 1,
		  endian_arch);
    gaiaExport64 (ptr + GEOPACKAGE_HEADER_LEN + GEOPACKAGE_4D_ENVELOPE_LEN +
		  GEOPACKAGE_WKB_HEADER_LEN + (3 * sizeof (double)), m, 1,
		  endian_arch);
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePoint (sqlite3_context * context, int argc UNUSED,
		    sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePoint(x, y)
/
/ Creates a GeoPackage geometry POINT
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointWithSRID (sqlite3_context * context, int argc UNUSED,
			    sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePoint(x, y, srid)
/
/ Creates a GeoPackage geometry POINT
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointZ (sqlite3_context * context, int argc UNUSED,
		     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointZ(x, y, z)
/
/ Creates a GeoPackage geometry POINT Z
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointZWithSRID (sqlite3_context * context, int argc UNUSED,
			     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointZ(x, y, z, srid)
/
/ Creates a GeoPackage geometry POINT Z
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointM (sqlite3_context * context, int argc UNUSED,
		     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointM(x, y, m)
/
/ Creates a GeoPackage geometry POINT M
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointMWithSRID (sqlite3_context * context, int argc UNUSED,
			     sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointM(x, y, m, srid)
/
/ Creates a GeoPackage geometry POINT M
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointZM (sqlite3_context * context, int argc UNUSED,
		      sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointM(x, y, z, m)
/
/ Creates a GeoPackage geometry POINT ZM
................................................................................
      }
    else
      {
	  sqlite3_result_blob (context, p_result, len, free);
      }
}

GEOPACKAGE_DECLARE void
fnct_gpkgMakePointZMWithSRID (sqlite3_context * context, int argc UNUSED,
			      sqlite3_value ** argv)
{
/* SQL function:
/ gpkgMakePointZM(x, y, z, m, srid)
/
/ Creates a GeoPackage geometry POINT ZM

Changes to src/geopackage/gpkg_add_geometry_triggers.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Sandro Furieri (a.furieri@lqt.it)
 
Portions created by the Initial Developer are Copyright (C) 2014-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Brad Hards (bradh@frogmouth.net)

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................

#include "spatialite/geopackage.h"
#include "spatialite/gaiaaux.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgAddGeometryTriggers (sqlite3_context * context, int argc
			      __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddGeometryTriggers(table, column)
/
/ Adds Geopackage geometry table triggers for the named table







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Sandro Furieri (a.furieri@lqt.it)
 
Portions created by the Initial Developer are Copyright (C) 2014
the Initial Developer. All Rights Reserved.

Contributor(s):
Brad Hards (bradh@frogmouth.net)

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................

#include "spatialite/geopackage.h"
#include "spatialite/gaiaaux.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgAddGeometryTriggers (sqlite3_context * context, int argc
			      __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddGeometryTriggers(table, column)
/
/ Adds Geopackage geometry table triggers for the named table

Changes to src/geopackage/gpkg_add_spatial_index.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Sandro Furieri (a.furieri@lqt.it)
 
Portions created by the Initial Developer are Copyright (C) 2014-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Brad Hards (bradh@frogmouth.net)

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................

#include "spatialite/geopackage.h"
#include "spatialite/gaiaaux.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgAddSpatialIndex (sqlite3_context * context, int argc
			  __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddSpatialIndex(table, column)
/
/ Adds Geopackage SpatialIndex triggers for the named table







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Sandro Furieri (a.furieri@lqt.it)
 
Portions created by the Initial Developer are Copyright (C) 2014
the Initial Developer. All Rights Reserved.

Contributor(s):
Brad Hards (bradh@frogmouth.net)

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................

#include "spatialite/geopackage.h"
#include "spatialite/gaiaaux.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgAddSpatialIndex (sqlite3_context * context, int argc
			  __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddSpatialIndex(table, column)
/
/ Adds Geopackage SpatialIndex triggers for the named table

Changes to src/geopackage/gpkg_add_tile_triggers.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgAddTileTriggers (sqlite3_context * context, int argc
			  __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddTileTriggers(table)
/
/ Adds Geopackage tile table triggers for the named table







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgAddTileTriggers (sqlite3_context * context, int argc
			  __attribute__ ((unused)), sqlite3_value ** argv)
{
/* SQL function:
/ gpkgAddTileTriggers(table)
/
/ Adds Geopackage tile table triggers for the named table

Changes to src/geopackage/gpkg_get_normal_row.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgGetNormalRow (sqlite3_context * context, int argc UNUSED,
		       sqlite3_value ** argv)
{
/* SQL function:
/ gpkgGetNormalRow(tile_table_name, normal_zoom_level, inverted_row_number)
/
/ Gets the normal integer row number for the specified table, normal zoom level







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgGetNormalRow (sqlite3_context * context, int argc UNUSED,
		       sqlite3_value ** argv)
{
/* SQL function:
/ gpkgGetNormalRow(tile_table_name, normal_zoom_level, inverted_row_number)
/
/ Gets the normal integer row number for the specified table, normal zoom level

Changes to src/geopackage/gpkg_get_normal_zoom.c.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_PRIVATE void
fnct_gpkgGetNormalZoom (sqlite3_context * context, int argc UNUSED,
			sqlite3_value ** argv)
{
/* SQL function:
/ gpkgGetNormalZoom(tile_table_name, inverted_zoom_level)
/
/ Gets the normal integer zoom level for data stored in the specified table.







|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include "spatialite/geopackage.h"
#include "config.h"
#include "geopackage_internal.h"

#ifdef ENABLE_GEOPACKAGE
GEOPACKAGE_DECLARE void
fnct_gpkgGetNormalZoom (sqlite3_context * context, int argc UNUSED,
			sqlite3_value ** argv)
{
/* SQL function:
/ gpkgGetNormalZoom(tile_table_name, inverted_zoom_level)
/
/ Gets the normal integer zoom level for data stored in the specified table.

Changes to src/headers/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
..
19
20
21
22
23
24
25
26
27
28
29
30
31

if MODULE_ONLY
noinst_HEADERS = 
nobase_include_HEADERS = 
else
noinst_HEADERS = spatialite_private.h
nobase_include_HEADERS = spatialite.h \
	spatialite/gaiaexif.h \
	spatialite/gaiaaux.h \
	spatialite/gaiamatrix.h \
	spatialite/gaiageo.h \
	spatialite/gg_const.h \
................................................................................
	spatialite/gg_xml.h \
	spatialite/gg_wfs.h \
	spatialite/gg_dxf.h \
	spatialite/spatialite.h \
	spatialite/sqlite.h \
	spatialite/debug.h \
	spatialite/geopackage.h \
	spatialite/control_points.h \
	spatialite/gaia_topology.h \
	spatialite/gaia_network.h \
	spatialite/gg_sequence.h \
	spatialite/stored_procedures.h
endif

<
<
<
<







 







|
<
<
<
<
<
1




2
3
4
5
6
7
8
..
15
16
17
18
19
20
21
22










noinst_HEADERS = spatialite_private.h
nobase_include_HEADERS = spatialite.h \
	spatialite/gaiaexif.h \
	spatialite/gaiaaux.h \
	spatialite/gaiamatrix.h \
	spatialite/gaiageo.h \
	spatialite/gg_const.h \
................................................................................
	spatialite/gg_xml.h \
	spatialite/gg_wfs.h \
	spatialite/gg_dxf.h \
	spatialite/spatialite.h \
	spatialite/sqlite.h \
	spatialite/debug.h \
	spatialite/geopackage.h \
	spatialite/control_points.h





Changes to src/headers/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
...
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
...
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
351
352
353
354
355
356
357

358
359
360
361
362
363
364
...
600
601
602
603
604
605
606
607
608
609
610
611
612
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/headers


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__nobase_include_HEADERS_DIST) \
	$(am__noinst_HEADERS_DIST) $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__nobase_include_HEADERS_DIST = spatialite.h spatialite/gaiaexif.h \
	spatialite/gaiaaux.h spatialite/gaiamatrix.h \
	spatialite/gaiageo.h spatialite/gg_const.h \
	spatialite/gg_structs.h spatialite/gg_core.h \
	spatialite/gg_mbr.h spatialite/gg_formats.h \
	spatialite/gg_dynamic.h spatialite/gg_advanced.h \
	spatialite/gg_xml.h spatialite/gg_wfs.h spatialite/gg_dxf.h \
	spatialite/spatialite.h spatialite/sqlite.h spatialite/debug.h \
	spatialite/geopackage.h spatialite/control_points.h \
	spatialite/gaia_topology.h spatialite/gaia_network.h \
	spatialite/gg_sequence.h spatialite/stored_procedures.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    *) f=$$p;; \
  esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
................................................................................
am__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__installdirs = "$(DESTDIR)$(includedir)"
am__noinst_HEADERS_DIST = spatialite_private.h
HEADERS = $(nobase_include_HEADERS) $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@MODULE_ONLY_FALSE@noinst_HEADERS = spatialite_private.h
@MODULE_ONLY_TRUE@noinst_HEADERS = 
@MODULE_ONLY_FALSE@nobase_include_HEADERS = spatialite.h \
@MODULE_ONLY_FALSE@	spatialite/gaiaexif.h \
@MODULE_ONLY_FALSE@	spatialite/gaiaaux.h \
@MODULE_ONLY_FALSE@	spatialite/gaiamatrix.h \
@MODULE_ONLY_FALSE@	spatialite/gaiageo.h \
@MODULE_ONLY_FALSE@	spatialite/gg_const.h \
@MODULE_ONLY_FALSE@	spatialite/gg_structs.h \
@MODULE_ONLY_FALSE@	spatialite/gg_core.h \
@MODULE_ONLY_FALSE@	spatialite/gg_mbr.h \
@MODULE_ONLY_FALSE@	spatialite/gg_formats.h \
@MODULE_ONLY_FALSE@	spatialite/gg_dynamic.h \
@MODULE_ONLY_FALSE@	spatialite/gg_advanced.h \
@MODULE_ONLY_FALSE@	spatialite/gg_xml.h \
@MODULE_ONLY_FALSE@	spatialite/gg_wfs.h \
@MODULE_ONLY_FALSE@	spatialite/gg_dxf.h \
@MODULE_ONLY_FALSE@	spatialite/spatialite.h \
@MODULE_ONLY_FALSE@	spatialite/sqlite.h \
@MODULE_ONLY_FALSE@	spatialite/debug.h \
@MODULE_ONLY_FALSE@	spatialite/geopackage.h \
@MODULE_ONLY_FALSE@	spatialite/control_points.h \
@MODULE_ONLY_FALSE@	spatialite/gaia_topology.h \
@MODULE_ONLY_FALSE@	spatialite/gaia_network.h \
@MODULE_ONLY_FALSE@	spatialite/gg_sequence.h \
@MODULE_ONLY_FALSE@	spatialite/stored_procedures.h

@MODULE_ONLY_TRUE@nobase_include_HEADERS = 
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/headers/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/headers/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-nobase_includeHEADERS install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am uninstall-nobase_includeHEADERS

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<
<







 







<
<
<
<
<
<
<
<
<
<
<







 







<







 







<







 







|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<

<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90


91
92
93
94
95
96
97
...
107
108
109
110
111
112
113











114
115
116
117
118
119
120
...
135
136
137
138
139
140
141

142
143
144
145
146
147
148
...
155
156
157
158
159
160
161

162
163
164
165
166
167
168
...
285
286
287
288
289
290
291
292

293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312




313

314
315
316
317
318
319
320
...
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
...
572
573
574
575
576
577
578


579
580
581
582
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/headers
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(nobase_include_HEADERS) $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)


mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac











am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    *) f=$$p;; \
  esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
................................................................................
am__uninstall_files_from_dir = { \
  test -z "$$files" \
    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
         $(am__cd) "$$dir" && rm -f $$files; }; \
  }
am__installdirs = "$(DESTDIR)$(includedir)"

HEADERS = $(nobase_include_HEADERS) $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_HEADERS = spatialite_private.h

nobase_include_HEADERS = spatialite.h \
	spatialite/gaiaexif.h \
	spatialite/gaiaaux.h \
	spatialite/gaiamatrix.h \
	spatialite/gaiageo.h \
	spatialite/gg_const.h \
	spatialite/gg_structs.h \
	spatialite/gg_core.h \
	spatialite/gg_mbr.h \
	spatialite/gg_formats.h \
	spatialite/gg_dynamic.h \
	spatialite/gg_advanced.h \
	spatialite/gg_xml.h \
	spatialite/gg_wfs.h \
	spatialite/gg_dxf.h \
	spatialite/spatialite.h \
	spatialite/sqlite.h \
	spatialite/debug.h \
	spatialite/geopackage.h \
	spatialite/control_points.h






all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/headers/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/headers/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-nobase_includeHEADERS install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am uninstall-nobase_includeHEADERS




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/headers/spatialite.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
...
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
...
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
...
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
...
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
...
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
...
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
...
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
...
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
...
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
...
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
....
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
....
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
....
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
/* 
 spatialite.h -- Gaia spatial support for SQLite 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 Initializes the internal memory block supporting each connection

 \sa spatialite_init_ex, spatialite_cleanup_ex

 */
    SPATIALITE_DECLARE void *spatialite_alloc_connection (void);

/**
 Disables reporting GEOS/RTTOPO error and warnings on stderr

 \param ptr a memory pointer returned by spatialite_alloc_connection()

 \sa spatialite_init_ex, spatialite_cleanup_ex, 
 spatialite_set_verbose_mode

 */
    SPATIALITE_DECLARE void spatialite_set_silent_mode (const void *ptr);

/**
 Enables reporting GEOS/RTTOPO error and warnings on stderr

 \param ptr a memory pointer returned by spatialite_alloc_connection()

 \sa spatialite_init_ex, spatialite_cleanup_ex, 
 spatialite_set_silent_mode

 */
    SPATIALITE_DECLARE void spatialite_set_verbode_mode (const void *ptr);

/**
 Initializes a SpatiaLite connection. 

 This function is now \b DEPRECATED because is not reentrant (not thread safe);
 use spatialite_init_ex() for all new development.

 \param verbose if TRUE a short start-up message is shown on stderr
................................................................................
 \param ptr the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()

 \sa spatialite_init_ex, spatialite_alloc_connection
*/
    SPATIALITE_DECLARE void spatialite_cleanup_ex (const void *ptr);

/**
 Partially Cleaning-up a SpatiaLite connection

 This function will destroy all TopoGeo and TopoNet objects from within a local cache.

 \param ptr the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()

 \sa spatialite_init_ex, spatialite_alloc_connection
*/
    SPATIALITE_DECLARE void spatialite_finalize_topologies (const void *ptr);

/**
 Enables the BLOB-TinyPoint encoding
 
 \param ptr the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 
 \sa disable_tiny_point, is_tiny_point_enabled
*/
    SPATIALITE_DECLARE void enable_tiny_point (const void *ptr);

/**
 Disables the BLOB-TinyPoint encoding
 
 \param ptr the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 
 \sa disable_tiny_point, is_tiny_point_enabled
*/
    SPATIALITE_DECLARE void disable_tiny_point (const void *ptr);

/**
 Checks if the BLOB-TinyPoint encoding is enabled or not
 
 \param ptr the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 
 \return 0 (FALSE) if not enabled, any other value (TRUE) if enabled
 
 \sa enable_tiny_point, disable_tiny_point
*/
    SPATIALITE_DECLARE int is_tiny_point_enabled (const void *ptr);

/**
 Dumps a full geometry-table into an external Shapefile

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param column the name of the geometry column
 \param shp_path pathname of the Shapefile to be exported (no suffix) 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of exported rows
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_shapefile_ex

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_shapefile (sqlite3 * sqlite, char *table,
					   char *column, char *shp_path,
					   char *charset, char *geom_type,
					   int verbose, int *rows,
					   char *err_msg);

/**
 Dumps a full geometry-table into an external Shapefile

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param column the name of the geometry column
 \param shp_path pathname of the Shapefile to be exported (no suffix) 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of exported rows
 \param colname_case one between GAIA_DBF_COLNAME_LOWERCASE, 
	GAIA_DBF_COLNAME_UPPERCASE or GAIA_DBF_COLNAME_CASE_IGNORE.
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_shapefile

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_shapefile_ex (sqlite3 * sqlite, char *table,
					      char *column, char *shp_path,
					      char *charset, char *geom_type,
					      int verbose, int *rows,
					      int colcase_name, char *err_msg);

/**
 Loads an external Shapefile into a newly created table

 \param sqlite handle to current DB connection
 \param shp_path pathname of the Shapefile to be imported (no suffix) 
 \param table the name of the table to be created
 \param charset a valid GNU ICONV charset to be used for DBF text strings
................................................................................
 \param verbose if TRUE a short report is shown on stderr
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile_ex, load_shapefile_ex2, load_shapefile_ex3

 \note this function simply calls load_shapefile_ex by passing 
  implicit gype="AUTO" and pk_column=NULL arguments
 */
    SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path,
					   char *table, char *charset, int srid,
					   char *column, int coerce2d,
................................................................................
 \param verbose if TRUE a short report is shown on stderr
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile, load_shapefile_ex2, load_shapefile_ex3

 \note the Shapefile format doesn't supports any distinction between
  LINESTRINGs and MULTILINESTRINGs, or between POLYGONs and MULTIPOLYGONs;
  as does not allows to clearly distinguish if the M-measure is required.
 \n So a first preliminary scan of the Shapefile is required in order to
  correctly identify the actual payload (gtype = "AUTO", default case).
 \n By explicitly specifying some expected geometry type this first scan
................................................................................
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param text_dates is TRUE all DBF dates will be considered as TEXT
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile, load_shapefile_ex, load_shapefile_ex3

 \note the Shapefile format doesn't supports any distinction between
  LINESTRINGs and MULTILINESTRINGs, or between POLYGONs and MULTIPOLYGONs;
  as does not allows to clearly distinguish if the M-measure is required.
 \n So a first preliminary scan of the Shapefile is required in order to
  correctly identify the actual payload (gtype = "AUTO", default case).
 \n By explicitly specifying some expected geometry type this first scan
................................................................................
					       int srid, char *geo_column,
					       char *gtype, char *pk_column,
					       int coerce2d, int compressed,
					       int verbose, int spatial_index,
					       int text_date, int *rows,
					       char *err_msg);

/**
 Loads an external Shapefile into a newly created table

 \param sqlite handle to current DB connection
 \param shp_path pathname of the Shapefile to be imported (no suffix) 
 \param table the name of the table to be created
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param srid the SRID to be set for Geometries
 \param geo_column the name of the geometry column
 \param gtype expected to be one of: "LINESTRING", "LINESTRINGZ", 
  "LINESTRINGM", "LINESTRINGZM", "MULTILINESTRING", "MULTILINESTRINGZ",
  "MULTILINESTRINGM", "MULTILINESTRINGZM", "POLYGON", "POLYGONZ", "POLYGONM", 
  "POLYGONZM", "MULTIPOLYGON", "MULTIPOLYGONZ", "MULTIPOLYGONM", 
  "MULTIPOLYGONZM" or "AUTO".
 \param pk_column name of the Primary Key column; if NULL or mismatching
 then "PK_UID" will be assumed by default.
 \param coerce2d if TRUE any Geometry will be casted to 2D [XY]
 \param compressed if TRUE compressed Geometries will be created
 \param verbose if TRUE a short report is shown on stderr
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param text_dates is TRUE all DBF dates will be considered as TEXT
 \param rows on completion will contain the total number of imported rows
 \param colname_case one between GAIA_DBF_COLNAME_LOWERCASE, 
	GAIA_DBF_COLNAME_UPPERCASE or GAIA_DBF_COLNAME_CASE_IGNORE.
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile, load_shapefile_ex, load_shapefile_ex2

 \note the Shapefile format doesn't supports any distinction between
  LINESTRINGs and MULTILINESTRINGs, or between POLYGONs and MULTIPOLYGONs;
  as does not allows to clearly distinguish if the M-measure is required.
 \n So a first preliminary scan of the Shapefile is required in order to
  correctly identify the actual payload (gtype = "AUTO", default case).
 \n By explicitly specifying some expected geometry type this first scan
  will be skipped at all thus introducing a noticeable performance gain.
 \n Anyway, declaring a mismatching geometry type will surely cause a failure.
 */
    SPATIALITE_DECLARE int load_shapefile_ex3 (sqlite3 * sqlite, char *shp_path,
					       char *table, char *charset,
					       int srid, char *geo_column,
					       char *gtype, char *pk_column,
					       int coerce2d, int compressed,
					       int verbose, int spatial_index,
					       int text_date, int *rows,
					       int colname_case, char *err_msg);

/**
 Loads an external DBF file into a newly created table

 \param sqlite handle to current DB connection
 \param dbf_path pathname of the DBF file to be imported
 \param table the name of the table to be created
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of actually exported rows
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf_ex, load_dbf_ex2, load_dbf_ex3

 \note this function simply calls load_dbf_ex by passing an
  implicit pk_column=NULL argument

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf (sqlite3 * sqlite, char *dbf_path,
................................................................................
 \param pk_column name of the Primary Key column; if NULL or mismatching
 then "PK_UID" will be assumed by default.
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of actually exported rows
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf, load_dbf_ex2, load_dbf_ex3

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf_ex (sqlite3 * sqlite, char *dbf_path,
					char *table, char *pk_column,
					char *charset, int verbose, int *rows,
					char *err_msg);
................................................................................
 then "PK_UID" will be assumed by default.
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param text_dates is TRUE all DBF dates will be considered as TEXT
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf, load_dbf_ex, load_dbf_ex3

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf_ex2 (sqlite3 * sqlite, char *dbf_path,
					 char *table, char *pk_column,
					 char *charset, int verbose,
					 int text_date, int *rows,
					 char *err_msg);

/**
 Loads an external DBF file into a newly created table

 \param sqlite handle to current DB connection
 \param dbf_path pathname of the DBF file to be imported
 \param table the name of the table to be created
 \param pk_column name of the Primary Key column; if NULL or mismatching
 then "PK_UID" will be assumed by default.
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param text_dates is TRUE all DBF dates will be considered as TEXT
 \param rows on completion will contain the total number of imported rows
 \param colname_case one between GAIA_DBF_COLNAME_LOWERCASE, 
	GAIA_DBF_COLNAME_UPPERCASE or GAIA_DBF_COLNAME_CASE_IGNORE.
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf, load_dbf_ex, load_dbf_ex2

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf_ex3 (sqlite3 * sqlite, char *dbf_path,
					 char *table, char *pk_column,
					 char *charset, int verbose,
					 int text_date, int *rows,
					 int colname_case, char *err_msg);

/**
 Dumps a full table into an external DBF file

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param dbf_path pathname of the DBF to be exported 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_dbf_ex, dump_dbf_ex2

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_dbf (sqlite3 * sqlite, char *table,
				     char *dbf_path, char *charset,
				     char *err_msg);

................................................................................
 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param dbf_path pathname of the DBF to be exported 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param rows on completion will contain the total number of exported rows
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_dbf, dump_dbf_ex2

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_dbf_ex (sqlite3 * sqlite, char *table,
					char *dbf_path, char *charset,
					int *rows, char *err_msg);

/**
 Dumps a full table into an external DBF file

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param dbf_path pathname of the DBF to be exported 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param rows on completion will contain the total number of exported rows
 \param colname_case one between GAIA_DBF_COLNAME_LOWERCASE, 
	GAIA_DBF_COLNAME_UPPERCASE or GAIA_DBF_COLNAME_CASE_IGNORE.
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_dbf, dump_dbf_ex

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_dbf_ex2 (sqlite3 * sqlite, char *table,
					 char *dbf_path, char *charset,
					 int *rows, int colname_case,
					 char *err_msg);

/**
 Loads an external spreadsheet (.xls) file into a newly created table

 \param sqlite handle to current DB connection
 \param path pathname of the spreadsheet file to be imported
 \param table the name of the table to be created
 \param worksheetIndex the index identifying the worksheet to be imported
................................................................................
 Remove duplicated rows from a table

 \param sqlite handle to current DB connection
 \param table name of the table to be cleaned

 \sa check_duplicated_rows, remove_duplicated_rows_ex

 \note when two (or more) duplicated rows exist, only the first occurrence
 will be preserved, then deleting any further occurrence.
 */
    SPATIALITE_DECLARE void remove_duplicated_rows (sqlite3 * sqlite,
						    char *table);

/**
 Remove duplicated rows from a table

 \param sqlite handle to current DB connection
 \param table name of the table to be cleaned
 \param removed on successful completion will contain the total
 count of removed duplicate rows

 \sa check_duplicated_rows, remove_duplicated_rows_ex2

 \note when two (or more) duplicated rows exist, only the first occurrence
 will be preserved, then deleting any further occurrence.
 */
    SPATIALITE_DECLARE void remove_duplicated_rows_ex (sqlite3 * sqlite,
						       char *table,
						       int *removed);

/**
 Remove duplicated rows from a table

 \param sqlite handle to current DB connection
 \param table name of the table to be cleaned
 \param removed on successful completion will contain the total
 count of removed duplicate rows
 \param transaction boolena; if set to TRUE will internally handle
 a SQL Transaction

 \sa check_duplicated_rows, remove_duplicated_rows

 \note when two (or more) duplicated rows exist, only the first occurrence
 will be preserved, then deleting any further occurrence.
 */
    SPATIALITE_DECLARE void remove_duplicated_rows_ex2 (sqlite3 * sqlite,
							char *table,
							int *removed,
							int transaction);

/**
 Creates a derived table surely containing elementary Geometries

 \param sqlite handle to current DB connection
 \param inTable name of the input table 
 \param geometry name of the Geometry column
 \param outTable name of the output table to be created
................................................................................
 \param inTable name of the input table 
 \param geometry name of the Geometry column
 \param outTable name of the output table to be created
 \param pKey name of the Primary Key column in the output table
 \param multiId name of the column identifying origins in the output table
 \param rows on completion will contain the total number of inserted rows
 
 \sa elementary_geometries_ex2

 \note if the input table contains some kind of complex Geometry
 (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON or GEOMETRYCOLLECTION),
 then many rows are inserted into the output table: each single 
 row will contain the same attributes and an elementaty Geometry.
 All the rows created by expanding the same input row will expose
 the same value in the "multiId" column.
................................................................................
    SPATIALITE_DECLARE void elementary_geometries_ex (sqlite3 * sqlite,
						      char *inTable,
						      char *geometry,
						      char *outTable,
						      char *pKey, char *multiId,
						      int *rows);

/**
 Creates a derived table surely containing elementary Geometries

 \param sqlite handle to current DB connection
 \param inTable name of the input table 
 \param geometry name of the Geometry column
 \param outTable name of the output table to be created
 \param pKey name of the Primary Key column in the output table
 \param multiId name of the column identifying origins in the output table
 \param rows on completion will contain the total number of inserted rows
 \param transaction boolena; if set to TRUE will internally handle
 a SQL Transaction
 
 \sa elementary_geometries_ex3

 \note if the input table contains some kind of complex Geometry
 (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON or GEOMETRYCOLLECTION),
 then many rows are inserted into the output table: each single 
 row will contain the same attributes and an elementaty Geometry.
 All the rows created by expanding the same input row will expose
 the same value in the "multiId" column.
 */
    SPATIALITE_DECLARE void elementary_geometries_ex2 (sqlite3 * sqlite,
						       char *inTable,
						       char *geometry,
						       char *outTable,
						       char *pKey,
						       char *multiId, int *rows,
						       int transaction);

/**
 Creates a derived table surely containing elementary Geometries

 \param sqlite handle to current DB connection
 \param inTable name of the input table 
 \param geometry name of the Geometry column
 \param outTable name of the output table to be created
 \param pKey name of the Primary Key column in the output table
 \param multiId name of the column identifying origins in the output table
 \param options pointer to an Options list created by gaiaAuxClonerCreate()
 \param rows on completion will contain the total number of inserted rows
 \param transaction boolena; if set to TRUE will internally handle
 a SQL Transaction
 
 \sa elementary_geometries

 \note if the input table contains some kind of complex Geometry
 (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON or GEOMETRYCOLLECTION),
 then many rows are inserted into the output table: each single 
 row will contain the same attributes and an elementaty Geometry.
 All the rows created by expanding the same input row will expose
 the same value in the "multiId" column.
 */
    SPATIALITE_DECLARE void elementary_geometries_ex3 (sqlite3 * sqlite,
						       char *inTable,
						       char *geometry,
						       char *outTable,
						       char *pKey,
						       char *multiId,
						       const void *options,
						       int *rows,
						       int transaction);

/**
 Dumps a full geometry-table into an external GeoJSON file

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param geom_col the name of the geometry column
 \param outfile_path pathname for the GeoJSON file to be written to
................................................................................
 \return the pointer to the newly created VectorLayersList object: NULL on failure

 \sa gaiaFreeVectorLayersList, update_layer_statistics, gaiaStatisticsInvalidate, 
 gaiaGetLayerExtent, gaiaGetVectorLayersList

 \note you are responsible to destroy (before or after) any allocated
 VectorLayersList returned by gaiaGetVectorLayersList().
 \n If the table arg is NULL all VectorLayers defined within the DB will be reported
  (and in this case all AttributeField Infos will be always suppressed);
  otherwise only a single Layer will be reported (if existing).
 \n By defining the geometry arg (not NULL) you can further restrict the returned report.
 \n When the mode arg is set to GAIA_VECTORS_LIST_OPTIMISTIC (default) then the returned infos
  will be simply retrieved from the staticized statistic tables (faster, but could be inaccurate).
 \n If the mode arg is set to GAIA_VECTORS_LIST_PESSIMISTIC a preliminary attempt to update the
  statistic tables will be always performed (probably slower, but surely accurate).
 */
................................................................................
 \note this function will drop a SpatialTable, SpatialView or VirtualShape being
 properly registered within the Metadata tables.
 \n an eventual Spatial Index will be dropped as well, and any row referring the
 selected table will be removed from the Metadata tables.

 \return 0 on failure, any other value on success

 \sa gaiaDropTableEx2
 */
    SPATIALITE_DECLARE int gaiaDropTableEx (sqlite3 * sqlite,
					    const char *prefix,
					    const char *table);

/**
 Drops a layer-table, removing any related dependency

 \param sqlite handle to current DB connection
 \param prefix schema prefix identifying the target DB\n
 "main" always identifies the main DB (primary, not Attached).
 \param table name of the table to be removed
 \param transaction boolena; if set to TRUE will internally handle
 a SQL Transaction

 \note this function will drop a SpatialTable, SpatialView or VirtualShape being
 properly registered within the Metadata tables.
 \n an eventual Spatial Index will be dropped as well, and any row referring the
 selected table will be removed from the Metadata tables.

 \return 0 on failure, any other value on success

 \sa gaiaDropTable
 */
    SPATIALITE_DECLARE int gaiaDropTableEx2 (sqlite3 * sqlite,
					     const char *prefix,
					     const char *table,
					     int transaction);

/**
 Drops a layer-table, removing any related dependency

 \param sqlite handle to current DB connection
 \param prefix schema prefix identifying the target DB\n
 "main" always identifies the main DB (primary, not Attached).
 \param table name of the table to be removed
 \param transaction boolean; if set to TRUE will internally handle
 a SQL Transaction
 \param error_message: will point to a diagnostic error message
  in case of failute

 \note this function will drop a SpatialTable, SpatialView or VirtualShape being
 properly registered within the Metadata tables.
 \n an eventual Spatial Index will be dropped as well, and any row referring the
 selected table will be removed from the Metadata tables.
 \n an eventual diagnostic message pointed by error_message must be
 freed by calling sqlite3_free()

 \return 0 on failure, any other value on success

 \sa gaiaDropTable
 */
    SPATIALITE_DECLARE int gaiaDropTableEx3 (sqlite3 * sqlite,
					     const char *prefix,
					     const char *table,
					     int transaction,
					     char **error_message);

/**
 Checks a Geometry Column for validity

 \param sqlite handle to current DB connection
 \param table name of the table 
 \param geometry name of the column to be checked
 \param report_path pathname of the report-file
................................................................................
							    const char
							    *tmp_prefix,
							    const char
							    *output_dir,
							    int *not_repaired,
							    char **err_msg);

/**
  Will precisely cut the input dataset against polygonal blade(s)
  and will consequently create and populate an output dataset
  
 \param db_handle handle to the current SQLite connection
 \param cache a memory pointer returned by spatialite_alloc_connection()
 \param in_db_prefix prefix of the database where the input table
 is expected to be found. if NULL then "MAIN" will be assumed.
 \param input_table name of the input table to be processed.
 \param input_geometry name of the input table Geometry column;
 it could be NULL and in this case the appropriate column name will
 be automatically determind. anyway if the input table do contains
 two or more Geometries passing a NULL geometry name will raise a
 fatal error.
 \param blade_db_prefix prefix of the database where the "blade" table
 is expected to be found. if NULL then "MAIN" will be assumed.
 \param blade_table name of the table expected to contain Polygons
 or MultiPolygon Geometries acting as blades.
 \param blade_geometry name of the "blade" table Geometry column;
 it could be NULL and in this case the appropriate column name will
 be automatically determind. anyway if the input table do contains
 two or more Geometries passing a NULL geometry name will raise a
 fatal error.
 \param output_table name to assinged to the destination table intended
 to permanently store all results. this table must non exists.
 \param transaction boolean; if set to TRUE will internally handle
 a SQL Transaction.
 \param ram_tmp_store boolean: if set to TRUE all TEMPORARY tables
 and indices will be created in RAM, otherwise in a file.
 \param message pointer to a string buffer; if not NULL it will point
 on completion an eventual error message.
 
 \return 0 on failure, any other value on success
 
 \note the message buffer if not NULL will point to a dymanic memory
 allocation and is expected to be released by calling sqlite3_free()
 */
    SPATIALITE_DECLARE int gaiaCutter (sqlite3 * db_handle, const void *cache,
				       const char *in_db_prefix,
				       const char *input_table,
				       const char *input_geom,
				       const char *blade_db_prefix,
				       const char *blade_table,
				       const char *blade_geom,
				       const char *output_table,
				       int transaction, int ram_tmp_store,
				       char **message);

/**
  Will attempt to create the Routing Nodes columns for a spatial table
  
 \param db_handle handle to the current SQLite connection
 \param cache a memory pointer returned by spatialite_alloc_connection()
 \param prefix schema prefix identifying the target DB (could be 
  eventually NULL)\n
 \param table name of the table to be processed.
 \param geom_column name of the table column containing Linestring Geometries
 (could be eventually NULL).
 \param from_column name of the table column where NodeFrom values 
  will be stored.
 \param to_column name of the column where ToFrom values 
  will be stored.
 
 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int gaia_create_routing_nodes (sqlite3 * db_handle,
						      const void *cache,
						      const char *prefix,
						      const char *table,
						      const char *geom_column,
						      const char *from_column,
						      const char *to_column);

/**
  Will attempt to create a VirtualRouting from an input table
  
 \param db_handle handle to the current SQLite connection
 \param cache a memory pointer returned by spatialite_alloc_connection()
 \param routing_data_table name of the Routing Data Table to be created.
 \param virtual_routing_table name of the VirtualRouting Table to be created.
 \param input_table name of the input table to be processed.
 \param from_column name of the input table column containing NodeFrom.
 \param to_column name of the input table column containing NodeTo.
 \param geom_column name of the input table column containing Linestring Geometries
 (could be eventually NULL).
 \param cost_column name of the input table column containing Cost values
 (could be eventually NULL).
 \param name_column name of the input table column containing RoadName
 (could be eventually NULL).
 \param a_star_enabled if set to TRUE the Routing Data Table will support
 both Djiskra's Shortest Path and A* algorithms; if set to FALSE only
 the Djiskra's algorithm will be supported.
 \param bidirectional if set to TRUE all input arcs/links will be assumed
 to be bidirectional (from-to and to-from); if set to FALSE all input
 arcs/links will be assumed to be unidirectional (from-to only).
 \param oneway_from name of the input table column containing OneWayFrom
 (could be eventually NULL).
 \param oneway_to name of the input table column containing OneWayTo
 (could be eventually NULL).
 \param overwrite if set to TRUE both the Routing Data Table and the
 VirtualRouting Table will be dropped if already existing; if set to
 FALSE an already existing Routing Data Table or VirtualRouting Table
 will cause a fatal error.
 
 \return 0 on failure, any other value on success
 
 \note at least one between geom_column and cost_column shall not be NULL.
 both oneway_from and oneway_to must be NULL or must contain a valid
 column name; mixing a column name and a NULL will be considered a
 fatal error.
 */
    SPATIALITE_DECLARE int gaia_create_routing (sqlite3 * db_handle,
						const void *cache,
						const char *routing_data_table,
						const char
						*virtual_routing_table,
						const char *input_table,
						const char *from_column,
						const char *to_column,
						const char *geom_column,
						const char *cost_column,
						const char *name_column,
						int a_star_enabled,
						int bidirectional,
						const char *oneway_from,
						const char *oneway_to,
						int overwrite);

    SPATIALITE_DECLARE const char *gaia_create_routing_get_last_error (const
								       void
								       *cache);

    SPATIALITE_DECLARE int gaiaGPKG2Spatialite (sqlite3 * handle_in,
						const char *gpkg_in_path,
						sqlite3 * handle_out,
						const char *splite_out_path);
    SPATIALITE_DECLARE int gaiaSpatialite2GPKG (sqlite3 * handle_in,
						const char *splite_in_path,
						sqlite3 * handle_out,



|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












<
<









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











|







 







|







 







|









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|







 







|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|













|

|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<







 







|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
118
119
120
121
122
123
124






















125
126
127
128
129
130
131
...
183
184
185
186
187
188
189












































190
191
192
193
194
195
196
197
198
199
200
201


202
203
204
205
206
207
208
209
210

























211
212
213
214
215
216
217
...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
...
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
...
324
325
326
327
328
329
330
















































331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
...
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398


























399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
...
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433





















434
435
436
437
438
439
440
...
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736




















737
738
739
740
741
742
743
...
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
...
782
783
784
785
786
787
788































































789
790
791
792
793
794
795
...
926
927
928
929
930
931
932
933

934
935
936
937
938
939
940
....
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051





















































1052
1053
1054
1055
1056
1057
1058
....
1326
1327
1328
1329
1330
1331
1332




































































































































1333
1334
1335
1336
1337
1338
1339
/* 
 spatialite.h -- Gaia spatial support for SQLite 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 Initializes the internal memory block supporting each connection

 \sa spatialite_init_ex, spatialite_cleanup_ex

 */
    SPATIALITE_DECLARE void *spatialite_alloc_connection (void);























/**
 Initializes a SpatiaLite connection. 

 This function is now \b DEPRECATED because is not reentrant (not thread safe);
 use spatialite_init_ex() for all new development.

 \param verbose if TRUE a short start-up message is shown on stderr
................................................................................
 \param ptr the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()

 \sa spatialite_init_ex, spatialite_alloc_connection
*/
    SPATIALITE_DECLARE void spatialite_cleanup_ex (const void *ptr);













































/**
 Dumps a full geometry-table into an external Shapefile

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param column the name of the geometry column
 \param shp_path pathname of the Shapefile to be exported (no suffix) 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param geom_type "POINT", "LINESTRING", "POLYGON", "MULTIPOLYGON" or NULL
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of exported rows
 \param err_msg on completion will contain an error message (if any)



 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_shapefile (sqlite3 * sqlite, char *table,
					   char *column, char *shp_path,
					   char *charset, char *geom_type,
					   int verbose, int *rows,
					   char *err_msg);


























/**
 Loads an external Shapefile into a newly created table

 \param sqlite handle to current DB connection
 \param shp_path pathname of the Shapefile to be imported (no suffix) 
 \param table the name of the table to be created
 \param charset a valid GNU ICONV charset to be used for DBF text strings
................................................................................
 \param verbose if TRUE a short report is shown on stderr
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile_ex, load_shapefile_ex2

 \note this function simply calls load_shapefile_ex by passing 
  implicit gype="AUTO" and pk_column=NULL arguments
 */
    SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path,
					   char *table, char *charset, int srid,
					   char *column, int coerce2d,
................................................................................
 \param verbose if TRUE a short report is shown on stderr
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile, load_shapefile_ex2

 \note the Shapefile format doesn't supports any distinction between
  LINESTRINGs and MULTILINESTRINGs, or between POLYGONs and MULTIPOLYGONs;
  as does not allows to clearly distinguish if the M-measure is required.
 \n So a first preliminary scan of the Shapefile is required in order to
  correctly identify the actual payload (gtype = "AUTO", default case).
 \n By explicitly specifying some expected geometry type this first scan
................................................................................
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param text_dates is TRUE all DBF dates will be considered as TEXT
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \return 0 on failure, any other value on success

 \sa load_shapefile, load_shapefile_ex

 \note the Shapefile format doesn't supports any distinction between
  LINESTRINGs and MULTILINESTRINGs, or between POLYGONs and MULTIPOLYGONs;
  as does not allows to clearly distinguish if the M-measure is required.
 \n So a first preliminary scan of the Shapefile is required in order to
  correctly identify the actual payload (gtype = "AUTO", default case).
 \n By explicitly specifying some expected geometry type this first scan
................................................................................
					       int srid, char *geo_column,
					       char *gtype, char *pk_column,
					       int coerce2d, int compressed,
					       int verbose, int spatial_index,
					       int text_date, int *rows,
					       char *err_msg);

















































/**
 Loads an external DBF file into a newly created table

 \param sqlite handle to current DB connection
 \param dbf_path pathname of the DBF file to be imported
 \param table the name of the table to be created
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of actually exported rows
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf_ex, load_dbf_ex2

 \note this function simply calls load_dbf_ex by passing an
  implicit pk_column=NULL argument

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf (sqlite3 * sqlite, char *dbf_path,
................................................................................
 \param pk_column name of the Primary Key column; if NULL or mismatching
 then "PK_UID" will be assumed by default.
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param rows on completion will contain the total number of actually exported rows
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf, load_dbf_ex2

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf_ex (sqlite3 * sqlite, char *dbf_path,
					char *table, char *pk_column,
					char *charset, int verbose, int *rows,
					char *err_msg);
................................................................................
 then "PK_UID" will be assumed by default.
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param verbose if TRUE a short report is shown on stderr
 \param text_dates is TRUE all DBF dates will be considered as TEXT
 \param rows on completion will contain the total number of imported rows
 \param err_msg on completion will contain an error message (if any)

 \sa load_dbf, load_dbf_ex

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int load_dbf_ex2 (sqlite3 * sqlite, char *dbf_path,
					 char *table, char *pk_column,
					 char *charset, int verbose,
					 int text_date, int *rows,
					 char *err_msg);



























/**
 Dumps a full table into an external DBF file

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param dbf_path pathname of the DBF to be exported 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_dbf_ex

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_dbf (sqlite3 * sqlite, char *table,
				     char *dbf_path, char *charset,
				     char *err_msg);

................................................................................
 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param dbf_path pathname of the DBF to be exported 
 \param charset a valid GNU ICONV charset to be used for DBF text strings
 \param rows on completion will contain the total number of exported rows
 \param err_msg on completion will contain an error message (if any)
 
 \sa dump_dbf

 \return 0 on failure, any other value on success
 */
    SPATIALITE_DECLARE int dump_dbf_ex (sqlite3 * sqlite, char *table,
					char *dbf_path, char *charset,
					int *rows, char *err_msg);






















/**
 Loads an external spreadsheet (.xls) file into a newly created table

 \param sqlite handle to current DB connection
 \param path pathname of the spreadsheet file to be imported
 \param table the name of the table to be created
 \param worksheetIndex the index identifying the worksheet to be imported
................................................................................
 Remove duplicated rows from a table

 \param sqlite handle to current DB connection
 \param table name of the table to be cleaned

 \sa check_duplicated_rows, remove_duplicated_rows_ex

 \note when two (or more) duplicated rows exist, only the first occurence
 will be preserved, then deleting any further occurrence.
 */
    SPATIALITE_DECLARE void remove_duplicated_rows (sqlite3 * sqlite,
						    char *table);

/**
 Remove duplicated rows from a table

 \param sqlite handle to current DB connection
 \param table name of the table to be cleaned
 \param removed on successful completion will contain the total
 count of removed duplicate rows

 \sa check_duplicated_rows, remove_duplicated_rows

 \note when two (or more) duplicated rows exist, only the first occurence
 will be preserved, then deleting any further occurrence.
 */
    SPATIALITE_DECLARE void remove_duplicated_rows_ex (sqlite3 * sqlite,
						       char *table,
						       int *removed);





















/**
 Creates a derived table surely containing elementary Geometries

 \param sqlite handle to current DB connection
 \param inTable name of the input table 
 \param geometry name of the Geometry column
 \param outTable name of the output table to be created
................................................................................
 \param inTable name of the input table 
 \param geometry name of the Geometry column
 \param outTable name of the output table to be created
 \param pKey name of the Primary Key column in the output table
 \param multiId name of the column identifying origins in the output table
 \param rows on completion will contain the total number of inserted rows
 
 \sa elementary_geometries

 \note if the input table contains some kind of complex Geometry
 (MULTIPOINT, MULTILINESTRING, MULTIPOLYGON or GEOMETRYCOLLECTION),
 then many rows are inserted into the output table: each single 
 row will contain the same attributes and an elementaty Geometry.
 All the rows created by expanding the same input row will expose
 the same value in the "multiId" column.
................................................................................
    SPATIALITE_DECLARE void elementary_geometries_ex (sqlite3 * sqlite,
						      char *inTable,
						      char *geometry,
						      char *outTable,
						      char *pKey, char *multiId,
						      int *rows);
































































/**
 Dumps a full geometry-table into an external GeoJSON file

 \param sqlite handle to current DB connection
 \param table the name of the table to be exported
 \param geom_col the name of the geometry column
 \param outfile_path pathname for the GeoJSON file to be written to
................................................................................
 \return the pointer to the newly created VectorLayersList object: NULL on failure

 \sa gaiaFreeVectorLayersList, update_layer_statistics, gaiaStatisticsInvalidate, 
 gaiaGetLayerExtent, gaiaGetVectorLayersList

 \note you are responsible to destroy (before or after) any allocated
 VectorLayersList returned by gaiaGetVectorLayersList().
 \n If the table arg is NULL all VectorLayers defined within the DB will be reported;

  otherwise only a single Layer will be reported (if existing).
 \n By defining the geometry arg (not NULL) you can further restrict the returned report.
 \n When the mode arg is set to GAIA_VECTORS_LIST_OPTIMISTIC (default) then the returned infos
  will be simply retrieved from the staticized statistic tables (faster, but could be inaccurate).
 \n If the mode arg is set to GAIA_VECTORS_LIST_PESSIMISTIC a preliminary attempt to update the
  statistic tables will be always performed (probably slower, but surely accurate).
 */
................................................................................
 \note this function will drop a SpatialTable, SpatialView or VirtualShape being
 properly registered within the Metadata tables.
 \n an eventual Spatial Index will be dropped as well, and any row referring the
 selected table will be removed from the Metadata tables.

 \return 0 on failure, any other value on success

 \sa gaiaDropTable
 */
    SPATIALITE_DECLARE int gaiaDropTableEx (sqlite3 * sqlite,
					    const char *prefix,
					    const char *table);






















































/**
 Checks a Geometry Column for validity

 \param sqlite handle to current DB connection
 \param table name of the table 
 \param geometry name of the column to be checked
 \param report_path pathname of the report-file
................................................................................
							    const char
							    *tmp_prefix,
							    const char
							    *output_dir,
							    int *not_repaired,
							    char **err_msg);





































































































































    SPATIALITE_DECLARE int gaiaGPKG2Spatialite (sqlite3 * handle_in,
						const char *gpkg_in_path,
						sqlite3 * handle_out,
						const char *splite_out_path);
    SPATIALITE_DECLARE int gaiaSpatialite2GPKG (sqlite3 * handle_in,
						const char *splite_in_path,
						sqlite3 * handle_out,

Deleted src/headers/spatialite/control_points.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
/* 
 control_points.h -- Gaia implementation of RMSE and TPS Control Points
  
 version 4.3, 2015 May 5

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/**
 \file control_points.h

 Auxiliary/helper functions
 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef DLL_EXPORT
#define GAIACP_DECLARE __declspec(dllexport)
#else
#define GAIACP_DECLARE extern
#endif
#endif

#ifndef _GAIACP_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GAIACP_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/**
 Typedef for GaiaControPoints object (opaque, hidden)

 \sa GaiaControlPointsPtr
 */
    typedef struct opaque_control_points GaiaControlPoints;
/**
 Typedef for GaiaControPointsPtr object pointer (opaque, hidden)

 \sa GaiaControlPoints
 */
    typedef GaiaControlPoints *GaiaControlPointsPtr;

/**
 Typedef for GaiaPolynomialCoeffs object (opaque, hidden)

 \sa GaiaPolynomialCoeffsPtr
 */
    typedef struct priv_polynomial_coeffs GaiaPolynomialCoeffs;
/**
 Typedef for GaiaPolynomialCoeffsPtr object pointer (opaque, hidden)

 \sa GaiaPolynomialCoeffs
 */
    typedef GaiaPolynomialCoeffs *GaiaPolynomialCoeffsPtr;


/* function prototypes */

/**
 Creates a Control Points container (opaque object)

 \param allocation_incr how many Control Points should be allocated
 every time that necessity arises to increment the internal storage
 \param has3d true if the Control Points are all expected to be 3D
 \param order polynomial order: 1 or 2 or 3
 \param tps true if the solution method must be Thin Plate Spline

 \return the handle of the container object, or NULL on failure

 \sa gaiaFreeControlPoints, gaiaAddControlPoint3D, gaiaAddControlPoint2D,
  gaiaAffineFromControlPoints

 \note you must properly destroy the container object when it 
 isn't any longer used.
 */
    GAIACP_DECLARE GaiaControlPointsPtr gaiaCreateControlPoints (int
								 allocation_incr,
								 int has3d,
								 int order,
								 int tps);

/**
 Destroys a Control Points container (opaque object)

 \param cp_handle the handle identifying the container object  
 (returned by a previous call to gaiaCreateControlPoints).

 \sa gaiaCreateControlPoints
 */
    GAIACP_DECLARE void gaiaFreeControlPoints (GaiaControlPointsPtr cp_handle);

/**
 Add a further Control Point 3D to the container (opaque object)

 \param cp_handle the handle identifying the container object  
 (returned by a previous call to gaiaCreateControlPoints).
 \param x0 X coordinate of the first Point.
 \param y0 Y coordinate of the first Point.
 \param z0 Z coordinate of the first Point.
 \param x1 X coordinate of the second Point.
 \param y1 Y coordinate of the second Point.
 \param z1 Z coordinate of the second Point.
 
 \return 0 on failure: any other different value on success.

 \sa gaiaCreateControlPoints, gaiaAddControlPoint2D
 */
    GAIACP_DECLARE int gaiaAddControlPoint3D (GaiaControlPointsPtr cp_handle,
					      double x0, double y0, double z0,
					      double x1, double y1, double z1);

/**
 Add a further Control Point 2D to the container (opaque object)

 \param cp_handle the handle identifying the container object  
 (returned by a previous call to gaiaCreateControlPoints).
 \param x0 X coordinate of the first Point.
 \param y0 Y coordinate of the first Point.
 \param x1 X coordinate of the second Point.
 \param y1 Y coordinate of the second Point.
 
 \return 0 on failure: any other different value on success.

 \sa gaiaCreateControlPoints, gaiaAddControlPoint3D
 */
    GAIACP_DECLARE int gaiaAddControlPoint2D (GaiaControlPointsPtr cp_handle,
					      double x0, double y0, double x1,
					      double y1);

/**
 Resolves a Control Point set by computing an Affine Transform Matrix

 \param cp_handle the handle identifying the container object  
 (returned by a previous call to gaiaCreateControlPoints).
 \param blob on completion this variable will contain a BLOB-encoded
  Polynomial coeffs object
 \param blob_sz on completion this variable will contain the BLOB's size
  (in bytes)

 \return 0 on failure: any other different value on success.

 \sa gaiaCreateControlPoints, gaiaPolynomialIsValid, gaiaPolynomialAsText,
  gaiaPolynomialTransformGeometry
 */
    GAIACP_DECLARE int gaiaCreatePolynomialCoeffs (GaiaControlPointsPtr
						   cp_handle,
						   unsigned char **blob,
						   int *blob_sz);

/**
 Testing a BLOB-Polynomial for validity
 \param blob pointer to a BLOB-encoded Polynomial coeffs object
 \param blob_sz BLOB's size (in bytes)

 \return TRUE if the BLOB really is of the BLOB-Polynomial type; FALSE if not.

 \sa gaiaCreatePolynomialCoeffs, gaiaPolynomialAsText
 */
    GAIACP_DECLARE int gaiaPolynomialIsValid (const unsigned char *blob,
					      int blob_sz);

/**
 Printing a textual represention from a BLOB-Matrix
 \param blob pointer to a BLOB-encoded Polynomial coeffs object
 \param blob_sz BLOB's size (in bytes)

 \return a text string; NULL on failure.

 \sa gaiaCreateControlPoints, gaiaPolynomialIsValid, 
 gaiaPolynomialTransformGeometry
  
 \note you are responsible to destroy (before or after) any text
  string returned by this function by calling sqlite3_free().
 */
    GAIACP_DECLARE char *gaiaPolynomialAsText (const unsigned char *blob,
					       int blob_sz);

/**
 Transforming a Geometry accordingly to an Affine Transform Matrix
 \param geom the input Geometry
 \param blob pointer to a BLOB-encoded Polynomial coeffs object 
 \param blob_sz BLOB's size (in bytes)

 \return 0 pointer to the transformed Geometry or NULL on failure.

 \sa gaiaCreateControlPoints, gaiaPolynomialIsValid, 
 gaiaPolynomialAsText

 \note you are responsible to destroy (before or after) any Geometry
  returned by this function.
 */
    GAIACP_DECLARE gaiaGeomCollPtr
	gaiaPolynomialTransformGeometry (gaiaGeomCollPtr geom,
					 const unsigned char *blob,
					 int blob_sz);

/**
 Converts a Polynomial coeffs object into an Affine Transsform Matrix

 \param iblob pointer to a BLOB-encoded Polynomial coeffs object 
 \param iblob_sz BLOB's size (in bytes)
 \param oblob on completion this variable will contain a BLOB-encoded
  Affine Transform Matrix object
 \param oblob_sz on completion this variable will contain the BLOB's size
  (in bytes)

 \return 0 on failure: any other different value on success.

 \sa gaiaCreateControlPoints, gaiaPolynomialIsValid, gaiaPolynomialAsText,
  gaiaPolynomialTransformGeometry, gaiaPolynomialToMatrix
 */
    GAIACP_DECLARE int gaiaPolynomialToMatrix (const unsigned char *iblob,
					       int iblob_sz,
					       unsigned char **oblob,
					       int *oblob_sz);

#ifdef __cplusplus
}
#endif

#endif				/* _GAIACP_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































Changes to src/headers/spatialite/debug.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* 
 debug.h -- abstract defs for standard output functions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or



|







 







|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* 
 debug.h -- abstract defs for standard output functions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2012-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or

Deleted src/headers/spatialite/gaia_network.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
/*
 gaia_network.h -- Gaia common support for Topology-Network
  
 version 4.3, 2015 August 11

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/


/**
 \file gaia_network.h

 Topology-Network handling functions and constants 
 */

#ifndef DOXYGEN_SHOULD_SKIP_THIS
/* stdio.h included for FILE objects. */
#include <stdio.h>
#ifdef DLL_EXPORT
#define GAIANET_DECLARE __declspec(dllexport)
#else
#define GAIANET_DECLARE extern
#endif
#endif

#ifndef _GAIANET_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GAIANET_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/**
 Typedef for Topology-Network Accessor Object (opaque, hidden)

 \sa GaiaNetworkAccessorPtr
 */
    typedef struct gaia_network_accessor GaiaNetworkAccessor;
/**
 Typedef for Network Accessor Object pointer (opaque, hidden)

 \sa GaiaNetworkAccessor
 */
    typedef struct gaia_network_accessor *GaiaNetworkAccessorPtr;

/**
 returns the last Topology-Network exception (if any)

 \param network_name unique name identifying the Topology-Network.
 
 \return pointer to the last Topology-Network error message: may be NULL if
 no Topology error is currently pending.
 */
    GAIANET_DECLARE const char *gaiaNetworkGetLastException (const char
							     *network_name);

/**
 creates a new Topology-Network and all related DB objects

 \param handle pointer to the current DB connection.
 \param network_name unique name identifying the Topology-Network.
 \param spatial boolean: if TRUE this Topology-Network will be assumed
 to be of the Spatial type, otherwise a Logical Network will be assumed.
 \param srid a spatial reference identifier (only applies to Spatial
 Networks).
 \param has_z boolean: if TRUE this Topology-Network supports 3D (XYZ) 
 (only applies to Spatial Networks).
 \param allow_coincident boolean: if TRUE coincident Nodes will be
 tolerated, otherwise a coincident Node condition will raise an exception.
 This argument only applies to Spatial Networks and is meaningless for
 Logical Networks.

 \return 0 on failure: any other value on success.

 \sa gaiaNetworkDrop
 */
    GAIANET_DECLARE int gaiaNetworkCreate (sqlite3 * handle,
					   const char *network_name,
					   int spatial, int srid, int has_z,
					   int allow_coincident);

/**
 completely drops an already existing Topology-Network and removes all related DB objects

 \param handle pointer to the current DB connection.
 \param network_name unique name identifying the Topology-Network.

 \return 0 on failure: any other value on success.

 \sa gaiaNetworkCreate
 */
    GAIANET_DECLARE int gaiaNetworkDrop (sqlite3 * handle,
					 const char *network_name);

/**
 creates an opaque Topology-Network Accessor object starting from its DB configuration

 \param handle pointer to the current DB connection.
 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param network_name unique name identifying the Topology-Network.

 \return the pointer to newly created Topology-Network Accessor Object: 
 NULL on failure.

 \sa gaiaNetworkCreate, gaiaNetworkDestroy, gaiaNetworkFromCache, 
 gaiaGetNetwork
 
 \note you are responsible to destroy (before or after) any allocated 
 Topology-Network Accessor Object. The Topology-Network Accessor once 
 created will be preserved within the internal connection cache for 
 future references.
 */
    GAIANET_DECLARE GaiaNetworkAccessorPtr gaiaNetworkFromDBMS (sqlite3 *
								handle,
								const void
								*cache,
								const char
								*network_name);

/**
 retrieves a Topology configuration from DB

 \param handle pointer to the current DB connection.
 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param net_name unique name identifying the Topology-Network.
 \param network_name on completion will point to the real Topology-Network name.
 \param spatial on completion will report if the Topology-Network is of
 the Spatial or Logical type.
 \param srid on completion will contain the Topology-Network SRID.
 \param has_z on completion will report if the Topology-Network is of the 3D type. 
 \param allow_coincident on completion will report if the Topology-Network
 tolerates a Coindident Nodes condition without raising an exception. 

 \return 1 on success: NULL on failure.

 \sa gaiaNetworkCreate, gaiaNetworkDestroy, gaiaNetworkFromCache, 
 gaiaGetNetwork
 */
    GAIANET_DECLARE int gaiaReadNetworkFromDBMS (sqlite3 *
						 handle,
						 const char
						 *net_name,
						 char **network_name,
						 int *spatial, int *srid,
						 int *has_z,
						 int *allow_coincident);

/**
 retrieves an already defined opaque Topology-Network Accessor object from the
 internal connection cache

 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param network_name unique name identifying the Topology-Network.

 \return pointer to an already existing Topology-Network Accessor Object: NULL on failure.

 \sa gaiaNetworkCreate, gaiaNetworkDestroy, gaiaNetworkFromDBMS, 
 gaiaGetNetwork
 */
    GAIANET_DECLARE GaiaNetworkAccessorPtr gaiaNetworkFromCache (const void
								 *cache,
								 const char
								 *network_name);

/**
 will attempt to return a reference to a Topology-Network Accessor object

 \param handle pointer to the current DB connection.
 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param network_name unique name identifying the Topology-Network.

 \return pointer to Topology-Network Accessor Object: NULL on failure.

 \sa gaiaNetworkCreate, gaiaNetworkDestroy, gaiaNetworkFromCache,
 gaiaNetworkFromDBMS
 
 \note if a corresponding Topology-Network Accessor Object is already defined
 will return a pointer to such Objet. Otherwise an attempt will be made
 in order to create a new Topology-Network Accessor object starting from 
 its DB configuration.
 */
    GAIANET_DECLARE GaiaNetworkAccessorPtr gaiaGetNetwork (sqlite3 *
							   handle,
							   const void
							   *cache,
							   const char
							   *network_name);

/**
 destroys a Topology-Network Accessor object and any related memory allocation

 \param ptr pointer to the Topology-Network Accessor Object to be destroyed.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE void gaiaNetworkDestroy (GaiaNetworkAccessorPtr ptr);

/**
 Adds an isolated node into the Topology-Network

 \param ptr pointer to the Topology-Network Accessor Object.
 \param pt pointer to the Node Geometry.

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaMoveIsoNetNode, gaiaRemIsoNetNode,
 gaiaAddLink
 */
    GAIANET_DECLARE sqlite3_int64 gaiaAddIsoNetNode (GaiaNetworkAccessorPtr
						     ptr, gaiaPointPtr pt);

/**
 Moves an isolated node in a Topology-Network from one point to another

 \param ptr pointer to the Topology-Network Accessor Object.
 \param node the unique identifier of node.
 \param pt pointer to the Node Geometry.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddIsoNetNode, gaiaRemIsoNetNode
 */
    GAIANET_DECLARE int gaiaMoveIsoNetNode (GaiaNetworkAccessorPtr ptr,
					    sqlite3_int64 node,
					    gaiaPointPtr pt);

/**
 Removes an isolated node from a Topology-Network

 \param ptr pointer to the Topology-Network Accessor Object.
 \param node the unique identifier of node.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddIsoNetNode, gaiaMoveIsoNetNode
 */
    GAIANET_DECLARE int gaiaRemIsoNetNode (GaiaNetworkAccessorPtr ptr,
					   sqlite3_int64 node);

/**
 Adds a link into the Topology-Network

 \param ptr pointer to the Topology-Network Accessor Object.
 \param start_node the Start Node's unique identifier.
 \param end_node the End Node unique identifier.
 \param ln pointer to the Link Geometry.

 \return the ID of the inserted Link; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddIsoNetNode, gaiaChangeLinkGeom,
 gaiaRemoveLink, gaiaNewLogLinkSplit, gaiaModLogLinkSplit, 
 gaiaNewGeoLinkSplit, gaiaModGeoLinkSplit, gaiaNewLinkHeal,
 gaiaModLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaAddLink (GaiaNetworkAccessorPtr ptr,
					       sqlite3_int64 start_node,
					       sqlite3_int64 end_node,
					       gaiaLinestringPtr ln);

/**
 Changes the shape of a Link without affecting the Topology-Network structure

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link_id the Link unique identifier.
 \param ln pointer to the Link Geometry.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaRemoveLink
 */
    GAIANET_DECLARE int gaiaChangeLinkGeom (GaiaNetworkAccessorPtr ptr,
					    sqlite3_int64 link_id,
					    gaiaLinestringPtr ln);

/**
 Removes a Link from a Topology-Network

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of link.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink
 */
    GAIANET_DECLARE int gaiaRemoveLink (GaiaNetworkAccessorPtr ptr,
					sqlite3_int64 link);

/**
 Split a logical link, replacing it with two new links.

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of the link to be split.

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaModLogLinkSplit, 
 gaiaNewGeoLinkSplit, gaiaModGeoLinkSplit, gaiaNewLinkHeal,
 gaiaModLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaNewLogLinkSplit (GaiaNetworkAccessorPtr
						       ptr, sqlite3_int64 link);

/**
 Split a logical link, modifying the original link and adding a new one.

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of the link to be split.

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaNewLogLinkSplit, 
 gaiaNewGeoLinkSplit, gaiaModGeoLinkSplit, gaiaNewLinkHeal,
 gaiaModLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaModLogLinkSplit (GaiaNetworkAccessorPtr
						       ptr, sqlite3_int64 link);

/**
 Split a spatial link by a node, replacing it with two new links.

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of the link to be split.
 \param pt pointer to the Node Geometry.

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaNewLogLinkSplit, 
 gaiaModLogLinkSplit, gaiaModGeoLinkSplit, gaiaNewLinkHeal,
 gaiaModLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaNewGeoLinkSplit (GaiaNetworkAccessorPtr
						       ptr,
						       sqlite3_int64 link,
						       gaiaPointPtr pt);

/**
 Split a spatial link by a node, modifying the original link and adding
 a new one.

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of the link to be split.
 \param pt pointer to the Node Geometry.

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaNewLogLinkSplit, 
 gaiaModLogLinkSplit, gaiaNewGeoLinkSplit, gaiaNewLinkHeal,
 gaiaModLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaModGeoLinkSplit (GaiaNetworkAccessorPtr
						       ptr,
						       sqlite3_int64 link,
						       gaiaPointPtr pt);

/**
 Heal two links by deleting the node connecting them, deleting both links,
 and replacing them with a new link whose direction is the same as the
 first link provided.

 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of the first link to be healed.
 \param anotherlink the unique identifier of the second link to be healed.

 \return the ID of the removed Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaNewLogLinkSplit, 
 gaiaModLogLinkSplit, gaiaNewGeoLinkSplit, gaiaModGeoLinkSplit,
 gaiaModLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaNewLinkHeal (GaiaNetworkAccessorPtr
						   ptr, sqlite3_int64 link,
						   sqlite3_int64 anotherlink);

/**
 Heal two links by deleting the node connecting them, modfying the first
 link provided, and deleting the second link.
 * 
 \param ptr pointer to the Topology-Network Accessor Object.
 \param link the unique identifier of the first link to be healed.
 \param anotherlink the unique identifier of the second link to be healed.

 \return the ID of the removed Node; a negative number on failure.

 \sa gaiaNetworkFromDBMS, gaiaAddLink, gaiaNewLogLinkSplit, 
 gaiaModLogLinkSplit, gaiaNewGeoLinkSplit, gaiaModGeoLinkSplit,
 gaiaNewLinkHeal
 */
    GAIANET_DECLARE sqlite3_int64 gaiaModLinkHeal (GaiaNetworkAccessorPtr
						   ptr, sqlite3_int64 link,
						   sqlite3_int64 anotherlink);

/**
 Creates a temporary table containing a validation report for a given 
 Logical TopoNet.

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int gaiaValidLogicalNet (GaiaNetworkAccessorPtr ptr);

/**
 Creates a temporary table containing a validation report for a given 
 Spatial TopoNet.

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int gaiaValidSpatialNet (GaiaNetworkAccessorPtr ptr);

/**
 Find the ID of a NetNode at a Point location

 \param ptr pointer to the Topology-Network Accessor Object.
 \param pt pointer to the Point Geometry.
 \param tolerance approximation factor.

 \return the ID of a NetNode; -1 on failure.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE sqlite3_int64
	gaiaGetNetNodeByPoint (GaiaNetworkAccessorPtr ptr, gaiaPointPtr pt,
			       double tolerance);

/**
 Find the ID of a Link at a Point location

 \param ptr pointer to the Topology-Network Accessor Object.
 \param pt pointer to the Point Geometry.
 \param tolerance approximation factor.

 \return the ID of a Link; -1 on failure.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE sqlite3_int64
	gaiaGetLinkByPoint (GaiaNetworkAccessorPtr ptr, gaiaPointPtr pt,
			    double tolerance);

/**
 Populates a Network by importing a whole GeoTable

 \param ptr pointer to the Network Accessor Object.
 \param db-prefix prefix of the DB containing the input GeoTable.
 If NULL the "main" DB will be intended by default.
 \param table name of the input GeoTable.
 \param column name of the input Geometry Column.
 Could be NULL is the input table has just a single Geometry Column.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int
	gaiaTopoNet_FromGeoTable (GaiaNetworkAccessorPtr ptr,
				  const char *db_prefix, const char *table,
				  const char *column);

/**
 Return a Point geometry (seed) identifying a Network Link

 \param ptr pointer to the Network Accessor Object.
 \param link the unique identifier of the link.

 \return pointer to Geomtry (point); NULL on failure.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE gaiaGeomCollPtr
	gaiaGetLinkSeed (GaiaNetworkAccessorPtr ptr, sqlite3_int64 link);

/**
 Ensures that all Links on a Topology-Network will have not less
 than three vertices; for all Links found being simple two-points 
 segments a third intermediate point will be interpolated.

 \param ptr pointer to the Network Accessor Object.

 \return the total number of changed Links; a negativa number on error

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int
	gaiaTopoNet_DisambiguateSegmentLinks (GaiaNetworkAccessorPtr ptr);

/**
 Will update all Seeds for a Topology-Network

 \param ptr pointer to the Network Accessor Object.
 \param mode if set to 0 a full update of all Seeds will be performed,
 otherwise an incremental update will happen.

 \return 1 on success; 0 on failure.

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int
	gaiaTopoNetUpdateSeeds (GaiaNetworkAccessorPtr ptr, int mode);

/**
 Extracts a Simple Features Table out from a Network by matching
 Network Seeds to a given reference Table.

 \param ptr pointer to the Network Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output table to be created and populated.
 \param with_spatial_index boolean flag: if set to TRUE (non ZERO) a Spatial
 Index supporting the output table will be created.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int
	gaiaTopoNet_ToGeoTable (GaiaNetworkAccessorPtr ptr,
				const char *db_prefix, const char *ref_table,
				const char *ref_column, const char *out_table,
				int with_spatial_index);

/**
 Extracts a simplified/generalized Simple Features Table out from a Network 
 by matching Network Seeds to a given reference Table.

 \param ptr pointer to the Network Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output table to be created and populated.
 \param tolerance approximation radius required by the Douglar-Peucker
 simplification algorithm.
 \param with_spatial_index boolean flag: if set to TRUE (non ZERO) a Spatial
 Index supporting the output table will be created.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int
	gaiaTopoNet_ToGeoTableGeneralize (GaiaNetworkAccessorPtr ptr,
					  const char *db_prefix,
					  const char *ref_table,
					  const char *ref_column,
					  const char *out_table,
					  double tolerance,
					  int with_spatial_index);

/**
 Creates and populates a Table containing a comprehensive report
 about all intesections between the Links of some Network and
 a given reference Table of the Linestring/Multilinestring type.

 \param ptr pointer to the Network Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output output table to be created and populated.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaNetworkFromDBMS
 */
    GAIANET_DECLARE int
	gaiaTopoNet_LineLinksList (GaiaNetworkAccessorPtr ptr,
				   const char *db_prefix, const char *ref_table,
				   const char *ref_column,
				   const char *out_table);


#ifdef __cplusplus
}
#endif


#endif				/* _GAIANET_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/headers/spatialite/gaia_topology.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
/*
 gaia_topology.h -- Gaia common support for Topology
  
 version 4.3, 2015 July 15

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/


/**
 \file gaia_topology.h

 Topology handling functions and constants 
 */

#ifndef DOXYGEN_SHOULD_SKIP_THIS
/* stdio.h included for FILE objects. */
#include <stdio.h>
#ifdef DLL_EXPORT
#define GAIATOPO_DECLARE __declspec(dllexport)
#else
#define GAIATOPO_DECLARE extern
#endif
#endif

#ifndef _GAIATOPO_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GAIATOPO_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/**
 Typedef for Topology Accessor Object (opaque, hidden)

 \sa GaiaTopologyAccessorPtr
 */
    typedef struct gaia_topology_accessor GaiaTopologyAccessor;
/**
 Typedef for Topology Accessor Object pointer (opaque, hidden)

 \sa GaiaTopologyAccessor
 */
    typedef struct gaia_topology_accessor *GaiaTopologyAccessorPtr;

/**
 returns the last Topology exception (if any)

 \param topo_name unique name identifying the Topology.
 
 \return pointer to the last Topology error message: may be NULL if
 no Topology error is currently pending.
 */
    GAIATOPO_DECLARE const char *gaiaTopologyGetLastException (const char
							       *topo_name);

/**
 creates a new Topology and all related DB objects

 \param handle pointer to the current DB connection.
 \param topo_name unique name identifying the Topology.
 \param srid a spatial reference identifier.
 \param tolerance a tolerance factor measuren in the same units defined
        by the associated SRID.
 \param has_z boolean: if TRUE this Topology supports 3D (XYZ).

 \return 0 on failure: any other value on success.

 \sa gaiaTopologyDrop
 */
    GAIATOPO_DECLARE int gaiaTopologyCreate (sqlite3 * handle,
					     const char *topo_name, int srid,
					     double tolerance, int has_z);

/**
 completely drops an already existing Topology and removes all related DB objects

 \param handle pointer to the current DB connection.
 \param topo_name unique name identifying the Topology.

 \return 0 on failure: any other value on success.

 \sa gaiaTopologyCreate
 */
    GAIATOPO_DECLARE int gaiaTopologyDrop (sqlite3 * handle,
					   const char *topo_name);

/**
 creates an opaque Topology Accessor object starting from its DB configuration

 \param handle pointer to the current DB connection.
 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param topo_name unique name identifying the Topology.

 \return the pointer to newly created Topology Accessor Object: NULL on failure.

 \sa gaiaTopologyCreate, gaiaTopologyDestroy, gaiaTopologyFromCache, 
 gaiaGetTopology
 
 \note you are responsible to destroy (before or after) any allocated 
 Topology Accessor Object. The Topology Accessor once created will be
 preserved within the internal connection cache for future references.
 */
    GAIATOPO_DECLARE GaiaTopologyAccessorPtr gaiaTopologyFromDBMS (sqlite3 *
								   handle,
								   const void
								   *cache,
								   const char
								   *topo_name);

/**
 retrieves a Topology configuration from DB

 \param handle pointer to the current DB connection.
 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param topo_name unique name identifying the Topology.
 \param topology_name on completion will point to the real Topology name.
 \param srid on completion will contain the Topology SRID.
 \param tolerance on completion will contain the tolerance argument.
 \param has_z on completion will report if the Topology is of the 3D type. 

 \return 1 on success: NULL on failure.

 \sa gaiaTopologyCreate, gaiaTopologyDestroy, gaiaTopologyFromCache, 
 gaiaGetTopology
 */
    GAIATOPO_DECLARE int gaiaReadTopologyFromDBMS (sqlite3 *
						   handle,
						   const char
						   *topo_name,
						   char **topology_name,
						   int *srid,
						   double *tolerance,
						   int *has_z);

/**
 retrieves an already defined opaque Topology Accessor object from the
 internal connection cache

 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param topo_name unique name identifying the Topology.

 \return pointer to an already existing Topology Accessor Object: NULL on failure.

 \sa gaiaTopologyCreate, gaiaTopologyDestroy, gaiaTopologyFromDBMS, 
 gaiaGetTopology
 */
    GAIATOPO_DECLARE GaiaTopologyAccessorPtr gaiaTopologyFromCache (const void
								    *cache,
								    const char
								    *topo_name);

/**
 will attempt to return a reference to a Topology Accessor object

 \param handle pointer to the current DB connection.
 \param cache pointer to the opaque Cache Object supporting the DB connection
 \param topo_name unique name identifying the Topology.

 \return pointer to Topology Accessor Object: NULL on failure.

 \sa gaiaTopologyCreate, gaiaTopologyDestroy, gaiaTopologyFromCache,
 gaiaTopologyFromDBMS
 
 \note if a corresponding Topology Accessor Object is already defined
 will return a pointer to such Objet. Otherwise an attempt will be made
 in order to create a new Topology Accessor object starting from its DB 
 configuration.
 */
    GAIATOPO_DECLARE GaiaTopologyAccessorPtr gaiaGetTopology (sqlite3 *
							      handle,
							      const void
							      *cache,
							      const char
							      *topo_name);

/**
 destroys a Topology Accessor object and any related memory allocation

 \param ptr pointer to the Topology Accessor Object to be destroyed.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE void gaiaTopologyDestroy (GaiaTopologyAccessorPtr ptr);

/**
 Adds an isolated node into the Topology

 \param ptr pointer to the Topology Accessor Object.
 \param face the unique identifier of containing face or -1 for "unknown".
 \param pt pointer to the Node Geometry.
 \param skip_checks boolean: if TRUE skips consistency checks
 (coincident nodes, crossing edges, actual face containement)

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaAddIsoNode (GaiaTopologyAccessorPtr
						   ptr, sqlite3_int64 face,
						   gaiaPointPtr pt,
						   int skip_checks);

/**
 Moves an isolated node in a Topology from one point to another

 \param ptr pointer to the Topology Accessor Object.
 \param node the unique identifier of node.
 \param pt pointer to the Node Geometry.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int gaiaMoveIsoNode (GaiaTopologyAccessorPtr ptr,
					  sqlite3_int64 node, gaiaPointPtr pt);

/**
 Removes an isolated node from a Topology

 \param ptr pointer to the Topology Accessor Object.
 \param node the unique identifier of node.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int gaiaRemIsoNode (GaiaTopologyAccessorPtr ptr,
					 sqlite3_int64 node);

/**
 Adds an isolated edge into the Topology

 \param ptr pointer to the Topology Accessor Object.
 \param start_node the Start Node's unique identifier.
 \param end_node the End Node unique identifier.
 \param ln pointer to the Edge Geometry.

 \return the ID of the inserted Edge; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaAddIsoEdge (GaiaTopologyAccessorPtr
						   ptr,
						   sqlite3_int64 start_node,
						   sqlite3_int64 end_node,
						   gaiaLinestringPtr ln);

/**
 Removes an isolated edge from a Topology

 \param ptr pointer to the Topology Accessor Object.
 \param edge the unique identifier of edge.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int gaiaRemIsoEdge (GaiaTopologyAccessorPtr ptr,
					 sqlite3_int64 edge);

/**
 Changes the shape of an Edge without affecting the Topology structure

 \param ptr pointer to the Topology Accessor Object.
 \param edge_id the Edge unique identifier.
 \param ln pointer to the Edge Geometry.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int gaiaChangeEdgeGeom (GaiaTopologyAccessorPtr ptr,
					     sqlite3_int64 edge_id,
					     gaiaLinestringPtr ln);

/**
 Split an edge by a node, modifying the original edge and adding a new one.

 \param ptr pointer to the Topology Accessor Object.
 \param edge the unique identifier of the edge to be split.
 \param pt pointer to the Node Geometry.
 \param skip_checks boolean: if TRUE skips consistency checks
 (coincident node, point not on edge...)

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaModEdgeSplit (GaiaTopologyAccessorPtr
						     ptr, sqlite3_int64 edge,
						     gaiaPointPtr pt,
						     int skip_checks);

/**
 Split an edge by a node, replacing it with two new edges.

 \param ptr pointer to the Topology Accessor Object.
 \param edge the unique identifier of the edge to be split.
 \param pt pointer to the Node Geometry.
 \param skip_checks boolean: if TRUE skips consistency checks
 (coincident node, point not on edge...)

 \return the ID of the inserted Node; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaNewEdgesSplit (GaiaTopologyAccessorPtr
						      ptr, sqlite3_int64 edge,
						      gaiaPointPtr pt,
						      int skip_checks);

/**
 Adds a new edge possibly splitting and modifying a face.

 \param ptr pointer to the Topology Accessor Object.
 \param start_node the unique identifier of the starting node.
 \param end_node the unique identifier of the ending node.
 \param ln pointer to the Edge Geometry.
 \param skip_checks boolean: if TRUE skips consistency checks
 (curve being simple and valid, start/end nodes, consistency 
 actual face containement)

 \return the ID of the inserted Edge; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaAddEdgeModFace (GaiaTopologyAccessorPtr
						       ptr,
						       sqlite3_int64
						       start_node,
						       sqlite3_int64 end_node,
						       gaiaLinestringPtr ln,
						       int skip_checks);

/**
 Adds a new edge possibly splitting a face (replacing with two new faces).

 \param ptr pointer to the Topology Accessor Object.
 \param start_node the unique identifier of the starting node.
 \param end_node the unique identifier of the ending node.
 \param ln pointer to the Edge Geometry.
 \param skip_checks boolean: if TRUE skips consistency checks
 (curve being simple and valid, start/end nodes, consistency 
 actual face containement)

 \return the ID of the inserted Edge; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64
	gaiaAddEdgeNewFaces (GaiaTopologyAccessorPtr ptr,
			     sqlite3_int64 start_node, sqlite3_int64 end_node,
			     gaiaLinestringPtr ln, int skip_checks);

/**
 Removes an edge, and if the removed edge separated two faces, delete one
 of them and modify the other to take the space of both.

 \param ptr pointer to the Topology Accessor Object.
 \param edge_id the unique identifier of the edge to be removed.

 \return the ID of face that takes up the space previously occupied 
 by the removed edge; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaRemEdgeModFace (GaiaTopologyAccessorPtr
						       ptr,
						       sqlite3_int64 edge_id);

/**
 Removes an edge, and if the removed edge separated two faces, delete the
 original faces and replace them with a new face.

 \param ptr pointer to the Topology Accessor Object.
 \param edge_id the unique identifier of the edge to be removed.

 \return the ID of the created face; a negative number on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaRemEdgeNewFace (GaiaTopologyAccessorPtr
						       ptr,
						       sqlite3_int64 edge_id);

/**
 Heal two edges by removing the node connecting them, modifying the
 first edge and removing the second edge

 \param ptr pointer to the Topology Accessor Object.
 \param edge_id1 the unique identifier of the first edge to be healed.
 \param edge_id2 the unique identifier of the second edge to be healed.

 \return the ID of the removed node.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaModEdgeHeal (GaiaTopologyAccessorPtr
						    ptr,
						    sqlite3_int64 edge_id1,
						    sqlite3_int64 edge_id2);

/**
 Heal two edges by removing the node connecting them, deleting both edges
 and replacing them with an edge whose orientation is the same of the
 first edge provided

 \param ptr pointer to the Topology Accessor Object.
 \param edge_id1 the unique identifier of the first edge to be healed.
 \param edge_id2 the unique identifier of the second edge to be healed.

 \return the ID of the removed node.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64 gaiaNewEdgeHeal (GaiaTopologyAccessorPtr
						    ptr,
						    sqlite3_int64 edge_id1,
						    sqlite3_int64 edge_id2);

/**
 Return the geometry of a Topology Face

 \param ptr pointer to the Topology Accessor Object.
 \param face the unique identifier of the face.

 \return pointer to Geometry (polygon); NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaGetFaceGeometry (GaiaTopologyAccessorPtr ptr, sqlite3_int64 face);

/**
 Updates a temporary table containing the ordered list of Edges
 (in counterclockwise order) for every Face.
 EdgeIDs are signed value; a negative ID intends reverse direction.

 \param ptr pointer to the Topology Accessor Object.
 \param face the unique identifier of the face.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaGetFaceEdges (GaiaTopologyAccessorPtr ptr, sqlite3_int64 face);

/**
 Find the ID of a Node at a Point location

 \param ptr pointer to the Topology Accessor Object.
 \param pt pointer to the Point Geometry.
 \param tolerance approximation factor.

 \return the ID of a Node; -1 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64
	gaiaGetNodeByPoint (GaiaTopologyAccessorPtr ptr, gaiaPointPtr pt,
			    double tolerance);

/**
 Find the ID of an Edge at a Point location

 \param ptr pointer to the Topology Accessor Object.
 \param pt pointer to the Point Geometry.
 \param tolerance approximation factor.

 \return the ID of an Edge; -1 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64
	gaiaGetEdgeByPoint (GaiaTopologyAccessorPtr ptr, gaiaPointPtr pt,
			    double tolerance);

/**
 Find the ID of a Face at a Point location

 \param ptr pointer to the Topology Accessor Object.
 \param pt pointer to the Point Geometry.
 \param tolerance approximation factor.

 \return the ID of a Face; -1 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64
	gaiaGetFaceByPoint (GaiaTopologyAccessorPtr ptr, gaiaPointPtr pt,
			    double tolerance);

/**
 Transforms a (multi)Linestring or (multi)Polygon into an new MultiLinestring.

 \param geom pointer to the input Geometry (Linestring, MultiLinestring,
 Polygon or MultiPolygon).
 \param line_max_points if set to a positive number all input Linestrings 
 and/or Polygon Rings will be split into simpler Lines having no more than
 this maximum number of points. 
 \param max_length if set to a positive value all input Linestrings 
 and/or Polygon Rings will be split into simpler Lines having a length
 not exceeding this threshold. If both line_max_points and max_legth
 are set as the same time the first condition occurring will cause
 a new Line to be started.

 \return a MultiLinestring Geometry; NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaTopoGeo_SubdivideLines (gaiaGeomCollPtr geom, int line_max_points,
				    double max_length);

/**
 Adds a Point to an existing Topology and possibly splitting an Edge.

 \param ptr pointer to the Topology Accessor Object.
 \param pt pointer to the Point Geometry.
 \param tolerance approximation factor.

 \return the ID of the Node; -1 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE sqlite3_int64
	gaiaTopoGeo_AddPoint (GaiaTopologyAccessorPtr ptr, gaiaPointPtr pt,
			      double tolerance);

/**
 Adds a Linestring to an existing Topology without determining generated faces..

 \param ptr pointer to the Topology Accessor Object.
 \param ln pointer to the Linestring Geometry.
 \param tolerance approximation factor.
 \param edge_ids on success will point to an array of Edge IDs
 \param ids_count on success will report the number of Edge IDs in the
 above array

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_AddLineStringNoFace
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_AddLineString (GaiaTopologyAccessorPtr ptr,
				   gaiaLinestringPtr pt, double tolerance,
				   sqlite3_int64 ** edge_ids, int *ids_count);

/**
 Adds a Linestring to an existing Topology and possibly splitting Edges/Faces.

 \param ptr pointer to the Topology Accessor Object.
 \param ln pointer to the Linestring Geometry.
 \param tolerance approximation factor.
 \param edge_ids on success will point to an array of Edge IDs
 \param ids_count on success will report the number of Edge IDs in the
 above array

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_AddLineString, gaiaTopoGeo_Polygonize
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_AddLineStringNoFace (GaiaTopologyAccessorPtr ptr,
					 gaiaLinestringPtr pt,
					 double tolerance,
					 sqlite3_int64 ** edge_ids,
					 int *ids_count);

/**
 Determine and register all topology faces.

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_AddLineStringNoFace, 
 gaiaTopoGeo_FromGeoTableNoFace, FromGeoTableNoFaceExt
 */
    GAIATOPO_DECLARE int gaiaTopoGeo_Polygonize (GaiaTopologyAccessorPtr ptr);

/**
 Snap Geometry to Topology.

 \param ptr pointer to the Topology Accessor Object.
 \param geom pointer to the input Geometry.
 \param tolerance_snap snap tolerance.
 \param tolerance_removal removal tolerance (use -1 to skip removal phase).
 \param iterate if non zero, allows snapping to more than a single 
 vertex, iteratively.

 \return pointer to the snapped Geometry; NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaTopoSnap (GaiaTopologyAccessorPtr ptr, gaiaGeomCollPtr geom,
		      double tolerance_snap, double tolerance_removal,
		      int iterate);

/**
 Adds a Polygon to an existing Topology and possibly splitting Edges/Faces.

 \param ptr pointer to the Topology Accessor Object.
 \param pg pointer to the Polygon Geometry.
 \param tolerance approximation factor.
 \param face_ids on success will point to an array of Face IDs
 \param ids_count on success will report the number of Face IDs in the
 above array

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_AddPolygon (GaiaTopologyAccessorPtr ptr,
				gaiaPolygonPtr pg, double tolerance,
				sqlite3_int64 ** face_ids, int *ids_count);

/**
 Populates a Topology by importing a whole GeoTable

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the input GeoTable.
 If NULL the "main" DB will be intended by default.
 \param table name of the input GeoTable.
 \param column name of the input Geometry Column.
 Could be NULL is the input table has just a single Geometry Column.
 \param tolerance approximation factor.
 \param line_max_points if set to a positive number all input Linestrings
 and/or Polygon Rings will be split into simpler Linestrings having no more 
 than this maximum number of points. 
 \param max_length if set to a positive value all input Linestrings 
 and/or Polygon Rings will be split into simpler Lines having a length
 not exceeding this threshold. If both line_max_points and max_legth
 are set as the same time the first condition occurring will cause
 a new Line to be started. 

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_FromGeoTableNoFace
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_FromGeoTable (GaiaTopologyAccessorPtr ptr,
				  const char *db_prefix, const char *table,
				  const char *column, double tolerance,
				  int line_max_points, double max_length);

/**
 Populates a Topology by importing a whole GeoTable without 
 determining generated faces

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the input GeoTable.
 If NULL the "main" DB will be intended by default.
 \param table name of the input GeoTable.
 \param column name of the input Geometry Column.
 Could be NULL is the input table has just a single Geometry Column.
 \param tolerance approximation factor.
 \param line_max_points if set to a positive number all input Linestrings
 and/or Polygon Rings will be split into simpler Linestrings having no more 
 than this maximum number of points. 
 \param max_length if set to a positive value all input Linestrings 
 and/or Polygon Rings will be split into simpler Lines having a length
 not exceeding this threshold. If both line_max_points and max_legth
 are set as the same time the first condition occurring will cause
 a new Line to be started. 

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_FromGeoTable, gaiaTopoGeo_Polygonize
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_FromGeoTableNoFace (GaiaTopologyAccessorPtr ptr,
					const char *db_prefix,
					const char *table, const char *column,
					double tolerance, int line_max_points,
					double max_length);

/**
 Populates a Topology by importing a whole GeoTable - Extended mode

 \param ptr pointer to the Topology Accessor Object.
 \param sql_in an SQL statement (SELECT) returning input features
 \param sql_out a second SQL statement (INSERT INTO) intended to
 store failing features references into the "dustbin" table.
 \param sql_in2 an SQL statement (SELECT) returning a single input 
 feature (used for retrying to insert a failing feature)
 \param tolerance approximation factor.
 \param line_max_points if set to a positive number all input Linestrings
 and/or Polygon Rings will be split into simpler Linestrings having no more 
 than this maximum number of points. 
 \param max_length if set to a positive value all input Linestrings 
 and/or Polygon Rings will be split into simpler Lines having a length
 not exceeding this threshold. If both line_max_points and max_legth
 are set as the same time the first condition occurring will cause
 a new Line to be started. 

 \return 0 if all input features were succesfully importer, or a
 positive number (total count of failing features raising an exception
 and referenced by the "dustbin" table); -1 if some unexpected
 error occurred.

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_FromGeoTableNoFaceExtended
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_FromGeoTableExtended (GaiaTopologyAccessorPtr ptr,
					  const char *sql_in,
					  const char *sql_out,
					  const char *sql_in2,
					  double tolerance,
					  int line_max_points,
					  double max_length);

/**
 Populates a Topology by importing a whole GeoTable without 
 determining generated faces - Extended mode

 \param ptr pointer to the Topology Accessor Object.
 \param sql_in an SQL statement (SELECT) returning input features
 \param sql_out a second SQL statement (INSERT INTO) intended to
 store failing features references into the "dustbin" table.
 \param sql_in2 an SQL statement (SELECT) returning a single input 
 feature (used for retrying to insert a failing feature)
 \param tolerance approximation factor.
 \param line_max_points if set to a positive number all input Linestrings
 and/or Polygon Rings will be split into simpler Linestrings having no more 
 than this maximum number of points. 
 \param max_length if set to a positive value all input Linestrings 
 and/or Polygon Rings will be split into simpler Lines having a length
 not exceeding this threshold. If both line_max_points and max_legth
 are set as the same time the first condition occurring will cause
 a new Line to be started. 

 \return 0 if all input features were succesfully importer, or a
 positive number (total count of failing features raising an exception
 and referenced by the "dustbin" table); -1 if some unexpected
 error occurred.

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_FromGeoTableExtended, 
 gaiaTopoGeo_Polygonize
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_FromGeoTableNoFaceExtended (GaiaTopologyAccessorPtr ptr,
						const char *sql_in,
						const char *sql_out,
						const char *sql_in2,
						double tolerance,
						int line_max_points,
						double max_length);

/**
 Creates and populates a new GeoTable by snapping all Geometries
 contained into another GeoTable against a given Topology

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the input GeoTable.
 If NULL the "main" DB will be intended by default.
 \param table name of the input GeoTable.
 \param column name of the input Geometry Column.
 Could be NULL is the input table has just a single Geometry Column.
 \param outtable name of the output GeoTable.
 \param tolerance_snap snap tolerance.
 \param tolerance_removal removal tolerance (use -1 to skip removal phase).
 \param iterate if non zero, allows snapping to more than a single 
 vertex, iteratively.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_SnappedGeoTable (GaiaTopologyAccessorPtr ptr,
				     const char *db_prefix, const char *table,
				     const char *column, const char *outtable,
				     double tolerance_snap,
				     double tolerance_removal, int iterate);

/**
 Creates a temporary table containing a validation report for a given TopoGeo.

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int gaiaValidateTopoGeo (GaiaTopologyAccessorPtr ptr);

/**
 Return a Point geometry (seed) identifying a Topology Edge

 \param ptr pointer to the Topology Accessor Object.
 \param edge the unique identifier of the edge.

 \return pointer to Geometry (point); NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaGetEdgeSeed (GaiaTopologyAccessorPtr ptr, sqlite3_int64 edge);

/**
 Return a Point geometry (seed) identifying a Topology Face

 \param ptr pointer to the Topology Accessor Object.
 \param face the unique identifier of the face.

 \return pointer to Geometry (point); NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaGetFaceSeed (GaiaTopologyAccessorPtr ptr, sqlite3_int64 face);

/**
 Ensures that all Edges on a Topology-Geometry will have not less
 than three vertices; for all Edges found being simple two-points 
 segments a third intermediate point will be interpolated.

 \param ptr pointer to the Topology Accessor Object.

 \return the total number of changed Edges; a negativa number on error

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_DisambiguateSegmentEdges (GaiaTopologyAccessorPtr ptr);

/**
 Will update all Seeds for a Topology-Geometry

 \param ptr pointer to the Topology Accessor Object.
 \param mode if set to 0 a full update of all Seeds will be performed,
 otherwise an incremental update will happen.

 \return 1 on success; 0 on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeoUpdateSeeds (GaiaTopologyAccessorPtr ptr, int mode);

/**
 Will snap a Point geometry to TopoSeeds

 \param ptr pointer to the Topology Accessor Object.
 \param pt pointer to the Point Geometry.
 \param distance tolerance approximation factor.

 \return pointer to Geometry (point); NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaTopoGeoSnapPointToSeed (GaiaTopologyAccessorPtr ptr,
				    gaiaGeomCollPtr pt, double distance);

/**
 Will snap a Linestring geometry to TopoSeeds

 \param ptr pointer to the Topology Accessor Object.
 \param ln pointer to the Linestring Geometry.
 \param distance tolerance approximation factor.

 \return pointer to Geometry (linestring); NULL on failure.

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE gaiaGeomCollPtr
	gaiaTopoGeoSnapLinestringToSeed (GaiaTopologyAccessorPtr ptr,
					 gaiaGeomCollPtr ln, double distance);

/**
 Extracts a Simple Features Table out from a Topology by matching
 Topology Seeds to a given reference Table.

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output output table to be created and populated.
 \param with_spatial_index boolean flag: if set to TRUE (non ZERO) a Spatial
 Index supporting the output table will be created.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_ToGeoTable (GaiaTopologyAccessorPtr ptr,
				const char *db_prefix, const char *ref_table,
				const char *ref_column, const char *out_table,
				int with_spatial_index);

/**
 Creates and populates a Table containing a comprehensive report
 about all intesections between the Faces of some Topology and
 a given reference Table of the Polygon/Multipolygon type.

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output output table to be created and populated.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_PolyFacesList (GaiaTopologyAccessorPtr ptr,
				   const char *db_prefix, const char *ref_table,
				   const char *ref_column,
				   const char *out_table);

/**
 Creates and populates a Table containing a comprehensive report
 about all intesections between the Edges of some Topology and
 a given reference Table of the Linestring/Multilinestring type.

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output output table to be created and populated.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_LineEdgesList (GaiaTopologyAccessorPtr ptr,
				   const char *db_prefix, const char *ref_table,
				   const char *ref_column,
				   const char *out_table);

/**
 Extracts a simplified/generalized Simple Features Table out from a Topology 
 by matching Topology Seeds to a given reference Table.

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param out_table name of the output output table to be created and populated.
 \param tolerance approximation radius required by the Douglar-Peucker
 simplification algorithm.
 \param with_spatial_index boolean flag: if set to TRUE (non ZERO) a Spatial
 Index supporting the output table will be created.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_ToGeoTableGeneralize (GaiaTopologyAccessorPtr ptr,
					  const char *db_prefix,
					  const char *ref_table,
					  const char *ref_column,
					  const char *out_table,
					  double tolerance,
					  int with_spatial_index);

/**
 Removes all small Faces from a Topology

 \param ptr pointer to the Topology Accessor Object.
 \param min_circularity threshold Circularity-index identifying threadlike Faces.
 \param min_area threshold area to identify small Faces.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_RemoveSmallFaces (GaiaTopologyAccessorPtr ptr,
				      double min_circularity, double min_area);

/**
 Removes all dangling Edges from a Topology

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_RemoveDanglingEdges (GaiaTopologyAccessorPtr ptr);

/**
 Removes all dangling Nodes from a Topology

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_RemoveDanglingNodes (GaiaTopologyAccessorPtr ptr);

/**
 Removes all useless Nodes from a Topology by calling ST_NewEdgeHeal

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_ModEdgeHeal
 */
    GAIATOPO_DECLARE int gaiaTopoGeo_NewEdgeHeal (GaiaTopologyAccessorPtr ptr);

/**
 Removes all useless Nodes from a Topology by calling ST_ModEdgeHeal

 \param ptr pointer to the Topology Accessor Object.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_NewEdgeHeal
 */
    GAIATOPO_DECLARE int gaiaTopoGeo_ModEdgeHeal (GaiaTopologyAccessorPtr ptr);

/**
 Removes all useless Nodes from a Topology by calling ST_NewEdgeHeal

 \param ptr pointer to the Topology Accessor Object.
 \param line_max_points if set to a positive number all input Edges
 will be split into simpler Edges having no more than this maximum 
 number of points. 
 \param max_length if set to a positive value all input Edges will 
 be split into simpler Edges having a length not exceeding this 
 threshold. If both line_max_points and max_legth are set as the 
 same time the first condition occurring will cause an Edge to be split
 in two halves. 

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_ModEdgeHeal
 */
    GAIATOPO_DECLARE int gaiaTopoGeo_NewEdgesSplit (GaiaTopologyAccessorPtr ptr,
						    int line_max_points,
						    double max_length);

/**
 Removes all useless Nodes from a Topology by calling ST_ModEdgeHeal

 \param ptr pointer to the Topology Accessor Object.
 \param line_max_points if set to a positive number all input Edges
 will be split into simpler Edges having no more than this maximum 
 number of points. 
 \param max_length if set to a positive value all input Edges will 
 be split into simpler Edges having a length not exceeding this 
 threshold. If both line_max_points and max_legth are set as the 
 same time the first condition occurring will cause an Edge to be split
 in two halves. 

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS, gaiaTopoGeo_NewEdgeHeal
 */
    GAIATOPO_DECLARE int gaiaTopoGeo_ModEdgeSplit (GaiaTopologyAccessorPtr ptr,
						   int line_max_points,
						   double max_length);

/**
 creates a TopoLayer and its corresponding Feature relations for a given 
 Topology by matching Topology Seeds to a given reference Table.

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param ref_column name of the reference Geometry Column.
 Could be NULL is the reference table has just a single Geometry Column.
 \param topolayer_name name of the TopoLayer to be created.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_CreateTopoLayer (GaiaTopologyAccessorPtr ptr,
				     const char *db_prefix,
				     const char *ref_table,
				     const char *ref_column,
				     const char *topolayer_name);

/**
 initializes a TopoLayer (laking all corresponding Feature relations) for a given 
 Topology from a given reference Table.

 \param ptr pointer to the Topology Accessor Object.
 \param db-prefix prefix of the DB containing the reference GeoTable.
 If NULL the "main" DB will be intended by default.
 \param ref_table name of the reference GeoTable.
 \param topolayer_name name of the TopoLayer to be created.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_InitTopoLayer (GaiaTopologyAccessorPtr ptr,
				   const char *db_prefix,
				   const char *ref_table,
				   const char *topolayer_name);

/**
 completely removes a TopoLayer from a Topology.

 \param ptr pointer to the Topology Accessor Object.
 \param topolayer_name name of the TopoLayer to be removed.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_RemoveTopoLayer (GaiaTopologyAccessorPtr ptr,
				     const char *topolayer_name);

/**
 creates a GeoTable by exporting Features out from a given TopoLayer.

 \param ptr pointer to the Topology Accessor Object.
 \param topolayer_name name of an existing TopoLayer.
 \param out_table name of the output GeoTable to be created.
 \param with_spatial_index boolean flag: if set to TRUE (non ZERO) a Spatial
 Index supporting the output table will be created.
 \param create_only boolean flag; is set to any value != 0 (TRUE)
 just the output table will be creayed but no TopoFeature will
 be actually inserted.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_ExportTopoLayer (GaiaTopologyAccessorPtr ptr,
				     const char *topolayer_name,
				     const char *out_table,
				     int with_spatial_index, int create_only);

/**
 inserts into the output GeoTable a single Features extracted out 
 from a given TopoLayer.

 \param ptr pointer to the Topology Accessor Object.
 \param topolayer_name name of an existing TopoLayer.
 \param out_table name of the target GeoTable.
 \param fid unique identifier of the TopoLayer's Feature to
 be inserted.

 \return 1 on success; -1 on failure (will raise an exception).

 \sa gaiaTopologyFromDBMS
 */
    GAIATOPO_DECLARE int
	gaiaTopoGeo_InsertFeatureFromTopoLayer (GaiaTopologyAccessorPtr ptr,
						const char *topolayer_name,
						const char *out_table,
						sqlite3_int64 fid);

#ifdef __cplusplus
}
#endif


#endif				/* _GAIATOPO_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/headers/spatialite/gaiaaux.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
...
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
/* 
 gaiaaux.h -- Gaia common utility functions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 \sa gaiaInsertIntoSqlLog

 \note this function completes an \b event inserted into the SQL Log, and
  is expected to be invoked immediately \b after executing the SQL
  statement itself.
 */
    GAIAAUX_DECLARE void gaiaUpdateSqlLog (sqlite3 * sqlite,
					   sqlite3_int64 sqllog_pk,
					   int success, const char *errMsg);

/**
 Creates a persistent MD5 checksum object

 \return the handle of an MD5 checksum object, or NULL on failure

 \sa gaiaFreeMD5Checksum, gaiaUpdateMD5Checksum, gaiaFinalizeMD5Checksum
................................................................................
 */
    GAIAAUX_DECLARE char *gaiaConvertToDMS (double longitude, double latitude);

/**
 Return a percent-encoded URL

 \param url the URL to be percent-encoded
 \param out_charset the charset encoding adopted by the encoded URL

 \return the corresponding percent-encoded URL text string,
 or NULL on failure

 \sa gaiaDecodeURL

 \note this function will return a dynamically allocated buffer created 
 by malloc(). 
 You are required to explicitly free() any string returned by this function.
 */
    GAIAAUX_DECLARE char *gaiaEncodeURL (const char *url,
					 const char *in_charset);

/**
 Return a clean URL from its percent-encoded representation

 \param encoded the percent-encoded URL to be decoded
 \param in_charset the charset encoding adopted by the URL to be decoded

 \return the corresponding clean URL text string,
 or NULL on failure

 \sa gaiaEncodeURL

 \note this function will return a dynamically allocated buffer created 
 by malloc(). 
 You are required to explicitly free() any string returned by this function.
 */
    GAIAAUX_DECLARE char *gaiaDecodeURL (const char *encoded,
					 const char *out_charset);

/**
 Return the DirName component (if any) from a Path

 \param path full or relative pathname

 \return the corresponding DirName text string,



|







 







|







 







|
|







 







<










|
<





<










|
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
...
398
399
400
401
402
403
404

405
406
407
408
409
410
411
412
413
414
415

416
417
418
419
420

421
422
423
424
425
426
427
428
429
430
431

432
433
434
435
436
437
438
/* 
 gaiaaux.h -- Gaia common utility functions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 \sa gaiaInsertIntoSqlLog

 \note this function completes an \b event inserted into the SQL Log, and
  is expected to be invoked immediately \b after executing the SQL
  statement itself.
 */
    GAIAAUX_DECLARE void gaiaUpdateSqlLog (sqlite3 * sqlite,
					   sqlite3_int64 sqllog_pk, int success,
					   const char *errMsg);

/**
 Creates a persistent MD5 checksum object

 \return the handle of an MD5 checksum object, or NULL on failure

 \sa gaiaFreeMD5Checksum, gaiaUpdateMD5Checksum, gaiaFinalizeMD5Checksum
................................................................................
 */
    GAIAAUX_DECLARE char *gaiaConvertToDMS (double longitude, double latitude);

/**
 Return a percent-encoded URL

 \param url the URL to be percent-encoded


 \return the corresponding percent-encoded URL text string,
 or NULL on failure

 \sa gaiaDecodeURL

 \note this function will return a dynamically allocated buffer created 
 by malloc(). 
 You are required to explicitly free() any string returned by this function.
 */
    GAIAAUX_DECLARE char *gaiaEncodeURL (const char *url);


/**
 Return a clean URL from its percent-encoded representation

 \param encoded the percent-encoded URL to be decoded


 \return the corresponding clean URL text string,
 or NULL on failure

 \sa gaiaEncodeURL

 \note this function will return a dynamically allocated buffer created 
 by malloc(). 
 You are required to explicitly free() any string returned by this function.
 */
    GAIAAUX_DECLARE char *gaiaDecodeURL (const char *encoded);


/**
 Return the DirName component (if any) from a Path

 \param path full or relative pathname

 \return the corresponding DirName text string,

Changes to src/headers/spatialite/gaiaexif.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
...
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
...
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
...
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
...
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
...
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
...
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
...
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
/* 
 gaiaexif.h -- Gaia common EXIF Metadata reading functions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#define GAIA_WEBP_BLOB		10
/** this BLOB does actually contain a JP2 (Jpeg2000) image */
#define GAIA_JP2_BLOB		11
/** this BLOB does actually contain a SpatiaLite XmlBLOB */
#define GAIA_XML_BLOB		12
/** this BLOB does actually contain a GPKG Geometry */
#define GAIA_GPB_BLOB		13
/** this BLOB does actually contain a SpatiaLite TinyPoint */
#define GAIA_TINYPOINT_BLOB	14

/* constants used for EXIF value types */
/** unrecognized EXIF value */
#define GAIA_EXIF_NONE		0
/** EXIF value of the BYTE type */
#define GAIA_EXIF_BYTE		1
/** EXIF value of the SHORT type */
................................................................................
 \param tag_list pointer to an EXIF tag list.
 \param tag_id the Tag ID to be found

 \return a pointer to the corresponding EXIF tag: NULL if not found

 \sa gaiaGetExifTags, gaiaExifTagsFree
 */
    GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagById (const
							gaiaExifTagListPtr
							tag_list,
							const unsigned short
							tag_id);

/**
 Retrieves an EXIF-GPS tag by its Tag ID

................................................................................
 \return a pointer to the corresponding EXIF tag: NULL if not found

 \sa gaiaGetExifTags, gaiaExifTagsFree
 */
    GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifGpsTagById (const
							   gaiaExifTagListPtr
							   tag_list,
							   const unsigned
							   short tag_id);

/**
 Retrieves an EXIF tag by its name

 \param tag_list pointer to an EXIF tag list.
 \param tag_name the Tag Name to be found

................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the BYTE value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE unsigned char gaiaExifTagGetByteValue (const
							    gaiaExifTagPtr
							    tag,
							    const int ind,
							    int *ok);

/**
 Return a STRING value from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param str receiving buffer: the STRING value will be copied here.
................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the LONG value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE unsigned int gaiaExifTagGetLongValue (const
							   gaiaExifTagPtr tag,
							   const int ind,
							   int *ok);

/**
 Return a RATIONAL [numerator] value from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param ind value index [first value has index 0].
................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the Signed SHORT value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE short gaiaExifTagGetSignedShortValue (const
							   gaiaExifTagPtr tag,
							   const int ind,
							   int *ok);

/**
 Return a Signed LONG value from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param ind value index [first value has index 0].
................................................................................

 \return the SRATIONAL [numerator] value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational1Value (const
							     gaiaExifTagPtr
							     tag,
							     const int ind,
							     int *ok);

/**
 Return a SRATIONAL [denominator] value from an EXIF tag

 \param tag pointer to an EXIF tag.
................................................................................

 \return the SRATIONAL [denominator] value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational2Value (const
							     gaiaExifTagPtr
							     tag,
							     const int ind,
							     int *ok);

/**
 Return a Signed RATIONAL value from an EXIF tag

 \param tag pointer to an EXIF tag.
................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the DOUBLE value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE double gaiaExifTagGetDoubleValue (const gaiaExifTagPtr
						       tag, const int ind,
						       int *ok);

/**
 Return a human readable description from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param str receiving buffer: the STRING value will be copied here.
 \param len length of the receiving buffer
 \param ok on completion will contain 0 on failure: any other value on success.

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName
 */
    GAIAEXIF_DECLARE void gaiaExifTagGetHumanReadable (const gaiaExifTagPtr
						       tag, char *str,
						       int len, int *ok);

/**
 Attempts to guess the actual content-type of some BLOB

 \param blob the BLOB to be parsed 
 \param size length of the BLOB (in bytes)

................................................................................
 \param latitude on success will contain the latitude coordinate

 \return 0 on failure: any other value on success

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaIsExifGpsTag
 */
    GAIAEXIF_DECLARE int gaiaGetGpsCoords (const unsigned char *blob,
					   int size, double *longitude,
					   double *latitude);
/**
 Return a text string representing DMS coordinates from an EXIF-GPS tag

 \param blob the BLOB to be parsed 
 \param size length of the BLOB (in bytes)
 \param latlong receiving buffer: the text string will be copied here.
 \param ll_size length of the receiving buffer

 \return 0 on failure: any other value on success

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaIsExifGpsTag
 */
    GAIAEXIF_DECLARE int gaiaGetGpsLatLong (const unsigned char *blob,
					    int size, char *latlong,
					    int ll_size);

#ifdef __cplusplus
}
#endif

#endif				/* _GAIAEXIF_H */



|







 







|







 







<
<







 







|
<







 







|
|







 







|
<
<
|







 







|
<
|







 







|
<
|







 







|
<







 







|
<







 







|
|
<











|
|
|







 







|
|
<













|
<
|






1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
91
92
93
94
95
96
97


98
99
100
101
102
103
104
...
257
258
259
260
261
262
263
264

265
266
267
268
269
270
271
...
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
...
367
368
369
370
371
372
373
374


375
376
377
378
379
380
381
382
...
416
417
418
419
420
421
422
423

424
425
426
427
428
429
430
431
...
484
485
486
487
488
489
490
491

492
493
494
495
496
497
498
499
...
517
518
519
520
521
522
523
524

525
526
527
528
529
530
531
...
534
535
536
537
538
539
540
541

542
543
544
545
546
547
548
...
583
584
585
586
587
588
589
590
591

592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
...
626
627
628
629
630
631
632
633
634

635
636
637
638
639
640
641
642
643
644
645
646
647
648

649
650
651
652
653
654
655
/* 
 gaiaexif.h -- Gaia common EXIF Metadata reading functions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#define GAIA_WEBP_BLOB		10
/** this BLOB does actually contain a JP2 (Jpeg2000) image */
#define GAIA_JP2_BLOB		11
/** this BLOB does actually contain a SpatiaLite XmlBLOB */
#define GAIA_XML_BLOB		12
/** this BLOB does actually contain a GPKG Geometry */
#define GAIA_GPB_BLOB		13



/* constants used for EXIF value types */
/** unrecognized EXIF value */
#define GAIA_EXIF_NONE		0
/** EXIF value of the BYTE type */
#define GAIA_EXIF_BYTE		1
/** EXIF value of the SHORT type */
................................................................................
 \param tag_list pointer to an EXIF tag list.
 \param tag_id the Tag ID to be found

 \return a pointer to the corresponding EXIF tag: NULL if not found

 \sa gaiaGetExifTags, gaiaExifTagsFree
 */
    GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagById (const gaiaExifTagListPtr

							tag_list,
							const unsigned short
							tag_id);

/**
 Retrieves an EXIF-GPS tag by its Tag ID

................................................................................
 \return a pointer to the corresponding EXIF tag: NULL if not found

 \sa gaiaGetExifTags, gaiaExifTagsFree
 */
    GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifGpsTagById (const
							   gaiaExifTagListPtr
							   tag_list,
							   const unsigned short
							   tag_id);

/**
 Retrieves an EXIF tag by its name

 \param tag_list pointer to an EXIF tag list.
 \param tag_name the Tag Name to be found

................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the BYTE value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE unsigned char gaiaExifTagGetByteValue (const gaiaExifTagPtr


							    tag, const int ind,
							    int *ok);

/**
 Return a STRING value from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param str receiving buffer: the STRING value will be copied here.
................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the LONG value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE unsigned int gaiaExifTagGetLongValue (const gaiaExifTagPtr

							   tag, const int ind,
							   int *ok);

/**
 Return a RATIONAL [numerator] value from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param ind value index [first value has index 0].
................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the Signed SHORT value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE short gaiaExifTagGetSignedShortValue (const gaiaExifTagPtr

							   tag, const int ind,
							   int *ok);

/**
 Return a Signed LONG value from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param ind value index [first value has index 0].
................................................................................

 \return the SRATIONAL [numerator] value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational1Value (const
							     gaiaExifTagPtr tag,

							     const int ind,
							     int *ok);

/**
 Return a SRATIONAL [denominator] value from an EXIF tag

 \param tag pointer to an EXIF tag.
................................................................................

 \return the SRATIONAL [denominator] value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational2Value (const
							     gaiaExifTagPtr tag,

							     const int ind,
							     int *ok);

/**
 Return a Signed RATIONAL value from an EXIF tag

 \param tag pointer to an EXIF tag.
................................................................................
 \param ok on completion will contain 0 on failure: any other value on success.

 \return the DOUBLE value

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaExifTagGetValueType, gaiaExifTagGetNumValues
 */
    GAIAEXIF_DECLARE double gaiaExifTagGetDoubleValue (const gaiaExifTagPtr tag,
						       const int ind, int *ok);


/**
 Return a human readable description from an EXIF tag

 \param tag pointer to an EXIF tag.
 \param str receiving buffer: the STRING value will be copied here.
 \param len length of the receiving buffer
 \param ok on completion will contain 0 on failure: any other value on success.

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName
 */
    GAIAEXIF_DECLARE void gaiaExifTagGetHumanReadable (const gaiaExifTagPtr tag,
						       char *str, int len,
						       int *ok);

/**
 Attempts to guess the actual content-type of some BLOB

 \param blob the BLOB to be parsed 
 \param size length of the BLOB (in bytes)

................................................................................
 \param latitude on success will contain the latitude coordinate

 \return 0 on failure: any other value on success

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaIsExifGpsTag
 */
    GAIAEXIF_DECLARE int gaiaGetGpsCoords (const unsigned char *blob, int size,
					   double *longitude, double *latitude);

/**
 Return a text string representing DMS coordinates from an EXIF-GPS tag

 \param blob the BLOB to be parsed 
 \param size length of the BLOB (in bytes)
 \param latlong receiving buffer: the text string will be copied here.
 \param ll_size length of the receiving buffer

 \return 0 on failure: any other value on success

 \sa gaiaGetExifTagById, gaiaGetExifGpsTagById, gaiaGetExifTagByName, 
 gaiaIsExifGpsTag
 */
    GAIAEXIF_DECLARE int gaiaGetGpsLatLong (const unsigned char *blob, int size,

					    char *latlong, int ll_size);

#ifdef __cplusplus
}
#endif

#endif				/* _GAIAEXIF_H */

Changes to src/headers/spatialite/gaiageo.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 gaiageo.h -- Gaia common support for geometries
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or



|







 







|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 gaiageo.h -- Gaia common support for geometries
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or

Changes to src/headers/spatialite/gaiamatrix.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/* 
 gaiamatrix.h -- Gaia common utility functions: affine trasform Matrix
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
  affine transform Matrix
 \param blob_sz on completion this variable will contain the BLOB's size
  (in bytes)

 \return 0 on failure: any other different value on success.

 \sa gaia_matrix_create, gaia_matrix_is_valid, gaia_matrix_as_text, 
  gaia_matrix_create_multiply, gaia_matrix_transform_geometry,
  gaia_matrix_invert

 \note you are responsible to destroy (before or after) any BLOB
  returned by this function.
 */
    GAIAMATRIX_DECLARE int gaia_matrix_multiply (const unsigned char *iblob1,
						 int iblob1_sz,
						 const unsigned char *iblob2,
................................................................................
 */
    GAIAMATRIX_DECLARE char *gaia_matrix_as_text (const unsigned char *blob,
						  int blob_sz);

/**
 Transforming a Geometry accordingly to an Affine Transform Matrix
 \param geom the input Geometry
 \param blob pointer to a BLOB-encoded Matrix 
 \param blob_sz BLOB's size (in bytes)

 \return pointer to the transformed Geometry or NULL on failure.

 \sa gaia_matrix_create, gaia_matrix_is_valid, gaia_matrix_as_text, 
  gaia_matrix_multiply, gaia_matrix_create_multiply

 \note you are responsible to destroy (before or after) any Geometry
  returned by this function.
 */
    GAIAMATRIX_DECLARE gaiaGeomCollPtr
	gaia_matrix_transform_geometry (gaiaGeomCollPtr geom,
					const unsigned char *blob, int blob_sz);

/**
 Computing the Determinant from an Affine Transform Matrix
 \param blob pointer to a BLOB-encoded Matrix 
 \param blob_sz BLOB's size (in bytes)

 \return the Determinant of the Matix; 0.0 on invalid args.

 \sa gaia_matrix_create, gaia_matrix_is_valid, gaia_matrix_invert
 \note you are responsible to destroy (before or after) any Geometry
  returned by this function.
 */
    GAIAMATRIX_DECLARE double
	gaia_matrix_determinant (const unsigned char *blob, int blob_sz);

/**
 Creating a BLOB-Matrix by applying a further trasformation to a previous BLOB-Matrix
 \param iblob pointer to a BLOB-encoded Matrix
 \param iblob_sz BLOB's size (in bytes)
 \param blob on completion this variable will contain a BLOB-encoded
  affine transform Matrix (Inverse)
 \param blob_sz on completion this variable will contain the BLOB's size
  (in bytes)

 \return 0 on failure: any other different value on success.
 Note that not all Matrices can be Inverted, only those having
 a valid Determinant.

 \sa gaia_matrix_create, gaia_matrix_is_valid, gaia_matrix_multiply, 
 gaia_matrix_determinant

 \note you are responsible to destroy (before or after) any BLOB
  returned by this function.
 */
    GAIAMATRIX_DECLARE int gaia_matrix_invert (const unsigned char
					       *iblob, int iblob_sz,
					       unsigned char **blob,
					       int *blob_sz);

#ifdef __cplusplus
}
#endif

#endif				/* _GAIAMATRIX_H */



|







 







|







 







|
<







 







|
|

|











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
...
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233






































234
235
236
237
238
/* 
 gaiamatrix.h -- Gaia common utility functions: affine trasform Matrix
  
 version 4.3, 2015 April 28

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
  affine transform Matrix
 \param blob_sz on completion this variable will contain the BLOB's size
  (in bytes)

 \return 0 on failure: any other different value on success.

 \sa gaia_matrix_create, gaia_matrix_is_valid, gaia_matrix_as_text, 
  gaia_matrix_create_multiply, gaia_matrix_transform_geometry


 \note you are responsible to destroy (before or after) any BLOB
  returned by this function.
 */
    GAIAMATRIX_DECLARE int gaia_matrix_multiply (const unsigned char *iblob1,
						 int iblob1_sz,
						 const unsigned char *iblob2,
................................................................................
 */
    GAIAMATRIX_DECLARE char *gaia_matrix_as_text (const unsigned char *blob,
						  int blob_sz);

/**
 Transforming a Geometry accordingly to an Affine Transform Matrix
 \param geom the input Geometry
 \param iblob pointer to a BLOB-encoded Matrix 
 \param iblob_sz BLOB's size (in bytes)

 \return 0 pointer to the transformed Geometry or NULL on failure.

 \sa gaia_matrix_create, gaia_matrix_is_valid, gaia_matrix_as_text, 
  gaia_matrix_multiply, gaia_matrix_create_multiply

 \note you are responsible to destroy (before or after) any Geometry
  returned by this function.
 */
    GAIAMATRIX_DECLARE gaiaGeomCollPtr
	gaia_matrix_transform_geometry (gaiaGeomCollPtr geom,
					const unsigned char *blob, int blob_sz);







































#ifdef __cplusplus
}
#endif

#endif				/* _GAIAMATRIX_H */

Changes to src/headers/spatialite/geopackage.h.

1
2
3
4
5
6
7
8
9
10
11
12
..
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
41
42
43
44
45
46
47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
...
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167




168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*

    GeoPackage extensions for SpatiaLite / SQLite
     
    version 4.3, 2015 June 29
 
Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version
1.1 (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.mozilla.org/MPL/
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Sandro Furieri (a.furieri@lqt.it) 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
*/

/**
 \file geopackage.h

 GeoPackage: supporting functions and constants
 */

#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
#ifdef DLL_EXPORT
#define GEOPACKAGE_DECLARE __declspec(dllexport)
#define GEOPACKAGE_PRIVATE
#else
#define GEOPACKAGE_DECLARE extern
#define GEOPACKAGE_PRIVATE
#endif
#else
#define GEOPACKAGE_DECLARE __attribute__ ((visibility("default")))
#define GEOPACKAGE_PRIVATE __attribute__ ((visibility("hidden")))
#endif
#endif

#ifndef _GEOPACKAGE_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GEOPACKAGE_H
#endif
................................................................................
extern "C"
{
#endif

#include <spatialite/gaiageo.h>

/* Internal geopackage SQL function implementation */
    GEOPACKAGE_PRIVATE void fnct_gpkgCreateBaseTables (sqlite3_context *
						       context, int argc,
						       sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgCreateTilesTable (sqlite3_context *
						       context, int argc,
						       sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgCreateTilesZoomLevel (sqlite3_context *
							   context, int argc,
							   sqlite3_value **
							   argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgInsertEpsgSRID (sqlite3_context *
						     context, int argc,
						     sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgAddTileTriggers (sqlite3_context *
						      context, int argc,
						      sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgGetNormalRow (sqlite3_context * context,
						   int argc,
						   sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgGetNormalZoom (sqlite3_context * context,
						    int argc,
						    sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgGetImageType (sqlite3_context * context,
						   int argc,
						   sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgAddGeometryColumn (sqlite3_context *
							context, int argc,
							sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePoint (sqlite3_context * context,
						int argc,
						sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointWithSRID (sqlite3_context *
							context, int argc,
							sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointZ (sqlite3_context * context,
						 int argc,
						 sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointZWithSRID (sqlite3_context *
							 context, int argc,
							 sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointM (sqlite3_context * context,
						 int argc,
						 sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointMWithSRID (sqlite3_context *
							 context, int argc,
							 sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointZM (sqlite3_context * context,
						  int argc,
						  sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgMakePointZMWithSRID (sqlite3_context *
							  context, int argc,
							  sqlite3_value **
							  argv);
    GEOPACKAGE_PRIVATE void fnct_ToGPB (sqlite3_context * context, int argc,
					sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_GeomFromGPB (sqlite3_context * context,
					      int argc, sqlite3_value ** argv);

    GEOPACKAGE_DECLARE gaiaGeomCollPtr gaiaFromGeoPackageGeometryBlob (const
								       unsigned
								       char
								       *gpb,
								       unsigned
................................................................................
					   int gpb_len);
    GEOPACKAGE_DECLARE int gaiaGetSridFromGPB (const unsigned char *gpb,
					       int gpb_len);
    GEOPACKAGE_DECLARE int gaiaIsEmptyGPB (const unsigned char *gpb,
					   int gpb_len);
    GEOPACKAGE_DECLARE int gaiaGetEnvelopeFromGPB (const unsigned char *gpb,
						   int gpb_len, double *min_x,
						   double *max_x,
						   double *min_y,
						   double *max_y, int *has_z,
						   double *min_z,
						   double *max_z, int *has_m,
						   double *min_m,
						   double *max_m);
    GEOPACKAGE_DECLARE char *gaiaGetGeometryTypeFromGPB (const unsigned char
							 *gpb, int gpb_len);
    GEOPACKAGE_PRIVATE void fnct_IsValidGPB (sqlite3_context * context,
					     int argc, sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_GPKG_IsAssignable (sqlite3_context * context,
						    int argc,
						    sqlite3_value ** argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgAddGeometryTriggers (sqlite3_context *




							  context, int argc,
							  sqlite3_value **
							  argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgAddGeometryTriggers (sqlite3_context *
							  context, int argc,
							  sqlite3_value **
							  argv);
    GEOPACKAGE_PRIVATE void fnct_gpkgAddSpatialIndex (sqlite3_context *
						      context, int argc,
						      sqlite3_value ** argv);
/* end Sandro Furieri - 2014-05-19 */

/* Sandro Furieri - 2015-06-14 */
    GEOPACKAGE_DECLARE void
	gaiaToGPB (gaiaGeomCollPtr geom, unsigned char **result, int *size);
/* end Sandro Furieri - 2015-06-14 */



/* Markers for unused arguments / variable */
#if __GNUC__
#define UNUSED __attribute__ ((__unused__))
#else
#define UNUSED




|







 







|







 







>

<


<


<
<
<
<
<







 







|


|


|



|


|
|

|


|


|


|


|
|

|


|
|

|


|
|

|


|
|

|



|

|







 







|
<

|
<
|



|

|


|
>
>
>
>



<
<
<
<
|
|


<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
41
42
43
44
45
46
47
48
49

50
51

52
53





54
55
56
57
58
59
60
..
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
140
141
142
143
144
145
146
147

148
149

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166




167
168
169
170






171
172
173
174
175
176
177
/*

    GeoPackage extensions for SpatiaLite / SQLite
     
    version 4.2, 2014 July 25
 
Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version
1.1 (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.mozilla.org/MPL/
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage Extensions

The Initial Developer of the Original Code is Brad Hards (bradh@frogmouth.net)
 
Portions created by the Initial Developer are Copyright (C) 2012
the Initial Developer. All Rights Reserved.

Contributor(s):
Sandro Furieri (a.furieri@lqt.it) 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
*/

/**
 \file geopackage.h

 GeoPackage: supporting functions and constants
 */

#ifndef DOXYGEN_SHOULD_SKIP_THIS

#ifdef DLL_EXPORT
#define GEOPACKAGE_DECLARE __declspec(dllexport)

#else
#define GEOPACKAGE_DECLARE extern





#endif
#endif

#ifndef _GEOPACKAGE_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GEOPACKAGE_H
#endif
................................................................................
extern "C"
{
#endif

#include <spatialite/gaiageo.h>

/* Internal geopackage SQL function implementation */
    GEOPACKAGE_DECLARE void fnct_gpkgCreateBaseTables (sqlite3_context *
						       context, int argc,
						       sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgCreateTilesTable (sqlite3_context *
						       context, int argc,
						       sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgCreateTilesZoomLevel (sqlite3_context *
							   context, int argc,
							   sqlite3_value **
							   argv);
    GEOPACKAGE_DECLARE void fnct_gpkgInsertEpsgSRID (sqlite3_context *
						     context, int argc,
						     sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgAddTileTriggers (sqlite3_context * context,
						      int argc,
						      sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgGetNormalRow (sqlite3_context * context,
						   int argc,
						   sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgGetNormalZoom (sqlite3_context * context,
						    int argc,
						    sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgGetImageType (sqlite3_context * context,
						   int argc,
						   sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgAddGeometryColumn (sqlite3_context *
							context, int argc,
							sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePoint (sqlite3_context *
						context, int argc,
						sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointWithSRID (sqlite3_context *
							context, int argc,
							sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointZ (sqlite3_context *
						 context, int argc,
						 sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointZWithSRID (sqlite3_context *
							 context, int argc,
							 sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointM (sqlite3_context *
						 context, int argc,
						 sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointMWithSRID (sqlite3_context *
							 context, int argc,
							 sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointZM (sqlite3_context *
						  context, int argc,
						  sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgMakePointZMWithSRID (sqlite3_context *
							  context, int argc,
							  sqlite3_value **
							  argv);
    GEOPACKAGE_DECLARE void fnct_ToGPB (sqlite3_context * context, int argc,
					sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_GeomFromGPB (sqlite3_context * context,
					      int argc, sqlite3_value ** argv);

    GEOPACKAGE_DECLARE gaiaGeomCollPtr gaiaFromGeoPackageGeometryBlob (const
								       unsigned
								       char
								       *gpb,
								       unsigned
................................................................................
					   int gpb_len);
    GEOPACKAGE_DECLARE int gaiaGetSridFromGPB (const unsigned char *gpb,
					       int gpb_len);
    GEOPACKAGE_DECLARE int gaiaIsEmptyGPB (const unsigned char *gpb,
					   int gpb_len);
    GEOPACKAGE_DECLARE int gaiaGetEnvelopeFromGPB (const unsigned char *gpb,
						   int gpb_len, double *min_x,
						   double *max_x, double *min_y,

						   double *max_y, int *has_z,
						   double *min_z, double *max_z,

						   int *has_m, double *min_m,
						   double *max_m);
    GEOPACKAGE_DECLARE char *gaiaGetGeometryTypeFromGPB (const unsigned char
							 *gpb, int gpb_len);
    GEOPACKAGE_DECLARE void fnct_IsValidGPB (sqlite3_context * context,
					     int argc, sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_GPKG_IsAssignable (sqlite3_context * context,
						    int argc,
						    sqlite3_value ** argv);
    GEOPACKAGE_DECLARE void fnct_gpkgAddGeometryTriggers (sqlite3_context *
							  context, int argc,
							  sqlite3_value **
							  argv);
    GEOPACKAGE_DECLARE void fnct_gpkgAddGeometryTriggers (sqlite3_context *
							  context, int argc,
							  sqlite3_value **
							  argv);




    GEOPACKAGE_DECLARE void fnct_gpkgAddSpatialIndex (sqlite3_context * context,
						      int argc,
						      sqlite3_value ** argv);
/* end Sandro Furieri - 2014-05-19 */








/* Markers for unused arguments / variable */
#if __GNUC__
#define UNUSED __attribute__ ((__unused__))
#else
#define UNUSED

Changes to src/headers/spatialite/gg_advanced.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
...
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
...
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
....
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
....
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
....
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
....
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
....
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
....
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
....
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
....
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
....
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
....
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
....
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
....
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
....
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
....
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
....
3129
3130
3131
3132
3133
3134
3135
3136

3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
....
3158
3159
3160
3161
3162
3163
3164
3165

3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
....
3185
3186
3187
3188
3189
3190
3191
3192

3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
....
3243
3244
3245
3246
3247
3248
3249
3250

3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
....
3272
3273
3274
3275
3276
3277
3278
3279

3280
3281
3282
3283
3284
3285
3286
....
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
....
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
....
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
....
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475

3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522

3523
3524


3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535



3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
....
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
....
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
....
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
....
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
....
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
....
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
/*
 gg_advanced.h -- Gaia common support for geometries: advanced
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 \param proj_from geodetic parameters string [EPSG format] qualifying the
 input Reference System
 \param proj_to geodetic parameters string [EPSG format] qualifying the
 output Reference System

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaTransform_r, gaiaTransformXY, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,  this including any Geometry returned by gaiaGeometryTransform()\n
 not reentrant and thread unsafe.

 \remark \b PROJ.4 support required
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org,
................................................................................
 \param proj_from geodetic parameters string [EPSG format] qualifying the
 input Reference System
 \param proj_to geodetic parameters string [EPSG format] qualifying the
 output Reference System

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaTransform, gaiaTransformXY_r, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,  this including any Geometry returned by gaiaGeometryTransform()\n
 reentrant and thread-safe.

 \remark \b PROJ.4 support required
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform_r (const void *p_cache,
						     gaiaGeomCollPtr org,
						     char *proj_from,
						     char *proj_to);

/**
 Tansforms a Geometry object into a different Reference System
 [aka Reprojection]
 This is a special "flavor" of gaiaTransform() just considering X and Y coordinates;
 Z and M values will be left untouched.
 Mainly intended as a workaround possibily useful when facing partially 
 broken PROJ.4 definitions.

 \param org pointer to input Geometry object.
 \param proj_from geodetic parameters string [EPSG format] qualifying the
 input Reference System
 \param proj_to geodetic parameters string [EPSG format] qualifying the
 output Reference System

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaTransformXY_r, gaiaTransform, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,  this including any Geometry returned by gaiaGeometryTransform()\n
 not reentrant and thread unsafe.

 \remark \b PROJ.4 support required
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransformXY (gaiaGeomCollPtr org,
						     char *proj_from,
						     char *proj_to);

/**
 Tansforms a Geometry object into a different Reference System
 [aka Reprojection]
 This is a special "flavor" of gaiaTransform_r() just considering X and Y coordinates;
 Z and M values will be left untouched.
 Mainly intended as a workaround possibily useful when facing partially 
 broken PROJ.4 definitions.

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param org pointer to input Geometry object.
 \param proj_from geodetic parameters string [EPSG format] qualifying the
 input Reference System
 \param proj_to geodetic parameters string [EPSG format] qualifying the
 output Reference System

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaTransformXY, gaiaTransform_r, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,  this including any Geometry returned by gaiaGeometryTransform()\n
 reentrant and thread-safe.

 \remark \b PROJ.4 support required
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransformXY_r (const void *p_cache,
						       gaiaGeomCollPtr org,
						       char *proj_from,
						       char *proj_to);


#endif				/* end including PROJ.4 */

#ifndef OMIT_GEOS		/* including GEOS */

/**
 Resets the GEOS error and warning messages to an empty state
................................................................................

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail (gaiaGeomCollPtr geom);

/**
 return a Geometry detail causing a Geometry to be invalid
 * 
 \param geom pointer to the Geometry object to be validated.
 \param esri_flag if set to TRUE if set to TRUE all ESRI-like holes (violating
 the basic OGC model) will be considered to be valid.

 \return pointer to a Geometry object causing invalidity, or NULL.

 \sa gaiaIsValid, gaiaIsValidReason, gaiaIsValidDetail_r

 \note you are responsible to destroy the returned Geometry\n
 not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetailEx (gaiaGeomCollPtr geom,
							 int esri_flag);


/**
 return a Geometry detail causing a Geometry to be invalid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to the Geometry object to be validated.

 \return pointer to a Geometry object causing invalidity, or NULL.

 \sa gaiaIsValid_r, gaiaIsValidReason_r, gaiaIsValidDetail
................................................................................
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail_r (const void *p_cache,
							 gaiaGeomCollPtr geom);


/**
 return a Geometry detail causing a Geometry to be invalid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to the Geometry object to be validated.
 \param esri_flag if set to TRUE all ESRI-like holes (violating
 the basic OGC model) will be considered to be valid.

 \return pointer to a Geometry object causing invalidity, or NULL.

 \sa gaiaIsValid_r, gaiaIsValidReason_r, gaiaIsValidDetail

 \note you are responsible to destroy the returned Geometry\n
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetailEx_r (const void
							   *p_cache,
							   gaiaGeomCollPtr
							   geom, int esri_flag);

/**
 Checks if a Geometry object represents an OGC Valid Geometry

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to Geometry object.

 \return 0 if false; any other value if true
................................................................................
 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object to be evaluated
 \param geom2 the second Geometry object to be evaluated
 \param pattern intersection matrix pattern [DE-9IM]

 \return 0 if false: any other value if true
 
 \sa gaiaGeomCollRelate_r, gaiaGeomCollRelateBoundaryNodeRule,
 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, 
 gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
 gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch

 \note not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1,
					    gaiaGeomCollPtr geom2,
................................................................................
 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object to be evaluated
 \param geom2 the second Geometry object to be evaluated
 \param pattern intersection matrix pattern [DE-9IM]

 \return 0 if false: any other value if true
 
 \sa gaiaGeomCollRelate, gaiaGeomCollRelateBoundaryNodeRule_r,
 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, 
 gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
 gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch

 \note reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGeomCollRelate_r (const void *p_cache,
					      gaiaGeomCollPtr geom1,
					      gaiaGeomCollPtr geom2,
					      const char *pattern);

/**
 Spatial relationship evalution: Relate Boundary Node Rule

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object to be evaluated
 \param geom2 the second Geometry object to be evaluated
 \param mode can be one of: 1=OGC/MOD2 (default); 2=Endpoint;
 3=MultivalentEndpoint; 4=MonovalentEndpoint

 \return a DE-9IM intersection matrix; or NULL on invalid geometries.
 
 \sa gaiaGeomCollRelate, gaiaGeomCollRelateBoundaryNodeRule_r,
 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, 
 gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
 gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch

 \note you are responsible to destroy (before or after) the intesection
 matrix returned by gaiaGeomGeollRelateBoundaryNodeRule()\n
 not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE char *gaiaGeomCollRelateBoundaryNodeRule (gaiaGeomCollPtr
							      geom1,
							      gaiaGeomCollPtr
							      geom2, int mode);

/**
 Spatial relationship evalution: Relate Boundary Node Rule

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object to be evaluated
 \param geom2 the second Geometry object to be evaluated
 \param mode can be one of: 1=OGC/MOD2 (default); 2=Endpoint;
 3=MultivalentEndpoint; 4=MonovalentEndpoint

 \return a DE-9IM intersection matrix; or NULL on invalid geometries.
 
 \sa gaiaGeomCollRelate_r, gaiaGeomCollRelateBoundaryNodeRule,
 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, 
 gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
 gaiaGeomCollWithin, gaiaIntersectionMatrixPatternMatch

 \note you are responsible to destroy (before or after) the intesection
 matrix returned by gaiaGeomGeollRelateBoundaryNodeRule()\n
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE char *gaiaGeomCollRelateBoundaryNodeRule_r (const void
								*p_cache,
								gaiaGeomCollPtr
								geom1,
								gaiaGeomCollPtr
								geom2,
								int mode);

/**
 Spatial relationship evalution: comparing two intersection matrices

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param matrix first intersection matrix [DE-9IM] to be compared
 \param pattern second intersection matrix [DE-9IM] to be compared\n
 (reference pattern)

 \return 0 if false: any other value if true; -1 on invalid args
 
 \sa gaiaGeomCollRelateBoundaryNodeRule, gaiaIntersectionMatrixPatternMatch_r

 \note not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaIntersectionMatrixPatternMatch (const char
							    *matrix,
							    const char
							    *pattern);

/**
 Spatial relationship evalution: comparing two intersection matrices

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param matrix first intersection matrix [DE-9IM] to be compared
 \param pattern second intersection matrix [DE-9IM] to be compared\n
 (reference pattern)

 \return 0 if false: any other value if true; -1 on invalid args
 
 \sa gaiaGeomCollRelateBoundaryNodeRule, gaiaIntersectionMatrixPatternMatch

 \note reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaIntersectionMatrixPatternMatch_r (const void
							      *p_cache,
							      const char
							      *matrix,
							      const char
							      *pattern);

/**
 Calculates the maximum distance intercurring between two Geometry objects

 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeometryUnion_r()\n
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion_r (const void *p_cache,
							 gaiaGeomCollPtr
							 geom1,
							 gaiaGeomCollPtr geom2);

/**
 Spatial operator: Union Cascaded

 \param geom the input Geometry object.

................................................................................
 \sa gaiaGeomCollCentroid, gaiaRingCentroid

 \note reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGeomCollCentroid_r (const void *p_cache,
						gaiaGeomCollPtr geom,
						double *x, double *y);

/**
 Spatial operator: PointOnSurface

 \param geom pointer to Geometry object.
 \param x on completion this variable will contain the Point X coordinate  
 \param y on completion this variable will contain the Point Y coordinate
................................................................................

 \sa gaiaGetPointOnSurface_r

 \note not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom,
					       double *x, double *y);

/**
 Spatial operator: PointOnSurface

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to Geometry object.
 \param x on completion this variable will contain the Point X coordinate  
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeomCollSimplify()\n
 not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr
							  geom,
							  double tolerance);

/**
 Spatial operator: Simplify

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeomCollSimplify_r()\n
 reentrant and thread safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify_r (const void
							    *p_cache,
							    gaiaGeomCollPtr
							    geom,
							    double tolerance);

/**
 Spatial operator: Simplify [preserving topology]

................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeomCollBuffer_r()\n
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer_r (const void *p_cache,
							  gaiaGeomCollPtr
							  geom, double radius,
							  int points);

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_ADVANCED
#endif

/**
................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaOffsetCurve()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve (gaiaGeomCollPtr geom,
						     double radius,
						     int points,
						     int left_right);

/**
 Spatial operator: Offset Curve

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSingleSidedBuffer()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer (gaiaGeomCollPtr
							   geom,
							   double radius,
							   int points,
							   int left_right);

/**
 Spatial operator: Single Sided Buffer

................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaLineSubstring()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring (gaiaGeomCollPtr
						       ln_geom,
						       double start_fraction,
						       double end_fraction);

/**
 Spatial operator: Line Substring

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
................................................................................
 reentrant and thread-safe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring_r (const void *p_cache,
							 gaiaGeomCollPtr
							 ln_geom,
							 double
							 start_fraction,
							 double end_fraction);

/**
 Spatial operator: Shortest Line

 \param geom1 pointer to the first Geometry object.
 \param geom2 pointer to the second Geometry object.
................................................................................
 \sa gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaLinesCutAtNodes()

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinesCutAtNodes (gaiaGeomCollPtr
							 geom1,
							 gaiaGeomCollPtr geom2);

/**
 Spatial operator: Unary Union

 \param geom the input Geometry object.

................................................................................
/**
 Utility function: SquareGrid

 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param mode any positive value will return a MULTILINESTRING, any will
  return a MULTIPOINT; zero will return a MULTIPOLYGON containing 
  square POLYGONs.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaSquareGrid_r, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid

................................................................................
 this including any Geometry returned by gaiaSquareGrid()\n
 not reentrant and thread unsafe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid (gaiaGeomCollPtr geom,
						    double origin_x,
						    double origin_y,
						    double size, int mode);


/**
 Utility function: SquareGrid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()   
 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param mode any positive value will return a MULTILINESTRING, any will
  return a MULTIPOINT; zero will return a MULTIPOLYGON containing 
  square POLYGONs.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaSquareGrid, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid

................................................................................
 reentrant and thread-safe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r (const void *p_cache,
						      gaiaGeomCollPtr geom,
						      double origin_x,
						      double origin_y,
						      double size, int mode);


/**
 Utility function: TriangularGrid

 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param mode any positive value will return a MULTILINESTRING, any will
  return a MULTIPOINT; zero will return a MULTIPOLYGON containing 
  triangular POLYGONs.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaTriangularGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid

................................................................................
 this including any Geometry returned by gaiaTriangularGrid()\n
 not reentrant and thread unsafe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geom,
							double origin_x,
							double origin_y,
							double size, int mode);


/**
 Utility function: TriangularGrid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param mode any positive value will return a MULTILINESTRING, any will
  return a MULTIPOINT; zero will return a MULTIPOLYGON containing 
  riangular POLYGONs.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaTriangularGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaTriangularGrid_r()\n
 reentrant and thread-safe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r (const void *p_cache,
							  gaiaGeomCollPtr
							  geom,
							  double origin_x,
							  double origin_y,
							  double size,
							  int mode);

/**
 Utility function: HexagonalGrid

 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param mode any positive value will return a MULTILINESTRING, any will
  return a MULTIPOINT; zero will return a MULTIPOLYGON containing 
  hexagonal POLYGONs.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaGexagonalGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid

................................................................................
 this including any Geometry returned by gaiaHexagonalGrid()\n
 not reentrant and thread unsafe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom,
						       double origin_x,
						       double origin_y,
						       double size, int mode);


/**
 Utility function: HexagonalGrid
   
 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param mode any positive value will return a MULTILINESTRING, any will
  return a MULTIPOINT; zero will return a MULTIPOLYGON containing 
  hexagonal POLYGONs.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaGexagonalGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid

................................................................................
 reentrant and thread-safe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r (const void *p_cache,
							 gaiaGeomCollPtr geom,
							 double origin_x,
							 double origin_y,
							 double size, int mode);


#endif				/* end GEOS advanced features */

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_TRUNK
#endif

................................................................................
 this including any Geometry returned by gaiaDelaunayTriangulation()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-TRUNK support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation (gaiaGeomCollPtr
							       geom,
							       double
							       tolerance,
							       int only_edges);

/**
 Delaunay Triangulation
                          
 \param p_cache a memory pointer returned by spatialite_alloc_connection()                   
 \param geom pointer to input Geometry object.
................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaVoronojDiagram()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-TRUNK support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram (gaiaGeomCollPtr geom,
							double
							extra_frame_size,
							double tolerance,
							int only_edges);

/**
 Voronoj Diagram
                                 
 \param p_cache a memory pointer returned by spatialite_alloc_connection()            
................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaVoronojDiagram_r()\n
 reentrant and thread-safe.

 \remark \b GEOS-TRUNK support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram_r (const void *p_cache,
							  gaiaGeomCollPtr
							  geom,
							  double
							  extra_frame_size,
							  double tolerance,
							  int only_edges);

/**
 Concave Hull
................................................................................
						       double factor,
						       double tolerance,
						       int allow_holes);

#endif				/* end GEOS experimental features */

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_RTTOPO
#endif

/**
 Resets the RTTOPO error and warning messages to an empty state
 
 \param p_cache a memory pointer returned by spatialite_alloc_connection()

 
 \sa gaiaGetRtTopoErrorMsg, gaiaGetRtTopoWarningMsg, gaiaSetRtTopoErrorMsg,
 gaiaSetRtTopoWarningMsg

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE void gaiaResetRtTopoMsg (const void *p_cache);

/**
 Return the latest RTTOPO error message (if any)

 \return the latest RTTOPO error message: an empty string if no error was
 previoysly found.

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 
 \sa gaiaResetRtTopoMsg, gaiaGetRtTopoWarningMsg, gaiaSetRtTopoErrorMsg,
 gaiaSetRtTopoWarningMsg

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE const char *gaiaGetRtTopoErrorMsg (const void *p_cache);

/**
 Return the latest RTTOPO warning message (if any)

 \return the latest RTTOPO warning message: an empty string if no warning was 
 previoysly found.

 \param p_cache a memory pointer returned by spatialite_alloc_connection()

 \sa gaiaResetRtTopoMsg, gaiaGetRtTopoErrorMsg, gaiaSetRtTopoErrorMsg,
 gaiaSetRtTopoWarningMsg

 \note not reentrant and thread unsafe.

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE const char *gaiaGetRtTopoWarningMsg (const void *p_cache);

/**
 Set the current RTTOPO error message

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param msg the error message to be set.

 \sa gaiaResetRtTopoMsg, gaiaGetRtTopoErrorMsg, gaiaGetRtTopoWarningMsg,

 gaiaSetRtTopoWarningMsg



 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE void gaiaSetRtTopoErrorMsg (const void *p_cache,
						const char *msg);

/**
 Set the current RTTOPO warning message

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param msg the warning message to be set.




 \sa gaiaResetRtTopoMsg, gaiaGetRtTopoErrorMsg, gaiaGetRtTopoWarningMsg,
 gaiaSetRtTopoErrorMsg

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE void gaiaSetRtTopoWarningMsg (const void *p_cache,
						  const char *msg);

/**
 Utility function: MakeValid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will attempt to create a valid representation of a given 
 invalid geometry without loosing any of the input vertices. 
 \n Already-valid geometries are returned without further intervention. 
 \n NULL will be returned if the passed argument is invalid.

 \sa gaiaFreeGeomColl, gaiaMakeValidDiscarded

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaMakeValid()

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid (const void *p_cache,
						   gaiaGeomCollPtr geom);

/**
 Utility function: MakeValidDiscarded

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will attempt to collect any invalid item (offending
 geometries) discarded by gaiaMakeValid while building a valid Geometry.
 \n Saving any discarded item could be useful for a finer (manual) adjustment.
 \n NULL will be returned if gaiaMakeValid hasn't identified any offending item 
................................................................................
 to be discarded during the validation.

 \sa gaiaFreeGeomColl, gaiaMakeValid

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaMakeValidDiscarded()

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded (const void
							    *p_cache,
							    gaiaGeomCollPtr
							    geom);

/**
 Utility function: Segmentize

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object.
 \param dist the meximum segment length.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will return a modified geometry having no segment longer than the given distance. 
 \n Distance computation is performed in 2d only.
 \n all Points or segments shorter than 'dist' will be returned without further intervention. 
................................................................................
 \n NULL will be returned if the passed argument is invalid.

 \sa gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSegmentize()

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (const void *p_cache,
						    gaiaGeomCollPtr geom,
						    double dist);

/**
 Utility function: Azimuth

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param xa the X coordinate of PointA.
 \param ya the Y coordinate of PointA.
 \param xb the X ccordinate of PointB.
 \param yb the Y coordinate of PointB.
 \param azimuth on completion this variable will contain the angle in radians from 
  the horizontal of the vector defined by pointA and pointB. 
 \n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.

 \return 0 on failure: any other value on success

 \sa gaiaProjectedPoint

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaAzimuth (const void *p_cache, double xa,
				     double ya, double xb, double yb,
				     double *azimuth);

/**
 Utility function: EllipsoidAzimuth

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param xa the X coordinate of PointA.
 \param ya the Y coordinate of PointA.
 \param xb the X ccordinate of PointB.
 \param yb the Y coordinate of PointB.
 \param a major axis of the reference spheroid.
 \param b minor axis of the reference spheroid.
 \param azimuth on completion this variable will contain the angle in radians from 
................................................................................
  the horizontal of the vector defined by pointA and pointB. 
 \n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.

 \return 0 on failure: any other value on success

 \sa gaiaAzimuth

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaEllipsoidAzimuth (const void *p_cache, double xa,
					      double ya, double xb, double yb,
					      double a, double b,
					      double *azimuth);

/**
 Utility function: ProjectedPoint

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param x1 the X coordinate of the Start Point.
 \param y1 the Y coordinate of the Start Point.
 \param a major axis of the reference spheroid.
 \param b minor axis of the reference spheroid.
 \param distance a distance expressed in Meters
 \param azimuth (aka bearing aka heading) expressed in radians;
 on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.
................................................................................
 \param x2 on completion this variable will contain the the X coordinate 
 of the Projected Point.
 \param y2 on completion this variable will contain the the Y coordinate 
 of the Projected Point.

 \return 0 on failure: any other value on success

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaProjectedPoint (const void *p_cache, double x1,
					    double y1, double a, double b,
					    double distance, double azimuth,
					    double *x2, double *y2);

/**
 Utility function: GeoHash

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input geometry.
 \param precision the expected precision: if <= 0 will be automatically determined.

 \return NULL on failure: a null-terminated text string on success

 \note you are responsible to free (before or after) any text string returned
  by gaiaGeoHash()

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE char *gaiaGeoHash (const void *p_cache,
				       gaiaGeomCollPtr geom, int precision);

/**
 Utility function: AsX3D

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input geometry.
 \param srs the WKT SRS definition.
 \param precision the expected precision (coord decimal digits).
 \param options 
 \param refid the X3D namespace

 \return NULL on failure: a null-terminated text string on success

 \note you are responsible to free (before or after) any text string returned
  by gaiaAsX3D()

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE char *gaiaAsX3D (const void *p_cache,
				     gaiaGeomCollPtr geom, const char *srs,
				     int precision, int options,
				     const char *refid);

/**
 Calculates the minimum 3D distance intercurring between two Geometry objects

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance, gaiaMaxDistance, gaia3DMaxDisance

 \note this function computes the 3D cartesian distance (if Z is supported)

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaia3DDistance (const void *p_cache,
					gaiaGeomCollPtr geom1,
					gaiaGeomCollPtr geom2, double *dist);

/**
 Calculates the maximum 2D distance intercurring between two Geometry objects

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance, gaia3DDistance, gaia3DMaxDistance

 \note this function computes the 2D maximum cartesian distance (Z is always ignored)

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaMaxDistance (const void *p_cache,
					 gaiaGeomCollPtr geom1,
					 gaiaGeomCollPtr geom2, double *dist);

/**
 Calculates the maximum 3D distance intercurring between two Geometry objects

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance, gaia3DDistance, gaiaMaxDistance

 \note this function computes the 3D maximum cartesian distance (if Z is supported)

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaia3DMaxDistance (const void *p_cache,
					   gaiaGeomCollPtr geom1,
					   gaiaGeomCollPtr geom2, double *dist);

/**
 Calculates the 2D or 3D Length for a Linestring or Multilinestring
 accordingly to the dimensions of Geometry

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry object 
 \param length on completion this variable will contain the calculated length

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaia3dLength (const void *p_cache,
				      gaiaGeomCollPtr geom, double *length);

/**
 Utility function: Split

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param input the input Geometry object.
 \param blade the blade Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function supports splitting a line by point, a line by line, a polygon by line.

 \sa gaiaFreeGeomColl, gaiaSplitLeft, gaiaSplitRight

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSplit()
 
 \note gaiaSplit will return both the \b left and the \b right split halves at the same time.

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit (const void *p_cache,
					       gaiaGeomCollPtr input,
					       gaiaGeomCollPtr blade);

/**
 Utility function: SplitLeft

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param input the input Geometry object.
 \param blade the blade Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function supports splitting a line by point, a line by line, a polygon by line.

 \sa gaiaFreeGeomColl, gaiaSplit, gaiaSplitRight
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSplitLeft()
 
 \note gaiaSplitLeft will only return the \b left split half; NULL may be eventually
 returned if empty.

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft (const void *p_cache,
						   gaiaGeomCollPtr input,
						   gaiaGeomCollPtr blade);

/**
 Utility function: SplitRight

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param input the input Geometry object.
 \param blade the blade Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function supports splitting a line by point, a line by line, a polygon by line.

 \sa gaiaFreeGeomColl, gaiaSplit, gaiaSplitLeft
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSplitRight()
 
 \note gaiaSplitLeft will only return the \b right split half; NULL may be eventually
 returned if empty.

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (const void *p_cache,
						    gaiaGeomCollPtr input,
						    gaiaGeomCollPtr blade);

/**
 Measures the total Area for a Geometry object (geodesic)

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to Geometry object
 \param a major axis of the reference spheroid.
 \param b minor axis of the reference spheroid.
 \param use_ellipsoid if TRUE will measure the Area on the Ellipsoid,
  otherwise on the Sphere
 \param area on completion this variable will contain the measured area

 \return 0 on failure: any other value on success

 \sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeomCollArea

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaGeodesicArea (const void *p_cache,
					  gaiaGeomCollPtr geom, double a,
					  double b, int use_ellipsoid,
					  double *area);

/**
 Utility function: re-noding lines

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param input the input Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function fully nodes a set of linestrings, using the least nodes
 preserving all the input ones.

 \sa gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaNode()

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaNodeLines (const void *p_cache,
						   gaiaGeomCollPtr input);

/**
 Converts a native binary Geometry into a compressed TWKB Geometry

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry to be converted 
 \param precision_xy how much precision (decimal digits) X and Y
 \param precision_z how much precision (decimal digits) Z
 \param precision_m how much precision (decimal digits) M
 \param with_size including sizes into the TWKB
 \param with_bbox including a BBOX into the TWKB
 \param twkb on succesfull completion this pointer will reference the
  TWKB geometry
 \param size_twkb on succesfull completion this pointer will reference 
 the size (in bytes) of the TWKB geometry

 \return 0 on failure: any other value on success.

 \sa gaiaFromTWKB

 \note you are responsible to free (before or after) the TWKB geometry
 created by gaiaToTWKB().

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaToTWKB (const void *p_cache,
				    gaiaGeomCollPtr geom,
				    unsigned char precision_xy,
				    unsigned char precision_z,
				    unsigned char precision_m, int with_size,
				    int with_bbox, unsigned char **twkb,
				    int *size_twkb);

/**
 Converts a compressed TWKB Geometry into a native binary Geometry

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param twkb pointer to TWKB geometry
 \param twkb_size size (in bytes) of the TWKB geometry
 \param srid the SRID of the returned Geometry

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaToTWKB

 \note you are responsible to destroy the native geometry
 returned by gaiaFromTWKB().

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromTWKB (const void *p_cache,
						  const unsigned char *twkb,
						  int twkb_size, int srid);

/**
 Converts a native binary Geometry into a GoogleMaps encoded PolyLine

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry to be converted 
 \param precision how much precision (decimal digits)
 \param encoded on succesfull completion this pointer will reference the
  GoogleMaps encoded PolyLine
 \param len on succesfull completion this pointer will reference 
 the length (in bytes) of the GoogleMaps encoded PolyLine

 \return 0 on failure: any other value on success.

 \sa gaiaLineFromEncodedPolyline

 \note you are responsible to free (before or after) the TWKB geometry
 created by gaiaToTWKB().

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE int gaiaAsEncodedPolyLine (const void *p_cache,
					       gaiaGeomCollPtr geom,
					       unsigned char precision,
					       char **encoded, int *len);

/**
 Converts a GoogleMaps encoded PolyLine into a native binary Geometry (Linestring)

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param encoded pointer to GoogleMaps encoded PolyLine
 \param precision how much precision (decimal digits)

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaAsEncodedPolyLine

 \note you are responsible to destroy the native geometry
 returned by gaiaFromTWKB().

 \remark \b RTTOPO support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineFromEncodedPolyline (const void
								 *p_cache,
								 const char
								 *encoded,
								 unsigned char
								 precision);

#endif				/* end RTTOPO support */

/**
 Utility function: DrapeLine

 \param db_handle pointer to the current DB connection.
 \param geom1 the first Geometry object (expected to be a 2D Linestring).
 \param geom2 the second Geometry object (expected to be a 3D Linestring).
 \param tolerance tolerance radius.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will return a Geometry of the Linestring type having 
  all points defined by geom1 and dimensions as defined by geom2.
  Missing Z and/or M coords will by recovered by corresponding points 
  found in geom2 within the given tolerance radius.
 \n both geom1 and geom2 must share the same SRID.

 \sa gaiaFreeGeomColl, gaiaDrapeLineExceptions

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaDrapeLine()

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDrapeLine (sqlite3 * db_handle,
						   gaiaGeomCollPtr geom1,
						   gaiaGeomCollPtr geom2,
						   double tolerance);

/**
 Utility function: DrapeLineExceptions

 \param db_handle pointer to the current DB connection.
 \param geom1 the first Geometry object (expected to be a 2D Linestring).
 \param geom2 the second Geometry object (expected to be a 3D Linestring).
 \param tolerance tolerance radius.
 \param interpolated boolean: if TRUE all Vertices for whom Z (and/or M)
 values had been succesfully interpolated will be considered as valid.
 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will return a Geometry of the MultiPoint type containing
 all Vertices from geom1 lacking a corresponding Vertex in geom2, thus
 leading to dubious Z and/or M coords.
 \n both geom1 and geom2 must share the same SRID.

 \sa gaiaFreeGeomColl, gaiaDrapeLine

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaDrapeLine()

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDrapeLineExceptions (sqlite3 *
							     db_handle,
							     gaiaGeomCollPtr
							     geom1,
							     gaiaGeomCollPtr
							     geom2,
							     double tolerance,
							     int interpolated);

#endif				/* end including GEOS */

/**
 Utility function: SnapToGrid

 \param geom the input Geometry object.



|







 







|







 







|







 







|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|


|







 







|


|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<







 







|
|







 







|
|







 







|
<







 







|
<







 







|
|







 







|
<







 







|
<







 







|
<







 







<
|







 







|
<







 







|
|
<







 







|
>









|
|
<







 







|
>








|
|
<







 







|
>









|
|
<













|
<



|








|
|
<







 







|
>









|
|
<







 







|
>







 







<
|







 







<
|







 







|
<







 







|



|
|
|
>
|
<
|

|

|


|

|


|
|
|
|

|

|


|

|


|
<
<
|



|

|


|

<


<
>
|

>
>
|

|
<


|

<


>
>
>
|
<

|

|
<




<













|

|
<




<







 







|

|
<
<





<







 







|

|
<





<












|

|
<
|




<







 







|

|
<
|





<







 







|

|
|
|
|




<








|

<
|




<











|

<
|






<










|

|
<





<










|

|
<





<










|

|
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



<













|

|
<





<







 







|

|
<





<







 







|

|
<





<











|

<
|






<











|

|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

























































160
161
162
163
164
165
166
...
846
847
848
849
850
851
852




















853
854
855
856
857
858
859
...
862
863
864
865
866
867
868























869
870
871
872
873
874
875
....
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
....
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616





































































































1617
1618
1619
1620
1621
1622
1623
....
1746
1747
1748
1749
1750
1751
1752
1753

1754
1755
1756
1757
1758
1759
1760
....
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
....
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
....
2019
2020
2021
2022
2023
2024
2025
2026

2027
2028
2029
2030
2031
2032
2033
....
2041
2042
2043
2044
2045
2046
2047
2048

2049
2050
2051
2052
2053
2054
2055
....
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
....
2246
2247
2248
2249
2250
2251
2252
2253

2254
2255
2256
2257
2258
2259
2260
....
2298
2299
2300
2301
2302
2303
2304
2305

2306
2307
2308
2309
2310
2311
2312
....
2498
2499
2500
2501
2502
2503
2504
2505

2506
2507
2508
2509
2510
2511
2512
....
2527
2528
2529
2530
2531
2532
2533

2534
2535
2536
2537
2538
2539
2540
2541
....
2679
2680
2681
2682
2683
2684
2685
2686

2687
2688
2689
2690
2691
2692
2693
....
2902
2903
2904
2905
2906
2907
2908
2909
2910

2911
2912
2913
2914
2915
2916
2917
....
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938

2939
2940
2941
2942
2943
2944
2945
....
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966

2967
2968
2969
2970
2971
2972
2973
....
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994

2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008

3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022

3023
3024
3025
3026
3027
3028
3029
....
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050

3051
3052
3053
3054
3055
3056
3057
....
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
....
3091
3092
3093
3094
3095
3096
3097

3098
3099
3100
3101
3102
3103
3104
3105
....
3145
3146
3147
3148
3149
3150
3151

3152
3153
3154
3155
3156
3157
3158
3159
....
3171
3172
3173
3174
3175
3176
3177
3178

3179
3180
3181
3182
3183
3184
3185
....
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263

3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291


3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302

3303
3304

3305
3306
3307
3308
3309
3310
3311
3312

3313
3314
3315
3316

3317
3318
3319
3320
3321
3322

3323
3324
3325
3326

3327
3328
3329
3330

3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346

3347
3348
3349
3350

3351
3352
3353
3354
3355
3356
3357
....
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367


3368
3369
3370
3371
3372

3373
3374
3375
3376
3377
3378
3379
....
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389

3390
3391
3392
3393
3394

3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409

3410
3411
3412
3413
3414

3415
3416
3417
3418
3419
3420
3421
....
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431

3432
3433
3434
3435
3436
3437

3438
3439
3440
3441
3442
3443
3444
....
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461

3462
3463
3464
3465
3466
3467
3468
3469
3470
3471

3472
3473
3474
3475
3476

3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489

3490
3491
3492
3493
3494
3495
3496

3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509

3510
3511
3512
3513
3514

3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527

3528
3529
3530
3531
3532

3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545

3546
3547

















3548
3549
3550

3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566

3567
3568
3569
3570
3571

3572
3573
3574
3575
3576
3577
3578
....
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588

3589
3590
3591
3592
3593

3594
3595
3596
3597
3598
3599
3600
....
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610

3611
3612
3613
3614
3615

3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628

3629
3630
3631
3632
3633
3634
3635

3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649

3650





































































































3651

























































3652
3653
3654
3655
3656
3657
3658
/*
 gg_advanced.h -- Gaia common support for geometries: advanced
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 \param proj_from geodetic parameters string [EPSG format] qualifying the
 input Reference System
 \param proj_to geodetic parameters string [EPSG format] qualifying the
 output Reference System

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaTransform_r, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,  this including any Geometry returned by gaiaGeometryTransform()\n
 not reentrant and thread unsafe.

 \remark \b PROJ.4 support required
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org,
................................................................................
 \param proj_from geodetic parameters string [EPSG format] qualifying the
 input Reference System
 \param proj_to geodetic parameters string [EPSG format] qualifying the
 output Reference System

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaTransform, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,  this including any Geometry returned by gaiaGeometryTransform()\n
 reentrant and thread-safe.

 \remark \b PROJ.4 support required
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform_r (const void *p_cache,
						     gaiaGeomCollPtr org,
						     char *proj_from,
						     char *proj_to);


























































#endif				/* end including PROJ.4 */

#ifndef OMIT_GEOS		/* including GEOS */

/**
 Resets the GEOS error and warning messages to an empty state
................................................................................

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail (gaiaGeomCollPtr geom);

/**
 return a Geometry detail causing a Geometry to be invalid





















 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to the Geometry object to be validated.

 \return pointer to a Geometry object causing invalidity, or NULL.

 \sa gaiaIsValid_r, gaiaIsValidReason_r, gaiaIsValidDetail
................................................................................
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaIsValidDetail_r (const void *p_cache,
							 gaiaGeomCollPtr geom);
























/**
 Checks if a Geometry object represents an OGC Valid Geometry

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to Geometry object.

 \return 0 if false; any other value if true
................................................................................
 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object to be evaluated
 \param geom2 the second Geometry object to be evaluated
 \param pattern intersection matrix pattern [DE-9IM]

 \return 0 if false: any other value if true
 
 \sa gaiaGeomCollRelate_r,
 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, 
 gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
 gaiaGeomCollWithin, gaiaGeomCollRelate

 \note not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGeomCollRelate (gaiaGeomCollPtr geom1,
					    gaiaGeomCollPtr geom2,
................................................................................
 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 the first Geometry object to be evaluated
 \param geom2 the second Geometry object to be evaluated
 \param pattern intersection matrix pattern [DE-9IM]

 \return 0 if false: any other value if true
 
 \sa gaiaGeomCollRelate,
 gaiaGeomCollEquals, gaiaGeomCollDisjoint, gaiaGeomCollIntersects, 
 gaiaGeomCollOverlaps, gaiaGeomCollCrosses, gaiaGeomCollContains,
 gaiaGeomCollWithin, gaiaGeomCollRelate

 \note reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGeomCollRelate_r (const void *p_cache,
					      gaiaGeomCollPtr geom1,
					      gaiaGeomCollPtr geom2,
					      const char *pattern);






































































































/**
 Calculates the maximum distance intercurring between two Geometry objects

 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeometryUnion_r()\n
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeometryUnion_r (const void *p_cache,
							 gaiaGeomCollPtr geom1,

							 gaiaGeomCollPtr geom2);

/**
 Spatial operator: Union Cascaded

 \param geom the input Geometry object.

................................................................................
 \sa gaiaGeomCollCentroid, gaiaRingCentroid

 \note reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGeomCollCentroid_r (const void *p_cache,
						gaiaGeomCollPtr geom, double *x,
						double *y);

/**
 Spatial operator: PointOnSurface

 \param geom pointer to Geometry object.
 \param x on completion this variable will contain the Point X coordinate  
 \param y on completion this variable will contain the Point Y coordinate
................................................................................

 \sa gaiaGetPointOnSurface_r

 \note not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x,
					       double *y);

/**
 Spatial operator: PointOnSurface

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom pointer to Geometry object.
 \param x on completion this variable will contain the Point X coordinate  
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeomCollSimplify()\n
 not reentrant and thread unsafe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr geom,

							  double tolerance);

/**
 Spatial operator: Simplify

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeomCollSimplify_r()\n
 reentrant and thread safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify_r (const void *p_cache,

							    gaiaGeomCollPtr
							    geom,
							    double tolerance);

/**
 Spatial operator: Simplify [preserving topology]

................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaGeomCollBuffer_r()\n
 reentrant and thread-safe.

 \remark \b GEOS support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer_r (const void *p_cache,
							  gaiaGeomCollPtr geom,
							  double radius,
							  int points);

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_ADVANCED
#endif

/**
................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaOffsetCurve()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaOffsetCurve (gaiaGeomCollPtr geom,
						     double radius, int points,

						     int left_right);

/**
 Spatial operator: Offset Curve

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the input Geometry object
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSingleSidedBuffer()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSingleSidedBuffer (gaiaGeomCollPtr geom,

							   double radius,
							   int points,
							   int left_right);

/**
 Spatial operator: Single Sided Buffer

................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaLineSubstring()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring (gaiaGeomCollPtr ln_geom,

						       double start_fraction,
						       double end_fraction);

/**
 Spatial operator: Line Substring

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
................................................................................
 reentrant and thread-safe.

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLineSubstring_r (const void *p_cache,
							 gaiaGeomCollPtr
							 ln_geom,

							 double start_fraction,
							 double end_fraction);

/**
 Spatial operator: Shortest Line

 \param geom1 pointer to the first Geometry object.
 \param geom2 pointer to the second Geometry object.
................................................................................
 \sa gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaLinesCutAtNodes()

 \remark \b GEOS-ADVANCED support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaLinesCutAtNodes (gaiaGeomCollPtr geom1,

							 gaiaGeomCollPtr geom2);

/**
 Spatial operator: Unary Union

 \param geom the input Geometry object.

................................................................................
/**
 Utility function: SquareGrid

 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
  return a MULTIPOLYGON containing square POLYGONs.

 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaSquareGrid_r, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid

................................................................................
 this including any Geometry returned by gaiaSquareGrid()\n
 not reentrant and thread unsafe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid (gaiaGeomCollPtr geom,
						    double origin_x,
						    double origin_y,
						    double size,
						    int only_edges);

/**
 Utility function: SquareGrid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()   
 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
  return a MULTIPOLYGON containing square POLYGONs.

 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaSquareGrid, gaiaFreeGeomColl, gaiaTriangularGrid, gaiaHexagonalGrid

................................................................................
 reentrant and thread-safe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSquareGrid_r (const void *p_cache,
						      gaiaGeomCollPtr geom,
						      double origin_x,
						      double origin_y,
						      double size,
						      int only_edges);

/**
 Utility function: TriangularGrid

 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
  return a MULTIPOLYGON containing triangular POLYGONs.

 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaTriangularGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid

................................................................................
 this including any Geometry returned by gaiaTriangularGrid()\n
 not reentrant and thread unsafe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid (gaiaGeomCollPtr geom,
							double origin_x,
							double origin_y,
							double size,
							int only_edges);

/**
 Utility function: TriangularGrid

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
  return a MULTIPOLYGON containing triangular POLYGONs.

 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaTriangularGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaHexagonalGrid

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaTriangularGrid_r()\n
 reentrant and thread-safe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTriangularGrid_r (const void *p_cache,
							  gaiaGeomCollPtr geom,

							  double origin_x,
							  double origin_y,
							  double size,
							  int only_edges);

/**
 Utility function: HexagonalGrid

 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
  return a MULTIPOLYGON containing hexagonal POLYGONs.

 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaGexagonalGrid_r, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid

................................................................................
 this including any Geometry returned by gaiaHexagonalGrid()\n
 not reentrant and thread unsafe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid (gaiaGeomCollPtr geom,
						       double origin_x,
						       double origin_y,
						       double size,
						       int only_edges);

/**
 Utility function: HexagonalGrid
   
 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom the Geometry to be covered by the Grid.
 \param origin_x the X ccordinate identifying the Grid Origin.
 \param origin_y the Y coordinate identifiying the Grid Origin.
 \param size the Grid cell-side size.
 \param only_edges if non-zero will return a MULTILINESTRING, otherwise it will
  return a MULTIPOLYGON containing hexagonal POLYGONs.

 
 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will always return a MultiPolygon 
 \n NULL will be returned if any argument is invalid.

 \sa gaiaGexagonalGrid, gaiaFreeGeomColl, gaiaSquareGrid, gaiaTriangularGrid

................................................................................
 reentrant and thread-safe.

 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaHexagonalGrid_r (const void *p_cache,
							 gaiaGeomCollPtr geom,
							 double origin_x,
							 double origin_y,
							 double size,
							 int only_edges);

#endif				/* end GEOS advanced features */

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef GEOS_TRUNK
#endif

................................................................................
 this including any Geometry returned by gaiaDelaunayTriangulation()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-TRUNK support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaDelaunayTriangulation (gaiaGeomCollPtr
							       geom,

							       double tolerance,
							       int only_edges);

/**
 Delaunay Triangulation
                          
 \param p_cache a memory pointer returned by spatialite_alloc_connection()                   
 \param geom pointer to input Geometry object.
................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaVoronojDiagram()\n
 not reentrant and thread unsafe.

 \remark \b GEOS-TRUNK support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram (gaiaGeomCollPtr geom,

							double extra_frame_size,
							double tolerance,
							int only_edges);

/**
 Voronoj Diagram
                                 
 \param p_cache a memory pointer returned by spatialite_alloc_connection()            
................................................................................
 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaVoronojDiagram_r()\n
 reentrant and thread-safe.

 \remark \b GEOS-TRUNK support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaVoronojDiagram_r (const void *p_cache,
							  gaiaGeomCollPtr geom,

							  double
							  extra_frame_size,
							  double tolerance,
							  int only_edges);

/**
 Concave Hull
................................................................................
						       double factor,
						       double tolerance,
						       int allow_holes);

#endif				/* end GEOS experimental features */

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_LWGEOM
#endif

/**
 Resets the LWGEOM error and warning messages to an empty state

 \sa gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg,
 gaiaSetLwGeomWarningMsg


 \note not reentrant and thread unsafe.

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE void gaiaResetLwGeomMsg (void);

/**
 Return the latest LWGEOM error message (if any)

 \return the latest LWGEOM error message: an empty string if no error was
 previoysly found.

 \note not reentrant and thread unsafe.

 \sa gaiaResetLwGeomMsg, gaiaGetLwGeomWarningMsg, gaiaSetLwGeomErrorMsg,
 gaiaSetLwGeomWarningMsg

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE const char *gaiaGetLwGeomErrorMsg (void);

/**
 Return the latest LWGEOM warning message (if any)

 \return the latest LWGEOM warning message: an empty string if no warning was 
 previoysly found.

 \sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaSetLwGeomErrorMsg,


 gaiaSetLwGeomWarningMsg

 \note not reentrant and thread unsafe.

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE const char *gaiaGetLwGeomWarningMsg (void);

/**
 Set the current LWGEOM error message


 \param msg the error message to be set.


 \sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg,
 gaiaSetLwGeomWarningMsg

 \note not reentrant and thread unsafe.

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE void gaiaSetLwGeomErrorMsg (const char *msg);


/**
 Set the current LWGEOM warning message


 \param msg the warning message to be set.

 \sa gaiaResetLwGeomMsg, gaiaGetLwGeomErrorMsg, gaiaGetLwGeomWarningMsg,
 gaiaSetLwGeomErrorMsg

 \note not reentrant and thread unsafe.


 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE void gaiaSetLwGeomWarningMsg (const char *msg);


/**
 Utility function: MakeValid


 \param geom the input Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will attempt to create a valid representation of a given 
 invalid geometry without loosing any of the input vertices. 
 \n Already-valid geometries are returned without further intervention. 
 \n NULL will be returned if the passed argument is invalid.

 \sa gaiaFreeGeomColl, gaiaMakeValidDiscarded

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaMakeValid()

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValid (gaiaGeomCollPtr geom);


/**
 Utility function: MakeValidDiscarded


 \param geom the input Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will attempt to collect any invalid item (offending
 geometries) discarded by gaiaMakeValid while building a valid Geometry.
 \n Saving any discarded item could be useful for a finer (manual) adjustment.
 \n NULL will be returned if gaiaMakeValid hasn't identified any offending item 
................................................................................
 to be discarded during the validation.

 \sa gaiaFreeGeomColl, gaiaMakeValid

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaMakeValidDiscarded()

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeValidDiscarded (gaiaGeomCollPtr


							    geom);

/**
 Utility function: Segmentize


 \param geom the input Geometry object.
 \param dist the meximum segment length.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n this function will return a modified geometry having no segment longer than the given distance. 
 \n Distance computation is performed in 2d only.
 \n all Points or segments shorter than 'dist' will be returned without further intervention. 
................................................................................
 \n NULL will be returned if the passed argument is invalid.

 \sa gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSegmentize()

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSegmentize (gaiaGeomCollPtr geom,

						    double dist);

/**
 Utility function: Azimuth


 \param xa the X coordinate of PointA.
 \param ya the Y coordinate of PointA.
 \param xb the X ccordinate of PointB.
 \param yb the Y coordinate of PointB.
 \param azimuth on completion this variable will contain the angle in radians from 
  the horizontal of the vector defined by pointA and pointB. 
 \n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.

 \return 0 on failure: any other value on success

 \sa gaiaProjectedPoint

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE int gaiaAzimuth (double xa, double ya, double xb,

				     double yb, double *azimuth);

/**
 Utility function: EllipsoidAzimuth


 \param xa the X coordinate of PointA.
 \param ya the Y coordinate of PointA.
 \param xb the X ccordinate of PointB.
 \param yb the Y coordinate of PointB.
 \param a major axis of the reference spheroid.
 \param b minor axis of the reference spheroid.
 \param azimuth on completion this variable will contain the angle in radians from 
................................................................................
  the horizontal of the vector defined by pointA and pointB. 
 \n Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.

 \return 0 on failure: any other value on success

 \sa gaiaAzimuth

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE int gaiaEllipsoidAzimuth (double xa, double ya, double xb,

					      double yb, double a, double b,
					      double *azimuth);

/**
 Utility function: ProjectedPoint


 \param x1 the X coordinate of the Start Point.
 \param y1 the Y coordinate of the Start Point.
 \param a major axis of the reference spheroid.
 \param b minor axis of the reference spheroid.
 \param distance a distance expressed in Meters
 \param azimuth (aka bearing aka heading) expressed in radians;
 on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.
................................................................................
 \param x2 on completion this variable will contain the the X coordinate 
 of the Projected Point.
 \param y2 on completion this variable will contain the the Y coordinate 
 of the Projected Point.

 \return 0 on failure: any other value on success

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE int gaiaProjectedPoint (double x1, double y1, double a,
					    double b, double distance,
					    double azimuth, double *x2,
					    double *y2);

/**
 Utility function: GeoHash


 \param geom the input geometry.
 \param precision the expected precision: if <= 0 will be automatically determined.

 \return NULL on failure: a null-terminated text string on success

 \note you are responsible to free (before or after) any text string returned
  by gaiaGeoHash()

 \remark \b LWGEOM support required.
 */

    GAIAGEO_DECLARE char *gaiaGeoHash (gaiaGeomCollPtr geom, int precision);

/**
 Utility function: AsX3D


 \param geom the input geometry.
 \param srs the WKT SRS definition.
 \param precision the expected precision (coord decimal digits).
 \param options 
 \param refid the X3D namespace

 \return NULL on failure: a null-terminated text string on success

 \note you are responsible to free (before or after) any text string returned
  by gaiaAsX3D()

 \remark \b LWGEOM support required.
 */

    GAIAGEO_DECLARE char *gaiaAsX3D (gaiaGeomCollPtr geom, const char *srs,
				     int precision, int options,
				     const char *refid);

/**
 Calculates the minimum 3D distance intercurring between two Geometry objects


 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance, gaiaMaxDistance, gaia3DMaxDisance

 \note this function computes the 3D cartesian distance (if Z is supported)

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE int gaia3DDistance (gaiaGeomCollPtr geom1,

					gaiaGeomCollPtr geom2, double *dist);

/**
 Calculates the maximum 2D distance intercurring between two Geometry objects


 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance, gaia3DDistance, gaia3DMaxDistance

 \note this function computes the 2D maximum cartesian distance (Z is always ignored)

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE int gaiaMaxDistance (gaiaGeomCollPtr geom1,

					 gaiaGeomCollPtr geom2, double *dist);

/**
 Calculates the maximum 3D distance intercurring between two Geometry objects


 \param geom1 the first Geometry object 
 \param geom2 the second Geometry object 
 \param dist on completion this variable will contain the calculated distance

 \return 0 on failure: any other value on success.

 \sa gaiaGeomCollDistance, gaia3DDistance, gaiaMaxDistance

 \note this function computes the 3D maximum cartesian distance (if Z is supported)

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE int gaia3DMaxDistance (gaiaGeomCollPtr geom1,

					   gaiaGeomCollPtr geom2, double *dist);


















/**
 Utility function: Split


 \param input the input Geometry object.
 \param blade the blade Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function supports splitting a line by point, a line by line, a polygon by line.

 \sa gaiaFreeGeomColl, gaiaSplitLeft, gaiaSplitRight

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSplit()
 
 \note gaiaSplit will return both the \b left and the \b right split halves at the same time.

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplit (gaiaGeomCollPtr input,

					       gaiaGeomCollPtr blade);

/**
 Utility function: SplitLeft


 \param input the input Geometry object.
 \param blade the blade Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function supports splitting a line by point, a line by line, a polygon by line.

 \sa gaiaFreeGeomColl, gaiaSplit, gaiaSplitRight
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSplitLeft()
 
 \note gaiaSplitLeft will only return the \b left split half; NULL may be eventually
 returned if empty.

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitLeft (gaiaGeomCollPtr input,

						   gaiaGeomCollPtr blade);

/**
 Utility function: SplitRight


 \param input the input Geometry object.
 \param blade the blade Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function supports splitting a line by point, a line by line, a polygon by line.

 \sa gaiaFreeGeomColl, gaiaSplit, gaiaSplitLeft
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaSplitRight()
 
 \note gaiaSplitLeft will only return the \b right split half; NULL may be eventually
 returned if empty.

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSplitRight (gaiaGeomCollPtr input,

						    gaiaGeomCollPtr blade);

/**
 Measures the total Area for a Geometry object (geodesic)


 \param geom pointer to Geometry object
 \param a major axis of the reference spheroid.
 \param b minor axis of the reference spheroid.
 \param use_ellipsoid if TRUE will measure the Area on the Ellipsoid,
  otherwise on the Sphere
 \param area on completion this variable will contain the measured area

 \return 0 on failure: any other value on success

 \sa gaiaGeomCollLength, gaiaMeasureArea, gaiaGeomCollArea

 \remark \b LWGEOM support required.
 */

    GAIAGEO_DECLARE int gaiaGeodesicArea (gaiaGeomCollPtr geom, double a,
					  double b, int use_ellipsoid,
					  double *area);

/**
 Utility function: re-noding lines


 \param input the input Geometry object.

 \return the pointer to newly created Geometry object: NULL on failure.
 \n The function fully nodes a set of linestrings, using the least nodes
 preserving all the input ones.

 \sa gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaNode()

 \remark \b LWGEOM support required.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaNodeLines (gaiaGeomCollPtr input);







































































































#endif				/* end LWGEOM support */


























































#endif				/* end including GEOS */

/**
 Utility function: SnapToGrid

 \param geom the input Geometry object.

Changes to src/headers/spatialite/gg_const.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
/*
 gg_const.h -- Gaia common support for geometries: constants
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
#define GAIA_TYPE_POLYGON	3

/* constants that defines byte storage order  */
/** Big-Endian marker */
#define GAIA_BIG_ENDIAN		0
/** Little-Endian marker */
#define GAIA_LITTLE_ENDIAN	1
/** TinyPoint Big-Endian marker */
#define GAIA_TINYPOINT_BIG_ENDIAN		0x80
/** TinyPoint Little-Endian marker */
#define GAIA_TINYPOINT_LITTLE_ENDIAN	0x81

/* constants that defines special markers used for encoding of SpatiaLite internal BLOB geometries  */
/** BLOB-Geometry internal marker: START */
#define GAIA_MARK_START		0x00
/** BLOB-Geometry internal marker: END */
#define GAIA_MARK_END		0xFE
/** BLOB-Geometry internal marker: MBR */
................................................................................
/** BLOB-Geometry CLASS: MULTILINESTRING ZM */
#define GAIA_MULTILINESTRINGZM		3005
/** BLOB-Geometry CLASS: MULTIPOLYGON ZM */
#define GAIA_MULTIPOLYGONZM		3006
/** BLOB-Geometry CLASS: GEOMETRYCOLLECTION ZM */
#define GAIA_GEOMETRYCOLLECTIONZM	3007

/* constants that defines TinyPoint Types */
/** BLOB-TinyPoint Type: POINT XY */
#define GAIA_TINYPOINT_XY		0x01
/** BLOB-TinyPoint Type: POINT XYZ */
#define GAIA_TINYPOINT_XYZ		0x02
/** BLOB-TinyPoint Type: POINT XYM */
#define GAIA_TINYPOINT_XYM		0x03
/** BLOB-TinyPoint Type: POINT XYZM */
#define GAIA_TINYPOINT_XYZM		0x04

/* constants that defines Compressed GEOMETRY CLASSes */
/** BLOB-Geometry CLASS: compressed LINESTRING */
#define GAIA_COMPRESSED_LINESTRING		1000002
/** BLOB-Geometry CLASS: compressed POLYGON */
#define GAIA_COMPRESSED_POLYGON			1000003
/** BLOB-Geometry CLASS: compressed LINESTRING Z */
#define GAIA_COMPRESSED_LINESTRINGZ		1001002
................................................................................
#define GAIA_SHP_MULTIPOINTM	28

/* constants used for Clone Special modes */
/** Clone Special Mode: Same Order as input */
#define GAIA_SAME_ORDER		0
/** Clone Special Mode: Reversed Order */
#define GAIA_REVERSE_ORDER	-1
/** Clone Special Mode: apply Clockwise Rule to Polygon Rings */
#define GAIA_CW_ORDER		-2
/** Clone Special Mode: apply Counter-Clockwise Rule to Polygon Rings */
#define GAIA_CCW_ORDER		-3

/* constants used for DBF column-names case */
/** Leave all DBF column-names as they are */
#define GAIA_DBF_COLNAME_CASE_IGNORE	0
/** Convert all DBF column names to LowerCase */
#define GAIA_DBF_COLNAME_LOWERCASE	1
/** Convert all DBF column names to UpperCase */
#define GAIA_DBF_COLNAME_UPPERCASE	2

/* macros */
/**
 macro extracting XY coordinates

 \param xy pointer [const void *] to COORD mem-array
 \param v [int] point index [first point has index 0]



|







 







|







 







<
<
<
<







 







<
<
<
<
<
<
<
<
<
<







 







|
|
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
122
123
124
125
126
127
128




129
130
131
132
133
134
135
...
193
194
195
196
197
198
199










200
201
202
203
204
205
206
...
404
405
406
407
408
409
410
411
412










413
414
415
416
417
418
419
/*
 gg_const.h -- Gaia common support for geometries: constants
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
#define GAIA_TYPE_POLYGON	3

/* constants that defines byte storage order  */
/** Big-Endian marker */
#define GAIA_BIG_ENDIAN		0
/** Little-Endian marker */
#define GAIA_LITTLE_ENDIAN	1





/* constants that defines special markers used for encoding of SpatiaLite internal BLOB geometries  */
/** BLOB-Geometry internal marker: START */
#define GAIA_MARK_START		0x00
/** BLOB-Geometry internal marker: END */
#define GAIA_MARK_END		0xFE
/** BLOB-Geometry internal marker: MBR */
................................................................................
/** BLOB-Geometry CLASS: MULTILINESTRING ZM */
#define GAIA_MULTILINESTRINGZM		3005
/** BLOB-Geometry CLASS: MULTIPOLYGON ZM */
#define GAIA_MULTIPOLYGONZM		3006
/** BLOB-Geometry CLASS: GEOMETRYCOLLECTION ZM */
#define GAIA_GEOMETRYCOLLECTIONZM	3007











/* constants that defines Compressed GEOMETRY CLASSes */
/** BLOB-Geometry CLASS: compressed LINESTRING */
#define GAIA_COMPRESSED_LINESTRING		1000002
/** BLOB-Geometry CLASS: compressed POLYGON */
#define GAIA_COMPRESSED_POLYGON			1000003
/** BLOB-Geometry CLASS: compressed LINESTRING Z */
#define GAIA_COMPRESSED_LINESTRINGZ		1001002
................................................................................
#define GAIA_SHP_MULTIPOINTM	28

/* constants used for Clone Special modes */
/** Clone Special Mode: Same Order as input */
#define GAIA_SAME_ORDER		0
/** Clone Special Mode: Reversed Order */
#define GAIA_REVERSE_ORDER	-1
/** Clone Special Mode: apply Left Handle Rule to Polygon Rings */
#define GAIA_LHR_ORDER		-2











/* macros */
/**
 macro extracting XY coordinates

 \param xy pointer [const void *] to COORD mem-array
 \param v [int] point index [first point has index 0]

Changes to src/headers/spatialite/gg_core.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
...
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
...
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
...
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
...
741
742
743
744
745
746
747
748
749


750
751
752
753
754
755
756
...
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
...
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
....
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
....
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
....
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
....
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
....
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
....
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
....
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
....
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
....
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
....
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
....
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
....
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
....
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
....
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
....
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
....
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
....
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
/*
 gg_core.h -- Gaia common support for geometries: core functions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
#define _GG_CORE_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/* constant values for gaiaGeodesicArcLength return_type */

/** Arc Length measured in Degrees */
#define GAIA_GEODESIC_ARC_LENGTH_DEGREES	0

/** Arc Length measured in Meters */
#define GAIA_GEODESIC_ARC_LENGTH_METERS		1

/** Chord Length measured in Degrees */
#define GAIA_GEODESIC_CHORD_LENGTH_DEGREES	2

/** Chord Length measured in Meters */
#define GAIA_GEODESIC_CHORD_LENGTH_METERS	3

/** Central Angle measured in Radians */
#define GAIA_GEODESIC_CENTRAL_ANGLE_RADIANS	4

/** Central Angle measured in Degrees */
#define GAIA_GEODESIC_CENTRAL_ANGLE_DEGREES	5

/** Area of segment/arc measured in Square Meters */
#define GAIA_GEODESIC_ARC_AREA_METERS		6

/** Height of segment/arc in Meters */
#define GAIA_GEODESIC_ARC_HEIGHT_METERS		7


/* function prototypes */

/**
 Safely frees any dynamic memory block allocated by the library itself

 \param ptr pointer to dynamically allocated memory
................................................................................

/**
 Copies coordinates between two LINESTRING objects

 \param dst destination LINESTRING [output]
 \param src origin LINESTRING [input]

 \sa gaiaCopyLinestringCoordsReverse, gaiaCopyLinestringCoordsEx

 \note both LINESTRING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate 
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyLinestringCoords (gaiaLinestringPtr dst,
						   gaiaLinestringPtr src);

/**
 Copies coordinates between two LINESTRING objects

 \param dst destination LINESTRING [output]
 \param src origin LINESTRING [input]
 \param z_no_data the default Z value
 \parma m_no_data the default M value

 \sa gaiaCopyLinestringCoords

 \note both LINESTRING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate 
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyLinestringCoordsEx (gaiaLinestringPtr dst,
						     gaiaLinestringPtr src,
						     double z_no_data,
						     double m_no_data);

/**
 Copies coordinates between two LINESTRING objects in reverse order

 \param dst destination LINESTRING [output]
 \param src origin LINESTRING [input]

 \sa gaiaCopyLinestringCoords

 \note both LINESTRING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate 
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyLinestringCoordsReverse (gaiaLinestringPtr
							  dst,
							  gaiaLinestringPtr
							  src);

/**
 Allocates a 2D RING [XY]

 \param vert number of points [aka vertices] into the Ring
................................................................................

/**
 Copies coordinates between two RING objects

 \param dst destination RING [output]
 \param src origin RING [input]

 \sa gaiaCopyRingCoordsReverse, gaiaCopyRingCoordEx

 \note both RING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr src);

/**
 Copies coordinates between two RING objects

 \param dst destination RING [output]
 \param src origin RING [input]
 \param z_no_data the default Z value
 \param m_no_data the default M value

 \sa gaiaCopyRingCoords

 \note both RING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyRingCoordsEx (gaiaRingPtr dst, gaiaRingPtr src,
					       double z_no_data,
					       double m_no_data);

/**
 Copies coordinates between two RING objects in reverse order

 \param dst destination RING [output]
 \param src origin RING [input]

 \sa gaiaCopyRingCoords
................................................................................
 \param x X coordinate of the Point to be created
 \param y X coordinate of the Point to be created
 \param z Z coordinate of the Point to be created

 \note ownership of the newly created POINT object belongs to the Geometry
 object.
 */
    GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYZ (gaiaGeomCollPtr p,
						    double x, double y,
						    double z);

/**
 Creates a new 2D Point [XYM] object into a Geometry object

 \param p pointer to the Geometry object
 \param x X coordinate of the Point to be created
 \param y X coordinate of the Point to be created
 \param m M measure of the Point to be created

 \note ownership of the newly created POINT object belongs to the Geometry
 object.
 */
    GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYM (gaiaGeomCollPtr p,
						    double x, double y,
						    double m);

/**
 Creates a new 3D Point [XYZM] object into a Geometry object

 \param p pointer to the Geometry object
 \param x X coordinate of the Point to be created
 \param y X coordinate of the Point to be created
................................................................................
 \param interiors number of Interiors Rings [0, if no Interior Ring is required]

 \return the pointer to newly created Polygon: NULL on failure.

 \note ownership of the newly created Polygon object belongs to the Geometry object.
 \n the newly created Polygon will have the same dimensions as the Geometry has.
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaAddPolygonToGeomColl (gaiaGeomCollPtr
							     p, int vert,
							     int interiors);

/**
 Creates a new Polygon object into a Geometry object starting from an
 already existing Ring object

 \param p pointer to the Geometry object.
................................................................................

 \return the pointer to the newly created Polygon object: NULL on failure.

 \note ownership of the Ring object will be transferred to the
 Polygon object, and the Polygon object ownerships belongs to the Geometry object.
 \n the Polygon object will have the same dimensions as the Ring object has.
 */
    GAIAGEO_DECLARE gaiaPolygonPtr
	gaiaInsertPolygonInGeomColl (gaiaGeomCollPtr p, gaiaRingPtr ring);



/**
 Creates a new Interior Ring object into a Polygon object

 \param p pointer to the Polygon object.
 \param pos relative position index [first Interior Ring has index 0].
 \param vert number of points (aka vertices) into the Ring.
................................................................................

 \sa gaiaAllocPolygon, gaiaAllocPolygonXYZ, gaiaAllocPolygonXYM,
 gaiaAllocPolygonXYZM

 \note ownership of the Ring object belongs to the Polygon object.
 \n the newly created Ring will have the same dimensions the Polygon has.
 */
    GAIAGEO_DECLARE gaiaRingPtr gaiaAddInteriorRing (gaiaPolygonPtr p,
						     int pos, int vert);

/**
 Inserts an already existing Ring object into a Polygon object

 \param p pointer to the Polygon object
 \param ring pointer to the Ring object

................................................................................
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygon (gaiaPolygonPtr polyg);

/**
 Duplicates a Polygon object (special)

 \param polyg pointer to Polygon object [origin].
 \param mode one of GAIA_SAME_ORDER, GAIA_REVERSE_ORDER, or GAIA_LHR_ORDER.

 \return the pointer to newly created Polygon object: NULL on failure.

 \sa gaiaClonePolygon, gaiaCloneGeomCollSpecial

 \note if GAIA_REVERSE_ORDER is specified, then any Ring into the newly created
  object will be in reverse order. If GAIA_CW_ORDER is specified, any
  Exterior Ring will have clockwise orientation, and any Interior Ring will have
  counter-clockwise orientation. If GAIA_CCW_ORDER is specified, any
  Exterior Ring will have counter-clockwise orientation, and any Interior Ring 
  will have clockwise orientation. In any other case this function will simply 
  default to gaiaClonePolygon. 
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygonSpecial (gaiaPolygonPtr
							    polyg, int mode);

/**
 Duplicates a Geometry object
................................................................................
 Duplicates a Geometry object [casting dimensions to 3D XYZ]

 \param geom pointer to Geometry object [origin].

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, 
 gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZM,
 gaiaCostGeomCollToXYZnoData

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 3D [XYZ] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZ (gaiaGeomCollPtr
							   geom);

................................................................................
 Duplicates a Geometry object [casting dimensions to 2D XYM]

 \param geom pointer to Geometry object [origin].

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
 gaiaCastGeomCollToXYZM, gaiaCastGeomCollToXYMnoData

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 2D [XYM] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYM (gaiaGeomCollPtr
							   geom);

................................................................................
 Duplicates a Geometry object [casting dimensions to 3D XYZM]

 \param geom pointer to Geometry object [origin].

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
 gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZMnoData

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 3D [XYZM] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZM (gaiaGeomCollPtr
							    geom);

/**
 Duplicates a Geometry object [casting dimensions to 3D XYZ - noData]

 \param geom pointer to Geometry object [origin].
 \param no_data the default Z value

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCostGeomCollToXYZ

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 3D [XYZ] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZnoData (gaiaGeomCollPtr
								 geom,
								 double
								 no_data);

/**
 Duplicates a Geometry object [casting dimensions to 2D XYM - noData]

 \param geom pointer to Geometry object [origin].
 \param no_data the default M value

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCastGeomCollToXYM

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 2D [XYM] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYMnoData (gaiaGeomCollPtr
								 geom,
								 double
								 no_data);

/**
 Duplicates a Geometry object [casting dimensions to 3D XYZM - noData]

 \param geom pointer to Geometry object [origin].
 \param z_no_data the default Z value
 \param m_no_data the default M value

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCastGeomCollToXYZM

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 3D [XYZM] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr
	gaiaCastGeomCollToXYZMnoData (gaiaGeomCollPtr geom, double z_no_data,
				      double m_no_data);

/**
 Gets coodinates from a Linestring's Point

 \param ln pointer to Linestring object.
 \param v relative position of Point: first Point has index 0
 \param x on completion this variable will contain the Point X coordinate.
 \param y on completion this variable will contain the Point Y coordinate.
................................................................................
 macros.
 \n using the gaiaLineSetPoint() function is a little bit slower but is
 intrinsically safest, because misused macros can easily cause severe
 memory corruption.
 \n gaiaLineSetPoint() instead will always ensure that the appropriate 
 dimensions (as declared by the Linestring object) will be correctly used.
 */
    GAIAGEO_DECLARE int gaiaLineSetPoint (gaiaLinestringPtr ln, int v,
					  double x, double y, double z,
					  double m);

/**
 Gets coordinates from a Ring's Point

 \param rng pointer to Ring object.
 \param v relative position of Point: first Point has index 0
 \param x on completion this variable will contain the Point X coordinate.
................................................................................
 \return 0 if the Geometry is empty: otherwise any other different value.

 \note an empty Geometry is a Geometry not containing any elementary
 item: i.e. no Points, no Linestrings and no Polygons at all.
 */
    GAIAGEO_DECLARE int gaiaIsEmpty (gaiaGeomCollPtr geom);

/**
 Checks for Clockwise Geometry object

 \param geom pointer to Geometry object

 \return 0 if the Geometry is not clockwise: otherwise any other different value.

 \note a Clockwise Geometry contains no Polygons, or alternatively
 contains only Clockwise Polygons.
 A Clockwise Polygon has a Clockwise exterior ring and all interior rings
 are Counter-Clockwise.
 */
    GAIAGEO_DECLARE int gaiaCheckClockwise (gaiaGeomCollPtr geom);

/**
 Checks for CounterClockwise Geometry object

 \param geom pointer to Geometry object

 \return 0 if the Geometry is not counter-clockwise: otherwise any other different value.

 \note a CounterClockwise Geometry contains no Polygons, or alternatively
 contains only CounterClockwise Polygons.
 A CounterClockwise Polygon has a CounterClockwise exterior ring and all 
 interior rings are Clockwise.
 */
    GAIAGEO_DECLARE int gaiaCheckCounterClockwise (gaiaGeomCollPtr geom);

/**
 Checks for toxic Geometry object

 \param geom pointer to Geometry object

 \return 0 if the Geometry is not toxic: otherwise any other different value.

................................................................................
/**
 Attempts to sanitize a possibly malformed Geometry object

 \param org pointer to Geometry object.

 \return the pointer to newly created Geometry: NULL on failure.

 \sa gaiaIsToxic, gaiaEnsureClosedRings, gaiaRemoveRepeatedPoints

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaSanitize()
 \n the output Geometry will surely have:
 \li no repeated Points on Linestrings or Rings (i.e. consecutive Points 
 sharing exactly the same coordinates): any repeated Point will be suppressed,
 simply leaving only the first occurrence.
 \li proper Ring closure: for sure any Ring will have exactly coinciding
 first and last Points.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSanitize (gaiaGeomCollPtr org);

/**
 Attempts to sanitize a possibly malformed Geometry object

 \param org pointer to Geometry object.

 \return the pointer to newly created Geometry: NULL on failure.

 \sa gaiaIsToxic, gaiaSanitize, gaiaRemoveRepeatedPoint

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaSanitize()
 \n the output Geometry will surely have proper Ring closure: for sure any 
 Ring will have exactly coinciding first and last Points.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaEnsureClosedRings (gaiaGeomCollPtr org);

/**
 Attempts to sanitize a possibly malformed Geometry object

 \param org pointer to Geometry object.
 \param tolerance

 \return the pointer to newly created Geometry: NULL on failure.

 \sa gaiaIsToxic, gaiaSanitizeGeometry, gaiaEnsureClosedRings

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaSanitize()
 \n the output Geometry will surely have no repeated Points on Linestrings or Rings
 or MultiPoints (i.e. consecutive Points sharing exactly the same coordinates or
 falling within the given tolerace): any repeated Point will be suppressed,
 simply leaving only the first occurrence.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaRemoveRepeatedPoints (gaiaGeomCollPtr
							      org,
							      double tolerance);

/**
 Attempts to resolve a (Multi)Linestring from a Geometry object

 \param geom pointer to Geometry object.
 \param force_multi: 0 if the returned Geometry could represent a Linestring:
 any other value if casting to MultiLinestring is required unconditionally.
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaMergeGeometries()
 \n the newly created Geometry will contain any Point, Linestring and/or
 Polygon contained in both input Geometries.\n
 not reentrant and thread unsafe.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries (gaiaGeomCollPtr
							 geom1,
							 gaiaGeomCollPtr geom2);

/**
 Merges two Geometry objects into a single one

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 pointer to first Geometry object.
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaMergeGeometries()
 \n the newly created Geometry will contain any Point, Linestring and/or
 Polygon contained in both input Geometries.\n
 reentrant and thread-safe.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries_r (const void
							   *p_cache,
							   gaiaGeomCollPtr
							   geom1,
							   gaiaGeomCollPtr
							   geom2);

/**
 Will return a new GEOMETRY (supporting M) with measures linearly
 interpolated between the start and end points.

 \param geom pointer to Geometry object of the Linestring or MultiLinestring type.
 \param m_start M start value
 \param m_end M end value

 \return the pointer to newly created Geometry: NULL on failure.

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaAddMeasure()
 \n the newly created Geometry will contain Linestrings.
 \n if the input Geometry has no M dimension it will be added, otherwise
 it will overwritten.
 \n an eventual Z will be preserved unaffected.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr
	gaiaAddMeasure (gaiaGeomCollPtr geom, double m_start, double m_end);

/**
 Will interpolate the M-value for a LinestringM at the point closest to the 
 given Point.

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param line pointer to Geometry object of the Linestring type and supporting
 the M dimension.
 \param point pointer to Geometry object of the Point type.
 \param m_value on succesfull completion this variable will contain the 
 interpolated M value

 \return 0 on failure: any other value on success.
 */
    GAIAGEO_DECLARE int
	gaiaInterpolatePoint (const void *p_cache, gaiaGeomCollPtr line,
			      gaiaGeomCollPtr point, double *m_value);

/**
 Return a GeometryCollection containing elements matching the specified range of measures

 \param geom pointer to Geometry object
 \param m_start range of measures: start value
 \param m_end range of measures: end value

................................................................................
 \n if the input Geometry contains any Polygon (or is a GeometryCollection) then
 NULL will be returned.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr
	gaiaLocateBetweenMeasures (gaiaGeomCollPtr geom, double m_start,
				   double m_end);

/**
 Checks if a Geometry object is valid Trajectory

 \param geom pointer to Geometry object

 \return 0 if false; any other value if true

 \sa gaiaTrajectoryInterpolatePoint
 
 \note a Geometry is considered to be a valid Trajectory if it contains
 a simple LINESTRING supporting M-values growing from each vertex to the next.
 */
    GAIAGEO_DECLARE int gaiaIsValidTrajectory (gaiaGeomCollPtr geom);

/**
 Attempts to interpolate a Point along a Trajectory accordingly to given M-Value

 \param geom pointer to Geometry object (expected to be a valid Trajectory)
 \param m the M-Value to be interpolated

 \return the pointer to newly created Geometry object representing a Point
 laying on the input Geometry and positioned at the given M-Value
 NULL on failure.

 \sa gaiaIsValidTrajectory, gaiaFreeGeomColl

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry returned by gaiaLineInterpolatePoint()\n
 not reentrant and thread unsafe.
 
 \note a Geometry is considered to be a valid Trajectory if it contains
 a simple LINESTRING supporting M-values growing from each vertex to the next.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr
	gaiaTrajectoryInterpolatePoint (gaiaGeomCollPtr geom, double m);

/**
 Measures the geometric length for a Linestring or Ring

 \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
 \param coords pointed to COORD mem-array
 \param vert number of Points (aka Vertices) within the COORD mem-array

................................................................................

 \param ring pointer to Ring object
 \param pt_x Point X coordinate
 \param pt_y Point Y coordinate

 \return 0 if false: any other value if true
 */
    GAIAGEO_DECLARE int gaiaIsPointOnRingSurface (gaiaRingPtr ring,
						  double pt_x, double pt_y);

/**
 Checks if a Point lays on a Polygon surface

 \param polyg pointer to Polygon object
 \param x Point X coordinate
 \param y Point Y coordinate
................................................................................
 \param geom pointer to Geometry object.
 \param shift_x X axis shift factor.
 \param shift_y Y axis shift factor.

 \sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords,
     gaiaShiftCoords3D, gaiaShiftLongitude
 */
    GAIAGEO_DECLARE void gaiaShiftCoords (gaiaGeomCollPtr geom,
					  double shift_x, double shift_y);

/**
 Shifts any coordinate within a 3D Geometry object

 \param geom pointer to Geometry object.
 \param shift_x X axis shift factor.
 \param shift_y Y axis shift factor.
................................................................................

 \param geom pointer to Geometry object.
 \param scale_x X axis scale factor.
 \param scale_y Y axis scale factor.

 \sa gaiaShiftCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords
 */
    GAIAGEO_DECLARE void gaiaScaleCoords (gaiaGeomCollPtr geom,
					  double scale_x, double scale_y);

/**
 Rotates any coordinate within a Geometry object

 \param geom pointer to Geometry object.
 \param angle rotation angle [expressed in Degrees].

................................................................................
 \n the Great Circle method is less accurate but fastest to be calculated.
 */
    GAIAGEO_DECLARE double gaiaGreatCircleDistance (double a, double b,
						    double lat1, double lon1,
						    double lat2, double lon2);

/**
 Calculates the Geodesic Distance between two Points

 \param a first geodesic parameter.
 \param b second geodesic parameter.
 \param rf third geodesic parameter.
 \param lat1 Latitude of first Point.
 \param lon1 Longitude of first Point.
 \param lat2 Latitude of second Point.
 \param lon2 Longitude of second Point.

 \return the calculated Geodesic Distance.

 \sa gaiaEllipseParams, gaiaGreatCircleDistance, gaiaGreatCircleTotalLength,
 gaiaGeodesicTotalLength, gaiaGeodesicArcLength

 \note the returned distance is expressed in Kilometers.
 \n the Geodesic method is much more accurate but slowest to be calculated.
 */
    GAIAGEO_DECLARE double gaiaGeodesicDistance (double a, double b,
						 double rf, double lat1,
						 double lon1, double lat2,
						 double lon2);

/**
 Calculates the Great Circle Total Length for a Linestring / Ring

 \param a first geodesic parameter.
 \param b second geodesic parameter.
 \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
................................................................................
 \note the returned length is expressed in Kilometers.
 \n the Great Circle method is less accurate but fastest to be calculated.
 \n \b dims, \b coords and \b vert are usually expected to correspond to
 \b DimensionModel, \b Coords and \b Points members from a gaiaLinestringStruct
 or gaiaRingStruct
 */
    GAIAGEO_DECLARE double gaiaGreatCircleTotalLength (double a, double b,
						       int dims,
						       double *coords,
						       int vert);

/**
 Calculates the Geodesic Total Length for a Linestring / Ring

 \param a first geodesic parameter.
 \param b second geodesic parameter.
................................................................................
 \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
 \param coords pointed to COORD mem-array
 \param vert number of Points (aka Vertices) within the COORD mem-array

 \return the calculated Geodesic Total Length.

 \sa gaiaEllipseParams, gaiaGreatCircleDistance, gaiaGeodesicDistance,
 gaiaGreatCircleTotalLength, gaiaGeodesicArcLength

 \note the returned length is expressed in Kilometers.
 \n the Geodesic method is much more accurate but slowest to be calculated.
 \n \b dims, \b coords and \b vert are usually expected to correspond to
 \b DimensionModel, \b Coords and \b Points members from a gaiaLinestringStruct
 or gaiaRingStruct.
 */
    GAIAGEO_DECLARE double gaiaGeodesicTotalLength (double a, double b,
						    double rf, int dims,
						    double *coords, int vert);

/**
 Convert a Length from a Measure Unit to another
................................................................................
 GAIA_KMI, GAIA_IN, GAIA_FT, GAIA_YD, GAIA_MI, GAIA_FATH, GAIC_CH, GAIA_LINK,
 GAIA_US_IN, GAIA_US_FT, GAIA_US_YD, GAIA_US_CH, GAIA_US_MI, GAIA_IND_YD,
 GAIA_IND_FT, GAIA_IND_CH
 */
    GAIAGEO_DECLARE int gaiaConvertLength (double value, int unit_from,
					   int unit_to, double *cvt);

/**
 Computes several Geodesic values based on the Distance between two Geometries

 \param db_handle handle to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param geom1 the first Geometry.
 \param geom2 the second Geometry.
 \param return_type selects wich value has be computed.
 Must be one between: GAIA_GEODESIC_ARC_LENGTH_METERS, 
 GAIA_GEODESIC_ARC_LENGTH_DEGREES, GAIA_GEODESIC_CHORD_LENGTH_METERS, 
 GAIA_GEODESIC_CHORD_LENGTH_DEGREES, GAIA_GEODESIC_CENTRAL_ANGLE_DEGREES,
 GAIA_GEODESIC_CENTRAL_ANGLE_RADIANS, GAIA_GEODESIC_ARC_AREA_METERS or
 GAIA_GEODESIC_ARC_HEIGHT_METERS.
 \param retval on completion this variable will contain the computed value.
 
 \return 0 on failure: any other value on success.
 
 \sa gaiaGeodesicDistance, gaiaGeodesicTotalLength
 
 \note Both geom1 and geom2 must share the same SRID, that is expected
 to be of the Geographic type (longitudes and latitudes).
 \n Requires to be supported by a recent version of PROJ (>= 4.9.0).
 \n If not supported by GEOS only two POINT Geometries will be accepted.
 
 */
    GAIAGEO_DECLARE int gaiaGeodesicArcLength (sqlite3 * sqlite,
					       const void *cache,
					       gaiaGeomCollPtr geom1,
					       gaiaGeomCollPtr geom2,
					       int return_type, double *retval);

/**
 Creates a Circle (Linestring) Geometry

 \param center_x center point X coordinate.
 \param center_y center point Y coordinate.
 \param radius the circle's radius.
 \param step angular distance (in degrees) between points on the circumference.
................................................................................

 \sa gaiaMakeCircle, gaiaMakeEllipse, gaiaMakeEllipticArc

 \note simply a convenience method defaulting to gaiaMakeEllipticArc
 with both axes set to radius value
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeArc (double center_x,
						 double center_y,
						 double radius, double start,
						 double stop, double step);

/**
 Creates an Elliptic Arc (Linestring) Geometry

 \param center_x center point X coordinate.
 \param center_y center point Y coordinate.
 \param x_axis the ellipses's X axis.



|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












|
<







 







|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<
|












|
<
|







 







|
|







 







|
|
>
>







 







|
|







 







|






|

<
<
|







 







|
<







 







|







 







|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<







 







|
<





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|







 







|
|







 







|
|







 







|












|




|
|
<
|







 







<
|







 







|





|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|
|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
55
56
57
58
59
60
61



























62
63
64
65
66
67
68
...
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261



















262
263
264
265
266
267
268
269
270
271
272
273
274

275
276
277
278
279
280
281
...
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373


















374
375
376
377
378
379
380
...
584
585
586
587
588
589
590
591

592
593
594
595
596
597
598
599
600
601
602
603
604
605

606
607
608
609
610
611
612
613
...
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
...
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
...
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
...
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828


829
830
831
832
833
834
835
836
...
941
942
943
944
945
946
947
948

949
950
951
952
953
954
955
...
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
...
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987






















































988
989
990
991
992
993
994
....
1033
1034
1035
1036
1037
1038
1039
1040
1041

1042
1043
1044
1045
1046
1047
1048
....
1155
1156
1157
1158
1159
1160
1161




























1162
1163
1164
1165
1166
1167
1168
....
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291




































1292
1293
1294
1295
1296
1297
1298
....
1414
1415
1416
1417
1418
1419
1420
1421

1422
1423
1424
1425
1426
1427
1428
....
1434
1435
1436
1437
1438
1439
1440
1441

1442
1443
1444
1445
1446





































1447
1448
1449
1450
1451
1452
1453
....
1462
1463
1464
1465
1466
1467
1468




































1469
1470
1471
1472
1473
1474
1475
....
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
....
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
....
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
....
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791

1792
1793
1794
1795
1796
1797
1798
1799
....
1808
1809
1810
1811
1812
1813
1814

1815
1816
1817
1818
1819
1820
1821
1822
....
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
....
1853
1854
1855
1856
1857
1858
1859
































1860
1861
1862
1863
1864
1865
1866
....
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
/*
 gg_core.h -- Gaia common support for geometries: core functions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
#define _GG_CORE_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif




























/* function prototypes */

/**
 Safely frees any dynamic memory block allocated by the library itself

 \param ptr pointer to dynamically allocated memory
................................................................................

/**
 Copies coordinates between two LINESTRING objects

 \param dst destination LINESTRING [output]
 \param src origin LINESTRING [input]

 \sa gaiaCopyLinestringCoordsReverse

 \note both LINESTRING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate 
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyLinestringCoords (gaiaLinestringPtr dst,
						   gaiaLinestringPtr src);




















/**
 Copies coordinates between two LINESTRING objects in reverse order

 \param dst destination LINESTRING [output]
 \param src origin LINESTRING [input]

 \sa gaiaCopyLinestringCoords

 \note both LINESTRING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate 
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyLinestringCoordsReverse (gaiaLinestringPtr dst,

							  gaiaLinestringPtr
							  src);

/**
 Allocates a 2D RING [XY]

 \param vert number of points [aka vertices] into the Ring
................................................................................

/**
 Copies coordinates between two RING objects

 \param dst destination RING [output]
 \param src origin RING [input]

 \sa gaiaCopyRingCoordsReverse

 \note both RING objects must have exactly the same number of points:
 if dimensions aren't the same for both objects, then the appropriate
 conversion will be silently applied.
 */
    GAIAGEO_DECLARE void gaiaCopyRingCoords (gaiaRingPtr dst, gaiaRingPtr src);



















/**
 Copies coordinates between two RING objects in reverse order

 \param dst destination RING [output]
 \param src origin RING [input]

 \sa gaiaCopyRingCoords
................................................................................
 \param x X coordinate of the Point to be created
 \param y X coordinate of the Point to be created
 \param z Z coordinate of the Point to be created

 \note ownership of the newly created POINT object belongs to the Geometry
 object.
 */
    GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYZ (gaiaGeomCollPtr p, double x,

						    double y, double z);

/**
 Creates a new 2D Point [XYM] object into a Geometry object

 \param p pointer to the Geometry object
 \param x X coordinate of the Point to be created
 \param y X coordinate of the Point to be created
 \param m M measure of the Point to be created

 \note ownership of the newly created POINT object belongs to the Geometry
 object.
 */
    GAIAGEO_DECLARE void gaiaAddPointToGeomCollXYM (gaiaGeomCollPtr p, double x,

						    double y, double m);

/**
 Creates a new 3D Point [XYZM] object into a Geometry object

 \param p pointer to the Geometry object
 \param x X coordinate of the Point to be created
 \param y X coordinate of the Point to be created
................................................................................
 \param interiors number of Interiors Rings [0, if no Interior Ring is required]

 \return the pointer to newly created Polygon: NULL on failure.

 \note ownership of the newly created Polygon object belongs to the Geometry object.
 \n the newly created Polygon will have the same dimensions as the Geometry has.
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaAddPolygonToGeomColl (gaiaGeomCollPtr p,
							     int vert,
							     int interiors);

/**
 Creates a new Polygon object into a Geometry object starting from an
 already existing Ring object

 \param p pointer to the Geometry object.
................................................................................

 \return the pointer to the newly created Polygon object: NULL on failure.

 \note ownership of the Ring object will be transferred to the
 Polygon object, and the Polygon object ownerships belongs to the Geometry object.
 \n the Polygon object will have the same dimensions as the Ring object has.
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaInsertPolygonInGeomColl (gaiaGeomCollPtr
								p,
								gaiaRingPtr
								ring);

/**
 Creates a new Interior Ring object into a Polygon object

 \param p pointer to the Polygon object.
 \param pos relative position index [first Interior Ring has index 0].
 \param vert number of points (aka vertices) into the Ring.
................................................................................

 \sa gaiaAllocPolygon, gaiaAllocPolygonXYZ, gaiaAllocPolygonXYM,
 gaiaAllocPolygonXYZM

 \note ownership of the Ring object belongs to the Polygon object.
 \n the newly created Ring will have the same dimensions the Polygon has.
 */
    GAIAGEO_DECLARE gaiaRingPtr gaiaAddInteriorRing (gaiaPolygonPtr p, int pos,
						     int vert);

/**
 Inserts an already existing Ring object into a Polygon object

 \param p pointer to the Polygon object
 \param ring pointer to the Ring object

................................................................................
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygon (gaiaPolygonPtr polyg);

/**
 Duplicates a Polygon object (special)

 \param polyg pointer to Polygon object [origin].
 \param mode one of GAIA_SAME_ORDER, GAIA_REVERSE_ORDER or GAIA_LHR_ORDER.

 \return the pointer to newly created Polygon object: NULL on failure.

 \sa gaiaClonePolygon, gaiaCloneGeomCollSpecial

 \note if GAIA_REVERSE_ORDER is specified, then any Ring into the newly created
  object will be in reverse order. If GAIA_LHR_ORDER is specified instead, any
  Exterior Ring will have clockwise orientation, and any Interior Ring will have


  counter-clockwise orientation. In any other case this function will simply 
  default to gaiaClonePolygon. 
 */
    GAIAGEO_DECLARE gaiaPolygonPtr gaiaClonePolygonSpecial (gaiaPolygonPtr
							    polyg, int mode);

/**
 Duplicates a Geometry object
................................................................................
 Duplicates a Geometry object [casting dimensions to 3D XYZ]

 \param geom pointer to Geometry object [origin].

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, 
 gaiaCastGeomCollToXYM, gaiaCastGeomCollToXYZM


 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 3D [XYZ] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZ (gaiaGeomCollPtr
							   geom);

................................................................................
 Duplicates a Geometry object [casting dimensions to 2D XYM]

 \param geom pointer to Geometry object [origin].

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
 gaiaCastGeomCollToXYZM

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 2D [XYM] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYM (gaiaGeomCollPtr
							   geom);

................................................................................
 Duplicates a Geometry object [casting dimensions to 3D XYZM]

 \param geom pointer to Geometry object [origin].

 \return the pointer to newly created Geometry object: NULL on failure.

 \sa gaiaCloneGeomColl, gaiaCastGeomCollToXY, gaiaCastGeomCollToXYZ,
 gaiaCastGeomCollToXYM

 \note the newly created object is an exact copy of the original one; except
 in that any elementary item  will be cast to 3D [XYZM] dimensions.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaCastGeomCollToXYZM (gaiaGeomCollPtr
							    geom);























































/**
 Gets coodinates from a Linestring's Point

 \param ln pointer to Linestring object.
 \param v relative position of Point: first Point has index 0
 \param x on completion this variable will contain the Point X coordinate.
 \param y on completion this variable will contain the Point Y coordinate.
................................................................................
 macros.
 \n using the gaiaLineSetPoint() function is a little bit slower but is
 intrinsically safest, because misused macros can easily cause severe
 memory corruption.
 \n gaiaLineSetPoint() instead will always ensure that the appropriate 
 dimensions (as declared by the Linestring object) will be correctly used.
 */
    GAIAGEO_DECLARE int gaiaLineSetPoint (gaiaLinestringPtr ln, int v, double x,
					  double y, double z, double m);


/**
 Gets coordinates from a Ring's Point

 \param rng pointer to Ring object.
 \param v relative position of Point: first Point has index 0
 \param x on completion this variable will contain the Point X coordinate.
................................................................................
 \return 0 if the Geometry is empty: otherwise any other different value.

 \note an empty Geometry is a Geometry not containing any elementary
 item: i.e. no Points, no Linestrings and no Polygons at all.
 */
    GAIAGEO_DECLARE int gaiaIsEmpty (gaiaGeomCollPtr geom);





























/**
 Checks for toxic Geometry object

 \param geom pointer to Geometry object

 \return 0 if the Geometry is not toxic: otherwise any other different value.

................................................................................
/**
 Attempts to sanitize a possibly malformed Geometry object

 \param org pointer to Geometry object.

 \return the pointer to newly created Geometry: NULL on failure.

 \sa gaiaIsToxic

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaSanitize()
 \n the output Geometry will surely have:
 \li no repeated Points on Linestrings or Rings (i.e. consecutive Points 
 sharing exactly the same coordinates): any repeated Point will be suppressed,
 simply leaving only the first occurrence.
 \li proper Ring closure: for sure any Ring will have exactly coinciding
 first and last Points.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaSanitize (gaiaGeomCollPtr org);






































/**
 Attempts to resolve a (Multi)Linestring from a Geometry object

 \param geom pointer to Geometry object.
 \param force_multi: 0 if the returned Geometry could represent a Linestring:
 any other value if casting to MultiLinestring is required unconditionally.
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaMergeGeometries()
 \n the newly created Geometry will contain any Point, Linestring and/or
 Polygon contained in both input Geometries.\n
 not reentrant and thread unsafe.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries (gaiaGeomCollPtr geom1,

							 gaiaGeomCollPtr geom2);

/**
 Merges two Geometry objects into a single one

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param geom1 pointer to first Geometry object.
................................................................................

 \note you are responsible to destroy (before or after) any allocated Geometry,
 this including any Geometry created by gaiaMergeGeometries()
 \n the newly created Geometry will contain any Point, Linestring and/or
 Polygon contained in both input Geometries.\n
 reentrant and thread-safe.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMergeGeometries_r (const void *p_cache,

							   gaiaGeomCollPtr
							   geom1,
							   gaiaGeomCollPtr
							   geom2);






































/**
 Return a GeometryCollection containing elements matching the specified range of measures

 \param geom pointer to Geometry object
 \param m_start range of measures: start value
 \param m_end range of measures: end value

................................................................................
 \n if the input Geometry contains any Polygon (or is a GeometryCollection) then
 NULL will be returned.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr
	gaiaLocateBetweenMeasures (gaiaGeomCollPtr geom, double m_start,
				   double m_end);





































/**
 Measures the geometric length for a Linestring or Ring

 \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
 \param coords pointed to COORD mem-array
 \param vert number of Points (aka Vertices) within the COORD mem-array

................................................................................

 \param ring pointer to Ring object
 \param pt_x Point X coordinate
 \param pt_y Point Y coordinate

 \return 0 if false: any other value if true
 */
    GAIAGEO_DECLARE int gaiaIsPointOnRingSurface (gaiaRingPtr ring, double pt_x,
						  double pt_y);

/**
 Checks if a Point lays on a Polygon surface

 \param polyg pointer to Polygon object
 \param x Point X coordinate
 \param y Point Y coordinate
................................................................................
 \param geom pointer to Geometry object.
 \param shift_x X axis shift factor.
 \param shift_y Y axis shift factor.

 \sa gaiaScaleCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords,
     gaiaShiftCoords3D, gaiaShiftLongitude
 */
    GAIAGEO_DECLARE void gaiaShiftCoords (gaiaGeomCollPtr geom, double shift_x,
					  double shift_y);

/**
 Shifts any coordinate within a 3D Geometry object

 \param geom pointer to Geometry object.
 \param shift_x X axis shift factor.
 \param shift_y Y axis shift factor.
................................................................................

 \param geom pointer to Geometry object.
 \param scale_x X axis scale factor.
 \param scale_y Y axis scale factor.

 \sa gaiaShiftCoords, gaiaRotateCoords, gaiaReflectCoords, gaiaSwapCoords
 */
    GAIAGEO_DECLARE void gaiaScaleCoords (gaiaGeomCollPtr geom, double scale_x,
					  double scale_y);

/**
 Rotates any coordinate within a Geometry object

 \param geom pointer to Geometry object.
 \param angle rotation angle [expressed in Degrees].

................................................................................
 \n the Great Circle method is less accurate but fastest to be calculated.
 */
    GAIAGEO_DECLARE double gaiaGreatCircleDistance (double a, double b,
						    double lat1, double lon1,
						    double lat2, double lon2);

/**
 Calculates the Geodesic Distance between between two Points

 \param a first geodesic parameter.
 \param b second geodesic parameter.
 \param rf third geodesic parameter.
 \param lat1 Latitude of first Point.
 \param lon1 Longitude of first Point.
 \param lat2 Latitude of second Point.
 \param lon2 Longitude of second Point.

 \return the calculated Geodesic Distance.

 \sa gaiaEllipseParams, gaiaGreatCircleDistance, gaiaGreatCircleTotalLength,
 gaiaGeodesicTotalLength

 \note the returned distance is expressed in Kilometers.
 \n the Geodesic method is much more accurate but slowest to be calculated.
 */
    GAIAGEO_DECLARE double gaiaGeodesicDistance (double a, double b, double rf,
						 double lat1, double lon1,

						 double lat2, double lon2);

/**
 Calculates the Great Circle Total Length for a Linestring / Ring

 \param a first geodesic parameter.
 \param b second geodesic parameter.
 \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
................................................................................
 \note the returned length is expressed in Kilometers.
 \n the Great Circle method is less accurate but fastest to be calculated.
 \n \b dims, \b coords and \b vert are usually expected to correspond to
 \b DimensionModel, \b Coords and \b Points members from a gaiaLinestringStruct
 or gaiaRingStruct
 */
    GAIAGEO_DECLARE double gaiaGreatCircleTotalLength (double a, double b,

						       int dims, double *coords,
						       int vert);

/**
 Calculates the Geodesic Total Length for a Linestring / Ring

 \param a first geodesic parameter.
 \param b second geodesic parameter.
................................................................................
 \param dims dimensions: one of GAIA_XY, GAIA_XY_Z, GAIA_XY_M or GAIA_XY_ZM
 \param coords pointed to COORD mem-array
 \param vert number of Points (aka Vertices) within the COORD mem-array

 \return the calculated Geodesic Total Length.

 \sa gaiaEllipseParams, gaiaGreatCircleDistance, gaiaGeodesicDistance,
 gaiaGreatCircleTotalLength

 \note the returned length is expressed in Kilometers.
 \n the Geodesic method is much more accurate but slowest to be calculated.
 \n \b dims, \b coords and \b vert are usually expected to correspond to
 \b DimensionModel, \b Coords and \b Points members from a gaiaLinestringStruct
 or gaiaRingStruct
 */
    GAIAGEO_DECLARE double gaiaGeodesicTotalLength (double a, double b,
						    double rf, int dims,
						    double *coords, int vert);

/**
 Convert a Length from a Measure Unit to another
................................................................................
 GAIA_KMI, GAIA_IN, GAIA_FT, GAIA_YD, GAIA_MI, GAIA_FATH, GAIC_CH, GAIA_LINK,
 GAIA_US_IN, GAIA_US_FT, GAIA_US_YD, GAIA_US_CH, GAIA_US_MI, GAIA_IND_YD,
 GAIA_IND_FT, GAIA_IND_CH
 */
    GAIAGEO_DECLARE int gaiaConvertLength (double value, int unit_from,
					   int unit_to, double *cvt);

































/**
 Creates a Circle (Linestring) Geometry

 \param center_x center point X coordinate.
 \param center_y center point Y coordinate.
 \param radius the circle's radius.
 \param step angular distance (in degrees) between points on the circumference.
................................................................................

 \sa gaiaMakeCircle, gaiaMakeEllipse, gaiaMakeEllipticArc

 \note simply a convenience method defaulting to gaiaMakeEllipticArc
 with both axes set to radius value
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaMakeArc (double center_x,
						 double center_y, double radius,
						 double start, double stop,
						 double step);

/**
 Creates an Elliptic Arc (Linestring) Geometry

 \param center_x center point X coordinate.
 \param center_y center point Y coordinate.
 \param x_axis the ellipses's X axis.

Changes to src/headers/spatialite/gg_dxf.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
/*
 gg_dxf.h -- Gaia common support for DXF files
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 \return 0 on failure, any other value on success

 \sa gaiaDxfWriteEntities, gaiaDxfWriteEndSection, gaiaDxfWritePoint, 
 gaiaDxfWriteLine, gaiaDxfWriteRing, gaiaDxfWriteGeometry 
 */
    GAIAGEO_DECLARE int gaiaDxfWriteText (gaiaDxfWriterPtr dxf,
					  const char *layer_name, double x,
					  double y, double z,
					  const char *label,
					  double text_height, double angle);

/**
 Writing a DXF Polyline (opened) Entity 

 \param dxf pointer to a properly initialized gaiaDxfWriter object
 \param layer_name name of the corresponding layer



|







 







|







 







|
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
896
897
898
899
900
901
902
903

904
905
906
907
908
909
910
/*
 gg_dxf.h -- Gaia common support for DXF files
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 \return 0 on failure, any other value on success

 \sa gaiaDxfWriteEntities, gaiaDxfWriteEndSection, gaiaDxfWritePoint, 
 gaiaDxfWriteLine, gaiaDxfWriteRing, gaiaDxfWriteGeometry 
 */
    GAIAGEO_DECLARE int gaiaDxfWriteText (gaiaDxfWriterPtr dxf,
					  const char *layer_name, double x,
					  double y, double z, const char *label,

					  double text_height, double angle);

/**
 Writing a DXF Polyline (opened) Entity 

 \param dxf pointer to a properly initialized gaiaDxfWriter object
 \param layer_name name of the corresponding layer

Changes to src/headers/spatialite/gg_dynamic.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
...
228
229
230
231
232
233
234
235

236

237
238
239
240
241
242
243
244
...
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
...
370
371
372
373
374
375
376
377
378

379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
/*
 gg_dynamic.h -- Gaia common support for geometries: DynamicLine functions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 \param x X coordinate of the Point
 \param y Y coordinate of the Point
 \param z Z coordinate of the Point
  
 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr
	gaiaAppendPointZToDynamicLine (gaiaDynamicLinePtr p, double x,
				       double y, double z);

/**
 Appends a new 2D Point [XYM] at the end of a dynamically growing line/ring 
 object

 \param p pointer to the dynamically growing line/ring object.
 \param x X coordinate of the Point
 \param y Y coordinate of the Point
 \param m M measure of the Point
  
 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr
	gaiaAppendPointMToDynamicLine (gaiaDynamicLinePtr p, double x,
				       double y, double m);

/**
 Appends a new 3D Point [XYZM] at the end of a dynamically growing line/ring 
 object

 \param p pointer to the dynamically growing line/ring object.
 \param x X coordinate of the Point
................................................................................
 \param x X coordinate of the Point to be appended
 \param y Y coordinate of the Point to be appended

 \sa gaiaDynamicLiceInsertBefore

 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr
	gaiaDynamicLineInsertAfter (gaiaDynamicLinePtr p, gaiaPointPtr pt,

				    double x, double y);

/**
 Appends a new 2D Point [XY] immediately before the given Point into a
 dynamically growing line/ring object

 \param p pointer to the dynamically growing line/ring object.
 \param pt pointer to the given Point.
................................................................................
 \param x X coordinate of the Point to be appended
 \param y Y coordinate of the Point to be appended

 \sa gaiaDynamicLiceInsertBeforeAfter

 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr

	gaiaDynamicLineInsertBefore (gaiaDynamicLinePtr p, gaiaPointPtr pt,

				     double x, double y);

/**
 Removes a given Point from a dynamically growing line/ring object

 \param p pointer to dynamically growing line/ring object.
 \param pt pointer to given Point.

................................................................................
 \param org pointer to dynamically growing line/ring object [origin].

 \return the pointer to newly created dynamic growing line/ring object:
 NULL on failure.

 \note the newly created object is an exact copy of the original one.
 */
    GAIAGEO_DECLARE gaiaDynamicLinePtr
	gaiaCloneDynamicLine (gaiaDynamicLinePtr org);

/**
 Duplicates and reverts a dynamically growing line/ring object

 \param org pointer to dynamically growing line/ring object [origin].

 \return the pointer to newly created dynamic growing line/ring object:
................................................................................
 \return the pointer to the corresponding Point object: NULL on failure.

 \sa gaiaDynamicLineFindByPos

 \note if the line object contains more Points sharing the same coordinates,
 a reference to the first one found will be returned.
 */
    GAIAGEO_DECLARE gaiaPointPtr
	gaiaDynamicLineFindByCoords (gaiaDynamicLinePtr p, double x, double y);


/**
 Finds a Point within a dymically growing line/ring object [by position]

 \param p pointer to dymamically line/ring object.
 \param pos relative position [first Point has index 0].

 \return the pointer to the corresponding Point object: NULL on failure.

 \sa gaiaDynamicLineFindByCoords
 */
    GAIAGEO_DECLARE gaiaPointPtr gaiaDynamicLineFindByPos (gaiaDynamicLinePtr
							   p, int pos);

/**
 Creates a new dynamicly growing line/ring object

 \param coords an array of COORDs, any dimension [XY, XYZ, XYM, XYZM]
 \param points number of points [aka vertices] into the array




|







 







|







 







|
|













|
|







 







|
|
>
|







 







|
>
|
>
|







 







|
|







 







|
|
>











|
|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
...
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
...
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
/*
 gg_dynamic.h -- Gaia common support for geometries: DynamicLine functions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 \param x X coordinate of the Point
 \param y Y coordinate of the Point
 \param z Z coordinate of the Point
  
 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr
	gaiaAppendPointZToDynamicLine (gaiaDynamicLinePtr p, double x, double y,
				       double z);

/**
 Appends a new 2D Point [XYM] at the end of a dynamically growing line/ring 
 object

 \param p pointer to the dynamically growing line/ring object.
 \param x X coordinate of the Point
 \param y Y coordinate of the Point
 \param m M measure of the Point
  
 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr
	gaiaAppendPointMToDynamicLine (gaiaDynamicLinePtr p, double x, double y,
				       double m);

/**
 Appends a new 3D Point [XYZM] at the end of a dynamically growing line/ring 
 object

 \param p pointer to the dynamically growing line/ring object.
 \param x X coordinate of the Point
................................................................................
 \param x X coordinate of the Point to be appended
 \param y Y coordinate of the Point to be appended

 \sa gaiaDynamicLiceInsertBefore

 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr gaiaDynamicLineInsertAfter (gaiaDynamicLinePtr
							     p, gaiaPointPtr pt,
							     double x,
							     double y);

/**
 Appends a new 2D Point [XY] immediately before the given Point into a
 dynamically growing line/ring object

 \param p pointer to the dynamically growing line/ring object.
 \param pt pointer to the given Point.
................................................................................
 \param x X coordinate of the Point to be appended
 \param y Y coordinate of the Point to be appended

 \sa gaiaDynamicLiceInsertBeforeAfter

 \return the pointer to newly created Point
 */
    GAIAGEO_DECLARE gaiaPointPtr gaiaDynamicLineInsertBefore (gaiaDynamicLinePtr
							      p,
							      gaiaPointPtr pt,
							      double x,
							      double y);

/**
 Removes a given Point from a dynamically growing line/ring object

 \param p pointer to dynamically growing line/ring object.
 \param pt pointer to given Point.

................................................................................
 \param org pointer to dynamically growing line/ring object [origin].

 \return the pointer to newly created dynamic growing line/ring object:
 NULL on failure.

 \note the newly created object is an exact copy of the original one.
 */
    GAIAGEO_DECLARE gaiaDynamicLinePtr gaiaCloneDynamicLine (gaiaDynamicLinePtr
							     org);

/**
 Duplicates and reverts a dynamically growing line/ring object

 \param org pointer to dynamically growing line/ring object [origin].

 \return the pointer to newly created dynamic growing line/ring object:
................................................................................
 \return the pointer to the corresponding Point object: NULL on failure.

 \sa gaiaDynamicLineFindByPos

 \note if the line object contains more Points sharing the same coordinates,
 a reference to the first one found will be returned.
 */
    GAIAGEO_DECLARE gaiaPointPtr gaiaDynamicLineFindByCoords (gaiaDynamicLinePtr
							      p, double x,
							      double y);

/**
 Finds a Point within a dymically growing line/ring object [by position]

 \param p pointer to dymamically line/ring object.
 \param pos relative position [first Point has index 0].

 \return the pointer to the corresponding Point object: NULL on failure.

 \sa gaiaDynamicLineFindByCoords
 */
    GAIAGEO_DECLARE gaiaPointPtr gaiaDynamicLineFindByPos (gaiaDynamicLinePtr p,
							   int pos);

/**
 Creates a new dynamicly growing line/ring object

 \param coords an array of COORDs, any dimension [XY, XYZ, XYM, XYZM]
 \param points number of points [aka vertices] into the array

Changes to src/headers/spatialite/gg_formats.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
...
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
...
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
...
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
...
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
....
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552

1553

1554
1555
1556
1557
1558
1559
1560
....
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
....
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739


1740
1741
1742
1743
1744
1745
1746
....
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
/*
 gg_formats.h -- Gaia common support for geometries: formats
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 \return the internal INT value 

 \sa gaiaEndianArch, gaiaExport32

 \note you are expected to pass an input buffer corresponding to an
 allocation size of (at least) 4 bytes.
 */
    GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p,
				      int little_endian,
				      int little_endian_arch);

/**
 Import an UINT-32 value in endian-aware fashion
 
 \param p endian-dependent representation (input buffer).
 \param little_endian 0 if the input buffer is big-endian: any other value
................................................................................
 the dynamically growing Text buffer will be automatically allocated
 and/or extended as required.
 */
    GAIAGEO_DECLARE void gaiaAppendToOutBuffer (gaiaOutBufferPtr buf,
						const char *text);

/**
 Creates a BLOB-Geometry representing a Point (BLOB-Geometry)

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointEx

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePoint (double x, double y, int srid,
					unsigned char **result, int *size);

/**
 Creates a BLOB-Geometry representing a PointZ (BLOB-Geometry)

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param z Point Z coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointZEx

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointZ (double x, double y, double z,
					 int srid, unsigned char **result,
					 int *size);

/**
 Creates a BLOB-Geometry representing a PointM (BLOB-Geometry)

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param m Point M coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointMEx

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointM (double x, double y, double m,
					 int srid, unsigned char **result,
					 int *size);

/**
 Creates a BLOB-Geometry representing a PointZM (BLOB-Geometry)

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param z Point Z coordinate.
 \param m Point M coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointZMEx

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointZM (double x, double y, double z,
					  double m, int srid,
					  unsigned char **result, int *size);

/**
 Creates a BLOB-Geometry representing a Point (BLOB-Geometry or BLOB-TinyPoint)

 \param tiny_point if set to TRUE the POINT Geometry will be encoded
 by using the TinyPoint BLOB format.
 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePoint

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointEx (int tiny_point, double x, double y,
					  int srid, unsigned char **result,
					  int *size);

/**
 Creates a BLOB-Geometry representing a PointZ (BLOB-Geometry or BLOB-TinyPoint)

 \param tiny_point if set to TRUE the POINT Geometry will be encoded
 by using the TinyPoint BLOB format.
 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param z Point Z coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointZ

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointZEx (int tiny_point, double x, double y,
					   double z, int srid,
					   unsigned char **result, int *size);

/**
 Creates a BLOB-Geometry representing a PointM (BLOB-Geometry or BLOB-TinyPoint)

 \param tiny_point if set to TRUE the POINT Geometry will be encoded
 by using the TinyPoint BLOB format.
 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param m Point M coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointM

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointMEx (int tiny_point, double x, double y,
					   double m, int srid,
					   unsigned char **result, int *size);

/**
 Creates a BLOB-Geometry representing a PointZM (BLOB-Geometry or BLOB-TinyPoint)

 \param tiny_point if set to TRUE the POINT Geometry will be encoded
 by using the TinyPoint BLOB format.
 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param z Point Z coordinate.
 \param m Point M coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaMakePointZM

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointZMEx (int tiny_point, double x, double y,
					    double z, double m, int srid,
					    unsigned char **result, int *size);

/**
 Creates a BLOB-Geometry representing a Segment (2-Points Linestring)

 \param geom1 pointer to first Geometry object (expected to represent a Point).
 \param geom2 pointer to second Geometry object (expected to represent a Point).
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
................................................................................
 Creates a Geometry object from the corresponding BLOB-Geometry 

 \param blob pointer to BLOB-Geometry
 \param size the BLOB's size

 \return the pointer to the newly created Geometry object: NULL on failure

 \sa gaiaFreeGeomColl, gaiaToSpatiaLiteBlobWkb, gaiaToCompressedBlobWkb,
 gaiaFromSpatiaLiteBlobWkbEx

 \note you are responsible to destroy (before or after) any allocated Geometry,
 unless you've passed ownership of the Geometry object to some further object:
 in this case destroying the higher order object will implicitly destroy any 
 contained child object. 
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobWkb (const unsigned
							       char *blob,
							       unsigned int
							       size);

/**
 Creates a Geometry object from the corresponding BLOB-Geometry 

 \param blob pointer to BLOB-Geometry
 \param size the BLOB's size
 \param gpkg_mode is set to TRUE will accept only GPKG Geometry-BLOBs
 \param gpkg_amphibious is set to TRUE will indifferenctly accept
  either SpatiaLite Geometry-BLOBs or GPKG Geometry-BLOBs

 \return the pointer to the newly created Geometry object: NULL on failure

 \sa gaiaFreeGeomColl, gaiaToSpatiaLiteBlobWkb, gaiaToCompressedBlobWkb

 \note you are responsible to destroy (before or after) any allocated Geometry,
 unless you've passed ownership of the Geometry object to some further object:
 in this case destroying the higher order object will implicitly destroy any 
 contained child object. 
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobWkbEx (const
								 unsigned char
								 *blob,
								 unsigned int
								 size,
								 int
								 gpkg_mode,
								 int
								 gpkg_amphibious);

/**
 Creates a BLOB-Geometry corresponding to a Geometry object

 \param geom pointer to the Geometry object.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)
................................................................................
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaToSpatiaLiteBlobWkb (gaiaGeomCollPtr geom,
						  unsigned char **result,
						  int *size);

/**
 Creates a BLOB-Geometry corresponding to a Geometry object

 \param geom pointer to the Geometry object.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)
 \param gpkg_mode if set to TRUE will always return GPKG Geometry-BLOBs

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaToCompressedBlobWkb,
 gaiaToSpatiaLiteBlobWkbEx2

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaToSpatiaLiteBlobWkbEx (gaiaGeomCollPtr geom,
						    unsigned char **result,
						    int *size, int gpkg_mode);

/**
 Creates a BLOB-Geometry corresponding to a Geometry object

 \param geom pointer to the Geometry object.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)
 \param gpkg_mode if set to TRUE will always return GPKG Geometry-BLOBs
 \param tiny_point if set to TRUE all POINT Geometries will be encoded
 by using the TinyPoint BLOB format.

 \sa gaiaFromSpatiaLiteBlobWkb, gaiaToCompressedBlobWkb,
 gaiaToSpatiaLiteBlobWkbEx

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaToSpatiaLiteBlobWkbEx2 (gaiaGeomCollPtr geom,
						     unsigned char **result,
						     int *size, int gpkg_mode,
						     int tiny_point);

/**
 Creates a Compressed BLOB-Geometry corresponding to a Geometry object

 \param geom pointer to the Geometry object.
 \param result on completion will containt a pointer to Compressed BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)
................................................................................

/**
 Encodes a Geometry object into WKT notation

 \param out_buf pointer to dynamically growing Text buffer
 \param geom pointer to Geometry object

 \sa gaiaParseWkt, gaiaOutWktStrict, gaiaParseEWKT, gaiaToEWKT,
 gaiaOutWktEx

 \note this function will apply 3D WKT encoding as internally intended by
 SpatiaLite: not necessarily intended by other OGC-like implementations.
 \n Anyway, 2D WKT is surely standard and safely interoperable.
 */
    GAIAGEO_DECLARE void gaiaOutWkt (gaiaOutBufferPtr out_buf,
				     gaiaGeomCollPtr geom);

/**
 Encodes a Geometry object into WKT notation

 \param out_buf pointer to dynamically growing Text buffer
 \param geom pointer to Geometry object
 \param precision decimal digits to be used for coordinates

 \sa gaiaParseWkt, gaiaOutWktStrict, gaiaParseEWKT, gaiaToEWKT

 \note this function will apply 3D WKT encoding as internally intended by
 SpatiaLite: not necessarily intended by other OGC-like implementations.
 \n Anyway, 2D WKT is surely standard and safely interoperable.
 */
    GAIAGEO_DECLARE void gaiaOutWktEx (gaiaOutBufferPtr out_buf,
				       gaiaGeomCollPtr geom, int precision);

/**
 Encodes a Geometry object into strict 2D WKT notation

 \param out_buf pointer to dynamically growing Text buffer
 \param geom pointer to Geometry object
 \param precision decimal digits to be used for coordinates

................................................................................

/**
 Encodes a WKT 3D Point [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param point pointer to Point object

 \sa gaiaOutLinestringZ, gaiaOutPolygonZ, gaiaOutPointZex
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutPointZ (gaiaOutBufferPtr out_buf,
					gaiaPointPtr point);

/**
 Encodes a WKT 3D Point [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param point pointer to Point object
 \param precision decimal digits to be used for coordinates

 \sa gaiaOutLinestringZ, gaiaOutPolygonZ
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutPointZex (gaiaOutBufferPtr out_buf,
					  gaiaPointPtr point, int precision);

/**
 Encodes a WKT 3D Linestring [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param linestring pointer to Linestring object

 \sa gaiaOutPointZ, gaiaOutPolygonZ, gaiaOutLinestringZex
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutLinestringZ (gaiaOutBufferPtr out_buf,
					     gaiaLinestringPtr linestring);

/**
 Encodes a WKT 3D Linestring [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param linestring pointer to Linestring object
 \param precision decimal digits to be used for coordinates

 \sa gaiaOutPointZ, gaiaOutPolygonZ
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutLinestringZex (gaiaOutBufferPtr out_buf,
					       gaiaLinestringPtr linestring,
					       int precision);

/**
 Encodes a WKT 3D Polygon [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param polygon pointer to Point object

 \sa gaiaOutPointZ, gaiaOutLinestringZ, gaiaOutPolygonZex
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutPolygonZ (gaiaOutBufferPtr out_buf,
					  gaiaPolygonPtr polygon);

/**
 Encodes a WKT 3D Polygon [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param polygon pointer to Point object
 \param precision decimal digits to be used for coordinates

 \sa gaiaOutPointZ, gaiaOutLinestringZ
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutPolygonZex (gaiaOutBufferPtr out_buf,
					    gaiaPolygonPtr polygon,
					    int precision);

/**
 Creates a Geometry object from KML notation

 \param in_buffer pointer to KML buffer

 \return the pointer to the newly created Geometry object: NULL on failure

................................................................................
 */
    GAIAGEO_DECLARE void gaiaOpenShpRead (gaiaShapefilePtr shp,
					  const char *path,
					  const char *charFrom,
					  const char *charTo);

/**
 Open a Shapefile in write mode - extended

 \param shp pointer to the Shapefile object.
 \param path \e abstract pathname to the corresponding file-system files.
 \param shape the SHAPE code; expected to be one of GAIA_SHP_POINT,
 GAIA_SHP_POLYLINE, GAIA_SHP_POLYGON, GAIA_SHP_MULTIPOINT, GAIA_SHP_POINTZ,
 GAIA_SHP_POLYLINEZ, GAIA_SHP_POLYGONZ, GAIA_SHP_MULTIPOINTZ, 
 GAIA_SHP_POINTM, GAIA_SHP_POLYLINEM, GAIA_SHP_POLYGONM, GAIA_SHP_MULTIPOINTM
 \param list pointer to DBF List object representing the corresponding
 data attributes.
 \param charFrom GNU ICONV name identifying the input charset encoding.
 \param charTo GNU ICONV name identifying the output charset encoding.
 \param colname_case one between GAIA_DBF_COLNAME_LOWERCASE, 
	GAIA_DBF_COLNAME_UPPERCASE or GAIA_DBF_COLNAME_CASE_IGNORE.

 \sa gaiaAllocShapefile, gaiaFreeShapefile, gaiaOpenShpRead, 
 gaiaReadShpEntity, gaiaShpAnalyze, gaiaWriteShpEntity, gaiaFlushShpHeaders,
 gaiaOpenShpWrite
 
 \note on failure the object member \e Valid will be set to 0; and the
 object member \e LastError will contain the appropriate error message.
 \n the \e abstract pathname should not contain any suffix at all.
 */
    GAIAGEO_DECLARE void gaiaOpenShpWriteEx (gaiaShapefilePtr shp,
					     const char *path, int shape,
					     gaiaDbfListPtr list,
					     const char *charFrom,
					     const char *charTo,
					     int colname_case);

/**
 Open a Shapefile in write mode

 \param shp pointer to the Shapefile object.
 \param path \e abstract pathname to the corresponding file-system files.
 \param shape the SHAPE code; expected to be one of GAIA_SHP_POINT,
 GAIA_SHP_POLYLINE, GAIA_SHP_POLYGON, GAIA_SHP_MULTIPOINT, GAIA_SHP_POINTZ,
 GAIA_SHP_POLYLINEZ, GAIA_SHP_POLYGONZ, GAIA_SHP_MULTIPOINTZ, 
 GAIA_SHP_POINTM, GAIA_SHP_POLYLINEM, GAIA_SHP_POLYGONM, GAIA_SHP_MULTIPOINTM
 \param list pointer to DBF List object representing the corresponding
 data attributes.
 \param charFrom GNU ICONV name identifying the input charset encoding.
 \param charTo GNU ICONV name identifying the output charset encoding.

 \sa gaiaAllocShapefile, gaiaFreeShapefile, gaiaOpenShpRead, 
 gaiaReadShpEntity, gaiaShpAnalyze, gaiaWriteShpEntity, gaiaFlushShpHeaders,
 gaiaOpenShpWriteEx
 

 \note simply calls gaiaOpenShpWriteEx() by specifying GAIA_DBF_COLNAME_LOWERCASE

 */
    GAIAGEO_DECLARE void gaiaOpenShpWrite (gaiaShapefilePtr shp,
					   const char *path, int shape,
					   gaiaDbfListPtr list,
					   const char *charFrom,
					   const char *charTo);

................................................................................
 Reads a feature from a Shapefile object

 \param shp pointer to the Shapefile object.
 \param current_row the row number identifying the feature to be read.
 \param srid feature's SRID 

 \return 0 on failure: any other value on success.
 -1 when the corresponding DBF record is marked as DELETED.

 \sa gaiaAllocShapefile, gaiaFreeShapefile, gaiaOpenShpRead, gaiaOpenShpWrite,
 gaiaShpAnalyze, gaiaWriteShpEntity, gaiaFlushShpHeaders

 \note on completion the Shapefile's \e Dbf member will contain the feature
 read:
 \li the \e Dbf->Geometry member will contain the corresponding Geometry
................................................................................
 object member \e LastError will contain the appropriate error message.
 */
    GAIAGEO_DECLARE void gaiaOpenDbfRead (gaiaDbfPtr dbf,
					  const char *path,
					  const char *charFrom,
					  const char *charTo);

/** 
 Open a DBF File in write mode,- extended

 \param dbf pointer to the DBF File object.
 \param path pathname to the corresponding file-system file.
 \param charFrom GNU ICONV name identifying the input charset encoding.
 \param charTo GNU ICONV name identifying the output charset encoding.
 \param colname_case one between GAIA_DBF_COLNAME_LOWERCASE, 
	GAIA_DBF_COLNAME_UPPERCASE or GAIA_DBF_COLNAME_CASE_IGNORE.

 \sa gaiaAllocDbf, gaiaFreeDbf, gaiaOpenDbfRead, 
 gaiaReadDbfEntity, gaiaWriteDbfEntity, gaiaFlushDbfHeader,
 gaiaOpenDbfWrite
 
 \note on failure the object member \e Valid will be set to 0; and the
 object member \e LastError will contain the appropriate error message.
 */
    GAIAGEO_DECLARE void gaiaOpenDbfWriteEx (gaiaDbfPtr dbf,
					     const char *path,
					     const char *charFrom,
					     const char *charTo,
					     int colname_case);

/** 
 Open a DBF File in write mode

 \param dbf pointer to the DBF File object.
 \param path pathname to the corresponding file-system file.
 \param charFrom GNU ICONV name identifying the input charset encoding.
 \param charTo GNU ICONV name identifying the output charset encoding.

 \sa gaiaAllocDbf, gaiaFreeDbf, gaiaOpenDbfRead, 
 gaiaReadDbfEntity, gaiaWriteDbfEntity, gaiaFlushDbfHeader, 
 gaiaOpenDbfWriteEx
 
 
 \note simply calls gaiaOpenDbfWriteEx() by specifying GAIA_DBF_COLNAME_LOWERCASE


 */
    GAIAGEO_DECLARE void gaiaOpenDbfWrite (gaiaDbfPtr dbf,
					   const char *path,
					   const char *charFrom,
					   const char *charTo);

/**
................................................................................
 \sa gaiaTextReaderDestroy, gaiaTextReaderParse,
 gaiaTextReaderGetRow, gaiaTextReaderFetchField

 \note you are responsible to destroy (before or after) any allocated Text
 Reader object.
 */
    GAIAGEO_DECLARE gaiaTextReaderPtr gaiaTextReaderAlloc (const char *path,
							   char
							   field_separator,
							   char
							   text_separator,
							   char
							   decimal_separator,
							   int
							   first_line_titles,
							   const char
							   *encoding);




|







 







|







 







|
<







 







|








|









|









|





|
|
<


|









|





|
|
<


|










|









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|






<
<
<
<
<
<
<
<
<
<
<
<
<
<






|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|













|
<

>
|
>







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|
<

<
<
>
>







 







<
|
<
|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
...
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419




























































































420
421
422
423
424
425
426
...
440
441
442
443
444
445
446
447

448
449
450
451
452
453
454
455
456
457
458




























459
460
461
462
463
464
465
...
470
471
472
473
474
475
476











































477
478
479
480
481
482
483
...
746
747
748
749
750
751
752
753

754
755
756
757
758
759
760
761
















762
763
764
765
766
767
768
...
807
808
809
810
811
812
813
814
815
816
817
818
819
820














821
822
823
824
825
826
827
828
829
830
831
832
833















834
835
836
837
838
839
840
841
842
843
844
845
















846
847
848
849
850
851
852
....
1269
1270
1271
1272
1273
1274
1275































1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290

1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
....
1303
1304
1305
1306
1307
1308
1309

1310
1311
1312
1313
1314
1315
1316
....
1436
1437
1438
1439
1440
1441
1442























1443
1444
1445
1446
1447
1448
1449
1450
1451
1452

1453


1454
1455
1456
1457
1458
1459
1460
1461
1462
....
1559
1560
1561
1562
1563
1564
1565

1566

1567
1568
1569
1570
1571
1572
1573
1574
/*
 gg_formats.h -- Gaia common support for geometries: formats
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Klaus Foerster klaus.foerster@svg.cc

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 \return the internal INT value 

 \sa gaiaEndianArch, gaiaExport32

 \note you are expected to pass an input buffer corresponding to an
 allocation size of (at least) 4 bytes.
 */
    GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p, int little_endian,

				      int little_endian_arch);

/**
 Import an UINT-32 value in endian-aware fashion
 
 \param p endian-dependent representation (input buffer).
 \param little_endian 0 if the input buffer is big-endian: any other value
................................................................................
 the dynamically growing Text buffer will be automatically allocated
 and/or extended as required.
 */
    GAIAGEO_DECLARE void gaiaAppendToOutBuffer (gaiaOutBufferPtr buf,
						const char *text);

/**
 Creates a BLOB-Geometry representing a Point

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePoint (double x, double y, int srid,
					unsigned char **result, int *size);

/**
 Creates a BLOB-Geometry representing a PointZ

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param z Point Z coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointZ (double x, double y, double z, int srid,
					 unsigned char **result, int *size);


/**
 Creates a BLOB-Geometry representing a PointM

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param m Point M coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointM (double x, double y, double m, int srid,
					 unsigned char **result, int *size);


/**
 Creates a BLOB-Geometry representing a PointZM

 \param x Point X coordinate.
 \param y Point Y coordinate.
 \param z Point Z coordinate.
 \param m Point M coordinate.
 \param srid the SRID to be set for the Point.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)

 \sa gaiaFromSpatiaLiteBlobWkb

 \note the BLOB buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaMakePointZM (double x, double y, double z,
					  double m, int srid,
					  unsigned char **result, int *size);





























































































/**
 Creates a BLOB-Geometry representing a Segment (2-Points Linestring)

 \param geom1 pointer to first Geometry object (expected to represent a Point).
 \param geom2 pointer to second Geometry object (expected to represent a Point).
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
................................................................................
 Creates a Geometry object from the corresponding BLOB-Geometry 

 \param blob pointer to BLOB-Geometry
 \param size the BLOB's size

 \return the pointer to the newly created Geometry object: NULL on failure

 \sa gaiaFreeGeomColl, gaiaToSpatiaLiteBlobWkb, gaiaToCompressedBlobWkb


 \note you are responsible to destroy (before or after) any allocated Geometry,
 unless you've passed ownership of the Geometry object to some further object:
 in this case destroying the higher order object will implicitly destroy any 
 contained child object. 
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobWkb (const unsigned
							       char *blob,
							       unsigned int
							       size);





























/**
 Creates a BLOB-Geometry corresponding to a Geometry object

 \param geom pointer to the Geometry object.
 \param result on completion will containt a pointer to BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)
................................................................................
 so you are responsible to free() it [unless SQLite will take care
 of memory cleanup via buffer binding].
 */
    GAIAGEO_DECLARE void gaiaToSpatiaLiteBlobWkb (gaiaGeomCollPtr geom,
						  unsigned char **result,
						  int *size);












































/**
 Creates a Compressed BLOB-Geometry corresponding to a Geometry object

 \param geom pointer to the Geometry object.
 \param result on completion will containt a pointer to Compressed BLOB-Geometry:
 NULL on failure.
 \param size on completion this variable will contain the BLOB's size (in bytes)
................................................................................

/**
 Encodes a Geometry object into WKT notation

 \param out_buf pointer to dynamically growing Text buffer
 \param geom pointer to Geometry object

 \sa gaiaParseWkt, gaiaOutWktStrict, gaiaParseEWKT, gaiaToEWKT


 \note this function will apply 3D WKT encoding as internally intended by
 SpatiaLite: not necessarily intended by other OGC-like implementations.
 \n Anyway, 2D WKT is surely standard and safely interoperable.
 */
    GAIAGEO_DECLARE void gaiaOutWkt (gaiaOutBufferPtr out_buf,
				     gaiaGeomCollPtr geom);

















/**
 Encodes a Geometry object into strict 2D WKT notation

 \param out_buf pointer to dynamically growing Text buffer
 \param geom pointer to Geometry object
 \param precision decimal digits to be used for coordinates

................................................................................

/**
 Encodes a WKT 3D Point [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param point pointer to Point object

 \sa gaiaOutLinestringZ, gaiaOutPolygonZ
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutPointZ (gaiaOutBufferPtr out_buf,
					gaiaPointPtr point);















/**
 Encodes a WKT 3D Linestring [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param linestring pointer to Linestring object

 \sa gaiaOutPointZ, gaiaOutPolygonZ
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutLinestringZ (gaiaOutBufferPtr out_buf,
					     gaiaLinestringPtr linestring);
















/**
 Encodes a WKT 3D Polygon [XYZ]

 \param out_buf pointer to dynamically growing Text buffer
 \param polygon pointer to Point object

 \sa gaiaOutPointZ, gaiaOutLinestringZ
 
 \remark mainly intended for internal usage.
 */
    GAIAGEO_DECLARE void gaiaOutPolygonZ (gaiaOutBufferPtr out_buf,
					  gaiaPolygonPtr polygon);
















/**
 Creates a Geometry object from KML notation

 \param in_buffer pointer to KML buffer

 \return the pointer to the newly created Geometry object: NULL on failure

................................................................................
 */
    GAIAGEO_DECLARE void gaiaOpenShpRead (gaiaShapefilePtr shp,
					  const char *path,
					  const char *charFrom,
					  const char *charTo);

/**































 Open a Shapefile in read mode

 \param shp pointer to the Shapefile object.
 \param path \e abstract pathname to the corresponding file-system files.
 \param shape the SHAPE code; expected to be one of GAIA_SHP_POINT,
 GAIA_SHP_POLYLINE, GAIA_SHP_POLYGON, GAIA_SHP_MULTIPOINT, GAIA_SHP_POINTZ,
 GAIA_SHP_POLYLINEZ, GAIA_SHP_POLYGONZ, GAIA_SHP_MULTIPOINTZ, 
 GAIA_SHP_POINTM, GAIA_SHP_POLYLINEM, GAIA_SHP_POLYGONM, GAIA_SHP_MULTIPOINTM
 \param list pointer to DBF List object representing the corresponding
 data attributes.
 \param charFrom GNU ICONV name identifying the input charset encoding.
 \param charTo GNU ICONV name identifying the output charset encoding.

 \sa gaiaAllocShapefile, gaiaFreeShapefile, gaiaOpenShpRead, 
 gaiaReadShpEntity, gaiaShpAnalyze, gaiaWriteShpEntity, gaiaFlushShpHeaders

 
 \note on failure the object member \e Valid will be set to 0; and the
 object member \e LastError will contain the appropriate error message.
 \n the \e abstract pathname should not contain any suffix at all.
 */
    GAIAGEO_DECLARE void gaiaOpenShpWrite (gaiaShapefilePtr shp,
					   const char *path, int shape,
					   gaiaDbfListPtr list,
					   const char *charFrom,
					   const char *charTo);

................................................................................
 Reads a feature from a Shapefile object

 \param shp pointer to the Shapefile object.
 \param current_row the row number identifying the feature to be read.
 \param srid feature's SRID 

 \return 0 on failure: any other value on success.


 \sa gaiaAllocShapefile, gaiaFreeShapefile, gaiaOpenShpRead, gaiaOpenShpWrite,
 gaiaShpAnalyze, gaiaWriteShpEntity, gaiaFlushShpHeaders

 \note on completion the Shapefile's \e Dbf member will contain the feature
 read:
 \li the \e Dbf->Geometry member will contain the corresponding Geometry
................................................................................
 object member \e LastError will contain the appropriate error message.
 */
    GAIAGEO_DECLARE void gaiaOpenDbfRead (gaiaDbfPtr dbf,
					  const char *path,
					  const char *charFrom,
					  const char *charTo);
























/** 
 Open a DBF File in write mode

 \param dbf pointer to the DBF File object.
 \param path pathname to the corresponding file-system file.
 \param charFrom GNU ICONV name identifying the input charset encoding.
 \param charTo GNU ICONV name identifying the output charset encoding.

 \sa gaiaAllocDbf, gaiaFreeDbf, gaiaOpenDbfRead, 
 gaiaReadDbfEntity, gaiaWriteDbfEntity, gaiaFlushDbfHeader

 


 \note on failure the object member \e Valid will be set to 0; and the
 object member \e LastError will contain the appropriate error message.
 */
    GAIAGEO_DECLARE void gaiaOpenDbfWrite (gaiaDbfPtr dbf,
					   const char *path,
					   const char *charFrom,
					   const char *charTo);

/**
................................................................................
 \sa gaiaTextReaderDestroy, gaiaTextReaderParse,
 gaiaTextReaderGetRow, gaiaTextReaderFetchField

 \note you are responsible to destroy (before or after) any allocated Text
 Reader object.
 */
    GAIAGEO_DECLARE gaiaTextReaderPtr gaiaTextReaderAlloc (const char *path,

							   char field_separator,

							   char text_separator,
							   char
							   decimal_separator,
							   int
							   first_line_titles,
							   const char
							   *encoding);

Changes to src/headers/spatialite/gg_mbr.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
...
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
...
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
/*
 gg_mbr.h -- Gaia common support for geometries: MBR functions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 bytes)

 \sa gaiaBuildMbr

 \note the \e circle of givern \e radius and \e centre will be used so to
 determine the corresponding \e square Envelope
 */
    GAIAGEO_DECLARE void gaiaBuildCircleMbr (double x, double y,
					     double radius, int srid,
					     unsigned char **result, int *size);

/**
 Creates a BLOB-FilterMBR

 \param x1 first X coordinate.
 \param y1 first Y coordinate.
 \param x2 second X coordinate.
................................................................................

 \param geom pointer to the Geometry object
 \param min on completion this variable will contain the min Z value found
 \param max on completion this variable will contain the max Z value found

 \note if the Geometry has XY or XYM dims, the Z-Range is meaningless
 */
    GAIAGEO_DECLARE void gaiaZRangeGeometry (gaiaGeomCollPtr geom,
					     double *min, double *max);

/**
 Computes the M-Range for a Linestring object

 \param line pointer to the Linestring object
 \param min on completion this variable will contain the min M value found
 \param max on completion this variable will contain the max M value found
................................................................................

 \param geom pointer to the Geometry object
 \param min on completion this variable will contain the min M value found
 \param max on completion this variable will contain the max M value found

 \note if the Geometry has XY or XYZ dims, the M-Range is meaningless
 */
    GAIAGEO_DECLARE void gaiaMRangeGeometry (gaiaGeomCollPtr geom,
					     double *min, double *max);


#ifdef __cplusplus
}
#endif

#endif				/* _GG_MBR_H */



|







 







|







 







|
|
|







 







|
|







 







|
|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
...
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
...
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
/*
 gg_mbr.h -- Gaia common support for geometries: MBR functions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
 bytes)

 \sa gaiaBuildMbr

 \note the \e circle of givern \e radius and \e centre will be used so to
 determine the corresponding \e square Envelope
 */
    GAIAGEO_DECLARE void gaiaBuildCircleMbr (double x, double y, double radius,
					     int srid, unsigned char **result,
					     int *size);

/**
 Creates a BLOB-FilterMBR

 \param x1 first X coordinate.
 \param y1 first Y coordinate.
 \param x2 second X coordinate.
................................................................................

 \param geom pointer to the Geometry object
 \param min on completion this variable will contain the min Z value found
 \param max on completion this variable will contain the max Z value found

 \note if the Geometry has XY or XYM dims, the Z-Range is meaningless
 */
    GAIAGEO_DECLARE void gaiaZRangeGeometry (gaiaGeomCollPtr geom, double *min,
					     double *max);

/**
 Computes the M-Range for a Linestring object

 \param line pointer to the Linestring object
 \param min on completion this variable will contain the min M value found
 \param max on completion this variable will contain the max M value found
................................................................................

 \param geom pointer to the Geometry object
 \param min on completion this variable will contain the min M value found
 \param max on completion this variable will contain the max M value found

 \note if the Geometry has XY or XYZ dims, the M-Range is meaningless
 */
    GAIAGEO_DECLARE void gaiaMRangeGeometry (gaiaGeomCollPtr geom, double *min,
					     double *max);


#ifdef __cplusplus
}
#endif

#endif				/* _GG_MBR_H */

Deleted src/headers/spatialite/gg_sequence.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
 gg_sequence.h -- Gaia support for Spatialite's own Sequence
  
 version 4.4, 2016 August 12

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/


/**
 \file gg_sequence.h

 Spatialite's own Sequence
 */

#ifndef DOXYGEN_SHOULD_SKIP_THIS
/* stdio.h included for FILE objects. */
#include <stdio.h>
#ifdef DLL_EXPORT
#define GAIASEQ_DECLARE __declspec(dllexport)
#else
#define GAIASEQ_DECLARE extern
#endif
#endif

#ifndef _GG_SEQUENCE_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GG_SEQUENCE_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/** 
 Typedef for Spatialite's own Sequence
 */
    typedef struct gaia_sequence
    {
/** name of the Sequence; NULL for the generic unnamed Sequence */
	char *seq_name;
/** current value */
	int value;
/** pointer to next Sequence (linked list) */
	struct gaia_sequence *next;
    } gaiaSequence;

/**
 Typedef for Spatialite's own Sequence
 */
    typedef gaiaSequence *gaiaSequencePtr;
/**
/ Creates a new SpatiaLite's own Sequence or retrieves an already
  existing Sequence of the same name

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param seq_name name of the Sequence (may be NULL)
  
 \return a pointer to the Sequence or NULL on failure
  
 \sa gaiaFindSequence(), gaiaLastUsedSequence(), gaiaSequenceNext(),
 gaiaResetSequence()
  */
    GAIASEQ_DECLARE gaiaSequencePtr gaiaCreateSequence (const void *p_cache,
							const char *seq_name);

/**
/ Finds an existing SpatiaLite's own Sequence

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param seq_name name of the Sequence (may be NULL)
  
 \return a pointer to the Sequence or NULL on failure
  
 \sa gaiaCreateSequence(), gaiaLastUsedSequence(), gaiaSequenceNext(),
 gaiaResetSequence()
  */
    GAIASEQ_DECLARE gaiaSequencePtr gaiaFindSequence (const void *p_cache,
						      const char *seq_name);

/**
/ Finds an existing SpatiaLite's own Sequence

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param last_value on sucess will contain the most recently used Sequence value
  
 \return ZERO on failure, any other value on success.
  
 \sa gaiaCreateSequence(), gaiaLastUsedSequence(), gaiaSequenceNext(),
 gaiaResetSequence()
  */
    GAIASEQ_DECLARE int gaiaLastUsedSequence (const void *p_cache,
					      int *last_value);

/**
/ Increases by 1 the value of some SpatiaLite's own Sequence

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param sequence a memory pointer returned by gaiaFindSequence() or
 gaiaFindCreateSequence()
 \param value new value to be set for the given Sequence
  
 \return ZERO on failure, any other value on success.
  
 \sa gaiaFindSequence(), gaiaCreateSequence(), gaiaLastUsedSequence(),
 gaiaResetSequence()
   
 \note this method will reset an existing Sequence. The initial 
 value will be increased by the next call to gaiaSequenceNext()
  */
    GAIASEQ_DECLARE int gaiaSequenceNext (const void *p_cache,
					  gaiaSequencePtr sequence);

/**
/ Resets a SpatiaLite's own Sequence

 \param sequence a memory pointer returned by gaiaFindSequence() or
 gaiaCreateSequence()
 \param value new value to be set for the given Sequence
  
 \return ZERO on failure, any other value on success.
  
 \sa gaiaFindSequence(), gaiaCreateSequence(), gaiaSequenceNext(),
 gaiaLastUsedSequence()
   
 \note this method will reset an existing Sequence. The initial 
 value will be increased by the next call to gaiaSequenceNext()
 */
    GAIASEQ_DECLARE int gaiaResetSequence (gaiaSequencePtr sequence, int value);

#ifdef __cplusplus
}
#endif

#endif				/* _GG_SEQUENCE_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































Changes to src/headers/spatialite/gg_structs.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
...
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
...
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
/*
 gg_structs.h -- Gaia common support for geometries: structures
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
#include <sys/types.h>

#ifdef __cplusplus
extern "C"
{
#endif

/* supporting files bigger than 2 GB */
#ifdef _WIN32			/* windows */
#define gaia_off_t	__int64
#define gaia_fseek	_fseeki64
#else /* not windows */
#define gaia_off_t	off_t
#define gaia_fseek	fseeko
#endif

/**
 Container for OGC POINT Geometry
 */
    typedef struct gaiaPointStruct
    {
/* an OpenGis POINT */
/** X coordinate */
................................................................................
/**
 Container for Virtual Text record (line)
 */
    struct vrttxt_line
    {
/* a struct representing a full LINE (aka Record) */
/** current offset (parsing) */
	gaia_off_t offset;
/** line length (in bytes) */
	int len;
/** array of field offsets (where each field starts) */
	int field_offsets[VRTTXT_FIELDS_MAX];
/** number of field into the record */
	int num_fields;
/** validity flag */
................................................................................
 */
    struct vrttxt_row
    {
/* a struct storing Row offsets */
/** Line Number */
	int line_no;
/** start offset */
	gaia_off_t offset;
/** record (line) length (in bytes) */
	int len;
/** number of fields into this record */
	int num_fields;
    };

/**
................................................................................
 */
    typedef struct gaiaLayerAuthInfos
    {
/** Read-Only layer: TRUE or FALSE */
	int IsReadOnly;
/** Hidden layer: TRUE or FALSE */
	int IsHidden;
/** Flag indicating if the Capabilities of the SpatialView supports Inserting: TRUE or FALSE */
	int HasTriggerInsert;
/** Flag indicating if the Capabilities of the SpatialView supports Updating: TRUE or FALSE */
	int HasTriggerUpdate;
/** Flag indicating if the Capabilities of the SpatialView supports Deleting: TRUE or FALSE */
	int HasTriggerDelete;
    } gaiaLayerAuth;

/**
 Typedef for Layer Auth infos

 \sa gaiaLayerAuth
 */



|







 







|







 







<
<
<
<
<
<
<
<
<







 







|







 







|







 







<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
58
59
60
61
62
63
64









65
66
67
68
69
70
71
...
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
...
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
...
648
649
650
651
652
653
654






655
656
657
658
659
660
661
/*
 gg_structs.h -- Gaia common support for geometries: structures
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
#include <sys/types.h>

#ifdef __cplusplus
extern "C"
{
#endif










/**
 Container for OGC POINT Geometry
 */
    typedef struct gaiaPointStruct
    {
/* an OpenGis POINT */
/** X coordinate */
................................................................................
/**
 Container for Virtual Text record (line)
 */
    struct vrttxt_line
    {
/* a struct representing a full LINE (aka Record) */
/** current offset (parsing) */
	off_t offset;
/** line length (in bytes) */
	int len;
/** array of field offsets (where each field starts) */
	int field_offsets[VRTTXT_FIELDS_MAX];
/** number of field into the record */
	int num_fields;
/** validity flag */
................................................................................
 */
    struct vrttxt_row
    {
/* a struct storing Row offsets */
/** Line Number */
	int line_no;
/** start offset */
	off_t offset;
/** record (line) length (in bytes) */
	int len;
/** number of fields into this record */
	int num_fields;
    };

/**
................................................................................
 */
    typedef struct gaiaLayerAuthInfos
    {
/** Read-Only layer: TRUE or FALSE */
	int IsReadOnly;
/** Hidden layer: TRUE or FALSE */
	int IsHidden;






    } gaiaLayerAuth;

/**
 Typedef for Layer Auth infos

 \sa gaiaLayerAuth
 */

Changes to src/headers/spatialite/gg_wfs.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
...
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
...
538
539
540
541
542
543
544
545
546

547
548
549
550
551
552
553
...
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
/*
 gg_wfs.h -- Gaia common support for WFS
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 by invoking free()
 \n please note: this one simply is a convenience method, and exactly corresponds
 to load_from_wfs_paged() setting a negative page size. 
 */
    SPATIALITE_DECLARE int load_from_wfs (sqlite3 * sqlite,
					  const char *path_or_url,
					  const char *alt_describe_uri,
					  const char *layer_name,
					  int swap_axes, const char *table,
					  const char *pk_column_name,
					  int spatial_index, int *rows,
					  char **err_msg,
					  void (*progress_callback) (int,
								     void *),
					  void *callback_ptr);

................................................................................
 \param rows on completion will contain the total number of actually imported rows
 \param err_msg on completion will contain an error message (if any)
 \param progress_callback pointer to a callback function to be invoked immediately
 after processing each WFS page (could be NULL)
 \param callback_ptr an arbitrary pointer (to be passed as the second argument
 by the callback function).
 
 \sa create_wfs_catalog, load_from_wfs, reset_wfs_http_connection,
 load_from_wfs_paged_ex

 \return 0 on failure, any other value on success
 
 \note an eventual error message returned via err_msg requires to be deallocated
 by invoking free()

 \note the progress_callback function must have this signature: 
 \b void \b myfunct(\b int \b count, \b void \b *ptr);
 \n and will cyclically report how many features have been processed since the initial call start.
 
 \note this function is now deprecated and simply defaults to a call to
 load_from_wfs_paged_ex assuming WFS version 1.1.0
 */
    SPATIALITE_DECLARE int load_from_wfs_paged (sqlite3 * sqlite,
						const char *path_or_url,
						const char *alt_describe_uri,
						const char *layer_name,
						int swap_axes,
						const char *table,
						const char *pk_column_name,
						int spatial_index,
						int page_size, int *rows,
						char **err_msg,
						void (*progress_callback)
						(int, void *),
						void *callback_ptr);

/**
 Loads data from some WFS source (using WFS paging) - Extended

 \param sqlite handle to current DB connection
 \param wfs_version one of "1.0.0", "1.1.0", "2.0.0" or "2.0.2"
 \param path_or_url pointer to some WFS-GetFeature XML Document (could be a pathname or an URL).
 \param alt_describe_uri an alternative URI for DescribeFeatureType to be used
 if no one is found within the XML document returned by GetFeature.
 \param layer_name the name of the WFS layer.
 \param swap_axes if TRUE the X and Y axes will be swapped 
 \param table the name of the table to be created
 \param pk_column name of the Primary Key column; if NULL or mismatching
 then "PK_UID" will be assumed by default.
 \param spatial_index if TRUE an R*Tree Spatial Index will be created
 \param page_size max number of features for each single WFS call; if zero or
 negative a single monolithic page is assumed (i.e. paging will not be applied).
 \param rows on completion will contain the total number of actually imported rows
 \param err_msg on completion will contain an error message (if any)
 \param progress_callback pointer to a callback function to be invoked immediately
 after processing each WFS page (could be NULL)
 \param callback_ptr an arbitrary pointer (to be passed as the second argument
 by the callback function).
 
 \sa create_wfs_catalog, load_from_wfs, reset_wfs_http_connection

 \return 0 on failure, any other value on success
 
 \note an eventual error message returned via err_msg requires to be deallocated
 by invoking free()

 \note the progress_callback function must have this signature: 
 \b void \b myfunct(\b int \b count, \b void \b *ptr);
 \n and will cyclically report how many features have been processed since the initial call start.
 */
    SPATIALITE_DECLARE int load_from_wfs_paged_ex(sqlite3 * sqlite, const char *wfs_version,
						const char *path_or_url,
						const char *alt_describe_uri,
						const char *layer_name,
						int swap_axes,
						const char *table,
						const char *pk_column_name,
						int spatial_index,
						int page_size, int *rows,
						char **err_msg,
						void (*progress_callback)
						(int, void *),
						void *callback_ptr);

/**
 Creates a Catalog for some WFS service 

 \param path_or_url pointer to some WFS-GetCapabilities XML Document (could be a pathname or an URL). 
 \param err_msg on completion will contain an error message (if any)
................................................................................
 \param handle the pointer to a valid WFS-Item returned by a previous call
 to get_wfs_catalog_item().

 \return the base URL for any WFS-DescribeFeatureType call: NULL is undefined
 
 \sa create_wfs_catalog, get_wfs_base_request_url, get_wfs_describe_url
 */
    SPATIALITE_DECLARE const char
	*get_wfs_base_describe_url (gaiaWFScatalogPtr handle);

/**
 Return a GetFeature URL (GET)

 \param handle the pointer to a valid WFS-Item returned by a previous call
 to get_wfs_catalog_item().
 \param name the NAME uniquely identifying the required WFS layer.
................................................................................

 \return the pointer to the required WFS-Column object: NULL if the passed index
 isn't valid
 
 \sa create_wfs_schema, get_wfs_schema_geometry_info, 
 get_wfs_schema_column_count, get_wfs_schema_column_info
 */
    SPATIALITE_DECLARE gaiaWFScolumnPtr
	get_wfs_schema_column (gaiaWFSschemaPtr handle, int index);


/**
 Return the infos describing some WFS-Column object

 \param handle the pointer to a valid WFS-Column returned by a previous call
 to get_wfs_schema_column().
 \param name on completion will contain a pointer to the Column name
................................................................................
 \param nullable on completion will contain a Boolean value; if TRUE
 the Column may contain NULL-values.

 \return TRUE on success, FALSE if any error is encountered
 
 \sa get_wfs_schema_column, get_wfs_schema_geometry_info
 */
    SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr
						       handle,
						       const char **name,
						       int *type,
						       int *nullable);

/**
 Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings
 



|







 







|







 







|
|







 







|
<









<
<
<











|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|







 







|
|
>







 







|
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
130
131
132
133
134
135
136
137

138
139
140
141
142
143
144
145
146



147
148
149
150
151
152
153
154
155
156
157
158
159



































160












161
162
163
164
165
166
167
...
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
...
506
507
508
509
510
511
512
513

514
515
516
517
518
519
520
/*
 gg_wfs.h -- Gaia common support for WFS
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 by invoking free()
 \n please note: this one simply is a convenience method, and exactly corresponds
 to load_from_wfs_paged() setting a negative page size. 
 */
    SPATIALITE_DECLARE int load_from_wfs (sqlite3 * sqlite,
					  const char *path_or_url,
					  const char *alt_describe_uri,
					  const char *layer_name, int swap_axes,
					  const char *table,
					  const char *pk_column_name,
					  int spatial_index, int *rows,
					  char **err_msg,
					  void (*progress_callback) (int,
								     void *),
					  void *callback_ptr);

................................................................................
 \param rows on completion will contain the total number of actually imported rows
 \param err_msg on completion will contain an error message (if any)
 \param progress_callback pointer to a callback function to be invoked immediately
 after processing each WFS page (could be NULL)
 \param callback_ptr an arbitrary pointer (to be passed as the second argument
 by the callback function).
 
 \sa create_wfs_catalog, load_from_wfs, reset_wfs_http_connection


 \return 0 on failure, any other value on success
 
 \note an eventual error message returned via err_msg requires to be deallocated
 by invoking free()

 \note the progress_callback function must have this signature: 
 \b void \b myfunct(\b int \b count, \b void \b *ptr);
 \n and will cyclically report how many features have been processed since the initial call start.



 */
    SPATIALITE_DECLARE int load_from_wfs_paged (sqlite3 * sqlite,
						const char *path_or_url,
						const char *alt_describe_uri,
						const char *layer_name,
						int swap_axes,
						const char *table,
						const char *pk_column_name,
						int spatial_index,
						int page_size, int *rows,
						char **err_msg,
						void (*progress_callback) (int,
									   void



































									   *),












						void *callback_ptr);

/**
 Creates a Catalog for some WFS service 

 \param path_or_url pointer to some WFS-GetCapabilities XML Document (could be a pathname or an URL). 
 \param err_msg on completion will contain an error message (if any)
................................................................................
 \param handle the pointer to a valid WFS-Item returned by a previous call
 to get_wfs_catalog_item().

 \return the base URL for any WFS-DescribeFeatureType call: NULL is undefined
 
 \sa create_wfs_catalog, get_wfs_base_request_url, get_wfs_describe_url
 */
    SPATIALITE_DECLARE const char *get_wfs_base_describe_url (gaiaWFScatalogPtr
							      handle);

/**
 Return a GetFeature URL (GET)

 \param handle the pointer to a valid WFS-Item returned by a previous call
 to get_wfs_catalog_item().
 \param name the NAME uniquely identifying the required WFS layer.
................................................................................

 \return the pointer to the required WFS-Column object: NULL if the passed index
 isn't valid
 
 \sa create_wfs_schema, get_wfs_schema_geometry_info, 
 get_wfs_schema_column_count, get_wfs_schema_column_info
 */
    SPATIALITE_DECLARE gaiaWFScolumnPtr get_wfs_schema_column (gaiaWFSschemaPtr
							       handle,
							       int index);

/**
 Return the infos describing some WFS-Column object

 \param handle the pointer to a valid WFS-Column returned by a previous call
 to get_wfs_schema_column().
 \param name on completion will contain a pointer to the Column name
................................................................................
 \param nullable on completion will contain a Boolean value; if TRUE
 the Column may contain NULL-values.

 \return TRUE on success, FALSE if any error is encountered
 
 \sa get_wfs_schema_column, get_wfs_schema_geometry_info
 */
    SPATIALITE_DECLARE int get_wfs_schema_column_info (gaiaWFScolumnPtr handle,

						       const char **name,
						       int *type,
						       int *nullable);

/**
 Resets the libxml2 "nano HTTP": useful when changing the HTTP_PROXY settings
 

Changes to src/headers/spatialite/gg_xml.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
...
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
...
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
...
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
...
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
...
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
...
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
...
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
...
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
...
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
/*
 gg_xml.h -- Gaia common support for XML documents
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#define GAIA_XML_SLD_SE_RASTER_STYLE	0x10
/** XmlBLOB FLAG - SLDSE VECTOR STYLE bitmask */
#define GAIA_XML_SLD_SE_VECTOR_STYLE	0x40
/** XmlBLOB FLAG - SLD STYLE bitmask */
#define GAIA_XML_SLD_STYLE		0x48
/** XmlBLOB FLAG - SVG bitmask */
#define GAIA_XML_SVG			0x20
/** XmlBLOB FLAG - GPX bitmask */
#define GAIA_XML_GPX			0x08


/* function prototypes */

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_LIBXML2		/* LIBXML2 enabled: supporting XML documents */
#endif
................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE

 \sa gaiaIsCompressedXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsValidXmlBlob (const unsigned char *blob,
					    int size);

/**
 Checks if a valid XmlBLOB buffer is compressed or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsCompressedXmlBlob (const unsigned char *blob,
						 int size);

/**
 Checks if a valid XmlBLOB buffer does contain an ISO Metadata or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsIsoMetadataXmlBlob (const unsigned char *blob,
						  int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the 
 Vector type; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSldSeVectorStyleXmlBlob (const unsigned char
						       *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not

................................................................................

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
 Raster type; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSldSeRasterStyleXmlBlob (const unsigned char
						       *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SLD Style or not

................................................................................

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
 SLD type; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterXmlBlob,
 gaiaIsSvgXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSldStyleXmlBlob (const unsigned char
					       *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SVG Symbol or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsGpxXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSvgXmlBlob (const unsigned char *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain a GPX document or not

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsGpxXmlBlob (const unsigned char *blob, int size);

/**
 Return another XmlBLOB buffer compressed / uncompressed

 \param blob pointer to the input XmlBLOB buffer.
 \param in_size input XmlBLOB's size (in bytes).
 \param compressed if TRUE the returned XmlBLOB will be zip-compressed.
 \param result on completion will containt a pointer to the output XmlBLOB:
................................................................................
  -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSvgXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterStyleXmlBlob,
 gaiaIsSldStyleXmlBlob 
 */
    GAIAGEO_DECLARE int gaiaIsSchemaValidatedXmlBlob (const unsigned char
						      *blob, int size);

/**
 Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

................................................................................

 \sa gaiaXmlBlobGetSchemaURI

 \note the returned SchemaURI corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE char *gaiaXmlGetInternalSchemaURI (const void *p_cache,
						       const unsigned char
						       *xml, int xml_len);

/**
 Return the FileIdentifier from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

................................................................................
 \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobAddFileId

 \note the output XmlBLOB corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE int gaiaXmlBlobSetFileId (const void *p_cache,
					      const unsigned char *blob,
					      int size,
					      const char *identifier,
					      unsigned char **new_blob,
					      int *new_size);

/**
 Return a new XmlBLOB (ISO Metadata) by replacing the ParentId value

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
................................................................................
 \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobSetFileId

 \note the output XmlBLOB corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE int gaiaXmlBlobAddFileId (const void *p_cache,
					      const unsigned char *blob,
					      int size,
					      const char *identifier,
					      const char *ns_id,
					      const char *uri_id,
					      const char *ns_charstr,
					      const char *uri_charstr,
					      unsigned char **new_blob,
					      int *new_size);

................................................................................
 \note the returned Abstract corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE char *gaiaXmlBlobGetAbstract (const unsigned char
						  *blob, int size);

/**
 Return the Geometry buffer from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).
 \param blob_geom on completion this variable will contain
 a pointer to the returned Geometry buffer (NULL if no Geometry
 was defined within the XmlBLOB)
 \param blob_size on completion this variable will contain
 the size (in bytes) of the returned Geometry buffer

 \sa gaiaIsIsoMetadataXmlBlob

 \note the returned Geometry buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE void gaiaXmlBlobGetGeometry (const unsigned char
						 *blob, int size,
						 unsigned char **blob_geom,
						 int *blob_size);

/**
 Return a MultiLinestring Geometry from a valid GPX XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).
 \param db_handle handle to the current SQLite connection
 
 \return a Geometry of the MultiLinestring type, or NULL

 \sa gaiaIsIsoMetadataXmlBlob

 \note the returned Geometry corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE gaiaGeomCollPtr gaiaXmlBlobMLineFromGPX (const unsigned
							     char *blob,
							     int size,
							     sqlite3 *
							     db_handle);

/**
 Return the Charset Encoding from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

 \return the Charset Encoding for any valid XmlBLOB explicitly defining an Encoding; 



|







 







|







 







<
<







 







|







 







|







 







|







 







|







 







|







 







|







 







|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|







 







|
|







 







<
|







 







<
|







 







|




|


|



|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
...
102
103
104
105
106
107
108


109
110
111
112
113
114
115
...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
...
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
...
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
...
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
...
312
313
314
315
316
317
318
319
320
321
322















323
324
325
326
327
328
329
...
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
...
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
...
455
456
457
458
459
460
461

462
463
464
465
466
467
468
469
...
506
507
508
509
510
511
512

513
514
515
516
517
518
519
520
...
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627




















628
629
630
631
632
633
634
/*
 gg_xml.h -- Gaia common support for XML documents
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#define GAIA_XML_SLD_SE_RASTER_STYLE	0x10
/** XmlBLOB FLAG - SLDSE VECTOR STYLE bitmask */
#define GAIA_XML_SLD_SE_VECTOR_STYLE	0x40
/** XmlBLOB FLAG - SLD STYLE bitmask */
#define GAIA_XML_SLD_STYLE		0x48
/** XmlBLOB FLAG - SVG bitmask */
#define GAIA_XML_SVG			0x20




/* function prototypes */

#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#ifdef ENABLE_LIBXML2		/* LIBXML2 enabled: supporting XML documents */
#endif
................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE

 \sa gaiaIsCompressedXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsValidXmlBlob (const unsigned char *blob,
					    int size);

/**
 Checks if a valid XmlBLOB buffer is compressed or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsIsoMetadataXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsCompressedXmlBlob (const unsigned char *blob,
						 int size);

/**
 Checks if a valid XmlBLOB buffer does contain an ISO Metadata or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsSldSeVectorStyleXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsIsoMetadataXmlBlob (const unsigned char *blob,
						  int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the 
 Vector type; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeRasterStyleXmlBlob, gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSldSeVectorStyleXmlBlob (const unsigned char
						       *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not

................................................................................

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
 Raster type; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSldSeRasterStyleXmlBlob (const unsigned char
						       *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SLD Style or not

................................................................................

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB of the
 SLD type; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterXmlBlob,
 gaiaIsSvgXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSldStyleXmlBlob (const unsigned char
					       *blob, int size);

/**
 Checks if a valid XmlBLOB buffer does contain an SVG Symbol or not

................................................................................
 \param size XmlBLOB's size (in bytes).

 \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB; -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSchemaValidatedXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldStyleXmlBlob,
 gaiaIsSldSeRasterStyleXmlBlob
 */
    GAIAGEO_DECLARE int gaiaIsSvgXmlBlob (const unsigned char *blob, int size);
















/**
 Return another XmlBLOB buffer compressed / uncompressed

 \param blob pointer to the input XmlBLOB buffer.
 \param in_size input XmlBLOB's size (in bytes).
 \param compressed if TRUE the returned XmlBLOB will be zip-compressed.
 \param result on completion will containt a pointer to the output XmlBLOB:
................................................................................
  -1 in any other case.

 \sa gaiaIsValidXmlBlob, gaiaIsSvgXmlBlob, 
 gaiaIsCompressedXmlBlob, gaiaIsIsoMetadataXmlBlob, 
 gaiaIsSldSeVectorStyleXmlBlob, gaiaIsSldSeRasterStyleXmlBlob,
 gaiaIsSldStyleXmlBlob 
 */
    GAIAGEO_DECLARE int gaiaIsSchemaValidatedXmlBlob (const unsigned char *blob,
						      int size);

/**
 Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

................................................................................

 \sa gaiaXmlBlobGetSchemaURI

 \note the returned SchemaURI corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE char *gaiaXmlGetInternalSchemaURI (const void *p_cache,
						       const unsigned char *xml,
						       int xml_len);

/**
 Return the FileIdentifier from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

................................................................................
 \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobAddFileId

 \note the output XmlBLOB corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE int gaiaXmlBlobSetFileId (const void *p_cache,
					      const unsigned char *blob,

					      int size, const char *identifier,
					      unsigned char **new_blob,
					      int *new_size);

/**
 Return a new XmlBLOB (ISO Metadata) by replacing the ParentId value

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
................................................................................
 \sa gaiaIsIsoMetadataXmlBlob, gaiaXmlBlobGetFileId, gaiaXmlBlobSetFileId

 \note the output XmlBLOB corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE int gaiaXmlBlobAddFileId (const void *p_cache,
					      const unsigned char *blob,

					      int size, const char *identifier,
					      const char *ns_id,
					      const char *uri_id,
					      const char *ns_charstr,
					      const char *uri_charstr,
					      unsigned char **new_blob,
					      int *new_size);

................................................................................
 \note the returned Abstract corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE char *gaiaXmlBlobGetAbstract (const unsigned char
						  *blob, int size);

/**
 Return the Geometry Buffer from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).
 \param blob_geom on completion this variable will contain
 a pointer to the returned Geometry Buffer (NULL if no Geometry
 was defined within the XmlBLOB)
 \param blob_size on completion this variable will contain
 the size (in bytes) of the returned Geometry Buffer

 \sa gaiaIsIsoMetadataXmlBlob

 \note the returned Geometry Buffer corresponds to dynamically allocated memory:
 so you are responsible to free() it before or after.
 */
    GAIAGEO_DECLARE void gaiaXmlBlobGetGeometry (const unsigned char
						 *blob, int size,
						 unsigned char **blob_geom,
						 int *blob_size);





















/**
 Return the Charset Encoding from a valid XmlBLOB buffer

 \param blob pointer to the XmlBLOB buffer.
 \param size XmlBLOB's size (in bytes).

 \return the Charset Encoding for any valid XmlBLOB explicitly defining an Encoding; 

Changes to src/headers/spatialite/spatialite.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* 
 spatialite.h -- Gaia support for SQLite extensions
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include <spatialite_private.h>

SPATIALITE_PRIVATE int virtualshape_extension_init (void *db);
SPATIALITE_PRIVATE int virtualdbf_extension_init (void *db);
SPATIALITE_PRIVATE int virtualtext_extension_init (void *db);
SPATIALITE_PRIVATE int virtualXL_extension_init (void *db);
SPATIALITE_PRIVATE int virtualnetwork_extension_init (void *db);
SPATIALITE_PRIVATE int virtualrouting_extension_init (void *db);
SPATIALITE_PRIVATE int virtualfdo_extension_init (void *db);
SPATIALITE_PRIVATE int virtualbbox_extension_init (void *db,
						   const void *p_cache);
SPATIALITE_PRIVATE int mbrcache_extension_init (void *db);
SPATIALITE_PRIVATE int virtual_spatialindex_extension_init (void *db);
SPATIALITE_PRIVATE int virtual_elementary_extension_init (void *db);
SPATIALITE_PRIVATE int virtual_knn_extension_init (void *db);
SPATIALITE_PRIVATE int virtual_xpath_extension_init (void *db,
						     const void *p_cache);
SPATIALITE_PRIVATE int virtualgpkg_extension_init (void *db);



|







 







|







 







<






<



1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
45
46
47
48
49
50
51

52
53
54
55
56
57

58
59
60
/* 
 spatialite.h -- Gaia support for SQLite extensions
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
#include <spatialite_private.h>

SPATIALITE_PRIVATE int virtualshape_extension_init (void *db);
SPATIALITE_PRIVATE int virtualdbf_extension_init (void *db);
SPATIALITE_PRIVATE int virtualtext_extension_init (void *db);
SPATIALITE_PRIVATE int virtualXL_extension_init (void *db);
SPATIALITE_PRIVATE int virtualnetwork_extension_init (void *db);

SPATIALITE_PRIVATE int virtualfdo_extension_init (void *db);
SPATIALITE_PRIVATE int virtualbbox_extension_init (void *db,
						   const void *p_cache);
SPATIALITE_PRIVATE int mbrcache_extension_init (void *db);
SPATIALITE_PRIVATE int virtual_spatialindex_extension_init (void *db);
SPATIALITE_PRIVATE int virtual_elementary_extension_init (void *db);

SPATIALITE_PRIVATE int virtual_xpath_extension_init (void *db,
						     const void *p_cache);
SPATIALITE_PRIVATE int virtualgpkg_extension_init (void *db);

Changes to src/headers/spatialite/sqlite.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* 
 sqlite.h -- supporting SQLite headers in a flexible way
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2013-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or



|







 







|







1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* 
 sqlite.h -- supporting SQLite headers in a flexible way
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or

Deleted src/headers/spatialite/stored_procedures.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
/* 
 stored_procedues.h -- SQL Procedures and Stored Procedures functions
  
 version 4.5, 2017 October 22

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2017
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/**
 \file stored_procedures.h

 SQL Procedures and Stored Procedures functions
 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef DLL_EXPORT
#define SQLPROC_DECLARE __declspec(dllexport)
#else
#define SQLPROC_DECLARE extern
#endif
#endif

#ifndef _SQLPROC_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _SQLPROC_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/* constants */
/** SQL Procedure BLOB start marker */
#define SQLPROC_START	0xcd
/** SQL Procedure BLOB delimiter marker */
#define SQLPROC_DELIM	0x87
/** SQL Procedure BLOB stop marker */
#define SQLPROC_STOP	0xdc

/* data structures */
/**
 SqlProc: Variable with value
 */
    typedef struct gaiaSqlProc_VariableStruct
    {
/** Variable Name */
	char *Name;
/** Variable Value */
	char *Value;
/** Pointer to next Variable (linked list) */
	struct gaiaSqlProc_VariableStruct *Next;
    } SqlProc_Variable;
/**
 Typedef for SqlProc Variable structure

 \sa SqlProc_VarList
 */
    typedef SqlProc_Variable *SqlProc_VariablePtr;

/**
 SqlProc: List of Variables with values
 */
    typedef struct gaiaSqlProc_VarListStruct
    {
/** invalid object */
	int Error;
/** Error Message (if any) */
	char *ErrMessage;
/** pointer to first Variable [linked list] */
	SqlProc_VariablePtr First;	/* Variables linked list - first */
/** pointer to last Variable [linked list] */
	SqlProc_VariablePtr Last;	/* Variables linked list - last */
    } SqlProc_VarList;
/**
 Typedef for SqlProc Variables List structure

 \sa SqlProc_Variable
 */
    typedef SqlProc_VarList *SqlProc_VarListPtr;


/* function prototypes */

/**
 Return the most recent SQL Procedure error (if any)

 \param p_cache a memory pointer returned by spatialite_alloc_connection()

 \return the most recent SQL Procedure error message (if any); 
  NULL in any other case.
 */
    SQLPROC_DECLARE char *gaia_sql_proc_get_last_error (const void *p_cache);

/**
 Will enable/disable a Logfile supporting Execute methods

 \param p_cache a memory pointer returned by spatialite_alloc_connection()
 \param filepath the pathname of the Logfile. NULL to disable logging.
 \param append if TRUE the Logfile will be opened in append mode,
 otherwise will be trucated.
 
 \return 0 on failure, any other value on success.
 
 \sa gaia_sql_proc_execute
 */
    SQLPROC_DECLARE int gaia_sql_proc_logfile (const void *p_cache,
					       const char *filepath,
					       int append);

/**
 Creates an empty list of Variables with Values
 
 \return pointer to the Variables List
 
 \sa gaia_sql_proc_destroy_variables, gaia_sql_proc_add_variable,
 gaia_sql_proc_cooked_sql, gaia_sql_proc_execute
 
 \note you are responsible to destroy (before or after) the Variables List
 Object returned by this function by calling gaia_sql_proc_destroy_variables().
 */
    SQLPROC_DECLARE SqlProc_VarListPtr gaia_sql_proc_create_variables ();

/**
 Destroys a list of Variables with Values
 
 \param list pointer to the Variables List Object to be destroyed.
 
 \sa gaia_sql_proc_create_variables
 */
    SQLPROC_DECLARE void
	gaia_sql_proc_destroy_variables (SqlProc_VarListPtr list);

/**
 Add a Variable with Value to the List
 
 \param list pointer to the Variables List Object.
 \param str text string expected to contain a Variable with Value
 in the canonical form '@varname@=value'.
 
 \return 0 on failure, any other value on success.
 
 \sa gaia_sql_proc_create_variables, gaia_sql_proc_destroy_variables
 */
    SQLPROC_DECLARE int
	gaia_sql_proc_add_variable (SqlProc_VarListPtr list, const char *str);

/**
 Builds a SQL Procedure BLOB object from Text
 
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param sql body of the SQL-script
 \param charset the GNU ICONV name identifying the sql body charset
 \param blob on succesfull completion this pointer will reference the
  BLOB SQL Procedure Object (NULL on failure).
 \param blob_sz on succesfull completion this pointer will reference 
 the size (in bytes) of the BLOB SQL Procedure Object.
 
 \return 0 on failure, any other value on success.
 
 \sa gaia_sql_proc_import, gaia_sql_proc_get_last_error,
 gaia_sql_proc_is_valid, gaia_sql_proc_count,
 gaia_sql_proc_variable, gaia_sql_proc_all_variables,
 gaia_sql_proc_raw_sql, gaia_sql_proc_cooked_sql
 
 \note you are responsible to free (before or after) the BLOB
 SQL Procedure Object returned by this function.
 */
    SQLPROC_DECLARE int gaia_sql_proc_parse (const void *cache,
					     const char *sql,
					     const char *charset,
					     unsigned char **blob,
					     int *blob_sz);

/**
 Builds a SQL Procedure BLOB object from an external file
 
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param filepath path to the SQL-script to be loaded.
 \param charset the GNU ICONV name identifying the sql body charset
 \param blob on succesfull completion this pointer will reference the
  BLOB SQL Procedure Object (NULL on failure).
 \param blob_sz on succesfull completion this pointer will reference 
 the size (in bytes) of the BLOB SQL Procedure Object.
 
 \return 0 on failure, any other value on success.
 
 \sa gaia_sql_proc_parse, gaia_sql_proc_get_last_error
 
 \note you are responsible to free (before or after) the BLOB
 SQL Procedure Object returned by this function.
 */
    SQLPROC_DECLARE int gaia_sql_proc_import (const void *cache,
					      const char *filepath,
					      const char *charset,
					      unsigned char **blob,
					      int *blob_sz);

/**
 Checks if a BLOB is a valid SQL Procedure Object
 
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_sql_proc_parse
*/
    SQLPROC_DECLARE int gaia_sql_proc_is_valid (const unsigned char
						*blob, int blob_sz);

/**
 Checks if a TEXT is a valid SQL Variable with Value
 
 \param str the text string to be evaluated.
 
 \return 0 on failure: any other different value on success.
*/
    SQLPROC_DECLARE int gaia_sql_proc_is_valid_var_value (const char *str);

/**
 Return the total count of Variables from a SQL Procedure Object
 
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 
 \return the total count of Variables or -1 on invalid Object
 
 \sa gaia_sql_proc_parse, gaia_sql_proc_variable
*/
    SQLPROC_DECLARE int gaia_sql_proc_var_count (const unsigned char
						 *blob, int blob_sz);

/**
 Return the Name of the Nth Variable from a SQL Procedure Object
 
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 \param index the first Variable has Index=0.
 
 \return the name of the Nth Variable or NULL on invalid Object or
 invalid Index.
 
 \sa gaia_sql_proc_parse, gaia_sql_proc_var_count,
 gaia_sql_proc_all_variables, gaia_sql_proc_raw_sql
 
 \note you are responsible to free (before or after) the Variable Name
 returned by this function.
*/
    SQLPROC_DECLARE char *gaia_sql_proc_variable (const unsigned
						  char *blob,
						  int blob_sz, int index);

/**
 Return the Names of all Variables from a SQL Procedure Object
 
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 
 \return a list of Variable Names separated by spaces or NULL on
 invalid arguments.
 
 \sa gaia_sql_proc_parse, gaia_sql_proc_var_count
 
 \note you are responsible to free (before or after) the Variable Names
 returned by this function.
*/
    SQLPROC_DECLARE char *gaia_sql_proc_all_variables (const
						       unsigned char
						       *blob, int blob_sz);

/**
 Return the raw SQL body from a SQL Procedure Object
 
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 
 \return the raw SQL body or NULL on invalid arguments.
 
 \sa gaia_sql_proc_parse, gaia_sql_proc_var_count
 
 \note you are responsible to free (before or after) the raw SQL body
 returned by this function.
*/
    SQLPROC_DECLARE char *gaia_sql_proc_raw_sql (const unsigned char
						 *blob, int blob_sz);

/**
 Return a cooked SQL body from a raw SQL body by replacing Variable Values
 
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 \param variables list of Variables with Values.
 \param sql on succesfull completions will point to the "cooked" SQL body;
 NULL on failure.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_sql_proc_parse, gaia_sql_proc_var_count,
 gaia_sql_proc_create_variables
 
 \note you are responsible to free (before or after) the cooked SQL body
 returned by this function.
*/
    SQLPROC_DECLARE int gaia_sql_proc_cooked_sql (sqlite3 * handle,
						  const void *cache,
						  const unsigned char *blob,
						  int blob_sz,
						  SqlProc_VarListPtr variables,
						  char **sql);

/**
 Will attempt to create the Stored Procedures Tables if not already existing
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_store, gaia_stored_proc_fetch,
 gaia_stored_proc_delete, gaia_stored_proc_update_title, 
 gaia_stored_proc_update_sql, gaia_stored_var_store,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_proc_create_tables (sqlite3 *
							handle,
							const void *cache);

/**
 Permanently inserts a Stored Procedure into the DB
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Procedure.
 \param title short description of the Stored Procedure.
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_fetch,
 gaia_stored_proc_delete, gaia_stored_proc_update_title, 
 gaia_stored_proc_update_sql, gaia_stored_var_store,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_proc_store (sqlite3 * handle,
						const void *cache,
						const char *name,
						const char *title,
						const unsigned char
						*blob, int blob_sz);

/**
 Retrieves a permanent Stored Procedure from the DB
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Procedure.
 \param blob on succesfull completion this pointer will reference the
  BLOB SQL Procedure Object (NULL on failure).
 \param blob_sz on succesfull completion this pointer will reference 
 the size (in bytes) of the BLOB SQL Procedure Object.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_delete, gaia_stored_proc_update_title, 
 gaia_stored_proc_update_sql, gaia_stored_var_store,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
 
 \note you are responsible to free (before or after) the BLOB
 SQL Procedure Object returned by this function.
*/
    SQLPROC_DECLARE int gaia_stored_proc_fetch (sqlite3 * handle,
						const void *cache,
						const char *name,
						unsigned char **blob,
						int *blob_sz);

/**
 Removes a permanent Stored Procedure from the DB
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Procedure.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetche, gaia_stored_proc_update_title, 
 gaia_stored_proc_update_sql, gaia_stored_var_store,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_proc_delete (sqlite3 * handle,
						 const void *cache,
						 const char *name);

/**
 Updates the Title on a permanent Stored Procedure
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Procedure.
 \param title short description of the Stored Procedure.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_sql, gaia_stored_var_store,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_proc_update_title (sqlite3 *
						       handle,
						       const void
						       *cache,
						       const char
						       *name,
						       const char *title);

/**
 Updates the Raw SQL Body on a permanent Stored Procedure
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Procedure.
 \param blob pointer to the BLOB Object.
 \param blob_sz size (in bytes) of the BLOB Object.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_title, gaia_stored_var_store,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_proc_update_sql (sqlite3 *
						     handle,
						     const void
						     *cache,
						     const char
						     *name,
						     const
						     unsigned char
						     *blob, int blob_sz);

/**
 Permanently inserts a Stored Variable into the DB
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Variable.
 \param title short description of the Stored Variable.
 \param value the Variable Value in its textual representation.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_title, gaia_stored_proc_update_sql,
 gaia_stored_var_fetch, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_var_store (sqlite3 * handle,
					       const void *cache,
					       const char *name,
					       const char *title,
					       const char *value);

/**
 Retrieves a Stored Variable from the DB
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Variable.
 \param var_with_val if set to TRUE value will point to a Variable with 
 Name string, otherwise (FALSE) it will point to a bare textual value. 
 \param value on succesfull completion this pointer will reference 
 the Stored Variable represented as a Variable with Value or as a bare
 textual value depending on var_with_val setting.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_title, gaia_stored_proc_update_sql,
 gaia_stored_var_store, gaia_stored_var_delete,
 gaia_stored_var_update_title, gaia_stored_var_update_value
 
 \note you are responsible to free (before or after) the Text
 String returned by this function.
*/
    SQLPROC_DECLARE int gaia_stored_var_fetch (sqlite3 * handle,
					       const void *cache,
					       const char *name,
					       int var_with_val, char **value);

/**
 Removes a Stored Variable from the DB
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Variable.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_title, gaia_stored_proc_update_sql,
 gaia_stored_var_store, gaia_stored_var_fetch,
 gaia_stored_var_update_title, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_var_delete (sqlite3 * handle,
						const void *cache,
						const char *name);

/**
 Updates the Title on a Stored Variable
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Variable.
 \param title short description of the Stored Variable.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_title, gaia_stored_proc_update_sql,
 gaia_stored_var_store, gaia_stored_var_store, gaia_stored_var_fetch,
 gaia_stored_var_delete, gaia_stored_var_update_value
*/
    SQLPROC_DECLARE int gaia_stored_var_update_title (sqlite3 *
						      handle,
						      const void
						      *cache,
						      const char
						      *name, const char *title);

/**
 Updates the Value on a Stored Variable
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param name unique identifier of the Stored Variable.
 \param value the Variable Value in its textual representation.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_stored_proc_create_tables, gaia_stored_proc_store,
 gaia_stored_proc_fetch, gaia_stored_proc_delete, 
 gaia_stored_proc_update_title, gaia_stored_proc_update_sql,
 gaia_stored_var_store, gaia_stored_var_store, gaia_stored_var_fetch,
 gaia_stored_var_delete, gaia_stored_var_update_title
*/
    SQLPROC_DECLARE int gaia_stored_var_update_value (sqlite3 *
						      handle,
						      const void
						      *cache,
						      const char
						      *name, const char *value);

/**
 Executing a cooked SQL Procedure
  
 \param handle pointer to the current DB connection.
 \param cache the same memory pointer passed to the corresponding call to
 spatialite_init_ex() and returned by spatialite_alloc_connection()
 \param sql the cooked SQL Body to be executed.
 
 \return 0 on failure: any other different value on success.
 
 \sa gaia_sql_proc_logfile
*/
    SQLPROC_DECLARE int gaia_sql_proc_execute (sqlite3 *
					       handle,
					       const void *cache,
					       const char *sql);

#ifdef __cplusplus
}
#endif

#endif				/* _SQLPROC_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/headers/spatialite_private.h.

1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
...
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
...
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
...
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
...
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
...
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
...
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
...
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744

745
746
747
748
749

750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
...
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
...
929
930
931
932
933
934
935




936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
/* 
 spatialite.h -- Gaia spatial support for SQLite 
  
 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include <time.h>
#include <stdarg.h>

#include <zlib.h>

#include "spatialite/gg_sequence.h"

/**
 \file spatialite_private.h

 SpatiaLite private header file
 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
................................................................................
	time_t timestamp;
	char *schemaURI;
	void *schemaDoc;
	void *parserCtxt;
	void *schema;
    };

    struct splite_savepoint
    {
	char *savepoint_name;
	struct splite_savepoint *prev;
	struct splite_savepoint *next;
    };

    struct splite_shp_extent
    {
	char *table;
	double minx;
	double maxx;
	double miny;
	double maxy;
	int srid;
	struct splite_shp_extent *prev;
	struct splite_shp_extent *next;
    };

#define MAX_XMLSCHEMA_CACHE	16

    struct splite_internal_cache
    {
	unsigned char magic1;
	int gpkg_mode;
	int gpkg_amphibious_mode;
	int decimal_precision;
	void *GEOS_handle;
	void *PROJ_handle;
	void *RTTOPO_handle;
	void *xmlParsingErrors;
	void *xmlSchemaValidationErrors;
	void *xmlXPathErrors;
	char *cutterMessage;
	char *storedProcError;
	char *createRoutingError;
	struct splite_geos_cache_item cacheItem1;
	struct splite_geos_cache_item cacheItem2;
	struct splite_xmlSchema_cache_item xmlSchemaCache[MAX_XMLSCHEMA_CACHE];
	int pool_index;
	void (*geos_warning) (const char *fmt, ...);
	void (*geos_error) (const char *fmt, ...);
	char *gaia_geos_error_msg;
	char *gaia_geos_warning_msg;
	char *gaia_geosaux_error_msg;
	char *gaia_rttopo_error_msg;
	char *gaia_rttopo_warning_msg;
	int silent_mode;
	void *firstTopology;
	void *lastTopology;
	void *firstNetwork;
	void *lastNetwork;
	unsigned int next_topo_savepoint;
	struct splite_savepoint *first_topo_svpt;
	struct splite_savepoint *last_topo_svpt;
	unsigned int next_network_savepoint;
	struct splite_savepoint *first_net_svpt;
	struct splite_savepoint *last_net_svpt;
	gaiaSequencePtr first_seq;
	gaiaSequencePtr last_seq;
	struct splite_shp_extent *first_shp_extent;
	struct splite_shp_extent *last_shp_extent;
	int ok_last_used_sequence;
	int last_used_sequence_val;
	char *SqlProcLogfile;
	FILE *SqlProcLog;
	int SqlProcContinue;
	int tinyPointEnabled;
	unsigned char magic2;
    };

    struct epsg_defs
    {
	int srid;
	char *auth_name;
................................................................................
    {
	/* a struct to implement ATM_ControlPoints - aggregate function */
	int count;
	int allocation_incr;
	int allocated_items;
	int has3d;
	int tps;
	int order;
	/* point set A */
	double *x0;
	double *y0;
	double *z0;
	/* point set B */
	double *x1;
	double *y1;
................................................................................
	double zoff;
	int affine_valid;
    };

    SPATIALITE_PRIVATE void free_internal_cache (struct splite_internal_cache
						 *cache);

    SPATIALITE_PRIVATE void free_internal_cache_topologies (void *first);

    SPATIALITE_PRIVATE void free_internal_cache_networks (void *first);

    SPATIALITE_PRIVATE struct epsg_defs *add_epsg_def (int filter_srid,
						       struct epsg_defs
						       **first,
						       struct epsg_defs
						       **last, int srid,
						       const char *auth_name,
						       int auth_srid,
						       const char
						       *ref_sys_name);

    SPATIALITE_PRIVATE struct epsg_defs *add_epsg_def_ex (int filter_srid,
							  struct epsg_defs
							  **first,
							  struct epsg_defs
							  **last, int srid,
							  const char
							  *auth_name,
							  int auth_srid,
							  const char
							  *ref_sys_name,
							  int is_geographic,
							  int flipped_axes,
							  const char
							  *spheroid,
							  const char
							  *prime_meridian,
							  const char *datum,
							  const char
							  *projection,
							  const char *unit,
							  const char *axis_1,
................................................................................

    SPATIALITE_PRIVATE void initialize_epsg (int filter,
					     struct epsg_defs **first,
					     struct epsg_defs **last);

    SPATIALITE_PRIVATE void free_epsg (struct epsg_defs *first);

    SPATIALITE_PRIVATE int exists_spatial_ref_sys (void *handle);

    SPATIALITE_PRIVATE int checkSpatialMetaData (const void *sqlite);

    SPATIALITE_PRIVATE int checkSpatialMetaData_ex (const void *sqlite,
						    const char *db_prefix);

    SPATIALITE_PRIVATE int delaunay_triangle_check (void *pg);

    SPATIALITE_PRIVATE void *voronoj_build (int pgs, void *first,
					    double extra_frame_size);

    SPATIALITE_PRIVATE void *voronoj_build_r (const void *p_cache, int pgs,
					      void *first,
................................................................................
    SPATIALITE_PRIVATE void getProjParams (void *p_sqlite, int srid,
					   char **params);

    SPATIALITE_PRIVATE int getEllipsoidParams (void *p_sqlite, int srid,
					       double *a, double *b,
					       double *rf);

    SPATIALITE_PRIVATE void addVectorLayer (void *list,
					    const char *layer_type,
					    const char *table_name,
					    const char *geometry_column,
					    int geometry_type, int srid,
					    int spatial_index);

    SPATIALITE_PRIVATE void addVectorLayerExtent (void *list,
						  const char *table_name,
................................................................................
						  const char *geometry_column,
						  int count, double min_x,
						  double min_y, double max_x,
						  double max_y);

    SPATIALITE_PRIVATE void addLayerAttributeField (void *list,
						    const char *table_name,
						    const char
						    *geometry_column,
						    int ordinal,
						    const char *column_name,
						    int null_values,
						    int integer_values,
						    int double_values,
						    int text_values,
						    int blob_values,
................................................................................
						    void *integer_min,
						    void *integer_max,
						    int null_double_range,
						    double double_min,
						    double double_max);

    SPATIALITE_PRIVATE int createStylingTables (void *p_sqlite, int relaxed);
    SPATIALITE_PRIVATE int createStylingTables_ex (void *p_sqlite,
						   int relaxed,
						   int transaction);

    SPATIALITE_PRIVATE int register_external_graphic (void *p_sqlite,
						      const char *xlink_href,
						      const unsigned char
						      *p_blob, int n_bytes,
						      const char *title,
................................................................................
							  int srid);

    SPATIALITE_PRIVATE int unregister_raster_coverage_srid (void *p_sqlite,
							    const char
							    *coverage_name,
							    int srid);

    SPATIALITE_PRIVATE int register_raster_coverage_keyword (void *p_sqlite,
							     const char
							     *coverage_name,
							     const char
							     *keyword);

    SPATIALITE_PRIVATE int unregister_raster_coverage_keyword (void *p_sqlite,
							       const char
							       *coverage_name,
							       const char
							       *keyword);

    SPATIALITE_PRIVATE int update_raster_coverage_extent (void *p_sqlite,
							  const void *cache,
							  const char
							  *coverage_name,
							  int transaction);

    /* DEPRECATED - always use register_styled_group_ex */
    SPATIALITE_PRIVATE int register_styled_group (void *p_sqlite,
						  const char *group_name,
						  const char *f_table_name,
						  const char
						  *f_geometry_column,
						  const char *coverage_name,
						  int paint_order);

    SPATIALITE_PRIVATE int register_styled_group_ex (void *p_sqlite,
						     const char *group_name,
						     const char
						     *vector_coverage_name,
................................................................................
    SPATIALITE_PRIVATE int register_group_style (void *p_sqlite,
						 const char *group_name,
						 int style_id,
						 const unsigned char *p_blob,
						 int n_bytes);

    SPATIALITE_PRIVATE int register_group_style_ex (void *p_sqlite,
						    const unsigned char
						    *p_blob, int n_bytes);

    SPATIALITE_PRIVATE int unregister_group_style (void *p_sqlite,
						   int style_id,
						   const char *style_name,
						   int remove_all);

    SPATIALITE_PRIVATE int reload_group_style (void *p_sqlite, int style_id,
					       const char *style_name,
					       const unsigned char *p_blob,
					       int n_bytes);

    SPATIALITE_PRIVATE int register_styled_group_style (void *p_sqlite,
							const char
							*group_name,
							int style_id,
							const char *style_name);

    SPATIALITE_PRIVATE int unregister_styled_group_style (void *p_sqlite,
							  const char
							  *group_name,
							  int style_id,
................................................................................
						  const unsigned char *p_blob,
						  int n_bytes, void *p_id,
						  const char *fileIdentifier);

    SPATIALITE_PRIVATE int createRasterCoveragesTable (void *p_sqlite);

    SPATIALITE_PRIVATE int checkPopulatedCoverage (void *p_sqlite,
						   const char *db_prefix,
						   const char *coverage_name);

    SPATIALITE_PRIVATE int createVectorCoveragesTable (void *p_sqlite);

    SPATIALITE_PRIVATE int register_vector_coverage (void *p_sqlite,
						     const char
						     *coverage_name,
						     const char *f_table_name,
						     const char
						     *f_geometry_column,
						     const char *title,
						     const char *abstract,
						     int is_queryable,
						     int is_editable);

    SPATIALITE_PRIVATE int register_spatial_view_coverage (void *p_sqlite,
							   const char
							   *coverage_name,
							   const char
							   *view_name,
							   const char
							   *view_geometry,
							   const char *title,
							   const char *abstract,
							   int is_queryable,
							   int is_editable);

    SPATIALITE_PRIVATE int register_virtual_shp_coverage (void *p_sqlite,
							  const char
							  *coverage_name,
							  const char *virt_name,
							  const char
							  *virt_geometry,
							  const char *title,
							  const char *abstract,
							  int is_queryable);

    SPATIALITE_PRIVATE int register_topogeo_coverage (void *p_sqlite,
						      const char
						      *coverage_name,
						      const char *topogeo_name,
						      const char *title,
						      const char *abstract,
						      int is_queryable,
						      int is_editable);

    SPATIALITE_PRIVATE int register_toponet_coverage (void *p_sqlite,
						      const char
						      *coverage_name,
						      const char *toponet_name,
						      const char *title,
						      const char *abstract,
						      int is_queryable,
						      int is_editable);

    SPATIALITE_PRIVATE int unregister_vector_coverage (void *p_sqlite,
						       const char
						       *coverage_name);

    SPATIALITE_PRIVATE int set_vector_coverage_infos (void *p_sqlite,
						      const char
						      *coverage_name,
						      const char *title,
						      const char *abstract,
						      int is_queryable,
						      int is_editable);

    SPATIALITE_PRIVATE int set_vector_coverage_copyright (void *p_sqlite,
							  const char
							  *coverage_name,
							  const char *copyright,
							  const char *license);

    SPATIALITE_PRIVATE int register_vector_coverage_srid (void *p_sqlite,
							  const char
							  *coverage_name,
							  int srid);

    SPATIALITE_PRIVATE int unregister_vector_coverage_srid (void *p_sqlite,
							    const char
							    *coverage_name,
							    int srid);

    SPATIALITE_PRIVATE int register_vector_coverage_keyword (void *p_sqlite,
							     const char
							     *coverage_name,
							     const char
							     *keyword);

    SPATIALITE_PRIVATE int unregister_vector_coverage_keyword (void *p_sqlite,
							       const char
							       *coverage_name,
							       const char
							       *keyword);

    SPATIALITE_PRIVATE int update_vector_coverage_extent (void *p_sqlite,
							  const void *cache,
							  const char
							  *coverage_name,
							  int transaction);

    SPATIALITE_PRIVATE int createWMSTables (void *p_sqlite);


    SPATIALITE_PRIVATE int register_wms_getcapabilities (void *p_sqlite,
							 const char *url,
							 const char *title,
							 const char *abstract);


    SPATIALITE_PRIVATE int unregister_wms_getcapabilities (void *p_sqlite,
							   const char *url);

    SPATIALITE_PRIVATE int set_wms_getcapabilities_infos (void *p_sqlite,
							  const char *url,
							  const char *title,
							  const char *abstract);

    SPATIALITE_PRIVATE int register_wms_getmap (void *p_sqlite,
						const char *getcapabilities_url,
						const char *getmap_url,
						const char *layer_name,
						const char *title,
						const char *abstract,
						const char *version,
						const char *ref_sys,
						const char *image_format,
						const char *style,
						int transparent,
						int flip_axes,
						int tiled,
						int cached,
						int tile_width,
						int tile_height,
						const char *bgcolor,
						int is_queryable,
						const char *getfeatureinfo_url);

    SPATIALITE_PRIVATE int unregister_wms_getmap (void *p_sqlite,
						  const char *url,
						  const char *layer_name);

    SPATIALITE_PRIVATE int set_wms_getmap_infos (void *p_sqlite,
						 const char *url,
						 const char *layer_name,
						 const char *title,
						 const char *abstract);

    SPATIALITE_PRIVATE int set_wms_getmap_copyright (void *p_sqlite,
						     const char *url,
						     const char *layer_name,
						     const char *copyright,
						     const char *license);

    SPATIALITE_PRIVATE int set_wms_getmap_bgcolor (void *p_sqlite,
						   const char *url,
						   const char *layer_name,
						   const char *bgcolor);

    SPATIALITE_PRIVATE int set_wms_getmap_queryable (void *p_sqlite,
						     const char *url,
						     const char *layer_name,
						     int is_queryable,
						     const char
						     *getfeatureifo_url);

    SPATIALITE_PRIVATE int set_wms_getmap_options (void *p_sqlite,
						   const char *url,
						   const char *layer_name,
						   int transparent,
						   int flip_axes);

    SPATIALITE_PRIVATE int set_wms_getmap_tiled (void *p_sqlite,
						 const char *url,
						 const char *layer_name,
						 int tiled, int cached,
						 int tile_width,
						 int tile_height);

    SPATIALITE_PRIVATE int register_wms_setting (void *p_sqlite,
						 const char *url,
						 const char *layer_name,
						 const char *key,
						 const char *value,
						 int is_default);

    SPATIALITE_PRIVATE int unregister_wms_setting (void *p_sqlite,
						   const char *url,
						   const char *layer_name,
						   const char *key,
						   const char *value);

    SPATIALITE_PRIVATE int set_wms_default_setting (void *p_sqlite,
						    const char *url,
						    const char *layer_name,
						    const char *key,
						    const char *value);

    SPATIALITE_PRIVATE int register_wms_srs (void *p_sqlite,
					     const char *url,
					     const char *layer_name,
					     const char *ref_sys, double minx,
					     double miny, double maxx,
					     double maxy, int is_default);

    SPATIALITE_PRIVATE int unregister_wms_srs (void *p_sqlite,
					       const char *url,
					       const char *layer_name,
					       const char *ref_sys);

    SPATIALITE_PRIVATE int set_wms_default_srs (void *p_sqlite,
						const char *url,
						const char *layer_name,
						const char *ref_sys);

    SPATIALITE_PRIVATE char *wms_getmap_request_url (void *p_sqlite,
						     const char *getmap_url,
						     const char *layer_name,
						     int width, int height,
						     double minx, double miny,
						     double maxx, double maxy);

    SPATIALITE_PRIVATE char *wms_getfeatureinfo_request_url (void *p_sqlite,
							     const char
							     *getmap_url,
							     const char
							     *layer_name,
							     int width,
							     int height, int x,
							     int y, double minx,
							     double miny,
							     double maxx,
							     double maxy,
							     int feature_count);

    SPATIALITE_PRIVATE int register_data_license (void *p_sqlite,
						  const char *license_name,
						  const char *url);

    SPATIALITE_PRIVATE int unregister_data_license (void *p_sqlite,
						    const char *license_name);

    SPATIALITE_PRIVATE int rename_data_license (void *p_sqlite,
						const char *old_name,
						const char *new_name);

    SPATIALITE_PRIVATE int set_data_license_url (void *p_sqlite,
						 const char *license_name,
						 const char *url);

    SPATIALITE_PRIVATE const char *splite_rttopo_version (void);

    SPATIALITE_PRIVATE void splite_free_geos_cache_item (struct
							 splite_geos_cache_item
							 *p);

    SPATIALITE_PRIVATE void splite_free_geos_cache_item_r (const void
							   *p_cache,
							   struct
							   splite_geos_cache_item
							   *p);

    SPATIALITE_PRIVATE void splite_free_xml_schema_cache_item (struct
							       splite_xmlSchema_cache_item
							       *p);
................................................................................

    SPATIALITE_PRIVATE void vxpath_free_namespaces (struct vxpath_namespaces
						    *ns_list);

    SPATIALITE_PRIVATE struct vxpath_namespaces *vxpath_get_namespaces (void
									*p_xml_doc);

    SPATIALITE_PRIVATE int vxpath_eval_expr (const void *p_cache,
					     void *xml_doc,
					     const char *xpath_expr,
					     void *p_xpathCtx,
					     void *p_xpathObj);

    SPATIALITE_PRIVATE void *register_spatialite_sql_functions (void *db,
								const void
								*cache);
................................................................................

    SPATIALITE_PRIVATE void geos_warning (const char *fmt, ...);

    SPATIALITE_PRIVATE void splite_cache_semaphore_lock (void);

    SPATIALITE_PRIVATE void splite_cache_semaphore_unlock (void);





    SPATIALITE_PRIVATE const void *gaiaAuxClonerCreate (const void *sqlite,
							const char *db_prefix,
							const char *in_table,
							const char *out_table);

    SPATIALITE_PRIVATE const void *gaiaAuxClonerCreateEx (const void *sqlite,
							  const char
							  *db_prefix,
							  const char
							  *in_table,
							  const char
							  *out_table,
							  int create_only);

    SPATIALITE_PRIVATE void gaiaAuxClonerDestroy (const void *cloner);

    SPATIALITE_PRIVATE void gaiaAuxClonerAddOption (const void *cloner,
						    const char *option);

    SPATIALITE_PRIVATE int gaiaAuxClonerCheckValidTarget (const void *cloner);

    SPATIALITE_PRIVATE int gaiaAuxClonerExecute (const void *cloner);

    SPATIALITE_PRIVATE const void *gaiaElemGeomOptionsCreate ();

    SPATIALITE_PRIVATE void gaiaElemGeomOptionsAdd (const void *options,
						    const char *option);

    SPATIALITE_PRIVATE void gaiaElemGeomOptionsDestroy (const void *options);

    SPATIALITE_PRIVATE int gaia_matrix_to_arrays (const unsigned char *blob,
						  int blob_sz, double *E,
						  double *N, double *Z);

/* Topology SQL functions */
    SPATIALITE_PRIVATE void *fromRTGeom (const void *ctx, const void *rtgeom,
					 const int dimension_model,
					 const int declared_type);

    SPATIALITE_PRIVATE void *toRTGeom (const void *ctx, const void *gaia);

    SPATIALITE_PRIVATE void fnctaux_GetLastTopologyException (const void
							      *context,
							      int argc,
							      const void *argv);

    SPATIALITE_PRIVATE void fnctaux_CreateTopoTables (const void *context,
						      int argc,
						      const void *argv);

    SPATIALITE_PRIVATE int do_create_topologies (void *sqlite_handle);

    SPATIALITE_PRIVATE int do_create_networks (void *sqlite_handle);

    SPATIALITE_PRIVATE void fnctaux_CreateTopology (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_DropTopology (const void *context,
						  int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddIsoNode (const void *context, int argc,
						const void *argv);

    SPATIALITE_PRIVATE void fnctaux_MoveIsoNode (const void *context,
						 int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_RemIsoNode (const void *context,
						int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddIsoEdge (const void *context, int argc,
						const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddEdgeModFace (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddEdgeNewFaces (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_RemEdgeNewFace (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_RemEdgeModFace (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ChangeEdgeGeom (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_RemIsoEdge (const void *context,
						int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddIsoEdge (const void *context, int argc,
						const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ModEdgeSplit (const void *context,
						  int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_NewEdgesSplit (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ModEdgeHeal (const void *context,
						 int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_NewEdgeHeal (const void *context,
						 int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetFaceEdges (const void *context,
						  int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetFaceGeometry (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ValidateTopoGeo (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_CreateTopoGeo (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetNodeByPoint (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetEdgeByPoint (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetFaceByPoint (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_AddPoint (const void *context,
						      int argc,
						      const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_AddLineString (const void
							   *context, int argc,
							   const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_AddLineStringNoFace (const void
								 *context,
								 int argc,
								 const void
								 *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_Polygonize (const void *context,
							int argc,
							const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_FromGeoTable (const void *context,
							  int argc,
							  const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_FromGeoTableNoFace (const void
								*context,
								int argc,
								const void
								*argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_FromGeoTableExt (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_FromGeoTableNoFaceExt (const void
								   *context,
								   int argc,
								   const void
								   *argv);

    SPATIALITE_PRIVATE void fnctaux_Polygonize (const void
						*context, int argc,
						const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_TopoSnap (const void
						      *context, int argc,
						      const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_SnappedGeoTable (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_ToGeoTable (const void *context,
							int argc,
							const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_PolyFacesList (const void *context,
							   int argc,
							   const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_LineEdgesList (const void *context,
							   int argc,
							   const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_ToGeoTableGeneralize (const void
								  *context,
								  int argc,
								  const void
								  *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_RemoveSmallFaces (const void
							      *context,
							      int argc,
							      const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_RemoveDanglingEdges (const void
								 *context,
								 int argc,
								 const void
								 *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_RemoveDanglingNodes (const void
								 *context,
								 int argc,
								 const void
								 *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_NewEdgeHeal (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_ModEdgeHeal (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_NewEdgesSplit (const void *context,
							   int argc,
							   const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_ModEdgeSplit (const void *context,
							  int argc,
							  const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_CreateTopoLayer (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_InitTopoLayer (const void
							   *context, int argc,
							   const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_RemoveTopoLayer (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_ExportTopoLayer (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_InsertFeatureFromTopoLayer (const
									void
									*context,
									int
									argc,
									const
									void
									*argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_Clone (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_SubdivideLines (const void
							    *context,
							    int argc,
							    const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_DisambiguateSegmentEdges (const void
								      *context,
								      int argc,
								      const void
								      *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_GetEdgeSeed (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_GetFaceSeed (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_UpdateSeeds (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_SnapPointToSeed (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoGeo_SnapLineToSeed (const void
							    *context,
							    int argc,
							    const void *argv);

    SPATIALITE_PRIVATE void start_topo_savepoint (const void *handle,
						  const void *cache);

    SPATIALITE_PRIVATE void release_topo_savepoint (const void *handle,
						    const void *cache);

    SPATIALITE_PRIVATE void rollback_topo_savepoint (const void *handle,
						     const void *cache);

    SPATIALITE_PRIVATE void add_shp_extent (const char *table, double minx,
					    double miny, double maxx,
					    double maxy, int srid,
					    const void *cache);

    SPATIALITE_PRIVATE void remove_shp_extent (const char *table,
					       const void *cache);

    SPATIALITE_PRIVATE int get_shp_extent (const char *table, double *minx,
					   double *miny, double *maxx,
					   double *maxy, int *srid,
					   const void *cache);

/* Topology-Network SQL functions */
    SPATIALITE_PRIVATE void fnctaux_GetLastNetworkException (const void
							     *context,
							     int argc,
							     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_CreateNetwork (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_DropNetwork (const void *context,
						 int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddIsoNetNode (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_MoveIsoNetNode (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_RemIsoNetNode (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_AddLink (const void *context, int argc,
					     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ChangeLinkGeom (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_RemoveLink (const void *context, int argc,
						const void *argv);

    SPATIALITE_PRIVATE void fnctaux_NewLogLinkSplit (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ModLogLinkSplit (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_NewGeoLinkSplit (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ModGeoLinkSplit (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_NewLinkHeal (const void *context,
						 int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ModLinkHeal (const void *context,
						 int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_LogiNetFromTGeo (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_SpatNetFromTGeo (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_SpatNetFromGeom (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ValidLogicalNet (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_ValidSpatialNet (const void *context,
						     int argc,
						     const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetNetNodeByPoint (const void *context,
						       int argc,
						       const void *argv);

    SPATIALITE_PRIVATE void fnctaux_GetLinkByPoint (const void *context,
						    int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_FromGeoTable (const void *context,
							  int argc,
							  const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_ToGeoTable (const void *context,
							int argc,
							const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_ToGeoTableGeneralize (const void
								  *context,
								  int argc,
								  const void
								  *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_ToGeoTableGeneralize (const void
								  *context,
								  int argc,
								  const void
								  *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_Clone (const void *context,
						   int argc, const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_GetLinkSeed (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_UpdateSeeds (const void *context,
							 int argc,
							 const void *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_DisambiguateSegmentLinks (const void
								      *context,
								      int argc,
								      const void
								      *argv);

    SPATIALITE_PRIVATE void fnctaux_TopoNet_LineLinksList (const void *context,
							   int argc,
							   const void *argv);

    SPATIALITE_PRIVATE void start_net_savepoint (const void *handle,
						 const void *cache);

    SPATIALITE_PRIVATE void release_net_savepoint (const void *handle,
						   const void *cache);

    SPATIALITE_PRIVATE void rollback_net_savepoint (const void *handle,
						    const void *cache);

    SPATIALITE_PRIVATE int test_inconsistent_topology (const void *handle);

    SPATIALITE_PRIVATE char *url_toUtf8 (const char *url,
					 const char *in_charset);

    SPATIALITE_PRIVATE char *url_fromUtf8 (const char *url,
					   const char *out_charset);

    SPATIALITE_PRIVATE int gaia_check_reference_geo_table (const void *handle,
							   const char
							   *db_prefix,
							   const char *table,
							   const char *column,
							   char **xtable,
							   char **xcolumn,
							   int *srid,
							   int *family);

    SPATIALITE_PRIVATE int gaia_check_output_table (const void *handle,
						    const char *table);

    SPATIALITE_PRIVATE int gaia_check_spatial_index (const void *handle,
						     const char *db_prefix,
						     const char *ref_table,
						     const char *ref_column);

    SPATIALITE_PRIVATE int gaia_do_eval_disjoint (const void *handle,
						  const char *matrix);

    SPATIALITE_PRIVATE int gaia_do_eval_overlaps (const void *handle,
						  const char *matrix);

    SPATIALITE_PRIVATE int gaia_do_eval_covers (const void *handle,
						const char *matrix);

    SPATIALITE_PRIVATE int gaia_do_eval_covered_by (const void *handle,
						    const char *matrix);

    SPATIALITE_PRIVATE void gaia_do_check_direction (const void *x1,
						     const void *x2,
						     char *direction);

    SPATIALITE_PRIVATE int gaia_do_check_linestring (const void *geom);

    SPATIALITE_PRIVATE void spatialite_internal_init (void *db_handle,
						      const void *ptr);

    SPATIALITE_PRIVATE void spatialite_internal_cleanup (const void *ptr);

    SPATIALITE_PRIVATE void gaia_sql_proc_set_error (const void *p_cache,
						     const char *errmsg);

#ifdef __cplusplus
}
#endif

#endif				/* _SPATIALITE_PRIVATE_H */



|







 







|







 







<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<
<
<


<



<
<
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<







 







<
<
<
<

|
<
|
|










<
|





|
<







 







<
<


<
<
<







 







|
<







 







<
|







 







|
<







 







<
<
<
<
<
<
<
<
<
<
<
<










<
|







 







|
|

|
<









<
|







 







<





<
|




|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
|

|
<
<
<
<
<
<
<
<











<
<
<
<
<
<
<
<
<
<
<
<






<
>

<
<
<
<
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
<







 







|
<







 







>
>
>
>





<
<
<
<
<
<
<
<
<









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
43
44
45
46
47
48
49


50
51
52
53
54
55
56
...
121
122
123
124
125
126
127



















128
129
130
131
132



133
134

135
136
137



138
139
140
141
142
143


























144
145
146
147
148
149
150
...
170
171
172
173
174
175
176

177
178
179
180
181
182
183
...
197
198
199
200
201
202
203




204
205

206
207
208
209
210
211
212
213
214
215
216
217

218
219
220
221
222
223
224

225
226
227
228
229
230
231
...
243
244
245
246
247
248
249


250
251



252
253
254
255
256
257
258
...
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
...
338
339
340
341
342
343
344

345
346
347
348
349
350
351
352
...
356
357
358
359
360
361
362
363

364
365
366
367
368
369
370
...
454
455
456
457
458
459
460












461
462
463
464
465
466
467
468
469
470

471
472
473
474
475
476
477
478
...
510
511
512
513
514
515
516
517
518
519
520

521
522
523
524
525
526
527
528
529

530
531
532
533
534
535
536
537
...
550
551
552
553
554
555
556

557
558
559
560
561

562
563
564
565
566
567










































568
569
570
571
572
573

574
575
576








577
578
579
580
581
582
583
584
585
586
587












588
589
590
591
592
593

594
595




596
597














































































































































598
599
600
601
602

603
604
605
606
607
608
609
...
610
611
612
613
614
615
616
617

618
619
620
621
622
623
624
...
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647









648
649
650
651
652
653
654
655
656




























































































































































































































































































































































































































































































657
658
659
660
661
/* 
 spatialite.h -- Gaia spatial support for SQLite 
  
 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
*/

#include <time.h>
#include <stdarg.h>

#include <zlib.h>



/**
 \file spatialite_private.h

 SpatiaLite private header file
 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
................................................................................
	time_t timestamp;
	char *schemaURI;
	void *schemaDoc;
	void *parserCtxt;
	void *schema;
    };




















#define MAX_XMLSCHEMA_CACHE	16

    struct splite_internal_cache
    {
	unsigned char magic1;



	void *GEOS_handle;
	void *PROJ_handle;

	void *xmlParsingErrors;
	void *xmlSchemaValidationErrors;
	void *xmlXPathErrors;



	struct splite_geos_cache_item cacheItem1;
	struct splite_geos_cache_item cacheItem2;
	struct splite_xmlSchema_cache_item xmlSchemaCache[MAX_XMLSCHEMA_CACHE];
	int pool_index;
	void (*geos_warning) (const char *fmt, ...);
	void (*geos_error) (const char *fmt, ...);


























	unsigned char magic2;
    };

    struct epsg_defs
    {
	int srid;
	char *auth_name;
................................................................................
    {
	/* a struct to implement ATM_ControlPoints - aggregate function */
	int count;
	int allocation_incr;
	int allocated_items;
	int has3d;
	int tps;

	/* point set A */
	double *x0;
	double *y0;
	double *z0;
	/* point set B */
	double *x1;
	double *y1;
................................................................................
	double zoff;
	int affine_valid;
    };

    SPATIALITE_PRIVATE void free_internal_cache (struct splite_internal_cache
						 *cache);





    SPATIALITE_PRIVATE struct epsg_defs *add_epsg_def (int filter_srid,
						       struct epsg_defs **first,

						       struct epsg_defs **last,
						       int srid,
						       const char *auth_name,
						       int auth_srid,
						       const char
						       *ref_sys_name);

    SPATIALITE_PRIVATE struct epsg_defs *add_epsg_def_ex (int filter_srid,
							  struct epsg_defs
							  **first,
							  struct epsg_defs
							  **last, int srid,

							  const char *auth_name,
							  int auth_srid,
							  const char
							  *ref_sys_name,
							  int is_geographic,
							  int flipped_axes,
							  const char *spheroid,

							  const char
							  *prime_meridian,
							  const char *datum,
							  const char
							  *projection,
							  const char *unit,
							  const char *axis_1,
................................................................................

    SPATIALITE_PRIVATE void initialize_epsg (int filter,
					     struct epsg_defs **first,
					     struct epsg_defs **last);

    SPATIALITE_PRIVATE void free_epsg (struct epsg_defs *first);



    SPATIALITE_PRIVATE int checkSpatialMetaData (const void *sqlite);




    SPATIALITE_PRIVATE int delaunay_triangle_check (void *pg);

    SPATIALITE_PRIVATE void *voronoj_build (int pgs, void *first,
					    double extra_frame_size);

    SPATIALITE_PRIVATE void *voronoj_build_r (const void *p_cache, int pgs,
					      void *first,
................................................................................
    SPATIALITE_PRIVATE void getProjParams (void *p_sqlite, int srid,
					   char **params);

    SPATIALITE_PRIVATE int getEllipsoidParams (void *p_sqlite, int srid,
					       double *a, double *b,
					       double *rf);

    SPATIALITE_PRIVATE void addVectorLayer (void *list, const char *layer_type,

					    const char *table_name,
					    const char *geometry_column,
					    int geometry_type, int srid,
					    int spatial_index);

    SPATIALITE_PRIVATE void addVectorLayerExtent (void *list,
						  const char *table_name,
................................................................................
						  const char *geometry_column,
						  int count, double min_x,
						  double min_y, double max_x,
						  double max_y);

    SPATIALITE_PRIVATE void addLayerAttributeField (void *list,
						    const char *table_name,

						    const char *geometry_column,
						    int ordinal,
						    const char *column_name,
						    int null_values,
						    int integer_values,
						    int double_values,
						    int text_values,
						    int blob_values,
................................................................................
						    void *integer_min,
						    void *integer_max,
						    int null_double_range,
						    double double_min,
						    double double_max);

    SPATIALITE_PRIVATE int createStylingTables (void *p_sqlite, int relaxed);
    SPATIALITE_PRIVATE int createStylingTables_ex (void *p_sqlite, int relaxed,

						   int transaction);

    SPATIALITE_PRIVATE int register_external_graphic (void *p_sqlite,
						      const char *xlink_href,
						      const unsigned char
						      *p_blob, int n_bytes,
						      const char *title,
................................................................................
							  int srid);

    SPATIALITE_PRIVATE int unregister_raster_coverage_srid (void *p_sqlite,
							    const char
							    *coverage_name,
							    int srid);













    SPATIALITE_PRIVATE int update_raster_coverage_extent (void *p_sqlite,
							  const void *cache,
							  const char
							  *coverage_name,
							  int transaction);

    /* DEPRECATED - always use register_styled_group_ex */
    SPATIALITE_PRIVATE int register_styled_group (void *p_sqlite,
						  const char *group_name,
						  const char *f_table_name,

						  const char *f_geometry_column,
						  const char *coverage_name,
						  int paint_order);

    SPATIALITE_PRIVATE int register_styled_group_ex (void *p_sqlite,
						     const char *group_name,
						     const char
						     *vector_coverage_name,
................................................................................
    SPATIALITE_PRIVATE int register_group_style (void *p_sqlite,
						 const char *group_name,
						 int style_id,
						 const unsigned char *p_blob,
						 int n_bytes);

    SPATIALITE_PRIVATE int register_group_style_ex (void *p_sqlite,
						    const unsigned char *p_blob,
						    int n_bytes);

    SPATIALITE_PRIVATE int unregister_group_style (void *p_sqlite, int style_id,

						   const char *style_name,
						   int remove_all);

    SPATIALITE_PRIVATE int reload_group_style (void *p_sqlite, int style_id,
					       const char *style_name,
					       const unsigned char *p_blob,
					       int n_bytes);

    SPATIALITE_PRIVATE int register_styled_group_style (void *p_sqlite,

							const char *group_name,
							int style_id,
							const char *style_name);

    SPATIALITE_PRIVATE int unregister_styled_group_style (void *p_sqlite,
							  const char
							  *group_name,
							  int style_id,
................................................................................
						  const unsigned char *p_blob,
						  int n_bytes, void *p_id,
						  const char *fileIdentifier);

    SPATIALITE_PRIVATE int createRasterCoveragesTable (void *p_sqlite);

    SPATIALITE_PRIVATE int checkPopulatedCoverage (void *p_sqlite,

						   const char *coverage_name);

    SPATIALITE_PRIVATE int createVectorCoveragesTable (void *p_sqlite);

    SPATIALITE_PRIVATE int register_vector_coverage (void *p_sqlite,

						     const char *coverage_name,
						     const char *f_table_name,
						     const char
						     *f_geometry_column,
						     const char *title,
						     const char *abstract);











































    SPATIALITE_PRIVATE int unregister_vector_coverage (void *p_sqlite,
						       const char
						       *coverage_name);

    SPATIALITE_PRIVATE int set_vector_coverage_infos (void *p_sqlite,

						      const char *coverage_name,
						      const char *title,
						      const char *abstract);









    SPATIALITE_PRIVATE int register_vector_coverage_srid (void *p_sqlite,
							  const char
							  *coverage_name,
							  int srid);

    SPATIALITE_PRIVATE int unregister_vector_coverage_srid (void *p_sqlite,
							    const char
							    *coverage_name,
							    int srid);













    SPATIALITE_PRIVATE int update_vector_coverage_extent (void *p_sqlite,
							  const void *cache,
							  const char
							  *coverage_name,
							  int transaction);


    SPATIALITE_PRIVATE const char *splite_lwgeom_version (void);





    SPATIALITE_PRIVATE void splite_lwgeom_init (void);















































































































































    SPATIALITE_PRIVATE void splite_free_geos_cache_item (struct
							 splite_geos_cache_item
							 *p);

    SPATIALITE_PRIVATE void splite_free_geos_cache_item_r (const void *p_cache,

							   struct
							   splite_geos_cache_item
							   *p);

    SPATIALITE_PRIVATE void splite_free_xml_schema_cache_item (struct
							       splite_xmlSchema_cache_item
							       *p);
................................................................................

    SPATIALITE_PRIVATE void vxpath_free_namespaces (struct vxpath_namespaces
						    *ns_list);

    SPATIALITE_PRIVATE struct vxpath_namespaces *vxpath_get_namespaces (void
									*p_xml_doc);

    SPATIALITE_PRIVATE int vxpath_eval_expr (const void *p_cache, void *xml_doc,

					     const char *xpath_expr,
					     void *p_xpathCtx,
					     void *p_xpathObj);

    SPATIALITE_PRIVATE void *register_spatialite_sql_functions (void *db,
								const void
								*cache);
................................................................................

    SPATIALITE_PRIVATE void geos_warning (const char *fmt, ...);

    SPATIALITE_PRIVATE void splite_cache_semaphore_lock (void);

    SPATIALITE_PRIVATE void splite_cache_semaphore_unlock (void);

    SPATIALITE_PRIVATE void splite_lwgeom_semaphore_lock (void);

    SPATIALITE_PRIVATE void splite_lwgeom_semaphore_unlock (void);

    SPATIALITE_PRIVATE const void *gaiaAuxClonerCreate (const void *sqlite,
							const char *db_prefix,
							const char *in_table,
							const char *out_table);










    SPATIALITE_PRIVATE void gaiaAuxClonerDestroy (const void *cloner);

    SPATIALITE_PRIVATE void gaiaAuxClonerAddOption (const void *cloner,
						    const char *option);

    SPATIALITE_PRIVATE int gaiaAuxClonerCheckValidTarget (const void *cloner);

    SPATIALITE_PRIVATE int gaiaAuxClonerExecute (const void *cloner);





























































































































































































































































































































































































































































































#ifdef __cplusplus
}
#endif

#endif				/* _SPATIALITE_PRIVATE_H */

Changes to src/md5/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

noinst_HEADERS = md5.h
noinst_LTLIBRARIES = libmd5.la md5.la

libmd5_la_SOURCES = md5.c gaia_md5.c

md5_la_SOURCES = md5.c gaia_md5.c

md5_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
md5_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
md5_la_CPPFLAGS += -DLOADABLE_EXTENSION
md5_la_LDFLAGS = -module
md5_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|









|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

noinst_HEADERS = md5.h
noinst_LTLIBRARIES = libmd5.la md5.la

libmd5_la_SOURCES = md5.c gaia_md5.c

md5_la_SOURCES = md5.c gaia_md5.c

md5_la_CPPFLAGS = @CFLAGS@
md5_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
md5_la_CPPFLAGS += -DLOADABLE_EXTENSION
md5_la_LDFLAGS = -module
md5_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/md5/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
..
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
86
87
88
89
90
91
92


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
...
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
331
332
333
334
335
336
337

338
339
340
341
342
343
344
...
622
623
624
625
626
627
628
629
630
631
632
633
634
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/md5


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
	$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libmd5_la_LIBADD =
am_libmd5_la_OBJECTS = md5.lo gaia_md5.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I.
noinst_HEADERS = md5.h
noinst_LTLIBRARIES = libmd5.la md5.la
libmd5_la_SOURCES = md5.c gaia_md5.c
md5_la_SOURCES = md5.c gaia_md5.c
md5_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
md5_la_LDFLAGS = -module
md5_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/md5/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/md5/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|







 







|
<
<
<
<
<
<
<
<
<
<







 







>
>







<
<







 







<







 







|




|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
..
12
13
14
15
16
17
18
19










20
21
22
23
24
25
26
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91


92
93
94
95
96
97
98
...
164
165
166
167
168
169
170

171
172
173
174
175
176
177
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
...
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
...
612
613
614
615
616
617
618


619
620
621
622
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
................................................................................
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/md5
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)


mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libmd5_la_LIBADD =
am_libmd5_la_OBJECTS = md5.lo gaia_md5.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I.
noinst_HEADERS = md5.h
noinst_LTLIBRARIES = libmd5.la md5.la
libmd5_la_SOURCES = md5.c gaia_md5.c
md5_la_SOURCES = md5.c gaia_md5.c
md5_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
md5_la_LDFLAGS = -module
md5_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/md5/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/md5/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/md5/gaia_md5.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*

 gaia_md5.c -- a thin wrapper built around the original MD5
               implementation from Alexander Peslyak 
               (released on the Public Domain)

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
GAIAAUX_DECLARE void
gaiaUpdateMD5Checksum (void *p_md5, const unsigned char *blob, int blob_len)
{
/* progressively updating the MD5 checksum */
    MD5_CTX *md5 = (MD5_CTX *) p_md5;
    if (md5 == NULL || blob == NULL)
	return;
    splite_MD5_Update (md5, (void *) blob, blob_len);
}

GAIAAUX_DECLARE char *
gaiaFinalizeMD5Checksum (void *p_md5)
{
/* return the current MD5 checksum and resets the MD5 object */
    int i;






|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*

 gaia_md5.c -- a thin wrapper built around the original MD5
               implementation from Alexander Peslyak 
               (released on the Public Domain)

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
GAIAAUX_DECLARE void
gaiaUpdateMD5Checksum (void *p_md5, const unsigned char *blob, int blob_len)
{
/* progressively updating the MD5 checksum */
    MD5_CTX *md5 = (MD5_CTX *) p_md5;
    if (md5 == NULL || blob == NULL)
	return;
    splite_MD5_Update (md5, (void *)blob, blob_len);
}

GAIAAUX_DECLARE char *
gaiaFinalizeMD5Checksum (void *p_md5)
{
/* return the current MD5 checksum and resets the MD5 object */
    int i;

Changes to src/md5/md5.c.

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180


181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
	(ctx->block[(n)])
#endif

/*
 * This processes one or more 64-byte data blocks, but does NOT update
 * the bit counters.  There are no alignment requirements.
 */
static void *
body (MD5_CTX * ctx, void *data, unsigned long size)
{
    unsigned char *ptr;
    MD5_u32plus a, b, c, d;
    MD5_u32plus saved_a, saved_b, saved_c, saved_d;

    ptr = data;

    a = ctx->a;
    b = ctx->b;
    c = ctx->c;
    d = ctx->d;

    do
      {
	  saved_a = a;
	  saved_b = b;
	  saved_c = c;
	  saved_d = d;

/* Round 1 */
	  STEP (F, a, b, c, d, SET (0), 0xd76aa478, 7)
	      STEP (F, d, a, b, c, SET (1), 0xe8c7b756, 12)
	      STEP (F, c, d, a, b, SET (2), 0x242070db, 17)
	      STEP (F, b, c, d, a, SET (3), 0xc1bdceee, 22)
	      STEP (F, a, b, c, d, SET (4), 0xf57c0faf, 7)
	      STEP (F, d, a, b, c, SET (5), 0x4787c62a, 12)
	      STEP (F, c, d, a, b, SET (6), 0xa8304613, 17)
	      STEP (F, b, c, d, a, SET (7), 0xfd469501, 22)
	      STEP (F, a, b, c, d, SET (8), 0x698098d8, 7)
	      STEP (F, d, a, b, c, SET (9), 0x8b44f7af, 12)
	      STEP (F, c, d, a, b, SET (10), 0xffff5bb1, 17)
	      STEP (F, b, c, d, a, SET (11), 0x895cd7be, 22)
	      STEP (F, a, b, c, d, SET (12), 0x6b901122, 7)
	      STEP (F, d, a, b, c, SET (13), 0xfd987193, 12)
	      STEP (F, c, d, a, b, SET (14), 0xa679438e, 17)
	      STEP (F, b, c, d, a, SET (15), 0x49b40821, 22)

/* Round 2 */
	      STEP (G, a, b, c, d, GET (1), 0xf61e2562, 5)
	      STEP (G, d, a, b, c, GET (6), 0xc040b340, 9)
	      STEP (G, c, d, a, b, GET (11), 0x265e5a51, 14)
	      STEP (G, b, c, d, a, GET (0), 0xe9b6c7aa, 20)
	      STEP (G, a, b, c, d, GET (5), 0xd62f105d, 5)
	      STEP (G, d, a, b, c, GET (10), 0x02441453, 9)
	      STEP (G, c, d, a, b, GET (15), 0xd8a1e681, 14)
	      STEP (G, b, c, d, a, GET (4), 0xe7d3fbc8, 20)
	      STEP (G, a, b, c, d, GET (9), 0x21e1cde6, 5)
	      STEP (G, d, a, b, c, GET (14), 0xc33707d6, 9)
	      STEP (G, c, d, a, b, GET (3), 0xf4d50d87, 14)
	      STEP (G, b, c, d, a, GET (8), 0x455a14ed, 20)
	      STEP (G, a, b, c, d, GET (13), 0xa9e3e905, 5)
	      STEP (G, d, a, b, c, GET (2), 0xfcefa3f8, 9)
	      STEP (G, c, d, a, b, GET (7), 0x676f02d9, 14)
	      STEP (G, b, c, d, a, GET (12), 0x8d2a4c8a, 20)

/* Round 3 */
	      STEP (H, a, b, c, d, GET (5), 0xfffa3942, 4)
	      STEP (H, d, a, b, c, GET (8), 0x8771f681, 11)
	      STEP (H, c, d, a, b, GET (11), 0x6d9d6122, 16)
	      STEP (H, b, c, d, a, GET (14), 0xfde5380c, 23)
	      STEP (H, a, b, c, d, GET (1), 0xa4beea44, 4)
	      STEP (H, d, a, b, c, GET (4), 0x4bdecfa9, 11)
	      STEP (H, c, d, a, b, GET (7), 0xf6bb4b60, 16)
	      STEP (H, b, c, d, a, GET (10), 0xbebfbc70, 23)
	      STEP (H, a, b, c, d, GET (13), 0x289b7ec6, 4)
	      STEP (H, d, a, b, c, GET (0), 0xeaa127fa, 11)
	      STEP (H, c, d, a, b, GET (3), 0xd4ef3085, 16)
	      STEP (H, b, c, d, a, GET (6), 0x04881d05, 23)
	      STEP (H, a, b, c, d, GET (9), 0xd9d4d039, 4)
	      STEP (H, d, a, b, c, GET (12), 0xe6db99e5, 11)
	      STEP (H, c, d, a, b, GET (15), 0x1fa27cf8, 16)
	      STEP (H, b, c, d, a, GET (2), 0xc4ac5665, 23)

/* Round 4 */
	      STEP (I, a, b, c, d, GET (0), 0xf4292244, 6)
	      STEP (I, d, a, b, c, GET (7), 0x432aff97, 10)
	      STEP (I, c, d, a, b, GET (14), 0xab9423a7, 15)
	      STEP (I, b, c, d, a, GET (5), 0xfc93a039, 21)
	      STEP (I, a, b, c, d, GET (12), 0x655b59c3, 6)
	      STEP (I, d, a, b, c, GET (3), 0x8f0ccc92, 10)
	      STEP (I, c, d, a, b, GET (10), 0xffeff47d, 15)
	      STEP (I, b, c, d, a, GET (1), 0x85845dd1, 21)
	      STEP (I, a, b, c, d, GET (8), 0x6fa87e4f, 6)
	      STEP (I, d, a, b, c, GET (15), 0xfe2ce6e0, 10)
	      STEP (I, c, d, a, b, GET (6), 0xa3014314, 15)
	      STEP (I, b, c, d, a, GET (13), 0x4e0811a1, 21)
	      STEP (I, a, b, c, d, GET (4), 0xf7537e82, 6)
	      STEP (I, d, a, b, c, GET (11), 0xbd3af235, 10)
	      STEP (I, c, d, a, b, GET (2), 0x2ad7d2bb, 15)
	      STEP (I, b, c, d, a, GET (9), 0xeb86d391, 21) a += saved_a;


	  b += saved_b;
	  c += saved_c;
	  d += saved_d;

	  ptr += 64;
      }
    while (size -= 64);

    ctx->a = a;
    ctx->b = b;
    ctx->c = c;
    ctx->d = d;

    return ptr;
}

/* 
  Sandro Furieri - SpatiaLite - 2013-06-03 

  simply re-declaring all these functions as PRIVATE
  (not externally visible outside libspatialite itself)
*/

MD5_PRIVATE void
splite_MD5_Init (MD5_CTX * ctx)
{
    ctx->a = 0x67452301;
    ctx->b = 0xefcdab89;
    ctx->c = 0x98badcfe;
    ctx->d = 0x10325476;

    ctx->lo = 0;
    ctx->hi = 0;
}

MD5_PRIVATE void
splite_MD5_Update (MD5_CTX * ctx, void *data, unsigned long size)
{
    MD5_u32plus saved_lo;
    unsigned long used, free;

    saved_lo = ctx->lo;
    if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
	ctx->hi++;
    ctx->hi += size >> 29;

    used = saved_lo & 0x3f;

    if (used)
      {
	  free = 64 - used;

	  if (size < free)
	    {
		memcpy (&ctx->buffer[used], data, size);
		return;
	    }

	  memcpy (&ctx->buffer[used], data, free);
	  data = (unsigned char *) data + free;
	  size -= free;
	  body (ctx, ctx->buffer, 64);
      }

    if (size >= 64)
      {
	  data = body (ctx, data, size & ~(unsigned long) 0x3f);
	  size &= 0x3f;
      }

    memcpy (ctx->buffer, data, size);
}

MD5_PRIVATE void
splite_MD5_Final (unsigned char *result, MD5_CTX * ctx)
{
    unsigned long used, free;

    used = ctx->lo & 0x3f;

    ctx->buffer[used++] = 0x80;

    free = 64 - used;

    if (free < 8)
      {
	  memset (&ctx->buffer[used], 0, free);
	  body (ctx, ctx->buffer, 64);
	  used = 0;
	  free = 64;
      }

    memset (&ctx->buffer[used], 0, free - 8);

    ctx->lo <<= 3;
    ctx->buffer[56] = (char) (ctx->lo);
    ctx->buffer[57] = (char) (ctx->lo >> 8);
    ctx->buffer[58] = (char) (ctx->lo >> 16);
    ctx->buffer[59] = (char) (ctx->lo >> 24);
    ctx->buffer[60] = (char) (ctx->hi);
    ctx->buffer[61] = (char) (ctx->hi >> 8);
    ctx->buffer[62] = (char) (ctx->hi >> 16);
    ctx->buffer[63] = (char) (ctx->hi >> 24);

    body (ctx, ctx->buffer, 64);

    result[0] = (char) (ctx->a);
    result[1] = (char) (ctx->a >> 8);
    result[2] = (char) (ctx->a >> 16);
    result[3] = (char) (ctx->a >> 24);
    result[4] = (char) (ctx->b);
    result[5] = (char) (ctx->b >> 8);
    result[6] = (char) (ctx->b >> 16);
    result[7] = (char) (ctx->b >> 24);
    result[8] = (char) (ctx->c);
    result[9] = (char) (ctx->c >> 8);
    result[10] = (char) (ctx->c >> 16);
    result[11] = (char) (ctx->c >> 24);
    result[12] = (char) (ctx->d);
    result[13] = (char) (ctx->d >> 8);
    result[14] = (char) (ctx->d >> 16);
    result[15] = (char) (ctx->d >> 24);

    memset (ctx, 0, sizeof (*ctx));
}

#endif







<
|

|
|
|

|

|
|
|
|

|
<
|
|
|
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
|
|
|

|
<
|

|
|
|
|

|









|
<

|
|
|
|

|
|


<
|

|
|

|
|
|
|

|

|
<
|

|
<
|
|
|

|
|
|
|
|

|
<
|
|
|

|


<
|

|

|

|

|

|
<
|
|
|
|
|

|

|
|
|
|
|
|
|
|
|

|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|



85
86
87
88
89
90
91

92
93
94
95
96
97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

207
208
209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224
225
226
227
228
229

230
231
232

233
234
235
236
237
238
239
240
241
242
243

244
245
246
247
248
249
250

251
252
253
254
255
256
257
258
259
260
261

262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
	(ctx->block[(n)])
#endif

/*
 * This processes one or more 64-byte data blocks, but does NOT update
 * the bit counters.  There are no alignment requirements.
 */

static void *body(MD5_CTX *ctx, void *data, unsigned long size)
{
	unsigned char *ptr;
	MD5_u32plus a, b, c, d;
	MD5_u32plus saved_a, saved_b, saved_c, saved_d;

	ptr = data;

	a = ctx->a;
	b = ctx->b;
	c = ctx->c;
	d = ctx->d;

	do {

		saved_a = a;
		saved_b = b;
		saved_c = c;
		saved_d = d;

/* Round 1 */
		STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
		STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
		STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
		STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
		STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
		STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
		STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
		STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
		STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
		STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
		STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
		STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
		STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
		STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
		STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
		STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)

/* Round 2 */
		STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
		STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
		STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
		STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
		STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
		STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
		STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
		STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
		STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
		STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
		STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
		STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
		STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
		STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
		STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
		STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)

/* Round 3 */
		STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
		STEP(H, d, a, b, c, GET(8), 0x8771f681, 11)
		STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
		STEP(H, b, c, d, a, GET(14), 0xfde5380c, 23)
		STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
		STEP(H, d, a, b, c, GET(4), 0x4bdecfa9, 11)
		STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
		STEP(H, b, c, d, a, GET(10), 0xbebfbc70, 23)
		STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
		STEP(H, d, a, b, c, GET(0), 0xeaa127fa, 11)
		STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
		STEP(H, b, c, d, a, GET(6), 0x04881d05, 23)
		STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
		STEP(H, d, a, b, c, GET(12), 0xe6db99e5, 11)
		STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
		STEP(H, b, c, d, a, GET(2), 0xc4ac5665, 23)

/* Round 4 */
		STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
		STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
		STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
		STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
		STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
		STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
		STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
		STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
		STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
		STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
		STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
		STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
		STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
		STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
		STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
		STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)

		a += saved_a;
		b += saved_b;
		c += saved_c;
		d += saved_d;

		ptr += 64;

	} while (size -= 64);

	ctx->a = a;
	ctx->b = b;
	ctx->c = c;
	ctx->d = d;

	return ptr;
}

/* 
  Sandro Furieri - SpatiaLite - 2013-06-03 

  simply re-declaring all these functions as PRIVATE
  (not externally visible outside libspatialite itself)
*/

MD5_PRIVATE void splite_MD5_Init(MD5_CTX *ctx)

{
	ctx->a = 0x67452301;
	ctx->b = 0xefcdab89;
	ctx->c = 0x98badcfe;
	ctx->d = 0x10325476;

	ctx->lo = 0;
	ctx->hi = 0;
}


MD5_PRIVATE void splite_MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
{
	MD5_u32plus saved_lo;
	unsigned long used, free;

	saved_lo = ctx->lo;
	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
		ctx->hi++;
	ctx->hi += size >> 29;

	used = saved_lo & 0x3f;

	if (used) {

		free = 64 - used;

		if (size < free) {

			memcpy(&ctx->buffer[used], data, size);
			return;
		}

		memcpy(&ctx->buffer[used], data, free);
		data = (unsigned char *)data + free;
		size -= free;
		body(ctx, ctx->buffer, 64);
	}

	if (size >= 64) {

		data = body(ctx, data, size & ~(unsigned long)0x3f);
		size &= 0x3f;
	}

	memcpy(ctx->buffer, data, size);
}


MD5_PRIVATE void splite_MD5_Final(unsigned char *result, MD5_CTX *ctx)
{
	unsigned long used, free;

	used = ctx->lo & 0x3f;

	ctx->buffer[used++] = 0x80;

	free = 64 - used;

	if (free < 8) {

		memset(&ctx->buffer[used], 0, free);
		body(ctx, ctx->buffer, 64);
		used = 0;
		free = 64;
	}

	memset(&ctx->buffer[used], 0, free - 8);

	ctx->lo <<= 3;
	ctx->buffer[56] = ctx->lo;
	ctx->buffer[57] = ctx->lo >> 8;
	ctx->buffer[58] = ctx->lo >> 16;
	ctx->buffer[59] = ctx->lo >> 24;
	ctx->buffer[60] = ctx->hi;
	ctx->buffer[61] = ctx->hi >> 8;
	ctx->buffer[62] = ctx->hi >> 16;
	ctx->buffer[63] = ctx->hi >> 24;

	body(ctx, ctx->buffer, 64);

	result[0] = ctx->a;
	result[1] = ctx->a >> 8;
	result[2] = ctx->a >> 16;
	result[3] = ctx->a >> 24;
	result[4] = ctx->b;
	result[5] = ctx->b >> 8;
	result[6] = ctx->b >> 16;
	result[7] = ctx->b >> 24;
	result[8] = ctx->c;
	result[9] = ctx->c >> 8;
	result[10] = ctx->c >> 16;
	result[11] = ctx->c >> 24;
	result[12] = ctx->d;
	result[13] = ctx->d >> 8;
	result[14] = ctx->d >> 16;
	result[15] = ctx->d >> 24;

	memset(ctx, 0, sizeof(*ctx));
}

#endif

Changes to src/shapefiles/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libshapefiles.la shapefiles.la

libshapefiles_la_SOURCES = shapefiles.c validator.c

shapefiles_la_SOURCES = shapefiles.c validator.c

shapefiles_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
shapefiles_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
shapefiles_la_CPPFLAGS += -DLOADABLE_EXTENSION
shapefiles_la_LDFLAGS = -module
shapefiles_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|








|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libshapefiles.la shapefiles.la

libshapefiles_la_SOURCES = shapefiles.c validator.c

shapefiles_la_SOURCES = shapefiles.c validator.c

shapefiles_la_CPPFLAGS = @CFLAGS@
shapefiles_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
shapefiles_la_CPPFLAGS += -DLOADABLE_EXTENSION
shapefiles_la_LDFLAGS = -module
shapefiles_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/shapefiles/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
...
329
330
331
332
333
334
335

336
337
338
339
340
341
342
...
620
621
622
623
624
625
626
627
628
629
630
631
632
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/shapefiles


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libshapefiles_la_LIBADD =
am_libshapefiles_la_OBJECTS = shapefiles.lo validator.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libshapefiles.la shapefiles.la
libshapefiles_la_SOURCES = shapefiles.c validator.c
shapefiles_la_SOURCES = shapefiles.c validator.c
shapefiles_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
shapefiles_la_LDFLAGS = -module
shapefiles_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/shapefiles/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/shapefiles/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<







 







|



|
|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
164
165
166
167
168
169
170

171
172
173
174
175
176
177
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
...
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
...
611
612
613
614
615
616
617


618
619
620
621
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/shapefiles
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libshapefiles_la_LIBADD =
am_libshapefiles_la_OBJECTS = shapefiles.lo validator.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libshapefiles.la shapefiles.la
libshapefiles_la_SOURCES = shapefiles.c validator.c
shapefiles_la_SOURCES = shapefiles.c validator.c
shapefiles_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
shapefiles_la_LDFLAGS = -module
shapefiles_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/shapefiles/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/shapefiles/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/shapefiles/shapefiles.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
...
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
...
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
...
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
...
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
...
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
...
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
....
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
....
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
....
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
....
1677
1678
1679
1680
1681
1682
1683

1684
1685
1686
1687
1688
1689
1690
....
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
....
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
....
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
....
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
....
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
....
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
....
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
....
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
....
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
....
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
....
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
....
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
....
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
....
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
....
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
....
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
....
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
....
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
....
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
....
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
....
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
....
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
....
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
....
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
....
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
....
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
....
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
....
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
....
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
/*

 shapefiles.c -- implements shapefile support [import - export]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): Brad Hards <bradh@frogmouth.net>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    struct resultset_values *previous;
    struct resultset_values *current;
    int num_columns;
    sqlite3_int64 previous_rowid;
    sqlite3_int64 current_rowid;
};

struct aux_elemgeom_ignore
{
/* an Elementary Geometries Ignore option */
    char *column;
    struct aux_elemgeom_ignore *next;
};

struct aux_elemgeom_options
{
/* Elementary Geometries Options */
    struct aux_elemgeom_ignore *first;
    struct aux_elemgeom_ignore *last;
    int cast2multi;
};

static struct resultset_comparator *
create_resultset_comparator (int columns)
{
/* creating an empty resultset comparator object */
    int i;
    struct resultset_comparator *p =
	malloc (sizeof (struct resultset_comparator));
................................................................................
	  fld = fld->next;
      }
    return NULL;
}

#ifndef OMIT_ICONV		/* ICONV enabled: supporting SHP */

static int
do_check_shp_unique_pk_values (sqlite3 * sqlite, gaiaShapefilePtr shp, int srid,
			       int text_dates, const char *pk_name, int pk_type)
{
/* checking for duplicate PK values */
    char *sql;
    sqlite3_stmt *stmt = NULL;
    gaiaDbfFieldPtr dbf_field;
    int ret;
    int duplicates = 0;
    int current_row = 0;

    sql = "CREATE TABLE TEMP.check_unique_pk (pkey ANYVALUE)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
	return 0;

    sql = "INSERT INTO TEMP.check_unique_pk (pkey) VALUES (?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	goto error;

    sqlite3_exec (sqlite, "BEGIN", NULL, NULL, NULL);

    while (1)
      {
	  /* reading rows from shapefile */
	  int ok_insert = 0;
	  ret = gaiaReadShpEntity_ex (shp, current_row, srid, text_dates);
	  if (ret < 0)
	    {
		/* found a DBF deleted record */
		current_row++;
		continue;
	    }
	  if (!ret)
	      break;
	  current_row++;
	  /* binding query params */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  dbf_field = shp->Dbf->First;
	  while (dbf_field)
	    {
		/* Primary Key value */
		if (strcasecmp (pk_name, dbf_field->Name) == 0)
		  {
		      if (pk_type == SQLITE_TEXT)
			{
			    ok_insert = 1;
			    sqlite3_bind_text (stmt, 1,
					       dbf_field->Value->TxtValue,
					       strlen (dbf_field->
						       Value->TxtValue),
					       SQLITE_STATIC);
			}
		      else if (pk_type == SQLITE_FLOAT)
			{
			    ok_insert = 1;
			    sqlite3_bind_double (stmt, 1,
						 dbf_field->Value->DblValue);
			}
		      else
			{
			    ok_insert = 1;
			    sqlite3_bind_int64 (stmt, 1,
						dbf_field->Value->IntValue);
			}
		  }
		dbf_field = dbf_field->Next;
	    }
	  if (ok_insert)
	    {
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		    goto error;
	    }
      }
    sqlite3_finalize (stmt);
    stmt = NULL;
    sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);

    sql = "SELECT Count(*) FROM TEMP.check_unique_pk GROUP BY pkey";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	goto error;

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_int (stmt, 0) > 1)
		    duplicates = 1;
	    }
      }
    sqlite3_finalize (stmt);

    sqlite3_exec (sqlite, "DROP TABLE TEMP.check_unique_pk", NULL, NULL, NULL);
    if (duplicates)
	return 0;
    else
	return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);
    sqlite3_exec (sqlite, "DROP TABLE TEMP.check_unique_pk", NULL, NULL, NULL);
    return 0;
}

static char *
convert_dbf_colname_case (const char *buf, int colname_case)
{
/* converts a DBF column-name to Lower- or Upper-case */
    int len = strlen (buf);
    char *clean = malloc (len + 1);
    char *p = clean;
    strcpy (clean, buf);
    while (*p != '\0')
      {
	  if (colname_case == GAIA_DBF_COLNAME_LOWERCASE)
	    {
		if (*p >= 'A' && *p <= 'Z')
		    *p = *p - 'A' + 'a';
	    }
	  if (colname_case == GAIA_DBF_COLNAME_UPPERCASE)
	    {
		if (*p >= 'a' && *p <= 'z')
		    *p = *p - 'a' + 'A';
	    }
	  p++;
      }
    return clean;
}

SPATIALITE_DECLARE int
load_shapefile (sqlite3 * sqlite, char *shp_path, char *table, char *charset,
		int srid, char *column, int coerce2d, int compressed,
		int verbose, int spatial_index, int *rows, char *err_msg)
{
    return load_shapefile_ex (sqlite, shp_path, table, charset, srid, column,
			      NULL, NULL, coerce2d, compressed, verbose,
................................................................................
SPATIALITE_DECLARE int
load_shapefile_ex2 (sqlite3 * sqlite, char *shp_path, char *table,
		    char *charset, int srid, char *g_column, char *gtype,
		    char *pk_column, int coerce2d, int compressed,
		    int verbose, int spatial_index, int text_dates, int *rows,
		    char *err_msg)
{
    return load_shapefile_ex3 (sqlite, shp_path, table, charset, srid, g_column,
			       gtype, pk_column, coerce2d, compressed, verbose,
			       spatial_index, text_dates, rows,
			       GAIA_DBF_COLNAME_LOWERCASE, err_msg);
}

SPATIALITE_DECLARE int
load_shapefile_ex3 (sqlite3 * sqlite, char *shp_path, char *table,
		    char *charset, int srid, char *g_column, char *gtype,
		    char *pk_column, int coerce2d, int compressed,
		    int verbose, int spatial_index, int text_dates, int *rows,
		    int colname_case, char *err_msg)
{
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *errMsg = NULL;
    char *sql;
    char *dummy;
    int already_exists = 0;
    int metadata = 0;
    int sqlError = 0;
    gaiaShapefilePtr shp = NULL;
    gaiaDbfFieldPtr dbf_field;
    int cnt;
    int col_cnt = 0;
    int seed;
    int len;
    int dup;
    int idup;
    int current_row = 0;
    int deleted = 0;
    char **col_name = NULL;
    unsigned char *blob;
    int blob_size;
    char *geom_type = NULL;
    char *txt_dims;
    char *geo_column = g_column;
    char *xgtype = gtype;
    char *qtable = NULL;
    char *qpk_name = NULL;
    const char *pk_name = NULL;
    char *casename;
    int pk_autoincr = 1;
    char *xname;
    int pk_type = SQLITE_INTEGER;
    int pk_set;
    const char *alt_pk[10] =
	{ "PK_ALT0", "PK_ALT1", "PK_ALT2", "PK_ALT3", "PK_ALT4", "PK_ALT5",
	"PK_ALT6", "PK_ALT7", "PK_ALT8", "PK_ALT9"
    };
    gaiaOutBuffer sql_statement;
    if (!geo_column)
	geo_column = "Geometry";
    if (rows)
	*rows = -1;
    if (!xgtype)
	;
................................................................................
    if (pk_name == NULL)
      {
	  if (pk_column != NULL)
	      pk_name = pk_column;
	  else
	      pk_name = "PK_UID";
      }
    if (!do_check_shp_unique_pk_values
	(sqlite, shp, srid, text_dates, pk_name, pk_type))
      {
	  const char *old_pk = pk_name;
	  int antialias;
	  for (antialias = 0; antialias < 10; antialias++)
	    {
		/* searching an alternative Primary Key column name */
		int found = 0;
		pk_name = alt_pk[antialias];
		dbf_field = shp->Dbf->First;
		while (dbf_field)
		  {
		      if (strcasecmp (pk_name, dbf_field->Name) == 0)
			  found = 1;
		      dbf_field = dbf_field->Next;
		  }
		if (!found)
		  {
		      pk_autoincr = 1;
		      goto ok_pk;
		  }
	    }
	  pk_name = old_pk;
      }
  ok_pk:
    casename = convert_dbf_colname_case (pk_name, colname_case);
    qpk_name = gaiaDoubleQuotedSql (casename);
    free (casename);
    dbf_field = shp->Dbf->First;
    while (dbf_field)
      {
	  /* preparing column names */
	  char *xdummy = NULL;
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
................................................................................
	  if (strcasecmp (dummy, geo_column) == 0)
	      dup = 1;
	  if (dup)
	    {
		xdummy = sqlite3_mprintf ("COL_%d", seed++);
		spatialite_e
		    ("Warning: duplicated fieldName \"%s\" in shapefile \"%s\": "
		     "renaming the second occurrence in table \"%s\" as \"%s\".\n",
		     dummy, shp_path, table, xdummy);
		dummy = xdummy;
	    }
	  len = strlen (dummy);
	  *(col_name + cnt) = malloc (len + 1);
	  strcpy (*(col_name + cnt), dummy);
	  if (xdummy)
................................................................................
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
		/* skipping the Primary Key field */
		dbf_field = dbf_field->Next;
		cnt++;
		continue;
	    }
	  casename = convert_dbf_colname_case (*(col_name + cnt), colname_case);
	  xname = gaiaDoubleQuotedSql (casename);
	  free (casename);
	  sql = sqlite3_mprintf (",\n\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
	  cnt++;
	  switch (dbf_field->Type)
	    {
................................................................................
	    };
	  dbf_field = dbf_field->Next;
      }
    if (metadata)
	gaiaAppendToOutBuffer (&sql_statement, ")");
    else
      {
	  casename = convert_dbf_colname_case (geo_column, colname_case);
	  xname = gaiaDoubleQuotedSql (casename);
	  free (casename);
	  sql = sqlite3_mprintf (",\n\"%s\" BLOB)", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
      }
    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
      {
................................................................................
	    case GAIA_XY_Z_M:
		txt_dims = "XYZM";
		break;
	    default:
		txt_dims = "XY";
		break;
	    };
	  if (geom_type == NULL)
	    {
		/* undefined Geometry Type */
		const char *gt = "UNKNOWN";
		switch (shp->Shape)
		  {
		  case GAIA_SHP_POINT:
		  case GAIA_SHP_POINTM:
		  case GAIA_SHP_POINTZ:
		      gt = "POINT";
		      break;
		  case GAIA_SHP_MULTIPOINT:
		  case GAIA_SHP_MULTIPOINTM:
		  case GAIA_SHP_MULTIPOINTZ:
		      gt = "MULTIPOINT";
		      break;
		  case GAIA_SHP_POLYLINE:
		  case GAIA_SHP_POLYLINEM:
		  case GAIA_SHP_POLYLINEZ:
		      if (shp->EffectiveType == GAIA_LINESTRING)
			  gt = "LINESTRING";
		      else
			  gt = "MULTILINESTRING";
		      break;
		  case GAIA_SHP_POLYGON:
		  case GAIA_SHP_POLYGONM:
		  case GAIA_SHP_POLYGONZ:
		      if (shp->EffectiveType == GAIA_POLYGON)
			  gt = "POLYGON";
		      else
			  gt = "MULTIPOLYGON";
		      break;
		  };
		if (!err_msg)
		    spatialite_e
			("Error: mismatching type: requested %s but Shape is %s %s\n",
			 xgtype, gt, txt_dims);
		else
		    sprintf (err_msg,
			     "Error: mismatching type: requested %s but Shape is %s %s\n",
			     xgtype, gt, txt_dims);
		sqlError = 1;
		goto clean_up;
	    }
	  casename = convert_dbf_colname_case (geo_column, colname_case);
	  sql = sqlite3_mprintf ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)",
				 table, casename, srid, geom_type, txt_dims);
	  free (casename);
	  if (verbose)
	      spatialite_e ("%s;\n", sql);
	  ret = sqlite3_exec (sqlite, sql, NULL, 0, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		if (!err_msg)
................................................................................
	  goto clean_up;
      }
    current_row = 0;
    while (1)
      {
	  /* inserting rows from shapefile */
	  ret = gaiaReadShpEntity_ex (shp, current_row, srid, text_dates);
	  if (ret < 0)
	    {
		/* found a DBF deleted record */
		current_row++;
		deleted++;
		continue;
	    }
	  if (!ret)
	    {
		if (!(shp->LastError))	/* normal SHP EOF */
		    break;
		if (!err_msg)
		    spatialite_e ("%s\n", shp->LastError);
		else
................................................................................
		    spatialite_e ("load shapefile error: <%s>\n", errMsg);
		else
		    sprintf (err_msg, "load shapefile error: <%s>\n", errMsg);
		sqlite3_free (errMsg);
		return 0;
	    }
	  if (rows)
	      *rows = current_row - deleted;
	  if (verbose)
	      spatialite_e
		  ("\nInserted %d rows into '%s' from SHAPEFILE\n========\n",
		   current_row - deleted, table);
	  if (err_msg)
	      sprintf (err_msg, "Inserted %d rows into '%s' from SHAPEFILE",
		       current_row - deleted, table);
	  return 1;
      }
}

#endif /* end ICONV (SHP) */

static void
................................................................................
  end:
    if (srsWkt)
	free (srsWkt);
    return;
}

#ifndef OMIT_ICONV		/* ICONV enabled: supporting SHAPEFILE and DBF */


static int
get_default_dbf_fields (sqlite3 * sqlite, const char *xtable,
			const char *db_prefix, const char *table_name,
			gaiaDbfListPtr * dbf_export_list)
{
/* creating DBF field definitions for an empty DBF */
................................................................................
		else if (xtype == SQLITE_INTEGER)
		  {
		      gaiaAddDbfField (list, name, 'N', offset, 18, 0);
		      offset += 18;
		  }
		else
		  {
		      gaiaAddDbfField (list, name, 'C', offset, (char) length,
				       0);
		      offset += length;
		  }
		row++;
	    }
	  else
	      goto sql_error;
      }
................................................................................
compute_max_dbl_length (double min, double max)
{
/* determining the buffer size for some DOUBLE */
    int pos_len = 0;
    int neg_len = 1;
    sqlite3_int64 value;
    if (max >= 0.0)
	value = (sqlite3_int64) floor (max);
    else
	value = (sqlite3_int64) ceil (max);
    while (value != 0)
      {
	  pos_len++;
	  value /= 10;
      }
    if (min >= 0.0)
	return pos_len + 7;
    value = (sqlite3_int64) ceil (min);
    while (value != 0)
      {
	  neg_len++;
	  value /= 10;
      }
    if (neg_len > pos_len)
	return neg_len + 7;
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int count = 0;
		double min_x = 0.0;
		double min_y = 0.0;
		double max_x = 0.0;
		double max_y = 0.0;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    count = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
................................................................................
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* processing a VectorLayer row */
		int null_max_size = 0;
		int null_int_range = 0;
		int null_double_range = 0;
		int max_size = 0;
		sqlite3_int64 integer_min;
		sqlite3_int64 integer_max;
		double double_min = DBL_MAX;
		double double_max = 0.0 - DBL_MAX;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int ordinal = sqlite3_column_int (stmt, 2);
		const char *column_name =
		    (const char *) sqlite3_column_text (stmt, 3);
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int count = 0;
		double min_x = 0.0;
		double min_y = 0.0;
		double max_x = 0.0;
		double max_y = 0.0;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    count = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
................................................................................
}

SPATIALITE_DECLARE int
dump_shapefile (sqlite3 * sqlite, char *table, char *column, char *shp_path,
		char *charset, char *geom_type, int verbose, int *xrows,
		char *err_msg)
{
    return dump_shapefile_ex (sqlite, table, column, shp_path, charset,
			      geom_type, verbose, xrows,
			      GAIA_DBF_COLNAME_CASE_IGNORE, err_msg);
}

SPATIALITE_DECLARE int
dump_shapefile_ex (sqlite3 * sqlite, char *table, char *column, char *shp_path,
		   char *charset, char *geom_type, int verbose, int *xrows,
		   int colname_case, char *err_msg)
{
/* SHAPEFILE dump */
    char *sql;
    char *dummy;
    int shape = -1;
    int len;
    int ret;
    sqlite3_stmt *stmt;
................................................................................
    int i;
    int rows = 0;
    char buf[256];
    char *xtable;
    char *xcolumn;
    const void *blob_value;
    gaiaShapefilePtr shp = NULL;
    gaiaDbfListPtr dbf_list = NULL;
    gaiaDbfListPtr dbf_write;
    gaiaDbfFieldPtr dbf_field;
    gaiaVectorLayerPtr lyr = NULL;
    gaiaLayerAttributeFieldPtr fld;
    gaiaVectorLayersListPtr list;
    char *db_prefix = NULL;
    char *table_name = NULL;
................................................................................
/* preparing the DBF fields list */
    dbf_list = gaiaAllocDbfList ();
    offset = 0;
    fld = lyr->First;
    while (fld)
      {
	  int sql_type = SQLITE_NULL;
	  int max_len = 0;
	  if (strcasecmp (fld->AttributeFieldName, column) == 0)
	    {
		/* ignoring the Geometry itself */
		fld = fld->Next;
		continue;
	    }
	  if (fld->IntegerValuesCount > 0 && fld->DoubleValuesCount == 0
................................................................................
		    max_len = 1;
		if (max_len > 254)
		  {
		      /* DBF C: max allowed lenght */
		      max_len = 254;
		  }
		gaiaAddDbfField (dbf_list, fld->AttributeFieldName, 'C', offset,
				 (unsigned char) max_len, 0);
		offset += max_len;
	    }
	  if (sql_type == SQLITE_FLOAT)
	    {
		if (max_len > 19)
		    max_len = 19;
		if (max_len < 8)
		    max_len = 8;
		gaiaAddDbfField (dbf_list, fld->AttributeFieldName, 'N', offset,
				 (unsigned char) max_len, 6);
		offset += max_len;
	    }
	  if (sql_type == SQLITE_INTEGER)
	    {
		if (max_len > 18)
		    max_len = 18;
		gaiaAddDbfField (dbf_list, fld->AttributeFieldName, 'N', offset,
				 (unsigned char) max_len, 0);
		offset += max_len;
	    }
	  fld = fld->Next;
      }

/* resetting SQLite query */
  continue_exporting:
    ret = sqlite3_reset (stmt);
    if (ret != SQLITE_OK)
	goto sql_error;
/* trying to open shapefile files */
    shp = gaiaAllocShapefile ();
    gaiaOpenShpWriteEx (shp, shp_path, shape, dbf_list, "UTF-8", charset,
			colname_case);
    if (!(shp->Valid))
	goto no_file;
/* trying to export the .PRJ file */
    output_prj_file (sqlite, shp_path, table, column);
    while (1)
      {
	  /* scrolling the result set to dump data into shapefile */
................................................................................
    if (db_prefix != NULL)
	free (db_prefix);
    if (table_name != NULL)
	free (table_name);
    return 0;
}

static int
do_check_dbf_unique_pk_values (sqlite3 * sqlite, gaiaDbfPtr dbf, int text_dates,
			       const char *pk_name, int pk_type)
{
/* checking for duplicate PK values */
    char *sql;
    sqlite3_stmt *stmt = NULL;
    gaiaDbfFieldPtr dbf_field;
    int ret;
    int deleted;
    int duplicates = 0;
    int current_row = 0;

    sql = "CREATE TABLE TEMP.check_unique_pk (pkey ANYVALUE)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
	return 0;

    sql = "INSERT INTO TEMP.check_unique_pk (pkey) VALUES (?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	goto error;

    sqlite3_exec (sqlite, "BEGIN", NULL, NULL, NULL);

    while (1)
      {
	  /* reading rows from shapefile */
	  int ok_insert = 0;
	  ret = gaiaReadDbfEntity_ex (dbf, current_row, &deleted, text_dates);
	  if (!ret)
	      break;
	  current_row++;
	  if (deleted)
	    {
		/* skipping DBF deleted row */
		continue;
	    }
	  /* binding query params */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  dbf_field = dbf->Dbf->First;
	  while (dbf_field)
	    {
		/* Primary Key value */
		if (strcasecmp (pk_name, dbf_field->Name) == 0)
		  {
		      if (pk_type == SQLITE_TEXT)
			{
			    ok_insert = 1;
			    sqlite3_bind_text (stmt, 1,
					       dbf_field->Value->TxtValue,
					       strlen (dbf_field->
						       Value->TxtValue),
					       SQLITE_STATIC);
			}
		      else if (pk_type == SQLITE_FLOAT)
			{
			    ok_insert = 1;
			    sqlite3_bind_double (stmt, 1,
						 dbf_field->Value->DblValue);
			}
		      else
			{
			    ok_insert = 1;
			    sqlite3_bind_int64 (stmt, 1,
						dbf_field->Value->IntValue);
			}
		  }
		dbf_field = dbf_field->Next;
	    }
	  if (ok_insert)
	    {
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		    goto error;
	    }
      }
    sqlite3_finalize (stmt);
    stmt = NULL;
    sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);

    sql = "SELECT Count(*) FROM TEMP.check_unique_pk GROUP BY pkey";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	goto error;

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_int (stmt, 0) > 1)
		    duplicates = 1;
	    }
      }
    sqlite3_finalize (stmt);

    sqlite3_exec (sqlite, "DROP TABLE TEMP.check_unique_pk", NULL, NULL, NULL);
    if (duplicates)
	return 0;
    else
	return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);
    sqlite3_exec (sqlite, "DROP TABLE TEMP.check_unique_pk", NULL, NULL, NULL);
    return 0;
}

SPATIALITE_DECLARE int
load_dbf (sqlite3 * sqlite, char *dbf_path, char *table, char *charset,
	  int verbose, int *rows, char *err_msg)
{
    return load_dbf_ex (sqlite, dbf_path, table, NULL, charset, verbose, rows,
			err_msg);
}
................................................................................
}

SPATIALITE_DECLARE int
load_dbf_ex2 (sqlite3 * sqlite, char *dbf_path, char *table, char *pk_column,
	      char *charset, int verbose, int text_dates, int *rows,
	      char *err_msg)
{
    return load_dbf_ex3 (sqlite, dbf_path, table, pk_column, charset, verbose,
			 text_dates, rows, GAIA_DBF_COLNAME_LOWERCASE, err_msg);
}

SPATIALITE_DECLARE int
load_dbf_ex3 (sqlite3 * sqlite, char *dbf_path, char *table, char *pk_column,
	      char *charset, int verbose, int text_dates, int *rows,
	      int colname_case, char *err_msg)
{
    sqlite3_stmt *stmt;
    int ret;
    char *errMsg = NULL;
    char *sql;
    char *dummy;
    char *xname;
    int already_exists = 0;
................................................................................
    gaiaDbfFieldPtr dbf_field;
    int cnt;
    int col_cnt;
    int seed;
    int len;
    int dup;
    int idup;
    int current_row = 0;
    char **col_name = NULL;
    int deleted;
    char *qtable = NULL;
    char *qpk_name = NULL;
    const char *pk_name = NULL;
    char *casename;
    int pk_autoincr = 1;
    gaiaOutBuffer sql_statement;
    int pk_type = SQLITE_INTEGER;
    int pk_set;
    const char *alt_pk[10] =
	{ "PK_ALT0", "PK_ALT1", "PK_ALT2", "PK_ALT3", "PK_ALT4", "PK_ALT5",
	"PK_ALT6", "PK_ALT7", "PK_ALT8", "PK_ALT9"
    };
    qtable = gaiaDoubleQuotedSql (table);
    if (rows)
	*rows = -1;
/* checking if TABLE already exists */
    sql = sqlite3_mprintf ("SELECT name FROM sqlite_master WHERE "
			   "type = 'table' AND Lower(name) = Lower(%Q)", table);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
................................................................................
    if (pk_name == NULL)
      {
	  if (pk_column != NULL)
	      pk_name = pk_column;
	  else
	      pk_name = "PK_UID";
      }
    if (!do_check_dbf_unique_pk_values
	(sqlite, dbf, text_dates, pk_name, pk_type))
      {
	  const char *old_pk = pk_name;
	  int antialias;
	  for (antialias = 0; antialias < 10; antialias++)
	    {
		/* searching an alternative Primary Key column name */
		int found = 0;
		pk_name = alt_pk[antialias];
		dbf_field = dbf->Dbf->First;
		while (dbf_field)
		  {
		      if (strcasecmp (pk_name, dbf_field->Name) == 0)
			  found = 1;
		      dbf_field = dbf_field->Next;
		  }
		if (!found)
		  {
		      pk_autoincr = 1;
		      goto ok_pk;
		  }
	    }
	  pk_name = old_pk;
      }
  ok_pk:
    casename = convert_dbf_colname_case (pk_name, colname_case);
    qpk_name = gaiaDoubleQuotedSql (casename);
    free (casename);
    dbf_field = dbf->Dbf->First;
    while (dbf_field)
      {
	  /* preparing column names */
	  char *xdummy = NULL;
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
................................................................................
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
		/* skipping the Primary Key field */
		dbf_field = dbf_field->Next;
		cnt++;
		continue;
	    }
	  casename = convert_dbf_colname_case (*(col_name + cnt), colname_case);
	  xname = gaiaDoubleQuotedSql (casename);
	  free (casename);
	  sql = sqlite3_mprintf (",\n\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
	  cnt++;
	  switch (dbf_field->Type)
	    {
................................................................................
		goto clean_up;
	    }
      }
    sqlite3_finalize (stmt);
  clean_up:
    if (qtable)
	free (qtable);
    qtable = NULL;
    if (qpk_name)
	free (qpk_name);
    qpk_name = NULL;
    gaiaFreeDbf (dbf);
    if (col_name)
      {
	  /* releasing memory allocation for column names */
	  for (cnt = 0; cnt < col_cnt; cnt++)
	      free (*(col_name + cnt));
	  free (col_name);
................................................................................
    return dump_dbf_ex (sqlite, table, dbf_path, charset, &rows, err_msg);
}

SPATIALITE_DECLARE int
dump_dbf_ex (sqlite3 * sqlite, char *table, char *dbf_path, char *charset,
	     int *xrows, char *err_msg)
{
    return dump_dbf_ex2 (sqlite, table, dbf_path, charset, xrows,
			 GAIA_DBF_COLNAME_CASE_IGNORE, err_msg);
}

SPATIALITE_DECLARE int
dump_dbf_ex2 (sqlite3 * sqlite, char *table, char *dbf_path, char *charset,
	      int *xrows, int colname_case, char *err_msg)
{
/* DBF dump */
    int rows;
    int i;
    char *sql;
    char *xtable = NULL;
    sqlite3_stmt *stmt;
    int row1 = 0;
    int n_cols = 0;
    int offset = 0;
    int type;
    gaiaDbfPtr dbf = NULL;
    gaiaDbfListPtr dbf_export_list = NULL;
................................................................................
		i++;
		dbf_field = dbf_field->Next;
		continue;
	    }
	  if (sql_type[i] == SQLITE_TEXT)
	    {
		gaiaAddDbfField (dbf_list, dbf_field->Name, 'C', offset,
				 (unsigned char) (max_length[i]), 0);
		offset += max_length[i];
	    }
	  if (sql_type[i] == SQLITE_FLOAT)
	    {
		gaiaAddDbfField (dbf_list, dbf_field->Name, 'N', offset, 19, 6);
		offset += 19;
	    }
................................................................................
    if (ret != SQLITE_OK)
	goto sql_error;
/* trying to open the DBF file */
    dbf = gaiaAllocDbf ();
/* xfering export-list ownership */
    dbf->Dbf = dbf_list;
    dbf_list = NULL;
    gaiaOpenDbfWriteEx (dbf, dbf_path, "UTF-8", charset, colname_case);
    if (!(dbf->Valid))
	goto no_file;
    while (1)
      {
	  /* Pass II - scrolling the result set to dump data into DBF */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
................................................................................
	  return 0;
      }
    return 1;
}

static int
do_delete_duplicates (sqlite3 * sqlite, const char *sql1, const char *sql2,
		      int *count, int transaction)
{
/* deleting duplicate rows */
    struct resultset_comparator *rs_obj = NULL;
    sqlite3_stmt *stmt1 = NULL;
    sqlite3_stmt *stmt2 = NULL;
    int ret;
    int cnt = 0;
    char *sql_err = NULL;

    *count = 0;

    if (transaction)
      {
	  /* the complete operation is handled as an unique SQL Transaction */
	  ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &sql_err);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("BEGIN TRANSACTION error: %s\n", sql_err);
		sqlite3_free (sql_err);
		return 0;
	    }
      }

/* preparing the main SELECT statement */
    ret = sqlite3_prepare_v2 (sqlite, sql1, strlen (sql1), &stmt1, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", sqlite3_errmsg (sqlite));
	  return 0;
      }
................................................................................
	  swap_resultset_rows (rs_obj);
      }

    sqlite3_finalize (stmt1);
    sqlite3_finalize (stmt2);
    destroy_resultset_comparator (rs_obj);

    if (transaction)
      {
	  /* confirm the still pending Transaction */
	  ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &sql_err);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("COMMIT TRANSACTION error: %s\n", sql_err);
		sqlite3_free (sql_err);
		return 0;
	    }
      }

    *count = cnt;
    return 1;

  error:
    *count = 0;
    if (stmt1)
	sqlite3_finalize (stmt1);
    if (stmt2)
	sqlite3_finalize (stmt2);

    if (transaction)
      {
	  /* performing a ROLLBACK anyway */
	  ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &sql_err);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("ROLLBACK TRANSACTION error: %s\n", sql_err);
		sqlite3_free (sql_err);
		return 0;
	    }
      }

    return 0;
}

SPATIALITE_DECLARE void
remove_duplicated_rows_ex2 (sqlite3 * sqlite, char *table, int *removed,
			    int transaction)
{
/* attempting to delete Duplicate rows from a table */
    char *sql;
    char *sql2;
    int first = 1;
    char *xname;
    int pk;
................................................................................
    sql2 = sqlite3_mprintf ("DELETE FROM \"%s\" WHERE ROWID = ?", xname);
    free (xname);

    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	sql = sql_statement.Buffer;
    else
	sql = "NULL-SELECT";
    if (do_delete_duplicates (sqlite, sql, sql2, &count, transaction))
      {
	  if (removed == NULL)
	    {
		if (!count)
		    spatialite_e ("No duplicated rows have been identified\n");
		else
		    spatialite_e ("%d duplicated rows deleted from: %s\n",
................................................................................
	  else
	      *removed = count;
      }
    gaiaOutBufferReset (&sql_statement);
    sqlite3_free (sql2);
}

SPATIALITE_DECLARE void
remove_duplicated_rows_ex (sqlite3 * sqlite, char *table, int *removed)
{
/* attempting to delete Duplicate rows from a table */
    remove_duplicated_rows_ex2 (sqlite, table, removed, 1);
}

SPATIALITE_DECLARE void
remove_duplicated_rows (sqlite3 * sqlite, char *table)
{
/* attempting to delete Duplicate rows from a table */
    remove_duplicated_rows_ex (sqlite, table, NULL);
}

................................................................................
}

SPATIALITE_DECLARE void
elementary_geometries_ex (sqlite3 * sqlite,
			  char *inTable, char *geometry, char *outTable,
			  char *pKey, char *multiId, int *xrows)
{
/* attempting to create a derived table surely containing elemetary Geoms */
    elementary_geometries_ex2 (sqlite, inTable, geometry, outTable, pKey,
			       multiId, xrows, 1);
}

SPATIALITE_DECLARE void
elementary_geometries_ex2 (sqlite3 * sqlite,
			   char *inTable, char *geometry, char *outTable,
			   char *pKey, char *multiId, int *xrows,
			   int transaction)
{
/* attempting to create a derived table surely containing elemetary Geoms */
    elementary_geometries_ex3 (sqlite, inTable, geometry, outTable, pKey,
			       multiId, NULL, xrows, transaction);
}

static int
test_elemgeom_ignore (struct aux_elemgeom_options *options, const char *column)
{
/* testing for a column to be ignored */
    struct aux_elemgeom_ignore *ign;
    if (options == NULL)
	return 0;

    ign = options->first;
    while (ign != NULL)
      {
	  if (strcasecmp (ign->column, column) == 0)
	      return 1;
	  ign = ign->next;
      }
    return 0;
}

SPATIALITE_DECLARE void
elementary_geometries_ex3 (sqlite3 * sqlite,
			   char *inTable, char *geometry, char *outTable,
			   char *pKey, char *multiId, const void *opts,
			   int *xrows, int transaction)
{
/* attempting to create a derived table surely containing elemetary Geoms */
    char type[128];
    int srid;
    char dims[64];
    char *sql;
    char *xname;
    char *xpk;
................................................................................
    int ret;
    int comma = 0;
    char *errMsg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int i_col;
    int geom_idx = -1;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int n_columns;
    sqlite3_int64 id = 0;
    int inserted = 0;
    struct aux_elemgeom_options *options = (struct aux_elemgeom_options *) opts;

    if (check_elementary
	(sqlite, inTable, geometry, outTable, pKey, multiId, type, &srid,
	 dims) == 0)
      {
	  spatialite_e (".elemgeo: invalid args\n");
	  *xrows = 0;
	  return;
      }

    if (transaction)
      {
	  /* starts a transaction */
	  ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("SQL error: %s\n", errMsg);
		sqlite3_free (errMsg);
		goto abort;
	    }
      }

    gaiaOutBufferInitialize (&sql_statement);
    gaiaOutBufferInitialize (&sql2);
    gaiaOutBufferInitialize (&sql3);
    gaiaOutBufferInitialize (&sql4);

................................................................................
	  sqlite3_free (errMsg);
	  goto abort;
      }
    if (rows < 1)
	;
    else
      {
	  i_col = 0;
	  for (i = 1; i <= rows; i++)
	    {
		if (test_elemgeom_ignore (options, results[(i * columns) + 1])
		    && strcasecmp (geometry, results[(i * columns) + 1]) != 0)
		  {
		      /* skipping a column to be ignored */
		      continue;
		  }
		i_col++;
		xname = gaiaDoubleQuotedSql (results[(i * columns) + 1]);
		if (comma)
		    sql = sqlite3_mprintf (", \"%s\"", xname);
		else
		  {
		      comma = 1;
		      sql = sqlite3_mprintf ("\"%s\"", xname);
		  }
		free (xname);
		gaiaAppendToOutBuffer (&sql_statement, sql);
		gaiaAppendToOutBuffer (&sql2, sql);
		if (strcasecmp (geometry, results[(i * columns) + 1]) == 0)
		  {
		      int cast2multi = 0;
		      if (options != NULL)
			  cast2multi = options->cast2multi;
		      if (cast2multi)
			  gaiaAppendToOutBuffer (&sql3, ", CastToMulti(?)");
		      else
			  gaiaAppendToOutBuffer (&sql3, ", ?");
		  }
		else
		    gaiaAppendToOutBuffer (&sql3, ", ?");
		sqlite3_free (sql);

		if (strcasecmp (geometry, results[(i * columns) + 1]) == 0)
		    geom_idx = i_col - 1;
		else
		  {
		      xname = gaiaDoubleQuotedSql (results[(i * columns) + 1]);
		      if (atoi (results[(i * columns) + 3]) != 0)
			  sql =
			      sqlite3_mprintf (",\n\t\"%s\" %s NOT NULL", xname,
					       results[(i * columns) + 2]);
................................................................................
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    gaiaAppendToOutBuffer (&sql2, sql3.Buffer);
    gaiaAppendToOutBuffer (&sql2, ")");
    gaiaAppendToOutBuffer (&sql4, ")");
    gaiaOutBufferReset (&sql3);

    if (options != NULL)
      {
	  if (options->cast2multi)
	    {
		char multi_type[128];
		if (strcasecmp (type, "POINT") == 0)
		    strcpy (multi_type, "MULTIPOINT");
		else if (strcasecmp (type, "LINESTRING") == 0)
		    strcpy (multi_type, "MULTILINESTRING");
		else if (strcasecmp (type, "POLYGON") == 0)
		    strcpy (multi_type, "MULTIPOLYGON");
		else
		    strcpy (multi_type, type);
		sql_geom =
		    sqlite3_mprintf
		    ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)", outTable,
		     geometry, srid, multi_type, dims);
	    }
	  else
	    {
		sql_geom =
		    sqlite3_mprintf
		    ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)", outTable,
		     geometry, srid, type, dims);
	    }
      }
    else
      {
	  sql_geom =
	      sqlite3_mprintf ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)",
			       outTable, geometry, srid, type, dims);
      }

/* creating the output table */
    ret = sqlite3_exec (sqlite, sql4.Buffer, NULL, NULL, &errMsg);
    gaiaOutBufferReset (&sql4);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", errMsg);
................................................................................
		spatialite_e ("[IN]step error: %s\n", sqlite3_errmsg (sqlite));
		goto abort;
	    }
      }
    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);

    if (transaction)
      {
	  /* commits the transaction */
	  ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("SQL error: %s\n", errMsg);
		sqlite3_free (errMsg);
		goto abort;
	    }
      }
    *xrows = inserted;
    return;

  abort:
    if (stmt_in)
	sqlite3_finalize (stmt_in);
    if (stmt_out)
	sqlite3_finalize (stmt_out);

    if (transaction)
      {
	  /* rolling bacj the transaction */
	  ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &errMsg);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("SQL error: %s\n", errMsg);
		sqlite3_free (errMsg);
	    }
      }
    *xrows = 0;
}

#ifndef OMIT_FREEXL		/* including FreeXL */

SPATIALITE_DECLARE int
load_XL (sqlite3 * sqlite, const char *path, const char *table,
................................................................................
	goto error;
    if (info == 0)
	goto error;
    if (worksheetIndex < info)
	;
    else
	goto error;
    ret =
	freexl_select_active_worksheet (xl_handle,
					(unsigned short) worksheetIndex);
    if (ret != FREEXL_OK)
	goto error;
    ret = freexl_worksheet_dimensions (xl_handle, rows, &columns);
    if (ret != FREEXL_OK)
	goto error;
/* starting a transaction */
    ret = sqlite3_exec (sqlite, "BEGIN", NULL, 0, &errMsg);
................................................................................
    if (out)
      {
	  fclose (out);
      }
    spatialite_e ("The SQL SELECT returned no data to export...\n");
    return 0;
}

SPATIALITE_PRIVATE const void *
gaiaElemGeomOptionsCreate ()
{
/* creating an Elementary Geometries Options object */
    struct aux_elemgeom_options *options =
	malloc (sizeof (struct aux_elemgeom_options));
    options->first = NULL;
    options->last = NULL;
    options->cast2multi = 0;
    return options;
}

SPATIALITE_PRIVATE void
gaiaElemGeomOptionsDestroy (const void *opts)
{
/* destroying an Elementary Geometries Options object */
    struct aux_elemgeom_ignore *ign;
    struct aux_elemgeom_ignore *ign2;
    struct aux_elemgeom_options *options = (struct aux_elemgeom_options *) opts;
    if (options == NULL)
	return;

    ign = options->first;
    while (ign != NULL)
      {
	  ign2 = ign->next;
	  if (ign->column != NULL)
	      free (ign->column);
	  free (ign);
	  ign = ign2;
      }
    free (options);
}

static void
ignore_column (struct aux_elemgeom_options *options, const char *column)
{
/* marking a Column to be ignored */
    int len;
    struct aux_elemgeom_ignore *ign;
    if (options == NULL)
	return;

    ign = malloc (sizeof (struct aux_elemgeom_ignore));
    len = strlen (column);
    ign->column = malloc (len + 1);
    strcpy (ign->column, column);
    ign->next = NULL;

    if (options->first == NULL)
	options->first = ign;
    if (options->last != NULL)
	options->last->next = ign;
    options->last = ign;
}

SPATIALITE_PRIVATE void
gaiaElemGeomOptionsAdd (const void *opts, const char *option)
{
/* adding an Elementary Geometries Option */
    struct aux_elemgeom_options *options = (struct aux_elemgeom_options *) opts;
    if (options == NULL)
	return;

    if (strncasecmp (option, "::cast2multi::", 14) == 0)
	options->cast2multi = 1;
    if (strncasecmp (option, "::ignore::", 10) == 0)
	ignore_column (options, option + 10);
}




|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<











|




|
<



|





|
<




<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<







 







|







 







<
|
<







 







<
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<







 







<
<
<
<
<
<
<







 







|



|


|







 







>







 







|
<







 







|

|







|







 







|
|
|
|
|







 







|


|
|







 







|
|
|
|
|







 







<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







|









|







|












|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







|




|
<




<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<







 







<
|
<







 







<


<







 







<
<
<
<
<
<
<
<




|







 







|







 







|







 







|











<
<
|
|
|
|
|
|
|
|
<
<







 







<
<
|
|
|
|
|
|
|
<












<
<
|
|
|
|
|
|
|
<






|
<







 







|







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<






<










<
<
|
|
|
|
|
|
|
<







 







<


<
<
<
<
<
<
<











<
<
<
<
<
<
<
<
|
<
<
<



|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<







 







<
<
|
|
|
|
|
|
|
<









<
<
<
<
<
<
<
<
<
<
<







 







<
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
115
116
117
118
119
120
121















122
123
124
125
126
127
128
...
370
371
372
373
374
375
376














































































































































377
378
379
380
381
382
383
...
398
399
400
401
402
403
404













405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421

422
423
424
425
426
427
428
429
430
431

432
433
434
435




436
437
438
439
440
441
442
...
647
648
649
650
651
652
653



























654

655
656
657
658
659
660
661
...
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
...
747
748
749
750
751
752
753

754

755
756
757
758
759
760
761
...
788
789
790
791
792
793
794

795

796
797
798
799
800
801
802
...
976
977
978
979
980
981
982













































983
984

985
986
987
988
989
990
991
....
1096
1097
1098
1099
1100
1101
1102







1103
1104
1105
1106
1107
1108
1109
....
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
....
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
....
1494
1495
1496
1497
1498
1499
1500
1501

1502
1503
1504
1505
1506
1507
1508
....
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
....
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
....
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
....
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
....
2609
2610
2611
2612
2613
2614
2615










2616
2617
2618
2619
2620
2621
2622
....
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
....
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
....
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011

3012
3013
3014
3015
3016
3017
3018
....
3173
3174
3175
3176
3177
3178
3179





















































































































3180
3181
3182
3183
3184
3185
3186
....
3194
3195
3196
3197
3198
3199
3200









3201
3202
3203
3204
3205
3206
3207
....
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222

3223
3224
3225
3226




3227
3228
3229
3230
3231
3232
3233
....
3360
3361
3362
3363
3364
3365
3366



























3367

3368
3369
3370
3371
3372
3373
3374
....
3451
3452
3453
3454
3455
3456
3457

3458

3459
3460
3461
3462
3463
3464
3465
....
3674
3675
3676
3677
3678
3679
3680

3681
3682

3683
3684
3685
3686
3687
3688
3689
....
3737
3738
3739
3740
3741
3742
3743








3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
....
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
....
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
....
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435


4436
4437
4438
4439
4440
4441
4442
4443


4444
4445
4446
4447
4448
4449
4450
....
4488
4489
4490
4491
4492
4493
4494


4495
4496
4497
4498
4499
4500
4501

4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513


4514
4515
4516
4517
4518
4519
4520

4521
4522
4523
4524
4525
4526
4527

4528
4529
4530
4531
4532
4533
4534
....
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
....
4624
4625
4626
4627
4628
4629
4630







4631
4632
4633
4634
4635
4636
4637
....
5157
5158
5159
5160
5161
5162
5163








































5164
5165
5166
5167
5168
5169
5170
....
5177
5178
5179
5180
5181
5182
5183

5184
5185
5186
5187
5188
5189

5190
5191
5192
5193
5194
5195
5196
5197
5198
5199


5200
5201
5202
5203
5204
5205
5206

5207
5208
5209
5210
5211
5212
5213
....
5247
5248
5249
5250
5251
5252
5253

5254
5255







5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266








5267



5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
....
5296
5297
5298
5299
5300
5301
5302













5303















5304
5305

5306
5307
5308
5309
5310
5311
5312
....
5658
5659
5660
5661
5662
5663
5664


5665
5666
5667
5668
5669
5670
5671

5672
5673
5674
5675
5676
5677
5678
5679
5680











5681
5682
5683
5684
5685
5686
5687
....
5763
5764
5765
5766
5767
5768
5769

5770

5771
5772
5773
5774
5775
5776
5777
....
6151
6152
6153
6154
6155
6156
6157






































































/*

 shapefiles.c -- implements shapefile support [import - export]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): Brad Hards <bradh@frogmouth.net>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    struct resultset_values *previous;
    struct resultset_values *current;
    int num_columns;
    sqlite3_int64 previous_rowid;
    sqlite3_int64 current_rowid;
};
















static struct resultset_comparator *
create_resultset_comparator (int columns)
{
/* creating an empty resultset comparator object */
    int i;
    struct resultset_comparator *p =
	malloc (sizeof (struct resultset_comparator));
................................................................................
	  fld = fld->next;
      }
    return NULL;
}

#ifndef OMIT_ICONV		/* ICONV enabled: supporting SHP */















































































































































SPATIALITE_DECLARE int
load_shapefile (sqlite3 * sqlite, char *shp_path, char *table, char *charset,
		int srid, char *column, int coerce2d, int compressed,
		int verbose, int spatial_index, int *rows, char *err_msg)
{
    return load_shapefile_ex (sqlite, shp_path, table, charset, srid, column,
			      NULL, NULL, coerce2d, compressed, verbose,
................................................................................
SPATIALITE_DECLARE int
load_shapefile_ex2 (sqlite3 * sqlite, char *shp_path, char *table,
		    char *charset, int srid, char *g_column, char *gtype,
		    char *pk_column, int coerce2d, int compressed,
		    int verbose, int spatial_index, int text_dates, int *rows,
		    char *err_msg)
{













    sqlite3_stmt *stmt = NULL;
    int ret;
    char *errMsg = NULL;
    char *sql;
    char *dummy;
    int already_exists = 0;
    int metadata = 0;
    int sqlError = 0;
    gaiaShapefilePtr shp = NULL;
    gaiaDbfFieldPtr dbf_field;
    int cnt;
    int col_cnt;
    int seed;
    int len;
    int dup;
    int idup;
    int current_row;

    char **col_name = NULL;
    unsigned char *blob;
    int blob_size;
    char *geom_type;
    char *txt_dims;
    char *geo_column = g_column;
    char *xgtype = gtype;
    char *qtable = NULL;
    char *qpk_name = NULL;
    char *pk_name = NULL;

    int pk_autoincr = 1;
    char *xname;
    int pk_type = SQLITE_INTEGER;
    int pk_set;




    gaiaOutBuffer sql_statement;
    if (!geo_column)
	geo_column = "Geometry";
    if (rows)
	*rows = -1;
    if (!xgtype)
	;
................................................................................
    if (pk_name == NULL)
      {
	  if (pk_column != NULL)
	      pk_name = pk_column;
	  else
	      pk_name = "PK_UID";
      }



























    qpk_name = gaiaDoubleQuotedSql (pk_name);

    dbf_field = shp->Dbf->First;
    while (dbf_field)
      {
	  /* preparing column names */
	  char *xdummy = NULL;
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
................................................................................
	  if (strcasecmp (dummy, geo_column) == 0)
	      dup = 1;
	  if (dup)
	    {
		xdummy = sqlite3_mprintf ("COL_%d", seed++);
		spatialite_e
		    ("Warning: duplicated fieldName \"%s\" in shapefile \"%s\": "
		     "renaming the second occurence in table \"%s\" as \"%s\".\n",
		     dummy, shp_path, table, xdummy);
		dummy = xdummy;
	    }
	  len = strlen (dummy);
	  *(col_name + cnt) = malloc (len + 1);
	  strcpy (*(col_name + cnt), dummy);
	  if (xdummy)
................................................................................
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
		/* skipping the Primary Key field */
		dbf_field = dbf_field->Next;
		cnt++;
		continue;
	    }

	  xname = gaiaDoubleQuotedSql (*(col_name + cnt));

	  sql = sqlite3_mprintf (",\n\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
	  cnt++;
	  switch (dbf_field->Type)
	    {
................................................................................
	    };
	  dbf_field = dbf_field->Next;
      }
    if (metadata)
	gaiaAppendToOutBuffer (&sql_statement, ")");
    else
      {

	  xname = gaiaDoubleQuotedSql (geo_column);

	  sql = sqlite3_mprintf (",\n\"%s\" BLOB)", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
      }
    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
      {
................................................................................
	    case GAIA_XY_Z_M:
		txt_dims = "XYZM";
		break;
	    default:
		txt_dims = "XY";
		break;
	    };













































	  sql = sqlite3_mprintf ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)",
				 table, geo_column, srid, geom_type, txt_dims);

	  if (verbose)
	      spatialite_e ("%s;\n", sql);
	  ret = sqlite3_exec (sqlite, sql, NULL, 0, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		if (!err_msg)
................................................................................
	  goto clean_up;
      }
    current_row = 0;
    while (1)
      {
	  /* inserting rows from shapefile */
	  ret = gaiaReadShpEntity_ex (shp, current_row, srid, text_dates);







	  if (!ret)
	    {
		if (!(shp->LastError))	/* normal SHP EOF */
		    break;
		if (!err_msg)
		    spatialite_e ("%s\n", shp->LastError);
		else
................................................................................
		    spatialite_e ("load shapefile error: <%s>\n", errMsg);
		else
		    sprintf (err_msg, "load shapefile error: <%s>\n", errMsg);
		sqlite3_free (errMsg);
		return 0;
	    }
	  if (rows)
	      *rows = current_row;
	  if (verbose)
	      spatialite_e
		  ("\nInserted %d rows into '%s' from SHAPEFILE\n========\n",
		   current_row, table);
	  if (err_msg)
	      sprintf (err_msg, "Inserted %d rows into '%s' from SHAPEFILE",
		       current_row, table);
	  return 1;
      }
}

#endif /* end ICONV (SHP) */

static void
................................................................................
  end:
    if (srsWkt)
	free (srsWkt);
    return;
}

#ifndef OMIT_ICONV		/* ICONV enabled: supporting SHAPEFILE and DBF */


static int
get_default_dbf_fields (sqlite3 * sqlite, const char *xtable,
			const char *db_prefix, const char *table_name,
			gaiaDbfListPtr * dbf_export_list)
{
/* creating DBF field definitions for an empty DBF */
................................................................................
		else if (xtype == SQLITE_INTEGER)
		  {
		      gaiaAddDbfField (list, name, 'N', offset, 18, 0);
		      offset += 18;
		  }
		else
		  {
		      gaiaAddDbfField (list, name, 'C', offset, length, 0);

		      offset += length;
		  }
		row++;
	    }
	  else
	      goto sql_error;
      }
................................................................................
compute_max_dbl_length (double min, double max)
{
/* determining the buffer size for some DOUBLE */
    int pos_len = 0;
    int neg_len = 1;
    sqlite3_int64 value;
    if (max >= 0.0)
	value = floor (max);
    else
	value = ceil (max);
    while (value != 0)
      {
	  pos_len++;
	  value /= 10;
      }
    if (min >= 0.0)
	return pos_len + 7;
    value = ceil (min);
    while (value != 0)
      {
	  neg_len++;
	  value /= 10;
      }
    if (neg_len > pos_len)
	return neg_len + 7;
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int count;
		double min_x;
		double min_y;
		double max_x;
		double max_y;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    count = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
................................................................................
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		/* processing a VectorLayer row */
		int null_max_size = 0;
		int null_int_range = 0;
		int null_double_range = 0;
		int max_size;
		sqlite3_int64 integer_min;
		sqlite3_int64 integer_max;
		double double_min;
		double double_max;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int ordinal = sqlite3_column_int (stmt, 2);
		const char *column_name =
		    (const char *) sqlite3_column_text (stmt, 3);
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int count;
		double min_x;
		double min_y;
		double max_x;
		double max_y;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    count = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
................................................................................
}

SPATIALITE_DECLARE int
dump_shapefile (sqlite3 * sqlite, char *table, char *column, char *shp_path,
		char *charset, char *geom_type, int verbose, int *xrows,
		char *err_msg)
{










/* SHAPEFILE dump */
    char *sql;
    char *dummy;
    int shape = -1;
    int len;
    int ret;
    sqlite3_stmt *stmt;
................................................................................
    int i;
    int rows = 0;
    char buf[256];
    char *xtable;
    char *xcolumn;
    const void *blob_value;
    gaiaShapefilePtr shp = NULL;
    gaiaDbfListPtr dbf_list;
    gaiaDbfListPtr dbf_write;
    gaiaDbfFieldPtr dbf_field;
    gaiaVectorLayerPtr lyr = NULL;
    gaiaLayerAttributeFieldPtr fld;
    gaiaVectorLayersListPtr list;
    char *db_prefix = NULL;
    char *table_name = NULL;
................................................................................
/* preparing the DBF fields list */
    dbf_list = gaiaAllocDbfList ();
    offset = 0;
    fld = lyr->First;
    while (fld)
      {
	  int sql_type = SQLITE_NULL;
	  int max_len;
	  if (strcasecmp (fld->AttributeFieldName, column) == 0)
	    {
		/* ignoring the Geometry itself */
		fld = fld->Next;
		continue;
	    }
	  if (fld->IntegerValuesCount > 0 && fld->DoubleValuesCount == 0
................................................................................
		    max_len = 1;
		if (max_len > 254)
		  {
		      /* DBF C: max allowed lenght */
		      max_len = 254;
		  }
		gaiaAddDbfField (dbf_list, fld->AttributeFieldName, 'C', offset,
				 max_len, 0);
		offset += max_len;
	    }
	  if (sql_type == SQLITE_FLOAT)
	    {
		if (max_len > 19)
		    max_len = 19;
		if (max_len < 8)
		    max_len = 8;
		gaiaAddDbfField (dbf_list, fld->AttributeFieldName, 'N', offset,
				 max_len, 6);
		offset += max_len;
	    }
	  if (sql_type == SQLITE_INTEGER)
	    {
		if (max_len > 18)
		    max_len = 18;
		gaiaAddDbfField (dbf_list, fld->AttributeFieldName, 'N', offset,
				 max_len, 0);
		offset += max_len;
	    }
	  fld = fld->Next;
      }

/* resetting SQLite query */
  continue_exporting:
    ret = sqlite3_reset (stmt);
    if (ret != SQLITE_OK)
	goto sql_error;
/* trying to open shapefile files */
    shp = gaiaAllocShapefile ();
    gaiaOpenShpWrite (shp, shp_path, shape, dbf_list, "UTF-8", charset);

    if (!(shp->Valid))
	goto no_file;
/* trying to export the .PRJ file */
    output_prj_file (sqlite, shp_path, table, column);
    while (1)
      {
	  /* scrolling the result set to dump data into shapefile */
................................................................................
    if (db_prefix != NULL)
	free (db_prefix);
    if (table_name != NULL)
	free (table_name);
    return 0;
}






















































































































SPATIALITE_DECLARE int
load_dbf (sqlite3 * sqlite, char *dbf_path, char *table, char *charset,
	  int verbose, int *rows, char *err_msg)
{
    return load_dbf_ex (sqlite, dbf_path, table, NULL, charset, verbose, rows,
			err_msg);
}
................................................................................
}

SPATIALITE_DECLARE int
load_dbf_ex2 (sqlite3 * sqlite, char *dbf_path, char *table, char *pk_column,
	      char *charset, int verbose, int text_dates, int *rows,
	      char *err_msg)
{









    sqlite3_stmt *stmt;
    int ret;
    char *errMsg = NULL;
    char *sql;
    char *dummy;
    char *xname;
    int already_exists = 0;
................................................................................
    gaiaDbfFieldPtr dbf_field;
    int cnt;
    int col_cnt;
    int seed;
    int len;
    int dup;
    int idup;
    int current_row;
    char **col_name = NULL;
    int deleted;
    char *qtable = NULL;
    char *qpk_name = NULL;
    char *pk_name = NULL;

    int pk_autoincr = 1;
    gaiaOutBuffer sql_statement;
    int pk_type = SQLITE_INTEGER;
    int pk_set;




    qtable = gaiaDoubleQuotedSql (table);
    if (rows)
	*rows = -1;
/* checking if TABLE already exists */
    sql = sqlite3_mprintf ("SELECT name FROM sqlite_master WHERE "
			   "type = 'table' AND Lower(name) = Lower(%Q)", table);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
................................................................................
    if (pk_name == NULL)
      {
	  if (pk_column != NULL)
	      pk_name = pk_column;
	  else
	      pk_name = "PK_UID";
      }



























    qpk_name = gaiaDoubleQuotedSql (pk_name);

    dbf_field = dbf->Dbf->First;
    while (dbf_field)
      {
	  /* preparing column names */
	  char *xdummy = NULL;
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
................................................................................
	  if (strcasecmp (pk_name, dbf_field->Name) == 0)
	    {
		/* skipping the Primary Key field */
		dbf_field = dbf_field->Next;
		cnt++;
		continue;
	    }

	  xname = gaiaDoubleQuotedSql (*(col_name + cnt));

	  sql = sqlite3_mprintf (",\n\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
	  cnt++;
	  switch (dbf_field->Type)
	    {
................................................................................
		goto clean_up;
	    }
      }
    sqlite3_finalize (stmt);
  clean_up:
    if (qtable)
	free (qtable);

    if (qpk_name)
	free (qpk_name);

    gaiaFreeDbf (dbf);
    if (col_name)
      {
	  /* releasing memory allocation for column names */
	  for (cnt = 0; cnt < col_cnt; cnt++)
	      free (*(col_name + cnt));
	  free (col_name);
................................................................................
    return dump_dbf_ex (sqlite, table, dbf_path, charset, &rows, err_msg);
}

SPATIALITE_DECLARE int
dump_dbf_ex (sqlite3 * sqlite, char *table, char *dbf_path, char *charset,
	     int *xrows, char *err_msg)
{








/* DBF dump */
    int rows;
    int i;
    char *sql;
    char *xtable;
    sqlite3_stmt *stmt;
    int row1 = 0;
    int n_cols = 0;
    int offset = 0;
    int type;
    gaiaDbfPtr dbf = NULL;
    gaiaDbfListPtr dbf_export_list = NULL;
................................................................................
		i++;
		dbf_field = dbf_field->Next;
		continue;
	    }
	  if (sql_type[i] == SQLITE_TEXT)
	    {
		gaiaAddDbfField (dbf_list, dbf_field->Name, 'C', offset,
				 max_length[i], 0);
		offset += max_length[i];
	    }
	  if (sql_type[i] == SQLITE_FLOAT)
	    {
		gaiaAddDbfField (dbf_list, dbf_field->Name, 'N', offset, 19, 6);
		offset += 19;
	    }
................................................................................
    if (ret != SQLITE_OK)
	goto sql_error;
/* trying to open the DBF file */
    dbf = gaiaAllocDbf ();
/* xfering export-list ownership */
    dbf->Dbf = dbf_list;
    dbf_list = NULL;
    gaiaOpenDbfWrite (dbf, dbf_path, "UTF-8", charset);
    if (!(dbf->Valid))
	goto no_file;
    while (1)
      {
	  /* Pass II - scrolling the result set to dump data into DBF */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
................................................................................
	  return 0;
      }
    return 1;
}

static int
do_delete_duplicates (sqlite3 * sqlite, const char *sql1, const char *sql2,
		      int *count)
{
/* deleting duplicate rows */
    struct resultset_comparator *rs_obj = NULL;
    sqlite3_stmt *stmt1 = NULL;
    sqlite3_stmt *stmt2 = NULL;
    int ret;
    int cnt = 0;
    char *sql_err = NULL;

    *count = 0;



/* the complete operation is handled as an unique SQL Transaction */
    ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &sql_err);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("BEGIN TRANSACTION error: %s\n", sql_err);
	  sqlite3_free (sql_err);
	  return 0;
      }


/* preparing the main SELECT statement */
    ret = sqlite3_prepare_v2 (sqlite, sql1, strlen (sql1), &stmt1, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", sqlite3_errmsg (sqlite));
	  return 0;
      }
................................................................................
	  swap_resultset_rows (rs_obj);
      }

    sqlite3_finalize (stmt1);
    sqlite3_finalize (stmt2);
    destroy_resultset_comparator (rs_obj);



/* confirm the still pending Transaction */
    ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &sql_err);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("COMMIT TRANSACTION error: %s\n", sql_err);
	  sqlite3_free (sql_err);
	  return 0;

      }

    *count = cnt;
    return 1;

  error:
    *count = 0;
    if (stmt1)
	sqlite3_finalize (stmt1);
    if (stmt2)
	sqlite3_finalize (stmt2);



/* performing a ROLLBACK anyway */
    ret = sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, &sql_err);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("ROLLBACK TRANSACTION error: %s\n", sql_err);
	  sqlite3_free (sql_err);
	  return 0;

      }

    return 0;
}

SPATIALITE_DECLARE void
remove_duplicated_rows_ex (sqlite3 * sqlite, char *table, int *removed)

{
/* attempting to delete Duplicate rows from a table */
    char *sql;
    char *sql2;
    int first = 1;
    char *xname;
    int pk;
................................................................................
    sql2 = sqlite3_mprintf ("DELETE FROM \"%s\" WHERE ROWID = ?", xname);
    free (xname);

    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	sql = sql_statement.Buffer;
    else
	sql = "NULL-SELECT";
    if (do_delete_duplicates (sqlite, sql, sql2, &count))
      {
	  if (removed == NULL)
	    {
		if (!count)
		    spatialite_e ("No duplicated rows have been identified\n");
		else
		    spatialite_e ("%d duplicated rows deleted from: %s\n",
................................................................................
	  else
	      *removed = count;
      }
    gaiaOutBufferReset (&sql_statement);
    sqlite3_free (sql2);
}








SPATIALITE_DECLARE void
remove_duplicated_rows (sqlite3 * sqlite, char *table)
{
/* attempting to delete Duplicate rows from a table */
    remove_duplicated_rows_ex (sqlite, table, NULL);
}

................................................................................
}

SPATIALITE_DECLARE void
elementary_geometries_ex (sqlite3 * sqlite,
			  char *inTable, char *geometry, char *outTable,
			  char *pKey, char *multiId, int *xrows)
{








































/* attempting to create a derived table surely containing elemetary Geoms */
    char type[128];
    int srid;
    char dims[64];
    char *sql;
    char *xname;
    char *xpk;
................................................................................
    int ret;
    int comma = 0;
    char *errMsg = NULL;
    int i;
    char **results;
    int rows;
    int columns;

    int geom_idx = -1;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int n_columns;
    sqlite3_int64 id = 0;
    int inserted = 0;


    if (check_elementary
	(sqlite, inTable, geometry, outTable, pKey, multiId, type, &srid,
	 dims) == 0)
      {
	  spatialite_e (".elemgeo: invalid args\n");
	  *xrows = 0;
	  return;
      }



/* starts a transaction */
    ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", errMsg);
	  sqlite3_free (errMsg);
	  goto abort;

      }

    gaiaOutBufferInitialize (&sql_statement);
    gaiaOutBufferInitialize (&sql2);
    gaiaOutBufferInitialize (&sql3);
    gaiaOutBufferInitialize (&sql4);

................................................................................
	  sqlite3_free (errMsg);
	  goto abort;
      }
    if (rows < 1)
	;
    else
      {

	  for (i = 1; i <= rows; i++)
	    {







		xname = gaiaDoubleQuotedSql (results[(i * columns) + 1]);
		if (comma)
		    sql = sqlite3_mprintf (", \"%s\"", xname);
		else
		  {
		      comma = 1;
		      sql = sqlite3_mprintf ("\"%s\"", xname);
		  }
		free (xname);
		gaiaAppendToOutBuffer (&sql_statement, sql);
		gaiaAppendToOutBuffer (&sql2, sql);








		gaiaAppendToOutBuffer (&sql3, ", ?");



		sqlite3_free (sql);

		if (strcasecmp (geometry, results[(i * columns) + 1]) == 0)
		    geom_idx = i - 1;
		else
		  {
		      xname = gaiaDoubleQuotedSql (results[(i * columns) + 1]);
		      if (atoi (results[(i * columns) + 3]) != 0)
			  sql =
			      sqlite3_mprintf (",\n\t\"%s\" %s NOT NULL", xname,
					       results[(i * columns) + 2]);
................................................................................
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    gaiaAppendToOutBuffer (&sql2, sql3.Buffer);
    gaiaAppendToOutBuffer (&sql2, ")");
    gaiaAppendToOutBuffer (&sql4, ")");
    gaiaOutBufferReset (&sql3);














    sql_geom =















	sqlite3_mprintf ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)",
			 outTable, geometry, srid, type, dims);


/* creating the output table */
    ret = sqlite3_exec (sqlite, sql4.Buffer, NULL, NULL, &errMsg);
    gaiaOutBufferReset (&sql4);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", errMsg);
................................................................................
		spatialite_e ("[IN]step error: %s\n", sqlite3_errmsg (sqlite));
		goto abort;
	    }
      }
    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);



/* commits the transaction */
    ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", errMsg);
	  sqlite3_free (errMsg);
	  goto abort;

      }
    *xrows = inserted;
    return;

  abort:
    if (stmt_in)
	sqlite3_finalize (stmt_in);
    if (stmt_out)
	sqlite3_finalize (stmt_out);











    *xrows = 0;
}

#ifndef OMIT_FREEXL		/* including FreeXL */

SPATIALITE_DECLARE int
load_XL (sqlite3 * sqlite, const char *path, const char *table,
................................................................................
	goto error;
    if (info == 0)
	goto error;
    if (worksheetIndex < info)
	;
    else
	goto error;

    ret = freexl_select_active_worksheet (xl_handle, worksheetIndex);

    if (ret != FREEXL_OK)
	goto error;
    ret = freexl_worksheet_dimensions (xl_handle, rows, &columns);
    if (ret != FREEXL_OK)
	goto error;
/* starting a transaction */
    ret = sqlite3_exec (sqlite, "BEGIN", NULL, 0, &errMsg);
................................................................................
    if (out)
      {
	  fclose (out);
      }
    spatialite_e ("The SQL SELECT returned no data to export...\n");
    return 0;
}






































































Changes to src/shapefiles/validator.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
....
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
....
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
....
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
....
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
....
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
....
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
....
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
....
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
....
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
....
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
....
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
....
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
/*

 validator.c -- implements geometry validation and repair

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
		  }
	    }
      }
    sqlite3_free_table (results);
    return ok;
}

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */

static struct sanitize_report *
alloc_sanitize_report (void)
{
/* allocating the report container struct */
    struct sanitize_report *p = malloc (sizeof (struct sanitize_report));
    p->first = NULL;
................................................................................
sanitize_geometry_column_common (const void *p_cache, sqlite3 * sqlite,
				 const char *table, const char *geom,
				 const char *tmp_table, const char *report_path,
				 int *n_invalids, int *n_repaired,
				 int *n_discarded, int *n_failures,
				 char **err_msg)
{
#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

/* attempts to repair invalid Geometries from a Geometry Column */
    char *sql;
    char *xtable;
    char *xgeom;
    char *xtmp_table;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_out;
................................................................................
			    unsigned char *blob_dscrd;
			    int blob_sz_dscrd;
			    const char *error;
			    const char *warning;
			    gaiaGeomCollPtr repaired;
			    gaiaGeomCollPtr discarded;
			    report->n_invalids += 1;
			    gaiaResetRtTopoMsg (p_cache);
			    repaired = gaiaMakeValid (p_cache, geom);
			    discarded = gaiaMakeValidDiscarded (p_cache, geom);
			    error = gaiaGetRtTopoErrorMsg (p_cache);
			    warning = gaiaGetRtTopoWarningMsg (p_cache);
			    if (discarded == NULL)
				p_summary = NULL;
			    else
				p_summary =
				    createDiscardedSummary (discarded, summary);
			    addMessageToSanitizeReport (report, rowid,
							(repaired ==
................................................................................
	*n_failures = report->n_not_repaired;
    free_sanitize_report (report);
    return 1;
  stop:
    free_sanitize_report (report);
    if (out)
	fclose (out);

#endif /* end RTTOPO conditional */

    return 0;
}

SPATIALITE_DECLARE int
sanitize_geometry_column (sqlite3 * sqlite, const char *table, const char *geom,
			  const char *tmp_table, const char *report_path,
			  int *n_invalids, int *n_repaired, int *n_discarded,
................................................................................

SPATIALITE_DECLARE int
sanitize_all_geometry_columns (sqlite3 * sqlite,
			       const char *tmp_prefix,
			       const char *output_dir, int *x_not_repaired,
			       char **err_msg)
{
/* RTTOPO isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling RTTOPO\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (sqlite == NULL || tmp_prefix == NULL || output_dir == NULL
	|| x_not_repaired == NULL)
	tmp_prefix = NULL;

................................................................................

SPATIALITE_DECLARE int
sanitize_all_geometry_columns_r (const void *p_cache, sqlite3 * sqlite,
				 const char *tmp_prefix,
				 const char *output_dir, int *x_not_repaired,
				 char **err_msg)
{
/* RTTOPO isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling RTTOPO\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (p_cache == NULL || sqlite == NULL || tmp_prefix == NULL
	|| output_dir == NULL || x_not_repaired == NULL)
	tmp_prefix = NULL;

................................................................................

SPATIALITE_DECLARE int
sanitize_geometry_column (sqlite3 * sqlite, const char *table, const char *geom,
			  const char *tmp_table, const char *report_path,
			  int *n_invalids, int *n_repaired, int *n_discarded,
			  int *n_failures, char **err_msg)
{
/* RTTOPO isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling RTTOPO\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (sqlite == NULL || table == NULL || geom == NULL || tmp_table == NULL
	|| report_path == NULL || n_invalids == NULL || n_repaired == NULL
	|| n_discarded == NULL || n_failures == NULL)
	table = NULL;
................................................................................
SPATIALITE_DECLARE int
sanitize_geometry_column_r (const void *p_cache, sqlite3 * sqlite,
			    const char *table, const char *geom,
			    const char *tmp_table, const char *report_path,
			    int *n_invalids, int *n_repaired, int *n_discarded,
			    int *n_failures, char **err_msg)
{
/* RTTOPO isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling RTTOPO\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (p_cache == NULL || sqlite == NULL || table == NULL || geom == NULL
	|| tmp_table == NULL || report_path == NULL || n_invalids == NULL
	|| n_repaired == NULL || n_discarded == NULL || n_failures == NULL)
	table = NULL;
................................................................................
	return 0;
    len = strlen (msg);
    *err_msg = malloc (len + 1);
    strcpy (*err_msg, msg);
    return 0;
}

#endif /* end RTTOPO conditionals */


#ifndef OMIT_GEOS		/* only if GEOS is supported */

static struct validity_report *
alloc_validity_report (void)
{
................................................................................
    int gtype;
    int srid;
    const char *x_type;
    const char *x_dims;
    char num[256];
    time_t v_time;
    struct tm *v_tm;
    const char *day = "";
    const char *month = "";
    FILE *out = NULL;
    const char *p_msg;
    int len;
    struct validity_report_row *p_r;
    struct validity_report *report = alloc_validity_report ();

    if (err_msg != NULL)
................................................................................
    int columns;
    int n_rows;
    int n_invalids;
    char *report;
    FILE *out = NULL;
    time_t v_time;
    struct tm *v_tm;
    const char *day = "";
    const char *month = "";
    int sum_invalids = 0;

/* attempting to create the output directory */
#if defined(_WIN32)
    _mkdir (output_dir);
#else
    mkdir (output_dir, 0777);
................................................................................
SPATIALITE_DECLARE int
check_all_geometry_columns (sqlite3 * sqlite,
			    const char *output_dir, int *x_invalids,
			    char **err_msg)
{
/* GEOS isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling RTTOPOM\n"
	"and is thus unable to support IsValid";
/* silencing stupid compiler warnings */
    if (sqlite == NULL || output_dir == NULL || x_invalids == NULL)
	output_dir = NULL;

    if (err_msg == NULL)
	return 0;
................................................................................
SPATIALITE_DECLARE int
check_all_geometry_columns_r (const void *p_cache, sqlite3 * sqlite,
			      const char *output_dir, int *x_invalids,
			      char **err_msg)
{
/* GEOS isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling RTTOPO\n"
	"and is thus unable to support IsValid";
/* silencing stupid compiler warnings */
    if (p_cache == NULL || sqlite == NULL || output_dir == NULL
	|| x_invalids == NULL)
	output_dir = NULL;

    if (err_msg == NULL)




|







 







|







 







|







 







<
<







 







|
|
|
|
|







 







<
<
<







 







|

|







 







|

|







 







|

|







 







|

|







 







|







 







|
|







 







|
|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
....
1671
1672
1673
1674
1675
1676
1677


1678
1679
1680
1681
1682
1683
1684
....
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
....
2403
2404
2405
2406
2407
2408
2409



2410
2411
2412
2413
2414
2415
2416
....
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
....
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
....
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
....
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
....
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
....
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
....
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
....
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
....
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
/*

 validator.c -- implements geometry validation and repair

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
................................................................................
		  }
	    }
      }
    sqlite3_free_table (results);
    return ok;
}

#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */

static struct sanitize_report *
alloc_sanitize_report (void)
{
/* allocating the report container struct */
    struct sanitize_report *p = malloc (sizeof (struct sanitize_report));
    p->first = NULL;
................................................................................
sanitize_geometry_column_common (const void *p_cache, sqlite3 * sqlite,
				 const char *table, const char *geom,
				 const char *tmp_table, const char *report_path,
				 int *n_invalids, int *n_repaired,
				 int *n_discarded, int *n_failures,
				 char **err_msg)
{


/* attempts to repair invalid Geometries from a Geometry Column */
    char *sql;
    char *xtable;
    char *xgeom;
    char *xtmp_table;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_out;
................................................................................
			    unsigned char *blob_dscrd;
			    int blob_sz_dscrd;
			    const char *error;
			    const char *warning;
			    gaiaGeomCollPtr repaired;
			    gaiaGeomCollPtr discarded;
			    report->n_invalids += 1;
			    gaiaResetLwGeomMsg ();
			    repaired = gaiaMakeValid (geom);
			    discarded = gaiaMakeValidDiscarded (geom);
			    error = gaiaGetLwGeomErrorMsg ();
			    warning = gaiaGetLwGeomWarningMsg ();
			    if (discarded == NULL)
				p_summary = NULL;
			    else
				p_summary =
				    createDiscardedSummary (discarded, summary);
			    addMessageToSanitizeReport (report, rowid,
							(repaired ==
................................................................................
	*n_failures = report->n_not_repaired;
    free_sanitize_report (report);
    return 1;
  stop:
    free_sanitize_report (report);
    if (out)
	fclose (out);



    return 0;
}

SPATIALITE_DECLARE int
sanitize_geometry_column (sqlite3 * sqlite, const char *table, const char *geom,
			  const char *tmp_table, const char *report_path,
			  int *n_invalids, int *n_repaired, int *n_discarded,
................................................................................

SPATIALITE_DECLARE int
sanitize_all_geometry_columns (sqlite3 * sqlite,
			       const char *tmp_prefix,
			       const char *output_dir, int *x_not_repaired,
			       char **err_msg)
{
/* LWGEOM isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LWGEOM\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (sqlite == NULL || tmp_prefix == NULL || output_dir == NULL
	|| x_not_repaired == NULL)
	tmp_prefix = NULL;

................................................................................

SPATIALITE_DECLARE int
sanitize_all_geometry_columns_r (const void *p_cache, sqlite3 * sqlite,
				 const char *tmp_prefix,
				 const char *output_dir, int *x_not_repaired,
				 char **err_msg)
{
/* LWGEOM isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LWGEOM\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (p_cache == NULL || sqlite == NULL || tmp_prefix == NULL
	|| output_dir == NULL || x_not_repaired == NULL)
	tmp_prefix = NULL;

................................................................................

SPATIALITE_DECLARE int
sanitize_geometry_column (sqlite3 * sqlite, const char *table, const char *geom,
			  const char *tmp_table, const char *report_path,
			  int *n_invalids, int *n_repaired, int *n_discarded,
			  int *n_failures, char **err_msg)
{
/* LWGEOM isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LWGEOM\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (sqlite == NULL || table == NULL || geom == NULL || tmp_table == NULL
	|| report_path == NULL || n_invalids == NULL || n_repaired == NULL
	|| n_discarded == NULL || n_failures == NULL)
	table = NULL;
................................................................................
SPATIALITE_DECLARE int
sanitize_geometry_column_r (const void *p_cache, sqlite3 * sqlite,
			    const char *table, const char *geom,
			    const char *tmp_table, const char *report_path,
			    int *n_invalids, int *n_repaired, int *n_discarded,
			    int *n_failures, char **err_msg)
{
/* LWGEOM isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LWGEOM\n"
	"and is thus unable to support MakeValid";

/* silencing stupid compiler warnings */
    if (p_cache == NULL || sqlite == NULL || table == NULL || geom == NULL
	|| tmp_table == NULL || report_path == NULL || n_invalids == NULL
	|| n_repaired == NULL || n_discarded == NULL || n_failures == NULL)
	table = NULL;
................................................................................
	return 0;
    len = strlen (msg);
    *err_msg = malloc (len + 1);
    strcpy (*err_msg, msg);
    return 0;
}

#endif /* end LWGEOM conditionals */


#ifndef OMIT_GEOS		/* only if GEOS is supported */

static struct validity_report *
alloc_validity_report (void)
{
................................................................................
    int gtype;
    int srid;
    const char *x_type;
    const char *x_dims;
    char num[256];
    time_t v_time;
    struct tm *v_tm;
    const char *day;
    const char *month;
    FILE *out = NULL;
    const char *p_msg;
    int len;
    struct validity_report_row *p_r;
    struct validity_report *report = alloc_validity_report ();

    if (err_msg != NULL)
................................................................................
    int columns;
    int n_rows;
    int n_invalids;
    char *report;
    FILE *out = NULL;
    time_t v_time;
    struct tm *v_tm;
    const char *day;
    const char *month;
    int sum_invalids = 0;

/* attempting to create the output directory */
#if defined(_WIN32)
    _mkdir (output_dir);
#else
    mkdir (output_dir, 0777);
................................................................................
SPATIALITE_DECLARE int
check_all_geometry_columns (sqlite3 * sqlite,
			    const char *output_dir, int *x_invalids,
			    char **err_msg)
{
/* GEOS isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LWGEOM\n"
	"and is thus unable to support IsValid";
/* silencing stupid compiler warnings */
    if (sqlite == NULL || output_dir == NULL || x_invalids == NULL)
	output_dir = NULL;

    if (err_msg == NULL)
	return 0;
................................................................................
SPATIALITE_DECLARE int
check_all_geometry_columns_r (const void *p_cache, sqlite3 * sqlite,
			      const char *output_dir, int *x_invalids,
			      char **err_msg)
{
/* GEOS isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LWGEOM\n"
	"and is thus unable to support IsValid";
/* silencing stupid compiler warnings */
    if (p_cache == NULL || sqlite == NULL || output_dir == NULL
	|| x_invalids == NULL)
	output_dir = NULL;

    if (err_msg == NULL)

Changes to src/spatialite/Makefile.am.

1
2
3
4
5
6
7
8
9
..
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libsplite.la splite.la

SPATIALITE_COMMON_SOURCES = mbrcache.c \
	spatialite.c \
	spatialite_init.c \
................................................................................
	virtualdbf.c \
	virtualXL.c \
	virtualfdo.c \
	virtualgpkg.c \
	virtualbbox.c \
	virtualspatialindex.c \
	virtualnetwork.c \
	virtualrouting.c \
	virtualshape.c \
	virtualxpath.c \
	virtualelementary.c \
	virtualknn.c \
	create_routing.c

libsplite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)

libsplite_la_CFLAGS = -fvisibility=hidden

splite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)

splite_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
splite_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
splite_la_CPPFLAGS += -DLOADABLE_EXTENSION
splite_la_CPPFLAGS += -fvisibility=hidden
splite_la_LDFLAGS = -module
splite_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|







 







<


|
<
<







|







1
2
3
4
5
6
7
8
9
..
16
17
18
19
20
21
22

23
24
25


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libsplite.la splite.la

SPATIALITE_COMMON_SOURCES = mbrcache.c \
	spatialite.c \
	spatialite_init.c \
................................................................................
	virtualdbf.c \
	virtualXL.c \
	virtualfdo.c \
	virtualgpkg.c \
	virtualbbox.c \
	virtualspatialindex.c \
	virtualnetwork.c \

	virtualshape.c \
	virtualxpath.c \
	virtualelementary.c



libsplite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)

libsplite_la_CFLAGS = -fvisibility=hidden

splite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)

splite_la_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
splite_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
splite_la_CPPFLAGS += -DLOADABLE_EXTENSION
splite_la_CPPFLAGS += -fvisibility=hidden
splite_la_LDFLAGS = -module
splite_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/spatialite/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
...
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
...
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
...
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
...
379
380
381
382
383
384
385

386
387
388
389
390
391
392
...
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
...
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
...
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
...
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
...
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
...
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
...
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
....
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/spatialite


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsplite_la_LIBADD =
am__objects_1 = libsplite_la-mbrcache.lo libsplite_la-spatialite.lo \
................................................................................
	libsplite_la-spatialite_init.lo libsplite_la-metatables.lo \
	libsplite_la-statistics.lo libsplite_la-extra_tables.lo \
	libsplite_la-se_helpers.lo libsplite_la-srid_aux.lo \
	libsplite_la-table_cloner.lo libsplite_la-virtualdbf.lo \
	libsplite_la-virtualXL.lo libsplite_la-virtualfdo.lo \
	libsplite_la-virtualgpkg.lo libsplite_la-virtualbbox.lo \
	libsplite_la-virtualspatialindex.lo \
	libsplite_la-virtualnetwork.lo libsplite_la-virtualrouting.lo \
	libsplite_la-virtualshape.lo libsplite_la-virtualxpath.lo \
	libsplite_la-virtualelementary.lo libsplite_la-virtualknn.lo \
	libsplite_la-create_routing.lo
am_libsplite_la_OBJECTS = $(am__objects_1)
libsplite_la_OBJECTS = $(am_libsplite_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
libsplite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
................................................................................
	splite_la-spatialite_init.lo splite_la-metatables.lo \
	splite_la-statistics.lo splite_la-extra_tables.lo \
	splite_la-se_helpers.lo splite_la-srid_aux.lo \
	splite_la-table_cloner.lo splite_la-virtualdbf.lo \
	splite_la-virtualXL.lo splite_la-virtualfdo.lo \
	splite_la-virtualgpkg.lo splite_la-virtualbbox.lo \
	splite_la-virtualspatialindex.lo splite_la-virtualnetwork.lo \
	splite_la-virtualrouting.lo splite_la-virtualshape.lo \
	splite_la-virtualxpath.lo splite_la-virtualelementary.lo \
	splite_la-virtualknn.lo splite_la-create_routing.lo
am_splite_la_OBJECTS = $(am__objects_2)
splite_la_OBJECTS = $(am_splite_la_OBJECTS)
splite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(splite_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libsplite.la splite.la
SPATIALITE_COMMON_SOURCES = mbrcache.c \
	spatialite.c \
	spatialite_init.c \
	metatables.c \
	statistics.c \
................................................................................
	virtualdbf.c \
	virtualXL.c \
	virtualfdo.c \
	virtualgpkg.c \
	virtualbbox.c \
	virtualspatialindex.c \
	virtualnetwork.c \
	virtualrouting.c \
	virtualshape.c \
	virtualxpath.c \
	virtualelementary.c \
	virtualknn.c \
	create_routing.c

libsplite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)
libsplite_la_CFLAGS = -fvisibility=hidden
splite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)
splite_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @GEOS_CFLAGS@ \
	@LIBXML2_CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION -fvisibility=hidden
splite_la_LDFLAGS = -module
splite_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/spatialite/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/spatialite/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-create_routing.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-extra_tables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-mbrcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-metatables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-se_helpers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-spatialite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-spatialite_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-srid_aux.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-table_cloner.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualXL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualbbox.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualdbf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualelementary.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualfdo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualgpkg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualknn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualnetwork.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualrouting.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualshape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualspatialindex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualxpath.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-create_routing.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-extra_tables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-mbrcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-metatables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-se_helpers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-spatialite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-spatialite_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-srid_aux.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-table_cloner.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualXL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualbbox.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualdbf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualelementary.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualfdo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualgpkg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualknn.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualnetwork.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualrouting.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualshape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualspatialindex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualxpath.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
................................................................................
libsplite_la-virtualnetwork.lo: virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualnetwork.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualnetwork.Tpo -c -o libsplite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualnetwork.Tpo $(DEPDIR)/libsplite_la-virtualnetwork.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualnetwork.c' object='libsplite_la-virtualnetwork.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c

libsplite_la-virtualrouting.lo: virtualrouting.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualrouting.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualrouting.Tpo -c -o libsplite_la-virtualrouting.lo `test -f 'virtualrouting.c' || echo '$(srcdir)/'`virtualrouting.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualrouting.Tpo $(DEPDIR)/libsplite_la-virtualrouting.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualrouting.c' object='libsplite_la-virtualrouting.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualrouting.lo `test -f 'virtualrouting.c' || echo '$(srcdir)/'`virtualrouting.c

libsplite_la-virtualshape.lo: virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualshape.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualshape.Tpo -c -o libsplite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualshape.Tpo $(DEPDIR)/libsplite_la-virtualshape.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualshape.c' object='libsplite_la-virtualshape.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c

................................................................................
libsplite_la-virtualelementary.lo: virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualelementary.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualelementary.Tpo -c -o libsplite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualelementary.Tpo $(DEPDIR)/libsplite_la-virtualelementary.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualelementary.c' object='libsplite_la-virtualelementary.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c

libsplite_la-virtualknn.lo: virtualknn.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualknn.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualknn.Tpo -c -o libsplite_la-virtualknn.lo `test -f 'virtualknn.c' || echo '$(srcdir)/'`virtualknn.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualknn.Tpo $(DEPDIR)/libsplite_la-virtualknn.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualknn.c' object='libsplite_la-virtualknn.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualknn.lo `test -f 'virtualknn.c' || echo '$(srcdir)/'`virtualknn.c

libsplite_la-create_routing.lo: create_routing.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-create_routing.lo -MD -MP -MF $(DEPDIR)/libsplite_la-create_routing.Tpo -c -o libsplite_la-create_routing.lo `test -f 'create_routing.c' || echo '$(srcdir)/'`create_routing.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-create_routing.Tpo $(DEPDIR)/libsplite_la-create_routing.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='create_routing.c' object='libsplite_la-create_routing.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-create_routing.lo `test -f 'create_routing.c' || echo '$(srcdir)/'`create_routing.c

splite_la-mbrcache.lo: mbrcache.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-mbrcache.lo -MD -MP -MF $(DEPDIR)/splite_la-mbrcache.Tpo -c -o splite_la-mbrcache.lo `test -f 'mbrcache.c' || echo '$(srcdir)/'`mbrcache.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-mbrcache.Tpo $(DEPDIR)/splite_la-mbrcache.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='mbrcache.c' object='splite_la-mbrcache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-mbrcache.lo `test -f 'mbrcache.c' || echo '$(srcdir)/'`mbrcache.c

................................................................................
splite_la-virtualnetwork.lo: virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualnetwork.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualnetwork.Tpo -c -o splite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualnetwork.Tpo $(DEPDIR)/splite_la-virtualnetwork.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualnetwork.c' object='splite_la-virtualnetwork.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c

splite_la-virtualrouting.lo: virtualrouting.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualrouting.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualrouting.Tpo -c -o splite_la-virtualrouting.lo `test -f 'virtualrouting.c' || echo '$(srcdir)/'`virtualrouting.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualrouting.Tpo $(DEPDIR)/splite_la-virtualrouting.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualrouting.c' object='splite_la-virtualrouting.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualrouting.lo `test -f 'virtualrouting.c' || echo '$(srcdir)/'`virtualrouting.c

splite_la-virtualshape.lo: virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualshape.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualshape.Tpo -c -o splite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualshape.Tpo $(DEPDIR)/splite_la-virtualshape.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualshape.c' object='splite_la-virtualshape.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c

................................................................................
splite_la-virtualelementary.lo: virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualelementary.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualelementary.Tpo -c -o splite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualelementary.Tpo $(DEPDIR)/splite_la-virtualelementary.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualelementary.c' object='splite_la-virtualelementary.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c

splite_la-virtualknn.lo: virtualknn.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualknn.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualknn.Tpo -c -o splite_la-virtualknn.lo `test -f 'virtualknn.c' || echo '$(srcdir)/'`virtualknn.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualknn.Tpo $(DEPDIR)/splite_la-virtualknn.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualknn.c' object='splite_la-virtualknn.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualknn.lo `test -f 'virtualknn.c' || echo '$(srcdir)/'`virtualknn.c

splite_la-create_routing.lo: create_routing.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-create_routing.lo -MD -MP -MF $(DEPDIR)/splite_la-create_routing.Tpo -c -o splite_la-create_routing.lo `test -f 'create_routing.c' || echo '$(srcdir)/'`create_routing.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-create_routing.Tpo $(DEPDIR)/splite_la-create_routing.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='create_routing.c' object='splite_la-create_routing.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-create_routing.lo `test -f 'create_routing.c' || echo '$(srcdir)/'`create_routing.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







|
|
<
<







 







|
|
<







 







<







 







|







 







<


|
<
<




|
|
|







 







>







 







<







 







<

<



<







 







<

<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
..
98
99
100
101
102
103
104
105
106


107
108
109
110
111
112
113
...
118
119
120
121
122
123
124
125
126

127
128
129
130
131
132
133
...
185
186
187
188
189
190
191

192
193
194
195
196
197
198
...
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
...
334
335
336
337
338
339
340

341
342
343


344
345
346
347
348
349
350
351
352
353
354
355
356
357
...
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
...
405
406
407
408
409
410
411

412
413
414
415
416
417
418
...
420
421
422
423
424
425
426

427

428
429
430

431
432
433
434
435
436
437
...
439
440
441
442
443
444
445

446

447
448
449
450
451
452
453
...
577
578
579
580
581
582
583







584
585
586
587
588
589
590
...
598
599
600
601
602
603
604














605
606
607
608
609
610
611
...
710
711
712
713
714
715
716







717
718
719
720
721
722
723
...
731
732
733
734
735
736
737














738
739
740
741
742
743
744
...
941
942
943
944
945
946
947


948
949
950
951
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/spatialite
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsplite_la_LIBADD =
am__objects_1 = libsplite_la-mbrcache.lo libsplite_la-spatialite.lo \
................................................................................
	libsplite_la-spatialite_init.lo libsplite_la-metatables.lo \
	libsplite_la-statistics.lo libsplite_la-extra_tables.lo \
	libsplite_la-se_helpers.lo libsplite_la-srid_aux.lo \
	libsplite_la-table_cloner.lo libsplite_la-virtualdbf.lo \
	libsplite_la-virtualXL.lo libsplite_la-virtualfdo.lo \
	libsplite_la-virtualgpkg.lo libsplite_la-virtualbbox.lo \
	libsplite_la-virtualspatialindex.lo \
	libsplite_la-virtualnetwork.lo libsplite_la-virtualshape.lo \
	libsplite_la-virtualxpath.lo libsplite_la-virtualelementary.lo


am_libsplite_la_OBJECTS = $(am__objects_1)
libsplite_la_OBJECTS = $(am_libsplite_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
libsplite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
................................................................................
	splite_la-spatialite_init.lo splite_la-metatables.lo \
	splite_la-statistics.lo splite_la-extra_tables.lo \
	splite_la-se_helpers.lo splite_la-srid_aux.lo \
	splite_la-table_cloner.lo splite_la-virtualdbf.lo \
	splite_la-virtualXL.lo splite_la-virtualfdo.lo \
	splite_la-virtualgpkg.lo splite_la-virtualbbox.lo \
	splite_la-virtualspatialindex.lo splite_la-virtualnetwork.lo \
	splite_la-virtualshape.lo splite_la-virtualxpath.lo \
	splite_la-virtualelementary.lo

am_splite_la_OBJECTS = $(am__objects_2)
splite_la_OBJECTS = $(am_splite_la_OBJECTS)
splite_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
	$(AM_CFLAGS) $(CFLAGS) $(splite_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libsplite.la splite.la
SPATIALITE_COMMON_SOURCES = mbrcache.c \
	spatialite.c \
	spatialite_init.c \
	metatables.c \
	statistics.c \
................................................................................
	virtualdbf.c \
	virtualXL.c \
	virtualfdo.c \
	virtualgpkg.c \
	virtualbbox.c \
	virtualspatialindex.c \
	virtualnetwork.c \

	virtualshape.c \
	virtualxpath.c \
	virtualelementary.c



libsplite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)
libsplite_la_CFLAGS = -fvisibility=hidden
splite_la_SOURCES = $(SPATIALITE_COMMON_SOURCES)
splite_la_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION \
	-fvisibility=hidden
splite_la_LDFLAGS = -module
splite_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/spatialite/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/spatialite/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c


@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-extra_tables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-mbrcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-metatables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-se_helpers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-spatialite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-spatialite_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-srid_aux.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-table_cloner.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualXL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualbbox.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualdbf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualelementary.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualfdo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualgpkg.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualnetwork.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualshape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualspatialindex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsplite_la-virtualxpath.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-extra_tables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-mbrcache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-metatables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-se_helpers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-spatialite.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-spatialite_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-srid_aux.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-table_cloner.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualXL.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualbbox.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualdbf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualelementary.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualfdo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualgpkg.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualnetwork.Plo@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualshape.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualspatialindex.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splite_la-virtualxpath.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
................................................................................
libsplite_la-virtualnetwork.lo: virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualnetwork.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualnetwork.Tpo -c -o libsplite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualnetwork.Tpo $(DEPDIR)/libsplite_la-virtualnetwork.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualnetwork.c' object='libsplite_la-virtualnetwork.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c








libsplite_la-virtualshape.lo: virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualshape.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualshape.Tpo -c -o libsplite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualshape.Tpo $(DEPDIR)/libsplite_la-virtualshape.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualshape.c' object='libsplite_la-virtualshape.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c

................................................................................
libsplite_la-virtualelementary.lo: virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -MT libsplite_la-virtualelementary.lo -MD -MP -MF $(DEPDIR)/libsplite_la-virtualelementary.Tpo -c -o libsplite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsplite_la-virtualelementary.Tpo $(DEPDIR)/libsplite_la-virtualelementary.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualelementary.c' object='libsplite_la-virtualelementary.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsplite_la_CFLAGS) $(CFLAGS) -c -o libsplite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c















splite_la-mbrcache.lo: mbrcache.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-mbrcache.lo -MD -MP -MF $(DEPDIR)/splite_la-mbrcache.Tpo -c -o splite_la-mbrcache.lo `test -f 'mbrcache.c' || echo '$(srcdir)/'`mbrcache.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-mbrcache.Tpo $(DEPDIR)/splite_la-mbrcache.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='mbrcache.c' object='splite_la-mbrcache.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-mbrcache.lo `test -f 'mbrcache.c' || echo '$(srcdir)/'`mbrcache.c

................................................................................
splite_la-virtualnetwork.lo: virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualnetwork.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualnetwork.Tpo -c -o splite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualnetwork.Tpo $(DEPDIR)/splite_la-virtualnetwork.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualnetwork.c' object='splite_la-virtualnetwork.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualnetwork.lo `test -f 'virtualnetwork.c' || echo '$(srcdir)/'`virtualnetwork.c








splite_la-virtualshape.lo: virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualshape.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualshape.Tpo -c -o splite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualshape.Tpo $(DEPDIR)/splite_la-virtualshape.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualshape.c' object='splite_la-virtualshape.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualshape.lo `test -f 'virtualshape.c' || echo '$(srcdir)/'`virtualshape.c

................................................................................
splite_la-virtualelementary.lo: virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT splite_la-virtualelementary.lo -MD -MP -MF $(DEPDIR)/splite_la-virtualelementary.Tpo -c -o splite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/splite_la-virtualelementary.Tpo $(DEPDIR)/splite_la-virtualelementary.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='virtualelementary.c' object='splite_la-virtualelementary.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(splite_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(splite_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o splite_la-virtualelementary.lo `test -f 'virtualelementary.c' || echo '$(srcdir)/'`virtualelementary.c















mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted src/spatialite/create_routing.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
/*

 create_routing.c -- Creating a VirtualRouting from an input table

 version 4.5, 2017 December 15

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2017
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

/* 64 bit integer: portable format for printf() */
#if defined(_WIN32) && !defined(__MINGW32__)
#define FRMT64 "%I64d"
#else
#define FRMT64 "%lld"
#endif

#define MAX_BLOCK	1048576

static void
gaia_create_routing_set_error (const void *ctx, const char *errmsg)
{
/* setting the CreateRouting Last Error Message */
    struct splite_internal_cache *cache = (struct splite_internal_cache *) ctx;
    if (cache != NULL)
      {
	  int len;
	  if (cache->createRoutingError != NULL)
	    {
		free (cache->createRoutingError);
		cache->createRoutingError = NULL;
	    }
	  if (errmsg == NULL)
	      return;

	  len = strlen (errmsg);
	  cache->createRoutingError = malloc (len + 1);
	  strcpy (cache->createRoutingError, errmsg);
      }
}

SPATIALITE_DECLARE const char *
gaia_create_routing_get_last_error (const void *p_cache)
{
/* return the last CreateRouting Error Message (if any) */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;

    if (cache == NULL)
	return NULL;
    return cache->createRoutingError;
}

static void
do_drop_temp_tables (sqlite3 * db_handle)
{
/* attempting to drop existing temp-tables (just in case) */
    const char *sql;

    /* attempting to drop the Nodes Temp-Table */
    sql = "DROP TABLE IF EXISTS create_routing_nodes";
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);

/* attempting to drop the Routing Data Table */
    sql = "DROP TABLE IF EXISTS create_routing_links";
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
}

static void
do_drop_tables (sqlite3 * db_handle, const char *routing_data_table,
		const char *virtual_routing_table)
{
/* attempting to drop existing tables (just in case) */
    char *xtable;
    char *sql;

/* attempting to drop the VirtualRouting Table */
    xtable = gaiaDoubleQuotedSql (virtual_routing_table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\"", xtable);
    free (xtable);
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);

/* attempting to drop the Routing Data Table */
    xtable = gaiaDoubleQuotedSql (routing_data_table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\"", xtable);
    free (xtable);
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
}

static int
do_check_data_table (sqlite3 * db_handle, const char *routing_data_table)
{
/* testing if the Routing Data Table is already defined */
    char *xtable;
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int nr = 0;

    xtable = gaiaDoubleQuotedSql (routing_data_table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", xtable);
    free (xtable);
    ret = sqlite3_get_table (db_handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
	nr++;
    sqlite3_free_table (results);
    return nr;
}

static int
do_check_virtual_table (sqlite3 * db_handle, const char *virtual_routing_table)
{
/* testing if the VirtualRouting Table is already defined */
    char *xtable;
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int nr = 0;

    xtable = gaiaDoubleQuotedSql (virtual_routing_table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", xtable);
    free (xtable);
    ret = sqlite3_get_table (db_handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
	nr++;
    sqlite3_free_table (results);
    return nr;
}

static int
check_geom (gaiaGeomCollPtr geom, int *is3d, double *x_from, double *y_from,
	    double *z_from, double *x_to, double *y_to, double *z_to)
{
/* checking an Arc/Link Geometry for validity */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int points = 0;
    int lines = 0;
    int polygons = 0;
    int end;

    if (geom == NULL)
	return 0;

    pt = geom->FirstPoint;
    while (pt != NULL)
      {
	  points++;
	  pt = pt->Next;
      }
    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  lines++;
	  ln = ln->Next;
      }
    pg = geom->FirstPolygon;
    while (pg != NULL)
      {
	  polygons++;
	  pg = pg->Next;
      }
    if (points == 0 && lines == 1 && polygons == 0)
	;
    else
	return 0;

    ln = geom->FirstLinestring;
    end = ln->Points - 1;
    if (ln->DimensionModel == GAIA_XY_Z)
      {
	  *is3d = 1;
	  gaiaGetPointXYZ (ln->Coords, 0, x_from, y_from, z_from);
	  gaiaGetPointXYZ (ln->Coords, end, x_to, y_to, z_to);
      }
    else if (ln->DimensionModel == GAIA_XY_Z_M)
      {
	  double m;
	  *is3d = 1;
	  gaiaGetPointXYZM (ln->Coords, 0, x_from, y_from, z_from, &m);
	  gaiaGetPointXYZM (ln->Coords, end, x_to, y_to, z_to, &m);
      }
    else if (ln->DimensionModel == GAIA_XY_M)
      {
	  double m;
	  *is3d = 0;
	  gaiaGetPointXYM (ln->Coords, 0, x_from, y_from, &m);
	  *z_from = 0.0;
	  gaiaGetPointXYM (ln->Coords, end, x_to, y_to, &m);
	  *z_to = 0.0;
      }
    else
      {
	  *is3d = 0;
	  gaiaGetPoint (ln->Coords, 0, x_from, y_from);
	  *z_from = 0.0;
	  gaiaGetPoint (ln->Coords, end, x_to, y_to);
	  *z_to = 0.0;
      }

    return 1;
}

static int
do_update_internal_index (sqlite3 * db_handle, const void *cache,
			  sqlite3_stmt * stmt, sqlite3_int64 rowid, int index)
{
/* assigning the Internal Index to some Node */
    int ret;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int (stmt, 1, index);
    sqlite3_bind_int64 (stmt, 2, rowid);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

static int
do_search_view (sqlite3 * handle, const char *view, const char *geom,
		int *srid, int *dims, int *is_geographic)
{
/* seraching the SRID and DIMS for Geometry - Spatial View */
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int xsrid;
    int type;
    int count = 0;

    sql =
	sqlite3_mprintf
	("SELECT g.srid, g.geometry_type FROM views_geometry_columns AS v "
	 "JOIN geometry_columns AS g ON (g.f_table_name = v.f_table_name "
	 "AND g.f_geometry_column = v.f_geometry_column) WHERE "
	 "Lower(v.view_name) = Lower(%Q) AND Lower(v.view_geometry) = Lower(%Q)",
	 view, geom);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		xsrid = sqlite3_column_int (stmt, 0);
		type = sqlite3_column_int (stmt, 1);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
      {
	  int geographic;
	  if (!srid_is_geographic (handle, xsrid, &geographic))
	      return 0;
	  switch (type)
	    {
	    case GAIA_LINESTRING:
		*dims = GAIA_XY;
		break;
	    case GAIA_LINESTRINGZ:
		*dims = GAIA_XY_Z;
		break;
	    case GAIA_LINESTRINGM:
		*dims = GAIA_XY_M;
		break;
	    case GAIA_LINESTRINGZM:
		*dims = GAIA_XY_Z_M;
		break;
	    default:
		return 0;
	    };
	  *srid = xsrid;
	  *is_geographic = geographic;
	  return 1;
      }
    return 0;
}

static int
do_search_srid (sqlite3 * handle, const char *table, const char *geom,
		int *srid, int *dims, int *is_geographic)
{
/* seraching the SRID and DIMS for Geometry */
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int xsrid;
    int type;
    int count = 0;

    sql =
	sqlite3_mprintf
	("SELECT srid, geometry_type FROM geometry_columns WHERE "
	 "Lower(f_table_name) = Lower(%Q) AND Lower(f_geometry_column) = Lower(%Q)",
	 table, geom);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		xsrid = sqlite3_column_int (stmt, 0);
		type = sqlite3_column_int (stmt, 1);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
      {
	  int geographic;
	  if (!srid_is_geographic (handle, xsrid, &geographic))
	      return 0;
	  switch (type)
	    {
	    case GAIA_LINESTRING:
		*dims = GAIA_XY;
		break;
	    case GAIA_LINESTRINGZ:
		*dims = GAIA_XY_Z;
		break;
	    case GAIA_LINESTRINGM:
		*dims = GAIA_XY_M;
		break;
	    case GAIA_LINESTRINGZM:
		*dims = GAIA_XY_Z_M;
		break;
	    default:
		return 0;
	    };
	  *srid = xsrid;
	  *is_geographic = geographic;
	  return 1;
      }
      
      if (count == 0)
      {
		  /* testing for a possible Spatial View */
		  if (do_search_view (handle, table, geom, srid, dims, is_geographic))
		  return 1;
	  }
    return 0;
}

static int
do_check_input_table (sqlite3 * db_handle, const void *cache,
		      const char *input_table, const char *from_column,
		      const char *to_column, const char *geom_column,
		      const char *cost_column, const char *name_column,
		      const char *oneway_from, const char *oneway_to,
		      int a_star_enabled, int bidirectional, int *has_ids,
		      int *n_nodes, int *max_code_length, double *a_star_coeff)
{
/* testing if the Input Table exists and it's correctly defined */
    char *xtable;
    char *sql;
    char *prev;
    char *xname;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_ins_nodes = NULL;
    sqlite3_stmt *stmt_ins_links = NULL;
    sqlite3_stmt *stmt_check_nodes = NULL;
    sqlite3_stmt *stmt_update_nodes = NULL;
    sqlite3_stmt *stmt_sel_nodes = NULL;
    sqlite3_stmt *stmt_update_links_from = NULL;
    sqlite3_stmt *stmt_update_links_to = NULL;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int ok_from = 0;
    int ok_to = 0;
    int ok_geom = 0;
    int ok_cost = 0;
    int ok_name = 0;
    int ok_oneway_from = 0;
    int ok_oneway_to = 0;
    int error = 0;
    int first = 1;
    int glob_srid;
    int glob_dims;
    sqlite3_int64 last_id;
    char *last_code = NULL;
    double last_x;
    double last_y;
    double last_z;
    int is_geographic = 0;

/* setting a Savepoint */
    sql = "SAVEPOINT create_routing_one";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    xtable = gaiaDoubleQuotedSql (input_table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", xtable);
    free (xtable);
    ret = sqlite3_get_table (db_handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
      {
	  const char *col = results[(i * columns) + 1];
	  if (strcasecmp (col, from_column) == 0)
	      ok_from = 1;
	  if (strcasecmp (col, to_column) == 0)
	      ok_to = 1;
	  if (geom_column != NULL)
	    {
		if (strcasecmp (col, geom_column) == 0)
		    ok_geom = 1;
	    }
	  if (cost_column != NULL)
	    {
		if (strcasecmp (col, cost_column) == 0)
		    ok_cost = 1;
	    }
	  if (name_column != NULL)
	    {
		if (strcasecmp (col, name_column) == 0)
		    ok_name = 1;
	    }
	  if (oneway_from != NULL)
	    {
		if (strcasecmp (col, oneway_from) == 0)
		    ok_oneway_from = 1;
	    }
	  if (oneway_to != NULL)
	    {
		if (strcasecmp (col, oneway_to) == 0)
		    ok_oneway_to = 1;
	    }
      }
    sqlite3_free_table (results);

/* final validity check */
    if (!ok_from)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("FromNode Column \"%s\" is not defined in the Input Table",
	       from_column);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    if (!ok_to)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ToNode Column \"%s\" is not defined in the Input Table",
	       to_column);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    if (geom_column != NULL)
      {
	  if (!ok_geom)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Geometry Column \"%s\" is not defined in the Input Table",
		     geom_column);
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    if (cost_column != NULL)
      {
	  if (!ok_cost)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Cost Column \"%s\" is not defined in the Input Table",
		     cost_column);
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    if (name_column != NULL)
      {
	  if (!ok_name)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Name Column \"%s\" is not defined in the Input Table",
		     name_column);
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    if (oneway_from != NULL)
      {
	  if (!ok_oneway_from)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("OnewayFromTo Column \"%s\" is not defined in the Input Table",
		     oneway_from);
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    if (!ok_oneway_to)
      {
	  if (oneway_to != NULL)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("OnewayToFrom Column \"%s\" is not defined in the Input Table",
		     oneway_to);
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    if (geom_column != NULL)
      {
	  /* searching the SRID and DIMS of Geometry */
	  if (!do_search_srid
	      (db_handle, input_table, geom_column, &glob_srid, &glob_dims,
	       &is_geographic))
	    {
		char *msg = sqlite3_mprintf ("Unable to find geometry %Q.%Q",
					     input_table, geom_column);
		gaia_create_routing_set_error (cache, msg);
		return 0;
	    }
      }

/* testing actual values for consistency */
    sql = sqlite3_mprintf ("SELECT ROWID");
    prev = sql;
    xname = gaiaDoubleQuotedSql (from_column);
    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
    free (xname);
    sqlite3_free (prev);
    prev = sql;
    xname = gaiaDoubleQuotedSql (to_column);
    sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
    free (xname);
    sqlite3_free (prev);
    prev = sql;
    if (geom_column == NULL)
      {
	  sql = sqlite3_mprintf ("%s, NULL", prev);
	  sqlite3_free (prev);
      }
    else
      {
	  xname = gaiaDoubleQuotedSql (geom_column);
	  sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
	  free (xname);
	  sqlite3_free (prev);
      }
    prev = sql;
    if (a_star_enabled || cost_column == NULL)
      {
	  xname = gaiaDoubleQuotedSql (geom_column);
	  if (is_geographic)
	      sql = sqlite3_mprintf ("%s, ST_Length(\"%s\", 1)", prev, xname);
	  else
	      sql = sqlite3_mprintf ("%s, ST_Length(\"%s\")", prev, xname);
	  free (xname);
	  sqlite3_free (prev);
      }
    else
      {
	  sql = sqlite3_mprintf ("%s, NULL", prev);
	  sqlite3_free (prev);
      }
    prev = sql;
    if (cost_column == NULL)
      {
	  sql = sqlite3_mprintf ("%s, NULL", prev);
	  sqlite3_free (prev);
      }
    else
      {
	  xname = gaiaDoubleQuotedSql (cost_column);
	  sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
	  free (xname);
	  sqlite3_free (prev);
      }
    prev = sql;
    if (name_column == NULL)
      {
	  sql = sqlite3_mprintf ("%s, NULL", prev);
	  sqlite3_free (prev);
      }
    else
      {
	  xname = gaiaDoubleQuotedSql (name_column);
	  sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
	  free (xname);
	  sqlite3_free (prev);
      }
    prev = sql;
    if (oneway_from == NULL)
      {
	  sql = sqlite3_mprintf ("%s, NULL", prev);
	  sqlite3_free (prev);
      }
    else
      {
	  xname = gaiaDoubleQuotedSql (oneway_from);
	  sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
	  free (xname);
	  sqlite3_free (prev);
      }
    prev = sql;
    if (oneway_to == NULL)
      {
	  sql = sqlite3_mprintf ("%s, NULL", prev);
	  sqlite3_free (prev);
      }
    else
      {
	  xname = gaiaDoubleQuotedSql (oneway_to);
	  sql = sqlite3_mprintf ("%s, \"%s\"", prev, xname);
	  free (xname);
	  sqlite3_free (prev);
      }
    prev = sql;
    xtable = gaiaDoubleQuotedSql (input_table);
    sql = sqlite3_mprintf ("%s FROM \"%s\"", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* preparing the temp-nodes table */
    sql = "CREATE TEMPORARY TABLE create_routing_nodes ("
	"internal_index INTEGER,\n"
	"node_id INTEGER,\n"
	"node_code TEXT,\n"
	"node_x DOUBLE,\n" "node_y DOUBLE,\n" "node_z DOUBLE)";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto stop;
      }

    sql = "INSERT INTO create_routing_nodes "
	"(node_id, node_code, node_x, node_y, node_z) "
	"VALUES (?, ?, ?, ?, ?)";
    ret =
	sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_ins_nodes,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto stop;
      }

/* preparing the temp-links table */
    sql = "CREATE TEMPORARY TABLE create_routing_links ("
	"rowid INTEGER,\n"
	"id_node_from INTEGER,\n"
	"cod_node_from TEXT,\n"
	"id_node_to INTEGER,\n"
	"cod_node_to INTEGER,\n"
	"cost DOUBLE,\n" "index_from INTEGER,\n" "index_to INTEGER)";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto stop;
      }

    sql = "INSERT INTO create_routing_links "
	"(rowid, id_node_from, cod_node_from, id_node_to, cod_node_to, cost) "
	"VALUES (?, ?, ?, ?, ?, ?)";
    ret =
	sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_ins_links,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto stop;
      }

/* exploring all arcs/links */
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 rowid;
		sqlite3_int64 id_from;
		sqlite3_int64 id_to;
		const char *from;
		const char *to;
		int int_from;
		int int_to;
		int is3d;
		double x_from;
		double y_from;
		double z_from;
		double x_to;
		double y_to;
		double z_to;
		double length = -1.0;
		double cost = -1.0;
		int from_to = -1;
		int to_from = -1;
		int len;
		rowid = sqlite3_column_int64 (stmt, 0);
		if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
		  {
		      id_from = sqlite3_column_int64 (stmt, 1);
		      int_from = 1;
		  }
		else if (sqlite3_column_type (stmt, 1) == SQLITE_TEXT)
		  {
		      from = (const char *) sqlite3_column_text (stmt, 1);
		      len = strlen (from);
		      if (len > *max_code_length)
			  *max_code_length = len;
		      int_from = 0;
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("NodeFrom column \"%s\": found a value that's neither TEXT nor INTEGER",
			   from_column);
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      error = 1;
		      goto stop;
		  }
		if (first)
		    *has_ids = int_from;
		if (int_from != *has_ids)
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("NodeFrom column \"%s\": found a mismatching value",
			   from_column);
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      error = 1;
		      goto stop;
		  }
		if (sqlite3_column_type (stmt, 2) == SQLITE_INTEGER)
		  {
		      id_to = sqlite3_column_int64 (stmt, 2);
		      int_to = 1;
		  }
		else if (sqlite3_column_type (stmt, 2) == SQLITE_TEXT)
		  {
		      to = (const char *) sqlite3_column_text (stmt, 2);
		      len = strlen (to);
		      if (len > *max_code_length)
			  *max_code_length = len;
		      int_to = 0;
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("NodeTo column \"%s\": found a value that's neither TEXT nor INTEGER",
			   to_column);
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      error = 1;
		      goto stop;
		  }
		if (int_to != *has_ids)
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("NodeTo column \"%s\": found a mismatching value",
			   to_column);
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      error = 1;
		      goto stop;
		  }
		if (geom_column != NULL)
		  {
		      if (sqlite3_column_type (stmt, 3) == SQLITE_BLOB)
			{
			    int srid;
			    int dims;
			    struct splite_internal_cache *p_cache =
				(struct splite_internal_cache *) cache;
			    int gpkg_amphibious = 0;
			    int gpkg_mode = 0;
			    unsigned char *blob =
				(unsigned char *) sqlite3_column_blob (stmt, 3);
			    int bytes = sqlite3_column_bytes (stmt, 3);
			    if (cache != NULL)
			      {
				  gpkg_amphibious =
				      p_cache->gpkg_amphibious_mode;
				  gpkg_mode = p_cache->gpkg_mode;
			      }
			    gaiaGeomCollPtr g =
				gaiaFromSpatiaLiteBlobWkbEx (blob, bytes,
							     gpkg_mode,
							     gpkg_amphibious);
			    if (g == NULL)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("Geometry column \"%s\": found a BLOB value that's not a Geometry",
				       geom_column);
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  error = 1;
				  goto stop;
			      }
			    ok_geom =
				check_geom (g, &is3d, &x_from, &y_from, &z_from,
					    &x_to, &y_to, &z_to);
			    if (ok_geom)
			      {
				  srid = g->Srid;
				  dims = g->DimensionModel;
			      }
			    gaiaFreeGeomColl (g);
			    if (!ok_geom)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("Geometry column \"%s\": found a Geometry that's not a simple Linestring",
				       geom_column);
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  error = 1;
				  goto stop;
			      }
			    if (srid != glob_srid)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("Geometry column \"%s\": found a mismatching SRID",
				       geom_column);
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  error = 1;
				  goto stop;
			      }
			    if (dims != glob_dims)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("Geometry column \"%s\": found mismatching Dimensions",
				       geom_column);
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  error = 1;
				  goto stop;
			      }
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("Geometry column \"%s\": found a value that's not a BLOB",
				 geom_column);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto stop;
			}
		  }
		else
		  {
		      /* no geometry columns */
		      x_from = 0.0;
		      y_from = 0.0;
		      z_from = 0.0;
		      x_to = 0.0;
		      y_to = 0.0;
		      z_to = 0.0;
		  }
		if (a_star_enabled || cost_column == NULL)
		  {
		      if (sqlite3_column_type (stmt, 4) == SQLITE_FLOAT)
			  length = sqlite3_column_double (stmt, 4);
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("Geometry column \"%s\": ST_Length() returned an invalid value",
				 geom_column);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto stop;
			}
		  }
		if (cost_column != NULL)
		  {
		      if (sqlite3_column_type (stmt, 5) == SQLITE_FLOAT)
			{
			    cost = sqlite3_column_double (stmt, 5);
			    if (cost <= 0.0)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("Cost column \"%s\": found a negative or zero value",
				       cost_column);
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  error = 1;
				  goto stop;
			      }
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("Cost column \"%s\": found a value that's not a DOUBLE",
				 cost_column);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto stop;
			}
		  }
		else
		    cost = length;
		if (a_star_enabled)
		  {
		      if (cost_column == NULL)
			  *a_star_coeff = 1.0;
		      else
			{
			    double coeff = cost / length;
			    if (coeff < *a_star_coeff)
				*a_star_coeff = coeff;
			}
		  }
		if (name_column != NULL)
		  {
		      if (sqlite3_column_type (stmt, 6) == SQLITE_TEXT)
			  ;
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("Name column \"%s\": found a value that's not a TEXT string",
				 name_column);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto stop;
			}
		  }
		if (oneway_from != NULL)
		  {
		      if (sqlite3_column_type (stmt, 7) == SQLITE_INTEGER)
			  from_to = sqlite3_column_int (stmt, 7);
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("OnewayFromTo column \"%s\": found a value that's not an INTEGER",
				 oneway_from);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto stop;
			}
		  }
		if (oneway_to != NULL)
		  {
		      if (sqlite3_column_type (stmt, 8) == SQLITE_INTEGER)
			  to_from = sqlite3_column_int (stmt, 8);
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("OnewayToFrom column \"%s\": found a value that's not an INTEGER",
				 oneway_to);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto stop;
			}
		  }
		if (first)
		    first = 0;

		/* inserting NodeFrom */
		sqlite3_reset (stmt_ins_nodes);
		sqlite3_clear_bindings (stmt_ins_nodes);
		if (int_from)
		  {
		      sqlite3_bind_int64 (stmt_ins_nodes, 1, id_from);
		      sqlite3_bind_null (stmt_ins_nodes, 2);
		  }
		else
		  {
		      sqlite3_bind_null (stmt_ins_nodes, 1);
		      sqlite3_bind_text (stmt_ins_nodes, 2, from, strlen (from),
					 SQLITE_STATIC);
		  }
		sqlite3_bind_double (stmt_ins_nodes, 3, x_from);
		sqlite3_bind_double (stmt_ins_nodes, 4, y_from);
		sqlite3_bind_double (stmt_ins_nodes, 5, z_from);
		ret = sqlite3_step (stmt_ins_nodes);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("SQL error: %s", sqlite3_errmsg (db_handle));
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      goto stop;
		  }

		/* inserting NodeTo */
		sqlite3_reset (stmt_ins_nodes);
		sqlite3_clear_bindings (stmt_ins_nodes);
		if (int_to)
		  {
		      sqlite3_bind_int64 (stmt_ins_nodes, 1, id_to);
		      sqlite3_bind_null (stmt_ins_nodes, 2);
		  }
		else
		  {
		      sqlite3_bind_null (stmt_ins_nodes, 1);
		      sqlite3_bind_text (stmt_ins_nodes, 2, to, strlen (to),
					 SQLITE_STATIC);
		  }
		sqlite3_bind_double (stmt_ins_nodes, 3, x_to);
		sqlite3_bind_double (stmt_ins_nodes, 4, y_to);
		sqlite3_bind_double (stmt_ins_nodes, 5, z_to);
		ret = sqlite3_step (stmt_ins_nodes);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("SQL error: %s", sqlite3_errmsg (db_handle));
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      goto stop;
		  }

		/* inserting the Link(s) */
		if (bidirectional)
		  {
		      if (from_to)
			{
			    sqlite3_reset (stmt_ins_links);
			    sqlite3_clear_bindings (stmt_ins_links);
			    sqlite3_bind_int64 (stmt_ins_links, 1, rowid);
			    if (int_from)
			      {
				  sqlite3_bind_int64 (stmt_ins_links, 2,
						      id_from);
				  sqlite3_bind_null (stmt_ins_links, 3);
			      }
			    else
			      {
				  sqlite3_bind_null (stmt_ins_links, 2);
				  sqlite3_bind_text (stmt_ins_links, 3, from,
						     strlen (from),
						     SQLITE_STATIC);
			      }
			    if (int_to)
			      {
				  sqlite3_bind_int64 (stmt_ins_links, 4, id_to);
				  sqlite3_bind_null (stmt_ins_links, 5);
			      }
			    else
			      {
				  sqlite3_bind_null (stmt_ins_links, 4);
				  sqlite3_bind_text (stmt_ins_links, 5, to,
						     strlen (to),
						     SQLITE_STATIC);
			      }
			    sqlite3_bind_double (stmt_ins_links, 6, cost);
			    ret = sqlite3_step (stmt_ins_links);
			    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
				;
			    else
			      {
				  char *msg = sqlite3_mprintf ("SQL error: %s",
							       sqlite3_errmsg
							       (db_handle));
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  goto stop;
			      }
			}
		      if (to_from)
			{
			    sqlite3_reset (stmt_ins_links);
			    sqlite3_clear_bindings (stmt_ins_links);
			    sqlite3_bind_int64 (stmt_ins_links, 1, rowid);
			    if (int_to)
			      {
				  sqlite3_bind_int64 (stmt_ins_links, 2, id_to);
				  sqlite3_bind_null (stmt_ins_links, 3);
			      }
			    else
			      {
				  sqlite3_bind_null (stmt_ins_links, 2);
				  sqlite3_bind_text (stmt_ins_links, 3, to,
						     strlen (to),
						     SQLITE_STATIC);
			      }
			    if (int_from)
			      {
				  sqlite3_bind_int64 (stmt_ins_links, 4,
						      id_from);
				  sqlite3_bind_null (stmt_ins_links, 5);
			      }
			    else
			      {
				  sqlite3_bind_null (stmt_ins_links, 4);
				  sqlite3_bind_text (stmt_ins_links, 5, from,
						     strlen (from),
						     SQLITE_STATIC);
			      }
			    sqlite3_bind_double (stmt_ins_links, 6, cost);
			    ret = sqlite3_step (stmt_ins_links);
			    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
				;
			    else
			      {
				  char *msg = sqlite3_mprintf ("SQL error: %s",
							       sqlite3_errmsg
							       (db_handle));
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  goto stop;
			      }
			}
		  }
		else
		  {
		      sqlite3_reset (stmt_ins_links);
		      sqlite3_clear_bindings (stmt_ins_links);
		      sqlite3_bind_int64 (stmt_ins_links, 1, rowid);
		      if (int_from)
			{
			    sqlite3_bind_int64 (stmt_ins_links, 2, id_from);
			    sqlite3_bind_null (stmt_ins_links, 3);
			}
		      else
			{
			    sqlite3_bind_null (stmt_ins_links, 2);
			    sqlite3_bind_text (stmt_ins_links, 3, from,
					       strlen (from), SQLITE_STATIC);
			}
		      if (int_to)
			{
			    sqlite3_bind_int64 (stmt_ins_links, 4, id_to);
			    sqlite3_bind_null (stmt_ins_links, 5);
			}
		      else
			{
			    sqlite3_bind_null (stmt_ins_links, 4);
			    sqlite3_bind_text (stmt_ins_links, 5, to,
					       strlen (to), SQLITE_STATIC);
			}
		      sqlite3_bind_double (stmt_ins_links, 6, length);
		      sqlite3_bind_double (stmt_ins_links, 7, cost);
		      ret = sqlite3_step (stmt_ins_links);
		      if (ret == SQLITE_DONE || ret == SQLITE_ROW)
			  ;
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("SQL error: %s", sqlite3_errmsg (db_handle));
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    goto stop;
			}
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("SQL error: %s", sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto stop;
	    }
      }
  stop:
    if (stmt_ins_nodes != NULL)
	sqlite3_finalize (stmt_ins_nodes);
    if (stmt_ins_links != NULL)
	sqlite3_finalize (stmt_ins_links);
    sqlite3_finalize (stmt);
    if (error)
      {
	  /* rolling back the Savepoint */
	  sql = "ROLLBACK TO create_routing_one";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
	  return 0;
      }

/* releasing the Savepoint */
    sql = "RELEASE SAVEPOINT create_routing_one";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto stop;
      }

/* setting a Savepoint */
    sql = "SAVEPOINT create_routing_two";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* preparing the UPDATE tmp-Nodes statement */
    sql = "UPDATE create_routing_nodes SET internal_index = ? WHERE rowid = ?";
    ret =
	sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_update_nodes,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* checking Nodes topological consistency */
    if (*has_ids)
      {
	  sql = "SELECT rowid, node_id, node_x, node_y, node_z "
	      "FROM create_routing_nodes ORDER BY node_id, rowid";
      }
    else
      {
	  sql = "SELECT rowid, node_code, node_x, node_y, node_z "
	      "FROM create_routing_nodes ORDER BY node_code, rowid";
      }
    ret =
	sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_check_nodes,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    first = 1;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_check_nodes);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 rowid;
		const char *code;
		sqlite3_int64 id;
		double x;
		double y;
		double z;
		int mismatch = 0;
		rowid = sqlite3_column_int64 (stmt_check_nodes, 0);
		if (*has_ids)
		    id = sqlite3_column_int64 (stmt_check_nodes, 1);
		else
		    code =
			(const char *) sqlite3_column_text (stmt_check_nodes,
							    1);
		x = sqlite3_column_double (stmt_check_nodes, 2);
		y = sqlite3_column_double (stmt_check_nodes, 3);
		z = sqlite3_column_double (stmt_check_nodes, 4);
		if (first)
		  {
		      first = 0;
		      if (!do_update_internal_index
			  (db_handle, cache, stmt_update_nodes, rowid,
			   *n_nodes))
			  goto error;
		      *n_nodes += 1;
		      goto skip_first;
		  }
		if (*has_ids)
		  {
		      if (last_id != id)
			{
			    last_x = x;
			    last_y = y;
			    last_z = z;
			    if (!do_update_internal_index
				(db_handle, cache, stmt_update_nodes, rowid,
				 *n_nodes))
				goto error;
			    *n_nodes += 1;
			}
		  }
		else
		  {
		      if (strcmp (last_code, code) != 0)
			{
			    last_x = x;
			    last_y = y;
			    last_z = z;
			    if (!do_update_internal_index
				(db_handle, cache, stmt_update_nodes, rowid,
				 *n_nodes))
				goto error;
			    *n_nodes += 1;
			}
		  }
		if (x != last_x)
		    mismatch = 1;
		if (y != last_y)
		    mismatch = 1;
		if (z != last_z)
		    mismatch = 1;
		if (mismatch)
		  {
		      if (*has_ids)
			{
			    char *msg;
			    char xid[64];
			    sprintf (xid, FRMT64, id);
			    msg = sqlite3_mprintf
				("Node Id=%s: topology error", xid);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto error;
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("Node Code=%s: topology error", code);
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto error;
			}
		  }
	      skip_first:
		if (*has_ids)
		    last_id = id;
		else
		  {
		      int len = strlen (code);
		      if (last_code != NULL)
			  free (last_code);
		      last_code = malloc (len + 1);
		      strcpy (last_code, code);
		  }
		last_x = x;
		last_y = y;
		last_z = z;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("SQL error: %s", sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto error;
	    }
      }
  error:
    if (last_code != NULL)
	free (last_code);
    if (stmt_check_nodes != NULL)
	sqlite3_finalize (stmt_check_nodes);
    if (stmt_update_nodes != NULL)
	sqlite3_finalize (stmt_update_nodes);
    if (error)
      {
	  /* rolling back the Savepoint */
	  sql = "ROLLBACK TO create_routing_two";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
	  return 0;
      }

/* releasing the Savepoint */
    sql = "RELEASE SAVEPOINT create_routing_two";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto end;
      }

/* setting a Savepoint */
    sql = "SAVEPOINT create_routing_three";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* preparing an index supporting Temp-Nodes - internal index */
    sql = "CREATE INDEX idx_create_routing_internal "
	"ON create_routing_nodes (internal_index)";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto end;
      }

    if (*has_ids)
      {
	  /* preparing an index supporting Temp-Links - Id Node From */
	  sql =
	      "CREATE INDEX idx_create_routing_internal_from ON create_routing_links (id_node_from)";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
	  /* preparing an index supporting Temp-Links - Id Node To */
	  sql =
	      "CREATE INDEX idx_create_routing_internal_to ON create_routing_links (id_node_to)";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
      }
    else
      {
	  /* preparing an index supporting Temp-Links - Code Node From */
	  sql =
	      "CREATE INDEX idx_create_routing_internal_from ON create_routing_links (cod_node_from)";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		goto end;
		error = 1;
	    }
	  /* preparing an index supporting Temp-Links - Code Node To */
	  sql =
	      "CREATE INDEX idx_create_routing_internal_to ON create_routing_links (cod_node_to)";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
      }

    if (*has_ids)
      {
	  /* preparing the UPDATE tmp-Links statement - index from */
	  sql =
	      "UPDATE create_routing_links SET index_from = ? WHERE id_node_from = ?";
	  ret =
	      sqlite3_prepare_v2 (db_handle, sql, strlen (sql),
				  &stmt_update_links_from, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
	  /* preparing the UPDATE tmp-Links statement - index to */
	  sql =
	      "UPDATE create_routing_links SET index_to = ? WHERE id_node_to = ?";
	  ret =
	      sqlite3_prepare_v2 (db_handle, sql, strlen (sql),
				  &stmt_update_links_to, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
	  /* preparing the SELECT tmp-Nodes statement */
	  sql = "SELECT internal_index, node_id FROM create_routing_nodes "
	      "WHERE internal_index IS NOT NULL";
	  ret =
	      sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_sel_nodes,
				  NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
      }
    else
      {
	  /* preparing the UPDATE tmp-Links statement - index from */
	  sql =
	      "UPDATE create_routing_links SET index_from = ? WHERE cod_node_from = ?";
	  ret =
	      sqlite3_prepare_v2 (db_handle, sql, strlen (sql),
				  &stmt_update_links_from, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
	  /* preparing the UPDATE tmp-Links statement - index to */
	  sql =
	      "UPDATE create_routing_links SET index_to = ? WHERE cod_node_to = ?";
	  ret =
	      sqlite3_prepare_v2 (db_handle, sql, strlen (sql),
				  &stmt_update_links_to, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
	  /* preparing the SELECT tmp-Nodes statement */
	  sql = "SELECT internal_index, node_code FROM create_routing_nodes "
	      "WHERE internal_index IS NOT NULL";
	  ret =
	      sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_sel_nodes,
				  NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_sel_nodes);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int index;
		const char *code;
		sqlite3_int64 id;
		index = sqlite3_column_int (stmt_sel_nodes, 0);
		if (*has_ids)
		    id = sqlite3_column_int64 (stmt_sel_nodes, 1);
		else
		    code =
			(const char *) sqlite3_column_text (stmt_sel_nodes, 1);
		/* updating Index From */
		sqlite3_reset (stmt_update_links_from);
		sqlite3_clear_bindings (stmt_update_links_from);
		sqlite3_bind_int (stmt_update_links_from, 1, index);
		if (*has_ids)
		    sqlite3_bind_int64 (stmt_update_links_from, 2, id);
		else
		    sqlite3_bind_text (stmt_update_links_from, 2, code,
				       strlen (code), SQLITE_STATIC);
		ret = sqlite3_step (stmt_update_links_from);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("SQL error: %s", sqlite3_errmsg (db_handle));
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
		/* updating Index To */
		sqlite3_reset (stmt_update_links_to);
		sqlite3_clear_bindings (stmt_update_links_to);
		sqlite3_bind_int (stmt_update_links_to, 1, index);
		if (*has_ids)
		    sqlite3_bind_int64 (stmt_update_links_to, 2, id);
		else
		    sqlite3_bind_text (stmt_update_links_to, 2, code,
				       strlen (code), SQLITE_STATIC);
		ret = sqlite3_step (stmt_update_links_to);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("SQL error: %s", sqlite3_errmsg (db_handle));
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("SQL error: %s", sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto end;
	    }
      }

/* dropping Temp-Links indices */
    sql = "DROP INDEX idx_create_routing_internal_from";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("SQL error: %s",
				       sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto end;
      }
    sql = "DROP INDEX idx_create_routing_internal_to";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("SQL error: %s",
				       sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto end;
      }
/* preparing an index supporting Temp-Links - final */
    sql =
	"CREATE INDEX idx_create_routing_internal_final ON create_routing_links (index_from, cost, index_to)";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("SQL error: %s",
				       sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto end;
      }

  end:
    if (stmt_sel_nodes != NULL)
	sqlite3_finalize (stmt_sel_nodes);
    if (stmt_update_links_from != NULL)
	sqlite3_finalize (stmt_update_links_from);
    if (stmt_update_links_to != NULL)
	sqlite3_finalize (stmt_update_links_to);
    if (error)
      {
	  /* rolling back the Savepoint */
	  sql = "ROLLBACK TO create_routing_three";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
	  return 0;
      }

/* releasing the Savepoint */
    sql = "RELEASE SAVEPOINT create_routing_three";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

static int
do_prepare_header (unsigned char *buf, int endian_arch, int n_nodes,
		   int has_ids, int max_code_length, const char *input_table,
		   const char *from_column, const char *to_column,
		   const char *geom_column, const char *name_column,
		   int a_star_supported, double a_star_coeff)
{
/* preparing the HEADER block */
    int len;
    unsigned char *out = buf;
    if (a_star_supported)
	*out++ = GAIA_NET64_A_STAR_START;
    else
	*out++ = GAIA_NET64_START;
    *out++ = GAIA_NET_HEADER;
    gaiaExport32 (out, n_nodes, 1, endian_arch);	/* how many Nodes are there */
    out += 4;
    if (has_ids)
	*out++ = GAIA_NET_ID;	/* Nodes are identified by an INTEGER id */
    else
	*out++ = GAIA_NET_CODE;	/* Nodes are identified by a TEXT code */
    if (has_ids)
	*out++ = 0x00;
    else
	*out++ = max_code_length;	/* max TEXT code length */
/* inserting the main Table name */
    *out++ = GAIA_NET_TABLE;
    len = strlen (input_table) + 1;
    gaiaExport16 (out, len, 1, endian_arch);	/* the Table Name length, including last '\0' */
    out += 2;
    memset (out, '\0', len);
    strcpy ((char *) out, input_table);
    out += len;
/* inserting the NodeFrom column name */
    *out++ = GAIA_NET_FROM;
    len = strlen (from_column) + 1;
    gaiaExport16 (out, len, 1, endian_arch);	/* the NodeFrom column Name length, including last '\0' */
    out += 2;
    memset (out, '\0', len);
    strcpy ((char *) out, from_column);
    out += len;
/* inserting the NodeTo column name */
    *out++ = GAIA_NET_TO;
    len = strlen (to_column) + 1;
    gaiaExport16 (out, len, 1, endian_arch);	/* the NodeTo column Name length, including last '\0' */
    out += 2;
    memset (out, '\0', len);
    strcpy ((char *) out, to_column);
    out += len;
/* inserting the Geometry column name */
    *out++ = GAIA_NET_GEOM;
    if (!geom_column)
	len = 1;
    else
	len = strlen (geom_column) + 1;
    gaiaExport16 (out, len, 1, endian_arch);	/* the Geometry column Name length, including last '\0' */
    out += 2;
    memset (out, '\0', len);
    if (geom_column)
	strcpy ((char *) out, geom_column);
    out += len;
/* inserting the Name column name - may be empty */
    *out++ = GAIA_NET_NAME;
    if (!name_column)
	len = 1;
    else
	len = strlen (name_column) + 1;
    gaiaExport16 (out, len, 1, endian_arch);	/* the Name column Name length, including last '\0' */
    out += 2;
    memset (out, '\0', len);
    if (name_column)
	strcpy ((char *) out, name_column);
    out += len;
    if (a_star_supported)
      {
	  /* inserting the A* Heuristic Coeff */
	  *out++ = GAIA_NET_A_STAR_COEFF;
	  gaiaExport64 (out, a_star_coeff, 1, endian_arch);
	  out += 8;
      }
    *out++ = GAIA_NET_END;
    return out - buf;
}

static int
output_node (unsigned char *auxbuf, int *size, int index, int has_ids,
	     int max_code_length, int endian_arch, int a_star_enabled,
	     sqlite3_int64 id, const char *code, double x, double y,
	     short count_outcomings, sqlite3 * db_handle, const void *cache,
	     sqlite3_stmt * stmt_to)
{
/* exporting a Node into NETWORK-DATA */
    int ret;
    unsigned char *out = auxbuf;
    *out++ = GAIA_NET_NODE;
    gaiaExport32 (out, index, 1, endian_arch);	/* the Node internal index */
    out += 4;
    if (has_ids)
      {
	  /* Nodes are identified by an INTEGER Id */
	  gaiaExportI64 (out, id, 1, endian_arch);	/* the Node ID */
	  out += 8;
      }
    else
      {
	  /* Nodes are identified by a TEXT Code */
	  memset (out, '\0', max_code_length);
	  strcpy ((char *) out, code);
	  out += max_code_length;
      }
    if (a_star_enabled)
      {
	  /* in order to support the A* algorithm [X,Y] are required for each node */
	  gaiaExport64 (out, x, 1, endian_arch);
	  out += 8;
	  gaiaExport64 (out, y, 1, endian_arch);
	  out += 8;
      }
    gaiaExport16 (out, count_outcomings, 1, endian_arch);	/* # of outcoming arcs */
    out += 2;

/* querying all outcoming arcs/links */
    sqlite3_reset (stmt_to);
    sqlite3_clear_bindings (stmt_to);
    sqlite3_bind_int (stmt_to, 1, index);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_to);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 rowid = sqlite3_column_int64 (stmt_to, 0);
		int index_to = sqlite3_column_int (stmt_to, 1);
		double cost = sqlite3_column_double (stmt_to, 2);
		*out++ = GAIA_NET_ARC;
		gaiaExportI64 (out, rowid, 1, endian_arch);	/* the Arc rowid */
		out += 8;
		gaiaExport32 (out, index_to, 1, endian_arch);	/* the ToNode internal index */
		out += 4;
		gaiaExport64 (out, cost, 1, endian_arch);	/* the Arc Cost */
		out += 8;
		*out++ = GAIA_NET_END;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("SQL error: %s", sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    *out++ = GAIA_NET_END;
    *size = out - auxbuf;
    return 1;
}

static int
do_create_data (sqlite3 * db_handle, const void *cache,
		const char *output_table, const char *input_table,
		const char *from_column, const char *to_column,
		const char *geom_column, const char *name_column,
		int a_star_enabled, double a_star_coeff, int has_ids,
		int n_nodes, int max_code_length)
{
/* creating and populating the Routing Data table */
    char *sql;
    int ret;
    char *xtable;
    sqlite3_stmt *stmt_from = NULL;
    sqlite3_stmt *stmt_to = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int error = 0;
    unsigned char *auxbuf = NULL;
    unsigned char *buf = NULL;
    unsigned char *out;
    int nodes_cnt;
    int size;
    int endian_arch = gaiaEndianArch ();

/* setting a Savepoint */
    sql = "SAVEPOINT create_routing_four";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* creating the NETWORK-DATA table */
    xtable = gaiaDoubleQuotedSql (output_table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" ("
			   "Id INTEGER PRIMARY KEY,\nNetworkData BLOB NOT NULL)",
			   xtable);
    free (xtable);
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto error;
      }

/* preparing the Insert SQL statement */
    xtable = gaiaDoubleQuotedSql (output_table);
    sql =
	sqlite3_mprintf
	("INSERT INTO \"%s\" (Id, NetworkData) VALUES (?, ?)", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto error;
      }

/* preparing the Select Node From SQL statement */
    if (has_ids)
	sql =
	    "SELECT n.internal_index, n.node_id, n.node_x, n.node_y, Count(l.rowid) "
	    "FROM create_routing_nodes AS n "
	    "LEFT JOIN create_routing_links as l ON (l.index_from = n.internal_index) "
	    "WHERE n.internal_index IS NOT NULL " "GROUP BY n.internal_index";
    else
	sql =
	    "SELECT n.internal_index, n.node_code, n.node_x, n.node_y, Count(l.rowid) "
	    "FROM create_routing_nodes AS n "
	    "LEFT JOIN create_routing_links as l ON (l.index_from = n.internal_index) "
	    "WHERE n.internal_index IS NOT NULL " "GROUP BY n.internal_index";
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_from, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto error;
      }

/* preparing the Select Node To SQL statement */
    sql = "SELECT rowid, index_to, cost "
	"FROM create_routing_links "
	"WHERE index_from = ? " "ORDER BY cost, index_to";
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_to, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto error;
      }

/* preparing and inserting the Routing Header block */
    buf = malloc (MAX_BLOCK);
    size =
	do_prepare_header (buf, endian_arch, n_nodes, has_ids, max_code_length,
			   input_table, from_column, to_column, geom_column,
			   name_column, a_star_enabled, a_star_coeff);
    sqlite3_reset (stmt_out);
    sqlite3_clear_bindings (stmt_out);
    sqlite3_bind_int (stmt_out, 1, 0);
    sqlite3_bind_blob (stmt_out, 2, buf, size, SQLITE_STATIC);
    ret = sqlite3_step (stmt_out);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  error = 1;
	  goto error;
      }

/*
/ looping on Nodes 
/ preparing a new data block 
*/
    out = buf;
    *out++ = GAIA_NET_BLOCK;
    gaiaExport16 (out, 0, 1, endian_arch);	/* how many Nodes are into this block */
    out += 2;
    nodes_cnt = 0;
    auxbuf = malloc (MAX_BLOCK);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_from);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int index;
		const char *code = NULL;
		sqlite3_int64 id = -1;
		double x;
		double y;
		int count_outcomings;
		index = sqlite3_column_int (stmt_from, 0);
		if (has_ids)
		    id = sqlite3_column_int64 (stmt_from, 1);
		else
		    code = (const char *) sqlite3_column_text (stmt_from, 1);
		x = sqlite3_column_double (stmt_from, 2);
		y = sqlite3_column_double (stmt_from, 3);
		count_outcomings = sqlite3_column_int (stmt_from, 4);
		if (!output_node
		    (auxbuf, &size, index, has_ids, max_code_length,
		     endian_arch, a_star_enabled, id, code, x, y,
		     count_outcomings, db_handle, cache, stmt_to))
		  {
		      error = 1;
		      goto error;
		  }
		if (size >= (MAX_BLOCK - (out - buf)))
		  {
		      /* inserting the last block */
		      gaiaExport16 (buf + 1, nodes_cnt, 1, endian_arch);	/* how many Nodes are into this block */
		      sqlite3_reset (stmt_out);
		      sqlite3_clear_bindings (stmt_out);
		      sqlite3_bind_null (stmt_out, 1);
		      sqlite3_bind_blob (stmt_out, 2, buf, out - buf,
					 SQLITE_STATIC);
		      ret = sqlite3_step (stmt_out);
		      if (ret == SQLITE_DONE || ret == SQLITE_ROW)
			  ;
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("SQL error: %s", sqlite3_errmsg (db_handle));
			    gaia_create_routing_set_error (cache, msg);
			    sqlite3_free (msg);
			    error = 1;
			    goto error;
			}
		      /* preparing a new block */
		      out = buf;
		      *out++ = GAIA_NET_BLOCK;
		      gaiaExport16 (out, 0, 1, endian_arch);	/* how many Nodes are into this block */
		      out += 2;
		      nodes_cnt = 0;
		  }
		/* inserting the current Node into the block */
		nodes_cnt++;
		memcpy (out, auxbuf, size);
		out += size;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("SQL error: %s", sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto error;
	    }
      }
    if (nodes_cnt)
      {
	  /* inserting the last data block */
	  gaiaExport16 (buf + 1, nodes_cnt, 1, endian_arch);	/* how many Nodes are into this block */
	  sqlite3_reset (stmt_out);
	  sqlite3_clear_bindings (stmt_out);
	  sqlite3_bind_null (stmt_out, 1);
	  sqlite3_bind_blob (stmt_out, 2, buf, out - buf, SQLITE_STATIC);
	  ret = sqlite3_step (stmt_out);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("SQL error: %s", sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		error = 1;
		goto error;
	    }
      }

  error:
    if (auxbuf != NULL)
	free (auxbuf);
    if (buf != NULL)
	free (buf);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    if (stmt_from != NULL)
	sqlite3_finalize (stmt_from);
    if (stmt_to != NULL)
	sqlite3_finalize (stmt_to);
    if (error)
      {
	  /* rolling back the Savepoint */
	  sql = "ROLLBACK TO create_routing_four";
	  ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		return 0;
	    }
	  return 0;
      }

/* releasing the Savepoint */
    sql = "RELEASE SAVEPOINT create_routing_four";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

static int
do_create_virtual_routing (sqlite3 * db_handle, const void *cache,
			   const char *routing_data_table,
			   const char *virtual_routing_table)
{
/* creating the VirtualRouting table - dropping the Temp-Tables */
    char *xtable1;
    char *xtable2;
    char *sql;
    int ret;

    xtable1 = gaiaDoubleQuotedSql (virtual_routing_table);
    xtable2 = gaiaDoubleQuotedSql (routing_data_table);
    sql =
	sqlite3_mprintf
	("CREATE VIRTUAL TABLE \"%s\" USING  VirtualRouting(\"%s\")", xtable1,
	 xtable2);
    free (xtable1);
    free (xtable2);
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto rollback;
      }
    do_drop_temp_tables (db_handle);

/* releasing the Savepoint */
    sql = "RELEASE SAVEPOINT create_routing_zero";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;

  rollback:
    sql = "ROLLBACK TO create_routing_zero";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 0;
}

static int
do_check_registered_spatial_table (sqlite3 * db_handle, const char *db_prefix,
				   const char *table, const char *geom_column,
				   char **geom_name)
{
/* checking for a valid Spatial Table */
    char *xprefix;
    char *sql;
    char *name = NULL;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int type;
    int count = 0;
    int is_linestring = 0;

    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xprefix = gaiaDoubleQuotedSql (db_prefix);

    if (geom_column == NULL)
      {
	  sql =
	      sqlite3_mprintf
	      ("SELECT f_geometry_column, geometry_type FROM \"%s\".geometry_columns WHERE "
	       "Lower(f_table_name) = Lower(%Q)", xprefix, table);
      }
    else
      {
	  sql =
	      sqlite3_mprintf
	      ("SELECT f_geometry_column, geometry_type FROM \"%s\".geometry_columns WHERE "
	       "Lower(f_table_name) = Lower(%Q) AND Lower(f_geometry_column) = Lower(%Q)",
	       xprefix, table, geom_column);
      }
    free (xprefix);
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		const char *geom = (const char *) sqlite3_column_text (stmt, 0);
		int len = strlen (geom);
		if (name != NULL)
		    free (name);
		name = malloc (len + 1);
		strcpy (name, geom);
		type = sqlite3_column_int (stmt, 1);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
      {
	  switch (type)
	    {
	    case GAIA_LINESTRING:
	    case GAIA_LINESTRINGZ:
	    case GAIA_LINESTRINGM:
	    case GAIA_LINESTRINGZM:
		is_linestring = 1;
		break;
	    default:
		is_linestring = 0;
		break;
	    };
      }
    if (is_linestring)
      {
	  *geom_name = name;
	  return 1;
      }
    if (name != NULL)
	free (name);
    return 0;
}

static int
do_check_spatial_table (sqlite3 * db_handle, const void *cache,
			const char *db_prefix, const char *table,
			const char *geom_column, const char *from_column,
			const char *to_column, char **geom_name)
{
/* testing if the Spatial Table exists and it's correctly defined */
    char *xprefix;
    char *xtable;
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int ok_from = 0;
    int ok_to = 0;
    int ok_geom = 0;

/* checking for a valid Spatial Table */
    *geom_name = NULL;
    if (!do_check_registered_spatial_table
	(db_handle, db_prefix, table, geom_column, geom_name))
      {
	  char *msg;
	  if (geom_column == NULL)
	      msg =
		  sqlite3_mprintf
		  ("%Q is not a valid Spatial Table (LINESTRING)", table);
	  else
	      msg =
		  sqlite3_mprintf
		  ("%Q.%Q is not a valid Spatial Table (LINESTRING)", table,
		   geom_column);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free(msg);
	  return 0;
      }

/* checking the table's columns */
    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (db_handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
      {
	  const char *col = results[(i * columns) + 1];
	  if (strcasecmp (col, from_column) == 0)
	      ok_from = 1;
	  if (strcasecmp (col, to_column) == 0)
	      ok_to = 1;
	  if (strcasecmp (col, *geom_name) == 0)
	      ok_geom = 1;
      }
    sqlite3_free_table (results);

/* final validity check */
    if (ok_from)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("FromNode Column \"%s\" is already defined in the Spatial Table",
	       from_column);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    if (ok_to)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ToNode Column \"%s\" is already defined in the Spatial Table",
	       to_column);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    if (!ok_geom)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("Geometry Column \"%s\" is not defined in the Spatial Table",
	       geom_name);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

static int
do_insert_temp_aux_node (sqlite3 * db_handle, sqlite3_stmt * stmt, double x,
			 double y, double z, char **msg)
{
/* inserting an Aux Node */
    int ret;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, x);
    sqlite3_bind_double (stmt, 2, y);
    sqlite3_bind_double (stmt, 3, z);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;

/* some error occurred */
    *msg = sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
    return 0;
}

static int
do_update_link (sqlite3 * db_handle, sqlite3_stmt * stmt,
		sqlite3_stmt * stmt_upd, int rowid, double from_x,
		double from_y, double from_z, double to_x, double to_y,
		double to_z, char **msg)
{
/* updating the Spatial Table - step #1 */
    int ret;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, from_x);
    sqlite3_bind_double (stmt, 2, from_y);
    sqlite3_bind_double (stmt, 3, from_z);
    sqlite3_bind_double (stmt, 4, to_x);
    sqlite3_bind_double (stmt, 5, to_y);
    sqlite3_bind_double (stmt, 6, to_z);
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		int node_from = sqlite3_column_int (stmt, 0);
		int node_to = sqlite3_column_int (stmt, 1);

		sqlite3_reset (stmt_upd);
		sqlite3_clear_bindings (stmt_upd);
		sqlite3_bind_int (stmt_upd, 1, node_from);
		sqlite3_bind_int (stmt_upd, 2, node_to);
		sqlite3_bind_int (stmt_upd, 3, rowid);
		ret = sqlite3_step (stmt_upd);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    return 1;
		else
		  {
		      *msg =
			  sqlite3_mprintf ("SQL error: %s",
					   sqlite3_errmsg (db_handle));
		      return 0;
		  }

/* some error occurred */
		*msg =
		    sqlite3_mprintf ("SQL error: %s",
				     sqlite3_errmsg (db_handle));
		return 0;
	    }
	  else
	    {
		*msg =
		    sqlite3_mprintf ("SQL error: %s",
				     sqlite3_errmsg (db_handle));
		return 0;
	    }
      }
    return 1;
}

static int
do_create_routing_nodes (sqlite3 * db_handle, const void *cache,
			 const char *db_prefix, const char *table,
			 const char *geom_column, const char *from_column,
			 const char *to_column)
{
/* creating and populating the Routing Nodes columns */
    char *xprefix;
    char *xtable;
    char *xcolumn;
    char *xfrom;
    char *xto;
    char *sql;
    int ret;
    sqlite3_stmt *stmt_q1 = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    sqlite3_stmt *stmt_q2 = NULL;
    sqlite3_stmt *stmt_upd = NULL;

/* adding the FromNode column */
    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xcolumn = gaiaDoubleQuotedSql (from_column);
    sql =
	sqlite3_mprintf ("ALTER TABLE \"%s\".\"%s\" ADD COLUMN \"%s\" INTEGER",
			 xprefix, xtable, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* adding the ToNode column */
    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xcolumn = gaiaDoubleQuotedSql (to_column);
    sql =
	sqlite3_mprintf ("ALTER TABLE \"%s\".\"%s\" ADD COLUMN \"%s\" INTEGER",
			 xprefix, xtable, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* dropping the Temporary Aux Table (just in case) */
    sql = "DROP TABLE temp_create_routing_aux_nodes";
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);

/* creating the Temporary Aux Table for Nodes */
    sql = "CREATE TEMPORARY TABLE temp_create_routing_aux_nodes ("
	"x DOUBLE, y DOUBLE, z DOUBLE, "
	"CONSTRAINT pk_create_routing_aux_nodes PRIMARY KEY (x, y, z))";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the query statement for identifying all Nodes */
    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xcolumn = gaiaDoubleQuotedSql (geom_column);
    sql =
	sqlite3_mprintf
	("SELECT ROWID, ST_StartPoint(\"%s\"), ST_EndPoint(\"%s\") "
	 "FROM \"%s\".\"%s\"", xcolumn, xcolumn, xprefix, xtable);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_q1, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the INSERT statement for Aux Nodes */
    sql = "INSERT OR IGNORE INTO temp_create_routing_aux_nodes "
	"VALUES (?, ?, ?)";
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_ins, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the query statement for identifying all Node-IDs */
    sql = "SELECT a.ROWID, b.ROWID "
	"FROM temp_create_routing_aux_nodes AS a, "
	"temp_create_routing_aux_nodes AS b "
	"WHERE a.x = ? AND a.y = ? AND a.z = ? "
	"AND b.x = ? AND b.y = ? AND b.z = ?";
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_q2, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the UPDATE statement */
    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xfrom = gaiaDoubleQuotedSql (from_column);
    xto = gaiaDoubleQuotedSql (to_column);
    sql = sqlite3_mprintf ("UPDATE \"%s\".\"%s\" SET \"%s\" = ?, \"%s\" = ? "
			   "WHERE ROWID = ?", xprefix, xtable, xfrom, xto);
    free (xprefix);
    free (xtable);
    free (xfrom);
    free (xto);
    ret = sqlite3_prepare_v2 (db_handle, sql, strlen (sql), &stmt_upd, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* populating the Temp Aux Nodes */
    while (1)
      {
	  ret = sqlite3_step (stmt_q1);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob;
		int size;
		gaiaGeomCollPtr geom;
		gaiaPointPtr pt;
		double x;
		double y;
		double z;
		char *msg;
		if (sqlite3_column_type (stmt_q1, 1) == SQLITE_BLOB)
		  {
		      blob =
			  (const unsigned char *) sqlite3_column_blob (stmt_q1,
								       1);
		      size = sqlite3_column_bytes (stmt_q1, 1);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
		      if (geom)
			{
			    pt = geom->FirstPoint;
			    x = pt->X;
			    y = pt->Y;
			    if (geom->DimensionModel == GAIA_XY_Z
				|| geom->DimensionModel == GAIA_XY_Z_M)
				z = pt->Z;
			    else
				z = 0.0;
			    gaiaFreeGeomColl (geom);
			    if (!do_insert_temp_aux_node
				(db_handle, stmt_ins, x, y, z, &msg))
			      {
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  goto error;
			      }
			}
		  }
		if (sqlite3_column_type (stmt_q1, 2) == SQLITE_BLOB)
		  {
		      blob =
			  (const unsigned char *) sqlite3_column_blob (stmt_q1,
								       2);
		      size = sqlite3_column_bytes (stmt_q1, 2);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
		      if (geom)
			{
			    pt = geom->FirstPoint;
			    x = pt->X;
			    y = pt->Y;
			    if (geom->DimensionModel == GAIA_XY_Z
				|| geom->DimensionModel == GAIA_XY_Z_M)
				z = pt->Z;
			    else
				z = 0.0;
			    gaiaFreeGeomColl (geom);
			    if (!do_insert_temp_aux_node
				(db_handle, stmt_ins, x, y, z, &msg))
			      {
				  gaia_create_routing_set_error (cache, msg);
				  sqlite3_free (msg);
				  goto error;
			      }
			}
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

/* updating the Spatial Table */
    sqlite3_reset (stmt_q1);
    while (1)
      {
	  ret = sqlite3_step (stmt_q1);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob;
		int size;
		gaiaGeomCollPtr geom;
		gaiaPointPtr pt;
		double from_x = DBL_MIN;
		double from_y = DBL_MIN;
		double from_z = DBL_MIN;
		double to_x = DBL_MIN;
		double to_y = DBL_MIN;
		double to_z = DBL_MIN;
		char *msg;
		int rowid = sqlite3_column_int (stmt_q1, 0);
		if (sqlite3_column_type (stmt_q1, 1) == SQLITE_BLOB)
		  {
		      blob =
			  (const unsigned char *) sqlite3_column_blob (stmt_q1,
								       1);
		      size = sqlite3_column_bytes (stmt_q1, 1);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
		      if (geom)
			{
			    pt = geom->FirstPoint;
			    from_x = pt->X;
			    from_y = pt->Y;
			    if (geom->DimensionModel == GAIA_XY_Z
				|| geom->DimensionModel == GAIA_XY_Z_M)
				from_z = pt->Z;
			    else
				from_z = 0.0;
			    gaiaFreeGeomColl (geom);
			}
		  }
		if (sqlite3_column_type (stmt_q1, 2) == SQLITE_BLOB)
		  {
		      blob =
			  (const unsigned char *) sqlite3_column_blob (stmt_q1,
								       2);
		      size = sqlite3_column_bytes (stmt_q1, 2);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
		      if (geom)
			{
			    pt = geom->FirstPoint;
			    to_x = pt->X;
			    to_y = pt->Y;
			    if (geom->DimensionModel == GAIA_XY_Z
				|| geom->DimensionModel == GAIA_XY_Z_M)
				to_z = pt->Z;
			    else
				to_z = 0.0;
			    gaiaFreeGeomColl (geom);
			}
		  }
		if (!do_update_link
		    (db_handle, stmt_q2, stmt_upd, rowid, from_x, from_y,
		     from_z, to_x, to_y, to_z, &msg))
		  {
		      gaia_create_routing_set_error (cache, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("SQL error: %s",
					     sqlite3_errmsg (db_handle));
		gaia_create_routing_set_error (cache, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_q1);
    sqlite3_finalize (stmt_q2);
    sqlite3_finalize (stmt_ins);
    sqlite3_finalize (stmt_upd);

/* dropping the Temporary Aux Table */
    sql = "DROP TABLE temp_create_routing_aux_nodes";
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);

/* COMMIT */
    sql = "RELEASE SAVEPOINT create_routing_nodes";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    return 1;

  error:
    if (stmt_q1 != NULL)
	sqlite3_finalize (stmt_q1);
    if (stmt_q2 != NULL)
	sqlite3_finalize (stmt_q2);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    if (stmt_upd != NULL)
	sqlite3_finalize (stmt_upd);
/* ROLLBACK */
    sql = "ROLLBACK TO create_routing_nodes";
    sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    return 0;
}

SPATIALITE_DECLARE int
gaia_create_routing_nodes (sqlite3 * db_handle,
			   const void *cache,
			   const char *db_prefix,
			   const char *table,
			   const char *geom_column,
			   const char *from_column, const char *to_column)
{
/* attempting to create a Routing Nodes columns for a spatial table */
    const char *sql;
    int ret;
    char *geom_name = NULL;

    if (db_handle == NULL || cache == NULL)
	return 0;

    if (table == NULL)
      {
	  gaia_create_routing_set_error (cache, "Spatial Table Name is NULL");
	  return 0;
      }
    if (from_column == NULL)
      {
	  gaia_create_routing_set_error (cache, "FromNode Column Name is NULL");
	  return 0;
      }
    if (to_column == NULL)
      {
	  gaia_create_routing_set_error (cache, "ToNode Column Name is NULL");
	  return 0;
      }

/* testing the spatial table */
    if (!do_check_spatial_table
	(db_handle, cache, db_prefix, table, geom_column, from_column,
	 to_column, &geom_name))
	goto error;

/* setting a global Savepoint */
    sql = "SAVEPOINT create_routing_nodes";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* creating and populating the Routing Nodes columns */
    if (!do_create_routing_nodes
	(db_handle, cache, db_prefix, table, geom_name, from_column, to_column))
	goto error;

    free (geom_name);
    return 1;

  error:
    if (geom_name != NULL)
	free (geom_name);
    return 0;
}

SPATIALITE_DECLARE int
gaia_create_routing (sqlite3 * db_handle,
		     const void *cache,
		     const char *routing_data_table,
		     const char
		     *virtual_routing_table,
		     const char *input_table,
		     const char *from_column,
		     const char *to_column,
		     const char *geom_column,
		     const char *cost_column,
		     const char *name_column,
		     int a_star_enabled,
		     int bidirectional,
		     const char *oneway_from,
		     const char *oneway_to, int overwrite)
{
/* attempting to create a VirtualRouting from an input table */
    int has_ids;
    int n_nodes = 0;
    int max_code_length = 0;
    double a_star_coeff = DBL_MAX;
    const char *sql;
    int ret;

    if (db_handle == NULL || cache == NULL)
	return 0;

    gaia_create_routing_set_error (cache, NULL);
    if (routing_data_table == NULL)
      {
	  gaia_create_routing_set_error (cache,
					 "Routing Data Table Name is NULL");
	  return 0;
      }
    if (virtual_routing_table == NULL)
      {
	  gaia_create_routing_set_error (cache,
					 "VirtualRouting Table Name is NULL");
	  return 0;
      }
    if (input_table == NULL)
      {
	  gaia_create_routing_set_error (cache, "Input Table Name is NULL");
	  return 0;
      }
    if (from_column == NULL)
      {
	  gaia_create_routing_set_error (cache, "FromNode Column Name is NULL");
	  return 0;
      }
    if (to_column == NULL)
      {
	  gaia_create_routing_set_error (cache, "ToNode Column Name is NULL");
	  return 0;
      }
    if (geom_column == NULL && cost_column == NULL)
      {
	  gaia_create_routing_set_error (cache,
					 "Both Geometry Column and Cost Column Names are NULL at the same time");
	  return 0;
      }
    if (oneway_from == NULL && oneway_to != NULL)
      {
	  gaia_create_routing_set_error (cache,
					 "OnewayFromTo is NULL but OnewayToFrom is NOT NULL");
	  return 0;
      }
    if (oneway_from != NULL && oneway_to == NULL)
      {
	  gaia_create_routing_set_error (cache,
					 "OnewayFromTo is NOT NULL but OnewayToFrom is NULL");
	  return 0;
      }
    if (oneway_from != NULL && oneway_to != NULL && !bidirectional)
      {
	  gaia_create_routing_set_error (cache,
					 "Both OnewayFromTo and OnewayToFrom are NOT NULL but Unidirectional has been specified");
	  return 0;
      }
    if (a_star_enabled && geom_column == NULL)
      {
	  gaia_create_routing_set_error (cache,
					 "Geometry Columns is NULL but A* is enabled");
	  return 0;
      }

/* setting a global Savepoint */
    sql = "SAVEPOINT create_routing_zero";
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("SQL error: %s", sqlite3_errmsg (db_handle));
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* dropping the TempTables (just in case) */
    do_drop_temp_tables (db_handle);

    if (overwrite)
      {
	  /* attempting to drop existing tables (just in case) */
	  do_drop_tables (db_handle, routing_data_table, virtual_routing_table);
      }

/* testing for existing tables */
    if (do_check_data_table (db_handle, routing_data_table))
      {
	  char *msg =
	      sqlite3_mprintf ("Routing Data Table \"%s\" already exists",
			       routing_data_table);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    if (do_check_virtual_table (db_handle, virtual_routing_table))
      {
	  char *msg =
	      sqlite3_mprintf ("VirtualRouting Table \"%s\" already exists",
			       virtual_routing_table);
	  gaia_create_routing_set_error (cache, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* testing the input table */
    if (!do_check_input_table
	(db_handle, cache, input_table, from_column, to_column, geom_column,
	 cost_column, name_column, oneway_from, oneway_to, a_star_enabled,
	 bidirectional, &has_ids, &n_nodes, &max_code_length, &a_star_coeff))
	return 0;

/* creating and populating the Routing Data table */
    if (!do_create_data
	(db_handle, cache, routing_data_table, input_table, from_column,
	 to_column, geom_column, name_column, a_star_enabled, a_star_coeff,
	 has_ids, n_nodes, max_code_length))
	return 0;

/* creating the VirtualRouting table */
    if (!do_create_virtual_routing
	(db_handle, cache, routing_data_table, virtual_routing_table))
	return 0;

    return 1;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/spatialite/extra_tables.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
...
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
...
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
....
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
....
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
....
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
....
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057

2058
2059
2060
2061
2062
2063
2064
2065
2066
....
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
....
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
....
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410

2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456

2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
....
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
....
2959
2960
2961
2962
2963
2964
2965
2966

2967
2968
2969
2970
2971
2972
2973
....
3878
3879
3880
3881
3882
3883
3884

3885
3886
3887
3888
3889
3890
3891
3892
....
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
/*

 extra_tables.c -- Creating all SLD/SE and ISO Metadata extra tables

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_raster_coverages_srid (sqlite3 * sqlite)
{
/* checking if the "raster_coverages_srid" table already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table' "
	"AND Upper(name) = Upper('raster_coverages_srid')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_raster_coverages_ref_sys (sqlite3 * sqlite)
{
/* checking if the "raster_coverages_ref_sys" view already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
................................................................................
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'view' "
	"AND Upper(name) = Upper('raster_coverages_ref_sys')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_raster_coverages_keyword (sqlite3 * sqlite)
{
/* checking if the "raster_coverages_keyword" table already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table' "
	"AND Upper(name) = Upper('raster_coverages_keyword')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
................................................................................
	"extent_maxx DOUBLE,\n"
	"extent_maxy DOUBLE,\n"
	"strict_resolution INTEGER NOT NULL,\n"
	"mixed_resolutions INTEGER NOT NULL,\n"
	"section_paths INTEGER NOT NULL,\n"
	"section_md5 INTEGER NOT NULL,\n"
	"section_summary INTEGER NOT NULL,\n"
	"is_queryable INTEGER NOT NULL,\n"
	"red_band_index INTEGER,\n"
	"green_band_index INTEGER,\n"
	"blue_band_index INTEGER,\n"
	"nir_band_index INTEGER,\n"
	"enable_auto_ndvi INTEGER,\n"
	"copyright TEXT NOT NULL DEFAULT '*** unknown ***',\n"
	"license INTEGER NOT NULL DEFAULT 0,\n"
	"CONSTRAINT fk_rc_srs FOREIGN KEY (srid) "
	"REFERENCES spatial_ref_sys (srid),\n"
	"CONSTRAINT fk_rc_lic FOREIGN KEY (license) "
	"REFERENCES data_licenses (id))";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'raster_coverages' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER raster_coverages_update\n"
	"BEFORE UPDATE ON 'raster_coverages'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT, 'update on raster_coverages violates constraint: "
	"attempting to change the definition of an already populated Coverage')\n"
	"WHERE IsPopulatedCoverage(NULL, OLD.coverage_name) = 1 AND "
	"((OLD.sample_type <> NEW.sample_type) AND (OLD.pixel_type <> NEW.sample_type) "
	"OR (OLD.num_bands <> NEW.num_bands) OR (OLD.compression <> NEW.compression) "
	"OR (OLD.quality <> NEW.quality) OR (OLD.tile_width <> NEW.tile_width) "
	"OR (OLD.tile_height <> NEW.tile_height) OR (OLD.horz_resolution <> NEW.horz_resolution) "
	"OR (OLD.vert_resolution <> NEW.vert_resolution) OR "
	"(OLD.srid <> NEW.srid) OR (OLD.nodata_pixel <> NEW.nodata_pixel));\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
................................................................................
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER raster_coverages_delete\n"
	"BEFORE DELETE ON 'raster_coverages'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT, 'delete on raster_coverages violates constraint: "
	"attempting to delete the definition of an already populated Coverage')\n"
	"WHERE IsPopulatedCoverage(NULL, OLD.coverage_name) = 1;\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW 'raster_coverages_ref_sys' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the raster_coverages_keyword table */
    sql = "CREATE TABLE raster_coverages_keyword (\n"
	"coverage_name TEXT NOT NULL,\n"
	"keyword TEXT NOT NULL,\n"
	"CONSTRAINT pk_raster_coverages_keyword PRIMARY KEY (coverage_name, keyword),\n"
	"CONSTRAINT fk_raster_coverages_keyword FOREIGN KEY (coverage_name) "
	"REFERENCES raster_coverages (coverage_name) ON DELETE CASCADE)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'raster_coverages_keyword' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
/* creating the raster_coverages_keyword triggers */
    sql = "CREATE TRIGGER raster_coverages_keyword_name_insert\n"
	"BEFORE INSERT ON 'raster_coverages_keyword'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'insert on raster_coverages_keyword violates constraint: "
	"coverage_name value must not contain a single quote')\n"
	"WHERE NEW.coverage_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'insert on raster_coverages_keyword violates constraint: "
	"coverage_name value must not contain a double quote')\n"
	"WHERE NEW.coverage_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'insert on raster_coverages_keyword violates constraint: "
	"coverage_name value must be lower case')\n"
	"WHERE NEW.coverage_name <> lower(NEW.coverage_name);\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER raster_coverages_keyword_name_update\n"
	"BEFORE UPDATE OF 'coverage_name' ON 'raster_coverages_keyword'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'update on raster_coverages_keyword violates constraint: "
	"coverage_name value must not contain a single quote')\n"
	"WHERE NEW.coverage_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'update on raster_coverages_keyword violates constraint: "
	"coverage_name value must not contain a double quote')\n"
	"WHERE NEW.coverage_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'update on raster_coverages_keyword violates constraint: "
	"coverage_name value must be lower case')\n"
	"WHERE NEW.coverage_name <> lower(NEW.coverage_name);\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    return 1;
}

SPATIALITE_PRIVATE int
createRasterCoveragesTable (void *p_sqlite)
{
/* Creating the main RasterCoverages table */
................................................................................
    ok_table = check_raster_coverages (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateRasterCoveragesTable() error: table 'raster_coverages' already exists\n");
	  goto error;
      }
    ok_table = check_raster_coverages_srid (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateRasterCoveragesTable() error: table 'raster_coverages_srid' already exists\n");
	  goto error;
      }
    ok_table = check_raster_coverages_ref_sys (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateRasterCoveragesTable() error: view 'raster_coverages_ref_sys' already exists\n");
	  goto error;
      }
    ok_table = check_raster_coverages_keyword (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateRasterCoveragesTable() error: table 'raster_coverages_keyword' already exists\n");
	  goto error;
      }

/* creating the main RasterCoverages table */
    if (!create_raster_coverages (sqlite))
	goto error;
    return 1;

  error:
    return 0;
}

static int
check_if_coverage_exists (sqlite3 * sqlite, const char *db_prefix,
			  const char *coverage)
{
/* checking if a Coverage table already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    char *xdb_prefix;

    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    sql_statement =
	sqlite3_mprintf
	("SELECT name FROM \"%s\".sqlite_master WHERE type = 'table' "

	 "AND Upper(name) = Upper(%Q)", xdb_prefix, coverage);
    free (xdb_prefix);
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
................................................................................
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

SPATIALITE_PRIVATE int
checkPopulatedCoverage (void *p_sqlite, const char *db_prefix,
			const char *coverage_name)
{
/* checking if a Coverage table is already populated */
    int is_populated = 0;
    char *xdb_prefix;
    char *xname;
    char *xxname;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sqlite3 *sqlite = p_sqlite;

    xname = sqlite3_mprintf ("%s_tile_data", coverage_name);
    if (!check_if_coverage_exists (sqlite, db_prefix, xname))
      {
	  sqlite3_free (xname);
	  return 0;
      }
    if (db_prefix == NULL)
	db_prefix = "MAIN";
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    xxname = gaiaDoubleQuotedSql (xname);
    sqlite3_free (xname);
    sql_statement =
	sqlite3_mprintf ("SELECT ROWID FROM \"%s\".\"%s\" LIMIT 10", xdb_prefix,
			 xxname);
    free (xdb_prefix);
    free (xxname);
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
................................................................................
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_vector_coverages_keyword (sqlite3 * sqlite)
{
/* checking if the "vector_coverages_keyword" table already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table' "
	"AND Upper(name) = Upper('vector_coverages_keyword')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
create_vector_coverages (sqlite3 * sqlite)
{
/* creating the "vector_coverages" table */
    char *sql;
    int ret;
    char *err_msg = NULL;
    sql = "CREATE TABLE vector_coverages (\n"
	"coverage_name TEXT NOT NULL PRIMARY KEY,\n"
	"f_table_name TEXT,\n"
	"f_geometry_column,\n"
	"view_name TEXT,\n"
	"view_geometry,\n"
	"virt_name TEXT,\n"
	"virt_geometry,\n"
	"topology_name TEXT,\n"
	"network_name TEXT,\n"
	"geo_minx DOUBLE,\n"
	"geo_miny DOUBLE,\n"
	"geo_maxx DOUBLE,\n"
	"geo_maxy DOUBLE,\n"
	"extent_minx DOUBLE,\n"
	"extent_miny DOUBLE,\n"
	"extent_maxx DOUBLE,\n"
	"extent_maxy DOUBLE,\n"
	"title TEXT NOT NULL DEFAULT '*** missing Title ***',\n"
	"abstract TEXT NOT NULL DEFAULT '*** missing Abstract ***',\n"
	"is_queryable INTEGER NOT NULL,\n"
	"is_editable INTEGER NOT NULL,\n"
	"copyright TEXT NOT NULL DEFAULT '*** unknown ***',\n"
	"license INTEGER NOT NULL DEFAULT 0,\n"
	"CONSTRAINT fk_vc_gc FOREIGN KEY (f_table_name, f_geometry_column) "
	"REFERENCES geometry_columns (f_table_name, f_geometry_column) "
	"ON DELETE CASCADE,\n"
	"CONSTRAINT fk_vc_sv FOREIGN KEY (view_name, view_geometry) "
	"REFERENCES views_geometry_columns (view_name, view_geometry) "
	"ON DELETE CASCADE,\n"
	"CONSTRAINT fk_vc_vt FOREIGN KEY (virt_name, virt_geometry) "
	"REFERENCES virts_geometry_columns (virt_name, virt_geometry) "
	"ON DELETE CASCADE,\n"
	"CONSTRAINT fk_vc_lic FOREIGN KEY (license) "
	"REFERENCES data_licenses (id))";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'vector_coverages' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the vector_coverages_ref_sys view */
    sql = "CREATE VIEW vector_coverages_ref_sys AS\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, v.abstract AS abstract, "
	"v.is_queryable AS is_queryable, v.geo_minx AS geo_minx, v.geo_miny AS geo_miny, "
	"v.geo_maxx AS geo_maxx, v.geo_maxy AS geo_maxy, v.extent_minx AS extent_minx, "
	"v.extent_miny AS extent_miny, v.extent_maxx AS extent_maxx, v.extent_maxy AS extent_maxy, "
	"s.srid AS srid, 1 AS native_srid, s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN geometry_columns AS x ON (v.topology_name IS NULL AND v.network_name IS NULL AND "
	"v.f_table_name IS NOT NULL AND v.f_geometry_column IS NOT NULL AND "
	"v.f_table_name = x.f_table_name AND v.f_geometry_column = x.f_geometry_column)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)\n"
	"UNION\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, v.abstract AS abstract, "
	"v.is_queryable AS is_queryable, v.geo_minx AS geo_minx, v.geo_miny AS geo_miny, "
	"v.geo_maxx AS geo_maxx, v.geo_maxy AS geo_maxy, v.extent_minx AS extent_minx, "
	"v.extent_miny AS extent_miny, v.extent_maxx AS extent_maxx, v.extent_maxy AS extent_maxy, "

	"s.srid AS srid, 1 AS native_srid, s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN views_geometry_columns AS y ON (v.view_name IS NOT NULL AND "
	"v.view_geometry IS NOT NULL AND v.view_name = y.view_name AND "
	"v.view_geometry = y.view_geometry)\n"
	"JOIN geometry_columns AS x ON (y.f_table_name = x.f_table_name AND "
	"y.f_geometry_column = x.f_geometry_column)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)\n"
	"UNION\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, v.abstract AS abstract, "
	"v.is_queryable AS is_queryable, v.geo_minx AS geo_minx, v.geo_miny AS geo_miny, "
	"v.geo_maxx AS geo_maxx, v.geo_maxy AS geo_maxy, v.extent_minx AS extent_minx, "
	"v.extent_miny AS extent_miny, v.extent_maxx AS extent_maxx, v.extent_maxy AS extent_maxy, "
	"s.srid AS srid, 1 AS native_srid, s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN virts_geometry_columns AS x ON (v.virt_name IS NOT NULL "
	"AND v.virt_geometry IS NOT NULL AND v.virt_name = x.virt_name "
	"AND v.virt_geometry = x.virt_geometry)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)\n"
	"UNION\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, v.abstract AS abstract, "
	"v.is_queryable AS is_queryable, v.geo_minx AS geo_minx, v.geo_miny AS geo_miny, "
	"v.geo_maxx AS geo_maxx, v.geo_maxy AS geo_maxy, v.extent_minx AS extent_minx, "
	"v.extent_miny AS extent_miny, v.extent_maxx AS extent_maxx, v.extent_maxy AS extent_maxy, "
	"s.srid AS srid, 1 AS native_srid, s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN topologies AS x ON (v.topology_name IS NOT NULL AND v.topology_name = x.topology_name)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)\n"
	"UNION\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, v.abstract AS abstract, "
	"v.is_queryable AS is_queryable, v.geo_minx AS geo_minx, v.geo_miny AS geo_miny, "
	"v.geo_maxx AS geo_maxx, v.geo_maxy AS geo_maxy, v.extent_minx AS extent_minx, "
	"v.extent_miny AS extent_miny, v.extent_maxx AS extent_maxx, v.extent_maxy AS extent_maxy, "
	"s.srid AS srid, 1 AS native_srid, s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN networks AS x ON (v.network_name IS NOT NULL AND v.network_name = x.network_name)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)\n"
	"UNION\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, v.abstract AS abstract, "
	"v.is_queryable AS is_queryable, v.geo_minx AS geo_minx, v.geo_miny AS geo_miny, "
	"v.geo_maxx AS geo_maxx, v.geo_maxy AS geo_maxy, x.extent_minx AS extent_minx, "
	"x.extent_miny AS extent_miny, x.extent_maxx AS extent_maxx, x.extent_maxy AS extent_maxy, "

	"s.srid AS srid, 0 AS native_srid, s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN vector_coverages_srid AS x ON (v.coverage_name = x.coverage_name)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW 'vector_coverages_ref_sys' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the vector_coverages_keyword table */
    sql = "CREATE TABLE vector_coverages_keyword (\n"
	"coverage_name TEXT NOT NULL,\n"
	"keyword TEXT NOT NULL,\n"
	"CONSTRAINT pk_vector_coverages_keyword PRIMARY KEY (coverage_name, keyword),\n"
	"CONSTRAINT fk_vector_coverages_keyword FOREIGN KEY (coverage_name) "
	"REFERENCES vector_coverages (coverage_name) ON DELETE CASCADE)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'vector_coverages_keyword' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
/* creating the vector_coverages_keyword triggers */
    sql = "CREATE TRIGGER vector_coverages_keyword_name_insert\n"
	"BEFORE INSERT ON 'vector_coverages_keyword'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'insert on vector_coverages_keyword violates constraint: "
	"coverage_name value must not contain a single quote')\n"
	"WHERE NEW.coverage_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'insert on vector_coverages_keyword violates constraint: "
	"coverage_name value must not contain a double quote')\n"
	"WHERE NEW.coverage_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'insert on vector_coverages_keyword violates constraint: "
	"coverage_name value must be lower case')\n"
	"WHERE NEW.coverage_name <> lower(NEW.coverage_name);\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER vector_coverages_keyword_name_update\n"
	"BEFORE UPDATE OF 'coverage_name' ON 'vector_coverages_keyword'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'update on vector_coverages_keyword violates constraint: "
	"coverage_name value must not contain a single quote')\n"
	"WHERE NEW.coverage_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'update on vector_coverages_keyword violates constraint: "
	"coverage_name value must not contain a double quote')\n"
	"WHERE NEW.coverage_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'update on vector_coverages_keyword violates constraint: "
	"coverage_name value must be lower case')\n"
	"WHERE NEW.coverage_name <> lower(NEW.coverage_name);\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    return 1;
}

SPATIALITE_PRIVATE int
createVectorCoveragesTable (void *p_sqlite)
{
/* Creating the main VectorCoverages table */
    int ok_table;
    sqlite3 *sqlite = p_sqlite;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

/* attempting to create Topologies and Networks tables */
    do_create_topologies (sqlite);
    do_create_networks (sqlite);

/* checking if already defined */
    ok_table = check_vector_coverages (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateVectorCoveragesTable() error: table 'vector_coverages' already exists\n");
	  goto error;
................................................................................
    ok_table = check_vector_coverages_ref_sys (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateVectorCoveragesTable() error: view 'vector_coverages_ref_sys' already exists\n");
	  goto error;
      }
    ok_table = check_vector_coverages_keyword (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateVectorCoveragesTable() error: table 'vector_coverages_keyword' already exists\n");
	  goto error;
      }

/* creating the main VectorCoverages table */
    if (!create_vector_coverages (sqlite))
	goto error;
    return 1;

#else

    spatialite_e
	("CreateVectorCoveragesTable() error: libspatialite was built by disabling Topology\n");

#endif /* end ENABLE_RTTOPO conditionals */

  error:
    return 0;
}

static int
check_wms_getcapabilities (sqlite3 * sqlite)
{
/* checking if the "wms_getcapabilities" table already exists */
    int exists = 0;
    const char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table'"
	"AND Upper(name) = Upper('wms_getcapabilities')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_wms_getmap (sqlite3 * sqlite)
{
/* checking if the "wms_getmap" table already exists */
    int exists = 0;
    const char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table'"
	"AND Upper(name) = Upper('wms_getmap')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_wms_settings (sqlite3 * sqlite)
{
/* checking if the "wms_settings" table already exists */
    int exists = 0;
    const char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table'"
	"AND Upper(name) = Upper('wms_settings')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
check_wms_ref_sys (sqlite3 * sqlite)
{
/* checking if the "wms_ref_sys" table already exists */
    int exists = 0;
    const char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'table'"
	"AND Upper(name) = Upper('wms_ref_sys')";
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

static int
create_wms_tables (sqlite3 * sqlite)
{
/* creating the WMS support tables */
    char *sql;
    int ret;
    char *err_msg = NULL;
    sql = "CREATE TABLE wms_getcapabilities (\n"
	"id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
	"url TEXT NOT NULL,\n"
	"title TEXT NOT NULL DEFAULT '*** undefined ***',\n"
	"abstract TEXT NOT NULL DEFAULT '*** undefined ***')";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'wms_getcapabilities' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql =
	"CREATE UNIQUE INDEX idx_wms_getcapabilities ON wms_getcapabilities (url)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX 'idx_wms_getcapabilities' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql = "CREATE TABLE wms_getmap (\n"
	"id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
	"parent_id INTEGER NOT NULL,\n"
	"url TEXT NOT NULL,\n"
	"layer_name TEXT NOT NULL,\n"
	"title TEXT NOT NULL DEFAULT '*** undefined ***',\n"
	"abstract TEXT NOT NULL DEFAULT '*** undefined ***',\n"
	"version TEXT NOT NULL,\n"
	"srs TEXT NOT NULL,\n"
	"format TEXT NOT NULL,\n"
	"style TEXT NOT NULL,\n"
	"transparent INTEGER NOT NULL CHECK (transparent IN (0, 1)),\n"
	"flip_axes INTEGER NOT NULL CHECK (flip_axes IN (0, 1)),\n"
	"is_queryable INTEGER NOT NULL CHECK (is_queryable IN (0, 1)),\n"
	"getfeatureinfo_url TEXT,\n"
	"bgcolor TEXT,\n"
	"tiled INTEGER NOT NULL CHECK (tiled IN (0, 1)),\n"
	"tile_width INTEGER NOT NULL CHECK (tile_width BETWEEN 256 AND 5000),\n"
	"tile_height INTEGER NOT NULL CHECK (tile_width BETWEEN 256 AND 5000),\n"
	"is_cached INTEGER NOT NULL CHECK (is_cached IN (0, 1)),\n"
	"copyright TEXT NOT NULL DEFAULT '*** unknown ***',\n"
	"license INTEGER NOT NULL DEFAULT 0,\n"
	"CONSTRAINT fk_wms_getmap FOREIGN KEY (parent_id) "
	"REFERENCES wms_getcapabilities (id) ON DELETE CASCADE,\n"
	"CONSTRAINT fk_wms_lic FOREIGN KEY (license) "
	"REFERENCES data_licenses (id))";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'wms_getmap' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE UNIQUE INDEX idx_wms_getmap ON wms_getmap (url, layer_name)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX 'idx_wms_getmap' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql = "CREATE TABLE wms_settings (\n"
	"id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
	"parent_id INTEGER NOT NULL,\n"
	"key TEXT NOT NULL CHECK (Lower(key) IN ('version', 'format', 'style')),\n"
	"value TEXT NOT NULL,\n"
	"is_default INTEGER NOT NULL CHECK (is_default IN (0, 1)),\n"
	"CONSTRAINT fk_wms_settings FOREIGN KEY (parent_id) "
	"REFERENCES wms_getmap (id) ON DELETE CASCADE)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'wms_settings' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql =
	"CREATE UNIQUE INDEX idx_wms_settings ON wms_settings (parent_id, key, value)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX 'idx_wms_settings' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql = "CREATE TABLE wms_ref_sys (\n"
	"id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
	"parent_id INTEGER NOT NULL,\n"
	"srs TEXT NOT NULL,\n"
	"minx DOUBLE NOT NULL,\n"
	"miny DOUBLE NOT NULL,\n"
	"maxx DOUBLE NOT NULL,\n"
	"maxy DOUBLE NOT NULL,\n"
	"is_default INTEGER NOT NULL CHECK (is_default IN (0, 1)),\n"
	"CONSTRAINT fk_wms_ref_sys FOREIGN KEY (parent_id) "
	"REFERENCES wms_getmap (id) ON DELETE CASCADE)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'wms_ref_sys' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE UNIQUE INDEX idx_wms_ref_sys ON wms_ref_sys (parent_id, srs)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX 'idx_wms_ref_sys' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

SPATIALITE_PRIVATE int
createWMSTables (void *p_sqlite)
{
/* Creating all WMS support tables */
    int ok_table;
    sqlite3 *sqlite = p_sqlite;

/* checking if already defined */
    ok_table = check_wms_getcapabilities (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("WMS_CreateTables() error: table 'wms_getcapabilities' already exists\n");
	  goto error;
      }
    ok_table = check_wms_getmap (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("WMS_CreateTables() error: table 'wms_getmap' already exists\n");
	  goto error;
      }
    ok_table = check_wms_settings (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("WMS_CreateTables() error: table 'wms_settings' already exists\n");
	  goto error;
      }
    ok_table = check_wms_ref_sys (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("WMS_CreateTables() error: table 'wms_ref_sys' already exists\n");
	  goto error;
      }

/* creating the WMS support tables */
    if (!create_wms_tables (sqlite))
	goto error;
    return 1;

  error:
    return 0;
}

#ifdef ENABLE_LIBXML2		/* including LIBXML2 */
................................................................................
create_fonts (sqlite3 * sqlite)
{
/* creating the SE_fonts table */
    char *sql;
    int ret;
    char *err_msg = NULL;
    sql = "CREATE TABLE SE_fonts (\n"
	"font_facename TEXT NOT NULL PRIMARY KEY,\n" "font BLOB NOT NULL)";

    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'SE_fonts' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
	 "GetFontFamily(font) AS family_name, "
	 "IsFontBold(font) AS bold, IsFontItalic(font) AS italic, "
	 "font AS font\nFROM SE_fonts");
    ret = sqlite3_exec (sqlite, sql_statement, NULL, NULL, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {

	  spatialite_e ("CREATE VIEW 'SE_fonts_view' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    return 1;
}

static int
................................................................................
    p_tbl = tables;
    p_view = views;
    while (*p_tbl != NULL)
      {
	  ok_table = check_styling_table (sqlite, *p_tbl, *p_view);
	  if (ok_table)
	    {
		/*
		   spatialite_e
		   ("CreateStylingTables() error: table '%s' already exists\n",
		   *p_tbl);
		 */
		goto error;
	    }
	  p_tbl++;
	  p_view++;
      }

/* creating the SLD/SE Styling tables */
    if (!check_raster_coverages (sqlite))
      {
	  /* creating the main RasterCoverages table as well */
	  if (!create_raster_coverages (sqlite))
	      goto error;
      }
#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    if (!check_vector_coverages (sqlite))
      {
	  /* creating both TOPOLOGIES and NETWORKS tables */
	  do_create_topologies (sqlite);
	  do_create_networks (sqlite);
	  /* creating the main VectorCoverages table as well */
	  if (!create_vector_coverages (sqlite))
	      goto error;
      }
#endif /* end TOPOLOGY conditionals */
    if (!create_external_graphics (sqlite))
	goto error;
    if (!create_fonts (sqlite))
	goto error;
    if (!create_vector_styles (sqlite, relaxed))
	goto error;
    if (!create_raster_styles (sqlite, relaxed))




|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|





<
<

|
<
<







 







|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







<
<
<
<
<
<
<











|
<










<
<
<
<
<

<
<
>
|
<







 







|
<



<










<

|




<
<
<



|
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|
|
<
<
<
<
<
<










|
<
<
<
|

|
<
<
<
<
<
<
<
<







 







|
|
|
<
<
<
<
<
<
<
<
<
<
|
|
|
>
|


<
<
<
|
|

<
|
|
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
|
|
>
|












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










<
<
<
<
<
<







 







<
<
|
<
<
<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
>







 







>
|







 







<
|
|
|
<













<


<
<
<




<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
770
771
772
773
774
775
776




























777
778
779
780
781
782
783
...
785
786
787
788
789
790
791




























792
793
794
795
796
797
798
...
835
836
837
838
839
840
841
842
843
844
845
846
847


848
849


850
851
852
853
854
855
856
....
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
....
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
....
1868
1869
1870
1871
1872
1873
1874





















































1875
1876
1877
1878
1879
1880
1881
....
1886
1887
1888
1889
1890
1891
1892







1893
1894
1895
1896
1897
1898
1899







1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911

1912
1913
1914
1915
1916
1917
1918
1919
1920
1921





1922


1923
1924

1925
1926
1927
1928
1929
1930
1931
....
1934
1935
1936
1937
1938
1939
1940
1941

1942
1943
1944

1945
1946
1947
1948
1949
1950
1951
1952
1953
1954

1955
1956
1957
1958
1959
1960



1961
1962
1963
1964


1965
1966
1967
1968
1969
1970
1971
....
2058
2059
2060
2061
2062
2063
2064




























2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075






2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086



2087
2088
2089








2090
2091
2092
2093
2094
2095
2096
....
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209










2210
2211
2212
2213
2214
2215
2216



2217
2218
2219

2220
2221











2222









2223










2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239





















































2240
2241
2242
2243
2244
2245
2246
2247
2248
2249






2250
2251
2252
2253
2254
2255
2256
....
2265
2266
2267
2268
2269
2270
2271


2272





2273
2274
2275





































































































































































































































































































2276
2277
2278
2279
2280
2281
2282
....
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
....
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
....
3542
3543
3544
3545
3546
3547
3548

3549
3550
3551

3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564

3565
3566



3567
3568
3569
3570

3571
3572
3573
3574
3575
3576
3577
/*

 extra_tables.c -- Creating all SLD/SE and ISO Metadata extra tables

 version 4.0, 2013 February 16

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}





























static int
check_raster_coverages_ref_sys (sqlite3 * sqlite)
{
/* checking if the "raster_coverages_ref_sys" view already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
................................................................................
    char **results;
    int rows;
    int columns;
    int i;
    sql_statement = "SELECT name FROM sqlite_master WHERE type = 'view' "
	"AND Upper(name) = Upper('raster_coverages_ref_sys')";
    ret =




























	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
................................................................................
	"extent_maxx DOUBLE,\n"
	"extent_maxy DOUBLE,\n"
	"strict_resolution INTEGER NOT NULL,\n"
	"mixed_resolutions INTEGER NOT NULL,\n"
	"section_paths INTEGER NOT NULL,\n"
	"section_md5 INTEGER NOT NULL,\n"
	"section_summary INTEGER NOT NULL,\n"
	"is_queryable INTEGER,\n"
	"red_band_index INTEGER,\n"
	"green_band_index INTEGER,\n"
	"blue_band_index INTEGER,\n"
	"nir_band_index INTEGER,\n"
	"enable_auto_ndvi INTEGER,\n"


	"CONSTRAINT fk_rc_srs FOREIGN KEY (srid) "
	"REFERENCES spatial_ref_sys (srid))";


    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'raster_coverages' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER raster_coverages_update\n"
	"BEFORE UPDATE ON 'raster_coverages'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT, 'update on raster_coverages violates constraint: "
	"attempting to change the definition of an already populated Coverage')\n"
	"WHERE IsPopulatedCoverage(OLD.coverage_name) = 1 AND "
	"((OLD.sample_type <> NEW.sample_type) AND (OLD.pixel_type <> NEW.sample_type) "
	"OR (OLD.num_bands <> NEW.num_bands) OR (OLD.compression <> NEW.compression) "
	"OR (OLD.quality <> NEW.quality) OR (OLD.tile_width <> NEW.tile_width) "
	"OR (OLD.tile_height <> NEW.tile_height) OR (OLD.horz_resolution <> NEW.horz_resolution) "
	"OR (OLD.vert_resolution <> NEW.vert_resolution) OR "
	"(OLD.srid <> NEW.srid) OR (OLD.nodata_pixel <> NEW.nodata_pixel));\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
................................................................................
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER raster_coverages_delete\n"
	"BEFORE DELETE ON 'raster_coverages'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT, 'delete on raster_coverages violates constraint: "
	"attempting to delete the definition of an already populated Coverage')\n"
	"WHERE IsPopulatedCoverage(OLD.coverage_name) = 1;\nEND";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW 'raster_coverages_ref_sys' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }





















































    return 1;
}

SPATIALITE_PRIVATE int
createRasterCoveragesTable (void *p_sqlite)
{
/* Creating the main RasterCoverages table */
................................................................................
    ok_table = check_raster_coverages (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateRasterCoveragesTable() error: table 'raster_coverages' already exists\n");
	  goto error;
      }







    ok_table = check_raster_coverages_ref_sys (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateRasterCoveragesTable() error: view 'raster_coverages_ref_sys' already exists\n");
	  goto error;
      }








/* creating the main RasterCoverages table */
    if (!create_raster_coverages (sqlite))
	goto error;
    return 1;

  error:
    return 0;
}

static int
check_if_coverage_exists (sqlite3 * sqlite, const char *coverage)

{
/* checking if a Coverage table already exists */
    int exists = 0;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;





    sql_statement =


	sqlite3_mprintf ("SELECT name FROM sqlite_master WHERE type = 'table' "
			 "AND Upper(name) = Upper(%Q)", coverage);

    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
................................................................................
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}

SPATIALITE_PRIVATE int
checkPopulatedCoverage (void *p_sqlite, const char *coverage_name)

{
/* checking if a Coverage table is already populated */
    int is_populated = 0;

    char *xname;
    char *xxname;
    char *sql_statement;
    char *errMsg = NULL;
    int ret;
    char **results;
    int rows;
    int columns;
    int i;
    sqlite3 *sqlite = p_sqlite;

    xname = sqlite3_mprintf ("%s_tile_data", coverage_name);
    if (!check_if_coverage_exists (sqlite, xname))
      {
	  sqlite3_free (xname);
	  return 0;
      }



    xxname = gaiaDoubleQuotedSql (xname);
    sqlite3_free (xname);
    sql_statement =
	sqlite3_mprintf ("SELECT ROWID FROM \"%s\" LIMIT 10", xxname);


    free (xxname);
    ret =
	sqlite3_get_table (sqlite, sql_statement, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
................................................................................
      }
    for (i = 1; i <= rows; i++)
	exists = 1;
    sqlite3_free_table (results);
    return exists;
}





























static int
create_vector_coverages (sqlite3 * sqlite)
{
/* creating the "vector_coverages" table */
    char *sql;
    int ret;
    char *err_msg = NULL;
    sql = "CREATE TABLE vector_coverages (\n"
	"coverage_name TEXT NOT NULL PRIMARY KEY,\n"
	"f_table_name TEXT NOT NULL,\n"
	"f_geometry_column TEXT NOT NULL,\n"






	"geo_minx DOUBLE,\n"
	"geo_miny DOUBLE,\n"
	"geo_maxx DOUBLE,\n"
	"geo_maxy DOUBLE,\n"
	"extent_minx DOUBLE,\n"
	"extent_miny DOUBLE,\n"
	"extent_maxx DOUBLE,\n"
	"extent_maxy DOUBLE,\n"
	"title TEXT NOT NULL DEFAULT '*** missing Title ***',\n"
	"abstract TEXT NOT NULL DEFAULT '*** missing Abstract ***',\n"
	"is_queryable INTEGER,\n"



	"CONSTRAINT fk_vector_coverages FOREIGN KEY (f_table_name, f_geometry_column) "
	"REFERENCES geometry_columns (f_table_name, f_geometry_column) "
	"ON DELETE CASCADE)";








    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'vector_coverages' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the vector_coverages_ref_sys view */
    sql = "CREATE VIEW vector_coverages_ref_sys AS\n"
	"SELECT v.coverage_name AS coverage_name, v.title AS title, "
	"v.abstract AS abstract, v.is_queryable AS is_queryable, "
	"v.geo_minx AS geo_minx, "










	"v.geo_miny AS geo_miny, v.geo_maxx AS geo_maxx, "
	"v.geo_maxy AS geo_may, v.extent_minx AS extent_minx, "
	"v.extent_miny AS extent_miny, v.extent_maxx AS extent_maxx, "
	"v.extent_maxy AS extent_maxy, s.srid AS srid, 1 AS native_srid, "
	"s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"



	"JOIN geometry_columns AS x ON (v.f_table_name = x.f_table_name "
	"AND v.f_geometry_column = x.f_geometry_column)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)\n"

	"UNION\nSELECT v.coverage_name AS coverage_name, v.title AS title, "
	"v.abstract AS abstract, v.is_queryable AS is_queryable, "











	"v.geo_minx AS geo_minx, "









	"v.geo_miny AS geo_miny, v.geo_maxx AS geo_maxx, "










	"v.geo_maxy AS geo_may, x.extent_minx AS extent_minx, "
	"x.extent_miny AS extent_miny, x.extent_maxx AS extent_maxx, "
	"x.extent_maxy AS extent_maxy, s.srid AS srid, 0 AS native_srid, "
	"s.auth_name AS auth_name, s.auth_srid AS auth_srid, "
	"s.ref_sys_name AS ref_sys_name, s.proj4text AS proj4text\n"
	"FROM vector_coverages AS v\n"
	"JOIN vector_coverages_srid AS x ON (v.coverage_name = x.coverage_name)\n"
	"LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW 'vector_coverages_ref_sys' error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }





















































    return 1;
}

SPATIALITE_PRIVATE int
createVectorCoveragesTable (void *p_sqlite)
{
/* Creating the main VectorCoverages table */
    int ok_table;
    sqlite3 *sqlite = p_sqlite;







/* checking if already defined */
    ok_table = check_vector_coverages (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateVectorCoveragesTable() error: table 'vector_coverages' already exists\n");
	  goto error;
................................................................................
    ok_table = check_vector_coverages_ref_sys (sqlite);
    if (ok_table)
      {
	  spatialite_e
	      ("CreateVectorCoveragesTable() error: view 'vector_coverages_ref_sys' already exists\n");
	  goto error;
      }








/* creating the main VectorCoverages table */
    if (!create_vector_coverages (sqlite))
	goto error;





































































































































































































































































































    return 1;

  error:
    return 0;
}

#ifdef ENABLE_LIBXML2		/* including LIBXML2 */
................................................................................
create_fonts (sqlite3 * sqlite)
{
/* creating the SE_fonts table */
    char *sql;
    int ret;
    char *err_msg = NULL;
    sql = "CREATE TABLE SE_fonts (\n"
	"font_facename TEXT NOT NULL PRIMARY KEY,\n"
	"font BLOB NOT NULL)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE 'SE_fonts' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
................................................................................
	 "GetFontFamily(font) AS family_name, "
	 "IsFontBold(font) AS bold, IsFontItalic(font) AS italic, "
	 "font AS font\nFROM SE_fonts");
    ret = sqlite3_exec (sqlite, sql_statement, NULL, NULL, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE VIEW 'SE_fonts_view' error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    return 1;
}

static int
................................................................................
    p_tbl = tables;
    p_view = views;
    while (*p_tbl != NULL)
      {
	  ok_table = check_styling_table (sqlite, *p_tbl, *p_view);
	  if (ok_table)
	    {

		spatialite_e
		    ("CreateStylingTables() error: table '%s' already exists\n",
		     *p_tbl);

		goto error;
	    }
	  p_tbl++;
	  p_view++;
      }

/* creating the SLD/SE Styling tables */
    if (!check_raster_coverages (sqlite))
      {
	  /* creating the main RasterCoverages table as well */
	  if (!create_raster_coverages (sqlite))
	      goto error;
      }

    if (!check_vector_coverages (sqlite))
      {



	  /* creating the main VectorCoverages table as well */
	  if (!create_vector_coverages (sqlite))
	      goto error;
      }

    if (!create_external_graphics (sqlite))
	goto error;
    if (!create_fonts (sqlite))
	goto error;
    if (!create_vector_styles (sqlite, relaxed))
	goto error;
    if (!create_raster_styles (sqlite, relaxed))

Changes to src/spatialite/mbrcache.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 mbrcache.c -- SQLite3 extension [MBR CACHE VIRTUAL TABLE]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),




|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*

 mbrcache.c -- SQLite3 extension [MBR CACHE VIRTUAL TABLE]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),

Changes to src/spatialite/metatables.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
...
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
...
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
...
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
...
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
...
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
....
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
....
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
....
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
....
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
....
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
....
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
....
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
....
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
....
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
....
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
....
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
....
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
....
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
....
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
....
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
....
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
....
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
....
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
....
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
....
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
/*

 metatables.c -- creating the metadata tables and related triggers

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
(implementing Android support)
 
Mark Johnson <mj10777@googlemail.com>
(checking triggers supporting a supposed Writable Spatial View)

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
................................................................................

static int
create_views_geometry_columns (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIEWS_GEOMETRY_COLUMNS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "view_rowid TEXT NOT NULL,\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
................................................................................

static int
create_virts_geometry_columns (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIRTS_GEOMETRY_COLUMNS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "geometry_type INTEGER NOT NULL,\n");
    strcat (sql, "coord_dimension INTEGER NOT NULL,\n");
................................................................................

static int
create_geometry_columns_statistics (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the GEOMETRY_COLUMNS_STATISTICS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_statistics (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql, "last_verified TIMESTAMP,\n");
    strcat (sql, "row_count INTEGER,\n");
................................................................................

static int
create_views_geometry_columns_statistics (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIEWS_GEOMETRY_COLUMNS_STATISTICS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns_statistics (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "last_verified TIMESTAMP,\n");
    strcat (sql, "row_count INTEGER,\n");
................................................................................

static int
create_virts_geometry_columns_statistics (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIRTS_GEOMETRY_COLUMNS_STATISTICS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns_statistics (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "last_verified TIMESTAMP,\n");
    strcat (sql, "row_count INTEGER,\n");
................................................................................

static int
create_geometry_columns_field_infos (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the GEOMETRY_COLUMNS_FIELD_INFOS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_field_infos (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql, "ordinal INTEGER NOT NULL,\n");
    strcat (sql, "column_name TEXT NOT NULL,\n");
................................................................................

static int
create_views_geometry_columns_field_infos (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIEWS_COLUMNS_FIELD_INFOS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns_field_infos (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "ordinal INTEGER NOT NULL,\n");
    strcat (sql, "column_name TEXT NOT NULL,\n");
................................................................................

static int
create_virts_geometry_columns_field_infos (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIRTS_GEOMETRY_COLUMNS_FIELD_INFOS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns_field_infos (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "ordinal INTEGER NOT NULL,\n");
    strcat (sql, "column_name TEXT NOT NULL,\n");
................................................................................

static int
create_geometry_columns_times (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the GEOMETRY_COLUMNS_TIME table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_time (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql,
	    "last_insert TIMESTAMP NOT NULL DEFAULT '0000-01-01T00:00:00.000Z',\n");
................................................................................

static int
create_geometry_columns_auth (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the GEOMETRY_COLUMNS_AUTH table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_auth (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql, "read_only INTEGER NOT NULL,\n");
    strcat (sql, "hidden INTEGER NOT NULL,\n");
................................................................................

static int
create_views_geometry_columns_auth (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIEWS_GEOMETRY_COLUMNS_AUTH table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns_auth (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "hidden INTEGER NOT NULL,\n");
    strcat (sql, "CONSTRAINT pk_vwgc_auth PRIMARY KEY ");
................................................................................

static int
create_virts_geometry_columns_auth (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VIRTS_GEOMETRY_COLUMNS_AUTH table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns_auth (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "hidden INTEGER NOT NULL,\n");
    strcat (sql, "CONSTRAINT pk_vrtgc_auth PRIMARY KEY ");
................................................................................

static int
create_geometry_columns_views (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the VECTOR_LAYERS view */
    strcpy (sql, "CREATE VIEW  IF NOT EXISTS ");
    strcat (sql, "vector_layers AS\n");
    strcat (sql, "SELECT 'SpatialTable' AS layer_type, ");
    strcat (sql, "f_table_name AS table_name, ");
    strcat (sql, "f_geometry_column AS geometry_column, ");
    strcat (sql, "geometry_type AS geometry_type, ");
................................................................................
    strcat (sql, "integer_max AS integer_max, ");
    strcat (sql, "double_min AS double_min, ");
    strcat (sql, "double_max double_max\n");
    strcat (sql, "FROM virts_geometry_columns_field_infos");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    return 1;
}

static int
create_data_licenses (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;

    if (sqlite3_db_readonly (sqlite, "MAIN") == 1)
      {
	  /* ignoring a read-only database */
	  return 1;
      }

/* creating the DATA_LICENSES table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS data_licenses (\n");
    strcat (sql, "\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n");
    strcat (sql, "\tname TEXT NOT NULL UNIQUE,\n");
    strcat (sql, "\turl TEXT)");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the UNDEFINED license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql, "VALUES (0, 'Undefined', NULL)");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the PROPRIETARY license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql, "VALUES (1, 'Proprietary - Non Free', NULL)");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the PUBLIC DOMAIN license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql, "VALUES (2, 'PD - Public Domain', NULL)");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC0 1.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (3, 'CC0 1.0', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC BY 3.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (4, 'CC BY 3.0', 'https://creativecommons.org/licenses/by/3.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC BY 4.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (5, 'CC BY 4.0', 'https://creativecommons.org/licenses/by/4.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC BY-SA 3.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (6, 'CC BY-SA 3.0', 'https://creativecommons.org/licenses/by-sa/3.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC BY-SA 4.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (7, 'CC BY-SA 4.0', 'https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC BY-SA-NC 3.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (8, 'CC BY-SA-NC 3.0', 'https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* inserting the CC BY-SA-NC 4.0 license */
    strcpy (sql, "INSERT OR IGNORE INTO data_licenses (id, name, url) ");
    strcat (sql,
	    "VALUES (9, 'CC BY-SA-NC 4.0', 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.txt')");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    return 1;
}

................................................................................
	return 0;
    if (!create_views_geometry_columns_auth (sqlite))
	return 0;
    if (!create_virts_geometry_columns_auth (sqlite))
	return 0;
    if (!create_geometry_columns_views (sqlite))
	return 0;
    if (!create_data_licenses (sqlite))
	return 0;
    if (!create_sql_statements_log (sqlite))
	return 0;

    return 1;
}

SPATIALITE_PRIVATE int
................................................................................
upgradeGeometryTriggers (void *p_sqlite)
{
/* upgrading all triggers for any Spatial Column */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    sqlite3_stmt *stmt = NULL;
    char *sql_statement;
    int retcode = 0;
    int metadata_version = checkSpatialMetaData (sqlite);
    if (metadata_version < 3)
	return 0;

    sql_statement =
	sqlite3_mprintf ("SELECT f_table_name, f_geometry_column "
			 "FROM geometry_columns");
................................................................................
{
/* check for tables containing a physical column named ROWID */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int rowid = 0;
    char *sql;
    int ret;
    const char *name;
    const char *type;
    const char *pk;
    int rowid_pk = 0;
    int int_pk = 0;
    int pk_cols = 0;
    int i;
    char **results;
    int rows;
    int columns;
    char *quoted_table = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", quoted_table);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
................................................................................
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcasecmp (name, "rowid") == 0)
		    rowid = 1;
		type = results[(i * columns) + 2];
		if (strcasecmp (type, "INTEGER") == 0)
		    int_pk = 1;
		pk = results[(i * columns) + 5];
		if (atoi (pk) != 0)
		    pk_cols++;
		if (strcasecmp (name, "rowid") == 0 && atoi (pk) != 0)
		    rowid_pk = 1;
	    }
      }
    sqlite3_free_table (results);
    if (rowid == 0)
	return 1;
    if (rowid_pk == 1 && pk_cols == 1 && int_pk == 1)
      {
	  /* OK, found: ROWID INTEGER PRIMARY KEY */
	  return 1;
      }
    return 0;
}

SPATIALITE_PRIVATE int
buildSpatialIndexEx (void *p_sqlite, const unsigned char *table,
		     const char *column)
{
................................................................................
		return;
	    }
	  lyr = lyr->Next;
      }
}

static void
doCheckWritableSpatialView (sqlite3 * handle, const char *view_name,
			    int *has_trigger_insert, int *has_trigger_update,
			    int *has_trigger_delete, int *is_read_only)
{
/*
* checking if a supposed Writable Spatial View do 
* effectively declares all expected Triggers
* 
* patch kindly submitted by Mark Johnson <mj10777@googlemail.com>
* see ticket: https://www.gaia-gis.it/fossil/libspatialite/tktview/597fce55f2884668a24b591840162ffebda390e1
*/
    int ret;
    char *sql;
    sqlite3_stmt *stmt;

/* Claims to be a Writable SpatialView, we shall see ... */
    *has_trigger_insert = 0;
    *has_trigger_update = 0;
    *has_trigger_delete = 0;
    *is_read_only = 1;

    sql =
	sqlite3_mprintf ("SELECT "
			 "(SELECT Exists(SELECT rootpage FROM  sqlite_master "
			 "WHERE (type = 'trigger' AND Lower(tbl_name) = Lower(%Q) AND "
			 "(instr(upper(sql),'INSTEAD OF INSERT') > 0)))), "
			 "(SELECT Exists(SELECT rootpage FROM  sqlite_master "
			 "WHERE (type = 'trigger' AND Lower(tbl_name) = Lower(%Q) AND "
			 "(instr(upper(sql),'INSTEAD OF UPDATE') > 0)))), "
			 "(SELECT Exists(SELECT rootpage FROM  sqlite_master "
			 "WHERE (type = 'trigger' AND Lower(tbl_name) = Lower(%Q) AND "
			 "(instr(upper(sql),'INSTEAD OF DELETE') > 0))))",
			 view_name, view_name, view_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  while (sqlite3_step (stmt) == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) != SQLITE_NULL)
		  {
		      if (sqlite3_column_int (stmt, 0) == 1)
			  *has_trigger_insert = 1;
		  }
		if (sqlite3_column_type (stmt, 1) != SQLITE_NULL)
		  {
		      if (sqlite3_column_int (stmt, 1) == 1)
			  *has_trigger_update = 1;
		  }
		if (sqlite3_column_type (stmt, 2) != SQLITE_NULL)
		  {
		      if (sqlite3_column_int (stmt, 2) == 1)
			  *has_trigger_delete = 1;
		  }
	    }
	  ret = sqlite3_finalize (stmt);
      }
    if (*has_trigger_insert || *has_trigger_update || *has_trigger_delete)
	*is_read_only = 0;	/* Yes, this could be a functional Writable SpatialView */
}

static void
addVectorLayerAuth (sqlite3 * handle, gaiaVectorLayersListPtr list,
		    const char *table_name, const char *geometry_column,
		    int read_only, int hidden)
{
/* appending a LayerAuth object to the corresponding VectorLayer */
    gaiaVectorLayerPtr lyr = list->First;
    while (lyr)
      {
	  if (strcasecmp (lyr->TableName, table_name) == 0
	      && strcasecmp (lyr->GeometryName, geometry_column) == 0)
	    {
		gaiaLayerAuthPtr auth = malloc (sizeof (gaiaLayerAuth));
		lyr->AuthInfos = auth;
		auth->IsReadOnly = read_only;
		auth->IsHidden = hidden;
		auth->HasTriggerInsert = 0;
		auth->HasTriggerUpdate = 0;
		auth->HasTriggerDelete = 0;
		if ((lyr->LayerType == GAIA_VECTOR_VIEW) && (!auth->IsReadOnly))
		  {
		      int has_trigger_insert = 0;
		      int has_trigger_update = 0;
		      int has_trigger_delete = 0;
		      int is_read_only = 1;
		      doCheckWritableSpatialView (handle, table_name,
						  &has_trigger_insert,
						  &has_trigger_update,
						  &has_trigger_delete,
						  &is_read_only);
		      auth->HasTriggerInsert = has_trigger_insert;
		      auth->HasTriggerUpdate = has_trigger_update;
		      auth->HasTriggerDelete = has_trigger_delete;
		      auth->IsReadOnly = is_read_only;
		  }
		return;
	    }
	  lyr = lyr->Next;
      }
}

static void
................................................................................
	free (fld->DoubleRange);
    free (fld);
}

static void
freeVectorLayer (gaiaVectorLayerPtr lyr)
{
/* destroying a VectorLayer object */
    gaiaLayerAttributeFieldPtr fld;
    gaiaLayerAttributeFieldPtr fldn;
    if (!lyr)
	return;
    if (lyr->TableName)
	free (lyr->TableName);
    if (lyr->GeometryName)
................................................................................
{
/* creating a VectorLayersList object - v.4.0.0 DB layout */
    char *sql;
    int ret;
    sqlite3_stmt *stmt;
    int error = 0;

/* 
* attempting first to recover all SpatialViews registered into 
* views_geometry_columns but not into views_geometry_columns_auth
*/
    sql = "INSERT OR IGNORE INTO views_geometry_columns_auth "
	"(view_name, view_geometry, hidden) "
	"SELECT view_name, view_geometry, 0 FROM views_geometry_columns";
    sqlite3_exec (handle, sql, NULL, NULL, NULL);

/* querying the vector_layers view */
    if (table == NULL)
	sql =
	    sqlite3_mprintf
	    ("SELECT layer_type, table_name, geometry_column, geometry_type, "
	     "srid, spatial_index_enabled FROM vector_layers");
    else
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int read_only = 0;
		int hidden = 0;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    read_only = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
		    hidden = sqlite3_column_int (stmt, 3);
		if (!is_null)
		    addVectorLayerAuth (handle, list, table_name,
					geometry_column, read_only, hidden);
	    }
      }
    ret = sqlite3_finalize (stmt);

  stop3:
/* querying the vector_layers_field_infos view */
    if (table == NULL)
................................................................................
		    geometry_type += 2000;
		if (strcasecmp (dims, "XYZM") == 0
		    || strcasecmp (dims, "4") == 0)
		    geometry_type += 3000;
		addVectorLayer (list, "SpatialTable", table_name,
				geometry_column, geometry_type, srid,
				spatial_index);
		addVectorLayerAuth (handle, list, table_name, geometry_column,
				    1, 0);
	    }
	  else
	      error = 1;
      }
    ret = sqlite3_finalize (stmt);

  stop:
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int read_only = 0;
		int hidden = 0;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    read_only = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
		    hidden = sqlite3_column_int (stmt, 3);
		if (!is_null)
		    addVectorLayerAuth (handle, list, table_name,
					geometry_column, read_only, hidden);
	    }
      }
    ret = sqlite3_finalize (stmt);
  stop:
    return 1;
}

................................................................................
/* attempting to get a Layer Full Extent (Envelope) */
    gaiaVectorLayersListPtr list;
    gaiaVectorLayerPtr lyr;
    double minx = -DBL_MAX;
    double miny = -DBL_MAX;
    double maxx = DBL_MAX;
    double maxy = DBL_MAX;
    int srid = 0;
    gaiaGeomCollPtr bbox;
    gaiaPolygonPtr polyg;
    gaiaRingPtr rect;
    int md = GAIA_VECTORS_LIST_OPTIMISTIC;

    if (table == NULL)
	return NULL;




|







 







|





<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







 







|







 







<
<
<
<
<







 







<
<
<
<
<
<
<
<





<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







<
<
<
<
<
<
<
<
<







 







|
|









|
|







 







<
<







 







|
|









|
|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32



33
34
35
36
37
38
39
...
216
217
218
219
220
221
222







223
224
225
226
227
228
229
...
499
500
501
502
503
504
505







506
507
508
509
510
511
512
...
702
703
704
705
706
707
708







709
710
711
712
713
714
715
...
832
833
834
835
836
837
838







839
840
841
842
843
844
845
...
960
961
962
963
964
965
966







967
968
969
970
971
972
973
....
1088
1089
1090
1091
1092
1093
1094







1095
1096
1097
1098
1099
1100
1101
....
1226
1227
1228
1229
1230
1231
1232







1233
1234
1235
1236
1237
1238
1239
....
1360
1361
1362
1363
1364
1365
1366







1367
1368
1369
1370
1371
1372
1373
....
1494
1495
1496
1497
1498
1499
1500







1501
1502
1503
1504
1505
1506
1507
....
1627
1628
1629
1630
1631
1632
1633







1634
1635
1636
1637
1638
1639
1640
....
1760
1761
1762
1763
1764
1765
1766







1767
1768
1769
1770
1771
1772
1773
....
1886
1887
1888
1889
1890
1891
1892







1893
1894
1895
1896
1897
1898
1899
....
2012
2013
2014
2015
2016
2017
2018







2019
2020
2021
2022
2023
2024
2025
....
2182
2183
2184
2185
2186
2187
2188







































































































































2189
2190
2191
2192
2193
2194
2195
....
2545
2546
2547
2548
2549
2550
2551


2552
2553
2554
2555
2556
2557
2558
....
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
....
3812
3813
3814
3815
3816
3817
3818





3819
3820
3821
3822
3823
3824
3825
....
3832
3833
3834
3835
3836
3837
3838








3839
3840
3841
3842
3843





3844
3845
3846
3847
3848
3849
3850
....
4277
4278
4279
4280
4281
4282
4283






























































4284

4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297



















4298
4299
4300
4301
4302
4303
4304
....
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
....
4367
4368
4369
4370
4371
4372
4373









4374
4375
4376
4377
4378
4379
4380
....
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
....
4793
4794
4795
4796
4797
4798
4799


4800
4801
4802
4803
4804
4805
4806
....
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
....
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
/*

 metatables.c -- creating the metadata tables and related triggers

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
(implementing Android support)




Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
................................................................................

static int
create_views_geometry_columns (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIEWS_GEOMETRY_COLUMNS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "view_rowid TEXT NOT NULL,\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
................................................................................

static int
create_virts_geometry_columns (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIRTS_GEOMETRY_COLUMNS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "geometry_type INTEGER NOT NULL,\n");
    strcat (sql, "coord_dimension INTEGER NOT NULL,\n");
................................................................................

static int
create_geometry_columns_statistics (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the GEOMETRY_COLUMNS_STATISTICS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_statistics (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql, "last_verified TIMESTAMP,\n");
    strcat (sql, "row_count INTEGER,\n");
................................................................................

static int
create_views_geometry_columns_statistics (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIEWS_GEOMETRY_COLUMNS_STATISTICS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns_statistics (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "last_verified TIMESTAMP,\n");
    strcat (sql, "row_count INTEGER,\n");
................................................................................

static int
create_virts_geometry_columns_statistics (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIRTS_GEOMETRY_COLUMNS_STATISTICS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns_statistics (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "last_verified TIMESTAMP,\n");
    strcat (sql, "row_count INTEGER,\n");
................................................................................

static int
create_geometry_columns_field_infos (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the GEOMETRY_COLUMNS_FIELD_INFOS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_field_infos (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql, "ordinal INTEGER NOT NULL,\n");
    strcat (sql, "column_name TEXT NOT NULL,\n");
................................................................................

static int
create_views_geometry_columns_field_infos (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIEWS_COLUMNS_FIELD_INFOS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns_field_infos (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "ordinal INTEGER NOT NULL,\n");
    strcat (sql, "column_name TEXT NOT NULL,\n");
................................................................................

static int
create_virts_geometry_columns_field_infos (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIRTS_GEOMETRY_COLUMNS_FIELD_INFOS table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns_field_infos (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "ordinal INTEGER NOT NULL,\n");
    strcat (sql, "column_name TEXT NOT NULL,\n");
................................................................................

static int
create_geometry_columns_times (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the GEOMETRY_COLUMNS_TIME table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_time (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql,
	    "last_insert TIMESTAMP NOT NULL DEFAULT '0000-01-01T00:00:00.000Z',\n");
................................................................................

static int
create_geometry_columns_auth (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the GEOMETRY_COLUMNS_AUTH table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "geometry_columns_auth (\n");
    strcat (sql, "f_table_name TEXT NOT NULL,\n");
    strcat (sql, "f_geometry_column TEXT NOT NULL,\n");
    strcat (sql, "read_only INTEGER NOT NULL,\n");
    strcat (sql, "hidden INTEGER NOT NULL,\n");
................................................................................

static int
create_views_geometry_columns_auth (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIEWS_GEOMETRY_COLUMNS_AUTH table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "views_geometry_columns_auth (\n");
    strcat (sql, "view_name TEXT NOT NULL,\n");
    strcat (sql, "view_geometry TEXT NOT NULL,\n");
    strcat (sql, "hidden INTEGER NOT NULL,\n");
    strcat (sql, "CONSTRAINT pk_vwgc_auth PRIMARY KEY ");
................................................................................

static int
create_virts_geometry_columns_auth (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VIRTS_GEOMETRY_COLUMNS_AUTH table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "virts_geometry_columns_auth (\n");
    strcat (sql, "virt_name TEXT NOT NULL,\n");
    strcat (sql, "virt_geometry TEXT NOT NULL,\n");
    strcat (sql, "hidden INTEGER NOT NULL,\n");
    strcat (sql, "CONSTRAINT pk_vrtgc_auth PRIMARY KEY ");
................................................................................

static int
create_geometry_columns_views (sqlite3 * sqlite)
{
    char sql[4186];
    char *errMsg = NULL;
    int ret;







/* creating the VECTOR_LAYERS view */
    strcpy (sql, "CREATE VIEW  IF NOT EXISTS ");
    strcat (sql, "vector_layers AS\n");
    strcat (sql, "SELECT 'SpatialTable' AS layer_type, ");
    strcat (sql, "f_table_name AS table_name, ");
    strcat (sql, "f_geometry_column AS geometry_column, ");
    strcat (sql, "geometry_type AS geometry_type, ");
................................................................................
    strcat (sql, "integer_max AS integer_max, ");
    strcat (sql, "double_min AS double_min, ");
    strcat (sql, "double_max double_max\n");
    strcat (sql, "FROM virts_geometry_columns_field_infos");
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {







































































































































	  spatialite_e ("SQL error: %s: %s\n", sql, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    return 1;
}

................................................................................
	return 0;
    if (!create_views_geometry_columns_auth (sqlite))
	return 0;
    if (!create_virts_geometry_columns_auth (sqlite))
	return 0;
    if (!create_geometry_columns_views (sqlite))
	return 0;


    if (!create_sql_statements_log (sqlite))
	return 0;

    return 1;
}

SPATIALITE_PRIVATE int
................................................................................
upgradeGeometryTriggers (void *p_sqlite)
{
/* upgrading all triggers for any Spatial Column */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    sqlite3_stmt *stmt = NULL;
    char *sql_statement;
    int retcode;
    int metadata_version = checkSpatialMetaData (sqlite);
    if (metadata_version < 3)
	return 0;

    sql_statement =
	sqlite3_mprintf ("SELECT f_table_name, f_geometry_column "
			 "FROM geometry_columns");
................................................................................
{
/* check for tables containing a physical column named ROWID */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int rowid = 0;
    char *sql;
    int ret;
    const char *name;





    int i;
    char **results;
    int rows;
    int columns;
    char *quoted_table = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", quoted_table);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
................................................................................
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcasecmp (name, "rowid") == 0)
		    rowid = 1;








	    }
      }
    sqlite3_free_table (results);
    if (rowid == 0)
	return 1;





    return 0;
}

SPATIALITE_PRIVATE int
buildSpatialIndexEx (void *p_sqlite, const unsigned char *table,
		     const char *column)
{
................................................................................
		return;
	    }
	  lyr = lyr->Next;
      }
}

static void






























































addVectorLayerAuth (gaiaVectorLayersListPtr list, const char *table_name,

		    const char *geometry_column, int read_only, int hidden)
{
/* appending a LayerAuth object to the corresponding VectorLayer */
    gaiaVectorLayerPtr lyr = list->First;
    while (lyr)
      {
	  if (strcasecmp (lyr->TableName, table_name) == 0
	      && strcasecmp (lyr->GeometryName, geometry_column) == 0)
	    {
		gaiaLayerAuthPtr auth = malloc (sizeof (gaiaLayerAuth));
		lyr->AuthInfos = auth;
		auth->IsReadOnly = read_only;
		auth->IsHidden = hidden;



















		return;
	    }
	  lyr = lyr->Next;
      }
}

static void
................................................................................
	free (fld->DoubleRange);
    free (fld);
}

static void
freeVectorLayer (gaiaVectorLayerPtr lyr)
{
/* destroyng a VectorLayer object */
    gaiaLayerAttributeFieldPtr fld;
    gaiaLayerAttributeFieldPtr fldn;
    if (!lyr)
	return;
    if (lyr->TableName)
	free (lyr->TableName);
    if (lyr->GeometryName)
................................................................................
{
/* creating a VectorLayersList object - v.4.0.0 DB layout */
    char *sql;
    int ret;
    sqlite3_stmt *stmt;
    int error = 0;










/* querying the vector_layers view */
    if (table == NULL)
	sql =
	    sqlite3_mprintf
	    ("SELECT layer_type, table_name, geometry_column, geometry_type, "
	     "srid, spatial_index_enabled FROM vector_layers");
    else
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int read_only;
		int hidden;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    read_only = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
		    hidden = sqlite3_column_int (stmt, 3);
		if (!is_null)
		    addVectorLayerAuth (list, table_name, geometry_column,
					read_only, hidden);
	    }
      }
    ret = sqlite3_finalize (stmt);

  stop3:
/* querying the vector_layers_field_infos view */
    if (table == NULL)
................................................................................
		    geometry_type += 2000;
		if (strcasecmp (dims, "XYZM") == 0
		    || strcasecmp (dims, "4") == 0)
		    geometry_type += 3000;
		addVectorLayer (list, "SpatialTable", table_name,
				geometry_column, geometry_type, srid,
				spatial_index);


	    }
	  else
	      error = 1;
      }
    ret = sqlite3_finalize (stmt);

  stop:
................................................................................
	    {
		/* processing a VectorLayer row */
		int is_null = 0;
		const char *table_name =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *geometry_column =
		    (const char *) sqlite3_column_text (stmt, 1);
		int read_only;
		int hidden;
		if (sqlite3_column_type (stmt, 2) == SQLITE_NULL)
		    is_null = 1;
		else
		    read_only = sqlite3_column_int (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
		    is_null = 1;
		else
		    hidden = sqlite3_column_int (stmt, 3);
		if (!is_null)
		    addVectorLayerAuth (list, table_name, geometry_column,
					read_only, hidden);
	    }
      }
    ret = sqlite3_finalize (stmt);
  stop:
    return 1;
}

................................................................................
/* attempting to get a Layer Full Extent (Envelope) */
    gaiaVectorLayersListPtr list;
    gaiaVectorLayerPtr lyr;
    double minx = -DBL_MAX;
    double miny = -DBL_MAX;
    double maxx = DBL_MAX;
    double maxy = DBL_MAX;
    int srid;
    gaiaGeomCollPtr bbox;
    gaiaPolygonPtr polyg;
    gaiaRingPtr rect;
    int md = GAIA_VECTORS_LIST_OPTIMISTIC;

    if (table == NULL)
	return NULL;

Changes to src/spatialite/se_helpers.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
...
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
...
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
...
559
560
561
562
563
564
565

566
567
568
569
570
571
572
...
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
....
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
....
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
....
1223
1224
1225
1226
1227
1228
1229

1230
1231
1232
1233
1234
1235
1236
....
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
....
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
....
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
....
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
....
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
....
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
....
2641
2642
2643
2644
2645
2646
2647

2648
2649
2650
2651
2652
2653
2654
....
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
....
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
....
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
....
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
....
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
....
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
....
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
....
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762

3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
....
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963

3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
....
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266



4267





4268
4269
4270
4271
4272
4273
4274
....
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
....
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
....
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904

4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
....
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
....
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
....
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
....
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
....
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
....
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
....
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
....
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
....
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
....
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
/*

 se_helpers.c -- SLD/SE helper functions 

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................

#include <spatialite.h>
#include <spatialite_private.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */


#ifdef ENABLE_LIBXML2		/* including LIBXML2 */

/* Constant definitions: Vector Coverage Types */
#define VECTOR_UNKNOWN		0
#define VECTOR_GEOTABLE		1
#define VECTOR_SPATIALVIEW	2
#define VECTOR_VIRTUALSHP	3
#define VECTOR_TOPOGEO		4
#define VECTOR_TOPONET		5

static int
check_external_graphic (sqlite3 * sqlite, const char *xlink_href)
{
/* checks if an ExternalGraphic Resource already exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
................................................................................
			    sqlite3_int64 * id)
{
/* checks if a Vector Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT style_id FROM SE_vector_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Style by Name: \"%s\"\n",
................................................................................
{
/* checks if a Vector Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int ref_count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT style_id FROM SE_vector_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Style Refs by Name: \"%s\"\n",
................................................................................
      {
	  spatialite_e ("check Vector Style Refs by ID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, *id);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
		    ref_count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (ref_count > 0)
	*has_refs = 1;
    return 1;

  stop:
    return 0;
}

static int
do_insert_vector_style_layer (sqlite3 * sqlite, const char *coverage_name,
			      sqlite3_int64 id)
................................................................................
				   const char *style_name, sqlite3_int64 * id)
{
/* checks if a Vector Styled Layer do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT l.style_id FROM SE_vector_styled_layers AS l "
	"JOIN SE_vector_styles AS s ON (l.style_id = s.style_id) "
	"WHERE Lower(l.coverage_name) = Lower(?) "
	"AND Lower(s.style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
................................................................................
{
/* checks if a Raster Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int ref_count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT style_id FROM SE_raster_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Style Refs by Name: \"%s\"\n",
................................................................................
      {
	  spatialite_e ("check Raster Style Refs by ID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, *id);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
		    ref_count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (ref_count > 0)
	*has_refs = 1;
    return 1;

  stop:
    return 0;
}

static int
do_delete_raster_style (sqlite3 * sqlite, sqlite3_int64 id)
{
................................................................................
			    sqlite3_int64 * id)
{
/* checks if a Raster Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT style_id FROM SE_raster_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Style by Name: \"%s\"\n",
................................................................................
				   const char *style_name, sqlite3_int64 * id)
{
/* checks if a Raster Styled Layer do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT l.style_id FROM SE_raster_styled_layers AS l "
	"JOIN SE_raster_styles AS s ON (l.style_id = s.style_id) "
	"WHERE Lower(l.coverage_name) = Lower(?) AND "
	"Lower(s.style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
................................................................................
			   const char *coverage_name, sqlite3_int64 * id)
{
/* checks if a Styled Group Layer (Raster) do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT id FROM SE_styled_group_refs WHERE "
	"Lower(group_name) = Lower(?) AND Lower(raster_coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("checkStyledGroupRasterItem: \"%s\"\n",
................................................................................
			   const char *coverage_name, sqlite3_int64 * id)
{
/* checks if a Styled Group Layer (Vector) do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT id FROM SE_styled_group_refs WHERE "
	"Lower(group_name) = Lower(?) AND Lower(vector_coverage_name) = Lower(?) ";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("checkStyledGroupVectorItem: \"%s\"\n",
................................................................................
{
/* checks if a Group Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int ref_count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT style_id FROM SE_group_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Group Style Refs by Name: \"%s\"\n",
................................................................................
      {
	  spatialite_e ("check Group Style Refs by ID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, *id);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
		    ref_count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (ref_count > 0)
	*has_refs = 1;
    return 1;

  stop:
    return 0;
}

static int
do_delete_group_style (sqlite3 * sqlite, sqlite3_int64 id)
{
................................................................................
			   sqlite3_int64 * id)
{
/* checks if a Group Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT style_id FROM SE_group_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Group Style by Name: \"%s\"\n",
................................................................................
				  const char *style_name, sqlite3_int64 * id)
{
/* checks if a Styled Group Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid = 0;

    sql = "SELECT l.style_id FROM SE_styled_group_styles AS l "
	"JOIN SE_group_styles AS s ON (l.style_id = s.style_id) "
	"WHERE Lower(l.group_name) = Lower(?) AND "
	"Lower(s.style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
................................................................................
	return 0;
}

SPATIALITE_PRIVATE int
register_vector_coverage (void *p_sqlite, const char *coverage_name,
			  const char *f_table_name,
			  const char *f_geometry_column, const char *title,
			  const char *abstract, int is_queryable,
			  int is_editable)
{
/* auxiliary function: inserts a Vector Coverage definition */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name != NULL && f_table_name != NULL
	&& f_geometry_column != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, title, "
	      "abstract, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), ?, ?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
................................................................................
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  if (is_editable)
	      is_editable = 1;
	  sqlite3_bind_int (stmt, 6, is_queryable);
	  sqlite3_bind_int (stmt, 7, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
................................................................................
	  return 1;
      }
    else if (coverage_name != NULL && f_table_name != NULL
	     && f_geometry_column != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, "
	      "is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
................................................................................
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  if (is_editable)
	      is_editable = 1;
	  sqlite3_bind_int (stmt, 4, is_queryable);
	  sqlite3_bind_int (stmt, 5, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
................................................................................
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
register_spatial_view_coverage (void *p_sqlite, const char *coverage_name,
				const char *view_name,
				const char *view_geometry, const char *title,
				const char *abstract, int is_queryable,
				int is_editable)
{
/* auxiliary function: inserts a Spatial View Coverage definition */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name != NULL && view_name != NULL
	&& view_geometry != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, view_name, view_geometry, title, "
	      "abstract, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), ?, ?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, view_name, strlen (view_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, view_geometry,
			     strlen (view_geometry), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  if (is_editable)
	      is_editable = 1;
	  sqlite3_bind_int (stmt, 6, is_queryable);
	  sqlite3_bind_int (stmt, 7, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else if (coverage_name != NULL && view_name != NULL
	     && view_geometry != NULL)
      {
	  /* attempting to insert the Spatial View Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, view_name, view_geometry, "
	      "is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, view_name, strlen (view_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, view_geometry,
			     strlen (view_geometry), SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  if (is_editable)
	      is_editable = 1;
	  sqlite3_bind_int (stmt, 4, is_queryable);
	  sqlite3_bind_int (stmt, 5, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
register_virtual_shp_coverage (void *p_sqlite, const char *coverage_name,
			       const char *virt_name, const char *virt_geometry,
			       const char *title, const char *abstract,
			       int is_queryable)
{
/* auxiliary function: inserts a VirtualShapefile Coverage definition */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name != NULL && virt_name != NULL
	&& virt_geometry != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, virt_name, virt_geometry, title, "
	      "abstract, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), ?, ?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, virt_name, strlen (virt_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, virt_geometry,
			     strlen (virt_geometry), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  sqlite3_bind_int (stmt, 6, is_queryable);
	  sqlite3_bind_int (stmt, 7, 0);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else if (coverage_name != NULL && virt_name != NULL
	     && virt_geometry != NULL)
      {
	  /* attempting to insert the VirtualShapefile Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, virt_name, virt_geometry, "
	      "is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, virt_name, strlen (virt_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, virt_geometry,
			     strlen (virt_geometry), SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  sqlite3_bind_int (stmt, 4, is_queryable);
	  sqlite3_bind_int (stmt, 5, 0);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
register_topogeo_coverage (void *p_sqlite, const char *coverage_name,
			   const char *topogeo_name, const char *title,
			   const char *abstract, int is_queryable,
			   int is_editable)
{
/* auxiliary function: inserts a Vector Coverage definition 
 * based on some Topology-Geometry */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    char *xsql;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *f_table_name = NULL;
    char *f_geometry_column = NULL;
    sqlite3_stmt *stmt;

    if (topogeo_name == NULL)
	return 0;

/* testing if the Topology-Geometry do really exist */
    xsql = sqlite3_mprintf ("SELECT topology_name "
			    "FROM topologies WHERE Lower(topology_name) = %Q",
			    topogeo_name);
    ret = sqlite3_get_table (sqlite, xsql, &results, &rows, &columns, &errMsg);
    sqlite3_free (xsql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 0];
	  if (f_table_name != NULL)
	      sqlite3_free (f_table_name);
	  if (f_geometry_column != NULL)
	      sqlite3_free (f_geometry_column);
	  f_table_name = sqlite3_mprintf ("%s_edge", value);
	  f_geometry_column = sqlite3_mprintf ("geom");
      }
    sqlite3_free_table (results);

    if (coverage_name != NULL && f_table_name != NULL
	&& f_geometry_column != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, "
	      "topology_name, title, abstract, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), Lower(?), ?, ?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerTopoGeoCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     sqlite3_free);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), sqlite3_free);
	  sqlite3_bind_text (stmt, 4, topogeo_name, strlen (topogeo_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 6, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  if (is_editable)
	      is_editable = 1;
	  sqlite3_bind_int (stmt, 7, is_queryable);
	  sqlite3_bind_int (stmt, 8, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerTopoGeoCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else if (coverage_name != NULL && f_table_name != NULL
	     && f_geometry_column != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, "
	      "topology_name, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), Lower(?), ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerTopoGeoCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     sqlite3_free);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), sqlite3_free);
	  sqlite3_bind_text (stmt, 4, topogeo_name, strlen (topogeo_name),
			     SQLITE_STATIC);
	  sqlite3_bind_int (stmt, 5, is_queryable);
	  sqlite3_bind_int (stmt, 6, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerTopoGeoCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
      {
	  if (f_table_name != NULL)
	      sqlite3_free (f_table_name);
	  if (f_geometry_column != NULL)
	      sqlite3_free (f_geometry_column);
	  return 0;
      }
}

SPATIALITE_PRIVATE int
register_toponet_coverage (void *p_sqlite, const char *coverage_name,
			   const char *toponet_name, const char *title,
			   const char *abstract, int is_queryable,
			   int is_editable)
{
/* auxiliary function: inserts a Vector Coverage definition  
 * based on some Topology-Network */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    char *xsql;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *f_table_name = NULL;
    char *f_geometry_column = NULL;
    sqlite3_stmt *stmt;

    if (toponet_name == NULL)
	return 0;

/* testing if the Topology-Network do really exist */
    xsql = sqlite3_mprintf ("SELECT network_name "
			    "FROM networks WHERE Lower(network_name) = %Q",
			    toponet_name);
    ret = sqlite3_get_table (sqlite, xsql, &results, &rows, &columns, &errMsg);
    sqlite3_free (xsql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns) + 0];
	  if (f_table_name != NULL)
	      sqlite3_free (f_table_name);
	  if (f_geometry_column != NULL)
	      sqlite3_free (f_geometry_column);
	  f_table_name = sqlite3_mprintf ("%s_link", value);
	  f_geometry_column = sqlite3_mprintf ("geometry");
      }
    sqlite3_free_table (results);

    if (coverage_name != NULL && f_table_name != NULL
	&& f_geometry_column != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, "
	      "network_name, title, abstract, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), Lower(?), ?, ?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerTopoNetCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     sqlite3_free);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), sqlite3_free);
	  sqlite3_bind_text (stmt, 4, toponet_name, strlen (toponet_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 6, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  if (is_queryable)
	      is_queryable = 1;
	  if (is_editable)
	      is_editable = 1;
	  sqlite3_bind_int (stmt, 7, is_queryable);
	  sqlite3_bind_int (stmt, 8, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerTopoNetCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else if (coverage_name != NULL && f_table_name != NULL
	     && f_geometry_column != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, "
	      "network_name, is_queryable, is_editable) VALUES "
	      "(Lower(?), Lower(?), Lower(?), Lower(?), ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerTopoNetCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     sqlite3_free);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), sqlite3_free);
	  sqlite3_bind_text (stmt, 4, toponet_name, strlen (toponet_name),
			     SQLITE_STATIC);
	  sqlite3_bind_int (stmt, 5, is_queryable);
	  sqlite3_bind_int (stmt, 6, is_editable);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerTopoNetCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
      {
	  if (f_table_name != NULL)
	      sqlite3_free (f_table_name);
	  if (f_geometry_column != NULL)
	      sqlite3_free (f_geometry_column);
	  return 0;
      }
}

static int
check_vector_coverage (sqlite3 * sqlite, const char *coverage_name)
{
/* checks if a Vector Coverage do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
................................................................................
    return 0;
}

static void
do_delete_vector_coverage_srid (sqlite3 * sqlite, const char *coverage_name,
				int srid)
{
/* auxiliary function: deleting a Vector Coverage alternative SRID */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (srid < 0)
	sql = "DELETE FROM vector_coverages_srid "
	    "WHERE Lower(coverage_name) = Lower(?)";
    else
	sql = "DELETE FROM vector_coverages_srid "
	    "WHERE Lower(coverage_name) = Lower(?) AND srid = ?";

    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterVectorCoverageSrid: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    if (srid >= 0)
	sqlite3_bind_int (stmt, 2, srid);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("unregisterVectorCoverageSrid() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}

static void
do_delete_vector_coverage_keyword (sqlite3 * sqlite, const char *coverage_name,
				   const char *keyword)
{
/* auxiliary function: deleting an Vector Coverage Keyword */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (keyword == NULL)
	sql = "DELETE FROM vector_coverages_keyword "
	    "WHERE Lower(coverage_name) = Lower(?)";
    else
	sql = "DELETE FROM vector_coverages_keyword "
	    "WHERE Lower(coverage_name) = Lower(?) AND Lower(keyword) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterVectorCoverageKeyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    if (keyword != NULL)
	sqlite3_bind_text (stmt, 2, keyword, strlen (keyword), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("unregisterVectorCoverageKeyword() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}

static void
do_delete_vector_coverage_styled_layers (sqlite3 * sqlite,
					 const char *coverage_name)
{
/* auxiliary function: deleting all Vector Coverage Styled references */
    int ret;
    const char *sql;
................................................................................
	return 0;

    /* checking if the Vector Coverage do actually exists */
    if (!check_vector_coverage (sqlite, coverage_name))
	return 0;
    /* deleting all alternative SRIDs */
    do_delete_vector_coverage_srid (sqlite, coverage_name, -1);
    /* deleting all Keywords */
    do_delete_vector_coverage_keyword (sqlite, coverage_name, NULL);
    /* deleting all Styled Layers */
    do_delete_vector_coverage_styled_layers (sqlite, coverage_name);
    /* deleting all Styled Group references */
    do_delete_vector_coverage_styled_groups (sqlite, coverage_name);
    /* deleting the Vector Coverage itself */
    return do_delete_vector_coverage (sqlite, coverage_name);
}

SPATIALITE_PRIVATE int
set_vector_coverage_infos (void *p_sqlite, const char *coverage_name,
			   const char *title, const char *abstract,
			   int is_queryable, int is_editable)
{
/* auxiliary function: updates the descriptive infos supporting a Vector Coverage */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int prev_changes;
    int curr_changes;

    if (coverage_name != NULL && title != NULL && abstract != NULL)
      {
	  prev_changes = sqlite3_total_changes (sqlite);

	  /* attempting to update the Vector Coverage */
	  if (is_queryable < 0 || is_editable < 0)
	    {
		sql = "UPDATE vector_coverages SET title = ?, abstract = ? "
		    "WHERE Lower(coverage_name) = Lower(?)";
		ret =
		    sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
		if (ret != SQLITE_OK)
		  {
		      spatialite_e ("setVectorCoverageInfos: \"%s\"\n",

				    sqlite3_errmsg (sqlite));
		      return 0;
		  }
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, title, strlen (title),
				   SQLITE_STATIC);
		sqlite3_bind_text (stmt, 2, abstract, strlen (abstract),
				   SQLITE_STATIC);
		sqlite3_bind_text (stmt, 3, coverage_name,
				   strlen (coverage_name), SQLITE_STATIC);
	    }
	  else
	    {
		sql = "UPDATE vector_coverages SET title = ?, abstract = ?, "
		    "is_queryable = ?, is_editable = ? WHERE Lower(coverage_name) = Lower(?)";
		ret =
		    sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
		if (ret != SQLITE_OK)
		  {
		      spatialite_e ("setVectorCoverageInfos: \"%s\"\n",
				    sqlite3_errmsg (sqlite));
		      return 0;
		  }
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, title, strlen (title),
				   SQLITE_STATIC);
		sqlite3_bind_text (stmt, 2, abstract, strlen (abstract),
				   SQLITE_STATIC);
		if (is_queryable)
		    is_queryable = 1;
		if (is_editable)
		    is_editable = 1;
		sqlite3_bind_int (stmt, 3, is_queryable);
		sqlite3_bind_int (stmt, 4, is_editable);
		sqlite3_bind_text (stmt, 5, coverage_name,
				   strlen (coverage_name), SQLITE_STATIC);
	    }
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("setVectorCoverageInfos() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);

	  curr_changes = sqlite3_total_changes (sqlite);
	  if (prev_changes == curr_changes)
	      return 0;
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
set_vector_coverage_copyright (void *p_sqlite, const char *coverage_name,
			       const char *copyright, const char *license)
{
/* auxiliary function: updates the copyright infos supporting a Vector Coverage */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name == NULL)
	return 0;
    if (copyright == NULL && license == NULL)
	return 1;

    if (copyright == NULL)
      {
	  /* just updating the License */
	  sql = "UPDATE vector_coverages SET license = ("
	      "SELECT id FROM data_licenses WHERE name = ?) "
	      "WHERE Lower(coverage_name) = Lower(?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("setVectorCoverageCopyright: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, license, strlen (license), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, coverage_name,
			     strlen (coverage_name), SQLITE_STATIC);
      }
    else if (license == NULL)
      {
	  /* just updating the Copyright */
	  sql = "UPDATE vector_coverages SET copyright = ? "
	      "WHERE Lower(coverage_name) = Lower(?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("setVectorCoverageCopyright: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, copyright, strlen (copyright),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
      }
    else
      {
	  /* updating both Copyright and License */
	  sql = "UPDATE vector_coverages SET copyright = ?, license = ("
	      "SELECT id FROM data_licenses WHERE name = ?) "
	      "WHERE Lower(coverage_name) = Lower(?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("setVectorCoverageCopyright: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, copyright, strlen (copyright),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, license, strlen (license), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, coverage_name,
			     strlen (coverage_name), SQLITE_STATIC);
      }
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("setVectorCoverageCopyright() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

static int
check_vector_coverage_srid2 (sqlite3 * sqlite, const char *coverage_name,
			     int srid)
{
/* checks if a Vector Coverage SRID do actually exists */
    int ret;
    const char *sql;
................................................................................
    if (count == 1)
	return 1;
    return 0;
  stop:
    return 0;
}

static int
find_vector_coverage_type (sqlite3 * sqlite, const char *coverage_name)
{
/* determining the Vector Coverage Type */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *value1;
    char *value2;
    int type = VECTOR_UNKNOWN;
    char *sql;

    sql =
	sqlite3_mprintf
	("SELECT f_table_name, f_geometry_column, view_name, view_geometry, "
	 "virt_name, virt_geometry, topology_name, network_name "
	 "FROM vector_coverages WHERE coverage_name = %Q", coverage_name);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return VECTOR_UNKNOWN;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value1 = results[(i * columns) + 0];
		value2 = results[(i * columns) + 1];
		if (value1 != NULL && value2 != NULL)
		    type = VECTOR_GEOTABLE;
		value1 = results[(i * columns) + 2];
		value2 = results[(i * columns) + 3];
		if (value1 != NULL && value2 != NULL)
		    type = VECTOR_SPATIALVIEW;
		value1 = results[(i * columns) + 4];
		value2 = results[(i * columns) + 5];
		if (value1 != NULL && value2 != NULL)
		    type = VECTOR_VIRTUALSHP;
		value1 = results[(i * columns) + 6];
		if (value1 != NULL)
		    type = VECTOR_TOPOGEO;
		value1 = results[(i * columns) + 7];
		if (value1 != NULL)
		    type = VECTOR_TOPONET;
	    }
      }
    sqlite3_free_table (results);
    return type;
}

static int
check_vector_coverage_srid1 (sqlite3 * sqlite, const char *coverage_name,
			     int srid)
{
/* checks if a Vector Coverage do actually exists and check its SRID */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int same_srid = 0;
    int type = find_vector_coverage_type (sqlite, coverage_name);

    switch (type)
      {
      case VECTOR_GEOTABLE:
	  sql = sqlite3_mprintf ("SELECT c.srid FROM vector_coverages AS v "
				 "JOIN geometry_columns AS c ON (v.f_table_name IS NOT NULL AND v.f_geometry_column IS NOT NULL "
				 "AND v.topology_name IS NULL AND v.network_name IS NULL AND "
				 "Lower(v.f_table_name) = Lower(c.f_table_name) "
				 "AND Lower(v.f_geometry_column) = Lower(c.f_geometry_column)) "
				 "WHERE Lower(v.coverage_name) = Lower(%Q)",
				 coverage_name);
	  break;
      case VECTOR_SPATIALVIEW:
	  sql = sqlite3_mprintf ("SELECT c.srid FROM vector_coverages AS v "
				 "JOIN views_geometry_columns AS x ON (v.view_name IS NOT NULL AND v.view_geometry IS NOT NULL "
				 "AND Lower(v.view_name) = Lower(x.view_name) AND Lower(v.view_geometry) = Lower(x.view_geometry)) "
				 "JOIN geometry_columns AS c ON (Lower(x.f_table_name) = Lower(c.f_table_name) "
				 "AND Lower(x.f_geometry_column) = Lower(c.f_geometry_column)) "
				 "WHERE Lower(v.coverage_name) = Lower(%Q)",
				 coverage_name);
	  break;
      case VECTOR_VIRTUALSHP:
	  sql = sqlite3_mprintf ("SELECT c.srid FROM vector_coverages AS v "
				 "JOIN virts_geometry_columns AS c ON (v.virt_name IS NOT NULL AND v.virt_geometry IS NOT NULL "
				 "AND Lower(v.virt_name) = Lower(c.virt_name) AND Lower(v.virt_geometry) = Lower(c.virt_geometry)) "
				 "WHERE Lower(v.coverage_name) = Lower(%Q)",
				 coverage_name);
	  break;
      case VECTOR_TOPOGEO:
	  sql = sqlite3_mprintf ("SELECT c.srid FROM vector_coverages AS v "
				 "JOIN topologies AS c ON (v.topology_name IS NOT NULL "
				 "AND Lower(v.topology_name) = Lower(c.topology_name)) "
				 "WHERE Lower(v.coverage_name) = Lower(%Q)",
				 coverage_name);
	  break;
      case VECTOR_TOPONET:
	  sql = sqlite3_mprintf ("SELECT c.srid FROM vector_coverages AS v "
				 "JOIN networks AS c ON (v.network_name IS NOT NULL "
				 "AND Lower(v.network_name) = Lower(c.network_name)) "
				 "WHERE Lower(v.coverage_name) = Lower(%Q)",
				 coverage_name);
	  break;
      case VECTOR_UNKNOWN:
      default:
	  goto stop;
	  break;
      };

    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)



	goto stop;





    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
    if (!check_vector_coverage_srid2 (sqlite, coverage_name, srid))
	return 0;
    /* deleting the alternative SRID */
    do_delete_vector_coverage_srid (sqlite, coverage_name, srid);
    return 1;
}

static int
check_vector_coverage_keyword0 (sqlite3 * sqlite, const char *coverage_name)
{
/* checks if a Vector Coverage do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql =
	"SELECT coverage_name FROM vector_coverages WHERE Lower(coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Coverage Keyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count == 0)
	return 0;
    return 1;
  stop:
    return 0;
}

static int
check_vector_coverage_keyword1 (sqlite3 * sqlite, const char *coverage_name,
				const char *keyword)
{
/* checks if a Vector Coverage do actually exists and check the Keyword */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int same_kw = 0;

    sql =
	"SELECT keyword FROM vector_coverages_keyword WHERE Lower(coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Coverage Keyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *kw = (const char *) sqlite3_column_text (stmt, 0);
		if (strcasecmp (kw, keyword) == 0)
		    same_kw++;
	    }
      }
    sqlite3_finalize (stmt);
    if (same_kw == 0)
      {
	  if (!check_vector_coverage_keyword0 (sqlite, coverage_name))
	      return 0;
	  else
	      return 1;
      }
    return 0;
  stop:
    return 0;
}

static int
check_vector_coverage_keyword2 (sqlite3 * sqlite, const char *coverage_name,
				const char *keyword)
{
/* checks if a Vector Coverage do actually exists and check the Keyword */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT keyword FROM vector_coverages_keyword "
	"WHERE Lower(coverage_name) = Lower(?) AND Lower(keyword) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Coverage Keyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, keyword, strlen (keyword), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count == 0)
	return 0;
    return 1;
  stop:
    return 0;
}

SPATIALITE_PRIVATE int
register_vector_coverage_keyword (void *p_sqlite, const char *coverage_name,
				  const char *keyword)
{
/* auxiliary function: inserting a Vector Coverage Keyword */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name == NULL)
	return 0;
    if (keyword == NULL)
	return 0;

    /* checking if the Vector Coverage do actually exists */
    if (!check_vector_coverage_keyword1 (sqlite, coverage_name, keyword))
	return 0;

    /* attempting to insert the Vector Coverage Keyword */
    sql = "INSERT INTO vector_coverages_keyword "
	"(coverage_name, keyword) VALUES (Lower(?), ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("registerVectorCoverageKeyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, keyword, strlen (keyword), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("registerVectorCoverageKeyword() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

SPATIALITE_PRIVATE int
unregister_vector_coverage_keyword (void *p_sqlite, const char *coverage_name,
				    const char *keyword)
{
/* auxiliary function: deletes a Vector Coverage Keyword */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (coverage_name == NULL)
	return 0;
    if (keyword == NULL)
	return 0;

    /* checking if the Vector Coverage Keyword do actually exists */
    if (!check_vector_coverage_keyword2 (sqlite, coverage_name, keyword))
	return 0;
    /* deleting the Keyword */
    do_delete_vector_coverage_keyword (sqlite, coverage_name, keyword);
    return 1;
}

static int
do_null_vector_coverage_extents (sqlite3 * sqlite, sqlite3_stmt * stmt_upd_cvg,
				 sqlite3_stmt * stmt_null_srid,
				 const char *coverage_name)
{
/* setting the main Coverage Extent to NULL */
    int ret;
................................................................................
    char *sql;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_ext = NULL;
    sqlite3_stmt *stmt_upd_cvg = NULL;
    sqlite3_stmt *stmt_upd_srid = NULL;
    sqlite3_stmt *stmt_null_srid = NULL;
    sqlite3_stmt *stmt_srid = NULL;
    sqlite3_stmt *stmt_virt = NULL;

/* preparing the ancillary SQL statements */
    sql = "SELECT srid FROM vector_coverages_srid "
	"WHERE Lower(coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt_srid, NULL);
    if (ret != SQLITE_OK)
      {
................................................................................
/* preparing the main SQL statement */
    if (coverage_name == NULL)
      {
	  sql = "SELECT v.coverage_name, v.f_table_name, v.f_geometry_column, "
	      "c.srid FROM vector_coverages AS v "
	      "JOIN geometry_columns AS c ON (Lower(v.f_table_name) = "
	      "Lower(c.f_table_name) AND Lower(v.f_geometry_column) = "
	      "Lower(c.f_geometry_column)) "
	      "WHERE v.f_table_name IS NOT NULL AND v.f_geometry_column IS NOT NULL "
	      "UNION "
	      "SELECT v.coverage_name, w.f_table_name, w.f_geometry_column, c.srid "
	      "FROM vector_coverages AS v "
	      "JOIN views_geometry_columns AS w ON "
	      "(Lower(v.view_name) = Lower(w.view_name) AND "
	      "Lower(v.view_geometry) = Lower(w.view_geometry)) "
	      "JOIN geometry_columns AS c ON "
	      "(Lower(w.f_table_name) = Lower(c.f_table_name) AND "
	      "Lower(w.f_geometry_column) = Lower(c.f_geometry_column)) "
	      "WHERE v.view_name IS NOT NULL AND v.view_geometry IS NOT NULL";
      }
    else
      {

	  sql = "SELECT v.coverage_name, v.f_table_name, v.f_geometry_column, "
	      "c.srid FROM vector_coverages AS v "
	      "JOIN geometry_columns AS c ON (Lower(v.f_table_name) = "
	      "Lower(c.f_table_name) AND Lower(v.f_geometry_column) = "
	      "Lower(c.f_geometry_column)) "
	      "WHERE Lower(v.coverage_name) = Lower(?) AND "
	      "v.f_table_name IS NOT NULL AND v.f_geometry_column IS NOT NULL "
	      "UNION "
	      "SELECT v.coverage_name, w.f_table_name, w.f_geometry_column, c.srid "
	      "FROM vector_coverages AS v "
	      "JOIN views_geometry_columns AS w ON "
	      "(Lower(v.view_name) = Lower(w.view_name) AND "
	      "Lower(v.view_geometry) = Lower(w.view_geometry)) "
	      "JOIN geometry_columns AS c ON "
	      "(Lower(w.f_table_name) = Lower(c.f_table_name) AND "
	      "Lower(w.f_geometry_column) = Lower(c.f_geometry_column)) "
	      "WHERE Lower(v.coverage_name) = Lower(?) AND "
	      "v.view_name IS NOT NULL AND v.view_geometry IS NOT NULL";
      }
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("updateVectorCoverageExtent: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto error;
................................................................................
	  if (ret != SQLITE_OK)
	      goto error;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (coverage_name != NULL)
      {
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
			  break;	/* end of result set */
		      if (ret == SQLITE_ROW)
			{
			    int null_minx = 1;
			    int null_miny = 1;
			    int null_maxx = 1;
			    int null_maxy = 1;
			    double minx = 0.0;
			    double miny = 0.0;
			    double maxx = 0.0;
			    double maxy = 0.0;
			    if (sqlite3_column_type (stmt_ext, 0) ==
				SQLITE_FLOAT)
			      {
				  minx = sqlite3_column_double (stmt_ext, 0);
				  null_minx = 0;
			      }
			    if (sqlite3_column_type (stmt_ext, 1) ==
................................................................................
	    {
		spatialite_e ("updateVectorCoverageExtent() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		goto error;
	    }
      }

/* updating VirtualShapes Extents */
    sql = "UPDATE vector_coverages SET "
	"geo_minx = MbrMinX(ST_Transform(GetShapefileExtent(virt_name), 4326)), "
	"geo_miny = MbrMinY(ST_Transform(GetShapefileExtent(virt_name), 4326)), "
	"geo_maxx = MbrMaxX(ST_Transform(GetShapefileExtent(virt_name), 4326)), "
	"geo_maxy = MbrMaxY(ST_Transform(GetShapefileExtent(virt_name), 4326)), "
	"extent_minx = MbrMinX(GetShapefileExtent(virt_name)), "
	"extent_miny = MbrMinY(GetShapefileExtent(virt_name)), "
	"extent_maxx = MbrMaxX(GetShapefileExtent(virt_name)), "
	"extent_maxy = MbrMaxY(GetShapefileExtent(virt_name)) "
	"WHERE virt_name IS NOT NULL";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("updateVectorCoverageExtent: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto error;
      }

    sql =
	"SELECT coverage_name, virt_name FROM vector_coverages WHERE virt_name IS NOT NULL";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt_virt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("updateVectorCoverageExtent: PREPUPPAMELO !!! \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto error;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_virt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *coverage_name =
		    (const char *) sqlite3_column_text (stmt_virt, 0);
		const char *virt_name =
		    (const char *) sqlite3_column_text (stmt_virt, 1);
		sql =
		    sqlite3_mprintf ("UPDATE vector_coverages_srid SET "
				     "extent_minx = MbrMinX(ST_Transform(GetShapefileExtent(%Q), srid)), "
				     "extent_miny = MbrMinY(ST_Transform(GetShapefileExtent(%Q), srid)), "
				     "extent_maxx = MbrMaxX(ST_Transform(GetShapefileExtent(%Q), srid)), "
				     "extent_maxy = MbrMaxY(ST_Transform(GetShapefileExtent(%Q), srid)) "
				     "WHERE coverage_name = %Q", virt_name,
				     virt_name, virt_name, virt_name,
				     coverage_name);
		ret = sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
		sqlite3_free (sql);
		if (ret != SQLITE_OK)
		  {
		      spatialite_e ("updateVectorCoverageExtent: PUPPAMELO !!! %d \"%s\"\n", ret,
				    sqlite3_errmsg (sqlite));
		      goto error;
		  }
	    }
	  else
	    {
		spatialite_e
		    ("updateVectorCoverageExtent() error: \"%s\"\n",
		     sqlite3_errmsg (sqlite));
		goto error;
	    }
      }

    if (transaction)
      {
	  /* committing the still pending Transaction */
	  ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	      goto error;
      }

    sqlite3_finalize (stmt);
    sqlite3_finalize (stmt_upd_cvg);
    sqlite3_finalize (stmt_upd_srid);
    sqlite3_finalize (stmt_null_srid);
    sqlite3_finalize (stmt_srid);
    sqlite3_finalize (stmt_virt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_ext != NULL)
	sqlite3_finalize (stmt_ext);
................................................................................
	sqlite3_finalize (stmt_upd_cvg);
    if (stmt_upd_srid != NULL)
	sqlite3_finalize (stmt_upd_srid);
    if (stmt_null_srid != NULL)
	sqlite3_finalize (stmt_null_srid);
    if (stmt_srid != NULL)
	sqlite3_finalize (stmt_srid);
    if (stmt_virt != NULL)
	sqlite3_finalize (stmt_virt);

    return 0;
}

static int
check_raster_coverage_srid2 (sqlite3 * sqlite, const char *coverage_name,
			     int srid)
{
................................................................................
{
/* auxiliary function: deleting all Raster Coverage alternative SRIDs */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM raster_coverages_srid "
	"WHERE Lower(coverage_name) = Lower(?) AND srid = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterRasterCoverageSrid: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
................................................................................
    if (!check_raster_coverage_srid2 (sqlite, coverage_name, srid))
	return 0;
    /* deleting the alternative SRID */
    do_delete_raster_coverage_srid (sqlite, coverage_name, srid);
    return 1;
}

static int
check_raster_coverage_keyword0 (sqlite3 * sqlite, const char *coverage_name)
{
/* checks if a Raster Coverage do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql =
	"SELECT coverage_name FROM raster_coverages WHERE Lower(coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Coverage Keyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count == 0)
	return 0;
    return 1;
  stop:
    return 0;
}

static int
check_raster_coverage_keyword1 (sqlite3 * sqlite, const char *coverage_name,
				const char *keyword)
{
/* checks if a Raster Coverage do actually exists and check the Keyword */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int same_kw = 0;

    sql =
	"SELECT keyword FROM raster_coverages_keyword WHERE Lower(coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Coverage Keyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *kw = (const char *) sqlite3_column_text (stmt, 0);
		if (strcasecmp (kw, keyword) == 0)
		    same_kw++;
	    }
      }
    sqlite3_finalize (stmt);
    if (same_kw == 0)
      {
	  if (!check_raster_coverage_keyword0 (sqlite, coverage_name))
	      return 0;
	  else
	      return 1;
      }
    return 0;
  stop:
    return 0;
}

static int
check_raster_coverage_keyword2 (sqlite3 * sqlite, const char *coverage_name,
				const char *keyword)
{
/* checks if a Raster Coverage do actually exists and check the Keyword */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT keyword FROM raster_coverages_keyword "
	"WHERE Lower(coverage_name) = Lower(?) AND Lower(keyword) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Coverage Keyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, keyword, strlen (keyword), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count == 0)
	return 0;
    return 1;
  stop:
    return 0;
}

SPATIALITE_PRIVATE int
register_raster_coverage_keyword (void *p_sqlite, const char *coverage_name,
				  const char *keyword)
{
/* auxiliary function: inserting a Raster Coverage Keyword */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name == NULL)
	return 0;
    if (keyword == NULL)
	return 0;

    /* checking if the Raster Coverage do actually exists */
    if (!check_raster_coverage_keyword1 (sqlite, coverage_name, keyword))
	return 0;

    /* attempting to insert the Raster Coverage Keyword */
    sql = "INSERT INTO raster_coverages_keyword "
	"(coverage_name, keyword) VALUES (Lower(?), ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("registerRasterCoverageKeyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, keyword, strlen (keyword), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("registerRasterCoverageKeyword() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

static void
do_delete_raster_coverage_keyword (sqlite3 * sqlite, const char *coverage_name,
				   const char *keyword)
{
/* auxiliary function: deleting all Raster Coverage Keyword */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM raster_coverages_keyword "
	"WHERE Lower(coverage_name) = Lower(?) AND Lower(keyword) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterRasterCoverageKeyword: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, keyword, strlen (keyword), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("unregisterRasterCoverageKeyword() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}

SPATIALITE_PRIVATE int
unregister_raster_coverage_keyword (void *p_sqlite, const char *coverage_name,
				    const char *keyword)
{
/* auxiliary function: deletes a Raster Coverage Keyword */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (coverage_name == NULL)
	return 0;
    if (keyword == NULL)
	return 0;

    /* checking if the Raster Coverage Keyword do actually exists */
    if (!check_raster_coverage_keyword2 (sqlite, coverage_name, keyword))
	return 0;
    /* deleting the Keyword */
    do_delete_raster_coverage_keyword (sqlite, coverage_name, keyword);
    return 1;
}

static int
do_null_raster_coverage_extents (sqlite3 * sqlite, sqlite3_stmt * stmt_upd_cvg,
				 sqlite3_stmt * stmt_null_srid,
				 const char *coverage_name)
{
/* setting the main Coverage Extent to NULL */
    int ret;
................................................................................
			  break;	/* end of result set */
		      if (ret == SQLITE_ROW)
			{
			    int null_minx = 1;
			    int null_miny = 1;
			    int null_maxx = 1;
			    int null_maxy = 1;
			    double minx = 0.0;
			    double miny = 0.0;
			    double maxx = 0.0;
			    double maxy = 0.0;
			    if (sqlite3_column_type (stmt_ext, 0) ==
				SQLITE_FLOAT)
			      {
				  minx = sqlite3_column_double (stmt_ext, 0);
				  null_minx = 0;
			      }
			    if (sqlite3_column_type (stmt_ext, 1) ==
................................................................................

SPATIALITE_PRIVATE int
get_iso_metadata_id (void *p_sqlite, const char *fileIdentifier, void *p_id)
{
/* auxiliary function: return the ID of the row corresponding to "fileIdentifier" */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    sqlite3_int64 *p64 = (sqlite3_int64 *) p_id;
    sqlite3_int64 id = 0;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int ok = 0;

    sql = "SELECT id FROM ISO_metadata WHERE fileId = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
................................................................................
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (exists)
      {
	  /* update */
	  sqlite3_bind_text (stmt, 1, scope, strlen (scope), SQLITE_STATIC);
	  sqlite3_bind_blob (stmt, 2, p_blob, n_bytes, SQLITE_STATIC);
	  sqlite3_bind_int64 (stmt, 3, id);
      }
    else
      {
	  /* insert */
	  if (id < 0)
	      sqlite3_bind_null (stmt, 1);
	  else
................................................................................
    sqlite3_finalize (stmt);
    return retval;
  stop:
    return 0;
}

#endif /* end including LIBXML2 */

SPATIALITE_PRIVATE int
register_wms_getcapabilities (void *p_sqlite, const char *url,
			      const char *title, const char *abstract)
{
/* auxiliary function: inserts a WMS GetCapabilities */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the WMS GetCapabilities */
	  sql = "INSERT INTO wms_getcapabilities (url, title, abstract) "
	      "VALUES (?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_RegisterGetCapabilities: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_RegisterGetCapabilities() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else if (url != NULL)
      {
	  /* attempting to insert the WMS GetCapabilities */
	  sql = "INSERT INTO wms_getcapabilities (url) VALUES (?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_RegisterGetCapabilities: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_RegisterGetCapabilities() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

static int
check_wms_getcapabilities (sqlite3 * sqlite, const char *url)
{
/* checks if a WMS GetCapabilities do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT url FROM wms_getcapabilities WHERE url = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check WMS GetCapabilities: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count == 1)
	return 1;
    return 0;
  stop:
    return 0;
}

static int
do_delete_wms_getcapabilities (sqlite3 * sqlite, const char *url)
{
/* auxiliary function: deleting a WMS GetCapabilities */
    int ret;
    int result = 0;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM wms_getcapabilities WHERE url = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterGetCapabilities: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_UnRegisterGetCapabilities() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
    return result;
}

static void
do_delete_wms_settings_0 (sqlite3 * sqlite, const char *url)
{
/* auxiliary function: deleting WMS settings (from GetCapabilities) */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM wms_settings WHERE id IN ("
	"SELECT s.id FROM wms_getcapabilities AS c "
	"JOIN wms_getmap AS m ON (c.id = m.parent_id) "
	"JOIN wms_settings AS s ON (m.id = s.parent_id) " "WHERE c.url = ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterGetCapabilities: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("WMS_UnRegisterGetCapabilities() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}

static void
do_delete_wms_getmap_0 (sqlite3 * sqlite, const char *url)
{
/* auxiliary function: deleting WMS GetMap (from GetCapabilities) */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM wms_getmap WHERE id IN ("
	"SELECT m.id FROM wms_getcapabilities AS c "
	"JOIN wms_getmap AS m ON (c.id = m.parent_id) " "WHERE c.url = ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterGetCapabilities: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("WMS_UnRegisterGetCapabilities() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}

SPATIALITE_PRIVATE int
unregister_wms_getcapabilities (void *p_sqlite, const char *url)
{
/* auxiliary function: deletes a WMS GetCapabilities definition (and any related) */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (url == NULL)
	return 0;

    /* checking if the WMS GetCapabilities do actually exists */
    if (!check_wms_getcapabilities (sqlite, url))
	return 0;
    /* deleting all WMS settings */
    do_delete_wms_settings_0 (sqlite, url);
    /* deleting all WMS GetMap */
    do_delete_wms_getmap_0 (sqlite, url);
    /* deleting the WMS GetCapability itself */
    return do_delete_wms_getcapabilities (sqlite, url);
}

SPATIALITE_PRIVATE int
set_wms_getcapabilities_infos (void *p_sqlite, const char *url,
			       const char *title, const char *abstract)
{
/* auxiliary function: updates the descriptive infos supporting a WMS GetCapabilities */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL && title != NULL && abstract != NULL)
      {
	  /* checking if the WMS GetCapabilities do actually exists */
	  if (!check_wms_getcapabilities (sqlite, url))
	      return 0;

	  /* attempting to update the WMS GetCapabilities */
	  sql =
	      "UPDATE wms_getcapabilities SET title = ?, abstract = ? WHERE url = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_SetGetCapabilitiesInfos: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, url, strlen (url), SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_SetGetCapabilitiesInfos() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

static int
wms_getmap_parentid (sqlite3 * sqlite, const char *url, sqlite3_int64 * id)
{
/* retieving the WMS GetCapabilities ID value */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT id FROM wms_getcapabilities WHERE url = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("GetMap parent_id: \"%s\"\n", sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		*id = sqlite3_column_int64 (stmt, 0);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
	return 1;
    return 0;
  stop:
    return 0;
}

SPATIALITE_PRIVATE int
register_wms_getmap (void *p_sqlite, const char *getcapabilities_url,
		     const char *getmap_url, const char *layer_name,
		     const char *title, const char *abstract,
		     const char *version, const char *ref_sys,
		     const char *image_format, const char *style,
		     int transparent, int flip_axes, int tiled, int cached,
		     int tile_width, int tile_height, const char *bgcolor,
		     int is_queryable, const char *getfeatureinfo_url)
{
/* auxiliary function: inserts a WMS GetMap */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    sqlite3_int64 parent_id;
    const char *sql;
    sqlite3_stmt *stmt;

    if (getcapabilities_url == NULL)
	return 0;

    if (!wms_getmap_parentid (sqlite, getcapabilities_url, &parent_id))
      {
	  spatialite_e ("WMS_RegisterGetMap: missing parent GetCapabilities\n");
	  return 0;
      }

    if (getmap_url != NULL && layer_name != NULL && title != NULL
	&& abstract != NULL)
      {
	  /* attempting to insert the WMS GetMap */
	  sql =
	      "INSERT INTO wms_getmap (parent_id, url, layer_name, title, abstract, "
	      "version, srs, format, style, transparent, flip_axes, tiled, "
	      "is_cached, tile_width, tile_height, bgcolor, is_queryable, "
	      "getfeatureinfo_url) VALUES "
	      "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_RegisterGetMap: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, parent_id);
	  sqlite3_bind_text (stmt, 2, getmap_url, strlen (getmap_url),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 6, version, strlen (version), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 7, ref_sys, strlen (ref_sys), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 8, image_format, strlen (image_format),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 9, style, strlen (style), SQLITE_STATIC);
	  if (transparent != 0)
	      transparent = 1;
	  sqlite3_bind_int (stmt, 10, transparent);
	  if (flip_axes != 0)
	      flip_axes = 1;
	  sqlite3_bind_int (stmt, 11, flip_axes);
	  if (tiled != 0)
	      tiled = 1;
	  sqlite3_bind_int (stmt, 12, tiled);
	  if (cached != 0)
	      cached = 1;
	  sqlite3_bind_int (stmt, 13, cached);
	  if (tile_width < 256)
	      tile_width = 256;
	  if (tile_height > 5000)
	      tile_width = 5000;
	  sqlite3_bind_int (stmt, 14, tile_width);
	  if (tile_height < 256)
	      tile_height = 256;
	  if (tile_height > 5000)
	      tile_height = 5000;
	  sqlite3_bind_int (stmt, 15, tile_height);
	  if (bgcolor == NULL)
	      sqlite3_bind_null (stmt, 16);
	  else
	      sqlite3_bind_text (stmt, 16, bgcolor, strlen (bgcolor),
				 SQLITE_STATIC);
	  if (is_queryable != 0)
	      is_queryable = 1;
	  sqlite3_bind_int (stmt, 17, is_queryable);
	  if (getfeatureinfo_url == NULL)
	      sqlite3_bind_null (stmt, 18);
	  else
	      sqlite3_bind_text (stmt, 18, getfeatureinfo_url,
				 strlen (getfeatureinfo_url), SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_RegisterGetMap() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
      }
    else if (getmap_url != NULL && layer_name != NULL)
      {
	  /* attempting to insert the WMS GetMap */
	  sql =
	      "INSERT INTO wms_getmap (parent_id, url, layer_name, version, srs, "
	      "format, style, transparent, flip_axes, tiled, is_cached, "
	      "tile_width, tile_height, is_queryable) VALUES "
	      "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_RegisterGetMap: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, parent_id);
	  sqlite3_bind_text (stmt, 2, getmap_url, strlen (getmap_url),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, version, strlen (version), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, ref_sys, strlen (ref_sys), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 6, image_format, strlen (image_format),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 7, style, strlen (style), SQLITE_STATIC);
	  if (transparent != 0)
	      transparent = 1;
	  sqlite3_bind_int (stmt, 8, transparent);
	  if (flip_axes != 0)
	      flip_axes = 1;
	  sqlite3_bind_int (stmt, 9, flip_axes);
	  if (tiled != 0)
	      tiled = 1;
	  sqlite3_bind_int (stmt, 10, tiled);
	  if (cached != 0)
	      cached = 1;
	  sqlite3_bind_int (stmt, 11, cached);
	  if (tile_width < 256)
	      tile_width = 256;
	  if (tile_height > 5000)
	      tile_width = 5000;
	  sqlite3_bind_int (stmt, 12, tile_width);
	  if (tile_height < 256)
	      tile_height = 256;
	  if (tile_height > 5000)
	      tile_height = 5000;
	  sqlite3_bind_int (stmt, 13, tile_height);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_RegisterGetMap() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
      }
    return 1;
}

static int
check_wms_getmap (sqlite3 * sqlite, const char *url, const char *layer_name)
{
/* checks if a WMS GetMap do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT url FROM wms_getmap WHERE url = ? AND layer_name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check WMS GetMap: \"%s\"\n", sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count == 1)
	return 1;
    return 0;
  stop:
    return 0;
}

static int
do_delete_wms_getmap (sqlite3 * sqlite, const char *url, const char *layer_name)
{
/* auxiliary function: deleting a WMS GetMap */
    int ret;
    int result = 0;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM wms_getmap WHERE url = ? AND layer_name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterGetMap: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_UnRegisterGetMap() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
    return result;
}

static void
do_delete_wms_settings_1 (sqlite3 * sqlite, const char *url,
			  const char *layer_name)
{
/* auxiliary function: deleting WMS settings (from GetMap) */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM wms_settings WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_settings AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterGetMap: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("WMS_UnRegisterGetMap() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}

SPATIALITE_PRIVATE int
unregister_wms_getmap (void *p_sqlite, const char *url, const char *layer_name)
{
/* auxiliary function: deletes a WMS GetMap definition (and related settings) */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (url == NULL || layer_name == NULL)
	return 0;

    /* checking if the WMS GetMap do actually exists */
    if (!check_wms_getmap (sqlite, url, layer_name))
	return 0;
    /* deleting all WMS settings */
    do_delete_wms_settings_1 (sqlite, url, layer_name);
    /* deleting the WMS GetMap itself */
    return do_delete_wms_getmap (sqlite, url, layer_name);
}

SPATIALITE_PRIVATE int
set_wms_getmap_infos (void *p_sqlite, const char *url, const char *layer_name,
		      const char *title, const char *abstract)
{
/* auxiliary function: updates the descriptive infos supporting a WMS GetMap */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL && title != NULL && abstract != NULL)
      {
	  /* checking if the WMS GetMap do actually exists */
	  if (!check_wms_getmap (sqlite, url, layer_name))
	      return 0;

	  /* attempting to update the WMS GetGetMap */
	  sql = "UPDATE wms_getmap SET title = ?, abstract = ? "
	      "WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_SetGetMapInfos: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_SetGetMapInfos() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
set_wms_getmap_copyright (void *p_sqlite, const char *url,
			  const char *layer_name, const char *copyright,
			  const char *license)
{
/* auxiliary function: updates the copyright infos supporting a WMS layer */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url == NULL || layer_name == NULL)
	return 0;
    if (copyright == NULL && license == NULL)
	return 1;

    if (copyright == NULL)
      {
	  /* just updating the License */
	  sql = "UPDATE wms_getmap SET license = ("
	      "SELECT id FROM data_licenses WHERE name = ?) "
	      "WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("setWMSLayerCopyright: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, license, strlen (license), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name,
			     strlen (layer_name), SQLITE_STATIC);
      }
    else if (license == NULL)
      {
	  /* just updating the Copyright */
	  sql = "UPDATE wms_getmap SET copyright = ? "
	      "WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("setWMSLayerCopyright: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, copyright, strlen (copyright),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name,
			     strlen (layer_name), SQLITE_STATIC);
      }
    else
      {
	  /* updating both Copyright and License */
	  sql = "UPDATE wms_getmap SET copyright = ?, license = ("
	      "SELECT id FROM data_licenses WHERE name = ?) "
	      "WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("setWMSLayerCopyright: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, copyright, strlen (copyright),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, license, strlen (license), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, layer_name,
			     strlen (layer_name), SQLITE_STATIC);
      }
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("setWMSLayerCopyright() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

SPATIALITE_PRIVATE int
set_wms_getmap_bgcolor (void *p_sqlite,
			const char *url, const char *layer_name,
			const char *bgcolor)
{
/* updating WMS GetMap Options - BgColor */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL)
      {
	  /* checking if the WMS GetMap do actually exists */
	  if (!check_wms_getmap (sqlite, url, layer_name))
	      return 0;

	  /* attempting to update the WMS GetMap */
	  sql =
	      "UPDATE wms_getmap SET bgcolor = ? WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_SetGetMapOptions (BGCOLOR): \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (bgcolor == NULL)
	      sqlite3_bind_null (stmt, 1);
	  else
	      sqlite3_bind_text (stmt, 1, bgcolor, strlen (bgcolor),
				 SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_SetGetMapOptions (BGCOLOR) error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
set_wms_getmap_queryable (void *p_sqlite,
			  const char *url, const char *layer_name,
			  int is_queryable, const char *getfeatureinfo_url)
{
/* updating WMS GetMap Options - IsQueryable */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL)
      {
	  /* checking if the WMS GetMap do actually exists */
	  if (!check_wms_getmap (sqlite, url, layer_name))
	      return 0;

	  /* attempting to update the WMS GetMap */
	  sql =
	      "UPDATE wms_getmap SET is_queryable = ?, getfeatureinfo_url = ? WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_SetGetMapOptions (IsQueryable): \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (is_queryable != 0)
	      is_queryable = 1;
	  sqlite3_bind_int (stmt, 1, is_queryable);
	  if (getfeatureinfo_url == NULL)
	      sqlite3_bind_null (stmt, 2);
	  else
	      sqlite3_bind_text (stmt, 2, getfeatureinfo_url,
				 strlen (getfeatureinfo_url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e
		    ("WMS_SetGetMapOptions (IsQueryable) error: \"%s\"\n",
		     sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
set_wms_getmap_options (void *p_sqlite,
			const char *url, const char *layer_name,
			int transparent, int flip_axes)
{
/* updating WMS GetMap Options - Flags */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL)
      {
	  /* checking if the WMS GetMap do actually exists */
	  if (!check_wms_getmap (sqlite, url, layer_name))
	      return 0;

	  /* attempting to update the WMS GetMap */
	  sql =
	      "UPDATE wms_getmap SET transparent = ?, flip_axes = ? WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_SetGetMapOptions (Flags): \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (transparent != 0)
	      transparent = 1;
	  sqlite3_bind_int (stmt, 1, transparent);
	  if (flip_axes != 0)
	      flip_axes = 1;
	  sqlite3_bind_int (stmt, 2, flip_axes);
	  sqlite3_bind_text (stmt, 3, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_SetGetMapOptions (Flags) error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

SPATIALITE_PRIVATE int
set_wms_getmap_tiled (void *p_sqlite,
		      const char *url, const char *layer_name,
		      int tiled, int cached, int tile_width, int tile_height)
{
/* updating WMS GetMap Options - Tiled */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (url != NULL)
      {
	  /* checking if the WMS GetMap do actually exists */
	  if (!check_wms_getmap (sqlite, url, layer_name))
	      return 0;

	  /* attempting to update the WMS GetMap */
	  sql =
	      "UPDATE wms_getmap SET tiled = ?, is_cached = ?, tile_width = ?, tile_height = ? "
	      "WHERE url = ? AND layer_name = ?";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_SetGetMapOptions (Tiled): \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (tiled != 0)
	      tiled = 1;
	  sqlite3_bind_int (stmt, 1, tiled);
	  if (cached != 0)
	      cached = 1;
	  sqlite3_bind_int (stmt, 2, cached);
	  if (tile_width < 256)
	      tile_width = 256;
	  if (tile_height > 5000)
	      tile_width = 5000;
	  sqlite3_bind_int (stmt, 3, tile_width);
	  if (tile_height < 256)
	      tile_height = 256;
	  if (tile_height > 5000)
	      tile_height = 5000;
	  sqlite3_bind_int (stmt, 4, tile_height);
	  sqlite3_bind_text (stmt, 5, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 6, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("WMS_SetGetMapOptions (Tiled) error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}

static int
wms_setting_parentid (sqlite3 * sqlite, const char *url, const char *layer_name,
		      sqlite3_int64 * id)
{
/* retieving the WMS GetMap ID value */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT id FROM wms_getmap WHERE url = ? AND layer_name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS Setting parent_id: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		*id = sqlite3_column_int64 (stmt, 0);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
	return 1;
    return 0;
  stop:
    return 0;
}

static int
do_wms_set_default (sqlite3 * sqlite, const char *url, const char *layer_name,
		    const char *key, const char *value)
{
/* auxiliary function: updating a WMS GetMap default setting */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int result = 0;

/* resetting an eventual previous default */
    sql = "UPDATE wms_settings SET is_default = 0 WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_settings AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.key = Lower(?) AND s.value <> ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_DefaultSetting: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, key, strlen (key), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 4, value, strlen (value), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_DefaultSetting() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
    if (!result)
	return 0;

/* setting the current default */
    sql = "UPDATE wms_settings SET is_default = 1 WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_settings AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.key = Lower(?) AND s.value = ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_DefaultSetting: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, key, strlen (key), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 4, value, strlen (value), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_DefaultSetting() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);

    if (result)
      {
	  /* updating the WMS GetMap */
	  sql = NULL;
	  if (strcasecmp (key, "version") == 0)
	      sql =
		  "UPDATE wms_getmap SET version = ? WHERE url = ? AND layer_name = ?";
	  if (strcasecmp (key, "format") == 0)
	      sql =
		  "UPDATE wms_getmap SET format = ? WHERE url = ? AND layer_name = ?";
	  if (strcasecmp (key, "style") == 0)
	      sql =
		  "UPDATE wms_getmap SET style = ? WHERE url = ? AND layer_name = ?";
	  if (sql == NULL)
	      return 0;
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_DefaultSetting: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  result = 0;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, value, strlen (value), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      result = 1;
	  else
	      spatialite_e ("WMS_DefaultSetting() error: \"%s\"\n",
			    sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
      }
    return result;
}

static int
do_wms_srs_default (sqlite3 * sqlite, const char *url, const char *layer_name,
		    const char *ref_sys)
{
/* auxiliary function: updating a WMS GetMap default SRS */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int result = 0;

/* resetting an eventual previous default */
    sql = "UPDATE wms_ref_sys SET is_default = 0 WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_ref_sys AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.srs <> Upper(?))";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_DefaultSetting: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, ref_sys, strlen (ref_sys), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_DefaultSRS() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
    if (!result)
	return 0;

/* setting the current default */
    sql = "UPDATE wms_ref_sys SET is_default = 1 WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_ref_sys AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.srs = Lower(?))";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_DefaultSetting: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, ref_sys, strlen (ref_sys), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_DefaultSRS() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);

    if (result)
      {
	  /* updating the WMS GetMap */
	  sql = NULL;
	  sql =
	      "UPDATE wms_getmap SET srs = ? WHERE url = ? AND layer_name = ?";
	  if (sql == NULL)
	      return 0;
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("WMS_DefaultSRS: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  result = 0;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, ref_sys, strlen (ref_sys), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, url, strlen (url), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, layer_name, strlen (layer_name),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      result = 1;
	  else
	      spatialite_e ("WMS_DefaultSRS() error: \"%s\"\n",
			    sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
      }
    return result;
}

SPATIALITE_PRIVATE int
register_wms_setting (void *p_sqlite, const char *url, const char *layer_name,
		      const char *key, const char *value, int is_default)
{
/* auxiliary function: inserts a WMS GetMap Setting */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    sqlite3_int64 parent_id;
    const char *sql;
    sqlite3_stmt *stmt;

    if (!wms_setting_parentid (sqlite, url, layer_name, &parent_id))
      {
	  spatialite_e ("WMS_RegisterSetting: missing parent GetMap\n");
	  return 0;
      }

    /* attempting to insert the WMS Setting */
    sql = "INSERT INTO wms_settings (parent_id, key, value, is_default) "
	"VALUES (?, Lower(?), ?, ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_RegisterSetting: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, parent_id);
    sqlite3_bind_text (stmt, 2, key, strlen (key), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, value, strlen (value), SQLITE_STATIC);
    if (is_default != 0)
	is_default = 1;
    sqlite3_bind_int (stmt, 4, 0);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("WMS_RegisterSetting() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);

    if (is_default)
	return do_wms_set_default (sqlite, url, layer_name, key, value);
    return 1;
}

static int
check_wms_setting (sqlite3 * sqlite, const char *url, const char *layer_name,
		   const char *key, const char *value, int mode_delete)
{
/* checks if a WMS GetMap Setting do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT s.is_default FROM wms_getmap AS m "
	"LEFT JOIN wms_settings AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.key = Lower(?) AND s.value = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check WMS GetMap: \"%s\"\n", sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, key, strlen (key), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 4, value, strlen (value), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int is_default = sqlite3_column_int (stmt, 0);
		if (mode_delete && is_default)
		    ;
		else
		    count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
	return 1;
  stop:
    return 0;
}

static int
do_delete_wms_setting (sqlite3 * sqlite, const char *url,
		       const char *layer_name, const char *key,
		       const char *value)
{
/* auxiliary function: deleting a WMS GetMap setting */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int result = 0;

    sql = "DELETE FROM wms_settings WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_settings AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.key = Lower(?) AND s.value = ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterSetting: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, key, strlen (key), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 4, value, strlen (value), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_UnRegisterSetting() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
    return result;
}

SPATIALITE_PRIVATE int
unregister_wms_setting (void *p_sqlite, const char *url, const char *layer_name,
			const char *key, const char *value)
{
/* auxiliary function: deletes a WMS GetMap Setting */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (url == NULL)
	return 0;

    /* checking if the WMS GetMap do actually exists */
    if (!check_wms_setting (sqlite, url, layer_name, key, value, 1))
	return 0;
    /* deleting the WMS GetMap Setting itself */
    return do_delete_wms_setting (sqlite, url, layer_name, key, value);
}

SPATIALITE_PRIVATE int
set_wms_default_setting (void *p_sqlite, const char *url,
			 const char *layer_name, const char *key,
			 const char *value)
{
/* auxiliary function: updating a WMS GetMap Default Setting */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (url == NULL)
	return 0;

    /* checking if the WMS GetMap do actually exists */
    if (!check_wms_setting (sqlite, url, layer_name, key, value, 0))
	return 0;
    /* updating the WMS GetMap Default Setting */
    return do_wms_set_default (sqlite, url, layer_name, key, value);
}

SPATIALITE_PRIVATE int
register_wms_srs (void *p_sqlite, const char *url, const char *layer_name,
		  const char *ref_sys, double minx, double miny, double maxx,
		  double maxy, int is_default)
{
/* auxiliary function: inserts a WMS GetMap SRS */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    sqlite3_int64 parent_id;
    const char *sql;
    sqlite3_stmt *stmt;

    if (!wms_setting_parentid (sqlite, url, layer_name, &parent_id))
      {
	  spatialite_e ("WMS_RegisterSRS: missing parent GetMap\n");
	  return 0;
      }

    /* attempting to insert the WMS Setting */
    sql =
	"INSERT INTO wms_ref_sys (parent_id, srs, minx, miny, maxx, maxy, is_default) "
	"VALUES (?, Upper(?), ?, ?, ?, ?, ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_RegisterSRS: \"%s\"\n", sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, parent_id);
    sqlite3_bind_text (stmt, 2, ref_sys, strlen (ref_sys), SQLITE_STATIC);
    sqlite3_bind_double (stmt, 3, minx);
    sqlite3_bind_double (stmt, 4, miny);
    sqlite3_bind_double (stmt, 5, maxx);
    sqlite3_bind_double (stmt, 6, maxy);
    if (is_default != 0)
	is_default = 1;
    sqlite3_bind_int (stmt, 7, is_default);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("WMS_RegisterSRS() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);

    if (is_default)
	return do_wms_srs_default (sqlite, url, layer_name, ref_sys);
    return 1;
}

static int
check_wms_srs (sqlite3 * sqlite, const char *url, const char *layer_name,
	       const char *ref_sys, int mode_delete)
{
/* checks if a WMS GetMap SRS do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;

    sql = "SELECT s.is_default FROM wms_getmap AS m "
	"LEFT JOIN wms_ref_sys AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.srs = Upper(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check WMS GetMap: \"%s\"\n", sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, ref_sys, strlen (ref_sys), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int is_default = sqlite3_column_int (stmt, 0);
		if (mode_delete && is_default)
		    ;
		else
		    count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count == 1)
	return 1;
  stop:
    return 0;
}

static int
do_delete_wms_srs (sqlite3 * sqlite, const char *url,
		   const char *layer_name, const char *ref_sys)
{
/* auxiliary function: deleting a WMS GetMap SRS */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int result = 0;

    sql = "DELETE FROM wms_ref_sys WHERE id IN ("
	"SELECT s.id FROM wms_getmap AS m "
	"JOIN wms_ref_sys AS s ON (m.id = s.parent_id) "
	"WHERE m.url = ? AND m.layer_name = ? AND s.srs = Upper(?))";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_UnRegisterSRS: \"%s\"\n", sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, ref_sys, strlen (ref_sys), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	result = 1;
    else
	spatialite_e ("WMS_UnRegisterSRSg() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
    return result;
}

SPATIALITE_PRIVATE int
unregister_wms_srs (void *p_sqlite, const char *url, const char *layer_name,
		    const char *ref_sys)
{
/* auxiliary function: deletes a WMS GetMap SRS */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (url == NULL)
	return 0;

    /* checking if the WMS GetMap do actually exists */
    if (!check_wms_srs (sqlite, url, layer_name, ref_sys, 1))
	return 0;
    /* deleting the WMS GetMap SRS itself */
    return do_delete_wms_srs (sqlite, url, layer_name, ref_sys);
}

SPATIALITE_PRIVATE int
set_wms_default_srs (void *p_sqlite, const char *url,
		     const char *layer_name, const char *ref_sys)
{
/* auxiliary function: updating a WMS GetMap Default SRS */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;

    if (url == NULL)
	return 0;

    /* checking if the WMS GetMap do actually exists */
    if (!check_wms_srs (sqlite, url, layer_name, ref_sys, 0))
	return 0;
    /* updating the WMS GetMap Default SRS */
    return do_wms_srs_default (sqlite, url, layer_name, ref_sys);
}

SPATIALITE_PRIVATE char *
wms_getmap_request_url (void *p_sqlite, const char *getmap_url,
			const char *layer_name, int width, int height,
			double minx, double miny, double maxx, double maxy)
{
/* return a WMS GetMap request URL */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    char *request_url = NULL;

    if (getmap_url == NULL)
	return NULL;

    sql = "SELECT version, srs, format, style, transparent, flip_axes, "
	"bgcolor FROM wms_getmap WHERE url = ? AND layer_name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_GetMapRequestURL: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return NULL;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, getmap_url, strlen (getmap_url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *ref_sys_prefix = "CRS";
		const char *bgcolor = NULL;
		const char *version =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *ref_sys =
		    (const char *) sqlite3_column_text (stmt, 1);
		const char *format =
		    (const char *) sqlite3_column_text (stmt, 2);
		const char *style =
		    (const char *) sqlite3_column_text (stmt, 3);
		int transparent = sqlite3_column_int (stmt, 4);
		int flip_axes = sqlite3_column_int (stmt, 5);
		if (sqlite3_column_type (stmt, 6) == SQLITE_TEXT)
		    bgcolor = (const char *) sqlite3_column_text (stmt, 6);
		/* preparing the request URL */
		if (strcmp (version, "1.3.0") < 0)
		  {
		      /* earlier versions of the protocol require SRS instead of CRS */
		      ref_sys_prefix = "SRS";
		  }
		if (flip_axes)
		  {
		      request_url =
			  sqlite3_mprintf
			  ("%s?SERVICE=WMS&REQUEST=GetMap&VERSION=%s"
			   "&LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f"
			   "&WIDTH=%d&HEIGHT=%d&STYLES=%s&FORMAT=%s"
			   "&TRANSPARENT=%s", getmap_url, version, layer_name,
			   ref_sys_prefix, ref_sys, miny, minx, maxy, maxx,
			   width, height, style, format,
			   (transparent == 0) ? "FALSE" : "TRUE");
		  }
		else
		  {
		      request_url =
			  sqlite3_mprintf
			  ("%s?SERVICE=WMS&REQUEST=GetMap&VERSION=%s"
			   "&LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f"
			   "&WIDTH=%d&HEIGHT=%d&STYLES=%s&FORMAT=%s"
			   "&TRANSPARENT=%s", getmap_url, version, layer_name,
			   ref_sys_prefix, ref_sys, minx, miny, maxx, maxy,
			   width, height, style, format,
			   (transparent == 0) ? "FALSE" : "TRUE");
		  }
		if (bgcolor != NULL)
		  {
		      char *prev = request_url;
		      request_url =
			  sqlite3_mprintf ("%s&BGCOLOR=0x%s", prev, bgcolor);
		      sqlite3_free (prev);
		  }
	    }
      }
    sqlite3_finalize (stmt);
    return request_url;
}

SPATIALITE_PRIVATE char *
wms_getfeatureinfo_request_url (void *p_sqlite, const char *getmap_url,
				const char *layer_name, int width, int height,
				int x, int y, double minx, double miny,
				double maxx, double maxy, int feature_count)
{
/* return a WMS GetFeatureInfo request URL */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    char *request_url = NULL;

    if (getmap_url == NULL)
	return NULL;

    sql = "SELECT version, srs, flip_axes, is_queryable, getfeatureinfo_url "
	"FROM wms_getmap WHERE url = ? AND layer_name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("WMS_GetFeatureInfoRequestURL: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return NULL;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, getmap_url, strlen (getmap_url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, layer_name, strlen (layer_name), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *ref_sys_prefix = "CRS";
		const char *getfeatureinfo_url = NULL;
		const char *version =
		    (const char *) sqlite3_column_text (stmt, 0);
		const char *ref_sys =
		    (const char *) sqlite3_column_text (stmt, 1);
		int flip_axes = sqlite3_column_int (stmt, 2);
		int is_queryable = sqlite3_column_int (stmt, 3);
		if (sqlite3_column_type (stmt, 4) == SQLITE_TEXT)
		    getfeatureinfo_url =
			(const char *) sqlite3_column_text (stmt, 4);
		if (!is_queryable || getfeatureinfo_url == NULL)
		    return NULL;

		/* preparing the request URL */
		if (feature_count < 1)
		    feature_count = 1;
		if (strcmp (version, "1.3.0") < 0)
		  {
		      /* earlier versions of the protocol require SRS instead of CRS */
		      ref_sys_prefix = "SRS";
		  }
		if (flip_axes)
		  {
		      request_url =
			  sqlite3_mprintf
			  ("%s?SERVICE=WMS&REQUEST=GetFeatureInfo&VERSION=%s"
			   "&QUERY_LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f"
			   "&WIDTH=%d&HEIGHT=%d&X=%d&Y=%d&FEATURE_COUNT=%d",
			   getfeatureinfo_url, version, layer_name,
			   ref_sys_prefix, ref_sys, miny, minx, maxy, maxx,
			   width, height, x, y, feature_count);
		  }
		else
		  {
		      request_url =
			  sqlite3_mprintf
			  ("%s?SERVICE=WMS&REQUEST=GetFeatureInfo&VERSION=%s"
			   "&QUERY_LAYERS=%s&%s=%s&BBOX=%1.6f,%1.6f,%1.6f,%1.6f"
			   "&WIDTH=%d&HEIGHT=%d&X=%d&Y=%d&FEATURE_COUNT=%d",
			   getfeatureinfo_url, version, layer_name,
			   ref_sys_prefix, ref_sys, minx, miny, maxx, maxy,
			   width, height, x, y, feature_count);
		  }
	    }
      }
    sqlite3_finalize (stmt);
    return request_url;
}

SPATIALITE_PRIVATE int
register_data_license (void *p_sqlite, const char *license_name,
		       const char *url)
{
/* auxiliary function: inserts a Data License */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (license_name == NULL)
	return 0;

    sql = "INSERT INTO data_licenses (name, url) VALUES (?, ?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("registerDataLicense: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, license_name,
		       strlen (license_name), SQLITE_STATIC);
    if (url == NULL)
	sqlite3_bind_null (stmt, 2);
    else
	sqlite3_bind_text (stmt, 2, url, strlen (url), SQLITE_STATIC);

    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("registerDataLicense() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

SPATIALITE_PRIVATE int
unregister_data_license (void *p_sqlite, const char *license_name)
{
/* auxiliary function: deletes a Data License */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (license_name == NULL)
	return 0;

    sql = "DELETE FROM data_licenses WHERE name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterDataLicense: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, license_name,
		       strlen (license_name), SQLITE_STATIC);

    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("unregisterDataLicense() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

SPATIALITE_PRIVATE int
rename_data_license (void *p_sqlite, const char *old_name, const char *new_name)
{
/* auxiliary function: renames a Data License */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int prev_changes;
    int curr_changes;

    if (old_name == NULL || new_name == NULL)
	return 0;

    prev_changes = sqlite3_total_changes (sqlite);

    sql = "UPDATE data_licenses SET name = ? WHERE name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("renameDataLicense: \"%s\"\n", sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, new_name, strlen (new_name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, old_name, strlen (old_name), SQLITE_STATIC);

    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("renameDataLicense() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);

    curr_changes = sqlite3_total_changes (sqlite);
    if (prev_changes == curr_changes)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE int
set_data_license_url (void *p_sqlite, const char *license_name, const char *url)
{
/* auxiliary function: updates a Data License URL */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int prev_changes;
    int curr_changes;

    if (license_name == NULL || url == NULL)
	return 0;

    prev_changes = sqlite3_total_changes (sqlite);

    sql = "UPDATE data_licenses SET url = ? WHERE name = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("setDataLicenseUrl: \"%s\"\n", sqlite3_errmsg (sqlite));
	  return 0;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, url, strlen (url), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, license_name,
		       strlen (license_name), SQLITE_STATIC);

    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  spatialite_e ("setDataLicenseUrl() error: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);

    curr_changes = sqlite3_total_changes (sqlite);
    if (prev_changes == curr_changes)
	return 0;
    return 1;
}




|







 







|







 







>



<
<
<
<
<
<
<
<







 







|







 







|







 







|







 







>







 







|







 







|







 







|







 







>







 







|







 







|







 







|







 







|







 







|







 







|







 







>







 







|







 







|







 







|
<












|
<
|







 







<
<
<
<
<
<







 







|
<
|







 







<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|




<
|
<
<
<
<
>











<
|









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<










|
<






<
<



<
<

<
<
|
|
<
|
|
|
<
>
|
|
|
|
|
|
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<











<
<
<
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










<

<
<
<
|
<
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


>
>
>
|
>
>
>
>
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<







 







|
<
<
<
<
<
<
<
<
<
<
<



>





|
<
<
<
<
<
<
<
<
<
<
<
<







 







<
|
|
<
<
<







 







|
|
|
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<







 







<
<
<







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|
|
|







 







|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
69
70
71
72
73
74
75
76
77
78
79








80
81
82
83
84
85
86
...
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
...
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
...
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
...
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
...
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
....
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
....
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
....
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
....
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
....
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
....
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
....
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
....
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
....
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
....
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
....
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
....
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
....
3107
3108
3109
3110
3111
3112
3113
3114

3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127

3128
3129
3130
3131
3132
3133
3134
3135
....
3140
3141
3142
3143
3144
3145
3146






3147
3148
3149
3150
3151
3152
3153
....
3158
3159
3160
3161
3162
3163
3164
3165

3166
3167
3168
3169
3170
3171
3172
3173
....
3175
3176
3177
3178
3179
3180
3181






3182
3183
3184
3185
3186
3187
3188
....
3192
3193
3194
3195
3196
3197
3198











































































































































































































































































































































































































































































































3199
3200
3201
3202
3203
3204
3205
....
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246

3247




3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259

3260
3261
3262
3263
3264
3265
3266
3267
3268
3269





































3270
3271
3272
3273
3274
3275
3276
....
3368
3369
3370
3371
3372
3373
3374


3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385

3386
3387
3388
3389
3390
3391


3392
3393
3394


3395


3396
3397

3398
3399
3400

3401
3402
3403
3404
3405
3406
3407

3408
3409
3410

















3411











3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422




3423
3424
3425
3426
3427
3428
























































































3429
3430
3431
3432
3433
3434
3435
....
3463
3464
3465
3466
3467
3468
3469





















































3470
3471
3472
3473
3474
3475
3476
3477
3478
3479

3480



3481


3482
3483
3484






































3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
....
3582
3583
3584
3585
3586
3587
3588





































































































































































































3589
3590
3591
3592
3593
3594
3595
....
3860
3861
3862
3863
3864
3865
3866

3867
3868
3869
3870
3871
3872
3873
....
3913
3914
3915
3916
3917
3918
3919
3920











3921
3922
3923
3924
3925
3926
3927
3928
3929
3930












3931
3932
3933
3934
3935
3936
3937
....
3944
3945
3946
3947
3948
3949
3950

3951
3952



3953
3954
3955
3956
3957
3958
3959
....
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
....
4064
4065
4066
4067
4068
4069
4070



































































4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083

4084
4085
4086
4087
4088
4089
4090
....
4092
4093
4094
4095
4096
4097
4098



4099
4100
4101
4102
4103
4104
4105
....
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
....
4285
4286
4287
4288
4289
4290
4291





































































































































































































































4292
4293
4294
4295
4296
4297
4298
....
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
....
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
....
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
....
4953
4954
4955
4956
4957
4958
4959
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































/*

 se_helpers.c -- SLD/SE helper functions 

 version 4.2.1, 2014 December 9

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................

#include <spatialite.h>
#include <spatialite_private.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */


#ifdef ENABLE_LIBXML2		/* including LIBXML2 */









static int
check_external_graphic (sqlite3 * sqlite, const char *xlink_href)
{
/* checks if an ExternalGraphic Resource already exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
................................................................................
			    sqlite3_int64 * id)
{
/* checks if a Vector Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT style_id FROM SE_vector_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Style by Name: \"%s\"\n",
................................................................................
{
/* checks if a Vector Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int ref_count = 0;
    sqlite3_int64 xid;

    sql = "SELECT style_id FROM SE_vector_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Style Refs by Name: \"%s\"\n",
................................................................................
      {
	  spatialite_e ("check Vector Style Refs by ID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int (stmt, 1, *id);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
		    ref_count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (ref_count > 0)
	*has_refs = 1;
    return 1;
    return 0;
  stop:
    return 0;
}

static int
do_insert_vector_style_layer (sqlite3 * sqlite, const char *coverage_name,
			      sqlite3_int64 id)
................................................................................
				   const char *style_name, sqlite3_int64 * id)
{
/* checks if a Vector Styled Layer do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT l.style_id FROM SE_vector_styled_layers AS l "
	"JOIN SE_vector_styles AS s ON (l.style_id = s.style_id) "
	"WHERE Lower(l.coverage_name) = Lower(?) "
	"AND Lower(s.style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
................................................................................
{
/* checks if a Raster Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int ref_count = 0;
    sqlite3_int64 xid;

    sql = "SELECT style_id FROM SE_raster_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Style Refs by Name: \"%s\"\n",
................................................................................
      {
	  spatialite_e ("check Raster Style Refs by ID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int (stmt, 1, *id);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
		    ref_count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (ref_count > 0)
	*has_refs = 1;
    return 1;
    return 0;
  stop:
    return 0;
}

static int
do_delete_raster_style (sqlite3 * sqlite, sqlite3_int64 id)
{
................................................................................
			    sqlite3_int64 * id)
{
/* checks if a Raster Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT style_id FROM SE_raster_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Raster Style by Name: \"%s\"\n",
................................................................................
				   const char *style_name, sqlite3_int64 * id)
{
/* checks if a Raster Styled Layer do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT l.style_id FROM SE_raster_styled_layers AS l "
	"JOIN SE_raster_styles AS s ON (l.style_id = s.style_id) "
	"WHERE Lower(l.coverage_name) = Lower(?) AND "
	"Lower(s.style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
................................................................................
			   const char *coverage_name, sqlite3_int64 * id)
{
/* checks if a Styled Group Layer (Raster) do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT id FROM SE_styled_group_refs WHERE "
	"Lower(group_name) = Lower(?) AND Lower(raster_coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("checkStyledGroupRasterItem: \"%s\"\n",
................................................................................
			   const char *coverage_name, sqlite3_int64 * id)
{
/* checks if a Styled Group Layer (Vector) do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT id FROM SE_styled_group_refs WHERE "
	"Lower(group_name) = Lower(?) AND Lower(vector_coverage_name) = Lower(?) ";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("checkStyledGroupVectorItem: \"%s\"\n",
................................................................................
{
/* checks if a Group Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int ref_count = 0;
    sqlite3_int64 xid;

    sql = "SELECT style_id FROM SE_group_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Group Style Refs by Name: \"%s\"\n",
................................................................................
      {
	  spatialite_e ("check Group Style Refs by ID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int (stmt, 1, *id);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
		    ref_count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (ref_count > 0)
	*has_refs = 1;
    return 1;
    return 0;
  stop:
    return 0;
}

static int
do_delete_group_style (sqlite3 * sqlite, sqlite3_int64 id)
{
................................................................................
			   sqlite3_int64 * id)
{
/* checks if a Group Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT style_id FROM SE_group_styles "
	"WHERE Lower(style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Group Style by Name: \"%s\"\n",
................................................................................
				  const char *style_name, sqlite3_int64 * id)
{
/* checks if a Styled Group Style do actually exists - by name */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    sqlite3_int64 xid;

    sql = "SELECT l.style_id FROM SE_styled_group_styles AS l "
	"JOIN SE_group_styles AS s ON (l.style_id = s.style_id) "
	"WHERE Lower(l.group_name) = Lower(?) AND "
	"Lower(s.style_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
................................................................................
	return 0;
}

SPATIALITE_PRIVATE int
register_vector_coverage (void *p_sqlite, const char *coverage_name,
			  const char *f_table_name,
			  const char *f_geometry_column, const char *title,
			  const char *abstract)

{
/* auxiliary function: inserts a Vector Coverage definition */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    if (coverage_name != NULL && f_table_name != NULL
	&& f_geometry_column != NULL && title != NULL && abstract != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column, title, abstract) "

	      "VALUES (Lower(?), Lower(?), Lower(?), ?, ?)";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
................................................................................
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 4, title, strlen (title), SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 5, abstract, strlen (abstract),
			     SQLITE_STATIC);






	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
................................................................................
	  return 1;
      }
    else if (coverage_name != NULL && f_table_name != NULL
	     && f_geometry_column != NULL)
      {
	  /* attempting to insert the Vector Coverage */
	  sql = "INSERT INTO vector_coverages "
	      "(coverage_name, f_table_name, f_geometry_column) "

	      "VALUES (Lower(?), Lower(?), Lower(?))";
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
................................................................................
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 2, f_table_name, strlen (f_table_name),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, f_geometry_column,
			     strlen (f_geometry_column), SQLITE_STATIC);






	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("registerVectorCoverage() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
................................................................................
	  sqlite3_finalize (stmt);
	  return 1;
      }
    else
	return 0;
}












































































































































































































































































































































































































































































































static int
check_vector_coverage (sqlite3 * sqlite, const char *coverage_name)
{
/* checks if a Vector Coverage do actually exists */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
................................................................................
    return 0;
}

static void
do_delete_vector_coverage_srid (sqlite3 * sqlite, const char *coverage_name,
				int srid)
{
/* auxiliary function: deleting all Vector Coverage alternative SRIDs */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;


    sql = "DELETE FROM vector_coverages_srid "




	"WHERE coverage_name = ? AND srid = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterVectorCoverageSrid: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);

    sqlite3_bind_int (stmt, 2, srid);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	spatialite_e ("unregisterVectorCoverageSrid() error: \"%s\"\n",
		      sqlite3_errmsg (sqlite));
    sqlite3_finalize (stmt);
}






































static void
do_delete_vector_coverage_styled_layers (sqlite3 * sqlite,
					 const char *coverage_name)
{
/* auxiliary function: deleting all Vector Coverage Styled references */
    int ret;
    const char *sql;
................................................................................
	return 0;

    /* checking if the Vector Coverage do actually exists */
    if (!check_vector_coverage (sqlite, coverage_name))
	return 0;
    /* deleting all alternative SRIDs */
    do_delete_vector_coverage_srid (sqlite, coverage_name, -1);


    /* deleting all Styled Layers */
    do_delete_vector_coverage_styled_layers (sqlite, coverage_name);
    /* deleting all Styled Group references */
    do_delete_vector_coverage_styled_groups (sqlite, coverage_name);
    /* deleting the Vector Coverage itself */
    return do_delete_vector_coverage (sqlite, coverage_name);
}

SPATIALITE_PRIVATE int
set_vector_coverage_infos (void *p_sqlite, const char *coverage_name,
			   const char *title, const char *abstract)

{
/* auxiliary function: updates the descriptive infos supporting a Vector Coverage */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;



    if (coverage_name != NULL && title != NULL && abstract != NULL)
      {


	  /* attempting to update the Vector Coverage */


	  sql = "UPDATE vector_coverages SET title = ?, abstract = ? "
	      "WHERE Lower(coverage_name) = Lower(?)";

	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  if (ret != SQLITE_OK)
	    {

		spatialite_e ("registerVectorCoverage: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		return 0;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, title, strlen (title), SQLITE_STATIC);

	  sqlite3_bind_text (stmt, 2, abstract, strlen (abstract),
			     SQLITE_STATIC);
	  sqlite3_bind_text (stmt, 3, coverage_name, strlen (coverage_name),

















			     SQLITE_STATIC);











	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		spatialite_e ("setVectorCoverageInfos() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		sqlite3_finalize (stmt);
		return 0;
	    }
	  sqlite3_finalize (stmt);




	  return 1;
      }
    else
	return 0;
}

























































































static int
check_vector_coverage_srid2 (sqlite3 * sqlite, const char *coverage_name,
			     int srid)
{
/* checks if a Vector Coverage SRID do actually exists */
    int ret;
    const char *sql;
................................................................................
    if (count == 1)
	return 1;
    return 0;
  stop:
    return 0;
}






















































static int
check_vector_coverage_srid1 (sqlite3 * sqlite, const char *coverage_name,
			     int srid)
{
/* checks if a Vector Coverage do actually exists and check its SRID */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int count = 0;
    int same_srid = 0;





    sql = "SELECT c.srid FROM vector_coverages AS v "


	"JOIN geometry_columns AS c ON (Lower(v.f_table_name) = Lower(c.f_table_name) "
	"AND Lower(v.f_geometry_column) = Lower(c.f_geometry_column)) "
	"WHERE Lower(v.coverage_name) = Lower(?)";






































    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("check Vector Coverage SRID: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto stop;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
		       SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
    if (!check_vector_coverage_srid2 (sqlite, coverage_name, srid))
	return 0;
    /* deleting the alternative SRID */
    do_delete_vector_coverage_srid (sqlite, coverage_name, srid);
    return 1;
}






































































































































































































static int
do_null_vector_coverage_extents (sqlite3 * sqlite, sqlite3_stmt * stmt_upd_cvg,
				 sqlite3_stmt * stmt_null_srid,
				 const char *coverage_name)
{
/* setting the main Coverage Extent to NULL */
    int ret;
................................................................................
    char *sql;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_ext = NULL;
    sqlite3_stmt *stmt_upd_cvg = NULL;
    sqlite3_stmt *stmt_upd_srid = NULL;
    sqlite3_stmt *stmt_null_srid = NULL;
    sqlite3_stmt *stmt_srid = NULL;


/* preparing the ancillary SQL statements */
    sql = "SELECT srid FROM vector_coverages_srid "
	"WHERE Lower(coverage_name) = Lower(?)";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt_srid, NULL);
    if (ret != SQLITE_OK)
      {
................................................................................
/* preparing the main SQL statement */
    if (coverage_name == NULL)
      {
	  sql = "SELECT v.coverage_name, v.f_table_name, v.f_geometry_column, "
	      "c.srid FROM vector_coverages AS v "
	      "JOIN geometry_columns AS c ON (Lower(v.f_table_name) = "
	      "Lower(c.f_table_name) AND Lower(v.f_geometry_column) = "
	      "Lower(c.f_geometry_column))";











      }
    else
      {

	  sql = "SELECT v.coverage_name, v.f_table_name, v.f_geometry_column, "
	      "c.srid FROM vector_coverages AS v "
	      "JOIN geometry_columns AS c ON (Lower(v.f_table_name) = "
	      "Lower(c.f_table_name) AND Lower(v.f_geometry_column) = "
	      "Lower(c.f_geometry_column)) "
	      "WHERE Lower(v.coverage_name) = Lower(?)";












      }
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("updateVectorCoverageExtent: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  goto error;
................................................................................
	  if (ret != SQLITE_OK)
	      goto error;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (coverage_name != NULL)

	sqlite3_bind_text (stmt, 1, coverage_name, strlen (coverage_name),
			   SQLITE_STATIC);



    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
................................................................................
			  break;	/* end of result set */
		      if (ret == SQLITE_ROW)
			{
			    int null_minx = 1;
			    int null_miny = 1;
			    int null_maxx = 1;
			    int null_maxy = 1;
			    double minx;
			    double miny;
			    double maxx;
			    double maxy;
			    if (sqlite3_column_type (stmt_ext, 0) ==
				SQLITE_FLOAT)
			      {
				  minx = sqlite3_column_double (stmt_ext, 0);
				  null_minx = 0;
			      }
			    if (sqlite3_column_type (stmt_ext, 1) ==
................................................................................
	    {
		spatialite_e ("updateVectorCoverageExtent() error: \"%s\"\n",
			      sqlite3_errmsg (sqlite));
		goto error;
	    }
      }




































































    if (transaction)
      {
	  /* committing the still pending Transaction */
	  ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	      goto error;
      }

    sqlite3_finalize (stmt);
    sqlite3_finalize (stmt_upd_cvg);
    sqlite3_finalize (stmt_upd_srid);
    sqlite3_finalize (stmt_null_srid);
    sqlite3_finalize (stmt_srid);

    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_ext != NULL)
	sqlite3_finalize (stmt_ext);
................................................................................
	sqlite3_finalize (stmt_upd_cvg);
    if (stmt_upd_srid != NULL)
	sqlite3_finalize (stmt_upd_srid);
    if (stmt_null_srid != NULL)
	sqlite3_finalize (stmt_null_srid);
    if (stmt_srid != NULL)
	sqlite3_finalize (stmt_srid);



    return 0;
}

static int
check_raster_coverage_srid2 (sqlite3 * sqlite, const char *coverage_name,
			     int srid)
{
................................................................................
{
/* auxiliary function: deleting all Raster Coverage alternative SRIDs */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;

    sql = "DELETE FROM raster_coverages_srid "
	"WHERE coverage_name = ? AND srid = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unregisterRasterCoverageSrid: \"%s\"\n",
			sqlite3_errmsg (sqlite));
	  return;
      }
................................................................................
    if (!check_raster_coverage_srid2 (sqlite, coverage_name, srid))
	return 0;
    /* deleting the alternative SRID */
    do_delete_raster_coverage_srid (sqlite, coverage_name, srid);
    return 1;
}






































































































































































































































static int
do_null_raster_coverage_extents (sqlite3 * sqlite, sqlite3_stmt * stmt_upd_cvg,
				 sqlite3_stmt * stmt_null_srid,
				 const char *coverage_name)
{
/* setting the main Coverage Extent to NULL */
    int ret;
................................................................................
			  break;	/* end of result set */
		      if (ret == SQLITE_ROW)
			{
			    int null_minx = 1;
			    int null_miny = 1;
			    int null_maxx = 1;
			    int null_maxy = 1;
			    double minx;
			    double miny;
			    double maxx;
			    double maxy;
			    if (sqlite3_column_type (stmt_ext, 0) ==
				SQLITE_FLOAT)
			      {
				  minx = sqlite3_column_double (stmt_ext, 0);
				  null_minx = 0;
			      }
			    if (sqlite3_column_type (stmt_ext, 1) ==
................................................................................

SPATIALITE_PRIVATE int
get_iso_metadata_id (void *p_sqlite, const char *fileIdentifier, void *p_id)
{
/* auxiliary function: return the ID of the row corresponding to "fileIdentifier" */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    sqlite3_int64 *p64 = (sqlite3_int64 *) p_id;
    sqlite3_int64 id;
    int ret;
    const char *sql;
    sqlite3_stmt *stmt;
    int ok = 0;

    sql = "SELECT id FROM ISO_metadata WHERE fileId = ?";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
................................................................................
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (exists)
      {
	  /* update */
	  sqlite3_bind_text (stmt, 1, scope, strlen (scope), SQLITE_STATIC);
	  sqlite3_bind_blob (stmt, 2, p_blob, n_bytes, SQLITE_STATIC);
	  sqlite3_bind_int (stmt, 3, id);
      }
    else
      {
	  /* insert */
	  if (id < 0)
	      sqlite3_bind_null (stmt, 1);
	  else
................................................................................
    sqlite3_finalize (stmt);
    return retval;
  stop:
    return 0;
}

#endif /* end including LIBXML2 */
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/spatialite/spatialite.c.

more than 10,000 changes

Changes to src/spatialite/spatialite_init.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
...
110
111
112
113
114
115
116
117
118
119
120




121
122
123
124
125
126
127
...
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/*

 spatialite_init.c -- SQLite3 spatial extension

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
(implementing Android support)

Alternatively, the contents of this file may be used under the terms of
................................................................................
#include <spatialite/sqlite.h>

#include <spatialite/spatialite.h>
#include <spatialite.h>
#include <spatialite_private.h>

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

#ifndef LOADABLE_EXTENSION	/* ordinary library, not loadable-extension */

static int
init_spatialite_extension (sqlite3 * db, char **pzErrMsg, const void *pApi)
................................................................................
   OBSOLETE - strongly discouraged !!!!!
   always using spatialite_init_ex() as a replacement
   is warmly reccomended
*/
    spatialite_initialize ();

#ifndef OMIT_GEOS		/* initializing GEOS */
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    initGEOS (geos_warning, geos_error);
#endif
#endif /* end GEOS  */





    sqlite3_auto_extension ((void (*)(void)) init_spatialite_extension);
    spatialite_splash_screen (verbose);
}

SPATIALITE_DECLARE void
spatialite_cleanup ()
................................................................................
{
/* OBSOLETE - strongly discouraged !!!!!
   always using spatialite_cleanup_ex() as a replacement
   is warmly reccomended
*/

#ifndef OMIT_GEOS
#ifndef GEOS_USE_ONLY_R_API	/* obsolete versions non fully thread-safe */
    finishGEOS ();
#endif
#endif

#ifdef ENABLE_LWGEOM
    gaiaResetLwGeomMsg ();
#endif

    sqlite3_reset_auto_extension ();
}
#endif




|







 







|







 







<
<
<
<
<







 







<

<

>
>
>
>







 







<

<









1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
68
69
70
71
72
73
74





75
76
77
78
79
80
81
...
105
106
107
108
109
110
111

112

113
114
115
116
117
118
119
120
121
122
123
124
...
125
126
127
128
129
130
131

132

133
134
135
136
137
138
139
140
141
/*

 spatialite_init.c -- SQLite3 spatial extension

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
(implementing Android support)

Alternatively, the contents of this file may be used under the terms of
................................................................................
#include <spatialite/sqlite.h>

#include <spatialite/spatialite.h>
#include <spatialite.h>
#include <spatialite_private.h>

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif

#ifndef LOADABLE_EXTENSION	/* ordinary library, not loadable-extension */

static int
init_spatialite_extension (sqlite3 * db, char **pzErrMsg, const void *pApi)
................................................................................
   OBSOLETE - strongly discouraged !!!!!
   always using spatialite_init_ex() as a replacement
   is warmly reccomended
*/
    spatialite_initialize ();

#ifndef OMIT_GEOS		/* initializing GEOS */

    initGEOS (geos_warning, geos_error);

#endif /* end GEOS  */

#ifdef POSTGIS_2_1		/* initializing liblwgeom from PostGIS 2.1.x (or later) */
    splite_lwgeom_init ();
#endif /* end POSTGIS_2_1 */

    sqlite3_auto_extension ((void (*)(void)) init_spatialite_extension);
    spatialite_splash_screen (verbose);
}

SPATIALITE_DECLARE void
spatialite_cleanup ()
................................................................................
{
/* OBSOLETE - strongly discouraged !!!!!
   always using spatialite_cleanup_ex() as a replacement
   is warmly reccomended
*/

#ifndef OMIT_GEOS

    finishGEOS ();

#endif

#ifdef ENABLE_LWGEOM
    gaiaResetLwGeomMsg ();
#endif

    sqlite3_reset_auto_extension ();
}
#endif

Changes to src/spatialite/srid_aux.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
....
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
....
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
/*

 srid_aux.c -- SRID auxiliary functions

 version 4.3.0, 2014 December 4

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2014-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
(implementing XML support - ISO Metadata and SLD/SE Styles) 

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite.h>
#include <spatialite_private.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

static int
parse_proj4 (const char *proj4, const char *key, char **value)
................................................................................
/* 
/ checks a SRID definition from the "spatial_ref_sys" table
/  then returning the corresponding Axis name or orientation
*/
    char *result = NULL;
    int ret;
    sqlite3_stmt *stmt = NULL;
    const char *sql = "";

    if ((axis == SPLITE_AXIS_1 || axis == SPLITE_AXIS_2)
	&& (mode == SPLITE_AXIS_NAME || mode == SPLITE_AXIS_ORIENTATION))
	;
    else
	return NULL;

................................................................................
	  sqlite3_finalize (stmt);
	  stmt = NULL;
	  if (result != NULL)
	      return result;
      }
    return NULL;
}

static void
getProjParamsFromSpatialReferenceSystemTable (sqlite3 * sqlite, int srid,
					      char **proj_params)
{
/* retrives the PROJ params from SPATIAL_SYS_REF table, if possible */
    char *sql;
    char **results;
    int rows;
    int columns;
    int i;
    int ret;
    int len;
    const char *proj4text;
    char *errMsg = NULL;
    *proj_params = NULL;
    sql =
	sqlite3_mprintf
	("SELECT proj4text FROM spatial_ref_sys WHERE srid = %d", srid);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unknown SRID: %d\t<%s>\n", srid, errMsg);
	  sqlite3_free (errMsg);
	  return;
      }
    for (i = 1; i <= rows; i++)
      {
	  proj4text = results[(i * columns)];
	  if (proj4text != NULL)
	    {
		len = strlen (proj4text);
		*proj_params = malloc (len + 1);
		strcpy (*proj_params, proj4text);
	    }
      }
    if (*proj_params == NULL)
      {
	  spatialite_e ("unknown SRID: %d\n", srid);
      }
    sqlite3_free_table (results);
}

static int
coordinates_system_matches (struct epsg_defs *iter, const char *organization,
			    const int organization_coordsys_id)
{
    if (organization == NULL)
      {
	  /* we didn't have a good lookup on the target database, so use best-efforts lookup */
	  return ((iter->srid == organization_coordsys_id)
		  && (iter->proj4text != NULL));
      }
    else
      {
	  return ((strcasecmp (iter->auth_name, organization) == 0)
		  && (iter->auth_srid == organization_coordsys_id)
		  && (iter->proj4text != NULL));
      }
}

static void
getProjParamsFromGeopackageTable (sqlite3 * sqlite, int srid,
				  char **proj_params)
{
    char *sql;
    char **results;
    int rows;
    int columns;
    int ret;
    int len;
    char *errMsg = NULL;
    struct epsg_defs *first = NULL;
    struct epsg_defs *last = NULL;
    struct epsg_defs *iter = NULL;
    const char *organization = NULL;
    int organization_coordsys_id = -1;

    *proj_params = NULL;

    sql =
	sqlite3_mprintf
	("SELECT organization, organization_coordsys_id FROM gpkg_spatial_ref_sys WHERE srs_id = %d",
	 srid);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("unknown SRID: %d\t<%s>\n", srid, errMsg);
	  sqlite3_free (errMsg);
	  return;
      }
    if (rows == 0)
      {
	  printf
	      ("unknown SRID: %d\t(not in local database, ignoring authority and using best efforts...)\n",
	       srid);
	  organization_coordsys_id = srid;
      }
    else if (rows == 1)
      {
	  /* there are 'columns' entries in the header row (result indexes 0 to columns - 1), and our data is the next row */
	  organization = results[columns];
	  errno = 0;
	  organization_coordsys_id = strtol (results[columns + 1], NULL, 10);
	  if ((errno != 0) || (organization_coordsys_id == 0))
	    {
		spatialite_e ("Invalid organization_coordsys_id format: %s\n",
			      results[columns + 1]);
		sqlite3_free_table (results);
		return;
	    }
      }
    else if (rows > 1)
      {
	  spatialite_e
	      ("invalid or corrupt gpkg_spatial_ref_sys table - duplicate entries for : %d\n",
	       srid);
	  sqlite3_free_table (results);
	  return;
      }

    if (organization == NULL)
      {
	  /* best-effort mode */
	  initialize_epsg (srid, &first, &last);
      }
    else
      {
	  initialize_epsg (GAIA_EPSG_ANY, &first, &last);
      }
    iter = first;
    while (iter)
      {
	  if (coordinates_system_matches
	      (iter, organization, organization_coordsys_id))
	    {
		len = strlen (iter->proj4text);
		*proj_params = malloc (len + 1);
		strcpy (*proj_params, iter->proj4text);
		free_epsg (first);
		sqlite3_free_table (results);
		return;
	    }
	  iter = iter->next;
      }
    /* if we get here, we didn't find a match */
    free_epsg (first);
    sqlite3_free_table (results);
    spatialite_e ("unknown SRID: %d\n", srid);
}

SPATIALITE_PRIVATE void
getProjParams (void *p_sqlite, int srid, char **proj_params)
{
/* retrives the PROJ params from SPATIAL_SYS_REF table */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    *proj_params = NULL;

/* searching within "vanilla" spatial_reference_sys */
    getProjParamsFromSpatialReferenceSystemTable (sqlite, srid, proj_params);
    if (*proj_params != NULL)
	return;

/* last opportunity: search within GPKG srs */
    getProjParamsFromGeopackageTable (sqlite, srid, proj_params);
}




|







 







|







 







<










<







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68

69
70
71
72
73
74
75
....
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
....
1728
1729
1730
1731
1732
1733
1734








































































































































































/*

 srid_aux.c -- SRID auxiliary functions

 version 4.2.1, 2014 December 4

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2014
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
(implementing XML support - ISO Metadata and SLD/SE Styles) 

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>


#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite.h>


#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

static int
parse_proj4 (const char *proj4, const char *key, char **value)
................................................................................
/* 
/ checks a SRID definition from the "spatial_ref_sys" table
/  then returning the corresponding Axis name or orientation
*/
    char *result = NULL;
    int ret;
    sqlite3_stmt *stmt = NULL;
    const char *sql;

    if ((axis == SPLITE_AXIS_1 || axis == SPLITE_AXIS_2)
	&& (mode == SPLITE_AXIS_NAME || mode == SPLITE_AXIS_ORIENTATION))
	;
    else
	return NULL;

................................................................................
	  sqlite3_finalize (stmt);
	  stmt = NULL;
	  if (result != NULL)
	      return result;
      }
    return NULL;
}








































































































































































Changes to src/spatialite/statistics.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
69
70
71
72
73
74
75








76
77
78
79
80
81
82
....
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
....
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
....
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
....
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
....
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
....
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
/*

 statistics.c -- helper functions updating internal statistics

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
(implementing Android support)

Alternatively, the contents of this file may be used under the terms of
................................................................................
#include <spatialite/sqlite.h>
#include <spatialite/debug.h>

#include <spatialite/gaiageo.h>
#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gaiaaux.h>









#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

struct field_item_infos
{
................................................................................
    int ok_virts_geometry_columns_statistics;
    int ok_layer_statistics;
    int ok_views_layer_statistics;
    int ok_virts_layer_statistics;
    int ok_layer_params;
    int ok_layer_sub_classes;
    int ok_layer_table_layout;
    char *error_message;
};

static int
do_drop_table (sqlite3 * sqlite, const char *prefix, const char *table,
	       struct drop_params *aux)
{
/* performing the actual work */
    char *sql;
    char *q_prefix;
    char *q_name;
    int i;
    int ret;
    char *errMsg = NULL;

    if (aux->is_view)
      {
	  /* dropping a View */
	  q_name = gaiaDoubleQuotedSql (table);
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DROP VIEW IF EXISTS \"%s\".\"%s\"", q_prefix,
			       q_name);
	  free (q_prefix);
	  free (q_name);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    else
      {
	  /* dropping a Table */
	  q_name = gaiaDoubleQuotedSql (table);
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\".\"%s\"", q_prefix,
			       q_name);
	  free (q_prefix);
	  free (q_name);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }

    for (i = 0; i < aux->n_rtrees; i++)
      {
	  /* dropping any R*Tree */
	  q_name = gaiaDoubleQuotedSql (*(aux->rtrees + i));
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\".\"%s\"", q_prefix,
			       q_name);
	  free (q_prefix);
	  free (q_name);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }

    if (aux->ok_layer_params)
      {
	  /* deleting from LAYER_PARAMS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_params "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_layer_sub_classes)
      {
	  /* deleting from LAYER_SUB_CLASSES */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_sub_classes "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_layer_table_layout)
      {
	  /* deleting from LAYER_TABLE_LAYOUT */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_table_layout "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_geometry_columns_auth)
      {
	  /* deleting from GEOMETRY_COLUMNS_AUTH */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".geometry_columns_auth "
				 "WHERE lower(f_table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_geometry_columns_field_infos)
      {
	  /* deleting from GEOMETRY_COLUMNS_FIELD_INFOS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".geometry_columns_field_infos "
	       "WHERE lower(f_table_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_geometry_columns_statistics)
      {
	  /* deleting from GEOMETRY_COLUMNS_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DELETE FROM \"%s\".geometry_columns_statistics "
			       "WHERE lower(f_table_name) = lower(%Q)",
			       q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_views_geometry_columns_auth)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS_AUTH */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DELETE FROM \"%s\".views_geometry_columns_auth "
			       "WHERE lower(view_name) = lower(%Q)", q_prefix,
			       table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_views_geometry_columns_field_infos)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS_FIELD_INFOS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".views_geometry_columns_field_infos "
	       "WHERE view_name = %Q", q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_views_geometry_columns_statistics)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".views_geometry_columns_statistics "
	       "WHERE lower(view_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_virts_geometry_columns_auth)
      {
	  /* deleting from VIRTS_GEOMETRY_COLUMNS_AUTH */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DELETE FROM \"%s\".virts_geometry_columns_auth "
			       "WHERE lower(virt_name) = lower(%Q)", q_prefix,
			       table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_virts_geometry_columns_field_infos)
      {
	  /* deleting from VIRTS_GEOMETRY_COLUMNS_FIELD_INFOS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".virts_geometry_columns_field_infos "
	       "WHERE lower(virt_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_virts_geometry_columns_statistics)
      {
	  /* deleting from VIRTS_GEOMETRY_COLUMNS_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".virts_geometry_columns_statistics "
	       "WHERE lower(virt_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_layer_statistics)
      {
	  /* deleting from LAYER_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_statistics "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_views_layer_statistics)
      {
	  /* deleting from VIEWS_LAYER_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".views_layer_statistics "
				 "WHERE lower(view_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_virts_layer_statistics)
      {
	  /* deleting from VIRTS_LAYER_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".virts_layer_statistics "
				 "WHERE lower(virt_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_geometry_columns)
      {
	  /* deleting from GEOMETRY_COLUMNS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".geometry_columns "
				 "WHERE lower(f_table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_views_geometry_columns)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".views_geometry_columns "
				 "WHERE lower(view_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }
    if (aux->ok_virts_geometry_columns)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".virts_geometry_columns "
				 "WHERE lower(virt_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		aux->error_message = errMsg;
		return 0;
	    }
      }

    return 1;
}

static int
do_drop_sub_view (sqlite3 * sqlite, const char *prefix, const char *table,
................................................................................
    char **results;
    int rows;
    int columns;
    char jolly = '%';
    int ret;
    char *sql;
    char *q_prefix = gaiaDoubleQuotedSql (prefix);

    if (strcasecmp (prefix, "TEMP") == 0)
      {
	  /* TEMPORARY object; unconditioanally returning TRUE */
	  return 1;
      }
    sql =
	sqlite3_mprintf
	("SELECT type, name FROM \"%s\".sqlite_master WHERE type = 'table' or type = 'view'",
	 q_prefix);
    free (q_prefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
................................................................................
	return 0;

/* identifying any possible R*Tree supporting the main target */
    q_prefix = gaiaDoubleQuotedSql (prefix);
    sql =
	sqlite3_mprintf
	("SELECT name FROM \"%s\".sqlite_master WHERE type = 'table' AND "
	 "Lower(name) IN (SELECT "
	 "Lower('idx_' || f_table_name || '_' || f_geometry_column) "
	 "FROM geometry_columns WHERE Lower(f_table_name) = Lower(%Q)) "
	 "AND sql LIKE('%cvirtual%c') AND sql LIKE('%crtree%c')",
	 q_prefix, table, jolly, jolly, jolly, jolly);
    free (q_prefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
................................................................................
		strcpy (*(aux->rtrees + (i - 1)), name);
	    }
      }
    sqlite3_free_table (results);
    return 1;
}

static int
check_topology_table (sqlite3 * sqlite, const char *prefix, const char *table)
{
/* avoiding to Drop GeoTables belonging to some TopoGeo or TopoNet */
    char *xprefix;
    char *sql;
    char *table_name;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int found = 0;

    if (prefix == NULL)
	prefix = "main";

/* testing within Topologies */
    xprefix = gaiaDoubleQuotedSql (prefix);
    sql =
	sqlite3_mprintf ("SELECT topology_name FROM \"%s\".topologies",
			 xprefix);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto networks;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		const char *name = results[(i * columns) + 0];
		table_name = sqlite3_mprintf ("%s_node", name);
		if (strcasecmp (table, table_name) == 0)
		    found = 1;
		sqlite3_free (table_name);
		table_name = sqlite3_mprintf ("%s_edge", name);
		if (strcasecmp (table, table_name) == 0)
		    found = 1;
		sqlite3_free (table_name);
	    }
      }
    sqlite3_free_table (results);
    if (found)
      {
	  spatialite_e ("DropTable: can't drop TopoGeo table \"%s\".\"%s\"",
			prefix, table);
	  return 1;
      }

  networks:
/* testing within Networks */
    xprefix = gaiaDoubleQuotedSql (prefix);
    sql = sqlite3_mprintf ("SELECT network_name FROM \"%s\".netowrks", xprefix);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto end;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		const char *name = results[(i * columns) + 0];
		table_name = sqlite3_mprintf ("%s_node", name);
		if (strcasecmp (table, table_name) == 0)
		    found = 1;
		sqlite3_free (table_name);
		table_name = sqlite3_mprintf ("%s_link", name);
		if (strcasecmp (table, table_name) == 0)
		    found = 1;
		sqlite3_free (table_name);
	    }
      }
    sqlite3_free_table (results);
    if (found)
      {
	  spatialite_e ("DropTable: can't drop TopoNet table \"%s\".\"%s\"",
			prefix, table);
	  return 1;
      }

  end:
    return 0;
}

SPATIALITE_DECLARE int
gaiaDropTable (sqlite3 * sqlite, const char *table)
{
    return gaiaDropTableEx (sqlite, "main", table);
}

SPATIALITE_DECLARE int
gaiaDropTableEx (sqlite3 * sqlite, const char *prefix, const char *table)
{
    return gaiaDropTableEx2 (sqlite, prefix, table, 1);
}

SPATIALITE_DECLARE int
gaiaDropTableEx2 (sqlite3 * sqlite, const char *prefix, const char *table,
		  int transaction)
{
    return gaiaDropTableEx3 (sqlite, prefix, table, transaction, NULL);
}

SPATIALITE_DECLARE int
gaiaDropTableEx3 (sqlite3 * sqlite, const char *prefix, const char *table,
		  int transaction, char **error_message)
{
/* dropping a Spatial Table and any other related stuff */
    int ret;
    struct drop_params aux;

/* initializing the aux params */
    aux.rtrees = NULL;
    aux.n_rtrees = 0;
................................................................................
    aux.ok_virts_geometry_columns_statistics = 0;
    aux.ok_layer_statistics = 0;
    aux.ok_views_layer_statistics = 0;
    aux.ok_virts_layer_statistics = 0;
    aux.ok_layer_params = 0;
    aux.ok_layer_sub_classes = 0;
    aux.ok_layer_table_layout = 0;
    aux.error_message = NULL;

    if (error_message != NULL)
	*error_message = NULL;
    if (prefix == NULL)
	return 0;
    if (table == NULL)
	return 0;

    if (transaction)
      {
	  /* the whole operation is a single transaction */
	  ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	      return 0;
      }

/* checking the actual DB configuration */
    if (!check_drop_layout (sqlite, prefix, table, &aux))
	goto rollback;
/* avoiding to drop TopoGeo and TopoNet tables */
    if (check_topology_table (sqlite, prefix, table))
	goto rollback;
/* recursively dropping any depending View */
    if (!do_drop_sub_view (sqlite, prefix, table, &aux))
	goto rollback;
    if (!do_drop_table (sqlite, prefix, table, &aux))
	goto rollback;

    if (transaction)
      {
	  /* committing the still pending transaction */
	  ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);
	  if (ret != SQLITE_OK)
	      goto rollback;
      }

    if (aux.rtrees)
      {
	  /* memory cleanup - rtrees */
	  int i;
	  for (i = 0; i < aux.n_rtrees; i++)
	    {
		if (*(aux.rtrees + i) != NULL)
................................................................................
	    }
	  free (aux.rtrees);
      }
    return 1;

  rollback:

    if (transaction)
      {
	  /* invalidating the still pending transaction */
	  sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, NULL);
      }

    if (aux.rtrees)
      {
	  /* memory cleanup - rtrees */
	  int i;
	  for (i = 0; i < aux.n_rtrees; i++)
	    {
		if (*(aux.rtrees + i) != NULL)
		    free (*(aux.rtrees + i));
	    }
	  free (aux.rtrees);
      }
    if (aux.error_message != NULL)
      {
	  if (error_message != NULL)
	      *error_message = aux.error_message;
	  else
	    {
		spatialite_e ("DropTable error: %s\r", aux.error_message);
		sqlite3_free (aux.error_message);
	    }
      }
    return 0;
}




|







 







|







 







>
>
>
>
>
>
>
>







 







<











<
<











|

<
<
<
<
<











|

<
<
<
<
<












|

<
<
<
<
<










|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<







|


|

<
<
<
<
<










|

<
<
<
<
<










|

<
<
<
<
<







|


|

<
<
<
<
<










|

<
<
<
<
<










|

<
<
<
<
<







|


|

<
<
<
<
<










|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<









|

<
<
<
<
<







 







<
<
<
<
<
<







 







<
|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<




<
<
<
|
|
|
|
<
<



<
<
<





<
<
<
|
|
|
|
<
<







 







<
<
|
|
<
<










<
<
<
<
<
<
<
<
<
<



1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
....
1711
1712
1713
1714
1715
1716
1717

1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728


1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741





1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754





1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768





1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780





1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791





1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802





1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813





1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825





1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837





1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849





1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861





1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873





1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885





1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897





1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909





1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920





1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931





1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942





1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953





1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964





1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975





1976
1977
1978
1979
1980
1981
1982
....
2059
2060
2061
2062
2063
2064
2065






2066
2067
2068
2069
2070
2071
2072
....
2141
2142
2143
2144
2145
2146
2147

2148
2149
2150
2151
2152
2153
2154
2155
....
2169
2170
2171
2172
2173
2174
2175


























































































2176
2177
2178
2179
2180
2181
2182
2183
2184














2185
2186
2187
2188
2189
2190
2191
....
2204
2205
2206
2207
2208
2209
2210




2211
2212
2213
2214



2215
2216
2217
2218


2219
2220
2221



2222
2223
2224
2225
2226



2227
2228
2229
2230


2231
2232
2233
2234
2235
2236
2237
....
2239
2240
2241
2242
2243
2244
2245


2246
2247


2248
2249
2250
2251
2252
2253
2254
2255
2256
2257










2258
2259
2260
/*

 statistics.c -- helper functions updating internal statistics

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
(implementing Android support)

Alternatively, the contents of this file may be used under the terms of
................................................................................
#include <spatialite/sqlite.h>
#include <spatialite/debug.h>

#include <spatialite/gaiageo.h>
#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gaiaaux.h>

#ifndef OMIT_GEOS		/* including GEOS */
#include <geos_c.h>
#endif

#ifndef OMIT_PROJ		/* including PROJ.4 */
#include <proj_api.h>
#endif

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

struct field_item_infos
{
................................................................................
    int ok_virts_geometry_columns_statistics;
    int ok_layer_statistics;
    int ok_views_layer_statistics;
    int ok_virts_layer_statistics;
    int ok_layer_params;
    int ok_layer_sub_classes;
    int ok_layer_table_layout;

};

static int
do_drop_table (sqlite3 * sqlite, const char *prefix, const char *table,
	       struct drop_params *aux)
{
/* performing the actual work */
    char *sql;
    char *q_prefix;
    char *q_name;
    int i;



    if (aux->is_view)
      {
	  /* dropping a View */
	  q_name = gaiaDoubleQuotedSql (table);
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DROP VIEW IF EXISTS \"%s\".\"%s\"", q_prefix,
			       q_name);
	  free (q_prefix);
	  free (q_name);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    else
      {
	  /* dropping a Table */
	  q_name = gaiaDoubleQuotedSql (table);
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\".\"%s\"", q_prefix,
			       q_name);
	  free (q_prefix);
	  free (q_name);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }

    for (i = 0; i < aux->n_rtrees; i++)
      {
	  /* dropping any R*Tree */
	  q_name = gaiaDoubleQuotedSql (*(aux->rtrees + i));
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\".\"%s\"", q_prefix,
			       q_name);
	  free (q_prefix);
	  free (q_name);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }

    if (aux->ok_layer_params)
      {
	  /* deleting from LAYER_PARAMS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_params "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_layer_sub_classes)
      {
	  /* deleting from LAYER_SUB_CLASSES */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_sub_classes "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_layer_table_layout)
      {
	  /* deleting from LAYER_TABLE_LAYOUT */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_table_layout "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_geometry_columns_auth)
      {
	  /* deleting from GEOMETRY_COLUMNS_AUTH */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".geometry_columns_auth "
				 "WHERE lower(f_table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_geometry_columns_field_infos)
      {
	  /* deleting from GEOMETRY_COLUMNS_FIELD_INFOS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".geometry_columns_fiels_infos "
	       "WHERE lower(f_table_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_geometry_columns_statistics)
      {
	  /* deleting from GEOMETRY_COLUMNS_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DELETE FROM \"%s\".geometry_columns_statistics "
			       "WHERE lower(f_table_name) = lower(%Q)",
			       q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_views_geometry_columns_auth)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS_AUTH */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DELETE FROM \"%s\".views_geometry_columns_auth "
			       "WHERE lower(view_name) = lower(%Q)", q_prefix,
			       table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_views_geometry_columns_field_infos)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS_FIELD_INFOS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".views_geometry_columns_fiels_infos "
	       "WHERE view_name = %Q", q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_views_geometry_columns_statistics)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".views_geometry_columns_statistics "
	       "WHERE lower(view_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_virts_geometry_columns_auth)
      {
	  /* deleting from VIRTS_GEOMETRY_COLUMNS_AUTH */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf ("DELETE FROM \"%s\".virts_geometry_columns_auth "
			       "WHERE lower(virt_name) = lower(%Q)", q_prefix,
			       table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_virts_geometry_columns_field_infos)
      {
	  /* deleting from VIRTS_GEOMETRY_COLUMNS_FIELD_INFOS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".virts_geometry_columns_fiels_infos "
	       "WHERE lower(virt_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_virts_geometry_columns_statistics)
      {
	  /* deleting from VIRTS_GEOMETRY_COLUMNS_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql =
	      sqlite3_mprintf
	      ("DELETE FROM \"%s\".virts_geometry_columns_statistics "
	       "WHERE lower(virt_name) = lower(%Q)", q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_layer_statistics)
      {
	  /* deleting from LAYER_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".layer_statistics "
				 "WHERE lower(table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_views_layer_statistics)
      {
	  /* deleting from VIEWS_LAYER_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".views_layer_statistics "
				 "WHERE lower(view_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_virts_layer_statistics)
      {
	  /* deleting from VIRTS_LAYER_STATISTICS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".virts_layer_statistics "
				 "WHERE lower(virt_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_geometry_columns)
      {
	  /* deleting from GEOMETRY_COLUMNS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".geometry_columns "
				 "WHERE lower(f_table_name) = lower(%Q)",
				 q_prefix, table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_views_geometry_columns)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".views_geometry_columns "
				 "WHERE lower(view_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }
    if (aux->ok_virts_geometry_columns)
      {
	  /* deleting from VIEWS_GEOMETRY_COLUMNS */
	  q_prefix = gaiaDoubleQuotedSql (prefix);
	  sql = sqlite3_mprintf ("DELETE FROM \"%s\".virts_geometry_columns "
				 "WHERE lower(virt_name) = lower(%Q)", q_prefix,
				 table);
	  free (q_prefix);
	  sqlite3_exec (sqlite, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);





      }

    return 1;
}

static int
do_drop_sub_view (sqlite3 * sqlite, const char *prefix, const char *table,
................................................................................
    char **results;
    int rows;
    int columns;
    char jolly = '%';
    int ret;
    char *sql;
    char *q_prefix = gaiaDoubleQuotedSql (prefix);






    sql =
	sqlite3_mprintf
	("SELECT type, name FROM \"%s\".sqlite_master WHERE type = 'table' or type = 'view'",
	 q_prefix);
    free (q_prefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
................................................................................
	return 0;

/* identifying any possible R*Tree supporting the main target */
    q_prefix = gaiaDoubleQuotedSql (prefix);
    sql =
	sqlite3_mprintf
	("SELECT name FROM \"%s\".sqlite_master WHERE type = 'table' AND "

	 "name IN (SELECT 'idx_' || f_table_name || '_' || f_geometry_column "
	 "FROM geometry_columns WHERE Lower(f_table_name) = Lower(%Q)) "
	 "AND sql LIKE('%cvirtual%c') AND sql LIKE('%crtree%c')",
	 q_prefix, table, jolly, jolly, jolly, jolly);
    free (q_prefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
................................................................................
		strcpy (*(aux->rtrees + (i - 1)), name);
	    }
      }
    sqlite3_free_table (results);
    return 1;
}



























































































SPATIALITE_DECLARE int
gaiaDropTable (sqlite3 * sqlite, const char *table)
{
    return gaiaDropTableEx (sqlite, "main", table);
}

SPATIALITE_DECLARE int
gaiaDropTableEx (sqlite3 * sqlite, const char *prefix, const char *table)
{














/* dropping a Spatial Table and any other related stuff */
    int ret;
    struct drop_params aux;

/* initializing the aux params */
    aux.rtrees = NULL;
    aux.n_rtrees = 0;
................................................................................
    aux.ok_virts_geometry_columns_statistics = 0;
    aux.ok_layer_statistics = 0;
    aux.ok_views_layer_statistics = 0;
    aux.ok_virts_layer_statistics = 0;
    aux.ok_layer_params = 0;
    aux.ok_layer_sub_classes = 0;
    aux.ok_layer_table_layout = 0;




    if (prefix == NULL)
	return 0;
    if (table == NULL)
	return 0;



/* the whole operation is a single transaction */
    ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, NULL);
    if (ret != SQLITE_OK)
	return 0;


/* checking the actual DB configuration */
    if (!check_drop_layout (sqlite, prefix, table, &aux))
	goto rollback;



/* recursively dropping any depending View */
    if (!do_drop_sub_view (sqlite, prefix, table, &aux))
	goto rollback;
    if (!do_drop_table (sqlite, prefix, table, &aux))
	goto rollback;



/* committing the still pending transaction */
    ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, NULL);
    if (ret != SQLITE_OK)
	goto rollback;


    if (aux.rtrees)
      {
	  /* memory cleanup - rtrees */
	  int i;
	  for (i = 0; i < aux.n_rtrees; i++)
	    {
		if (*(aux.rtrees + i) != NULL)
................................................................................
	    }
	  free (aux.rtrees);
      }
    return 1;

  rollback:



/* invalidating the still pending transaction */
    sqlite3_exec (sqlite, "ROLLBACK", NULL, NULL, NULL);


    if (aux.rtrees)
      {
	  /* memory cleanup - rtrees */
	  int i;
	  for (i = 0; i < aux.n_rtrees; i++)
	    {
		if (*(aux.rtrees + i) != NULL)
		    free (*(aux.rtrees + i));
	    }
	  free (aux.rtrees);










      }
    return 0;
}

Changes to src/spatialite/table_cloner.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
....
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
....
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
....
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
....
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
....
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
/*

 table_cloner.c -- Cloning a Table

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................

#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gaiaaux.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#define strncasecmp	_strnicmp
#endif /* not WIN32 */

struct aux_geometry
{
/* a Geometry column object */
    int type;
    int dims;
................................................................................
    int pk_count;
    int autoincrement;
    int resequence;
    int with_fks;
    int with_triggers;
    int append;
    int already_existing;
    int create_only;
};

static int
create_column (sqlite3 * sqlite, const char *table, struct aux_column *column)
{
/* creating a further ordinary Column */
    char *sql;
................................................................................
      {
	  for (i = 1; i <= rows; i++)
	    {
		id = atoi (results[(i * columns) + 0]);
		references = results[(i * columns) + 2];
		from = results[(i * columns) + 3];
		to = results[(i * columns) + 4];
		if (to == NULL)
		    to = from;
		on_update = results[(i * columns) + 5];
		on_delete = results[(i * columns) + 6];
		match = results[(i * columns) + 7];
		if (strcasecmp (on_update, "NO ACTION") == 0)
		    on_update = NULL;
		if (strcasecmp (on_delete, "NO ACTION") == 0)
		    on_delete = NULL;
................................................................................
      }
    sqlite3_free_table (results);
  stop:
    return count;
}

SPATIALITE_PRIVATE const void *
gaiaAuxClonerCreateEx (const void *sqlite, const char *db_prefix,
		       const char *in_table, const char *out_table,
		       int create_only)
{
/* creating a Cloner object */
    int len;
    struct aux_cloner *cloner;
    if (checkSpatialMetaData ((sqlite3 *) sqlite) < 3)
      {
	  spatialite_e ("CloneTable: obsolete DB-layout (< 4.0.0)\n");
................................................................................
    cloner->sorted_pks = NULL;
    cloner->autoincrement = 0;
    cloner->resequence = 0;
    cloner->with_fks = 0;
    cloner->with_triggers = 0;
    cloner->append = 0;
    cloner->already_existing = 0;
    cloner->create_only = create_only;

/* exploring the input table - Columns */
    if (!check_input_table_columns (cloner))
	goto error;
/* exploring PRIMARY KEY AUTOINCREMENT */
    check_input_table_autoincrement (cloner);
/* exploring the input table - Index definitions */
................................................................................
	cloner->already_existing = 1;
    return cloner;
  error:
    free_cloner (cloner);
    return NULL;
}

SPATIALITE_PRIVATE const void *
gaiaAuxClonerCreate (const void *sqlite, const char *db_prefix,
		     const char *in_table, const char *out_table)
{
/* creating a Cloner object */
    return gaiaAuxClonerCreateEx (sqlite, db_prefix, in_table, out_table, 0);
}

SPATIALITE_PRIVATE void
gaiaAuxClonerDestroy (const void *handle)
{
/* destroying a Cloner object */
    struct aux_cloner *cloner = (struct aux_cloner *) handle;
    if (handle == NULL)
	return;
................................................................................
	    {
		spatialite_e
		    ("CloneTable: unable to create the output table \"%s\"\n",
		     cloner->out_table);
		return 0;
	    }
      }
    if (cloner->create_only == 0)
      {
	  if (!copy_rows (cloner))
	    {
		spatialite_e ("CloneTable: unable to copy Table rows\n");
		return 0;
	    }
      }
    return 1;
}




|







 







|







 







<







 







<







 







<
<







 







|
|
<







 







<







 







<
<
<
<
<
<
<
<







 







<
<
|
|
|
|
<



1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
58
59
60
61
62
63
64

65
66
67
68
69
70
71
...
168
169
170
171
172
173
174

175
176
177
178
179
180
181
....
1747
1748
1749
1750
1751
1752
1753


1754
1755
1756
1757
1758
1759
1760
....
2087
2088
2089
2090
2091
2092
2093
2094
2095

2096
2097
2098
2099
2100
2101
2102
....
2133
2134
2135
2136
2137
2138
2139

2140
2141
2142
2143
2144
2145
2146
....
2156
2157
2158
2159
2160
2161
2162








2163
2164
2165
2166
2167
2168
2169
....
2305
2306
2307
2308
2309
2310
2311


2312
2313
2314
2315

2316
2317
2318
/*

 table_cloner.c -- Cloning a Table

 version 4.2, 2014 August 23

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................

#include <spatialite.h>
#include <spatialite_private.h>
#include <spatialite/gaiaaux.h>

#ifdef _WIN32
#define strcasecmp	_stricmp

#endif /* not WIN32 */

struct aux_geometry
{
/* a Geometry column object */
    int type;
    int dims;
................................................................................
    int pk_count;
    int autoincrement;
    int resequence;
    int with_fks;
    int with_triggers;
    int append;
    int already_existing;

};

static int
create_column (sqlite3 * sqlite, const char *table, struct aux_column *column)
{
/* creating a further ordinary Column */
    char *sql;
................................................................................
      {
	  for (i = 1; i <= rows; i++)
	    {
		id = atoi (results[(i * columns) + 0]);
		references = results[(i * columns) + 2];
		from = results[(i * columns) + 3];
		to = results[(i * columns) + 4];


		on_update = results[(i * columns) + 5];
		on_delete = results[(i * columns) + 6];
		match = results[(i * columns) + 7];
		if (strcasecmp (on_update, "NO ACTION") == 0)
		    on_update = NULL;
		if (strcasecmp (on_delete, "NO ACTION") == 0)
		    on_delete = NULL;
................................................................................
      }
    sqlite3_free_table (results);
  stop:
    return count;
}

SPATIALITE_PRIVATE const void *
gaiaAuxClonerCreate (const void *sqlite, const char *db_prefix,
		     const char *in_table, const char *out_table)

{
/* creating a Cloner object */
    int len;
    struct aux_cloner *cloner;
    if (checkSpatialMetaData ((sqlite3 *) sqlite) < 3)
      {
	  spatialite_e ("CloneTable: obsolete DB-layout (< 4.0.0)\n");
................................................................................
    cloner->sorted_pks = NULL;
    cloner->autoincrement = 0;
    cloner->resequence = 0;
    cloner->with_fks = 0;
    cloner->with_triggers = 0;
    cloner->append = 0;
    cloner->already_existing = 0;


/* exploring the input table - Columns */
    if (!check_input_table_columns (cloner))
	goto error;
/* exploring PRIMARY KEY AUTOINCREMENT */
    check_input_table_autoincrement (cloner);
/* exploring the input table - Index definitions */
................................................................................
	cloner->already_existing = 1;
    return cloner;
  error:
    free_cloner (cloner);
    return NULL;
}









SPATIALITE_PRIVATE void
gaiaAuxClonerDestroy (const void *handle)
{
/* destroying a Cloner object */
    struct aux_cloner *cloner = (struct aux_cloner *) handle;
    if (handle == NULL)
	return;
................................................................................
	    {
		spatialite_e
		    ("CloneTable: unable to create the output table \"%s\"\n",
		     cloner->out_table);
		return 0;
	    }
      }


    if (!copy_rows (cloner))
      {
	  spatialite_e ("CloneTable: unable to copy Table rows\n");
	  return 0;

      }
    return 1;
}

Changes to src/spatialite/virtualXL.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
...
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
...
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
...
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
...
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
...
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
/*

 virtualXLc -- SQLite3 extension [VIRTUAL TABLE accessing .XLS]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
		return SQLITE_ERROR;
	    }
	  sqlite3_free (sql);
	  *ppVTab = (sqlite3_vtab *) p_vt;
	  return SQLITE_OK;
      }
/* selecting the currently active XL Worksheet */
    freexl_select_active_worksheet (handle, (unsigned short) worksheet);
    freexl_worksheet_dimensions (handle, &rows, &columns);
    p_vt->XL_handle = handle;
    p_vt->rows = rows;
    p_vt->columns = columns;
/* preparing the COLUMNs for this VIRTUAL TABLE */
    gaiaOutBufferInitialize (&sql_statement);
    xname = gaiaDoubleQuotedSql (argv[2]);
................................................................................
vXL_eval_constraints (VirtualXLCursorPtr cursor)
{
/* evaluating Filter constraints */
    FreeXL_CellValue cell;
    VirtualXLConstraintPtr pC = cursor->firstConstraint;
    if (pC == NULL)
	return 1;
    cell.value.int_value = 0;
    while (pC)
      {
	  int ok = 0;
	  if (pC->iColumn == 0)
	    {
		/* the PRIMARY KEY column */
		if (pC->valueType == 'I')
................................................................................
		  }
		goto done;
	    }
	  if (cursor->pVtab->XL_handle != NULL
	      && cursor->current_row <= cursor->pVtab->rows
	      && pC->iColumn <= cursor->pVtab->columns)
	      freexl_get_cell_value (cursor->pVtab->XL_handle,
				     (int) cursor->current_row - 1,
				     (unsigned short) pC->iColumn - 1, &cell);
	  else
	      cell.type = FREEXL_CELL_NULL;
	  if (cell.type == FREEXL_CELL_INT)
	    {
		if (pC->valueType == 'I')
		  {
		      switch (pC->op)
................................................................................
		      if (ret < 0)
			  ok = 1;
		      break;
		  case SQLITE_INDEX_CONSTRAINT_GE:
		      if (ret >= 0)
			  ok = 1;
		      break;
#ifdef HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE
		  case SQLITE_INDEX_CONSTRAINT_LIKE:
		      if (ret >= 0)
			  ok = 1;
		      break;
#endif
		  };
	    }
	done:
	  if (!ok)
	      return 0;
	  pC = pC->next;
      }
................................................................................

static int
vXL_column (sqlite3_vtab_cursor * pCursor, sqlite3_context * pContext,
	    int column)
{
/* fetching value for the Nth column */
    FreeXL_CellValue cell;
    cell.value.int_value = 0;
    VirtualXLCursorPtr cursor = (VirtualXLCursorPtr) pCursor;
    if (column == 0)
      {
	  /* the PRIMARY KEY column */
	  if (cursor->pVtab->firstLineTitles == 'Y')
	      sqlite3_result_int (pContext, cursor->current_row - 1);
	  else
................................................................................
	      sqlite3_result_int (pContext, cursor->current_row);
	  return SQLITE_OK;
      }
    if (cursor->pVtab->XL_handle != NULL
	&& cursor->current_row <= cursor->pVtab->rows
	&& column <= cursor->pVtab->columns)
	freexl_get_cell_value (cursor->pVtab->XL_handle,
			       cursor->current_row - 1,
			       (unsigned short) column - 1, &cell);
    else
	cell.type = FREEXL_CELL_NULL;
    switch (cell.type)
      {
      case FREEXL_CELL_INT:
	  sqlite3_result_int (pContext, cell.value.int_value);
	  break;




|







 







|







 







|







 







<







 







|
|







 







<
<
<
<
<
<







 







<







 







|
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
...
502
503
504
505
506
507
508

509
510
511
512
513
514
515
...
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
686
687
688
689
690
691
692






693
694
695
696
697
698
699
...
798
799
800
801
802
803
804

805
806
807
808
809
810
811
...
812
813
814
815
816
817
818
819

820
821
822
823
824
825
826
/*

 virtualXLc -- SQLite3 extension [VIRTUAL TABLE accessing .XLS]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
		return SQLITE_ERROR;
	    }
	  sqlite3_free (sql);
	  *ppVTab = (sqlite3_vtab *) p_vt;
	  return SQLITE_OK;
      }
/* selecting the currently active XL Worksheet */
    freexl_select_active_worksheet (handle, worksheet);
    freexl_worksheet_dimensions (handle, &rows, &columns);
    p_vt->XL_handle = handle;
    p_vt->rows = rows;
    p_vt->columns = columns;
/* preparing the COLUMNs for this VIRTUAL TABLE */
    gaiaOutBufferInitialize (&sql_statement);
    xname = gaiaDoubleQuotedSql (argv[2]);
................................................................................
vXL_eval_constraints (VirtualXLCursorPtr cursor)
{
/* evaluating Filter constraints */
    FreeXL_CellValue cell;
    VirtualXLConstraintPtr pC = cursor->firstConstraint;
    if (pC == NULL)
	return 1;

    while (pC)
      {
	  int ok = 0;
	  if (pC->iColumn == 0)
	    {
		/* the PRIMARY KEY column */
		if (pC->valueType == 'I')
................................................................................
		  }
		goto done;
	    }
	  if (cursor->pVtab->XL_handle != NULL
	      && cursor->current_row <= cursor->pVtab->rows
	      && pC->iColumn <= cursor->pVtab->columns)
	      freexl_get_cell_value (cursor->pVtab->XL_handle,
				     cursor->current_row - 1, pC->iColumn - 1,
				     &cell);
	  else
	      cell.type = FREEXL_CELL_NULL;
	  if (cell.type == FREEXL_CELL_INT)
	    {
		if (pC->valueType == 'I')
		  {
		      switch (pC->op)
................................................................................
		      if (ret < 0)
			  ok = 1;
		      break;
		  case SQLITE_INDEX_CONSTRAINT_GE:
		      if (ret >= 0)
			  ok = 1;
		      break;






		  };
	    }
	done:
	  if (!ok)
	      return 0;
	  pC = pC->next;
      }
................................................................................

static int
vXL_column (sqlite3_vtab_cursor * pCursor, sqlite3_context * pContext,
	    int column)
{
/* fetching value for the Nth column */
    FreeXL_CellValue cell;

    VirtualXLCursorPtr cursor = (VirtualXLCursorPtr) pCursor;
    if (column == 0)
      {
	  /* the PRIMARY KEY column */
	  if (cursor->pVtab->firstLineTitles == 'Y')
	      sqlite3_result_int (pContext, cursor->current_row - 1);
	  else
................................................................................
	      sqlite3_result_int (pContext, cursor->current_row);
	  return SQLITE_OK;
      }
    if (cursor->pVtab->XL_handle != NULL
	&& cursor->current_row <= cursor->pVtab->rows
	&& column <= cursor->pVtab->columns)
	freexl_get_cell_value (cursor->pVtab->XL_handle,
			       cursor->current_row - 1, column - 1, &cell);

    else
	cell.type = FREEXL_CELL_NULL;
    switch (cell.type)
      {
      case FREEXL_CELL_INT:
	  sqlite3_result_int (pContext, cell.value.int_value);
	  break;

Changes to src/spatialite/virtualbbox.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
...
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
/*

 virtualbbox.c -- SQLite3 extension [VIRTUAL TABLE accessing BoundingBox tables]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    const unsigned char *blob;
    int size;
    sqlite3_int64 pk;
    double minx = DBL_MAX;
    double miny = DBL_MAX;
    double maxx = 0.0 - DBL_MAX;
    double maxy = 0.0 - DBL_MAX;
    int srid = -1;
    char ok_minx = 'N';
    char ok_miny = 'N';
    char ok_maxx = 'N';
    char ok_maxy = 'N';
    char ok_srid = 'N';
    stmt = cursor->stmt;
    sqlite3_bind_int64 (stmt, 1, cursor->current_row);
................................................................................
    return vbbox_disconnect (pVTab);
}

static int
vbbox_open (sqlite3_vtab * pVTab, sqlite3_vtab_cursor ** ppCursor)
{
/* opening a new cursor */
    sqlite3_stmt *stmt = NULL;
    gaiaOutBuffer sql_statement;
    int ret;
    char *sql;
    int ic;
    char *xname;
    VirtualBBoxCursorPtr cursor =
	(VirtualBBoxCursorPtr) sqlite3_malloc (sizeof (VirtualBBoxCursor));




|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
...
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
/*

 virtualbbox.c -- SQLite3 extension [VIRTUAL TABLE accessing BoundingBox tables]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    const unsigned char *blob;
    int size;
    sqlite3_int64 pk;
    double minx = DBL_MAX;
    double miny = DBL_MAX;
    double maxx = 0.0 - DBL_MAX;
    double maxy = 0.0 - DBL_MAX;
    int srid;
    char ok_minx = 'N';
    char ok_miny = 'N';
    char ok_maxx = 'N';
    char ok_maxy = 'N';
    char ok_srid = 'N';
    stmt = cursor->stmt;
    sqlite3_bind_int64 (stmt, 1, cursor->current_row);
................................................................................
    return vbbox_disconnect (pVTab);
}

static int
vbbox_open (sqlite3_vtab * pVTab, sqlite3_vtab_cursor ** ppCursor)
{
/* opening a new cursor */
    sqlite3_stmt *stmt;
    gaiaOutBuffer sql_statement;
    int ret;
    char *sql;
    int ic;
    char *xname;
    VirtualBBoxCursorPtr cursor =
	(VirtualBBoxCursorPtr) sqlite3_malloc (sizeof (VirtualBBoxCursor));

Changes to src/spatialite/virtualdbf.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
...
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
...
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
...
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
/*

 virtualdbf.c -- SQLite3 extension [VIRTUAL TABLE accessing DBF]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    int eof;			/* the EOF marker */
    VirtualDbfConstraintPtr firstConstraint;
    VirtualDbfConstraintPtr lastConstraint;
} VirtualDbfCursor;

typedef VirtualDbfCursor *VirtualDbfCursorPtr;

static char *
convert_dbf_colname_case (const char *buf, int colname_case)
{
/* converts a DBF column-name to Lower- or Upper-case */
    int len = strlen (buf);
    char *clean = malloc (len + 1);
    char *p = clean;
    strcpy (clean, buf);
    while (*p != '\0')
      {
	  if (colname_case == GAIA_DBF_COLNAME_LOWERCASE)
	    {
		if (*p >= 'A' && *p <= 'Z')
		    *p = *p - 'A' + 'a';
	    }
	  if (colname_case == GAIA_DBF_COLNAME_UPPERCASE)
	    {
		if (*p >= 'a' && *p <= 'z')
		    *p = *p - 'a' + 'A';
	    }
	  p++;
      }
    return clean;
}

static int
vdbf_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some DBF */
    char *sql;
    VirtualDbfPtr p_vt;
    char path[2048];
    char encoding[128];
    const char *pEncoding = NULL;
    char ColnameCase[128];
    const char *pColnameCase;
    int len;
    const char *pPath = NULL;
    gaiaDbfFieldPtr pFld;
    int cnt;
    int col_cnt;
    int seed;
    int dup;
    int idup;
    int text_dates = 0;
    int colname_case = GAIA_DBF_COLNAME_LOWERCASE;
    char *xname;
    char **col_name = NULL;
    gaiaOutBuffer sql_statement;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
/* checking for DBF PATH */
    if (argc == 5 || argc == 6 || argc == 7)
      {
	  pPath = argv[3];
	  len = strlen (pPath);
	  if ((*(pPath + 0) == '\'' || *(pPath + 0) == '"')
	      && (*(pPath + len - 1) == '\'' || *(pPath + len - 1) == '"'))
	    {
		/* the path is enclosed between quotes - we need to dequote it */
................................................................................
		/* the charset-name is enclosed between quotes - we need to dequote it */
		strcpy (encoding, pEncoding + 1);
		len = strlen (encoding);
		*(encoding + len - 1) = '\0';
	    }
	  else
	      strcpy (encoding, pEncoding);
	  if (argc >= 6)
	      text_dates = atoi (argv[5]);
	  if (argc >= 7)
	    {
		pColnameCase = argv[6];
		len = strlen (pColnameCase);
		if ((*(pColnameCase + 0) == '\'' || *(pColnameCase + 0) == '"')
		    && (*(pColnameCase + len - 1) == '\''
			|| *(pColnameCase + len - 1) == '"'))
		  {
		      /* the charset-name is enclosed between quotes - we need to dequote it */
		      strcpy (ColnameCase, pColnameCase + 1);
		      len = strlen (ColnameCase);
		      *(ColnameCase + len - 1) = '\0';
		  }
		else
		    strcpy (ColnameCase, pColnameCase);
		if (strcasecmp (ColnameCase, "uppercase") == 0
		    || strcasecmp (ColnameCase, "upper") == 0)
		    colname_case = GAIA_DBF_COLNAME_UPPERCASE;
		else if (strcasecmp (ColnameCase, "samecase") == 0
			 || strcasecmp (ColnameCase, "same") == 0)
		    colname_case = GAIA_DBF_COLNAME_CASE_IGNORE;
		else
		    colname_case = GAIA_DBF_COLNAME_LOWERCASE;
	    }
      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualDbf module] CREATE VIRTUAL: illegal arg list {dbf_path, encoding [ , text_dates [ , colname_case ]] }");
	  return SQLITE_ERROR;
      }
    p_vt = (VirtualDbfPtr) sqlite3_malloc (sizeof (VirtualDbf));
    if (!p_vt)
	return SQLITE_NOMEM;
    p_vt->pModule = &my_dbf_module;
    p_vt->nRef = 0;
................................................................................
	  sqlite3_free (sql);
	  *ppVTab = (sqlite3_vtab *) p_vt;
	  return SQLITE_OK;
      }
/* preparing the COLUMNs for this VIRTUAL TABLE */
    gaiaOutBufferInitialize (&sql_statement);
    xname = gaiaDoubleQuotedSql (argv[2]);
    if (colname_case == GAIA_DBF_COLNAME_LOWERCASE)
	sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (pkuid INTEGER", xname);
    else
	sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (PKUID INTEGER", xname);
    free (xname);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
/* checking for duplicate / illegal column names and antialising them */
    col_cnt = 0;
    pFld = p_vt->dbf->Dbf->First;
    while (pFld)
................................................................................
      }
    col_name = malloc (sizeof (char *) * col_cnt);
    cnt = 0;
    seed = 0;
    pFld = p_vt->dbf->Dbf->First;
    while (pFld)
      {
	  char *casename = convert_dbf_colname_case (pFld->Name, colname_case);
	  xname = gaiaDoubleQuotedSql (casename);
	  free (casename);
	  dup = 0;
	  for (idup = 0; idup < cnt; idup++)
	    {
		if (strcasecmp (xname, *(col_name + idup)) == 0)
		    dup = 1;
	    }
	  if (strcasecmp (xname, "\"PKUID\"") == 0)
	      dup = 1;
	  if (dup)
	    {
		free (xname);
		sql = sqlite3_mprintf ("COL_%d", seed++);
		casename = convert_dbf_colname_case (sql, colname_case);
		xname = gaiaDoubleQuotedSql (sql);
		free (casename);
		sqlite3_free (sql);
	    }
	  if (pFld->Type == 'N')
	    {
		if (pFld->Decimals > 0 || pFld->Length > 18)
		    sql = sqlite3_mprintf (", \"%s\" DOUBLE", xname);
		else
................................................................................
					      if (ret < 0)
						  ok = 1;
					      break;
					  case SQLITE_INDEX_CONSTRAINT_GE:
					      if (ret >= 0)
						  ok = 1;
					      break;
#ifdef HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE
					  case SQLITE_INDEX_CONSTRAINT_LIKE:
					      if (ret >= 0)
						  ok = 1;
					      break;
#endif
					  };
				    }
				  break;
			      };
			}
		      goto done;
		  }




|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










<
<









<






|







 







|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|







 







<
<
<
|







 







<
|
<












<

<







 







<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
102
103
104
105
106
107
108

























109
110
111
112
113
114
115
116
117
118


119
120
121
122
123
124
125
126
127

128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
154
155
156
157
158
159
160
161
162
























163
164
165
166
167
168
169
170
171
172
173
174
175
...
196
197
198
199
200
201
202



203
204
205
206
207
208
209
210
...
215
216
217
218
219
220
221

222

223
224
225
226
227
228
229
230
231
232
233
234

235

236
237
238
239
240
241
242
...
657
658
659
660
661
662
663






664
665
666
667
668
669
670
/*

 virtualdbf.c -- SQLite3 extension [VIRTUAL TABLE accessing DBF]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    int eof;			/* the EOF marker */
    VirtualDbfConstraintPtr firstConstraint;
    VirtualDbfConstraintPtr lastConstraint;
} VirtualDbfCursor;

typedef VirtualDbfCursor *VirtualDbfCursorPtr;


























static int
vdbf_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some DBF */
    char *sql;
    VirtualDbfPtr p_vt;
    char path[2048];
    char encoding[128];
    const char *pEncoding = NULL;


    int len;
    const char *pPath = NULL;
    gaiaDbfFieldPtr pFld;
    int cnt;
    int col_cnt;
    int seed;
    int dup;
    int idup;
    int text_dates = 0;

    char *xname;
    char **col_name = NULL;
    gaiaOutBuffer sql_statement;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
/* checking for DBF PATH */
    if (argc == 5 || argc == 6)
      {
	  pPath = argv[3];
	  len = strlen (pPath);
	  if ((*(pPath + 0) == '\'' || *(pPath + 0) == '"')
	      && (*(pPath + len - 1) == '\'' || *(pPath + len - 1) == '"'))
	    {
		/* the path is enclosed between quotes - we need to dequote it */
................................................................................
		/* the charset-name is enclosed between quotes - we need to dequote it */
		strcpy (encoding, pEncoding + 1);
		len = strlen (encoding);
		*(encoding + len - 1) = '\0';
	    }
	  else
	      strcpy (encoding, pEncoding);
	  if (argc == 6)
	      text_dates = atoi (argv[5]);
























      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualDbf module] CREATE VIRTUAL: illegal arg list {dbf_path, encoding}");
	  return SQLITE_ERROR;
      }
    p_vt = (VirtualDbfPtr) sqlite3_malloc (sizeof (VirtualDbf));
    if (!p_vt)
	return SQLITE_NOMEM;
    p_vt->pModule = &my_dbf_module;
    p_vt->nRef = 0;
................................................................................
	  sqlite3_free (sql);
	  *ppVTab = (sqlite3_vtab *) p_vt;
	  return SQLITE_OK;
      }
/* preparing the COLUMNs for this VIRTUAL TABLE */
    gaiaOutBufferInitialize (&sql_statement);
    xname = gaiaDoubleQuotedSql (argv[2]);



    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (PKUID INTEGER", xname);
    free (xname);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
/* checking for duplicate / illegal column names and antialising them */
    col_cnt = 0;
    pFld = p_vt->dbf->Dbf->First;
    while (pFld)
................................................................................
      }
    col_name = malloc (sizeof (char *) * col_cnt);
    cnt = 0;
    seed = 0;
    pFld = p_vt->dbf->Dbf->First;
    while (pFld)
      {

	  xname = gaiaDoubleQuotedSql (pFld->Name);

	  dup = 0;
	  for (idup = 0; idup < cnt; idup++)
	    {
		if (strcasecmp (xname, *(col_name + idup)) == 0)
		    dup = 1;
	    }
	  if (strcasecmp (xname, "\"PKUID\"") == 0)
	      dup = 1;
	  if (dup)
	    {
		free (xname);
		sql = sqlite3_mprintf ("COL_%d", seed++);

		xname = gaiaDoubleQuotedSql (sql);

		sqlite3_free (sql);
	    }
	  if (pFld->Type == 'N')
	    {
		if (pFld->Decimals > 0 || pFld->Length > 18)
		    sql = sqlite3_mprintf (", \"%s\" DOUBLE", xname);
		else
................................................................................
					      if (ret < 0)
						  ok = 1;
					      break;
					  case SQLITE_INDEX_CONSTRAINT_GE:
					      if (ret >= 0)
						  ok = 1;
					      break;






					  };
				    }
				  break;
			      };
			}
		      goto done;
		  }

Changes to src/spatialite/virtualelementary.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
...
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
/*

 virtualelementary.c -- SQLite3 extension [VIRTUAL TABLE Elementary Geometries]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    char *geom_column = NULL;
    char *xprefix = NULL;
    char *xtable = NULL;
    char *xgeom = NULL;
    char *table_nameQ;
    char *geo_nameQ;
    char *sql_statement;
    sqlite3_int64 rowid_value = 0;
    int ok_prefix = 0;
    int ok_table = 0;
    int ok_geom = 0;
    int ok_rowid = 0;
    int exists;
    int ret;
    sqlite3_stmt *stmt = NULL;
................................................................................
    ret =
	sqlite3_prepare_v2 (elem->db, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;
/* binding stmt params [ROWID] */
    sqlite3_bind_int64 (stmt, 1, rowid_value);
    velem_reset_cache (cursor);
    cursor->eof = 0;
/* caching the ResultSet */
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_ROW)
      {
	  /* ok, found a corresponding row */




|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
...
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
/*

 virtualelementary.c -- SQLite3 extension [VIRTUAL TABLE Elementary Geometries]

 version 4.2, 2014 September 16

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    char *geom_column = NULL;
    char *xprefix = NULL;
    char *xtable = NULL;
    char *xgeom = NULL;
    char *table_nameQ;
    char *geo_nameQ;
    char *sql_statement;
    sqlite3_int64 rowid_value;
    int ok_prefix = 0;
    int ok_table = 0;
    int ok_geom = 0;
    int ok_rowid = 0;
    int exists;
    int ret;
    sqlite3_stmt *stmt = NULL;
................................................................................
    ret =
	sqlite3_prepare_v2 (elem->db, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;
/* binding stmt params [ROWID] */
    sqlite3_bind_double (stmt, 1, rowid_value);
    velem_reset_cache (cursor);
    cursor->eof = 0;
/* caching the ResultSet */
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_ROW)
      {
	  /* ok, found a corresponding row */

Changes to src/spatialite/virtualfdo.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
...
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
...
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
...
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
...
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
....
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
....
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
....
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
....
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
....
1514
1515
1516
1517
1518
1519
1520
1521


1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546


1547
1548
1549
1550
1551
1552
1553

1554
1555
1556
1557
1558
1559
1560
1561
....
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589


1590
1591
1592
1593
1594
1595
1596

1597
1598
1599
1600
1601
1602
1603
1604
....
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632


1633
1634
1635
1636
1637
1638
1639

1640
1641
1642
1643
1644
1645
1646
1647
....
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
....
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
....
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
....
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
....
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
....
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
....
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
....
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
....
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
/*

 virtualfdo.c -- SQLite3 extension [VIRTUAL TABLE accessing FDO-OGR tables]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
typedef struct VirtualFDOStruct
{
/* extends the sqlite3_vtab struct */
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */
    char *db_prefix;		/* the prefix identifying the ATTACHED-DB where the table is */
    char *table;		/* the real-table name */
    int nColumns;		/* the # columns into the table */
    char **Column;		/* the name for each column */
    char **Type;		/* the type for each column */
    int *NotNull;		/* NotNull clause for each column */
    SqliteValuePtr *Value;	/* the current-row value for each column */
    int nGeometries;		/* # Geometry columns into the table */
................................................................................
static void
free_table (VirtualFDOPtr p_vt)
{
/* memory cleanup; freeing the virtual table struct */
    int i;
    if (!p_vt)
	return;
    if (p_vt->db_prefix)
	sqlite3_free (p_vt->db_prefix);
    if (p_vt->table)
	sqlite3_free (p_vt->table);
    if (p_vt->Column)
      {
	  for (i = 0; i < p_vt->nColumns; i++)
	    {
		if (*(p_vt->Column + i))
................................................................................
}

static int
vfdo_insert_row (VirtualFDOPtr p_vt, sqlite3_int64 * rowid, int argc,
		 sqlite3_value ** argv)
{
/* trying to insert a row into FDO-OGR real-table */
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int ic;
    int ig;
    int geom_done;
    int err_geom = 0;
    int geom_constraint_err = 0;
................................................................................
    const unsigned char *blob;
    gaiaOutBuffer out_buf;
    gaiaOutBuffer sql_statement;
    unsigned char *blob_wkb;
    int size;
    char *sql;
    char buf[256];
    char *xprefix;
    char *xname;
    gaiaGeomCollPtr geom = NULL;
    gaiaOutBufferInitialize (&sql_statement);
    xprefix = gaiaDoubleQuotedSql (p_vt->db_prefix);
    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\".\"%s\" ", xprefix, xname);
    free (xname);
    free (xprefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
					else
					    gaiaOutWkt (&out_buf, geom);
					if (out_buf.Error == 0
					    && out_buf.Buffer != NULL)
					  {
					      sqlite3_bind_text (stmt, i - 1,
								 out_buf.Buffer,
								 out_buf.
								 WriteOffset,
								 free);
					      out_buf.Buffer = NULL;
					      gaiaOutBufferReset (&out_buf);
					  }
					else
					  {
					      err_geom = 1;
................................................................................
}

static int
vfdo_update_row (VirtualFDOPtr p_vt, sqlite3_int64 rowid, int argc,
		 sqlite3_value ** argv)
{
/* trying to update a row in FDO-OGR real-table */
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int ic;
    int ig;
    int geom_done;
    int err_geom = 0;
    int geom_constraint_err = 0;
................................................................................
    const unsigned char *blob;
    gaiaOutBuffer out_buf;
    gaiaOutBuffer sql_statement;
    unsigned char *blob_wkb;
    int size;
    char *sql;
    char buf[256];
    char *xprefix;
    char *xname;
    gaiaGeomCollPtr geom = NULL;
    gaiaOutBufferInitialize (&sql_statement);
    xprefix = gaiaDoubleQuotedSql (p_vt->db_prefix);
    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("UPDATE \"%s\".\"%s\" SET", xprefix, xname);
    free (xname);
    free (xprefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, " ");
	  else
................................................................................
					else
					    gaiaOutWkt (&out_buf, geom);
					if (out_buf.Error == 0
					    && out_buf.Buffer != NULL)
					  {
					      sqlite3_bind_text (stmt, i - 1,
								 out_buf.Buffer,
								 out_buf.
								 WriteOffset,
								 free);
					      out_buf.Buffer = NULL;
					      gaiaOutBufferReset (&out_buf);
					  }
					else
					  {
					      err_geom = 1;
................................................................................
static int
vfdo_delete_row (VirtualFDOPtr p_vt, sqlite3_int64 rowid)
{
/* trying to delete a row from FDO-OGR real-table */
    char *sql_statement;
    char dummy[256];
    int ret;
    char *xprefix;
    char *xname;
    xprefix = gaiaDoubleQuotedSql (p_vt->db_prefix);
    xname = gaiaDoubleQuotedSql (p_vt->table);
    sprintf (dummy, FRMT64, rowid);
    sql_statement =
	sqlite3_mprintf ("DELETE FROM \"%s\".\"%s\" WHERE ROWID = %s", xprefix,
			 xname, dummy);
    free (xname);
    free (xprefix);
    ret = sqlite3_exec (p_vt->db, sql_statement, NULL, NULL, NULL);
    sqlite3_free (sql_statement);
    return ret;
}

char *
vfdo_convertWKT3D (const char *wkt)
................................................................................
					  {
					      wkt = (unsigned char *)
						  vfdo_convertWKT3D ((char *)
								     wkt);
					      if (wkt == NULL)
						{
						    value_set_null (*
								    (cursor->pVtab->Value


								     + ic));
						    continue;
						}
					      delete_wkt = 1;
					  }
					geom = gaiaParseWkt (wkt, -1);
					if (delete_wkt)
					    free ((void *) wkt);
					if (!geom)
					    value_set_null (*
							    (cursor->
							     pVtab->Value +
							     ic));
					else
					  {
					      geom->Srid =
						  *(cursor->pVtab->Srid + ig);
					      gaiaToSpatiaLiteBlobWkb (geom,
								       &xblob,
								       &size);
					      if (xblob)
						{
						    value_set_blob (*
								    (cursor->pVtab->Value
								     + ic),


								    xblob,
								    size);
						    free (xblob);
						}
					      else
						  value_set_null (*
								  (cursor->pVtab->Value

								   + ic));
					      gaiaFreeGeomColl (geom);
					  }
				    }
				  else
				      value_set_null (*
						      (cursor->pVtab->Value +
						       ic));
................................................................................
					blob =
					    sqlite3_column_blob (stmt, ic + 1);
					size =
					    sqlite3_column_bytes (stmt, ic + 1);
					geom = gaiaFromWkb (blob, size);
					if (!geom)
					    value_set_null (*
							    (cursor->
							     pVtab->Value +
							     ic));
					else
					  {
					      geom->Srid =
						  *(cursor->pVtab->Srid + ig);
					      gaiaToSpatiaLiteBlobWkb (geom,
								       &xblob,
								       &size);
					      if (xblob)
						{
						    value_set_blob (*
								    (cursor->pVtab->Value
								     + ic),


								    xblob,
								    size);
						    free (xblob);
						}
					      else
						  value_set_null (*
								  (cursor->pVtab->Value

								   + ic));
					      gaiaFreeGeomColl (geom);
					  }
				    }
				  else
				      value_set_null (*
						      (cursor->pVtab->Value +
						       ic));
................................................................................
					blob =
					    sqlite3_column_blob (stmt, ic + 1);
					size =
					    sqlite3_column_bytes (stmt, ic + 1);
					geom = gaiaFromFgf (blob, size);
					if (!geom)
					    value_set_null (*
							    (cursor->
							     pVtab->Value +
							     ic));
					else
					  {
					      geom->Srid =
						  *(cursor->pVtab->Srid + ig);
					      gaiaToSpatiaLiteBlobWkb (geom,
								       &xblob,
								       &size);
					      if (xblob)
						{
						    value_set_blob (*
								    (cursor->pVtab->Value
								     + ic),


								    xblob,
								    size);
						    free (xblob);
						}
					      else
						  value_set_null (*
								  (cursor->pVtab->Value

								   + ic));
					      gaiaFreeGeomColl (geom);
					  }
				    }
				  else
				      value_set_null (*
						      (cursor->pVtab->Value +
						       ic));
................................................................................

static int
vfdo_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some FDO-OGR table */
    char *vtable = NULL;
    char *db_prefix = NULL;
    char *table = NULL;
    int ret;
    int i;
    int len;
    int n_rows;
    int n_columns;
    const char *col_name;
................................................................................
    int coord_dimension;
    int not_null;
    int srid;
    int type;
    char **results;
    char *sql;
    char prefix[16];
    char *xdb_prefix;
    char *xname;
    gaiaOutBuffer sql_statement;
    VirtualFDOPtr p_vt = NULL;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
    gaiaOutBufferInitialize (&sql_statement);
/* checking for table_name */
    if (argc == 4)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);
	  db_prefix = gaiaDequotedSql ("main");
	  table = gaiaDequotedSql ((char *) argv[3]);
      }
    else if (argc == 5)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);
	  db_prefix = gaiaDequotedSql ((char *) argv[3]);
	  table = gaiaDequotedSql ((char *) argv[4]);
      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualFDO module] CREATE VIRTUAL: illegal arg list {table_name}\n");
	  goto error;
      }
/* retrieving the base table columns */
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    xname = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xdb_prefix, xname);
    free (xname);
    free (xdb_prefix);
    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  p_vt = (VirtualFDOPtr) sqlite3_malloc (sizeof (VirtualFDO));
	  if (!p_vt)
	      return SQLITE_NOMEM;
	  p_vt->db = db;
	  p_vt->nRef = 0;
	  p_vt->zErrMsg = NULL;
	  len = strlen (db_prefix);
	  p_vt->db_prefix = sqlite3_malloc (len + 1);
	  strcpy (p_vt->db_prefix, db_prefix);
	  len = strlen (table);
	  p_vt->table = sqlite3_malloc (len + 1);
	  strcpy (p_vt->table, table);
	  p_vt->nColumns = n_rows;
	  p_vt->Column = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->Type = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->NotNull = sqlite3_malloc (sizeof (int) * n_rows);
................................................................................
		*(p_vt->NotNull + (i - 1)) = not_null;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* retrieving the base table columns */
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    sql = sqlite3_mprintf ("SELECT f_geometry_column, geometry_type, srid, "
			   "geometry_format, coord_dimension\n"
			   "FROM \"%s\".geometry_columns WHERE Upper(f_table_name) = Upper(%Q)",
			   xdb_prefix, table);
    free (xdb_prefix);
    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  p_vt->nGeometries = n_rows;
................................................................................
		*(p_vt->Format + i) = FDO_OGR_NONE;
		*(p_vt->CoordDimensions + i) = GAIA_XY;
	    }
	  for (i = 1; i <= n_rows; i++)
	    {
		col_name = results[(i * n_columns) + 0];
		type = atoi (results[(i * n_columns) + 1]);
		if (results[(i * n_columns) + 2] == NULL)
		    srid = -1;
		else
		    srid = atoi (results[(i * n_columns) + 2]);
		format = results[(i * n_columns) + 3];
		coord_dimension = atoi (results[(i * n_columns) + 4]);
		len = strlen (col_name);
		*(p_vt->GeoColumn + (i - 1)) = sqlite3_malloc (len + 1);
		strcpy (*(p_vt->GeoColumn + (i - 1)), col_name);
		*(p_vt->GeoType + (i - 1)) = type;
		*(p_vt->Srid + (i - 1)) = srid;
................................................................................
		    *(p_vt->CoordDimensions + (i - 1)) = GAIA_XY;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* preparing the COLUMNs for this VIRTUAL TABLE */
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    xname = gaiaDoubleQuotedSql (vtable);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\".\"%s\" ", xdb_prefix, xname);
    free (xname);
    free (xdb_prefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (i = 0; i < p_vt->nColumns; i++)
      {
	  if (i == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
	    }
	  gaiaOutBufferReset (&sql_statement);
      }
    else
	goto error;
    *ppVTab = (sqlite3_vtab *) p_vt;
    free (vtable);
    free (db_prefix);
    free (table);
    return SQLITE_OK;
  illegal:
/* something is going the wrong way */
    gaiaOutBufferReset (&sql_statement);
    if (p_vt)
	free_table (p_vt);
................................................................................
    *pzErr =
	sqlite3_mprintf
	("[VirtualFDO module] '%s' isn't a valid FDO-OGR Geometry table\n",
	 table);
  error:
    if (vtable)
	free (vtable);
    if (db_prefix)
	free (db_prefix);
    if (table)
	free (table);
    gaiaOutBufferReset (&sql_statement);
    return SQLITE_ERROR;
}

static int
................................................................................
    return vfdo_disconnect (pVTab);
}

static int
vfdo_open (sqlite3_vtab * pVTab, sqlite3_vtab_cursor ** ppCursor)
{
/* opening a new cursor */
    sqlite3_stmt *stmt = NULL;
    gaiaOutBuffer sql_statement;
    int ret;
    char *sql;
    int ic;
    char *xprefix;
    char *xname;
    VirtualFDOCursorPtr cursor =
	(VirtualFDOCursorPtr) sqlite3_malloc (sizeof (VirtualFDOCursor));
    if (cursor == NULL)
	return SQLITE_ERROR;
    cursor->pVtab = (VirtualFDOPtr) pVTab;
    gaiaOutBufferInitialize (&sql_statement);
................................................................................
	  value_set_null (*(cursor->pVtab->Value + ic));
	  xname = gaiaDoubleQuotedSql (*(cursor->pVtab->Column + ic));
	  sql = sqlite3_mprintf (",\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
      }
    xprefix = gaiaDoubleQuotedSql (cursor->pVtab->db_prefix);
    xname = gaiaDoubleQuotedSql (cursor->pVtab->table);
    sql = sqlite3_mprintf (" FROM \"%s\" WHERE ROWID >= ?", xname);
    free (xname);
    free (xprefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	ret =
	    sqlite3_prepare_v2 (cursor->pVtab->db, sql_statement.Buffer,
				strlen (sql_statement.Buffer), &stmt, NULL);
    else




|







 







|







 







<







 







<
<







 







|







 







<



<

|

<







 







<
|







 







|







 







<



<

|

<







 







<
|







 







<

<



|
<

<







 







|
>
>
|









|
<
|










|
<
>
>
|





|
>
|







 







|
<
|










|
<
>
>
|





|
>
|







 







|
<
|










|
<
>
>
|





|
>
|







 







<







 







<










<


<
<
<
<
<
<








<

<
|

<












<
<
<







 







<


|
|
<







 







<
<
<
|







 







<

|

<







 







<







 







<
<







 







|




<







 







<



<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
105
106
107
108
109
110
111

112
113
114
115
116
117
118
...
242
243
244
245
246
247
248


249
250
251
252
253
254
255
...
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
...
867
868
869
870
871
872
873

874
875
876

877
878
879

880
881
882
883
884
885
886
...
951
952
953
954
955
956
957

958
959
960
961
962
963
964
965
....
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
....
1110
1111
1112
1113
1114
1115
1116

1117
1118
1119

1120
1121
1122

1123
1124
1125
1126
1127
1128
1129
....
1185
1186
1187
1188
1189
1190
1191

1192
1193
1194
1195
1196
1197
1198
1199
....
1320
1321
1322
1323
1324
1325
1326

1327

1328
1329
1330
1331

1332

1333
1334
1335
1336
1337
1338
1339
....
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519

1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531

1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
....
1556
1557
1558
1559
1560
1561
1562
1563

1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575

1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
....
1600
1601
1602
1603
1604
1605
1606
1607

1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619

1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
....
1702
1703
1704
1705
1706
1707
1708

1709
1710
1711
1712
1713
1714
1715
....
1718
1719
1720
1721
1722
1723
1724

1725
1726
1727
1728
1729
1730
1731
1732
1733
1734

1735
1736






1737
1738
1739
1740
1741
1742
1743
1744

1745

1746
1747

1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759



1760
1761
1762
1763
1764
1765
1766
....
1795
1796
1797
1798
1799
1800
1801

1802
1803
1804
1805

1806
1807
1808
1809
1810
1811
1812
....
1823
1824
1825
1826
1827
1828
1829



1830
1831
1832
1833
1834
1835
1836
1837
....
1851
1852
1853
1854
1855
1856
1857

1858
1859
1860

1861
1862
1863
1864
1865
1866
1867
....
1891
1892
1893
1894
1895
1896
1897

1898
1899
1900
1901
1902
1903
1904
....
1905
1906
1907
1908
1909
1910
1911


1912
1913
1914
1915
1916
1917
1918
....
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959

1960
1961
1962
1963
1964
1965
1966
....
1970
1971
1972
1973
1974
1975
1976

1977
1978
1979

1980
1981
1982
1983
1984
1985
1986
/*

 virtualfdo.c -- SQLite3 extension [VIRTUAL TABLE accessing FDO-OGR tables]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
typedef struct VirtualFDOStruct
{
/* extends the sqlite3_vtab struct */
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */

    char *table;		/* the real-table name */
    int nColumns;		/* the # columns into the table */
    char **Column;		/* the name for each column */
    char **Type;		/* the type for each column */
    int *NotNull;		/* NotNull clause for each column */
    SqliteValuePtr *Value;	/* the current-row value for each column */
    int nGeometries;		/* # Geometry columns into the table */
................................................................................
static void
free_table (VirtualFDOPtr p_vt)
{
/* memory cleanup; freeing the virtual table struct */
    int i;
    if (!p_vt)
	return;


    if (p_vt->table)
	sqlite3_free (p_vt->table);
    if (p_vt->Column)
      {
	  for (i = 0; i < p_vt->nColumns; i++)
	    {
		if (*(p_vt->Column + i))
................................................................................
}

static int
vfdo_insert_row (VirtualFDOPtr p_vt, sqlite3_int64 * rowid, int argc,
		 sqlite3_value ** argv)
{
/* trying to insert a row into FDO-OGR real-table */
    sqlite3_stmt *stmt;
    int ret;
    int i;
    int ic;
    int ig;
    int geom_done;
    int err_geom = 0;
    int geom_constraint_err = 0;
................................................................................
    const unsigned char *blob;
    gaiaOutBuffer out_buf;
    gaiaOutBuffer sql_statement;
    unsigned char *blob_wkb;
    int size;
    char *sql;
    char buf[256];

    char *xname;
    gaiaGeomCollPtr geom = NULL;
    gaiaOutBufferInitialize (&sql_statement);

    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\" ", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
					else
					    gaiaOutWkt (&out_buf, geom);
					if (out_buf.Error == 0
					    && out_buf.Buffer != NULL)
					  {
					      sqlite3_bind_text (stmt, i - 1,
								 out_buf.Buffer,

								 out_buf.WriteOffset,
								 free);
					      out_buf.Buffer = NULL;
					      gaiaOutBufferReset (&out_buf);
					  }
					else
					  {
					      err_geom = 1;
................................................................................
}

static int
vfdo_update_row (VirtualFDOPtr p_vt, sqlite3_int64 rowid, int argc,
		 sqlite3_value ** argv)
{
/* trying to update a row in FDO-OGR real-table */
    sqlite3_stmt *stmt;
    int ret;
    int i;
    int ic;
    int ig;
    int geom_done;
    int err_geom = 0;
    int geom_constraint_err = 0;
................................................................................
    const unsigned char *blob;
    gaiaOutBuffer out_buf;
    gaiaOutBuffer sql_statement;
    unsigned char *blob_wkb;
    int size;
    char *sql;
    char buf[256];

    char *xname;
    gaiaGeomCollPtr geom = NULL;
    gaiaOutBufferInitialize (&sql_statement);

    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("UPDATE \"%s\" SET", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, " ");
	  else
................................................................................
					else
					    gaiaOutWkt (&out_buf, geom);
					if (out_buf.Error == 0
					    && out_buf.Buffer != NULL)
					  {
					      sqlite3_bind_text (stmt, i - 1,
								 out_buf.Buffer,

								 out_buf.WriteOffset,
								 free);
					      out_buf.Buffer = NULL;
					      gaiaOutBufferReset (&out_buf);
					  }
					else
					  {
					      err_geom = 1;
................................................................................
static int
vfdo_delete_row (VirtualFDOPtr p_vt, sqlite3_int64 rowid)
{
/* trying to delete a row from FDO-OGR real-table */
    char *sql_statement;
    char dummy[256];
    int ret;

    char *xname;

    xname = gaiaDoubleQuotedSql (p_vt->table);
    sprintf (dummy, FRMT64, rowid);
    sql_statement =
	sqlite3_mprintf ("DELETE FROM \"%s\" WHERE ROWID = %s", xname, dummy);

    free (xname);

    ret = sqlite3_exec (p_vt->db, sql_statement, NULL, NULL, NULL);
    sqlite3_free (sql_statement);
    return ret;
}

char *
vfdo_convertWKT3D (const char *wkt)
................................................................................
					  {
					      wkt = (unsigned char *)
						  vfdo_convertWKT3D ((char *)
								     wkt);
					      if (wkt == NULL)
						{
						    value_set_null (*
								    (cursor->
								     pVtab->
								     Value +
								     ic));
						    continue;
						}
					      delete_wkt = 1;
					  }
					geom = gaiaParseWkt (wkt, -1);
					if (delete_wkt)
					    free ((void *) wkt);
					if (!geom)
					    value_set_null (*
							    (cursor->pVtab->

							     Value + ic));
					else
					  {
					      geom->Srid =
						  *(cursor->pVtab->Srid + ig);
					      gaiaToSpatiaLiteBlobWkb (geom,
								       &xblob,
								       &size);
					      if (xblob)
						{
						    value_set_blob (*
								    (cursor->

								     pVtab->
								     Value +
								     ic), xblob,
								    size);
						    free (xblob);
						}
					      else
						  value_set_null (*
								  (cursor->
								   pVtab->
								   Value + ic));
					      gaiaFreeGeomColl (geom);
					  }
				    }
				  else
				      value_set_null (*
						      (cursor->pVtab->Value +
						       ic));
................................................................................
					blob =
					    sqlite3_column_blob (stmt, ic + 1);
					size =
					    sqlite3_column_bytes (stmt, ic + 1);
					geom = gaiaFromWkb (blob, size);
					if (!geom)
					    value_set_null (*
							    (cursor->pVtab->

							     Value + ic));
					else
					  {
					      geom->Srid =
						  *(cursor->pVtab->Srid + ig);
					      gaiaToSpatiaLiteBlobWkb (geom,
								       &xblob,
								       &size);
					      if (xblob)
						{
						    value_set_blob (*
								    (cursor->

								     pVtab->
								     Value +
								     ic), xblob,
								    size);
						    free (xblob);
						}
					      else
						  value_set_null (*
								  (cursor->
								   pVtab->
								   Value + ic));
					      gaiaFreeGeomColl (geom);
					  }
				    }
				  else
				      value_set_null (*
						      (cursor->pVtab->Value +
						       ic));
................................................................................
					blob =
					    sqlite3_column_blob (stmt, ic + 1);
					size =
					    sqlite3_column_bytes (stmt, ic + 1);
					geom = gaiaFromFgf (blob, size);
					if (!geom)
					    value_set_null (*
							    (cursor->pVtab->

							     Value + ic));
					else
					  {
					      geom->Srid =
						  *(cursor->pVtab->Srid + ig);
					      gaiaToSpatiaLiteBlobWkb (geom,
								       &xblob,
								       &size);
					      if (xblob)
						{
						    value_set_blob (*
								    (cursor->

								     pVtab->
								     Value +
								     ic), xblob,
								    size);
						    free (xblob);
						}
					      else
						  value_set_null (*
								  (cursor->
								   pVtab->
								   Value + ic));
					      gaiaFreeGeomColl (geom);
					  }
				    }
				  else
				      value_set_null (*
						      (cursor->pVtab->Value +
						       ic));
................................................................................

static int
vfdo_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some FDO-OGR table */
    char *vtable = NULL;

    char *table = NULL;
    int ret;
    int i;
    int len;
    int n_rows;
    int n_columns;
    const char *col_name;
................................................................................
    int coord_dimension;
    int not_null;
    int srid;
    int type;
    char **results;
    char *sql;
    char prefix[16];

    char *xname;
    gaiaOutBuffer sql_statement;
    VirtualFDOPtr p_vt = NULL;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
    gaiaOutBufferInitialize (&sql_statement);
/* checking for table_name */
    if (argc == 4)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);

	  table = gaiaDequotedSql ((char *) argv[3]);
      }






    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualFDO module] CREATE VIRTUAL: illegal arg list {table_name}\n");
	  goto error;
      }
/* retrieving the base table columns */

    xname = gaiaDoubleQuotedSql (table);

    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", xname);
    free (xname);

    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  p_vt = (VirtualFDOPtr) sqlite3_malloc (sizeof (VirtualFDO));
	  if (!p_vt)
	      return SQLITE_NOMEM;
	  p_vt->db = db;
	  p_vt->nRef = 0;
	  p_vt->zErrMsg = NULL;



	  len = strlen (table);
	  p_vt->table = sqlite3_malloc (len + 1);
	  strcpy (p_vt->table, table);
	  p_vt->nColumns = n_rows;
	  p_vt->Column = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->Type = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->NotNull = sqlite3_malloc (sizeof (int) * n_rows);
................................................................................
		*(p_vt->NotNull + (i - 1)) = not_null;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* retrieving the base table columns */

    sql = sqlite3_mprintf ("SELECT f_geometry_column, geometry_type, srid, "
			   "geometry_format, coord_dimension\n"
			   "FROM geometry_columns WHERE Upper(f_table_name) = Upper(%Q)",
			   table);

    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  p_vt->nGeometries = n_rows;
................................................................................
		*(p_vt->Format + i) = FDO_OGR_NONE;
		*(p_vt->CoordDimensions + i) = GAIA_XY;
	    }
	  for (i = 1; i <= n_rows; i++)
	    {
		col_name = results[(i * n_columns) + 0];
		type = atoi (results[(i * n_columns) + 1]);



		srid = atoi (results[(i * n_columns) + 2]);
		format = results[(i * n_columns) + 3];
		coord_dimension = atoi (results[(i * n_columns) + 4]);
		len = strlen (col_name);
		*(p_vt->GeoColumn + (i - 1)) = sqlite3_malloc (len + 1);
		strcpy (*(p_vt->GeoColumn + (i - 1)), col_name);
		*(p_vt->GeoType + (i - 1)) = type;
		*(p_vt->Srid + (i - 1)) = srid;
................................................................................
		    *(p_vt->CoordDimensions + (i - 1)) = GAIA_XY;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* preparing the COLUMNs for this VIRTUAL TABLE */

    xname = gaiaDoubleQuotedSql (vtable);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" ", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (i = 0; i < p_vt->nColumns; i++)
      {
	  if (i == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
	    }
	  gaiaOutBufferReset (&sql_statement);
      }
    else
	goto error;
    *ppVTab = (sqlite3_vtab *) p_vt;
    free (vtable);

    free (table);
    return SQLITE_OK;
  illegal:
/* something is going the wrong way */
    gaiaOutBufferReset (&sql_statement);
    if (p_vt)
	free_table (p_vt);
................................................................................
    *pzErr =
	sqlite3_mprintf
	("[VirtualFDO module] '%s' isn't a valid FDO-OGR Geometry table\n",
	 table);
  error:
    if (vtable)
	free (vtable);


    if (table)
	free (table);
    gaiaOutBufferReset (&sql_statement);
    return SQLITE_ERROR;
}

static int
................................................................................
    return vfdo_disconnect (pVTab);
}

static int
vfdo_open (sqlite3_vtab * pVTab, sqlite3_vtab_cursor ** ppCursor)
{
/* opening a new cursor */
    sqlite3_stmt *stmt;
    gaiaOutBuffer sql_statement;
    int ret;
    char *sql;
    int ic;

    char *xname;
    VirtualFDOCursorPtr cursor =
	(VirtualFDOCursorPtr) sqlite3_malloc (sizeof (VirtualFDOCursor));
    if (cursor == NULL)
	return SQLITE_ERROR;
    cursor->pVtab = (VirtualFDOPtr) pVTab;
    gaiaOutBufferInitialize (&sql_statement);
................................................................................
	  value_set_null (*(cursor->pVtab->Value + ic));
	  xname = gaiaDoubleQuotedSql (*(cursor->pVtab->Column + ic));
	  sql = sqlite3_mprintf (",\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
      }

    xname = gaiaDoubleQuotedSql (cursor->pVtab->table);
    sql = sqlite3_mprintf (" FROM \"%s\" WHERE ROWID >= ?", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	ret =
	    sqlite3_prepare_v2 (cursor->pVtab->db, sql_statement.Buffer,
				strlen (sql_statement.Buffer), &stmt, NULL);
    else

Changes to src/spatialite/virtualgpkg.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
...
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
...
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
...
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
...
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
...
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
...
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
...
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
...
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
...
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
...
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
/*

 virtualgpkg.c -- SQLite3 extension [VIRTUAL TABLE accessing GPKG tables]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
typedef struct VirtualGPKGStruct
{
/* extends the sqlite3_vtab struct */
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */
    char *db_prefix;		/* the prefix identifying the ATTACHED-DB where the table is */
    char *table;		/* the real-table name */
    int nColumns;		/* the # columns into the table */
    char **Column;		/* the name for each column */
    char **Type;		/* the type for each column */
    int *NotNull;		/* NotNull clause for each column */
    SqliteValuePtr *Value;	/* the current-row value for each column */
    char *GeoColumn;		/* name of the Geometry column */
................................................................................
    char prefix[16];
    const char *text;
    const unsigned char *blob;
    gaiaOutBuffer sql_statement;
    int size;
    char *sql;
    char buf[256];
    char *xprefix;
    char *xname;
    gaiaOutBufferInitialize (&sql_statement);
    xprefix = gaiaDoubleQuotedSql (p_vt->db_prefix);
    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\".\"%s\" ", xprefix, xname);
    free (xname);
    free (xprefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
    char prefix[16];
    const char *text;
    const unsigned char *blob;
    gaiaOutBuffer sql_statement;
    int size;
    char *sql;
    char buf[256];
    char *xprefix;
    char *xname;
    gaiaOutBufferInitialize (&sql_statement);
    xprefix = gaiaDoubleQuotedSql (p_vt->db_prefix);
    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("UPDATE \"%s\".\"%s\" SET", xprefix, xname);
    free (xname);
    free (xprefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, " ");
	  else
................................................................................
static int
vgpkg_delete_row (VirtualGPKGPtr p_vt, sqlite3_int64 rowid)
{
/* trying to delete a row from GPKG real-table */
    char *sql_statement;
    char dummy[256];
    int ret;
    char *xprefix;
    char *xname;
    xprefix = gaiaDoubleQuotedSql (p_vt->db_prefix);
    xname = gaiaDoubleQuotedSql (p_vt->table);
    sprintf (dummy, FRMT64, rowid);
    sql_statement =
	sqlite3_mprintf ("DELETE FROM \"%s\" WHERE ROWID = %s", xname, dummy);
    free (xname);
    free (xprefix);
    ret = sqlite3_exec (p_vt->db, sql_statement, NULL, NULL, NULL);
    sqlite3_free (sql_statement);
    return ret;
}

static void
free_table (VirtualGPKGPtr p_vt)
{
/* memory cleanup; freeing the virtual table struct */
    int i;
    if (!p_vt)
	return;
    if (p_vt->db_prefix)
	sqlite3_free (p_vt->db_prefix);
    if (p_vt->table)
	sqlite3_free (p_vt->table);
    if (p_vt->Column)
      {
	  for (i = 0; i < p_vt->nColumns; i++)
	    {
		if (*(p_vt->Column + i))
................................................................................

static int
vgpkg_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	      sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some GPKG table */
    char *vtable = NULL;
    char *db_prefix = NULL;
    char *table = NULL;
    int ret;
    int i;
    int len;
    int n_rows;
    int n_columns;
    const char *col_name;
................................................................................
    int not_null;
    const char *type;
    int has_z;
    int has_m;
    char **results;
    char *sql;
    char prefix[16];
    char *xdb_prefix;
    char *xname;
    gaiaOutBuffer sql_statement;
    VirtualGPKGPtr p_vt = NULL;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
    gaiaOutBufferInitialize (&sql_statement);
/* checking for table_name */
    if (argc == 4)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);
	  db_prefix = gaiaDequotedSql ("main");
	  table = gaiaDequotedSql ((char *) argv[3]);
      }
    else if (argc == 5)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);
	  db_prefix = gaiaDequotedSql ((char *) argv[3]);
	  table = gaiaDequotedSql ((char *) argv[4]);
      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualGPKG module] CREATE VIRTUAL: illegal arg list {table_name}\n");
	  goto error;
      }
/* retrieving the base table columns */
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    xname = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xdb_prefix, xname);
    free (xname);
    free (xdb_prefix);
    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  p_vt = (VirtualGPKGPtr) sqlite3_malloc (sizeof (VirtualGPKG));
	  if (!p_vt)
	      return SQLITE_NOMEM;
	  p_vt->db = db;
	  p_vt->nRef = 0;
	  p_vt->zErrMsg = NULL;
	  len = strlen (db_prefix);
	  p_vt->db_prefix = sqlite3_malloc (len + 1);
	  strcpy (p_vt->db_prefix, db_prefix);
	  len = strlen (table);
	  p_vt->table = sqlite3_malloc (len + 1);
	  strcpy (p_vt->table, table);
	  p_vt->nColumns = n_rows;
	  p_vt->Column = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->Type = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->NotNull = sqlite3_malloc (sizeof (int) * n_rows);
................................................................................
		*(p_vt->NotNull + (i - 1)) = not_null;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* retrieving the base table columns */
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT column_name, geometry_type_name, srs_id, z, m\n"
	 "FROM \"%s\".gpkg_geometry_columns WHERE Upper(table_name) = Upper(%Q)",
	 xdb_prefix, table);
    free (xdb_prefix);
    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  col_name = results[n_columns + 0];
................................................................................
		    p_vt->GeoType = GAIA_GEOMETRYCOLLECTION;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* preparing the COLUMNs for this VIRTUAL TABLE */
    xdb_prefix = gaiaDoubleQuotedSql (db_prefix);
    xname = gaiaDoubleQuotedSql (vtable);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\".\"%s\" ", xdb_prefix, xname);
    free (xname);
    free (xdb_prefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (i = 0; i < p_vt->nColumns; i++)
      {
	  if (i == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
	    }
	  gaiaOutBufferReset (&sql_statement);
      }
    else
	goto error;
    *ppVTab = (sqlite3_vtab *) p_vt;
    free (vtable);
    free (db_prefix);
    free (table);
    return SQLITE_OK;
  illegal:
/* something is going the wrong way */
    gaiaOutBufferReset (&sql_statement);
    if (p_vt)
	free_table (p_vt);
................................................................................
    *pzErr =
	sqlite3_mprintf
	("[VirtualGPKG module] '%s' isn't a valid GPKG Geometry table\n",
	 table);
  error:
    if (vtable)
	free (vtable);
    if (db_prefix)
	free (db_prefix);
    if (table)
	free (table);
    gaiaOutBufferReset (&sql_statement);
    return SQLITE_ERROR;
}

static int
................................................................................
{
/* opening a new cursor */
    sqlite3_stmt *stmt;
    gaiaOutBuffer sql_statement;
    int ret;
    char *sql;
    int ic;
    char *xprefix;
    char *xname;
    VirtualGPKGCursorPtr cursor =
	(VirtualGPKGCursorPtr) sqlite3_malloc (sizeof (VirtualGPKGCursor));
    if (cursor == NULL)
	return SQLITE_ERROR;
    cursor->pVtab = (VirtualGPKGPtr) pVTab;
    gaiaOutBufferInitialize (&sql_statement);
................................................................................
	    }
	  else
	      sql = sqlite3_mprintf (",\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
      }
    xprefix = gaiaDoubleQuotedSql (cursor->pVtab->db_prefix);
    xname = gaiaDoubleQuotedSql (cursor->pVtab->table);
    sql = sqlite3_mprintf (" FROM \"%s\" WHERE ROWID >= ?", xname);
    free (xname);
    free (xprefix);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	ret =
	    sqlite3_prepare_v2 (cursor->pVtab->db, sql_statement.Buffer,
				strlen (sql_statement.Buffer), &stmt, NULL);
    else




|







 







|







 







<







 







<


<

|

<







 







<


<

|

<







 







<

<





<












<
<







 







<







 







<










<


<
<
<
<
<
<








<

<
|

<












<
<
<







 







<



|
|
<







 







<

|

<







 







<







 







<
<







 







<







 







<



<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
94
95
96
97
98
99
100

101
102
103
104
105
106
107
...
294
295
296
297
298
299
300

301
302

303
304
305

306
307
308
309
310
311
312
...
391
392
393
394
395
396
397

398
399

400
401
402

403
404
405
406
407
408
409
...
473
474
475
476
477
478
479

480

481
482
483
484
485

486
487
488
489
490
491
492
493
494
495
496
497


498
499
500
501
502
503
504
...
533
534
535
536
537
538
539

540
541
542
543
544
545
546
...
548
549
550
551
552
553
554

555
556
557
558
559
560
561
562
563
564

565
566






567
568
569
570
571
572
573
574

575

576
577

578
579
580
581
582
583
584
585
586
587
588
589



590
591
592
593
594
595
596
...
622
623
624
625
626
627
628

629
630
631
632
633

634
635
636
637
638
639
640
...
723
724
725
726
727
728
729

730
731
732

733
734
735
736
737
738
739
...
763
764
765
766
767
768
769

770
771
772
773
774
775
776
...
777
778
779
780
781
782
783


784
785
786
787
788
789
790
...
825
826
827
828
829
830
831

832
833
834
835
836
837
838
...
849
850
851
852
853
854
855

856
857
858

859
860
861
862
863
864
865
/*

 virtualgpkg.c -- SQLite3 extension [VIRTUAL TABLE accessing GPKG tables]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2014
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
typedef struct VirtualGPKGStruct
{
/* extends the sqlite3_vtab struct */
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */

    char *table;		/* the real-table name */
    int nColumns;		/* the # columns into the table */
    char **Column;		/* the name for each column */
    char **Type;		/* the type for each column */
    int *NotNull;		/* NotNull clause for each column */
    SqliteValuePtr *Value;	/* the current-row value for each column */
    char *GeoColumn;		/* name of the Geometry column */
................................................................................
    char prefix[16];
    const char *text;
    const unsigned char *blob;
    gaiaOutBuffer sql_statement;
    int size;
    char *sql;
    char buf[256];

    char *xname;
    gaiaOutBufferInitialize (&sql_statement);

    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\" ", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
    char prefix[16];
    const char *text;
    const unsigned char *blob;
    gaiaOutBuffer sql_statement;
    int size;
    char *sql;
    char buf[256];

    char *xname;
    gaiaOutBufferInitialize (&sql_statement);

    xname = gaiaDoubleQuotedSql (p_vt->table);
    sql = sqlite3_mprintf ("UPDATE \"%s\" SET", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (ic = 0; ic < p_vt->nColumns; ic++)
      {
	  if (ic == 0)
	      strcpy (prefix, " ");
	  else
................................................................................
static int
vgpkg_delete_row (VirtualGPKGPtr p_vt, sqlite3_int64 rowid)
{
/* trying to delete a row from GPKG real-table */
    char *sql_statement;
    char dummy[256];
    int ret;

    char *xname;

    xname = gaiaDoubleQuotedSql (p_vt->table);
    sprintf (dummy, FRMT64, rowid);
    sql_statement =
	sqlite3_mprintf ("DELETE FROM \"%s\" WHERE ROWID = %s", xname, dummy);
    free (xname);

    ret = sqlite3_exec (p_vt->db, sql_statement, NULL, NULL, NULL);
    sqlite3_free (sql_statement);
    return ret;
}

static void
free_table (VirtualGPKGPtr p_vt)
{
/* memory cleanup; freeing the virtual table struct */
    int i;
    if (!p_vt)
	return;


    if (p_vt->table)
	sqlite3_free (p_vt->table);
    if (p_vt->Column)
      {
	  for (i = 0; i < p_vt->nColumns; i++)
	    {
		if (*(p_vt->Column + i))
................................................................................

static int
vgpkg_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	      sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some GPKG table */
    char *vtable = NULL;

    char *table = NULL;
    int ret;
    int i;
    int len;
    int n_rows;
    int n_columns;
    const char *col_name;
................................................................................
    int not_null;
    const char *type;
    int has_z;
    int has_m;
    char **results;
    char *sql;
    char prefix[16];

    char *xname;
    gaiaOutBuffer sql_statement;
    VirtualGPKGPtr p_vt = NULL;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
    gaiaOutBufferInitialize (&sql_statement);
/* checking for table_name */
    if (argc == 4)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);

	  table = gaiaDequotedSql ((char *) argv[3]);
      }






    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualGPKG module] CREATE VIRTUAL: illegal arg list {table_name}\n");
	  goto error;
      }
/* retrieving the base table columns */

    xname = gaiaDoubleQuotedSql (table);

    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", xname);
    free (xname);

    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  p_vt = (VirtualGPKGPtr) sqlite3_malloc (sizeof (VirtualGPKG));
	  if (!p_vt)
	      return SQLITE_NOMEM;
	  p_vt->db = db;
	  p_vt->nRef = 0;
	  p_vt->zErrMsg = NULL;



	  len = strlen (table);
	  p_vt->table = sqlite3_malloc (len + 1);
	  strcpy (p_vt->table, table);
	  p_vt->nColumns = n_rows;
	  p_vt->Column = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->Type = sqlite3_malloc (sizeof (char *) * n_rows);
	  p_vt->NotNull = sqlite3_malloc (sizeof (int) * n_rows);
................................................................................
		*(p_vt->NotNull + (i - 1)) = not_null;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* retrieving the base table columns */

    sql =
	sqlite3_mprintf
	("SELECT column_name, geometry_type_name, srs_id, z, m\n"
	 "FROM gpkg_geometry_columns WHERE Upper(table_name) = Upper(%Q)",
	 table);

    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  col_name = results[n_columns + 0];
................................................................................
		    p_vt->GeoType = GAIA_GEOMETRYCOLLECTION;
	    }
	  sqlite3_free_table (results);
      }
    else
	goto illegal;
/* preparing the COLUMNs for this VIRTUAL TABLE */

    xname = gaiaDoubleQuotedSql (vtable);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" ", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    for (i = 0; i < p_vt->nColumns; i++)
      {
	  if (i == 0)
	      strcpy (prefix, "(");
	  else
................................................................................
	    }
	  gaiaOutBufferReset (&sql_statement);
      }
    else
	goto error;
    *ppVTab = (sqlite3_vtab *) p_vt;
    free (vtable);

    free (table);
    return SQLITE_OK;
  illegal:
/* something is going the wrong way */
    gaiaOutBufferReset (&sql_statement);
    if (p_vt)
	free_table (p_vt);
................................................................................
    *pzErr =
	sqlite3_mprintf
	("[VirtualGPKG module] '%s' isn't a valid GPKG Geometry table\n",
	 table);
  error:
    if (vtable)
	free (vtable);


    if (table)
	free (table);
    gaiaOutBufferReset (&sql_statement);
    return SQLITE_ERROR;
}

static int
................................................................................
{
/* opening a new cursor */
    sqlite3_stmt *stmt;
    gaiaOutBuffer sql_statement;
    int ret;
    char *sql;
    int ic;

    char *xname;
    VirtualGPKGCursorPtr cursor =
	(VirtualGPKGCursorPtr) sqlite3_malloc (sizeof (VirtualGPKGCursor));
    if (cursor == NULL)
	return SQLITE_ERROR;
    cursor->pVtab = (VirtualGPKGPtr) pVTab;
    gaiaOutBufferInitialize (&sql_statement);
................................................................................
	    }
	  else
	      sql = sqlite3_mprintf (",\"%s\"", xname);
	  free (xname);
	  gaiaAppendToOutBuffer (&sql_statement, sql);
	  sqlite3_free (sql);
      }

    xname = gaiaDoubleQuotedSql (cursor->pVtab->table);
    sql = sqlite3_mprintf (" FROM \"%s\" WHERE ROWID >= ?", xname);
    free (xname);

    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
    if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	ret =
	    sqlite3_prepare_v2 (cursor->pVtab->db, sql_statement.Buffer,
				strlen (sql_statement.Buffer), &stmt, NULL);
    else

Deleted src/spatialite/virtualknn.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
/*

 virtualknn.c -- SQLite3 extension [VIRTUAL TABLE RTree metahandler]

 version 4.4, 2015 November 27

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(K-Nearest Neighbors [KNN] module) 

CIG: 644544015A

*/

/*

IMPORTANT NOTE: how KNN works

the KNN module is implemented on the top of an SQLite's R*Tree, and
more specifically is built around the sqlite3_rtree_query_callback()
function.

this API allows to directly explore the R*Tree hierarchy; for each
node found within the Tree the registered callback will be invoked
so to determine if the current Tree node (aka BBOX) should be further
expanded or should be ignored.
while the process goes on all Tree levels will be traversed until it
reaches Level=0 (Leaves aka Terminal Nodes) where the indexed
Geometries will be finally referenced by their individual ROWID and BBOX

in a most usual Spatial Index query the R*Tree will be simply
traversed starting from Root Nodes (higher level) and progressively
descending level by level toward Leaf Nodes (indexed Geometries); in
this specific case the BBOX to be searched is clearly defined, so the
callback function should simply check if each Node BBOX do effectively
intersect the reference BBOX and that's all.

the access strategy required by a KNN query is much more complex than
this, because there is no reference BBOX at all (the search radius is
unknown in this case); so it should be dynamically built by repeatedly
querying the R*Tree until a satisfying solution is found.

step #1
-------
we'll descend the Tree by exploring a Level at each time so to
identify the lower-level BBOX containing the reference Geometry.
if no BBOX directly contains the reference Geometry then the
nearest one will be identified.

step #2
-------
the reference Geometry will now be buffered so to completely
cover the BBOX identified in the previous step.

step #3
-------
an ordinary Spatial Index query will be now performed, using
the buffered Geometry as the search frame, so to identify
all nearest features.

step #4
-------
if the total number of nearest features identified by the
previous query is less than requested, then the buffer
radius will be repeatedly expanded until all requested
nearest features will be found.

*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* GEOS is supported */
#ifndef OMIT_KNN		/* only if KNN is enabled */

#include <spatialite/sqlite.h>

#include <spatialite/spatialite.h>
#include <spatialite/gaiaaux.h>
#include <spatialite/gaiageo.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#define strcasecmp    _stricmp
#define strncasecmp    _strnicmp
#endif

static struct sqlite3_module my_knn_module;

/******************************************************************************
/
/ VirtualTable structs
/
******************************************************************************/

typedef struct VKnnItemStruct
{
/* a Feature item into the KNN sorted array */
    sqlite3_int64 rowid;
    double dist;
} VKnnItem;
typedef VKnnItem *VKnnItemPtr;

typedef struct VKnnContextStruct
{
/* current KNN context */
    char *table_name;
    char *column_name;
    unsigned char *blob;
    int blob_size;
    sqlite3_stmt *stmt_dist;
    sqlite3_stmt *stmt_map_dist;
    sqlite3_stmt *stmt_rect_dist;
    sqlite3_stmt *stmt_pt_dist;
    sqlite3_stmt *stmt_buffer;
    sqlite3_stmt *stmt_rtree;
    sqlite3_stmt *stmt_rtree_count;
    double bbox_minx;
    double bbox_miny;
    double bbox_maxx;
    double bbox_maxy;
    double minx;
    double miny;
    double maxx;
    double maxy;
    double min_dist;
    double rtree_minx;
    double rtree_miny;
    double rtree_maxx;
    double rtree_maxy;
    int level;
    int current_level;
    VKnnItemPtr knn_array;
    int max_items;
    double max_dist;
    int curr_items;
    int rtree_count;
} VKnnContext;
typedef VKnnContext *VKnnContextPtr;

typedef struct VirtualKnnStruct
{
/* extends the sqlite3_vtab struct */
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */
    VKnnContextPtr knn_ctx;	/* KNN context */
} VirtualKnn;
typedef VirtualKnn *VirtualKnnPtr;

typedef struct VirtualKnnCursorStruct
{
/* extends the sqlite3_vtab_cursor struct */
    VirtualKnnPtr pVtab;	/* Virtual table of this cursor */
    int eof;			/* the EOF marker */
    int CurrentIndex;		/* index of the current KNN item */
} VirtualKnnCursor;
typedef VirtualKnnCursor *VirtualKnnCursorPtr;

static void
vknn_empty_context (VKnnContextPtr ctx)
{
/* setting an empty KNN context */
    if (ctx == NULL)
	return;
    ctx->table_name = NULL;
    ctx->column_name = NULL;
    ctx->blob = NULL;
    ctx->blob_size = 0;
    ctx->stmt_dist = NULL;
    ctx->stmt_map_dist = NULL;
    ctx->stmt_rect_dist = NULL;
    ctx->stmt_pt_dist = NULL;
    ctx->stmt_buffer = NULL;
    ctx->stmt_rtree = NULL;
    ctx->stmt_rtree_count = NULL;
    ctx->bbox_minx = -DBL_MAX;
    ctx->bbox_miny = -DBL_MAX;
    ctx->bbox_maxx = DBL_MAX;
    ctx->bbox_maxy = DBL_MAX;
    ctx->minx = DBL_MAX;
    ctx->miny = DBL_MAX;
    ctx->maxx = -DBL_MAX;
    ctx->maxy = -DBL_MAX;
    ctx->min_dist = DBL_MAX;
    ctx->rtree_minx = -DBL_MAX;
    ctx->rtree_miny = -DBL_MAX;
    ctx->rtree_maxx = DBL_MAX;
    ctx->rtree_maxy = DBL_MAX;
    ctx->current_level = 0;
    ctx->max_items = 0;
    ctx->knn_array = NULL;
    ctx->curr_items = 0;
    ctx->rtree_count = 0;
    ctx->max_dist = -DBL_MAX;
}

static VKnnContextPtr
vknn_create_context (void)
{
/* creating an empty KNN context */
    VKnnContextPtr ctx = malloc (sizeof (VKnnContext));
    vknn_empty_context (ctx);
    return ctx;
}

static void
vknn_reset_context (VKnnContextPtr ctx)
{
/* freeing a KNN context */
    if (ctx == NULL)
	return;
    if (ctx->table_name != NULL)
	free (ctx->table_name);
    if (ctx->column_name != NULL)
	free (ctx->column_name);
    if (ctx->blob != NULL)
	free (ctx->blob);
    if (ctx->stmt_dist != NULL)
	sqlite3_finalize (ctx->stmt_dist);
    if (ctx->stmt_map_dist != NULL)
	sqlite3_finalize (ctx->stmt_map_dist);
    if (ctx->stmt_rect_dist != NULL)
	sqlite3_finalize (ctx->stmt_rect_dist);
    if (ctx->stmt_pt_dist != NULL)
	sqlite3_finalize (ctx->stmt_pt_dist);
    if (ctx->stmt_buffer != NULL)
	sqlite3_finalize (ctx->stmt_buffer);
    if (ctx->stmt_rtree != NULL)
	sqlite3_finalize (ctx->stmt_rtree);
    if (ctx->stmt_rtree_count != NULL)
	sqlite3_finalize (ctx->stmt_rtree_count);
    if (ctx->knn_array != NULL)
	free (ctx->knn_array);
    vknn_empty_context (ctx);
}

static void
vknn_rtree_count (VKnnContextPtr ctx)
{
/* approximatively counting how many entries are into the R*Tree */
    int ret;
    sqlite3_stmt *stmt;


    ctx->rtree_count = 0;
    if (ctx == NULL)
	return;
    stmt = ctx->stmt_rtree_count;
    if (stmt == NULL)
	return;
    sqlite3_reset (stmt);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		ctx->rtree_count += 1;
	    }
	  else
	    {
		ctx->rtree_count = 0;
		break;
	    }
      }
}

static void
vknn_init_context (VKnnContextPtr ctx, const char *table, const char *column,
		   gaiaGeomCollPtr geom, int max_items,
		   sqlite3_stmt * stmt_dist, sqlite3_stmt * stmt_map_dist,
		   sqlite3_stmt * stmt_rect_dist, sqlite3_stmt * stmt_pt_dist,
		   sqlite3_stmt * stmt_buffer, sqlite3_stmt * stmt_rtree,
		   sqlite3_stmt * stmt_rtree_count)
{
/* initializing a KNN context */
    int i;
    if (ctx == NULL)
	return;
    vknn_reset_context (ctx);
    i = strlen (table);
    ctx->table_name = malloc (i + 1);
    strcpy (ctx->table_name, table);
    i = strlen (column);
    ctx->column_name = malloc (i + 1);
    strcpy (ctx->column_name, column);
    gaiaToSpatiaLiteBlobWkb (geom, &(ctx->blob), &(ctx->blob_size));
    ctx->stmt_dist = stmt_dist;
    ctx->stmt_map_dist = stmt_map_dist;
    ctx->stmt_rect_dist = stmt_rect_dist;
    ctx->stmt_pt_dist = stmt_pt_dist;
    ctx->stmt_buffer = stmt_buffer;
    ctx->stmt_rtree = stmt_rtree;
    ctx->stmt_rtree_count = stmt_rtree_count;
    ctx->max_items = max_items;
    ctx->knn_array = malloc (sizeof (VKnnItem) * max_items);
    for (i = 0; i < max_items; i++)
      {
	  /* initializing the KNN sorted array */
	  VKnnItemPtr item = ctx->knn_array + i;
	  item->rowid = 0;
	  item->dist = DBL_MAX;
      }
    ctx->curr_items = 0;
    vknn_rtree_count (ctx);
}

static void
vknn_free_context (void *p)
{
/* freeing a KNN context */
    VKnnContextPtr ctx = (VKnnContextPtr) p;
    vknn_reset_context (ctx);
    free (ctx);
}

static int
vknn_check_view_rtree (sqlite3 * sqlite, const char *table_name,
		       const char *geom_column, char **real_table,
		       char **real_geom, int *is_geographic)
{
/* checks if the required RTree is actually defined - SpatialView */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;
    int is_longlat = 0;

/* testing if views_geometry_columns exists */
    sql_statement = sqlite3_mprintf ("SELECT tbl_name FROM sqlite_master "
				     "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'");
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    count = 0;

/* attempting to find the RTree Geometry Column */
    sql_statement =
	sqlite3_mprintf
	("SELECT a.f_table_name, a.f_geometry_column, SridIsGeographic(b.srid) "
	 "FROM views_geometry_columns AS a " "JOIN geometry_columns AS b ON ("
	 "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
	 "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
	 "WHERE Upper(a.view_name) = Upper(%Q) "
	 "AND Upper(a.view_geometry) = Upper(%Q) AND b.spatial_index_enabled = 1",
	 table_name, geom_column);
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *v = (const char *) sqlite3_column_text (stmt, 0);
		int len = sqlite3_column_bytes (stmt, 0);
		if (rt)
		    free (rt);
		rt = malloc (len + 1);
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);
		is_longlat = sqlite3_column_int (stmt, 2);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    if (!validateRowid (sqlite, rt))
      {
	  free (rt);
	  free (rg);
	  return 0;
      }
    *real_table = rt;
    *real_geom = rg;
    *is_geographic = is_longlat;
    return 1;
}

static int
vknn_check_rtree (sqlite3 * sqlite, const char *db_prefix,
		  const char *table_name, const char *geom_column,
		  char **real_table, char **real_geom, int *is_geographic)
{
/* checks if the required RTree is actually defined */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;
    int is_longlat = 0;

    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT f_table_name, f_geometry_column, SridIsGeographic(srid) "
	       "FROM main.geometry_columns WHERE Upper(f_table_name) = Upper(%Q) AND "
	       "Upper(f_geometry_column) = Upper(%Q) AND spatial_index_enabled = 1",
	       table_name, geom_column);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT f_table_name, f_geometry_column, SridIsGeographic(srid) "
	       "FROM \"%s\".geometry_columns WHERE Upper(f_table_name) = Upper(%Q) AND "
	       "Upper(f_geometry_column) = Upper(%Q) AND spatial_index_enabled = 1",
	       quoted_db, table_name, geom_column);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *v = (const char *) sqlite3_column_text (stmt, 0);
		int len = sqlite3_column_bytes (stmt, 0);
		if (rt)
		    free (rt);
		rt = malloc (len + 1);
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);
		is_longlat = sqlite3_column_int (stmt, 2);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return vknn_check_view_rtree (sqlite, table_name, geom_column,
				      real_table, real_geom, is_geographic);
    else
      {
	  *real_table = rt;
	  *real_geom = rg;
	  *is_geographic = is_longlat;
      }
    return 1;
}

static int
vknn_find_view_rtree (sqlite3 * sqlite, const char *db_prefix,
		      const char *table_name, char **real_table,
		      char **real_geom, int *is_geographic)
{
/* attempts to find the corresponding RTree Geometry Column - SpatialView */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;
    int is_longlat = 0;

/* testing if views_geometry_columns exists */
    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf ("SELECT tbl_name FROM main.sqlite_master "
			       "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'");
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf ("SELECT tbl_name FROM \"%s\".sqlite_master "
			       "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'",
			       quoted_db);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      count++;
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    count = 0;

/* attempting to find the RTree Geometry Column */
    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT a.f_table_name, a.f_geometry_column, SridIsGeographic(b.srid) "
	       "FROM main.views_geometry_columns AS a "
	       "JOIN main.geometry_columns AS b ON ("
	       "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
	       "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
	       "WHERE Upper(a.view_name) = Upper(%Q) AND b.spatial_index_enabled = 1",
	       table_name);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT a.f_table_name, a.f_geometry_column, SridIsGeographic(b.srid) "
	       "FROM \"%s\".views_geometry_columns AS a "
	       "JOIN \"%s\".geometry_columns AS b ON ("
	       "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
	       "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
	       "WHERE Upper(a.view_name) = Upper(%Q) AND b.spatial_index_enabled = 1",
	       quoted_db, quoted_db, table_name);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *v = (const char *) sqlite3_column_text (stmt, 0);
		int len = sqlite3_column_bytes (stmt, 0);
		if (rt)
		    free (rt);
		rt = malloc (len + 1);
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);
		is_longlat = sqlite3_column_int (stmt, 2);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    *real_table = rt;
    *real_geom = rg;
    *is_geographic = is_longlat;
    return 1;
}

static int
vknn_find_rtree (sqlite3 * sqlite, const char *db_prefix,
		 const char *table_name, char **real_table, char **real_geom,
		 int *is_geographic)
{
/* attempts to find the corresponding RTree Geometry Column */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;
    int is_longlat = 0;

    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT f_table_name, f_geometry_column, SridIsGeographic(srid) "
	       " FROM main.geometry_columns WHERE Upper(f_table_name) = Upper(%Q) "
	       "AND spatial_index_enabled = 1", table_name);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT f_table_name, f_geometry_column, SridIsGeographic(srid) "
	       " FROM \"%s\".geometry_columns WHERE Upper(f_table_name) = Upper(%Q) "
	       "AND spatial_index_enabled = 1", quoted_db, table_name);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *v = (const char *) sqlite3_column_text (stmt, 0);
		int len = sqlite3_column_bytes (stmt, 0);
		if (rt)
		    free (rt);
		rt = malloc (len + 1);
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);
		is_longlat = sqlite3_column_int (stmt, 2);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return vknn_find_view_rtree (sqlite, db_prefix, table_name,
				     real_table, real_geom, is_geographic);
    else
      {
	  *real_table = rt;
	  *real_geom = rg;
	  *is_geographic = is_longlat;
      }
    return 1;
}

static void
vknn_parse_table_name (const char *tn, char **db_prefix, char **table_name)
{
/* attempting to extract an eventual DB prefix */
    int i;
    int len = strlen (tn);
    int i_dot = -1;
    if (strncasecmp (tn, "DB=", 3) == 0)
      {
	  int l_db;
	  int l_tbl;
	  for (i = 3; i < len; i++)
	    {
		if (tn[i] == '.')
		  {
		      i_dot = i;
		      break;
		  }
	    }
	  if (i_dot > 1)
	    {
		l_db = i_dot - 3;
		l_tbl = len - (i_dot + 1);
		*db_prefix = malloc (l_db + 1);
		memset (*db_prefix, '\0', l_db + 1);
		memcpy (*db_prefix, tn + 3, l_db);
		*table_name = malloc (l_tbl + 1);
		strcpy (*table_name, tn + i_dot + 1);
		return;
	    }
      }
    *table_name = malloc (len + 1);
    strcpy (*table_name, tn);
}

static int
vknn_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table for R*Tree KNN metahandling */
    VirtualKnnPtr p_vt;
    char *buf;
    char *vtable;
    char *xname;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
    if (argc == 3)
      {
	  vtable = gaiaDequotedSql ((char *) argv[2]);
      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualKNN module] CREATE VIRTUAL: illegal arg list {void}\n");
	  return SQLITE_ERROR;
      }
    p_vt = (VirtualKnnPtr) sqlite3_malloc (sizeof (VirtualKnn));
    if (!p_vt)
	return SQLITE_NOMEM;
    p_vt->db = db;
    p_vt->pModule = &my_knn_module;
    p_vt->nRef = 0;
    p_vt->zErrMsg = NULL;
    p_vt->knn_ctx = vknn_create_context ();
/* preparing the COLUMNs for this VIRTUAL TABLE */
    xname = gaiaDoubleQuotedSql (vtable);
    buf = sqlite3_mprintf ("CREATE TABLE \"%s\" (f_table_name TEXT, "
			   "f_geometry_column TEXT, ref_geometry BLOB, max_items INTEGER, "
			   "pos INTEGER, fid INTEGER, distance DOUBLE)", xname);
    free (xname);
    free (vtable);
    if (sqlite3_declare_vtab (db, buf) != SQLITE_OK)
      {
	  sqlite3_free (buf);
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualKNN module] CREATE VIRTUAL: invalid SQL statement \"%s\"",
	       buf);
	  return SQLITE_ERROR;
      }
    sqlite3_free (buf);
    *ppVTab = (sqlite3_vtab *) p_vt;
    return SQLITE_OK;
}

static int
vknn_connect (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	      sqlite3_vtab ** ppVTab, char **pzErr)
{
/* connects the virtual table - simply aliases vknn_create() */
    return vknn_create (db, pAux, argc, argv, ppVTab, pzErr);
}

static int
vknn_best_index (sqlite3_vtab * pVTab, sqlite3_index_info * pIdxInfo)
{
/* best index selection */
    int i;
    int err = 1;
    int table = 0;
    int geom_col = 0;
    int ref_geom = 0;
    int max_items = 0;
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    for (i = 0; i < pIdxInfo->nConstraint; i++)
      {
	  /* verifying the constraints */
	  struct sqlite3_index_constraint *p = &(pIdxInfo->aConstraint[i]);
	  if (p->usable)
	    {
		if (p->iColumn == 0 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		    table++;
		else if (p->iColumn == 1 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		    geom_col++;
		else if (p->iColumn == 2 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		    ref_geom++;
		else if (p->iColumn == 3 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		    max_items++;
	    }
      }
    if (table == 1 && (geom_col == 0 || geom_col == 1) && ref_geom == 1
	&& (max_items == 0 || max_items == 1))
      {
	  /* this one is a valid KNN query */
	  if (geom_col == 1)
	    {
		if (max_items == 1)
		    pIdxInfo->idxNum = 3;
		else
		    pIdxInfo->idxNum = 1;
	    }
	  else
	    {
		if (max_items == 1)
		    pIdxInfo->idxNum = 4;
		else
		    pIdxInfo->idxNum = 2;
	    }
	  pIdxInfo->estimatedCost = 1.0;
	  for (i = 0; i < pIdxInfo->nConstraint; i++)
	    {
		if (pIdxInfo->aConstraint[i].usable)
		  {
		      pIdxInfo->aConstraintUsage[i].argvIndex = i + 1;
		      pIdxInfo->aConstraintUsage[i].omit = 1;
		  }
	    }
	  err = 0;
      }
    if (err)
      {
	  /* illegal query */
	  pIdxInfo->idxNum = 0;
      }
    return SQLITE_OK;
}

static int
vknn_disconnect (sqlite3_vtab * pVTab)
{
/* disconnects the virtual table */
    VirtualKnnPtr p_vt = (VirtualKnnPtr) pVTab;
    if (p_vt->knn_ctx != NULL)
	vknn_free_context (p_vt->knn_ctx);
    sqlite3_free (p_vt);
    return SQLITE_OK;
}

static int
vknn_destroy (sqlite3_vtab * pVTab)
{
/* destroys the virtual table - simply aliases vknn_disconnect() */
    return vknn_disconnect (pVTab);
}

static int
vknn_open (sqlite3_vtab * pVTab, sqlite3_vtab_cursor ** ppCursor)
{
/* opening a new cursor */
    VirtualKnnCursorPtr cursor =
	(VirtualKnnCursorPtr) sqlite3_malloc (sizeof (VirtualKnnCursor));
    if (cursor == NULL)
	return SQLITE_ERROR;
    cursor->pVtab = (VirtualKnnPtr) pVTab;
    cursor->eof = 1;
    *ppCursor = (sqlite3_vtab_cursor *) cursor;
    return SQLITE_OK;
}

static int
vknn_close (sqlite3_vtab_cursor * pCursor)
{
/* closing the cursor */
    sqlite3_free (pCursor);
    return SQLITE_OK;
}

static void
vknn_shift_items (VKnnContextPtr ctx, int index)
{
/* shifting down the Features sorted array */
    int i;
    for (i = ctx->max_items - 1; i > index; i--)
      {
	  VKnnItemPtr item1 = ctx->knn_array + i - 1;
	  VKnnItemPtr item2 = ctx->knn_array + i;
	  item2->rowid = item1->rowid;
	  item2->dist = item1->dist;
	  if ((i == ctx->max_items - 1) && item2->dist != DBL_MAX)
	      ctx->max_dist = item2->dist;
      }
}

static void
vknn_update_items (VKnnContextPtr ctx, sqlite3_int64 rowid, double dist)
{
/* updating the Features sorted array */
    int i;
    if (ctx->curr_items == ctx->max_items)
      {
	  if (dist >= ctx->max_dist)
	      return;
      }
    for (i = 0; i < ctx->max_items; i++)
      {
	  VKnnItemPtr item = ctx->knn_array + i;
	  if (rowid == item->rowid)
	      return;
	  if (dist < item->dist)
	    {
		vknn_shift_items (ctx, i);
		item->rowid = rowid;
		item->dist = dist;
		break;
	    }
      }
    if (dist > ctx->max_dist)
	ctx->max_dist = dist;
    if (ctx->curr_items < ctx->max_items)
	ctx->curr_items += 1;
}

static int
vknn_check_mbr (VKnnContextPtr ctx, double rtree_minx, double rtree_miny,
		double rtree_maxx, double rtree_maxy)
{
/* comparing two MBRs */
    if (rtree_minx >= ctx->bbox_minx && rtree_maxx <= ctx->bbox_maxx
	&& rtree_miny >= ctx->bbox_miny && rtree_maxy <= ctx->bbox_maxy)
	return FULLY_WITHIN;
    if (rtree_maxx < ctx->bbox_minx)
	return NOT_WITHIN;
    if (rtree_minx > ctx->bbox_maxx)
	return NOT_WITHIN;
    if (rtree_maxy < ctx->bbox_miny)
	return NOT_WITHIN;
    if (rtree_miny > ctx->bbox_maxy)
	return NOT_WITHIN;
    return PARTLY_WITHIN;
}

static double
vknn_compute_distance (VKnnContextPtr ctx, sqlite3_int64 rowid)
{
/* computing the distance between two geometries (in meters) */
    double dist = DBL_MAX;
    int ret;
    sqlite3_stmt *stmt;
    if (ctx == NULL)
	return DBL_MAX;
    if (ctx->blob == NULL)
	return DBL_MAX;
    if (ctx->stmt_dist == NULL)
	return DBL_MAX;
    stmt = ctx->stmt_dist;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, ctx->blob, ctx->blob_size, SQLITE_STATIC);
    sqlite3_bind_int64 (stmt, 2, rowid);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_FLOAT)
		    dist = sqlite3_column_double (stmt, 0);
	    }
	  else
	    {
		dist = DBL_MAX;
		break;
	    }
      }
    return dist;
}

static double
vknn_rect_distance (VKnnContextPtr ctx, double minx, double miny, double maxx,
		    double maxy)
{
/* computing the distance between the geometry and an R*Tree BBOX */
    double dist = DBL_MAX;
    int ret;
    sqlite3_stmt *stmt;
    if (ctx == NULL)
	return DBL_MAX;
    if (ctx->blob == NULL)
	return DBL_MAX;
    if (ctx->stmt_rect_dist == NULL)
	return DBL_MAX;
    stmt = ctx->stmt_rect_dist;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, ctx->blob, ctx->blob_size, SQLITE_STATIC);
    sqlite3_bind_double (stmt, 2, minx);
    sqlite3_bind_double (stmt, 3, miny);
    sqlite3_bind_double (stmt, 4, maxx);
    sqlite3_bind_double (stmt, 5, maxy);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_FLOAT)
		    dist = sqlite3_column_double (stmt, 0);
	    }
	  else
	    {
		dist = DBL_MAX;
		break;
	    }
      }
    return dist;
}

static double
vknn_pt_distance (VKnnContextPtr ctx, double x, double y)
{
/* computing the distance between the geometry and a point */
    double dist = DBL_MAX;
    int ret;
    sqlite3_stmt *stmt;
    if (ctx == NULL)
	return DBL_MAX;
    if (ctx->blob == NULL)
	return DBL_MAX;
    if (ctx->stmt_pt_dist == NULL)
	return DBL_MAX;
    stmt = ctx->stmt_pt_dist;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, ctx->blob, ctx->blob_size, SQLITE_STATIC);
    sqlite3_bind_double (stmt, 2, x);
    sqlite3_bind_double (stmt, 3, y);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_FLOAT)
		    dist = sqlite3_column_double (stmt, 0);
	    }
	  else
	    {
		dist = DBL_MAX;
		break;
	    }
      }
    return dist;
}

static int
vknn_bufferize (VKnnContextPtr ctx, double radius)
{
/* computing the frame for an R*Tree query */
    int ret;
    sqlite3_stmt *stmt;
    if (ctx == NULL)
	return 0;
    if (ctx->blob == NULL)
	return 0;
    if (ctx->stmt_buffer == NULL)
	return 0;
    stmt = ctx->stmt_buffer;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, ctx->blob, ctx->blob_size, SQLITE_STATIC);
    sqlite3_bind_double (stmt, 2, radius);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_FLOAT)
		    ctx->rtree_minx = sqlite3_column_double (stmt, 0);
		if (sqlite3_column_type (stmt, 1) == SQLITE_FLOAT)
		    ctx->rtree_miny = sqlite3_column_double (stmt, 1);
		if (sqlite3_column_type (stmt, 2) == SQLITE_FLOAT)
		    ctx->rtree_maxx = sqlite3_column_double (stmt, 2);
		if (sqlite3_column_type (stmt, 3) == SQLITE_FLOAT)
		    ctx->rtree_maxy = sqlite3_column_double (stmt, 3);
	    }
	  else
	    {
		return 0;
		break;
	    }
      }
    return 1;
}

static int
vknn_rtree_query (VKnnContextPtr ctx)
{
/* Querying the RTree - Intersections */
    int err = 0;
    int count = 0;
    int ret;
    sqlite3_stmt *stmt;
    if (ctx == NULL)
	return 0;
    if (ctx->stmt_rtree == NULL)
	return 0;
    stmt = ctx->stmt_rtree;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, ctx->rtree_maxx);
    sqlite3_bind_double (stmt, 2, ctx->rtree_minx);
    sqlite3_bind_double (stmt, 3, ctx->rtree_maxy);
    sqlite3_bind_double (stmt, 4, ctx->rtree_miny);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		double dist;
		sqlite3_int64 rowid = sqlite3_column_int64 (stmt, 0);
		dist = vknn_compute_distance (ctx, rowid);
		vknn_update_items (ctx, rowid, dist);
		count++;
	    }
	  else
	    {
		err = 1;
		break;
	    }
      }
    if (err)
	return -1;
    return count;
}

static int
vknn_query_callback (sqlite3_rtree_query_info * info)
{
/* R*Tree Query Callback function */
    double rtree_minx;
    double rtree_maxx;
    double rtree_miny;
    double rtree_maxy;
    double dist;
    int mode;
    VKnnContextPtr ctx = (VKnnContextPtr) (info->pContext);
    if (info->nCoord != 4)
      {
	  /* invalid RTree */
	  info->eWithin = NOT_WITHIN;
	  return SQLITE_OK;
      }

/* fetching the node's BBOX */
    rtree_minx = info->aCoord[0];
    rtree_maxx = info->aCoord[1];
    rtree_miny = info->aCoord[2];
    rtree_maxy = info->aCoord[3];
    if (info->iLevel > ctx->current_level)
      {
	  mode =
	      vknn_check_mbr (ctx, rtree_minx, rtree_miny, rtree_maxx,
			      rtree_maxy);
	  if (mode == FULLY_WITHIN || mode == PARTLY_WITHIN)
	    {
		/* overlaps the current reference frame; to be further expanded */
		info->eWithin = FULLY_WITHIN;
	    }
	  else
	      info->eWithin = NOT_WITHIN;
      }
    else
      {
	  dist =
	      vknn_rect_distance (ctx, rtree_minx, rtree_miny, rtree_maxx,
				  rtree_maxy);
	  if (dist < ctx->min_dist)
	    {
		ctx->minx = rtree_minx;
		ctx->miny = rtree_miny;
		ctx->maxx = rtree_maxx;
		ctx->maxy = rtree_maxy;
		ctx->min_dist = dist;
		ctx->level = info->iLevel;
	    }
	  info->eWithin = NOT_WITHIN;
      }
    return SQLITE_OK;
}

static int
vknn_filter (sqlite3_vtab_cursor * pCursor, int idxNum, const char *idxStr,
	     int argc, sqlite3_value ** argv)
{
/* setting up a cursor filter */
    char *db_prefix = NULL;
    char *table_name = NULL;
    char *geom_column = NULL;
    char *xtable = NULL;
    char *xgeom = NULL;
    char *xgeomQ;
    char *xtableQ;
    char *idx_name;
    char *idx_nameQ;
    char *sql_statement;
    gaiaGeomCollPtr geom = NULL;
    int ok_table = 0;
    int ok_geom = 0;
    int ok_max = 0;
    int max_items = 3;
    int is_geographic;
    const unsigned char *blob;
    int size;
    int exists;
    int ret;
    double radius;
    double dist;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_dist = NULL;
    sqlite3_stmt *stmt_map_dist = NULL;
    sqlite3_stmt *stmt_rect_dist = NULL;
    sqlite3_stmt *stmt_pt_dist = NULL;
    sqlite3_stmt *stmt_buffer = NULL;
    sqlite3_stmt *stmt_rtree = NULL;
    sqlite3_stmt *stmt_rtree_count = NULL;
    VirtualKnnCursorPtr cursor = (VirtualKnnCursorPtr) pCursor;
    VirtualKnnPtr knn = (VirtualKnnPtr) cursor->pVtab;
    VKnnContextPtr vknn_context = knn->knn_ctx;
    if (idxStr)
	idxStr = idxStr;	/* unused arg warning suppression */
    cursor->eof = 1;
    if (idxStr)
	idxStr = idxStr;	/* unused arg warning suppression */
    cursor->eof = 1;
    if (idxNum == 1 && argc == 3)
      {
	  /* retrieving the Table/Column/Geometry params */
	  if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	    {
		char *tn = (char *) sqlite3_value_text (argv[0]);
		vknn_parse_table_name (tn, &db_prefix, &table_name);
		ok_table = 1;
	    }
	  if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	    {
		geom_column = (char *) sqlite3_value_text (argv[1]);
		ok_geom = 1;
	    }
	  if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
	    {
		blob = sqlite3_value_blob (argv[2]);
		size = sqlite3_value_bytes (argv[2]);
		geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
	    }
	  if (ok_table && ok_geom && geom)
	      ;
	  else
	    {
		/* invalid args */
		goto stop;
	    }
      }
    if (idxNum == 2 && argc == 2)
      {
	  /* retrieving the Table/Geometry params */
	  if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	    {
		char *tn = (char *) sqlite3_value_text (argv[0]);
		vknn_parse_table_name (tn, &db_prefix, &table_name);
		ok_table = 1;
	    }
	  if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
	    {
		blob = sqlite3_value_blob (argv[1]);
		size = sqlite3_value_bytes (argv[1]);
		geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
	    }
	  if (ok_table && geom)
	      ;
	  else
	    {
		/* invalid args */
		goto stop;
	    }
      }
    if (idxNum == 3 && argc == 4)
      {
	  /* retrieving the Table/Column/Geometry/MaxItems params */
	  if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	    {
		char *tn = (char *) sqlite3_value_text (argv[0]);
		vknn_parse_table_name (tn, &db_prefix, &table_name);
		ok_table = 1;
	    }
	  if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	    {
		geom_column = (char *) sqlite3_value_text (argv[1]);
		ok_geom = 1;
	    }
	  if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
	    {
		blob = sqlite3_value_blob (argv[2]);
		size = sqlite3_value_bytes (argv[2]);
		geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
	    }
	  if (sqlite3_value_type (argv[3]) == SQLITE_INTEGER)
	    {
		max_items = sqlite3_value_int (argv[3]);
		if (max_items > 1024)
		    max_items = 1024;
		if (max_items < 1)
		    max_items = 1;
		ok_max = 1;
	    }
	  if (ok_table && ok_geom && geom && ok_max)
	      ;
	  else
	    {
		/* invalid args */
		goto stop;
	    }
      }
    if (idxNum == 4 && argc == 3)
      {
	  /* retrieving the Table/Geometry/MaxItems params */
	  if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	    {
		char *tn = (char *) sqlite3_value_text (argv[0]);
		vknn_parse_table_name (tn, &db_prefix, &table_name);
		ok_table = 1;
	    }
	  if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
	    {
		blob = sqlite3_value_blob (argv[1]);
		size = sqlite3_value_bytes (argv[1]);
		geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
	    }
	  if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		max_items = sqlite3_value_int (argv[2]);
		if (max_items > 1024)
		    max_items = 1024;
		if (max_items < 1)
		    max_items = 1;
		ok_max = 1;
	    }
	  if (ok_table && geom && ok_max)
	      ;
	  else
	    {
		/* invalid args */
		goto stop;
	    }
      }

/* checking if the corresponding R*Tree exists */
    if (ok_geom)
	exists =
	    vknn_check_rtree (knn->db, db_prefix, table_name, geom_column,
			      &xtable, &xgeom, &is_geographic);
    else
	exists =
	    vknn_find_rtree (knn->db, db_prefix, table_name, &xtable,
			     &xgeom, &is_geographic);
    if (!exists)
	goto stop;

/* building the Distance query */
    xgeomQ = gaiaDoubleQuotedSql (xgeom);
    xtableQ = gaiaDoubleQuotedSql (xtable);
    if (is_geographic)
	sql_statement =
	    sqlite3_mprintf
	    ("SELECT ST_Distance(?, \"%s\", 1) FROM \"%s\" WHERE rowid = ?",
	     xgeomQ, xtableQ);
    else
	sql_statement =
	    sqlite3_mprintf
	    ("SELECT ST_Distance(?, \"%s\") FROM \"%s\" WHERE rowid = ?",
	     xgeomQ, xtableQ);
    free (xgeomQ);
    free (xtableQ);
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_dist, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;

/* building the Distance query - map units */
    xgeomQ = gaiaDoubleQuotedSql (xgeom);
    xtableQ = gaiaDoubleQuotedSql (xtable);
    sql_statement =
	sqlite3_mprintf
	("SELECT ST_Distance(?, \"%s\") FROM \"%s\" WHERE rowid = ?",
	 xgeomQ, xtableQ);
    free (xgeomQ);
    free (xtableQ);
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_map_dist, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;

/* building the Distance query - RTree MBR */
    sql_statement = "SELECT ST_Distance(?, BuildMbr(?, ?, ?, ?))";
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_rect_dist, NULL);
    if (ret != SQLITE_OK)
	goto stop;

/* building the Distance query - Point */
    sql_statement = "SELECT ST_Distance(?, MakePoint(?, ?))";
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_pt_dist, NULL);
    if (ret != SQLITE_OK)
	goto stop;

/* building the Buffer query */
    sql_statement =
	"SELECT MbrMinX(x.g), MbrMinY(x.g), MbrMaxX(x.g), MbrMaxY(x.g) "
	"FROM (SELECT ST_Buffer(ST_Envelope(?), ?) AS g) AS x";
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_buffer, NULL);
    if (ret != SQLITE_OK)
	goto stop;

/* building the RTree query - Intersects */
    idx_name = sqlite3_mprintf ("idx_%s_%s", xtable, xgeom);
    idx_nameQ = gaiaDoubleQuotedSql (idx_name);
    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT pkid FROM main.\"%s\" WHERE xmin <= ? AND xmax >= ? AND ymin <= ? AND ymax >= ?",
	       idx_nameQ);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT pkid FROM \"%s\".\"%s\" WHERE xmin <= ? AND xmax >= ? AND ymin <= ? AND ymax >= ?",
	       quoted_db, idx_nameQ);
	  free (quoted_db);
      }
    free (idx_nameQ);
    sqlite3_free (idx_name);
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_rtree, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;

/* building the RTree query - count items */
    idx_name = sqlite3_mprintf ("idx_%s_%s", xtable, xgeom);
    idx_nameQ = gaiaDoubleQuotedSql (idx_name);
    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf ("SELECT pkid FROM \"%s\" LIMIT 1024", idx_nameQ);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf ("SELECT pkid FROM \"%s\".\"%s\" LIMIT 1024",
			       quoted_db, idx_nameQ);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt_rtree_count, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;

/* installing the R*Tree query callback */
    gaiaMbrGeometry (geom);
    vknn_init_context (vknn_context, xtable, xgeom, geom, max_items,
		       stmt_dist, stmt_map_dist, stmt_rect_dist, stmt_pt_dist,
		       stmt_buffer, stmt_rtree, stmt_rtree_count);
    gaiaFreeGeomColl (geom);
    geom = NULL;		/* releasing ownership on geom */
    stmt_dist = NULL;		/* releasing ownership on stmt_dist */
    stmt_map_dist = NULL;	/* releasing ownership on stmt_map_dist */
    stmt_rect_dist = NULL;	/* releasing ownership on stmt_rect */
    stmt_pt_dist = NULL;	/* releasing ownership on stmt_point */
    stmt_buffer = NULL;		/* releasing ownership on stmt_buffer */
    stmt_rtree = NULL;		/* releasing ownership on stmt_rtree */
    stmt_rtree_count = NULL;	/* releasing ownership on stmt_rtree_count */
    sqlite3_rtree_query_callback (knn->db, "knn_position", vknn_query_callback,
				  vknn_context, NULL);

/* building the RTree query - callback */
    idx_name = sqlite3_mprintf ("idx_%s_%s", xtable, xgeom);
    idx_nameQ = gaiaDoubleQuotedSql (idx_name);
    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT pkid FROM main.\"%s\" WHERE pkid MATCH knn_position(1)",
	       idx_nameQ);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT pkid FROM \"%s\".\"%s\" WHERE pkid MATCH knn_position(1)",
	       quoted_db, idx_nameQ);
	  free (quoted_db);
      }
    free (idx_nameQ);
    sqlite3_free (idx_name);
    ret =
	sqlite3_prepare_v2 (knn->db, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	goto stop;

    vknn_context->bbox_minx = -DBL_MAX;
    vknn_context->bbox_miny = -DBL_MAX;
    vknn_context->bbox_maxx = DBL_MAX;
    vknn_context->bbox_maxy = DBL_MAX;
    vknn_context->current_level = 1024;
    while (1)
      {
	  /* repeatedly querying the R*Tree until finding the nearest BBOX */
	  vknn_context->minx = DBL_MAX;
	  vknn_context->miny = DBL_MAX;
	  vknn_context->maxx = -DBL_MAX;
	  vknn_context->maxy = -DBL_MAX;
	  vknn_context->min_dist = DBL_MAX;
	  sqlite3_step (stmt);
	  vknn_context->bbox_minx = vknn_context->minx;
	  vknn_context->bbox_miny = vknn_context->miny;
	  vknn_context->bbox_maxx = vknn_context->maxx;
	  vknn_context->bbox_maxy = vknn_context->maxy;
	  if (vknn_context->level <= 1)
	      break;
	  vknn_context->current_level = vknn_context->level - 1;
      }
    radius =
	vknn_pt_distance (vknn_context, vknn_context->bbox_minx,
			  vknn_context->bbox_miny);
    dist =
	vknn_pt_distance (vknn_context, vknn_context->bbox_minx,
			  vknn_context->bbox_maxy);
    if (dist > radius)
	radius = dist;
    dist =
	vknn_pt_distance (vknn_context, vknn_context->bbox_maxx,
			  vknn_context->bbox_miny);
    if (dist > radius)
	radius = dist;
    dist =
	vknn_pt_distance (vknn_context, vknn_context->bbox_maxx,
			  vknn_context->bbox_maxy);
    if (dist > radius)
	radius = dist;

    while (1)
      {
	  if (!vknn_bufferize (vknn_context, radius))
	      break;
	  ret = vknn_rtree_query (vknn_context);
	  if (ret <= 0 || ret >= max_items || ret >= vknn_context->rtree_count)
	      break;
	  radius *= 1.05;
      }

    if (vknn_context->curr_items == 0)
	cursor->eof = 1;
    else
	cursor->eof = 0;
    cursor->CurrentIndex = 0;
  stop:
    if (geom)
	gaiaFreeGeomColl (geom);
    if (xtable)
	free (xtable);
    if (xgeom)
	free (xgeom);
    if (db_prefix)
	free (db_prefix);
    if (table_name)
	free (table_name);
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_dist != NULL)
	sqlite3_finalize (stmt_dist);
    if (stmt_map_dist != NULL)
	sqlite3_finalize (stmt_map_dist);
    if (stmt_rect_dist != NULL)
	sqlite3_finalize (stmt_rect_dist);
    if (stmt_pt_dist != NULL)
	sqlite3_finalize (stmt_pt_dist);
    if (stmt_buffer != NULL)
	sqlite3_finalize (stmt_buffer);
    if (stmt_rtree != NULL)
	sqlite3_finalize (stmt_rtree);
    if (stmt_rtree_count != NULL)
	sqlite3_finalize (stmt_rtree_count);
    return SQLITE_OK;
}

static int
vknn_next (sqlite3_vtab_cursor * pCursor)
{
/* fetching a next row from cursor */
    VirtualKnnCursorPtr cursor = (VirtualKnnCursorPtr) pCursor;
    VKnnContextPtr ctx = cursor->pVtab->knn_ctx;
    cursor->CurrentIndex += 1;
    if (cursor->CurrentIndex >= ctx->curr_items)
	cursor->eof = 1;
    return SQLITE_OK;
}

static int
vknn_eof (sqlite3_vtab_cursor * pCursor)
{
/* cursor EOF */
    VirtualKnnCursorPtr cursor = (VirtualKnnCursorPtr) pCursor;
    return cursor->eof;
}

static int
vknn_column (sqlite3_vtab_cursor * pCursor, sqlite3_context * pContext,
	     int column)
{
/* fetching value for the Nth column */
    VirtualKnnCursorPtr cursor = (VirtualKnnCursorPtr) pCursor;
    VKnnContextPtr ctx = cursor->pVtab->knn_ctx;
    VKnnItemPtr item = NULL;
    if (cursor || column)
	cursor = cursor;	/* unused arg warning suppression */
    if (column)
	column = column;	/* unused arg warning suppression */
    if (cursor->CurrentIndex < ctx->curr_items)
	item = ctx->knn_array + cursor->CurrentIndex;
    if (column == 0)
      {
	  /* the Table Name column */
	  sqlite3_result_text (pContext, ctx->table_name,
			       strlen (ctx->table_name), SQLITE_STATIC);
      }
    else if (column == 1)
      {
	  /* the GeometryColumn Name column */
	  sqlite3_result_text (pContext, ctx->column_name,
			       strlen (ctx->column_name), SQLITE_STATIC);
      }
    else if (column == 2)
      {
	  /* the Reference Geometry column */
	  sqlite3_result_blob (pContext, ctx->blob, ctx->blob_size,
			       SQLITE_STATIC);
      }
    else if (column == 3)
      {
	  /* the Max Items column */
	  sqlite3_result_int (pContext, ctx->max_items);
      }
    else if (column == 4)
      {
	  /* the index column */
	  sqlite3_result_int (pContext, cursor->CurrentIndex + 1);
      }
    else if ((column == 5 || column == 6) && item != NULL)
      {
	  if (column == 5)
	    {
		/* the RowID column */
		sqlite3_result_int64 (pContext, item->rowid);
	    }
	  else if (column == 6)
	    {
		/* the Distance column */
		sqlite3_result_double (pContext, item->dist);
	    }
	  else
	      sqlite3_result_null (pContext);
      }
    else
	sqlite3_result_null (pContext);
    return SQLITE_OK;
}

static int
vknn_rowid (sqlite3_vtab_cursor * pCursor, sqlite_int64 * pRowid)
{
/* fetching the ROWID */
    VirtualKnnCursorPtr cursor = (VirtualKnnCursorPtr) pCursor;
    *pRowid = cursor->CurrentIndex;
    return SQLITE_OK;
}

static int
vknn_update (sqlite3_vtab * pVTab, int argc, sqlite3_value ** argv,
	     sqlite_int64 * pRowid)
{
/* generic update [INSERT / UPDATE / DELETE */
    if (pRowid || argc || argv || pVTab)
	pRowid = pRowid;	/* unused arg warning suppression */
/* read only datasource */
    return SQLITE_READONLY;
}

static int
vknn_begin (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vknn_sync (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vknn_commit (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vknn_rollback (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vknn_rename (sqlite3_vtab * pVTab, const char *zNew)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    if (zNew)
	zNew = zNew;		/* unused arg warning suppression */
    return SQLITE_ERROR;
}

static int
spliteKnnInit (sqlite3 * db)
{
    int rc = SQLITE_OK;
    my_knn_module.iVersion = 1;
    my_knn_module.xCreate = &vknn_create;
    my_knn_module.xConnect = &vknn_connect;
    my_knn_module.xBestIndex = &vknn_best_index;
    my_knn_module.xDisconnect = &vknn_disconnect;
    my_knn_module.xDestroy = &vknn_destroy;
    my_knn_module.xOpen = &vknn_open;
    my_knn_module.xClose = &vknn_close;
    my_knn_module.xFilter = &vknn_filter;
    my_knn_module.xNext = &vknn_next;
    my_knn_module.xEof = &vknn_eof;
    my_knn_module.xColumn = &vknn_column;
    my_knn_module.xRowid = &vknn_rowid;
    my_knn_module.xUpdate = &vknn_update;
    my_knn_module.xBegin = &vknn_begin;
    my_knn_module.xSync = &vknn_sync;
    my_knn_module.xCommit = &vknn_commit;
    my_knn_module.xRollback = &vknn_rollback;
    my_knn_module.xFindFunction = NULL;
    my_knn_module.xRename = &vknn_rename;
    sqlite3_create_module_v2 (db, "VirtualKNN", &my_knn_module, NULL, 0);
    return rc;
}

SPATIALITE_PRIVATE int
virtual_knn_extension_init (void *xdb)
{
    sqlite3 *db = (sqlite3 *) xdb;
    return spliteKnnInit (db);
}

#endif /* end KNN conditional */
#endif /* end GEOS conditional */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/spatialite/virtualnetwork.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
....
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
....
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
....
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
....
2701
2702
2703
2704
2705
2706
2707

2708
2709
2710
2711
2712
2713
2714
/*

 virtualnetwork.c -- SQLite3 extension [VIRTUAL TABLE Routing - shortest path]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):
Luigi Costalli luigi.costalli@gmail.com

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
	  free (pN);
	  pN = pNn;
      }
    if (solution->Geometry)
	gaiaFreeGeomColl (solution->Geometry);
    solution->FirstArc = NULL;
    solution->LastArc = NULL;
    solution->FirstNode = NULL;
    solution->LastNode = NULL;
    solution->From = NULL;
    solution->To = NULL;
    solution->MaxCost = 0.0;
    solution->First = NULL;
    solution->Last = NULL;
    solution->CurrentRow = NULL;
    solution->CurrentNodeRow = NULL;
................................................................................
    char *to_code;
    char *name;
    int tbd;
    int ind;
    int base = 0;
    int block = 128;
    int how_many;
    sqlite3_stmt *stmt = NULL;
    char *xfrom;
    char *xto;
    char *xgeom;
    char *xname;
    char *xtable;
    gaiaOutBuffer sql_statement;
    if (cnt > 0)
................................................................................
				srid = -1;
			}
		      pA = pA->Next;
		  }
		pR = pR->Next;
	    }
	  /* creating the Shortest Path Geometry - LINESTRING */
	  if (tot_pts < 2)
	      return;
	  ln = gaiaAllocLinestring (tot_pts);
	  solution->Geometry = gaiaAllocGeomColl ();
	  solution->Geometry->Srid = srid;
	  gaiaInsertLinestringInGeomColl (solution->Geometry, ln);
	  tot_pts = 0;
	  pR = solution->First;
	  while (pR)
................................................................................
    if (graph->GeometryColumn == NULL)
	return srid;

    sql = sqlite3_mprintf ("SELECT srid FROM geometry_columns WHERE "
			   "Lower(f_table_name) = Lower(%Q) AND Lower(f_geometry_column) = Lower(%Q)",
			   graph->TableName, graph->GeometryColumn);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return srid;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
................................................................................
			}
		      if (p_vtab->graph->AStar == 0)
			  p_vtab->currentAlgorithm = VNET_DIJKSTRA_ALGORITHM;
		  }
		return SQLITE_OK;
	    }
      }

}

static int
vnet_begin (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)




|







 







|







 







<
<







 







|







 







<
<







 







<







 







>







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
895
896
897
898
899
900
901


902
903
904
905
906
907
908
....
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
....
1333
1334
1335
1336
1337
1338
1339


1340
1341
1342
1343
1344
1345
1346
....
1439
1440
1441
1442
1443
1444
1445

1446
1447
1448
1449
1450
1451
1452
....
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
/*

 virtualnetwork.c -- SQLite3 extension [VIRTUAL TABLE Routing - shortest path]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):
Luigi Costalli luigi.costalli@gmail.com

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
................................................................................
	  free (pN);
	  pN = pNn;
      }
    if (solution->Geometry)
	gaiaFreeGeomColl (solution->Geometry);
    solution->FirstArc = NULL;
    solution->LastArc = NULL;


    solution->From = NULL;
    solution->To = NULL;
    solution->MaxCost = 0.0;
    solution->First = NULL;
    solution->Last = NULL;
    solution->CurrentRow = NULL;
    solution->CurrentNodeRow = NULL;
................................................................................
    char *to_code;
    char *name;
    int tbd;
    int ind;
    int base = 0;
    int block = 128;
    int how_many;
    sqlite3_stmt *stmt;
    char *xfrom;
    char *xto;
    char *xgeom;
    char *xname;
    char *xtable;
    gaiaOutBuffer sql_statement;
    if (cnt > 0)
................................................................................
				srid = -1;
			}
		      pA = pA->Next;
		  }
		pR = pR->Next;
	    }
	  /* creating the Shortest Path Geometry - LINESTRING */


	  ln = gaiaAllocLinestring (tot_pts);
	  solution->Geometry = gaiaAllocGeomColl ();
	  solution->Geometry->Srid = srid;
	  gaiaInsertLinestringInGeomColl (solution->Geometry, ln);
	  tot_pts = 0;
	  pR = solution->First;
	  while (pR)
................................................................................
    if (graph->GeometryColumn == NULL)
	return srid;

    sql = sqlite3_mprintf ("SELECT srid FROM geometry_columns WHERE "
			   "Lower(f_table_name) = Lower(%Q) AND Lower(f_geometry_column) = Lower(%Q)",
			   graph->TableName, graph->GeometryColumn);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);

    if (ret != SQLITE_OK)
	return srid;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
................................................................................
			}
		      if (p_vtab->graph->AStar == 0)
			  p_vtab->currentAlgorithm = VNET_DIJKSTRA_ALGORITHM;
		  }
		return SQLITE_OK;
	    }
      }
    return SQLITE_READONLY;
}

static int
vnet_begin (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)

Deleted src/spatialite/virtualrouting.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
/*

 virtualrouting.c -- SQLite3 extension [VIRTUAL TABLE Routing - shortest path]

 version 4.4, 2016 October 7

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2016
the Initial Developer. All Rights Reserved.

Contributor(s):
Luigi Costalli luigi.costalli@gmail.com

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include <ctype.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifndef OMIT_GEOS		/* GEOS is supported */

#include <spatialite/sqlite.h>

#include <spatialite.h>
#include <spatialite/spatialite.h>
#include <spatialite/gaiaaux.h>
#include <spatialite/gaiageo.h>

static struct sqlite3_module my_route_module;

#define VROUTE_DIJKSTRA_ALGORITHM	1
#define VROUTE_A_STAR_ALGORITHM	2

#define VROUTE_ROUTING_SOLUTION		0xdd
#define VROUTE_POINT2POINT_SOLUTION	0xcc
#define VROUTE_POINT2POINT_ERROR	0xca
#define VROUTE_RANGE_SOLUTION		0xbb
#define VROUTE_TSP_SOLUTION			0xee

#define VROUTE_SHORTEST_PATH_FULL		0x70
#define VROUTE_SHORTEST_PATH_NO_LINKS	0x71
#define VROUTE_SHORTEST_PATH_NO_GEOMS	0x72
#define VROUTE_SHORTEST_PATH_SIMPLE		0x73
#define VROUTE_SHORTEST_PATH_QUICK		0x74

#define VROUTE_SHORTEST_PATH			0x91
#define VROUTE_TSP_NN					0x92
#define VROUTE_TSP_GA					0x93

#define VROUTE_INVALID_SRID	-1234

#define	VROUTE_TSP_GA_MAX_ITERATIONS	512

#define VROUTE_POINT2POINT_FROM	1
#define VROUTE_POINT2POINT_TO	2

#define VROUTE_POINT2POINT_NONE		0
#define VROUTE_POINT2POINT_INGRESS	1
#define VROUTE_POINT2POINT_START	2
#define VROUTE_POINT2POINT_END		3
#define VROUTE_POINT2POINT_EGRESS	4

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

/******************************************************************************
/
/ helper structs for destintation candidates
/
******************************************************************************/

typedef struct DestinationCandidateStruct
{
/* a candidate destination */
    char *Code;
    sqlite3_int64 Id;
    char Valid;
    struct DestinationCandidateStruct *Next;
} DestinationCandidate;
typedef DestinationCandidate *DestinationCandidatePtr;

typedef struct DestinationCandidatesListStruct
{
/* a list of candidate destination */
    int NodeCode;
    DestinationCandidatePtr First;
    DestinationCandidatePtr Last;
    int ValidItems;
} DestinationCandidatesList;
typedef DestinationCandidatesList *DestinationCandidatesListPtr;

/******************************************************************************
/
/ virtualrouting structs
/
******************************************************************************/

typedef struct RouteLinkStruct
{
/* a LINK */
    const struct RouteNodeStruct *NodeFrom;
    const struct RouteNodeStruct *NodeTo;
    sqlite3_int64 LinkRowid;
    double Cost;
} RouteLink;
typedef RouteLink *RouteLinkPtr;

typedef struct RouteNodeStruct
{
/* a NODE */
    int InternalIndex;
    sqlite3_int64 Id;
    char *Code;
    double CoordX;
    double CoordY;
    int NumLinks;
    RouteLinkPtr Links;
} RouteNode;
typedef RouteNode *RouteNodePtr;

typedef struct RoutingStruct
{
/* the main NETWORK structure */
    int Net64;
    int AStar;
    int EndianArch;
    int MaxCodeLength;
    int CurrentIndex;
    int NodeCode;
    int NumNodes;
    char *TableName;
    char *FromColumn;
    char *ToColumn;
    char *GeometryColumn;
    char *NameColumn;
    double AStarHeuristicCoeff;
    int HasZ;
    int Srid;
    RouteNodePtr Nodes;
} Routing;
typedef Routing *RoutingPtr;

typedef struct LinkSolutionStruct
{
/* Geometry corresponding to a Link used by Dijkstra shortest path solution */
    sqlite3_int64 LinkRowid;
    char *FromCode;
    char *ToCode;
    sqlite3_int64 FromId;
    sqlite3_int64 ToId;
    int Points;
    double *Coords;
    int HasZ;
    int Srid;
    char *Name;
    struct LinkSolutionStruct *Next;

} LinkSolution;
typedef LinkSolution *LinkSolutionPtr;

typedef struct RowSolutionStruct
{
/* a row into the shortest path solution */
    RouteLinkPtr Link;
    char *Name;
    struct RowSolutionStruct *Next;

} RowSolution;
typedef RowSolution *RowSolutionPtr;

typedef struct RowNodeSolutionStruct
{
/* a row into the "within Cost range" solution */
    int RouteNum;
    int RouteRow;
    RouteNodePtr Node;
    double Cost;
    int Srid;
    struct RowNodeSolutionStruct *Next;

} RowNodeSolution;
typedef RowNodeSolution *RowNodeSolutionPtr;

typedef struct ShortestPathSolutionStruct
{
/* a shortest path solution */
    LinkSolutionPtr FirstLink;
    LinkSolutionPtr LastLink;
    RouteNodePtr From;
    RouteNodePtr To;
    char *Undefined;
    sqlite3_int64 UndefinedId;
    RowSolutionPtr First;
    RowSolutionPtr Last;
    RowNodeSolutionPtr FirstNode;
    RowNodeSolutionPtr LastNode;
    RowNodeSolutionPtr CurrentNodeRow;
    double TotalCost;
    gaiaGeomCollPtr Geometry;
    struct ShortestPathSolutionStruct *Next;
} ShortestPathSolution;
typedef ShortestPathSolution *ShortestPathSolutionPtr;

typedef struct ResultsetRowStruct
{
/* a row into the resultset */
    int RouteNum;
    int RouteRow;
    int Point2PointRole;
    RouteNodePtr From;
    RouteNodePtr To;
    char *Undefined;
    sqlite3_int64 UndefinedId;
    RowSolutionPtr linkRef;
    double TotalCost;
    gaiaGeomCollPtr Geometry;
    struct ResultsetRowStruct *Next;

} ResultsetRow;
typedef ResultsetRow *ResultsetRowPtr;

typedef struct RoutingMultiDestStruct
{
/* helper struct supporting multiple destinations */
    int CodeNode;
    int Items;
    int Next;
    RouteNodePtr *To;
    char *Found;
    sqlite3_int64 *Ids;
    char **Codes;
} RoutingMultiDest;
typedef RoutingMultiDest *RoutingMultiDestPtr;

typedef struct MultiSolutionStruct
{
/* multiple shortest path solutions */
    unsigned char Mode;
    RouteNodePtr From;
    double MaxCost;
    RoutingMultiDestPtr MultiTo;
    ResultsetRowPtr FirstRow;
    ResultsetRowPtr LastRow;
    ResultsetRowPtr CurrentRow;
    ShortestPathSolutionPtr First;
    ShortestPathSolutionPtr Last;
    RowNodeSolutionPtr FirstNode;
    RowNodeSolutionPtr LastNode;
    RowSolutionPtr FirstLink;
    RowSolutionPtr LastLink;
    gaiaGeomCollPtr FirstGeom;
    gaiaGeomCollPtr LastGeom;
    RowNodeSolutionPtr CurrentNodeRow;
    sqlite3_int64 CurrentRowId;
    int RouteNum;
} MultiSolution;
typedef MultiSolution *MultiSolutionPtr;

typedef struct Point2PointCandidateStruct
{
/* wrapping a Point2Point candidate */
    sqlite3_int64 linkRowid;
    char *codNodeFrom;
    char *codNodeTo;
    sqlite3_int64 idNodeFrom;
    sqlite3_int64 idNodeTo;
    int reverse;
    int valid;
    gaiaGeomCollPtr path;
    double pathLen;
    double extraLen;
    double percent;
    struct Point2PointCandidateStruct *next;
} Point2PointCandidate;
typedef Point2PointCandidate *Point2PointCandidatePtr;

typedef struct Point2PointNodeStruct
{
/* wrapping a Point2Point Node */
    char *codNode;
    sqlite3_int64 idNode;
    Point2PointCandidatePtr parent;
    struct Point2PointNodeStruct *next;
} Point2PointNode;
typedef Point2PointNode *Point2PointNodePtr;

typedef struct Point2PointSolutionStruct
{
/* shortest path solution - Point2Point */
    unsigned char Mode;
    int validFrom;
    double xFrom;
    double yFrom;
    double zFrom;
    int validTo;
    double xTo;
    double yTo;
    double zTo;
    int srid;
    Point2PointCandidatePtr firstFromCandidate;
    Point2PointCandidatePtr lastFromCandidate;
    Point2PointCandidatePtr firstToCandidate;
    Point2PointCandidatePtr lastToCandidate;
    Point2PointNodePtr firstFromNode;
    Point2PointNodePtr lastFromNode;
    Point2PointNodePtr firstToNode;
    Point2PointNodePtr lastToNode;
    double totalCost;
    Point2PointCandidatePtr fromCandidate;
    Point2PointCandidatePtr toCandidate;
    gaiaDynamicLinePtr dynLine;
    int hasZ;
    ResultsetRowPtr FirstRow;
    ResultsetRowPtr LastRow;
    ResultsetRowPtr CurrentRow;
    sqlite3_int64 CurrentRowId;
} Point2PointSolution;
typedef Point2PointSolution *Point2PointSolutionPtr;

/******************************************************************************
/
/ TSP structs
/
******************************************************************************/

typedef struct TspTargetsStruct
{
/* TSP helper struct */
    unsigned char Mode;
    double TotalCost;
    RouteNodePtr From;
    int Count;
    RouteNodePtr *To;
    char *Found;
    double *Costs;
    ShortestPathSolutionPtr *Solutions;
    ShortestPathSolutionPtr LastSolution;
} TspTargets;
typedef TspTargets *TspTargetsPtr;

typedef struct TspGaSubDistanceStruct
{
/* a cache sub-item for storing TSP GA costs */
    RouteNodePtr CityTo;
    double Cost;
} TspGaSubDistance;
typedef TspGaSubDistance *TspGaSubDistancePtr;

typedef struct TspGaDistanceStruct
{
/* a cache item for storing TSP GA costs */
    RouteNodePtr CityFrom;
    int Cities;
    TspGaSubDistancePtr *Distances;
    int NearestIndex;
} TspGaDistance;
typedef TspGaDistance *TspGaDistancePtr;

typedef struct TspGaSolutionStruct
{
/* TSP GA solution struct */
    int Cities;
    RouteNodePtr *CitiesFrom;
    RouteNodePtr *CitiesTo;
    double *Costs;
    double TotalCost;
} TspGaSolution;
typedef TspGaSolution *TspGaSolutionPtr;

typedef struct TspGaPopulationStruct
{
/* TSP GA helper struct */
    int Count;
    int Cities;
    TspGaSolutionPtr *Solutions;
    TspGaSolutionPtr *Offsprings;
    TspGaDistancePtr *Distances;
    char *RandomSolutionsSql;
    char *RandomIntervalSql;
} TspGaPopulation;
typedef TspGaPopulation *TspGaPopulationPtr;

/******************************************************************************
/
/ Dijkstra and A* common structs
/
******************************************************************************/

typedef struct RoutingNode
{
    int Id;
    struct RoutingNode **To;
    RouteLinkPtr *Link;
    int DimTo;
    struct RoutingNode *PreviousNode;
    RouteNodePtr Node;
    RouteLinkPtr xLink;
    double Distance;
    double HeuristicDistance;
    int Inspected;
} RoutingNode;
typedef RoutingNode *RoutingNodePtr;

typedef struct RoutingNodes
{
    RoutingNodePtr Nodes;
    RouteLinkPtr *LinksBuffer;
    RoutingNodePtr *NodesBuffer;
    int Dim;
    int DimLink;
} RoutingNodes;
typedef RoutingNodes *RoutingNodesPtr;

typedef struct HeapNode
{
    RoutingNodePtr Node;
    double Distance;
} HeapNode;
typedef HeapNode *HeapNodePtr;

typedef struct RoutingHeapStruct
{
    HeapNodePtr Nodes;
    int Count;
} RoutingHeap;
typedef RoutingHeap *RoutingHeapPtr;

/******************************************************************************
/
/ VirtualTable structs
/
******************************************************************************/

typedef struct virtualroutingStruct
{
/* extends the sqlite3_vtab struct */
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */
    RoutingPtr graph;		/* the NETWORK structure */
    RoutingNodesPtr routing;	/* the ROUTING structure */
    int currentAlgorithm;	/* the currently selected Shortest Path Algorithm */
    int currentRequest;		/* the currently selected Shortest Path Request */
    int currentOptions;		/* the currently selected Shortest Path Options */
    char currentDelimiter;	/* the currently set delimiter char */
    double Tolerance;		/* the currently set Tolerance value [Point2Point] */
    MultiSolutionPtr multiSolution;	/* the current multiple solution */
    Point2PointSolutionPtr point2PointSolution;	/* the current Point2Point solution */
    int eof;			/* the EOF marker */
} virtualrouting;
typedef virtualrouting *virtualroutingPtr;

typedef struct virtualroutingCursortStruct
{
/* extends the sqlite3_vtab_cursor struct */
    virtualroutingPtr pVtab;	/* Virtual table of this cursor */
} virtualroutingCursor;
typedef virtualroutingCursor *virtualroutingCursorPtr;

/*
/
/  implementation of the Dijkstra Shortest Path algorithm
/
////////////////////////////////////////////////////////////
/
/ Author: Luigi Costalli luigi.costalli@gmail.com
/ version 1.0. 2008 October 21
/
*/

static RoutingNodesPtr
routing_init (RoutingPtr graph)
{
/* allocating and initializing the ROUTING struct */
    int i;
    int j;
    int cnt = 0;
    RoutingNodesPtr nd;
    RoutingNodePtr ndn;
    RouteNodePtr nn;
/* allocating the main Nodes struct */
    nd = malloc (sizeof (RoutingNodes));
/* allocating and initializing  Nodes array */
    nd->Nodes = malloc (sizeof (RoutingNode) * graph->NumNodes);
    nd->Dim = graph->NumNodes;
    nd->DimLink = 0;
/* pre-alloc buffer strategy - GENSCHER 2010-01-05 */
    for (i = 0; i < graph->NumNodes; cnt += graph->Nodes[i].NumLinks, i++);
    nd->NodesBuffer = malloc (sizeof (RoutingNodePtr) * cnt);
    nd->LinksBuffer = malloc (sizeof (RouteLinkPtr) * cnt);

    cnt = 0;
    for (i = 0; i < graph->NumNodes; i++)
      {
	  /* initializing the Nodes array */
	  nn = graph->Nodes + i;
	  ndn = nd->Nodes + i;
	  ndn->Id = nn->InternalIndex;
	  ndn->DimTo = nn->NumLinks;
	  ndn->Node = nn;
	  ndn->To = &(nd->NodesBuffer[cnt]);
	  ndn->Link = &(nd->LinksBuffer[cnt]);
	  cnt += nn->NumLinks;

	  for (j = 0; j < nn->NumLinks; j++)
	    {
		/*  setting the outcoming Links for the current Node */
		nd->DimLink++;
		ndn->To[j] = nd->Nodes + nn->Links[j].NodeTo->InternalIndex;
		ndn->Link[j] = nn->Links + j;
	    }
      }
    return (nd);
}

static void
routing_free (RoutingNodes * e)
{
/* memory cleanup; freeing the ROUTING struct */
    free (e->LinksBuffer);
    free (e->NodesBuffer);
    free (e->Nodes);
    free (e);
}

static RoutingHeapPtr
routing_heap_init (int n)
{
/* allocating and initializing the Heap (min-priority queue) */
    RoutingHeapPtr heap = malloc (sizeof (RoutingHeap));
    heap->Count = 0;
    heap->Nodes = malloc (sizeof (HeapNode) * (n + 1));
    return heap;
}

static void
routing_heap_reset (RoutingHeapPtr heap)
{
/* resetting the Heap (min-priority queue) */
    if (heap == NULL)
	return;
    heap->Count = 0;
}

static void
routing_heap_free (RoutingHeapPtr heap)
{
/* freeing the Heap (min-priority queue) */
    if (heap->Nodes != NULL)
	free (heap->Nodes);
    free (heap);
}

static void
dijkstra_insert (RoutingNodePtr node, HeapNodePtr heap, int size)
{
/* inserting a new Node and rearranging the heap */
    int i;
    HeapNode tmp;
    i = size + 1;
    heap[i].Node = node;
    heap[i].Distance = node->Distance;
    if (i / 2 < 1)
	return;
    while (heap[i].Distance < heap[i / 2].Distance)
      {
	  tmp = heap[i];
	  heap[i] = heap[i / 2];
	  heap[i / 2] = tmp;
	  i /= 2;
	  if (i / 2 < 1)
	      break;
      }
}

static void
dijkstra_enqueue (RoutingHeapPtr heap, RoutingNodePtr node)
{
/* enqueuing a Node into the heap */
    dijkstra_insert (node, heap->Nodes, heap->Count);
    heap->Count += 1;
}

static void
dijkstra_shiftdown (HeapNodePtr heap, int size, int i)
{
/* rearranging the heap after removing */
    int c;
    HeapNode tmp;
    for (;;)
      {
	  c = i * 2;
	  if (c > size)
	      break;
	  if (c < size)
	    {
		if (heap[c].Distance > heap[c + 1].Distance)
		    ++c;
	    }
	  if (heap[c].Distance < heap[i].Distance)
	    {
		/* swapping two Nodes */
		tmp = heap[c];
		heap[c] = heap[i];
		heap[i] = tmp;
		i = c;
	    }
	  else
	      break;
      }
}

static RoutingNodePtr
dijkstra_remove_min (HeapNodePtr heap, int size)
{
/* removing the min-priority Node from the heap */
    RoutingNodePtr node = heap[1].Node;
    heap[1] = heap[size];
    --size;
    dijkstra_shiftdown (heap, size, 1);
    return node;
}

static RoutingNodePtr
routing_dequeue (RoutingHeapPtr heap)
{
/* dequeuing a Node from the heap */
    RoutingNodePtr node = dijkstra_remove_min (heap->Nodes, heap->Count);
    heap->Count -= 1;
    return node;
}

/* END of Luigi Costalli Dijkstra Shortest Path implementation */

static void
delete_solution (ShortestPathSolutionPtr solution)
{
/* deleting the current solution */
    LinkSolutionPtr pA;
    LinkSolutionPtr pAn;
    RowSolutionPtr pR;
    RowSolutionPtr pRn;
    RowNodeSolutionPtr pN;
    RowNodeSolutionPtr pNn;
    if (!solution)
	return;
    pA = solution->FirstLink;
    while (pA)
      {
	  pAn = pA->Next;
	  if (pA->FromCode)
	      free (pA->FromCode);
	  if (pA->ToCode)
	      free (pA->ToCode);
	  if (pA->Coords)
	      free (pA->Coords);
	  if (pA->Name)
	      free (pA->Name);
	  free (pA);
	  pA = pAn;
      }
    pR = solution->First;
    while (pR)
      {
	  pRn = pR->Next;
	  if (pR->Name)
	      free (pR->Name);
	  free (pR);
	  pR = pRn;
      }
    pN = solution->FirstNode;
    while (pN)
      {
	  pNn = pN->Next;
	  free (pN);
	  pN = pNn;
      }
    if (solution->Undefined != NULL)
	free (solution->Undefined);
    if (solution->Geometry)
	gaiaFreeGeomColl (solution->Geometry);
    free (solution);
}

static ShortestPathSolutionPtr
alloc_solution (void)
{
/* allocates and initializes the current solution */
    ShortestPathSolutionPtr p = malloc (sizeof (ShortestPathSolution));
    p->FirstLink = NULL;
    p->LastLink = NULL;
    p->From = NULL;
    p->To = NULL;
    p->Undefined = NULL;
    p->UndefinedId = 0;
    p->First = NULL;
    p->Last = NULL;
    p->FirstNode = NULL;
    p->LastNode = NULL;
    p->CurrentNodeRow = NULL;
    p->TotalCost = 0.0;
    p->Geometry = NULL;
    p->Next = NULL;
    return p;
}

static void
add_link_to_solution (ShortestPathSolutionPtr solution, RouteLinkPtr link)
{
/* inserts a Link into the Shortest Path solution */
    RowSolutionPtr p = malloc (sizeof (RowSolution));
    p->Link = link;
    p->Name = NULL;
    p->Next = NULL;
    solution->TotalCost += link->Cost;
    if (!(solution->First))
	solution->First = p;
    if (solution->Last)
	solution->Last->Next = p;
    solution->Last = p;
}

static void
add_node_to_solution (MultiSolutionPtr multiSolution, RoutingNodePtr node,
		      int srid, int index)
{
/* inserts a Node into the "within Cost range" solution */
    RowNodeSolutionPtr p = malloc (sizeof (RowNodeSolution));
    p->RouteNum = 0;
    p->RouteRow = index;
    p->Node = node->Node;
    p->Cost = node->Distance;
    p->Srid = srid;
    p->Next = NULL;
    if (!(multiSolution->FirstNode))
	multiSolution->FirstNode = p;
    if (multiSolution->LastNode)
	multiSolution->LastNode->Next = p;
    multiSolution->LastNode = p;
}

static void
set_link_name_into_solution (ShortestPathSolutionPtr solution,
			     sqlite3_int64 link_id, const char *name)
{
/* sets the Name identifyin a Link into the Solution */
    RowSolutionPtr row = solution->First;
    while (row != NULL)
      {
	  if (row->Link->LinkRowid == link_id)
	    {
		int len = strlen (name);
		if (row->Name != NULL)
		    free (row->Name);
		row->Name = malloc (len + 1);
		strcpy (row->Name, name);
		return;
	    }
	  row = row->Next;
      }
}

static void
add_link_geometry_to_solution (ShortestPathSolutionPtr solution,
			       sqlite3_int64 link_id, const char *from_code,
			       const char *to_code, sqlite3_int64 from_id,
			       sqlite3_int64 to_id, gaiaGeomCollPtr geom,
			       const char *name)
{
/* inserts a Link Geometry into the Shortest Path solution */
    int iv;
    int points;
    double *coords;
    int has_z;
    int len;
    LinkSolutionPtr p = malloc (sizeof (LinkSolution));
    p->LinkRowid = link_id;
    p->FromCode = NULL;
    len = strlen (from_code);
    if (len > 0)
      {
	  p->FromCode = malloc (len + 1);
	  strcpy (p->FromCode, from_code);
      }
    p->ToCode = NULL;
    len = strlen (to_code);
    if (len > 0)
      {
	  p->ToCode = malloc (len + 1);
	  strcpy (p->ToCode, to_code);
      }
    p->FromId = from_id;
    p->ToId = to_id;

/* preparing the Link's Geometry */
    points = geom->FirstLinestring->Points;
    if (geom->DimensionModel == GAIA_XY_Z
	|| geom->DimensionModel == GAIA_XY_Z_M)
      {
	  has_z = 1;
	  coords = malloc (sizeof (double) * (points * 3));
      }
    else
      {
	  has_z = 0;
	  coords = malloc (sizeof (double) * (points * 2));
      }
    for (iv = 0; iv < points; iv++)
      {
	  double x;
	  double y;
	  double z;
	  double m;
	  if (geom->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (geom->FirstLinestring->Coords, iv, &x, &y, &z);
	    }
	  else if (geom->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (geom->FirstLinestring->Coords, iv, &x, &y, &m);
	    }
	  else if (geom->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (geom->FirstLinestring->Coords, iv, &x, &y, &z,
				  &m);
	    }
	  else
	    {
		gaiaGetPoint (geom->FirstLinestring->Coords, iv, &x, &y);
	    }
	  if (has_z)
	    {
		*(coords + ((iv * 3) + 0)) = x;
		*(coords + ((iv * 3) + 1)) = y;
		*(coords + ((iv * 3) + 2)) = z;
	    }
	  else
	    {
		*(coords + ((iv * 2) + 0)) = x;
		*(coords + ((iv * 2) + 1)) = y;
	    }
      }
    p->Points = points;
    p->Coords = coords;
    p->HasZ = has_z;
    p->Srid = geom->Srid;
    if (name == NULL)
	p->Name = NULL;
    else
      {
	  len = strlen (name);
	  p->Name = malloc (len + 1);
	  strcpy (p->Name, name);
      }
    p->Next = NULL;
    if (!(solution->FirstLink))
	solution->FirstLink = p;
    if (solution->LastLink)
	solution->LastLink->Next = p;
    solution->LastLink = p;
}

static void
normalizeCoords (LinkSolutionPtr pA)
{
/* inverting the Link's direction */
    int iv;
    int pt = 0;
    double x;
    double y;
    double z;
    double *coords;

    if (pA->HasZ)
	coords = malloc (sizeof (double) * (pA->Points * 3));
    else
	coords = malloc (sizeof (double) * (pA->Points * 2));
/* copying Link's vertices in reverse order */
    for (iv = pA->Points - 1; iv >= 0; iv--)
      {
	  if (pA->HasZ)
	    {
		x = *(pA->Coords + ((iv * 3) + 0));
		y = *(pA->Coords + ((iv * 3) + 1));
		z = *(pA->Coords + ((iv * 3) + 2));
		*(coords + ((pt * 3) + 0)) = x;
		*(coords + ((pt * 3) + 1)) = y;
		*(coords + ((pt * 3) + 2)) = z;
		pt++;
	    }
	  else
	    {
		x = *(pA->Coords + ((iv * 2) + 0));
		y = *(pA->Coords + ((iv * 2) + 1));
		*(coords + ((pt * 2) + 0)) = x;
		*(coords + ((pt * 2) + 1)) = y;
		pt++;
	    }
      }
    free (pA->Coords);
    pA->Coords = coords;
}

static void
addLinkPoints2DynLine (gaiaDynamicLinePtr dyn, LinkSolutionPtr pA, double cost)
{
/* adding Link's points to the final solution Geometry */
    int iv;
    double x;
    double y;
    double z = 0.0;
    double m = 0.0;
    double base_m = 0.0;
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr geo2;
    gaiaLinestringPtr ln;

    if (pA->HasZ)
	geom = gaiaAllocGeomCollXYZ ();
    else
	geom = gaiaAllocGeomColl ();
    ln = gaiaAddLinestringToGeomColl (geom, pA->Points);

    for (iv = 0; iv < pA->Points; iv++)
      {
	  if (pA->HasZ)
	    {
		x = *(pA->Coords + ((iv * 3) + 0));
		y = *(pA->Coords + ((iv * 3) + 1));
		z = *(pA->Coords + ((iv * 3) + 2));
		gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
	    }
	  else
	    {
		x = *(pA->Coords + ((iv * 2) + 0));
		y = *(pA->Coords + ((iv * 2) + 1));
		gaiaSetPoint (ln->Coords, iv, x, y);
	    }
      }
    geo2 = gaiaAddMeasure (geom, 0.0, cost);
    ln = geo2->FirstLinestring;
    gaiaFreeGeomColl (geom);
    if (dyn->Last != NULL)
	base_m = dyn->Last->M;

    for (iv = 0; iv < ln->Points; iv++)
      {
	  z = 0.0;
	  if (pA->HasZ)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  if (dyn->Last != NULL)
	    {
		double prev_x = dyn->Last->X;
		double prev_y = dyn->Last->Y;
		if (x == prev_x && y == prev_y)
		    continue;	/* skipping repeated points */
	    }
	  gaiaAppendPointZMToDynamicLine (dyn, x, y, z, base_m + m);
      }
    gaiaFreeGeomColl (geo2);
}

static double
findLinkCost (sqlite3_int64 linkRowid, ShortestPathSolutionPtr solution)
{
/* searching for the Cost of the given Link */
    RowSolutionPtr row = solution->First;
    while (row != NULL)
      {
	  if (row->Link != NULL)
	    {
		if (row->Link->LinkRowid == linkRowid)
		    return row->Link->Cost;
	    }
	  row = row->Next;
      }
    return -1.5;
}

static void
build_solution (sqlite3 * handle, int options, RoutingPtr graph,
		ShortestPathSolutionPtr solution,
		RouteLinkPtr * shortest_path, int cnt)
{
/* formatting the Shortest Path solution */
    int i;
    char *sql;
    int err;
    int error = 0;
    int ret;
    sqlite3_int64 link_id;
    const unsigned char *blob;
    int size;
    sqlite3_int64 from_id;
    sqlite3_int64 to_id;
    char *from_code;
    char *to_code;
    char *name;
    int tbd;
    int ind;
    int base = 0;
    int block = 128;
    int how_many;
    sqlite3_stmt *stmt = NULL;
    char *xfrom;
    char *xto;
    char *xgeom;
    char *xname;
    char *xtable;
    gaiaOutBuffer sql_statement;
    if (options == VROUTE_SHORTEST_PATH_SIMPLE)
      {
	  /* building the solution */
	  for (i = 0; i < cnt; i++)
	      solution->TotalCost += shortest_path[i]->Cost;
      }
    else if (options == VROUTE_SHORTEST_PATH_QUICK)
      {
	  /* only for internal usage: Point2Point */
	  for (i = 0; i < cnt; i++)
	      add_link_to_solution (solution, shortest_path[i]);
	  if (shortest_path)
	      free (shortest_path);
	  return;
      }
    else
      {
	  /* building the solution */
	  for (i = 0; i < cnt; i++)
	      add_link_to_solution (solution, shortest_path[i]);
      }
    if (options == VROUTE_SHORTEST_PATH_SIMPLE)
      {
	  if (shortest_path)
	      free (shortest_path);
	  return;
      }
    if (graph->GeometryColumn == NULL && graph->NameColumn == NULL)
      {
	  if (shortest_path)
	      free (shortest_path);
	  return;
      }
    if (options == VROUTE_SHORTEST_PATH_NO_GEOMS && graph->NameColumn == NULL)
      {
	  if (shortest_path)
	      free (shortest_path);
	  return;
      }

    tbd = cnt;
    while (tbd > 0)
      {
	  /* requesting max 128 links at each time */
	  if (tbd < block)
	      how_many = tbd;
	  else
	      how_many = block;
/* preparing the Geometry representing this solution [reading links] */
	  gaiaOutBufferInitialize (&sql_statement);
	  if (graph->NameColumn)
	    {
		/* a Name column is defined */
		if (graph->GeometryColumn == NULL
		    || options == VROUTE_SHORTEST_PATH_NO_GEOMS)
		  {
		      xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
		      xto = gaiaDoubleQuotedSql (graph->ToColumn);
		      xname = gaiaDoubleQuotedSql (graph->NameColumn);
		      xtable = gaiaDoubleQuotedSql (graph->TableName);
		      sql =
			  sqlite3_mprintf
			  ("SELECT ROWID, \"%s\", \"%s\", NULL, \"%s\" FROM \"%s\" WHERE ROWID IN (",
			   xfrom, xto, xname, xtable);
		      free (xfrom);
		      free (xto);
		      free (xname);
		      free (xtable);
		  }
		else
		  {
		      xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
		      xto = gaiaDoubleQuotedSql (graph->ToColumn);
		      xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
		      xname = gaiaDoubleQuotedSql (graph->NameColumn);
		      xtable = gaiaDoubleQuotedSql (graph->TableName);
		      sql =
			  sqlite3_mprintf
			  ("SELECT ROWID, \"%s\", \"%s\", \"%s\", \"%s\" FROM \"%s\" WHERE ROWID IN (",
			   xfrom, xto, xgeom, xname, xtable);
		      free (xfrom);
		      free (xto);
		      free (xgeom);
		      free (xname);
		      free (xtable);
		  }
		gaiaAppendToOutBuffer (&sql_statement, sql);
		sqlite3_free (sql);
	    }
	  else
	    {
		/* no Name column is defined */
		xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
		xto = gaiaDoubleQuotedSql (graph->ToColumn);
		xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
		xtable = gaiaDoubleQuotedSql (graph->TableName);
		sql =
		    sqlite3_mprintf
		    ("SELECT ROWID, \"%s\", \"%s\", \"%s\" FROM \"%s\" WHERE ROWID IN (",
		     xfrom, xto, xgeom, xtable);
		free (xfrom);
		free (xto);
		free (xgeom);
		free (xtable);
		gaiaAppendToOutBuffer (&sql_statement, sql);
		sqlite3_free (sql);
	    }
	  for (i = 0; i < how_many; i++)
	    {
		if (i == 0)
		    gaiaAppendToOutBuffer (&sql_statement, "?");
		else
		    gaiaAppendToOutBuffer (&sql_statement, ",?");
	    }
	  gaiaAppendToOutBuffer (&sql_statement, ")");
	  if (sql_statement.Error == 0 && sql_statement.Buffer != NULL)
	    {
		ret =
		    sqlite3_prepare_v2 (handle, sql_statement.Buffer,
					strlen (sql_statement.Buffer), &stmt,
					NULL);
	    }
	  else
	      ret = SQLITE_ERROR;
	  gaiaOutBufferReset (&sql_statement);
	  if (ret != SQLITE_OK)
	    {
		error = 1;
		goto abort;
	    }
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  ind = 1;
	  for (i = 0; i < cnt; i++)
	    {
		if (i < base)
		    continue;
		if (i >= (base + how_many))
		    break;
		sqlite3_bind_int64 (stmt, ind, shortest_path[i]->LinkRowid);
		ind++;
	    }
	  while (1)
	    {
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE)
		    break;
		if (ret == SQLITE_ROW)
		  {
		      link_id = -1;
		      from_id = -1;
		      to_id = -1;
		      from_code = NULL;
		      to_code = NULL;
		      blob = NULL;
		      size = 0;
		      name = NULL;
		      err = 0;
		      if (sqlite3_column_type (stmt, 0) == SQLITE_INTEGER)
			  link_id = sqlite3_column_int64 (stmt, 0);
		      else
			  err = 1;
		      if (graph->NodeCode)
			{
			    /* nodes are identified by TEXT codes */
			    if (sqlite3_column_type (stmt, 1) == SQLITE_TEXT)
				from_code =
				    (char *) sqlite3_column_text (stmt, 1);
			    else
				err = 1;
			    if (sqlite3_column_type (stmt, 2) == SQLITE_TEXT)
				to_code =
				    (char *) sqlite3_column_text (stmt, 2);
			    else
				err = 1;
			}
		      else
			{
			    /* nodes are identified by INTEGER ids */
			    if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
				from_id = sqlite3_column_int64 (stmt, 1);
			    else
				err = 1;
			    if (sqlite3_column_type (stmt, 2) == SQLITE_INTEGER)
				to_id = sqlite3_column_int64 (stmt, 2);
			    else
				err = 1;
			}
		      if (graph->GeometryColumn != NULL
			  && options != VROUTE_SHORTEST_PATH_NO_GEOMS)
			{
			    if (sqlite3_column_type (stmt, 3) == SQLITE_BLOB)
			      {
				  blob =
				      (const unsigned char *)
				      sqlite3_column_blob (stmt, 3);
				  size = sqlite3_column_bytes (stmt, 3);
			      }
			    else
				err = 1;
			}
		      if (graph->NameColumn)
			{
			    if (sqlite3_column_type (stmt, 4) == SQLITE_TEXT)
				name = (char *) sqlite3_column_text (stmt, 4);
			}
		      if (err)
			  error = 1;
		      else if (graph->GeometryColumn != NULL
			       && options != VROUTE_SHORTEST_PATH_NO_GEOMS)
			{
			    /* saving the Link's geometry into the temporary struct */
			    gaiaGeomCollPtr geom =
				gaiaFromSpatiaLiteBlobWkb (blob, size);
			    if (geom)
			      {
				  /* OK, we have fetched a valid Geometry */
				  if (geom->FirstPoint == NULL
				      && geom->FirstPolygon == NULL
				      && geom->FirstLinestring != NULL
				      && geom->FirstLinestring ==
				      geom->LastLinestring)
				    {
					/* Geometry is LINESTRING as expected */

					if (from_code == NULL)
					    from_code = "";
					if (to_code == NULL)
					    to_code = "";
					add_link_geometry_to_solution (solution,
								       link_id,
								       from_code,
								       to_code,
								       from_id,
								       to_id,
								       geom,
								       name);
				    }
				  else
				      error = 1;
				  gaiaFreeGeomColl (geom);
			      }
			    else
				error = 1;
			}
		      else if (name != NULL)
			  set_link_name_into_solution (solution, link_id, name);
		  }
	    }
	  sqlite3_finalize (stmt);
	  tbd -= how_many;
	  base += how_many;
      }
  abort:
    if (shortest_path)
	free (shortest_path);
    if (!error && graph->GeometryColumn != NULL
	&& options != VROUTE_SHORTEST_PATH_NO_GEOMS)
      {
	  /* building the Geometry representing the Shortest Path Solution */
	  gaiaLinestringPtr ln;
	  int iv = 0;
	  int tot_pts = 0;
	  RowSolutionPtr pR;
	  LinkSolutionPtr pA;
	  int srid = -1;
	  int has_z = 0;
	  gaiaGeomCollPtr geom;
	  gaiaPointPtr pt;
	  gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
	  if (solution->FirstLink)
	    {
		srid = solution->FirstLink->Srid;
		has_z = solution->FirstLink->HasZ;
	    }
	  pR = solution->First;
	  while (pR)
	    {
		/* building the Solution as a Dynamic Line */
		pA = solution->FirstLink;
		while (pA)
		  {
		      if (pR->Link->LinkRowid == pA->LinkRowid)
			{
			    /* copying vertices from corresponding Link's Geometry */
			    int reverse;
			    double cost;
			    if (graph->NodeCode)
			      {
				  /* nodes are identified by TEXT codes */
				  if (strcmp
				      (pR->Link->NodeFrom->Code,
				       pA->ToCode) == 0)
				      reverse = 1;
				  else
				      reverse = 0;
			      }
			    else
			      {
				  /* nodes are identified by INTEGER ids */
				  if (pR->Link->NodeFrom->Id == pA->ToId)
				      reverse = 1;
				  else
				      reverse = 0;
			      }
			    if (reverse)
				normalizeCoords (pA);
			    cost = findLinkCost (pA->LinkRowid, solution);
			    addLinkPoints2DynLine (dyn, pA, cost);
			    if (pA->Name)
			      {
				  int len = strlen (pA->Name);
				  pR->Name = malloc (len + 1);
				  strcpy (pR->Name, pA->Name);
			      }
			    break;
			}
		      pA = pA->Next;
		  }
		pR = pR->Next;
	    }
	  /* building the result path Geometry */
	  if (has_z)
	      geom = gaiaAllocGeomCollXYZM ();
	  else
	      geom = gaiaAllocGeomCollXYM ();
	  geom->Srid = srid;
	  pt = dyn->First;
	  while (pt != NULL)
	    {
		/* counting how many points are there */
		tot_pts++;
		pt = pt->Next;
	    }
	  ln = gaiaAddLinestringToGeomColl (geom, tot_pts);
	  iv = 0;
	  pt = dyn->First;
	  while (pt != NULL)
	    {
		/* copying points from Dynamic Line to Linestring */
		if (has_z)
		  {
		      gaiaSetPointXYZM (ln->Coords, iv, pt->X, pt->Y, pt->Z,
					pt->M);
		  }
		else
		  {
		      gaiaSetPointXYM (ln->Coords, iv, pt->X, pt->Y, pt->M);
		  }
		iv++;
		pt = pt->Next;
	    }
	  solution->Geometry = geom;
	  gaiaFreeDynamicLine (dyn);
      }
    else
      {
	  RowSolutionPtr pR;
	  LinkSolutionPtr pA;
	  if (graph->NameColumn != NULL)
	    {
		pR = solution->First;
		while (pR)
		  {
		      pA = solution->FirstLink;
		      while (pA)
			{
			    if (pA->Name)
			      {
				  int len = strlen (pA->Name);
				  pR->Name = malloc (len + 1);
				  strcpy (pR->Name, pA->Name);
			      }
			    pA = pA->Next;
			}
		      pR = pR->Next;
		  }
	    }
      }

    if (options == VROUTE_SHORTEST_PATH_NO_LINKS)
      {
	  /* deleting Links */
	  RowSolutionPtr pR;
	  RowSolutionPtr pRn;
	  pR = solution->First;
	  while (pR)
	    {
		pRn = pR->Next;
		if (pR->Name)
		    free (pR->Name);
		free (pR);
		pR = pRn;
	    }
	  solution->First = NULL;
	  solution->Last = NULL;
      }
}

static void
build_multi_solution (MultiSolutionPtr multiSolution)
{
/* formatting the Shortest Path resultset */
    ShortestPathSolutionPtr pS;
    int route_num = 0;
    pS = multiSolution->First;
    while (pS != NULL)
      {
	  /* inserting the Route Header */
	  int route_row = 0;
	  RowSolutionPtr pA;
	  ResultsetRowPtr row = malloc (sizeof (ResultsetRow));
	  route_num = multiSolution->RouteNum++;
	  row->RouteNum = route_num;
	  row->RouteRow = route_row++;
	  row->Point2PointRole = VROUTE_POINT2POINT_NONE;
	  row->From = pS->From;
	  row->To = pS->To;
	  row->Undefined = pS->Undefined;
	  pS->Undefined = NULL;
	  row->UndefinedId = pS->UndefinedId;
	  row->linkRef = NULL;
	  row->TotalCost = pS->TotalCost;
	  row->Geometry = pS->Geometry;
	  row->Next = NULL;
	  if (multiSolution->FirstRow == NULL)
	      multiSolution->FirstRow = row;
	  if (multiSolution->LastRow != NULL)
	      multiSolution->LastRow->Next = row;
	  multiSolution->LastRow = row;

	  pA = pS->First;
	  while (pA != NULL)
	    {
		/* inserting Route's traversed Links */
		row = malloc (sizeof (ResultsetRow));
		row->RouteNum = route_num;
		row->RouteRow = route_row++;
		row->Point2PointRole = VROUTE_POINT2POINT_NONE;
		row->From = NULL;
		row->To = NULL;
		row->Undefined = NULL;
		row->linkRef = pA;
		row->TotalCost = 0.0;
		row->Geometry = NULL;
		row->Next = NULL;
		if (multiSolution->FirstRow == NULL)
		    multiSolution->FirstRow = row;
		if (multiSolution->LastRow != NULL)
		    multiSolution->LastRow->Next = row;
		multiSolution->LastRow = row;
		pA = pA->Next;
	    }
	  pS = pS->Next;
      }
}

static int
addPoint2DynLine (const double *coords, int dimensionModel, int iv,
		  gaiaDynamicLinePtr dyn, double base_m)
{
/* adding a Point from Linestring to Dynamic Line */
    double x;
    double y;
    double z = 0.0;
    double m = 0.0;
    int has_z = 0;
    if (dimensionModel == GAIA_XY_Z)
      {
	  has_z = 1;
	  gaiaGetPointXYZ (coords, iv, &x, &y, &z);
      }
    else if (dimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (coords, iv, &x, &y, &m);
      }
    else if (dimensionModel == GAIA_XY_Z_M)
      {
	  has_z = 1;
	  gaiaGetPointXYZM (coords, iv, &x, &y, &z, &m);
      }
    else
      {
	  gaiaGetPoint (coords, iv, &x, &y);
      }
    if (dyn->Last != NULL)
      {
	  double prev_x = dyn->Last->X;
	  double prev_y = dyn->Last->Y;
	  if (x == prev_x && y == prev_y)
	      return has_z;	/* skipping repeated points */
      }
    m += base_m;
    gaiaAppendPointZMToDynamicLine (dyn, x, y, z, m);
    return has_z;
}

static void
aux_tsp_add_solution (MultiSolutionPtr multiSolution,
		      ShortestPathSolutionPtr pS, int *route_num,
		      gaiaDynamicLinePtr dyn)
{
/* helper function: adding a solutiont into the TSP resultset */
    RowSolutionPtr pA;
    ResultsetRowPtr row;
    int route_row = 0;

/* inserting the Route Header */
    row = malloc (sizeof (ResultsetRow));
    row->RouteNum = *route_num;
    *route_num += 1;
    row->RouteRow = route_row;
    row->Point2PointRole = VROUTE_POINT2POINT_NONE;
    route_row += 1;
    row->From = pS->From;
    row->To = pS->To;
    row->Undefined = NULL;
    row->linkRef = NULL;
    row->TotalCost = pS->TotalCost;
    row->Geometry = pS->Geometry;
    row->Next = NULL;
    if (multiSolution->FirstRow == NULL)
	multiSolution->FirstRow = row;
    if (multiSolution->LastRow != NULL)
	multiSolution->LastRow->Next = row;
    multiSolution->LastRow = row;
    /* adding the Geometry to the multiSolution list */
    if (multiSolution->FirstGeom == NULL)
	multiSolution->FirstGeom = pS->Geometry;
    if (multiSolution->LastGeom != NULL)
	multiSolution->LastGeom->Next = pS->Geometry;
    multiSolution->LastGeom = pS->Geometry;
    /* removing Geometry ownership form Solution */
    pS->Geometry = NULL;

    /* copying points into the Dynamic Line - TSP Geometry */
    if (row->Geometry != NULL)
      {
	  gaiaLinestringPtr ln = row->Geometry->FirstLinestring;
	  if (ln != NULL)
	    {
		int iv;
		double base_m = 0.0;
		if (dyn->Last != NULL)
		    base_m = dyn->Last->M;
		for (iv = 0; iv < ln->Points; iv++)
		    addPoint2DynLine (ln->Coords, ln->DimensionModel, iv, dyn,
				      base_m);
	    }
      }

    pA = pS->First;
    while (pA != NULL)
      {
	  /* inserting Route's traversed Links */
	  row = malloc (sizeof (ResultsetRow));
	  row->RouteNum = *route_num;
	  row->RouteRow = route_row;
	  row->Point2PointRole = VROUTE_POINT2POINT_NONE;
	  route_row += 1;
	  row->From = NULL;
	  row->To = NULL;
	  row->Undefined = NULL;
	  row->linkRef = pA;
	  row->TotalCost = 0.0;
	  row->Geometry = NULL;
	  row->Next = NULL;
	  if (multiSolution->FirstRow == NULL)
	      multiSolution->FirstRow = row;
	  if (multiSolution->LastRow != NULL)
	      multiSolution->LastRow->Next = row;
	  multiSolution->LastRow = row;
	  /* adding the Link to the multiSolution list */
	  if (multiSolution->FirstLink == NULL)
	      multiSolution->FirstLink = pA;
	  if (multiSolution->LastLink != NULL)
	      multiSolution->LastLink->Next = pA;
	  multiSolution->LastLink = pA;
	  pA = pA->Next;
      }
    route_num += 1;
    /* removing Links ownership from Solution */
    pS->First = NULL;
    pS->Last = NULL;
}

static gaiaGeomCollPtr
aux_build_tsp (MultiSolutionPtr multiSolution, TspTargetsPtr targets,
	       int route_num, int srid)
{
/* helper function: formatting the TSP resultset */
    int has_z = 0;
    gaiaGeomCollPtr geom = NULL;
    gaiaLinestringPtr ln;
    int i;
    int pts = 0;
    gaiaPointPtr pt;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();
    for (i = 0; i < targets->Count; i++)
      {
	  /* adding all City to City solutions */
	  ShortestPathSolutionPtr pS = *(targets->Solutions + i);
	  aux_tsp_add_solution (multiSolution, pS, &route_num, dyn);
      }
    /* adding the final trip closing the circular path */
    if (targets->LastSolution->Geometry == NULL)
      {
	  gaiaFreeDynamicLine (dyn);
	  return NULL;
      }
    if (targets->LastSolution->Geometry->DimensionModel == GAIA_XY_Z
	|| targets->LastSolution->Geometry->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    aux_tsp_add_solution (multiSolution, targets->LastSolution, &route_num,
			  dyn);

    /* building the TSP solution as a genuine Geometry */
    if (has_z)
	geom = gaiaAllocGeomCollXYZM ();
    else
	geom = gaiaAllocGeomCollXYM ();
    geom->Srid = srid;
    pt = dyn->First;
    while (pt != NULL)
      {
	  /* counting how many points are there */
	  pts++;
	  pt = pt->Next;
      }
    ln = gaiaAddLinestringToGeomColl (geom, pts);
    pt = dyn->First;
    i = 0;
    while (pt != NULL)
      {
	  /* copying points from Dynamic Line to Linestring */
	  if (has_z)
	    {
		gaiaSetPointXYZM (ln->Coords, i, pt->X, pt->Y, pt->Z, pt->M);
	    }
	  else
	    {
		gaiaSetPointXYM (ln->Coords, i, pt->X, pt->Y, pt->M);
	    }
	  i++;
	  pt = pt->Next;
      }
    gaiaFreeDynamicLine (dyn);
    return geom;
}

static void
build_tsp_solution (MultiSolutionPtr multiSolution, TspTargetsPtr targets,
		    int srid)
{
/* formatting the TSP resultset */
    ShortestPathSolutionPtr *oldS;
    ShortestPathSolutionPtr pS;
    ResultsetRowPtr row;
    RouteNodePtr from;
    int i;
    int k;
    int unreachable = 0;
    int route_row = 0;
    int route_num = 0;
    int found;

/* checking for undefined or unreacheable targets */
    for (i = 0; i < targets->Count; i++)
      {
	  RouteNodePtr to = *(targets->To + i);
	  if (to == NULL)
	      continue;
	  if (*(targets->Found + i) != 'Y')
	      unreachable = 1;
      }

/* inserting the TSP Header */
    row = malloc (sizeof (ResultsetRow));
    row->RouteNum = route_num++;
    row->RouteRow = route_row++;
    row->Point2PointRole = VROUTE_POINT2POINT_NONE;
    row->From = multiSolution->From;
    row->To = multiSolution->From;
    row->Undefined = NULL;
    row->linkRef = NULL;
    if (unreachable)
	row->TotalCost = 0.0;
    else
	row->TotalCost = targets->TotalCost;
    row->Geometry = NULL;
    row->Next = NULL;
    if (multiSolution->FirstRow == NULL)
	multiSolution->FirstRow = row;
    if (multiSolution->LastRow != NULL)
	multiSolution->LastRow->Next = row;
    multiSolution->LastRow = row;

    if (unreachable)
      {
	  /* inserting unreacheable targets */
	  for (i = 0; i < targets->Count; i++)
	    {
		RouteNodePtr to = *(targets->To + i);
		if (to == NULL)
		    continue;
		if (*(targets->Found + i) != 'Y')
		  {
		      /* unreacheable target */
		      row = malloc (sizeof (ResultsetRow));
		      row->RouteNum = route_num++;
		      row->RouteRow = 0;
		      row->Point2PointRole = VROUTE_POINT2POINT_NONE;
		      row->From = to;
		      row->To = to;
		      row->Undefined = NULL;
		      row->linkRef = NULL;
		      row->TotalCost = 0.0;
		      row->Geometry = NULL;
		      row->Next = NULL;
		      if (multiSolution->FirstRow == NULL)
			  multiSolution->FirstRow = row;
		      if (multiSolution->LastRow != NULL)
			  multiSolution->LastRow->Next = row;
		      multiSolution->LastRow = row;
		  }
	    }
	  return;
      }

    /* reordering the TSP solution */
    oldS = targets->Solutions;
    targets->Solutions =
	malloc (sizeof (ShortestPathSolutionPtr) * targets->Count);
    from = multiSolution->From;
    for (k = 0; k < targets->Count; k++)
      {
	  /* building the right sequence */
	  found = 0;
	  for (i = 0; i < targets->Count; i++)
	    {
		pS = *(oldS + i);
		if (pS->From == from)
		  {
		      *(targets->Solutions + k) = pS;
		      from = pS->To;
		      found = 1;
		      break;
		  }
	    }
	  if (!found)
	    {
		if (targets->LastSolution->From == from)
		  {
		      *(targets->Solutions + k) = targets->LastSolution;
		      from = targets->LastSolution->To;
		  }
	    }
      }
    /* adjusting the last route so to close a circular path */
    for (i = 0; i < targets->Count; i++)
      {
	  pS = *(oldS + i);
	  if (pS->From == from)
	    {
		targets->LastSolution = pS;
		break;
	    }
      }
    free (oldS);
    row->Geometry = aux_build_tsp (multiSolution, targets, route_num, srid);
    if (row->Geometry != NULL)
      {
	  if (multiSolution->FirstGeom == NULL)
	      multiSolution->FirstGeom = row->Geometry;
	  if (multiSolution->LastGeom != NULL)
	      multiSolution->LastGeom->Next = row->Geometry;
	  multiSolution->LastGeom = row->Geometry;
      }
}

static void
build_tsp_illegal_solution (MultiSolutionPtr multiSolution,
			    TspTargetsPtr targets)
{
/* formatting the TSP resultset - undefined targets */
    ResultsetRowPtr row;
    int i;
    int route_num = 0;

/* inserting the TSP Header */
    row = malloc (sizeof (ResultsetRow));
    row->RouteNum = route_num++;
    row->RouteRow = 0;
    row->Point2PointRole = VROUTE_POINT2POINT_NONE;
    row->From = multiSolution->From;
    row->To = multiSolution->From;
    row->Undefined = NULL;
    row->linkRef = NULL;
    row->TotalCost = 0.0;
    row->Geometry = NULL;
    row->Next = NULL;
    if (multiSolution->FirstRow == NULL)
	multiSolution->FirstRow = row;
    if (multiSolution->LastRow != NULL)
	multiSolution->LastRow->Next = row;
    multiSolution->LastRow = row;

    for (i = 0; i < targets->Count; i++)
      {
	  char xid[128];
	  const char *code = "unknown";
	  RouteNodePtr to = *(targets->To + i);
	  if (multiSolution->MultiTo->CodeNode)
	      code = *(multiSolution->MultiTo->Codes + i);
	  else
	    {
		sprintf (xid, "%lld", *(multiSolution->MultiTo->Ids + 1));
		code = xid;
	    }
	  if (to == NULL)
	    {
		/* unknown target */
		int len;
		row = malloc (sizeof (ResultsetRow));
		row->RouteNum = route_num++;
		row->RouteRow = 0;
		row->Point2PointRole = VROUTE_POINT2POINT_NONE;
		row->From = to;
		row->To = to;
		len = strlen (code);
		row->Undefined = malloc (len + 1);
		strcpy (row->Undefined, code);
		row->linkRef = NULL;
		row->TotalCost = 0.0;
		row->Geometry = NULL;
		row->Next = NULL;
		if (multiSolution->FirstRow == NULL)
		    multiSolution->FirstRow = row;
		if (multiSolution->LastRow != NULL)
		    multiSolution->LastRow->Next = row;
		multiSolution->LastRow = row;
	    }
	  if (*(targets->Found + i) != 'Y')
	    {
		/* unreachable target */
		row = malloc (sizeof (ResultsetRow));
		row->RouteNum = route_num++;
		row->RouteRow = 0;
		row->Point2PointRole = VROUTE_POINT2POINT_NONE;
		row->From = to;
		row->To = to;
		row->Undefined = NULL;
		row->linkRef = NULL;
		row->TotalCost = 0.0;
		row->Geometry = NULL;
		row->Next = NULL;
		if (multiSolution->FirstRow == NULL)
		    multiSolution->FirstRow = row;
		if (multiSolution->LastRow != NULL)
		    multiSolution->LastRow->Next = row;
		multiSolution->LastRow = row;
	    }
      }
}

static ShortestPathSolutionPtr
add2multiSolution (MultiSolutionPtr multiSolution, RouteNodePtr pfrom,
		   RouteNodePtr pto)
{
/* adding a route solution to a multiple destinations request */
    ShortestPathSolutionPtr solution = alloc_solution ();
    solution->From = pfrom;
    solution->To = pto;
    if (multiSolution->First == NULL)
	multiSolution->First = solution;
    if (multiSolution->Last != NULL)
	multiSolution->Last->Next = solution;
    multiSolution->Last = solution;
    return solution;
}

static ShortestPathSolutionPtr
add2tspLastSolution (TspTargetsPtr targets, RouteNodePtr from, RouteNodePtr to)
{
/* adding the last route solution to a TSP request */
    ShortestPathSolutionPtr solution = alloc_solution ();
    solution->From = from;
    solution->To = to;
    targets->LastSolution = solution;
    return solution;
}

static ShortestPathSolutionPtr
add2tspSolution (TspTargetsPtr targets, RouteNodePtr from, RouteNodePtr to)
{
/* adding a route solution to a TSP request */
    int i;
    ShortestPathSolutionPtr solution = alloc_solution ();
    solution->From = from;
    solution->To = to;
    for (i = 0; i < targets->Count; i++)
      {
	  if (*(targets->To + i) == to)
	    {
		*(targets->Solutions + i) = solution;
		break;
	    }
      }
    return solution;
}

static RouteNodePtr
check_multiTo (RoutingNodePtr node, RoutingMultiDestPtr multiple)
{
/* testing destinations */
    int i;
    for (i = 0; i < multiple->Items; i++)
      {
	  RouteNodePtr to = *(multiple->To + i);
	  if (to == NULL)
	      continue;
	  if (*(multiple->Found + i) == 'Y')
	      continue;
	  if (node->Id == to->InternalIndex)
	    {
		*(multiple->Found + i) = 'Y';
		return to;
	    }
      }
    return NULL;
}

static int
end_multiTo (RoutingMultiDestPtr multiple)
{
/* testing if there are unresolved destinations */
    int i;
    for (i = 0; i < multiple->Items; i++)
      {
	  RouteNodePtr to = *(multiple->To + i);
	  if (to == NULL)
	      continue;
	  if (*(multiple->Found + i) == 'Y')
	      continue;
	  return 0;
      }
    return 1;
}

static void
dijkstra_multi_shortest_path (sqlite3 * handle, int options, RoutingPtr graph,
			      RoutingNodesPtr e, MultiSolutionPtr multiSolution)
{
/* Shortest Path (multiple destinations) - Dijkstra's algorithm */
    int from;
    int i;
    int k;
    ShortestPathSolutionPtr solution;
    RouteNodePtr destination;
    RoutingNodePtr n;
    RoutingNodePtr p_to;
    RouteLinkPtr p_link;
    RoutingHeapPtr heap;
/* setting From */
    from = multiSolution->From->InternalIndex;
/* initializing the heap */
    heap = routing_heap_init (e->DimLink);
/* initializing the graph */
    for (i = 0; i < e->Dim; i++)
      {
	  n = e->Nodes + i;
	  n->PreviousNode = NULL;
	  n->xLink = NULL;
	  n->Inspected = 0;
	  n->Distance = DBL_MAX;
      }
/* queuing the From node into the heap */
    e->Nodes[from].Distance = 0.0;
    dijkstra_enqueue (heap, e->Nodes + from);
    while (heap->Count > 0)
      {
	  /* Dijsktra loop */
	  n = routing_dequeue (heap);
	  destination = check_multiTo (n, multiSolution->MultiTo);
	  if (destination != NULL)
	    {
		/* reached one of the multiple destinations */
		RouteLinkPtr *result;
		int cnt = 0;
		int to = destination->InternalIndex;
		n = e->Nodes + to;
		while (n->PreviousNode != NULL)
		  {
		      /* counting how many Links are into the Shortest Path solution */
		      cnt++;
		      n = n->PreviousNode;
		  }
		/* allocating the solution */
		result = malloc (sizeof (RouteLinkPtr) * cnt);
		k = cnt - 1;
		n = e->Nodes + to;
		while (n->PreviousNode != NULL)
		  {
		      /* inserting a Link into the solution */
		      result[k] = n->xLink;
		      n = n->PreviousNode;
		      k--;
		  }
		solution =
		    add2multiSolution (multiSolution, multiSolution->From,
				       destination);
		build_solution (handle, options, graph, solution, result, cnt);
		/* testing for end (all destinations already reached) */
		if (end_multiTo (multiSolution->MultiTo))
		    break;
	    }
	  n->Inspected = 1;
	  for (i = 0; i < n->DimTo; i++)
	    {
		p_to = *(n->To + i);
		p_link = *(n->Link + i);
		if (p_to->Inspected == 0)
		  {
		      if (p_to->Distance == DBL_MAX)
			{
			    /* queuing a new node into the heap */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			    dijkstra_enqueue (heap, p_to);
			}
		      else if (p_to->Distance > n->Distance + p_link->Cost)
			{
			    /* updating an already inserted node */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			}
		  }
	    }
      }
    routing_heap_free (heap);
}

static RouteNodePtr
check_targets (RoutingNodePtr node, TspTargetsPtr targets)
{
/* testing targets */
    int i;
    for (i = 0; i < targets->Count; i++)
      {
	  RouteNodePtr to = *(targets->To + i);
	  if (to == NULL)
	      continue;
	  if (*(targets->Found + i) == 'Y')
	      continue;
	  if (node->Id == to->InternalIndex)
	    {
		*(targets->Found + i) = 'Y';
		return to;
	    }
      }
    return NULL;
}

static void
update_targets (TspTargetsPtr targets, RouteNodePtr destination, double cost,
		int *stop)
{
/* tupdating targets */
    int i;
    *stop = 1;
    for (i = 0; i < targets->Count; i++)
      {
	  RouteNodePtr to = *(targets->To + i);
	  if (to == NULL)
	      continue;
	  if (to == destination)
	      *(targets->Costs + i) = cost;
	  if (*(targets->Found + i) == 'Y')
	      continue;
	  *stop = 0;
      }
}


static void
dijkstra_targets_solve (RoutingNodesPtr e, TspTargetsPtr targets)
{
/* Shortest Path (multiple destinations) for TSP GA */
    int from;
    int i;
    RouteNodePtr destination;
    RoutingNodePtr n;
    RoutingNodePtr p_to;
    RouteLinkPtr p_link;
    RoutingHeapPtr heap;
/* setting From */
    from = targets->From->InternalIndex;
/* initializing the heap */
    heap = routing_heap_init (e->DimLink);
/* initializing the graph */
    for (i = 0; i < e->Dim; i++)
      {
	  n = e->Nodes + i;
	  n->PreviousNode = NULL;
	  n->xLink = NULL;
	  n->Inspected = 0;
	  n->Distance = DBL_MAX;
      }
/* queuing the From node into the heap */
    e->Nodes[from].Distance = 0.0;
    dijkstra_enqueue (heap, e->Nodes + from);
    while (heap->Count > 0)
      {
	  /* Dijsktra loop */
	  n = routing_dequeue (heap);
	  destination = check_targets (n, targets);
	  if (destination != NULL)
	    {
		/* reached one of the targets */
		int stop = 0;
		double totalCost = 0.0;
		int to = destination->InternalIndex;
		n = e->Nodes + to;
		while (n->PreviousNode != NULL)
		  {
		      /* computing the total Cost */
		      totalCost += n->xLink->Cost;
		      n = n->PreviousNode;
		  }
		/* updating targets */
		update_targets (targets, destination, totalCost, &stop);
		if (stop)
		    break;
	    }
	  n->Inspected = 1;
	  for (i = 0; i < n->DimTo; i++)
	    {
		p_to = *(n->To + i);
		p_link = *(n->Link + i);
		if (p_to->Inspected == 0)
		  {
		      if (p_to->Distance == DBL_MAX)
			{
			    /* queuing a new node into the heap */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			    dijkstra_enqueue (heap, p_to);
			}
		      else if (p_to->Distance > n->Distance + p_link->Cost)
			{
			    /* updating an already inserted node */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			}
		  }
	    }
      }
    routing_heap_free (heap);
}

static void
destroy_tsp_targets (TspTargetsPtr targets)
{
/* memory cleanup; destroying a TSP helper struct */
    if (targets == NULL)
	return;
    if (targets->To != NULL)
	free (targets->To);
    if (targets->Found != NULL)
	free (targets->Found);
    if (targets->Costs != NULL)
	free (targets->Costs);
    if (targets->Solutions != NULL)
      {
	  int i;
	  for (i = 0; i < targets->Count; i++)
	    {
		ShortestPathSolutionPtr pS = *(targets->Solutions + i);
		if (pS != NULL)
		    delete_solution (pS);
	    }
	  free (targets->Solutions);
      }
    if (targets->LastSolution != NULL)
	delete_solution (targets->LastSolution);
    free (targets);
}

static TspTargetsPtr
randomize_targets (sqlite3 * handle, RoutingPtr graph,
		   MultiSolutionPtr multiSolution)
{
/* creating and initializing the TSP helper struct */
    char *sql;
    char *prev_sql;
    int ret;
    int i;
    int n_rows;
    int n_columns;
    const char *value = NULL;
    char **results;
    int from;
    TspTargetsPtr targets = malloc (sizeof (TspTargets));
    targets->Mode = multiSolution->Mode;
    targets->TotalCost = 0.0;
    targets->Count = multiSolution->MultiTo->Items;
    targets->To = malloc (sizeof (RouteNodePtr *) * targets->Count);
    targets->Found = malloc (sizeof (char) * targets->Count);
    targets->Costs = malloc (sizeof (double) * targets->Count);
    targets->Solutions =
	malloc (sizeof (ShortestPathSolutionPtr) * targets->Count);
    targets->LastSolution = NULL;
    for (i = 0; i < targets->Count; i++)
      {
	  *(targets->To + i) = NULL;
	  *(targets->Found + i) = 'N';
	  *(targets->Costs + i) = DBL_MAX;
	  *(targets->Solutions + i) = NULL;
      }

    sql =
	sqlite3_mprintf ("SELECT %d, Random() AS rnd\n",
			 multiSolution->From->InternalIndex);
    for (i = 0; i < multiSolution->MultiTo->Items; i++)
      {
	  RouteNodePtr p_to = *(multiSolution->MultiTo->To + i);
	  if (p_to == NULL)
	    {
		sqlite3_free (sql);
		goto illegal;
	    }
	  prev_sql = sql;
	  sql =
	      sqlite3_mprintf ("%sUNION\nSELECT %d, Random() AS rnd\n",
			       prev_sql, p_to->InternalIndex);
	  sqlite3_free (prev_sql);
      }
    prev_sql = sql;
    sql = sqlite3_mprintf ("%sORDER BY rnd LIMIT 1", prev_sql);
    sqlite3_free (prev_sql);
    ret = sqlite3_get_table (handle, sql, &results, &n_rows, &n_columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto illegal;
    if (n_rows >= 1)
      {
	  for (i = 1; i <= n_rows; i++)
	    {
		value = results[(i * n_columns) + 0];
		from = atoi (value);
	    }
      }
    sqlite3_free_table (results);

    if (from == multiSolution->From->InternalIndex)
      {
	  targets->From = multiSolution->From;
	  for (i = 0; i < multiSolution->MultiTo->Items; i++)
	    {
		RouteNodePtr p_to = *(multiSolution->MultiTo->To + i);
		*(targets->To + i) = p_to;
		*(targets->Found + i) = 'N';
		*(targets->Costs + i) = DBL_MAX;
		*(targets->Solutions + i) = NULL;
	    }
      }
    else
      {
	  int j = 0;
	  targets->From = graph->Nodes + from;
	  *(targets->To + j++) = multiSolution->From;
	  for (i = 0; i < multiSolution->MultiTo->Items; i++)
	    {
		RouteNodePtr p_to = *(multiSolution->MultiTo->To + i);
		*(targets->Found + i) = 'N';
		*(targets->Costs + i) = DBL_MAX;
		*(targets->Solutions + i) = NULL;
		if (p_to == targets->From)
		    continue;
		*(targets->To + j++) = p_to;
	    }
      }
    return targets;

  illegal:
    for (i = 0; i < targets->Count; i++)
      {
	  *(targets->To + i) = NULL;
	  *(targets->Found + i) = 'N';
	  *(targets->Costs + i) = DBL_MAX;
	  *(targets->Solutions + i) = NULL;
      }
    for (i = 0; i < multiSolution->MultiTo->Items; i++)
      {
	  RouteNodePtr p_to = *(multiSolution->MultiTo->To + i);
	  if (p_to == NULL)
	      continue;
	  *(targets->To + i) = p_to;
      }
    return targets;
}

static RouteNodePtr
check_TspTo (RoutingNodePtr node, TspTargetsPtr targets)
{
/* testing TSP destinations */
    int i;
    for (i = 0; i < targets->Count; i++)
      {
	  RouteNodePtr to = *(targets->To + i);
	  if (to == NULL)
	      continue;
	  if (*(targets->Found + i) == 'Y')
	      continue;
	  if (node->Id == to->InternalIndex)
	    {
		*(targets->Found + i) = 'Y';
		return to;
	    }
      }
    return NULL;
}

static RouteNodePtr
check_TspFinal (RoutingNodePtr node, TspTargetsPtr targets)
{
/* testing TSP final destination (= FROM) */
    RouteNodePtr from = targets->From;
    if (node->Id == from->InternalIndex)
	return from;
    return NULL;
}

static int
end_TspTo (TspTargetsPtr targets)
{
/* testing if there are unresolved TSP targets */
    int i;
    for (i = 0; i < targets->Count; i++)
      {
	  RouteNodePtr to = *(targets->To + i);
	  if (to == NULL)
	      continue;
	  if (*(targets->Found + i) == 'Y')
	      continue;
	  return 0;
      }
    return 1;
}

static void
dijkstra_tsp_nn (sqlite3 * handle, int options, RoutingPtr graph,
		 RoutingNodesPtr e, TspTargetsPtr targets)
{
/* TSP NN - Dijkstra's algorithm */
    int from;
    int i;
    int k;
    int last_route = 0;
    ShortestPathSolutionPtr solution;
    RouteNodePtr origin;
    RouteNodePtr destination;
    RoutingNodePtr n;
    RoutingNodePtr p_to;
    RouteLinkPtr p_link;
    RoutingHeapPtr heap;

/* setting From */
    from = targets->From->InternalIndex;
    origin = targets->From;
/* initializing the heap */
    heap = routing_heap_init (e->DimLink);
/* initializing the graph */
    for (i = 0; i < e->Dim; i++)
      {
	  n = e->Nodes + i;
	  n->PreviousNode = NULL;
	  n->xLink = NULL;
	  n->Inspected = 0;
	  n->Distance = DBL_MAX;
      }
/* queuing the From node into the heap */
    e->Nodes[from].Distance = 0.0;
    dijkstra_enqueue (heap, e->Nodes + from);
    while (heap->Count > 0)
      {
	  /* Dijsktra loop */
	  n = routing_dequeue (heap);
	  if (last_route)
	      destination = check_TspFinal (n, targets);
	  else
	      destination = check_TspTo (n, targets);
	  if (destination != NULL)
	    {
		/* reached one of the target destinations */
		RouteLinkPtr *result;
		int cnt = 0;
		int to = destination->InternalIndex;
		n = e->Nodes + to;
		while (n->PreviousNode != NULL)
		  {
		      /* counting how many Links are into the Shortest Path solution */
		      cnt++;
		      n = n->PreviousNode;
		  }
		/* allocating the solution */
		result = malloc (sizeof (RouteLinkPtr) * cnt);
		k = cnt - 1;
		n = e->Nodes + to;
		while (n->PreviousNode != NULL)
		  {
		      /* inserting a Link into the solution */
		      result[k] = n->xLink;
		      n = n->PreviousNode;
		      k--;
		  }
		if (last_route)
		    solution =
			add2tspLastSolution (targets, origin, destination);
		else
		    solution = add2tspSolution (targets, origin, destination);
		build_solution (handle, options, graph, solution, result, cnt);
		targets->TotalCost += solution->TotalCost;

		/* testing for end (all destinations already reached) */
		if (last_route)
		    break;
		if (end_TspTo (targets))
		  {
		      /* determining the final route so to close the circular path */
		      last_route = 1;
		  }

		/* restarting from the current target */
		from = to;
		for (i = 0; i < e->Dim; i++)
		  {
		      n = e->Nodes + i;
		      n->PreviousNode = NULL;
		      n->xLink = NULL;
		      n->Inspected = 0;
		      n->Distance = DBL_MAX;
		  }
		e->Nodes[from].Distance = 0.0;
		routing_heap_reset (heap);
		dijkstra_enqueue (heap, e->Nodes + from);
		origin = destination;
		continue;
	    }
	  n->Inspected = 1;
	  for (i = 0; i < n->DimTo; i++)
	    {
		p_to = *(n->To + i);
		p_link = *(n->Link + i);
		if (p_to->Inspected == 0)
		  {
		      if (p_to->Distance == DBL_MAX)
			{
			    /* queuing a new node into the heap */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			    dijkstra_enqueue (heap, p_to);
			}
		      else if (p_to->Distance > n->Distance + p_link->Cost)
			{
			    /* updating an already inserted node */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			}
		  }
	    }
      }
    routing_heap_free (heap);
}

static RoutingNodePtr *
dijkstra_range_analysis (RoutingNodesPtr e, RouteNodePtr pfrom,
			 double max_cost, int *ll)
{
/* identifying all Nodes within a given Cost range - Dijkstra's algorithm */
    int from;
    int i;
    RoutingNodePtr p_to;
    RoutingNodePtr n;
    RouteLinkPtr p_link;
    int cnt;
    RoutingNodePtr *result;
    RoutingHeapPtr heap;
/* setting From */
    from = pfrom->InternalIndex;
/* initializing the heap */
    heap = routing_heap_init (e->DimLink);
/* initializing the graph */
    for (i = 0; i < e->Dim; i++)
      {
	  n = e->Nodes + i;
	  n->PreviousNode = NULL;
	  n->xLink = NULL;
	  n->Inspected = 0;
	  n->Distance = DBL_MAX;
      }
/* queuing the From node into the heap */
    e->Nodes[from].Distance = 0.0;
    dijkstra_enqueue (heap, e->Nodes + from);
    while (heap->Count > 0)
      {
	  /* Dijsktra loop */
	  n = routing_dequeue (heap);
	  n->Inspected = 1;
	  for (i = 0; i < n->DimTo; i++)
	    {
		p_to = *(n->To + i);
		p_link = *(n->Link + i);
		if (p_to->Inspected == 0)
		  {
		      if (p_to->Distance == DBL_MAX)
			{
			    /* queuing a new node into the heap */
			    if (n->Distance + p_link->Cost <= max_cost)
			      {
				  p_to->Distance = n->Distance + p_link->Cost;
				  p_to->PreviousNode = n;
				  p_to->xLink = p_link;
				  dijkstra_enqueue (heap, p_to);
			      }
			}
		      else if (p_to->Distance > n->Distance + p_link->Cost)
			{
			    /* updating an already inserted node */
			    p_to->Distance = n->Distance + p_link->Cost;
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			}
		  }
	    }
      }
    routing_heap_free (heap);
    cnt = 0;
    for (i = 0; i < e->Dim; i++)
      {
	  /* counting how many traversed Nodes */
	  n = e->Nodes + i;
	  if (n->Node->InternalIndex == from)
	      continue;
	  if (n->Inspected)
	      cnt++;
      }
/* allocating the solution */
    result = malloc (sizeof (RouteNodePtr) * cnt);
    cnt = 0;
    for (i = 0; i < e->Dim; i++)
      {
	  /* populating the resultset */
	  n = e->Nodes + i;
	  if (n->Node->InternalIndex == from)
	      continue;
	  if (n->Inspected)
	      result[cnt++] = n;
      }
    *ll = cnt;
    return (result);
}

/*
/
/  implementation of the A* Shortest Path algorithm
/
*/

static void
astar_insert (RoutingNodePtr node, HeapNodePtr heap, int size)
{
/* inserting a new Node and rearranging the heap */
    int i;
    HeapNode tmp;
    i = size + 1;
    heap[i].Node = node;
    heap[i].Distance = node->HeuristicDistance;
    if (i / 2 < 1)
	return;
    while (heap[i].Distance < heap[i / 2].Distance)
      {
	  tmp = heap[i];
	  heap[i] = heap[i / 2];
	  heap[i / 2] = tmp;
	  i /= 2;
	  if (i / 2 < 1)
	      break;
      }
}

static void
astar_enqueue (RoutingHeapPtr heap, RoutingNodePtr node)
{
/* enqueuing a Node into the heap */
    astar_insert (node, heap->Nodes, heap->Count);
    heap->Count += 1;
}

static double
astar_heuristic_distance (RouteNodePtr n1, RouteNodePtr n2, double coeff)
{
/* computing the euclidean distance intercurring between two nodes */
    double dx = n1->CoordX - n2->CoordX;
    double dy = n1->CoordY - n2->CoordY;
    double dist = sqrt ((dx * dx) + (dy * dy)) * coeff;
    return dist;
}

static RouteLinkPtr *
astar_shortest_path (RoutingNodesPtr e, RouteNodePtr nodes,
		     RouteNodePtr pfrom, RouteNodePtr pto,
		     double heuristic_coeff, int *ll)
{
/* identifying the Shortest Path - A* algorithm */
    int from;
    int to;
    int i;
    int k;
    RoutingNodePtr pAux;
    RoutingNodePtr n;
    RoutingNodePtr p_to;
    RouteNodePtr pOrg;
    RouteNodePtr pDest;
    RouteLinkPtr p_link;
    int cnt;
    RouteLinkPtr *result;
    RoutingHeapPtr heap;
/* setting From/To */
    from = pfrom->InternalIndex;
    to = pto->InternalIndex;
    pAux = e->Nodes + from;
    pOrg = nodes + pAux->Id;
    pAux = e->Nodes + to;
    pDest = nodes + pAux->Id;
/* initializing the heap */
    heap = routing_heap_init (e->DimLink);
/* initializing the graph */
    for (i = 0; i < e->Dim; i++)
      {
	  n = e->Nodes + i;
	  n->PreviousNode = NULL;
	  n->xLink = NULL;
	  n->Inspected = 0;
	  n->Distance = DBL_MAX;
	  n->HeuristicDistance = DBL_MAX;
      }
/* queuing the From node into the heap */
    e->Nodes[from].Distance = 0.0;
    e->Nodes[from].HeuristicDistance =
	astar_heuristic_distance (pOrg, pDest, heuristic_coeff);
    astar_enqueue (heap, e->Nodes + from);
    while (heap->Count > 0)
      {
	  /* A* loop */
	  n = routing_dequeue (heap);
	  if (n->Id == to)
	    {
		/* destination reached */
		break;
	    }
	  n->Inspected = 1;
	  for (i = 0; i < n->DimTo; i++)
	    {
		p_to = *(n->To + i);
		p_link = *(n->Link + i);
		if (p_to->Inspected == 0)
		  {
		      if (p_to->Distance == DBL_MAX)
			{
			    /* queuing a new node into the heap */
			    p_to->Distance = n->Distance + p_link->Cost;
			    pOrg = nodes + p_to->Id;
			    p_to->HeuristicDistance =
				p_to->Distance + astar_heuristic_distance (pOrg,
									   pDest,
									   heuristic_coeff);
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			    astar_enqueue (heap, p_to);
			}
		      else if (p_to->Distance > n->Distance + p_link->Cost)
			{
			    /* updating an already inserted node */
			    p_to->Distance = n->Distance + p_link->Cost;
			    pOrg = nodes + p_to->Id;
			    p_to->HeuristicDistance =
				p_to->Distance + astar_heuristic_distance (pOrg,
									   pDest,
									   heuristic_coeff);
			    p_to->PreviousNode = n;
			    p_to->xLink = p_link;
			}
		  }
	    }
      }
    routing_heap_free (heap);
    cnt = 0;
    n = e->Nodes + to;
    while (n->PreviousNode != NULL)
      {
	  /* counting how many Links are into the Shortest Path solution */
	  cnt++;
	  n = n->PreviousNode;
      }
/* allocating the solution */
    result = malloc (sizeof (RouteLinkPtr) * cnt);
    k = cnt - 1;
    n = e->Nodes + to;
    while (n->PreviousNode != NULL)
      {
	  /* inserting a Link into the solution */
	  result[k] = n->xLink;
	  n = n->PreviousNode;
	  k--;
      }
    *ll = cnt;
    return (result);
}

/* END of A* Shortest Path implementation */

static int
cmp_nodes_code (const void *p1, const void *p2)
{
/* compares two nodes  by CODE [for BSEARCH] */
    RouteNodePtr pN1 = (RouteNodePtr) p1;
    RouteNodePtr pN2 = (RouteNodePtr) p2;
    return strcmp (pN1->Code, pN2->Code);
}

static int
cmp_nodes_id (const void *p1, const void *p2)
{
/* compares two nodes  by ID [for BSEARCH] */
    RouteNodePtr pN1 = (RouteNodePtr) p1;
    RouteNodePtr pN2 = (RouteNodePtr) p2;
    if (pN1->Id == pN2->Id)
	return 0;
    if (pN1->Id > pN2->Id)
	return 1;
    return -1;
}

static RouteNodePtr
find_node_by_code (RoutingPtr graph, const char *code)
{
/* searching a Node (by Code) into the sorted list */
    RouteNodePtr ret;
    RouteNode pN;
    pN.Code = (char *) code;
    ret =
	bsearch (&pN, graph->Nodes, graph->NumNodes, sizeof (RouteNode),
		 cmp_nodes_code);
    return ret;
}

static RouteNodePtr
find_node_by_id (RoutingPtr graph, const sqlite3_int64 id)
{
/* searching a Node (by Id) into the sorted list */
    RouteNodePtr ret;
    RouteNode pN;
    pN.Id = id;
    ret =
	bsearch (&pN, graph->Nodes, graph->NumNodes, sizeof (RouteNode),
		 cmp_nodes_id);
    return ret;
}

static void
vroute_delete_multiple_destinations (RoutingMultiDestPtr multiple)
{
/* deleting a multiple destinations request */
    if (multiple == NULL)
	return;
    if (multiple->Found != NULL)
	free (multiple->Found);
    if (multiple->To != NULL)
	free (multiple->To);
    if (multiple->Ids != NULL)
	free (multiple->Ids);
    if (multiple->Codes != NULL)
      {
	  int i;
	  for (i = 0; i < multiple->Items; i++)
	    {
		char *p = *(multiple->Codes + i);
		if (p != NULL)
		    free (p);
	    }
	  free (multiple->Codes);
      }
    free (multiple);
}

static void
vroute_add_multiple_code (RoutingMultiDestPtr multiple, char *code)
{
/* adding an item to an helper struct for Multiple Destinations (by Code) */
    *(multiple->Codes + multiple->Next) = code;
    multiple->Next += 1;
}

static void
vroute_add_multiple_id (RoutingMultiDestPtr multiple, int id)
{
/* adding an item to an helper struct for Multiple Destinations (by Code) */
    *(multiple->Ids + multiple->Next) = id;
    multiple->Next += 1;
}

static char *
vroute_parse_multiple_item (const char *start, const char *last)
{
/* attempting to parse an item form the multiple destinations list */
    char *item;
    const char *p_in = start;
    char *p_out;
    int len = last - start;
    if (len <= 0)
	return NULL;

    item = malloc (len + 1);
    p_in = start;
    p_out = item;
    while (p_in < last)
	*p_out++ = *p_in++;
    *p_out = '\0';
    return item;
}

static RoutingMultiDestPtr
vroute_as_multiple_destinations (sqlite3_int64 value)
{
/* allocatint a multiple destinations containign a single target */
    RoutingMultiDestPtr multiple = NULL;

/* allocating the helper struct */
    multiple = malloc (sizeof (RoutingMultiDest));
    multiple->CodeNode = 0;
    multiple->Found = malloc (sizeof (char));
    multiple->To = malloc (sizeof (RouteNodePtr));
    *(multiple->Found + 0) = 'N';
    *(multiple->To + 0) = NULL;
    multiple->Items = 1;
    multiple->Next = 0;
    multiple->Ids = malloc (sizeof (sqlite3_int64));
    multiple->Codes = NULL;
    *(multiple->Ids + 0) = value;
    return multiple;
}

static DestinationCandidatesListPtr
alloc_candidates (int code_node)
{
/* allocating a list of multiple destination candidates */
    DestinationCandidatesListPtr list =
	malloc (sizeof (DestinationCandidatesList));
    list->NodeCode = code_node;
    list->First = NULL;
    list->Last = NULL;
    list->ValidItems = 0;
    return list;
}

static void
delete_candidates (DestinationCandidatesListPtr list)
{
/* memory clean-up: destroying a list of multiple destination candidates */
    DestinationCandidatePtr pC;
    DestinationCandidatePtr pCn;
    if (list == NULL)
	return;

    pC = list->First;
    while (pC != NULL)
      {
	  pCn = pC->Next;
	  free (pC);
	  pC = pCn;
      }
    free (list);
}

static int
checkNumber (const char *str)
{
/* testing for an unsignd integer */
    int len;
    int i;
    len = strlen (str);
    for (i = 0; i < len; i++)
      {
	  if (*(str + i) < '0' || *(str + i) > '9')
	      return 0;
      }
    return 1;
}

static void
addMultiCandidate (DestinationCandidatesListPtr list, char *item)
{
/* adding a candidate to the list */
    DestinationCandidatePtr pC;
    if (list == NULL)
	return;
    if (item == NULL)
	return;
    if (list->NodeCode == 0)
      {
	  if (!checkNumber (item))
	    {
		/* invalid: not a number */
		free (item);
		return;
	    }
      }

    pC = malloc (sizeof (DestinationCandidate));
    if (list->NodeCode)
      {
	  pC->Code = item;
	  pC->Id = -1;
      }
    else
      {
	  pC->Code = NULL;
	  pC->Id = atoll (item);
	  free (item);
      }
    pC->Valid = 'Y';
    pC->Next = NULL;
    if (list->First == NULL)
	list->First = pC;
    if (list->Last != NULL)
	list->Last->Next = pC;
    list->Last = pC;
}

static void
validateMultiCandidates (DestinationCandidatesListPtr list)
{
/* validating candidates */
    DestinationCandidatePtr pC = list->First;
    while (pC != NULL)
      {
	  DestinationCandidatePtr pC2;
	  if (pC->Valid == 'N')
	    {
		pC = pC->Next;
		continue;
	    }
	  pC2 = pC->Next;
	  while (pC2 != NULL)
	    {
		/* testing for duplicates */
		if (pC2->Valid == 'N')
		  {
		      pC2 = pC2->Next;
		      continue;
		  }
		if (list->NodeCode)
		  {
		      if (strcmp (pC->Code, pC2->Code) == 0)
			{
			    free (pC2->Code);
			    pC2->Code = NULL;
			    pC2->Valid = 'N';
			}
		  }
		else
		  {
		      if (pC->Id == pC2->Id)
			  pC2->Valid = 'N';
		  }
		pC2 = pC2->Next;
	    }
	  pC = pC->Next;
      }

    list->ValidItems = 0;
    pC = list->First;
    while (pC != NULL)
      {
	  if (pC->Valid == 'Y')
	      list->ValidItems += 1;
	  pC = pC->Next;
      }
}

static RoutingMultiDestPtr
vroute_get_multiple_destinations (int code_node, char delimiter,
				  const char *str)
{
/* parsing a multiple destinations request string */
    RoutingMultiDestPtr multiple = NULL;
    DestinationCandidatesListPtr list = alloc_candidates (code_node);
    DestinationCandidatePtr pC;
    char *item;
    int i;
    const char *prev = str;
    const char *ptr = str;

/* populating a linked list */
    while (1)
      {
	  int whitespace = 0;
	  if (*ptr == '\0')
	    {
		item = vroute_parse_multiple_item (prev, ptr);
		addMultiCandidate (list, item);
		break;
	    }
	  if (*ptr == ' ' || *ptr == '\t' || *ptr == '\n' || *ptr == '\r')
	      whitespace = 1;
	  if (*ptr == delimiter || whitespace)
	    {
		item = vroute_parse_multiple_item (prev, ptr);
		addMultiCandidate (list, item);
		ptr++;
		prev = ptr;
		continue;
	    }
	  ptr++;
      }
    validateMultiCandidates (list);
    if (list->ValidItems <= 0)
      {
	  delete_candidates (list);
	  return NULL;
      }

/* allocating the helper struct */
    multiple = malloc (sizeof (RoutingMultiDest));
    multiple->CodeNode = code_node;
    multiple->Found = malloc (sizeof (char) * list->ValidItems);
    multiple->To = malloc (sizeof (RouteNodePtr) * list->ValidItems);
    for (i = 0; i < list->ValidItems; i++)
      {
	  *(multiple->Found + i) = 'N';
	  *(multiple->To + i) = NULL;
      }
    multiple->Items = list->ValidItems;
    multiple->Next = 0;
    if (code_node)
      {
	  multiple->Ids = NULL;
	  multiple->Codes = malloc (sizeof (char *) * list->ValidItems);
      }
    else
      {
	  multiple->Ids = malloc (sizeof (sqlite3_int64) * list->ValidItems);
	  multiple->Codes = NULL;
      }

/* populating the array */
    pC = list->First;
    while (pC != NULL)
      {
	  if (pC->Valid == 'Y')
	    {
		if (code_node)
		    vroute_add_multiple_code (multiple, pC->Code);
		else
		    vroute_add_multiple_id (multiple, pC->Id);
	    }
	  pC = pC->Next;
      }
    delete_candidates (list);
    return multiple;
}

static void
delete_multiSolution (MultiSolutionPtr multiSolution)
{
/* deleting the current solution */
    ResultsetRowPtr pR;
    ResultsetRowPtr pRn;
    ShortestPathSolutionPtr pS;
    ShortestPathSolutionPtr pSn;
    RowNodeSolutionPtr pN;
    RowNodeSolutionPtr pNn;
    RowSolutionPtr pA;
    RowSolutionPtr pAn;
    gaiaGeomCollPtr pG;
    gaiaGeomCollPtr pGn;
    if (!multiSolution)
	return;
    if (multiSolution->MultiTo != NULL)
	vroute_delete_multiple_destinations (multiSolution->MultiTo);
    pS = multiSolution->First;
    while (pS != NULL)
      {
	  pSn = pS->Next;
	  delete_solution (pS);
	  pS = pSn;
      }
    pN = multiSolution->FirstNode;
    while (pN != NULL)
      {
	  pNn = pN->Next;
	  free (pN);
	  pN = pNn;
      }
    pR = multiSolution->FirstRow;
    while (pR != NULL)
      {
	  pRn = pR->Next;
	  if (pR->Undefined != NULL)
	      free (pR->Undefined);
	  free (pR);
	  pR = pRn;
      }
    pA = multiSolution->FirstLink;
    while (pA != NULL)
      {
	  pAn = pA->Next;
	  if (pA->Name)
	      free (pA->Name);
	  free (pA);
	  pA = pAn;
      }
    pG = multiSolution->FirstGeom;
    while (pG != NULL)
      {
	  pGn = pG->Next;
	  gaiaFreeGeomColl (pG);
	  pG = pGn;
      }
    free (multiSolution);
}

static void
reset_multiSolution (MultiSolutionPtr multiSolution)
{
/* resetting the current solution */
    ResultsetRowPtr pR;
    ResultsetRowPtr pRn;
    ShortestPathSolutionPtr pS;
    ShortestPathSolutionPtr pSn;
    RowNodeSolutionPtr pN;
    RowNodeSolutionPtr pNn;
    RowSolutionPtr pA;
    RowSolutionPtr pAn;
    gaiaGeomCollPtr pG;
    gaiaGeomCollPtr pGn;
    if (!multiSolution)
	return;
    if (multiSolution->MultiTo != NULL)
	vroute_delete_multiple_destinations (multiSolution->MultiTo);
    pS = multiSolution->First;
    while (pS != NULL)
      {
	  pSn = pS->Next;
	  delete_solution (pS);
	  pS = pSn;
      }
    pN = multiSolution->FirstNode;
    while (pN != NULL)
      {
	  pNn = pN->Next;
	  free (pN);
	  pN = pNn;
      }
    pR = multiSolution->FirstRow;
    while (pR != NULL)
      {
	  pRn = pR->Next;
	  free (pR);
	  pR = pRn;
      }
    pA = multiSolution->FirstLink;
    while (pA != NULL)
      {
	  pAn = pA->Next;
	  if (pA->Name)
	      free (pA->Name);
	  free (pA);
	  pA = pAn;
      }
    pG = multiSolution->FirstGeom;
    while (pG != NULL)
      {
	  pGn = pG->Next;
	  gaiaFreeGeomColl (pG);
	  pG = pGn;
      }
    multiSolution->From = NULL;
    multiSolution->MultiTo = NULL;
    multiSolution->First = NULL;
    multiSolution->Last = NULL;
    multiSolution->FirstRow = NULL;
    multiSolution->LastRow = NULL;
    multiSolution->FirstNode = NULL;
    multiSolution->LastNode = NULL;
    multiSolution->CurrentRow = NULL;
    multiSolution->CurrentNodeRow = NULL;
    multiSolution->CurrentRowId = 0;
    multiSolution->FirstLink = NULL;
    multiSolution->LastLink = NULL;
    multiSolution->FirstGeom = NULL;
    multiSolution->LastGeom = NULL;
}

static MultiSolutionPtr
alloc_multiSolution (void)
{
/* allocates and initializes the current multiple-destinations solution */
    MultiSolutionPtr p = malloc (sizeof (MultiSolution));
    p->From = NULL;
    p->MultiTo = NULL;
    p->First = NULL;
    p->Last = NULL;
    p->FirstRow = NULL;
    p->LastRow = NULL;
    p->CurrentRow = NULL;
    p->FirstNode = NULL;
    p->LastNode = NULL;
    p->CurrentNodeRow = NULL;
    p->CurrentRowId = 0;
    p->FirstLink = NULL;
    p->LastLink = NULL;
    p->FirstGeom = NULL;
    p->LastGeom = NULL;
    p->RouteNum = 0;
    return p;
}

static void
delete_point2PointNode (Point2PointNodePtr p)
{
/* deleting a Point2Point Node */
    if (p->codNode != NULL)
	free (p->codNode);
    free (p);
}

static void
delete_point2PointCandidate (Point2PointCandidatePtr p)
{
/* deleting a Point2Point candidate */
    if (p->codNodeFrom != NULL)
	free (p->codNodeFrom);
    if (p->codNodeTo != NULL)
	free (p->codNodeTo);
    if (p->path != NULL)
	gaiaFreeGeomColl (p->path);
    free (p);
}

static void
delete_point2PointSolution (Point2PointSolutionPtr p2pSolution)
{
/* deleting the current Point2Point solution */
    Point2PointCandidatePtr pC;
    Point2PointCandidatePtr pCn;
    Point2PointNodePtr pN;
    Point2PointNodePtr pNn;
    ResultsetRowPtr pR;
    ResultsetRowPtr pRn;
    pC = p2pSolution->firstFromCandidate;
    while (pC != NULL)
      {
	  pCn = pC->next;
	  delete_point2PointCandidate (pC);
	  pC = pCn;
      }
    pC = p2pSolution->firstToCandidate;
    while (pC != NULL)
      {
	  pCn = pC->next;
	  delete_point2PointCandidate (pC);
	  pC = pCn;
      }
    pN = p2pSolution->firstFromNode;
    while (pN != NULL)
      {
	  pNn = pN->next;
	  delete_point2PointNode (pN);
	  pN = pNn;
      }
    pN = p2pSolution->firstToNode;
    while (pN != NULL)
      {
	  pNn = pN->next;
	  delete_point2PointNode (pN);
	  pN = pNn;
      }
    pR = p2pSolution->FirstRow;
    while (pR != NULL)
      {
	  pRn = pR->Next;
	  if (pR->Point2PointRole == VROUTE_POINT2POINT_START
	      || pR->Point2PointRole == VROUTE_POINT2POINT_END)
	    {
		/* deleting partial Links */
		if (pR->linkRef != NULL)
		  {
		      if (pR->linkRef->Link != NULL)
			  free (pR->linkRef->Link);
		      if (pR->linkRef->Name != NULL)
			  free (pR->linkRef->Name);
		      free (pR->linkRef);
		  }
	    }
	  if (pR->Geometry != NULL)
	      gaiaFreeGeomColl (pR->Geometry);
	  free (pR);
	  pR = pRn;
      }
    if (p2pSolution->dynLine != NULL)
	gaiaFreeDynamicLine (p2pSolution->dynLine);
    free (p2pSolution);
}

static void
reset_point2PointSolution (Point2PointSolutionPtr p2pSolution)
{
/* resetting the current solution [Point2Point] */
    Point2PointCandidatePtr pC;
    Point2PointCandidatePtr pCn;
    Point2PointNodePtr pN;
    Point2PointNodePtr pNn;
    ResultsetRowPtr pR;
    ResultsetRowPtr pRn;
    p2pSolution->validFrom = 0;
    p2pSolution->xFrom = 0.0;
    p2pSolution->yFrom = 0.0;
    p2pSolution->zFrom = 0.0;
    p2pSolution->validTo = 0;
    p2pSolution->xTo = 0.0;
    p2pSolution->yTo = 0.0;
    p2pSolution->zTo = 0.0;
    p2pSolution->srid = -1;
    pC = p2pSolution->firstFromCandidate;
    while (pC != NULL)
      {
	  pCn = pC->next;
	  delete_point2PointCandidate (pC);
	  pC = pCn;
      }
    pC = p2pSolution->firstToCandidate;
    while (pC != NULL)
      {
	  pCn = pC->next;
	  delete_point2PointCandidate (pC);
	  pC = pCn;
      }
    p2pSolution->firstFromCandidate = NULL;
    p2pSolution->lastFromCandidate = NULL;
    p2pSolution->firstToCandidate = NULL;
    p2pSolution->lastToCandidate = NULL;
    pN = p2pSolution->firstFromNode;
    while (pN != NULL)
      {
	  pNn = pN->next;
	  delete_point2PointNode (pN);
	  pN = pNn;
      }
    pN = p2pSolution->firstToNode;
    while (pN != NULL)
      {
	  pNn = pN->next;
	  delete_point2PointNode (pN);
	  pN = pNn;
      }
    p2pSolution->firstFromNode = NULL;
    p2pSolution->lastFromNode = NULL;
    p2pSolution->firstToNode = NULL;
    p2pSolution->lastToNode = NULL;
    pR = p2pSolution->FirstRow;
    while (pR != NULL)
      {
	  pRn = pR->Next;
	  if (pR->Point2PointRole == VROUTE_POINT2POINT_START
	      || pR->Point2PointRole == VROUTE_POINT2POINT_END)
	    {
		/* deleting partial Links */
		if (pR->linkRef != NULL)
		  {
		      if (pR->linkRef->Link != NULL)
			  free (pR->linkRef->Link);
		      if (pR->linkRef->Name != NULL)
			  free (pR->linkRef->Name);
		      free (pR->linkRef);
		  }
	    }
	  if (pR->Geometry != NULL)
	      gaiaFreeGeomColl (pR->Geometry);
	  free (pR);
	  pR = pRn;
      }
    p2pSolution->FirstRow = NULL;
    p2pSolution->LastRow = NULL;
    p2pSolution->CurrentRow = NULL;
    p2pSolution->CurrentRowId = 0;
    p2pSolution->totalCost = DBL_MAX;
    p2pSolution->fromCandidate = NULL;
    p2pSolution->toCandidate = NULL;
    if (p2pSolution->dynLine != NULL)
	gaiaFreeDynamicLine (p2pSolution->dynLine);
    p2pSolution->dynLine = NULL;
    p2pSolution->hasZ = 0;
    p2pSolution->Mode = VROUTE_POINT2POINT_ERROR;
}

static Point2PointSolutionPtr
alloc_point2PointSolution (void)
{
/* allocates and initializes the current Point2Point solution */
    Point2PointSolutionPtr p = malloc (sizeof (Point2PointSolution));
    p->validFrom = 0;
    p->xFrom = 0.0;
    p->yFrom = 0.0;
    p->zFrom = 0.0;
    p->validTo = 0;
    p->xTo = 0.0;
    p->yTo = 0.0;
    p->zTo = 0.0;
    p->srid = -1;
    p->firstFromCandidate = NULL;
    p->lastFromCandidate = NULL;
    p->firstToCandidate = NULL;
    p->lastToCandidate = NULL;
    p->firstFromNode = NULL;
    p->lastFromNode = NULL;
    p->firstToNode = NULL;
    p->lastToNode = NULL;
    p->FirstRow = NULL;
    p->LastRow = NULL;
    p->CurrentRow = NULL;
    p->CurrentRowId = 0;
    p->totalCost = DBL_MAX;
    p->fromCandidate = NULL;
    p->toCandidate = NULL;
    p->dynLine = NULL;
    p->hasZ = 0;
    p->Mode = VROUTE_POINT2POINT_ERROR;
    return p;
}

static void
find_srid (sqlite3 * handle, RoutingPtr graph)
{
/* attempting to retrieve the appropriate Srid */
    sqlite3_stmt *stmt;
    int ret;
    int type = GAIA_UNKNOWN;
    int srid = VROUTE_INVALID_SRID;
    char *sql;

    graph->Srid = srid;
    graph->HasZ = 0;

    if (graph->GeometryColumn == NULL)
	return;

    sql =
	sqlite3_mprintf
	("SELECT geometry_type, srid FROM geometry_columns WHERE "
	 "Lower(f_table_name) = Lower(%Q) AND Lower(f_geometry_column) = Lower(%Q)",
	 graph->TableName, graph->GeometryColumn);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		type = sqlite3_column_int (stmt, 0);
		srid = sqlite3_column_int (stmt, 1);
	    }
      }
    sqlite3_finalize (stmt);

    if (srid == VROUTE_INVALID_SRID)
      {
	  /* it could be a Network based on some Spatial VIEW */
	  sql =
	      sqlite3_mprintf
	      ("SELECT g.geometry_type, g.srid FROM views_geometry_columns AS v "
	       "JOIN geometry_columns AS g ON (v.f_table_name = g.f_table_name "
	       "AND v.f_geometry_column = g.f_geometry_column) "
	       "WHERE Lower(v.view_name) = Lower(%Q) AND Lower(v.view_geometry) = Lower(%Q)",
	       graph->TableName, graph->GeometryColumn);
	  ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	      return;
	  while (1)
	    {
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE)
		    break;
		if (ret == SQLITE_ROW)
		  {
		      type = sqlite3_column_int (stmt, 0);
		      srid = sqlite3_column_int (stmt, 1);
		  }
	    }
	  sqlite3_finalize (stmt);
      }

    switch (type)
      {
      case GAIA_POINTZ:
      case GAIA_LINESTRINGZ:
      case GAIA_POLYGONZ:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_GEOMETRYCOLLECTIONZ:
      case GAIA_POINTZM:
      case GAIA_LINESTRINGZM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOINTZM:
      case GAIA_MULTILINESTRINGZM:
      case GAIA_MULTIPOLYGONZM:
      case GAIA_GEOMETRYCOLLECTIONZM:
	  graph->HasZ = 1;
	  break;
      default:
	  graph->HasZ = 0;
	  break;
      };
    graph->Srid = srid;
}

static void
build_range_solution (MultiSolutionPtr multiSolution,
		      RoutingNodePtr * range_nodes, int cnt, int srid)
{
/* formatting the "within Cost range" solution */
    int i;
    if (cnt > 0)
      {
	  /* building the solution */
	  for (i = 0; i < cnt; i++)
	    {
		add_node_to_solution (multiSolution, range_nodes[i], srid, i);
	    }
      }
    if (range_nodes)
	free (range_nodes);
}

static RouteNodePtr
findSingleTo (RoutingMultiDestPtr multiple)
{
/* testing for a single destination */
    int i;
    RouteNodePtr to = NULL;
    int count = 0;
    for (i = 0; i < multiple->Items; i++)
      {
	  RouteNodePtr p_to = *(multiple->To + i);
	  if (p_to == NULL)
	      continue;
	  to = p_to;
	  count++;
      }
    if (count == 1)
	return to;
    return NULL;
}

static void
astar_solve (sqlite3 * handle, int options, RoutingPtr graph,
	     RoutingNodesPtr routing, MultiSolutionPtr multiSolution)
{
/* computing an A* Shortest Path solution */
    int cnt;
    RouteLinkPtr *shortest_path;
    ShortestPathSolutionPtr solution;
    RouteNodePtr to = findSingleTo (multiSolution->MultiTo);
    if (to == NULL)
	return;
    shortest_path =
	astar_shortest_path (routing, graph->Nodes, multiSolution->From, to,
			     graph->AStarHeuristicCoeff, &cnt);
    solution = add2multiSolution (multiSolution, multiSolution->From, to);
    build_solution (handle, options, graph, solution, shortest_path, cnt);
    build_multi_solution (multiSolution);
}

static void
dijkstra_multi_solve (sqlite3 * handle, int options, RoutingPtr graph,
		      RoutingNodesPtr routing, MultiSolutionPtr multiSolution)
{
/* computing a Dijkstra Shortest Path multiSolution */
    int i;
    RoutingMultiDestPtr multiple = multiSolution->MultiTo;
    int node_code = graph->NodeCode;

    dijkstra_multi_shortest_path (handle, options, graph, routing,
				  multiSolution);
/* testing if there are undefined or unresolved destinations */
    for (i = 0; i < multiple->Items; i++)
      {
	  ShortestPathSolutionPtr row;
	  RouteNodePtr to = *(multiple->To + i);
	  if (node_code)
	    {
		/* Nodes are identified by Codes */
		int len;
		const char *code = *(multiple->Codes + i);
		if (to == NULL)
		  {
		      row =
			  add2multiSolution (multiSolution, multiSolution->From,
					     NULL);
		      len = strlen (code);
		      row->Undefined = malloc (len + 1);
		      strcpy (row->Undefined, code);
		      continue;
		  }
		if (*(multiple->Found + i) != 'Y')
		  {
		      row =
			  add2multiSolution (multiSolution, multiSolution->From,
					     to);
		      len = strlen (code);
		      row->Undefined = malloc (len + 1);
		      strcpy (row->Undefined, code);
		  }
	    }
	  else
	    {
		/* Nodes are identified by Ids */
		sqlite3_int64 id = *(multiple->Ids + i);
		if (to == NULL)
		  {
		      row =
			  add2multiSolution (multiSolution, multiSolution->From,
					     NULL);
		      row->Undefined = malloc (4);
		      strcpy (row->Undefined, "???");
		      row->UndefinedId = id;
		      continue;
		  }
		if (*(multiple->Found + i) != 'Y')
		  {
		      row =
			  add2multiSolution (multiSolution, multiSolution->From,
					     to);
		      row->Undefined = malloc (4);
		      strcpy (row->Undefined, "???");
		      row->UndefinedId = id;
		  }
	    }
      }
    build_multi_solution (multiSolution);
}

static void
dijkstra_within_cost_range (RoutingNodesPtr routing,
			    MultiSolutionPtr multiSolution, int srid)
{
/* computing a Dijkstra "within cost range" solution */
    int cnt;
    RoutingNodePtr *range_nodes =
	dijkstra_range_analysis (routing, multiSolution->From,
				 multiSolution->MaxCost,
				 &cnt);
    build_range_solution (multiSolution, range_nodes, cnt, srid);
}

static void
tsp_nn_solve (sqlite3 * handle, int options, RoutingPtr graph,
	      RoutingNodesPtr routing, MultiSolutionPtr multiSolution)
{
/* computing a Dijkstra TSP NN Solution */
    int i;
    TspTargetsPtr targets = randomize_targets (handle, graph, multiSolution);
    for (i = 0; i < targets->Count; i++)
      {
	  /* checking for undefined targets */
	  if (*(targets->To + i) == NULL)
	      goto illegal;
      }
    dijkstra_tsp_nn (handle, options, graph, routing, targets);
    build_tsp_solution (multiSolution, targets, graph->Srid);
    destroy_tsp_targets (targets);
    return;

  illegal:
    build_tsp_illegal_solution (multiSolution, targets);
    destroy_tsp_targets (targets);
}

static void
tsp_ga_random_solutions_sql (TspGaPopulationPtr ga)
{
/* building the Solutions randomizing SQL query */
    int i;
    char *sql;
    char *prev_sql;

    for (i = 0; i < ga->Count; i++)
      {
	  if (i == 0)
	      sql = sqlite3_mprintf ("SELECT %d, Random() AS rnd\n", i);
	  else
	    {
		prev_sql = sql;
		sql =
		    sqlite3_mprintf ("%sUNION\nSELECT %d, Random() AS rnd\n",
				     prev_sql, i);
		sqlite3_free (prev_sql);
	    }
      }
    prev_sql = sql;
    sql = sqlite3_mprintf ("%sORDER BY rnd LIMIT 2", prev_sql);
    sqlite3_free (prev_sql);
    ga->RandomSolutionsSql = sql;
}

static void
tsp_ga_random_interval_sql (TspGaPopulationPtr ga)
{
/* building the Interval randomizing SQL query */
    int i;
    char *sql;
    char *prev_sql;

    for (i = 0; i < ga->Cities; i++)
      {
	  if (i == 0)
	      sql = sqlite3_mprintf ("SELECT %d, Random() AS rnd\n", i);
	  else
	    {
		prev_sql = sql;
		sql =
		    sqlite3_mprintf ("%sUNION\nSELECT %d, Random() AS rnd\n",
				     prev_sql, i);
		sqlite3_free (prev_sql);
	    }
      }
    prev_sql = sql;
    sql = sqlite3_mprintf ("%sORDER BY rnd LIMIT 2", prev_sql);
    sqlite3_free (prev_sql);
    ga->RandomIntervalSql = sql;
}

static TspGaDistancePtr
alloc_tsp_ga_distances (TspTargetsPtr targets)
{
/* allocating a TSP GA distances struct */
    int i;
    TspGaDistancePtr dist = malloc (sizeof (TspGaDistance));
    dist->Cities = targets->Count;
    dist->CityFrom = targets->From;
    dist->Distances = malloc (sizeof (TspGaSubDistancePtr) * dist->Cities);
    for (i = 0; i < dist->Cities; i++)
      {
	  TspGaSubDistancePtr sub = malloc (sizeof (TspGaSubDistance));
	  double cost = *(targets->Costs + i);
	  sub->CityTo = *(targets->To + i);
	  sub->Cost = cost;
	  *(dist->Distances + i) = sub;
      }
    dist->NearestIndex = -1;
    return dist;
}

static void
destroy_tsp_ga_distances (TspGaDistancePtr dist)
{
/* freeing a TSP GA distance struct */
    if (dist == NULL)
	return;
    if (dist->Distances != NULL)
      {
	  int i;
	  for (i = 0; i < dist->Cities; i++)
	    {
		TspGaSubDistancePtr sub = *(dist->Distances + i);
		if (sub != NULL)
		    free (sub);
	    }
	  free (dist->Distances);
      }
    free (dist);
}

static TspGaPopulationPtr
build_tsp_ga_population (int count)
{
/* creating a TSP GA Population */
    int i;
    TspGaPopulationPtr ga = malloc (sizeof (TspGaPopulation));
    ga->Count = count;
    ga->Cities = count;
    ga->Solutions = malloc (sizeof (TspGaSolutionPtr) * count);
    ga->Offsprings = malloc (sizeof (TspGaSolutionPtr) * count);
    for (i = 0; i < count; i++)
      {
	  *(ga->Offsprings + i) = NULL;
	  *(ga->Solutions + i) = NULL;
      }
    ga->Distances = malloc (sizeof (TspGaDistancePtr) * count);
    for (i = 0; i < count; i++)
	*(ga->Distances + i) = NULL;
    ga->RandomSolutionsSql = NULL;
    tsp_ga_random_solutions_sql (ga);
    ga->RandomIntervalSql = NULL;
    tsp_ga_random_interval_sql (ga);
    return ga;
}

static void
destroy_tsp_ga_solution (TspGaSolutionPtr solution)
{
/* memory cleanup: destroyng a GA Solution */
    if (solution == NULL)
	return;
    if (solution->CitiesFrom != NULL)
	free (solution->CitiesFrom);
    if (solution->CitiesTo != NULL)
	free (solution->CitiesTo);
    if (solution->Costs != NULL)
	free (solution->Costs);
    free (solution);
}

static void
free_tsp_ga_offsprings (TspGaPopulationPtr ga)
{
/* memory cleanup; freeing GA Offsprings */
    int i;
    if (ga == NULL)
	return;

    for (i = 0; i < ga->Count; i++)
      {
	  if (*(ga->Offsprings + i) != NULL)
	      destroy_tsp_ga_solution (*(ga->Offsprings + i));
	  *(ga->Offsprings + i) = NULL;
      }
}

static void
destroy_tsp_ga_population (TspGaPopulationPtr ga)
{
/* memory cleanup; destroyng a GA Population */
    int i;
    if (ga == NULL)
	return;

    for (i = 0; i < ga->Count; i++)
	destroy_tsp_ga_solution (*(ga->Solutions + i));
    free (ga->Solutions);
    free_tsp_ga_offsprings (ga);
    free (ga->Offsprings);
    if (ga->Distances != NULL)
      {
	  for (i = 0; i < ga->Cities; i++)
	    {
		TspGaDistancePtr dist = *(ga->Distances + i);
		if (dist != NULL)
		    destroy_tsp_ga_distances (dist);
	    }
      }
    free (ga->Distances);
    if (ga->RandomSolutionsSql != NULL)
	sqlite3_free (ga->RandomSolutionsSql);
    if (ga->RandomIntervalSql != NULL)
	sqlite3_free (ga->RandomIntervalSql);
    free (ga);
}

static int
cmp_dist_from (const void *p1, const void *p2)
{
/* compares FROM distances [for BSEARCH] */
    TspGaDistancePtr pD1 = (TspGaDistancePtr) p1;
    TspGaDistancePtr pD2 = *((TspGaDistancePtr *) p2);
    RouteNodePtr pN1 = pD1->CityFrom;
    RouteNodePtr pN2 = pD2->CityFrom;
    if (pN1 == pN2)
	return 0;
    if (pN1 > pN2)
	return 1;
    return -1;
}

static TspGaDistancePtr
tsp_ga_find_from_distance (TspGaPopulationPtr ga, RouteNodePtr from)
{
/* searching the main FROM distance */
    TspGaDistancePtr *ret;
    TspGaDistance dist;
    dist.CityFrom = from;
    ret =
	bsearch (&dist, ga->Distances, ga->Cities, sizeof (TspGaDistancePtr),
		 cmp_dist_from);
    if (ret == NULL)
	return NULL;
    return *ret;
}

static int
cmp_dist_to (const void *p1, const void *p2)
{
/* compares TO distances [for BSEARCH] */
    TspGaSubDistancePtr pD1 = (TspGaSubDistancePtr) p1;
    TspGaSubDistancePtr pD2 = *((TspGaSubDistancePtr *) p2);
    RouteNodePtr pN1 = pD1->CityTo;
    RouteNodePtr pN2 = pD2->CityTo;
    if (pN1 == pN2)
	return 0;
    if (pN1 > pN2)
	return 1;
    return -1;
}

static TspGaSubDistancePtr
tsp_ga_find_to_distance (TspGaDistancePtr dist, RouteNodePtr to)
{
/* searching the main FROM distance */
    TspGaSubDistancePtr *ret;
    TspGaSubDistance sub;
    sub.CityTo = to;
    ret =
	bsearch (&sub, dist->Distances, dist->Cities,
		 sizeof (TspGaSubDistancePtr), cmp_dist_to);
    if (ret == NULL)
	return NULL;
    return *ret;
}

static double
tsp_ga_find_distance (TspGaPopulationPtr ga, RouteNodePtr from, RouteNodePtr to)
{
/* searching a cached distance */
    TspGaSubDistancePtr sub;
    TspGaDistancePtr dist = tsp_ga_find_from_distance (ga, from);
    if (dist == NULL)
	return DBL_MAX;

    sub = tsp_ga_find_to_distance (dist, to);
    if (sub != NULL)
	return sub->Cost;
    return DBL_MAX;
}

static void
tsp_ga_random_solutions (sqlite3 * handle, TspGaPopulationPtr ga, int *index1,
			 int *index2)
{
/* fetching two random TSP GA solutions */
    int i;
    int ret;
    int n_rows;
    int n_columns;
    const char *value = NULL;
    char **results;

    *index1 = -1;
    *index2 = -1;

    ret =
	sqlite3_get_table (handle, ga->RandomSolutionsSql, &results, &n_rows,
			   &n_columns, NULL);
    if (ret != SQLITE_OK)
	return;
    if (n_rows >= 1)
      {
	  for (i = 1; i <= n_rows; i++)
	    {
		value = results[(i * n_columns) + 0];
		if (i == 1)
		    *index1 = atoi (value);
		else
		    *index2 = atoi (value);
	    }
      }
    sqlite3_free_table (results);
}

static void
tsp_ga_random_interval (sqlite3 * handle, TspGaPopulationPtr ga, int *index1,
			int *index2)
{
/* fetching a random TSP GA interval */
    int i;
    int ret;
    int n_rows;
    int n_columns;
    const char *value = NULL;
    char **results;

    *index1 = -1;
    *index2 = -1;

    ret =
	sqlite3_get_table (handle, ga->RandomIntervalSql, &results, &n_rows,
			   &n_columns, NULL);
    if (ret != SQLITE_OK)
	return;
    if (n_rows >= 1)
      {
	  for (i = 1; i <= n_rows; i++)
	    {
		value = results[(i * n_columns) + 0];
		if (i == 1)
		    *index1 = atoi (value);
		else
		    *index2 = atoi (value);
	    }
      }
    sqlite3_free_table (results);
}

static void
tps_ga_chromosome_update (TspGaSolutionPtr chromosome, RouteNodePtr from,
			  RouteNodePtr to, double cost)
{
/* updating a chromosome (missing distance) */
    int j;
    for (j = 0; j < chromosome->Cities; j++)
      {
	  RouteNodePtr n1 = *(chromosome->CitiesFrom + j);
	  RouteNodePtr n2 = *(chromosome->CitiesTo + j);
	  if (n1 == from && n2 == to)
	      *(chromosome->Costs + j) = cost;
      }
}

static void
tsp_ga_random_mutation (sqlite3 * handle, TspGaPopulationPtr ga,
			TspGaSolutionPtr mutant)
{
/* introducing a random mutation */
    RouteNodePtr mutation;
    int j;
    int idx1;
    int idx2;

/* applying a random mutation */
    tsp_ga_random_interval (handle, ga, &idx1, &idx2);
    mutation = *(mutant->CitiesFrom + idx1);
    *(mutant->CitiesFrom + idx1) = *(mutant->CitiesFrom + idx2);
    *(mutant->CitiesFrom + idx2) = mutation;

/* adjusting From/To */
    for (j = 1; j < mutant->Cities; j++)
      {
	  RouteNodePtr pFrom = *(mutant->CitiesFrom + j);
	  *(mutant->CitiesTo + j - 1) = pFrom;
      }
    *(mutant->CitiesTo + mutant->Cities - 1) = *(mutant->CitiesFrom + 0);

/* adjusting Costs */
    mutant->TotalCost = 0.0;
    for (j = 0; j < mutant->Cities; j++)
      {
	  RouteNodePtr pFrom = *(mutant->CitiesFrom + j);
	  RouteNodePtr pTo = *(mutant->CitiesTo + j);
	  double cost = tsp_ga_find_distance (ga, pFrom, pTo);
	  tps_ga_chromosome_update (mutant, pFrom, pTo, cost);
	  *(mutant->Costs + j) = cost;
	  mutant->TotalCost += cost;
      }
}

static TspGaSolutionPtr
tsp_ga_clone_solution (TspGaPopulationPtr ga, TspGaSolutionPtr original)
{
/* cloning a TSP GA solution */
    int j;
    TspGaSolutionPtr clone;
    if (original == NULL)
	return NULL;

    clone = malloc (sizeof (TspGaSolution));
    clone->Cities = original->Cities;
    clone->CitiesFrom = malloc (sizeof (RouteNodePtr) * ga->Cities);
    clone->CitiesTo = malloc (sizeof (RouteNodePtr) * ga->Cities);
    clone->Costs = malloc (sizeof (double) * ga->Cities);
    for (j = 0; j < ga->Cities; j++)
      {
	  *(clone->CitiesFrom + j) = *(original->CitiesFrom + j);
	  *(clone->CitiesTo + j) = *(original->CitiesTo + j);
	  *(clone->Costs + j) = *(original->Costs + j);
      }
    clone->TotalCost = 0.0;
    return clone;
}

static TspGaSolutionPtr
tsp_ga_crossover (sqlite3 * handle, TspGaPopulationPtr ga, int mutation1,
		  int mutation2)
{
/* creating a Crossover solution */
    int j;
    int idx1;
    int idx2;
    TspGaSolutionPtr hybrid;
    TspGaSolutionPtr parent1 = NULL;
    TspGaSolutionPtr parent2 = NULL;

/* randomly choosing two parents */
    tsp_ga_random_solutions (handle, ga, &idx1, &idx2);
    if (idx1 >= 0 && idx1 < ga->Count)
	parent1 = tsp_ga_clone_solution (ga, *(ga->Solutions + idx1));
    if (idx2 >= 0 && idx2 < ga->Count)
	parent2 = tsp_ga_clone_solution (ga, *(ga->Solutions + idx2));
    if (parent1 == NULL || parent2 == NULL)
	goto stop;

    if (mutation1)
	tsp_ga_random_mutation (handle, ga, parent1);
    if (mutation2)
	tsp_ga_random_mutation (handle, ga, parent2);

/* creating an empty hybrid */
    hybrid = malloc (sizeof (TspGaSolution));
    hybrid->Cities = ga->Cities;
    hybrid->CitiesFrom = malloc (sizeof (RouteNodePtr) * ga->Cities);
    hybrid->CitiesTo = malloc (sizeof (RouteNodePtr) * ga->Cities);
    hybrid->Costs = malloc (sizeof (double) * ga->Cities);
    for (j = 0; j < ga->Cities; j++)
      {
	  *(hybrid->CitiesFrom + j) = NULL;
	  *(hybrid->CitiesTo + j) = NULL;
	  *(hybrid->Costs + j) = DBL_MAX;
      }
    hybrid->TotalCost = 0.0;

/* step #1: inheritance from the fist parent */
    tsp_ga_random_interval (handle, ga, &idx1, &idx2);
    if (idx1 < idx2)
      {
	  for (j = idx1; j <= idx2; j++)
	      *(hybrid->CitiesFrom + j) = *(parent1->CitiesFrom + j);
      }
    else
      {
	  for (j = idx2; j <= idx1; j++)
	      *(hybrid->CitiesFrom + j) = *(parent1->CitiesFrom + j);
      }

/* step #2: inheritance from the second parent */
    for (j = 0; j < parent2->Cities; j++)
      {
	  RouteNodePtr p2From = *(parent2->CitiesFrom + j);
	  int k;
	  int found = 0;
	  if (p2From == NULL)
	      continue;
	  for (k = 0; k < hybrid->Cities; k++)
	    {
		RouteNodePtr p1From = *(hybrid->CitiesFrom + k);
		if (p1From == NULL)
		    continue;
		if (p1From == p2From)
		  {
		      /* already present: skipping */
		      found = 1;
		      break;
		  }
	    }
	  if (found)
	      continue;
	  for (k = 0; k < hybrid->Cities; k++)
	    {
		if (*(hybrid->CitiesFrom + k) == NULL
		    && *(hybrid->CitiesTo + k) == NULL
		    && *(hybrid->Costs + k) == DBL_MAX)
		  {
		      /* found an empty slot: inserting */
		      *(hybrid->CitiesFrom + k) = p2From;
		      break;
		  }
	    }
      }
    destroy_tsp_ga_solution (parent1);
    destroy_tsp_ga_solution (parent2);

/* adjusting From/To */
    for (j = 1; j < hybrid->Cities; j++)
      {
	  RouteNodePtr p1From = *(hybrid->CitiesFrom + j);
	  *(hybrid->CitiesTo + j - 1) = p1From;
      }
    *(hybrid->CitiesTo + hybrid->Cities - 1) = *(hybrid->CitiesFrom + 0);

/* retrieving cached costs */
    for (j = 0; j < hybrid->Cities; j++)
      {
	  RouteNodePtr pFrom = *(hybrid->CitiesFrom + j);
	  RouteNodePtr pTo = *(hybrid->CitiesTo + j);
	  double cost = tsp_ga_find_distance (ga, pFrom, pTo);
	  tps_ga_chromosome_update (hybrid, pFrom, pTo, cost);
	  hybrid->TotalCost += cost;
      }
    return hybrid;

  stop:
    if (parent1 != NULL)
	destroy_tsp_ga_solution (parent1);
    if (parent2 != NULL)
	destroy_tsp_ga_solution (parent2);
    return NULL;
}

static void
evalTspGaFitness (TspGaPopulationPtr ga)
{
/* evaluating the comparative fitness of parents and offsprings */
    int j;
    int i;
    int index;
    int already_defined = 0;

    for (j = 0; j < ga->Count; j++)
      {
	  /* evaluating an offsprings */
	  double max_cost = 0.0;
	  TspGaSolutionPtr hybrid = *(ga->Offsprings + j);

	  for (i = 0; i < ga->Count; i++)
	    {
		/* searching the worst parent */
		TspGaSolutionPtr old = *(ga->Solutions + i);
		if (old->TotalCost > max_cost)
		  {
		      max_cost = old->TotalCost;
		      index = i;
		  }
		if (old->TotalCost == hybrid->TotalCost)
		    already_defined = 1;
	    }
	  if (max_cost > hybrid->TotalCost && !already_defined)
	    {
		/* inserting the new hybrid by replacing the worst parent */
		TspGaSolutionPtr kill = *(ga->Solutions + index);
		*(ga->Solutions + index) = hybrid;
		*(ga->Offsprings + j) = NULL;
		destroy_tsp_ga_solution (kill);
	    }
      }
}

static MultiSolutionPtr
tsp_ga_compute_route (sqlite3 * handle, int options, RouteNodePtr origin,
		      RouteNodePtr destination, RoutingPtr graph,
		      RoutingNodesPtr routing)
{
/* computing a route from City to City */
    RoutingMultiDestPtr to = NULL;
    MultiSolutionPtr ms = alloc_multiSolution ();
    ms->From = origin;
    to = malloc (sizeof (RoutingMultiDest));
    ms->MultiTo = to;
    to->CodeNode = graph->NodeCode;
    to->Found = malloc (sizeof (char));
    to->To = malloc (sizeof (RouteNodePtr));
    *(to->Found + 0) = 'N';
    *(to->To + 0) = destination;
    to->Items = 1;
    to->Next = 0;
    if (graph->NodeCode)
      {
	  int len = strlen (destination->Code);
	  to->Ids = NULL;
	  to->Codes = malloc (sizeof (char *));
	  *(to->Codes + 0) = malloc (len + 1);
	  strcpy (*(to->Codes + 0), destination->Code);
      }
    else
      {
	  to->Ids = malloc (sizeof (sqlite3_int64));
	  to->Codes = NULL;
	  *(to->Ids + 0) = destination->Id;
      }

    dijkstra_multi_shortest_path (handle, options, graph, routing, ms);
    return (ms);
}

static void
completing_tsp_ga_solution (sqlite3 * handle, int options,
			    RouteNodePtr origin, RouteNodePtr destination,
			    RoutingPtr graph, RoutingNodesPtr routing,
			    TspTargetsPtr targets, int j)
{
/* completing a TSP GA solution */
    ShortestPathSolutionPtr solution;
    MultiSolutionPtr result =
	tsp_ga_compute_route (handle, options, origin, destination, graph,
			      routing);

    solution = result->First;
    while (solution != NULL)
      {
	  RowSolutionPtr old;
	  ShortestPathSolutionPtr newSolution = alloc_solution ();
	  newSolution->From = origin;
	  newSolution->To = destination;
	  newSolution->TotalCost += solution->TotalCost;
	  targets->TotalCost += solution->TotalCost;
	  newSolution->Geometry = solution->Geometry;
	  solution->Geometry = NULL;
	  if (j < 0)
	      targets->LastSolution = newSolution;
	  else
	      *(targets->Solutions + j) = newSolution;
	  old = solution->First;
	  while (old != NULL)
	    {
		/* inserts a Link into the Shortest Path solution */
		RowSolutionPtr p = malloc (sizeof (RowSolution));
		p->Link = old->Link;
		p->Name = old->Name;
		old->Name = NULL;
		p->Next = NULL;
		if (!(newSolution->First))
		    newSolution->First = p;
		if (newSolution->Last)
		    newSolution->Last->Next = p;
		newSolution->Last = p;
		old = old->Next;
	    }
	  solution = solution->Next;
      }
    delete_multiSolution (result);
}

static void
set_tsp_ga_targets (sqlite3 * handle, int options, RoutingPtr graph,
		    RoutingNodesPtr routing, TspGaSolutionPtr bestSolution,
		    TspTargetsPtr targets)
{
/* preparing TSP GA targets (best solution found) */
    int j;
    RouteNodePtr from;
    RouteNodePtr to;

    for (j = 0; j < targets->Count; j++)
      {
	  from = *(bestSolution->CitiesFrom + j);
	  to = *(bestSolution->CitiesTo + j);
	  completing_tsp_ga_solution (handle, options, from, to, graph, routing,
				      targets, j);
	  *(targets->To + j) = to;
	  *(targets->Found + j) = 'Y';
      }
    /* this is the final City closing the circular path */
    from = *(bestSolution->CitiesFrom + targets->Count);
    to = *(bestSolution->CitiesTo + targets->Count);
    completing_tsp_ga_solution (handle, options, from, to, graph, routing,
				targets, -1);
}

static TspTargetsPtr
build_tsp_ga_solution_targets (int count, RouteNodePtr from)
{
/* creating and initializing the TSP helper struct - final solution */
    int i;
    TspTargetsPtr targets = malloc (sizeof (TspTargets));
    targets->Mode = VROUTE_TSP_SOLUTION;
    targets->TotalCost = 0.0;
    targets->Count = count;
    targets->To = malloc (sizeof (RouteNodePtr *) * targets->Count);
    targets->Found = malloc (sizeof (char) * targets->Count);
    targets->Costs = malloc (sizeof (double) * targets->Count);
    targets->Solutions =
	malloc (sizeof (ShortestPathSolutionPtr) * targets->Count);
    targets->LastSolution = NULL;
    targets->From = from;
    for (i = 0; i < targets->Count; i++)
      {
	  *(targets->To + i) = NULL;
	  *(targets->Found + i) = 'N';
	  *(targets->Costs + i) = DBL_MAX;
	  *(targets->Solutions + i) = NULL;
      }
    return targets;
}

static TspTargetsPtr
tsp_ga_permuted_targets (RouteNodePtr from, RoutingMultiDestPtr multi,
			 int index)
{
/* initializing the TSP helper struct - permuted */
    int i;
    TspTargetsPtr targets = malloc (sizeof (TspTargets));
    targets->Mode = VROUTE_ROUTING_SOLUTION;
    targets->TotalCost = 0.0;
    targets->Count = multi->Items;
    targets->To = malloc (sizeof (RouteNodePtr *) * targets->Count);
    targets->Found = malloc (sizeof (char) * targets->Count);
    targets->Costs = malloc (sizeof (double) * targets->Count);
    targets->Solutions =
	malloc (sizeof (ShortestPathSolutionPtr) * targets->Count);
    targets->LastSolution = NULL;
    if (index < 0)
      {
	  /* no permutation */
	  targets->From = from;
	  for (i = 0; i < targets->Count; i++)
	    {
		*(targets->To + i) = *(multi->To + i);
		*(targets->Found + i) = 'N';
		*(targets->Costs + i) = DBL_MAX;
		*(targets->Solutions + i) = NULL;
	    }
      }
    else
      {
	  /* permuting */
	  targets->From = *(multi->To + index);
	  for (i = 0; i < targets->Count; i++)
	    {
		if (i == index)
		  {
		      *(targets->To + i) = from;
		      *(targets->Found + i) = 'N';
		      *(targets->Costs + i) = DBL_MAX;
		      *(targets->Solutions + i) = NULL;
		  }
		else
		  {
		      *(targets->To + i) = *(multi->To + i);
		      *(targets->Found + i) = 'N';
		      *(targets->Costs + i) = DBL_MAX;
		      *(targets->Solutions + i) = NULL;
		  }
	    }
      }
    return targets;
}

static int
build_tsp_nn_solution (TspGaPopulationPtr ga, TspTargetsPtr targets, int index)
{
/* building a TSP NN solution */
    int j;
    int i;
    RouteNodePtr origin;
    TspGaDistancePtr dist;
    TspGaSubDistancePtr sub;
    RouteNodePtr destination;
    double cost;
    TspGaSolutionPtr solution = malloc (sizeof (TspGaSolution));
    solution->Cities = targets->Count + 1;
    solution->CitiesFrom = malloc (sizeof (RouteNodePtr) * solution->Cities);
    solution->CitiesTo = malloc (sizeof (RouteNodePtr) * solution->Cities);
    solution->Costs = malloc (sizeof (double) * solution->Cities);
    solution->TotalCost = 0.0;

    origin = targets->From;
    for (j = 0; j < targets->Count; j++)
      {
	  /* searching the nearest City */
	  dist = tsp_ga_find_from_distance (ga, origin);
	  if (dist == NULL)
	      return 0;
	  destination = NULL;
	  cost = DBL_MAX;

	  sub = *(dist->Distances + dist->NearestIndex);
	  destination = sub->CityTo;
	  cost = sub->Cost;
	  /* excluding the last City (should be a closed circuit) */
	  if (destination == targets->From)
	      destination = NULL;
	  if (destination != NULL)
	    {
		for (i = 0; i < targets->Count; i++)
		  {
		      /* checking if this City was already reached */
		      RouteNodePtr city = *(targets->To + i);
		      if (city == destination)
			{
			    if (*(targets->Found + i) == 'Y')
				destination = NULL;
			    else
				*(targets->Found + i) = 'Y';
			    break;
			}
		  }
	    }
	  if (destination == NULL)
	    {
		/* searching for an alternative destination */
		double min = DBL_MAX;
		int ind = -1;
		int k;
		for (k = 0; k < dist->Cities; k++)
		  {
		      sub = *(dist->Distances + k);
		      RouteNodePtr city = sub->CityTo;
		      /* excluding the last City (should be a closed circuit) */
		      if (city == targets->From)
			  continue;
		      for (i = 0; i < targets->Count; i++)
			{
			    RouteNodePtr city2 = *(targets->To + i);
			    if (*(targets->Found + i) == 'Y')
				continue;
			    if (city == city2)
			      {
				  if (sub->Cost < min)
				    {
					min = sub->Cost;
					ind = k;
				    }
			      }
			}
		  }
		if (ind >= 0)
		  {
		      sub = *(dist->Distances + ind);
		      destination = sub->CityTo;
		      cost = min;
		      for (i = 0; i < targets->Count; i++)
			{
			    RouteNodePtr city = *(targets->To + i);
			    if (city == destination)
			      {
				  *(targets->Found + i) = 'Y';
				  break;
			      }
			}
		  }
	    }
	  if (destination == NULL)
	      return 0;
	  *(solution->CitiesFrom + j) = origin;
	  *(solution->CitiesTo + j) = destination;
	  *(solution->Costs + j) = cost;
	  solution->TotalCost += cost;
	  origin = destination;
      }

/* returning to FROM so to close the circular path */
    destination = targets->From;
    for (i = 0; i < ga->Cities; i++)
      {
	  TspGaDistancePtr d = *(ga->Distances + i);
	  if (d->CityFrom == origin)
	    {
		int k;
		dist = *(ga->Distances + i);
		for (k = 0; k < dist->Cities; k++)
		  {
		      sub = *(dist->Distances + k);
		      RouteNodePtr city = sub->CityTo;
		      if (city == destination)
			{
			    cost = sub->Cost;
			    *(solution->CitiesFrom + targets->Count) = origin;
			    *(solution->CitiesTo + targets->Count) =
				destination;
			    *(solution->Costs + targets->Count) = cost;
			    solution->TotalCost += cost;
			}
		  }
	    }
      }

/* inserting into the GA population */
    *(ga->Solutions + index) = solution;
    return 1;
}

static int
cmp_nodes_addr (const void *p1, const void *p2)
{
/* compares two nodes  by addr [for QSORT] */
    TspGaDistancePtr pD1 = *((TspGaDistancePtr *) p1);
    TspGaDistancePtr pD2 = *((TspGaDistancePtr *) p2);
    RouteNodePtr pN1 = pD1->CityFrom;
    RouteNodePtr pN2 = pD2->CityFrom;
    if (pN1 == pN2)
	return 0;
    if (pN1 > pN2)
	return 1;
    return -1;
}

static int
cmp_dist_addr (const void *p1, const void *p2)
{
/* compares two nodes  by addr [for QSORT] */
    TspGaSubDistancePtr pD1 = *((TspGaSubDistancePtr *) p1);
    TspGaSubDistancePtr pD2 = *((TspGaSubDistancePtr *) p2);
    RouteNodePtr pN1 = pD1->CityTo;
    RouteNodePtr pN2 = pD2->CityTo;
    if (pN1 == pN2)
	return 0;
    if (pN1 > pN2)
	return 1;
    return -1;
}

static void
tsp_ga_sort_distances (TspGaPopulationPtr ga)
{
/* sorting Distances/Costs by Node addr */
    int i;
    qsort (ga->Distances, ga->Cities, sizeof (RouteNodePtr), cmp_nodes_addr);
    for (i = 0; i < ga->Cities; i++)
      {
	  TspGaDistancePtr dist = *(ga->Distances + i);
	  qsort (dist->Distances, dist->Cities, sizeof (TspGaSubDistancePtr),
		 cmp_dist_addr);
      }
    for (i = 0; i < ga->Cities; i++)
      {
	  int k;
	  int index = -1;
	  double min = DBL_MAX;
	  TspGaDistancePtr dist = *(ga->Distances + i);
	  for (k = 0; k < dist->Cities; k++)
	    {
		TspGaSubDistancePtr sub = *(dist->Distances + k);
		if (sub->Cost < min)
		  {
		      min = sub->Cost;
		      index = k;
		  }
	    }
	  if (index >= 0)
	      dist->NearestIndex = index;
      }
}

static void
tsp_ga_solve (sqlite3 * handle, int options, RoutingPtr graph,
	      RoutingNodesPtr routing, MultiSolutionPtr multiSolution)
{
/* computing a Dijkstra TSP GA Solution */
    int i;
    int j;
    double min;
    TspGaSolutionPtr bestSolution;
    int count = 0;
    int max_iterations = VROUTE_TSP_GA_MAX_ITERATIONS;
    TspGaPopulationPtr ga = NULL;
    RoutingMultiDestPtr multi;
    TspTargetsPtr targets;
    TspGaDistancePtr dist;

    if (multiSolution == NULL)
	return;
    multi = multiSolution->MultiTo;
    if (multi == NULL)
	return;

/* initialinzing the TSP GA helper struct */
    ga = build_tsp_ga_population (multi->Items + 1);

    for (i = -1; i < multi->Items; i++)
      {
	  /* determining all City-to-City distances (costs) */
	  targets = tsp_ga_permuted_targets (multiSolution->From, multi, i);
	  for (j = 0; j < targets->Count; j++)
	    {
		/* checking for undefined targets */
		if (*(targets->To + j) == NULL)
		  {
		      int k;
		      for (k = 0; k < targets->Count; k++)
			{
			    /* maskinkg unreachable targets */
			    *(targets->Found + k) = 'Y';
			}
		      build_tsp_illegal_solution (multiSolution, targets);
		      destroy_tsp_targets (targets);
		      goto invalid;
		  }
	    }
	  dijkstra_targets_solve (routing, targets);
	  for (j = 0; j < targets->Count; j++)
	    {
		/* checking for unreachable targets */
		if (*(targets->Found + j) != 'Y')
		  {
		      build_tsp_illegal_solution (multiSolution, targets);
		      destroy_tsp_targets (targets);
		      goto invalid;
		  }
	    }
	  /* inserting the distances/costs into the helper struct */
	  dist = alloc_tsp_ga_distances (targets);
	  *(ga->Distances + i + 1) = dist;
	  destroy_tsp_targets (targets);
      }
    tsp_ga_sort_distances (ga);

    for (i = -1; i < multi->Items; i++)
      {
	  /* initializing GA using permuted NN solutions */
	  int ret;
	  targets = tsp_ga_permuted_targets (multiSolution->From, multi, i);
	  ret = build_tsp_nn_solution (ga, targets, i + 1);
	  destroy_tsp_targets (targets);
	  if (!ret)
	      goto invalid;
      }

    while (max_iterations >= 0)
      {
	  /* sexual reproduction and darwinian selection */
	  for (i = 0; i < ga->Count; i++)
	    {
		/* Genetic loop - with mutations */
		TspGaSolutionPtr hybrid;
		int mutation1 = 0;
		int mutation2 = 0;
		count++;
		if (count % 13 == 0)
		  {
		      /* introducing a random mutation on parent #1 */
		      mutation1 = 1;
		  }
		if (count % 16 == 0)
		  {
		      /* introducing a random mutation on parent #2 */
		      mutation2 = 1;
		  }
		hybrid = tsp_ga_crossover (handle, ga, mutation1, mutation2);
		*(ga->Offsprings + i) = hybrid;
	    }
	  evalTspGaFitness (ga);
	  free_tsp_ga_offsprings (ga);
	  max_iterations--;
      }

/* building the TSP GA solution */
    min = DBL_MAX;
    bestSolution = NULL;
    for (i = 0; i < ga->Count; i++)
      {
	  /* searching the best solution */
	  TspGaSolutionPtr old = *(ga->Solutions + i);
	  if (old == NULL)
	      continue;
	  if (old->TotalCost < min)
	    {
		min = old->TotalCost;
		bestSolution = old;
	    }
      }
    if (bestSolution != NULL)
      {
	  targets =
	      build_tsp_ga_solution_targets (multiSolution->MultiTo->Items,
					     multiSolution->From);
	  set_tsp_ga_targets (handle, options, graph, routing, bestSolution,
			      targets);
	  build_tsp_solution (multiSolution, targets, graph->Srid);
	  destroy_tsp_targets (targets);
      }
    destroy_tsp_ga_population (ga);
    return;

  invalid:
    destroy_tsp_ga_population (ga);
}

static void
network_free (RoutingPtr p)
{
/* memory cleanup; freeing any allocation for the network struct */
    RouteNodePtr pN;
    int i;
    if (!p)
	return;
    for (i = 0; i < p->NumNodes; i++)
      {
	  pN = p->Nodes + i;
	  if (pN->Code)
	      free (pN->Code);
	  if (pN->Links)
	      free (pN->Links);
      }
    if (p->Nodes)
	free (p->Nodes);
    if (p->TableName)
	free (p->TableName);
    if (p->FromColumn)
	free (p->FromColumn);
    if (p->ToColumn)
	free (p->ToColumn);
    if (p->GeometryColumn)
	free (p->GeometryColumn);
    if (p->NameColumn)
	free (p->NameColumn);
    free (p);
}

static RoutingPtr
network_init (const unsigned char *blob, int size)
{
/* parsing the HEADER block */
    RoutingPtr graph;
    int net64;
    int aStar = 0;
    int nodes;
    int node_code;
    int max_code_length;
    int endian_arch = gaiaEndianArch ();
    const char *table;
    const char *from;
    const char *to;
    const char *geom;
    const char *name = NULL;
    double a_star_coeff = 1.0;
    int len;
    int i;
    const unsigned char *ptr;
    if (size < 9)
	return NULL;
    if (*(blob + 0) == GAIA_NET_START)	/* signature - legacy format using 32bit ints */
	net64 = 0;
    else if (*(blob + 0) == GAIA_NET64_START)	/* signature - format using 64bit ints */
	net64 = 1;
    else if (*(blob + 0) == GAIA_NET64_A_STAR_START)	/* signature - format using 64bit ints AND supporting A* */
      {
	  net64 = 1;
	  aStar = 1;
      }
    else
	return NULL;
    if (*(blob + 1) != GAIA_NET_HEADER)	/* signature */
	return NULL;
    nodes = gaiaImport32 (blob + 2, 1, endian_arch);	/* # nodes */
    if (nodes <= 0)
	return NULL;
    if (*(blob + 6) == GAIA_NET_CODE)	/* Nodes identified by a TEXT code */
	node_code = 1;
    else if (*(blob + 6) == GAIA_NET_ID)	/* Nodes indentified by an INTEGER id */
	node_code = 0;
    else
	return NULL;
    max_code_length = *(blob + 7);	/* Max TEXT Code length */
    if (*(blob + 8) != GAIA_NET_TABLE)	/* signature for TABLE NAME */
	return NULL;
    ptr = blob + 9;
    len = gaiaImport16 (ptr, 1, endian_arch);	/* TABLE NAME is varlen */
    ptr += 2;
    table = (char *) ptr;
    ptr += len;
    if (*ptr != GAIA_NET_FROM)	/* signature for FromNode COLUMN */
	return NULL;
    ptr++;
    len = gaiaImport16 (ptr, 1, endian_arch);	/* FromNode COLUMN is varlen */
    ptr += 2;
    from = (char *) ptr;
    ptr += len;
    if (*ptr != GAIA_NET_TO)	/* signature for ToNode COLUMN */
	return NULL;
    ptr++;
    len = gaiaImport16 (ptr, 1, endian_arch);	/* ToNode COLUMN is varlen */
    ptr += 2;
    to = (char *) ptr;
    ptr += len;
    if (*ptr != GAIA_NET_GEOM)	/* signature for Geometry COLUMN */
	return NULL;
    ptr++;
    len = gaiaImport16 (ptr, 1, endian_arch);	/* Geometry COLUMN is varlen */
    ptr += 2;
    geom = (char *) ptr;
    ptr += len;
    if (net64)
      {
	  if (*ptr != GAIA_NET_NAME)	/* signature for Name COLUMN - may be empty */
	      return NULL;
	  ptr++;
	  len = gaiaImport16 (ptr, 1, endian_arch);	/* Name COLUMN is varlen */
	  ptr += 2;
	  name = (char *) ptr;
	  ptr += len;
      }
    if (net64 && aStar)
      {
	  if (*ptr != GAIA_NET_A_STAR_COEFF)	/* signature for A* Heuristic Coeff */
	      return NULL;
	  ptr++;
	  a_star_coeff = gaiaImport64 (ptr, 1, endian_arch);
	  ptr += 8;
      }
    if (*ptr != GAIA_NET_END)	/* signature */
	return NULL;
    graph = malloc (sizeof (Routing));
    graph->Srid = VROUTE_INVALID_SRID;
    graph->HasZ = 0;
    graph->Net64 = net64;
    graph->AStar = aStar;
    graph->EndianArch = endian_arch;
    graph->CurrentIndex = 0;
    graph->NodeCode = node_code;
    graph->MaxCodeLength = max_code_length;
    graph->NumNodes = nodes;
    graph->Nodes = malloc (sizeof (RouteNode) * nodes);
    for (i = 0; i < nodes; i++)
      {
	  graph->Nodes[i].Code = NULL;
	  graph->Nodes[i].NumLinks = 0;
	  graph->Nodes[i].Links = NULL;
      }
    len = strlen (table);
    graph->TableName = malloc (len + 1);
    strcpy (graph->TableName, table);
    len = strlen (from);
    graph->FromColumn = malloc (len + 1);
    strcpy (graph->FromColumn, from);
    len = strlen (to);
    graph->ToColumn = malloc (len + 1);
    strcpy (graph->ToColumn, to);
    len = strlen (geom);
    if (len <= 1)
	graph->GeometryColumn = NULL;
    else
      {
	  graph->GeometryColumn = malloc (len + 1);
	  strcpy (graph->GeometryColumn, geom);
      }
    if (!net64)
      {
	  /* Name column is not supported */
	  graph->NameColumn = NULL;
      }
    else
      {
	  len = strlen (name);
	  if (len <= 1)
	      graph->NameColumn = NULL;
	  else
	    {
		graph->NameColumn = malloc (len + 1);
		strcpy (graph->NameColumn, name);
	    }
      }
    graph->AStarHeuristicCoeff = a_star_coeff;
    return graph;
}

static int
network_block (RoutingPtr graph, const unsigned char *blob, int size)
{
/* parsing a NETWORK Block */
    const unsigned char *in = blob;
    int nodes;
    int i;
    int ia;
    int index;
    char *code = NULL;
    double x;
    double y;
    sqlite3_int64 nodeId = -1;
    int links;
    RouteNodePtr pN;
    RouteLinkPtr pA;
    int len;
    sqlite3_int64 linkId;
    int nodeToIdx;
    double cost;
    if (size < 3)
	goto error;
    if (*in++ != GAIA_NET_BLOCK)	/* signature */
	goto error;
    nodes = gaiaImport16 (in, 1, graph->EndianArch);	/* # Nodes */
    in += 2;
    code = malloc (graph->MaxCodeLength + 1);
    for (i = 0; i < nodes; i++)
      {
	  /* parsing each node */
	  if ((size - (in - blob)) < 5)
	      goto error;
	  if (*in++ != GAIA_NET_NODE)	/* signature */
	      goto error;
	  index = gaiaImport32 (in, 1, graph->EndianArch);	/* node internal index */
	  in += 4;
	  if (index < 0 || index >= graph->NumNodes)
	      goto error;
	  if (graph->NodeCode)
	    {
		/* Nodes are identified by a TEXT Code */
		if ((size - (in - blob)) < graph->MaxCodeLength)
		    goto error;
		memcpy (code, in, graph->MaxCodeLength);
		*(code + graph->MaxCodeLength) = '\0';
		in += graph->MaxCodeLength;
	    }
	  else
	    {
		/* Nodes are identified by an INTEGER Id */
		if (graph->Net64)
		  {
		      if ((size - (in - blob)) < 8)
			  goto error;
		      nodeId = gaiaImportI64 (in, 1, graph->EndianArch);	/* the Node ID: 64bit */
		      in += 8;
		  }
		else
		  {
		      if ((size - (in - blob)) < 4)
			  goto error;
		      nodeId = gaiaImport32 (in, 1, graph->EndianArch);	/* the Node ID: 32bit */
		      in += 4;
		  }
	    }
	  if (graph->AStar)
	    {
		/* fetching node's X,Y coords */
		if ((size - (in - blob)) < 8)
		    goto error;
		x = gaiaImport64 (in, 1, graph->EndianArch);	/* X coord */
		in += 8;
		if ((size - (in - blob)) < 8)
		    goto error;
		y = gaiaImport64 (in, 1, graph->EndianArch);	/* Y coord */
		in += 8;
	    }
	  else
	    {
		x = DBL_MAX;
		y = DBL_MAX;
	    }
	  if ((size - (in - blob)) < 2)
	      goto error;
	  links = gaiaImport16 (in, 1, graph->EndianArch);	/* # Links */
	  in += 2;
	  if (links < 0)
	      goto error;
	  /* initializing the Node */
	  pN = graph->Nodes + index;
	  pN->InternalIndex = index;
	  if (graph->NodeCode)
	    {
		/* Nodes are identified by a TEXT Code */
		pN->Id = -1;
		len = strlen (code);
		pN->Code = malloc (len + 1);
		strcpy (pN->Code, code);
	    }
	  else
	    {
		/* Nodes are identified by an INTEGER Id */
		pN->Id = nodeId;
		pN->Code = NULL;
	    }
	  pN->CoordX = x;
	  pN->CoordY = y;
	  pN->NumLinks = links;
	  if (links)
	    {
		/* parsing the Links */
		pN->Links = malloc (sizeof (RouteLink) * links);
		for (ia = 0; ia < links; ia++)
		  {
		      /* parsing each Link */
		      if (graph->Net64)
			{
			    if ((size - (in - blob)) < 22)
				goto error;
			}
		      else
			{
			    if ((size - (in - blob)) < 18)
				goto error;
			}
		      if (*in++ != GAIA_NET_ARC)	/* signature */
			  goto error;
		      if (graph->Net64)
			{
			    linkId = gaiaImportI64 (in, 1, graph->EndianArch);	/* # Link ROWID: 64bit */
			    in += 8;
			}
		      else
			{
			    linkId = gaiaImport32 (in, 1, graph->EndianArch);	/* # Link ROWID: 32bit */
			    in += 4;
			}
		      nodeToIdx = gaiaImport32 (in, 1, graph->EndianArch);	/* # NodeTo internal index */
		      in += 4;
		      cost = gaiaImport64 (in, 1, graph->EndianArch);	/* # Cost */
		      in += 8;
		      if (*in++ != GAIA_NET_END)	/* signature */
			  goto error;
		      pA = pN->Links + ia;
		      /* initializing the Link */
		      if (nodeToIdx < 0 || nodeToIdx >= graph->NumNodes)
			  goto error;
		      pA->NodeFrom = pN;
		      pA->NodeTo = graph->Nodes + nodeToIdx;
		      pA->LinkRowid = linkId;
		      pA->Cost = cost;
		  }
	    }
	  else
	      pN->Links = NULL;
	  if ((size - (in - blob)) < 1)
	      goto error;
	  if (*in++ != GAIA_NET_END)	/* signature */
	      goto error;
      }
    free (code);
    return 1;
  error:
    if (code != NULL)
	free (code);
    return 0;
}

static RoutingPtr
load_network (sqlite3 * handle, const char *table)
{
/* loads the NETWORK struct */
    RoutingPtr graph = NULL;
    sqlite3_stmt *stmt;
    char *sql;
    int ret;
    int header = 1;
    const unsigned char *blob;
    int size;
    char *xname;
    xname = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("SELECT NetworkData FROM \"%s\" ORDER BY Id", xname);
    free (xname);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto abort;
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      blob =
			  (const unsigned char *) sqlite3_column_blob (stmt, 0);
		      size = sqlite3_column_bytes (stmt, 0);
		      if (header)
			{
			    /* parsing the HEADER block */
			    graph = network_init (blob, size);
			    header = 0;
			}
		      else
			{
			    /* parsing ordinary Blocks */
			    if (!graph)
			      {
				  sqlite3_finalize (stmt);
				  goto abort;
			      }
			    if (!network_block (graph, blob, size))
			      {
				  sqlite3_finalize (stmt);
				  goto abort;
			      }
			}
		  }
		else
		  {
		      sqlite3_finalize (stmt);
		      goto abort;
		  }
	    }
	  else
	    {
		sqlite3_finalize (stmt);
		goto abort;
	    }
      }
    sqlite3_finalize (stmt);
    find_srid (handle, graph);
    return graph;
  abort:
    network_free (graph);
    return NULL;
}

static void
set_multi_by_id (RoutingMultiDestPtr multiple, RoutingPtr graph)
{
// setting Node pointers to multiple destinations */
    int i;
    for (i = 0; i < multiple->Items; i++)
      {
	  sqlite3_int64 id = *(multiple->Ids + i);
	  if (id >= 1)
	      *(multiple->To + i) = find_node_by_id (graph, id);
      }
}

static void
set_multi_by_code (RoutingMultiDestPtr multiple, RoutingPtr graph)
{
// setting Node pointers to multiple destinations */
    int i;
    for (i = 0; i < multiple->Items; i++)
      {
	  const char *code = *(multiple->Codes + i);
	  if (code != NULL)
	      *(multiple->To + i) = find_node_by_code (graph, code);
      }
}

static int
do_check_valid_point (gaiaGeomCollPtr geom, int srid)
{
/* checking for a valid Point geometry */
    if (geom == NULL)
	return 0;
    if (geom->FirstLinestring != NULL)
	return 0;
    if (geom->FirstPolygon != NULL)
	return 0;
    if (geom->FirstPoint == NULL)
	return 0;
    if (geom->FirstPoint != geom->LastPoint)
	return 0;
    if (geom->Srid != srid)
	return 0;
    return 1;
}

static void
add_by_code_to_point2point (virtualroutingPtr net, sqlite3_int64 rowid,
			    const char *node_from, const char *node_to,
			    int reverse, int mode)
{
/* adding to the Point2Point list a new candidate */
    int len;
    Point2PointSolutionPtr p2p = net->point2PointSolution;
    Point2PointCandidatePtr p = malloc (sizeof (Point2PointCandidate));
    p->linkRowid = rowid;
    len = strlen (node_from);
    p->codNodeFrom = malloc (len + 1);
    strcpy (p->codNodeFrom, node_from);
    len = strlen (node_to);
    p->codNodeTo = malloc (len + 1);
    strcpy (p->codNodeTo, node_to);
    p->reverse = reverse;
    p->valid = 0;
    p->path = NULL;
    p->pathLen = 0.0;
    p->extraLen = 0.0;
    p->percent = 0.0;
    p->next = NULL;
/* adding to the list */
    if (mode == VROUTE_POINT2POINT_FROM)
      {
	  if (p2p->firstFromCandidate == NULL)
	      p2p->firstFromCandidate = p;
	  if (p2p->lastFromCandidate != NULL)
	      p2p->lastFromCandidate->next = p;
	  p2p->lastFromCandidate = p;
      }
    else
      {
	  if (p2p->firstToCandidate == NULL)
	      p2p->firstToCandidate = p;
	  if (p2p->lastToCandidate != NULL)
	      p2p->lastToCandidate->next = p;
	  p2p->lastToCandidate = p;
      }
}

static int
do_check_by_code_point2point_oneway (RoutingPtr graph, sqlite3_int64 rowid,
				     const char *node_from, const char *node_to)
{
/* checking if the Link do really joins the two nodes */
    int j;
    RouteNodePtr node = find_node_by_code (graph, node_from);
    if (node == NULL)
	return 0;
    for (j = 0; j < node->NumLinks; j++)
      {
	  RouteLinkPtr link = &(node->Links[j]);
	  if (strcmp (link->NodeFrom->Code, node_from) == 0
	      && strcmp (link->NodeTo->Code, node_to) == 0
	      && link->LinkRowid == rowid)
	      return 1;
      }
    return 0;
}

static int
do_check_by_id_point2point_oneway (RoutingPtr graph, sqlite3_int64 rowid,
				   sqlite3_int64 node_from,
				   sqlite3_int64 node_to)
{
/* checking if the Link do really joins the two nodes */
    int j;
    RouteNodePtr node = find_node_by_id (graph, node_from);
    if (node == NULL)
	return 0;
    for (j = 0; j < node->NumLinks; j++)
      {
	  RouteLinkPtr link = &(node->Links[j]);
	  if (link->NodeFrom->Id == node_from && link->NodeTo->Id == node_to
	      && link->LinkRowid == rowid)
	      return 1;
      }
    return 0;
}

static void
add_by_id_to_point2point (virtualroutingPtr net, sqlite3_int64 rowid,
			  sqlite_int64 node_from, sqlite3_int64 node_to,
			  int reverse, int mode)
{
/* adding to the Point2Point list a new candidate */
    Point2PointSolutionPtr p2p = net->point2PointSolution;
    Point2PointCandidatePtr p = malloc (sizeof (Point2PointCandidate));
    p->linkRowid = rowid;
    p->codNodeFrom = NULL;
    p->codNodeTo = NULL;
    p->idNodeFrom = node_from;
    p->idNodeTo = node_to;
    p->reverse = reverse;
    p->valid = 0;
    p->path = NULL;
    p->pathLen = 0.0;
    p->extraLen = 0.0;
    p->percent = 0.0;
    p->next = NULL;
/* adding to the list */
    if (mode == VROUTE_POINT2POINT_FROM)
      {
	  if (p2p->firstFromCandidate == NULL)
	      p2p->firstFromCandidate = p;
	  if (p2p->lastFromCandidate != NULL)
	      p2p->lastFromCandidate->next = p;
	  p2p->lastFromCandidate = p;
      }
    else
      {
	  if (p2p->firstToCandidate == NULL)
	      p2p->firstToCandidate = p;
	  if (p2p->lastToCandidate != NULL)
	      p2p->lastToCandidate->next = p;
	  p2p->lastToCandidate = p;
      }
}

static int
do_prepare_point (virtualroutingPtr net, int mode)
{
/* preparing a Point for Point2Point */
    RoutingPtr graph = net->graph;
    Point2PointSolutionPtr p2p = net->point2PointSolution;
    char *xfrom;
    char *xto;
    char *xtable;
    char *xgeom;
    char *sql;
    int ret;
    int ok = 0;
    sqlite3 *sqlite = net->db;
    sqlite3_stmt *stmt = NULL;

    xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
    xto = gaiaDoubleQuotedSql (graph->ToColumn);
    xtable = gaiaDoubleQuotedSql (graph->TableName);
    xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
    sql =
	sqlite3_mprintf ("SELECT r.rowid, r.\"%s\", r.\"%s\", "
			 "ST_Distance(p.geom, r.\"%s\") AS dist "
			 "FROM \"%s\" AS r, (SELECT MakePoint(?, ?) AS geom) AS p "
			 "WHERE dist <= ? AND r.rowid IN "
			 "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q  AND "
			 "f_geometry_column = %Q AND search_frame = BuildCircleMBR(?, ?, ?)) "
			 "ORDER BY dist", xfrom, xto, xgeom, xtable,
			 graph->TableName, graph->GeometryColumn);
    free (xfrom);
    free (xto);
    free (xtable);
    free (xgeom);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (mode == VROUTE_POINT2POINT_FROM)
      {
	  sqlite3_bind_double (stmt, 1, p2p->xFrom);
	  sqlite3_bind_double (stmt, 2, p2p->yFrom);
	  sqlite3_bind_double (stmt, 3, net->Tolerance);
	  sqlite3_bind_double (stmt, 4, p2p->xFrom);
	  sqlite3_bind_double (stmt, 5, p2p->yFrom);
	  sqlite3_bind_double (stmt, 6, net->Tolerance);
      }
    else
      {
	  sqlite3_bind_double (stmt, 1, p2p->xTo);
	  sqlite3_bind_double (stmt, 2, p2p->yTo);
	  sqlite3_bind_double (stmt, 3, net->Tolerance);
	  sqlite3_bind_double (stmt, 4, p2p->xTo);
	  sqlite3_bind_double (stmt, 5, p2p->yTo);
	  sqlite3_bind_double (stmt, 6, net->Tolerance);
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_node_from = 0;
		int ok_node_to = 0;
		const char *cod_node_from;
		const char *cod_node_to;
		sqlite3_int64 id_node_from;
		sqlite3_int64 id_node_to;

		sqlite3_int64 rowid = sqlite3_column_int64 (stmt, 0);
		if (graph->NodeCode)
		  {
		      if (sqlite3_column_type (stmt, 1) == SQLITE_TEXT)
			{
			    ok_node_from = 1;
			    cod_node_from =
				(const char *) sqlite3_column_text (stmt, 1);
			}
		      if (sqlite3_column_type (stmt, 2) == SQLITE_TEXT)
			{
			    ok_node_to = 1;
			    cod_node_to =
				(const char *) sqlite3_column_text (stmt, 2);
			}
		  }
		else
		  {
		      if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
			{
			    ok_node_from = 1;
			    id_node_from = sqlite3_column_int64 (stmt, 1);
			}
		      if (sqlite3_column_type (stmt, 2) == SQLITE_INTEGER)
			{
			    ok_node_to = 1;
			    id_node_to = sqlite3_column_int64 (stmt, 2);
			}
		  }
		if (ok_node_from && ok_node_to)
		  {
		      if (graph->NodeCode)
			{
			    /* direct connection */
			    if (do_check_by_code_point2point_oneway
				(graph, rowid, cod_node_from, cod_node_to))
			      {
				  add_by_code_to_point2point (net, rowid,
							      cod_node_from,
							      cod_node_to, 0,
							      mode);
				  ok = 1;
			      }
			    /* reverse connection */
			    if (do_check_by_code_point2point_oneway
				(graph, rowid, cod_node_to, cod_node_from))
			      {
				  add_by_code_to_point2point (net, rowid,
							      cod_node_to,
							      cod_node_from, 1,
							      mode);
				  ok = 1;
			      }
			}
		      else
			{
			    /* direct connection */
			    if (do_check_by_id_point2point_oneway
				(graph, rowid, id_node_from, id_node_to))
			      {
				  add_by_id_to_point2point (net, rowid,
							    id_node_from,
							    id_node_to, 0,
							    mode);
				  ok = 1;
			      }
			    /* reverse connection */
			    if (do_check_by_id_point2point_oneway
				(graph, rowid, id_node_to, id_node_from))
			      {
				  add_by_id_to_point2point (net, rowid,
							    id_node_to,
							    id_node_from, 1,
							    mode);
				  ok = 1;
			      }
			}
		  }
	    }
      }
    sqlite3_finalize (stmt);
    return ok;
}

static double
doComputeExtraLength (virtualroutingPtr net, double xFrom, double yFrom,
		      Point2PointCandidatePtr ptr, int end_node)
{
/* computing an Ingress / Egress length */
    RouteNodePtr node = NULL;
    RoutingPtr graph = net->graph;
    if (ptr->reverse)
      {
	  if (graph->NodeCode)
	    {
		/* nodes are identified by TEXT codes */
		if (end_node)
		    node = find_node_by_code (graph, ptr->codNodeFrom);
		else
		    node = find_node_by_code (graph, ptr->codNodeTo);
	    }
	  else
	    {
		/* nodes are identified by integer IDs */
		if (end_node)
		    node = find_node_by_id (graph, ptr->idNodeFrom);
		else
		    node = find_node_by_id (graph, ptr->idNodeTo);
	    }
      }
    else
      {
	  if (graph->NodeCode)
	    {
		/* nodes are identified by TEXT codes */
		if (end_node)
		    node = find_node_by_code (graph, ptr->codNodeTo);
		else
		    node = find_node_by_code (graph, ptr->codNodeFrom);
	    }
	  else
	    {
		/* nodes are identified by integer IDs */
		if (end_node)
		    node = find_node_by_id (graph, ptr->idNodeTo);
		else
		    node = find_node_by_id (graph, ptr->idNodeFrom);
	    }
      }
    if (node == NULL)
	return 0.0;

    return sqrt (((node->CoordX - xFrom) * (node->CoordX - xFrom)) +
		 ((node->CoordY - yFrom) * (node->CoordY - yFrom)));
}

static int
build_ingress_path (virtualroutingPtr net, double xFrom, double yFrom,
		    Point2PointCandidatePtr ptr, int srid)
{
/* Point2Point - attempting to build an Ingress Path */
    RoutingPtr graph = net->graph;
    char *sql;
    char *xtable;
    char *xgeom;
    sqlite3 *sqlite = net->db;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int ok = 0;
    double percent;
    double length;
    gaiaGeomCollPtr geom = NULL;
    int is_geographic = 0;

    if (!srid_is_geographic (sqlite, srid, &is_geographic))
	return 0;

/* locating the insertion point */
    xtable = gaiaDoubleQuotedSql (graph->TableName);
    xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
    if (ptr->reverse)
	sql =
	    sqlite3_mprintf ("SELECT ST_Line_Locate_Point(ST_Reverse(\"%s\"), "
			     "MakePoint(?, ?)) FROM \"%s\" WHERE rowid = ?",
			     xgeom, xtable);
    else
	sql =
	    sqlite3_mprintf ("SELECT ST_Line_Locate_Point(\"%s\", "
			     "MakePoint(?, ?)) FROM \"%s\" WHERE rowid = ?",
			     xgeom, xtable);
    free (xgeom);
    free (xtable);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, xFrom);
    sqlite3_bind_double (stmt, 2, yFrom);
    sqlite3_bind_int64 (stmt, 3, ptr->linkRowid);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		percent = sqlite3_column_double (stmt, 0);
		ok = 1;
	    }
      }
    sqlite3_finalize (stmt);
    if (!ok)
	return 0;
    if (percent <= 0.0)
      {
	  /* special case: the insertion point is the Start Node */
	  ptr->valid = 1;
	  ptr->extraLen = doComputeExtraLength (net, xFrom, yFrom, ptr, 0);
	  return 1;
      }
    if (percent >= 1.0)
      {
	  /* special case: the insertion point is the End Node */
	  ptr->valid = 1;
	  ptr->extraLen = doComputeExtraLength (net, xFrom, yFrom, ptr, 1);
	  return 1;
      }

/* determining the ingress path */
    xtable = gaiaDoubleQuotedSql (graph->TableName);
    xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
    if (is_geographic)
      {
	  if (ptr->reverse)
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom, 1) FROM "
				   "(SELECT ST_Line_Substring(ST_Reverse(\"%s\"), ?, 100.0) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
	  else
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom, 1) FROM "
				   "(SELECT ST_Line_Substring(\"%s\", ?, 100.0) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
      }
    else
      {
	  if (ptr->reverse)
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom) FROM "
				   "(SELECT ST_Line_Substring(ST_Reverse(\"%s\"), ?, 100.0) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
	  else
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom) FROM "
				   "(SELECT ST_Line_Substring(\"%s\", ?, 100.0) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
      }
    free (xgeom);
    free (xtable);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, percent);
    sqlite3_bind_int64 (stmt, 2, ptr->linkRowid);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int size = sqlite3_column_bytes (stmt, 0);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
		      if (geom != NULL)
			{
			    gaiaLinestringPtr ln = geom->FirstLinestring;
			    double x;
			    double y;
			    double z;
			    double m;
			    if (ln->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (ln->Coords, 0, &x, &y, &z);
			      }
			    else if (ln->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (ln->Coords, 0, &x, &y, &m);
			      }
			    else if (ln->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (ln->Coords, 0, &x, &y, &z,
						    &m);
			      }
			    else
			      {
				  gaiaGetPoint (ln->Coords, 0, &x, &y);
			      }
			    length = sqlite3_column_double (stmt, 1);
			    ptr->path = geom;
			    ptr->pathLen = length;
			    if (x == xFrom && y == yFrom)
				;
			    else
			      {
				  length =
				      sqrt (((x - xFrom) * (x - xFrom)) +
					    ((y - yFrom) * (y - yFrom)));
				  ptr->extraLen = length;
			      }
			    ptr->valid = 1;
			}
		  }
	    }
      }
    sqlite3_finalize (stmt);

    return 1;
}

static int
build_egress_path (virtualroutingPtr net, double xTo, double yTo,
		   Point2PointCandidatePtr ptr, int srid)
{
/* Point2Point - attempting to build an Egress Path */
    RoutingPtr graph = net->graph;
    char *sql;
    char *xtable;
    char *xgeom;
    sqlite3 *sqlite = net->db;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int ok = 0;
    double percent;
    double length;
    gaiaGeomCollPtr geom = NULL;
    int is_geographic = 0;

    if (!srid_is_geographic (sqlite, srid, &is_geographic))
	return 0;

/* locating the insertion point */
    xtable = gaiaDoubleQuotedSql (graph->TableName);
    xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
    if (ptr->reverse)
	sql =
	    sqlite3_mprintf ("SELECT ST_Line_Locate_Point(ST_Reverse(\"%s\"), "
			     "MakePoint(?, ?)) FROM \"%s\" WHERE rowid = ?",
			     xgeom, xtable);
    else
	sql =
	    sqlite3_mprintf ("SELECT ST_Line_Locate_Point(\"%s\", "
			     "MakePoint(?, ?)) FROM \"%s\" WHERE rowid = ?",
			     xgeom, xtable);
    free (xgeom);
    free (xtable);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, xTo);
    sqlite3_bind_double (stmt, 2, yTo);
    sqlite3_bind_int64 (stmt, 3, ptr->linkRowid);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		percent = sqlite3_column_double (stmt, 0);
		ok = 1;
	    }
      }
    sqlite3_finalize (stmt);
    if (!ok)
	return 0;
    if (percent >= 1.0)
      {
	  /* special case: the insertion point is the Start Node */
	  ptr->valid = 1;
	  ptr->extraLen = doComputeExtraLength (net, xTo, yTo, ptr, 0);
	  return 1;
      }
    if (percent >= 1.0)
      {
	  /* special case: the insertion point is the End Node */
	  ptr->valid = 1;
	  ptr->extraLen = doComputeExtraLength (net, xTo, yTo, ptr, 1);
	  return 1;
      }

/* determining the egress path */
    xtable = gaiaDoubleQuotedSql (graph->TableName);
    xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
    if (is_geographic)
      {
	  if (ptr->reverse)
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom, 1) FROM "
				   "(SELECT ST_Line_Substring(ST_Reverse(\"%s\"), 0.0, ?) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
	  else
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom, 1) FROM "
				   "(SELECT ST_Line_Substring(\"%s\", 0.0, ?) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
      }
    else
      {
	  if (ptr->reverse)
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom) FROM "
				   "(SELECT ST_Line_Substring(ST_Reverse(\"%s\"), 0.0, ?) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
	  else
	      sql =
		  sqlite3_mprintf ("SELECT g.geom, ST_Length(g.geom) FROM "
				   "(SELECT ST_Line_Substring(\"%s\", 0.0, ?) AS geom "
				   "FROM \"%s\" WHERE rowid = ?) AS g", xgeom,
				   xtable);
      }
    free (xgeom);
    free (xtable);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, percent);
    sqlite3_bind_int64 (stmt, 2, ptr->linkRowid);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int size = sqlite3_column_bytes (stmt, 0);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, size);
		      if (geom != NULL)
			{
			    gaiaLinestringPtr ln = geom->FirstLinestring;
			    double x;
			    double y;
			    double z;
			    double m;
			    int last_pt = ln->Points - 1;
			    if (ln->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (ln->Coords, last_pt, &x, &y,
						   &z);
			      }
			    else if (ln->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (ln->Coords, last_pt, &x, &y,
						   &m);
			      }
			    else if (ln->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (ln->Coords, last_pt, &x, &y,
						    &z, &m);
			      }
			    else
			      {
				  gaiaGetPoint (ln->Coords, last_pt, &x, &y);
			      }
			    length = sqlite3_column_double (stmt, 1);
			    ptr->path = geom;
			    ptr->pathLen = length;
			    if (x == xTo && y == yTo)
				;
			    else
			      {
				  length =
				      sqrt (((x - xTo) * (x - xTo)) +
					    ((y - yTo) * (y - yTo)));
				  ptr->extraLen = length;
			      }
			    ptr->valid = 1;
			}
		  }
	    }
      }
    sqlite3_finalize (stmt);

    return 1;
}

static int
do_define_ingress_paths (virtualroutingPtr net)
{
/* Point2Point - defining all Ingress Paths */
    Point2PointSolutionPtr p2p = net->point2PointSolution;
    Point2PointCandidatePtr ptr;

    ptr = p2p->firstFromCandidate;
    while (ptr != NULL)
      {
	  if (!build_ingress_path
	      (net, p2p->xFrom, p2p->yFrom, ptr, net->graph->Srid))
	      return 0;
	  ptr = ptr->next;
      }
    return 1;
}

static int
do_define_egress_paths (virtualroutingPtr net)
{
/* Point2Point - defining all Egress Paths */
    Point2PointSolutionPtr p2p = net->point2PointSolution;
    Point2PointCandidatePtr ptr;

    ptr = p2p->firstToCandidate;
    while (ptr != NULL)
      {
	  if (!build_egress_path
	      (net, p2p->xTo, p2p->yTo, ptr, net->graph->Srid))
	      return 0;
	  ptr = ptr->next;
      }
    return 1;
}

static void
add_point2point_node_from_by_code (Point2PointSolutionPtr p2p,
				   const char *node,
				   Point2PointCandidatePtr parent)
{
/* adding to the Point2Point FromNodes list (if not already defined) */
    int len;
    Point2PointNodePtr p = p2p->firstFromNode;
    while (p != NULL)
      {
	  if (strcmp (p->codNode, node) == 0)
	    {
		/* already defined */
		return;
	    }
	  p = p->next;
      }

/* adding the Node */
    p = malloc (sizeof (Point2PointNode));
    len = strlen (node);
    p->codNode = malloc (len + 1);
    strcpy (p->codNode, node);
    p->parent = parent;
    p->next = NULL;
    if (p2p->firstFromNode == NULL)
	p2p->firstFromNode = p;
    if (p2p->lastFromNode != NULL)
	p2p->lastFromNode->next = p;
    p2p->lastFromNode = p;
}

static void
add_point2point_node_from_by_id (Point2PointSolutionPtr p2p, sqlite3_int64 id,
				 Point2PointCandidatePtr parent)
{
/* adding to the Point2Point FromNodes list (if not already defined) */
    Point2PointNodePtr p = p2p->firstFromNode;
    while (p != NULL)
      {
	  if (p->idNode == id)
	    {
		/* already defined */
		return;
	    }
	  p = p->next;
      }

/* adding the Node */
    p = malloc (sizeof (Point2PointNode));
    p->idNode = id;
    p->codNode = NULL;
    p->parent = parent;
    p->next = NULL;
    if (p2p->firstFromNode == NULL)
	p2p->firstFromNode = p;
    if (p2p->lastFromNode != NULL)
	p2p->lastFromNode->next = p;
    p2p->lastFromNode = p;
}

static void
add_point2point_node_to_by_code (Point2PointSolutionPtr p2p, const char *node,
				 Point2PointCandidatePtr parent)
{
/* adding to the Point2Point ToNodes list (if not already defined) */
    int len;
    Point2PointNodePtr p = p2p->firstToNode;
    while (p != NULL)
      {
	  if (strcmp (p->codNode, node) == 0)
	    {
		/* already defined */
		return;
	    }
	  p = p->next;
      }

/* adding the Node */
    p = malloc (sizeof (Point2PointNode));
    len = strlen (node);
    p->codNode = malloc (len + 1);
    strcpy (p->codNode, node);
    p->parent = parent;
    p->next = NULL;
    if (p2p->firstToNode == NULL)
	p2p->firstToNode = p;
    if (p2p->lastToNode != NULL)
	p2p->lastToNode->next = p;
    p2p->lastToNode = p;
}

static void
add_point2point_node_to_by_id (Point2PointSolutionPtr p2p, sqlite3_int64 id,
			       Point2PointCandidatePtr parent)
{
/* adding to the Point2Point ToNodes list (if not already defined) */
    Point2PointNodePtr p = p2p->firstToNode;
    while (p != NULL)
      {
	  if (p->idNode == id)
	    {
		/* already defined */
		return;
	    }
	  p = p->next;
      }

/* adding the Node */
    p = malloc (sizeof (Point2PointNode));
    p->idNode = id;
    p->codNode = NULL;
    p->parent = parent;
    p->next = NULL;
    if (p2p->firstToNode == NULL)
	p2p->firstToNode = p;
    if (p2p->lastToNode != NULL)
	p2p->lastToNode->next = p;
    p2p->lastToNode = p;
}

static void
point2point_eval_solution (Point2PointSolutionPtr p2p,
			   ShortestPathSolutionPtr solution, int nodeCode)
{
/* attempting to identify the optimal Point2Point solution */
    Point2PointCandidatePtr p_from = p2p->firstFromCandidate;
    while (p_from != NULL)
      {
	  /* searching FROM candidates */
	  int ok = 0;
	  if (nodeCode)
	    {
		if (strcmp (solution->From->Code, p_from->codNodeTo) == 0)
		    ok = 1;
	    }
	  else
	    {
		if (solution->From->Id == p_from->idNodeTo)
		    ok = 1;
	    }
	  if (ok)
	    {
		Point2PointCandidatePtr p_to = p2p->firstToCandidate;
		while (p_to != NULL)
		  {
		      /* searching TO candidates */
		      int ok2 = 0;
		      if (nodeCode)
			{
			    if (strcmp (solution->To->Code, p_to->codNodeFrom)
				== 0)
				ok2 = 1;
			}
		      else
			{
			    if (solution->To->Id == p_to->idNodeFrom)
				ok2 = 1;
			}
		      if (ok2)
			{
			    double tot =
				solution->TotalCost + p_from->pathLen +
				p_from->extraLen + p_to->pathLen +
				p_to->extraLen;
			    if (tot < p2p->totalCost)
			      {
				  /* saving a better solution */
				  p2p->totalCost = tot;
				  p2p->fromCandidate = p_from;
				  p2p->toCandidate = p_to;
				  return;
			      }
			}
		      p_to = p_to->next;
		  }
	    }
	  p_from = p_from->next;
      }
}

static RouteLinkPtr
find_link (sqlite3 * sqlite, RoutingPtr graph, sqlite3_int64 linkRowid)
{
/* attempting to create a partial Link object */
    int ret;
    char *sql;
    char *xfrom;
    char *xto;
    char *xtable;
    sqlite3_stmt *stmt = NULL;
    RouteLinkPtr ptr = NULL;

    xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
    xto = gaiaDoubleQuotedSql (graph->ToColumn);
    xtable = gaiaDoubleQuotedSql (graph->TableName);
    sql =
	sqlite3_mprintf ("SELECT \"%s\", \"%s\" FROM \"%s\" WHERE ROWID = ?",
			 xfrom, xto, xtable);
    free (xfrom);
    free (xto);
    free (xtable);
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto stop;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, linkRowid);
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		RouteNodePtr from = NULL;
		RouteNodePtr to = NULL;
		if (graph->NodeCode)
		  {
		      /* nodes are identified by TEXT codes */
		      char *code;
		      if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
			{
			    code = (char *) sqlite3_column_text (stmt, 0);
			    from = find_node_by_code (graph, code);
			}
		      if (sqlite3_column_type (stmt, 1) == SQLITE_TEXT)
			{
			    code = (char *) sqlite3_column_text (stmt, 1);
			    to = find_node_by_code (graph, code);
			}
		  }
		else
		  {
		      sqlite3_int64 id;
		      /* nodes are identified by INTEGER ids */
		      if (sqlite3_column_type (stmt, 0) == SQLITE_INTEGER)
			{
			    id = sqlite3_column_int64 (stmt, 0);
			    from = find_node_by_id (graph, id);
			}
		      if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
			{
			    id = sqlite3_column_int64 (stmt, 1);
			    to = find_node_by_id (graph, id);
			}
		  }
		if (from != NULL && to != NULL)
		  {
		      if (ptr != NULL)
			  free (ptr);
		      ptr = malloc (sizeof (RouteLink));
		      ptr->NodeFrom = from;
		      ptr->NodeTo = to;
		      ptr->LinkRowid = linkRowid;
		      ptr->Cost = 0.0;
		  }
	    }
      }
    sqlite3_finalize (stmt);
    return ptr;

  stop:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return ptr;
}

static void
add2DynLine (gaiaDynamicLinePtr dyn, gaiaGeomCollPtr geom, int reverse,
	     double extra, double cost)
{
/* adding points from Linestring to Dynamic line */
    int iv;
    double startCost;
    double endCost;
    gaiaGeomCollPtr geo2;

    if (geom == NULL)
	return;

    /* interpolating M-Values */
    if (dyn->Last == NULL)
	startCost = 0.0;
    else
	startCost = dyn->Last->M + extra;
    endCost = startCost + cost;
    if (reverse)
	geo2 = gaiaAddMeasure (geom, endCost, startCost);
    else
	geo2 = gaiaAddMeasure (geom, startCost, endCost);

    gaiaLinestringPtr line = geo2->FirstLinestring;
    if (reverse)
      {
	  /* reverse direction */
	  for (iv = line->Points - 1; iv >= 0; iv--)
	      addPoint2DynLine
		  (line->Coords, line->DimensionModel, iv, dyn, 0.0);
      }
    else
      {
	  /* natural direction */
	  for (iv = 0; iv < line->Points; iv++)
	      addPoint2DynLine
		  (line->Coords, line->DimensionModel, iv, dyn, 0.0);
      }
    gaiaFreeGeomColl (geo2);
}

static void
build_point2point_solution (sqlite3 * sqlite, int options, RoutingPtr graph,
			    Point2PointSolutionPtr p2p)
{
/* fully completing a Point2Point Solution */
    ResultsetRowPtr row;
    int error = 0;

    p2p->hasZ = graph->HasZ;

    if (graph->GeometryColumn == NULL && graph->NameColumn == NULL)
	return;
    if (options == VROUTE_SHORTEST_PATH_NO_GEOMS && graph->NameColumn == NULL)
	return;

    if (options == VROUTE_SHORTEST_PATH_NO_GEOMS
	|| options == VROUTE_SHORTEST_PATH_SIMPLE
	|| graph->GeometryColumn == NULL)
	;
    else
      {
	  /* preparing the Dynamic Line - result path */
	  p2p->dynLine = gaiaAllocDynamicLine ();
      }

    row = p2p->FirstRow;
    while (row != NULL)
      {
	  /* looping on rows */
	  char *sql;
	  char *xfrom;
	  char *xto;
	  char *xname;
	  char *xgeom;
	  char *xtable;
	  int no_geom = 0;
	  int ask_geom = 1;
	  int ask_name = 1;
	  int ret;
	  sqlite3_stmt *stmt = NULL;

	  if (options == VROUTE_SHORTEST_PATH_NO_LINKS)
	      ask_name = 0;
	  if (graph->NameColumn == NULL)
	      ask_name = 0;
	  if (row->Point2PointRole == VROUTE_POINT2POINT_START
	      || row->Point2PointRole == VROUTE_POINT2POINT_END)
	      ask_geom = 0;
	  if (options == VROUTE_SHORTEST_PATH_NO_GEOMS
	      || graph->GeometryColumn == NULL)
	    {
		no_geom = 1;
		ask_geom = 0;
	    }
	  if (options == VROUTE_SHORTEST_PATH_SIMPLE)
	    {
		no_geom = 1;
		ask_geom = 0;
		ask_name = 0;
	    }

	  if (!no_geom)
	    {
		if (row->Point2PointRole == VROUTE_POINT2POINT_INGRESS)
		    gaiaAppendPointZMToDynamicLine (p2p->dynLine, p2p->xFrom,
						    p2p->yFrom, p2p->zFrom,
						    0.0);
		if (row->Point2PointRole == VROUTE_POINT2POINT_START)
		    add2DynLine
			(p2p->dynLine, p2p->fromCandidate->path, 0,
			 p2p->fromCandidate->extraLen,
			 p2p->fromCandidate->pathLen);
		if (row->Point2PointRole == VROUTE_POINT2POINT_END)
		    add2DynLine
			(p2p->dynLine, p2p->toCandidate->path, 0, 0.0,
			 p2p->toCandidate->pathLen);
		if (row->Point2PointRole == VROUTE_POINT2POINT_EGRESS)
		    gaiaAppendPointZMToDynamicLine (p2p->dynLine, p2p->xTo,
						    p2p->yTo, p2p->zTo,
						    p2p->totalCost);
	    }
	  if (row->linkRef == NULL)
	      goto next_row;

	  if (ask_geom && ask_name)
	    {
		xname = gaiaDoubleQuotedSql (graph->NameColumn);
		xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
		xto = gaiaDoubleQuotedSql (graph->ToColumn);
		xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
		xtable = gaiaDoubleQuotedSql (graph->TableName);
		sql =
		    sqlite3_mprintf
		    ("SELECT \"%s\", \"%s\", \"%s\", \"%s\" FROM \"%s\" WHERE ROWID = ?",
		     xname, xfrom, xto, xgeom, xtable);
		free (xname);
		free (xfrom);
		free (xto);
		free (xgeom);
		free (xtable);
	    }
	  else if (ask_geom)
	    {
		xfrom = gaiaDoubleQuotedSql (graph->FromColumn);
		xto = gaiaDoubleQuotedSql (graph->ToColumn);
		xgeom = gaiaDoubleQuotedSql (graph->GeometryColumn);
		xtable = gaiaDoubleQuotedSql (graph->TableName);
		sql =
		    sqlite3_mprintf
		    ("SELECT \"%s\", \"%s\", \"%s\" FROM \"%s\" WHERE ROWID = ?",
		     xfrom, xto, xgeom, xtable);
		free (xfrom);
		free (xto);
		free (xgeom);
		free (xtable);
	    }
	  else if (ask_name)
	    {
		xname = gaiaDoubleQuotedSql (graph->NameColumn);
		xtable = gaiaDoubleQuotedSql (graph->TableName);
		sql =
		    sqlite3_mprintf
		    ("SELECT \"%s\" FROM \"%s\" WHERE ROWID = ?", xname,
		     xtable);
		free (xname);
		free (xtable);
	    }
	  else
	      goto next_row;
	  ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	      goto next_row;

	  /* querying the resultset */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, row->linkRef->Link->LinkRowid);
	  while (1)
	    {
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE)
		    break;
		if (ret == SQLITE_ROW)
		  {
		      const char *from_code;
		      const char *to_code;
		      sqlite3_int64 from_id;
		      sqlite3_int64 to_id;
		      const unsigned char *blob = NULL;
		      int blob_sz;
		      int err = 0;

		      if (ask_name)
			{
			    /* the Name column */
			    char *name;
			    const char *xname =
				(const char *) sqlite3_column_text (stmt, 0);
			    int len = sqlite3_column_bytes (stmt, 0);
			    name = malloc (len + 1);
			    strcpy (name, xname);
			    row->linkRef->Name = name;
			    if (ask_geom)
			      {
				  if (graph->NodeCode)
				    {
					/* nodes are identified by TEXT codes */
					if (sqlite3_column_type (stmt, 1) ==
					    SQLITE_TEXT)
					    from_code =
						(const char *)
						sqlite3_column_text (stmt, 1);
					else
					    err = 1;
					if (sqlite3_column_type (stmt, 2) ==
					    SQLITE_TEXT)
					    to_code =
						(const char *)
						sqlite3_column_text (stmt, 2);
					else
					    err = 1;
				    }
				  else
				    {
					/* nodes are identified by INTEGER ids */
					if (sqlite3_column_type (stmt, 1) ==
					    SQLITE_INTEGER)
					    from_id =
						sqlite3_column_int64 (stmt, 1);
					else
					    err = 1;
					if (sqlite3_column_type (stmt, 2) ==
					    SQLITE_INTEGER)
					    to_id =
						sqlite3_column_int64 (stmt, 2);
					else
					    err = 1;
				    }
				  if (sqlite3_column_type (stmt, 3) ==
				      SQLITE_BLOB)
				    {
					blob =
					    (const unsigned char *)
					    sqlite3_column_blob (stmt, 3);
					blob_sz =
					    sqlite3_column_bytes (stmt, 3);
				    }
			      }
			}
		      else if (ask_geom)
			{
			    if (graph->NodeCode)
			      {
				  /* nodes are identified by TEXT codes */
				  if (sqlite3_column_type (stmt, 0) ==
				      SQLITE_TEXT)
				      from_code =
					  (const char *)
					  sqlite3_column_text (stmt, 0);
				  else
				      err = 1;
				  if (sqlite3_column_type (stmt, 1) ==
				      SQLITE_TEXT)
				      to_code =
					  (const char *)
					  sqlite3_column_text (stmt, 1);
				  else
				      err = 1;
			      }
			    else
			      {
				  /* nodes are identified by INTEGER ids */
				  if (sqlite3_column_type (stmt, 0) ==
				      SQLITE_INTEGER)
				      from_id = sqlite3_column_int64 (stmt, 0);
				  else
				      err = 1;
				  if (sqlite3_column_type (stmt, 1) ==
				      SQLITE_INTEGER)
				      to_id = sqlite3_column_int64 (stmt, 1);
				  else
				      err = 1;
			      }
			    if (sqlite3_column_type (stmt, 2) == SQLITE_BLOB)
			      {
				  blob =
				      (const unsigned char *)
				      sqlite3_column_blob (stmt, 2);
				  blob_sz = sqlite3_column_bytes (stmt, 2);
			      }
			}
		      if (ask_geom)
			{
			    if (blob != NULL && !err)
			      {
				  /* adding the Link's geometry to the Solution geometry */
				  gaiaGeomCollPtr geom =
				      gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
				  if (geom)
				    {
					/* OK, we have fetched a valid Geometry */
					if (geom->FirstPoint == NULL
					    && geom->FirstPolygon == NULL
					    && geom->FirstLinestring != NULL
					    && geom->FirstLinestring ==
					    geom->LastLinestring)
					  {
					      /* Geometry is LINESTRING as expected */
					      int reverse = 1;
					      if (graph->NodeCode)
						{
						    /* nodes are identified by TEXT codes */
						    const char *from =
							row->linkRef->
							Link->NodeFrom->Code;
						    const char *to =
							row->linkRef->
							Link->NodeTo->Code;
						    if (strcmp (from_code, from)
							== 0
							&& strcmp (to_code,
								   to) == 0)
							reverse = 0;
						}
					      else
						{
						    /* nodes are identified by INTEGER ids */
						    sqlite3_int64 from =
							row->linkRef->
							Link->NodeFrom->Id;
						    sqlite3_int64 to =
							row->linkRef->
							Link->NodeTo->Id;
						    if (from_id == from
							&& to_id == to)
							reverse = 0;
						}
					      add2DynLine
						  (p2p->dynLine, geom, reverse,
						   0.0,
						   row->linkRef->Link->Cost);
					  }
					else
					    error = 1;
					gaiaFreeGeomColl (geom);
				    }
				  else
				      error = 1;
			      }
			    else
				error = 1;
			}
		  }
		else
		    error = 1;
	    }

	next_row:
	  if (stmt != NULL)
	      sqlite3_finalize (stmt);
	  row = row->Next;
      }

    if (error)
      {
	  if (p2p->dynLine != NULL)
	      gaiaFreeDynamicLine (p2p->dynLine);
	  p2p->dynLine = NULL;
      }

    if (p2p->dynLine != NULL)
      {
	  /* building the result path Geometry */
	  gaiaGeomCollPtr geom;
	  gaiaLinestringPtr ln;
	  gaiaPointPtr pt;
	  int points = 0;
	  int iv;

	  row = p2p->FirstRow;
	  if (row->Geometry != NULL)
	      gaiaFreeGeomColl (row->Geometry);
	  if (p2p->hasZ)
	      geom = gaiaAllocGeomCollXYZM ();
	  else
	      geom = gaiaAllocGeomCollXYM ();
	  geom->Srid = graph->Srid;
	  pt = p2p->dynLine->First;
	  while (pt != NULL)
	    {
		/* counting how many points are there */
		points++;
		pt = pt->Next;
	    }
	  ln = gaiaAddLinestringToGeomColl (geom, points);
	  iv = 0;
	  pt = p2p->dynLine->First;
	  while (pt != NULL)
	    {
		/* copying points from Dynamic Line to Linestring */
		if (p2p->hasZ)
		  {
		      gaiaSetPointXYZM (ln->Coords, iv, pt->X, pt->Y, pt->Z,
					pt->M);
		  }
		else
		  {
		      gaiaSetPointXYM (ln->Coords, iv, pt->X, pt->Y, pt->M);
		  }
		iv++;
		pt = pt->Next;
	    }
	  row->Geometry = geom;

	  gaiaFreeDynamicLine (p2p->dynLine);
	  p2p->dynLine = NULL;
      }

    if (options == VROUTE_SHORTEST_PATH_NO_LINKS
	|| options == VROUTE_SHORTEST_PATH_SIMPLE)
      {
	  /* deleting Links */
	  ResultsetRowPtr pR;
	  ResultsetRowPtr pRn;
	  pR = p2p->FirstRow;
	  while (pR != NULL)
	    {
		pRn = pR->Next;
		if (pR == p2p->FirstRow)
		  {
		      /* skipping the first row */
		      pR->Next = NULL;
		      pR = pRn;
		      continue;
		  }
		if (pR->Point2PointRole == VROUTE_POINT2POINT_START
		    || pR->Point2PointRole == VROUTE_POINT2POINT_END)
		  {
		      /* deleting partial Links */
		      if (pR->linkRef != NULL)
			{
			    if (pR->linkRef->Link != NULL)
				free (pR->linkRef->Link);
			    if (pR->linkRef->Name != NULL)
				free (pR->linkRef->Name);
			    free (pR->linkRef);
			}
		  }
		if (pR->Geometry != NULL)
		    gaiaFreeGeomColl (pR->Geometry);
		free (pR);
		pR = pRn;
	    }
	  p2p->LastRow = p2p->FirstRow;
      }
}

static void
point2point_resolve (virtualroutingCursorPtr cursor)
{
/* resolving a Point2Point Shortest Path */
    virtualroutingPtr net = (virtualroutingPtr) cursor->pVtab;
    RoutingPtr graph = cursor->pVtab->graph;
    RoutingMultiDestPtr multiple = NULL;
    Point2PointNodePtr p_node_from;
    Point2PointNodePtr p_node_to;
    ShortestPathSolutionPtr solution;
    Point2PointSolutionPtr p2p = cursor->pVtab->point2PointSolution;
    Point2PointCandidatePtr p_from = p2p->firstFromCandidate;
    Point2PointCandidatePtr p_to = p2p->firstToCandidate;
    int route_row;
    RowSolutionPtr pA;
    ResultsetRowPtr row;
    RouteLinkPtr link;
    while (p_from != NULL)
      {
	  /* extracting all FROM candidates */
	  if (graph->NodeCode)
	      add_point2point_node_from_by_code (p2p, p_from->codNodeTo,
						 p_from);
	  else
	      add_point2point_node_from_by_id (p2p, p_from->idNodeTo, p_from);
	  p_from = p_from->next;
      }
    while (p_to != NULL)
      {
	  /* extracting all TO candidates */
	  if (graph->NodeCode)
	      add_point2point_node_to_by_code (p2p, p_to->codNodeFrom, p_to);
	  else
	      add_point2point_node_to_by_id (p2p, p_to->idNodeFrom, p_to);
	  p_to = p_to->next;
      }
    p_node_from = p2p->firstFromNode;
    while (p_node_from != NULL)
      {
	  /* exploring all FROM Nodes */
	  int i;
	  int items = 0;
	  RoutingMultiDestPtr multiple;
	  reset_multiSolution (cursor->pVtab->multiSolution);
	  cursor->pVtab->multiSolution->Mode = VROUTE_ROUTING_SOLUTION;
	  p_node_to = p2p->firstToNode;
	  while (p_node_to != NULL)
	    {
		/* counting how many destinations */
		items++;
		p_node_to = p_node_to->next;
	    }
	  /* allocating the helper struct */
	  multiple = malloc (sizeof (RoutingMultiDest));
	  cursor->pVtab->multiSolution->MultiTo = multiple;
	  multiple->CodeNode = graph->NodeCode;
	  multiple->Found = malloc (sizeof (char) * items);
	  multiple->To = malloc (sizeof (RouteNodePtr) * items);
	  for (i = 0; i < items; i++)
	    {
		*(multiple->Found + i) = 'N';
		*(multiple->To + i) = NULL;
	    }
	  multiple->Items = items;
	  multiple->Next = 0;
	  if (multiple->CodeNode)
	    {
		multiple->Ids = NULL;
		multiple->Codes = malloc (sizeof (char *) * items);
	    }
	  else
	    {
		multiple->Ids = malloc (sizeof (sqlite3_int64) * items);
		multiple->Codes = NULL;
	    }
	  if (graph->NodeCode)
	      cursor->pVtab->multiSolution->From =
		  find_node_by_code (graph, p_node_from->codNode);
	  else
	      cursor->pVtab->multiSolution->From =
		  find_node_by_id (graph, p_node_from->idNode);
	  p_node_to = p2p->firstToNode;
	  while (p_node_to != NULL)
	    {
		/* exploring all TO Nodes */
		if (graph->NodeCode)
		  {
		      int l = strlen (p_node_to->codNode);
		      char *code = malloc (l + 1);
		      strcpy (code, p_node_to->codNode);
		      vroute_add_multiple_code (multiple, code);
		  }
		else
		    vroute_add_multiple_id (multiple, p_node_to->idNode);
		p_node_to = p_node_to->next;
	    }
	  if (graph->NodeCode)
	      set_multi_by_code (multiple, graph);
	  else
	      set_multi_by_id (multiple, graph);
/* always using Dijktra's */
	  dijkstra_multi_solve (cursor->pVtab->db,
				VROUTE_SHORTEST_PATH_SIMPLE, graph,
				cursor->pVtab->routing,
				cursor->pVtab->multiSolution);
	  solution = cursor->pVtab->multiSolution->First;
	  while (solution != NULL)
	    {
		point2point_eval_solution (p2p, solution, graph->NodeCode);
		solution = solution->Next;
	    }
	  p_node_from = p_node_from->next;
      }

    if (p2p->fromCandidate == NULL || p2p->toCandidate == NULL)
	return;			/* invalid solution */

/* fully building the optimal Point2Point solution */
    reset_multiSolution (cursor->pVtab->multiSolution);
    cursor->pVtab->multiSolution->Mode = VROUTE_ROUTING_SOLUTION;
    if (graph->NodeCode)
	cursor->pVtab->multiSolution->From =
	    find_node_by_code (graph, p2p->fromCandidate->codNodeTo);
    else
	cursor->pVtab->multiSolution->From =
	    find_node_by_id (graph, p2p->fromCandidate->idNodeTo);
/* allocating the helper struct */
    multiple = malloc (sizeof (RoutingMultiDest));
    cursor->pVtab->multiSolution->MultiTo = multiple;
    multiple->CodeNode = graph->NodeCode;
    multiple->Found = malloc (sizeof (char));
    multiple->To = malloc (sizeof (RouteNodePtr));
    *(multiple->Found + 0) = 'N';
    *(multiple->To + 0) = NULL;
    multiple->Items = 1;
    multiple->Next = 0;
    if (multiple->CodeNode)
      {
	  int l = strlen (p2p->toCandidate->codNodeFrom);
	  multiple->Ids = NULL;
	  multiple->Codes = malloc (sizeof (char *));
	  char *code = malloc (l + 1);
	  strcpy (code, p2p->toCandidate->codNodeFrom);
	  vroute_add_multiple_code (multiple, code);
	  set_multi_by_code (multiple, graph);
      }
    else
      {
	  multiple->Ids = malloc (sizeof (sqlite3_int64));
	  multiple->Codes = NULL;
	  vroute_add_multiple_id (multiple, p2p->toCandidate->idNodeFrom);
	  set_multi_by_id (multiple, graph);
      }
    if (net->currentAlgorithm == VROUTE_A_STAR_ALGORITHM)
	astar_solve (cursor->pVtab->db, VROUTE_SHORTEST_PATH_QUICK, graph,
		     cursor->pVtab->routing, cursor->pVtab->multiSolution);
    else
	dijkstra_multi_solve (cursor->pVtab->db, VROUTE_SHORTEST_PATH_QUICK,
			      graph, cursor->pVtab->routing,
			      cursor->pVtab->multiSolution);
    solution = cursor->pVtab->multiSolution->First;

/* building the solution rows */
    p2p->totalCost =
	solution->TotalCost + p2p->fromCandidate->pathLen +
	p2p->fromCandidate->extraLen + p2p->toCandidate->pathLen +
	p2p->toCandidate->extraLen;
/* inserting the Route Header */
    route_row = 0;
    row = malloc (sizeof (ResultsetRow));
    row->RouteNum = 0;
    row->RouteRow = route_row++;
    row->Point2PointRole = VROUTE_POINT2POINT_NONE;
    row->From = NULL;
    row->To = NULL;
    row->Undefined = solution->Undefined;
    solution->Undefined = NULL;
    row->UndefinedId = solution->UndefinedId;
    row->linkRef = NULL;
    row->TotalCost = p2p->totalCost;
    row->Geometry = NULL;
    row->Next = NULL;
    if (p2p->FirstRow == NULL)
	p2p->FirstRow = row;
    if (p2p->LastRow != NULL)
	p2p->LastRow->Next = row;
    p2p->LastRow = row;
    if (p2p->fromCandidate->extraLen > 0.0)
      {
	  /* inserting the Route Ingress */
	  row = malloc (sizeof (ResultsetRow));
	  row->RouteNum = 0;
	  row->RouteRow = route_row++;
	  row->Point2PointRole = VROUTE_POINT2POINT_INGRESS;
	  row->From = NULL;
	  row->To = NULL;
	  row->Undefined = solution->Undefined;
	  solution->Undefined = NULL;
	  row->UndefinedId = solution->UndefinedId;
	  row->linkRef = NULL;
	  row->TotalCost = p2p->fromCandidate->extraLen;
	  row->Geometry = NULL;
	  row->Next = NULL;
	  if (p2p->FirstRow == NULL)
	      p2p->FirstRow = row;
	  if (p2p->LastRow != NULL)
	      p2p->LastRow->Next = row;
	  p2p->LastRow = row;
      }
    if (p2p->fromCandidate->pathLen > 0.0)
      {
	  /* inserting the Start partial Link */
	  row = malloc (sizeof (ResultsetRow));
	  row->RouteNum = 0;
	  row->RouteRow = route_row++;
	  row->Point2PointRole = VROUTE_POINT2POINT_START;
	  row->From = NULL;
	  row->To = NULL;
	  row->Undefined = solution->Undefined;
	  solution->Undefined = NULL;
	  row->UndefinedId = solution->UndefinedId;
	  /* creating a RowSolution object */
	  link =
	      find_link (cursor->pVtab->db, cursor->pVtab->graph,
			 p2p->fromCandidate->linkRowid);
	  row->linkRef = malloc (sizeof (RowSolution));
	  row->linkRef->Link = link;
	  row->linkRef->Name = NULL;
	  row->linkRef->Next = NULL;
	  row->TotalCost = p2p->fromCandidate->pathLen;
	  row->Geometry = NULL;
	  row->Next = NULL;
	  if (p2p->FirstRow == NULL)
	      p2p->FirstRow = row;
	  if (p2p->LastRow != NULL)
	      p2p->LastRow->Next = row;
	  p2p->LastRow = row;
      }

    pA = solution->First;
    while (pA != NULL)
      {
	  /* inserting Route's traversed Links */
	  row = malloc (sizeof (ResultsetRow));
	  row->RouteNum = 0;
	  row->RouteRow = route_row++;
	  row->Point2PointRole = VROUTE_POINT2POINT_NONE;
	  row->From = NULL;
	  row->To = NULL;
	  row->Undefined = NULL;
	  row->linkRef = pA;
	  row->TotalCost = 0.0;
	  row->Geometry = NULL;
	  row->Next = NULL;
	  if (p2p->FirstRow == NULL)
	      p2p->FirstRow = row;
	  if (p2p->LastRow != NULL)
	      p2p->LastRow->Next = row;
	  p2p->LastRow = row;
	  pA = pA->Next;
      }

    if (p2p->toCandidate->pathLen > 0.0)
      {
	  /* inserting the End partial Link */
	  row = malloc (sizeof (ResultsetRow));
	  row->RouteNum = 0;
	  row->RouteRow = route_row++;
	  row->Point2PointRole = VROUTE_POINT2POINT_END;
	  row->From = NULL;
	  row->To = NULL;
	  row->Undefined = solution->Undefined;
	  solution->Undefined = NULL;
	  row->UndefinedId = solution->UndefinedId;
	  /* creating a RowSolution object */
	  link =
	      find_link (cursor->pVtab->db, cursor->pVtab->graph,
			 p2p->toCandidate->linkRowid);
	  row->linkRef = malloc (sizeof (RowSolution));
	  row->linkRef->Link = link;
	  row->linkRef->Name = NULL;
	  row->linkRef->Next = NULL;
	  row->TotalCost = p2p->toCandidate->pathLen;
	  row->Geometry = NULL;
	  row->Next = NULL;
	  if (p2p->FirstRow == NULL)
	      p2p->FirstRow = row;
	  if (p2p->LastRow != NULL)
	      p2p->LastRow->Next = row;
	  p2p->LastRow = row;
      }
    if (p2p->toCandidate->extraLen > 0.0)
      {
	  /* inserting the Route Egress */
	  row = malloc (sizeof (ResultsetRow));
	  row->RouteNum = 0;
	  row->RouteRow = route_row++;
	  row->Point2PointRole = VROUTE_POINT2POINT_EGRESS;
	  row->From = NULL;
	  row->To = NULL;
	  row->Undefined = solution->Undefined;
	  solution->Undefined = NULL;
	  row->UndefinedId = solution->UndefinedId;
	  row->linkRef = NULL;
	  row->TotalCost = p2p->toCandidate->extraLen;
	  row->Geometry = NULL;
	  row->Next = NULL;
	  if (p2p->FirstRow == NULL)
	      p2p->FirstRow = row;
	  if (p2p->LastRow != NULL)
	      p2p->LastRow->Next = row;
	  p2p->LastRow = row;
      }

    build_point2point_solution (cursor->pVtab->db,
				cursor->pVtab->currentOptions,
				cursor->pVtab->graph, p2p);
    cursor->pVtab->multiSolution->Mode = VROUTE_POINT2POINT_SOLUTION;
}

static int
vroute_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	       sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some shapefile */
    virtualroutingPtr p_vt;
    int err;
    int ret;
    int i;
    int n_rows;
    int n_columns;
    char *vtable = NULL;
    char *table = NULL;
    const char *col_name = NULL;
    char **results;
    char *err_msg = NULL;
    char *sql;
    int ok_id;
    int ok_data;
    char *xname;
    RoutingPtr graph = NULL;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
/* checking for table_name and geo_column_name */
    if (argc == 4)
      {
	  vtable = gaiaDequotedSql (argv[2]);
	  table = gaiaDequotedSql (argv[3]);
      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[virtualrouting module] CREATE VIRTUAL: illegal arg list {NETWORK-DATAtable}\n");
	  goto error;
      }
/* retrieving the base table columns */
    err = 0;
    ok_id = 0;
    ok_data = 0;
    xname = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", xname);
    free (xname);
    ret = sqlite3_get_table (db, sql, &results, &n_rows, &n_columns, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  err = 1;
	  goto illegal;
      }
    if (n_rows > 1)
      {
	  for (i = 1; i <= n_rows; i++)
	    {
		col_name = results[(i * n_columns) + 1];
		if (strcasecmp (col_name, "id") == 0)
		    ok_id = 1;
		if (strcasecmp (col_name, "networkdata") == 0)
		    ok_data = 1;
	    }
	  sqlite3_free_table (results);
	  if (!ok_id)
	      err = 1;
	  if (!ok_data)
	      err = 1;
      }
    else
	err = 1;
  illegal:
    if (err)
      {
	  /* something is going the wrong way */
	  *pzErr =
	      sqlite3_mprintf
	      ("[virtualrouting module] cannot build a valid NETWORK\n");
	  return SQLITE_ERROR;
      }
    p_vt = (virtualroutingPtr) sqlite3_malloc (sizeof (virtualrouting));
    if (!p_vt)
	return SQLITE_NOMEM;
    graph = load_network (db, table);
    if (!graph)
      {
	  /* something is going the wrong way */
	  *pzErr =
	      sqlite3_mprintf
	      ("[virtualrouting module] cannot build a valid NETWORK\n");
	  goto error;
      }
    p_vt->db = db;
    p_vt->graph = graph;
    p_vt->currentAlgorithm = VROUTE_DIJKSTRA_ALGORITHM;
    p_vt->currentRequest = VROUTE_SHORTEST_PATH;
    p_vt->currentOptions = VROUTE_SHORTEST_PATH_FULL;
    p_vt->currentDelimiter = ',';
    p_vt->Tolerance = 20.0;
    p_vt->routing = NULL;
    p_vt->pModule = &my_route_module;
    p_vt->nRef = 0;
    p_vt->zErrMsg = NULL;
/* preparing the COLUMNs for this VIRTUAL TABLE */
    xname = gaiaDoubleQuotedSql (vtable);
    if (p_vt->graph->NodeCode)
      {
	  if (p_vt->graph->NameColumn)
	    {
		sql =
		    sqlite3_mprintf ("CREATE TABLE \"%s\" (Algorithm TEXT, "
				     "Request TEXT, Options TEXT, Delimiter TEXT, "
				     "RouteId INTEGER, RouteRow INTEGER, Role TEXT, "
				     "LinkRowid INTEGER, NodeFrom TEXT, NodeTo TEXT,"
				     "PointFrom BLOB, PointTo BLOB, Tolerance DOUBLE, "
				     "Cost DOUBLE, Geometry BLOB, Name TEXT)",
				     xname);
	    }
	  else
	    {
		sql =
		    sqlite3_mprintf ("CREATE TABLE \"%s\" (Algorithm TEXT, "
				     "Request TEXT, Options TEXT, Delimiter TEXT, "
				     "RouteId INTEGER, RouteRow INTEGER, Role TEXT, "
				     "LinkRowid INTEGER, NodeFrom TEXT, NodeTo TEXT,"
				     "PointFrom BLOB, PointTo BLOB, Tolerance DOUBLE, "
				     "Cost DOUBLE, Geometry BLOB)", xname);
	    }
      }
    else
      {
	  if (p_vt->graph->NameColumn)
	    {
		sql =
		    sqlite3_mprintf ("CREATE TABLE \"%s\" (Algorithm TEXT, "
				     "Request TEXT, Options TEXT, Delimiter TEXT, "
				     "RouteId INTEGER, RouteRow INTEGER, Role TEXT, "
				     "LinkRowid INTEGER, NodeFrom INTEGER, NodeTo INTEGER, "
				     "PointFrom BLOB, PointTo BLOB, Tolerance Double, "
				     "Cost DOUBLE, Geometry BLOB, Name TEXT)",
				     xname);
	    }
	  else
	    {
		sql =
		    sqlite3_mprintf ("CREATE TABLE \"%s\" (Algorithm TEXT, "
				     "Request TEXT, Options TEXT, Delimiter TEXT, "
				     "RouteId INTEGER, RouteRow INTEGER, Role TEXT, "
				     "LinkRowid INTEGER, NodeFrom INTEGER, NodeTo INTEGER, "
				     "PointFrom BLOB, PointTo BLOB, Tolerance DOUBLE, "
				     "Cost DOUBLE, Geometry BLOB)", xname);
	    }
      }
    free (xname);
    if (sqlite3_declare_vtab (db, sql) != SQLITE_OK)
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[virtualrouting module] CREATE VIRTUAL: invalid SQL statement \"%s\"",
	       sql);
	  sqlite3_free (sql);
	  goto error;
      }
    sqlite3_free (sql);
    *ppVTab = (sqlite3_vtab *) p_vt;
    p_vt->routing = routing_init (p_vt->graph);
    free (table);
    free (vtable);
    return SQLITE_OK;
  error:
    if (table)
	free (table);
    if (vtable)
	free (vtable);
    return SQLITE_ERROR;
}

static int
vroute_connect (sqlite3 * db, void *pAux, int argc, const char *const *argv,
		sqlite3_vtab ** ppVTab, char **pzErr)
{
/* connects the virtual table to some shapefile - simply aliases vshp_create() */
    return vroute_create (db, pAux, argc, argv, ppVTab, pzErr);
}

static int
vroute_best_index (sqlite3_vtab * pVTab, sqlite3_index_info * pIdxInfo)
{
/* best index selection */
    int i;
    int errors = 0;
    int err = 1;
    int from = 0;
    int to = 0;
    int fromPoint = 0;
    int toPoint = 0;
    int cost = 0;
    int i_from = -1;
    int i_to = -1;
    int i_fromPoint = -1;
    int i_toPoint = -1;
    int i_cost = -1;
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    for (i = 0; i < pIdxInfo->nConstraint; i++)
      {
	  /* verifying the constraints */
	  struct sqlite3_index_constraint *p = &(pIdxInfo->aConstraint[i]);
	  if (p->usable)
	    {
		if (p->iColumn == 8 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		  {
		      from++;
		      i_from = i;
		  }
		else if (p->iColumn == 9 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		  {
		      to++;
		      i_to = i;
		  }
		else if (p->iColumn == 10
			 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		  {
		      fromPoint++;
		      i_fromPoint = i;
		  }
		else if (p->iColumn == 11
			 && p->op == SQLITE_INDEX_CONSTRAINT_EQ)
		  {
		      toPoint++;
		      i_toPoint = i;
		  }
		else if (p->iColumn == 13
			 && p->op == SQLITE_INDEX_CONSTRAINT_LE)
		  {
		      cost++;
		      i_cost = i;
		  }
		else
		    errors++;
	    }
      }
    if (from == 1 && to == 1 && errors == 0)
      {
	  /* this one is a valid Shortest Path query */
	  if (i_from < i_to)
	      pIdxInfo->idxNum = 1;	/* first arg is FROM */
	  else
	      pIdxInfo->idxNum = 2;	/* first arg is TO */
	  pIdxInfo->estimatedCost = 1.0;
	  for (i = 0; i < pIdxInfo->nConstraint; i++)
	    {
		if (pIdxInfo->aConstraint[i].usable)
		  {
		      pIdxInfo->aConstraintUsage[i].argvIndex = i + 1;
		      pIdxInfo->aConstraintUsage[i].omit = 1;
		  }
	    }
	  err = 0;
      }
    if (fromPoint == 1 && toPoint == 1 && errors == 0)
      {
	  /* this one is a valid Shortest Path [Point2Point] query */
	  if (i_fromPoint < i_toPoint)
	      pIdxInfo->idxNum = 5;	/* first arg is FROM */
	  else
	      pIdxInfo->idxNum = 6;	/* first arg is TO */
	  pIdxInfo->estimatedCost = 1.0;
	  for (i = 0; i < pIdxInfo->nConstraint; i++)
	    {
		if (pIdxInfo->aConstraint[i].usable)
		  {
		      pIdxInfo->aConstraintUsage[i].argvIndex = i + 1;
		      pIdxInfo->aConstraintUsage[i].omit = 1;
		  }
	    }
	  err = 0;
      }
    if (from == 1 && cost == 1 && errors == 0)
      {
	  /* this one is a valid "within cost" query */
	  if (i_from < i_cost)
	      pIdxInfo->idxNum = 3;	/* first arg is FROM */
	  else
	      pIdxInfo->idxNum = 4;	/* first arg is COST */
	  pIdxInfo->estimatedCost = 1.0;
	  for (i = 0; i < pIdxInfo->nConstraint; i++)
	    {
		if (pIdxInfo->aConstraint[i].usable)
		  {
		      pIdxInfo->aConstraintUsage[i].argvIndex = i + 1;
		      pIdxInfo->aConstraintUsage[i].omit = 1;
		  }
	    }
	  err = 0;
      }
    if (err)
      {
	  /* illegal query */
	  pIdxInfo->idxNum = 0;
      }
    return SQLITE_OK;
}

static int
vroute_disconnect (sqlite3_vtab * pVTab)
{
/* disconnects the virtual table */
    virtualroutingPtr p_vt = (virtualroutingPtr) pVTab;
    if (p_vt->routing)
	routing_free (p_vt->routing);
    if (p_vt->graph)
	network_free (p_vt->graph);
    sqlite3_free (p_vt);
    return SQLITE_OK;
}

static int
vroute_destroy (sqlite3_vtab * pVTab)
{
/* destroys the virtual table - simply aliases vshp_disconnect() */
    return vroute_disconnect (pVTab);
}

static void
vroute_read_row (virtualroutingCursorPtr cursor)
{
/* trying to read a "row" from Shortest Path solution */
    if (cursor->pVtab->multiSolution->Mode == VROUTE_RANGE_SOLUTION)
      {
	  if (cursor->pVtab->multiSolution->CurrentNodeRow == NULL)
	      cursor->pVtab->eof = 1;
	  else
	      cursor->pVtab->eof = 0;
      }
    else
      {
	  if (cursor->pVtab->multiSolution->CurrentRow == NULL)
	      cursor->pVtab->eof = 1;
	  else
	      cursor->pVtab->eof = 0;
      }
    return;
}

static void
vroute_read_row_p2p (virtualroutingCursorPtr cursor)
{
/* trying to read a "row" from Point2Point solution */
    if (cursor->pVtab->point2PointSolution->CurrentRow == NULL)
	cursor->pVtab->eof = 1;
    else
	cursor->pVtab->eof = 0;
    return;
}

static int
vroute_open (sqlite3_vtab * pVTab, sqlite3_vtab_cursor ** ppCursor)
{
/* opening a new cursor */
    virtualroutingCursorPtr cursor =
	(virtualroutingCursorPtr)
	sqlite3_malloc (sizeof (virtualroutingCursor));
    if (cursor == NULL)
	return SQLITE_ERROR;
    cursor->pVtab = (virtualroutingPtr) pVTab;
    cursor->pVtab->multiSolution = alloc_multiSolution ();
    cursor->pVtab->point2PointSolution = alloc_point2PointSolution ();
    cursor->pVtab->eof = 0;
    *ppCursor = (sqlite3_vtab_cursor *) cursor;
    return SQLITE_OK;
}

static int
vroute_close (sqlite3_vtab_cursor * pCursor)
{
/* closing the cursor */
    virtualroutingCursorPtr cursor = (virtualroutingCursorPtr) pCursor;
    delete_multiSolution (cursor->pVtab->multiSolution);
    delete_point2PointSolution (cursor->pVtab->point2PointSolution);
    sqlite3_free (pCursor);
    return SQLITE_OK;
}

static int
vroute_filter (sqlite3_vtab_cursor * pCursor, int idxNum, const char *idxStr,
	       int argc, sqlite3_value ** argv)
{
/* setting up a cursor filter */
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    unsigned char *p_blob = NULL;
    int n_bytes = 0;
    int node_code = 0;
    virtualroutingCursorPtr cursor = (virtualroutingCursorPtr) pCursor;
    virtualroutingPtr net = (virtualroutingPtr) cursor->pVtab;
    RoutingMultiDestPtr multiple = NULL;
    MultiSolutionPtr multiSolution = cursor->pVtab->multiSolution;
    Point2PointSolutionPtr p2p = cursor->pVtab->point2PointSolution;
    if (idxStr)
	idxStr = idxStr;	/* unused arg warning suppression */
    node_code = net->graph->NodeCode;
    reset_multiSolution (multiSolution);
    reset_point2PointSolution (p2p);
    cursor->pVtab->eof = 0;
    if (idxNum == 1 && argc == 2)
      {
	  /* retrieving the Shortest Path From/To params */
	  if (node_code)
	    {
		/* Nodes are identified by TEXT Codes */
		if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
		    multiSolution->From =
			find_node_by_code (net->graph,
					   (char *)
					   sqlite3_value_text (argv[0]));
		if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
		  {
		      multiple =
			  vroute_get_multiple_destinations (1,
							    cursor->
							    pVtab->currentDelimiter,
							    (const char *)
							    sqlite3_value_text
							    (argv[1]));
		      if (multiple != NULL)
			{
			    set_multi_by_code (multiple, net->graph);
			    multiSolution->MultiTo = multiple;
			}
		  }
	    }
	  else
	    {
		/* Nodes are identified by INT Ids */
		if (sqlite3_value_type (argv[0]) == SQLITE_INTEGER)
		    multiSolution->From =
			find_node_by_id (net->graph,
					 sqlite3_value_int (argv[0]));
		if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
		  {
		      multiple =
			  vroute_get_multiple_destinations (0,
							    cursor->
							    pVtab->currentDelimiter,
							    (const char *)
							    sqlite3_value_text
							    (argv[1]));
		      if (multiple != NULL)
			{
			    set_multi_by_id (multiple, net->graph);
			    multiSolution->MultiTo = multiple;
			}
		  }
		else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
		  {
		      multiple =
			  vroute_as_multiple_destinations (sqlite3_value_int
							   (argv[1]));
		      if (multiple != NULL)
			{
			    set_multi_by_id (multiple, net->graph);
			    multiSolution->MultiTo = multiple;
			}
		  }
	    }
      }
    if (idxNum == 2 && argc == 2)
      {
	  /* retrieving the Shortest Path To/From params */
	  if (node_code)
	    {
		/* Nodes are identified by TEXT Codes */
		if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
		  {
		      multiple =
			  vroute_get_multiple_destinations (1,
							    cursor->
							    pVtab->currentDelimiter,
							    (const char *)
							    sqlite3_value_text
							    (argv[0]));
		      if (multiple != NULL)
			{
			    set_multi_by_code (multiple, net->graph);
			    multiSolution->MultiTo = multiple;
			}
		  }
		if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
		  {
		      multiSolution->From =
			  find_node_by_code (net->graph,
					     (char *)
					     sqlite3_value_text (argv[1]));
		  }
	    }
	  else
	    {
		/* Nodes are identified by INT Ids */
		if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
		  {
		      multiple =
			  vroute_get_multiple_destinations (0,
							    cursor->
							    pVtab->currentDelimiter,
							    (const char *)
							    sqlite3_value_text
							    (argv[0]));
		      if (multiple != NULL)
			{
			    set_multi_by_id (multiple, net->graph);
			    multiSolution->MultiTo = multiple;
			}
		  }
		else if (sqlite3_value_type (argv[0]) == SQLITE_INTEGER)
		  {
		      multiple =
			  vroute_as_multiple_destinations (sqlite3_value_int
							   (argv[0]));
		      if (multiple != NULL)
			{
			    set_multi_by_id (multiple, net->graph);
			    multiSolution->MultiTo = multiple;
			}
		  }
		if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
		    multiSolution->From =
			find_node_by_id (net->graph,
					 sqlite3_value_int (argv[1]));
	    }
      }
    if (idxNum == 3 && argc == 2)
      {
	  /* retrieving the From and Cost param */
	  if (node_code)
	    {
		/* Nodes are identified by TEXT Codes */
		if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
		    multiSolution->From =
			find_node_by_code (net->graph,
					   (char *)
					   sqlite3_value_text (argv[0]));
	    }
	  else
	    {
		/* Nodes are identified by INT Ids */
		if (sqlite3_value_type (argv[0]) == SQLITE_INTEGER)
		    multiSolution->From =
			find_node_by_id (net->graph,
					 sqlite3_value_int (argv[0]));
	    }
	  if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	    {
		int cost = sqlite3_value_int (argv[1]);
		multiSolution->MaxCost = cost;
	    }
	  else if (sqlite3_value_type (argv[1]) == SQLITE_FLOAT)
	      multiSolution->MaxCost = sqlite3_value_double (argv[1]);
      }
    if (idxNum == 4 && argc == 2)
      {
	  /* retrieving the From and Cost param */
	  if (node_code)
	    {
		/* Nodes are identified by TEXT Codes */
		if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
		    multiSolution->From =
			find_node_by_code (net->graph,
					   (char *)
					   sqlite3_value_text (argv[1]));
	    }
	  else
	    {
		/* Nodes are identified by INT Ids */
		if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
		    multiSolution->From =
			find_node_by_id (net->graph,
					 sqlite3_value_int (argv[1]));
	    }
	  if (sqlite3_value_type (argv[0]) == SQLITE_INTEGER)
	    {
		int cost = sqlite3_value_int (argv[0]);
		multiSolution->MaxCost = cost;
	    }
	  else if (sqlite3_value_type (argv[0]) == SQLITE_FLOAT)
	      multiSolution->MaxCost = sqlite3_value_double (argv[0]);
      }
    if (idxNum == 5 && argc == 2)
      {
	  /* retrieving the Shortest Path FromPoint / ToPoint params */
	  if (net->graph->GeometryColumn == NULL)
	      ;			/* skipping Point2Point if No-Geometry */
	  else
	    {
		if (sqlite3_value_type (argv[0]) == SQLITE_BLOB)
		  {
		      p_blob = (unsigned char *) sqlite3_value_blob (argv[0]);
		      n_bytes = sqlite3_value_bytes (argv[0]);
		      point = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		      if (point != NULL)
			{
			    if (do_check_valid_point (point, net->graph->Srid))
			      {
				  /* ok, it's a valid Point */
				  pt = point->FirstPoint;
				  p2p->validFrom = 1;
				  p2p->xFrom = pt->X;
				  p2p->yFrom = pt->Y;
				  if (point->DimensionModel == GAIA_XY_Z
				      || point->DimensionModel == GAIA_XY_Z_M)
				      p2p->zFrom = pt->Z;
				  else
				      p2p->zFrom = 0.0;
			      }
			    gaiaFreeGeomColl (point);
			}
		  }
		if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
		  {
		      p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
		      n_bytes = sqlite3_value_bytes (argv[1]);
		      point = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		      if (point != NULL)
			{
			    if (do_check_valid_point (point, net->graph->Srid))
			      {
				  /* ok, it's a valid Point */
				  pt = point->FirstPoint;
				  p2p->validTo = 1;
				  p2p->xTo = pt->X;
				  p2p->yTo = pt->Y;
				  if (point->DimensionModel == GAIA_XY_Z
				      || point->DimensionModel == GAIA_XY_Z_M)
				      p2p->zTo = pt->Z;
				  else
				      p2p->zTo = 0.0;
			      }
			    gaiaFreeGeomColl (point);
			}
		  }
	    }
      }
    if (idxNum == 6 && argc == 2)
      {
	  /* retrieving the Shortest Path ToPoint / FromPoint [Point2Point] params */
	  if (net->graph->GeometryColumn == NULL)
	      ;			/* skipping Point2Point if No-Geometry */
	  else
	    {
		if (sqlite3_value_type (argv[0]) == SQLITE_BLOB)
		  {
		      p_blob = (unsigned char *) sqlite3_value_blob (argv[0]);
		      n_bytes = sqlite3_value_bytes (argv[0]);
		      point = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		      if (point != NULL)
			{
			    if (do_check_valid_point (point, net->graph->Srid))
			      {
				  /* ok, it's a valid Point */
				  pt = point->FirstPoint;
				  p2p->validTo = 1;
				  p2p->xTo = pt->X;
				  p2p->yTo = pt->Y;
				  if (point->DimensionModel == GAIA_XY_Z
				      || point->DimensionModel == GAIA_XY_Z_M)
				      p2p->zFrom = pt->Z;
				  else
				      p2p->zFrom = 0.0;
			      }
			    gaiaFreeGeomColl (point);
			}
		  }
		if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
		  {
		      p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
		      n_bytes = sqlite3_value_bytes (argv[1]);
		      point = gaiaFromSpatiaLiteBlobWkb (p_blob, n_bytes);
		      if (point != NULL)
			{
			    if (do_check_valid_point (point, net->graph->Srid))
			      {
				  /* ok, it's a valid Point */
				  pt = point->FirstPoint;
				  p2p->validFrom = 1;
				  p2p->xFrom = pt->X;
				  p2p->yFrom = pt->Y;
				  if (point->DimensionModel == GAIA_XY_Z
				      || point->DimensionModel == GAIA_XY_Z_M)
				      p2p->zTo = pt->Z;
				  else
				      p2p->zTo = 0.0;
			      }
			    gaiaFreeGeomColl (point);
			}
		  }
	    }
      }
    if (p2p->validFrom && p2p->validTo)
      {
	  /* preparing a Point2Point request */
	  cursor->pVtab->eof = 0;
	  p2p->CurrentRow = NULL;
	  p2p->CurrentRowId = 0;
	  p2p->Mode = VROUTE_POINT2POINT_SOLUTION;
	  /* searching candidates links (From) */
	  if (!do_prepare_point (cursor->pVtab, VROUTE_POINT2POINT_FROM))
	      p2p->Mode = VROUTE_POINT2POINT_ERROR;
	  else
	    {
		/* searching candidates links (To) */
		if (!do_prepare_point (cursor->pVtab, VROUTE_POINT2POINT_TO))
		    p2p->Mode = VROUTE_POINT2POINT_ERROR;
		else
		  {
		      /* defining Ingress paths */
		      if (!do_define_ingress_paths (cursor->pVtab))
			  p2p->Mode = VROUTE_POINT2POINT_ERROR;
		      else
			{
			    /* defining Egress paths */
			    if (!do_define_egress_paths (cursor->pVtab))
				p2p->Mode = VROUTE_POINT2POINT_ERROR;
			}
		  }
	    }
	  if (p2p->Mode == VROUTE_POINT2POINT_SOLUTION)
	    {
		point2point_resolve (cursor);
		p2p->CurrentRowId = 0;
		p2p->CurrentRow = p2p->FirstRow;
	    }
	  return SQLITE_OK;
      }
    if (multiSolution == NULL)
      {
	  cursor->pVtab->eof = 0;
	  return SQLITE_OK;
      }
    if (multiSolution->From && multiSolution->MultiTo)
      {
	  cursor->pVtab->eof = 0;
	  if (net->currentRequest == VROUTE_TSP_NN)
	    {
		multiSolution->Mode = VROUTE_TSP_SOLUTION;
		if (net->currentAlgorithm == VROUTE_DIJKSTRA_ALGORITHM)
		  {
		      tsp_nn_solve (net->db, net->currentOptions, net->graph,
				    net->routing, multiSolution);
		      multiSolution->CurrentRowId = 0;
		      multiSolution->CurrentRow = multiSolution->FirstRow;
		  }
	    }
	  else if (net->currentRequest == VROUTE_TSP_GA)
	    {
		multiSolution->Mode = VROUTE_TSP_SOLUTION;
		if (net->currentAlgorithm == VROUTE_DIJKSTRA_ALGORITHM)
		  {
		      tsp_ga_solve (net->db, net->currentOptions, net->graph,
				    net->routing, multiSolution);
		      multiSolution->CurrentRowId = 0;
		      multiSolution->CurrentRow = multiSolution->FirstRow;
		  }
	    }
	  else
	    {
		multiSolution->Mode = VROUTE_ROUTING_SOLUTION;
		if (net->currentAlgorithm == VROUTE_A_STAR_ALGORITHM)
		  {
		      if (multiSolution->MultiTo->Items > 1)
			{
			    /* multiple destinations: always defaulting to Dijkstra */
			    dijkstra_multi_solve (net->db, net->currentOptions,
						  net->graph, net->routing,
						  multiSolution);
			}
		      else
			  astar_solve (net->db, net->currentOptions, net->graph,
				       net->routing, multiSolution);
		  }
		else
		    dijkstra_multi_solve (net->db, net->currentOptions,
					  net->graph, net->routing,
					  multiSolution);
		multiSolution->CurrentRowId = 0;
		multiSolution->CurrentRow = multiSolution->FirstRow;
	    }
	  return SQLITE_OK;
      }
    if (multiSolution->From && multiSolution->MaxCost > 0.0)
      {
	  find_srid (net->db, net->graph);
	  cursor->pVtab->eof = 0;
	  multiSolution->Mode = VROUTE_RANGE_SOLUTION;
	  /* always defaulting to Dijkstra's Shortest Path */
	  dijkstra_within_cost_range (net->routing, multiSolution,
				      net->graph->Srid);
	  multiSolution->CurrentRowId = 0;
	  multiSolution->CurrentNodeRow = multiSolution->FirstNode;
	  return SQLITE_OK;
      }
    cursor->pVtab->eof = 0;
    multiSolution->CurrentRow = NULL;
    multiSolution->CurrentRowId = 0;
    multiSolution->Mode = VROUTE_ROUTING_SOLUTION;
    return SQLITE_OK;
}

static int
vroute_next (sqlite3_vtab_cursor * pCursor)
{
/* fetching a next row from cursor */
    virtualroutingCursorPtr cursor = (virtualroutingCursorPtr) pCursor;
    MultiSolutionPtr multiSolution = cursor->pVtab->multiSolution;
    Point2PointSolutionPtr p2p = cursor->pVtab->point2PointSolution;
    if (p2p != NULL)
      {
	  if (p2p->Mode == VROUTE_POINT2POINT_SOLUTION)
	    {
		if (p2p->CurrentRow == NULL)
		  {
		      cursor->pVtab->eof = 1;
		      return SQLITE_OK;
		  }
		p2p->CurrentRow = p2p->CurrentRow->Next;
		if (!(p2p->CurrentRow))
		  {
		      cursor->pVtab->eof = 1;
		      return SQLITE_OK;
		  }
		(p2p->CurrentRowId)++;
		vroute_read_row_p2p (cursor);
		return SQLITE_OK;
	    }
      }
    if (multiSolution->Mode == VROUTE_RANGE_SOLUTION)
      {
	  if (multiSolution->CurrentNodeRow == NULL)
	    {
		cursor->pVtab->eof = 1;
		return SQLITE_OK;
	    }
	  multiSolution->CurrentNodeRow = multiSolution->CurrentNodeRow->Next;
	  if (!(multiSolution->CurrentNodeRow))
	    {
		cursor->pVtab->eof = 1;
		return SQLITE_OK;
	    }
      }
    else
      {
	  if (multiSolution->CurrentRow == NULL)
	    {
		cursor->pVtab->eof = 1;
		return SQLITE_OK;
	    }
	  multiSolution->CurrentRow = multiSolution->CurrentRow->Next;
	  if (!(multiSolution->CurrentRow))
	    {
		cursor->pVtab->eof = 1;
		return SQLITE_OK;
	    }
      }
    (multiSolution->CurrentRowId)++;
    vroute_read_row (cursor);
    return SQLITE_OK;
}

static int
vroute_eof (sqlite3_vtab_cursor * pCursor)
{
/* cursor EOF */
    virtualroutingCursorPtr cursor = (virtualroutingCursorPtr) pCursor;
    return cursor->pVtab->eof;
}

static void
do_cost_range_column (virtualroutingCursorPtr cursor,
		      sqlite3_context * pContext, int node_code,
		      RowNodeSolutionPtr row_node, int column)
{
/* processing a "within Cost range" solution row */
    const char *algorithm;
    char delimiter[128];
    const char *role;
    RowNodeSolutionPtr first = cursor->pVtab->multiSolution->FirstNode;

    if (column == 0)
      {
	  /* the currently used Algorithm */
	  algorithm = "Dijkstra";
	  if (row_node != first)
	      sqlite3_result_null (pContext);
	  else
	      sqlite3_result_text (pContext, algorithm, strlen (algorithm),
				   SQLITE_TRANSIENT);
      }
    if (column == 1)
      {
	  /* the current Request type */
	  algorithm = "Isochrone";
	  if (row_node != first)
	      sqlite3_result_null (pContext);
	  else
	      sqlite3_result_text (pContext, algorithm, strlen (algorithm),
				   SQLITE_TRANSIENT);
      }
    if (column == 2)
      {
	  /* the currently set Options */
	  algorithm = "Full";
	  if (row_node != first)
	      sqlite3_result_null (pContext);
	  else
	      sqlite3_result_text (pContext, algorithm, strlen (algorithm),
				   SQLITE_TRANSIENT);
      }
    if (column == 3)
      {
	  /* the currently set delimiter char */
	  if (isprint (cursor->pVtab->currentDelimiter))
	      sprintf (delimiter, "%c [dec=%d, hex=%02x]",
		       cursor->pVtab->currentDelimiter,
		       cursor->pVtab->currentDelimiter,
		       cursor->pVtab->currentDelimiter);
	  else
	      sprintf (delimiter, "[dec=%d, hex=%02x]",
		       cursor->pVtab->currentDelimiter,
		       cursor->pVtab->currentDelimiter);
	  if (row_node != first)
	      sqlite3_result_null (pContext);
	  else
	      sqlite3_result_text (pContext, delimiter, strlen (delimiter),
				   SQLITE_TRANSIENT);
      }
    if (column == 4)
      {
	  /* the RouteNum column */
	  sqlite3_result_null (pContext);
      }
    if (column == 5)
      {
	  /* the RouteRow column */
	  sqlite3_result_null (pContext);
      }
    if (column == 6)
      {
	  /* role of this row */
	  role = "Solution";
	  sqlite3_result_text (pContext, role, strlen (role), SQLITE_TRANSIENT);
      }
    if (column == 7)
      {
	  /* the LinkRowId column */
	  sqlite3_result_null (pContext);
      }
    if (column == 8)
      {
	  /* the NodeFrom column */
	  if (node_code)
	      sqlite3_result_text (pContext,
				   cursor->pVtab->multiSolution->From->Code,
				   strlen (cursor->pVtab->multiSolution->
					   From->Code), SQLITE_STATIC);
	  else
	      sqlite3_result_int64 (pContext,
				    cursor->pVtab->multiSolution->From->Id);
      }
    if (column == 9)
      {
	  /* the NodeTo column */
	  if (row_node == NULL)
	      sqlite3_result_null (pContext);
	  else
	    {
		if (node_code)
		    sqlite3_result_text (pContext, row_node->Node->Code,
					 strlen (row_node->Node->Code),
					 SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext, row_node->Node->Id);
	    }
      }
    if (column == 10)
      {
	  /* the PointFrom column */
	  sqlite3_result_null (pContext);
      }
    if (column == 11)
      {
	  /* the PointTo column */
	  sqlite3_result_null (pContext);
      }
    if (column == 12)
      {
	  /* the Tolerance column */
	  sqlite3_result_null (pContext);
      }
    if (column == 13)
      {
	  /* the Cost column */
	  if (row_node == NULL)
	      sqlite3_result_null (pContext);
	  else
	      sqlite3_result_double (pContext, row_node->Cost);
      }
    if (column == 14)
      {
	  /* the Geometry column */
	  if (row_node == NULL)
	      sqlite3_result_null (pContext);
	  else
	    {
		if (row_node->Srid == VROUTE_INVALID_SRID)
		    sqlite3_result_null (pContext);
		else
		  {
		      int len;
		      unsigned char *p_result = NULL;
		      gaiaGeomCollPtr geom = gaiaAllocGeomColl ();
		      geom->Srid = row_node->Srid;
		      gaiaAddPointToGeomColl (geom, row_node->Node->CoordX,
					      row_node->Node->CoordY);
		      gaiaToSpatiaLiteBlobWkb (geom, &p_result, &len);
		      sqlite3_result_blob (pContext, p_result, len, free);
		      gaiaFreeGeomColl (geom);
		  }
	    }
      }
    if (column == 15)
      {
	  /* the [optional] Name column */
	  sqlite3_result_null (pContext);
      }
}

static void
do_common_column (virtualroutingCursorPtr cursor, virtualroutingPtr net,
		  sqlite3_context * pContext, int node_code,
		  ResultsetRowPtr row, int column)
{
/* processing an ordinary Routing (Shortest Path or TSP) solution row */
    const char *algorithm;
    char delimiter[128];
    const char *role;
    ResultsetRowPtr first = cursor->pVtab->multiSolution->FirstRow;
    MultiSolutionPtr multiSolution = cursor->pVtab->multiSolution;

    if (row == NULL)
      {
	  /* empty resultset */
	  if (column == 0)
	    {
		/* the currently used Algorithm */
		if (net->currentAlgorithm == VROUTE_A_STAR_ALGORITHM)
		    algorithm = "A*";
		else
		    algorithm = "Dijkstra";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  else if (column == 1)
	    {
		/* the current Request type */
		if (net->currentRequest == VROUTE_TSP_NN)
		    algorithm = "TSP NN";
		else if (net->currentRequest == VROUTE_TSP_GA)
		    algorithm = "TSP GA";
		else
		    algorithm = "Shortest Path";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  else if (column == 2)
	    {
		/* the currently set Options */
		if (net->currentOptions == VROUTE_SHORTEST_PATH_SIMPLE)
		    algorithm = "Simple";
		else if (net->currentOptions == VROUTE_SHORTEST_PATH_NO_LINKS)
		    algorithm = "No Links";
		else if (net->currentOptions == VROUTE_SHORTEST_PATH_NO_GEOMS)
		    algorithm = "No Geometries";
		else
		    algorithm = "Full";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  else if (column == 3)
	    {
		/* the currently set delimiter char */
		if (isprint (cursor->pVtab->currentDelimiter))
		    sprintf (delimiter, "%c [dec=%d, hex=%02x]",
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter);
		else
		    sprintf (delimiter, "[dec=%d, hex=%02x]",
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter);
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, delimiter,
					 strlen (delimiter), SQLITE_TRANSIENT);
	    }
	  else
	      sqlite3_result_null (pContext);
	  return;
      }
    if (row->Undefined != NULL)
      {
	  /* special case: there is an undefined destination */
	  if (column == 0)
	    {
		/* the currently used Algorithm */
		fprintf (stderr, "common_column_undefined %d\n",
			 multiSolution->MultiTo->Items);
		if (multiSolution->MultiTo->Items > 1)
		  {
		      /* multiple destinations: always defaulting to Dijkstra */
		      algorithm = "Dijkstra";
		  }
		else
		  {
		      if (net->currentAlgorithm == VROUTE_A_STAR_ALGORITHM)
			  algorithm = "A*";
		      else
			  algorithm = "Dijkstra";
		  }
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  if (column == 1)
	    {
		/* the current Request type */
		if (net->currentRequest == VROUTE_TSP_NN)
		    algorithm = "TSP NN";
		else if (net->currentRequest == VROUTE_TSP_GA)
		    algorithm = "TSP GA";
		else
		    algorithm = "Shortest Path";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  if (column == 2)
	    {
		/* the currently set Options */
		if (net->currentOptions == VROUTE_SHORTEST_PATH_SIMPLE)
		    algorithm = "Simple";
		else if (net->currentOptions == VROUTE_SHORTEST_PATH_NO_LINKS)
		    algorithm = "No Links";
		else if (net->currentOptions == VROUTE_SHORTEST_PATH_NO_GEOMS)
		    algorithm = "No Geometries";
		else
		    algorithm = "Full";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  if (column == 3)
	    {
		/* the currently set delimiter char */
		if (isprint (cursor->pVtab->currentDelimiter))
		    sprintf (delimiter, "%c [dec=%d, hex=%02x]",
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter);
		else
		    sprintf (delimiter, "[dec=%d, hex=%02x]",
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter);
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, delimiter,
					 strlen (delimiter), SQLITE_TRANSIENT);
	    }
	  if (column == 4)
	    {
		/* the RouteNum column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 5)
	    {
		/* the RouteRow column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 6)
	    {
		/* role of this row */
		if (row->To != NULL)
		    role = "Unreachable NodeTo";
		else
		    role = "Undefined NodeTo";
		sqlite3_result_text (pContext, role, strlen (role),
				     SQLITE_TRANSIENT);
	    }
	  if (column == 7)
	    {
		/* the LinkRowId column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 8)
	    {
		/* the NodeFrom column */
		if (row->From == NULL)
		  {
		      if (node_code)
			  sqlite3_result_text (pContext, row->Undefined,
					       strlen (row->Undefined),
					       SQLITE_STATIC);
		      else
			  sqlite3_result_int64 (pContext, row->UndefinedId);
		  }
		else
		  {
		      if (node_code)
			  sqlite3_result_text (pContext, row->From->Code,
					       strlen (row->From->Code),
					       SQLITE_STATIC);
		      else
			  sqlite3_result_int64 (pContext, row->From->Id);
		  }
	    }
	  if (column == 9)
	    {
		/* the NodeTo column */
		if (node_code)
		    sqlite3_result_text (pContext, row->Undefined,
					 strlen (row->Undefined),
					 SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext, row->UndefinedId);
	    }
	  if (column == 10)
	    {
		/* the PointFrom column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 11)
	    {
		/* the PointTo column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 12)
	    {
		/* the Tolerance column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 13)
	    {
		/* the Cost column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 14)
	    {
		/* the Geometry column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 15)
	    {
		/* the [optional] Name column */
		sqlite3_result_null (pContext);
	    }
	  return;
      }
    if (row->linkRef == NULL)
      {
	  /* special case: this one is the solution summary */
	  if (column == 0)
	    {
		/* the currently used Algorithm */
		fprintf (stderr, "common_column_summary %d\n",
			 multiSolution->MultiTo->Items);
		if (multiSolution->MultiTo->Items > 1)
		  {
		      /* multiple destinations: always defaulting to Dijkstra */
		      algorithm = "Dijkstra";
		  }
		else
		  {
		      if (net->currentAlgorithm == VROUTE_A_STAR_ALGORITHM)
			  algorithm = "A*";
		      else
			  algorithm = "Dijkstra";
		  }
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  if (column == 1)
	    {
		/* the current Request type */
		if (net->currentRequest == VROUTE_TSP_NN)
		    algorithm = "TSP NN";
		else if (net->currentRequest == VROUTE_TSP_GA)
		    algorithm = "TSP GA";
		else
		    algorithm = "Shortest Path";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  if (column == 2)
	    {
		/* the currently set Options */
		if (net->currentOptions == VROUTE_SHORTEST_PATH_SIMPLE)
		    algorithm = "Simple";
		else if (net->currentOptions == VROUTE_SHORTEST_PATH_NO_LINKS)
		    algorithm = "No Links";
		else if (net->currentOptions == VROUTE_SHORTEST_PATH_NO_GEOMS)
		    algorithm = "No Geometries";
		else
		    algorithm = "Full";
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, algorithm,
					 strlen (algorithm), SQLITE_TRANSIENT);
	    }
	  if (column == 3)
	    {
		/* the currently set delimiter char */
		if (isprint (cursor->pVtab->currentDelimiter))
		    sprintf (delimiter, "%c [dec=%d, hex=%02x]",
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter);
		else
		    sprintf (delimiter, "[dec=%d, hex=%02x]",
			     cursor->pVtab->currentDelimiter,
			     cursor->pVtab->currentDelimiter);
		if (row != first)
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_text (pContext, delimiter,
					 strlen (delimiter), SQLITE_TRANSIENT);
	    }
	  if (column == 4)
	    {
		/* the RouteNum column */
		sqlite3_result_int (pContext, row->RouteNum);
	    }
	  if (column == 5)
	    {
		/* the RouteRow column */
		sqlite3_result_int (pContext, row->RouteRow);
	    }
	  if (column == 6)
	    {
		/* role of this row */
		if (cursor->pVtab->multiSolution->Mode == VROUTE_TSP_SOLUTION
		    && row->RouteNum == 0)
		    role = "TSP Solution";
		else
		  {
		      if (row->From == row->To)
			  role = "Unreachable NodeTo";
		      else
			  role = "Route";
		  }
		sqlite3_result_text (pContext, role, strlen (role),
				     SQLITE_TRANSIENT);
	    }
	  if (row->From == NULL || row->To == NULL)
	    {
		/* empty [uninitialized] solution */
		if (column > 0)
		    sqlite3_result_null (pContext);
		return;
	    }
	  if (column == 7)
	    {
		/* the LinkRowId column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 8)
	    {
		/* the NodeFrom column */
		if (node_code)
		    sqlite3_result_text (pContext, row->From->Code,
					 strlen (row->From->Code),
					 SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext, row->From->Id);
	    }
	  if (column == 9)
	    {
		/* the NodeTo column */
		if (node_code)
		    sqlite3_result_text (pContext, row->To->Code,
					 strlen (row->To->Code), SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext, row->To->Id);
	    }
	  if (column == 10)
	    {
		/* the PointFrom column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 11)
	    {
		/* the PointTo column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 12)
	    {
		/* the Tolerance column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 13)
	    {
		/* the Cost column */
		if (row->RouteNum != 0 && (row->From == row->To))
		    sqlite3_result_null (pContext);
		else
		    sqlite3_result_double (pContext, row->TotalCost);
	    }
	  if (column == 14)
	    {
		/* the Geometry column */
		if (!(row->Geometry))
		    sqlite3_result_null (pContext);
		else
		  {
		      /* builds the BLOB geometry to be returned */
		      int len;
		      unsigned char *p_result = NULL;
		      gaiaToSpatiaLiteBlobWkb (row->Geometry, &p_result, &len);
		      sqlite3_result_blob (pContext, p_result, len, free);
		  }
	    }
	  if (column == 15)
	    {
		/* the [optional] Name column */
		sqlite3_result_null (pContext);
	    }
      }
    else
      {
	  /* ordinary case: this one is a Link used by the solution */
	  if (column == 0)
	    {
		/* the currently used Algorithm - alwasy NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 1)
	    {
		/* the current Request type - always NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 2)
	    {
		/* the currently set Options- always NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 3)
	    {
		/* the currently set delimiter char- always NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 4)
	    {
		/* the RouteNum column */
		sqlite3_result_int (pContext, row->RouteNum);
	    }
	  if (column == 5)
	    {
		/* the RouteRow column */
		sqlite3_result_int (pContext, row->RouteRow);
	    }
	  if (column == 6)
	    {
		/* role of this row */
		role = "Link";
		sqlite3_result_text (pContext, role, strlen (role),
				     SQLITE_TRANSIENT);
	    }
	  if (column == 7)
	    {
		/* the LinkRowId column */
		sqlite3_result_int64 (pContext, row->linkRef->Link->LinkRowid);
	    }
	  if (column == 8)
	    {
		/* the NodeFrom column */
		if (node_code)
		    sqlite3_result_text (pContext,
					 row->linkRef->Link->NodeFrom->Code,
					 strlen (row->linkRef->Link->
						 NodeFrom->Code),
					 SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext,
					  row->linkRef->Link->NodeFrom->Id);
	    }
	  if (column == 9)
	    {
		/* the NodeTo column */
		if (node_code)
		    sqlite3_result_text (pContext,
					 row->linkRef->Link->NodeTo->Code,
					 strlen (row->linkRef->Link->
						 NodeTo->Code), SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext,
					  row->linkRef->Link->NodeTo->Id);
	    }
	  if (column == 10)
	    {
		/* the PointFrom column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 11)
	    {
		/* the PointTo column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 12)
	    {
		/* the Tolerance column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 13)
	    {
		/* the Cost column */
		sqlite3_result_double (pContext, row->linkRef->Link->Cost);
	    }
	  if (column == 14)
	    {
		/* the Geometry column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 15)
	    {
		/* the [optional] Name column */
		if (row->linkRef->Name)
		    sqlite3_result_text (pContext, row->linkRef->Name,
					 strlen (row->linkRef->Name),
					 SQLITE_STATIC);
		else
		    sqlite3_result_null (pContext);
	    }
      }
}

static void
do_point2point_column (virtualroutingCursorPtr cursor, virtualroutingPtr net,
		       sqlite3_context * pContext, int node_code,
		       ResultsetRowPtr row, int column)
{
/* processing a Point2Point solution row */
    const char *algorithm;
    char delimiter[128];
    const char *role;
    Point2PointSolutionPtr p2p = cursor->pVtab->point2PointSolution;
    if (row->linkRef == NULL || row->Point2PointRole == VROUTE_POINT2POINT_START
	|| row->Point2PointRole == VROUTE_POINT2POINT_END)
      {
	  /* special case: this one is the solution summary */
	  if (column == 0)
	    {
		/* the currently used Algorithm always defaults to Dijkstra */
		if (row->linkRef == NULL
		    && row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		  {
		      algorithm = "Dijkstra";
		      sqlite3_result_text (pContext, algorithm,
					   strlen (algorithm),
					   SQLITE_TRANSIENT);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 1)
	    {
		/* the current Request type */
		if (row->linkRef == NULL
		    && row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		  {
		      algorithm = "Point2Point Path";
		      sqlite3_result_text (pContext, algorithm,
					   strlen (algorithm),
					   SQLITE_TRANSIENT);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 2)
	    {
		/* the currently set Options */
		if (row->linkRef == NULL
		    && row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		  {
		      if (net->currentOptions == VROUTE_SHORTEST_PATH_SIMPLE)
			  algorithm = "Simple";
		      else if (net->currentOptions ==
			       VROUTE_SHORTEST_PATH_NO_LINKS)
			  algorithm = "No Links";
		      else if (net->currentOptions ==
			       VROUTE_SHORTEST_PATH_NO_GEOMS)
			  algorithm = "No Geometries";
		      else
			  algorithm = "Full";
		      sqlite3_result_text (pContext, algorithm,
					   strlen (algorithm),
					   SQLITE_TRANSIENT);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 3)
	    {
		/* the currently set delimiter char */
		if (row->linkRef == NULL
		    && row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		  {
		      if (isprint (cursor->pVtab->currentDelimiter))
			  sprintf (delimiter, "%c [dec=%d, hex=%02x]",
				   cursor->pVtab->currentDelimiter,
				   cursor->pVtab->currentDelimiter,
				   cursor->pVtab->currentDelimiter);
		      else
			  sprintf (delimiter, "[dec=%d, hex=%02x]",
				   cursor->pVtab->currentDelimiter,
				   cursor->pVtab->currentDelimiter);
		      sqlite3_result_text (pContext, delimiter,
					   strlen (delimiter),
					   SQLITE_TRANSIENT);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 4)
	    {
		/* the RouteNum column */
		sqlite3_result_int (pContext, row->RouteNum);
	    }
	  if (column == 5)
	    {
		/* the RouteRow column */
		sqlite3_result_int (pContext, row->RouteRow);
	    }
	  if (column == 6)
	    {
		/* role of this row */
		if (row->Point2PointRole == VROUTE_POINT2POINT_INGRESS)
		    role = "Ingress Path";
		else if (row->Point2PointRole == VROUTE_POINT2POINT_START)
		    role = "Partial Link (Start)";
		else if (row->Point2PointRole == VROUTE_POINT2POINT_END)
		    role = "Partial Link (End)";
		else if (row->Point2PointRole == VROUTE_POINT2POINT_EGRESS)
		    role = "Egress Path";
		else
		    role = "Point2Point Solution";
		sqlite3_result_text (pContext, role, strlen (role),
				     SQLITE_TRANSIENT);
	    }
	  if (column == 7)
	    {
		/* the LinkRowId column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_START
		    || row->Point2PointRole == VROUTE_POINT2POINT_END)
		    sqlite3_result_int64 (pContext,
					  row->linkRef->Link->LinkRowid);
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 8)
	    {
		/* the NodeFrom column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_END)
		  {
		      if (node_code)
			  sqlite3_result_text (pContext,
					       row->linkRef->Link->
					       NodeFrom->Code,
					       strlen (row->linkRef->
						       Link->NodeFrom->Code),
					       SQLITE_STATIC);
		      else
			  sqlite3_result_int64 (pContext,
						row->linkRef->Link->
						NodeFrom->Id);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 9)
	    {
		/* the NodeTo column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_START)
		  {
		      if (node_code)
			  sqlite3_result_text (pContext,
					       row->linkRef->Link->NodeTo->Code,
					       strlen (row->linkRef->
						       Link->NodeTo->Code),
					       SQLITE_STATIC);
		      else
			  sqlite3_result_int64 (pContext,
						row->linkRef->Link->NodeTo->Id);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 10)
	    {
		/* the PointFrom column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		  {
		      unsigned char *blob;
		      int blob_size;
		      if (p2p->hasZ)
			  gaiaMakePointZ (p2p->xFrom, p2p->yFrom, p2p->zFrom,
					  p2p->srid, &blob, &blob_size);
		      else
			  gaiaMakePoint (p2p->xFrom, p2p->yFrom, p2p->srid,
					 &blob, &blob_size);
		      sqlite3_result_blob (pContext, blob, blob_size, free);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 11)
	    {
		/* the PointTo column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		  {
		      unsigned char *blob;
		      int blob_size;
		      if (p2p->hasZ)
			  gaiaMakePointZ (p2p->xTo, p2p->yTo, p2p->zTo,
					  p2p->srid, &blob, &blob_size);
		      else
			  gaiaMakePoint (p2p->xTo, p2p->yTo, p2p->srid, &blob,
					 &blob_size);
		      sqlite3_result_blob (pContext, blob, blob_size, free);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 12)
	    {
		/* the Tolerance column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_NONE)
		    sqlite3_result_double (pContext, cursor->pVtab->Tolerance);
		else
		    sqlite3_result_null (pContext);
	    }
	  if (column == 13)
	    {
		/* the Cost column */
		sqlite3_result_double (pContext, row->TotalCost);
	    }
	  if (column == 14)
	    {
		/* the Geometry column */
		if (!(row->Geometry))
		    sqlite3_result_null (pContext);
		else
		  {
		      /* builds the BLOB geometry to be returned */
		      int len;
		      unsigned char *p_result = NULL;
		      gaiaToSpatiaLiteBlobWkb (row->Geometry, &p_result, &len);
		      sqlite3_result_blob (pContext, p_result, len, free);
		  }
	    }
	  if (column == 15)
	    {
		/* the [optional] Name column */
		if (row->Point2PointRole == VROUTE_POINT2POINT_START
		    || row->Point2PointRole == VROUTE_POINT2POINT_END)
		  {
		      if (row->linkRef->Name)
			  sqlite3_result_text (pContext, row->linkRef->Name,
					       strlen (row->linkRef->Name),
					       SQLITE_STATIC);
		      else
			  sqlite3_result_null (pContext);
		  }
		else
		    sqlite3_result_null (pContext);
	    }
      }
    else
      {
	  /* ordinary case: this one is a Link used by the solution */
	  if (column == 0)
	    {
		/* the currently used Algorithm always defaults to NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 1)
	    {
		/* the current Request type always defaults to NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 2)
	    {
		/* the currently set Options always defaults to NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 3)
	    {
		/* the currently set delimiter char always defaults to NULL */
		sqlite3_result_null (pContext);
	    }
	  if (column == 4)
	    {
		/* the RouteNum column */
		sqlite3_result_int (pContext, row->RouteNum);
	    }
	  if (column == 5)
	    {
		/* the RouteRow column */
		sqlite3_result_int (pContext, row->RouteRow);
	    }
	  if (column == 6)
	    {
		/* role of this row */
		role = "Link";
		sqlite3_result_text (pContext, role, strlen (role),
				     SQLITE_TRANSIENT);
	    }
	  if (column == 7)
	    {
		/* the LinkRowId column */
		sqlite3_result_int64 (pContext, row->linkRef->Link->LinkRowid);
	    }
	  if (column == 8)
	    {
		/* the NodeFrom column */
		if (node_code)
		    sqlite3_result_text (pContext,
					 row->linkRef->Link->NodeFrom->Code,
					 strlen (row->linkRef->Link->
						 NodeFrom->Code),
					 SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext,
					  row->linkRef->Link->NodeFrom->Id);
	    }
	  if (column == 9)
	    {
		/* the NodeTo column */
		if (node_code)
		    sqlite3_result_text (pContext,
					 row->linkRef->Link->NodeTo->Code,
					 strlen (row->linkRef->Link->
						 NodeTo->Code), SQLITE_STATIC);
		else
		    sqlite3_result_int64 (pContext,
					  row->linkRef->Link->NodeTo->Id);
	    }
	  if (column == 13)
	    {
		/* the Cost column */
		sqlite3_result_double (pContext, row->linkRef->Link->Cost);
	    }
	  if (column == 14)
	    {
		/* the Geometry column */
		sqlite3_result_null (pContext);
	    }
	  if (column == 15)
	    {
		/* the [optional] Name column */
		if (row->linkRef->Name)
		    sqlite3_result_text (pContext, row->linkRef->Name,
					 strlen (row->linkRef->Name),
					 SQLITE_STATIC);
		else
		    sqlite3_result_null (pContext);
	    }
      }
}

static int
vroute_column (sqlite3_vtab_cursor * pCursor, sqlite3_context * pContext,
	       int column)
{
/* fetching value for the Nth column */
    ResultsetRowPtr row;
    RowNodeSolutionPtr row_node;
    int node_code = 0;
    virtualroutingCursorPtr cursor = (virtualroutingCursorPtr) pCursor;
    virtualroutingPtr net = (virtualroutingPtr) cursor->pVtab;
    node_code = net->graph->NodeCode;
    if (cursor->pVtab->multiSolution->Mode == VROUTE_RANGE_SOLUTION)
      {
	  /* processing "within Cost range" solution */
	  row_node = cursor->pVtab->multiSolution->CurrentNodeRow;
	  do_cost_range_column (cursor, pContext, node_code, row_node, column);
	  return SQLITE_OK;
      }
    else if (cursor->pVtab->multiSolution->Mode == VROUTE_ROUTING_SOLUTION
	     || cursor->pVtab->multiSolution->Mode == VROUTE_TSP_SOLUTION)
      {
	  /* processing an ordinary Routing (Shortest Path or TSP) solution */
	  row = cursor->pVtab->multiSolution->CurrentRow;
	  do_common_column (cursor, net, pContext, node_code, row, column);
	  return SQLITE_OK;
      }

    if (cursor->pVtab->point2PointSolution != NULL)
      {
	  if (cursor->pVtab->point2PointSolution->Mode ==
	      VROUTE_POINT2POINT_SOLUTION)
	    {
		/* processing a Point2Point solution */
		row = cursor->pVtab->point2PointSolution->CurrentRow;
		do_point2point_column (cursor, net, pContext, node_code, row,
				       column);
		return SQLITE_OK;
	    }
      }
    return SQLITE_OK;
}

static int
vroute_rowid (sqlite3_vtab_cursor * pCursor, sqlite_int64 * pRowid)
{
/* fetching the ROWID */
    virtualroutingCursorPtr cursor = (virtualroutingCursorPtr) pCursor;
    *pRowid = cursor->pVtab->multiSolution->CurrentRowId;
    return SQLITE_OK;
}

static int
vroute_update (sqlite3_vtab * pVTab, int argc, sqlite3_value ** argv,
	       sqlite_int64 * pRowid)
{
/* generic update [INSERT / UPDATE / DELETE */
    virtualroutingPtr p_vtab = (virtualroutingPtr) pVTab;
    if (pRowid)
	pRowid = pRowid;	/* unused arg warning suppression */
    if (argc == 1)
      {
	  /* performing a DELETE is forbidden */
	  return SQLITE_READONLY;
      }
    else
      {
	  if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	    {
		/* performing an INSERT is forbidden */
		return SQLITE_READONLY;
	    }
	  else
	    {
		/* performing an UPDATE */
		if (argc == 18)
		  {
		      p_vtab->currentAlgorithm = VROUTE_DIJKSTRA_ALGORITHM;
		      p_vtab->currentDelimiter = ',';
		      if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
			{
			    const unsigned char *algorithm =
				sqlite3_value_text (argv[2]);
			    if (strcasecmp ((char *) algorithm, "A*") == 0)
				p_vtab->currentAlgorithm =
				    VROUTE_A_STAR_ALGORITHM;
			}
		      if (p_vtab->graph->AStar == 0)
			  p_vtab->currentAlgorithm = VROUTE_DIJKSTRA_ALGORITHM;
		      if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
			{
			    const unsigned char *request =
				sqlite3_value_text (argv[3]);
			    if (strcasecmp ((char *) request, "TSP") == 0)
				p_vtab->currentRequest = VROUTE_TSP_NN;
			    else if (strcasecmp ((char *) request, "TSP NN") ==
				     0)
				p_vtab->currentRequest = VROUTE_TSP_NN;
			    else if (strcasecmp ((char *) request, "TSP GA") ==
				     0)
				p_vtab->currentRequest = VROUTE_TSP_GA;
			    else if (strcasecmp
				     ((char *) request, "SHORTEST PATH") == 0)
				p_vtab->currentRequest = VROUTE_SHORTEST_PATH;
			}
		      if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
			{
			    const unsigned char *options =
				sqlite3_value_text (argv[4]);
			    if (strcasecmp ((char *) options, "NO LINKS") == 0)
				p_vtab->currentOptions =
				    VROUTE_SHORTEST_PATH_NO_LINKS;
			    else if (strcasecmp
				     ((char *) options, "NO GEOMETRIES") == 0)
				p_vtab->currentOptions =
				    VROUTE_SHORTEST_PATH_NO_GEOMS;
			    else if (strcasecmp ((char *) options, "SIMPLE") ==
				     0)
				p_vtab->currentOptions =
				    VROUTE_SHORTEST_PATH_SIMPLE;
			    else if (strcasecmp ((char *) options, "FULL") == 0)
				p_vtab->currentOptions =
				    VROUTE_SHORTEST_PATH_FULL;
			}
		      if (sqlite3_value_type (argv[5]) == SQLITE_TEXT)
			{
			    const unsigned char *delimiter =
				sqlite3_value_text (argv[5]);
			    p_vtab->currentDelimiter = *delimiter;
			}
		      if (sqlite3_value_type (argv[14]) == SQLITE_FLOAT)
			  p_vtab->Tolerance = sqlite3_value_double (argv[14]);
		  }
		return SQLITE_OK;
	    }
      }
}

static int
vroute_begin (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vroute_sync (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vroute_commit (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vroute_rollback (sqlite3_vtab * pVTab)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    return SQLITE_OK;
}

static int
vroute_rename (sqlite3_vtab * pVTab, const char *zNew)
{
/* BEGIN TRANSACTION */
    if (pVTab)
	pVTab = pVTab;		/* unused arg warning suppression */
    if (zNew)
	zNew = zNew;		/* unused arg warning suppression */
    return SQLITE_ERROR;
}

static int
splitevirtualroutingInit (sqlite3 * db)
{
    int rc = SQLITE_OK;
    my_route_module.iVersion = 1;
    my_route_module.xCreate = &vroute_create;
    my_route_module.xConnect = &vroute_connect;
    my_route_module.xBestIndex = &vroute_best_index;
    my_route_module.xDisconnect = &vroute_disconnect;
    my_route_module.xDestroy = &vroute_destroy;
    my_route_module.xOpen = &vroute_open;
    my_route_module.xClose = &vroute_close;
    my_route_module.xFilter = &vroute_filter;
    my_route_module.xNext = &vroute_next;
    my_route_module.xEof = &vroute_eof;
    my_route_module.xColumn = &vroute_column;
    my_route_module.xRowid = &vroute_rowid;
    my_route_module.xUpdate = &vroute_update;
    my_route_module.xBegin = &vroute_begin;
    my_route_module.xSync = &vroute_sync;
    my_route_module.xCommit = &vroute_commit;
    my_route_module.xRollback = &vroute_rollback;
    my_route_module.xFindFunction = NULL;
    my_route_module.xRename = &vroute_rename;
    sqlite3_create_module_v2 (db, "virtualrouting", &my_route_module, NULL, 0);
    return rc;
}

SPATIALITE_PRIVATE int
virtualrouting_extension_init (void *xdb)
{
    sqlite3 *db = (sqlite3 *) xdb;
    return splitevirtualroutingInit (db);
}

#endif /* end GEOS conditional */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/spatialite/virtualshape.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
...
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
...
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

357
358
359
360
361
362
363
...
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
...
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
...
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
...
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
...
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
....
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
/*

 virtualshape.c -- SQLite3 extension [VIRTUAL TABLE accessing Shapefile]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 
*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

................................................................................
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */
    gaiaShapefilePtr Shp;	/* the Shapefile struct */
    int Srid;			/* the Shapefile SRID */
    int text_dates;
    char *TableName;		/* the VirtualTable name */
    double MinX;		/* the Shapefile Full Extent */
    double MinY;
    double MaxX;
    double MaxY;
} VirtualShape;
typedef VirtualShape *VirtualShapePtr;

typedef struct VirtualShapeConstraintStruct
{
/* a constraint to be verified for xFilter */
    int iColumn;		/* Column on left-hand side of constraint */
................................................................................
      {
	  *geotype = 0;
	  return 1;
      }
    return 0;
}

static char *
convert_dbf_colname_case (const char *buf, int colname_case)
{
/* converts a DBF column-name to Lower- or Upper-case */
    int len = strlen (buf);
    char *clean = malloc (len + 1);
    char *p = clean;
    strcpy (clean, buf);
    while (*p != '\0')
      {
	  if (colname_case == GAIA_DBF_COLNAME_LOWERCASE)
	    {
		if (*p >= 'A' && *p <= 'Z')
		    *p = *p - 'A' + 'a';
	    }
	  if (colname_case == GAIA_DBF_COLNAME_UPPERCASE)
	    {
		if (*p >= 'a' && *p <= 'z')
		    *p = *p - 'a' + 'A';
	    }
	  p++;
      }
    return clean;
}

static int
vshp_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some shapefile */
    char *sql;
    VirtualShapePtr p_vt;
    char path[2048];
    char encoding[128];
    const char *pEncoding = NULL;
    char ColnameCase[128];
    const char *pColnameCase;
    int len;
    const char *pPath = NULL;
    int srid;
    gaiaDbfFieldPtr pFld;
    int cnt;
    int col_cnt;
    int seed;
    int dup;
    int idup;
    int text_dates = 0;
    int colname_case = GAIA_DBF_COLNAME_LOWERCASE;
    char *xname;
    char **col_name = NULL;
    int geotype;
    gaiaOutBuffer sql_statement;
    int ret;
    sqlite3_stmt *stmt = NULL;
    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
/* checking for shapefile PATH */
    if (argc == 6 || argc == 7 || argc == 8)
      {
	  pPath = argv[3];
	  len = strlen (pPath);
	  if ((*(pPath + 0) == '\'' || *(pPath + 0) == '"')
	      && (*(pPath + len - 1) == '\'' || *(pPath + len - 1) == '"'))
	    {
		/* the path is enclosed between quotes - we need to dequote it */
................................................................................
		*(encoding + len - 1) = '\0';
	    }
	  else
	      strcpy (encoding, pEncoding);
	  srid = atoi (argv[5]);
	  if (srid < 0)
	      srid = -1;
	  if (argc >= 7)
	      text_dates = atoi (argv[6]);
	  if (argc >= 8)
	    {
		pColnameCase = argv[7];
		len = strlen (pColnameCase);
		if ((*(pColnameCase + 0) == '\'' || *(pColnameCase + 0) == '"')
		    && (*(pColnameCase + len - 1) == '\''
			|| *(pColnameCase + len - 1) == '"'))
		  {
		      /* the charset-name is enclosed between quotes - we need to dequote it */
		      strcpy (ColnameCase, pColnameCase + 1);
		      len = strlen (ColnameCase);
		      *(ColnameCase + len - 1) = '\0';
		  }
		else
		    strcpy (ColnameCase, pColnameCase);
		if (strcasecmp (ColnameCase, "uppercase") == 0
		    || strcasecmp (ColnameCase, "upper") == 0)
		    colname_case = GAIA_DBF_COLNAME_UPPERCASE;
		else if (strcasecmp (ColnameCase, "samecase") == 0
			 || strcasecmp (ColnameCase, "same") == 0)
		    colname_case = GAIA_DBF_COLNAME_CASE_IGNORE;
		else
		    colname_case = GAIA_DBF_COLNAME_LOWERCASE;
	    }
      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualShape module] CREATE VIRTUAL: illegal arg list {shp_path, encoding, srid [ , text_dates [ , colname_case ]] }");
	  return SQLITE_ERROR;
      }
    p_vt = (VirtualShapePtr) sqlite3_malloc (sizeof (VirtualShape));
    if (!p_vt)
	return SQLITE_NOMEM;
    p_vt->pModule = &my_shape_module;
    p_vt->nRef = 0;
    p_vt->zErrMsg = NULL;
    p_vt->db = db;
    p_vt->Shp = gaiaAllocShapefile ();
    p_vt->Srid = srid;
    len = strlen (argv[2]);
    p_vt->TableName = malloc (len + 1);
    strcpy (p_vt->TableName, argv[2]);
    p_vt->MinX = DBL_MAX;
    p_vt->MinY = DBL_MAX;
    p_vt->MaxX = -DBL_MAX;
    p_vt->MaxY = -DBL_MAX;
    p_vt->text_dates = text_dates;
/* trying to open files etc in order to ensure we actually have a genuine shapefile */
    gaiaOpenShpRead (p_vt->Shp, path, encoding, "UTF-8");
    if (!(p_vt->Shp->Valid))
      {
	  /* something is going the wrong way; creating a stupid default table */
	  xname = gaiaDoubleQuotedSql ((const char *) argv[2]);
................................................................................
    if (p_vt->Shp->Shape == 3 || p_vt->Shp->Shape == 13 ||
	p_vt->Shp->Shape == 23 || p_vt->Shp->Shape == 5 ||
	p_vt->Shp->Shape == 15 || p_vt->Shp->Shape == 25)
      {
	  /* fixing anyway the Geometry type for LINESTRING/MULTILINESTRING or POLYGON/MULTIPOLYGON */
	  gaiaShpAnalyze (p_vt->Shp);
      }
    p_vt->MinX = p_vt->Shp->MinX;
    p_vt->MinY = p_vt->Shp->MinY;
    p_vt->MaxX = p_vt->Shp->MaxX;
    p_vt->MaxY = p_vt->Shp->MaxY;
/* preparing the COLUMNs for this VIRTUAL TABLE */
    gaiaOutBufferInitialize (&sql_statement);
    xname = gaiaDoubleQuotedSql (argv[2]);
    if (colname_case == GAIA_DBF_COLNAME_LOWERCASE)
	sql =
	    sqlite3_mprintf
	    ("CREATE TABLE \"%s\" (pkuid INTEGER, geometry BLOB", xname);
    else if (colname_case == GAIA_DBF_COLNAME_UPPERCASE)
	sql =
	    sqlite3_mprintf
	    ("CREATE TABLE \"%s\" (PKUID INTEGER, GEOMETRY BLOB", xname);
    else
	sql =
	    sqlite3_mprintf
	    ("CREATE TABLE \"%s\" (PKUID INTEGER, Geometry BLOB", xname);

    free (xname);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
/* checking for duplicate / illegal column names and antialising them */
    col_cnt = 0;
    pFld = p_vt->Shp->Dbf->First;
    while (pFld)
................................................................................
      }
    col_name = malloc (sizeof (char *) * col_cnt);
    cnt = 0;
    seed = 0;
    pFld = p_vt->Shp->Dbf->First;
    while (pFld)
      {
	  char *casename = convert_dbf_colname_case (pFld->Name, colname_case);
	  xname = gaiaDoubleQuotedSql (casename);
	  free (casename);
	  dup = 0;
	  for (idup = 0; idup < cnt; idup++)
	    {
		if (strcasecmp (xname, *(col_name + idup)) == 0)
		    dup = 1;
	    }
	  if (strcasecmp (xname, "\"PKUID\"") == 0)
................................................................................
	      dup = 1;
	  if (strcasecmp (xname, "\"Geometry\"") == 0)
	      dup = 1;
	  if (dup)
	    {
		free (xname);
		sql = sqlite3_mprintf ("COL_%d", seed++);
		casename = convert_dbf_colname_case (sql, colname_case);
		xname = gaiaDoubleQuotedSql (sql);
		free (casename);
		sqlite3_free (sql);
	    }
	  if (pFld->Type == 'N')
	    {
		if (pFld->Decimals > 0 || pFld->Length > 18)
		    sql = sqlite3_mprintf (", \"%s\" DOUBLE", xname);
		else
................................................................................
	  sql = sqlite3_mprintf ("INSERT OR IGNORE INTO "
				 "virts_geometry_columns_statistics (virt_name, virt_geometry) "
				 "VALUES (Lower(%Q), 'geometry')", argv[2]);
	  sqlite3_exec (db, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);
      }

/* inserting into the connection cache: SHP Extent */
    sql = "SELECT \"*Add-Shapefile+Extent\"(?, ?, ?, ?, ?, ?)";
    ret = sqlite3_prepare_v2 (db, sql, strlen (sql), &stmt, NULL);
    if (ret == SQLITE_OK)
      {
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, argv[2], strlen (argv[2]), SQLITE_STATIC);
	  sqlite3_bind_double (stmt, 2, p_vt->MinX);
	  sqlite3_bind_double (stmt, 3, p_vt->MinY);
	  sqlite3_bind_double (stmt, 4, p_vt->MaxX);
	  sqlite3_bind_double (stmt, 5, p_vt->MaxY);
	  sqlite3_bind_int (stmt, 6, p_vt->Srid);
	  ret = sqlite3_step (stmt);
      }
    sqlite3_finalize (stmt);

    return SQLITE_OK;
}

static int
vshp_connect (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	      sqlite3_vtab ** ppVTab, char **pzErr)
{
................................................................................
    return SQLITE_OK;
}

static int
vshp_disconnect (sqlite3_vtab * pVTab)
{
/* disconnects the virtual table */
    int ret;
    sqlite3_stmt *stmt;
    const char *sql;
    VirtualShapePtr p_vt = (VirtualShapePtr) pVTab;
    if (p_vt->Shp)
	gaiaFreeShapefile (p_vt->Shp);

/* removing from the connection cache: SHP Extent */
    sql = "SELECT \"*Remove-Shapefile+Extent\"(?)";
    ret = sqlite3_prepare_v2 (p_vt->db, sql, strlen (sql), &stmt, NULL);
    if (ret == SQLITE_OK)
      {
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, p_vt->TableName, strlen (p_vt->TableName),
			     SQLITE_STATIC);
	  ret = sqlite3_step (stmt);
      }
    sqlite3_finalize (stmt);

    if (p_vt->TableName != NULL)
	free (p_vt->TableName);
    sqlite3_free (p_vt);

    return SQLITE_OK;
}

static int
vshp_destroy (sqlite3_vtab * pVTab)
{
/* destroys the virtual table - simply aliases vshp_disconnect() */
................................................................................
	  return;
      }
    if (cursor->blobGeometry)
      {
	  free (cursor->blobGeometry);
	  cursor->blobGeometry = NULL;
      }
    while (1)
      {
	  ret =
	      gaiaReadShpEntity_ex (cursor->pVtab->Shp, cursor->current_row,
				    cursor->pVtab->Srid,
				    cursor->pVtab->text_dates);
	  if (ret < 0)
	    {
		/* skkipping a DBF deleted Row */
		cursor->current_row += 1;
		continue;
	    }
	  break;
      }
    if (!ret)
      {
	  if (!(cursor->pVtab->Shp->LastError))	/* normal SHP EOF */
	    {
		cursor->eof = 1;
		return;
	    }
................................................................................
					      if (ret < 0)
						  ok = 1;
					      break;
					  case SQLITE_INDEX_CONSTRAINT_GE:
					      if (ret >= 0)
						  ok = 1;
					      break;
#ifdef HAVE_DECL_SQLITE_INDEX_CONSTRAINT_LIKE
					  case SQLITE_INDEX_CONSTRAINT_LIKE:
					      if (ret >= 0)
						  ok = 1;
					      break;
#endif
					  };
				    }
				  break;
			      };
			}
		      goto done;
		  }




|







 







|







 







<







 







<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










<
<










<




<
<



|







 







|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|











<
<
<
<
<
<
<







 







<
<
<
<



<
|
<
<
<
<
<
<
<
<
<
|
>







 







<
|
<







 







<

<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<







 







<
<
|
|
<
|
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
43
44
45
46
47
48
49

50
51
52
53
54
55
56
..
76
77
78
79
80
81
82





83
84
85
86
87
88
89
...
158
159
160
161
162
163
164

























165
166
167
168
169
170
171
172
173
174


175
176
177
178
179
180
181
182
183
184

185
186
187
188


189
190
191
192
193
194
195
196
197
198
199
...
215
216
217
218
219
220
221
222
223
























224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240







241
242
243
244
245
246
247
...
264
265
266
267
268
269
270




271
272
273

274









275
276
277
278
279
280
281
282
283
...
288
289
290
291
292
293
294

295

296
297
298
299
300
301
302
...
303
304
305
306
307
308
309

310

311
312
313
314
315
316
317
...
552
553
554
555
556
557
558

















559
560
561
562
563
564
565
...
601
602
603
604
605
606
607



608
609
610
















611

612
613
614
615
616
617
618
...
631
632
633
634
635
636
637


638
639

640








641
642
643
644
645
646
647
...
932
933
934
935
936
937
938






939
940
941
942
943
944
945
/*

 virtualshape.c -- SQLite3 extension [VIRTUAL TABLE accessing Shapefile]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
 
*/

#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>


#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

................................................................................
    const sqlite3_module *pModule;	/* ptr to sqlite module: USED INTERNALLY BY SQLITE */
    int nRef;			/* # references: USED INTERNALLY BY SQLITE */
    char *zErrMsg;		/* error message: USE INTERNALLY BY SQLITE */
    sqlite3 *db;		/* the sqlite db holding the virtual table */
    gaiaShapefilePtr Shp;	/* the Shapefile struct */
    int Srid;			/* the Shapefile SRID */
    int text_dates;





} VirtualShape;
typedef VirtualShape *VirtualShapePtr;

typedef struct VirtualShapeConstraintStruct
{
/* a constraint to be verified for xFilter */
    int iColumn;		/* Column on left-hand side of constraint */
................................................................................
      {
	  *geotype = 0;
	  return 1;
      }
    return 0;
}


























static int
vshp_create (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	     sqlite3_vtab ** ppVTab, char **pzErr)
{
/* creates the virtual table connected to some shapefile */
    char *sql;
    VirtualShapePtr p_vt;
    char path[2048];
    char encoding[128];
    const char *pEncoding = NULL;


    int len;
    const char *pPath = NULL;
    int srid;
    gaiaDbfFieldPtr pFld;
    int cnt;
    int col_cnt;
    int seed;
    int dup;
    int idup;
    int text_dates = 0;

    char *xname;
    char **col_name = NULL;
    int geotype;
    gaiaOutBuffer sql_statement;


    if (pAux)
	pAux = pAux;		/* unused arg warning suppression */
/* checking for shapefile PATH */
    if (argc == 6 || argc == 7)
      {
	  pPath = argv[3];
	  len = strlen (pPath);
	  if ((*(pPath + 0) == '\'' || *(pPath + 0) == '"')
	      && (*(pPath + len - 1) == '\'' || *(pPath + len - 1) == '"'))
	    {
		/* the path is enclosed between quotes - we need to dequote it */
................................................................................
		*(encoding + len - 1) = '\0';
	    }
	  else
	      strcpy (encoding, pEncoding);
	  srid = atoi (argv[5]);
	  if (srid < 0)
	      srid = -1;
	  if (argc == 7)
	      text_dates = atoi (argv[6]);
























      }
    else
      {
	  *pzErr =
	      sqlite3_mprintf
	      ("[VirtualShape module] CREATE VIRTUAL: illegal arg list {shp_path, encoding, srid}");
	  return SQLITE_ERROR;
      }
    p_vt = (VirtualShapePtr) sqlite3_malloc (sizeof (VirtualShape));
    if (!p_vt)
	return SQLITE_NOMEM;
    p_vt->pModule = &my_shape_module;
    p_vt->nRef = 0;
    p_vt->zErrMsg = NULL;
    p_vt->db = db;
    p_vt->Shp = gaiaAllocShapefile ();
    p_vt->Srid = srid;







    p_vt->text_dates = text_dates;
/* trying to open files etc in order to ensure we actually have a genuine shapefile */
    gaiaOpenShpRead (p_vt->Shp, path, encoding, "UTF-8");
    if (!(p_vt->Shp->Valid))
      {
	  /* something is going the wrong way; creating a stupid default table */
	  xname = gaiaDoubleQuotedSql ((const char *) argv[2]);
................................................................................
    if (p_vt->Shp->Shape == 3 || p_vt->Shp->Shape == 13 ||
	p_vt->Shp->Shape == 23 || p_vt->Shp->Shape == 5 ||
	p_vt->Shp->Shape == 15 || p_vt->Shp->Shape == 25)
      {
	  /* fixing anyway the Geometry type for LINESTRING/MULTILINESTRING or POLYGON/MULTIPOLYGON */
	  gaiaShpAnalyze (p_vt->Shp);
      }




/* preparing the COLUMNs for this VIRTUAL TABLE */
    gaiaOutBufferInitialize (&sql_statement);
    xname = gaiaDoubleQuotedSql (argv[2]);

    sql =









	sqlite3_mprintf ("CREATE TABLE \"%s\" (PKUID INTEGER, Geometry BLOB",
			 xname);
    free (xname);
    gaiaAppendToOutBuffer (&sql_statement, sql);
    sqlite3_free (sql);
/* checking for duplicate / illegal column names and antialising them */
    col_cnt = 0;
    pFld = p_vt->Shp->Dbf->First;
    while (pFld)
................................................................................
      }
    col_name = malloc (sizeof (char *) * col_cnt);
    cnt = 0;
    seed = 0;
    pFld = p_vt->Shp->Dbf->First;
    while (pFld)
      {

	  xname = gaiaDoubleQuotedSql (pFld->Name);

	  dup = 0;
	  for (idup = 0; idup < cnt; idup++)
	    {
		if (strcasecmp (xname, *(col_name + idup)) == 0)
		    dup = 1;
	    }
	  if (strcasecmp (xname, "\"PKUID\"") == 0)
................................................................................
	      dup = 1;
	  if (strcasecmp (xname, "\"Geometry\"") == 0)
	      dup = 1;
	  if (dup)
	    {
		free (xname);
		sql = sqlite3_mprintf ("COL_%d", seed++);

		xname = gaiaDoubleQuotedSql (sql);

		sqlite3_free (sql);
	    }
	  if (pFld->Type == 'N')
	    {
		if (pFld->Decimals > 0 || pFld->Length > 18)
		    sql = sqlite3_mprintf (", \"%s\" DOUBLE", xname);
		else
................................................................................
	  sql = sqlite3_mprintf ("INSERT OR IGNORE INTO "
				 "virts_geometry_columns_statistics (virt_name, virt_geometry) "
				 "VALUES (Lower(%Q), 'geometry')", argv[2]);
	  sqlite3_exec (db, sql, NULL, NULL, NULL);
	  sqlite3_free (sql);
      }


















    return SQLITE_OK;
}

static int
vshp_connect (sqlite3 * db, void *pAux, int argc, const char *const *argv,
	      sqlite3_vtab ** ppVTab, char **pzErr)
{
................................................................................
    return SQLITE_OK;
}

static int
vshp_disconnect (sqlite3_vtab * pVTab)
{
/* disconnects the virtual table */



    VirtualShapePtr p_vt = (VirtualShapePtr) pVTab;
    if (p_vt->Shp)
	gaiaFreeShapefile (p_vt->Shp);
















    sqlite3_free (p_vt);

    return SQLITE_OK;
}

static int
vshp_destroy (sqlite3_vtab * pVTab)
{
/* destroys the virtual table - simply aliases vshp_disconnect() */
................................................................................
	  return;
      }
    if (cursor->blobGeometry)
      {
	  free (cursor->blobGeometry);
	  cursor->blobGeometry = NULL;
      }


    ret =
	gaiaReadShpEntity_ex (cursor->pVtab->Shp, cursor->current_row,

			      cursor->pVtab->Srid, cursor->pVtab->text_dates);








    if (!ret)
      {
	  if (!(cursor->pVtab->Shp->LastError))	/* normal SHP EOF */
	    {
		cursor->eof = 1;
		return;
	    }
................................................................................
					      if (ret < 0)
						  ok = 1;
					      break;
					  case SQLITE_INDEX_CONSTRAINT_GE:
					      if (ret >= 0)
						  ok = 1;
					      break;






					  };
				    }
				  break;
			      };
			}
		      goto done;
		  }

Changes to src/spatialite/virtualspatialindex.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
...
168
169
170
171
172
173
174
175
176
177

178
179
180
181
182
183
184
185
186
187
188
189
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
...
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
...
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
...
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
...
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
...
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
/*

 virtualspatialindex.c -- SQLite3 extension [VIRTUAL TABLE RTree metahandler]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    VirtualSpatialIndexPtr pVtab;	/* Virtual table of this cursor */
    int eof;			/* the EOF marker */
    sqlite3_stmt *stmt;
    sqlite3_int64 CurrentRowId;
} VirtualSpatialIndexCursor;
typedef VirtualSpatialIndexCursor *VirtualSpatialIndexCursorPtr;

static int
vspidx_validate_view_rowid (void *p_sqlite, const char *table,
			    const char *column)
{
/* checks if a table does really contains a given column */
    sqlite3 *sqlite = (sqlite3 *) p_sqlite;
    int rowid = 0;
    char *sql;
    int ret;
    const char *name;
    int i;
    char **results;
    int rows;
    int columns;
    char *quoted_table = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA table_info(\"%s\")", quoted_table);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    free (quoted_table);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcasecmp (name, column) == 0)
		    rowid = 1;
	    }
      }
    sqlite3_free_table (results);
    if (rowid == 0)
	return 0;
    return 1;
}

static int
vspidx_check_view_rtree (sqlite3 * sqlite, const char *table_name,
			 const char *geom_column, char **real_table,
			 char **real_geom)
{
/* checks if the required RTree is actually defined - SpatialView */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;
    char *rowid = NULL;

/* testing if views_geometry_columns exists */
    sql_statement = sqlite3_mprintf ("SELECT tbl_name FROM sqlite_master "
				     "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'");
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
................................................................................
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    count = 0;

/* attempting to find the RTree Geometry Column */
    sql_statement =
	sqlite3_mprintf
	("SELECT a.f_table_name, a.f_geometry_column, a.view_rowid "
	 "FROM views_geometry_columns AS a " "JOIN geometry_columns AS b ON ("

	 "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
	 "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
	 "WHERE Upper(a.view_name) = Upper(%Q) "
	 "AND Upper(a.view_geometry) = Upper(%Q) AND b.spatial_index_enabled = 1",
	 table_name, geom_column);
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
................................................................................
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);
		v = (const char *) sqlite3_column_text (stmt, 2);
		len = sqlite3_column_bytes (stmt, 2);
		if (rowid)
		    free (rowid);
		rowid = malloc (len + 1);
		strcpy (rowid, v);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    if (!vspidx_validate_view_rowid (sqlite, table_name, rowid))
      {
	  free (rt);
	  free (rg);
	  free (rowid);
	  return 0;
      }
    free (rowid);
    *real_table = rt;
    *real_geom = rg;
    return 1;
}

static int
vspidx_check_rtree (sqlite3 * sqlite, const char *db_prefix,
................................................................................
		rg = malloc (len + 1);
		strcpy (rg, v);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
      {
	  if (rg != NULL)
	      free (rg);
	  if (rt != NULL)
	      free (rt);
	  return vspidx_check_view_rtree (sqlite, table_name, geom_column,
					  real_table, real_geom);
      }
    else
      {
	  *real_table = rt;
	  *real_geom = rg;
      }
    return 1;
}
................................................................................
/* attempts to find the corresponding RTree Geometry Column - SpatialView */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;
    char *rowid = NULL;

/* testing if views_geometry_columns exists */
    if (db_prefix == NULL)
      {
	  sql_statement = sqlite3_mprintf ("SELECT tbl_name FROM sqlite_master "
					   "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'");
      }
................................................................................
	return 0;
    count = 0;

/* attempting to find the RTree Geometry Column */
    if (db_prefix == NULL)
      {
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT a.f_table_name, a.f_geometry_column, a.view_rowid "
	       "FROM views_geometry_columns AS a "
	       "JOIN geometry_columns AS b ON ("
	       "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
	       "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
	       "WHERE Upper(a.view_name) = Upper(%Q) AND b.spatial_index_enabled = 1",
	       table_name);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =
	      sqlite3_mprintf
	      ("SELECT a.f_table_name, a.f_geometry_column, a.view_rowid "
	       "FROM \"%s\".views_geometry_columns AS a "
	       "JOIN \"%s\".geometry_columns AS b ON ("
	       "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
	       "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
	       "WHERE Upper(a.view_name) = Upper(%Q) AND b.spatial_index_enabled = 1",
	       quoted_db, quoted_db, table_name);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
................................................................................
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);
		v = (const char *) sqlite3_column_text (stmt, 2);
		len = sqlite3_column_bytes (stmt, 2);
		if (rowid)
		    free (rowid);
		rowid = malloc (len + 1);
		strcpy (rowid, v);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    if (!vspidx_validate_view_rowid (sqlite, table_name, rowid))
      {
	  free (rt);
	  free (rg);
	  free (rowid);
	  return 0;
      }
    free (rowid);
    *real_table = rt;
    *real_geom = rg;
    return 1;
}

static int
vspidx_find_rtree (sqlite3 * sqlite, const char *db_prefix,
................................................................................
		rg = malloc (len + 1);
		strcpy (rg, v);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
      {
	  if (rg != NULL)
	      free (rg);
	  if (rt != NULL)
	      free (rt);
	  return vspidx_find_view_rtree (sqlite, db_prefix, table_name,
					 real_table, real_geom);
      }
    else
      {
	  *real_table = rt;
	  *real_geom = rg;
      }
    return 1;
}
................................................................................
static int
vspidx_filter (sqlite3_vtab_cursor * pCursor, int idxNum, const char *idxStr,
	       int argc, sqlite3_value ** argv)
{
/* setting up a cursor filter */
    char *db_prefix = NULL;
    char *table_name = NULL;
    char *geom_column = NULL;
    char *xtable = NULL;
    char *xgeom = NULL;
    char *idx_name;
    char *idx_nameQ;
    char *sql_statement;
    gaiaGeomCollPtr geom = NULL;
    int ok_table = 0;




|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












<







 







<
|
|
>
|
|
|
|
|







 







<
<
<
<
<
<






|



<


<







 







<
<
<
<
<
|
|
<







 







<







 







<
|
|
|
|
|
|
|





<
|
|
|
|
|
|
|







 







<
<
<
<
<
<






<
<
<
<
<
<
<
<







 







<
<
<
<
<
|
|
<







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
91
92
93
94
95
96
97






































98
99
100
101
102
103
104
105
106
107
108
109

110
111
112
113
114
115
116
...
129
130
131
132
133
134
135

136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
...
163
164
165
166
167
168
169






170
171
172
173
174
175
176
177
178
179

180
181

182
183
184
185
186
187
188
...
244
245
246
247
248
249
250





251
252

253
254
255
256
257
258
259
...
266
267
268
269
270
271
272

273
274
275
276
277
278
279
...
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324

325
326
327
328
329
330
331
332
333
334
335
336
337
338
...
353
354
355
356
357
358
359






360
361
362
363
364
365








366
367
368
369
370
371
372
...
425
426
427
428
429
430
431





432
433

434
435
436
437
438
439
440
...
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
/*

 virtualspatialindex.c -- SQLite3 extension [VIRTUAL TABLE RTree metahandler]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    VirtualSpatialIndexPtr pVtab;	/* Virtual table of this cursor */
    int eof;			/* the EOF marker */
    sqlite3_stmt *stmt;
    sqlite3_int64 CurrentRowId;
} VirtualSpatialIndexCursor;
typedef VirtualSpatialIndexCursor *VirtualSpatialIndexCursorPtr;







































static int
vspidx_check_view_rtree (sqlite3 * sqlite, const char *table_name,
			 const char *geom_column, char **real_table,
			 char **real_geom)
{
/* checks if the required RTree is actually defined - SpatialView */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;


/* testing if views_geometry_columns exists */
    sql_statement = sqlite3_mprintf ("SELECT tbl_name FROM sqlite_master "
				     "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'");
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
................................................................................
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    count = 0;

/* attempting to find the RTree Geometry Column */
    sql_statement =

	sqlite3_mprintf ("SELECT a.f_table_name, a.f_geometry_column "
			 "FROM views_geometry_columns AS a "
			 "JOIN geometry_columns AS b ON ("
			 "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
			 "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
			 "WHERE Upper(a.view_name) = Upper(%Q) "
			 "AND Upper(a.view_geometry) = Upper(%Q) AND b.spatial_index_enabled = 1",
			 table_name, geom_column);
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
	return 0;
    while (1)
................................................................................
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);






		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;
    if (!validateRowid (sqlite, table_name))
      {
	  free (rt);
	  free (rg);

	  return 0;
      }

    *real_table = rt;
    *real_geom = rg;
    return 1;
}

static int
vspidx_check_rtree (sqlite3 * sqlite, const char *db_prefix,
................................................................................
		rg = malloc (len + 1);
		strcpy (rg, v);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)





	return vspidx_check_view_rtree (sqlite, table_name, geom_column,
					real_table, real_geom);

    else
      {
	  *real_table = rt;
	  *real_geom = rg;
      }
    return 1;
}
................................................................................
/* attempts to find the corresponding RTree Geometry Column - SpatialView */
    sqlite3_stmt *stmt;
    char *sql_statement;
    int ret;
    int count = 0;
    char *rt = NULL;
    char *rg = NULL;


/* testing if views_geometry_columns exists */
    if (db_prefix == NULL)
      {
	  sql_statement = sqlite3_mprintf ("SELECT tbl_name FROM sqlite_master "
					   "WHERE type = 'table' AND tbl_name = 'views_geometry_columns'");
      }
................................................................................
	return 0;
    count = 0;

/* attempting to find the RTree Geometry Column */
    if (db_prefix == NULL)
      {
	  sql_statement =

	      sqlite3_mprintf ("SELECT a.f_table_name, a.f_geometry_column "
			       "FROM views_geometry_columns AS a "
			       "JOIN geometry_columns AS b ON ("
			       "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
			       "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
			       "WHERE Upper(a.view_name) = Upper(%Q) AND b.spatial_index_enabled = 1",
			       table_name);
      }
    else
      {
	  char *quoted_db = gaiaDoubleQuotedSql (db_prefix);
	  sql_statement =

	      sqlite3_mprintf ("SELECT a.f_table_name, a.f_geometry_column "
			       "FROM \"%s\".views_geometry_columns AS a "
			       "JOIN \"%s\".geometry_columns AS b ON ("
			       "Upper(a.f_table_name) = Upper(b.f_table_name) AND "
			       "Upper(a.f_geometry_column) = Upper(b.f_geometry_column)) "
			       "WHERE Upper(a.view_name) = Upper(%Q) AND b.spatial_index_enabled = 1",
			       quoted_db, quoted_db, table_name);
	  free (quoted_db);
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql_statement, strlen (sql_statement),
			    &stmt, NULL);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
................................................................................
		strcpy (rt, v);
		v = (const char *) sqlite3_column_text (stmt, 1);
		len = sqlite3_column_bytes (stmt, 1);
		if (rg)
		    free (rg);
		rg = malloc (len + 1);
		strcpy (rg, v);






		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)
	return 0;








    *real_table = rt;
    *real_geom = rg;
    return 1;
}

static int
vspidx_find_rtree (sqlite3 * sqlite, const char *db_prefix,
................................................................................
		rg = malloc (len + 1);
		strcpy (rg, v);
		count++;
	    }
      }
    sqlite3_finalize (stmt);
    if (count != 1)





	return vspidx_find_view_rtree (sqlite, db_prefix, table_name,
				       real_table, real_geom);

    else
      {
	  *real_table = rt;
	  *real_geom = rg;
      }
    return 1;
}
................................................................................
static int
vspidx_filter (sqlite3_vtab_cursor * pCursor, int idxNum, const char *idxStr,
	       int argc, sqlite3_value ** argv)
{
/* setting up a cursor filter */
    char *db_prefix = NULL;
    char *table_name = NULL;
    char *geom_column;
    char *xtable = NULL;
    char *xgeom = NULL;
    char *idx_name;
    char *idx_nameQ;
    char *sql_statement;
    gaiaGeomCollPtr geom = NULL;
    int ok_table = 0;

Changes to src/spatialite/virtualxpath.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
/*

 virtualxpath.c -- SQLite3 extension [VIRTUAL XPath handler]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    p_vt->table = table;
    p_vt->column = column;
    *ppVTab = (sqlite3_vtab *) p_vt;
    free (vtable);
    return SQLITE_OK;
  illegal:
/* something is going the wrong way */
    if (!okTable)
	*pzErr =
	    sqlite3_mprintf
	    ("[VirtualXPath module] table \"%s\" doesn't exists\n", table);
    else if (!okCol)
	*pzErr =
	    sqlite3_mprintf
	    ("[VirtualXPath module] table \"%s\" exists, but has no \"%s\" column\n",




|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
/*

 virtualxpath.c -- SQLite3 extension [VIRTUAL XPath handler]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
    p_vt->table = table;
    p_vt->column = column;
    *ppVTab = (sqlite3_vtab *) p_vt;
    free (vtable);
    return SQLITE_OK;
  illegal:
/* something is going the wrong way */
    if (!okTable == 0)
	*pzErr =
	    sqlite3_mprintf
	    ("[VirtualXPath module] table \"%s\" doesn't exists\n", table);
    else if (!okCol)
	*pzErr =
	    sqlite3_mprintf
	    ("[VirtualXPath module] table \"%s\" exists, but has no \"%s\" column\n",

Changes to src/srsinit/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
..
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

SUBDIRS = epsg_update

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libsrsinit.la srsinit.la

SRSINIT_COMMON_SOURCES = srs_init.c \
	epsg_inlined_00.c \
	epsg_inlined_01.c \
................................................................................
	epsg_inlined_40.c \
	epsg_inlined_41.c \
	epsg_inlined_42.c \
	epsg_inlined_43.c \
	epsg_inlined_44.c \
	epsg_inlined_45.c \
	epsg_inlined_46.c \
	epsg_inlined_47.c \
	epsg_inlined_48.c \
	epsg_inlined_49.c \
	epsg_inlined_50.c \
	epsg_inlined_51.c \
	epsg_inlined_wgs84_00.c \
	epsg_inlined_wgs84_01.c \
	epsg_inlined_prussian.c \
	epsg_inlined_extra.c

libsrsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)

libsrsinit_la_CFLAGS = -fvisibility=hidden

srsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)

srsinit_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
srsinit_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
srsinit_la_CPPFLAGS += -DLOADABLE_EXTENSION
srsinit_la_CPPFLAGS += -fvisibility=hidden
srsinit_la_LDFLAGS = -module
srsinit_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda





|







 







<
<
<
<
<











|









1
2
3
4
5
6
7
8
9
10
11
..
50
51
52
53
54
55
56





57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

SUBDIRS = epsg_update

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libsrsinit.la srsinit.la

SRSINIT_COMMON_SOURCES = srs_init.c \
	epsg_inlined_00.c \
	epsg_inlined_01.c \
................................................................................
	epsg_inlined_40.c \
	epsg_inlined_41.c \
	epsg_inlined_42.c \
	epsg_inlined_43.c \
	epsg_inlined_44.c \
	epsg_inlined_45.c \
	epsg_inlined_46.c \





	epsg_inlined_wgs84_00.c \
	epsg_inlined_wgs84_01.c \
	epsg_inlined_prussian.c \
	epsg_inlined_extra.c

libsrsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)

libsrsinit_la_CFLAGS = -fvisibility=hidden

srsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)

srsinit_la_CPPFLAGS = @CFLAGS@
srsinit_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
srsinit_la_CPPFLAGS += -DLOADABLE_EXTENSION
srsinit_la_CPPFLAGS += -fvisibility=hidden
srsinit_la_LDFLAGS = -module
srsinit_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda


Changes to src/srsinit/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
...
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
...
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
...
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
...
520
521
522
523
524
525
526

527
528
529
530
531
532
533
...
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
...
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
....
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
....
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
....
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/srsinit


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsrsinit_la_LIBADD =
am__objects_1 = libsrsinit_la-srs_init.lo \
................................................................................
	libsrsinit_la-epsg_inlined_40.lo \
	libsrsinit_la-epsg_inlined_41.lo \
	libsrsinit_la-epsg_inlined_42.lo \
	libsrsinit_la-epsg_inlined_43.lo \
	libsrsinit_la-epsg_inlined_44.lo \
	libsrsinit_la-epsg_inlined_45.lo \
	libsrsinit_la-epsg_inlined_46.lo \
	libsrsinit_la-epsg_inlined_47.lo \
	libsrsinit_la-epsg_inlined_48.lo \
	libsrsinit_la-epsg_inlined_49.lo \
	libsrsinit_la-epsg_inlined_50.lo \
	libsrsinit_la-epsg_inlined_51.lo \
	libsrsinit_la-epsg_inlined_wgs84_00.lo \
	libsrsinit_la-epsg_inlined_wgs84_01.lo \
	libsrsinit_la-epsg_inlined_prussian.lo \
	libsrsinit_la-epsg_inlined_extra.lo
am_libsrsinit_la_OBJECTS = $(am__objects_1)
libsrsinit_la_OBJECTS = $(am_libsrsinit_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
................................................................................
	srsinit_la-epsg_inlined_33.lo srsinit_la-epsg_inlined_34.lo \
	srsinit_la-epsg_inlined_35.lo srsinit_la-epsg_inlined_36.lo \
	srsinit_la-epsg_inlined_37.lo srsinit_la-epsg_inlined_38.lo \
	srsinit_la-epsg_inlined_39.lo srsinit_la-epsg_inlined_40.lo \
	srsinit_la-epsg_inlined_41.lo srsinit_la-epsg_inlined_42.lo \
	srsinit_la-epsg_inlined_43.lo srsinit_la-epsg_inlined_44.lo \
	srsinit_la-epsg_inlined_45.lo srsinit_la-epsg_inlined_46.lo \
	srsinit_la-epsg_inlined_47.lo srsinit_la-epsg_inlined_48.lo \
	srsinit_la-epsg_inlined_49.lo srsinit_la-epsg_inlined_50.lo \
	srsinit_la-epsg_inlined_51.lo \
	srsinit_la-epsg_inlined_wgs84_00.lo \
	srsinit_la-epsg_inlined_wgs84_01.lo \
	srsinit_la-epsg_inlined_prussian.lo \
	srsinit_la-epsg_inlined_extra.lo
am_srsinit_la_OBJECTS = $(am__objects_2)
srsinit_la_OBJECTS = $(am_srsinit_la_OBJECTS)
srsinit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = epsg_update
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libsrsinit.la srsinit.la
SRSINIT_COMMON_SOURCES = srs_init.c \
	epsg_inlined_00.c \
	epsg_inlined_01.c \
	epsg_inlined_02.c \
	epsg_inlined_03.c \
	epsg_inlined_04.c \
................................................................................
	epsg_inlined_40.c \
	epsg_inlined_41.c \
	epsg_inlined_42.c \
	epsg_inlined_43.c \
	epsg_inlined_44.c \
	epsg_inlined_45.c \
	epsg_inlined_46.c \
	epsg_inlined_47.c \
	epsg_inlined_48.c \
	epsg_inlined_49.c \
	epsg_inlined_50.c \
	epsg_inlined_51.c \
	epsg_inlined_wgs84_00.c \
	epsg_inlined_wgs84_01.c \
	epsg_inlined_prussian.c \
	epsg_inlined_extra.c

libsrsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)
libsrsinit_la_CFLAGS = -fvisibility=hidden
srsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)
srsinit_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers \
	-I. -DLOADABLE_EXTENSION -fvisibility=hidden
srsinit_la_LDFLAGS = -module
srsinit_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/srsinit/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/srsinit/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_40.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_41.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_42.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_43.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_44.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_45.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_46.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_47.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_48.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_49.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_50.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_51.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_extra.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_prussian.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_01.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-srs_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_00.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_01.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_40.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_41.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_42.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_43.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_44.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_45.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_46.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_47.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_48.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_49.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_50.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_51.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_extra.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_prussian.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_wgs84_01.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-srs_init.Plo@am__quote@

.c.o:
................................................................................
libsrsinit_la-epsg_inlined_46.lo: epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_46.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_46.Tpo -c -o libsrsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_46.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_46.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_46.c' object='libsrsinit_la-epsg_inlined_46.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c

libsrsinit_la-epsg_inlined_47.lo: epsg_inlined_47.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_47.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_47.Tpo -c -o libsrsinit_la-epsg_inlined_47.lo `test -f 'epsg_inlined_47.c' || echo '$(srcdir)/'`epsg_inlined_47.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_47.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_47.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_47.c' object='libsrsinit_la-epsg_inlined_47.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_47.lo `test -f 'epsg_inlined_47.c' || echo '$(srcdir)/'`epsg_inlined_47.c

libsrsinit_la-epsg_inlined_48.lo: epsg_inlined_48.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_48.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_48.Tpo -c -o libsrsinit_la-epsg_inlined_48.lo `test -f 'epsg_inlined_48.c' || echo '$(srcdir)/'`epsg_inlined_48.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_48.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_48.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_48.c' object='libsrsinit_la-epsg_inlined_48.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_48.lo `test -f 'epsg_inlined_48.c' || echo '$(srcdir)/'`epsg_inlined_48.c

libsrsinit_la-epsg_inlined_49.lo: epsg_inlined_49.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_49.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_49.Tpo -c -o libsrsinit_la-epsg_inlined_49.lo `test -f 'epsg_inlined_49.c' || echo '$(srcdir)/'`epsg_inlined_49.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_49.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_49.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_49.c' object='libsrsinit_la-epsg_inlined_49.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_49.lo `test -f 'epsg_inlined_49.c' || echo '$(srcdir)/'`epsg_inlined_49.c

libsrsinit_la-epsg_inlined_50.lo: epsg_inlined_50.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_50.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_50.Tpo -c -o libsrsinit_la-epsg_inlined_50.lo `test -f 'epsg_inlined_50.c' || echo '$(srcdir)/'`epsg_inlined_50.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_50.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_50.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_50.c' object='libsrsinit_la-epsg_inlined_50.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_50.lo `test -f 'epsg_inlined_50.c' || echo '$(srcdir)/'`epsg_inlined_50.c

libsrsinit_la-epsg_inlined_51.lo: epsg_inlined_51.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_51.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_51.Tpo -c -o libsrsinit_la-epsg_inlined_51.lo `test -f 'epsg_inlined_51.c' || echo '$(srcdir)/'`epsg_inlined_51.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_51.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_51.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_51.c' object='libsrsinit_la-epsg_inlined_51.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_51.lo `test -f 'epsg_inlined_51.c' || echo '$(srcdir)/'`epsg_inlined_51.c

libsrsinit_la-epsg_inlined_wgs84_00.lo: epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_wgs84_00.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Tpo -c -o libsrsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_wgs84_00.c' object='libsrsinit_la-epsg_inlined_wgs84_00.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c

................................................................................
srsinit_la-epsg_inlined_46.lo: epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_46.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_46.Tpo -c -o srsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_46.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_46.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_46.c' object='srsinit_la-epsg_inlined_46.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c

srsinit_la-epsg_inlined_47.lo: epsg_inlined_47.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_47.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_47.Tpo -c -o srsinit_la-epsg_inlined_47.lo `test -f 'epsg_inlined_47.c' || echo '$(srcdir)/'`epsg_inlined_47.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_47.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_47.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_47.c' object='srsinit_la-epsg_inlined_47.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_47.lo `test -f 'epsg_inlined_47.c' || echo '$(srcdir)/'`epsg_inlined_47.c

srsinit_la-epsg_inlined_48.lo: epsg_inlined_48.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_48.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_48.Tpo -c -o srsinit_la-epsg_inlined_48.lo `test -f 'epsg_inlined_48.c' || echo '$(srcdir)/'`epsg_inlined_48.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_48.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_48.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_48.c' object='srsinit_la-epsg_inlined_48.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_48.lo `test -f 'epsg_inlined_48.c' || echo '$(srcdir)/'`epsg_inlined_48.c

srsinit_la-epsg_inlined_49.lo: epsg_inlined_49.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_49.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_49.Tpo -c -o srsinit_la-epsg_inlined_49.lo `test -f 'epsg_inlined_49.c' || echo '$(srcdir)/'`epsg_inlined_49.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_49.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_49.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_49.c' object='srsinit_la-epsg_inlined_49.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_49.lo `test -f 'epsg_inlined_49.c' || echo '$(srcdir)/'`epsg_inlined_49.c

srsinit_la-epsg_inlined_50.lo: epsg_inlined_50.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_50.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_50.Tpo -c -o srsinit_la-epsg_inlined_50.lo `test -f 'epsg_inlined_50.c' || echo '$(srcdir)/'`epsg_inlined_50.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_50.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_50.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_50.c' object='srsinit_la-epsg_inlined_50.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_50.lo `test -f 'epsg_inlined_50.c' || echo '$(srcdir)/'`epsg_inlined_50.c

srsinit_la-epsg_inlined_51.lo: epsg_inlined_51.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_51.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_51.Tpo -c -o srsinit_la-epsg_inlined_51.lo `test -f 'epsg_inlined_51.c' || echo '$(srcdir)/'`epsg_inlined_51.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_51.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_51.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_51.c' object='srsinit_la-epsg_inlined_51.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_51.lo `test -f 'epsg_inlined_51.c' || echo '$(srcdir)/'`epsg_inlined_51.c

srsinit_la-epsg_inlined_wgs84_00.lo: epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_wgs84_00.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Tpo -c -o srsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_wgs84_00.c' object='srsinit_la-epsg_inlined_wgs84_00.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c

................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<
<
<
<
<







 







<
<
<







 







<







 







|







 







<
<
<
<
<








|
|







 







>







 







<
<
<
<
<







 







<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
138
139
140
141
142
143
144





145
146
147
148
149
150
151
...
176
177
178
179
180
181
182



183
184
185
186
187
188
189
...
262
263
264
265
266
267
268

269
270
271
272
273
274
275
...
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
...
468
469
470
471
472
473
474





475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
...
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
...
586
587
588
589
590
591
592





593
594
595
596
597
598
599
...
638
639
640
641
642
643
644





645
646
647
648
649
650
651
....
1001
1002
1003
1004
1005
1006
1007



































1008
1009
1010
1011
1012
1013
1014
....
1365
1366
1367
1368
1369
1370
1371



































1372
1373
1374
1375
1376
1377
1378
....
1677
1678
1679
1680
1681
1682
1683


1684
1685
1686
1687
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/srsinit
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsrsinit_la_LIBADD =
am__objects_1 = libsrsinit_la-srs_init.lo \
................................................................................
	libsrsinit_la-epsg_inlined_40.lo \
	libsrsinit_la-epsg_inlined_41.lo \
	libsrsinit_la-epsg_inlined_42.lo \
	libsrsinit_la-epsg_inlined_43.lo \
	libsrsinit_la-epsg_inlined_44.lo \
	libsrsinit_la-epsg_inlined_45.lo \
	libsrsinit_la-epsg_inlined_46.lo \





	libsrsinit_la-epsg_inlined_wgs84_00.lo \
	libsrsinit_la-epsg_inlined_wgs84_01.lo \
	libsrsinit_la-epsg_inlined_prussian.lo \
	libsrsinit_la-epsg_inlined_extra.lo
am_libsrsinit_la_OBJECTS = $(am__objects_1)
libsrsinit_la_OBJECTS = $(am_libsrsinit_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
................................................................................
	srsinit_la-epsg_inlined_33.lo srsinit_la-epsg_inlined_34.lo \
	srsinit_la-epsg_inlined_35.lo srsinit_la-epsg_inlined_36.lo \
	srsinit_la-epsg_inlined_37.lo srsinit_la-epsg_inlined_38.lo \
	srsinit_la-epsg_inlined_39.lo srsinit_la-epsg_inlined_40.lo \
	srsinit_la-epsg_inlined_41.lo srsinit_la-epsg_inlined_42.lo \
	srsinit_la-epsg_inlined_43.lo srsinit_la-epsg_inlined_44.lo \
	srsinit_la-epsg_inlined_45.lo srsinit_la-epsg_inlined_46.lo \



	srsinit_la-epsg_inlined_wgs84_00.lo \
	srsinit_la-epsg_inlined_wgs84_01.lo \
	srsinit_la-epsg_inlined_prussian.lo \
	srsinit_la-epsg_inlined_extra.lo
am_srsinit_la_OBJECTS = $(am__objects_2)
srsinit_la_OBJECTS = $(am_srsinit_la_OBJECTS)
srsinit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
................................................................................
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = epsg_update
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libsrsinit.la srsinit.la
SRSINIT_COMMON_SOURCES = srs_init.c \
	epsg_inlined_00.c \
	epsg_inlined_01.c \
	epsg_inlined_02.c \
	epsg_inlined_03.c \
	epsg_inlined_04.c \
................................................................................
	epsg_inlined_40.c \
	epsg_inlined_41.c \
	epsg_inlined_42.c \
	epsg_inlined_43.c \
	epsg_inlined_44.c \
	epsg_inlined_45.c \
	epsg_inlined_46.c \





	epsg_inlined_wgs84_00.c \
	epsg_inlined_wgs84_01.c \
	epsg_inlined_prussian.c \
	epsg_inlined_extra.c

libsrsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)
libsrsinit_la_CFLAGS = -fvisibility=hidden
srsinit_la_SOURCES = $(SRSINIT_COMMON_SOURCES)
srsinit_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION -fvisibility=hidden
srsinit_la_LDFLAGS = -module
srsinit_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/srsinit/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/srsinit/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_40.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_41.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_42.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_43.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_44.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_45.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_46.Plo@am__quote@





@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_extra.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_prussian.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_01.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsrsinit_la-srs_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_00.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_01.Plo@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_40.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_41.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_42.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_43.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_44.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_45.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_46.Plo@am__quote@





@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_extra.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_prussian.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-epsg_inlined_wgs84_01.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srsinit_la-srs_init.Plo@am__quote@

.c.o:
................................................................................
libsrsinit_la-epsg_inlined_46.lo: epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_46.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_46.Tpo -c -o libsrsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_46.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_46.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_46.c' object='libsrsinit_la-epsg_inlined_46.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c




































libsrsinit_la-epsg_inlined_wgs84_00.lo: epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -MT libsrsinit_la-epsg_inlined_wgs84_00.lo -MD -MP -MF $(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Tpo -c -o libsrsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Tpo $(DEPDIR)/libsrsinit_la-epsg_inlined_wgs84_00.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_wgs84_00.c' object='libsrsinit_la-epsg_inlined_wgs84_00.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsrsinit_la_CFLAGS) $(CFLAGS) -c -o libsrsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c

................................................................................
srsinit_la-epsg_inlined_46.lo: epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_46.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_46.Tpo -c -o srsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_46.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_46.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_46.c' object='srsinit_la-epsg_inlined_46.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_46.lo `test -f 'epsg_inlined_46.c' || echo '$(srcdir)/'`epsg_inlined_46.c




































srsinit_la-epsg_inlined_wgs84_00.lo: epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srsinit_la-epsg_inlined_wgs84_00.lo -MD -MP -MF $(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Tpo -c -o srsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Tpo $(DEPDIR)/srsinit_la-epsg_inlined_wgs84_00.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='epsg_inlined_wgs84_00.c' object='srsinit_la-epsg_inlined_wgs84_00.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(srsinit_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(srsinit_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srsinit_la-epsg_inlined_wgs84_00.lo `test -f 'epsg_inlined_wgs84_00.c' || echo '$(srcdir)/'`epsg_inlined_wgs84_00.c

................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
	uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/srsinit/epsg_inlined_00.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
...
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
...
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
...
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
...
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
...
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
...
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
...
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
...
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
...
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
...
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
...
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
...
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
...
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
...
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
...
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
....
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
....
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
....
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
....
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
....
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
....
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
....
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
....
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
....
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
....
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
....
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
....
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
....
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
....
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
....
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
....
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
....
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
....
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
....
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777














































































2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132




















































































































































3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
....
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
....
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
....
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
....
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_00 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 2 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD27(CGQ77)\",DATUM[\"North_American_Datum_1927_CG");
    add_srs_wkt (p, 2,
        "Q77\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821389");
    add_srs_wkt (p, 3,
        "82,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"66");
    add_srs_wkt (p, 4,
        "09\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 3\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 4\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 5\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 6\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 7\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 8\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 9\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 10\",GEOGCS[\"NAD27(C");
    add_srs_wkt (p, 1,
        "GQ77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 8\",GEOGCS[\"NAD27(76)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 9\",GEOGCS[\"NAD27(76)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 10\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 11\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 12\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 13\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 14\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 15\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 16\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 17\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 15N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 16N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 17N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 18N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 17N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 18N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 19N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 20N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 21N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2038");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 2039, "epsg", 2039,
        "Israel 1993 / Israeli TM Grid", 0, 0,
        "GRS 1980", "Greenwich",
        "Israel_1993", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.204516944");
    add_proj4text (p, 1,
        "44445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +towgs84=-48,55,52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Israel 1993 / Israeli TM Grid\",GEOGCS[\"Israel");
    add_srs_wkt (p, 1,
        " 1993\",DATUM[\"Israel_1993\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-48,55,52,0,0,0,0],AUTHORITY[\"EPSG\",\"6141\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4141\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",31.73439361111111],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",35.20451694444445],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1.0000067],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",219529.584],PARAMETER[\"false_northing\",626907.39],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 13,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "2039\"]]");
    p = add_epsg_def_ex (filter, first, last, 2040, "epsg", 2040,
        "Locodjo 1965 / UTM zone 30N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Locodjo_1965", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,");
................................................................................
        "\"]],AXIS[\"Y\",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"2055\"]]");
    p = add_epsg_def_ex (filter, first, last, 2056, "epsg", 2056,
        "CH1903+ / LV95", 0, 0,
        "Bessel 1841", "Greenwich",
        "CH1903+", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333");
    add_proj4text (p, 1,
        "333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +t");
    add_proj4text (p, 2,
        "owgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
................................................................................
    add_srs_wkt (p, 11,
        "_grid_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_easting\",2600000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 13,
        ",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"2056\"]]");
    p = add_epsg_def_ex (filter, first, last, 2057, "epsg", 2057,
        "Rassadiran / Nakhl e Taqi", 0, 0,
        "International 1924", "Greenwich",
        "Rassadiran", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=27.51882880555555 +lonc=52.6035391666");
................................................................................
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 28N (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Conakry 1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7011\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 29N (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Conakry 1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7011\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
................................................................................
        "S-JTSK (Ferro) / Krovak", 0, 0,
        "Bessel 1841", "Ferro",
        "System_Jednotne_Trigonometricke_Site_Katastralni_Ferro", "Krovak", "metre",
        "X", "South", "Y", "West");
    add_proj4text (p, 0,
        "+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.288139722");
    add_proj4text (p, 1,
        "22222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=570");
    add_proj4text (p, 2,
        ".8,85.7,462.8,4.998,1.587,5.261,3.56 +pm=ferro +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"S-JTSK (Ferro) / Krovak\",GEOGCS[\"S-JTSK (Ferr");
    add_srs_wkt (p, 1,
        "o)\",DATUM[\"System_Jednotne_Trigonometricke_Site_Katast");
    add_srs_wkt (p, 2,
        "ralni_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1");
    add_srs_wkt (p, 3,
        "528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[570.8,85.7,");
    add_srs_wkt (p, 4,
        "462.8,4.998,1.587,5.261,3.56],AUTHORITY[\"EPSG\",\"6818\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8909\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4818\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Krovak\"],PARAMETER[\"latitude_of_center\",49.5],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"longitude_of_center\",42.5],PARAMETER[\"azimuth\"");
    add_srs_wkt (p, 11,
        ",30.28813972222222],PARAMETER[\"pseudo_standard_parallel");
    add_srs_wkt (p, 12,
        "_1\",78.5],PARAMETER[\"scale_factor\",0.9999],PARAMETER[");
    add_srs_wkt (p, 13,
        "\"false_easting\",0],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 14,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",S");
    add_srs_wkt (p, 15,
        "OUTH],AXIS[\"Y\",WEST],AUTHORITY[\"EPSG\",\"2065\"]]");
    p = add_epsg_def_ex (filter, first, last, 2066, "epsg", 2066,
        "Mount Dillon / Tobago Grid", 0, 0,
        "Clarke 1858", "Greenwich",
        "Mount_Dillon", "Cassini_Soldner", "Clarke's link",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=11.25217861111111 +lon_0=-60.686008888");
................................................................................
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Mount Dillon / Tobago Grid\",GEOGCS[\"Mount Dil");
    add_srs_wkt (p, 1,
        "lon\",DATUM[\"Mount_Dillon\",SPHEROID[\"Clarke 1858\",63");
    add_srs_wkt (p, 2,
        "78293.645208759,294.2606763692606,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "007\"]],AUTHORITY[\"EPSG\",\"6157\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "ELD79 / Libya zone 5", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9999 +x_0=200000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,0");
    add_proj4text (p, 2,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 5\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9999],PARAMETER[\"false_easting\",200000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"2068\"]]");
    p = add_epsg_def_ex (filter, first, last, 2069, "epsg", 2069,
        "ELD79 / Libya zone 6", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 6\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",11],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2069\"]]");
    p = add_epsg_def_ex (filter, first, last, 2070, "epsg", 2070,
        "ELD79 / Libya zone 7", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 7\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",13],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2070\"]]");
    p = add_epsg_def_ex (filter, first, last, 2071, "epsg", 2071,
        "ELD79 / Libya zone 8", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 8\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,














































































        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",15],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2071\"]]");
    p = add_epsg_def_ex (filter, first, last, 2072, "epsg", 2072,
        "ELD79 / Libya zone 9", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 9\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",17],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2072\"]]");
    p = add_epsg_def_ex (filter, first, last, 2073, "epsg", 2073,
        "ELD79 / Libya zone 10", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 10\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",19],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9999],PARAMETER[\"false_easting\",200000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2073\"]]");
    p = add_epsg_def_ex (filter, first, last, 2074, "epsg", 2074,
        "ELD79 / Libya zone 11", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 11\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",21],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9999],PARAMETER[\"false_easting\",200000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2074\"]]");
    p = add_epsg_def_ex (filter, first, last, 2075, "epsg", 2075,
        "ELD79 / Libya zone 12", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 12\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",23],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9999],PARAMETER[\"false_easting\",200000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2075\"]]");
    p = add_epsg_def_ex (filter, first, last, 2076, "epsg", 2076,
        "ELD79 / Libya zone 13", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 13\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",25],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9999],PARAMETER[\"false_easting\",200000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2076\"]]");
    p = add_epsg_def_ex (filter, first, last, 2077, "epsg", 2077,
        "ELD79 / UTM zone 32N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=intl +towgs84=-115.8543,-99.05");
    add_proj4text (p, 1,
        "83,-152.4616,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 32N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"2077\"]]");
    p = add_epsg_def_ex (filter, first, last, 2078, "epsg", 2078,
        "ELD79 / UTM zone 33N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=intl +towgs84=-115.8543,-99.05");
    add_proj4text (p, 1,
        "83,-152.4616,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 33N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",15],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9996],PARAMETER[\"false_easting\",500000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"2078\"]]");
    p = add_epsg_def_ex (filter, first, last, 2079, "epsg", 2079,
        "ELD79 / UTM zone 34N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=intl +towgs84=-115.8543,-99.05");
    add_proj4text (p, 1,
        "83,-152.4616,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 34N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",21],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9996],PARAMETER[\"false_easting\",500000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"2079\"]]");
    p = add_epsg_def_ex (filter, first, last, 2080, "epsg", 2080,
        "ELD79 / UTM zone 35N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=intl +towgs84=-115.8543,-99.05");
    add_proj4text (p, 1,
        "83,-152.4616,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 35N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,




















































































































































        ",PARAMETER[\"central_meridian\",27],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9996],PARAMETER[\"false_easting\",500000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"2080\"]]");
    p = add_epsg_def_ex (filter, first, last, 2081, "epsg", 2081,
        "Chos Malal 1914 / Argentina 2", 0, 1,
        "International 1924", "Greenwich",
        "Chos_Malal_1914", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
................................................................................
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Norte (deprecated)\",GEOGCS[\"NAD2");
    add_srs_wkt (p, 1,
        "7\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0 +y_0=229126.939 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Sur (deprecated)\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "ELD79 / TM 12 NE", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.8543,-99.0583,-152.4616,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / TM 12 NE\",GEOGCS[\"ELD79\",DATUM[\"Eur");
    add_srs_wkt (p, 1,
        "opean_Libyan_Datum_1979\",SPHEROID[\"International 1924\"");
    add_srs_wkt (p, 2,
        ",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-115.");
    add_srs_wkt (p, 3,
        "8543,-99.0583,-152.4616,0,0,0,0],AUTHORITY[\"EPSG\",\"61");
    add_srs_wkt (p, 4,
        "59\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",12],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
................................................................................
    add_proj4text (p, 2,
        "+units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / TM 11 NE\",GEOGCS[\"Carthage\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,2");
    add_srs_wkt (p, 2,
        "93.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|

|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|

|








|

|

|

|

|

|

|

|

|

|

|

|

|

|
<
<







 







|







 







|

|







 







|







 







|







 







|

|
<
<







|

|

|

|

|

|

|

|

|

|

|

|

|







 







|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|

|

|

|







 







|







 







|







 







|

|







|

|

|

|

|

|

|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
...
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
...
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
...
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
...
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
...
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
...
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
...
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
...
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
...
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
...
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
...
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
...
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
...
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
....
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
....
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
....
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
....
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
....
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
....
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
....
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
....
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
....
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
....
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
....
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
....
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544


1545
1546
1547
1548
1549
1550
1551
....
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
....
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
....
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
....
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
....
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524


2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
....
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
....
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859














































































2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964

























































2965



























































































2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
....
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
....
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
....
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
....
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_00 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 2 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD27(CGQ77)\",DATUM[\"North_American_Datum_1927_CG");
    add_srs_wkt (p, 2,
        "Q77\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821390");
    add_srs_wkt (p, 3,
        "06,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"66");
    add_srs_wkt (p, 4,
        "09\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 3\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 4\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 5\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 6\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 7\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 8\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 9\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / SCoPQ zone 10\",GEOGCS[\"NAD27(C");
    add_srs_wkt (p, 1,
        "GQ77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 8\",GEOGCS[\"NAD27(76)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 9\",GEOGCS[\"NAD27(76)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 10\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 11\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 12\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 13\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 14\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 15\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 16\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / MTM zone 17\",GEOGCS[\"NAD27(76)\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 15N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 16N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 17N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(76) / UTM zone 18N\",GEOGCS[\"NAD27(76)\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927_1976\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6608\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 17N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 18N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 19N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 20N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / UTM zone 21N\",GEOGCS[\"NAD27(CG");
    add_srs_wkt (p, 1,
        "Q77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2038");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 2039, "epsg", 2039,
        "Israel / Israeli TM Grid", 0, 0,
        "GRS 1980", "Greenwich",
        "Israel", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.204516944");
    add_proj4text (p, 1,
        "44445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +towgs84=-48,55,52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Israel / Israeli TM Grid\",GEOGCS[\"Israel\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Israel\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 2,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[-48,55,52,0,0,0");
    add_srs_wkt (p, 3,
        ",0],AUTHORITY[\"EPSG\",\"6141\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 5,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 7,
        "41\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31.73439361111111],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",35.20451694444445],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.0000067],PARAMETER[\"false_easting\",219529.584],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",626907.39],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXI");
    add_srs_wkt (p, 13,
        "S[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2039\"]]");


    p = add_epsg_def_ex (filter, first, last, 2040, "epsg", 2040,
        "Locodjo 1965 / UTM zone 30N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Locodjo_1965", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=clrk80 +towgs84=-125,53,467,0,");
................................................................................
        "\"]],AXIS[\"Y\",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"2055\"]]");
    p = add_epsg_def_ex (filter, first, last, 2056, "epsg", 2056,
        "CH1903+ / LV95", 0, 0,
        "Bessel 1841", "Greenwich",
        "CH1903+", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333");
    add_proj4text (p, 1,
        "333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +t");
    add_proj4text (p, 2,
        "owgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
................................................................................
    add_srs_wkt (p, 11,
        "_grid_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_easting\",2600000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 13,
        ",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "2056\"]]");
    p = add_epsg_def_ex (filter, first, last, 2057, "epsg", 2057,
        "Rassadiran / Nakhl e Taqi", 0, 0,
        "International 1924", "Greenwich",
        "Rassadiran", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=27.51882880555555 +lonc=52.6035391666");
................................................................................
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 28N (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Conakry 1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7011\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 29N (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Conakry 1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7011\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
................................................................................
        "S-JTSK (Ferro) / Krovak", 0, 0,
        "Bessel 1841", "Ferro",
        "System_Jednotne_Trigonometricke_Site_Katastralni_Ferro", "Krovak", "metre",
        "X", "South", "Y", "West");
    add_proj4text (p, 0,
        "+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.288139722");
    add_proj4text (p, 1,
        "22222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=589");
    add_proj4text (p, 2,
        ",76,480,0,0,0,0 +pm=ferro +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"S-JTSK (Ferro) / Krovak\",GEOGCS[\"S-JTSK (Ferr");
    add_srs_wkt (p, 1,
        "o)\",DATUM[\"System_Jednotne_Trigonometricke_Site_Katast");
    add_srs_wkt (p, 2,
        "ralni_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1");
    add_srs_wkt (p, 3,
        "528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[589,76,480,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6818\"]],PRIMEM[\"Ferro\",");
    add_srs_wkt (p, 5,
        "-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4818\"]],PROJECTION[\"Krovak\"],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"latitude_of_center\",49.5],PARAMETER[\"longitude_of");
    add_srs_wkt (p, 10,
        "_center\",42.5],PARAMETER[\"azimuth\",30.28813972222222]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"pseudo_standard_parallel_1\",78.5],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"scale_factor\",0.9999],PARAMETER[\"false_easting\",0");
    add_srs_wkt (p, 13,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",SOUTH],AXIS[\"Y\",WE");
    add_srs_wkt (p, 15,
        "ST],AUTHORITY[\"EPSG\",\"2065\"]]");
    p = add_epsg_def_ex (filter, first, last, 2066, "epsg", 2066,
        "Mount Dillon / Tobago Grid", 0, 0,
        "Clarke 1858", "Greenwich",
        "Mount_Dillon", "Cassini_Soldner", "Clarke's link",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=11.25217861111111 +lon_0=-60.686008888");
................................................................................
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Mount Dillon / Tobago Grid\",GEOGCS[\"Mount Dil");
    add_srs_wkt (p, 1,
        "lon\",DATUM[\"Mount_Dillon\",SPHEROID[\"Clarke 1858\",63");
    add_srs_wkt (p, 2,
        "78293.645208759,294.2606763692569,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "007\"]],AUTHORITY[\"EPSG\",\"6157\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "ELD79 / Libya zone 5", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9999 +x_0=200000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 5\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",9],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.9999],PARAMETER[\"false_easting\",200000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"2068\"]]");
    p = add_epsg_def_ex (filter, first, last, 2069, "epsg", 2069,
        "ELD79 / Libya zone 6", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 6\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",11],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9999],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"2069\"]]");
    p = add_epsg_def_ex (filter, first, last, 2070, "epsg", 2070,
        "ELD79 / Libya zone 7", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 7\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",13],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9999],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"2070\"]]");
    p = add_epsg_def_ex (filter, first, last, 2071, "epsg", 2071,
        "ELD79 / Libya zone 8", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 8\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",15],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9999],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"2071\"]]");
    p = add_epsg_def_ex (filter, first, last, 2072, "epsg", 2072,
        "ELD79 / Libya zone 9", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 9\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",17],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9999],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"2072\"]]");
    p = add_epsg_def_ex (filter, first, last, 2073, "epsg", 2073,
        "ELD79 / Libya zone 10", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 10\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,














































































        ",PARAMETER[\"central_meridian\",19],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2073\"]]");
    p = add_epsg_def_ex (filter, first, last, 2074, "epsg", 2074,
        "ELD79 / Libya zone 11", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 11\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",21],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2074\"]]");
    p = add_epsg_def_ex (filter, first, last, 2075, "epsg", 2075,
        "ELD79 / Libya zone 12", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 12\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",23],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2075\"]]");
    p = add_epsg_def_ex (filter, first, last, 2076, "epsg", 2076,
        "ELD79 / Libya zone 13", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25 +k=0.9999 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / Libya zone 13\",GEOGCS[\"ELD79\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Libyan_Datum_1979\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,

























































        "[-115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",");



























































































    add_srs_wkt (p, 4,
        "\"6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",25],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2076\"]]");
    p = add_epsg_def_ex (filter, first, last, 2077, "epsg", 2077,
        "ELD79 / UTM zone 32N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=intl +towgs84=-115.854,-99.058");
    add_proj4text (p, 1,
        "3,-152.462,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 32N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",9],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"2077\"]]");
    p = add_epsg_def_ex (filter, first, last, 2078, "epsg", 2078,
        "ELD79 / UTM zone 33N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=intl +towgs84=-115.854,-99.058");
    add_proj4text (p, 1,
        "3,-152.462,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 33N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",15],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"2078\"]]");
    p = add_epsg_def_ex (filter, first, last, 2079, "epsg", 2079,
        "ELD79 / UTM zone 34N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=intl +towgs84=-115.854,-99.058");
    add_proj4text (p, 1,
        "3,-152.462,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 34N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",21],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"2079\"]]");
    p = add_epsg_def_ex (filter, first, last, 2080, "epsg", 2080,
        "ELD79 / UTM zone 35N", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=intl +towgs84=-115.854,-99.058");
    add_proj4text (p, 1,
        "3,-152.462,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / UTM zone 35N\",GEOGCS[\"ELD79\",DATUM[\"");
    add_srs_wkt (p, 1,
        "European_Libyan_Datum_1979\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "115.854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6159\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",27],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"2080\"]]");
    p = add_epsg_def_ex (filter, first, last, 2081, "epsg", 2081,
        "Chos Malal 1914 / Argentina 2", 0, 1,
        "International 1924", "Greenwich",
        "Chos_Malal_1914", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
................................................................................
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Norte (deprecated)\",GEOGCS[\"NAD2");
    add_srs_wkt (p, 1,
        "7\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0 +y_0=229126.939 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Sur (deprecated)\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "ELD79 / TM 12 NE", 0, 0,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-115.854,-99.0583,-152.462,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ELD79 / TM 12 NE\",GEOGCS[\"ELD79\",DATUM[\"Eur");
    add_srs_wkt (p, 1,
        "opean_Libyan_Datum_1979\",SPHEROID[\"International 1924\"");
    add_srs_wkt (p, 2,
        ",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-115.");
    add_srs_wkt (p, 3,
        "854,-99.0583,-152.462,0,0,0,0],AUTHORITY[\"EPSG\",\"6159");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4159\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",12],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
................................................................................
    add_proj4text (p, 2,
        "+units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / TM 11 NE\",GEOGCS[\"Carthage\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,2");
    add_srs_wkt (p, 2,
        "93.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_01.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
....
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
....
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
....
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
....
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
....
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
....
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_01 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / Quebec Lambert\",GEOGCS[\"NAD27(");
    add_srs_wkt (p, 1,
        "CGQ77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"American Samoa 1962 / American Samoa Lambert (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"American Samoa 1962\",DATUM[\"Amer");
    add_srs_wkt (p, 2,
        "ican_Samoa_1962\",SPHEROID[\"Clarke 1866\",6378206.4,294");
    add_srs_wkt (p, 3,
        ".9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-11");
    add_srs_wkt (p, 4,
        "5,118,426,0,0,0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 6,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 7,
................................................................................
        "Luxembourg_1930", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.1666666666");
    add_proj4text (p, 1,
        "66667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-");
    add_proj4text (p, 2,
        "189.6806,18.3463,-42.7695,-0.33746,-3.09264,2.53861,0.45");
    add_proj4text (p, 3,
        "98 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luxembourg 1930 / Gauss\",GEOGCS[\"Luxembourg 1");
    add_srs_wkt (p, 1,
        "930\",DATUM[\"Luxembourg_1930\",SPHEROID[\"International");
    add_srs_wkt (p, 2,
        " 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-189.6806,18.3463,-42.7695,-0.33746,-3.09264,2.53861,0");
    add_srs_wkt (p, 4,
        ".4598],AUTHORITY[\"EPSG\",\"6181\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"American Samoa 1962 / American Samoa Lambert (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"American Samoa 1962\",DATUM[\"Amer");
    add_srs_wkt (p, 2,
        "ican_Samoa_1962\",SPHEROID[\"Clarke 1866\",6378206.4,294");
    add_srs_wkt (p, 3,
        ".9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-11");
    add_srs_wkt (p, 4,
        "5,118,426,0,0,0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 6,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 7,
................................................................................
        "Albanian 1987 / Gauss Kruger zone 4 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Albanian_1987", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=-44.183,-0.58,-38.489,2.3867,2.707");
    add_proj4text (p, 2,
        "2,-3.5196,-8.2703 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Albanian 1987 / Gauss Kruger zone 4 (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"Albanian 1987\",DATUM[\"Albanian_1987\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7024\"]],TOWGS84[-44.183,-0.58,-38.489,2.3867,2.707");
    add_srs_wkt (p, 4,
        "2,-3.5196,-8.2703],AUTHORITY[\"EPSG\",\"6191\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 6,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 7,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 8,
        "TY[\"EPSG\",\"4191\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",21],PARAMETER[\"scale_factor\",1],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",4500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2199\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 2200, "epsg", 2200,
        "ATS77 / New Brunswick Stereographic (ATS77)", 0, 1,
        "Average Terrestrial System 1977", "Greenwich",
        "Average_Terrestrial_System_1977", "Oblique_Stereographic", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=3");
................................................................................
    add_proj4text (p, 2,
        "30480.06096012192 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Tennessee\",GEOGCS[\"NAD27\",DATUM[\"No");
    add_srs_wkt (p, 1,
        "rth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",63782");
    add_srs_wkt (p, 2,
        "06.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|







 







|







 







|

|







|

|







 







|







 







<
<
|







<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
....
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
....
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
....
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
....
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
....
3665
3666
3667
3668
3669
3670
3671


3672
3673
3674
3675
3676
3677
3678
3679


3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698


3699
3700
3701
3702
3703
3704
3705
....
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_01 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27(CGQ77) / Quebec Lambert\",GEOGCS[\"NAD27(");
    add_srs_wkt (p, 1,
        "CGQ77)\",DATUM[\"North_American_Datum_1927_CGQ77\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6609\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"American Samoa 1962 / American Samoa Lambert (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"American Samoa 1962\",DATUM[\"Amer");
    add_srs_wkt (p, 2,
        "ican_Samoa_1962\",SPHEROID[\"Clarke 1866\",6378206.4,294");
    add_srs_wkt (p, 3,
        ".9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-11");
    add_srs_wkt (p, 4,
        "5,118,426,0,0,0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 6,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 7,
................................................................................
        "Luxembourg_1930", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.1666666666");
    add_proj4text (p, 1,
        "66667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-");
    add_proj4text (p, 2,
        "189.681,18.3463,-42.7695,-0.33746,-3.09264,2.53861,0.459");
    add_proj4text (p, 3,
        "8 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luxembourg 1930 / Gauss\",GEOGCS[\"Luxembourg 1");
    add_srs_wkt (p, 1,
        "930\",DATUM[\"Luxembourg_1930\",SPHEROID[\"International");
    add_srs_wkt (p, 2,
        " 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-189.681,18.3463,-42.7695,-0.33746,-3.09264,2.53861,0.");
    add_srs_wkt (p, 4,
        "4598],AUTHORITY[\"EPSG\",\"6181\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"American Samoa 1962 / American Samoa Lambert (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"American Samoa 1962\",DATUM[\"Amer");
    add_srs_wkt (p, 2,
        "ican_Samoa_1962\",SPHEROID[\"Clarke 1866\",6378206.4,294");
    add_srs_wkt (p, 3,
        ".9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-11");
    add_srs_wkt (p, 4,
        "5,118,426,0,0,0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 6,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 7,
................................................................................
        "Albanian 1987 / Gauss Kruger zone 4 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Albanian_1987", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,


        "+ellps=krass +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Albanian 1987 / Gauss Kruger zone 4 (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"Albanian 1987\",DATUM[\"Albanian_1987\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,


        "\",\"7024\"]],AUTHORITY[\"EPSG\",\"6191\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4191\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",21],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 10,
        "lse_easting\",4500000],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 12,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2199\"]]");


    p = add_epsg_def_ex (filter, first, last, 2200, "epsg", 2200,
        "ATS77 / New Brunswick Stereographic (ATS77)", 0, 1,
        "Average Terrestrial System 1977", "Greenwich",
        "Average_Terrestrial_System_1977", "Oblique_Stereographic", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=3");
................................................................................
    add_proj4text (p, 2,
        "30480.06096012192 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Tennessee\",GEOGCS[\"NAD27\",DATUM[\"No");
    add_srs_wkt (p, 1,
        "rth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",63782");
    add_srs_wkt (p, 2,
        "06.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_02.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
....
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_02 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "9,-151.8,-41.4,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Manoca 1962 / UTM zone 32N\",GEOGCS[\"Manoca 19");
    add_srs_wkt (p, 1,
        "62\",DATUM[\"Manoca_1962\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6193\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "88,472.052,0,0,0,0 +to_meter=0.3047972654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Trinidad 1903 / Trinidad Grid (ftCla)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Trinidad 1903\",DATUM[\"Trinidad_1903\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1858\",6378293.645208759,294.2606763692606,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7007\"]],TOWGS84[-61.702,284.488,472.052,0,0");
    add_srs_wkt (p, 4,
        ",0,0],AUTHORITY[\"EPSG\",\"6302\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
....
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_02 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "9,-151.8,-41.4,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Manoca 1962 / UTM zone 32N\",GEOGCS[\"Manoca 19");
    add_srs_wkt (p, 1,
        "62\",DATUM[\"Manoca_1962\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6193\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "88,472.052,0,0,0,0 +to_meter=0.3047972654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Trinidad 1903 / Trinidad Grid (ftCla)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Trinidad 1903\",DATUM[\"Trinidad_1903\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1858\",6378293.645208759,294.2606763692569,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7007\"]],TOWGS84[-61.702,284.488,472.052,0,0");
    add_srs_wkt (p, 4,
        ",0,0],AUTHORITY[\"EPSG\",\"6302\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_03.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
....
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_03 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Hong_Kong_1980", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.17855555");
    add_proj4text (p, 1,
        "55556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +tow");
    add_proj4text (p, 2,
        "gs84=-162.619,-276.959,-161.764,0.067753,-2.243649,-1.15");
    add_proj4text (p, 3,
        "8827,-1.094246 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hong Kong 1980 Grid System\",GEOGCS[\"Hong Kong");
    add_srs_wkt (p, 1,
        " 1980\",DATUM[\"Hong_Kong_1980\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 2,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-162.619,-276.959,-161.764,0.067753,-2.243649,-1.1588");
    add_srs_wkt (p, 4,
        "27,-1.094246],AUTHORITY[\"EPSG\",\"6611\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 5,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4611\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",22.31213333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",114.1785555555556],PARAMETER[\"s");
    add_srs_wkt (p, 11,
        "cale_factor\",1],PARAMETER[\"false_easting\",836694.05],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",819069.8],UNIT[\"metre\",1,");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 14,
        "XIS[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"2326\"]]");
    p = add_epsg_def_ex (filter, first, last, 2327, "epsg", 2327,
        "Xian 1980 / Gauss-Kruger zone 13", 0, 1,
        "IAG 1975", "Greenwich",
        "Xian_1980", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
................................................................................
        "Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_83", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.9,-126.4,-93.2,-0.063,-0.247,-0.");
    add_proj4text (p, 2,
        "041,1.01 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7024\"]],TOWGS84[24.9,-126.4,-93.2,-0.063,-0.24");
    add_srs_wkt (p, 4,
        "7,-0.041,1.01],AUTHORITY[\"EPSG\",\"6178\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4178\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",9],PARAMETER[\"scale_factor\",1],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",3500000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2397\"]]");
    p = add_epsg_def_ex (filter, first, last, 2398, "epsg", 2398,
        "Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_83", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.9,-126.4,-93.2,-0.063,-0.247,-0");
    add_proj4text (p, 2,
        ".041,1.01 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7024\"]],TOWGS84[24.9,-126.4,-93.2,-0.063,-0.24");
    add_srs_wkt (p, 4,
        "7,-0.041,1.01],AUTHORITY[\"EPSG\",\"6178\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4178\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",12],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",4500000],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2398\"]]");
    p = add_epsg_def_ex (filter, first, last, 2399, "epsg", 2399,
        "Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_83", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.9,-126.4,-93.2,-0.063,-0.247,-0");
    add_proj4text (p, 2,
        ".041,1.01 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7024\"]],TOWGS84[24.9,-126.4,-93.2,-0.063,-0.24");
    add_srs_wkt (p, 4,
        "7,-0.041,1.01],AUTHORITY[\"EPSG\",\"6178\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4178\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",15],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",5500000],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2399\"]]");
    p = add_epsg_def_ex (filter, first, last, 2400, "epsg", 2400,
        "RT90 2.5 gon W (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Rikets_koordinatsystem_1990", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=");




|







 







<
<
<

<







 







|

|







|

|

|

|

|

|

|

|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
....
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_03 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Hong_Kong_1980", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.17855555");
    add_proj4text (p, 1,
        "55556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +tow");
    add_proj4text (p, 2,
        "gs84=-162.619,-276.959,-161.764,0.067753,-2.24365,-1.158");
    add_proj4text (p, 3,
        "83,-1.09425 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hong Kong 1980 Grid System\",GEOGCS[\"Hong Kong");
    add_srs_wkt (p, 1,
        " 1980\",DATUM[\"Hong_Kong_1980\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 2,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-162.619,-276.959,-161.764,0.067753,-2.24365,-1.15883");
    add_srs_wkt (p, 4,
        ",-1.09425],AUTHORITY[\"EPSG\",\"6611\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4611\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",22.31213333333334],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",114.1785555555556],PARAMETER[\"sca");
    add_srs_wkt (p, 11,
        "le_factor\",1],PARAMETER[\"false_easting\",836694.05],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_northing\",819069.8],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXI");
    add_srs_wkt (p, 14,
        "S[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"2326\"]]");
    p = add_epsg_def_ex (filter, first, last, 2327, "epsg", 2327,
        "Xian 1980 / Gauss-Kruger zone 13", 0, 1,
        "IAG 1975", "Greenwich",
        "Xian_1980", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
................................................................................
        "Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_83", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7024\"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6178\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4178\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",3500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"2397\"]]");
    p = add_epsg_def_ex (filter, first, last, 2398, "epsg", 2398,
        "Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_83", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7024\"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6178\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4178\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",12],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",4500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2398\"]]");
    p = add_epsg_def_ex (filter, first, last, 2399, "epsg", 2399,
        "Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_83", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=26,-121,-78,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942(83)\",DATUM[\"Pulkovo_1942_83\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7024\"]],TOWGS84[26,-121,-78,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6178\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4178\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",15],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",5500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2399\"]]");
    p = add_epsg_def_ex (filter, first, last, 2400, "epsg", 2400,
        "RT90 2.5 gon W (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Rikets_koordinatsystem_1990", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=");

Changes to src/srsinit/epsg_inlined_04.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
....
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_04 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Albanian 1987 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Albanian_1987", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=-44.183,-0.58,-38.489,2.3867,2.707");
    add_proj4text (p, 2,
        "2,-3.5196,-8.2703 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Albanian 1987 / Gauss-Kruger zone 4\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Albanian 1987\",DATUM[\"Albanian_1987\",SPHEROID[\"Krass");
    add_srs_wkt (p, 2,
        "owsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.");
    add_srs_wkt (p, 4,
        "2703],AUTHORITY[\"EPSG\",\"6191\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4191\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",2");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",4500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2462\"]]");
    p = add_epsg_def_ex (filter, first, last, 2463, "epsg", 2463,
        "Pulkovo 1995 / Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 21E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2463\"]]");
    p = add_epsg_def_ex (filter, first, last, 2464, "epsg", 2464,
        "Pulkovo 1995 / Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 27E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2464\"]]");
    p = add_epsg_def_ex (filter, first, last, 2465, "epsg", 2465,
        "Pulkovo 1995 / Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 33E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2465\"]]");
    p = add_epsg_def_ex (filter, first, last, 2466, "epsg", 2466,
        "Pulkovo 1995 / Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 39E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2466\"]]");
    p = add_epsg_def_ex (filter, first, last, 2467, "epsg", 2467,
        "Pulkovo 1995 / Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 45E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2467\"]]");
    p = add_epsg_def_ex (filter, first, last, 2468, "epsg", 2468,
        "Pulkovo 1995 / Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 51E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2468\"]]");
    p = add_epsg_def_ex (filter, first, last, 2469, "epsg", 2469,
        "Pulkovo 1995 / Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 57E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2469\"]]");
    p = add_epsg_def_ex (filter, first, last, 2470, "epsg", 2470,
        "Pulkovo 1995 / Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 63E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2470\"]]");
    p = add_epsg_def_ex (filter, first, last, 2471, "epsg", 2471,
        "Pulkovo 1995 / Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 69E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2471\"]]");
    p = add_epsg_def_ex (filter, first, last, 2472, "epsg", 2472,
        "Pulkovo 1995 / Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 75E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2472\"]]");
    p = add_epsg_def_ex (filter, first, last, 2473, "epsg", 2473,
        "Pulkovo 1995 / Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 81E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2473\"]]");
    p = add_epsg_def_ex (filter, first, last, 2474, "epsg", 2474,
        "Pulkovo 1995 / Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 87E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2474\"]]");
    p = add_epsg_def_ex (filter, first, last, 2475, "epsg", 2475,
        "Pulkovo 1995 / Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 93E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2475\"]]");
    p = add_epsg_def_ex (filter, first, last, 2476, "epsg", 2476,
        "Pulkovo 1995 / Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 99E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"2476\"]]");
    p = add_epsg_def_ex (filter, first, last, 2477, "epsg", 2477,
        "Pulkovo 1995 / Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 105E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",105],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2477\"]]");
    p = add_epsg_def_ex (filter, first, last, 2478, "epsg", 2478,
        "Pulkovo 1995 / Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 111E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",111],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2478\"]]");
    p = add_epsg_def_ex (filter, first, last, 2479, "epsg", 2479,
        "Pulkovo 1995 / Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 117E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",117],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2479\"]]");
    p = add_epsg_def_ex (filter, first, last, 2480, "epsg", 2480,
        "Pulkovo 1995 / Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 123E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",123],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2480\"]]");
    p = add_epsg_def_ex (filter, first, last, 2481, "epsg", 2481,
        "Pulkovo 1995 / Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 129E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",129],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2481\"]]");
    p = add_epsg_def_ex (filter, first, last, 2482, "epsg", 2482,
        "Pulkovo 1995 / Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 135E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",135],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2482\"]]");
    p = add_epsg_def_ex (filter, first, last, 2483, "epsg", 2483,
        "Pulkovo 1995 / Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 141E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",141],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2483\"]]");
    p = add_epsg_def_ex (filter, first, last, 2484, "epsg", 2484,
        "Pulkovo 1995 / Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 147E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",147],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2484\"]]");
    p = add_epsg_def_ex (filter, first, last, 2485, "epsg", 2485,
        "Pulkovo 1995 / Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 153E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",153],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2485\"]]");
    p = add_epsg_def_ex (filter, first, last, 2486, "epsg", 2486,
        "Pulkovo 1995 / Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 159E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",159],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2486\"]]");
    p = add_epsg_def_ex (filter, first, last, 2487, "epsg", 2487,
        "Pulkovo 1995 / Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 165E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",165],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2487\"]]");
    p = add_epsg_def_ex (filter, first, last, 2488, "epsg", 2488,
        "Pulkovo 1995 / Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 171E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",171],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2488\"]]");
    p = add_epsg_def_ex (filter, first, last, 2489, "epsg", 2489,
        "Pulkovo 1995 / Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 177E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",177],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2489\"]]");
    p = add_epsg_def_ex (filter, first, last, 2490, "epsg", 2490,
        "Pulkovo 1995 / Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 177W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",-177],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2490\"]]");
    p = add_epsg_def_ex (filter, first, last, 2491, "epsg", 2491,
        "Pulkovo 1995 / Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 171W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",-171],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2491\"]]");
    p = add_epsg_def_ex (filter, first, last, 2492, "epsg", 2492,
        "Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +e");
    add_proj4text (p, 1,
        "llps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.1");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",9],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2492\"]]");
    p = add_epsg_def_ex (filter, first, last, 2493, "epsg", 2493,
        "Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"428");
    add_srs_wkt (p, 8,
        "4\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",15]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2493\"]]");
    p = add_epsg_def_ex (filter, first, last, 2494, "epsg", 2494,
        "Pulkovo 1942 / Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 21E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2494\"]]");
    p = add_epsg_def_ex (filter, first, last, 2495, "epsg", 2495,
        "Pulkovo 1942 / Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 27E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2495\"]]");
    p = add_epsg_def_ex (filter, first, last, 2496, "epsg", 2496,
        "Pulkovo 1942 / Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 33E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2496\"]]");
    p = add_epsg_def_ex (filter, first, last, 2497, "epsg", 2497,
        "Pulkovo 1942 / Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 39E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2497\"]]");
    p = add_epsg_def_ex (filter, first, last, 2498, "epsg", 2498,
        "Pulkovo 1942 / Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 45E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2498\"]]");
    p = add_epsg_def_ex (filter, first, last, 2499, "epsg", 2499,
        "Pulkovo 1942 / Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 51E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2499\"]]");
    p = add_epsg_def_ex (filter, first, last, 2500, "epsg", 2500,
        "Pulkovo 1942 / Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 57E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2500\"]]");
    p = add_epsg_def_ex (filter, first, last, 2501, "epsg", 2501,
        "Pulkovo 1942 / Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 63E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2501\"]]");
    p = add_epsg_def_ex (filter, first, last, 2502, "epsg", 2502,
        "Pulkovo 1942 / Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 69E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2502\"]]");
    p = add_epsg_def_ex (filter, first, last, 2503, "epsg", 2503,
        "Pulkovo 1942 / Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 75E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2503\"]]");
    p = add_epsg_def_ex (filter, first, last, 2504, "epsg", 2504,
        "Pulkovo 1942 / Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 81E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2504\"]]");
    p = add_epsg_def_ex (filter, first, last, 2505, "epsg", 2505,
        "Pulkovo 1942 / Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 87E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2505\"]]");
    p = add_epsg_def_ex (filter, first, last, 2506, "epsg", 2506,
        "Pulkovo 1942 / Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 93E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2506\"]]");
    p = add_epsg_def_ex (filter, first, last, 2507, "epsg", 2507,
        "Pulkovo 1942 / Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 99E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2507\"]]");
    p = add_epsg_def_ex (filter, first, last, 2508, "epsg", 2508,
        "Pulkovo 1942 / Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 105E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",105],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2508\"]]");
    p = add_epsg_def_ex (filter, first, last, 2509, "epsg", 2509,
        "Pulkovo 1942 / Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 111E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2509\"]]");
    p = add_epsg_def_ex (filter, first, last, 2510, "epsg", 2510,
        "Pulkovo 1942 / Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 117E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",117],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2510\"]]");
    p = add_epsg_def_ex (filter, first, last, 2511, "epsg", 2511,
        "Pulkovo 1942 / Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 123E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",123],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2511\"]]");
    p = add_epsg_def_ex (filter, first, last, 2512, "epsg", 2512,
        "Pulkovo 1942 / Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 129E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",129],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2512\"]]");
    p = add_epsg_def_ex (filter, first, last, 2513, "epsg", 2513,
        "Pulkovo 1942 / Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 135E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",135],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2513\"]]");
    p = add_epsg_def_ex (filter, first, last, 2514, "epsg", 2514,
        "Pulkovo 1942 / Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 141E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",141],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2514\"]]");
    p = add_epsg_def_ex (filter, first, last, 2515, "epsg", 2515,
        "Pulkovo 1942 / Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 147E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",147],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2515\"]]");
    p = add_epsg_def_ex (filter, first, last, 2516, "epsg", 2516,
        "Pulkovo 1942 / Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 153E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",153],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2516\"]]");
    p = add_epsg_def_ex (filter, first, last, 2517, "epsg", 2517,
        "Pulkovo 1942 / Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 159E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",159],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2517\"]]");
    p = add_epsg_def_ex (filter, first, last, 2518, "epsg", 2518,
        "Pulkovo 1942 / Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 165E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",165],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2518\"]]");
    p = add_epsg_def_ex (filter, first, last, 2519, "epsg", 2519,
        "Pulkovo 1942 / Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 171E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",171],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2519\"]]");
    p = add_epsg_def_ex (filter, first, last, 2520, "epsg", 2520,
        "Pulkovo 1942 / Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 177E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",177],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2520\"]]");
    p = add_epsg_def_ex (filter, first, last, 2521, "epsg", 2521,
        "Pulkovo 1942 / Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 177W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-177],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2521\"]]");
    p = add_epsg_def_ex (filter, first, last, 2522, "epsg", 2522,
        "Pulkovo 1942 / Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 171W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-171],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2522\"]]");
    p = add_epsg_def_ex (filter, first, last, 2523, "epsg", 2523,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 7\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",21],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",75");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2523\"]]");
    p = add_epsg_def_ex (filter, first, last, 2524, "epsg", 2524,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 8\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",24],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",85");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2524\"]]");
    p = add_epsg_def_ex (filter, first, last, 2525, "epsg", 2525,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 9\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",27],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",95");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2525\"]]");
    p = add_epsg_def_ex (filter, first, last, 2526, "epsg", 2526,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 10\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",30],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,




|







 







<
<
<

<







 







<
<
|







<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
....
1440
1441
1442
1443
1444
1445
1446


1447
1448
1449
1450
1451
1452
1453
1454


1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_04 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Albanian 1987 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Albanian_1987", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,


        "+ellps=krass +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Albanian 1987 / Gauss-Kruger zone 4\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Albanian 1987\",DATUM[\"Albanian_1987\",SPHEROID[\"Krass");
    add_srs_wkt (p, 2,
        "owsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]]");
    add_srs_wkt (p, 3,


        ",AUTHORITY[\"EPSG\",\"6191\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4191");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",21],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 10,
        ",4500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 11,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 12,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2462\"]]");
    p = add_epsg_def_ex (filter, first, last, 2463, "epsg", 2463,
        "Pulkovo 1995 / Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 21E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2463\"]]");
    p = add_epsg_def_ex (filter, first, last, 2464, "epsg", 2464,
        "Pulkovo 1995 / Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 27E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2464\"]]");
    p = add_epsg_def_ex (filter, first, last, 2465, "epsg", 2465,
        "Pulkovo 1995 / Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 33E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2465\"]]");
    p = add_epsg_def_ex (filter, first, last, 2466, "epsg", 2466,
        "Pulkovo 1995 / Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 39E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2466\"]]");
    p = add_epsg_def_ex (filter, first, last, 2467, "epsg", 2467,
        "Pulkovo 1995 / Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 45E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2467\"]]");
    p = add_epsg_def_ex (filter, first, last, 2468, "epsg", 2468,
        "Pulkovo 1995 / Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 51E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2468\"]]");
    p = add_epsg_def_ex (filter, first, last, 2469, "epsg", 2469,
        "Pulkovo 1995 / Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 57E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2469\"]]");
    p = add_epsg_def_ex (filter, first, last, 2470, "epsg", 2470,
        "Pulkovo 1995 / Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 63E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2470\"]]");
    p = add_epsg_def_ex (filter, first, last, 2471, "epsg", 2471,
        "Pulkovo 1995 / Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 69E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2471\"]]");
    p = add_epsg_def_ex (filter, first, last, 2472, "epsg", 2472,
        "Pulkovo 1995 / Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 75E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2472\"]]");
    p = add_epsg_def_ex (filter, first, last, 2473, "epsg", 2473,
        "Pulkovo 1995 / Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 81E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2473\"]]");
    p = add_epsg_def_ex (filter, first, last, 2474, "epsg", 2474,
        "Pulkovo 1995 / Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 87E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2474\"]]");
    p = add_epsg_def_ex (filter, first, last, 2475, "epsg", 2475,
        "Pulkovo 1995 / Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 93E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2475\"]]");
    p = add_epsg_def_ex (filter, first, last, 2476, "epsg", 2476,
        "Pulkovo 1995 / Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 99E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"2476\"]]");
    p = add_epsg_def_ex (filter, first, last, 2477, "epsg", 2477,
        "Pulkovo 1995 / Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 105E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",105],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2477\"]]");
    p = add_epsg_def_ex (filter, first, last, 2478, "epsg", 2478,
        "Pulkovo 1995 / Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 111E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2478\"]]");
    p = add_epsg_def_ex (filter, first, last, 2479, "epsg", 2479,
        "Pulkovo 1995 / Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 117E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",117],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2479\"]]");
    p = add_epsg_def_ex (filter, first, last, 2480, "epsg", 2480,
        "Pulkovo 1995 / Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 123E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",123],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2480\"]]");
    p = add_epsg_def_ex (filter, first, last, 2481, "epsg", 2481,
        "Pulkovo 1995 / Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 129E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",129],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2481\"]]");
    p = add_epsg_def_ex (filter, first, last, 2482, "epsg", 2482,
        "Pulkovo 1995 / Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 135E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",135],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2482\"]]");
    p = add_epsg_def_ex (filter, first, last, 2483, "epsg", 2483,
        "Pulkovo 1995 / Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 141E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",141],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2483\"]]");
    p = add_epsg_def_ex (filter, first, last, 2484, "epsg", 2484,
        "Pulkovo 1995 / Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 147E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",147],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2484\"]]");
    p = add_epsg_def_ex (filter, first, last, 2485, "epsg", 2485,
        "Pulkovo 1995 / Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 153E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",153],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2485\"]]");
    p = add_epsg_def_ex (filter, first, last, 2486, "epsg", 2486,
        "Pulkovo 1995 / Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 159E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",159],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2486\"]]");
    p = add_epsg_def_ex (filter, first, last, 2487, "epsg", 2487,
        "Pulkovo 1995 / Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 165E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",165],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2487\"]]");
    p = add_epsg_def_ex (filter, first, last, 2488, "epsg", 2488,
        "Pulkovo 1995 / Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 171E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",171],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2488\"]]");
    p = add_epsg_def_ex (filter, first, last, 2489, "epsg", 2489,
        "Pulkovo 1995 / Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 177E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",177],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"2489\"]]");
    p = add_epsg_def_ex (filter, first, last, 2490, "epsg", 2490,
        "Pulkovo 1995 / Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 177W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-177],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2490\"]]");
    p = add_epsg_def_ex (filter, first, last, 2491, "epsg", 2491,
        "Pulkovo 1995 / Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger CM 171W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-171],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2491\"]]");
    p = add_epsg_def_ex (filter, first, last, 2492, "epsg", 2492,
        "Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +e");
    add_proj4text (p, 1,
        "llps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 9E (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",9],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2492\"]]");
    p = add_epsg_def_ex (filter, first, last, 2493, "epsg", 2493,
        "Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 15E (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.1");
    add_srs_wkt (p, 4,
        "2],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "84\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",15");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2493\"]]");
    p = add_epsg_def_ex (filter, first, last, 2494, "epsg", 2494,
        "Pulkovo 1942 / Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 21E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2494\"]]");
    p = add_epsg_def_ex (filter, first, last, 2495, "epsg", 2495,
        "Pulkovo 1942 / Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 27E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2495\"]]");
    p = add_epsg_def_ex (filter, first, last, 2496, "epsg", 2496,
        "Pulkovo 1942 / Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 33E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2496\"]]");
    p = add_epsg_def_ex (filter, first, last, 2497, "epsg", 2497,
        "Pulkovo 1942 / Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 39E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2497\"]]");
    p = add_epsg_def_ex (filter, first, last, 2498, "epsg", 2498,
        "Pulkovo 1942 / Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 45E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2498\"]]");
    p = add_epsg_def_ex (filter, first, last, 2499, "epsg", 2499,
        "Pulkovo 1942 / Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 51E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2499\"]]");
    p = add_epsg_def_ex (filter, first, last, 2500, "epsg", 2500,
        "Pulkovo 1942 / Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 57E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2500\"]]");
    p = add_epsg_def_ex (filter, first, last, 2501, "epsg", 2501,
        "Pulkovo 1942 / Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 63E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2501\"]]");
    p = add_epsg_def_ex (filter, first, last, 2502, "epsg", 2502,
        "Pulkovo 1942 / Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 69E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2502\"]]");
    p = add_epsg_def_ex (filter, first, last, 2503, "epsg", 2503,
        "Pulkovo 1942 / Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 75E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2503\"]]");
    p = add_epsg_def_ex (filter, first, last, 2504, "epsg", 2504,
        "Pulkovo 1942 / Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 81E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2504\"]]");
    p = add_epsg_def_ex (filter, first, last, 2505, "epsg", 2505,
        "Pulkovo 1942 / Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 87E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2505\"]]");
    p = add_epsg_def_ex (filter, first, last, 2506, "epsg", 2506,
        "Pulkovo 1942 / Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 93E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2506\"]]");
    p = add_epsg_def_ex (filter, first, last, 2507, "epsg", 2507,
        "Pulkovo 1942 / Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 99E\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"2507\"]]");
    p = add_epsg_def_ex (filter, first, last, 2508, "epsg", 2508,
        "Pulkovo 1942 / Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 105E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",105],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2508\"]]");
    p = add_epsg_def_ex (filter, first, last, 2509, "epsg", 2509,
        "Pulkovo 1942 / Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 111E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",111],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2509\"]]");
    p = add_epsg_def_ex (filter, first, last, 2510, "epsg", 2510,
        "Pulkovo 1942 / Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 117E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",117],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2510\"]]");
    p = add_epsg_def_ex (filter, first, last, 2511, "epsg", 2511,
        "Pulkovo 1942 / Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 123E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",123],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2511\"]]");
    p = add_epsg_def_ex (filter, first, last, 2512, "epsg", 2512,
        "Pulkovo 1942 / Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 129E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",129],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2512\"]]");
    p = add_epsg_def_ex (filter, first, last, 2513, "epsg", 2513,
        "Pulkovo 1942 / Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 135E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",135],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2513\"]]");
    p = add_epsg_def_ex (filter, first, last, 2514, "epsg", 2514,
        "Pulkovo 1942 / Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 141E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",141],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2514\"]]");
    p = add_epsg_def_ex (filter, first, last, 2515, "epsg", 2515,
        "Pulkovo 1942 / Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 147E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",147],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2515\"]]");
    p = add_epsg_def_ex (filter, first, last, 2516, "epsg", 2516,
        "Pulkovo 1942 / Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 153E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",153],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2516\"]]");
    p = add_epsg_def_ex (filter, first, last, 2517, "epsg", 2517,
        "Pulkovo 1942 / Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 159E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",159],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2517\"]]");
    p = add_epsg_def_ex (filter, first, last, 2518, "epsg", 2518,
        "Pulkovo 1942 / Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 165E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",165],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2518\"]]");
    p = add_epsg_def_ex (filter, first, last, 2519, "epsg", 2519,
        "Pulkovo 1942 / Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 171E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",171],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2519\"]]");
    p = add_epsg_def_ex (filter, first, last, 2520, "epsg", 2520,
        "Pulkovo 1942 / Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 177E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",177],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"2520\"]]");
    p = add_epsg_def_ex (filter, first, last, 2521, "epsg", 2521,
        "Pulkovo 1942 / Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 177W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",-177],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"2521\"]]");
    p = add_epsg_def_ex (filter, first, last, 2522, "epsg", 2522,
        "Pulkovo 1942 / Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger CM 171W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",-171],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"2522\"]]");
    p = add_epsg_def_ex (filter, first, last, 2523, "epsg", 2523,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 7\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",21],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",7");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2523\"]]");
    p = add_epsg_def_ex (filter, first, last, 2524, "epsg", 2524,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 8\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",24],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",8");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2524\"]]");
    p = add_epsg_def_ex (filter, first, last, 2525, "epsg", 2525,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 9\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",27],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",9");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2525\"]]");
    p = add_epsg_def_ex (filter, first, last, 2526, "epsg", 2526,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 10\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",30],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,

Changes to src/srsinit/epsg_inlined_05.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
...
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
...
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
...
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
...
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
...
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
...
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
...
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
...
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
...
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
...
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
...
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
...
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
...
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
...
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
...
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
...
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
...
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
....
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
....
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
....
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
....
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
....
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
....
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
....
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
....
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
....
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
....
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
....
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
....
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
....
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
....
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
....
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
....
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
....
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
....
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
....
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
....
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
....
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
....
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
....
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
....
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
....
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
....
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
....
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
....
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
....
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
....
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
....
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
....
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
....
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
....
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
....
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
....
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
....
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
....
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
....
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
....
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
....
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
....
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
....
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
....
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
....
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
....
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
....
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
....
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_05 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 11\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",33],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 12\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",36],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 13\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",39],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 14\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",42],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 15\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",45],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 16\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",48],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 17\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",51],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 18\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",54],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 19\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 20\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",60],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 21\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",63],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 22\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",66],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 23\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",69],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 24\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",72],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 25\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",75],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 26\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",78],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 27\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",81],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 28\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",84],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 29\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",87],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 30\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",90],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 31\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",93],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 32\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",96],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 33", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 33\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",99],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 34", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 34\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",102],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 35", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 35\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 36", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 36\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",108],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 37", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 37\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 38", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 38\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",114],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 39", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 39\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 40", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 40\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",120],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 41", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 41\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 42", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 42\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",126],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 43", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 43\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 44", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 44\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",132],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 45", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 45\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 46", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 46\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",138],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 47", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 47\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 48", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 48\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",144],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 49", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 49\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 50", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 50\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",150],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 51", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 51\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 52", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 52\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",156],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 53", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 53\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 54", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 54\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",162],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 55", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 55\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 56", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 56\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",168],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 57", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 57\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 58", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 58\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 59", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 59\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_194");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,");
    add_srs_wkt (p, 4,
        "0.82,-0.12],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4284\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 9,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",180],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",60000000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2577\"]]");
    p = add_epsg_def_ex (filter, first, last, 2578, "epsg", 2578,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 61", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 61\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 62", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 62\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-174],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 63", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 63\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 64", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 64\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-168],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",21],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2582\"]]");
    p = add_epsg_def_ex (filter, first, last, 2583, "epsg", 2583,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",24],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2583\"]]");
    p = add_epsg_def_ex (filter, first, last, 2584, "epsg", 2584,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",27],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2584\"]]");
    p = add_epsg_def_ex (filter, first, last, 2585, "epsg", 2585,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",30],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2585\"]]");
    p = add_epsg_def_ex (filter, first, last, 2586, "epsg", 2586,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",33],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2586\"]]");
    p = add_epsg_def_ex (filter, first, last, 2587, "epsg", 2587,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",36],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2587\"]]");
    p = add_epsg_def_ex (filter, first, last, 2588, "epsg", 2588,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",39],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2588\"]]");
    p = add_epsg_def_ex (filter, first, last, 2589, "epsg", 2589,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",42],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2589\"]]");
    p = add_epsg_def_ex (filter, first, last, 2590, "epsg", 2590,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",45],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2590\"]]");
    p = add_epsg_def_ex (filter, first, last, 2591, "epsg", 2591,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",48],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2591\"]]");
    p = add_epsg_def_ex (filter, first, last, 2592, "epsg", 2592,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",51],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2592\"]]");
    p = add_epsg_def_ex (filter, first, last, 2593, "epsg", 2593,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",54],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2593\"]]");
    p = add_epsg_def_ex (filter, first, last, 2594, "epsg", 2594,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",57],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2594\"]]");
    p = add_epsg_def_ex (filter, first, last, 2595, "epsg", 2595,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",60],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2595\"]]");
    p = add_epsg_def_ex (filter, first, last, 2596, "epsg", 2596,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",63],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2596\"]]");
    p = add_epsg_def_ex (filter, first, last, 2597, "epsg", 2597,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",66],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2597\"]]");
    p = add_epsg_def_ex (filter, first, last, 2598, "epsg", 2598,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",69],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2598\"]]");
    p = add_epsg_def_ex (filter, first, last, 2599, "epsg", 2599,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",72],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2599\"]]");
    p = add_epsg_def_ex (filter, first, last, 2600, "epsg", 2600,
        "Lietuvos Koordinoei Sistema 1994 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "Lithuania_1994_ETRS89", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_");
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",75],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2601\"]]");
    p = add_epsg_def_ex (filter, first, last, 2602, "epsg", 2602,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",78],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2602\"]]");
    p = add_epsg_def_ex (filter, first, last, 2603, "epsg", 2603,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",81],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2603\"]]");
    p = add_epsg_def_ex (filter, first, last, 2604, "epsg", 2604,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",84],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2604\"]]");
    p = add_epsg_def_ex (filter, first, last, 2605, "epsg", 2605,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",87],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2605\"]]");
    p = add_epsg_def_ex (filter, first, last, 2606, "epsg", 2606,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",90],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2606\"]]");
    p = add_epsg_def_ex (filter, first, last, 2607, "epsg", 2607,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",93],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2607\"]]");
    p = add_epsg_def_ex (filter, first, last, 2608, "epsg", 2608,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",96],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2608\"]]");
    p = add_epsg_def_ex (filter, first, last, 2609, "epsg", 2609,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",99],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2609\"]]");
    p = add_epsg_def_ex (filter, first, last, 2610, "epsg", 2610,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",102],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",108],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",114],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",120],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",126],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",132],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",138],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",144],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",150],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,




|







 







<
<
<

<







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
...
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
...
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
...
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
...
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
...
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
...
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
...
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
...
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
...
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
...
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
...
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
...
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
...
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
...
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
....
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
....
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
....
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
....
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
....
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
....
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
....
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
....
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
....
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
....
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
....
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
....
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
....
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
....
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
....
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
....
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
....
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
....
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
....
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
....
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
....
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
....
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
....
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
....
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
....
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
....
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
....
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
....
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
....
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
....
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
....
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
....
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
....
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
....
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
....
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
....
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
....
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
....
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
....
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
....
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
....
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
....
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
....
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
....
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
....
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
....
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
....
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
....
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_05 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 11\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",33],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 12\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",36],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 13\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",39],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 14\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",42],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 15\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",45],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 16\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",48],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 17\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",51],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 18\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",54],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 19\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 20\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",60],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 21\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",63],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 22\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",66],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 23\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",69],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 24\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",72],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 25\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",75],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 26\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",78],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 27\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",81],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 28\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",84],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 29\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",87],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 30\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",90],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 31\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",93],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 32\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",96],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 33", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 33\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",99],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 34", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 34\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",102],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 35", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 35\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 36", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 36\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",108],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 37", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 37\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 38", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 38\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",114],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 39", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 39\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 40", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 40\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",120],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 41", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 41\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 42", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 42\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",126],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 43", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 43\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 44", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 44\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",132],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 45", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 45\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 46", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 46\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",138],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 47", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 47\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 48", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 48\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",144],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 49", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 49\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 50", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 50\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",150],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 51", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 51\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 52", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 52\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",156],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 53", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 53\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 54", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 54\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",162],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 55", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 55\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 56", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 56\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",168],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 57", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 57\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 58", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 58\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 59", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 59\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_194");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35");
    add_srs_wkt (p, 4,
        ",0.82,-0.12],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4284\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",180],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",60000000],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2577\"]]");
    p = add_epsg_def_ex (filter, first, last, 2578, "epsg", 2578,
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 61", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 61\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 62", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 62\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-174],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 63", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 63\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 64", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 64\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-168],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",21],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2582\"]]");
    p = add_epsg_def_ex (filter, first, last, 2583, "epsg", 2583,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",24],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2583\"]]");
    p = add_epsg_def_ex (filter, first, last, 2584, "epsg", 2584,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",27],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2584\"]]");
    p = add_epsg_def_ex (filter, first, last, 2585, "epsg", 2585,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",30],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2585\"]]");
    p = add_epsg_def_ex (filter, first, last, 2586, "epsg", 2586,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",33],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2586\"]]");
    p = add_epsg_def_ex (filter, first, last, 2587, "epsg", 2587,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",36],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2587\"]]");
    p = add_epsg_def_ex (filter, first, last, 2588, "epsg", 2588,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",39],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2588\"]]");
    p = add_epsg_def_ex (filter, first, last, 2589, "epsg", 2589,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",42],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2589\"]]");
    p = add_epsg_def_ex (filter, first, last, 2590, "epsg", 2590,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",45],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2590\"]]");
    p = add_epsg_def_ex (filter, first, last, 2591, "epsg", 2591,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",48],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2591\"]]");
    p = add_epsg_def_ex (filter, first, last, 2592, "epsg", 2592,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",51],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2592\"]]");
    p = add_epsg_def_ex (filter, first, last, 2593, "epsg", 2593,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",54],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2593\"]]");
    p = add_epsg_def_ex (filter, first, last, 2594, "epsg", 2594,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",57],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2594\"]]");
    p = add_epsg_def_ex (filter, first, last, 2595, "epsg", 2595,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",60],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2595\"]]");
    p = add_epsg_def_ex (filter, first, last, 2596, "epsg", 2596,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",63],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2596\"]]");
    p = add_epsg_def_ex (filter, first, last, 2597, "epsg", 2597,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",66],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2597\"]]");
    p = add_epsg_def_ex (filter, first, last, 2598, "epsg", 2598,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",69],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2598\"]]");
    p = add_epsg_def_ex (filter, first, last, 2599, "epsg", 2599,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",72],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2599\"]]");
    p = add_epsg_def_ex (filter, first, last, 2600, "epsg", 2600,
        "Lietuvos Koordinoei Sistema 1994 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "Lithuania_1994_ETRS89", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9998 +x_0=500000 +y_");
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",75],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2601\"]]");
    p = add_epsg_def_ex (filter, first, last, 2602, "epsg", 2602,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",78],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2602\"]]");
    p = add_epsg_def_ex (filter, first, last, 2603, "epsg", 2603,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",81],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2603\"]]");
    p = add_epsg_def_ex (filter, first, last, 2604, "epsg", 2604,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",84],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2604\"]]");
    p = add_epsg_def_ex (filter, first, last, 2605, "epsg", 2605,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",87],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2605\"]]");
    p = add_epsg_def_ex (filter, first, last, 2606, "epsg", 2606,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",90],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2606\"]]");
    p = add_epsg_def_ex (filter, first, last, 2607, "epsg", 2607,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",93],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2607\"]]");
    p = add_epsg_def_ex (filter, first, last, 2608, "epsg", 2608,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",96],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2608\"]]");
    p = add_epsg_def_ex (filter, first, last, 2609, "epsg", 2609,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",99],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2609\"]]");
    p = add_epsg_def_ex (filter, first, last, 2610, "epsg", 2610,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",102],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",108],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",114],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",120],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",126],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",132],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",138],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",144],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",150],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,

Changes to src/srsinit/epsg_inlined_06.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
...
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
...
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
...
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
...
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
...
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
...
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
...
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_06 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",156],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",162],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",168],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",180],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-174],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-168],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 7\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",21],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",7500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2641\"]]");
    p = add_epsg_def_ex (filter, first, last, 2642, "epsg", 2642,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 8\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",24],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",8500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2642\"]]");
    p = add_epsg_def_ex (filter, first, last, 2643, "epsg", 2643,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 9\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",27],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",9500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2643\"]]");
    p = add_epsg_def_ex (filter, first, last, 2644, "epsg", 2644,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 10\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",30],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",10");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2644\"]]");
    p = add_epsg_def_ex (filter, first, last, 2645, "epsg", 2645,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 11\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",33],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",11");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2645\"]]");
    p = add_epsg_def_ex (filter, first, last, 2646, "epsg", 2646,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 12\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",36],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",12");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2646\"]]");
    p = add_epsg_def_ex (filter, first, last, 2647, "epsg", 2647,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 13\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",39],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",13");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2647\"]]");
    p = add_epsg_def_ex (filter, first, last, 2648, "epsg", 2648,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 14\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",42],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",14");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2648\"]]");
    p = add_epsg_def_ex (filter, first, last, 2649, "epsg", 2649,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 15\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",45],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",15");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2649\"]]");
    p = add_epsg_def_ex (filter, first, last, 2650, "epsg", 2650,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 16\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",48],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",16");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2650\"]]");
    p = add_epsg_def_ex (filter, first, last, 2651, "epsg", 2651,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 17\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",51],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",17");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2651\"]]");
    p = add_epsg_def_ex (filter, first, last, 2652, "epsg", 2652,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 18\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",54],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",18");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2652\"]]");
    p = add_epsg_def_ex (filter, first, last, 2653, "epsg", 2653,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 19\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",57],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",19");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2653\"]]");
    p = add_epsg_def_ex (filter, first, last, 2654, "epsg", 2654,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 20\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",60],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",20");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2654\"]]");
    p = add_epsg_def_ex (filter, first, last, 2655, "epsg", 2655,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 21\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",63],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",21");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2655\"]]");
    p = add_epsg_def_ex (filter, first, last, 2656, "epsg", 2656,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 22\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",66],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",22");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2656\"]]");
    p = add_epsg_def_ex (filter, first, last, 2657, "epsg", 2657,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 23\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",69],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",23");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2657\"]]");
    p = add_epsg_def_ex (filter, first, last, 2658, "epsg", 2658,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 24\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",72],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",24");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2658\"]]");
    p = add_epsg_def_ex (filter, first, last, 2659, "epsg", 2659,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 25\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",75],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",25");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2659\"]]");
    p = add_epsg_def_ex (filter, first, last, 2660, "epsg", 2660,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 26\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",78],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",26");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2660\"]]");
    p = add_epsg_def_ex (filter, first, last, 2661, "epsg", 2661,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 27\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",81],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",27");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2661\"]]");
    p = add_epsg_def_ex (filter, first, last, 2662, "epsg", 2662,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 28\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",84],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",28");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2662\"]]");
    p = add_epsg_def_ex (filter, first, last, 2663, "epsg", 2663,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 29\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",87],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",29");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2663\"]]");
    p = add_epsg_def_ex (filter, first, last, 2664, "epsg", 2664,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 30\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",90],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",30");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2664\"]]");
    p = add_epsg_def_ex (filter, first, last, 2665, "epsg", 2665,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 31\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",93],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",31");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2665\"]]");
    p = add_epsg_def_ex (filter, first, last, 2666, "epsg", 2666,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 32\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",96],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",32");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2666\"]]");
    p = add_epsg_def_ex (filter, first, last, 2667, "epsg", 2667,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 33", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 33\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",99],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",33");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2667\"]]");
    p = add_epsg_def_ex (filter, first, last, 2668, "epsg", 2668,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 34", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 34\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",102],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3");
    add_srs_wkt (p, 11,
        "4500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2668\"]]");
    p = add_epsg_def_ex (filter, first, last, 2669, "epsg", 2669,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 35", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 35\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",105],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3");
    add_srs_wkt (p, 11,
        "5500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2669\"]]");
    p = add_epsg_def_ex (filter, first, last, 2670, "epsg", 2670,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 36", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 36\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",108],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3");
    add_srs_wkt (p, 11,
        "6500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2670\"]]");
    p = add_epsg_def_ex (filter, first, last, 2671, "epsg", 2671,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 37", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 37\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",111],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3");
    add_srs_wkt (p, 11,
        "7500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2671\"]]");
    p = add_epsg_def_ex (filter, first, last, 2672, "epsg", 2672,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 38", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 38\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",114],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3");
    add_srs_wkt (p, 11,
        "8500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2672\"]]");
    p = add_epsg_def_ex (filter, first, last, 2673, "epsg", 2673,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 39", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 39\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",117],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",3");
    add_srs_wkt (p, 11,
        "9500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2673\"]]");
    p = add_epsg_def_ex (filter, first, last, 2674, "epsg", 2674,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 40", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 40\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",120],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "0500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2674\"]]");
    p = add_epsg_def_ex (filter, first, last, 2675, "epsg", 2675,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 41", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 41\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",123],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "1500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2675\"]]");
    p = add_epsg_def_ex (filter, first, last, 2676, "epsg", 2676,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 42", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 42\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",126],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "2500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2676\"]]");
    p = add_epsg_def_ex (filter, first, last, 2677, "epsg", 2677,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 43", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 43\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",129],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "3500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2677\"]]");
    p = add_epsg_def_ex (filter, first, last, 2678, "epsg", 2678,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 44", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 44\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",132],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "4500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2678\"]]");
    p = add_epsg_def_ex (filter, first, last, 2679, "epsg", 2679,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 45", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 45\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",135],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "5500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2679\"]]");
    p = add_epsg_def_ex (filter, first, last, 2680, "epsg", 2680,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 46", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 46\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",138],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "6500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2680\"]]");
    p = add_epsg_def_ex (filter, first, last, 2681, "epsg", 2681,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 47", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 47\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",141],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "7500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2681\"]]");
    p = add_epsg_def_ex (filter, first, last, 2682, "epsg", 2682,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 48", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 48\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",144],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "8500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2682\"]]");
    p = add_epsg_def_ex (filter, first, last, 2683, "epsg", 2683,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 49", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 49\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",147],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",4");
    add_srs_wkt (p, 11,
        "9500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2683\"]]");
    p = add_epsg_def_ex (filter, first, last, 2684, "epsg", 2684,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 50", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 50\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",150],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "0500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2684\"]]");
    p = add_epsg_def_ex (filter, first, last, 2685, "epsg", 2685,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 51", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 51\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",153],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "1500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2685\"]]");
    p = add_epsg_def_ex (filter, first, last, 2686, "epsg", 2686,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 52", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 52\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",156],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "2500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2686\"]]");
    p = add_epsg_def_ex (filter, first, last, 2687, "epsg", 2687,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 53", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 53\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",159],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "3500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2687\"]]");
    p = add_epsg_def_ex (filter, first, last, 2688, "epsg", 2688,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 54", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 54\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",162],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "4500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2688\"]]");
    p = add_epsg_def_ex (filter, first, last, 2689, "epsg", 2689,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 55", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 55\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",165],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "5500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2689\"]]");
    p = add_epsg_def_ex (filter, first, last, 2690, "epsg", 2690,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 56", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 56\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",168],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "6500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2690\"]]");
    p = add_epsg_def_ex (filter, first, last, 2691, "epsg", 2691,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 57", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 57\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",171],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "7500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2691\"]]");
    p = add_epsg_def_ex (filter, first, last, 2692, "epsg", 2692,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 58", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 58\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",174],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "8500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2692\"]]");
    p = add_epsg_def_ex (filter, first, last, 2693, "epsg", 2693,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 59", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 59\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",177],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "9500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2693\"]]");
    p = add_epsg_def_ex (filter, first, last, 2694, "epsg", 2694,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_199");
    add_srs_wkt (p, 2,
        "5\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.");
    add_srs_wkt (p, 4,
        "13,-0.22],AUTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4200\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",180],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",60000000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2694\"]]");
    p = add_epsg_def_ex (filter, first, last, 2695, "epsg", 2695,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 61", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 61\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-177],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "61500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2695\"]]");
    p = add_epsg_def_ex (filter, first, last, 2696, "epsg", 2696,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 62", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 62\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-174],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "62500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2696\"]]");
    p = add_epsg_def_ex (filter, first, last, 2697, "epsg", 2697,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 63", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 63\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-171],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "63500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2697\"]]");
    p = add_epsg_def_ex (filter, first, last, 2698, "epsg", 2698,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 64", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 64\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-168],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "64500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2698\"]]");
    p = add_epsg_def_ex (filter, first, last, 2699, "epsg", 2699,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",21],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2699\"]]");
    p = add_epsg_def_ex (filter, first, last, 2700, "epsg", 2700,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",24],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2700\"]]");
    p = add_epsg_def_ex (filter, first, last, 2701, "epsg", 2701,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",27],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2701\"]]");
    p = add_epsg_def_ex (filter, first, last, 2702, "epsg", 2702,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",30],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2702\"]]");
    p = add_epsg_def_ex (filter, first, last, 2703, "epsg", 2703,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",33],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2703\"]]");
    p = add_epsg_def_ex (filter, first, last, 2704, "epsg", 2704,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",36],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2704\"]]");
    p = add_epsg_def_ex (filter, first, last, 2705, "epsg", 2705,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",39],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2705\"]]");
    p = add_epsg_def_ex (filter, first, last, 2706, "epsg", 2706,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",42],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2706\"]]");
    p = add_epsg_def_ex (filter, first, last, 2707, "epsg", 2707,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",45],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2707\"]]");
    p = add_epsg_def_ex (filter, first, last, 2708, "epsg", 2708,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",48],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2708\"]]");
    p = add_epsg_def_ex (filter, first, last, 2709, "epsg", 2709,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",51],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2709\"]]");
    p = add_epsg_def_ex (filter, first, last, 2710, "epsg", 2710,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",54],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2710\"]]");
    p = add_epsg_def_ex (filter, first, last, 2711, "epsg", 2711,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",57],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2711\"]]");
    p = add_epsg_def_ex (filter, first, last, 2712, "epsg", 2712,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",60],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2712\"]]");
    p = add_epsg_def_ex (filter, first, last, 2713, "epsg", 2713,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",63],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2713\"]]");
    p = add_epsg_def_ex (filter, first, last, 2714, "epsg", 2714,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",66],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2714\"]]");
    p = add_epsg_def_ex (filter, first, last, 2715, "epsg", 2715,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",69],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2715\"]]");
    p = add_epsg_def_ex (filter, first, last, 2716, "epsg", 2716,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",72],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2716\"]]");
    p = add_epsg_def_ex (filter, first, last, 2717, "epsg", 2717,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2717\"]]");
    p = add_epsg_def_ex (filter, first, last, 2718, "epsg", 2718,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",78],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2718\"]]");
    p = add_epsg_def_ex (filter, first, last, 2719, "epsg", 2719,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",81],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2719\"]]");
    p = add_epsg_def_ex (filter, first, last, 2720, "epsg", 2720,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",84],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2720\"]]");
    p = add_epsg_def_ex (filter, first, last, 2721, "epsg", 2721,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",87],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2721\"]]");
    p = add_epsg_def_ex (filter, first, last, 2722, "epsg", 2722,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",90],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2722\"]]");
    p = add_epsg_def_ex (filter, first, last, 2723, "epsg", 2723,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",93],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2723\"]]");
    p = add_epsg_def_ex (filter, first, last, 2724, "epsg", 2724,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",96],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2724\"]]");
    p = add_epsg_def_ex (filter, first, last, 2725, "epsg", 2725,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",99],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"2725\"]]");
    p = add_epsg_def_ex (filter, first, last, 2726, "epsg", 2726,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",102],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2726\"]]");
    p = add_epsg_def_ex (filter, first, last, 2727, "epsg", 2727,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",105],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2727\"]]");
    p = add_epsg_def_ex (filter, first, last, 2728, "epsg", 2728,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",108],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2728\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

|

|
|
|




|

|



|

|

|

|













|

|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
...
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
...
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
...
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
...
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
...
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































3876
3877






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_06 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",156],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",162],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",168],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",180],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-174],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-168],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 7\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",21],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",75");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2641\"]]");
    p = add_epsg_def_ex (filter, first, last, 2642, "epsg", 2642,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 8\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",24],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",85");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2642\"]]");
    p = add_epsg_def_ex (filter, first, last, 2643, "epsg", 2643,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 9\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",27],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",95");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2643\"]]");
    p = add_epsg_def_ex (filter, first, last, 2644, "epsg", 2644,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 10\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",30],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "10500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2644\"]]");
    p = add_epsg_def_ex (filter, first, last, 2645, "epsg", 2645,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 11\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",33],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "11500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2645\"]]");
    p = add_epsg_def_ex (filter, first, last, 2646, "epsg", 2646,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 12\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",36],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "12500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2646\"]]");
    p = add_epsg_def_ex (filter, first, last, 2647, "epsg", 2647,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 13\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",39],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "13500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2647\"]]");
    p = add_epsg_def_ex (filter, first, last, 2648, "epsg", 2648,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 14\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",42],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "14500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2648\"]]");
    p = add_epsg_def_ex (filter, first, last, 2649, "epsg", 2649,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 15\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",45],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "15500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2649\"]]");
    p = add_epsg_def_ex (filter, first, last, 2650, "epsg", 2650,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 16\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",48],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "16500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2650\"]]");
    p = add_epsg_def_ex (filter, first, last, 2651, "epsg", 2651,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 17\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",51],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "17500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2651\"]]");
    p = add_epsg_def_ex (filter, first, last, 2652, "epsg", 2652,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=18500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 18\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",54],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "18500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2652\"]]");
    p = add_epsg_def_ex (filter, first, last, 2653, "epsg", 2653,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=19500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 19\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "19500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2653\"]]");
    p = add_epsg_def_ex (filter, first, last, 2654, "epsg", 2654,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=20500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 20\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",60],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "20500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2654\"]]");
    p = add_epsg_def_ex (filter, first, last, 2655, "epsg", 2655,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=21500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 21\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",63],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "21500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2655\"]]");
    p = add_epsg_def_ex (filter, first, last, 2656, "epsg", 2656,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=22500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 22\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",66],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "22500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2656\"]]");
    p = add_epsg_def_ex (filter, first, last, 2657, "epsg", 2657,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=23500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 23\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",69],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "23500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2657\"]]");
    p = add_epsg_def_ex (filter, first, last, 2658, "epsg", 2658,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=24500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 24\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",72],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "24500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2658\"]]");
    p = add_epsg_def_ex (filter, first, last, 2659, "epsg", 2659,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=25500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 25\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",75],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "25500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2659\"]]");
    p = add_epsg_def_ex (filter, first, last, 2660, "epsg", 2660,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 26\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",78],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "26500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2660\"]]");
    p = add_epsg_def_ex (filter, first, last, 2661, "epsg", 2661,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 27\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",81],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "27500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2661\"]]");
    p = add_epsg_def_ex (filter, first, last, 2662, "epsg", 2662,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 28\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",84],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "28500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2662\"]]");
    p = add_epsg_def_ex (filter, first, last, 2663, "epsg", 2663,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 29\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",87],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "29500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2663\"]]");
    p = add_epsg_def_ex (filter, first, last, 2664, "epsg", 2664,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 30\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",90],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "30500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2664\"]]");
    p = add_epsg_def_ex (filter, first, last, 2665, "epsg", 2665,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 31\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",93],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "31500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2665\"]]");
    p = add_epsg_def_ex (filter, first, last, 2666, "epsg", 2666,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 32\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",96],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "32500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2666\"]]");
    p = add_epsg_def_ex (filter, first, last, 2667, "epsg", 2667,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 33", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 33\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",99],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "33500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2667\"]]");
    p = add_epsg_def_ex (filter, first, last, 2668, "epsg", 2668,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 34", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 34\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",102],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",34500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2668\"]]");
    p = add_epsg_def_ex (filter, first, last, 2669, "epsg", 2669,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 35", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 35\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",35500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2669\"]]");
    p = add_epsg_def_ex (filter, first, last, 2670, "epsg", 2670,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 36", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 36\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",108],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",36500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2670\"]]");
    p = add_epsg_def_ex (filter, first, last, 2671, "epsg", 2671,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 37", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 37\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",37500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2671\"]]");
    p = add_epsg_def_ex (filter, first, last, 2672, "epsg", 2672,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 38", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 38\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",114],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",38500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2672\"]]");
    p = add_epsg_def_ex (filter, first, last, 2673, "epsg", 2673,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 39", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 39\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",39500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2673\"]]");
    p = add_epsg_def_ex (filter, first, last, 2674, "epsg", 2674,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 40", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=40500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 40\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",120],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",40500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2674\"]]");
    p = add_epsg_def_ex (filter, first, last, 2675, "epsg", 2675,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 41", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=41500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 41\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",41500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2675\"]]");
    p = add_epsg_def_ex (filter, first, last, 2676, "epsg", 2676,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 42", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=42500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 42\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",126],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",42500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2676\"]]");
    p = add_epsg_def_ex (filter, first, last, 2677, "epsg", 2677,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 43", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=43500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 43\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",43500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2677\"]]");
    p = add_epsg_def_ex (filter, first, last, 2678, "epsg", 2678,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 44", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=44500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 44\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",132],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",44500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2678\"]]");
    p = add_epsg_def_ex (filter, first, last, 2679, "epsg", 2679,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 45", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=45500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 45\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",45500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2679\"]]");
    p = add_epsg_def_ex (filter, first, last, 2680, "epsg", 2680,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 46", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=46500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 46\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",138],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",46500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2680\"]]");
    p = add_epsg_def_ex (filter, first, last, 2681, "epsg", 2681,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 47", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=47500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 47\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",47500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2681\"]]");
    p = add_epsg_def_ex (filter, first, last, 2682, "epsg", 2682,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 48", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=48500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 48\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",144],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",48500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2682\"]]");
    p = add_epsg_def_ex (filter, first, last, 2683, "epsg", 2683,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 49", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=49500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 49\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",49500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2683\"]]");
    p = add_epsg_def_ex (filter, first, last, 2684, "epsg", 2684,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 50", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=50500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 50\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",150],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",50500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2684\"]]");
    p = add_epsg_def_ex (filter, first, last, 2685, "epsg", 2685,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 51", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=51500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 51\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",51500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2685\"]]");
    p = add_epsg_def_ex (filter, first, last, 2686, "epsg", 2686,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 52", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=52500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 52\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",156],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",52500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2686\"]]");
    p = add_epsg_def_ex (filter, first, last, 2687, "epsg", 2687,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 53", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=53500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 53\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",53500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2687\"]]");
    p = add_epsg_def_ex (filter, first, last, 2688, "epsg", 2688,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 54", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=54500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 54\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",162],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",54500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2688\"]]");
    p = add_epsg_def_ex (filter, first, last, 2689, "epsg", 2689,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 55", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=55500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 55\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",55500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2689\"]]");
    p = add_epsg_def_ex (filter, first, last, 2690, "epsg", 2690,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 56", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=56500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 56\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",168],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",56500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2690\"]]");
    p = add_epsg_def_ex (filter, first, last, 2691, "epsg", 2691,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 57", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=57500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 57\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",57500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2691\"]]");
    p = add_epsg_def_ex (filter, first, last, 2692, "epsg", 2692,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 58", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=58500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 58\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",58500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2692\"]]");
    p = add_epsg_def_ex (filter, first, last, 2693, "epsg", 2693,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 59", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=59500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 59\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",59500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2693\"]]");
    p = add_epsg_def_ex (filter, first, last, 2694, "epsg", 2694,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60000000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_199");
    add_srs_wkt (p, 2,
        "5\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,");
    add_srs_wkt (p, 4,
        "0.13,-0.22],AUTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4200\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 9,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",180],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",60000000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"2694\"]]");
    p = add_epsg_def_ex (filter, first, last, 2695, "epsg", 2695,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 61", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=61500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13");
    add_proj4text (p, 2,
        ",-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 61\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",61500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2695\"]]");
    p = add_epsg_def_ex (filter, first, last, 2696, "epsg", 2696,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 62", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=62500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13");
    add_proj4text (p, 2,
        ",-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 62\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-174],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",62500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2696\"]]");
    p = add_epsg_def_ex (filter, first, last, 2697, "epsg", 2697,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 63", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=63500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13");
    add_proj4text (p, 2,
        ",-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 63\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",63500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2697\"]]");
    p = add_epsg_def_ex (filter, first, last, 2698, "epsg", 2698,
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 64", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=64500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13");
    add_proj4text (p, 2,
        ",-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 64\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-168],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",64500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"2698\"]]");
    p = add_epsg_def_ex (filter, first, last, 2699, "epsg", 2699,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",21],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2699\"]]");
    p = add_epsg_def_ex (filter, first, last, 2700, "epsg", 2700,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",24],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2700\"]]");
    p = add_epsg_def_ex (filter, first, last, 2701, "epsg", 2701,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",27],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2701\"]]");
    p = add_epsg_def_ex (filter, first, last, 2702, "epsg", 2702,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",30],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2702\"]]");
    p = add_epsg_def_ex (filter, first, last, 2703, "epsg", 2703,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",33],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2703\"]]");
    p = add_epsg_def_ex (filter, first, last, 2704, "epsg", 2704,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",36],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2704\"]]");
    p = add_epsg_def_ex (filter, first, last, 2705, "epsg", 2705,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",39],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2705\"]]");
    p = add_epsg_def_ex (filter, first, last, 2706, "epsg", 2706,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",42],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2706\"]]");
    p = add_epsg_def_ex (filter, first, last, 2707, "epsg", 2707,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",45],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2707\"]]");
    p = add_epsg_def_ex (filter, first, last, 2708, "epsg", 2708,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",48],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2708\"]]");
    p = add_epsg_def_ex (filter, first, last, 2709, "epsg", 2709,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",51],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2709\"]]");
    p = add_epsg_def_ex (filter, first, last, 2710, "epsg", 2710,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=54 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",54],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2710\"]]");
    p = add_epsg_def_ex (filter, first, last, 2711, "epsg", 2711,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",57],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2711\"]]");
    p = add_epsg_def_ex (filter, first, last, 2712, "epsg", 2712,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=60 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",60],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2712\"]]");
    p = add_epsg_def_ex (filter, first, last, 2713, "epsg", 2713,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",63],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2713\"]]");
    p = add_epsg_def_ex (filter, first, last, 2714, "epsg", 2714,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=66 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",66],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2714\"]]");
    p = add_epsg_def_ex (filter, first, last, 2715, "epsg", 2715,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",69],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2715\"]]");
    p = add_epsg_def_ex (filter, first, last, 2716, "epsg", 2716,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=72 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",72],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2716\"]]");
    p = add_epsg_def_ex (filter, first, last, 2717, "epsg", 2717,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",75],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2717\"]]");
    p = add_epsg_def_ex (filter, first, last, 2718, "epsg", 2718,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",78],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2718\"]]");
    p = add_epsg_def_ex (filter, first, last, 2719, "epsg", 2719,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",81],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2719\"]]");
    p = add_epsg_def_ex (filter, first, last, 2720, "epsg", 2720,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",84],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2720\"]]");
    p = add_epsg_def_ex (filter, first, last, 2721, "epsg", 2721,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",87],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2721\"]]");
    p = add_epsg_def_ex (filter, first, last, 2722, "epsg", 2722,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",90],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2722\"]]");
    p = add_epsg_def_ex (filter, first, last, 2723, "epsg", 2723,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",93],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2723\"]]");
    p = add_epsg_def_ex (filter, first, last, 2724, "epsg", 2724,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",96],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"2724\"]]");
    p = add_epsg_def_ex (filter, first, last, 2725, "epsg", 2725,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",99],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































        ",EAST],AUTHORITY[\"EPSG\",\"2725\"]]");
    p = add_epsg_def_ex (filter, first, last, 2726, "epsg", 2726,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",102],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2726\"]]");
    p = add_epsg_def_ex (filter, first, last, 2727, "epsg", 2727,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2727\"]]");
    p = add_epsg_def_ex (filter, first, last, 2728, "epsg", 2728,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",108],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2728\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_07.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342


343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_07 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",111],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2729\"]]");
    p = add_epsg_def_ex (filter, first, last, 2730, "epsg", 2730,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",114],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2730\"]]");
    p = add_epsg_def_ex (filter, first, last, 2731, "epsg", 2731,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",117],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2731\"]]");
    p = add_epsg_def_ex (filter, first, last, 2732, "epsg", 2732,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",120],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2732\"]]");
    p = add_epsg_def_ex (filter, first, last, 2733, "epsg", 2733,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",123],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2733\"]]");
    p = add_epsg_def_ex (filter, first, last, 2734, "epsg", 2734,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",126],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2734\"]]");
    p = add_epsg_def_ex (filter, first, last, 2735, "epsg", 2735,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",129],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2735\"]]");
    p = add_epsg_def_ex (filter, first, last, 2736, "epsg", 2736,
        "Tete / UTM zone 36S", 0, 0,
        "Clarke 1866", "Greenwich",
        "Tete", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=clrk66 +towgs84=-80,-10");
    add_proj4text (p, 1,
        "0,-228,0,0,0,0 +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"Tete / UTM zone 36S\",GEOGCS[\"Tete\",DATUM[\"T");
    add_srs_wkt (p, 1,
        "ete\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821389");
    add_srs_wkt (p, 2,
        "82,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-80,-100,-228,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6127\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4127\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 9,
        "\",33],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"fa");
    add_srs_wkt (p, 10,
        "lse_easting\",500000],PARAMETER[\"false_northing\",10000");
    add_srs_wkt (p, 11,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 12,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"2736\"]]");
    p = add_epsg_def_ex (filter, first, last, 2737, "epsg", 2737,
        "Tete / UTM zone 37S", 0, 0,
        "Clarke 1866", "Greenwich",
        "Tete", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=clrk66 +towgs84=-80,-10");
    add_proj4text (p, 1,
        "0,-228,0,0,0,0 +units=m +no_defs");



    add_srs_wkt (p, 0,
        "PROJCS[\"Tete / UTM zone 37S\",GEOGCS[\"Tete\",DATUM[\"T");
    add_srs_wkt (p, 1,
        "ete\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821389");
    add_srs_wkt (p, 2,
        "82,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-80,-100,-228,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6127\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4127\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 9,
        "\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"fa");
    add_srs_wkt (p, 10,
        "lse_easting\",500000],PARAMETER[\"false_northing\",10000");
    add_srs_wkt (p, 11,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 12,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"2737\"]]");
    p = add_epsg_def_ex (filter, first, last, 2738, "epsg", 2738,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",132],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2738\"]]");
    p = add_epsg_def_ex (filter, first, last, 2739, "epsg", 2739,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",135],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2739\"]]");
    p = add_epsg_def_ex (filter, first, last, 2740, "epsg", 2740,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",138],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2740\"]]");
    p = add_epsg_def_ex (filter, first, last, 2741, "epsg", 2741,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",141],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2741\"]]");
    p = add_epsg_def_ex (filter, first, last, 2742, "epsg", 2742,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",144],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2742\"]]");
    p = add_epsg_def_ex (filter, first, last, 2743, "epsg", 2743,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",147],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2743\"]]");
    p = add_epsg_def_ex (filter, first, last, 2744, "epsg", 2744,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",150],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2744\"]]");
    p = add_epsg_def_ex (filter, first, last, 2745, "epsg", 2745,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",153],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2745\"]]");
    p = add_epsg_def_ex (filter, first, last, 2746, "epsg", 2746,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",156],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2746\"]]");
    p = add_epsg_def_ex (filter, first, last, 2747, "epsg", 2747,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",159],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2747\"]]");
    p = add_epsg_def_ex (filter, first, last, 2748, "epsg", 2748,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",162],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2748\"]]");
    p = add_epsg_def_ex (filter, first, last, 2749, "epsg", 2749,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",165],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2749\"]]");
    p = add_epsg_def_ex (filter, first, last, 2750, "epsg", 2750,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",168],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2750\"]]");
    p = add_epsg_def_ex (filter, first, last, 2751, "epsg", 2751,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",171],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2751\"]]");
    p = add_epsg_def_ex (filter, first, last, 2752, "epsg", 2752,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",174],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2752\"]]");
    p = add_epsg_def_ex (filter, first, last, 2753, "epsg", 2753,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",177],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2753\"]]");
    p = add_epsg_def_ex (filter, first, last, 2754, "epsg", 2754,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",180],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"2754\"]]");
    p = add_epsg_def_ex (filter, first, last, 2755, "epsg", 2755,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-177],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2755\"]]");
    p = add_epsg_def_ex (filter, first, last, 2756, "epsg", 2756,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-174],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2756\"]]");
    p = add_epsg_def_ex (filter, first, last, 2757, "epsg", 2757,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-171],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2757\"]]");
    p = add_epsg_def_ex (filter, first, last, 2758, "epsg", 2758,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-168],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2758\"]]");
    p = add_epsg_def_ex (filter, first, last, 2759, "epsg", 2759,
        "NAD83(HARN) / Alabama East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");




|







 







<
<
<

<







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|






|

|
>
>



|

|

|

|

|

|

|

|

|

|

|

|

|






|

<
>
>
>



|

|

|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_07 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2729\"]]");
    p = add_epsg_def_ex (filter, first, last, 2730, "epsg", 2730,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",114],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2730\"]]");
    p = add_epsg_def_ex (filter, first, last, 2731, "epsg", 2731,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2731\"]]");
    p = add_epsg_def_ex (filter, first, last, 2732, "epsg", 2732,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",120],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2732\"]]");
    p = add_epsg_def_ex (filter, first, last, 2733, "epsg", 2733,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2733\"]]");
    p = add_epsg_def_ex (filter, first, last, 2734, "epsg", 2734,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=126 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",126],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2734\"]]");
    p = add_epsg_def_ex (filter, first, last, 2735, "epsg", 2735,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2735\"]]");
    p = add_epsg_def_ex (filter, first, last, 2736, "epsg", 2736,
        "Tete / UTM zone 36S", 0, 0,
        "Clarke 1866", "Greenwich",
        "Tete", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=clrk66 +towgs84=-73.472");
    add_proj4text (p, 1,
        ",-51.66,-112.482,0.953,4.6,-2.368,0.586 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tete / UTM zone 36S\",GEOGCS[\"Tete\",DATUM[\"T");
    add_srs_wkt (p, 1,
        "ete\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821390");
    add_srs_wkt (p, 2,
        "06,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-73.472,-51.66,");
    add_srs_wkt (p, 3,
        "-112.482,0.953,4.6,-2.368,0.586],AUTHORITY[\"EPSG\",\"61");
    add_srs_wkt (p, 4,
        "27\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4127\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"2736\"]]");
    p = add_epsg_def_ex (filter, first, last, 2737, "epsg", 2737,
        "Tete / UTM zone 37S", 0, 0,
        "Clarke 1866", "Greenwich",
        "Tete", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=clrk66 +towgs84=-73.472");
    add_proj4text (p, 1,

        ",-51.66,-112.482,0.953,4.6,-2.368,0.586 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tete / UTM zone 37S\",GEOGCS[\"Tete\",DATUM[\"T");
    add_srs_wkt (p, 1,
        "ete\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821390");
    add_srs_wkt (p, 2,
        "06,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-73.472,-51.66,");
    add_srs_wkt (p, 3,
        "-112.482,0.953,4.6,-2.368,0.586],AUTHORITY[\"EPSG\",\"61");
    add_srs_wkt (p, 4,
        "27\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4127\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"2737\"]]");
    p = add_epsg_def_ex (filter, first, last, 2738, "epsg", 2738,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=132 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",132],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2738\"]]");
    p = add_epsg_def_ex (filter, first, last, 2739, "epsg", 2739,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2739\"]]");
    p = add_epsg_def_ex (filter, first, last, 2740, "epsg", 2740,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=138 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",138],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2740\"]]");
    p = add_epsg_def_ex (filter, first, last, 2741, "epsg", 2741,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2741\"]]");
    p = add_epsg_def_ex (filter, first, last, 2742, "epsg", 2742,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=144 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",144],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2742\"]]");
    p = add_epsg_def_ex (filter, first, last, 2743, "epsg", 2743,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2743\"]]");
    p = add_epsg_def_ex (filter, first, last, 2744, "epsg", 2744,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=150 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",150],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2744\"]]");
    p = add_epsg_def_ex (filter, first, last, 2745, "epsg", 2745,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2745\"]]");
    p = add_epsg_def_ex (filter, first, last, 2746, "epsg", 2746,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=156 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",156],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2746\"]]");
    p = add_epsg_def_ex (filter, first, last, 2747, "epsg", 2747,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2747\"]]");
    p = add_epsg_def_ex (filter, first, last, 2748, "epsg", 2748,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=162 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",162],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2748\"]]");
    p = add_epsg_def_ex (filter, first, last, 2749, "epsg", 2749,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2749\"]]");
    p = add_epsg_def_ex (filter, first, last, 2750, "epsg", 2750,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=168 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",168],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2750\"]]");
    p = add_epsg_def_ex (filter, first, last, 2751, "epsg", 2751,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2751\"]]");
    p = add_epsg_def_ex (filter, first, last, 2752, "epsg", 2752,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=174 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2752\"]]");
    p = add_epsg_def_ex (filter, first, last, 2753, "epsg", 2753,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2753\"]]");
    p = add_epsg_def_ex (filter, first, last, 2754, "epsg", 2754,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",180],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2754\"]]");
    p = add_epsg_def_ex (filter, first, last, 2755, "epsg", 2755,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2755\"]]");
    p = add_epsg_def_ex (filter, first, last, 2756, "epsg", 2756,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-174 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-174],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2756\"]]");
    p = add_epsg_def_ex (filter, first, last, 2757, "epsg", 2757,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2757\"]]");
    p = add_epsg_def_ex (filter, first, last, 2758, "epsg", 2758,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-168 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-168],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"2758\"]]");
    p = add_epsg_def_ex (filter, first, last, 2759, "epsg", 2759,
        "NAD83(HARN) / Alabama East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");

Changes to src/srsinit/epsg_inlined_08.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_08 (int filter, struct epsg_defs **first, struct epsg_defs **last)




|







 







<
<
<

<







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_08 (int filter, struct epsg_defs **first, struct epsg_defs **last)

Changes to src/srsinit/epsg_inlined_09.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
...
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
...
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
...
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
...
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
....
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
....
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
....
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_09 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beduaram / TM 13 NE\",GEOGCS[\"Beduaram\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Beduaram\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,2");
    add_srs_wkt (p, 2,
        "93.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "106,-87,188,0,0,0,0],AUTHORITY[\"EPSG\",\"6213\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
................................................................................
        "Qatar_National_Datum_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.9");
    add_proj4text (p, 1,
        "9999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.4");
    add_proj4text (p, 2,
        "248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.65");
    add_proj4text (p, 3,
        "7065 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"QND95 / Qatar National Grid\",GEOGCS[\"QND95\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Qatar_National_Datum_1995\",SPHEROID[\"Internati");
    add_srs_wkt (p, 2,
        "onal 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[-119.4248,-303.65872,-11.00061,1.164298,0.174458,1");
    add_srs_wkt (p, 4,
        ".096259,3.657065],AUTHORITY[\"EPSG\",\"6614\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4614\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",24.45],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",51.21666666666667],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",0.99999],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 12,
        "ETER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 14,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"2932\"]]");
    p = add_epsg_def_ex (filter, first, last, 2933, "epsg", 2933,
        "Segara / UTM zone 50S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Gunung_Segara", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=bessel +towgs84=-403,68");
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=1300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A1\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A3\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A4\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone K2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone K3\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone K4\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 1,
        "=0 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska Albers\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"Saint Pierre et Miquelon 1950 / UTM zone 21N\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Saint Pierre et Miquelon 1950\",DATUM[\"Saint_P");
    add_srs_wkt (p, 2,
        "ierre_et_Miquelon_1950\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 3,
        "6.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TOWG");
    add_srs_wkt (p, 4,
        "S84[30,430,368,0,0,0,0],AUTHORITY[\"EPSG\",\"6638\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
................................................................................
        "ST71 Belep / UTM zone 58S", 0, 0,
        "International 1924", "Greenwich",
        "ST71_Belep", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=intl +towgs84=-480.26,-");
    add_proj4text (p, 1,
        "438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ST71 Belep / UTM zone 58S\",GEOGCS[\"ST71 Belep");
    add_srs_wkt (p, 1,
        "\",DATUM[\"ST71_Belep\",SPHEROID[\"International 1924\",");
    add_srs_wkt (p, 2,
        "6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-480.2");
    add_srs_wkt (p, 3,
        "6,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6643\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4643\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",165],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",10000000],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eastin");
    add_srs_wkt (p, 13,
        "g\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "2997\"]]");
    p = add_epsg_def_ex (filter, first, last, 2998, "epsg", 2998,
        "NEA74 Noumea / UTM zone 58S", 0, 0,
        "International 1924", "Greenwich",
        "NEA74_Noumea", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=intl +towgs84=-10.18,-3");




|







 







<
<
<

<







 







|







 







|

|







|

|

|

|

|

|

|

|

|

|

|

|







 







|







|







 







|







|







 







|







|







 







|







|







 







|







|







 







|







|







 







|







|







 







|







 







|







 







|

|







|

|

|

|

|

|

|

|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
...
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
...
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
...
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
...
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
...
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
...
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
...
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
....
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
....
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
....
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_09 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beduaram / TM 13 NE\",GEOGCS[\"Beduaram\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Beduaram\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,2");
    add_srs_wkt (p, 2,
        "93.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "106,-87,188,0,0,0,0],AUTHORITY[\"EPSG\",\"6213\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
................................................................................
        "Qatar_National_Datum_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.9");
    add_proj4text (p, 1,
        "9999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-119.4");
    add_proj4text (p, 2,
        "25,-303.659,-11.0006,1.1643,0.174458,1.09626,3.65706 +un");
    add_proj4text (p, 3,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"QND95 / Qatar National Grid\",GEOGCS[\"QND95\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Qatar_National_Datum_1995\",SPHEROID[\"Internati");
    add_srs_wkt (p, 2,
        "onal 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[-119.425,-303.659,-11.0006,1.1643,0.174458,1.09626");
    add_srs_wkt (p, 4,
        ",3.65706],AUTHORITY[\"EPSG\",\"6614\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4614\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",24.45],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",51.21666666666667],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".99999],PARAMETER[\"false_easting\",200000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"2932\"]]");
    p = add_epsg_def_ex (filter, first, last, 2933, "epsg", 2933,
        "Segara / UTM zone 50S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Gunung_Segara", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=bessel +towgs84=-403,68");
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=41.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=1300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A1\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=44.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=47.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A3\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1166666666666667 +lon_0=50.53333333");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone A4\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=50.76666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=2300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone K2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=53.76666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=3300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone K3\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1333333333333333 +lon_0=56.76666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=4300000 +y_0=0 +ellps=krass +towgs84=23");
    add_proj4text (p, 2,
        ".92,-141.27,-80.9,-0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone K4\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 1,
        "=0 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska Albers\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"Saint Pierre et Miquelon 1950 / UTM zone 21N\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Saint Pierre et Miquelon 1950\",DATUM[\"Saint_P");
    add_srs_wkt (p, 2,
        "ierre_et_Miquelon_1950\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 3,
        "6.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TOWG");
    add_srs_wkt (p, 4,
        "S84[30,430,368,0,0,0,0],AUTHORITY[\"EPSG\",\"6638\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
................................................................................
        "ST71 Belep / UTM zone 58S", 0, 0,
        "International 1924", "Greenwich",
        "ST71_Belep", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=intl +towgs84=-480.26,-");
    add_proj4text (p, 1,
        "438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ST71 Belep / UTM zone 58S\",GEOGCS[\"ST71 Belep");
    add_srs_wkt (p, 1,
        "\",DATUM[\"ST71_Belep\",SPHEROID[\"International 1924\",");
    add_srs_wkt (p, 2,
        "6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-480.2");
    add_srs_wkt (p, 3,
        "6,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6643\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4643\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",165],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2997");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 2998, "epsg", 2998,
        "NEA74 Noumea / UTM zone 58S", 0, 0,
        "International 1924", "Greenwich",
        "NEA74_Noumea", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=intl +towgs84=-10.18,-3");

Changes to src/srsinit/epsg_inlined_10.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
...
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
...
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
...
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
...
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
....
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
....
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
....
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
....
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
....
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
....
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
....
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
....
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
....
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_10 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 3036, "epsg", 3036,
        "Moznet / UTM zone 36S", 0, 0,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Moznet / UTM zone 36S\",GEOGCS[\"Moznet\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Moznet_ITRF94\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6130\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"413");
    add_srs_wkt (p, 7,
        "0\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",33]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"3036\"]]");
    p = add_epsg_def_ex (filter, first, last, 3037, "epsg", 3037,
        "Moznet / UTM zone 37S", 0, 0,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Moznet / UTM zone 37S\",GEOGCS[\"Moznet\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Moznet_ITRF94\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6130\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"413");
    add_srs_wkt (p, 7,
        "0\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",39]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"3037\"]]");
    p = add_epsg_def_ex (filter, first, last, 3038, "epsg", 3038,
        "ETRS89 / TM26 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
................................................................................
        "g\",EAST],AUTHORITY[\"EPSG\",\"3051\"]]");
    p = add_epsg_def_ex (filter, first, last, 3054, "epsg", 3054,
        "Hjorsey 1955 / UTM zone 26N", 0, 0,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=intl +towgs84=-73,47,-83,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hjorsey 1955 / UTM zone 26N\",GEOGCS[\"Hjorsey ");
    add_srs_wkt (p, 1,
        "1955\",DATUM[\"Hjorsey_1955\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-73,47,-83,0,0,0,0],AUTHORITY[\"EPSG\",\"6658\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
................................................................................
        "ITY[\"EPSG\",\"3054\"]]");
    p = add_epsg_def_ex (filter, first, last, 3055, "epsg", 3055,
        "Hjorsey 1955 / UTM zone 27N", 0, 0,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +ellps=intl +towgs84=-73,47,-83,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hjorsey 1955 / UTM zone 27N\",GEOGCS[\"Hjorsey ");
    add_srs_wkt (p, 1,
        "1955\",DATUM[\"Hjorsey_1955\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-73,47,-83,0,0,0,0],AUTHORITY[\"EPSG\",\"6658\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
................................................................................
        "ITY[\"EPSG\",\"3055\"]]");
    p = add_epsg_def_ex (filter, first, last, 3056, "epsg", 3056,
        "Hjorsey 1955 / UTM zone 28N", 0, 0,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=intl +towgs84=-73,47,-83,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hjorsey 1955 / UTM zone 28N\",GEOGCS[\"Hjorsey ");
    add_srs_wkt (p, 1,
        "1955\",DATUM[\"Hjorsey_1955\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-73,47,-83,0,0,0,0],AUTHORITY[\"EPSG\",\"6658\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
................................................................................
        "Helle 1954 / Jan Mayen Grid", 0, 1,
        "International 1924", "Greenwich",
        "Helle_1954", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-8.5 +k=1 +x_0=50000 +y_0=-7");
    add_proj4text (p, 1,
        "800000 +ellps=intl +towgs84=982.6087,552.753,-540.873,6.");
    add_proj4text (p, 2,
        "6816266,-31.6114924,-19.84816,16.805 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Helle 1954 / Jan Mayen Grid\",GEOGCS[\"Helle 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Helle_1954\",SPHEROID[\"International 1924\"");
    add_srs_wkt (p, 2,
        ",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[982.6");
    add_srs_wkt (p, 3,
        "087,552.753,-540.873,6.6816266,-31.6114924,-19.84816,16.");
    add_srs_wkt (p, 4,
        "805],AUTHORITY[\"EPSG\",\"6660\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4660\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 10,
        "8.5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",50000],PARAMETER[\"false_northing\",-7800000],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",N");
    add_srs_wkt (p, 13,
        "ORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"3058\"]]");
    p = add_epsg_def_ex (filter, first, last, 3059, "epsg", 3059,
        "LKS92 / Latvia TM", 0, 1,
        "GRS 1980", "Greenwich",
        "Latvia_1992", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_");
................................................................................
    add_proj4text (p, 1,
        "_0=-4500000 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin Transverse Mercator\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0=914400 +datum=NAD27 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Shackleford\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        ",0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"American Samoa 1962 / American Samoa Lambert\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"American Samoa 1962\",DATUM[\"American_Samoa_19");
    add_srs_wkt (p, 2,
        "62\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898");
    add_srs_wkt (p, 3,
        "2,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-115,118,426,0,0");
    add_srs_wkt (p, 4,
        ",0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 13,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"3110\"]]");
    p = add_epsg_def_ex (filter, first, last, 3111, "epsg", 3111,
        "GDA94 / Vicgrid", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x");
    add_proj4text (p, 1,
        "_0=2500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / Vicgrid\",GEOGCS[\"GDA94\",DATUM[\"Geoc");
    add_srs_wkt (p, 1,
        "entric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4283\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",-36],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",-38],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",-37],PARAMETER[\"central_meridian\",145],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_easting\",2500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"3111\"]]");
    p = add_epsg_def_ex (filter, first, last, 3112, "epsg", 3112,
        "GDA94 / Geoscience Australia Lambert", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0");
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 1\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 2\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 3\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 4\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 5\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|

|





|

|

|

|

|

|

|

|

|

|

|

|






|

|





|

|

|

|

|

|

|

|

|

|

|

|







 







|









|







 







|









|







 







|









|







 







|

|







|

|

|

|

|

|

|

|

|

|

|







 







|







 







|







 







|

|







 







|










|

|

|

|

|

|

|

|

|

|

|

|

|

|

|







 







|







 







|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
...
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
...
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
...
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
...
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
....
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
....
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
....
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
....
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
....
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
....
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
....
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
....
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
....
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_10 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 3036, "epsg", 3036,
        "Moznet / UTM zone 36S", 0, 0,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=WGS84 +towgs84=0,0,0,-0");
    add_proj4text (p, 1,
        ",-0,-0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Moznet / UTM zone 36S\",GEOGCS[\"Moznet\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Moznet_ITRF94\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,-0,-0,-");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6130\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4130\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",3");
    add_srs_wkt (p, 9,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"3036\"]]");
    p = add_epsg_def_ex (filter, first, last, 3037, "epsg", 3037,
        "Moznet / UTM zone 37S", 0, 0,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=WGS84 +towgs84=0,0,0,-0");
    add_proj4text (p, 1,
        ",-0,-0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Moznet / UTM zone 37S\",GEOGCS[\"Moznet\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Moznet_ITRF94\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,-0,-0,-");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6130\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4130\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",3");
    add_srs_wkt (p, 9,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"3037\"]]");
    p = add_epsg_def_ex (filter, first, last, 3038, "epsg", 3038,
        "ETRS89 / TM26 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
................................................................................
        "g\",EAST],AUTHORITY[\"EPSG\",\"3051\"]]");
    p = add_epsg_def_ex (filter, first, last, 3054, "epsg", 3054,
        "Hjorsey 1955 / UTM zone 26N", 0, 0,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=intl +towgs84=-73,46,-86,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hjorsey 1955 / UTM zone 26N\",GEOGCS[\"Hjorsey ");
    add_srs_wkt (p, 1,
        "1955\",DATUM[\"Hjorsey_1955\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-73,46,-86,0,0,0,0],AUTHORITY[\"EPSG\",\"6658\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
................................................................................
        "ITY[\"EPSG\",\"3054\"]]");
    p = add_epsg_def_ex (filter, first, last, 3055, "epsg", 3055,
        "Hjorsey 1955 / UTM zone 27N", 0, 0,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +ellps=intl +towgs84=-73,46,-86,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hjorsey 1955 / UTM zone 27N\",GEOGCS[\"Hjorsey ");
    add_srs_wkt (p, 1,
        "1955\",DATUM[\"Hjorsey_1955\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-73,46,-86,0,0,0,0],AUTHORITY[\"EPSG\",\"6658\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
................................................................................
        "ITY[\"EPSG\",\"3055\"]]");
    p = add_epsg_def_ex (filter, first, last, 3056, "epsg", 3056,
        "Hjorsey 1955 / UTM zone 28N", 0, 0,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=intl +towgs84=-73,46,-86,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hjorsey 1955 / UTM zone 28N\",GEOGCS[\"Hjorsey ");
    add_srs_wkt (p, 1,
        "1955\",DATUM[\"Hjorsey_1955\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-73,46,-86,0,0,0,0],AUTHORITY[\"EPSG\",\"6658\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
................................................................................
        "Helle 1954 / Jan Mayen Grid", 0, 1,
        "International 1924", "Greenwich",
        "Helle_1954", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-8.5 +k=1 +x_0=50000 +y_0=-7");
    add_proj4text (p, 1,
        "800000 +ellps=intl +towgs84=982.609,552.753,-540.873,6.6");
    add_proj4text (p, 2,
        "8163,-31.6115,-19.8482,16.805 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Helle 1954 / Jan Mayen Grid\",GEOGCS[\"Helle 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Helle_1954\",SPHEROID[\"International 1924\"");
    add_srs_wkt (p, 2,
        ",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[982.6");
    add_srs_wkt (p, 3,
        "09,552.753,-540.873,6.68163,-31.6115,-19.8482,16.805],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6660\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4660\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-8.5],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",50000],PARAMETER[\"false_northing\",-7800000],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH],");
    add_srs_wkt (p, 13,
        "AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"3058\"]]");
    p = add_epsg_def_ex (filter, first, last, 3059, "epsg", 3059,
        "LKS92 / Latvia TM", 0, 1,
        "GRS 1980", "Greenwich",
        "Latvia_1992", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_");
................................................................................
    add_proj4text (p, 1,
        "_0=-4500000 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin Transverse Mercator\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0=914400 +datum=NAD27 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Shackleford\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        ",0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"American Samoa 1962 / American Samoa Lambert\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"American Samoa 1962\",DATUM[\"American_Samoa_19");
    add_srs_wkt (p, 2,
        "62\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213900");
    add_srs_wkt (p, 3,
        "6,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-115,118,426,0,0");
    add_srs_wkt (p, 4,
        ",0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 13,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"3110\"]]");
    p = add_epsg_def_ex (filter, first, last, 3111, "epsg", 3111,
        "GDA94 / Vicgrid94", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x");
    add_proj4text (p, 1,
        "_0=2500000 +y_0=2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / Vicgrid94\",GEOGCS[\"GDA94\",DATUM[\"Ge");
    add_srs_wkt (p, 1,
        "ocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4283\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",-36],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"standard_parallel_2\",-38],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 10,
        "f_origin\",-37],PARAMETER[\"central_meridian\",145],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",2500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AU");
    add_srs_wkt (p, 14,
        "THORITY[\"EPSG\",\"3111\"]]");
    p = add_epsg_def_ex (filter, first, last, 3112, "epsg", 3112,
        "GDA94 / Geoscience Australia Lambert", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0");
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 1\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 2\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 3\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 4\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "8,4.903,1.578,-1.06 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PRS92 / Philippines zone 5\",GEOGCS[\"PRS92\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Philippine_Reference_System_1992\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-127.62,-67.24,-47.04,-3.068,4.903,1");
    add_srs_wkt (p, 4,
        ".578,-1.06],AUTHORITY[\"EPSG\",\"6683\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_11.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
...
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
...
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
....
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
....
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
....
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_11 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Viti Levu 1912 / Viti Levu Grid", 0, 1,
        "Clarke 1880 (international foot)", "Greenwich",
        "Viti_Levu_1912", "Cassini_Soldner", "link",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=-18 +lon_0=178 +x_0=109435.392 +y_0=14");
    add_proj4text (p, 1,
        "1622.272 +a=6378306.3696 +b=6356571.996 +towgs84=98,390,");
    add_proj4text (p, 2,
        "-22,0,0,0,0 +units=link +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Viti Levu 1912 / Viti Levu Grid\",GEOGCS[\"Viti");
    add_srs_wkt (p, 1,
        " Levu 1912\",DATUM[\"Viti_Levu_1912\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (international foot)\",6378306.3696,293.46630765563");
    add_srs_wkt (p, 3,
        "55,AUTHORITY[\"EPSG\",\"7055\"]],TOWGS84[98,390,-22,0,0,");
    add_srs_wkt (p, 4,
        "0,0],AUTHORITY[\"EPSG\",\"6752\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 6 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 6 (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0");
    add_srs_wkt (p, 4,
        ".82,-0.12],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4284\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",6500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",N");
    add_srs_wkt (p, 13,
        "ORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3146\"]]");
    p = add_epsg_def_ex (filter, first, last, 3147, "epsg", 3147,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0");
    add_srs_wkt (p, 4,
        ".82,-0.12],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4284\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NO");
    add_srs_wkt (p, 13,
        "RTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3147\"]]");
    p = add_epsg_def_ex (filter, first, last, 3148, "epsg", 3148,
        "Indian 1960 / UTM zone 48N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +t");
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 6 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 6 (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.1");
    add_srs_wkt (p, 4,
        "3,-0.22],AUTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4200\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 10,
        "\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",6500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3150\"]]");
    p = add_epsg_def_ex (filter, first, last, 3151, "epsg", 3151,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.1");
    add_srs_wkt (p, 4,
        "3,-0.22],AUTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4200\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 10,
        "\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3151\"]]");
    p = add_epsg_def_ex (filter, first, last, 3152, "epsg", 3152,
        "ST74", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18.05779 +k=0.99999425 +x_0=");
................................................................................
        "LGD2006 / Libya TM", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9965000000000001 +x_");
    add_proj4text (p, 1,
        "0=1000000 +y_0=0 +ellps=intl +towgs84=-208.4058,-109.877");
    add_proj4text (p, 2,
        "7,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM\",GEOGCS[\"LGD2006\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Libyan_Geodetic_Datum_2006\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",17],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9965],PARAMETER[\"false_easting\",1000000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"3177\"]]");
    p = add_epsg_def_ex (filter, first, last, 3178, "epsg", 3178,
        "GR96 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "Greenland_1996", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
................................................................................
        "LGD2006 / Libya TM zone 5", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.99995 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,0");
    add_proj4text (p, 2,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 5\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99995],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"3190\"]]");
    p = add_epsg_def_ex (filter, first, last, 3191, "epsg", 3191,
        "LGD2006 / Libya TM zone 6", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 6\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",11],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3191\"]]");
    p = add_epsg_def_ex (filter, first, last, 3192, "epsg", 3192,
        "LGD2006 / Libya TM zone 7", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 7\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",13],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3192\"]]");
    p = add_epsg_def_ex (filter, first, last, 3193, "epsg", 3193,
        "LGD2006 / Libya TM zone 8", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 8\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",15],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3193\"]]");
    p = add_epsg_def_ex (filter, first, last, 3194, "epsg", 3194,
        "LGD2006 / Libya TM zone 9", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 9\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",17],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3194\"]]");
    p = add_epsg_def_ex (filter, first, last, 3195, "epsg", 3195,
        "LGD2006 / Libya TM zone 10", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 10\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",19],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3195\"]]");
    p = add_epsg_def_ex (filter, first, last, 3196, "epsg", 3196,
        "LGD2006 / Libya TM zone 11", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 11\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3196\"]]");
    p = add_epsg_def_ex (filter, first, last, 3197, "epsg", 3197,
        "LGD2006 / Libya TM zone 12", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 12\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",23],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3197\"]]");
    p = add_epsg_def_ex (filter, first, last, 3198, "epsg", 3198,
        "LGD2006 / Libya TM zone 13", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.4058,-109.8777,-2.5764,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 13\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",25],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99995],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"3198\"]]");
    p = add_epsg_def_ex (filter, first, last, 3199, "epsg", 3199,
        "LGD2006 / UTM zone 32N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=intl +towgs84=-208.4058,-109.8");
    add_proj4text (p, 1,
        "777,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 32N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"3199\"]]");
    p = add_epsg_def_ex (filter, first, last, 3200, "epsg", 3200,
        "FD58 / Iraq zone", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Final_Datum_1958", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.99878");
................................................................................
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3200\"]]");
    p = add_epsg_def_ex (filter, first, last, 3201, "epsg", 3201,
        "LGD2006 / UTM zone 33N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=intl +towgs84=-208.4058,-109.8");
    add_proj4text (p, 1,
        "777,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 33N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",15],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"3201\"]]");
    p = add_epsg_def_ex (filter, first, last, 3202, "epsg", 3202,
        "LGD2006 / UTM zone 34N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=intl +towgs84=-208.4058,-109.8");
    add_proj4text (p, 1,
        "777,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 34N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"3202\"]]");
    p = add_epsg_def_ex (filter, first, last, 3203, "epsg", 3203,
        "LGD2006 / UTM zone 35N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=intl +towgs84=-208.4058,-109.8");
    add_proj4text (p, 1,
        "777,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 35N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.4058,-109.8777,-2.5764,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"3203\"]]");
    p = add_epsg_def_ex (filter, first, last, 3204, "epsg", 3204,
        "WGS 84 / SCAR IMW SP19-20", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.333333333");




|







 







<
<
<

<







 







|

|







|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







 







|

|







|

|

|

|

|

|

|

|

|

|

|






|

|







|

|

|

|

|

|

|

|

|

|

|






|

|







|

|

|

|

|

|

|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
...
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
...
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
....
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
....
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
....
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_11 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Viti Levu 1912 / Viti Levu Grid", 0, 1,
        "Clarke 1880 (international foot)", "Greenwich",
        "Viti_Levu_1912", "Cassini_Soldner", "link",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=-18 +lon_0=178 +x_0=109435.392 +y_0=14");
    add_proj4text (p, 1,
        "1622.272 +a=6378306.3696 +b=6356571.996 +towgs84=51,391,");
    add_proj4text (p, 2,
        "-36,0,0,0,0 +to_meter=0.201168 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Viti Levu 1912 / Viti Levu Grid\",GEOGCS[\"Viti");
    add_srs_wkt (p, 1,
        " Levu 1912\",DATUM[\"Viti_Levu_1912\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (international foot)\",6378306.3696,293.46630765563");
    add_srs_wkt (p, 3,
        "49,AUTHORITY[\"EPSG\",\"7055\"]],TOWGS84[51,391,-36,0,0,");
    add_srs_wkt (p, 4,
        "0,0],AUTHORITY[\"EPSG\",\"6752\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 6 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 6 (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,");
    add_srs_wkt (p, 4,
        "0.82,-0.12],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4284\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 9,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",6500000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3146\"]]");
    p = add_epsg_def_ex (filter, first, last, 3147, "epsg", 3147,
        "Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger CM 18E (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,");
    add_srs_wkt (p, 4,
        "0.82,-0.12],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4284\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 9,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",N");
    add_srs_wkt (p, 13,
        "ORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3147\"]]");
    p = add_epsg_def_ex (filter, first, last, 3148, "epsg", 3148,
        "Indian 1960 / UTM zone 48N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +t");
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 6 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 6 (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0");
    add_srs_wkt (p, 4,
        ".13,-0.22],AUTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4200\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",6500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",N");
    add_srs_wkt (p, 13,
        "ORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3150\"]]");
    p = add_epsg_def_ex (filter, first, last, 3151, "epsg", 3151,
        "Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger CM 18E (de");
    add_srs_wkt (p, 1,
        "precated)\",GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0");
    add_srs_wkt (p, 4,
        ".13,-0.22],AUTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4200\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",18],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NO");
    add_srs_wkt (p, 13,
        "RTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3151\"]]");
    p = add_epsg_def_ex (filter, first, last, 3152, "epsg", 3152,
        "ST74", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18.05779 +k=0.99999425 +x_0=");
................................................................................
        "LGD2006 / Libya TM", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.9965000000000001 +x_");
    add_proj4text (p, 1,
        "0=1000000 +y_0=0 +ellps=intl +towgs84=-208.406,-109.878,");
    add_proj4text (p, 2,
        "-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM\",GEOGCS[\"LGD2006\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Libyan_Geodetic_Datum_2006\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",17],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9965],PARAMETER[\"false_easting\",1000000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"3177\"]]");
    p = add_epsg_def_ex (filter, first, last, 3178, "epsg", 3178,
        "GR96 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "Greenland_1996", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
................................................................................
        "LGD2006 / Libya TM zone 5", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.99995 +x_0=200000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 5\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.99995],PARAMETER[\"false_easting\",200000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"3190\"]]");
    p = add_epsg_def_ex (filter, first, last, 3191, "epsg", 3191,
        "LGD2006 / Libya TM zone 6", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 6\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",11],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99995],PARAMETER[\"false_easting\",200000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"3191\"]]");
    p = add_epsg_def_ex (filter, first, last, 3192, "epsg", 3192,
        "LGD2006 / Libya TM zone 7", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 7\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",13],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99995],PARAMETER[\"false_easting\",200000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"3192\"]]");
    p = add_epsg_def_ex (filter, first, last, 3193, "epsg", 3193,
        "LGD2006 / Libya TM zone 8", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 8\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",15],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99995],PARAMETER[\"false_easting\",200000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"3193\"]]");
    p = add_epsg_def_ex (filter, first, last, 3194, "epsg", 3194,
        "LGD2006 / Libya TM zone 9", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 9\",GEOGCS[\"LGD2006\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",17],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99995],PARAMETER[\"false_easting\",200000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"3194\"]]");
    p = add_epsg_def_ex (filter, first, last, 3195, "epsg", 3195,
        "LGD2006 / Libya TM zone 10", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 10\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",19],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99995],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"3195\"]]");
    p = add_epsg_def_ex (filter, first, last, 3196, "epsg", 3196,
        "LGD2006 / Libya TM zone 11", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 11\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99995],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"3196\"]]");
    p = add_epsg_def_ex (filter, first, last, 3197, "epsg", 3197,
        "LGD2006 / Libya TM zone 12", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 12\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",23],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99995],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"3197\"]]");
    p = add_epsg_def_ex (filter, first, last, 3198, "epsg", 3198,
        "LGD2006 / Libya TM zone 13", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-208.406,-109.878,-2.5764,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / Libya TM zone 13\",GEOGCS[\"LGD2006\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",25],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99995],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"3198\"]]");
    p = add_epsg_def_ex (filter, first, last, 3199, "epsg", 3199,
        "LGD2006 / UTM zone 32N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=intl +towgs84=-208.406,-109.87");
    add_proj4text (p, 1,
        "8,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 32N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9996],PARAMETER[\"false_easting\",500000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"3199\"]]");
    p = add_epsg_def_ex (filter, first, last, 3200, "epsg", 3200,
        "FD58 / Iraq zone", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Final_Datum_1958", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.99878");
................................................................................
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3200\"]]");
    p = add_epsg_def_ex (filter, first, last, 3201, "epsg", 3201,
        "LGD2006 / UTM zone 33N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=intl +towgs84=-208.406,-109.87");
    add_proj4text (p, 1,
        "8,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 33N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",15],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"3201\"]]");
    p = add_epsg_def_ex (filter, first, last, 3202, "epsg", 3202,
        "LGD2006 / UTM zone 34N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=intl +towgs84=-208.406,-109.87");
    add_proj4text (p, 1,
        "8,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 34N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",21],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"3202\"]]");
    p = add_epsg_def_ex (filter, first, last, 3203, "epsg", 3203,
        "LGD2006 / UTM zone 35N", 0, 0,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=intl +towgs84=-208.406,-109.87");
    add_proj4text (p, 1,
        "8,-2.5764,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"LGD2006 / UTM zone 35N\",GEOGCS[\"LGD2006\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Libyan_Geodetic_Datum_2006\",SPHEROID[\"Internation");
    add_srs_wkt (p, 2,
        "al 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-208.406,-109.878,-2.5764,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6754\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4754\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",27],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"3203\"]]");
    p = add_epsg_def_ex (filter, first, last, 3204, "epsg", 3204,
        "WGS 84 / SCAR IMW SP19-20", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-60.66666666666666 +lat_2=-63.333333333");

Changes to src/srsinit/epsg_inlined_12.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
....
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
....
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
....
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
....
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_12 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Fatu Iva 72 / UTM zone 7S", 0, 0,
        "International 1924", "Greenwich",
        "Fatu_Iva_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,10");
    add_proj4text (p, 1,
        "78.125,2623.922,-33.8875,70.6773,-9.3943,186.074 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Fatu Iva 72 / UTM zone 7S\",GEOGCS[\"Fatu Iva 7");
    add_srs_wkt (p, 1,
        "2\",DATUM[\"Fatu_Iva_72\",SPHEROID[\"International 1924\"");
    add_srs_wkt (p, 2,
        ",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[347.1");
    add_srs_wkt (p, 3,
        "03,1078.125,2623.922,-33.8875,70.6773,-9.3943,186.074],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6688\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4688\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 13,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"3303\"]]");
    p = add_epsg_def_ex (filter, first, last, 3304, "epsg", 3304,
        "Tahiti 79 / UTM zone 6S", 0, 0,
        "International 1924", "Greenwich",
        "Tahiti_79", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +south +ellps=intl +towgs84=221.525,15");
................................................................................
    add_proj4text (p, 1,
        "0=0 +y_0=-4000000 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California Albers\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "95,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Lambert (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga TM (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|

|







|

|

|

|

|

|

|

|

|

|

|

|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
....
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
....
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
....
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
....
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_12 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Fatu Iva 72 / UTM zone 7S", 0, 0,
        "International 1924", "Greenwich",
        "Fatu_Iva_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,10");
    add_proj4text (p, 1,
        "78.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Fatu Iva 72 / UTM zone 7S\",GEOGCS[\"Fatu Iva 7");
    add_srs_wkt (p, 1,
        "2\",DATUM[\"Fatu_Iva_72\",SPHEROID[\"International 1924\"");
    add_srs_wkt (p, 2,
        ",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[347.1");
    add_srs_wkt (p, 3,
        "03,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6688\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4688\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-141],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",10000000],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eastin");
    add_srs_wkt (p, 13,
        "g\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "3303\"]]");
    p = add_epsg_def_ex (filter, first, last, 3304, "epsg", 3304,
        "Tahiti 79 / UTM zone 6S", 0, 0,
        "International 1924", "Greenwich",
        "Tahiti_79", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +south +ellps=intl +towgs84=221.525,15");
................................................................................
    add_proj4text (p, 1,
        "0=0 +y_0=-4000000 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California Albers\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "95,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Lambert (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga TM (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_13.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
...
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
...
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
...
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
....
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
....
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
....
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
....
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
....
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
....
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
....
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
....
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373

2374
2375

2376
2377
2378
2379
2380
2381
2382
2383

2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
....
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
....
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
....
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
....
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
....
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_13 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1942 / CS63 zone C0", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1 +lon_0=21.95 +k=1 +x_0=250000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone C0\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo 1942 / CS63 zone C1", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1 +lon_0=24.95 +k=1 +x_0=1250000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.");
    add_proj4text (p, 2,
        "82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone C1\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo 1942 / CS63 zone C2", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1 +lon_0=27.95 +k=1 +x_0=2250000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.");
    add_proj4text (p, 2,
        "82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone C2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 1,
        "79,-27.584,-7.862,8.163,6.042,-13.925 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Grand Cayman 1959 / UTM zone 17N (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"GCGD59\",DATUM[\"Grand_Cayman_Geodetic_Datum_1");
    add_srs_wkt (p, 2,
        "959\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821389");
    add_srs_wkt (p, 3,
        "82,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-179.483,-69.37");
    add_srs_wkt (p, 4,
        "9,-27.584,-7.862,8.163,6.042,-13.925],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"6723\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"Little Cayman 1961 / UTM zone 17N (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"SIGD61\",DATUM[\"Sister_Islands_Geodetic_Datum");
    add_srs_wkt (p, 2,
        "_1961\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213");
    add_srs_wkt (p, 3,
        "8982,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[8.853,-52.644");
    add_srs_wkt (p, 4,
        ",180.304,-0.393,-2.323,2.96,-24.081],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"6726\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 6,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 2,
        "78293.645208759 +b=6356617.987679838 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hong Kong 1963 Grid System (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Hong Kong 1963\",DATUM[\"Hong_Kong_1963\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1858\",6378293.645208759,294.2606763692606,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"6738\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 59N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 60N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 11,
        "73],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"3378\"]]");
    p = add_epsg_def_ex (filter, first, last, 3379, "epsg", 3379,
        "GDM2000 / Pahang Grid", 0, 0,
        "GRS 1980", "Greenwich",
        "Geodetic_Datum_of_Malaysia_2000", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=3.769388088888889 +lon_0=102.368298983");
    add_proj4text (p, 1,
        "3333 +x_0=-7368.228 +y_0=6485.858 +ellps=GRS80 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDM2000 / Pahang Grid\",GEOGCS[\"GDM2000\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geodetic_Datum_of_Malaysia_2000\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 2,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6742\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4742\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Cassini_Soldner\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 8,
        "of_origin\",3.769388088888889],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",102.3682989833333],PARAMETER[\"false_easting\",-73");
    add_srs_wkt (p, 10,
................................................................................
        "Pulkovo 1942 / Caspian Sea Mercator", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Mercator_2SP", "metre",
        "none", "North", "none", "East");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=51 +lat_ts=42 +x_0=0 +y_0=0 +ellps=kra");
    add_proj4text (p, 1,
        "ss +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.12 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Caspian Sea Mercator\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Mercator_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",42],PARAMETER[\"central_meridian\",51],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"none\",NORT");
    add_srs_wkt (p, 12,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 60", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 60\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",180],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 60", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 60\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",180],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",6");
    add_srs_wkt (p, 11,
        "0500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"3390\"]]");
    p = add_epsg_def_ex (filter, first, last, 3391, "epsg", 3391,
        "Karbala 1979 / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Karbala_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=70.995,-335.91");
................................................................................
        "Nahrwan 1934 / Iraq zone", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.99878");
    add_proj4text (p, 1,
        "64078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +tow");
    add_proj4text (p, 2,
        "gs84=-242.2,-144.9,370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1934 / Iraq zone\",GEOGCS[\"Nahrwan 193");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"Nahrwan_1934\",SPHEROID[\"Clarke 1880 (RGS)\"");
    add_srs_wkt (p, 2,
        ",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"674");
    add_srs_wkt (p, 4,
        "4\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4744\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",32.5],PARAMETER[\"central_meridian\",45],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.9987864078],PARAMETER[\"false_easting\",1");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",1166200],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3394\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 3395, "epsg", 3395,
        "WGS 84 / World Mercator", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Mercator_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +uni");
................................................................................
        "ORTH],AUTHORITY[\"EPSG\",\"3404\"]]");
    p = add_epsg_def_ex (filter, first, last, 3405, "epsg", 3405,
        "VN-2000 / UTM zone 48N", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS84 +towgs84=-191.90441429,-");
    add_proj4text (p, 1,
        "39.30318279,-111.45032835,0.00928836,-0.01975479,0.00427");
    add_proj4text (p, 2,
        "372,0.252906278 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / UTM zone 48N\",GEOGCS[\"VN-2000\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.2572");
    add_srs_wkt (p, 2,
        "23563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-191.9044142");
    add_srs_wkt (p, 3,
        "9,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.00");
    add_srs_wkt (p, 4,
        "427372,0.252906278],AUTHORITY[\"EPSG\",\"6756\"]],PRIMEM");
    add_srs_wkt (p, 5,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 6,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4756\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",105],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"3405\"]]");
    p = add_epsg_def_ex (filter, first, last, 3406, "epsg", 3406,
        "VN-2000 / UTM zone 49N", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS84 +towgs84=-191.90441429,-");
    add_proj4text (p, 1,
        "39.30318279,-111.45032835,0.00928836,-0.01975479,0.00427");

    add_proj4text (p, 2,
        "372,0.252906278 +units=m +no_defs");

    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / UTM zone 49N\",GEOGCS[\"VN-2000\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.2572");
    add_srs_wkt (p, 2,
        "23563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-191.9044142");
    add_srs_wkt (p, 3,
        "9,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.00");

    add_srs_wkt (p, 4,
        "427372,0.252906278],AUTHORITY[\"EPSG\",\"6756\"]],PRIMEM");
    add_srs_wkt (p, 5,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 6,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4756\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",111],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"3406\"]]");
    p = add_epsg_def_ex (filter, first, last, 3407, "epsg", 3407,
        "Hong Kong 1963 Grid System", 0, 1,
        "Clarke 1858", "Greenwich",
        "Hong_Kong_1963", "Cassini_Soldner", "Clarke's foot",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=22.31213333333334 +lon_0=114.178555555");
................................................................................
    add_proj4text (p, 3,
        "654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hong Kong 1963 Grid System\",GEOGCS[\"Hong Kong");
    add_srs_wkt (p, 1,
        " 1963\",DATUM[\"Hong_Kong_1963\",SPHEROID[\"Clarke 1858\"");
    add_srs_wkt (p, 2,
        ",6378293.645208759,294.2606763692606,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7007\"]],AUTHORITY[\"EPSG\",\"6738\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"NSIDC Sea Ice Polar Stereographic North\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Unspecified datum based upon the Hughes 1980 ellipso");
    add_srs_wkt (p, 2,
        "id\",DATUM[\"Not_specified_based_on_Hughes_1980_ellipsoi");
    add_srs_wkt (p, 3,
        "d\",SPHEROID[\"Hughes 1980\",6378273,298.279411123064,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"NSIDC Sea Ice Polar Stereographic South\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Unspecified datum based upon the Hughes 1980 ellipso");
    add_srs_wkt (p, 2,
        "id\",DATUM[\"Not_specified_based_on_Hughes_1980_ellipsoi");
    add_srs_wkt (p, 3,
        "d\",SPHEROID[\"Hughes 1980\",6378273,298.279411123064,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
................................................................................
        "PSD93 / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-180.624,-225.");
    add_proj4text (p, 1,
        "516,173.919,-0.81,-1.898,8.336,16.71006 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSD93 / UTM zone 39N\",GEOGCS[\"PSD93\",DATUM[\"");
    add_srs_wkt (p, 1,
        "PDO_Survey_Datum_1993\",SPHEROID[\"Clarke 1880 (RGS)\",6");
    add_srs_wkt (p, 2,
        "378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6134\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4134\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",51],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
................................................................................
        "PSD93 / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-180.624,-225.");
    add_proj4text (p, 1,
        "516,173.919,-0.81,-1.898,8.336,16.71006 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSD93 / UTM zone 40N\",GEOGCS[\"PSD93\",DATUM[\"");
    add_srs_wkt (p, 1,
        "PDO_Survey_Datum_1993\",SPHEROID[\"Clarke 1880 (RGS)\",6");
    add_srs_wkt (p, 2,
        "378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6134\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4134\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,




|







 







<
<
<

<







 







|

|







|







 







|

|







|







 







|

|







|







 







|

|







 







|







 







|







 







|







 







|







 







|










|

|

|

|

|

|

|







 







|

|







|

|

|

|

|

|







 







|

|







|

|

|

|

|







 







|

|







|

|

|

|

|

|

|

|

|

|

|







 







|

|





|

<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







 







|

|

|





|

|

|

|

|

|

|

|

|

|

|

<
<
|






|

<
>

<
>





|

<
>

|

|

|

|

|

|

|

|

|

<
<
|







 







|







 







|







 







|







 







|
<
<







|

|

|

|

|







 







|
<
<







|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
...
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
...
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
...
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
...
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
....
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
....
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
....
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
....
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
....
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
....
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
....
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926


1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
....
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355


2356
2357
2358
2359
2360
2361
2362
2363
2364

2365
2366

2367
2368
2369
2370
2371
2372
2373
2374

2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394


2395
2396
2397
2398
2399
2400
2401
2402
....
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
....
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
....
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
....
3727
3728
3729
3730
3731
3732
3733
3734


3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
....
3766
3767
3768
3769
3770
3771
3772
3773


3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_13 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Pulkovo 1942 / CS63 zone C0", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1 +lon_0=21.95 +k=1 +x_0=250000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.");
    add_proj4text (p, 2,
        "82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone C0\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo 1942 / CS63 zone C1", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1 +lon_0=24.95 +k=1 +x_0=1250000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0");
    add_proj4text (p, 2,
        ".82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone C1\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
        "Pulkovo 1942 / CS63 zone C2", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.1 +lon_0=27.95 +k=1 +x_0=2250000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0");
    add_proj4text (p, 2,
        ".82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone C2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 1,
        "79,-27.584,-7.862,8.163,6.042,-13.925 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Grand Cayman 1959 / UTM zone 17N (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"GCGD59\",DATUM[\"Grand_Cayman_Geodetic_Datum_1");
    add_srs_wkt (p, 2,
        "959\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821390");
    add_srs_wkt (p, 3,
        "06,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-179.483,-69.37");
    add_srs_wkt (p, 4,
        "9,-27.584,-7.862,8.163,6.042,-13.925],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"6723\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"Little Cayman 1961 / UTM zone 17N (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"SIGD61\",DATUM[\"Sister_Islands_Geodetic_Datum");
    add_srs_wkt (p, 2,
        "_1961\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213");
    add_srs_wkt (p, 3,
        "9006,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[8.853,-52.644");
    add_srs_wkt (p, 4,
        ",180.304,-0.393,-2.323,2.96,-24.081],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"6726\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 6,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 2,
        "78293.645208759 +b=6356617.987679838 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hong Kong 1963 Grid System (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Hong Kong 1963\",DATUM[\"Hong_Kong_1963\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1858\",6378293.645208759,294.2606763692569,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"6738\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 59N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 60N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 11,
        "73],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"3378\"]]");
    p = add_epsg_def_ex (filter, first, last, 3379, "epsg", 3379,
        "GDM2000 / PahangGrid", 0, 0,
        "GRS 1980", "Greenwich",
        "Geodetic_Datum_of_Malaysia_2000", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=3.769388088888889 +lon_0=102.368298983");
    add_proj4text (p, 1,
        "3333 +x_0=-7368.228 +y_0=6485.858 +ellps=GRS80 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDM2000 / PahangGrid\",GEOGCS[\"GDM2000\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Geodetic_Datum_of_Malaysia_2000\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6742\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4742\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Cassini_Soldner\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 8,
        "of_origin\",3.769388088888889],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",102.3682989833333],PARAMETER[\"false_easting\",-73");
    add_srs_wkt (p, 10,
................................................................................
        "Pulkovo 1942 / Caspian Sea Mercator", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Mercator_2SP", "metre",
        "none", "North", "none", "East");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=51 +lat_ts=42 +x_0=0 +y_0=0 +ellps=kra");
    add_proj4text (p, 1,
        "ss +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Caspian Sea Mercator\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Mercator_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",42],PARAMETER[\"central_meridian\",51],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"none\",NORT");
    add_srs_wkt (p, 12,
................................................................................
        "Pulkovo 1942 / 3-degree Gauss-Kruger zone 60", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / 3-degree Gauss-Kruger zone 60\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",180],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
................................................................................
        "Pulkovo 1995 / 3-degree Gauss-Kruger zone 60", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=180 +k=1 +x_0=60500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / 3-degree Gauss-Kruger zone 60\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",180],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",60500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"3390\"]]");
    p = add_epsg_def_ex (filter, first, last, 3391, "epsg", 3391,
        "Karbala 1979 / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Karbala_1979", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=70.995,-335.91");
................................................................................
        "Nahrwan 1934 / Iraq zone", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.99878");
    add_proj4text (p, 1,
        "64078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1934 / Iraq zone\",GEOGCS[\"Nahrwan 193");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"Nahrwan_1934\",SPHEROID[\"Clarke 1880 (RGS)\"");
    add_srs_wkt (p, 2,
        ",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],AUTHO");
    add_srs_wkt (p, 3,


        "RITY[\"EPSG\",\"6744\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 6,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4744\"]],P");
    add_srs_wkt (p, 7,
        "ROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",32.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 9,
        ",45],PARAMETER[\"scale_factor\",0.9987864078],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",1500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "1166200],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"3394\"]]");
    p = add_epsg_def_ex (filter, first, last, 3395, "epsg", 3395,
        "WGS 84 / World Mercator", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Mercator_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +uni");
................................................................................
        "ORTH],AUTHORITY[\"EPSG\",\"3404\"]]");
    p = add_epsg_def_ex (filter, first, last, 3405, "epsg", 3405,
        "VN-2000 / UTM zone 48N", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS84 +towgs84=-192.873,-39.38");
    add_proj4text (p, 1,
        "2,-111.202,-0.00205,-0.0005,0.00335,0.0188 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / UTM zone 48N\",GEOGCS[\"VN-2000\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.2572");
    add_srs_wkt (p, 2,
        "23563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-192.873,-39");
    add_srs_wkt (p, 3,
        ".382,-111.202,-0.00205,-0.0005,0.00335,0.0188],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6756\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4756\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",105],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS");
    add_srs_wkt (p, 13,


        "[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3405\"]]");
    p = add_epsg_def_ex (filter, first, last, 3406, "epsg", 3406,
        "VN-2000 / UTM zone 49N", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS84 +towgs84=-192.873,-39.38");
    add_proj4text (p, 1,

        "2,-111.202,-0.00205,-0.0005,0.00335,0.0188 +units=m +no_");
    add_proj4text (p, 2,

        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / UTM zone 49N\",GEOGCS[\"VN-2000\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.2572");
    add_srs_wkt (p, 2,
        "23563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-192.873,-39");
    add_srs_wkt (p, 3,

        ".382,-111.202,-0.00205,-0.0005,0.00335,0.0188],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6756\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4756\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",111],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS");
    add_srs_wkt (p, 13,


        "[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3406\"]]");
    p = add_epsg_def_ex (filter, first, last, 3407, "epsg", 3407,
        "Hong Kong 1963 Grid System", 0, 1,
        "Clarke 1858", "Greenwich",
        "Hong_Kong_1963", "Cassini_Soldner", "Clarke's foot",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=22.31213333333334 +lon_0=114.178555555");
................................................................................
    add_proj4text (p, 3,
        "654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Hong Kong 1963 Grid System\",GEOGCS[\"Hong Kong");
    add_srs_wkt (p, 1,
        " 1963\",DATUM[\"Hong_Kong_1963\",SPHEROID[\"Clarke 1858\"");
    add_srs_wkt (p, 2,
        ",6378293.645208759,294.2606763692569,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7007\"]],AUTHORITY[\"EPSG\",\"6738\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"NSIDC Sea Ice Polar Stereographic North\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Unspecified datum based upon the Hughes 1980 ellipso");
    add_srs_wkt (p, 2,
        "id\",DATUM[\"Not_specified_based_on_Hughes_1980_ellipsoi");
    add_srs_wkt (p, 3,
        "d\",SPHEROID[\"Hughes 1980\",6378273,298.279411123061,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"NSIDC Sea Ice Polar Stereographic South\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Unspecified datum based upon the Hughes 1980 ellipso");
    add_srs_wkt (p, 2,
        "id\",DATUM[\"Not_specified_based_on_Hughes_1980_ellipsoi");
    add_srs_wkt (p, 3,
        "d\",SPHEROID[\"Hughes 1980\",6378273,298.279411123061,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
................................................................................
        "PSD93 / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-180.624,-225.");
    add_proj4text (p, 1,
        "516,173.919,-0.81,-1.898,8.336,16.7101 +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"PSD93 / UTM zone 39N\",GEOGCS[\"PSD93\",DATUM[\"");
    add_srs_wkt (p, 1,
        "PDO_Survey_Datum_1993\",SPHEROID[\"Clarke 1880 (RGS)\",6");
    add_srs_wkt (p, 2,
        "378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6134\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4134\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",51],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
................................................................................
        "PSD93 / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-180.624,-225.");
    add_proj4text (p, 1,
        "516,173.919,-0.81,-1.898,8.336,16.7101 +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"PSD93 / UTM zone 40N\",GEOGCS[\"PSD93\",DATUM[\"");
    add_srs_wkt (p, 1,
        "PDO_Survey_Datum_1993\",SPHEROID[\"Clarke 1880 (RGS)\",6");
    add_srs_wkt (p, 2,
        "378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6134\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4134\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,

Changes to src/srsinit/epsg_inlined_14.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
...
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_14 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "37,124,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 28N\",GEOGCS[\"Dabola 19");
    add_srs_wkt (p, 1,
        "81\",DATUM[\"Dabola_1981\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY[\"EPSG\",\"6155");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "37,124,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 29N\",GEOGCS[\"Dabola 19");
    add_srs_wkt (p, 1,
        "81\",DATUM[\"Dabola_1981\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY[\"EPSG\",\"6155");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
...
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_14 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "37,124,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 28N\",GEOGCS[\"Dabola 19");
    add_srs_wkt (p, 1,
        "81\",DATUM[\"Dabola_1981\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY[\"EPSG\",\"6155");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "37,124,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dabola 1981 / UTM zone 29N\",GEOGCS[\"Dabola 19");
    add_srs_wkt (p, 1,
        "81\",DATUM[\"Dabola_1981\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-83,37,124,0,0,0,0],AUTHORITY[\"EPSG\",\"6155");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_15.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
...
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
...
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
...
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
...
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_15 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 2,
        "owgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 1\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 2\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 3\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 4\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "+towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 5\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,




|







 







<
<
<

<







 







|







 







|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
...
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
...
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
...
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
...
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_15 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 2,
        "owgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 1\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 2\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 3\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 4\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "+towgs84=61,-285,-181,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Old Hawaiian / Hawaii zone 5\",GEOGCS[\"Old Haw");
    add_srs_wkt (p, 1,
        "aiian\",DATUM[\"Old_Hawaiian\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[61,-285,-181,0,0,0,0],AUTHORITY[\"EPSG\",\"613");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,

Changes to src/srsinit/epsg_inlined_16.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_16 (int filter, struct epsg_defs **first, struct epsg_defs **last)




|







 







<
<
<

<







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_16 (int filter, struct epsg_defs **first, struct epsg_defs **last)

Changes to src/srsinit/epsg_inlined_17.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
...
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
...
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
...
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
....
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
....
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
....
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
....
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
....
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
....
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
....
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
....
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
....
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
....
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_17 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bermuda 1957 / UTM zone 20N\",GEOGCS[\"Bermuda ");
    add_srs_wkt (p, 1,
        "1957\",DATUM[\"Bermuda_1957\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-73,213,296,0,0,0,0],AUTHORITY[\"EPSG\",\"6216\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 111 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 114 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 117 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 120 W (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138982,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
................................................................................
        "Popular_Visualisation_Datum", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 ");
    add_proj4text (p, 1,
        "+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Popular Visualisation CRS / Mercator (deprecate");
    add_srs_wkt (p, 1,
        "d)\",GEOGCS[\"Popular Visualisation CRS\",DATUM[\"Popula");
    add_srs_wkt (p, 2,
        "r_Visualisation_Datum\",SPHEROID[\"Popular Visualisation");
    add_srs_wkt (p, 3,
................................................................................
    add_srs_wkt (p, 12,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],EXTENSION[\"PROJ4\",\"");
    add_srs_wkt (p, 13,
        "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 ");
    add_srs_wkt (p, 14,
        "+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext ");
    add_srs_wkt (p, 15,
        "+no_defs\"],AUTHORITY[\"EPSG\",\"3785\"]]");
    p = add_epsg_def_ex (filter, first, last, 3786, "epsg", 3786,
        "World Equidistant Cylindrical (Sphere) (deprecated)", 0, 0,
        "GRS 1980 Authalic Sphere", "Greenwich",
        "Not_specified_based_on_GRS_1980_Authalic_Sphere", "Equirectangular", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6");
................................................................................
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Norte\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "_0=229126.939 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Sur\",GEOGCS[\"NAD27\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "800000 +y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTQ Lambert\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 120 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
        "Pulkovo 1942(58) / Stereo70", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_58", "Oblique_Stereographic", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=500000 +ellps=krass +towgs84=2.329,-147.042,-92.08,");
    add_proj4text (p, 2,
        "0.309,-0.325,-0.497,5.69 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(58) / Stereo70\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942(58)\",DATUM[\"Pulkovo_1942_58\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[2.329,-147.042,-92.08,0.309,-0.325,-0.497,5.69],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6179\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4179\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"lati");
    add_srs_wkt (p, 9,
        "tude_of_origin\",46],PARAMETER[\"central_meridian\",25],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",0.99975],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",500000],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",N");
    add_srs_wkt (p, 13,
        "ORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3844\"]]");
    p = add_epsg_def_ex (filter, first, last, 3845, "epsg", 3845,
        "SWEREF99 / RT90 7.5 gon V emulation", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11.30625 +k=1.000006 +x_0=15");
................................................................................
        "WGS_1984", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 ");
    add_proj4text (p, 1,
        "+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 84\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2572235");
    add_srs_wkt (p, 2,
        "63,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 3,
................................................................................
    add_srs_wkt (p, 10,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],EXTENS");
    add_srs_wkt (p, 11,
        "ION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +lat_ts");
    add_srs_wkt (p, 12,
        "=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrid");
    add_srs_wkt (p, 13,
        "s=@null +wktext +no_defs\"],AUTHORITY[\"EPSG\",\"3857\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 3873, "epsg", 3873,
        "ETRS89 / GK19FIN", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=19500000 +y_0=0");




|







 







<
<
<

<







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|

|







|

|

|

|

|

|

|

|

|

|

|







 







|







 







|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
...
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
...
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
...
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
...
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
....
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
....
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
....
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
....
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
....
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
....
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
....
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
....
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
....
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_17 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bermuda 1957 / UTM zone 20N\",GEOGCS[\"Bermuda ");
    add_srs_wkt (p, 1,
        "1957\",DATUM[\"Bermuda_1957\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-73,213,296,0,0,0,0],AUTHORITY[\"EPSG\",\"6216\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 111 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 114 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 117 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 120 W (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
................................................................................
        "Popular_Visualisation_Datum", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 ");
    add_proj4text (p, 1,
        "+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext ");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Popular Visualisation CRS / Mercator (deprecate");
    add_srs_wkt (p, 1,
        "d)\",GEOGCS[\"Popular Visualisation CRS\",DATUM[\"Popula");
    add_srs_wkt (p, 2,
        "r_Visualisation_Datum\",SPHEROID[\"Popular Visualisation");
    add_srs_wkt (p, 3,
................................................................................
    add_srs_wkt (p, 12,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],EXTENSION[\"PROJ4\",\"");
    add_srs_wkt (p, 13,
        "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 ");
    add_srs_wkt (p, 14,
        "+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext ");
    add_srs_wkt (p, 15,
        " +no_defs\"],AUTHORITY[\"EPSG\",\"3785\"]]");
    p = add_epsg_def_ex (filter, first, last, 3786, "epsg", 3786,
        "World Equidistant Cylindrical (Sphere) (deprecated)", 0, 0,
        "GRS 1980 Authalic Sphere", "Greenwich",
        "Not_specified_based_on_GRS_1980_Authalic_Sphere", "Equirectangular", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6");
................................................................................
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Norte\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "_0=229126.939 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Cuba Sur\",GEOGCS[\"NAD27\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "800000 +y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTQ Lambert\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        " +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alberta 3TM ref merid 120 W\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
        "Pulkovo 1942(58) / Stereo70", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_58", "Oblique_Stereographic", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.3");
    add_proj4text (p, 2,
        "59,-0.053,0.844,-0.84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942(58) / Stereo70\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942(58)\",DATUM[\"Pulkovo_1942_58\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6179\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4179\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",46],PARAMETER[\"central_meridian\",25],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.99975],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",500000],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3844\"]]");
    p = add_epsg_def_ex (filter, first, last, 3845, "epsg", 3845,
        "SWEREF99 / RT90 7.5 gon V emulation", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11.30625 +k=1.000006 +x_0=15");
................................................................................
        "WGS_1984", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 ");
    add_proj4text (p, 1,
        "+x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext ");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 84\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2572235");
    add_srs_wkt (p, 2,
        "63,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 3,
................................................................................
    add_srs_wkt (p, 10,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],EXTENS");
    add_srs_wkt (p, 11,
        "ION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +lat_ts");
    add_srs_wkt (p, 12,
        "=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrid");
    add_srs_wkt (p, 13,
        "s=@null +wktext  +no_defs\"],AUTHORITY[\"EPSG\",\"3857\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 3873, "epsg", 3873,
        "ETRS89 / GK19FIN", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=19500000 +y_0=0");

Changes to src/srsinit/epsg_inlined_18.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
....
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
....
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
....
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
....
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
....
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
....
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
....
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
....
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
....
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
....
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
....
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
....
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
....
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
....
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
....
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
....
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_18 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Puerto Rico / UTM zone 20N\",GEOGCS[\"Puerto Ri");
    add_srs_wkt (p, 1,
        "co\",DATUM[\"Puerto_Rico\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[11,72,-101,0,0,0,0],AUTHORITY[\"EPSG\",\"6139\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 12,
        "ing\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"3970\"]]");
    p = add_epsg_def_ex (filter, first, last, 3973, "epsg", 3973,
        "WGS 84 / NSIDC EASE-Grid North (deprecated)", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Azimuthal_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84");
    add_proj4text (p, 1,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid North (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",");
    add_srs_wkt (p, 2,
        "6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],");
    add_srs_wkt (p, 7,
        "PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_center\",90],PARAMETER[\"longitude_of_center");
    add_srs_wkt (p, 9,
        "\",0],PARAMETER[\"false_easting\",0],PARAMETER[\"false_n");
    add_srs_wkt (p, 10,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 11,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"3973\"]]");
    p = add_epsg_def_ex (filter, first, last, 3974, "epsg", 3974,
        "WGS 84 / NSIDC EASE-Grid South (deprecated)", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Azimuthal_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS8");
    add_proj4text (p, 1,
        "4 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid South (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",");
    add_srs_wkt (p, 2,
        "6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],");
    add_srs_wkt (p, 7,
        "PROJECTION[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_center\",-90],PARAMETER[\"longitude_of_cente");
    add_srs_wkt (p, 9,
        "r\",0],PARAMETER[\"false_easting\",0],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 11,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"3974\"]]");
    p = add_epsg_def_ex (filter, first, last, 3975, "epsg", 3975,
        "WGS 84 / NSIDC EASE-Grid Global (deprecated)", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Cylindrical_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84");
    add_proj4text (p, 1,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid Global (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]");
    add_srs_wkt (p, 7,
        ",PROJECTION[\"Cylindrical_Equal_Area\"],PARAMETER[\"stan");
    add_srs_wkt (p, 8,
        "dard_parallel_1\",30],PARAMETER[\"central_meridian\",0],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northin");
    add_srs_wkt (p, 10,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 11,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"39");
    add_srs_wkt (p, 12,
        "75\"]]");
    p = add_epsg_def_ex (filter, first, last, 3976, "epsg", 3976,
        "WGS 84 / NSIDC Sea Ice Polar Stereographic South", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Polar_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 ");
................................................................................
    add_proj4text (p, 2,
        ".614,-255.95,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Lambert (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone A\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone B\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone C\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone D\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "2,-101,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Puerto Rico State Plane CS of 1927\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "uerto Rico\",DATUM[\"Puerto_Rico\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "139\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "66 +towgs84=11,72,-101,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Puerto Rico / St. Croix\",GEOGCS[\"Puerto Rico\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Puerto_Rico\",SPHEROID[\"Clarke 1866\",6378206.");
    add_srs_wkt (p, 2,
        "4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[11,72,-101,0,0,0,0],AUTHORITY[\"EPSG\",\"6139\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1858 ellips");
    add_srs_wkt (p, 1,
        "oid\",DATUM[\"Not_specified_based_on_Clarke_1858_ellipso");
    add_srs_wkt (p, 2,
        "id\",SPHEROID[\"Clarke 1858\",6378293.645208759,294.2606");
    add_srs_wkt (p, 3,
        "763692606,AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"6007\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1866 ellips");
    add_srs_wkt (p, 1,
        "oid\",DATUM[\"Not_specified_based_on_Clarke_1866_ellipso");
    add_srs_wkt (p, 2,
        "id\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898");
    add_srs_wkt (p, 3,
        "2,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"600");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1866 Michig");
    add_srs_wkt (p, 1,
        "an ellipsoid\",DATUM[\"Not_specified_based_on_Clarke_186");
    add_srs_wkt (p, 2,
        "6_Michigan_ellipsoid\",SPHEROID[\"Clarke 1866 Michigan\"");
    add_srs_wkt (p, 3,
        ",6378450.047548896,294.9786971646772,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"7009\"]],AUTHORITY[\"EPSG\",\"6009\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1880 (Benoi");
    add_srs_wkt (p, 1,
        "t) ellipsoid\",DATUM[\"Not_specified_based_on_Clarke_188");
    add_srs_wkt (p, 2,
        "0_Benoit_ellipsoid\",SPHEROID[\"Clarke 1880 (Benoit)\",6");
    add_srs_wkt (p, 3,
        "378300.789,293.4663155389811,AUTHORITY[\"EPSG\",\"7010\"");
    add_srs_wkt (p, 4,
        "]],AUTHORITY[\"EPSG\",\"6010\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1880 (IGN) ");
    add_srs_wkt (p, 1,
        "ellipsoid\",DATUM[\"Not_specified_based_on_Clarke_1880_I");
    add_srs_wkt (p, 2,
        "GN_ellipsoid\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,");
    add_srs_wkt (p, 3,
        "293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6011\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1880 ellips");
    add_srs_wkt (p, 1,
        "oid\",DATUM[\"Not_specified_based_on_Clarke_1880_ellipso");
    add_srs_wkt (p, 2,
        "id\",SPHEROID[\"Clarke 1880\",6378249.144808011,293.4663");
    add_srs_wkt (p, 3,
        "076556365,AUTHORITY[\"EPSG\",\"7034\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"6034\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Everest (1830 Defi");
    add_srs_wkt (p, 1,
        "nition) ellipsoid\",DATUM[\"Not_specified_based_on_Evere");
    add_srs_wkt (p, 2,
        "st_1830_Definition_ellipsoid\",SPHEROID[\"Everest (1830 ");
    add_srs_wkt (p, 3,
        "Definition)\",6377299.36559538,300.8017255433549,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6042\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unspecified datum based upon the Hughes 1980 el");
    add_srs_wkt (p, 1,
        "lipsoid\",DATUM[\"Not_specified_based_on_Hughes_1980_ell");
    add_srs_wkt (p, 2,
        "ipsoid\",SPHEROID[\"Hughes 1980\",6378273,298.2794111230");
    add_srs_wkt (p, 3,
        "64,AUTHORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"60");
    add_srs_wkt (p, 4,
        "54\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,




|







 







<
<
<

<







 







|







 







|








|

|

|

|

|

|

|

|

|

|

|

|
<
<

|








|

|

|

|

|

|

|

|

|

|

|

|
<
<

|








|

|

|

|

|

|

|

|

|

|

|

|
<
<







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|

|







 







|







 







|







 







|







 







|







 







|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
....
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168


1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201


1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234


1235
1236
1237
1238
1239
1240
1241
....
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
....
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
....
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
....
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
....
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
....
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
....
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
....
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
....
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
....
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
....
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
....
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
....
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
....
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
....
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_18 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Puerto Rico / UTM zone 20N\",GEOGCS[\"Puerto Ri");
    add_srs_wkt (p, 1,
        "co\",DATUM[\"Puerto_Rico\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[11,72,-101,0,0,0,0],AUTHORITY[\"EPSG\",\"6139\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 12,
        "ing\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"3970\"]]");
    p = add_epsg_def_ex (filter, first, last, 3973, "epsg", 3973,
        "WGS 84 / NSIDC EASE-Grid North", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Azimuthal_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84");
    add_proj4text (p, 1,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid North\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_c");
    add_srs_wkt (p, 8,
        "enter\",90],PARAMETER[\"longitude_of_center\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 10,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 11,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3973\"]]");


    p = add_epsg_def_ex (filter, first, last, 3974, "epsg", 3974,
        "WGS 84 / NSIDC EASE-Grid South", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Azimuthal_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS8");
    add_proj4text (p, 1,
        "4 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid South\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude_of_c");
    add_srs_wkt (p, 8,
        "enter\",-90],PARAMETER[\"longitude_of_center\",0],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"false_easting\",0],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 10,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 11,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3974\"]]");


    p = add_epsg_def_ex (filter, first, last, 3975, "epsg", 3975,
        "WGS 84 / NSIDC EASE-Grid Global", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Cylindrical_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84");
    add_proj4text (p, 1,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid Global\",GEOGCS[\"WGS ");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.");
    add_srs_wkt (p, 2,
        "257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 6,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"");
    add_srs_wkt (p, 7,
        "Cylindrical_Equal_Area\"],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 8,
        "1\",30],PARAMETER[\"central_meridian\",0],PARAMETER[\"fa");
    add_srs_wkt (p, 9,
        "lse_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 10,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 11,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3975\"]]");


    p = add_epsg_def_ex (filter, first, last, 3976, "epsg", 3976,
        "WGS 84 / NSIDC Sea Ice Polar Stereographic South", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Polar_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 ");
................................................................................
    add_proj4text (p, 2,
        ".614,-255.95,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Lambert (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone A\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone B\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone C\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Gauss zone D\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "2,-101,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Puerto Rico State Plane CS of 1927\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "uerto Rico\",DATUM[\"Puerto_Rico\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "139\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "66 +towgs84=11,72,-101,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Puerto Rico / St. Croix\",GEOGCS[\"Puerto Rico\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Puerto_Rico\",SPHEROID[\"Clarke 1866\",6378206.");
    add_srs_wkt (p, 2,
        "4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[11,72,-101,0,0,0,0],AUTHORITY[\"EPSG\",\"6139\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1858 ellips");
    add_srs_wkt (p, 1,
        "oid\",DATUM[\"Not_specified_based_on_Clarke_1858_ellipso");
    add_srs_wkt (p, 2,
        "id\",SPHEROID[\"Clarke 1858\",6378293.645208759,294.2606");
    add_srs_wkt (p, 3,
        "763692569,AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"6007\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1866 ellips");
    add_srs_wkt (p, 1,
        "oid\",DATUM[\"Not_specified_based_on_Clarke_1866_ellipso");
    add_srs_wkt (p, 2,
        "id\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213900");
    add_srs_wkt (p, 3,
        "6,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"600");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1866 Michig");
    add_srs_wkt (p, 1,
        "an ellipsoid\",DATUM[\"Not_specified_based_on_Clarke_186");
    add_srs_wkt (p, 2,
        "6_Michigan_ellipsoid\",SPHEROID[\"Clarke 1866 Michigan\"");
    add_srs_wkt (p, 3,
        ",6378450.047548896,294.9786971646739,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"7009\"]],AUTHORITY[\"EPSG\",\"6009\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1880 (Benoi");
    add_srs_wkt (p, 1,
        "t) ellipsoid\",DATUM[\"Not_specified_based_on_Clarke_188");
    add_srs_wkt (p, 2,
        "0_Benoit_ellipsoid\",SPHEROID[\"Clarke 1880 (Benoit)\",6");
    add_srs_wkt (p, 3,
        "378300.789,293.4663155389802,AUTHORITY[\"EPSG\",\"7010\"");
    add_srs_wkt (p, 4,
        "]],AUTHORITY[\"EPSG\",\"6010\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1880 (IGN) ");
    add_srs_wkt (p, 1,
        "ellipsoid\",DATUM[\"Not_specified_based_on_Clarke_1880_I");
    add_srs_wkt (p, 2,
        "GN_ellipsoid\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,");
    add_srs_wkt (p, 3,
        "293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6011\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Clarke 1880 ellips");
    add_srs_wkt (p, 1,
        "oid\",DATUM[\"Not_specified_based_on_Clarke_1880_ellipso");
    add_srs_wkt (p, 2,
        "id\",SPHEROID[\"Clarke 1880\",6378249.144808011,293.4663");
    add_srs_wkt (p, 3,
        "076556349,AUTHORITY[\"EPSG\",\"7034\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"6034\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unknown datum based upon the Everest (1830 Defi");
    add_srs_wkt (p, 1,
        "nition) ellipsoid\",DATUM[\"Not_specified_based_on_Evere");
    add_srs_wkt (p, 2,
        "st_1830_Definition_ellipsoid\",SPHEROID[\"Everest (1830 ");
    add_srs_wkt (p, 3,
        "Definition)\",6377299.36559538,300.8017255433552,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6042\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
................................................................................
    add_srs_wkt (p, 0,
        "GEOGCS[\"Unspecified datum based upon the Hughes 1980 el");
    add_srs_wkt (p, 1,
        "lipsoid\",DATUM[\"Not_specified_based_on_Hughes_1980_ell");
    add_srs_wkt (p, 2,
        "ipsoid\",SPHEROID[\"Hughes 1980\",6378273,298.2794111230");
    add_srs_wkt (p, 3,
        "61,AUTHORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"60");
    add_srs_wkt (p, 4,
        "54\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,

Changes to src/srsinit/epsg_inlined_19.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934


935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
...
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
....
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
....
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
....
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
....
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
....
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
....
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
....
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
....
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
....
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
....
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
....
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
....
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
....
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
....
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
....
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568


2569
2570
2571
2572
2573
2574
2575
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_19 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "[\"EPSG\",\"4126\"]]");
    p = add_epsg_def_ex (filter, first, last, 4127, "epsg", 4127,
        "Tete", 1, 1,
        "Clarke 1866", "Greenwich",
        "Tete", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-80,-100,-228,0,0,0");
    add_proj4text (p, 1,
        ",0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Tete\",DATUM[\"Tete\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 1,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[-80,-100,-228,0,0,0,0],AUTHORITY[\"EPSG\",\"61");
    add_srs_wkt (p, 3,
        "27\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
        "EAST],AUTHORITY[\"EPSG\",\"4127\"]]");


    p = add_epsg_def_ex (filter, first, last, 4128, "epsg", 4128,
        "Madzansua", 1, 1,
        "Clarke 1866", "Greenwich",
        "Madzansua", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Madzansua\",DATUM[\"Madzansua\",SPHEROID[\"Clar");
    add_srs_wkt (p, 1,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6128\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
        "SG\",\"4128\"]]");
    p = add_epsg_def_ex (filter, first, last, 4129, "epsg", 4129,
        "Observatario", 1, 1,
        "Clarke 1866", "Greenwich",
        "Observatario", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-132,-110,-335,0,0,");
    add_proj4text (p, 1,
        "0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Observatario\",DATUM[\"Observatario\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[-132,-110,-335,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"6129\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4129\"]]");
    p = add_epsg_def_ex (filter, first, last, 4130, "epsg", 4130,
        "Moznet", 1, 1,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Moznet\",DATUM[\"Moznet_ITRF94\",SPHEROID[\"WGS");
    add_srs_wkt (p, 1,
        " 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6130\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"4130\"]]");
    p = add_epsg_def_ex (filter, first, last, 4131, "epsg", 4131,
        "Indian 1960", 1, 1,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1960", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs8");
................................................................................
        "PSD93", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,1");
    add_proj4text (p, 1,
        "73.919,-0.81,-1.898,8.336,16.71006 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PSD93\",DATUM[\"PDO_Survey_Datum_1993\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7012\"]],TOWGS84[-180.624,-225.516,173.919,-0.8");
    add_srs_wkt (p, 3,
        "1,-1.898,8.336,16.71006],AUTHORITY[\"EPSG\",\"6134\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4134\"]]");
    p = add_epsg_def_ex (filter, first, last, 4135, "epsg", 4135,
        "Old Hawaiian", 1, 1,
        "Clarke 1866", "Greenwich",
        "Old_Hawaiian", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Old Hawaiian\",DATUM[\"Old_Hawaiian\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"6135\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
................................................................................
        "St_Lawrence_Island", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. Lawrence Island\",DATUM[\"St_Lawrence_Islan");
    add_srs_wkt (p, 1,
        "d\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138982");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6136");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
................................................................................
        "St_Paul_Island", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. Paul Island\",DATUM[\"St_Paul_Island\",SPHE");
    add_srs_wkt (p, 1,
        "ROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6137\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
................................................................................
        "St_George_Island", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. George Island\",DATUM[\"St_George_Island\",");
    add_srs_wkt (p, 1,
        "SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6138\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Puerto Rico\",DATUM[\"Puerto_Rico\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7008\"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6139\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
................................................................................
    add_srs_wkt (p, 5,
        "925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 7,
        "40\"]]");
    p = add_epsg_def_ex (filter, first, last, 4141, "epsg", 4141,
        "Israel 1993", 1, 1,
        "GRS 1980", "Greenwich",
        "Israel_1993", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +n");
    add_proj4text (p, 1,
        "o_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Israel 1993\",DATUM[\"Israel_1993\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "19\"]],TOWGS84[-48,55,52,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 3,
        "141\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 4,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 6,
        ",EAST],AUTHORITY[\"EPSG\",\"4141\"]]");
    p = add_epsg_def_ex (filter, first, last, 4142, "epsg", 4142,
        "Locodjo 1965", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Locodjo_1965", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0");
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4148\"]]");
    p = add_epsg_def_ex (filter, first, last, 4149, "epsg", 4149,
        "CH1903", 1, 1,
        "Bessel 1841", "Greenwich",
        "CH1903", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.");
    add_proj4text (p, 1,
        "346,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"CH1903\",DATUM[\"CH1903\",SPHEROID[\"Bessel 184");
    add_srs_wkt (p, 1,
        "1\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"6149\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4149\"]]");
    p = add_epsg_def_ex (filter, first, last, 4150, "epsg", 4150,
        "CH1903+", 1, 1,
        "Bessel 1841", "Greenwich",
        "CH1903+", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,12");
    add_proj4text (p, 1,
        "4,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Dabola 1981\",DATUM[\"Dabola_1981\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-83,37,124,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"6155\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Mount Dillon\",DATUM[\"Mount_Dillon\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1858\",6378293.645208759,294.2606763692606,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"6157\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
................................................................................
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4158\"]]");
    p = add_epsg_def_ex (filter, first, last, 4159, "epsg", 4159,
        "ELD79", 1, 1,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-115.8543,-99.0583,-1");
    add_proj4text (p, 1,
        "52.4616,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ELD79\",DATUM[\"European_Libyan_Datum_1979\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"International 1924\",6378388,297,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7022\"]],TOWGS84[-115.8543,-99.0583,-152.4616,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6159\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4159\"]]");
    p = add_epsg_def_ex (filter, first, last, 4160, "epsg", 4160,
        "Chos Malal 1914", 1, 1,
        "International 1924", "Greenwich",
        "Chos_Malal_1914", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +no_defs");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"American Samoa 1962\",DATUM[\"American_Samoa_19");
    add_srs_wkt (p, 1,
        "62\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898");
    add_srs_wkt (p, 2,
        "2,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-115,118,426,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
................................................................................
        "UTHORITY[\"EPSG\",\"4180\"]]");
    p = add_epsg_def_ex (filter, first, last, 4181, "epsg", 4181,
        "Luxembourg 1930", 1, 1,
        "International 1924", "Greenwich",
        "Luxembourg_1930", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-189.6806,18.3463,-42");
    add_proj4text (p, 1,
        ".7695,-0.33746,-3.09264,2.53861,0.4598 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Luxembourg 1930\",DATUM[\"Luxembourg_1930\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"International 1924\",6378388,297,AUTHORITY[\"EPS");
    add_srs_wkt (p, 2,
        "G\",\"7022\"]],TOWGS84[-189.6806,18.3463,-42.7695,-0.337");
    add_srs_wkt (p, 3,
        "46,-3.09264,2.53861,0.4598],AUTHORITY[\"EPSG\",\"6181\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4181\"]]");
    p = add_epsg_def_ex (filter, first, last, 4182, "epsg", 4182,
        "Azores Occidental 1939", 1, 1,
        "International 1924", "Greenwich",
        "Azores_Occidental_Islands_1939", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-425,-169,81,0,0,0,0 ");
................................................................................
        "]");
    p = add_epsg_def_ex (filter, first, last, 4191, "epsg", 4191,
        "Albanian 1987", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Albanian_1987", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=-44.183,-0.58,-38.48");
    add_proj4text (p, 1,
        "9,2.3867,2.7072,-3.5196,-8.2703 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Albanian 1987\",DATUM[\"Albanian_1987\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7024\"]],TOWGS84[-44.183,-0.58,-38.489,2.3867,2.7072,-3.");
    add_srs_wkt (p, 3,
        "5196,-8.2703],AUTHORITY[\"EPSG\",\"6191\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4191\"]]");
    p = add_epsg_def_ex (filter, first, last, 4192, "epsg", 4192,
        "Douala 1948", 1, 1,
        "International 1924", "Greenwich",
        "Douala_1948", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-206.1,-174.7,-87.7,0");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-15");
    add_proj4text (p, 1,
        "1.8,-41.4,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Manoca 1962\",DATUM[\"Manoca_1962\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6193\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
................................................................................
        "Pulkovo 1995", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=24.47,-130.89,-81.56");
    add_proj4text (p, 1,
        ",0,0,0.13,-0.22 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");


    p = add_epsg_def_ex (filter, first, last, 4201, "epsg", 4201,
        "Adindan", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,");




|







 







<
<
<

<







 







|

|



|

|

|

|

|

|
>
>










|







 







|
<
<



|

|

|

|

|

|






|

|





|

|

|

|

|







 







|







|

|

|

|

|












|







 







|







 







|







 







|







 







|







 







|

|






|

|

|

|

|

|

|







 







|

|





|

|

|

|

|







 







|







 







|







 







|

|





|

|

|

|

|

|







 







|

|







 







|

|





|

|

|

|

|

|







 







|
<
<





<
<
|
|
|
|
|
|
|
|
|







 







|







 







|





|

|

|

|

|
>
>







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
...
953
954
955
956
957
958
959
960


961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
....
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
....
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
....
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
....
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
....
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
....
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
....
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
....
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
....
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
....
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
....
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
....
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
....
2334
2335
2336
2337
2338
2339
2340
2341


2342
2343
2344
2345
2346


2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
....
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
....
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_19 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "[\"EPSG\",\"4126\"]]");
    p = add_epsg_def_ex (filter, first, last, 4127, "epsg", 4127,
        "Tete", 1, 1,
        "Clarke 1866", "Greenwich",
        "Tete", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-73.472,-51.66,-112");
    add_proj4text (p, 1,
        ".482,0.953,4.6,-2.368,0.586 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Tete\",DATUM[\"Tete\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 1,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[-73.472,-51.66,-112.482,0.953,4.6,-2.368,0.586");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6127\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"412");
    add_srs_wkt (p, 7,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 4128, "epsg", 4128,
        "Madzansua", 1, 1,
        "Clarke 1866", "Greenwich",
        "Madzansua", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Madzansua\",DATUM[\"Madzansua\",SPHEROID[\"Clar");
    add_srs_wkt (p, 1,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7008\"]],AUTHORITY[\"EPSG\",\"6128\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
        "SG\",\"4128\"]]");
    p = add_epsg_def_ex (filter, first, last, 4129, "epsg", 4129,
        "Observatario", 1, 1,
        "Clarke 1866", "Greenwich",
        "Observatario", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");


    add_srs_wkt (p, 0,
        "GEOGCS[\"Observatario\",DATUM[\"Observatario\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6129\"]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 4,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 5,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"4129\"]]");
    p = add_epsg_def_ex (filter, first, last, 4130, "epsg", 4130,
        "Moznet", 1, 1,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,-0,-0,-0,0 +no");
    add_proj4text (p, 1,
        "_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Moznet\",DATUM[\"Moznet_ITRF94\",SPHEROID[\"WGS");
    add_srs_wkt (p, 1,
        " 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[0,0,0,-0,-0,-0,0],AUTHORITY[\"EPSG\",\"6130\"]");
    add_srs_wkt (p, 3,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 4,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 5,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 6,
        "],AUTHORITY[\"EPSG\",\"4130\"]]");
    p = add_epsg_def_ex (filter, first, last, 4131, "epsg", 4131,
        "Indian 1960", 1, 1,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1960", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs8");
................................................................................
        "PSD93", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,1");
    add_proj4text (p, 1,
        "73.919,-0.81,-1.898,8.336,16.7101 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PSD93\",DATUM[\"PDO_Survey_Datum_1993\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7012\"]],TOWGS84[-180.624,-225.516,173.919,-0.8");
    add_srs_wkt (p, 3,
        "1,-1.898,8.336,16.7101],AUTHORITY[\"EPSG\",\"6134\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4134\"]]");
    p = add_epsg_def_ex (filter, first, last, 4135, "epsg", 4135,
        "Old Hawaiian", 1, 1,
        "Clarke 1866", "Greenwich",
        "Old_Hawaiian", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Old Hawaiian\",DATUM[\"Old_Hawaiian\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[61,-285,-181,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"6135\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
................................................................................
        "St_Lawrence_Island", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. Lawrence Island\",DATUM[\"St_Lawrence_Islan");
    add_srs_wkt (p, 1,
        "d\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6136");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
................................................................................
        "St_Paul_Island", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. Paul Island\",DATUM[\"St_Paul_Island\",SPHE");
    add_srs_wkt (p, 1,
        "ROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6137\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
................................................................................
        "St_George_Island", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. George Island\",DATUM[\"St_George_Island\",");
    add_srs_wkt (p, 1,
        "SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6138\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=11,72,-101,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Puerto Rico\",DATUM[\"Puerto_Rico\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7008\"]],TOWGS84[11,72,-101,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6139\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
................................................................................
    add_srs_wkt (p, 5,
        "925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 7,
        "40\"]]");
    p = add_epsg_def_ex (filter, first, last, 4141, "epsg", 4141,
        "Israel", 1, 1,
        "GRS 1980", "Greenwich",
        "Israel", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=-48,55,52,0,0,0,0 +n");
    add_proj4text (p, 1,
        "o_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Israel\",DATUM[\"Israel\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 1,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 2,
        "GS84[-48,55,52,0,0,0,0],AUTHORITY[\"EPSG\",\"6141\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"4141\"]]");
    p = add_epsg_def_ex (filter, first, last, 4142, "epsg", 4142,
        "Locodjo 1965", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Locodjo_1965", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-125,53,467,0,0,0,0");
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4148\"]]");
    p = add_epsg_def_ex (filter, first, last, 4149, "epsg", 4149,
        "CH1903", 1, 1,
        "Bessel 1841", "Greenwich",
        "CH1903", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=674.4,15.1,405.3,0,");
    add_proj4text (p, 1,
        "0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"CH1903\",DATUM[\"CH1903\",SPHEROID[\"Bessel 184");
    add_srs_wkt (p, 1,
        "1\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6149\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"4149\"]]");
    p = add_epsg_def_ex (filter, first, last, 4150, "epsg", 4150,
        "CH1903+", 1, 1,
        "Bessel 1841", "Greenwich",
        "CH1903+", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-83,37,12");
    add_proj4text (p, 1,
        "4,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Dabola 1981\",DATUM[\"Dabola_1981\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-83,37,124,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"6155\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Mount Dillon\",DATUM[\"Mount_Dillon\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1858\",6378293.645208759,294.2606763692569,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"6157\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
................................................................................
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4158\"]]");
    p = add_epsg_def_ex (filter, first, last, 4159, "epsg", 4159,
        "ELD79", 1, 1,
        "International 1924", "Greenwich",
        "European_Libyan_Datum_1979", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-115.854,-99.0583,-15");
    add_proj4text (p, 1,
        "2.462,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ELD79\",DATUM[\"European_Libyan_Datum_1979\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"International 1924\",6378388,297,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7022\"]],TOWGS84[-115.854,-99.0583,-152.462,0,0,0");
    add_srs_wkt (p, 3,
        ",0],AUTHORITY[\"EPSG\",\"6159\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 5,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 7,
        "59\"]]");
    p = add_epsg_def_ex (filter, first, last, 4160, "epsg", 4160,
        "Chos Malal 1914", 1, 1,
        "International 1924", "Greenwich",
        "Chos_Malal_1914", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +no_defs");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-115,118,426,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"American Samoa 1962\",DATUM[\"American_Samoa_19");
    add_srs_wkt (p, 1,
        "62\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213900");
    add_srs_wkt (p, 2,
        "6,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-115,118,426,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6169\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
................................................................................
        "UTHORITY[\"EPSG\",\"4180\"]]");
    p = add_epsg_def_ex (filter, first, last, 4181, "epsg", 4181,
        "Luxembourg 1930", 1, 1,
        "International 1924", "Greenwich",
        "Luxembourg_1930", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-189.681,18.3463,-42.");
    add_proj4text (p, 1,
        "7695,-0.33746,-3.09264,2.53861,0.4598 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Luxembourg 1930\",DATUM[\"Luxembourg_1930\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"International 1924\",6378388,297,AUTHORITY[\"EPS");
    add_srs_wkt (p, 2,
        "G\",\"7022\"]],TOWGS84[-189.681,18.3463,-42.7695,-0.3374");
    add_srs_wkt (p, 3,
        "6,-3.09264,2.53861,0.4598],AUTHORITY[\"EPSG\",\"6181\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"4181\"]]");
    p = add_epsg_def_ex (filter, first, last, 4182, "epsg", 4182,
        "Azores Occidental 1939", 1, 1,
        "International 1924", "Greenwich",
        "Azores_Occidental_Islands_1939", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-425,-169,81,0,0,0,0 ");
................................................................................
        "]");
    p = add_epsg_def_ex (filter, first, last, 4191, "epsg", 4191,
        "Albanian 1987", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Albanian_1987", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +no_defs");


    add_srs_wkt (p, 0,
        "GEOGCS[\"Albanian 1987\",DATUM[\"Albanian_1987\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,


        "7024\"]],AUTHORITY[\"EPSG\",\"6191\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 3,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 4,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 5,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"4191\"]]");
    p = add_epsg_def_ex (filter, first, last, 4192, "epsg", 4192,
        "Douala 1948", 1, 1,
        "International 1924", "Greenwich",
        "Douala_1948", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-206.1,-174.7,-87.7,0");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-70.9,-15");
    add_proj4text (p, 1,
        "1.8,-41.4,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Manoca 1962\",DATUM[\"Manoca_1962\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-70.9,-151.8,-41.4,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6193\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
................................................................................
        "Pulkovo 1995", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=24.47,-130.89,-81.56");
    add_proj4text (p, 1,
        ",-0,-0,0.13,-0.22 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 7,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 4201, "epsg", 4201,
        "Adindan", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-166,-15,204,0,0,0,");

Changes to src/srsinit/epsg_inlined_20.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
...
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
...
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
...
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
...
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
...
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
...
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
...
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
...
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
...
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
...
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
...
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
....
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
....
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
....
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
....
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
....
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
....
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
....
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
....
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
....
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
....
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
....
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
....
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
....
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
....
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
....
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
....
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_20 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Agadez", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Agadez\",DATUM[\"Agadez\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6206\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-106,-87,");
    add_proj4text (p, 1,
        "188,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Beduaram\",DATUM[\"Beduaram\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 1,
        " 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7011\"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"6213\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Bermuda 1957\",DATUM[\"Bermuda_1957\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[-73,213,296,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"6216\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-263,6,43");
    add_proj4text (p, 1,
        "1,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Carthage\",DATUM[\"Carthage\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 1,
        " 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7011\"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6223\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
................................................................................
        "Cote_d_Ivoire", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Cote d'Ivoire\",DATUM[\"Cote_d_Ivoire\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\",\"6226\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"910");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-190.421,");
    add_proj4text (p, 1,
        "8.532,238.69,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Deir ez Zor\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-190.421,8.532,238.69,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6227\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
................................................................................
        "Douala", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Douala\",DATUM[\"Douala\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6228\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
        "ED87", 1, 1,
        "International 1924", "Greenwich",
        "European_Datum_1987", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-83.11,-97.38,-117.22");
    add_proj4text (p, 1,
        ",0.005693,-0.044698,0.044285,0.1218 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ED87\",DATUM[\"European_Datum_1987\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "22\"]],TOWGS84[-83.11,-97.38,-117.22,0.005693,-0.044698,");
    add_srs_wkt (p, 3,
        "0.044285,0.1218],AUTHORITY[\"EPSG\",\"6231\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4231\"]]");
    p = add_epsg_def_ex (filter, first, last, 4232, "epsg", 4232,
        "Fahud", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Fahud", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-333.102,-11.02,230");
    add_proj4text (p, 1,
        ".69,0,0,0.554,0.219 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Fahud\",DATUM[\"Fahud\",SPHEROID[\"Clarke 1880 ");
    add_srs_wkt (p, 1,
        "(RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[-333.102,-11.02,230.69,0,0,0.554,0.219],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"6232\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4232\"]]");
    p = add_epsg_def_ex (filter, first, last, 4233, "epsg", 4233,
        "Gandajika 1970", 1, 1,
        "International 1924", "Greenwich",
        "Gandajika_1970", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 ");
................................................................................
        "Garoua", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Garoua\",DATUM[\"Garoua\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6234\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.144808011 +b=6356514.966204134 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Jamaica 1875\",DATUM[\"Jamaica_1875\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880\",6378249.144808011,293.4663076556365,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7034\"]],AUTHORITY[\"EPSG\",\"6241\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=70,207,389.5,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"JAD69\",DATUM[\"Jamaica_1969\",SPHEROID[\"Clark");
    add_srs_wkt (p, 1,
        "e 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 2,
        "\"7008\"]],TOWGS84[70,207,389.5,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"6242\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 1,
        "no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Kalianpur 1880\",DATUM[\"Kalianpur_1880\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Everest (1830 Definition)\",6377299.36559538,300.8");
    add_srs_wkt (p, 2,
        "017255433549,AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6243\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
        "Lome", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Lome\",DATUM[\"Lome\",SPHEROID[\"Clarke 1880 (I");
    add_srs_wkt (p, 1,
        "GN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "011\"]],AUTHORITY[\"EPSG\",\"6252\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 3,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 4,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Luzon 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Cl");
    add_srs_wkt (p, 1,
        "arke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 2,
        "\",\"7008\"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6253\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47");
    add_proj4text (p, 1,
        ",0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Merchich\",DATUM[\"Merchich\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 1,
        " 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7011\"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6261\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-74,-130,");
    add_proj4text (p, 1,
        "42,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"M'poraloko\",DATUM[\"M_poraloko\",SPHEROID[\"Cl");
    add_srs_wkt (p, 1,
        "arke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[");
    add_srs_wkt (p, 2,
        "\"EPSG\",\"7011\"]],TOWGS84[-74,-130,42,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"6266\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
................................................................................
        "North_American_Datum_1927", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +datum=NAD27 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1866 Michigan\",6378450.047548896,294.97869");
    add_srs_wkt (p, 2,
        "71646772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]]");
    p = add_epsg_def_ex (filter, first, last, 4270, "epsg", 4270,
        "Nahrwan 1967", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-249,-156,381,0,0,0");
    add_proj4text (p, 1,
        ",0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nahrwan 1967\",DATUM[\"Nahrwan_1967\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7012\"]],TOWGS84[-249,-156,381,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4270\"]]");
    p = add_epsg_def_ex (filter, first, last, 4271, "epsg", 4271,
        "Naparima 1972", 1, 1,
        "International 1924", "Greenwich",
        "Naparima_1972", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-10,375,165,0,0,0,0 +");
................................................................................
    add_proj4text (p, 1,
        "320,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NTF\",DATUM[\"Nouvelle_Triangulation_Francaise\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 2,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6275\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "Palestine 1923", 1, 1,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378300.789 +b=6356566.435 +towgs84=-27");
    add_proj4text (p, 1,
        "5.7224,94.7824,340.8944,-8.001,-4.42,-11.821,1 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Palestine 1923\",DATUM[\"Palestine_1923\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1880 (Benoit)\",6378300.789,293.46631553898");
    add_srs_wkt (p, 2,
        "11,AUTHORITY[\"EPSG\",\"7010\"]],TOWGS84[-275.7224,94.78");
    add_srs_wkt (p, 3,
        "24,340.8944,-8.001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6281\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4281\"]]");
    p = add_epsg_def_ex (filter, first, last, 4282, "epsg", 4282,
        "Pointe Noire", 1, 1,
        "Clarke 1880 (IGN)", "Greenwich",
        "Congo_1960_Pointe_Noire", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-148,51,-");
................................................................................
    add_proj4text (p, 1,
        "291,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Pointe Noire\",DATUM[\"Congo_1960_Pointe_Noire\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 2,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-148,51,-291,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6282\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "Pulkovo 1942", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=23.92,-141.27,-80.9,");
    add_proj4text (p, 1,
        "0,0.35,0.82,-0.12 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 7,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 4285, "epsg", 4285,
        "Qatar 1974", 1, 1,
        "International 1924", "Greenwich",
        "Qatar_1974", "none", "degree",
        "Latitude", "North", "Longitude", "East");
................................................................................
        "G\",\"4288\"]]");
    p = add_epsg_def_ex (filter, first, last, 4289, "epsg", 4289,
        "Amersfoort", 1, 1,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=565.2369,50.0087,46");
    add_proj4text (p, 1,
        "5.658,-0.406857,0.350733,-1.87035,4.0812 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Amersfoort\",DATUM[\"Amersfoort\",SPHEROID[\"Be");
    add_srs_wkt (p, 1,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7004\"]],TOWGS84[565.2369,50.0087,465.658,-0.406857,0.35");
    add_srs_wkt (p, 3,
        "0733,-1.87035,4.0812],AUTHORITY[\"EPSG\",\"6289\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4289\"]]");
    p = add_epsg_def_ex (filter, first, last, 4291, "epsg", 4291,
        "SAD69", 1, 1,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +n");
................................................................................
        "Sudan", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Sudan\",DATUM[\"Sudan\",SPHEROID[\"Clarke 1880 ");
    add_srs_wkt (p, 1,
        "(IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7011\"]],AUTHORITY[\"EPSG\",\"6296\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 3,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 4,
        "74532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lati");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 ");
    add_proj4text (p, 1,
        "+towgs84=-61.702,284.488,472.052,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Trinidad 1903\",DATUM[\"Trinidad_1903\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Clarke 1858\",6378293.645208759,294.2606763692606,AU");
    add_srs_wkt (p, 2,
        "THORITY[\"EPSG\",\"7007\"]],TOWGS84[-61.702,284.488,472.");
    add_srs_wkt (p, 3,
        "052,0,0,0,0],AUTHORITY[\"EPSG\",\"6302\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,");
    add_proj4text (p, 1,
        "227,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1875\",DATUM[\"Voirol_1875\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-73,-247,227,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6304\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
................................................................................
        ",\"4306\"]]");
    p = add_epsg_def_ex (filter, first, last, 4307, "epsg", 4307,
        "Nord Sahara 1959", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-209.3622,-87.8162,");
    add_proj4text (p, 1,
        "404.6198,0.0046,3.4784,0.5805,-1.4547 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nord Sahara 1959\",DATUM[\"Nord_Sahara_1959\",S");
    add_srs_wkt (p, 1,
        "PHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7012\"]],TOWGS84[-209.3622,-87.8162,404.6");
    add_srs_wkt (p, 3,
        "198,0.0046,3.4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "307\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4307\"]]");
    p = add_epsg_def_ex (filter, first, last, 4308, "epsg", 4308,
        "RT38", 1, 1,
        "Bessel 1841", "Greenwich",
        "Stockholm_1938", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +no_defs");




|







 







<
<
<

<







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|





|

|

|

|

|

|






|

|





|

|

|

|

|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|

|





|

|

|

|

|







 







|







 







|





|

|

|

|

|

|







 







|







 







|





|

|

|

|

|







 







|

|





|

|

|

|

|

|







 







|







 







|







 







|







 







|

|





|

|

|

|

|

|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
...
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
...
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
...
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
...
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
...
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
...
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
...
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
...
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
...
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
...
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
....
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
....
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
....
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
....
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
....
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
....
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
....
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
....
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
....
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
....
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
....
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
....
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
....
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
....
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
....
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
....
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_20 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "Agadez", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Agadez\",DATUM[\"Agadez\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6206\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-106,-87,");
    add_proj4text (p, 1,
        "188,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Beduaram\",DATUM[\"Beduaram\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 1,
        " 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7011\"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"6213\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-73,213,296,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Bermuda 1957\",DATUM[\"Bermuda_1957\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[-73,213,296,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"6216\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-263,6,43");
    add_proj4text (p, 1,
        "1,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Carthage\",DATUM[\"Carthage\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 1,
        " 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7011\"]],TOWGS84[-263,6,431,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6223\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
................................................................................
        "Cote_d_Ivoire", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Cote d'Ivoire\",DATUM[\"Cote_d_Ivoire\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\",\"6226\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"910");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-190.421,");
    add_proj4text (p, 1,
        "8.532,238.69,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Deir ez Zor\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-190.421,8.532,238.69,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6227\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
................................................................................
        "Douala", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Douala\",DATUM[\"Douala\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6228\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
        "ED87", 1, 1,
        "International 1924", "Greenwich",
        "European_Datum_1987", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-83.11,-97.38,-117.22");
    add_proj4text (p, 1,
        ",0.00569291,-0.0446976,0.0442851,0.1218 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ED87\",DATUM[\"European_Datum_1987\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "22\"]],TOWGS84[-83.11,-97.38,-117.22,0.00569291,-0.04469");
    add_srs_wkt (p, 3,
        "76,0.0442851,0.1218],AUTHORITY[\"EPSG\",\"6231\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4231\"]]");
    p = add_epsg_def_ex (filter, first, last, 4232, "epsg", 4232,
        "Fahud", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Fahud", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-346,-1,224,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Fahud\",DATUM[\"Fahud\",SPHEROID[\"Clarke 1880 ");
    add_srs_wkt (p, 1,
        "(RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[-346,-1,224,0,0,0,0],AUTHORITY[\"EPSG\",\"6232");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 6,
        "AST],AUTHORITY[\"EPSG\",\"4232\"]]");
    p = add_epsg_def_ex (filter, first, last, 4233, "epsg", 4233,
        "Gandajika 1970", 1, 1,
        "International 1924", "Greenwich",
        "Gandajika_1970", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-133,-321,50,0,0,0,0 ");
................................................................................
        "Garoua", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Garoua\",DATUM[\"Garoua\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6234\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.144808011 +b=6356514.966204134 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Jamaica 1875\",DATUM[\"Jamaica_1875\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880\",6378249.144808011,293.4663076556349,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7034\"]],AUTHORITY[\"EPSG\",\"6241\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=70,207,389.5,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"JAD69\",DATUM[\"Jamaica_1969\",SPHEROID[\"Clark");
    add_srs_wkt (p, 1,
        "e 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 2,
        "\"7008\"]],TOWGS84[70,207,389.5,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"6242\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 1,
        "no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Kalianpur 1880\",DATUM[\"Kalianpur_1880\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Everest (1830 Definition)\",6377299.36559538,300.8");
    add_srs_wkt (p, 2,
        "017255433552,AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6243\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 6,
................................................................................
        "Lome", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Lome\",DATUM[\"Lome\",SPHEROID[\"Clarke 1880 (I");
    add_srs_wkt (p, 1,
        "GN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "011\"]],AUTHORITY[\"EPSG\",\"6252\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 3,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 4,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Luzon 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Cl");
    add_srs_wkt (p, 1,
        "arke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 2,
        "\",\"7008\"]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6253\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=31,146,47");
    add_proj4text (p, 1,
        ",0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Merchich\",DATUM[\"Merchich\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 1,
        " 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7011\"]],TOWGS84[31,146,47,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6261\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-74,-130,");
    add_proj4text (p, 1,
        "42,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"M'poraloko\",DATUM[\"M_poraloko\",SPHEROID[\"Cl");
    add_srs_wkt (p, 1,
        "arke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[");
    add_srs_wkt (p, 2,
        "\"EPSG\",\"7011\"]],TOWGS84[-74,-130,42,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"6266\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
................................................................................
        "North_American_Datum_1927", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +datum=NAD27 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1866 Michigan\",6378450.047548896,294.97869");
    add_srs_wkt (p, 2,
        "71646739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]]");
    p = add_epsg_def_ex (filter, first, last, 4270, "epsg", 4270,
        "Nahrwan 1967", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-242.2,-144.9,370.3");
    add_proj4text (p, 1,
        ",0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nahrwan 1967\",DATUM[\"Nahrwan_1967\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7012\"]],TOWGS84[-242.2,-144.9,370.3,0,0,0,0],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"6270\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4270\"]]");
    p = add_epsg_def_ex (filter, first, last, 4271, "epsg", 4271,
        "Naparima 1972", 1, 1,
        "International 1924", "Greenwich",
        "Naparima_1972", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-10,375,165,0,0,0,0 +");
................................................................................
    add_proj4text (p, 1,
        "320,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NTF\",DATUM[\"Nouvelle_Triangulation_Francaise\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 2,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6275\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "Palestine 1923", 1, 1,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378300.789 +b=6356566.435 +towgs84=-27");
    add_proj4text (p, 1,
        "5.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Palestine 1923\",DATUM[\"Palestine_1923\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1880 (Benoit)\",6378300.789,293.46631553898");
    add_srs_wkt (p, 2,
        "02,AUTHORITY[\"EPSG\",\"7010\"]],TOWGS84[-275.722,94.782");
    add_srs_wkt (p, 3,
        "4,340.894,-8.001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "281\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4281\"]]");
    p = add_epsg_def_ex (filter, first, last, 4282, "epsg", 4282,
        "Pointe Noire", 1, 1,
        "Clarke 1880 (IGN)", "Greenwich",
        "Congo_1960_Pointe_Noire", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-148,51,-");
................................................................................
    add_proj4text (p, 1,
        "291,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Pointe Noire\",DATUM[\"Congo_1960_Pointe_Noire\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 2,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-148,51,-291,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6282\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        "Pulkovo 1942", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=23.92,-141.27,-80.9,");
    add_proj4text (p, 1,
        "-0,0.35,0.82,-0.12 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 7,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 4285, "epsg", 4285,
        "Qatar 1974", 1, 1,
        "International 1924", "Greenwich",
        "Qatar_1974", "none", "degree",
        "Latitude", "North", "Longitude", "East");
................................................................................
        "G\",\"4288\"]]");
    p = add_epsg_def_ex (filter, first, last, 4289, "epsg", 4289,
        "Amersfoort", 1, 1,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=565.417,50.3319,465");
    add_proj4text (p, 1,
        ".552,-0.398957,0.343988,-1.8774,4.0725 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Amersfoort\",DATUM[\"Amersfoort\",SPHEROID[\"Be");
    add_srs_wkt (p, 1,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7004\"]],TOWGS84[565.417,50.3319,465.552,-0.398957,0.343");
    add_srs_wkt (p, 3,
        "988,-1.8774,4.0725],AUTHORITY[\"EPSG\",\"6289\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4289\"]]");
    p = add_epsg_def_ex (filter, first, last, 4291, "epsg", 4291,
        "SAD69", 1, 1,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +n");
................................................................................
        "Sudan", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Sudan\",DATUM[\"Sudan\",SPHEROID[\"Clarke 1880 ");
    add_srs_wkt (p, 1,
        "(IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7011\"]],AUTHORITY[\"EPSG\",\"6296\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 3,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 4,
        "74532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lati");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 ");
    add_proj4text (p, 1,
        "+towgs84=-61.702,284.488,472.052,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Trinidad 1903\",DATUM[\"Trinidad_1903\",SPHEROI");
    add_srs_wkt (p, 1,
        "D[\"Clarke 1858\",6378293.645208759,294.2606763692569,AU");
    add_srs_wkt (p, 2,
        "THORITY[\"EPSG\",\"7007\"]],TOWGS84[-61.702,284.488,472.");
    add_srs_wkt (p, 3,
        "052,0,0,0,0],AUTHORITY[\"EPSG\",\"6302\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-73,-247,");
    add_proj4text (p, 1,
        "227,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1875\",DATUM[\"Voirol_1875\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],TOWGS84[-73,-247,227,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6304\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
................................................................................
        ",\"4306\"]]");
    p = add_epsg_def_ex (filter, first, last, 4307, "epsg", 4307,
        "Nord Sahara 1959", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-209.362,-87.8162,4");
    add_proj4text (p, 1,
        "04.62,0.0046,3.4784,0.5805,-1.4547 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nord Sahara 1959\",DATUM[\"Nord_Sahara_1959\",S");
    add_srs_wkt (p, 1,
        "PHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7012\"]],TOWGS84[-209.362,-87.8162,404.62");
    add_srs_wkt (p, 3,
        ",0.0046,3.4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4307\"]]");
    p = add_epsg_def_ex (filter, first, last, 4308, "epsg", 4308,
        "RT38", 1, 1,
        "Bessel 1841", "Greenwich",
        "Stockholm_1938", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +no_defs");

Changes to src/srsinit/epsg_inlined_21.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
..
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
...
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
...
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
...
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
...
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
...
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
...
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
...
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
...
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
...
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
....
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
....
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
....
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
....
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
....
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
....
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
....
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
....
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
....
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
....
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
....
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
....
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
....
3641
3642
3643
3644
3645
3646
3647













































































































































































































































































































































3648
3649
3650
3651
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_21 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "AUTHORITY[\"EPSG\",\"4309\"]]");
    p = add_epsg_def_ex (filter, first, last, 4310, "epsg", 4310,
        "Yoff", 1, 1,
        "Clarke 1880 (IGN)", "Greenwich",
        "Yoff", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-30,190,8");
    add_proj4text (p, 1,
        "9,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Yoff\",DATUM[\"Yoff\",SPHEROID[\"Clarke 1880 (I");
    add_srs_wkt (p, 1,
        "GN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "011\"]],TOWGS84[-30,190,89,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6310\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"4310\"]]");
    p = add_epsg_def_ex (filter, first, last, 4311, "epsg", 4311,
        "Zanderij", 1, 1,
        "International 1924", "Greenwich",
        "Zanderij", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0");
................................................................................
        "UTHORITY[\"EPSG\",\"4312\"]]");
    p = add_epsg_def_ex (filter, first, last, 4313, "epsg", 4313,
        "Belge 1972", 1, 1,
        "International 1924", "Greenwich",
        "Reseau_National_Belge_1972", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-106.8686,52.2978,-10");
    add_proj4text (p, 1,
        "3.7239,0.3366,-0.457,1.8422,-1.2747 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Belge 1972\",DATUM[\"Reseau_National_Belge_1972");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"International 1924\",6378388,297,AUTHORITY");
    add_srs_wkt (p, 2,
        "[\"EPSG\",\"7022\"]],TOWGS84[-106.8686,52.2978,-103.7239");
    add_srs_wkt (p, 3,
        ",0.3366,-0.457,1.8422,-1.2747],AUTHORITY[\"EPSG\",\"6313");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4313\"]]");
    p = add_epsg_def_ex (filter, first, last, 4314, "epsg", 4314,
        "DHDN", 1, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=598.1,73.7,418.2,0.");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-");
    add_proj4text (p, 1,
        "9,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Conakry 1905\",DATUM[\"Conakry_1905\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7011\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6315\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
................................................................................
        "HORITY[\"EPSG\",\"6324\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4324\"]]");
    p = add_epsg_def_ex (filter, first, last, 4390, "epsg", 4390,
        "Kertau 1968 / Johor Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=2.042583333333333 +lon_0=103.562758333");
    add_proj4text (p, 1,
        "3333 +x_0=0 +y_0=0 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 2,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Johor Grid\",GEOGCS[\"Kertau 1968");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modifie");
    add_srs_wkt (p, 2,
        "d\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_Soldn");
    add_srs_wkt (p, 8,
        "er\"],PARAMETER[\"latitude_of_origin\",2.042583333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",103.5627583333333],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",0],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4390\"]]");
    p = add_epsg_def_ex (filter, first, last, 4391, "epsg", 4391,
        "Kertau 1968 / Sembilan and Melaka Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=2.712283333333334 +lon_0=101.941166666");
    add_proj4text (p, 1,
        "6667 +x_0=-242.005 +y_0=-948.547 +a=6377304.063 +b=63561");
    add_proj4text (p, 2,
        "03.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Sembilan and Melaka Grid\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Kertau 1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everes");
    add_srs_wkt (p, 2,
        "t 1830 Modified\",6377304.063,300.8017,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7018\"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6245\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"C");
    add_srs_wkt (p, 8,
        "assini_Soldner\"],PARAMETER[\"latitude_of_origin\",2.712");
    add_srs_wkt (p, 9,
        "283333333334],PARAMETER[\"central_meridian\",101.9411666");
    add_srs_wkt (p, 10,
        "666667],PARAMETER[\"false_easting\",-242.005],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",-948.547],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"4391\"]]");
    p = add_epsg_def_ex (filter, first, last, 4392, "epsg", 4392,
        "Kertau 1968 / Pahang Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=3.710972222222222 +lon_0=102.436177777");
    add_proj4text (p, 1,
        "7778 +x_0=0 +y_0=0 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 2,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Pahang Grid\",GEOGCS[\"Kertau 196");
    add_srs_wkt (p, 1,
        "8\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modifi");
    add_srs_wkt (p, 2,
        "ed\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_Sold");
    add_srs_wkt (p, 8,
        "ner\"],PARAMETER[\"latitude_of_origin\",3.71097222222222");
    add_srs_wkt (p, 9,
        "2],PARAMETER[\"central_meridian\",102.4361777777778],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"4392\"]]");
    p = add_epsg_def_ex (filter, first, last, 4393, "epsg", 4393,
        "Kertau 1968 / Selangor Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=3.680344444444444 +lon_0=101.508244444");
    add_proj4text (p, 1,
        "4444 +x_0=-21759.438 +y_0=55960.906 +a=6377304.063 +b=63");
    add_proj4text (p, 2,
        "56103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_");
    add_proj4text (p, 3,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Selangor Grid\",GEOGCS[\"Kertau 1");
    add_srs_wkt (p, 1,
        "968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modi");
    add_srs_wkt (p, 2,
        "fied\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_So");
    add_srs_wkt (p, 8,
        "ldner\"],PARAMETER[\"latitude_of_origin\",3.680344444444");
    add_srs_wkt (p, 9,
        "444],PARAMETER[\"central_meridian\",101.5082444444444],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",-21759.438],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",55960.906],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"4393\"]]");
    p = add_epsg_def_ex (filter, first, last, 4394, "epsg", 4394,
        "Kertau 1968 / Terengganu Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=4.946141666666667 +lon_0=102.895208333");
    add_proj4text (p, 1,
        "3333 +x_0=0 +y_0=0 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 2,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Terengganu Grid\",GEOGCS[\"Kertau");
    add_srs_wkt (p, 1,
        " 1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Mo");
    add_srs_wkt (p, 2,
        "dified\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_So");
    add_srs_wkt (p, 8,
        "ldner\"],PARAMETER[\"latitude_of_origin\",4.946141666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"central_meridian\",102.8952083333333],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",0],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"4394\"]]");
    p = add_epsg_def_ex (filter, first, last, 4395, "epsg", 4395,
        "Kertau 1968 / Pinang Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=5.421325 +lon_0=100.3458694444444 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377304.063 +b=6356103.038993155 +towgs84=-");
    add_proj4text (p, 2,
        "11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Pinang Grid\",GEOGCS[\"Kertau 196");
    add_srs_wkt (p, 1,
        "8\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modifi");
    add_srs_wkt (p, 2,
        "ed\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_Sold");
    add_srs_wkt (p, 8,
        "ner\"],PARAMETER[\"latitude_of_origin\",5.421325],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",100.3458694444444],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 11,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting");
    add_srs_wkt (p, 12,
        "\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"4");
    add_srs_wkt (p, 13,
        "395\"]]");
    p = add_epsg_def_ex (filter, first, last, 4396, "epsg", 4396,
        "Kertau 1968 / Kedah and Perlis Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=5.965147222222223 +lon_0=100.637594444");
    add_proj4text (p, 1,
        "4444 +x_0=0 +y_0=0 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 2,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Kedah and Perlis Grid\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Kertau 1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 Modified\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7018\"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6245\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cass");
    add_srs_wkt (p, 8,
        "ini_Soldner\"],PARAMETER[\"latitude_of_origin\",5.965147");
    add_srs_wkt (p, 9,
        "222222223],PARAMETER[\"central_meridian\",100.6375944444");
    add_srs_wkt (p, 10,
        "444],PARAMETER[\"false_easting\",0],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"4396\"]]");
    p = add_epsg_def_ex (filter, first, last, 4397, "epsg", 4397,
        "Kertau 1968 / Perak Revised Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=4.859380555555555 +lon_0=100.816766666");
    add_proj4text (p, 1,
        "6667 +x_0=0 +y_0=133453.669 +a=6377304.063 +b=6356103.03");
    add_proj4text (p, 2,
        "8993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Perak Revised Grid\",GEOGCS[\"Ker");
    add_srs_wkt (p, 1,
        "tau 1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830");
    add_srs_wkt (p, 2,
        " Modified\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "18\"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "245\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassin");
    add_srs_wkt (p, 8,
        "i_Soldner\"],PARAMETER[\"latitude_of_origin\",4.85938055");
    add_srs_wkt (p, 9,
        "5555555],PARAMETER[\"central_meridian\",100.816766666666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",0],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",133453.669],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"4397\"]]");
    p = add_epsg_def_ex (filter, first, last, 4398, "epsg", 4398,
        "Kertau 1968 / Kelantan Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=5.893922222222222 +lon_0=102.177291666");
    add_proj4text (p, 1,
        "6667 +x_0=0 +y_0=0 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 2,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Kelantan Grid\",GEOGCS[\"Kertau 1");
    add_srs_wkt (p, 1,
        "968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modi");
    add_srs_wkt (p, 2,
        "fied\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_So");
    add_srs_wkt (p, 8,
        "ldner\"],PARAMETER[\"latitude_of_origin\",5.893922222222");
    add_srs_wkt (p, 9,
        "222],PARAMETER[\"central_meridian\",102.1772916666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",0],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"4398\"]]");
    p = add_epsg_def_ex (filter, first, last, 4399, "epsg", 4399,
        "NAD27 / BLM 59N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=0.9996 +x_0=500000.00");
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 59N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 60N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 1N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 2N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 3N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 4N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 5N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 6N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 7N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 8N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 9N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 10N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 11N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 12N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 13N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "9.614,-255.95,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Lambert\",GEOGCS[\"Katan");
    add_srs_wkt (p, 1,
        "ga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 18N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 19N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Pennsylvania South\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0480.06096012192 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York Long Island\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        ",PARAMETER[\"false_easting\",25500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4513\"]]");













































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<







 







|
<
<



|

|

|

|

|

|







 







|

|





|

|

|

|

|

|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
..
79
80
81
82
83
84
85
86


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
...
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
...
355
356
357
358
359
360
361



































































































































































































































































































































































362
363
364
365
366
367
368
...
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
...
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
...
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
...
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
...
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
...
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
...
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
...
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
...
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
...
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
...
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
...
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
...
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
...
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
...
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
....
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
....
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
....
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
....
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
....
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_21 (int filter, struct epsg_defs **first, struct epsg_defs **last)
................................................................................
        "AUTHORITY[\"EPSG\",\"4309\"]]");
    p = add_epsg_def_ex (filter, first, last, 4310, "epsg", 4310,
        "Yoff", 1, 1,
        "Clarke 1880 (IGN)", "Greenwich",
        "Yoff", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");


    add_srs_wkt (p, 0,
        "GEOGCS[\"Yoff\",DATUM[\"Yoff\",SPHEROID[\"Clarke 1880 (I");
    add_srs_wkt (p, 1,
        "GN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 2,
        "011\"]],AUTHORITY[\"EPSG\",\"6310\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 3,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 4,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 5,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"4310\"]]");
    p = add_epsg_def_ex (filter, first, last, 4311, "epsg", 4311,
        "Zanderij", 1, 1,
        "International 1924", "Greenwich",
        "Zanderij", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-265,120,-358,0,0,0,0");
................................................................................
        "UTHORITY[\"EPSG\",\"4312\"]]");
    p = add_epsg_def_ex (filter, first, last, 4313, "epsg", 4313,
        "Belge 1972", 1, 1,
        "International 1924", "Greenwich",
        "Reseau_National_Belge_1972", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-106.869,52.2978,-103");
    add_proj4text (p, 1,
        ".724,0.3366,-0.457,1.8422,-1.2747 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Belge 1972\",DATUM[\"Reseau_National_Belge_1972");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"International 1924\",6378388,297,AUTHORITY");
    add_srs_wkt (p, 2,
        "[\"EPSG\",\"7022\"]],TOWGS84[-106.869,52.2978,-103.724,0");
    add_srs_wkt (p, 3,
        ".3366,-0.457,1.8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4313\"]]");
    p = add_epsg_def_ex (filter, first, last, 4314, "epsg", 4314,
        "DHDN", 1, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=598.1,73.7,418.2,0.");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-23,259,-");
    add_proj4text (p, 1,
        "9,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Conakry 1905\",DATUM[\"Conakry_1905\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7011\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6315\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
................................................................................
        "HORITY[\"EPSG\",\"6324\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4324\"]]");



































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 4399, "epsg", 4399,
        "NAD27 / BLM 59N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=0.9996 +x_0=500000.00");
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 59N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 60N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 1N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 2N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 3N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 4N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 5N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 6N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 7N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 8N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 9N (ftUS)\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 10N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 11N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 12N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "01016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 13N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "9.614,-255.95,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Katanga 1955 / Katanga Lambert\",GEOGCS[\"Katan");
    add_srs_wkt (p, 1,
        "ga 1955\",DATUM[\"Katanga_1955\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 18N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 19N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Pennsylvania South\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0480.06096012192 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York Long Island\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
        ",PARAMETER[\"false_easting\",25500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4513\"]]");
    p = add_epsg_def_ex (filter, first, last, 4514, "epsg", 4514,
        "CGCS2000 / 3-degree Gauss-Kruger zone 26", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 26\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",78],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",26500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4514\"]]");
    p = add_epsg_def_ex (filter, first, last, 4515, "epsg", 4515,
        "CGCS2000 / 3-degree Gauss-Kruger zone 27", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 27\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",81],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",27500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4515\"]]");
    p = add_epsg_def_ex (filter, first, last, 4516, "epsg", 4516,
        "CGCS2000 / 3-degree Gauss-Kruger zone 28", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 28\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",84],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",28500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4516\"]]");
    p = add_epsg_def_ex (filter, first, last, 4517, "epsg", 4517,
        "CGCS2000 / 3-degree Gauss-Kruger zone 29", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 29\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",87],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",29500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4517\"]]");
    p = add_epsg_def_ex (filter, first, last, 4518, "epsg", 4518,
        "CGCS2000 / 3-degree Gauss-Kruger zone 30", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 30\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",90],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",30500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4518\"]]");
    p = add_epsg_def_ex (filter, first, last, 4519, "epsg", 4519,
        "CGCS2000 / 3-degree Gauss-Kruger zone 31", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 31\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",93],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",31500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4519\"]]");
    p = add_epsg_def_ex (filter, first, last, 4520, "epsg", 4520,
        "CGCS2000 / 3-degree Gauss-Kruger zone 32", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 32\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",96],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",32500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4520\"]]");
    p = add_epsg_def_ex (filter, first, last, 4521, "epsg", 4521,
        "CGCS2000 / 3-degree Gauss-Kruger zone 33", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 33\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",99],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",33500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4521\"]]");
    p = add_epsg_def_ex (filter, first, last, 4522, "epsg", 4522,
        "CGCS2000 / 3-degree Gauss-Kruger zone 34", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 34\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",102],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",34500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"4522\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_22.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
....
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
....
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
....
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
....
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
....
3229
3230
3231
3232
3233
3234
3235

























































































































































































































3236
3237
3238
3239
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_22 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 4514, "epsg", 4514,
        "CGCS2000 / 3-degree Gauss-Kruger zone 26", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=78 +k=1 +x_0=26500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 26\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",78],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",26500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4514\"]]");
    p = add_epsg_def_ex (filter, first, last, 4515, "epsg", 4515,
        "CGCS2000 / 3-degree Gauss-Kruger zone 27", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=27500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 27\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",81],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",27500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4515\"]]");
    p = add_epsg_def_ex (filter, first, last, 4516, "epsg", 4516,
        "CGCS2000 / 3-degree Gauss-Kruger zone 28", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=84 +k=1 +x_0=28500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 28\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",84],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",28500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4516\"]]");
    p = add_epsg_def_ex (filter, first, last, 4517, "epsg", 4517,
        "CGCS2000 / 3-degree Gauss-Kruger zone 29", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=29500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 29\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",87],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",29500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4517\"]]");
    p = add_epsg_def_ex (filter, first, last, 4518, "epsg", 4518,
        "CGCS2000 / 3-degree Gauss-Kruger zone 30", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90 +k=1 +x_0=30500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 30\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",90],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",30500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4518\"]]");
    p = add_epsg_def_ex (filter, first, last, 4519, "epsg", 4519,
        "CGCS2000 / 3-degree Gauss-Kruger zone 31", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=31500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 31\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",93],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",31500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4519\"]]");
    p = add_epsg_def_ex (filter, first, last, 4520, "epsg", 4520,
        "CGCS2000 / 3-degree Gauss-Kruger zone 32", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=96 +k=1 +x_0=32500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 32\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",96],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",32500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4520\"]]");
    p = add_epsg_def_ex (filter, first, last, 4521, "epsg", 4521,
        "CGCS2000 / 3-degree Gauss-Kruger zone 33", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=33500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 33\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",99],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",33500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"4521\"]]");
    p = add_epsg_def_ex (filter, first, last, 4522, "epsg", 4522,
        "CGCS2000 / 3-degree Gauss-Kruger zone 34", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=1 +x_0=34500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGCS2000 / 3-degree Gauss-Kruger zone 34\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"China Geodetic Coordinate System 2000\",DATUM[\"Chi");
    add_srs_wkt (p, 2,
        "na_2000\",SPHEROID[\"CGCS2000\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"1024\"]],AUTHORITY[\"EPSG\",\"1043\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4490\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",102],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",34500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"4522\"]]");
    p = add_epsg_def_ex (filter, first, last, 4523, "epsg", 4523,
        "CGCS2000 / 3-degree Gauss-Kruger zone 35", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=");
................................................................................
        "North_American_Datum_1927_1976", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27(76)\",DATUM[\"North_American_Datum_1927_1");
    add_srs_wkt (p, 1,
        "976\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821389");
    add_srs_wkt (p, 2,
        "82,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"66");
    add_srs_wkt (p, 3,
        "08\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27(CGQ77)\",DATUM[\"North_American_Datum_192");
    add_srs_wkt (p, 1,
        "7_CGQ77\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982");
    add_srs_wkt (p, 2,
        "138982,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"6609\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 4,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 6,
................................................................................
        "Hong Kong 1980", 1, 1,
        "International 1924", "Greenwich",
        "Hong_Kong_1980", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-16");
    add_proj4text (p, 1,
        "1.764,0.067753,-2.243649,-1.158827,-1.094246 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Hong Kong 1980\",DATUM[\"Hong_Kong_1980\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7022\"]],TOWGS84[-162.619,-276.959,-161.764,0.067753,");
    add_srs_wkt (p, 3,
        "-2.243649,-1.158827,-1.094246],AUTHORITY[\"EPSG\",\"6611");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4611\"]]");
    p = add_epsg_def_ex (filter, first, last, 4612, "epsg", 4612,
        "JGD2000", 1, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4613\"]]");
    p = add_epsg_def_ex (filter, first, last, 4614, "epsg", 4614,
        "QND95", 1, 1,
        "International 1924", "Greenwich",
        "Qatar_National_Datum_1995", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-119.4248,-303.65872,");
    add_proj4text (p, 1,
        "-11.00061,1.164298,0.174458,1.096259,3.657065 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"QND95\",DATUM[\"Qatar_National_Datum_1995\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"International 1924\",6378388,297,AUTHORITY[\"EPS");
    add_srs_wkt (p, 2,
        "G\",\"7022\"]],TOWGS84[-119.4248,-303.65872,-11.00061,1.");
    add_srs_wkt (p, 3,
        "164298,0.174458,1.096259,3.657065],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6614\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4614\"]]");
    p = add_epsg_def_ex (filter, first, last, 4615, "epsg", 4615,
        "Porto Santo", 1, 1,
        "International 1924", "Greenwich",
        "Porto_Santo_1936", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-499,-249,314,0,0,0,0");
................................................................................
        "Y[\"EPSG\",\"6634\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4634\"]]");

























































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|







 







|







 







|







|

|

|

|

|







 







|

|





|

|

|

|

|

|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56













































































































































































































































































































































57
58
59
60
61
62
63
....
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
....
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
....
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
....
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
....
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_22 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;













































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 4523, "epsg", 4523,
        "CGCS2000 / 3-degree Gauss-Kruger zone 35", 0, 1,
        "CGCS2000", "Greenwich",
        "China_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=");
................................................................................
        "North_American_Datum_1927_1976", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27(76)\",DATUM[\"North_American_Datum_1927_1");
    add_srs_wkt (p, 1,
        "976\",SPHEROID[\"Clarke 1866\",6378206.4,294.97869821390");
    add_srs_wkt (p, 2,
        "06,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"66");
    add_srs_wkt (p, 3,
        "08\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NAD27(CGQ77)\",DATUM[\"North_American_Datum_192");
    add_srs_wkt (p, 1,
        "7_CGQ77\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982");
    add_srs_wkt (p, 2,
        "139006,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"6609\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 4,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 6,
................................................................................
        "Hong Kong 1980", 1, 1,
        "International 1924", "Greenwich",
        "Hong_Kong_1980", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-162.619,-276.959,-16");
    add_proj4text (p, 1,
        "1.764,0.067753,-2.24365,-1.15883,-1.09425 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Hong Kong 1980\",DATUM[\"Hong_Kong_1980\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7022\"]],TOWGS84[-162.619,-276.959,-161.764,0.067753,");
    add_srs_wkt (p, 3,
        "-2.24365,-1.15883,-1.09425],AUTHORITY[\"EPSG\",\"6611\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4611\"]]");
    p = add_epsg_def_ex (filter, first, last, 4612, "epsg", 4612,
        "JGD2000", 1, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4613\"]]");
    p = add_epsg_def_ex (filter, first, last, 4614, "epsg", 4614,
        "QND95", 1, 1,
        "International 1924", "Greenwich",
        "Qatar_National_Datum_1995", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-119.425,-303.659,-11");
    add_proj4text (p, 1,
        ".0006,1.1643,0.174458,1.09626,3.65706 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"QND95\",DATUM[\"Qatar_National_Datum_1995\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"International 1924\",6378388,297,AUTHORITY[\"EPS");
    add_srs_wkt (p, 2,
        "G\",\"7022\"]],TOWGS84[-119.425,-303.659,-11.0006,1.1643");
    add_srs_wkt (p, 3,
        ",0.174458,1.09626,3.65706],AUTHORITY[\"EPSG\",\"6614\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"4614\"]]");
    p = add_epsg_def_ex (filter, first, last, 4615, "epsg", 4615,
        "Porto Santo", 1, 1,
        "International 1924", "Greenwich",
        "Porto_Santo_1936", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-499,-249,314,0,0,0,0");
................................................................................
        "Y[\"EPSG\",\"6634\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4634\"]]");
    p = add_epsg_def_ex (filter, first, last, 4635, "epsg", 4635,
        "ST87 Ouvea", 1, 1,
        "International 1924", "Greenwich",
        "ST87_Ouvea", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-122.383,-188.696,103");
    add_proj4text (p, 1,
        ".344,3.5107,-4.9668,-5.7047,4.4798 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ST87 Ouvea\",DATUM[\"ST87_Ouvea\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[-122.383,-188.696,103.344,3.5107,-4.9668,-5");
    add_srs_wkt (p, 3,
        ".7047,4.4798],AUTHORITY[\"EPSG\",\"6635\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4635\"]]");
    p = add_epsg_def_ex (filter, first, last, 4636, "epsg", 4636,
        "Petrels 1972", 1, 1,
        "International 1924", "Greenwich",
        "Petrels_1972", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=365,194,166,0,0,0,0 +");
    add_proj4text (p, 1,
        "no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Petrels 1972\",DATUM[\"Petrels_1972\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7022\"]],TOWGS84[365,194,166,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6636\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4636\"]]");
    p = add_epsg_def_ex (filter, first, last, 4637, "epsg", 4637,
        "Perroud 1950", 1, 1,
        "International 1924", "Greenwich",
        "Pointe_Geologie_Perroud_1950", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +");
    add_proj4text (p, 1,
        "no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Perroud 1950\",DATUM[\"Pointe_Geologie_Perroud_");
    add_srs_wkt (p, 1,
        "1950\",SPHEROID[\"International 1924\",6378388,297,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7022\"]],TOWGS84[325,154,172,0,0,0,0],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6637\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4637\"]");
    add_srs_wkt (p, 7,
        "]");
    p = add_epsg_def_ex (filter, first, last, 4638, "epsg", 4638,
        "Saint Pierre et Miquelon 1950", 1, 1,
        "Clarke 1866", "Greenwich",
        "Saint_Pierre_et_Miquelon_1950", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Saint Pierre et Miquelon 1950\",DATUM[\"Saint_P");
    add_srs_wkt (p, 1,
        "ierre_et_Miquelon_1950\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[30,430,368,0,0,0,0],AUTHORITY[\"EPSG\",\"6638\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4638\"]]");
    p = add_epsg_def_ex (filter, first, last, 4639, "epsg", 4639,
        "MOP78", 1, 1,
        "International 1924", "Greenwich",
        "MOP78", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=253,-132,-127,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"MOP78\",DATUM[\"MOP78\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 1,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 2,
        "84[253,-132,-127,0,0,0,0],AUTHORITY[\"EPSG\",\"6639\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"4639\"]]");
    p = add_epsg_def_ex (filter, first, last, 4640, "epsg", 4640,
        "RRAF 1991", 1, 1,
        "WGS 84", "Greenwich",
        "Reseau_de_Reference_des_Antilles_Francaises_1991", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RRAF 1991\",DATUM[\"Reseau_de_Reference_des_Ant");
    add_srs_wkt (p, 1,
        "illes_Francaises_1991\",SPHEROID[\"WGS 84\",6378137,298.");
    add_srs_wkt (p, 2,
        "257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6640\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4640\"]]");
    p = add_epsg_def_ex (filter, first, last, 4641, "epsg", 4641,
        "IGN53 Mare", 1, 1,
        "International 1924", "Greenwich",
        "IGN53_Mare", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=287.58,177.78,-135.41");
    add_proj4text (p, 1,
        ",0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IGN53 Mare\",DATUM[\"IGN53_Mare\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[287.58,177.78,-135.41,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6641\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 6,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4641\"]]");
    p = add_epsg_def_ex (filter, first, last, 4642, "epsg", 4642,
        "ST84 Ile des Pins", 1, 1,
        "International 1924", "Greenwich",
        "ST84_Ile_des_Pins", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-13,-348,292,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ST84 Ile des Pins\",DATUM[\"ST84_Ile_des_Pins\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7022\"]],TOWGS84[-13,-348,292,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"6642\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4642\"]]");
    p = add_epsg_def_ex (filter, first, last, 4643, "epsg", 4643,
        "ST71 Belep", 1, 1,
        "International 1924", "Greenwich",
        "ST71_Belep", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-480.26,-438.32,-643.");
    add_proj4text (p, 1,
        "429,16.3119,20.1721,-4.0349,-111.7 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ST71 Belep\",DATUM[\"ST71_Belep\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4");
    add_srs_wkt (p, 3,
        ".0349,-111.7],AUTHORITY[\"EPSG\",\"6643\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4643\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_23.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
...
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
...
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
...
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
...
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
...
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
....
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
....
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
....
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
....
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
....
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
....
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
....
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
....
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
....
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
....
2507
2508
2509
2510
2511
2512
2513









































































































































































































2514
2515
2516
2517
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_23 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 4635, "epsg", 4635,
        "ST87 Ouvea", 1, 1,
        "International 1924", "Greenwich",
        "ST87_Ouvea", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-122.383,-188.696,103");
    add_proj4text (p, 1,
        ".344,3.5107,-4.9668,-5.7047,4.4798 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ST87 Ouvea\",DATUM[\"ST87_Ouvea\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[-122.383,-188.696,103.344,3.5107,-4.9668,-5");
    add_srs_wkt (p, 3,
        ".7047,4.4798],AUTHORITY[\"EPSG\",\"6635\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4635\"]]");
    p = add_epsg_def_ex (filter, first, last, 4636, "epsg", 4636,
        "Petrels 1972", 1, 1,
        "International 1924", "Greenwich",
        "Petrels_1972", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=365,194,166,0,0,0,0 +");
    add_proj4text (p, 1,
        "no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Petrels 1972\",DATUM[\"Petrels_1972\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7022\"]],TOWGS84[365,194,166,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6636\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4636\"]]");
    p = add_epsg_def_ex (filter, first, last, 4637, "epsg", 4637,
        "Perroud 1950", 1, 1,
        "International 1924", "Greenwich",
        "Pointe_Geologie_Perroud_1950", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=325,154,172,0,0,0,0 +");
    add_proj4text (p, 1,
        "no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Perroud 1950\",DATUM[\"Pointe_Geologie_Perroud_");
    add_srs_wkt (p, 1,
        "1950\",SPHEROID[\"International 1924\",6378388,297,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7022\"]],TOWGS84[325,154,172,0,0,0,0],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6637\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4637\"]");
    add_srs_wkt (p, 7,
        "]");
    p = add_epsg_def_ex (filter, first, last, 4638, "epsg", 4638,
        "Saint Pierre et Miquelon 1950", 1, 1,
        "Clarke 1866", "Greenwich",
        "Saint_Pierre_et_Miquelon_1950", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Saint Pierre et Miquelon 1950\",DATUM[\"Saint_P");
    add_srs_wkt (p, 1,
        "ierre_et_Miquelon_1950\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[30,430,368,0,0,0,0],AUTHORITY[\"EPSG\",\"6638\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4638\"]]");
    p = add_epsg_def_ex (filter, first, last, 4639, "epsg", 4639,
        "MOP78", 1, 1,
        "International 1924", "Greenwich",
        "MOP78", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=253,-132,-127,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"MOP78\",DATUM[\"MOP78\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 1,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 2,
        "84[253,-132,-127,0,0,0,0],AUTHORITY[\"EPSG\",\"6639\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"4639\"]]");
    p = add_epsg_def_ex (filter, first, last, 4640, "epsg", 4640,
        "RRAF 1991", 1, 1,
        "WGS 84", "Greenwich",
        "Reseau_de_Reference_des_Antilles_Francaises_1991", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RRAF 1991\",DATUM[\"Reseau_de_Reference_des_Ant");
    add_srs_wkt (p, 1,
        "illes_Francaises_1991\",SPHEROID[\"WGS 84\",6378137,298.");
    add_srs_wkt (p, 2,
        "257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6640\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4640\"]]");
    p = add_epsg_def_ex (filter, first, last, 4641, "epsg", 4641,
        "IGN53 Mare", 1, 1,
        "International 1924", "Greenwich",
        "IGN53_Mare", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=287.58,177.78,-135.41");
    add_proj4text (p, 1,
        ",0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IGN53 Mare\",DATUM[\"IGN53_Mare\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[287.58,177.78,-135.41,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6641\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 6,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4641\"]]");
    p = add_epsg_def_ex (filter, first, last, 4642, "epsg", 4642,
        "ST84 Ile des Pins", 1, 1,
        "International 1924", "Greenwich",
        "ST84_Ile_des_Pins", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-13,-348,292,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ST84 Ile des Pins\",DATUM[\"ST84_Ile_des_Pins\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7022\"]],TOWGS84[-13,-348,292,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"6642\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4642\"]]");
    p = add_epsg_def_ex (filter, first, last, 4643, "epsg", 4643,
        "ST71 Belep", 1, 1,
        "International 1924", "Greenwich",
        "ST71_Belep", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-480.26,-438.32,-643.");
    add_proj4text (p, 1,
        "429,16.3119,20.1721,-4.0349,-111.7002 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ST71 Belep\",DATUM[\"ST71_Belep\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4");
    add_srs_wkt (p, 3,
        ".0349,-111.7002],AUTHORITY[\"EPSG\",\"6643\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4643\"]]");
    p = add_epsg_def_ex (filter, first, last, 4644, "epsg", 4644,
        "NEA74 Noumea", 1, 1,
        "International 1924", "Greenwich",
        "NEA74_Noumea", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-10.18,-350.43,291.37");
................................................................................
        "\",EAST],AUTHORITY[\"EPSG\",\"4657\"]]");
    p = add_epsg_def_ex (filter, first, last, 4658, "epsg", 4658,
        "Hjorsey 1955", 1, 1,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-73,47,-83,0,0,0,0 +n");
    add_proj4text (p, 1,
        "o_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Hjorsey 1955\",DATUM[\"Hjorsey_1955\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7022\"]],TOWGS84[-73,47,-83,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"6658\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 4,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 6,
................................................................................
        "T],AUTHORITY[\"EPSG\",\"4659\"]]");
    p = add_epsg_def_ex (filter, first, last, 4660, "epsg", 4660,
        "Helle 1954", 1, 1,
        "International 1924", "Greenwich",
        "Helle_1954", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=982.6087,552.753,-540");
    add_proj4text (p, 1,
        ".873,6.6816266,-31.6114924,-19.84816,16.805 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Helle 1954\",DATUM[\"Helle_1954\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[982.6087,552.753,-540.873,6.6816266,-31.611");
    add_srs_wkt (p, 3,
        "4924,-19.84816,16.805],AUTHORITY[\"EPSG\",\"6660\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4660\"]]");
    p = add_epsg_def_ex (filter, first, last, 4661, "epsg", 4661,
        "LKS92", 1, 1,
        "GRS 1980", "Greenwich",
        "Latvia_1992", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
        "Voirol_1879", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1879\",DATUM[\"Voirol_1879\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\",\"6671\"]],PRIM");
    add_srs_wkt (p, 3,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
................................................................................
        "Chatham Islands 1979", 1, 1,
        "International 1924", "Greenwich",
        "Chatham_Islands_Datum_1979", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=174.05,-25.49,112.57,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Chatham Islands 1979\",DATUM[\"Chatham_Islands_");
    add_srs_wkt (p, 1,
        "Datum_1979\",SPHEROID[\"International 1924\",6378388,297");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[174.05,-25.49,112");
    add_srs_wkt (p, 3,
        ".57,0,0,0.554,0.2263],AUTHORITY[\"EPSG\",\"6673\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4673\"]]");
    p = add_epsg_def_ex (filter, first, last, 4674, "epsg", 4674,
        "SIRGAS 2000", 1, 1,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-100,-248,259,0,0,0");
    add_proj4text (p, 1,
        ",0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Guam 1963\",DATUM[\"Guam_1963\",SPHEROID[\"Clar");
    add_srs_wkt (p, 1,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7008\"]],TOWGS84[-100,-248,259,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6675\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-127.62,-67.24,-47.");
    add_proj4text (p, 1,
        "04,-3.068,4.903,1.578,-1.06 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PRS92\",DATUM[\"Philippine_Reference_System_199");
    add_srs_wkt (p, 1,
        "2\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138982");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-127.62,-67.24,-4");
    add_srs_wkt (p, 3,
        "7.04,-3.068,4.903,1.578,-1.06],AUTHORITY[\"EPSG\",\"6683");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
................................................................................
        "\",EAST],AUTHORITY[\"EPSG\",\"4687\"]]");
    p = add_epsg_def_ex (filter, first, last, 4688, "epsg", 4688,
        "Fatu Iva 72", 1, 1,
        "International 1924", "Greenwich",
        "Fatu_Iva_72", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=347.103,1078.125,2623");
    add_proj4text (p, 1,
        ".922,-33.8875,70.6773,-9.3943,186.074 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Fatu Iva 72\",DATUM[\"Fatu_Iva_72\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "22\"]],TOWGS84[347.103,1078.125,2623.922,-33.8875,70.677");
    add_srs_wkt (p, 3,
        "3,-9.3943,186.074],AUTHORITY[\"EPSG\",\"6688\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4688\"]]");
    p = add_epsg_def_ex (filter, first, last, 4689, "epsg", 4689,
        "IGN63 Hiva Oa", 1, 1,
        "International 1924", "Greenwich",
        "IGN63_Hiva_Oa", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=410.721,55.049,80.746");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-103.746,-9.614,-25");
    add_proj4text (p, 1,
        "5.95,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
................................................................................
    add_srs_wkt (p, 4,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 6,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"4709\"]]");
    p = add_epsg_def_ex (filter, first, last, 4710, "epsg", 4710,
        "Astro DOS 71", 1, 1,
        "International 1924", "Greenwich",
        "Astro_DOS_71", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-320,550,-494,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Astro DOS 71\",DATUM[\"Astro_DOS_71\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7022\"]],TOWGS84[-320,550,-494,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"6710\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 6,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"4710\"]]");
    p = add_epsg_def_ex (filter, first, last, 4711, "epsg", 4711,
        "Marcus Island 1952", 1, 1,
        "International 1924", "Greenwich",
        "Marcus_Island_1952", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=124,-234,-25,0,0,0,0 ");
................................................................................
        "]]");
    p = add_epsg_def_ex (filter, first, last, 4713, "epsg", 4713,
        "Ayabelle Lighthouse", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Ayabelle_Lighthouse", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-77,-128,142,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Ayabelle Lighthouse\",DATUM[\"Ayabelle_Lighthou");
    add_srs_wkt (p, 1,
        "se\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.465,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-77,-128,142,0,0,0");
    add_srs_wkt (p, 3,
        ",0],AUTHORITY[\"EPSG\",\"6713\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 5,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-2,151,181,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Cape Canaveral\",DATUM[\"Cape_Canaveral\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7008\"]],TOWGS84[-2,151,181,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"6717\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-179.483,-69.379,-2");
    add_proj4text (p, 1,
        "7.584,-7.862,8.163,6.042,-13.925 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GCGD59\",DATUM[\"Grand_Cayman_Geodetic_Datum_19");
    add_srs_wkt (p, 1,
        "59\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898");
    add_srs_wkt (p, 2,
        "2,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-179.483,-69.379");
    add_srs_wkt (p, 3,
        ",-27.584,-7.862,8.163,6.042,-13.925],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6723\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=8.853,-52.644,180.3");
    add_proj4text (p, 1,
        "04,-0.393,-2.323,2.96,-24.081 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"SIGD61\",DATUM[\"Sister_Islands_Geodetic_Datum_");
    add_srs_wkt (p, 1,
        "1961\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138");
    add_srs_wkt (p, 2,
        "982,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[8.853,-52.644,");
    add_srs_wkt (p, 3,
        "180.304,-0.393,-2.323,2.96,-24.081],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6726\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Hong Kong 1963\",DATUM[\"Hong_Kong_1963\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1858\",6378293.645208759,294.2606763692606,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"6738\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
................................................................................
        "ITY[\"EPSG\",\"6739\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4739\"]]");









































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







|







 







|

|





|

|

|

|

|

|







 







|







 







|







|

|

|

|

|







 







|







 







|







 







|

|





|

|

|

|

|

|







 







|







 







|

|






|

|

|

|

|

|

|







 







|







|







 







|







 







|

|







 







|

|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56

























































































































































































































57
58
59
60
61
62
63
...
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
...
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
...
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
...
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
...
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
...
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
....
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
....
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
....
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
....
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
....
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
....
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
....
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
....
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
....
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_23 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;

























































































































































































































    p = add_epsg_def_ex (filter, first, last, 4644, "epsg", 4644,
        "NEA74 Noumea", 1, 1,
        "International 1924", "Greenwich",
        "NEA74_Noumea", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-10.18,-350.43,291.37");
................................................................................
        "\",EAST],AUTHORITY[\"EPSG\",\"4657\"]]");
    p = add_epsg_def_ex (filter, first, last, 4658, "epsg", 4658,
        "Hjorsey 1955", 1, 1,
        "International 1924", "Greenwich",
        "Hjorsey_1955", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-73,46,-86,0,0,0,0 +n");
    add_proj4text (p, 1,
        "o_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Hjorsey 1955\",DATUM[\"Hjorsey_1955\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7022\"]],TOWGS84[-73,46,-86,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"6658\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 4,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 6,
................................................................................
        "T],AUTHORITY[\"EPSG\",\"4659\"]]");
    p = add_epsg_def_ex (filter, first, last, 4660, "epsg", 4660,
        "Helle 1954", 1, 1,
        "International 1924", "Greenwich",
        "Helle_1954", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=982.609,552.753,-540.");
    add_proj4text (p, 1,
        "873,6.68163,-31.6115,-19.8482,16.805 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Helle 1954\",DATUM[\"Helle_1954\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],TOWGS84[982.609,552.753,-540.873,6.68163,-31.6115,-");
    add_srs_wkt (p, 3,
        "19.8482,16.805],AUTHORITY[\"EPSG\",\"6660\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4660\"]]");
    p = add_epsg_def_ex (filter, first, last, 4661, "epsg", 4661,
        "LKS92", 1, 1,
        "GRS 1980", "Greenwich",
        "Latvia_1992", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
        "Voirol_1879", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1879\",DATUM[\"Voirol_1879\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Clarke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\",\"6671\"]],PRIM");
    add_srs_wkt (p, 3,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
................................................................................
        "Chatham Islands 1979", 1, 1,
        "International 1924", "Greenwich",
        "Chatham_Islands_Datum_1979", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=174.05,-25.49,112.57,");
    add_proj4text (p, 1,
        "-0,-0,0.554,0.2263 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Chatham Islands 1979\",DATUM[\"Chatham_Islands_");
    add_srs_wkt (p, 1,
        "Datum_1979\",SPHEROID[\"International 1924\",6378388,297");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[174.05,-25.49,112");
    add_srs_wkt (p, 3,
        ".57,-0,-0,0.554,0.2263],AUTHORITY[\"EPSG\",\"6673\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4673\"]]");
    p = add_epsg_def_ex (filter, first, last, 4674, "epsg", 4674,
        "SIRGAS 2000", 1, 1,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-100,-248,259,0,0,0");
    add_proj4text (p, 1,
        ",0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Guam 1963\",DATUM[\"Guam_1963\",SPHEROID[\"Clar");
    add_srs_wkt (p, 1,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7008\"]],TOWGS84[-100,-248,259,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6675\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-127.62,-67.24,-47.");
    add_proj4text (p, 1,
        "04,-3.068,4.903,1.578,-1.06 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PRS92\",DATUM[\"Philippine_Reference_System_199");
    add_srs_wkt (p, 1,
        "2\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-127.62,-67.24,-4");
    add_srs_wkt (p, 3,
        "7.04,-3.068,4.903,1.578,-1.06],AUTHORITY[\"EPSG\",\"6683");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
................................................................................
        "\",EAST],AUTHORITY[\"EPSG\",\"4687\"]]");
    p = add_epsg_def_ex (filter, first, last, 4688, "epsg", 4688,
        "Fatu Iva 72", 1, 1,
        "International 1924", "Greenwich",
        "Fatu_Iva_72", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=347.103,1078.12,2623.");
    add_proj4text (p, 1,
        "92,-33.8875,70.6773,-9.3943,186.074 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Fatu Iva 72\",DATUM[\"Fatu_Iva_72\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "22\"]],TOWGS84[347.103,1078.12,2623.92,-33.8875,70.6773,");
    add_srs_wkt (p, 3,
        "-9.3943,186.074],AUTHORITY[\"EPSG\",\"6688\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4688\"]]");
    p = add_epsg_def_ex (filter, first, last, 4689, "epsg", 4689,
        "IGN63 Hiva Oa", 1, 1,
        "International 1924", "Greenwich",
        "IGN63_Hiva_Oa", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=410.721,55.049,80.746");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-103.746,-9.614,-25");
    add_proj4text (p, 1,
        "5.95,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Katanga 1955\",DATUM[\"Katanga_1955\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7008\"]],TOWGS84[-103.746,-9.614,-255.95,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6695\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
................................................................................
    add_srs_wkt (p, 4,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 6,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"4709\"]]");
    p = add_epsg_def_ex (filter, first, last, 4710, "epsg", 4710,
        "St. Helena 1971", 1, 1,
        "International 1924", "Greenwich",
        "St_Helena_1971", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-320,550,-494,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. Helena 1971\",DATUM[\"St_Helena_1971\",SPHE");
    add_srs_wkt (p, 1,
        "ROID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 2,
        "\",\"7022\"]],TOWGS84[-320,550,-494,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6710\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 6,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4710\"]]");
    p = add_epsg_def_ex (filter, first, last, 4711, "epsg", 4711,
        "Marcus Island 1952", 1, 1,
        "International 1924", "Greenwich",
        "Marcus_Island_1952", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=124,-234,-25,0,0,0,0 ");
................................................................................
        "]]");
    p = add_epsg_def_ex (filter, first, last, 4713, "epsg", 4713,
        "Ayabelle Lighthouse", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Ayabelle_Lighthouse", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-79,-129,145,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Ayabelle Lighthouse\",DATUM[\"Ayabelle_Lighthou");
    add_srs_wkt (p, 1,
        "se\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.465,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-79,-129,145,0,0,0");
    add_srs_wkt (p, 3,
        ",0],AUTHORITY[\"EPSG\",\"6713\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 5,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-2,151,181,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Cape Canaveral\",DATUM[\"Cape_Canaveral\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7008\"]],TOWGS84[-2,151,181,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"6717\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=-179.483,-69.379,-2");
    add_proj4text (p, 1,
        "7.584,-7.862,8.163,6.042,-13.925 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GCGD59\",DATUM[\"Grand_Cayman_Geodetic_Datum_19");
    add_srs_wkt (p, 1,
        "59\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213900");
    add_srs_wkt (p, 2,
        "6,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[-179.483,-69.379");
    add_srs_wkt (p, 3,
        ",-27.584,-7.862,8.163,6.042,-13.925],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6723\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=8.853,-52.644,180.3");
    add_proj4text (p, 1,
        "04,-0.393,-2.323,2.96,-24.081 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"SIGD61\",DATUM[\"Sister_Islands_Geodetic_Datum_");
    add_srs_wkt (p, 1,
        "1961\",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139");
    add_srs_wkt (p, 2,
        "006,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS84[8.853,-52.644,");
    add_srs_wkt (p, 3,
        "180.304,-0.393,-2.323,2.96,-24.081],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6726\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378293.645208759 +b=6356617.987679838 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Hong Kong 1963\",DATUM[\"Hong_Kong_1963\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1858\",6378293.645208759,294.2606763692569,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"6738\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
................................................................................
        "ITY[\"EPSG\",\"6739\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4739\"]]");
    p = add_epsg_def_ex (filter, first, last, 4740, "epsg", 4740,
        "PZ-90", 1, 1,
        "PZ-90", "Greenwich",
        "Parametrop_Zemp_1990", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378136 +b=6356751.361745712 +towgs84=0");
    add_proj4text (p, 1,
        ",0,1.5,-0,-0,0.076,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PZ-90\",DATUM[\"Parametrop_Zemp_1990\",SPHEROID");
    add_srs_wkt (p, 1,
        "[\"PZ-90\",6378136,298.257839303,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "54\"]],TOWGS84[0,0,1.5,-0,-0,0.076,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6740\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4740\"]]");
    p = add_epsg_def_ex (filter, first, last, 4741, "epsg", 4741,
        "FD54", 1, 1,
        "International 1924", "Greenwich",
        "Faroe_Datum_1954", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"FD54\",DATUM[\"Faroe_Datum_1954\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],AUTHORITY[\"EPSG\",\"6741\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 3,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 4,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 5,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "4741\"]]");
    p = add_epsg_def_ex (filter, first, last, 4742, "epsg", 4742,
        "GDM2000", 1, 1,
        "GRS 1980", "Greenwich",
        "Geodetic_Datum_of_Malaysia_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GDM2000\",DATUM[\"Geodetic_Datum_of_Malaysia_20");
    add_srs_wkt (p, 1,
        "00\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6742\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"4742\"]]");
    p = add_epsg_def_ex (filter, first, last, 4743, "epsg", 4743,
        "Karbala 1979", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Karbala_1979", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=70.995,-335.916,262");
    add_proj4text (p, 1,
        ".898,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Karbala 1979\",DATUM[\"Karbala_1979\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7012\"]],TOWGS84[70.995,-335.916,262.898,0,0,0,0]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6743\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4743");
    add_srs_wkt (p, 7,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 4744, "epsg", 4744,
        "Nahrwan 1934", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nahrwan 1934\",DATUM[\"Nahrwan_1934\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7012\"]],AUTHORITY[\"EPSG\",\"6744\"]],PRIMEM[\"G");
    add_srs_wkt (p, 3,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 4,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 5,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"4744\"]]");
    p = add_epsg_def_ex (filter, first, last, 4745, "epsg", 4745,
        "RD/83", 1, 1,
        "Bessel 1841", "Greenwich",
        "Rauenberg_Datum_83", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RD/83\",DATUM[\"Rauenberg_Datum_83\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7004\"]],AUTHORITY[\"EPSG\",\"6745\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 6,
        "SG\",\"4745\"]]");
    p = add_epsg_def_ex (filter, first, last, 4746, "epsg", 4746,
        "PD/83", 1, 1,
        "Bessel 1841", "Greenwich",
        "Potsdam_Datum_83", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PD/83\",DATUM[\"Potsdam_Datum_83\",SPHEROID[\"B");
    add_srs_wkt (p, 1,
        "essel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 2,
        "\"7004\"]],AUTHORITY[\"EPSG\",\"6746\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 3,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 4,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 5,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"4746\"]]");
    p = add_epsg_def_ex (filter, first, last, 4747, "epsg", 4747,
        "GR96", 1, 1,
        "GRS 1980", "Greenwich",
        "Greenland_1996", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GR96\",DATUM[\"Greenland_1996\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 1,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 2,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6747\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"4747\"]]");
    p = add_epsg_def_ex (filter, first, last, 4748, "epsg", 4748,
        "Vanua Levu 1915", 1, 1,
        "Clarke 1880 (international foot)", "Greenwich",
        "Vanua_Levu_1915", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51");
    add_proj4text (p, 1,
        ",391,-36,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Vanua Levu 1915\",DATUM[\"Vanua_Levu_1915\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1880 (international foot)\",6378306.3696,");
    add_srs_wkt (p, 2,
        "293.4663076556349,AUTHORITY[\"EPSG\",\"7055\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "51,391,-36,0,0,0,0],AUTHORITY[\"EPSG\",\"6748\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4748\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_24.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
...
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
...
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
....
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
....
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
....
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
....
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
....
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
....
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
....
3099
3100
3101
3102
3103
3104
3105































































































































































































































































































































































3106
3107
3108
3109
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_24 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 4740, "epsg", 4740,
        "PZ-90", 1, 1,
        "PZ-90", "Greenwich",
        "Parametry_Zemli_1990", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378136 +b=6356751.361745712 +towgs84=0");
    add_proj4text (p, 1,
        ",0,1.5,0,0,0.076,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PZ-90\",DATUM[\"Parametry_Zemli_1990\",SPHEROID");
    add_srs_wkt (p, 1,
        "[\"PZ-90\",6378136,298.257839303,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 2,
        "54\"]],TOWGS84[0,0,1.5,0,0,0.076,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6740\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"4740\"]]");
    p = add_epsg_def_ex (filter, first, last, 4741, "epsg", 4741,
        "FD54", 1, 1,
        "International 1924", "Greenwich",
        "Faroe_Datum_1954", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"FD54\",DATUM[\"Faroe_Datum_1954\",SPHEROID[\"In");
    add_srs_wkt (p, 1,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 2,
        "\"]],AUTHORITY[\"EPSG\",\"6741\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 3,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 4,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 5,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "4741\"]]");
    p = add_epsg_def_ex (filter, first, last, 4742, "epsg", 4742,
        "GDM2000", 1, 1,
        "GRS 1980", "Greenwich",
        "Geodetic_Datum_of_Malaysia_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GDM2000\",DATUM[\"Geodetic_Datum_of_Malaysia_20");
    add_srs_wkt (p, 1,
        "00\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6742\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"4742\"]]");
    p = add_epsg_def_ex (filter, first, last, 4743, "epsg", 4743,
        "Karbala 1979", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Karbala_1979", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=70.995,-335.916,262");
    add_proj4text (p, 1,
        ".898,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Karbala 1979\",DATUM[\"Karbala_1979\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7012\"]],TOWGS84[70.995,-335.916,262.898,0,0,0,0]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6743\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4743");
    add_srs_wkt (p, 7,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 4744, "epsg", 4744,
        "Nahrwan 1934", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-242.2,-144.9,370.3");
    add_proj4text (p, 1,
        ",0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nahrwan 1934\",DATUM[\"Nahrwan_1934\",SPHEROID[");
    add_srs_wkt (p, 1,
        "\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7012\"]],TOWGS84[-242.2,-144.9,370.3,0,0,0,0],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"6744\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4744\"]]");
    p = add_epsg_def_ex (filter, first, last, 4745, "epsg", 4745,
        "RD/83", 1, 1,
        "Bessel 1841", "Greenwich",
        "Rauenberg_Datum_83", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RD/83\",DATUM[\"Rauenberg_Datum_83\",SPHEROID[\"");
    add_srs_wkt (p, 1,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 2,
        ",\"7004\"]],AUTHORITY[\"EPSG\",\"6745\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 3,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 4,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 5,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 6,
        "SG\",\"4745\"]]");
    p = add_epsg_def_ex (filter, first, last, 4746, "epsg", 4746,
        "PD/83", 1, 1,
        "Bessel 1841", "Greenwich",
        "Potsdam_Datum_83", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PD/83\",DATUM[\"Potsdam_Datum_83\",SPHEROID[\"B");
    add_srs_wkt (p, 1,
        "essel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 2,
        "\"7004\"]],AUTHORITY[\"EPSG\",\"6746\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 3,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 4,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 5,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"4746\"]]");
    p = add_epsg_def_ex (filter, first, last, 4747, "epsg", 4747,
        "GR96", 1, 1,
        "GRS 1980", "Greenwich",
        "Greenland_1996", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GR96\",DATUM[\"Greenland_1996\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 1,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 2,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6747\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"4747\"]]");
    p = add_epsg_def_ex (filter, first, last, 4748, "epsg", 4748,
        "Vanua Levu 1915", 1, 1,
        "Clarke 1880 (international foot)", "Greenwich",
        "Vanua_Levu_1915", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51");
    add_proj4text (p, 1,
        ",391,-36,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Vanua Levu 1915\",DATUM[\"Vanua_Levu_1915\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1880 (international foot)\",6378306.3696,");
    add_srs_wkt (p, 2,
        "293.4663076556355,AUTHORITY[\"EPSG\",\"7055\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "51,391,-36,0,0,0,0],AUTHORITY[\"EPSG\",\"6748\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4748\"]]");
    p = add_epsg_def_ex (filter, first, last, 4749, "epsg", 4749,
        "RGNC91-93", 1, 1,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_Nouvelle_Caledonie_91_93", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
        "RITY[\"EPSG\",\"4751\"]]");
    p = add_epsg_def_ex (filter, first, last, 4752, "epsg", 4752,
        "Viti Levu 1912", 1, 1,
        "Clarke 1880 (international foot)", "Greenwich",
        "Viti_Levu_1912", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=98");
    add_proj4text (p, 1,
        ",390,-22,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Viti Levu 1912\",DATUM[\"Viti_Levu_1912\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1880 (international foot)\",6378306.3696,29");
    add_srs_wkt (p, 2,
        "3.4663076556355,AUTHORITY[\"EPSG\",\"7055\"]],TOWGS84[98");
    add_srs_wkt (p, 3,
        ",390,-22,0,0,0,0],AUTHORITY[\"EPSG\",\"6752\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
................................................................................
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4753\"]]");
    p = add_epsg_def_ex (filter, first, last, 4754, "epsg", 4754,
        "LGD2006", 1, 1,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-208.4058,-109.8777,-");
    add_proj4text (p, 1,
        "2.5764,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"LGD2006\",DATUM[\"Libyan_Geodetic_Datum_2006\",");
    add_srs_wkt (p, 1,
        "SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7022\"]],TOWGS84[-208.4058,-109.8777,-2.5764,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6754\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4754\"]]");
    p = add_epsg_def_ex (filter, first, last, 4755, "epsg", 4755,
        "DGN95", 1, 1,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "none", "degree",
        "Latitude", "North", "Longitude", "East");
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4755\"]]");
    p = add_epsg_def_ex (filter, first, last, 4756, "epsg", 4756,
        "VN-2000", 1, 1,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=-191.90441429,-39.30");
    add_proj4text (p, 1,
        "318279,-111.45032835,0.00928836,-0.01975479,0.00427372,0");
    add_proj4text (p, 2,
        ".252906278 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"VN-2000\",DATUM[\"Vietnam_2000\",SPHEROID[\"WGS");
    add_srs_wkt (p, 1,
        " 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[-191.90441429,-39.30318279,-111.45032835,0.009");
    add_srs_wkt (p, 3,
        "28836,-0.01975479,0.00427372,0.252906278],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6756\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4756\"]]");
    p = add_epsg_def_ex (filter, first, last, 4757, "epsg", 4757,
        "SVY21", 1, 1,
        "WGS 84", "Greenwich",
        "SVY21", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +no_defs");
................................................................................
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"4800\"]]");
    p = add_epsg_def_ex (filter, first, last, 4801, "epsg", 4801,
        "Bern 1898 (Bern)", 1, 1,
        "Bessel 1841", "Bern",
        "CH1903_Bern", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.");
    add_proj4text (p, 1,
        "346,0,0,0,0 +pm=bern +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Bern 1898 (Bern)\",DATUM[\"CH1903_Bern\",SPHERO");
    add_srs_wkt (p, 1,
        "ID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"E");
    add_srs_wkt (p, 2,
        "PSG\",\"7004\"]],TOWGS84[674.374,15.056,405.346,0,0,0,0]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6801\"]],PRIMEM[\"Bern\",7.4395833");
    add_srs_wkt (p, 4,
        "33333333,AUTHORITY[\"EPSG\",\"8907\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4801\"]]");
    p = add_epsg_def_ex (filter, first, last, 4802, "epsg", 4802,
        "Bogota 1975 (Bogota)", 1, 1,
        "International 1924", "Bogota",
        "Bogota_1975_Bogota", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 ");
................................................................................
    add_proj4text (p, 1,
        "320,0,0,0,0 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Fr");
    add_srs_wkt (p, 1,
        "ancaise_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2");
    add_srs_wkt (p, 2,
        ",293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-168,-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "227,0,0,0,0 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1875 (Paris)\",DATUM[\"Voirol_1875_Paris");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129");
    add_srs_wkt (p, 2,
        "36269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-73,-247,227");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6811\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 4,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 5,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-263,6,43");
    add_proj4text (p, 1,
        "1,0,0,0,0 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Carthage (Paris)\",DATUM[\"Carthage_Paris\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936269,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-263,6,431,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6816\"]],PRIMEM[\"Paris\",2.33722");
    add_srs_wkt (p, 4,
        "917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.015707");
    add_srs_wkt (p, 5,
................................................................................
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4818\"]]");
    p = add_epsg_def_ex (filter, first, last, 4819, "epsg", 4819,
        "Nord Sahara 1959 (Paris)", 1, 1,
        "Clarke 1880 (RGS)", "Paris",
        "Nord_Sahara_1959_Paris", "none", "grad",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-209.3622,-87.8162,");
    add_proj4text (p, 1,
        "404.6198,0.0046,3.4784,0.5805,-1.4547 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nord Sahara 1959 (Paris)\",DATUM[\"Nord_Sahara_");
    add_srs_wkt (p, 1,
        "1959_Paris\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,");
    add_srs_wkt (p, 2,
        "293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-209.3622,");
    add_srs_wkt (p, 3,
        "-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6819\"]],PRIMEM[\"Paris\",2.33722917,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.0157079632679489");
    add_srs_wkt (p, 6,
        "7,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4819\"]]");
    p = add_epsg_def_ex (filter, first, last, 4820, "epsg", 4820,
        "Segara (Jakarta)", 1, 1,
        "Bessel 1841", "Jakarta",
        "Gunung_Segara_Jakarta", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=-403,684,41,0,0,0,0");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1879 (Paris)\",DATUM[\"Voirol_1879_Paris");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129");
    add_srs_wkt (p, 2,
        "36269,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6821\"]],PRIMEM[\"Paris\",2.33722917,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"8903\"]],UNIT[\"grad\",0.01570796326794897,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9105\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
................................................................................
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4868\"]]");































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|





|

|







 







|

|





|

|

|

|

|







 







|

|
<
<





|

|

|

|

|

|







 







|

|





|

|

|

|

|

|







 







|







 







|







 







|







 







|

|





|

|

|

|

|

|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56











































































































































































































57
58
59
60
61
62
63
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
...
219
220
221
222
223
224
225
226
227
228


229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
....
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
....
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
....
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
....
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
....
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
....
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
....
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_24 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;











































































































































































































    p = add_epsg_def_ex (filter, first, last, 4749, "epsg", 4749,
        "RGNC91-93", 1, 1,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_Nouvelle_Caledonie_91_93", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
        "RITY[\"EPSG\",\"4751\"]]");
    p = add_epsg_def_ex (filter, first, last, 4752, "epsg", 4752,
        "Viti Levu 1912", 1, 1,
        "Clarke 1880 (international foot)", "Greenwich",
        "Viti_Levu_1912", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378306.3696 +b=6356571.996 +towgs84=51");
    add_proj4text (p, 1,
        ",391,-36,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Viti Levu 1912\",DATUM[\"Viti_Levu_1912\",SPHER");
    add_srs_wkt (p, 1,
        "OID[\"Clarke 1880 (international foot)\",6378306.3696,29");
    add_srs_wkt (p, 2,
        "3.4663076556349,AUTHORITY[\"EPSG\",\"7055\"]],TOWGS84[51");
    add_srs_wkt (p, 3,
        ",391,-36,0,0,0,0],AUTHORITY[\"EPSG\",\"6752\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
................................................................................
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4753\"]]");
    p = add_epsg_def_ex (filter, first, last, 4754, "epsg", 4754,
        "LGD2006", 1, 1,
        "International 1924", "Greenwich",
        "Libyan_Geodetic_Datum_2006", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-208.406,-109.878,-2.");
    add_proj4text (p, 1,
        "5764,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"LGD2006\",DATUM[\"Libyan_Geodetic_Datum_2006\",");
    add_srs_wkt (p, 1,
        "SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7022\"]],TOWGS84[-208.406,-109.878,-2.5764,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6754\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4754\"]]");
    p = add_epsg_def_ex (filter, first, last, 4755, "epsg", 4755,
        "DGN95", 1, 1,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "none", "degree",
        "Latitude", "North", "Longitude", "East");
................................................................................
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4755\"]]");
    p = add_epsg_def_ex (filter, first, last, 4756, "epsg", 4756,
        "VN-2000", 1, 1,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=-192.873,-39.382,-11");
    add_proj4text (p, 1,
        "1.202,-0.00205,-0.0005,0.00335,0.0188 +no_defs");


    add_srs_wkt (p, 0,
        "GEOGCS[\"VN-2000\",DATUM[\"Vietnam_2000\",SPHEROID[\"WGS");
    add_srs_wkt (p, 1,
        " 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]");
    add_srs_wkt (p, 2,
        "],TOWGS84[-192.873,-39.382,-111.202,-0.00205,-0.0005,0.0");
    add_srs_wkt (p, 3,
        "0335,0.0188],AUTHORITY[\"EPSG\",\"6756\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4756\"]]");
    p = add_epsg_def_ex (filter, first, last, 4757, "epsg", 4757,
        "SVY21", 1, 1,
        "WGS 84", "Greenwich",
        "SVY21", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +no_defs");
................................................................................
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"4800\"]]");
    p = add_epsg_def_ex (filter, first, last, 4801, "epsg", 4801,
        "Bern 1898 (Bern)", 1, 1,
        "Bessel 1841", "Bern",
        "CH1903_Bern", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=674.4,15.1,405.3,0,");
    add_proj4text (p, 1,
        "0,0,0 +pm=bern +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Bern 1898 (Bern)\",DATUM[\"CH1903_Bern\",SPHERO");
    add_srs_wkt (p, 1,
        "ID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"E");
    add_srs_wkt (p, 2,
        "PSG\",\"7004\"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"6801\"]],PRIMEM[\"Bern\",7.4395833333333");
    add_srs_wkt (p, 4,
        "33,AUTHORITY[\"EPSG\",\"8907\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4801\"]]");
    p = add_epsg_def_ex (filter, first, last, 4802, "epsg", 4802,
        "Bogota 1975 (Bogota)", 1, 1,
        "International 1924", "Bogota",
        "Bogota_1975_Bogota", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=307,304,-318,0,0,0,0 ");
................................................................................
    add_proj4text (p, 1,
        "320,0,0,0,0 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Fr");
    add_srs_wkt (p, 1,
        "ancaise_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2");
    add_srs_wkt (p, 2,
        ",293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-168,-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "227,0,0,0,0 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1875 (Paris)\",DATUM[\"Voirol_1875_Paris");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129");
    add_srs_wkt (p, 2,
        "36265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-73,-247,227");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6811\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 4,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 5,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-263,6,43");
    add_proj4text (p, 1,
        "1,0,0,0,0 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Carthage (Paris)\",DATUM[\"Carthage_Paris\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936265,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-263,6,431,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6816\"]],PRIMEM[\"Paris\",2.33722");
    add_srs_wkt (p, 4,
        "917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.015707");
    add_srs_wkt (p, 5,
................................................................................
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4818\"]]");
    p = add_epsg_def_ex (filter, first, last, 4819, "epsg", 4819,
        "Nord Sahara 1959 (Paris)", 1, 1,
        "Clarke 1880 (RGS)", "Paris",
        "Nord_Sahara_1959_Paris", "none", "grad",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-209.362,-87.8162,4");
    add_proj4text (p, 1,
        "04.62,0.0046,3.4784,0.5805,-1.4547 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Nord Sahara 1959 (Paris)\",DATUM[\"Nord_Sahara_");
    add_srs_wkt (p, 1,
        "1959_Paris\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,");
    add_srs_wkt (p, 2,
        "293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-209.362,-");
    add_srs_wkt (p, 3,
        "87.8162,404.62,0.0046,3.4784,0.5805,-1.4547],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6819\"]],PRIMEM[\"Paris\",2.33722917,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8903\"]],UNIT[\"grad\",0.01570796326794897,AU");
    add_srs_wkt (p, 6,
        "THORITY[\"EPSG\",\"9105\"]],AXIS[\"Latitude\",NORTH],AXI");
    add_srs_wkt (p, 7,
        "S[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4819\"]]");
    p = add_epsg_def_ex (filter, first, last, 4820, "epsg", 4820,
        "Segara (Jakarta)", 1, 1,
        "Bessel 1841", "Jakarta",
        "Gunung_Segara_Jakarta", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=-403,684,41,0,0,0,0");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +pm=paris +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Voirol 1879 (Paris)\",DATUM[\"Voirol_1879_Paris");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129");
    add_srs_wkt (p, 2,
        "36265,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6821\"]],PRIMEM[\"Paris\",2.33722917,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"8903\"]],UNIT[\"grad\",0.01570796326794897,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9105\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
................................................................................
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4868\"]]");
    p = add_epsg_def_ex (filter, first, last, 4869, "epsg", 4869,
        "ETRS89 / NTM zone 19 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 19 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",19.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4869\"]]");
    p = add_epsg_def_ex (filter, first, last, 4870, "epsg", 4870,
        "ETRS89 / NTM zone 20 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=20.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 20 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",20.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4870\"]]");
    p = add_epsg_def_ex (filter, first, last, 4871, "epsg", 4871,
        "ETRS89 / NTM zone 21 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 21 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4871\"]]");
    p = add_epsg_def_ex (filter, first, last, 4872, "epsg", 4872,
        "ETRS89 / NTM zone 22 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=22.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 22 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",22.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4872\"]]");
    p = add_epsg_def_ex (filter, first, last, 4873, "epsg", 4873,
        "ETRS89 / NTM zone 23 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 23 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",23.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4873\"]]");
    p = add_epsg_def_ex (filter, first, last, 4874, "epsg", 4874,
        "ETRS89 / NTM zone 24 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 24 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",24.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4874\"]]");
    p = add_epsg_def_ex (filter, first, last, 4875, "epsg", 4875,
        "ETRS89 / NTM zone 25 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 25 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",25.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4875\"]]");
    p = add_epsg_def_ex (filter, first, last, 4876, "epsg", 4876,
        "ETRS89 / NTM zone 26 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=26.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 26 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",26.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4876\"]]");
    p = add_epsg_def_ex (filter, first, last, 4877, "epsg", 4877,
        "ETRS89 / NTM zone 27 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 27 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",27.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4877\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_25.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
...
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
....
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
....
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
....
3723
3724
3725
3726
3727
3728
3729






























































































































































































































































































































































































3730
3731
3732
3733
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_25 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 4869, "epsg", 4869,
        "ETRS89 / NTM zone 19 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 19 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",19.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4869\"]]");
    p = add_epsg_def_ex (filter, first, last, 4870, "epsg", 4870,
        "ETRS89 / NTM zone 20 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=20.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 20 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",20.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4870\"]]");
    p = add_epsg_def_ex (filter, first, last, 4871, "epsg", 4871,
        "ETRS89 / NTM zone 21 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 21 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4871\"]]");
    p = add_epsg_def_ex (filter, first, last, 4872, "epsg", 4872,
        "ETRS89 / NTM zone 22 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=22.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 22 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",22.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4872\"]]");
    p = add_epsg_def_ex (filter, first, last, 4873, "epsg", 4873,
        "ETRS89 / NTM zone 23 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 23 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",23.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4873\"]]");
    p = add_epsg_def_ex (filter, first, last, 4874, "epsg", 4874,
        "ETRS89 / NTM zone 24 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 24 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",24.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4874\"]]");
    p = add_epsg_def_ex (filter, first, last, 4875, "epsg", 4875,
        "ETRS89 / NTM zone 25 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 25 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",25.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4875\"]]");
    p = add_epsg_def_ex (filter, first, last, 4876, "epsg", 4876,
        "ETRS89 / NTM zone 26 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=26.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 26 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",26.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4876\"]]");
    p = add_epsg_def_ex (filter, first, last, 4877, "epsg", 4877,
        "ETRS89 / NTM zone 27 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27.5 +k=1 +x_0=100000 +y_0=1");
    add_proj4text (p, 1,
        "000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / NTM zone 27 (deprecated)\",GEOGCS[\"ET");
    add_srs_wkt (p, 1,
        "RS89\",DATUM[\"European_Terrestrial_Reference_System_198");
    add_srs_wkt (p, 2,
        "9\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",27.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",100000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"4877\"]]");
    p = add_epsg_def_ex (filter, first, last, 4878, "epsg", 4878,
        "ETRS89 / NTM zone 28 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28.5 +k=1 +x_0=100000 +y_0=1");
................................................................................
        "bon\",-9.131906111111112,AUTHORITY[\"EPSG\",\"8902\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4904\"]]");
    p = add_epsg_def_ex (filter, first, last, 4979, "epsg", 4979,
        "WGS 84", 1, 1,
        "WGS 84", "Greenwich",
        "WGS_1984", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +datum=WGS84 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\"");
    add_srs_wkt (p, 1,
        ",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 4,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 5,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4979\"]]");
    p = add_epsg_def_ex (filter, first, last, 5013, "epsg", 5013,
        "PTRA08", 1, 1,
        "GRS 1980", "Greenwich",
        "Autonomous_Regions_of_Portugal_2008", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
    add_proj4text (p, 1,
        "x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Conus Albers\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
        "SLD99", 1, 1,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Sri_Lanka_Datum_1999", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs8");
    add_proj4text (p, 1,
        "4=-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039");
    add_proj4text (p, 2,
        "338 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"SLD99\",DATUM[\"Sri_Lanka_Datum_1999\",SPHEROID");
    add_srs_wkt (p, 1,
        "[\"Everest 1830 (1937 Adjustment)\",6377276.345,300.8017");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7015\"]],TOWGS84[-0.293,766.95,87.");
    add_srs_wkt (p, 3,
        "713,0.195704,1.695068,3.473016,-0.039338],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1053\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"5233\"]]");
    p = add_epsg_def_ex (filter, first, last, 5234, "epsg", 5234,
        "Kandawala / Sri Lanka Grid", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kandawala", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=7.000480277777778 +lon_0=80.771711111");
................................................................................
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=7.000471527777778 +lon_0=80.771713083");
    add_proj4text (p, 1,
        "33334 +k=0.9999238418 +x_0=500000 +y_0=500000 +a=6377276");
    add_proj4text (p, 2,
        ".345 +b=6356075.41314024 +towgs84=-0.293,766.95,87.713,0");
    add_proj4text (p, 3,
        ".195704,1.695068,3.473016,-0.039338 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SLD99 / Sri Lanka Grid 1999\",GEOGCS[\"SLD99\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Sri_Lanka_Datum_1999\",SPHEROID[\"Everest 1830 (");
    add_srs_wkt (p, 2,
        "1937 Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7015\"]],TOWGS84[-0.293,766.95,87.713,0.195704,1.69");
    add_srs_wkt (p, 4,
        "5068,3.473016,-0.039338],AUTHORITY[\"EPSG\",\"1053\"]],P");
    add_srs_wkt (p, 5,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 6,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 7,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 8,
        "UTHORITY[\"EPSG\",\"5233\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 9,
        "cator\"],PARAMETER[\"latitude_of_origin\",7.000471527777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",80.77171308333334],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"scale_factor\",0.9999238418],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",500000],PARAMETER[\"false_northing\",500000]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 14,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 15,
        "\",\"5235\"]]");
    p = add_epsg_def_ex (filter, first, last, 5243, "epsg", 5243,
        "ETRS89 / LCC Germany (E-N)", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.66666666666666 +lat_2=53.66666666666");
................................................................................
        "actor\",1],PARAMETER[\"false_easting\",11500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5271\"]]");






























































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|

|







|

|

|

|

|







 







|









|

|

|

|

|

|

|

|

|

|

|

|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56































































































































































































































































































































































57
58
59
60
61
62
63
...
261
262
263
264
265
266
267



















268
269
270
271
272
273
274
...
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
....
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
....
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
....
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_25 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 4878, "epsg", 4878,
        "ETRS89 / NTM zone 28 (deprecated)", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28.5 +k=1 +x_0=100000 +y_0=1");
................................................................................
        "bon\",-9.131906111111112,AUTHORITY[\"EPSG\",\"8902\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4904\"]]");



















    p = add_epsg_def_ex (filter, first, last, 5013, "epsg", 5013,
        "PTRA08", 1, 1,
        "GRS 1980", "Greenwich",
        "Autonomous_Regions_of_Portugal_2008", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
    add_proj4text (p, 1,
        "x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Conus Albers\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
................................................................................
        "SLD99", 1, 1,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Sri_Lanka_Datum_1999", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs8");
    add_proj4text (p, 1,
        "4=-0.293,766.95,87.713,0.195704,1.69507,3.47302,-0.03933");
    add_proj4text (p, 2,
        "8 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"SLD99\",DATUM[\"Sri_Lanka_Datum_1999\",SPHEROID");
    add_srs_wkt (p, 1,
        "[\"Everest 1830 (1937 Adjustment)\",6377276.345,300.8017");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7015\"]],TOWGS84[-0.293,766.95,87.");
    add_srs_wkt (p, 3,
        "713,0.195704,1.69507,3.47302,-0.039338],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1053\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"5233\"]]");
    p = add_epsg_def_ex (filter, first, last, 5234, "epsg", 5234,
        "Kandawala / Sri Lanka Grid", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kandawala", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=7.000480277777778 +lon_0=80.771711111");
................................................................................
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=7.000471527777778 +lon_0=80.771713083");
    add_proj4text (p, 1,
        "33334 +k=0.9999238418 +x_0=500000 +y_0=500000 +a=6377276");
    add_proj4text (p, 2,
        ".345 +b=6356075.41314024 +towgs84=-0.293,766.95,87.713,0");
    add_proj4text (p, 3,
        ".195704,1.69507,3.47302,-0.039338 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SLD99 / Sri Lanka Grid 1999\",GEOGCS[\"SLD99\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Sri_Lanka_Datum_1999\",SPHEROID[\"Everest 1830 (");
    add_srs_wkt (p, 2,
        "1937 Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7015\"]],TOWGS84[-0.293,766.95,87.713,0.195704,1.69");
    add_srs_wkt (p, 4,
        "507,3.47302,-0.039338],AUTHORITY[\"EPSG\",\"1053\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"5233\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",7.000471527777778");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"central_meridian\",80.77171308333334],PARA");
    add_srs_wkt (p, 11,
        "METER[\"scale_factor\",0.9999238418],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",500000],PARAMETER[\"false_northing\",500000],UN");
    add_srs_wkt (p, 13,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 14,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 15,
        "\"5235\"]]");
    p = add_epsg_def_ex (filter, first, last, 5243, "epsg", 5243,
        "ETRS89 / LCC Germany (E-N)", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.66666666666666 +lat_2=53.66666666666");
................................................................................
        "actor\",1],PARAMETER[\"false_easting\",11500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5271\"]]");
    p = add_epsg_def_ex (filter, first, last, 5272, "epsg", 5272,
        "TUREF / 3-degree Gauss-Kruger zone 12", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 12\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",36],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",12500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5272\"]]");
    p = add_epsg_def_ex (filter, first, last, 5273, "epsg", 5273,
        "TUREF / 3-degree Gauss-Kruger zone 13", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 13\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",39],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",13500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5273\"]]");
    p = add_epsg_def_ex (filter, first, last, 5274, "epsg", 5274,
        "TUREF / 3-degree Gauss-Kruger zone 14", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 14\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",42],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",14500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5274\"]]");
    p = add_epsg_def_ex (filter, first, last, 5275, "epsg", 5275,
        "TUREF / 3-degree Gauss-Kruger zone 15", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 15\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",45],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",15500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5275\"]]");
    p = add_epsg_def_ex (filter, first, last, 5292, "epsg", 5292,
        "DRUKREF 03 / Bumthang TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90.73333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Bumthang TM\",GEOGCS[\"DRUKREF 03\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",90.73333333333333],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",250000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",-2500000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"5292\"]]");
    p = add_epsg_def_ex (filter, first, last, 5293, "epsg", 5293,
        "DRUKREF 03 / Chhukha TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=89.55 +k=1 +x_0=250000 +y_0=");
    add_proj4text (p, 1,
        "-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Chhukha TM\",GEOGCS[\"DRUKREF 03\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",89.55],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",250000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",-2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"5293\"]]");
    p = add_epsg_def_ex (filter, first, last, 5294, "epsg", 5294,
        "DRUKREF 03 / Dagana TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=89.84999999999999 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Dagana TM\",GEOGCS[\"DRUKREF 03\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",89.85],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",250000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",-2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"5294\"]]");
    p = add_epsg_def_ex (filter, first, last, 5295, "epsg", 5295,
        "DRUKREF 03 / Gasa TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90.03333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Gasa TM\",GEOGCS[\"DRUKREF 03\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",90.03333333333333],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",250000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",-2500000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"5295\"]]");
    p = add_epsg_def_ex (filter, first, last, 5296, "epsg", 5296,
        "DRUKREF 03 / Ha TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90.15000000000001 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Ha TM\",GEOGCS[\"DRUKREF 03\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",90.15],PARAMETER[\"scale_factor\",1],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",250000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",-2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"5296\"]]");
    p = add_epsg_def_ex (filter, first, last, 5297, "epsg", 5297,
        "DRUKREF 03 / Lhuentse TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=91.13333333333334 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Lhuentse TM\",GEOGCS[\"DRUKREF 03\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",91.13333333333334],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",250000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",-2500000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"5297\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_26.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
....
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
....
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
....
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
....
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
....
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
....
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
....
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
....
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
....
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
....
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
....
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
....
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
....
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
....
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
....
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
....
3753
3754
3755
3756
3757
3758
3759
























































































































































































































































































































































































3760
3761
3762
3763
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_26 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 5272, "epsg", 5272,
        "TUREF / 3-degree Gauss-Kruger zone 12", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 12\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",36],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",12500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5272\"]]");
    p = add_epsg_def_ex (filter, first, last, 5273, "epsg", 5273,
        "TUREF / 3-degree Gauss-Kruger zone 13", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 13\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",39],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",13500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5273\"]]");
    p = add_epsg_def_ex (filter, first, last, 5274, "epsg", 5274,
        "TUREF / 3-degree Gauss-Kruger zone 14", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=42 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 14\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",42],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",14500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5274\"]]");
    p = add_epsg_def_ex (filter, first, last, 5275, "epsg", 5275,
        "TUREF / 3-degree Gauss-Kruger zone 15", 0, 1,
        "GRS 1980", "Greenwich",
        "Turkish_National_Reference_Frame", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TUREF / 3-degree Gauss-Kruger zone 15\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"TUREF\",DATUM[\"Turkish_National_Reference_Frame\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1057\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",45],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",15500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"5275\"]]");
    p = add_epsg_def_ex (filter, first, last, 5292, "epsg", 5292,
        "DRUKREF 03 / Bumthang TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90.73333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Bumthang TM\",GEOGCS[\"DRUKREF 03\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",90.73333333333333],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",250000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",-2500000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"5292\"]]");
    p = add_epsg_def_ex (filter, first, last, 5293, "epsg", 5293,
        "DRUKREF 03 / Chhukha TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=89.55 +k=1 +x_0=250000 +y_0=");
    add_proj4text (p, 1,
        "-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Chhukha TM\",GEOGCS[\"DRUKREF 03\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",89.55],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",250000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",-2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"5293\"]]");
    p = add_epsg_def_ex (filter, first, last, 5294, "epsg", 5294,
        "DRUKREF 03 / Dagana TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=89.84999999999999 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Dagana TM\",GEOGCS[\"DRUKREF 03\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",89.85],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",250000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",-2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"5294\"]]");
    p = add_epsg_def_ex (filter, first, last, 5295, "epsg", 5295,
        "DRUKREF 03 / Gasa TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90.03333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Gasa TM\",GEOGCS[\"DRUKREF 03\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",90.03333333333333],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",250000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",-2500000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"5295\"]]");
    p = add_epsg_def_ex (filter, first, last, 5296, "epsg", 5296,
        "DRUKREF 03 / Ha TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=90.15000000000001 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Ha TM\",GEOGCS[\"DRUKREF 03\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",90.15],PARAMETER[\"scale_factor\",1],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",250000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",-2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"5296\"]]");
    p = add_epsg_def_ex (filter, first, last, 5297, "epsg", 5297,
        "DRUKREF 03 / Lhuentse TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=91.13333333333334 +k=1 +x_0=");
    add_proj4text (p, 1,
        "250000 +y_0=-2500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DRUKREF 03 / Lhuentse TM\",GEOGCS[\"DRUKREF 03\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Bhutan_National_Geodetic_Datum\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1058\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5264\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",91.13333333333334],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",250000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",-2500000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"5297\"]]");
    p = add_epsg_def_ex (filter, first, last, 5298, "epsg", 5298,
        "DRUKREF 03 / Mongar TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=91.23333333333333 +k=1 +x_0=");
................................................................................
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"5349\"]]");
    p = add_epsg_def_ex (filter, first, last, 5354, "epsg", 5354,
        "MARGEN", 1, 1,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional_de_Bolivia", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"MARGEN\",DATUM[\"Marco_Geodesico_Nacional_de_Bo");
    add_srs_wkt (p, 1,
        "livia\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"1063\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 6,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5354\"]]");
    p = add_epsg_def_ex (filter, first, last, 5355, "epsg", 5355,
        "MARGEN / UTM zone 20S", 0, 0,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional_de_Bolivia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MARGEN / UTM zone 20S\",GEOGCS[\"MARGEN\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Marco_Geodesico_Nacional_de_Bolivia\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1063\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5354\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-63],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"5355\"]]");
    p = add_epsg_def_ex (filter, first, last, 5356, "epsg", 5356,
        "MARGEN / UTM zone 19S", 0, 0,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional_de_Bolivia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MARGEN / UTM zone 19S\",GEOGCS[\"MARGEN\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Marco_Geodesico_Nacional_de_Bolivia\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1063\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5354\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-69],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"5356\"]]");
    p = add_epsg_def_ex (filter, first, last, 5357, "epsg", 5357,
        "MARGEN / UTM zone 21S", 0, 0,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional_de_Bolivia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MARGEN / UTM zone 21S\",GEOGCS[\"MARGEN\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Marco_Geodesico_Nacional_de_Bolivia\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1063\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5354\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-57],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"5357\"]]");
    p = add_epsg_def_ex (filter, first, last, 5360, "epsg", 5360,
        "SIRGAS-Chile", 1, 1,
        "GRS 1980", "Greenwich",
        "SIRGAS_Chile", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Ocotepeque 1935\",DATUM[\"Ocotepeque_1935\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 3,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Costa Rica Norte\",GEOGCS[\"O");
    add_srs_wkt (p, 1,
        "cotepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "+towgs84=205,96,-98,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Costa Rica Sur\",GEOGCS[\"Oco");
    add_srs_wkt (p, 1,
        "tepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0 +y_0=292209.579 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Guatemala Norte (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "lrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Guatemala Sur\",GEOGCS[\"Ocot");
    add_srs_wkt (p, 1,
        "epeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / El Salvador Lambert\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Ocotepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Nicaragua Norte\",GEOGCS[\"Oc");
    add_srs_wkt (p, 1,
        "otepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Nicaragua Sur\",GEOGCS[\"Ocot");
    add_srs_wkt (p, 1,
        "epeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Sibun Gorge 1922\",DATUM[\"Sibun_Gorge_1922\",S");
    add_srs_wkt (p, 1,
        "PHEROID[\"Clarke 1858\",6378293.645208759,294.2606763692");
    add_srs_wkt (p, 2,
        "606,AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 3,
        "071\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 4,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "78293.645208759 +b=6356617.987679838 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sibun Gorge 1922 / Colony Grid (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Sibun Gorge 1922\",DATUM[\"Sibun_Gorge_1922\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"Clarke 1858\",6378293.645208759,294.26067636926");
    add_srs_wkt (p, 3,
        "06,AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"10");
    add_srs_wkt (p, 4,
        "71\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
................................................................................
        "Panama_Colon_1911", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Panama-Colon 1911\",DATUM[\"Panama_Colon_1911\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138982,AU");
    add_srs_wkt (p, 2,
        "THORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"1072\"]");
    add_srs_wkt (p, 3,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 4,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 2,
        "03 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Panama-Colon 1911 / Panama Lambert\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "anama-Colon 1911\",DATUM[\"Panama_Colon_1911\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"1072\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Panama-Colon 1911 / Panama Polyconic\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Panama-Colon 1911\",DATUM[\"Panama_Colon_1911\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"1072\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
................................................................................
        "CI1979 / Chatham Islands Map Grid", 0, 1,
        "International 1924", "Greenwich",
        "Chatham_Islands_Datum_1979", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44 +lon_0=-176.5 +k=1 +x_0=350000 +y");
    add_proj4text (p, 1,
        "_0=650000 +ellps=intl +towgs84=174.05,-25.49,112.57,0,0,");
    add_proj4text (p, 2,
        "0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CI1979 / Chatham Islands Map Grid\",GEOGCS[\"Ch");
    add_srs_wkt (p, 1,
        "atham Islands 1979\",DATUM[\"Chatham_Islands_Datum_1979\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7022\"]],TOWGS84[174.05,-25.49,112.57,0,0,0.554");
    add_srs_wkt (p, 4,
        ",0.2263],AUTHORITY[\"EPSG\",\"6673\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4673\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",-44],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",-176.5],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",350000],PARAMETER[\"false_northing\",6500");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"5519\"]]");
    p = add_epsg_def_ex (filter, first, last, 5520, "epsg", 5520,
        "DHDN / 3-degree Gauss-Kruger zone 1", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +");
................................................................................
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"5538\"]]");
























































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|






|

|

|

|

|

|

|



|








|

|

|

|

|

|

|

|

|

|

|

|

|



|








|

|

|

|

|

|

|

|

|

|

|

|

|



|








|

|

|

|

|

|

|

|

|

|

|

|

|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|

|







 







|







 







|







 







|







 







|

|







|

|

|

|

|

|

|

|

|

|

|

|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56






























































































































































































































































































































































































57
58
59
60
61
62
63
....
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
....
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
....
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
....
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
....
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
....
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
....
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
....
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
....
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
....
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
....
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
....
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
....
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
....
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
....
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
....
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_26 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;






























































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 5298, "epsg", 5298,
        "DRUKREF 03 / Mongar TM", 0, 0,
        "GRS 1980", "Greenwich",
        "Bhutan_National_Geodetic_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=91.23333333333333 +k=1 +x_0=");
................................................................................
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"5349\"]]");
    p = add_epsg_def_ex (filter, first, last, 5354, "epsg", 5354,
        "MARGEN", 1, 1,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"MARGEN\",DATUM[\"Marco_Geodesico_Nacional\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 2,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"1063\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"5354\"]]");
    p = add_epsg_def_ex (filter, first, last, 5355, "epsg", 5355,
        "MARGEN / UTM zone 20S", 0, 0,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MARGEN / UTM zone 20S\",GEOGCS[\"MARGEN\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Marco_Geodesico_Nacional\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1063\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"5354\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-63],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"5355\"]]");
    p = add_epsg_def_ex (filter, first, last, 5356, "epsg", 5356,
        "MARGEN / UTM zone 19S", 0, 0,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MARGEN / UTM zone 19S\",GEOGCS[\"MARGEN\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Marco_Geodesico_Nacional\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1063\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"5354\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-69],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"5356\"]]");
    p = add_epsg_def_ex (filter, first, last, 5357, "epsg", 5357,
        "MARGEN / UTM zone 21S", 0, 0,
        "GRS 1980", "Greenwich",
        "Marco_Geodesico_Nacional", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MARGEN / UTM zone 21S\",GEOGCS[\"MARGEN\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Marco_Geodesico_Nacional\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1063\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"5354\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-57],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"5357\"]]");
    p = add_epsg_def_ex (filter, first, last, 5360, "epsg", 5360,
        "SIRGAS-Chile", 1, 1,
        "GRS 1980", "Greenwich",
        "SIRGAS_Chile", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
................................................................................
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +towgs84=205,96,-98,0,0,0,0 ");
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Ocotepeque 1935\",DATUM[\"Ocotepeque_1935\",SPH");
    add_srs_wkt (p, 1,
        "EROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 3,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Costa Rica Norte\",GEOGCS[\"O");
    add_srs_wkt (p, 1,
        "cotepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "+towgs84=205,96,-98,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Costa Rica Sur\",GEOGCS[\"Oco");
    add_srs_wkt (p, 1,
        "tepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "0 +y_0=292209.579 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Guatemala Norte (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "lrk66 +towgs84=205,96,-98,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Guatemala Sur\",GEOGCS[\"Ocot");
    add_srs_wkt (p, 1,
        "epeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / El Salvador Lambert\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Ocotepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Nicaragua Norte\",GEOGCS[\"Oc");
    add_srs_wkt (p, 1,
        "otepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Nicaragua Sur\",GEOGCS[\"Ocot");
    add_srs_wkt (p, 1,
        "epeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Clark");
    add_srs_wkt (p, 2,
        "e 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "+no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Sibun Gorge 1922\",DATUM[\"Sibun_Gorge_1922\",S");
    add_srs_wkt (p, 1,
        "PHEROID[\"Clarke 1858\",6378293.645208759,294.2606763692");
    add_srs_wkt (p, 2,
        "569,AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 3,
        "071\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 4,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "78293.645208759 +b=6356617.987679838 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sibun Gorge 1922 / Colony Grid (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Sibun Gorge 1922\",DATUM[\"Sibun_Gorge_1922\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"Clarke 1858\",6378293.645208759,294.26067636925");
    add_srs_wkt (p, 3,
        "69,AUTHORITY[\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"10");
    add_srs_wkt (p, 4,
        "71\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
................................................................................
        "Panama_Colon_1911", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk66 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Panama-Colon 1911\",DATUM[\"Panama_Colon_1911\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006,AU");
    add_srs_wkt (p, 2,
        "THORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"1072\"]");
    add_srs_wkt (p, 3,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 4,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 5,
................................................................................
    add_proj4text (p, 2,
        "03 +ellps=clrk66 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Panama-Colon 1911 / Panama Lambert\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "anama-Colon 1911\",DATUM[\"Panama_Colon_1911\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"1072\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Panama-Colon 1911 / Panama Polyconic\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Panama-Colon 1911\",DATUM[\"Panama_Colon_1911\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"1072\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
................................................................................
        "CI1979 / Chatham Islands Map Grid", 0, 1,
        "International 1924", "Greenwich",
        "Chatham_Islands_Datum_1979", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44 +lon_0=-176.5 +k=1 +x_0=350000 +y");
    add_proj4text (p, 1,
        "_0=650000 +ellps=intl +towgs84=174.05,-25.49,112.57,-0,-");
    add_proj4text (p, 2,
        "0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CI1979 / Chatham Islands Map Grid\",GEOGCS[\"Ch");
    add_srs_wkt (p, 1,
        "atham Islands 1979\",DATUM[\"Chatham_Islands_Datum_1979\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7022\"]],TOWGS84[174.05,-25.49,112.57,-0,-0,0.5");
    add_srs_wkt (p, 4,
        "54,0.2263],AUTHORITY[\"EPSG\",\"6673\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4673\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",-44],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",-176.5],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",350000],PARAMETER[\"false_northing\",6");
    add_srs_wkt (p, 12,
        "50000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"5519\"]]");
    p = add_epsg_def_ex (filter, first, last, 5520, "epsg", 5520,
        "DHDN / 3-degree Gauss-Kruger zone 1", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +");
................................................................................
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"5538\"]]");
    p = add_epsg_def_ex (filter, first, last, 5539, "epsg", 5539,
        "Corrego Alegre 1961 / UTM zone 24S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1961", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=intl +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1961 / UTM zone 24S\",GEOGCS[\"C");
    add_srs_wkt (p, 1,
        "orrego Alegre 1961\",DATUM[\"Corrego_Alegre_1961\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7022\"]],AUTHORITY[\"EPSG\",\"1074\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"5524\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-39],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"5539\"]]");
    p = add_epsg_def_ex (filter, first, last, 5546, "epsg", 5546,
        "PNG94", 1, 1,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PNG94\",DATUM[\"Papua_New_Guinea_Geodetic_Datum");
    add_srs_wkt (p, 1,
        "_1994\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"1076\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 6,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5546\"]]");
    p = add_epsg_def_ex (filter, first, last, 5550, "epsg", 5550,
        "PNG94 / PNGMG94 zone 54", 0, 0,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PNG94 / PNGMG94 zone 54\",GEOGCS[\"PNG94\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Papua_New_Guinea_Geodetic_Datum_1994\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1076\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5546\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",141],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"5550\"]]");
    p = add_epsg_def_ex (filter, first, last, 5551, "epsg", 5551,
        "PNG94 / PNGMG94 zone 55", 0, 0,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PNG94 / PNGMG94 zone 55\",GEOGCS[\"PNG94\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Papua_New_Guinea_Geodetic_Datum_1994\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1076\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5546\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",147],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"5551\"]]");
    p = add_epsg_def_ex (filter, first, last, 5552, "epsg", 5552,
        "PNG94 / PNGMG94 zone 56", 0, 0,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PNG94 / PNGMG94 zone 56\",GEOGCS[\"PNG94\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Papua_New_Guinea_Geodetic_Datum_1994\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1076\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5546\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",153],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"5552\"]]");
    p = add_epsg_def_ex (filter, first, last, 5554, "epsg", 5554,
        "ETRS89 / UTM zone 31N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 31N + DHHN92 height\",PROJC");
    add_srs_wkt (p, 1,
        "S[\"ETRS89 / UTM zone 31N\",GEOGCS[\"ETRS89\",DATUM[\"Eu");
    add_srs_wkt (p, 2,
        "ropean_Terrestrial_Reference_System_1989\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 8,
        "],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 9,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 11,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"25831\"]],VERT_CS[\"DHHN92 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Deutsches Haupthoehennetz 1992\",2005,AUTH");
    add_srs_wkt (p, 16,
        "ORITY[\"EPSG\",\"5181\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 17,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"57");
    add_srs_wkt (p, 18,
        "83\"]],AUTHORITY[\"EPSG\",\"5554\"]]");
    p = add_epsg_def_ex (filter, first, last, 5555, "epsg", 5555,
        "ETRS89 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 32N + DHHN92 height\",PROJC");
    add_srs_wkt (p, 1,
        "S[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"Eu");
    add_srs_wkt (p, 2,
        "ropean_Terrestrial_Reference_System_1989\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 8,
        "],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 9,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 11,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"25832\"]],VERT_CS[\"DHHN92 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Deutsches Haupthoehennetz 1992\",2005,AUTH");
    add_srs_wkt (p, 16,
        "ORITY[\"EPSG\",\"5181\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 17,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"57");
    add_srs_wkt (p, 18,
        "83\"]],AUTHORITY[\"EPSG\",\"5555\"]]");
    p = add_epsg_def_ex (filter, first, last, 5556, "epsg", 5556,
        "ETRS89 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 33N + DHHN92 height\",PROJC");
    add_srs_wkt (p, 1,
        "S[\"ETRS89 / UTM zone 33N\",GEOGCS[\"ETRS89\",DATUM[\"Eu");
    add_srs_wkt (p, 2,
        "ropean_Terrestrial_Reference_System_1989\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 8,
        "],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 9,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",15],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"25833\"]],VERT_CS[\"DHHN92 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Deutsches Haupthoehennetz 1992\",2005,AUTH");
    add_srs_wkt (p, 16,
        "ORITY[\"EPSG\",\"5181\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 17,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"57");
    add_srs_wkt (p, 18,
        "83\"]],AUTHORITY[\"EPSG\",\"5556\"]]");
    p = add_epsg_def_ex (filter, first, last, 5559, "epsg", 5559,
        "Ocotepeque 1935 / Guatemala Norte", 0, 0,
        "Clarke 1866", "Greenwich",
        "Ocotepeque_1935", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666");
    add_proj4text (p, 1,
        "667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=50000");
    add_proj4text (p, 2,
        "0 +y_0=292209.579 +ellps=clrk66 +towgs84=205,96,-98,0,0,");
    add_proj4text (p, 3,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Guatemala Norte\",GEOGCS[\"Oc");
    add_srs_wkt (p, 1,
        "otepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"5451\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",16.81666666666667],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-90.33333333333333],PARAMETER[\"scale_factor\",0.999922");
    add_srs_wkt (p, 11,
        "26],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",292209.579],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"5559\"]]");
    p = add_epsg_def_ex (filter, first, last, 5561, "epsg", 5561,
        "UCS-2000", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=25,-141,-78.5,-0,0.3");
    add_proj4text (p, 1,
        "5,0.736,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Kr");
    add_srs_wkt (p, 1,
        "assowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"");
    add_srs_wkt (p, 2,
        "]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_27.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
....
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
....
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
....
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
....
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
....
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
....
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
....
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
....
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
....
4029
4030
4031
4032
4033
4034
4035












































































































































































































































































































































































































































































4036
4037
4038
4039
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_27 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 5539, "epsg", 5539,
        "Corrego Alegre 1961 / UTM zone 24S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1961", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=intl +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1961 / UTM zone 24S\",GEOGCS[\"C");
    add_srs_wkt (p, 1,
        "orrego Alegre 1961\",DATUM[\"Corrego_Alegre_1961\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7022\"]],AUTHORITY[\"EPSG\",\"1074\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"5524\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-39],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"5539\"]]");
    p = add_epsg_def_ex (filter, first, last, 5546, "epsg", 5546,
        "PNG94", 1, 1,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"PNG94\",DATUM[\"Papua_New_Guinea_Geodetic_Datum");
    add_srs_wkt (p, 1,
        "_1994\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"1076\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 6,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5546\"]]");
    p = add_epsg_def_ex (filter, first, last, 5550, "epsg", 5550,
        "PNG94 / PNGMG94 zone 54", 0, 0,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PNG94 / PNGMG94 zone 54\",GEOGCS[\"PNG94\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Papua_New_Guinea_Geodetic_Datum_1994\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1076\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5546\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",141],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"5550\"]]");
    p = add_epsg_def_ex (filter, first, last, 5551, "epsg", 5551,
        "PNG94 / PNGMG94 zone 55", 0, 0,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PNG94 / PNGMG94 zone 55\",GEOGCS[\"PNG94\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Papua_New_Guinea_Geodetic_Datum_1994\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1076\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5546\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",147],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"5551\"]]");
    p = add_epsg_def_ex (filter, first, last, 5552, "epsg", 5552,
        "PNG94 / PNGMG94 zone 56", 0, 0,
        "GRS 1980", "Greenwich",
        "Papua_New_Guinea_Geodetic_Datum_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PNG94 / PNGMG94 zone 56\",GEOGCS[\"PNG94\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Papua_New_Guinea_Geodetic_Datum_1994\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1076\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5546\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",153],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"5552\"]]");
    p = add_epsg_def_ex (filter, first, last, 5554, "epsg", 5554,
        "ETRS89 / UTM zone 31N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 31N + DHHN92 height\",PROJC");
    add_srs_wkt (p, 1,
        "S[\"ETRS89 / UTM zone 31N\",GEOGCS[\"ETRS89\",DATUM[\"Eu");
    add_srs_wkt (p, 2,
        "ropean_Terrestrial_Reference_System_1989\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 8,
        "],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 9,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 11,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"25831\"]],VERT_CS[\"DHHN92 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Deutsches Haupthoehennetz 1992\",2005,AUTH");
    add_srs_wkt (p, 16,
        "ORITY[\"EPSG\",\"5181\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 17,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"57");
    add_srs_wkt (p, 18,
        "83\"]],AUTHORITY[\"EPSG\",\"5554\"]]");
    p = add_epsg_def_ex (filter, first, last, 5555, "epsg", 5555,
        "ETRS89 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 32N + DHHN92 height\",PROJC");
    add_srs_wkt (p, 1,
        "S[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"Eu");
    add_srs_wkt (p, 2,
        "ropean_Terrestrial_Reference_System_1989\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 8,
        "],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 9,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 11,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"25832\"]],VERT_CS[\"DHHN92 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Deutsches Haupthoehennetz 1992\",2005,AUTH");
    add_srs_wkt (p, 16,
        "ORITY[\"EPSG\",\"5181\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 17,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"57");
    add_srs_wkt (p, 18,
        "83\"]],AUTHORITY[\"EPSG\",\"5555\"]]");
    p = add_epsg_def_ex (filter, first, last, 5556, "epsg", 5556,
        "ETRS89 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 33N + DHHN92 height\",PROJC");
    add_srs_wkt (p, 1,
        "S[\"ETRS89 / UTM zone 33N\",GEOGCS[\"ETRS89\",DATUM[\"Eu");
    add_srs_wkt (p, 2,
        "ropean_Terrestrial_Reference_System_1989\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 6,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 7,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 8,
        "],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 9,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",15],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"25833\"]],VERT_CS[\"DHHN92 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Deutsches Haupthoehennetz 1992\",2005,AUTH");
    add_srs_wkt (p, 16,
        "ORITY[\"EPSG\",\"5181\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 17,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"57");
    add_srs_wkt (p, 18,
        "83\"]],AUTHORITY[\"EPSG\",\"5556\"]]");
    p = add_epsg_def_ex (filter, first, last, 5559, "epsg", 5559,
        "Ocotepeque 1935 / Guatemala Norte", 0, 0,
        "Clarke 1866", "Greenwich",
        "Ocotepeque_1935", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666");
    add_proj4text (p, 1,
        "667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=50000");
    add_proj4text (p, 2,
        "0 +y_0=292209.579 +ellps=clrk66 +towgs84=205,96,-98,0,0,");
    add_proj4text (p, 3,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ocotepeque 1935 / Guatemala Norte\",GEOGCS[\"Oc");
    add_srs_wkt (p, 1,
        "otepeque 1935\",DATUM[\"Ocotepeque_1935\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7008\"]],TOWGS84[205,96,-98,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1070\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"5451\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",16.81666666666667],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-90.33333333333333],PARAMETER[\"scale_factor\",0.999922");
    add_srs_wkt (p, 11,
        "26],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",292209.579],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"5559\"]]");
    p = add_epsg_def_ex (filter, first, last, 5561, "epsg", 5561,
        "UCS-2000", 1, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=krass +towgs84=25,-141,-78.5,0,0.35");
    add_proj4text (p, 1,
        ",0.736,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Kr");
    add_srs_wkt (p, 1,
        "assowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"");
    add_srs_wkt (p, 2,
        "]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]]");
    p = add_epsg_def_ex (filter, first, last, 5562, "epsg", 5562,
        "UCS-2000 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 4\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",21],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",4500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5562\"]]");
    p = add_epsg_def_ex (filter, first, last, 5563, "epsg", 5563,
        "UCS-2000 / Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 5\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",27],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",5500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5563\"]]");
    p = add_epsg_def_ex (filter, first, last, 5564, "epsg", 5564,
        "UCS-2000 / Gauss-Kruger zone 6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 6\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",33],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",6500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5564\"]]");
    p = add_epsg_def_ex (filter, first, last, 5565, "epsg", 5565,
        "UCS-2000 / Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 7\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",39],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",7500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5565\"]]");
    p = add_epsg_def_ex (filter, first, last, 5566, "epsg", 5566,
        "UCS-2000 / Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 21E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",21],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5566\"]]");
    p = add_epsg_def_ex (filter, first, last, 5567, "epsg", 5567,
        "UCS-2000 / Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 27E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",27],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5567\"]]");
    p = add_epsg_def_ex (filter, first, last, 5568, "epsg", 5568,
        "UCS-2000 / Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 33E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",33],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5568\"]]");
    p = add_epsg_def_ex (filter, first, last, 5569, "epsg", 5569,
        "UCS-2000 / Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 39E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",39],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5569\"]]");
    p = add_epsg_def_ex (filter, first, last, 5570, "epsg", 5570,
        "UCS-2000 / 3-degree Gauss-Kruger zone 7 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 7 (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",21],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",75000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5570\"]]");
    p = add_epsg_def_ex (filter, first, last, 5571, "epsg", 5571,
        "UCS-2000 / 3-degree Gauss-Kruger zone 8 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 8 (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",24],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",85000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5571\"]]");
    p = add_epsg_def_ex (filter, first, last, 5572, "epsg", 5572,
        "UCS-2000 / 3-degree Gauss-Kruger zone 9 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 9 (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",27],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",95000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5572\"]]");
    p = add_epsg_def_ex (filter, first, last, 5573, "epsg", 5573,
        "UCS-2000 / 3-degree Gauss-Kruger zone 10 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 10 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",30],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",10500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5573\"]]");
    p = add_epsg_def_ex (filter, first, last, 5574, "epsg", 5574,
        "UCS-2000 / 3-degree Gauss-Kruger zone 11 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 11 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",33],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",11500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5574\"]]");
    p = add_epsg_def_ex (filter, first, last, 5575, "epsg", 5575,
        "UCS-2000 / 3-degree Gauss-Kruger zone 12 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 12 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",36],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",12500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5575\"]]");
    p = add_epsg_def_ex (filter, first, last, 5576, "epsg", 5576,
        "UCS-2000 / 3-degree Gauss-Kruger zone 13 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 13 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",39],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",13500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5576\"]]");
    p = add_epsg_def_ex (filter, first, last, 5577, "epsg", 5577,
        "UCS-2000 / 3-degree Gauss-Kruger CM 21E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 21E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",21],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5577\"]]");
    p = add_epsg_def_ex (filter, first, last, 5578, "epsg", 5578,
        "UCS-2000 / 3-degree Gauss-Kruger CM 24E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 24E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",24],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5578\"]]");
    p = add_epsg_def_ex (filter, first, last, 5579, "epsg", 5579,
        "UCS-2000 / 3-degree Gauss-Kruger CM 27E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 27E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",27],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5579\"]]");
    p = add_epsg_def_ex (filter, first, last, 5580, "epsg", 5580,
        "UCS-2000 / 3-degree Gauss-Kruger CM 30E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 30E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",30],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5580\"]]");
    p = add_epsg_def_ex (filter, first, last, 5581, "epsg", 5581,
        "UCS-2000 / 3-degree Gauss-Kruger CM 33E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 33E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",33],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5581\"]]");
    p = add_epsg_def_ex (filter, first, last, 5582, "epsg", 5582,
        "UCS-2000 / 3-degree Gauss-Kruger CM 36E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 36E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",36],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5582\"]]");
    p = add_epsg_def_ex (filter, first, last, 5583, "epsg", 5583,
        "UCS-2000 / 3-degree Gauss-Kruger CM 39E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 39E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,0,0.35,0.736,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",39],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"5583\"]]");
    p = add_epsg_def_ex (filter, first, last, 5588, "epsg", 5588,
        "NAD27 / New Brunswick Stereographic (NAD27)", 0, 1,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Oblique_Stereographic", "foot",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=3");
................................................................................
    add_proj4text (p, 1,
        "04800 +y_0=304800 +datum=NAD27 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Brunswick Stereographic (NAD27)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sibun Gorge 1922 / Colony Grid\",GEOGCS[\"Sibun");
    add_srs_wkt (p, 1,
        " Gorge 1922\",DATUM[\"Sibun_Gorge_1922\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1858\",6378293.645208759,294.2606763692606,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"1071\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Michigan East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Michigan Old Central\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Michigan West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
        "28\"]]");
    p = add_epsg_def_ex (filter, first, last, 5629, "epsg", 5629,
        "Moznet / UTM zone 38S", 0, 0,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Moznet / UTM zone 38S\",GEOGCS[\"Moznet\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Moznet_ITRF94\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6130\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"413");
    add_srs_wkt (p, 7,
        "0\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",45]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5629\"]]");
    p = add_epsg_def_ex (filter, first, last, 5631, "epsg", 5631,
        "Pulkovo 1942(58) / Gauss-Kruger zone 2 (E-N)", 0, 0,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_58", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +");
................................................................................
    add_srs_wkt (p, 1,
        "ht\",PROJCS[\"NTF (Paris) / Lambert zone I\",GEOGCS[\"NT");
    add_srs_wkt (p, 2,
        "F (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Par");
    add_srs_wkt (p, 3,
        "is\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021");
    add_srs_wkt (p, 4,
        "2936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,3");
    add_srs_wkt (p, 5,
        "20,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris");
    add_srs_wkt (p, 6,
        "\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\"");
    add_srs_wkt (p, 7,
        ",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[");
    add_srs_wkt (p, 8,
................................................................................
    add_srs_wkt (p, 1,
        "ght\",PROJCS[\"NTF (Paris) / Lambert zone IV\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 3,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 4,
        "212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 5,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 6,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 7,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 8,
................................................................................
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 12,
        "ORTH],AUTHORITY[\"EPSG\",\"5842\"]]");












































































































































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|










|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|







 







|







 







|







 







|







 







|







 







|







 







|

|





|

|

|

|

|

|

|

|

|

|

|

|







 







|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56
























































































































































































































































































































































































57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
...
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
...
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
....
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
....
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
....
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
....
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
....
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
....
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
....
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_27 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
























































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 5562, "epsg", 5562,
        "UCS-2000 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 4\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",21],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",4500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"5562\"]]");
    p = add_epsg_def_ex (filter, first, last, 5563, "epsg", 5563,
        "UCS-2000 / Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 5\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",27],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",5500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"5563\"]]");
    p = add_epsg_def_ex (filter, first, last, 5564, "epsg", 5564,
        "UCS-2000 / Gauss-Kruger zone 6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 6\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",33],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",6500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"5564\"]]");
    p = add_epsg_def_ex (filter, first, last, 5565, "epsg", 5565,
        "UCS-2000 / Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger zone 7\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",39],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",7500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"5565\"]]");
    p = add_epsg_def_ex (filter, first, last, 5566, "epsg", 5566,
        "UCS-2000 / Gauss-Kruger CM 21E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 21E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",21],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5566\"]]");
    p = add_epsg_def_ex (filter, first, last, 5567, "epsg", 5567,
        "UCS-2000 / Gauss-Kruger CM 27E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 27E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",27],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5567\"]]");
    p = add_epsg_def_ex (filter, first, last, 5568, "epsg", 5568,
        "UCS-2000 / Gauss-Kruger CM 33E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 33E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",33],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5568\"]]");
    p = add_epsg_def_ex (filter, first, last, 5569, "epsg", 5569,
        "UCS-2000 / Gauss-Kruger CM 39E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Gauss-Kruger CM 39E\",GEOGCS[\"UCS-2");
    add_srs_wkt (p, 1,
        "000\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",39],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"5569\"]]");
    p = add_epsg_def_ex (filter, first, last, 5570, "epsg", 5570,
        "UCS-2000 / 3-degree Gauss-Kruger zone 7 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 7 (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",21],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",7500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5570\"]]");
    p = add_epsg_def_ex (filter, first, last, 5571, "epsg", 5571,
        "UCS-2000 / 3-degree Gauss-Kruger zone 8 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 8 (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",24],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",8500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5571\"]]");
    p = add_epsg_def_ex (filter, first, last, 5572, "epsg", 5572,
        "UCS-2000 / 3-degree Gauss-Kruger zone 9 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 9 (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",27],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",9500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5572\"]]");
    p = add_epsg_def_ex (filter, first, last, 5573, "epsg", 5573,
        "UCS-2000 / 3-degree Gauss-Kruger zone 10 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 10 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",30],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",1050");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5573\"]]");
    p = add_epsg_def_ex (filter, first, last, 5574, "epsg", 5574,
        "UCS-2000 / 3-degree Gauss-Kruger zone 11 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 11 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",33],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",1150");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5574\"]]");
    p = add_epsg_def_ex (filter, first, last, 5575, "epsg", 5575,
        "UCS-2000 / 3-degree Gauss-Kruger zone 12 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 12 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",36],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",1250");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5575\"]]");
    p = add_epsg_def_ex (filter, first, last, 5576, "epsg", 5576,
        "UCS-2000 / 3-degree Gauss-Kruger zone 13 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger zone 13 (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",39],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",1350");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"5576\"]]");
    p = add_epsg_def_ex (filter, first, last, 5577, "epsg", 5577,
        "UCS-2000 / 3-degree Gauss-Kruger CM 21E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 21E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",21],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5577\"]]");
    p = add_epsg_def_ex (filter, first, last, 5578, "epsg", 5578,
        "UCS-2000 / 3-degree Gauss-Kruger CM 24E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 24E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",24],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5578\"]]");
    p = add_epsg_def_ex (filter, first, last, 5579, "epsg", 5579,
        "UCS-2000 / 3-degree Gauss-Kruger CM 27E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 27E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",27],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5579\"]]");
    p = add_epsg_def_ex (filter, first, last, 5580, "epsg", 5580,
        "UCS-2000 / 3-degree Gauss-Kruger CM 30E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 30E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",30],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5580\"]]");
    p = add_epsg_def_ex (filter, first, last, 5581, "epsg", 5581,
        "UCS-2000 / 3-degree Gauss-Kruger CM 33E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 33E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",33],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5581\"]]");
    p = add_epsg_def_ex (filter, first, last, 5582, "epsg", 5582,
        "UCS-2000 / 3-degree Gauss-Kruger CM 36E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 36E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",36],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5582\"]]");
    p = add_epsg_def_ex (filter, first, last, 5583, "epsg", 5583,
        "UCS-2000 / 3-degree Gauss-Kruger CM 39E (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / 3-degree Gauss-Kruger CM 39E (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"UCS-2000\",DATUM[\"Ukraine_2000\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7024\"]],TOWGS84[25,-141,-78.5,-0,0.35,0.736,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1077\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"5561\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",39],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"5583\"]]");
    p = add_epsg_def_ex (filter, first, last, 5588, "epsg", 5588,
        "NAD27 / New Brunswick Stereographic (NAD27)", 0, 1,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Oblique_Stereographic", "foot",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=3");
................................................................................
    add_proj4text (p, 1,
        "04800 +y_0=304800 +datum=NAD27 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Brunswick Stereographic (NAD27)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 3,
        "654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sibun Gorge 1922 / Colony Grid\",GEOGCS[\"Sibun");
    add_srs_wkt (p, 1,
        " Gorge 1922\",DATUM[\"Sibun_Gorge_1922\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1858\",6378293.645208759,294.2606763692569,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7007\"]],AUTHORITY[\"EPSG\",\"1071\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Michigan East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Michigan Old Central\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Michigan West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
................................................................................
        "28\"]]");
    p = add_epsg_def_ex (filter, first, last, 5629, "epsg", 5629,
        "Moznet / UTM zone 38S", 0, 0,
        "WGS 84", "Greenwich",
        "Moznet_ITRF94", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=WGS84 +towgs84=0,0,0,-0");
    add_proj4text (p, 1,
        ",-0,-0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Moznet / UTM zone 38S\",GEOGCS[\"Moznet\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Moznet_ITRF94\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,-0,-0,-");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6130\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4130\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",4");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"5629\"]]");
    p = add_epsg_def_ex (filter, first, last, 5631, "epsg", 5631,
        "Pulkovo 1942(58) / Gauss-Kruger zone 2 (E-N)", 0, 0,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942_58", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +");
................................................................................
    add_srs_wkt (p, 1,
        "ht\",PROJCS[\"NTF (Paris) / Lambert zone I\",GEOGCS[\"NT");
    add_srs_wkt (p, 2,
        "F (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Par");
    add_srs_wkt (p, 3,
        "is\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021");
    add_srs_wkt (p, 4,
        "2936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,3");
    add_srs_wkt (p, 5,
        "20,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris");
    add_srs_wkt (p, 6,
        "\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\"");
    add_srs_wkt (p, 7,
        ",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[");
    add_srs_wkt (p, 8,
................................................................................
    add_srs_wkt (p, 1,
        "ght\",PROJCS[\"NTF (Paris) / Lambert zone IV\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 3,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 4,
        "212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 5,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 6,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 7,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 8,
................................................................................
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 12,
        "ORTH],AUTHORITY[\"EPSG\",\"5842\"]]");
    p = add_epsg_def_ex (filter, first, last, 5844, "epsg", 5844,
        "RGRDC 2005 / Congo TM zone 30", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_la_RDC_2005", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9999 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGRDC 2005 / Congo TM zone 30\",GEOGCS[\"RGRDC ");
    add_srs_wkt (p, 1,
        "2005\",DATUM[\"Reseau_Geodesique_de_la_RDC_2005\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1033\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4046\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",30],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9999],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"5844\"]]");
    p = add_epsg_def_ex (filter, first, last, 5845, "epsg", 5845,
        "SWEREF99 TM", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 TM + RH2000 height\",PROJCS[\"SWEREF");
    add_srs_wkt (p, 1,
        "99 TM\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"661");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"3006\"]],VERT_CS[\"RH2000 height");
    add_srs_wkt (p, 14,
        "\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 16,
        "\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"]]");
    add_srs_wkt (p, 17,
        ",AUTHORITY[\"EPSG\",\"5845\"]]");
    p = add_epsg_def_ex (filter, first, last, 5846, "epsg", 5846,
        "SWEREF99 12 00", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 12 00 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 12 00\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",12],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",150000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"3007\"]],VERT_CS[\"RH2000 hei");
    add_srs_wkt (p, 14,
        "ght\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"");
    add_srs_wkt (p, 17,
        "]],AUTHORITY[\"EPSG\",\"5846\"]]");
    p = add_epsg_def_ex (filter, first, last, 5847, "epsg", 5847,
        "SWEREF99 13 30", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.5 +k=1 +x_0=150000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 13 30 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 13 30\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",13.5],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1],PARAMETER[\"false_easting\",150000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"3008\"]],VERT_CS[\"RH2000 he");
    add_srs_wkt (p, 14,
        "ight\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 16,
        "G\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613");
    add_srs_wkt (p, 17,
        "\"]],AUTHORITY[\"EPSG\",\"5847\"]]");
    p = add_epsg_def_ex (filter, first, last, 5848, "epsg", 5848,
        "SWEREF99 15 00", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 15 00 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 15 00\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",15],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",150000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"3009\"]],VERT_CS[\"RH2000 hei");
    add_srs_wkt (p, 14,
        "ght\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"");
    add_srs_wkt (p, 17,
        "]],AUTHORITY[\"EPSG\",\"5848\"]]");
    p = add_epsg_def_ex (filter, first, last, 5849, "epsg", 5849,
        "SWEREF99 16 30", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 16 30 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 16 30\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",16.5],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1],PARAMETER[\"false_easting\",150000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"3010\"]],VERT_CS[\"RH2000 he");
    add_srs_wkt (p, 14,
        "ight\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 16,
        "G\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613");
    add_srs_wkt (p, 17,
        "\"]],AUTHORITY[\"EPSG\",\"5849\"]]");
    p = add_epsg_def_ex (filter, first, last, 5850, "epsg", 5850,
        "SWEREF99 18 00", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 18 00 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 18 00\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",18],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",150000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"3011\"]],VERT_CS[\"RH2000 hei");
    add_srs_wkt (p, 14,
        "ght\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"");
    add_srs_wkt (p, 17,
        "]],AUTHORITY[\"EPSG\",\"5850\"]]");
    p = add_epsg_def_ex (filter, first, last, 5851, "epsg", 5851,
        "SWEREF99 14 15", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=14.25 +k=1 +x_0=150000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 14 15 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 14 15\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",14.25],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"3012\"]],VERT_CS[\"RH2000 ");
    add_srs_wkt (p, 14,
        "height\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 16,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"56");
    add_srs_wkt (p, 17,
        "13\"]],AUTHORITY[\"EPSG\",\"5851\"]]");
    p = add_epsg_def_ex (filter, first, last, 5852, "epsg", 5852,
        "SWEREF99 15 45", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15.75 +k=1 +x_0=150000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 15 45 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 15 45\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",15.75],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"3013\"]],VERT_CS[\"RH2000 ");
    add_srs_wkt (p, 14,
        "height\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 16,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"56");
    add_srs_wkt (p, 17,
        "13\"]],AUTHORITY[\"EPSG\",\"5852\"]]");
    p = add_epsg_def_ex (filter, first, last, 5853, "epsg", 5853,
        "SWEREF99 17 15", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17.25 +k=1 +x_0=150000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 17 15 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 17 15\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",17.25],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"3014\"]],VERT_CS[\"RH2000 ");
    add_srs_wkt (p, 14,
        "height\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 16,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"56");
    add_srs_wkt (p, 17,
        "13\"]],AUTHORITY[\"EPSG\",\"5853\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_28.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
...
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
....
4411
4412
4413
4414
4415
4416
4417


























































































































































































































































































































































































































4418
4419
4420
4421
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_28 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 5844, "epsg", 5844,
        "RGRDC 2005 / Congo TM zone 30", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_la_RDC_2005", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=0.9999 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGRDC 2005 / Congo TM zone 30\",GEOGCS[\"RGRDC ");
    add_srs_wkt (p, 1,
        "2005\",DATUM[\"Reseau_Geodesique_de_la_RDC_2005\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1033\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4046\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",30],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9999],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"5844\"]]");
    p = add_epsg_def_ex (filter, first, last, 5845, "epsg", 5845,
        "SWEREF99 TM", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 TM + RH2000 height\",PROJCS[\"SWEREF");
    add_srs_wkt (p, 1,
        "99 TM\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"661");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"3006\"]],VERT_CS[\"RH2000 height");
    add_srs_wkt (p, 14,
        "\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 16,
        "\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"]]");
    add_srs_wkt (p, 17,
        ",AUTHORITY[\"EPSG\",\"5845\"]]");
    p = add_epsg_def_ex (filter, first, last, 5846, "epsg", 5846,
        "SWEREF99 12 00", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 12 00 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 12 00\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",12],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",150000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"3007\"]],VERT_CS[\"RH2000 hei");
    add_srs_wkt (p, 14,
        "ght\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"");
    add_srs_wkt (p, 17,
        "]],AUTHORITY[\"EPSG\",\"5846\"]]");
    p = add_epsg_def_ex (filter, first, last, 5847, "epsg", 5847,
        "SWEREF99 13 30", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.5 +k=1 +x_0=150000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 13 30 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 13 30\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",13.5],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1],PARAMETER[\"false_easting\",150000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"3008\"]],VERT_CS[\"RH2000 he");
    add_srs_wkt (p, 14,
        "ight\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 16,
        "G\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613");
    add_srs_wkt (p, 17,
        "\"]],AUTHORITY[\"EPSG\",\"5847\"]]");
    p = add_epsg_def_ex (filter, first, last, 5848, "epsg", 5848,
        "SWEREF99 15 00", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 15 00 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 15 00\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",15],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",150000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"3009\"]],VERT_CS[\"RH2000 hei");
    add_srs_wkt (p, 14,
        "ght\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"");
    add_srs_wkt (p, 17,
        "]],AUTHORITY[\"EPSG\",\"5848\"]]");
    p = add_epsg_def_ex (filter, first, last, 5849, "epsg", 5849,
        "SWEREF99 16 30", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.5 +k=1 +x_0=150000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 16 30 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 16 30\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",16.5],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1],PARAMETER[\"false_easting\",150000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"3010\"]],VERT_CS[\"RH2000 he");
    add_srs_wkt (p, 14,
        "ight\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 16,
        "G\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613");
    add_srs_wkt (p, 17,
        "\"]],AUTHORITY[\"EPSG\",\"5849\"]]");
    p = add_epsg_def_ex (filter, first, last, 5850, "epsg", 5850,
        "SWEREF99 18 00", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 18 00 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 18 00\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",18],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1],PARAMETER[\"false_easting\",150000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"3011\"]],VERT_CS[\"RH2000 hei");
    add_srs_wkt (p, 14,
        "ght\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5613\"");
    add_srs_wkt (p, 17,
        "]],AUTHORITY[\"EPSG\",\"5850\"]]");
    p = add_epsg_def_ex (filter, first, last, 5851, "epsg", 5851,
        "SWEREF99 14 15", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=14.25 +k=1 +x_0=150000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 14 15 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 14 15\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",14.25],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"3012\"]],VERT_CS[\"RH2000 ");
    add_srs_wkt (p, 14,
        "height\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 16,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"56");
    add_srs_wkt (p, 17,
        "13\"]],AUTHORITY[\"EPSG\",\"5851\"]]");
    p = add_epsg_def_ex (filter, first, last, 5852, "epsg", 5852,
        "SWEREF99 15 45", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15.75 +k=1 +x_0=150000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 15 45 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 15 45\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",15.75],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"3013\"]],VERT_CS[\"RH2000 ");
    add_srs_wkt (p, 14,
        "height\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 16,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"56");
    add_srs_wkt (p, 17,
        "13\"]],AUTHORITY[\"EPSG\",\"5852\"]]");
    p = add_epsg_def_ex (filter, first, last, 5853, "epsg", 5853,
        "SWEREF99 17 15", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17.25 +k=1 +x_0=150000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SWEREF99 17 15 + RH2000 height\",PROJCS[\"SWE");
    add_srs_wkt (p, 1,
        "REF99 17 15\",GEOGCS[\"SWEREF99\",DATUM[\"SWEREF99\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6619\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4619\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",17.25],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"3014\"]],VERT_CS[\"RH2000 ");
    add_srs_wkt (p, 14,
        "height\",VERT_DATUM[\"Rikets hojdsystem 2000\",2005,AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"5208\"]],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 16,
        "PSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"56");
    add_srs_wkt (p, 17,
        "13\"]],AUTHORITY[\"EPSG\",\"5853\"]]");
    p = add_epsg_def_ex (filter, first, last, 5854, "epsg", 5854,
        "SWEREF99 18 45", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18.75 +k=1 +x_0=150000 +y_0=");
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"JAXA Snow Depth Polar Stereographic North\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"Unspecified datum based upon the Hughes 1980 ellip");
    add_srs_wkt (p, 2,
        "soid\",DATUM[\"Not_specified_based_on_Hughes_1980_ellips");
    add_srs_wkt (p, 3,
        "oid\",SPHEROID[\"Hughes 1980\",6378273,298.279411123064,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 6,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
................................................................................
        "],PARAMETER[\"false_easting\",13500000],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",5500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 15,
        "TH],AUTHORITY[\"EPSG\",\"6074\"]]");


























































































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56












































































































































































































































































































































































































































































57
58
59
60
61
62
63
...
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
....
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_28 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;












































































































































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 5854, "epsg", 5854,
        "SWEREF99 18 45", 0, 1,
        "GRS 1980", "Greenwich",
        "SWEREF99", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18.75 +k=1 +x_0=150000 +y_0=");
................................................................................
    add_srs_wkt (p, 0,
        "PROJCS[\"JAXA Snow Depth Polar Stereographic North\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"Unspecified datum based upon the Hughes 1980 ellip");
    add_srs_wkt (p, 2,
        "soid\",DATUM[\"Not_specified_based_on_Hughes_1980_ellips");
    add_srs_wkt (p, 3,
        "oid\",SPHEROID[\"Hughes 1980\",6378273,298.279411123061,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"7058\"]],AUTHORITY[\"EPSG\",\"6054\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 6,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
................................................................................
        "],PARAMETER[\"false_easting\",13500000],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",5500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 15,
        "TH],AUTHORITY[\"EPSG\",\"6074\"]]");
    p = add_epsg_def_ex (filter, first, last, 6075, "epsg", 6075,
        "WGS 84 / EPSG Arctic zone 2-24", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333");
    add_proj4text (p, 1,
        "333 +lat_0=82.05842488888888 +lon_0=53 +x_0=24500000 +y_");
    add_proj4text (p, 2,
        "0=2500000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 2-24\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",83.66666666666667],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",80.33333333333333],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",82.05842488888888],PARAMETER[\"central_meridian\",53],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",24500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"6075\"]]");
    p = add_epsg_def_ex (filter, first, last, 6076, "epsg", 6076,
        "WGS 84 / EPSG Arctic zone 2-26", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333");
    add_proj4text (p, 1,
        "333 +lat_0=82.05842488888888 +lon_0=93 +x_0=26500000 +y_");
    add_proj4text (p, 2,
        "0=2500000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 2-26\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",83.66666666666667],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",80.33333333333333],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",82.05842488888888],PARAMETER[\"central_meridian\",93],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",26500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"6076\"]]");
    p = add_epsg_def_ex (filter, first, last, 6077, "epsg", 6077,
        "WGS 84 / EPSG Arctic zone 3-13", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=52 +x_0=13500000 +y_0=3500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-13\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",52],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",13500000],PARAMETER[\"false_northing\",35000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6077\"]]");
    p = add_epsg_def_ex (filter, first, last, 6078, "epsg", 6078,
        "WGS 84 / EPSG Arctic zone 3-15", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=83 +x_0=15500000 +y_0=3500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-15\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",83],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",15500000],PARAMETER[\"false_northing\",35000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6078\"]]");
    p = add_epsg_def_ex (filter, first, last, 6079, "epsg", 6079,
        "WGS 84 / EPSG Arctic zone 3-17", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=114 +x_0=17500000 +y_0=3500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-17\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",114],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",17500000],PARAMETER[\"false_northing\",3500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6079\"]]");
    p = add_epsg_def_ex (filter, first, last, 6080, "epsg", 6080,
        "WGS 84 / EPSG Arctic zone 3-19", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=145 +x_0=19500000 +y_0=3500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-19\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",145],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",19500000],PARAMETER[\"false_northing\",3500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6080\"]]");
    p = add_epsg_def_ex (filter, first, last, 6081, "epsg", 6081,
        "WGS 84 / EPSG Arctic zone 4-30", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=58 +x_0=30500000 +y_0=4500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-30\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",58],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",30500000],PARAMETER[\"false_northing\",45000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6081\"]]");
    p = add_epsg_def_ex (filter, first, last, 6082, "epsg", 6082,
        "WGS 84 / EPSG Arctic zone 4-32", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=82 +x_0=32500000 +y_0=4500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-32\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",82],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",32500000],PARAMETER[\"false_northing\",45000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6082\"]]");
    p = add_epsg_def_ex (filter, first, last, 6083, "epsg", 6083,
        "WGS 84 / EPSG Arctic zone 4-34", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=106 +x_0=34500000 +y_0=4500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-34\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",106],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",34500000],PARAMETER[\"false_northing\",4500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6083\"]]");
    p = add_epsg_def_ex (filter, first, last, 6084, "epsg", 6084,
        "WGS 84 / EPSG Arctic zone 4-36", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=130 +x_0=36500000 +y_0=4500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-36\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",130],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",36500000],PARAMETER[\"false_northing\",4500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6084\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_29.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
....
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
....
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
....
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
....
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
....
4387
4388
4389
4390
4391
4392
4393







































































































































































































































































































































































































































































4394
4395
4396
4397
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_29 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 6075, "epsg", 6075,
        "WGS 84 / EPSG Arctic zone 2-24", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333");
    add_proj4text (p, 1,
        "333 +lat_0=82.05842488888888 +lon_0=53 +x_0=24500000 +y_");
    add_proj4text (p, 2,
        "0=2500000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 2-24\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",83.66666666666667],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",80.33333333333333],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",82.05842488888888],PARAMETER[\"central_meridian\",53],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",24500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"6075\"]]");
    p = add_epsg_def_ex (filter, first, last, 6076, "epsg", 6076,
        "WGS 84 / EPSG Arctic zone 2-26", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=83.66666666666667 +lat_2=80.33333333333");
    add_proj4text (p, 1,
        "333 +lat_0=82.05842488888888 +lon_0=93 +x_0=26500000 +y_");
    add_proj4text (p, 2,
        "0=2500000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 2-26\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",83.66666666666667],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",80.33333333333333],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",82.05842488888888],PARAMETER[\"central_meridian\",93],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",26500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",2500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"6076\"]]");
    p = add_epsg_def_ex (filter, first, last, 6077, "epsg", 6077,
        "WGS 84 / EPSG Arctic zone 3-13", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=52 +x_0=13500000 +y_0=3500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-13\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",52],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",13500000],PARAMETER[\"false_northing\",35000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6077\"]]");
    p = add_epsg_def_ex (filter, first, last, 6078, "epsg", 6078,
        "WGS 84 / EPSG Arctic zone 3-15", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=83 +x_0=15500000 +y_0=3500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-15\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",83],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",15500000],PARAMETER[\"false_northing\",35000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6078\"]]");
    p = add_epsg_def_ex (filter, first, last, 6079, "epsg", 6079,
        "WGS 84 / EPSG Arctic zone 3-17", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=114 +x_0=17500000 +y_0=3500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-17\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",114],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",17500000],PARAMETER[\"false_northing\",3500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6079\"]]");
    p = add_epsg_def_ex (filter, first, last, 6080, "epsg", 6080,
        "WGS 84 / EPSG Arctic zone 3-19", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=80.33333333333333 +lat_2=77 +lat_0=78.7");
    add_proj4text (p, 1,
        "0733752777778 +lon_0=145 +x_0=19500000 +y_0=3500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 3-19\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",80.33333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",77],PARAMETER[\"latitude_of_origin\",78.70733752777");
    add_srs_wkt (p, 10,
        "778],PARAMETER[\"central_meridian\",145],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",19500000],PARAMETER[\"false_northing\",3500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6080\"]]");
    p = add_epsg_def_ex (filter, first, last, 6081, "epsg", 6081,
        "WGS 84 / EPSG Arctic zone 4-30", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=58 +x_0=30500000 +y_0=4500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-30\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",58],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",30500000],PARAMETER[\"false_northing\",45000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6081\"]]");
    p = add_epsg_def_ex (filter, first, last, 6082, "epsg", 6082,
        "WGS 84 / EPSG Arctic zone 4-32", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=82 +x_0=32500000 +y_0=4500000 +datu");
    add_proj4text (p, 2,
        "m=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-32\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",82],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",32500000],PARAMETER[\"false_northing\",45000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6082\"]]");
    p = add_epsg_def_ex (filter, first, last, 6083, "epsg", 6083,
        "WGS 84 / EPSG Arctic zone 4-34", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=106 +x_0=34500000 +y_0=4500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-34\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",106],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",34500000],PARAMETER[\"false_northing\",4500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6083\"]]");
    p = add_epsg_def_ex (filter, first, last, 6084, "epsg", 6084,
        "WGS 84 / EPSG Arctic zone 4-36", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
    add_proj4text (p, 1,
        "6440330555556 +lon_0=130 +x_0=36500000 +y_0=4500000 +dat");
    add_proj4text (p, 2,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / EPSG Arctic zone 4-36\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"L");
    add_srs_wkt (p, 7,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 8,
        "lel_1\",77],PARAMETER[\"standard_parallel_2\",73.6666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",75.36440330555");
    add_srs_wkt (p, 10,
        "556],PARAMETER[\"central_meridian\",130],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",36500000],PARAMETER[\"false_northing\",4500");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6084\"]]");
    p = add_epsg_def_ex (filter, first, last, 6085, "epsg", 6085,
        "WGS 84 / EPSG Arctic zone 4-38", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
................................................................................
    add_proj4text (p, 1,
        "79,-27.584,-7.862,8.163,6.042,-13.925 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Grand Cayman National Grid 1959\",GEOGCS[\"GCGD");
    add_srs_wkt (p, 1,
        "59\",DATUM[\"Grand_Cayman_Geodetic_Datum_1959\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],TOWGS84[-179.483,-69.379,-27.584,-7.86");
    add_srs_wkt (p, 4,
        "2,8.163,6.042,-13.925],AUTHORITY[\"EPSG\",\"6723\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "180.304,-0.393,-2.323,2.96,-24.081 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sister Islands National Grid 1961\",GEOGCS[\"SI");
    add_srs_wkt (p, 1,
        "GD61\",DATUM[\"Sister_Islands_Geodetic_Datum_1961\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7008\"]],TOWGS84[8.853,-52.644,180.304,-0.");
    add_srs_wkt (p, 4,
        "393,-2.323,2.96,-24.081],AUTHORITY[\"EPSG\",\"6726\"]],P");
    add_srs_wkt (p, 5,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 6,
................................................................................
        "Reseau_National_Belge_1972", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +la");
    add_proj4text (p, 1,
        "t_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=540");
    add_proj4text (p, 2,
        "0088.438 +ellps=intl +towgs84=-106.8686,52.2978,-103.723");
    add_proj4text (p, 3,
        "9,0.3366,-0.457,1.8422,-1.2747 +units=m +vunits=m +no_de");
    add_proj4text (p, 4,
        "fs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"Belge 1972 / Belgian Lambert 72 + Ostend heig");
    add_srs_wkt (p, 1,
        "ht\",PROJCS[\"Belge 1972 / Belgian Lambert 72\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "Belge 1972\",DATUM[\"Reseau_National_Belge_1972\",SPHERO");
    add_srs_wkt (p, 3,
        "ID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"7022\"]],TOWGS84[-106.8686,52.2978,-103.7239,0.3366,-");
    add_srs_wkt (p, 5,
        "0.457,1.8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"]],PRIM");
    add_srs_wkt (p, 6,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 7,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 8,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 9,
        "ORITY[\"EPSG\",\"4313\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 10,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",51.16666");
    add_srs_wkt (p, 11,
        "723333333],PARAMETER[\"standard_parallel_2\",49.8333339]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"latitude_of_origin\",90],PARAMETER[\"centra");
    add_srs_wkt (p, 13,
        "l_meridian\",4.367486666666666],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 14,
        "g\",150000.013],PARAMETER[\"false_northing\",5400088.438");
    add_srs_wkt (p, 15,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 16,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31370\"");
    add_srs_wkt (p, 17,
        "]],VERT_CS[\"Ostend height\",VERT_DATUM[\"Ostend\",2005,");
    add_srs_wkt (p, 18,
        "AUTHORITY[\"EPSG\",\"5110\"]],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 19,
        "[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 20,
        "\"5710\"]],AUTHORITY[\"EPSG\",\"6190\"]]");
    p = add_epsg_def_ex (filter, first, last, 6204, "epsg", 6204,
        "Macedonia State Coordinate System", 0, 0,
        "Bessel 1841", "Greenwich",
        "MGI_1901", "Transverse_Mercator", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Macedonia State Coordinate System\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I 1901\",DATUM[\"MGI_1901\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\",\"1031\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"3906\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",21],PARAMETER[\"scale_factor\",0.9999");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"6204\"]]");
    p = add_epsg_def_ex (filter, first, last, 6207, "epsg", 6207,
        "Nepal 1981", 1, 1,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Nepal_1981", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs8");
................................................................................
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"6211");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 6307, "epsg", 6307,
        "NAD83(CORS96) / Puerto Rico and Virgin Is.", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +");
    add_proj4text (p, 2,
        "x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Puerto Rico and Virgin Is.\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operat");
    add_srs_wkt (p, 2,
        "ing_Reference_Station_1996\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",18.43333333333333],PARAMETER[\"standard");
    add_srs_wkt (p, 10,
        "_parallel_2\",18.03333333333333],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 11,
        "_origin\",17.83333333333333],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 12,
        "n\",-66.43333333333334],PARAMETER[\"false_easting\",2000");
    add_srs_wkt (p, 13,
        "00],PARAMETER[\"false_northing\",200000],UNIT[\"metre\",");
    add_srs_wkt (p, 14,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 15,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"6307\"]]");
    p = add_epsg_def_ex (filter, first, last, 6311, "epsg", 6311,
        "CGRS93", 1, 1,
        "WGS 84", "Greenwich",
        "Cyprus_Geodetic_Reference_System_1993", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=8.846,-4.394,-1.122,");
    add_proj4text (p, 1,
        "-0.00237,-0.146528,0.130428,0.783926 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"CGRS93\",DATUM[\"Cyprus_Geodetic_Reference_Syst");
    add_srs_wkt (p, 1,
        "em_1993\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7030\"]],TOWGS84[8.846,-4.394,-1.122,-0");
    add_srs_wkt (p, 3,
        ".00237,-0.146528,0.130428,0.783926],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1112\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6311\"]]");
    p = add_epsg_def_ex (filter, first, last, 6312, "epsg", 6312,
        "CGRS93 / Cyprus Local Transverse Mercator", 0, 0,
        "WGS 84", "Greenwich",
        "Cyprus_Geodetic_Reference_System_1993", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=0.99995 +x_0=200000 +y");
    add_proj4text (p, 1,
        "_0=-3500000 +ellps=WGS84 +towgs84=8.846,-4.394,-1.122,-0");
    add_proj4text (p, 2,
        ".00237,-0.146528,0.130428,0.783926 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CGRS93 / Cyprus Local Transverse Mercator\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"CGRS93\",DATUM[\"Cyprus_Geodetic_Reference_System_");
    add_srs_wkt (p, 2,
        "1993\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7030\"]],TOWGS84[8.846,-4.394,-1.122,-0.00");
    add_srs_wkt (p, 4,
        "237,-0.146528,0.130428,0.783926],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 5,
        "12\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 6,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 8,
        "EAST],AUTHORITY[\"EPSG\",\"6311\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 9,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 10,
        "METER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.99995],PARAMETER[\"false_easting\",200000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",-3500000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 14,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"6312\"]]");
    p = add_epsg_def_ex (filter, first, last, 6316, "epsg", 6316,
        "Macedonia State Coordinate System zone 7", 0, 0,
        "Bessel 1841", "Greenwich",
        "MGI_1901", "Transverse_Mercator", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y");
................................................................................
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6328\"]]");







































































































































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







|

|
<
<









|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|










|

|

|

|

|

|

|

|

|

|

|

|

|

|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56


























































































































































































































































































































































































































57
58
59
60
61
62
63
....
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
....
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
....
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547


3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
....
3725
3726
3727
3728
3729
3730
3731













































































































3732
3733
3734
3735
3736
3737
3738
....
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_29 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;


























































































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 6085, "epsg", 6085,
        "WGS 84 / EPSG Arctic zone 4-38", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=77 +lat_2=73.66666666666667 +lat_0=75.3");
................................................................................
    add_proj4text (p, 1,
        "79,-27.584,-7.862,8.163,6.042,-13.925 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Grand Cayman National Grid 1959\",GEOGCS[\"GCGD");
    add_srs_wkt (p, 1,
        "59\",DATUM[\"Grand_Cayman_Geodetic_Datum_1959\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],TOWGS84[-179.483,-69.379,-27.584,-7.86");
    add_srs_wkt (p, 4,
        "2,8.163,6.042,-13.925],AUTHORITY[\"EPSG\",\"6723\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
................................................................................
    add_proj4text (p, 1,
        "180.304,-0.393,-2.323,2.96,-24.081 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sister Islands National Grid 1961\",GEOGCS[\"SI");
    add_srs_wkt (p, 1,
        "GD61\",DATUM[\"Sister_Islands_Geodetic_Datum_1961\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7008\"]],TOWGS84[8.853,-52.644,180.304,-0.");
    add_srs_wkt (p, 4,
        "393,-2.323,2.96,-24.081],AUTHORITY[\"EPSG\",\"6726\"]],P");
    add_srs_wkt (p, 5,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 6,
................................................................................
        "Reseau_National_Belge_1972", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +la");
    add_proj4text (p, 1,
        "t_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=540");
    add_proj4text (p, 2,
        "0088.438 +ellps=intl +towgs84=-106.869,52.2978,-103.724,");
    add_proj4text (p, 3,
        "0.3366,-0.457,1.8422,-1.2747 +units=m +vunits=m +no_defs");


    add_srs_wkt (p, 0,
        "COMPD_CS[\"Belge 1972 / Belgian Lambert 72 + Ostend heig");
    add_srs_wkt (p, 1,
        "ht\",PROJCS[\"Belge 1972 / Belgian Lambert 72\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "Belge 1972\",DATUM[\"Reseau_National_Belge_1972\",SPHERO");
    add_srs_wkt (p, 3,
        "ID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"7022\"]],TOWGS84[-106.869,52.2978,-103.724,0.3366,-0.");
    add_srs_wkt (p, 5,
        "457,1.8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"]],PRIMEM");
    add_srs_wkt (p, 6,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 7,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 8,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 9,
        "ITY[\"EPSG\",\"4313\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 10,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",51.1666672");
    add_srs_wkt (p, 11,
        "3333333],PARAMETER[\"standard_parallel_2\",49.8333339],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"latitude_of_origin\",90],PARAMETER[\"central_");
    add_srs_wkt (p, 13,
        "meridian\",4.367486666666666],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 14,
        ",150000.013],PARAMETER[\"false_northing\",5400088.438],U");
    add_srs_wkt (p, 15,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 16,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31370\"]],");
    add_srs_wkt (p, 17,
        "VERT_CS[\"Ostend height\",VERT_DATUM[\"Ostend\",2005,AUT");
    add_srs_wkt (p, 18,
        "HORITY[\"EPSG\",\"5110\"]],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5");
    add_srs_wkt (p, 20,
        "710\"]],AUTHORITY[\"EPSG\",\"6190\"]]");
    p = add_epsg_def_ex (filter, first, last, 6204, "epsg", 6204,
        "Macedonian State Coordinate System", 0, 0,
        "Bessel 1841", "Greenwich",
        "MGI_1901", "Transverse_Mercator", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Macedonian State Coordinate System\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI 1901\",DATUM[\"MGI_1901\",SPHEROID[\"Bessel 1841\",63");
    add_srs_wkt (p, 2,
        "77397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\",\"1031\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"3906\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",21],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "99],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"6204\"]]");
    p = add_epsg_def_ex (filter, first, last, 6207, "epsg", 6207,
        "Nepal 1981", 1, 1,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Nepal_1981", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6377276.345 +b=6356075.41314024 +towgs8");
................................................................................
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"6211");
    add_srs_wkt (p, 14,
        "\"]]");













































































































    p = add_epsg_def_ex (filter, first, last, 6316, "epsg", 6316,
        "Macedonia State Coordinate System zone 7", 0, 0,
        "Bessel 1841", "Greenwich",
        "MGI_1901", "Transverse_Mercator", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y");
................................................................................
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6328\"]]");
    p = add_epsg_def_ex (filter, first, last, 6329, "epsg", 6329,
        "NAD83(2011) / UTM zone 60N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 60N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",177],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6329\"]]");
    p = add_epsg_def_ex (filter, first, last, 6330, "epsg", 6330,
        "NAD83(2011) / UTM zone 1N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 1N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-177],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6330\"]]");
    p = add_epsg_def_ex (filter, first, last, 6331, "epsg", 6331,
        "NAD83(2011) / UTM zone 2N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 2N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-171],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6331\"]]");
    p = add_epsg_def_ex (filter, first, last, 6332, "epsg", 6332,
        "NAD83(2011) / UTM zone 3N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 3N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-165],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6332\"]]");
    p = add_epsg_def_ex (filter, first, last, 6333, "epsg", 6333,
        "NAD83(2011) / UTM zone 4N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 4N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-159],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6333\"]]");
    p = add_epsg_def_ex (filter, first, last, 6334, "epsg", 6334,
        "NAD83(2011) / UTM zone 5N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 5N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-153],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6334\"]]");
    p = add_epsg_def_ex (filter, first, last, 6335, "epsg", 6335,
        "NAD83(2011) / UTM zone 6N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 6N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-147],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6335\"]]");
    p = add_epsg_def_ex (filter, first, last, 6336, "epsg", 6336,
        "NAD83(2011) / UTM zone 7N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 7N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-141],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6336\"]]");
    p = add_epsg_def_ex (filter, first, last, 6337, "epsg", 6337,
        "NAD83(2011) / UTM zone 8N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 8N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-135],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6337\"]]");
    p = add_epsg_def_ex (filter, first, last, 6338, "epsg", 6338,
        "NAD83(2011) / UTM zone 9N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 9N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-129],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6338\"]]");
    p = add_epsg_def_ex (filter, first, last, 6339, "epsg", 6339,
        "NAD83(2011) / UTM zone 10N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 10N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-123],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6339\"]]");
    p = add_epsg_def_ex (filter, first, last, 6340, "epsg", 6340,
        "NAD83(2011) / UTM zone 11N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 11N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-117],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6340\"]]");
    p = add_epsg_def_ex (filter, first, last, 6341, "epsg", 6341,
        "NAD83(2011) / UTM zone 12N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 12N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-111],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6341\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_30.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
....
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560







































1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
....
3983
3984
3985
3986
3987
3988
3989









































































































































































































































































































































































































































































































































3990
3991
3992
3993
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_30 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 6329, "epsg", 6329,
        "NAD83(2011) / UTM zone 60N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 60N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",177],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6329\"]]");
    p = add_epsg_def_ex (filter, first, last, 6330, "epsg", 6330,
        "NAD83(2011) / UTM zone 1N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 1N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-177],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6330\"]]");
    p = add_epsg_def_ex (filter, first, last, 6331, "epsg", 6331,
        "NAD83(2011) / UTM zone 2N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 2N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-171],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6331\"]]");
    p = add_epsg_def_ex (filter, first, last, 6332, "epsg", 6332,
        "NAD83(2011) / UTM zone 3N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 3N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-165],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6332\"]]");
    p = add_epsg_def_ex (filter, first, last, 6333, "epsg", 6333,
        "NAD83(2011) / UTM zone 4N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 4N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-159],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6333\"]]");
    p = add_epsg_def_ex (filter, first, last, 6334, "epsg", 6334,
        "NAD83(2011) / UTM zone 5N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 5N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-153],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6334\"]]");
    p = add_epsg_def_ex (filter, first, last, 6335, "epsg", 6335,
        "NAD83(2011) / UTM zone 6N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 6N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-147],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6335\"]]");
    p = add_epsg_def_ex (filter, first, last, 6336, "epsg", 6336,
        "NAD83(2011) / UTM zone 7N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 7N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-141],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6336\"]]");
    p = add_epsg_def_ex (filter, first, last, 6337, "epsg", 6337,
        "NAD83(2011) / UTM zone 8N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 8N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-135],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6337\"]]");
    p = add_epsg_def_ex (filter, first, last, 6338, "epsg", 6338,
        "NAD83(2011) / UTM zone 9N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 9N\",GEOGCS[\"NAD83(2011");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_National_Spatial_Reference_System_2011");
    add_srs_wkt (p, 2,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-129],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"6338\"]]");
    p = add_epsg_def_ex (filter, first, last, 6339, "epsg", 6339,
        "NAD83(2011) / UTM zone 10N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 10N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-123],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6339\"]]");
    p = add_epsg_def_ex (filter, first, last, 6340, "epsg", 6340,
        "NAD83(2011) / UTM zone 11N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 11N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-117],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6340\"]]");
    p = add_epsg_def_ex (filter, first, last, 6341, "epsg", 6341,
        "NAD83(2011) / UTM zone 12N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / UTM zone 12N\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-111],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6341\"]]");
    p = add_epsg_def_ex (filter, first, last, 6342, "epsg", 6342,
        "NAD83(2011) / UTM zone 13N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs");
................................................................................
        "UCS-2000 / Ukraine TM zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 7\",GEOGCS[\"UCS-200");
    add_srs_wkt (p, 1,
        "0\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\",");
    add_srs_wkt (p, 2,
        "6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,-");
    add_srs_wkt (p, 3,
        "141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",21],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",300000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"6381\"]]");
    p = add_epsg_def_ex (filter, first, last, 6382, "epsg", 6382,
        "UCS-2000 / Ukraine TM zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 8\",GEOGCS[\"UCS-200");
    add_srs_wkt (p, 1,
        "0\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\",");
    add_srs_wkt (p, 2,
        "6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,-");
    add_srs_wkt (p, 3,
        "141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",24],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",300000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"6382\"]]");
    p = add_epsg_def_ex (filter, first, last, 6383, "epsg", 6383,
        "UCS-2000 / Ukraine TM zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 9\",GEOGCS[\"UCS-200");
    add_srs_wkt (p, 1,
        "0\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\",");
    add_srs_wkt (p, 2,
        "6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,-");
    add_srs_wkt (p, 3,
        "141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",27],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",300000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"6383\"]]");
    p = add_epsg_def_ex (filter, first, last, 6384, "epsg", 6384,
        "UCS-2000 / Ukraine TM zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 10\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,







































        "[\"central_meridian\",30],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6384\"]]");
    p = add_epsg_def_ex (filter, first, last, 6385, "epsg", 6385,
        "UCS-2000 / Ukraine TM zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 11\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",33],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6385\"]]");
    p = add_epsg_def_ex (filter, first, last, 6386, "epsg", 6386,
        "UCS-2000 / Ukraine TM zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 12\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",36],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6386\"]]");
    p = add_epsg_def_ex (filter, first, last, 6387, "epsg", 6387,
        "UCS-2000 / Ukraine TM zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,0,0.35,0.736,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 13\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",39],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6387\"]]");
    p = add_epsg_def_ex (filter, first, last, 6391, "epsg", 6391,
        "Cayman Islands National Grid 2011", 0, 0,
        "GRS 1980", "Greenwich",
................................................................................
        "_factor\",0.999947368],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"6448\"]]");









































































































































































































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







|

|

|

|

|

|

|

|

|

|

|








|

|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|











>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|












|

|







|

|

|

|

|

|

|

|

|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56







































































































































































































































































































































































































































































57
58
59
60
61
62
63
...
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050







































1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
....
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_30 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;







































































































































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 6342, "epsg", 6342,
        "NAD83(2011) / UTM zone 13N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=GRS80 +units=m +no_defs");
................................................................................
        "UCS-2000 / Ukraine TM zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 7\",GEOGCS[\"UCS-200");
    add_srs_wkt (p, 1,
        "0\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\",");
    add_srs_wkt (p, 2,
        "6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,-");
    add_srs_wkt (p, 3,
        "141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",21],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6381\"]]");
    p = add_epsg_def_ex (filter, first, last, 6382, "epsg", 6382,
        "UCS-2000 / Ukraine TM zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 8\",GEOGCS[\"UCS-200");
    add_srs_wkt (p, 1,
        "0\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\",");
    add_srs_wkt (p, 2,
        "6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,-");
    add_srs_wkt (p, 3,
        "141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",24],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6382\"]]");
    p = add_epsg_def_ex (filter, first, last, 6383, "epsg", 6383,
        "UCS-2000 / Ukraine TM zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 9\",GEOGCS[\"UCS-200");
    add_srs_wkt (p, 1,
        "0\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\",");
    add_srs_wkt (p, 2,
        "6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,-");
    add_srs_wkt (p, 3,







































        "141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",27],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6383\"]]");
    p = add_epsg_def_ex (filter, first, last, 6384, "epsg", 6384,
        "UCS-2000 / Ukraine TM zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=30 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 10\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",30],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6384\"]]");
    p = add_epsg_def_ex (filter, first, last, 6385, "epsg", 6385,
        "UCS-2000 / Ukraine TM zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 11\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",33],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6385\"]]");
    p = add_epsg_def_ex (filter, first, last, 6386, "epsg", 6386,
        "UCS-2000 / Ukraine TM zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=36 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 12\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",36],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6386\"]]");
    p = add_epsg_def_ex (filter, first, last, 6387, "epsg", 6387,
        "UCS-2000 / Ukraine TM zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Ukraine_2000", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=300000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=25,-141,-78.5,-0,0.35,0.736,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"UCS-2000 / Ukraine TM zone 13\",GEOGCS[\"UCS-20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Ukraine_2000\",SPHEROID[\"Krassowsky 1940\"");
    add_srs_wkt (p, 2,
        ",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[25,");
    add_srs_wkt (p, 3,
        "-141,-78.5,-0,0.35,0.736,0],AUTHORITY[\"EPSG\",\"1077\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"5561\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",39],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"6387\"]]");
    p = add_epsg_def_ex (filter, first, last, 6391, "epsg", 6391,
        "Cayman Islands National Grid 2011", 0, 0,
        "GRS 1980", "Greenwich",
................................................................................
        "_factor\",0.999947368],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"6448\"]]");
    p = add_epsg_def_ex (filter, first, last, 6449, "epsg", 6449,
        "NAD83(2011) / Idaho Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.99");
    add_proj4text (p, 1,
        "99473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho Central (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",41.6666666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-114],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.999947368],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",1640416.667],PARAMETER[\"false_northing\",0],UNIT[\"US ");
    add_srs_wkt (p, 12,
        "survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "03\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"6449\"]]");
    p = add_epsg_def_ex (filter, first, last, 6450, "epsg", 6450,
        "NAD83(2011) / Idaho East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho East\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",41.66666666666666],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-112.1666666666667],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",0.999947368],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",200000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6450\"]]");
    p = add_epsg_def_ex (filter, first, last, 6451, "epsg", 6451,
        "NAD83(2011) / Idaho East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho East (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",41.666666666");
    add_srs_wkt (p, 9,
        "66666],PARAMETER[\"central_meridian\",-112.1666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.999947368],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",656166.667],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"6451\"]]");
    p = add_epsg_def_ex (filter, first, last, 6452, "epsg", 6452,
        "NAD83(2011) / Idaho West", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho West\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",41.66666666666666],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-115.75],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.999933333],PARAMETER[\"false_easting\",800000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"6452\"]]");
    p = add_epsg_def_ex (filter, first, last, 6453, "epsg", 6453,
        "NAD83(2011) / Idaho West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +u");
    add_proj4text (p, 2,
        "nits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho West (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",41.666666666");
    add_srs_wkt (p, 9,
        "66666],PARAMETER[\"central_meridian\",-115.75],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.999933333],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2624666.667],PARAMETER[\"false_northing\",0],UNIT[\"U");
    add_srs_wkt (p, 12,
        "S survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6453\"]]");
    p = add_epsg_def_ex (filter, first, last, 6454, "epsg", 6454,
        "NAD83(2011) / Illinois East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois East\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",36.66666666666666");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-88.33333333333333],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999975],PARAMETER[\"false_east");
    add_srs_wkt (p, 11,
        "ing\",300000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6454\"]]");
    p = add_epsg_def_ex (filter, first, last, 6455, "epsg", 6455,
        "NAD83(2011) / Illinois East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois East (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",36.6666666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-88.333333333333");
    add_srs_wkt (p, 10,
        "33],PARAMETER[\"scale_factor\",0.999975],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",984250.0000000002],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"6455\"]]");
    p = add_epsg_def_ex (filter, first, last, 6456, "epsg", 6456,
        "NAD83(2011) / Illinois West", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois West\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",36.66666666666666");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-90.16666666666667],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999941177],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",700000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6456\"]]");
    p = add_epsg_def_ex (filter, first, last, 6457, "epsg", 6457,
        "NAD83(2011) / Illinois West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois West (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",36.6666666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-90.166666666666");
    add_srs_wkt (p, 10,
        "67],PARAMETER[\"scale_factor\",0.999941177],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2296583.333300001],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"6457\"]]");
    p = add_epsg_def_ex (filter, first, last, 6458, "epsg", 6458,
        "NAD83(2011) / Indiana East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana East\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",37.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-85.66666666666667],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.999966667],PARAMETER[\"false_easting\",10000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",250000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6458\"]]");
    p = add_epsg_def_ex (filter, first, last, 6459, "epsg", 6459,
        "NAD83(2011) / Indiana East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana East (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",37.5],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.66666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.999966667],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",328083.333],PARAMETER[\"false_northing\",820208.33300");
    add_srs_wkt (p, 12,
        "00002],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"6459\"]]");
    p = add_epsg_def_ex (filter, first, last, 6460, "epsg", 6460,
        "NAD83(2011) / Indiana West", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana West\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",37.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-87.08333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.999966667],PARAMETER[\"false_easting\",90000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",250000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6460\"]]");
    p = add_epsg_def_ex (filter, first, last, 6461, "epsg", 6461,
        "NAD83(2011) / Indiana West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana West (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",37.5],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-87.08333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.999966667],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2952750],PARAMETER[\"false_northing\",820208.33300000");
    add_srs_wkt (p, 12,
        "02],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"6461\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_31.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
....
4175
4176
4177
4178
4179
4180
4181

























































































































































































































































































































































































































































































































































4182
4183
4184
4185
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_31 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 6449, "epsg", 6449,
        "NAD83(2011) / Idaho Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.99");
    add_proj4text (p, 1,
        "99473679999999 +x_0=500000.0001016001 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho Central (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",41.6666666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-114],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.999947368],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",1640416.667],PARAMETER[\"false_northing\",0],UNIT[\"US ");
    add_srs_wkt (p, 12,
        "survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "03\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"6449\"]]");
    p = add_epsg_def_ex (filter, first, last, 6450, "epsg", 6450,
        "NAD83(2011) / Idaho East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho East\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",41.66666666666666],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-112.1666666666667],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",0.999947368],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",200000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6450\"]]");
    p = add_epsg_def_ex (filter, first, last, 6451, "epsg", 6451,
        "NAD83(2011) / Idaho East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=200000.0001016002 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho East (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",41.666666666");
    add_srs_wkt (p, 9,
        "66666],PARAMETER[\"central_meridian\",-112.1666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.999947368],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",656166.667],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"6451\"]]");
    p = add_epsg_def_ex (filter, first, last, 6452, "epsg", 6452,
        "NAD83(2011) / Idaho West", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho West\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",41.66666666666666],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-115.75],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.999933333],PARAMETER[\"false_easting\",800000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"6452\"]]");
    p = add_epsg_def_ex (filter, first, last, 6453, "epsg", 6453,
        "NAD83(2011) / Idaho West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=800000.0001016001 +y_0=0 +ellps=GRS80 +u");
    add_proj4text (p, 2,
        "nits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Idaho West (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",41.666666666");
    add_srs_wkt (p, 9,
        "66666],PARAMETER[\"central_meridian\",-115.75],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.999933333],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2624666.667],PARAMETER[\"false_northing\",0],UNIT[\"U");
    add_srs_wkt (p, 12,
        "S survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6453\"]]");
    p = add_epsg_def_ex (filter, first, last, 6454, "epsg", 6454,
        "NAD83(2011) / Illinois East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois East\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",36.66666666666666");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-88.33333333333333],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999975],PARAMETER[\"false_east");
    add_srs_wkt (p, 11,
        "ing\",300000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6454\"]]");
    p = add_epsg_def_ex (filter, first, last, 6455, "epsg", 6455,
        "NAD83(2011) / Illinois East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=300000.0000000001 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois East (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",36.6666666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-88.333333333333");
    add_srs_wkt (p, 10,
        "33],PARAMETER[\"scale_factor\",0.999975],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",984250.0000000002],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"6455\"]]");
    p = add_epsg_def_ex (filter, first, last, 6456, "epsg", 6456,
        "NAD83(2011) / Illinois West", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois West\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",36.66666666666666");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-90.16666666666667],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999941177],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",700000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6456\"]]");
    p = add_epsg_def_ex (filter, first, last, 6457, "epsg", 6457,
        "NAD83(2011) / Illinois West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=699999.9999898402 +y_0=0 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Illinois West (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",36.6666666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-90.166666666666");
    add_srs_wkt (p, 10,
        "67],PARAMETER[\"scale_factor\",0.999941177],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2296583.333300001],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"6457\"]]");
    p = add_epsg_def_ex (filter, first, last, 6458, "epsg", 6458,
        "NAD83(2011) / Indiana East", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana East\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",37.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-85.66666666666667],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.999966667],PARAMETER[\"false_easting\",10000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",250000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6458\"]]");
    p = add_epsg_def_ex (filter, first, last, 6459, "epsg", 6459,
        "NAD83(2011) / Indiana East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=99999.99989839978 +y_0=249999.9998983998 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana East (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",37.5],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.66666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.999966667],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",328083.333],PARAMETER[\"false_northing\",820208.33300");
    add_srs_wkt (p, 12,
        "00002],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"6459\"]]");
    p = add_epsg_def_ex (filter, first, last, 6460, "epsg", 6460,
        "NAD83(2011) / Indiana West", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana West\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",37.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-87.08333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.999966667],PARAMETER[\"false_easting\",90000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",250000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6460\"]]");
    p = add_epsg_def_ex (filter, first, last, 6461, "epsg", 6461,
        "NAD83(2011) / Indiana West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=900000 +y_0=249999.9998983998 +ellps=GRS80");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Indiana West (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",37.5],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-87.08333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.999966667],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2952750],PARAMETER[\"false_northing\",820208.33300000");
    add_srs_wkt (p, 12,
        "02],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"6461\"]]");
    p = add_epsg_def_ex (filter, first, last, 6462, "epsg", 6462,
        "NAD83(2011) / Iowa North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666");
................................................................................
        "ing\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"6549\"]]");

























































































































































































































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56









































































































































































































































































































































































































































































































































57
58
59
60
61
62
63
....
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_31 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;









































































































































































































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 6462, "epsg", 6462,
        "NAD83(2011) / Iowa North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666");
................................................................................
        "ing\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"6549\"]]");
    p = add_epsg_def_ex (filter, first, last, 6550, "epsg", 6550,
        "NAD83(2011) / Ohio South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Ohio South\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",40.0333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",38.7333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",38],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-82.5],PARAMETER[\"false_easting\",600000");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"6550\"]]");
    p = add_epsg_def_ex (filter, first, last, 6551, "epsg", 6551,
        "NAD83(2011) / Ohio South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Ohio South (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",40.");
    add_srs_wkt (p, 9,
        "03333333333333],PARAMETER[\"standard_parallel_2\",38.733");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"latitude_of_origin\",38],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-82.5],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 12,
        "g\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US s");
    add_srs_wkt (p, 13,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 14,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"6551\"]]");
    p = add_epsg_def_ex (filter, first, last, 6552, "epsg", 6552,
        "NAD83(2011) / Oklahoma North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma North\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",36.7666");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"standard_parallel_2\",35.5666666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"latitude_of_origin\",35],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-98],PARAMETER[\"false_easting\",60");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"6552\"]]");
    p = add_epsg_def_ex (filter, first, last, 6553, "epsg", 6553,
        "NAD83(2011) / Oklahoma North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma North (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",36.76666666666667],PARAMETER[\"standard_parallel_2\",35");
    add_srs_wkt (p, 10,
        ".56666666666667],PARAMETER[\"latitude_of_origin\",35],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-98],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"6553\"]]");
    p = add_epsg_def_ex (filter, first, last, 6554, "epsg", 6554,
        "NAD83(2011) / Oklahoma South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma South\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",35.2333");
    add_srs_wkt (p, 9,
        "3333333333],PARAMETER[\"standard_parallel_2\",33.9333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"latitude_of_origin\",33.33333333333");
    add_srs_wkt (p, 11,
        "334],PARAMETER[\"central_meridian\",-98],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",600000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6554\"]]");
    p = add_epsg_def_ex (filter, first, last, 6555, "epsg", 6555,
        "NAD83(2011) / Oklahoma South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma South (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",35.23333333333333],PARAMETER[\"standard_parallel_2\",33");
    add_srs_wkt (p, 10,
        ".93333333333333],PARAMETER[\"latitude_of_origin\",33.333");
    add_srs_wkt (p, 11,
        "33333333334],PARAMETER[\"central_meridian\",-98],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_easting\",1968500],PARAMETER[\"false_northing");
    add_srs_wkt (p, 13,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 15,
        "],AUTHORITY[\"EPSG\",\"6555\"]]");
    p = add_epsg_def_ex (filter, first, last, 6556, "epsg", 6556,
        "NAD83(2011) / Oregon LCC (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon LCC (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",43],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",45.5],PARAMETER[\"latitud");
    add_srs_wkt (p, 10,
        "e_of_origin\",41.75],PARAMETER[\"central_meridian\",-120");
    add_srs_wkt (p, 11,
        ".5],PARAMETER[\"false_easting\",400000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"6556\"]]");
    p = add_epsg_def_ex (filter, first, last, 6557, "epsg", 6557,
        "NAD83(2011) / Oregon GIC Lambert (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon GIC Lambert (ft)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",43],PARAMETER[\"standard_parallel_2\",45.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",41.75],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-120.5],PARAMETER[\"false_easting\",1312335.958],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"6557\"]]");
    p = add_epsg_def_ex (filter, first, last, 6558, "epsg", 6558,
        "NAD83(2011) / Oregon North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon North\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",46],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",44.33333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",43.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-120.5],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 12,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6558\"]]");
    p = add_epsg_def_ex (filter, first, last, 6559, "epsg", 6559,
        "NAD83(2011) / Oregon North (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon North (ft)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",46]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",44.33333333333334],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",43.66666666666666],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-120.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",8202099.738],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6559\"]]");
    p = add_epsg_def_ex (filter, first, last, 6560, "epsg", 6560,
        "NAD83(2011) / Oregon South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon South\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",44],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",42.33333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",41.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-120.5],PARAMETER[\"false_easting\",1");
    add_srs_wkt (p, 12,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6560\"]]");
    p = add_epsg_def_ex (filter, first, last, 6561, "epsg", 6561,
        "NAD83(2011) / Oregon South (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon South (ft)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",44]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",42.33333333333334],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",41.66666666666666],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-120.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",4921259.843],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6561\"]]");
    p = add_epsg_def_ex (filter, first, last, 6562, "epsg", 6562,
        "NAD83(2011) / Pennsylvania North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=4");
    add_proj4text (p, 1,
        "0.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Pennsylvania North\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41");
    add_srs_wkt (p, 9,
        ".95],PARAMETER[\"standard_parallel_2\",40.88333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",40.16666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-77.75],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",600000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6562\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_32.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
....
4281
4282
4283
4284
4285
4286
4287









































































































































































































































































































































































































































































































































4288
4289
4290
4291
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_32 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 6550, "epsg", 6550,
        "NAD83(2011) / Ohio South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Ohio South\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",40.0333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",38.7333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",38],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-82.5],PARAMETER[\"false_easting\",600000");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"6550\"]]");
    p = add_epsg_def_ex (filter, first, last, 6551, "epsg", 6551,
        "NAD83(2011) / Ohio South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Ohio South (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",40.");
    add_srs_wkt (p, 9,
        "03333333333333],PARAMETER[\"standard_parallel_2\",38.733");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"latitude_of_origin\",38],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-82.5],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 12,
        "g\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US s");
    add_srs_wkt (p, 13,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 14,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"6551\"]]");
    p = add_epsg_def_ex (filter, first, last, 6552, "epsg", 6552,
        "NAD83(2011) / Oklahoma North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma North\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",36.7666");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"standard_parallel_2\",35.5666666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"latitude_of_origin\",35],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-98],PARAMETER[\"false_easting\",60");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"6552\"]]");
    p = add_epsg_def_ex (filter, first, last, 6553, "epsg", 6553,
        "NAD83(2011) / Oklahoma North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma North (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",36.76666666666667],PARAMETER[\"standard_parallel_2\",35");
    add_srs_wkt (p, 10,
        ".56666666666667],PARAMETER[\"latitude_of_origin\",35],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-98],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"6553\"]]");
    p = add_epsg_def_ex (filter, first, last, 6554, "epsg", 6554,
        "NAD83(2011) / Oklahoma South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma South\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",35.2333");
    add_srs_wkt (p, 9,
        "3333333333],PARAMETER[\"standard_parallel_2\",33.9333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"latitude_of_origin\",33.33333333333");
    add_srs_wkt (p, 11,
        "334],PARAMETER[\"central_meridian\",-98],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",600000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6554\"]]");
    p = add_epsg_def_ex (filter, first, last, 6555, "epsg", 6555,
        "NAD83(2011) / Oklahoma South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oklahoma South (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",35.23333333333333],PARAMETER[\"standard_parallel_2\",33");
    add_srs_wkt (p, 10,
        ".93333333333333],PARAMETER[\"latitude_of_origin\",33.333");
    add_srs_wkt (p, 11,
        "33333333334],PARAMETER[\"central_meridian\",-98],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_easting\",1968500],PARAMETER[\"false_northing");
    add_srs_wkt (p, 13,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 15,
        "],AUTHORITY[\"EPSG\",\"6555\"]]");
    p = add_epsg_def_ex (filter, first, last, 6556, "epsg", 6556,
        "NAD83(2011) / Oregon LCC (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon LCC (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",43],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",45.5],PARAMETER[\"latitud");
    add_srs_wkt (p, 10,
        "e_of_origin\",41.75],PARAMETER[\"central_meridian\",-120");
    add_srs_wkt (p, 11,
        ".5],PARAMETER[\"false_easting\",400000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"6556\"]]");
    p = add_epsg_def_ex (filter, first, last, 6557, "epsg", 6557,
        "NAD83(2011) / Oregon GIC Lambert (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon GIC Lambert (ft)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",43],PARAMETER[\"standard_parallel_2\",45.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",41.75],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-120.5],PARAMETER[\"false_easting\",1312335.958],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"6557\"]]");
    p = add_epsg_def_ex (filter, first, last, 6558, "epsg", 6558,
        "NAD83(2011) / Oregon North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon North\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",46],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",44.33333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",43.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-120.5],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 12,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6558\"]]");
    p = add_epsg_def_ex (filter, first, last, 6559, "epsg", 6559,
        "NAD83(2011) / Oregon North (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon North (ft)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",46]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",44.33333333333334],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",43.66666666666666],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-120.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",8202099.738],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6559\"]]");
    p = add_epsg_def_ex (filter, first, last, 6560, "epsg", 6560,
        "NAD83(2011) / Oregon South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon South\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",44],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",42.33333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",41.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-120.5],PARAMETER[\"false_easting\",1");
    add_srs_wkt (p, 12,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6560\"]]");
    p = add_epsg_def_ex (filter, first, last, 6561, "epsg", 6561,
        "NAD83(2011) / Oregon South (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon South (ft)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",44]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",42.33333333333334],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",41.66666666666666],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-120.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",4921259.843],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6561\"]]");
    p = add_epsg_def_ex (filter, first, last, 6562, "epsg", 6562,
        "NAD83(2011) / Pennsylvania North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=4");
    add_proj4text (p, 1,
        "0.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Pennsylvania North\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41");
    add_srs_wkt (p, 9,
        ".95],PARAMETER[\"standard_parallel_2\",40.88333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",40.16666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-77.75],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",600000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6562\"]]");
    p = add_epsg_def_ex (filter, first, last, 6563, "epsg", 6563,
        "NAD83(2011) / Pennsylvania North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=4");
................................................................................
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "0\"]]");









































































































































































































































































































































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56

























































































































































































































































































































































































































































































































































57
58
59
60
61
62
63
....
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_32 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;

























































































































































































































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 6563, "epsg", 6563,
        "NAD83(2011) / Pennsylvania North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=4");
................................................................................
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 6661, "epsg", 6661,
        "NAD83(CSRS) / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 18N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 18N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-75],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2959\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 6662, "epsg", 6662,
        "NAD83(CSRS) / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 19N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 19N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-69],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2960\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 6663, "epsg", 6663,
        "NAD83(CSRS) / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 20N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 20N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-63],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2961\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 6664, "epsg", 6664,
        "NAD83(CSRS) / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 21N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 21N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-57],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2962\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 6665, "epsg", 6665,
        "NAD83(CSRS) / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 22N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 22N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-51],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"3761\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 6668, "epsg", 6668,
        "JGD2011", 1, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 4,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 5,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"6668\"]]");
    p = add_epsg_def_ex (filter, first, last, 6669, "epsg", 6669,
        "JGD2011 / Japan Plane Rectangular CS I", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS I\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",33],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",129.5],PARAMETER[\"scale_factor\",0.9999],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6669\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6670, "epsg", 6670,
        "JGD2011 / Japan Plane Rectangular CS II", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS II\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",33],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",131],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 12,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6670\"]]");
    p = add_epsg_def_ex (filter, first, last, 6671, "epsg", 6671,
        "JGD2011 / Japan Plane Rectangular CS III", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS III\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",36],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",132.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"6671\"]]");
    p = add_epsg_def_ex (filter, first, last, 6672, "epsg", 6672,
        "JGD2011 / Japan Plane Rectangular CS IV", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS IV\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",33],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",133.5],PARAMETER[\"scale_factor\",0.9999],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6672\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6673, "epsg", 6673,
        "JGD2011 / Japan Plane Rectangular CS V", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS V\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",134.3333333333333],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",0],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"6673\"]]");
    p = add_epsg_def_ex (filter, first, last, 6674, "epsg", 6674,
        "JGD2011 / Japan Plane Rectangular CS VI", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS VI\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",136],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 12,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6674\"]]");
    p = add_epsg_def_ex (filter, first, last, 6675, "epsg", 6675,
        "JGD2011 / Japan Plane Rectangular CS VII", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS VII\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",36],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",137.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"6675\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_33.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
....
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
....
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
....
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185

3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
....
3385
3386
3387
3388
3389
3390
3391







































3392
3393



































3394


3395

















































3396
3397
3398
3399
3400


3401

















3402












3403






3404
3405
3406

3407
3408
3409
3410
3411

3412
3413


3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431

3432
3433

3434


3435
3436
3437
3438
3439
3440
3441
3442
3443

3444
3445
3446
3447
3448

3449
3450
3451
3452
3453
3454
3455
3456
3457
3458































































































































3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_33 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 6661, "epsg", 6661,
        "NAD83(CSRS) / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 18N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 18N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-75],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2959\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 6662, "epsg", 6662,
        "NAD83(CSRS) / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 19N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 19N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-69],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2960\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 6663, "epsg", 6663,
        "NAD83(CSRS) / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 20N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 20N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-63],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2961\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 6664, "epsg", 6664,
        "NAD83(CSRS) / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 21N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 21N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-57],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"2962\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 6665, "epsg", 6665,
        "NAD83(CSRS) / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD83(CSRS) / UTM zone 22N + CGVD2013 height\"");
    add_srs_wkt (p, 1,
        ",PROJCS[\"NAD83(CSRS) / UTM zone 22N\",GEOGCS[\"NAD83(CS");
    add_srs_wkt (p, 2,
        "RS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",-51],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 14,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"3761\"]],VERT_CS[\"CG");
    add_srs_wkt (p, 15,
        "VD2013 height\",VERT_DATUM[\"Canadian Geodetic Vertical ");
    add_srs_wkt (p, 16,
        "Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[");
    add_srs_wkt (p, 17,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"6647\"]],AUTHORITY[\"EPSG\",\"666");
    add_srs_wkt (p, 19,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 6668, "epsg", 6668,
        "JGD2011", 1, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 2,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 4,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 5,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"6668\"]]");
    p = add_epsg_def_ex (filter, first, last, 6669, "epsg", 6669,
        "JGD2011 / Japan Plane Rectangular CS I", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS I\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",33],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",129.5],PARAMETER[\"scale_factor\",0.9999],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6669\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6670, "epsg", 6670,
        "JGD2011 / Japan Plane Rectangular CS II", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS II\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",33],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",131],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 12,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6670\"]]");
    p = add_epsg_def_ex (filter, first, last, 6671, "epsg", 6671,
        "JGD2011 / Japan Plane Rectangular CS III", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS III\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",36],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",132.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"6671\"]]");
    p = add_epsg_def_ex (filter, first, last, 6672, "epsg", 6672,
        "JGD2011 / Japan Plane Rectangular CS IV", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS IV\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",33],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",133.5],PARAMETER[\"scale_factor\",0.9999],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6672\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6673, "epsg", 6673,
        "JGD2011 / Japan Plane Rectangular CS V", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS V\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",134.3333333333333],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",0],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"6673\"]]");
    p = add_epsg_def_ex (filter, first, last, 6674, "epsg", 6674,
        "JGD2011 / Japan Plane Rectangular CS VI", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS VI\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",136],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 12,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"6674\"]]");
    p = add_epsg_def_ex (filter, first, last, 6675, "epsg", 6675,
        "JGD2011 / Japan Plane Rectangular CS VII", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JGD2011 / Japan Plane Rectangular CS VII\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"JGD2011\",DATUM[\"Japanese_Geodetic_Datum_2011\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1128\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"6668\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",36],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",137.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"6675\"]]");
    p = add_epsg_def_ex (filter, first, last, 6676, "epsg", 6676,
        "JGD2011 / Japan Plane Rectangular CS VIII", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0");
................................................................................
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6706\"]]");
    p = add_epsg_def_ex (filter, first, last, 6707, "epsg", 6707,
        "RDN2008 / UTM zone 32N (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / UTM zone 32N (N-E)\",GEOGCS[\"RDN2008");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",9],PARAMETER[\"scale_factor\",0.999");
    add_srs_wkt (p, 10,
        "6],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"6707\"]]");
    p = add_epsg_def_ex (filter, first, last, 6708, "epsg", 6708,
        "RDN2008 / UTM zone 33N (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / UTM zone 33N (N-E)\",GEOGCS[\"RDN2008");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",15],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"6708\"]]");
    p = add_epsg_def_ex (filter, first, last, 6709, "epsg", 6709,
        "RDN2008 / UTM zone 34N (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / UTM zone 34N (N-E)\",GEOGCS[\"RDN2008");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",21],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"6709\"]]");
    p = add_epsg_def_ex (filter, first, last, 6720, "epsg", 6720,
        "WGS 84 / CIG92", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105.625 +k=1.000024 +x_0=500");
................................................................................
    add_srs_wkt (p, 11,
        "northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"6723\"]]");
    p = add_epsg_def_ex (filter, first, last, 6732, "epsg", 6732,
        "GDA94 / MGA zone 41 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 41 (deprecated)\",GEOGCS[\"GDA");
    add_srs_wkt (p, 1,
        "94\",DATUM[\"Geocentric_Datum_of_Australia_1994\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6283\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",63],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"6732\"]]");
    p = add_epsg_def_ex (filter, first, last, 6733, "epsg", 6733,
        "GDA94 / MGA zone 42 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 42 (deprecated)\",GEOGCS[\"GDA");
    add_srs_wkt (p, 1,
        "94\",DATUM[\"Geocentric_Datum_of_Australia_1994\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6283\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",69],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"6733\"]]");
    p = add_epsg_def_ex (filter, first, last, 6734, "epsg", 6734,
        "GDA94 / MGA zone 43 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 43 (deprecated)\",GEOGCS[\"GDA");
    add_srs_wkt (p, 1,
        "94\",DATUM[\"Geocentric_Datum_of_Australia_1994\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6283\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",75],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"6734\"]]");
    p = add_epsg_def_ex (filter, first, last, 6735, "epsg", 6735,
        "GDA94 / MGA zone 44 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 44 (deprecated)\",GEOGCS[\"GDA");
    add_srs_wkt (p, 1,
        "94\",DATUM[\"Geocentric_Datum_of_Australia_1994\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6283\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",81],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"6735\"]]");
    p = add_epsg_def_ex (filter, first, last, 6736, "epsg", 6736,
        "GDA94 / MGA zone 46", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=GRS80 +towgs84=0,0,0,0,");
................................................................................
        "TY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 6,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]]");
    p = add_epsg_def_ex (filter, first, last, 6784, "epsg", 6784,
        "NAD83(CORS96) / Oregon Baker zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-117.8333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0016 +x_0=40000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Baker zone (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_R");
    add_srs_wkt (p, 2,
        "eference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",44.5],PARAMETER[\"central_meridian\",-117.8333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1.00016],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",40000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6784\"]]");
    p = add_epsg_def_ex (filter, first, last, 6785, "epsg", 6785,
        "NAD83(CORS96) / Oregon Baker zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-117.8333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0016 +x_0=39999.99999984 +y_0=0 +ellps=GRS80 +units=ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Baker zone (ft)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_");
    add_srs_wkt (p, 2,
        "Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",44.5],PARAMETER[\"central_meridian\",-117.8333333333");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"scale_factor\",1.00016],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",131233.5958],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"678");
    add_srs_wkt (p, 14,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 6786, "epsg", 6786,
        "NAD83(2011) / Oregon Baker zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-117.8333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0016 +x_0=40000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Baker zone (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.5],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-117.8333333333333],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.00016],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",40000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"6786\"]]");
    p = add_epsg_def_ex (filter, first, last, 6787, "epsg", 6787,
        "NAD83(2011) / Oregon Baker zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-117.8333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0016 +x_0=39999.99999984 +y_0=0 +ellps=GRS80 +units=ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Baker zone (ft)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.5],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-117.8333333333333],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.00016],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",131233.5958],PARAMETER[\"false_northing\",0],UNIT[\"foo");
    add_srs_wkt (p, 12,
        "t\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6787\"]]");
    p = add_epsg_def_ex (filter, first, last, 6788, "epsg", 6788,
        "NAD83(CORS96) / Oregon Bend-Klamath Falls zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-121.75 +k=1.0002 +x_0=8");
    add_proj4text (p, 1,
        "0000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Bend-Klamath Falls zone ");
    add_srs_wkt (p, 1,
        "(m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuousl");
    add_srs_wkt (p, 2,
        "y_Operating_Reference_Station_1996\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 3,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",41.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "21.75],PARAMETER[\"scale_factor\",1.0002],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",80000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6788\"]]");
    p = add_epsg_def_ex (filter, first, last, 6789, "epsg", 6789,
        "NAD83(CORS96) / Oregon Bend-Klamath Falls zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-121.75 +k=1.0002 +x_0=7");
    add_proj4text (p, 1,
        "9999.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Bend-Klamath Falls zone ");
    add_srs_wkt (p, 1,
        "(ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuous");
    add_srs_wkt (p, 2,
        "ly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 3,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",41.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "21.75],PARAMETER[\"scale_factor\",1.0002],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",262467.1916],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"67");
    add_srs_wkt (p, 14,
        "89\"]]");
    p = add_epsg_def_ex (filter, first, last, 6790, "epsg", 6790,
        "NAD83(2011) / Oregon Bend-Klamath Falls zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-121.75 +k=1.0002 +x_0=8");
    add_proj4text (p, 1,
        "0000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Bend-Klamath Falls zone (m");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",41.75],PARAMETER[\"central_meridian\",-121.75],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.0002],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",80000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"6790\"]]");
    p = add_epsg_def_ex (filter, first, last, 6791, "epsg", 6791,
        "NAD83(2011) / Oregon Bend-Klamath Falls zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-121.75 +k=1.0002 +x_0=7");
    add_proj4text (p, 1,
        "9999.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Bend-Klamath Falls zone (f");
    add_srs_wkt (p, 1,
        "t)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",41.75],PARAMETER[\"central_meridian\",-121.75],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.0002],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",262467.1916],PARAMETER[\"false_northing\",0],UNIT[\"f");
    add_srs_wkt (p, 12,
        "oot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6791\"]]");
    p = add_epsg_def_ex (filter, first, last, 6792, "epsg", 6792,
        "NAD83(CORS96) / Oregon Bend-Redmond-Prineville zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.66666666666666 +lat_0=44.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-121.25 +k_0=1.00012 +x_0=80000 +y_0=130000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Bend-Redmond-Prineville ");
    add_srs_wkt (p, 1,
        "zone (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Contin");
    add_srs_wkt (p, 2,
        "uously_Operating_Reference_Station_1996\",SPHEROID[\"GRS");
    add_srs_wkt (p, 3,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"67");
    add_srs_wkt (p, 8,
        "83\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",44.66666666666666],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",-121.25],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1.00012],PARAMETER[\"false_easting\",80000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",130000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"6792\"]]");
    p = add_epsg_def_ex (filter, first, last, 6793, "epsg", 6793,
        "NAD83(CORS96) / Oregon Bend-Redmond-Prineville zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.66666666666666 +lat_0=44.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-121.25 +k_0=1.00012 +x_0=79999.99999968 +y_0");
    add_proj4text (p, 2,
        "=130000.00001472 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Bend-Redmond-Prineville ");
    add_srs_wkt (p, 1,
        "zone (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Conti");
    add_srs_wkt (p, 2,
        "nuously_Operating_Reference_Station_1996\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "6783\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",44.66666666666666],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",-121.25],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 11,
        "r\",1.00012],PARAMETER[\"false_easting\",262467.1916],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_northing\",426509.1864],UNIT[\"foot\",0.");
    add_srs_wkt (p, 13,
        "3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6793\"]]");
    p = add_epsg_def_ex (filter, first, last, 6794, "epsg", 6794,
        "NAD83(2011) / Oregon Bend-Redmond-Prineville zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.66666666666666 +lat_0=44.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-121.25 +k_0=1.00012 +x_0=80000 +y_0=130000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Bend-Redmond-Prineville zo");
    add_srs_wkt (p, 1,
        "ne (m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_S");
    add_srs_wkt (p, 2,
        "patial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 3,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",44.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",-121.25],PARAMETER[\"scale_factor\",1.00012]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",80000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",130000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6794\"]]");
    p = add_epsg_def_ex (filter, first, last, 6795, "epsg", 6795,
        "NAD83(2011) / Oregon Bend-Redmond-Prineville zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.66666666666666 +lat_0=44.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-121.25 +k_0=1.00012 +x_0=79999.99999968 +y_0");
    add_proj4text (p, 2,
        "=130000.00001472 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Bend-Redmond-Prineville zo");
    add_srs_wkt (p, 1,
        "ne (ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_");
    add_srs_wkt (p, 2,
        "Spatial_Reference_System_2011\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 3,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",44.66666666666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",-121.25],PARAMETER[\"scale_factor\",1.00012");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",262467.1916],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",426509.1864],UNIT[\"foot\",0.3048,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"6795\"]]");
    p = add_epsg_def_ex (filter, first, last, 6796, "epsg", 6796,
        "NAD83(CORS96) / Oregon Bend-Burns zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.66666666666666 +lat_0=43.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-119.75 +k_0=1.0002 +x_0=120000 +y_0=60000 +e");
    add_proj4text (p, 2,
        "llps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Bend-Burns zone (m)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operat");
    add_srs_wkt (p, 2,
        "ing_Reference_Station_1996\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",43.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-119.75],PARAMETER[\"scale_factor\",1.0002],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",120000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",60000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"6796\"]]");
    p = add_epsg_def_ex (filter, first, last, 6797, "epsg", 6797,
        "NAD83(CORS96) / Oregon Bend-Burns zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.66666666666666 +lat_0=43.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-119.75 +k_0=1.0002 +x_0=119999.99999952 +y_0");
    add_proj4text (p, 2,
        "=59999.99999976 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Bend-Burns zone (ft)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Opera");
    add_srs_wkt (p, 2,
        "ting_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",43.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-119.75],PARAMETER[\"scale_factor\",1.0002],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",393700.7874],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",196850.3937],UNIT[\"foot\",0.3048,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"6797\"]]");
    p = add_epsg_def_ex (filter, first, last, 6798, "epsg", 6798,
        "NAD83(2011) / Oregon Bend-Burns zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.66666666666666 +lat_0=43.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-119.75 +k_0=1.0002 +x_0=120000 +y_0=60000 +e");
    add_proj4text (p, 2,
        "llps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Bend-Burns zone (m)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 8,
        "ert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",43.66666666666666],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "19.75],PARAMETER[\"scale_factor\",1.0002],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",120000],PARAMETER[\"false_northing\",60000");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6798\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6799, "epsg", 6799,
        "NAD83(2011) / Oregon Bend-Burns zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.66666666666666 +lat_0=43.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-119.75 +k_0=1.0002 +x_0=119999.99999952 +y_0");
    add_proj4text (p, 2,
        "=59999.99999976 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Bend-Burns zone (ft)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 9,
        "gin\",43.66666666666666],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "-119.75],PARAMETER[\"scale_factor\",1.0002],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",393700.7874],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",196850.3937],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6799\"]]");
    p = add_epsg_def_ex (filter, first, last, 6800, "epsg", 6800,
        "NAD83(CORS96) / Oregon Canyonville-Grants Pass zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-123.3333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0007 +x_0=40000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Canyonville-Grants Pass ");
    add_srs_wkt (p, 1,
        "zone (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Contin");
    add_srs_wkt (p, 2,
        "uously_Operating_Reference_Station_1996\",SPHEROID[\"GRS");
    add_srs_wkt (p, 3,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"67");
    add_srs_wkt (p, 8,
        "83\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",42.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-123.3333333333333],PARAMETER[\"scale_factor\",1.00007]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",40000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"6800\"]]");
    p = add_epsg_def_ex (filter, first, last, 6801, "epsg", 6801,
        "NAD83(CORS96) / Oregon Canyonville-Grants Pass zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-123.3333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0007 +x_0=39999.99999984 +y_0=0 +ellps=GRS80 +units=ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Canyonville-Grants Pass ");
    add_srs_wkt (p, 1,
        "zone (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Conti");
    add_srs_wkt (p, 2,
        "nuously_Operating_Reference_Station_1996\",SPHEROID[\"GR");
    add_srs_wkt (p, 3,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 4,
        "\"]],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "6783\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",42.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-123.3333333333333],PARAMETER[\"scale_factor\",1.00007]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",131233.5958],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"6801\"]]");
    p = add_epsg_def_ex (filter, first, last, 6802, "epsg", 6802,
        "NAD83(2011) / Oregon Canyonville-Grants Pass zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-123.3333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0007 +x_0=40000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Canyonville-Grants Pass zo");
    add_srs_wkt (p, 1,
        "ne (m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_S");
    add_srs_wkt (p, 2,
        "patial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 3,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",42.5],PARAMETER[\"central_meridian\",-123.3333");
    add_srs_wkt (p, 10,
        "333333333],PARAMETER[\"scale_factor\",1.00007],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",40000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6802\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6803, "epsg", 6803,
        "NAD83(2011) / Oregon Canyonville-Grants Pass zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-123.3333333333333 +k=1.0");
    add_proj4text (p, 1,
        "0007 +x_0=39999.99999984 +y_0=0 +ellps=GRS80 +units=ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Canyonville-Grants Pass zo");
    add_srs_wkt (p, 1,
        "ne (ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_");
    add_srs_wkt (p, 2,
        "Spatial_Reference_System_2011\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 3,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",42.5],PARAMETER[\"central_meridian\",-123.333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1.00007],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",131233.5958],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"6803\"]]");
    p = add_epsg_def_ex (filter, first, last, 6804, "epsg", 6804,
        "NAD83(CORS96) / Oregon Columbia River East zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.66666666666666 +lat_0=45.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-120.5 +k_0=1.000008 +x_0=150000 +y_0=30000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Columbia River East zone");
    add_srs_wkt (p, 1,
        " (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuous");
    add_srs_wkt (p, 2,
        "ly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 3,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"latitude_of_origin\",45.66666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 10,
        "entral_meridian\",-120.5],PARAMETER[\"scale_factor\",1.0");
    add_srs_wkt (p, 11,
        "00008],PARAMETER[\"false_easting\",150000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",30000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"6804\"]]");
    p = add_epsg_def_ex (filter, first, last, 6805, "epsg", 6805,
        "NAD83(CORS96) / Oregon Columbia River East zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.66666666666666 +lat_0=45.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-120.5 +k_0=1.000008 +x_0=150000.00001464 +y_");
    add_proj4text (p, 2,
        "0=30000.00001512 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Columbia River East zone");
    add_srs_wkt (p, 1,
        " (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuou");
    add_srs_wkt (p, 2,
        "sly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"latitude_of_origin\",45.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",-120.5],PARAMETER[\"scale_factor\",1.");
    add_srs_wkt (p, 11,
        "000008],PARAMETER[\"false_easting\",492125.9843],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",98425.1969],UNIT[\"foot\",0.3048,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"6805\"]]");
    p = add_epsg_def_ex (filter, first, last, 6806, "epsg", 6806,
        "NAD83(2011) / Oregon Columbia River East zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.66666666666666 +lat_0=45.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-120.5 +k_0=1.000008 +x_0=150000 +y_0=30000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Columbia River East zone (");
    add_srs_wkt (p, 1,
        "m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",45.66666666666666],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",-120.5],PARAMETER[\"scale_factor\",1.000008],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",150000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",30000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"6806\"]]");
    p = add_epsg_def_ex (filter, first, last, 6807, "epsg", 6807,
        "NAD83(2011) / Oregon Columbia River East zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.66666666666666 +lat_0=45.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-120.5 +k_0=1.000008 +x_0=150000.00001464 +y_");
    add_proj4text (p, 2,
        "0=30000.00001512 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Columbia River East zone (");
    add_srs_wkt (p, 1,
        "ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spat");
    add_srs_wkt (p, 2,
        "ial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",45.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",-120.5],PARAMETER[\"scale_factor\",1.000008],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",492125.9843],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",98425.1969],UNIT[\"foot\",0.3048,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"6807\"]]");
    p = add_epsg_def_ex (filter, first, last, 6808, "epsg", 6808,
        "NAD83(CORS96) / Oregon Columbia River West zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Hotine_Oblique_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=45.91666666666666 +lonc=-123 +alpha=2");
    add_proj4text (p, 1,
        "95 +k=1 +x_0=7000000 +y_0=-3000000 +no_uoff +gamma=295 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Columbia River West zone");
    add_srs_wkt (p, 1,
        " (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuous");
    add_srs_wkt (p, 2,
        "ly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 3,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Hotine_Oblique_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_center\",45.91666666666666],PARAMETER[\"longi");
    add_srs_wkt (p, 10,
        "tude_of_center\",-123],PARAMETER[\"azimuth\",295],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"rectified_grid_angle\",295],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 12,
        "or\",1],PARAMETER[\"false_easting\",7000000],PARAMETER[\"");
    add_srs_wkt (p, 13,
        "false_northing\",-3000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"6808\"]]");
    p = add_epsg_def_ex (filter, first, last, 6809, "epsg", 6809,
        "NAD83(CORS96) / Oregon Columbia River West zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Hotine_Oblique_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=45.91666666666666 +lonc=-123 +alpha=2");
    add_proj4text (p, 1,
        "95 +k=1 +x_0=7000000.00000248 +y_0=-2999999.999988 +no_u");
    add_proj4text (p, 2,
        "off +gamma=295 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Columbia River West zone");
    add_srs_wkt (p, 1,
        " (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuou");
    add_srs_wkt (p, 2,
        "sly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Hotine_Oblique_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_center\",45.91666666666666],PARAMETER[\"long");
    add_srs_wkt (p, 10,
        "itude_of_center\",-123],PARAMETER[\"azimuth\",295],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"rectified_grid_angle\",295],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 12,
        "tor\",1],PARAMETER[\"false_easting\",22965879.2651],PARA");
    add_srs_wkt (p, 13,
        "METER[\"false_northing\",-9842519.685],UNIT[\"foot\",0.3");
    add_srs_wkt (p, 14,
        "048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 15,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6809\"]]");
    p = add_epsg_def_ex (filter, first, last, 6810, "epsg", 6810,
        "NAD83(2011) / Oregon Columbia River West zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Hotine_Oblique_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=45.91666666666666 +lonc=-123 +alpha=2");
    add_proj4text (p, 1,
        "95 +k=1 +x_0=7000000 +y_0=-3000000 +no_uoff +gamma=295 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Columbia River West zone (");
    add_srs_wkt (p, 1,
        "m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Hotine_Oblique_Mercator\"],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 9,
        "center\",45.91666666666666],PARAMETER[\"longitude_of_cen");
    add_srs_wkt (p, 10,
        "ter\",-123],PARAMETER[\"azimuth\",295],PARAMETER[\"recti");
    add_srs_wkt (p, 11,
        "fied_grid_angle\",295],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_easting\",7000000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 13,
        "hing\",-3000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"6810\"]]");
    p = add_epsg_def_ex (filter, first, last, 6811, "epsg", 6811,
        "NAD83(2011) / Oregon Columbia River West zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Hotine_Oblique_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=45.91666666666666 +lonc=-123 +alpha=2");
    add_proj4text (p, 1,
        "95 +k=1 +x_0=7000000.00000248 +y_0=-2999999.999988 +no_u");
    add_proj4text (p, 2,
        "off +gamma=295 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Columbia River West zone (");
    add_srs_wkt (p, 1,
        "ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spat");
    add_srs_wkt (p, 2,
        "ial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Hotine_Oblique_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_center\",45.91666666666666],PARAMETER[\"longitude_of_c");
    add_srs_wkt (p, 10,
        "enter\",-123],PARAMETER[\"azimuth\",295],PARAMETER[\"rec");
    add_srs_wkt (p, 11,
        "tified_grid_angle\",295],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",22965879.2651],PARAMETER[\"fa");
    add_srs_wkt (p, 13,
        "lse_northing\",-9842519.685],UNIT[\"foot\",0.3048,AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 15,
        "H],AUTHORITY[\"EPSG\",\"6811\"]]");
    p = add_epsg_def_ex (filter, first, last, 6812, "epsg", 6812,
        "NAD83(CORS96) / Oregon Cottage Grove-Canyonville zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-123.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000023 +x_0=50000 +y_0=0 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Cottage Grove-Canyonvill");
    add_srs_wkt (p, 1,
        "e zone (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Cont");
    add_srs_wkt (p, 2,
        "inuously_Operating_Reference_Station_1996\",SPHEROID[\"G");
    add_srs_wkt (p, 3,
        "RS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"701");
    add_srs_wkt (p, 4,
        "9\"]],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "6783\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",42.83333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",-123.3333333333333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1.000023],PARAMETER[\"false_easting\",50000],PARAM");
    add_srs_wkt (p, 12,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"6812\"]]");
    p = add_epsg_def_ex (filter, first, last, 6813, "epsg", 6813,
        "NAD83(CORS96) / Oregon Cottage Grove-Canyonville zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-123.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000023 +x_0=50000.00001504 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Cottage Grove-Canyonvill");
    add_srs_wkt (p, 1,
        "e zone (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Con");
    add_srs_wkt (p, 2,
        "tinuously_Operating_Reference_Station_1996\",SPHEROID[\"");
    add_srs_wkt (p, 3,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 4,
        "19\"]],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "6783\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",42.83333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",-123.3333333333333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1.000023],PARAMETER[\"false_easting\",164041.9948]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"6813\"]]");
    p = add_epsg_def_ex (filter, first, last, 6814, "epsg", 6814,
        "NAD83(2011) / Oregon Cottage Grove-Canyonville zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-123.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000023 +x_0=50000 +y_0=0 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Cottage Grove-Canyonville ");
    add_srs_wkt (p, 1,
        "zone (m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National");
    add_srs_wkt (p, 2,
        "_Spatial_Reference_System_2011\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 3,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",42.83333333333334],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",-123.3333333333333],PARAMETER[\"scale_factor\",1.0");
    add_srs_wkt (p, 11,
        "00023],PARAMETER[\"false_easting\",50000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6814\"]]");
    p = add_epsg_def_ex (filter, first, last, 6815, "epsg", 6815,
        "NAD83(2011) / Oregon Cottage Grove-Canyonville zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-123.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000023 +x_0=50000.00001504 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Cottage Grove-Canyonville ");
    add_srs_wkt (p, 1,
        "zone (ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_Nationa");
    add_srs_wkt (p, 2,
        "l_Spatial_Reference_System_2011\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 3,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",42.83333333333334],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",-123.3333333333333],PARAMETER[\"scale_factor\",1.");
    add_srs_wkt (p, 11,
        "000023],PARAMETER[\"false_easting\",164041.9948],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"6815\"]]");
    p = add_epsg_def_ex (filter, first, last, 6816, "epsg", 6816,
        "NAD83(CORS96) / Oregon Dufur-Madras zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-121 +k=1.00011 +x_0=8000");

    add_proj4text (p, 1,
        "0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Dufur-Madras zone (m)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Oper");
    add_srs_wkt (p, 2,
        "ating_Reference_Station_1996\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 3,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",44.5],PARAMETER[\"central_meridian\",-121],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1.00011],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",80000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6816\"]]");
    p = add_epsg_def_ex (filter, first, last, 6817, "epsg", 6817,
        "NAD83(CORS96) / Oregon Dufur-Madras zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-121 +k=1.00011 +x_0=7999");
    add_proj4text (p, 1,
        "9.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Dufur-Madras zone (ft)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Ope");
    add_srs_wkt (p, 2,
        "rating_Reference_Station_1996\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 3,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",44.5],PARAMETER[\"central_meridian\",-121],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1.00011],PARAMETER[\"false_east");
    add_srs_wkt (p, 11,
        "ing\",262467.1916],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 12,
        "\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6817\"]]");
    p = add_epsg_def_ex (filter, first, last, 6818, "epsg", 6818,
        "NAD83(2011) / Oregon Dufur-Madras zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-121 +k=1.00011 +x_0=8000");
    add_proj4text (p, 1,
        "0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Dufur-Madras zone (m)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        "4.5],PARAMETER[\"central_meridian\",-121],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1.00011],PARAMETER[\"false_easting\",80000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"6818\"]]");
    p = add_epsg_def_ex (filter, first, last, 6819, "epsg", 6819,
        "NAD83(2011) / Oregon Dufur-Madras zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.5 +lon_0=-121 +k=1.00011 +x_0=7999");
    add_proj4text (p, 1,
        "9.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Dufur-Madras zone (ft)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Ref");
    add_srs_wkt (p, 2,
        "erence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2");
    add_srs_wkt (p, 3,
        "57222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        "4.5],PARAMETER[\"central_meridian\",-121],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1.00011],PARAMETER[\"false_easting\",262467");
    add_srs_wkt (p, 11,
        ".1916],PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3");
    add_srs_wkt (p, 12,
        "048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6819\"]]");
    p = add_epsg_def_ex (filter, first, last, 6820, "epsg", 6820,
        "NAD83(CORS96) / Oregon Eugene zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.75 +lon_0=-123.1666666666667 +k=1.");
    add_proj4text (p, 1,
        "000015 +x_0=50000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Eugene zone (m)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_");
    add_srs_wkt (p, 2,
        "Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",43.75],PARAMETER[\"central_meridian\",-123.166666666");
    add_srs_wkt (p, 10,
        "6667],PARAMETER[\"scale_factor\",1.000015],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",50000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6820\"]]");
    p = add_epsg_def_ex (filter, first, last, 6821, "epsg", 6821,
        "NAD83(CORS96) / Oregon Eugene zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.75 +lon_0=-123.1666666666667 +k=1.");
    add_proj4text (p, 1,
        "000015 +x_0=50000.00001504 +y_0=0 +ellps=GRS80 +units=ft");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Eugene zone (ft)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating");
    add_srs_wkt (p, 2,
        "_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTI");
    add_srs_wkt (p, 8,







































        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,



































        "in\",43.75],PARAMETER[\"central_meridian\",-123.16666666");


    add_srs_wkt (p, 10,

















































        "66667],PARAMETER[\"scale_factor\",1.000015],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",164041.9948],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],A");


    add_srs_wkt (p, 13,

















        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6");












    add_srs_wkt (p, 14,






        "821\"]]");
    p = add_epsg_def_ex (filter, first, last, 6822, "epsg", 6822,
        "NAD83(2011) / Oregon Eugene zone (m)", 0, 0,

        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.75 +lon_0=-123.1666666666667 +k=1.");

    add_proj4text (p, 1,
        "000015 +x_0=50000 +y_0=0 +ellps=GRS80 +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Eugene zone (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",43.75],P");

    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-123.1666666666667],PARAME");

    add_srs_wkt (p, 10,


        "TER[\"scale_factor\",1.000015],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",50000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"6822\"]]");
    p = add_epsg_def_ex (filter, first, last, 6823, "epsg", 6823,
        "NAD83(2011) / Oregon Eugene zone (ft)", 0, 0,

        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.75 +lon_0=-123.1666666666667 +k=1.");

    add_proj4text (p, 1,
        "000015 +x_0=50000.00001504 +y_0=0 +ellps=GRS80 +units=ft");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Eugene zone (ft)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");































































































































    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.75],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-123.1666666666667],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1.000015],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",164041.9948],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6823\"]]");
    p = add_epsg_def_ex (filter, first, last, 6824, "epsg", 6824,
        "NAD83(CORS96) / Oregon Grants Pass-Ashland zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-123.3333333333333 +k=1.");
    add_proj4text (p, 1,
        "000043 +x_0=50000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Grants Pass-Ashland zone");
    add_srs_wkt (p, 1,
        " (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuous");
    add_srs_wkt (p, 2,
        "ly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 3,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",41.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "23.3333333333333],PARAMETER[\"scale_factor\",1.000043],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",50000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "6824\"]]");
    p = add_epsg_def_ex (filter, first, last, 6825, "epsg", 6825,
        "NAD83(CORS96) / Oregon Grants Pass-Ashland zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-123.3333333333333 +k=1.");
    add_proj4text (p, 1,
        "000043 +x_0=50000.00001504 +y_0=0 +ellps=GRS80 +units=ft");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Grants Pass-Ashland zone");
    add_srs_wkt (p, 1,
        " (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuou");
    add_srs_wkt (p, 2,
        "sly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",41.75],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "-123.3333333333333],PARAMETER[\"scale_factor\",1.000043]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",164041.9948],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"6825\"]]");
    p = add_epsg_def_ex (filter, first, last, 6826, "epsg", 6826,
        "NAD83(2011) / Oregon Grants Pass-Ashland zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-123.3333333333333 +k=1.");
    add_proj4text (p, 1,
        "000043 +x_0=50000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Grants Pass-Ashland zone (");
    add_srs_wkt (p, 1,
        "m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",41.75],PARAMETER[\"central_meridian\",-123.33333333");
    add_srs_wkt (p, 10,
        "33333],PARAMETER[\"scale_factor\",1.000043],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",50000],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6826\"]]");
    p = add_epsg_def_ex (filter, first, last, 6827, "epsg", 6827,
        "NAD83(2011) / Oregon Grants Pass-Ashland zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.75 +lon_0=-123.3333333333333 +k=1.");
    add_proj4text (p, 1,
        "000043 +x_0=50000.00001504 +y_0=0 +ellps=GRS80 +units=ft");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Grants Pass-Ashland zone (");
    add_srs_wkt (p, 1,
        "ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spat");
    add_srs_wkt (p, 2,
        "ial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",41.75],PARAMETER[\"central_meridian\",-123.333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"scale_factor\",1.000043],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",164041.9948],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"6827\"]]");
    p = add_epsg_def_ex (filter, first, last, 6828, "epsg", 6828,
        "NAD83(CORS96) / Oregon Gresham-Warm Springs zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-122.3333333333333 +k=1.000");
    add_proj4text (p, 1,
        "05 +x_0=10000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Gresham-Warm Springs zon");
    add_srs_wkt (p, 1,
        "e (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuou");
    add_srs_wkt (p, 2,
        "sly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",45],PARAMETER[\"central_meridian\",-12");
    add_srs_wkt (p, 10,
        "2.3333333333333],PARAMETER[\"scale_factor\",1.00005],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",10000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 14,
        "828\"]]");
    p = add_epsg_def_ex (filter, first, last, 6829, "epsg", 6829,
        "NAD83(CORS96) / Oregon Gresham-Warm Springs zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-122.3333333333333 +k=1.000");
    add_proj4text (p, 1,
        "05 +x_0=10000.0000152 +y_0=0 +ellps=GRS80 +units=ft +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Gresham-Warm Springs zon");
    add_srs_wkt (p, 1,
        "e (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuo");
    add_srs_wkt (p, 2,
        "usly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 1");
    add_srs_wkt (p, 3,
        "980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"678");
    add_srs_wkt (p, 8,
        "3\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",45],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "22.3333333333333],PARAMETER[\"scale_factor\",1.00005],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",32808.399],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6829\"]]");
    p = add_epsg_def_ex (filter, first, last, 6830, "epsg", 6830,
        "NAD83(2011) / Oregon Gresham-Warm Springs zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-122.3333333333333 +k=1.000");
    add_proj4text (p, 1,
        "05 +x_0=10000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Gresham-Warm Springs zone ");
    add_srs_wkt (p, 1,
        "(m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spat");
    add_srs_wkt (p, 2,
        "ial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",45],PARAMETER[\"central_meridian\",-122.333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"scale_factor\",1.00005],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",10000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6830\"]]");
    p = add_epsg_def_ex (filter, first, last, 6831, "epsg", 6831,
        "NAD83(2011) / Oregon Gresham-Warm Springs zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-122.3333333333333 +k=1.000");
    add_proj4text (p, 1,
        "05 +x_0=10000.0000152 +y_0=0 +ellps=GRS80 +units=ft +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Gresham-Warm Springs zone ");
    add_srs_wkt (p, 1,
        "(ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spa");
    add_srs_wkt (p, 2,
        "tial_Reference_System_2011\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",45],PARAMETER[\"central_meridian\",-122.33333333");
    add_srs_wkt (p, 10,
        "33333],PARAMETER[\"scale_factor\",1.00005],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",32808.399],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"683");
    add_srs_wkt (p, 14,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 6832, "epsg", 6832,
        "NAD83(CORS96) / Oregon La Grande zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-118 +k=1.00013 +x_0=40000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon La Grande zone (m)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operati");
    add_srs_wkt (p, 2,
        "ng_Reference_Station_1996\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",45],PARAMETER[\"central_meridian\",-118],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1.00013],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "40000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"6832\"]]");
    p = add_epsg_def_ex (filter, first, last, 6833, "epsg", 6833,
        "NAD83(CORS96) / Oregon La Grande zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-118 +k=1.00013 +x_0=39999.");
    add_proj4text (p, 1,
        "99999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon La Grande zone (ft)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operat");
    add_srs_wkt (p, 2,
        "ing_Reference_Station_1996\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",45],PARAMETER[\"central_meridian\",-118],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.00013],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",131233.5958],PARAMETER[\"false_northing\",0],UNIT[\"foo");
    add_srs_wkt (p, 12,
        "t\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6833\"]]");
    p = add_epsg_def_ex (filter, first, last, 6834, "epsg", 6834,
        "NAD83(2011) / Oregon La Grande zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-118 +k=1.00013 +x_0=40000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon La Grande zone (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-118],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.00013],PARAMETER[\"false_easting\",40000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6834\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|








|

|

|

|

|

|

|

|

|

|

|

|

|

|

|








|

|

|

|

|

|

|

|

|

|

|

|

|

|

|








|

|

|

|

|

|

|

|

|

|

|

|

|

|







 







|








|

|

|

|

|

|

|

|

|

|

|

|

|

|

|








|

|

|

|

|

|

|

|

|

|

|

|

|

|

|








|

|

|

|

|

|

|

|

|

|

|

|

|

|

|








|

|

|

|

|

|

|

|

|

|

|

|

|

|







 







|
|

|


|

|

|

|

|

|

|

|

|

|

|

|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|


<
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
|
|
<
>

|


<
>

|
>
>

|

|

|

|

|

|

|

|

<
>

<
>

>
>
|
|
|
|
|
|
|
|
<
>

|


<
>

|

|

|

|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|



|

|

|

|

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56









































































































































































































































































































































































































































































































































57
58
59
60
61
62
63
...
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
....
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
....
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
























































































































































1392


1393






























































































































































































































































































































































































































































































1394
1395


















































































































































































































































































































































































































































































































1396
1397
1398
1399
1400
1401



























































































































1402
1403
1404
1405
1406

1407
1408





































1409




















































































































































1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
....
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604

1605
1606
1607
1608
1609

1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631

1632
1633

1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645

1646
1647
1648
1649
1650

1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041










































































4042
4043
4044
4045
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_33 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;









































































































































































































































































































































































































































































































































    p = add_epsg_def_ex (filter, first, last, 6676, "epsg", 6676,
        "JGD2011 / Japan Plane Rectangular CS VIII", 0, 1,
        "GRS 1980", "Greenwich",
        "Japanese_Geodetic_Datum_2011", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0");
................................................................................
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6706\"]]");
    p = add_epsg_def_ex (filter, first, last, 6707, "epsg", 6707,
        "RDN2008 / TM32", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / TM32\",GEOGCS[\"RDN2008\",DATUM[\"Ret");
    add_srs_wkt (p, 1,
        "e_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"6707\"]]");
    p = add_epsg_def_ex (filter, first, last, 6708, "epsg", 6708,
        "RDN2008 / TM33", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / TM33\",GEOGCS[\"RDN2008\",DATUM[\"Ret");
    add_srs_wkt (p, 1,
        "e_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",15],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"6708\"]]");
    p = add_epsg_def_ex (filter, first, last, 6709, "epsg", 6709,
        "RDN2008 / TM34", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / TM34\",GEOGCS[\"RDN2008\",DATUM[\"Ret");
    add_srs_wkt (p, 1,
        "e_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",21],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"6709\"]]");
    p = add_epsg_def_ex (filter, first, last, 6720, "epsg", 6720,
        "WGS 84 / CIG92", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105.625 +k=1.000024 +x_0=500");
................................................................................
    add_srs_wkt (p, 11,
        "northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"6723\"]]");
    p = add_epsg_def_ex (filter, first, last, 6732, "epsg", 6732,
        "GDA94 / MGA zone 41", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 41\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",63],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"6732\"]]");
    p = add_epsg_def_ex (filter, first, last, 6733, "epsg", 6733,
        "GDA94 / MGA zone 42", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 42\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",69],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"6733\"]]");
    p = add_epsg_def_ex (filter, first, last, 6734, "epsg", 6734,
        "GDA94 / MGA zone 43", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 43\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",75],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"6734\"]]");
    p = add_epsg_def_ex (filter, first, last, 6735, "epsg", 6735,
        "GDA94 / MGA zone 44", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 44\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",81],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"6735\"]]");
    p = add_epsg_def_ex (filter, first, last, 6736, "epsg", 6736,
        "GDA94 / MGA zone 46", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=GRS80 +towgs84=0,0,0,0,");
................................................................................
        "TY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 6,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]]");
    p = add_epsg_def_ex (filter, first, last, 6867, "epsg", 6867,
        "NAD83(CORS96) / Oregon LCC (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon LCC (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(CORS96)\",DATUM[\"NAD83_Continuously_Operating_Referenc");
    add_srs_wkt (p, 2,
        "e_Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 8,
        "ert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_1\",43],PARAMETER[\"standard_parallel_2\",45.5],PARAMET");
    add_srs_wkt (p, 10,
























































































































































        "ER[\"latitude_of_origin\",41.75],PARAMETER[\"central_mer");


    add_srs_wkt (p, 11,






























































































































































































































































































































































































































































































        "idian\",-120.5],PARAMETER[\"false_easting\",400000],PARA");
    add_srs_wkt (p, 12,


















































































































































































































































































































































































































































































































        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"6867\"]]");
    p = add_epsg_def_ex (filter, first, last, 6868, "epsg", 6868,



























































































































        "NAD83(CORS96) / Oregon GIC Lambert (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,





































        ".5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no");




















































































































































    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon GIC Lambert (ft)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating");
    add_srs_wkt (p, 2,
        "_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard");
    add_srs_wkt (p, 9,
        "_parallel_1\",43],PARAMETER[\"standard_parallel_2\",45.5");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",41.75],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-120.5],PARAMETER[\"false_easting\",131");
    add_srs_wkt (p, 12,
        "2335.958],PARAMETER[\"false_northing\",0],UNIT[\"foot\",");
    add_srs_wkt (p, 13,
        "0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6868\"]]");
    p = add_epsg_def_ex (filter, first, last, 6870, "epsg", 6870,
        "ETRS89 / Albania 2010", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=20 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / Albania 2010\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",20],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"6870\"]]");
    p = add_epsg_def_ex (filter, first, last, 6871, "epsg", 6871,
        "WGS 84 / Pseudo-Mercator", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +uni");
    add_proj4text (p, 1,
        "ts=m +geoidgrids=egm08_25.gtx +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"WGS 84 / Pseudo-Mercator +  EGM2008 geoid hei");
    add_srs_wkt (p, 1,
        "ght\",PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 2,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 3,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"M");
    add_srs_wkt (p, 8,
        "ercator_1SP\"],PARAMETER[\"central_meridian\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 12,
        "EXTENSION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +");
    add_srs_wkt (p, 13,
        "lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +n");
    add_srs_wkt (p, 14,
        "adgrids=@null +wktext  +no_defs\"],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "3857\"]],VERT_CS[\"EGM2008 geoid height\",VERT_DATUM[\"E");
    add_srs_wkt (p, 16,
        "GM2008 geoid\",2005,EXTENSION[\"PROJ4_GRIDS\",\"egm08_25");
    add_srs_wkt (p, 17,
        ".gtx\"],AUTHORITY[\"EPSG\",\"1027\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"3855\"]],AUTHORITY[\"EPSG\",\"6871\"]]");
    p = add_epsg_def_ex (filter, first, last, 6875, "epsg", 6875,
        "RDN2008 / Italy zone", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9985000000000001 +x_");
    add_proj4text (p, 1,
        "0=7000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / Italy zone\",GEOGCS[\"RDN2008\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",12],PARAMETER[\"scale_factor\",0.9985],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",7000000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"6875\"]]");
    p = add_epsg_def_ex (filter, first, last, 6876, "epsg", 6876,
        "RDN2008 / Zone 12", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=3000000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / Zone 12\",GEOGCS[\"RDN2008\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",12],PARAMETER[\"scale_factor\",1],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",3000000],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"N");
    add_srs_wkt (p, 12,
        "orthing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"6876\"]]");
    p = add_epsg_def_ex (filter, first, last, 6879, "epsg", 6879,

        "NAD83(2011) / Wisconsin Central", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Wisconsin Central\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,

        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",45.");
    add_srs_wkt (p, 9,

        "5],PARAMETER[\"standard_parallel_2\",44.25],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",43.83333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-90],PARAMETER[\"false_easting\",600000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"6879\"]]");
    p = add_epsg_def_ex (filter, first, last, 6880, "epsg", 6880,

        "NAD83(2011) / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Nebraska (ftUS)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 8,
        "mal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",43],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"standard_parallel_2\",40],PARAMETER[\"latitud");
    add_srs_wkt (p, 10,
        "e_of_origin\",39.83333333333334],PARAMETER[\"central_mer");
    add_srs_wkt (p, 11,
        "idian\",-100],PARAMETER[\"false_easting\",1640416.6667],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6880\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6884, "epsg", 6884,
        "NAD83(CORS96) / Oregon North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon North\",GEOGCS[\"NAD83(C");
    add_srs_wkt (p, 1,
        "ORS96)\",DATUM[\"NAD83_Continuously_Operating_Reference_");
    add_srs_wkt (p, 2,
        "Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "33\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",46],PARAMETER[\"standard_parallel_2\",44.33333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",43.66666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",2500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6884\"]]");
    p = add_epsg_def_ex (filter, first, last, 6885, "epsg", 6885,
        "NAD83(CORS96) / Oregon North (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon North (ft)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_Refer");
    add_srs_wkt (p, 2,
        "ence_Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",46],PARAMETER[\"standard_parallel_2\",44.3333333");
    add_srs_wkt (p, 10,
        "3333334],PARAMETER[\"latitude_of_origin\",43.66666666666");
    add_srs_wkt (p, 11,
        "666],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",8202099.738],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 13,
        ",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 15,
        "885\"]]");
    p = add_epsg_def_ex (filter, first, last, 6886, "epsg", 6886,
        "NAD83(CORS96) / Oregon South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon South\",GEOGCS[\"NAD83(C");
    add_srs_wkt (p, 1,
        "ORS96)\",DATUM[\"NAD83_Continuously_Operating_Reference_");
    add_srs_wkt (p, 2,
        "Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "33\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",44],PARAMETER[\"standard_parallel_2\",42.33333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",41.66666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",1500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6886\"]]");
    p = add_epsg_def_ex (filter, first, last, 6887, "epsg", 6887,
        "NAD83(CORS96) / Oregon South (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon South (ft)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_Refer");
    add_srs_wkt (p, 2,
        "ence_Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",44],PARAMETER[\"standard_parallel_2\",42.3333333");
    add_srs_wkt (p, 10,
        "3333334],PARAMETER[\"latitude_of_origin\",41.66666666666");
    add_srs_wkt (p, 11,
        "666],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",4921259.843],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 13,
        ",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 15,
        "887\"]]");
    p = add_epsg_def_ex (filter, first, last, 7400, "epsg", 7400,
        "NTF (Paris)", 1, 1,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "none", "grad",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,");
    add_proj4text (p, 1,
        "320,0,0,0,0 +pm=paris +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) + NGF IGN69 height\",GEOGCS[\"NTF");
    add_srs_wkt (p, 1,
        " (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Pari");
    add_srs_wkt (p, 2,
        "s\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212");
    add_srs_wkt (p, 3,
        "936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,32");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 5,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 6,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4807\"]],VERT_CS[\"NGF-IGN69 height\",VERT_DATUM");
    add_srs_wkt (p, 9,
        "[\"Nivellement General de la France - IGN69\",2005,AUTHO");
    add_srs_wkt (p, 10,
        "RITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 11,
        "SG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"572");
    add_srs_wkt (p, 12,
        "0\"]],AUTHORITY[\"EPSG\",\"7400\"]]");
    p = add_epsg_def_ex (filter, first, last, 7401, "epsg", 7401,
        "NTF (Paris) / France II (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / France II + NGF Lallemand\",PRO");
    add_srs_wkt (p, 1,
        "JCS[\"NTF (Paris) / France II (deprecated)\",GEOGCS[\"NT");
    add_srs_wkt (p, 2,
        "F (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Par");
    add_srs_wkt (p, 3,
        "is\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021");
    add_srs_wkt (p, 4,
        "2936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,3");
    add_srs_wkt (p, 5,
        "20,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris");
    add_srs_wkt (p, 6,
        "\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\"");
    add_srs_wkt (p, 7,
        ",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[");
    add_srs_wkt (p, 8,
        "\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 9,
        "EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1");
    add_srs_wkt (p, 10,
        "SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",0],PARAMETER[\"scale_factor\",0.999877");
    add_srs_wkt (p, 12,
        "42],PARAMETER[\"false_easting\",600000],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"27582\"]],VERT_CS[\"NGF Lallemand height\",V");
    add_srs_wkt (p, 16,
        "ERT_DATUM[\"Nivellement General de la France - Lallemand");
    add_srs_wkt (p, 17,
        "\",2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7401\"]]");
    p = add_epsg_def_ex (filter, first, last, 7402, "epsg", 7402,
        "NTF (Paris) / France II (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / France II + NGF IGN69\",PROJCS[");
    add_srs_wkt (p, 1,
        "\"NTF (Paris) / France II (deprecated)\",GEOGCS[\"NTF (P");
    add_srs_wkt (p, 2,
        "aris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 3,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 4,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 5,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 6,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 7,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 8,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 9,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 10,
        "\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"cen");
    add_srs_wkt (p, 11,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987742");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_easting\",600000],PARAMETER[\"false_");
    add_srs_wkt (p, 13,
        "northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"27582\"]],VERT_CS[\"NGF-IGN69 height\",VERT_D");
    add_srs_wkt (p, 16,
        "ATUM[\"Nivellement General de la France - IGN69\",2005,A");
    add_srs_wkt (p, 17,
        "UTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 18,
        "\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 19,
        "5720\"]],AUTHORITY[\"EPSG\",\"7402\"]]");
    p = add_epsg_def_ex (filter, first, last, 7403, "epsg", 7403,
        "NTF (Paris) / France III (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / France III + NGF IGN69\",PROJCS");
    add_srs_wkt (p, 1,
        "[\"NTF (Paris) / France III (deprecated)\",GEOGCS[\"NTF ");
    add_srs_wkt (p, 2,
        "(Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris");
    add_srs_wkt (p, 3,
        "\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129");
    add_srs_wkt (p, 4,
        "36265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320");
    add_srs_wkt (p, 5,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 6,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 7,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 8,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 9,
        "PSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 10,
        "P\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",0],PARAMETER[\"scale_factor\",0.9998774");
    add_srs_wkt (p, 12,
        "99],PARAMETER[\"false_easting\",600000],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"27583\"]],VERT_CS[\"NGF-IGN69 height\",VERT_");
    add_srs_wkt (p, 16,
        "DATUM[\"Nivellement General de la France - IGN69\",2005,");
    add_srs_wkt (p, 17,
        "AUTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 18,
        "[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 19,
        "\"5720\"]],AUTHORITY[\"EPSG\",\"7403\"]]");
    p = add_epsg_def_ex (filter, first, last, 7404, "epsg", 7404,
        "RT90", 1, 1,
        "Bessel 1841", "Greenwich",
        "Rikets_koordinatsystem_1990", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=414.1,41.3,603.1,-0");
    add_proj4text (p, 1,
        ".855,2.141,-7.023,0 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"RT90 + RH70 height\",GEOGCS[\"RT90\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Rikets_koordinatsystem_1990\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6124\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4124\"]],VERT_CS[");
    add_srs_wkt (p, 8,
        "\"RH70 height\",VERT_DATUM[\"Rikets hojdsystem 1970\",20");
    add_srs_wkt (p, 9,
        "05,AUTHORITY[\"EPSG\",\"5117\"]],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 10,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"5718\"]],AUTHORITY[\"EPSG\",\"7404\"]]");
    p = add_epsg_def_ex (filter, first, last, 7405, "epsg", 7405,
        "OSGB 1936 / British National Grid", 0, 0,
        "Airy 1830", "Greenwich",
        "OSGB_1936", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400");
    add_proj4text (p, 1,
        "000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,5");
    add_proj4text (p, 2,
        "42.06,0.15,0.247,0.842,-20.489 +units=m +vunits=m +no_de");
    add_proj4text (p, 3,
        "fs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"OSGB 1936 / British National Grid + ODN heigh");
    add_srs_wkt (p, 1,
        "t\",PROJCS[\"OSGB 1936 / British National Grid\",GEOGCS[");
    add_srs_wkt (p, 2,
        "\"OSGB 1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy 1830\"");
    add_srs_wkt (p, 3,
        ",6377563.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],T");
    add_srs_wkt (p, 4,
        "OWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489]");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"6277\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 6,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 7,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 8,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4277");
    add_srs_wkt (p, 9,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",49],PARAMETER[\"central_meridian\",-2]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"scale_factor\",0.9996012717],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_easting\",400000],PARAMETER[\"false_northing\",-1000");
    add_srs_wkt (p, 13,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 14,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"27700\"]],VERT_CS[\"ODN height\",VERT_DATUM[\"Or");
    add_srs_wkt (p, 16,
        "dnance Datum Newlyn\",2005,AUTHORITY[\"EPSG\",\"5101\"]]");
    add_srs_wkt (p, 17,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"U");
    add_srs_wkt (p, 18,
        "p\",UP],AUTHORITY[\"EPSG\",\"5701\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 19,
        ",\"7405\"]]");
    p = add_epsg_def_ex (filter, first, last, 7406, "epsg", 7406,
        "NAD27", 1, 1,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +datum=NAD27 +vunits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD27 + NGVD29 height\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],VERT_CS[\"NGVD29 height\",VERT_DATUM[\"National G");
    add_srs_wkt (p, 8,
        "eodetic Vertical Datum 1929\",2005,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 9,
        "5102\"]],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 10,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"Up\",UP],AUTHORITY[\"EP");
    add_srs_wkt (p, 11,
        "SG\",\"5702\"]],AUTHORITY[\"EPSG\",\"7406\"]]");
    p = add_epsg_def_ex (filter, first, last, 7407, "epsg", 7407,
        "NAD27 / Texas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=3");
    add_proj4text (p, 1,
        "4 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +vunits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD27 / Texas North + NGVD29 height\",PROJCS[");
    add_srs_wkt (p, 1,
        "\"NAD27 / Texas North\",GEOGCS[\"NAD27\",DATUM[\"North_A");
    add_srs_wkt (p, 2,
        "merican_Datum_1927\",SPHEROID[\"Clarke 1866\",6378206.4,");
    add_srs_wkt (p, 3,
        "294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",34.65],PARAMETER[\"standard_parallel_2\"");
    add_srs_wkt (p, 10,
        ",36.18333333333333],PARAMETER[\"latitude_of_origin\",34]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"central_meridian\",-101.5],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",2000000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"32037\"]],VERT_CS[\"NGVD29 height\",VERT_D");
    add_srs_wkt (p, 16,
        "ATUM[\"National Geodetic Vertical Datum 1929\",2005,AUTH");
    add_srs_wkt (p, 17,
        "ORITY[\"EPSG\",\"5102\"]],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 18,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"Up\",U");
    add_srs_wkt (p, 19,
        "P],AUTHORITY[\"EPSG\",\"5702\"]],AUTHORITY[\"EPSG\",\"74");
    add_srs_wkt (p, 20,
        "07\"]]");
    p = add_epsg_def_ex (filter, first, last, 7408, "epsg", 7408,
        "Amersfoort", 1, 1,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=565.417,50.3319,465");
    add_proj4text (p, 1,
        ".552,-0.398957,0.343988,-1.8774,4.0725 +vunits=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"RD/NAP\",GEOGCS[\"Amersfoort\",DATUM[\"Amersf");
    add_srs_wkt (p, 1,
        "oort\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.417,50.3319,46");
    add_srs_wkt (p, 3,
        "5.552,-0.398957,0.343988,-1.8774,4.0725],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]],VERT_CS[\"N");
    add_srs_wkt (p, 8,
        "AP height\",VERT_DATUM[\"Normaal Amsterdams Peil\",2005,");
    add_srs_wkt (p, 9,
        "AUTHORITY[\"EPSG\",\"5109\"]],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 10,
        "[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 11,
        "\"5709\"]],AUTHORITY[\"EPSG\",\"7408\"]]");
    p = add_epsg_def_ex (filter, first, last, 7409, "epsg", 7409,
        "ETRS89", 1, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunit");
    add_proj4text (p, 1,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 + EVRF2000 height\",GEOGCS[\"ETRS89\",");
    add_srs_wkt (p, 1,
        "DATUM[\"European_Terrestrial_Reference_System_1989\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],VERT_CS[\"EVRF");
    add_srs_wkt (p, 8,
        "2000 height\",VERT_DATUM[\"European Vertical Reference F");
    add_srs_wkt (p, 9,
        "rame 2000\",2005,AUTHORITY[\"EPSG\",\"5129\"]],UNIT[\"me");
    add_srs_wkt (p, 10,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AU");
    add_srs_wkt (p, 11,
        "THORITY[\"EPSG\",\"5730\"]],AUTHORITY[\"EPSG\",\"7409\"]");
    add_srs_wkt (p, 12,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7410, "epsg", 7410,
        "PSD93", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,1");
    add_proj4text (p, 1,
        "73.919,-0.81,-1.898,8.336,16.7101 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"PSHD93\",GEOGCS[\"PSD93\",DATUM[\"PDO_Survey_");
    add_srs_wkt (p, 1,
        "Datum_1993\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,");
    add_srs_wkt (p, 2,
        "293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-180.624,-");
    add_srs_wkt (p, 3,
        "225.516,173.919,-0.81,-1.898,8.336,16.7101],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6134\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4134\"]],VERT_CS[");
    add_srs_wkt (p, 8,
        "\"PHD93 height\",VERT_DATUM[\"PDO Height Datum 1993\",20");
    add_srs_wkt (p, 9,
        "05,AUTHORITY[\"EPSG\",\"5123\"]],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 10,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"5724\"]],AUTHORITY[\"EPSG\",\"7410\"]]");
    p = add_epsg_def_ex (filter, first, last, 7411, "epsg", 7411,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone II + NGF Lallemand");
    add_srs_wkt (p, 1,
        " height\",PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGC");
    add_srs_wkt (p, 2,
        "S[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francai");
    add_srs_wkt (p, 3,
        "se_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.");
    add_srs_wkt (p, 4,
        "4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168");
    add_srs_wkt (p, 5,
        ",-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"");
    add_srs_wkt (p, 6,
        "Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"");
    add_srs_wkt (p, 7,
        "grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]]");
    add_srs_wkt (p, 8,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 9,
        "RITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 10,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 12,
        ".99987742],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 13,
        "[\"false_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"27572\"]],VERT_CS[\"NGF Lallemand he");
    add_srs_wkt (p, 16,
        "ight\",VERT_DATUM[\"Nivellement General de la France - L");
    add_srs_wkt (p, 17,
        "allemand\",2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"met");
    add_srs_wkt (p, 18,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUT");
    add_srs_wkt (p, 19,
        "HORITY[\"EPSG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7411\"]]");
    p = add_epsg_def_ex (filter, first, last, 7412, "epsg", 7412,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone II + NGF IGN69\",P");
    add_srs_wkt (p, 1,
        "ROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"NTF (Pa");
    add_srs_wkt (p, 2,
        "ris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129362");
    add_srs_wkt (p, 4,
        "65,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0,");
    add_srs_wkt (p, 5,
        "0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2.");
    add_srs_wkt (p, 6,
        "33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.0");
    add_srs_wkt (p, 7,
        "1570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"La");
    add_srs_wkt (p, 8,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 9,
        "G\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",0],PARAMETER[\"scale_factor\",0.99987742],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_easting\",600000],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"27572\"]],VERT_CS[\"NGF Lallemand height\",VERT");
    add_srs_wkt (p, 16,
        "_DATUM[\"Nivellement General de la France - Lallemand\",");
    add_srs_wkt (p, 17,
        "2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 18,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EP");
    add_srs_wkt (p, 19,
        "SG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7412\"]]");
    p = add_epsg_def_ex (filter, first, last, 7413, "epsg", 7413,
        "NTF (Paris) / Lambert zone III", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone III + NGF IGN69\",");
    add_srs_wkt (p, 1,
        "PROJCS[\"NTF (Paris) / Lambert zone III\",GEOGCS[\"NTF (");
    add_srs_wkt (p, 2,
        "Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 3,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 4,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 5,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 6,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 7,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 8,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 9,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 10,
        "\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"cen");
    add_srs_wkt (p, 11,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987749");
    add_srs_wkt (p, 12,
        "9],PARAMETER[\"false_easting\",600000],PARAMETER[\"false");
    add_srs_wkt (p, 13,
        "_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"27573\"]],VERT_CS[\"NGF Lallemand height\",V");
    add_srs_wkt (p, 16,
        "ERT_DATUM[\"Nivellement General de la France - Lallemand");
    add_srs_wkt (p, 17,
        "\",2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7413\"]]");
    p = add_epsg_def_ex (filter, first, last, 7414, "epsg", 7414,
        "Tokyo", 1, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=-146.414,507.337,68");
    add_proj4text (p, 1,
        "0.507,0,0,0,0 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"Tokyo + JSLD69 height\",GEOGCS[\"Tokyo\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397.155,299.152");
    add_srs_wkt (p, 2,
        "8128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-146.414,507.");
    add_srs_wkt (p, 3,
        "337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"6301\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4301\"]],VERT_CS[\"JSLD69 height\",VERT_");
    add_srs_wkt (p, 8,
        "DATUM[\"Japanese Standard Levelling Datum 1969\",2005,AU");
    add_srs_wkt (p, 9,
        "THORITY[\"EPSG\",\"5122\"]],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 10,
        "EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5");
    add_srs_wkt (p, 11,
        "723\"]],AUTHORITY[\"EPSG\",\"7414\"]]");
    p = add_epsg_def_ex (filter, first, last, 7415, "epsg", 7415,
        "Amersfoort / RD New", 0, 0,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.387638888");
    add_proj4text (p, 1,
        "88889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel");
    add_proj4text (p, 2,
        " +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.");
    add_proj4text (p, 3,
        "8774,4.0725 +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"Amersfoort / RD New + NAP height\",PROJCS[\"A");
    add_srs_wkt (p, 1,
        "mersfoort / RD New\",GEOGCS[\"Amersfoort\",DATUM[\"Amers");
    add_srs_wkt (p, 2,
        "foort\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.417,50.3319,4");
    add_srs_wkt (p, 4,
        "65.552,-0.398957,0.343988,-1.8774,4.0725],AUTHORITY[\"EP");
    add_srs_wkt (p, 5,
        "SG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Oblique_Stereographic\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 10,
        "n\",52.15616055555555],PARAMETER[\"central_meridian\",5.");
    add_srs_wkt (p, 11,
        "38763888888889],PARAMETER[\"scale_factor\",0.9999079],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_easting\",155000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 13,
        "hing\",463000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 14,
        "1\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"28992\"]],VERT_CS[\"NAP height\",VERT_DATUM[\"Norm");
    add_srs_wkt (p, 16,
        "aal Amsterdams Peil\",2005,AUTHORITY[\"EPSG\",\"5109\"]]");
    add_srs_wkt (p, 17,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"U");
    add_srs_wkt (p, 18,
        "p\",UP],AUTHORITY[\"EPSG\",\"5709\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 19,
        ",\"7415\"]]");
    p = add_epsg_def_ex (filter, first, last, 7416, "epsg", 7416,
        "ETRS89 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 32N + DVR90 height\",PROJCS");
    add_srs_wkt (p, 1,
        "[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"Eur");
    add_srs_wkt (p, 2,
        "opean_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS");
    add_srs_wkt (p, 3,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]],");
    add_srs_wkt (p, 5,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",9],PARAMETER[\"scale_factor\",0.999");
    add_srs_wkt (p, 11,
        "6],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AU");
    add_srs_wkt (p, 14,
        "THORITY[\"EPSG\",\"25832\"]],VERT_CS[\"DVR90 height\",VE");
    add_srs_wkt (p, 15,
        "RT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHORIT");
    add_srs_wkt (p, 16,
        "Y[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 17,
        ",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5799\"]");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"7416\"]]");
    p = add_epsg_def_ex (filter, first, last, 7417, "epsg", 7417,
        "ETRS89 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 33N + DVR90 height\",PROJCS");
    add_srs_wkt (p, 1,
        "[\"ETRS89 / UTM zone 33N\",GEOGCS[\"ETRS89\",DATUM[\"Eur");
    add_srs_wkt (p, 2,
        "opean_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS");
    add_srs_wkt (p, 3,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]],");
    add_srs_wkt (p, 5,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",15],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"25833\"]],VERT_CS[\"DVR90 height\",V");
    add_srs_wkt (p, 15,
        "ERT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHORI");
    add_srs_wkt (p, 16,
        "TY[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 17,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5799\"");
    add_srs_wkt (p, 18,
        "]],AUTHORITY[\"EPSG\",\"7417\"]]");
    p = add_epsg_def_ex (filter, first, last, 7418, "epsg", 7418,
        "ETRS89 / Kp2000 Jutland", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.99995 +x_0=200000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vuni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / Kp2000 Jutland + DVR90 height\",PROJ");
    add_srs_wkt (p, 1,
        "CS[\"ETRS89 / Kp2000 Jutland\",GEOGCS[\"ETRS89\",DATUM[\"");
    add_srs_wkt (p, 2,
        "European_Terrestrial_Reference_System_1989\",SPHEROID[\"");
    add_srs_wkt (p, 3,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 4,
        "19\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 6,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 8,
        "T],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 9,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",9.5],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "0.99995],PARAMETER[\"false_easting\",200000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"2196\"]],VERT_CS[\"DVR90 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHO");
    add_srs_wkt (p, 16,
        "RITY[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 17,
        "SG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"579");
    add_srs_wkt (p, 18,
        "9\"]],AUTHORITY[\"EPSG\",\"7418\"]]");
    p = add_epsg_def_ex (filter, first, last, 7419, "epsg", 7419,
        "ETRS89 / Kp2000 Zealand", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.99995 +x_0=500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / Kp2000 Zealand + DVR90 height\",PROJ");
    add_srs_wkt (p, 1,
        "CS[\"ETRS89 / Kp2000 Zealand\",GEOGCS[\"ETRS89\",DATUM[\"");
    add_srs_wkt (p, 2,
        "European_Terrestrial_Reference_System_1989\",SPHEROID[\"");
    add_srs_wkt (p, 3,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 4,
        "19\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 6,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 8,
        "T],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 9,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",12],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".99995],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"2197\"]],VERT_CS[\"DVR90 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHO");
    add_srs_wkt (p, 16,
        "RITY[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 17,
        "SG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"579");
    add_srs_wkt (p, 18,
        "9\"]],AUTHORITY[\"EPSG\",\"7419\"]]");
    p = add_epsg_def_ex (filter, first, last, 7420, "epsg", 7420,
        "ETRS89 / Kp2000 Bornholm", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=900000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / Kp2000 Bornholm + DVR90 height\",PRO");
    add_srs_wkt (p, 1,
        "JCS[\"ETRS89 / Kp2000 Bornholm\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 2,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 3,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 5,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 6,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 8,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 9,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 10,
        "METER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",900000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"2198\"]],VERT_CS[\"DVR90 height\",VE");
    add_srs_wkt (p, 15,
        "RT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHORIT");
    add_srs_wkt (p, 16,
        "Y[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 17,
        ",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5799\"]");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"7420\"]]");
    p = add_epsg_def_ex (filter, first, last, 7421, "epsg", 7421,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone II + NGF-IGN69 hei");
    add_srs_wkt (p, 1,
        "ght\",PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 3,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 4,
        "212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 5,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 6,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 7,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 8,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 9,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 10,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 12,
        "987742],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 13,
        "false_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"27572\"]],VERT_CS[\"NGF-IGN69 height\",");
    add_srs_wkt (p, 16,
        "VERT_DATUM[\"Nivellement General de la France - IGN69\",");
    add_srs_wkt (p, 17,
        "2005,AUTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 18,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EP");
    add_srs_wkt (p, 19,
        "SG\",\"5720\"]],AUTHORITY[\"EPSG\",\"7421\"]]");
    p = add_epsg_def_ex (filter, first, last, 7422, "epsg", 7422,
        "NTF (Paris) / Lambert zone III", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone III + NGF-IGN69 he");
    add_srs_wkt (p, 1,
        "ight\",PROJCS[\"NTF (Paris) / Lambert zone III\",GEOGCS[");
    add_srs_wkt (p, 2,
        "\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise");
    add_srs_wkt (p, 3,
        "_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46");
    add_srs_wkt (p, 4,
        "60212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-");
    add_srs_wkt (p, 5,
        "60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"P");
    add_srs_wkt (p, 6,
        "aris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"g");
    add_srs_wkt (p, 7,
        "rad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],");
    add_srs_wkt (p, 8,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 9,
        "ITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 10,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",49],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 12,
        "999877499],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 13,
        "[\"false_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"27573\"]],VERT_CS[\"NGF-IGN69 height");
    add_srs_wkt (p, 16,
        "\",VERT_DATUM[\"Nivellement General de la France - IGN69");
    add_srs_wkt (p, 17,
        "\",2005,AUTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"5720\"]],AUTHORITY[\"EPSG\",\"7422\"]]");
    p = add_epsg_def_ex (filter, first, last, 7423, "epsg", 7423,
        "ETRS89", 1, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunit");
    add_proj4text (p, 1,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 + EVRF2007 height\",GEOGCS[\"ETRS89\",");
    add_srs_wkt (p, 1,
        "DATUM[\"European_Terrestrial_Reference_System_1989\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],VERT_CS[\"EVRF");
    add_srs_wkt (p, 8,
        "2007 height\",VERT_DATUM[\"European Vertical Reference F");
    add_srs_wkt (p, 9,
        "rame 2007\",2005,AUTHORITY[\"EPSG\",\"5215\"]],UNIT[\"me");
    add_srs_wkt (p, 10,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AU");
    add_srs_wkt (p, 11,
        "THORITY[\"EPSG\",\"5621\"]],AUTHORITY[\"EPSG\",\"7423\"]");
    add_srs_wkt (p, 12,
        "]");
    p = add_epsg_def_ex (filter, first, last, 20004, "epsg", 20004,
        "Pulkovo 1995 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 4\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",4500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"20004\"]]");
    p = add_epsg_def_ex (filter, first, last, 20005, "epsg", 20005,
        "Pulkovo 1995 / Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 5\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",5500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"20005\"]]");
    p = add_epsg_def_ex (filter, first, last, 20006, "epsg", 20006,
        "Pulkovo 1995 / Gauss-Kruger zone 6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 6\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",6500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"20006\"]]");
    p = add_epsg_def_ex (filter, first, last, 20007, "epsg", 20007,
        "Pulkovo 1995 / Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 7\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",7500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"20007\"]]");
    p = add_epsg_def_ex (filter, first, last, 20008, "epsg", 20008,
        "Pulkovo 1995 / Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 8\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",8500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"20008\"]]");
    p = add_epsg_def_ex (filter, first, last, 20009, "epsg", 20009,
        "Pulkovo 1995 / Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 9\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",9500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"20009\"]]");
    p = add_epsg_def_ex (filter, first, last, 20010, "epsg", 20010,
        "Pulkovo 1995 / Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 10\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",10500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20010\"]]");
    p = add_epsg_def_ex (filter, first, last, 20011, "epsg", 20011,
        "Pulkovo 1995 / Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 11\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",11500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20011\"]]");
    p = add_epsg_def_ex (filter, first, last, 20012, "epsg", 20012,
        "Pulkovo 1995 / Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 12\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",12500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20012\"]]");
    p = add_epsg_def_ex (filter, first, last, 20013, "epsg", 20013,
        "Pulkovo 1995 / Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 13\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",13500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20013\"]]");
    p = add_epsg_def_ex (filter, first, last, 20014, "epsg", 20014,
        "Pulkovo 1995 / Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 14\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",14500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20014\"]]");
    p = add_epsg_def_ex (filter, first, last, 20015, "epsg", 20015,
        "Pulkovo 1995 / Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 15\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",15500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20015\"]]");
    p = add_epsg_def_ex (filter, first, last, 20016, "epsg", 20016,
        "Pulkovo 1995 / Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 16\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",16500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20016\"]]");
    p = add_epsg_def_ex (filter, first, last, 20017, "epsg", 20017,
        "Pulkovo 1995 / Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 17\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",17500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20017\"]]");
    p = add_epsg_def_ex (filter, first, last, 20018, "epsg", 20018,
        "Pulkovo 1995 / Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 18\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",105],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",18500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20018\"]]");
    p = add_epsg_def_ex (filter, first, last, 20019, "epsg", 20019,
        "Pulkovo 1995 / Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 19\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",19500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20019\"]]");
    p = add_epsg_def_ex (filter, first, last, 20020, "epsg", 20020,
        "Pulkovo 1995 / Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 20\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",117],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",20500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20020\"]]");
    p = add_epsg_def_ex (filter, first, last, 20021, "epsg", 20021,
        "Pulkovo 1995 / Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 21\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",123],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",21500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20021\"]]");
    p = add_epsg_def_ex (filter, first, last, 20022, "epsg", 20022,
        "Pulkovo 1995 / Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 22\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",129],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",22500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20022\"]]");
    p = add_epsg_def_ex (filter, first, last, 20023, "epsg", 20023,
        "Pulkovo 1995 / Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 23\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",135],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",23500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20023\"]]");
    p = add_epsg_def_ex (filter, first, last, 20024, "epsg", 20024,
        "Pulkovo 1995 / Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 24\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",141],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",24500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20024\"]]");
    p = add_epsg_def_ex (filter, first, last, 20025, "epsg", 20025,
        "Pulkovo 1995 / Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 25\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",147],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",25500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20025\"]]");
    p = add_epsg_def_ex (filter, first, last, 20026, "epsg", 20026,
        "Pulkovo 1995 / Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 26\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",153],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",26500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20026\"]]");
    p = add_epsg_def_ex (filter, first, last, 20027, "epsg", 20027,
        "Pulkovo 1995 / Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 27\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",159],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",27500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20027\"]]");
    p = add_epsg_def_ex (filter, first, last, 20028, "epsg", 20028,
        "Pulkovo 1995 / Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 28\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",165],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",28500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20028\"]]");
    p = add_epsg_def_ex (filter, first, last, 20029, "epsg", 20029,
        "Pulkovo 1995 / Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 29\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",171],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",29500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20029\"]]");
    p = add_epsg_def_ex (filter, first, last, 20030, "epsg", 20030,
        "Pulkovo 1995 / Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,");
    add_proj4text (p, 2,
        "-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 30\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",177],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",30500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"20030\"]]");
    p = add_epsg_def_ex (filter, first, last, 20031, "epsg", 20031,
        "Pulkovo 1995 / Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13");
    add_proj4text (p, 2,
        ",-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 31\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-177],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",3150000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"20031\"]]");










































































}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_34.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115































































































































































































































































































































































































































































































































































































































































































































































1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_34 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 6835, "epsg", 6835,
        "NAD83(2011) / Oregon La Grande zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45 +lon_0=-118 +k=1.00013 +x_0=39999.");
    add_proj4text (p, 1,
        "99999984 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon La Grande zone (ft)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-118],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.00013],PARAMETER[\"false_easting\",131233.5958");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"6835\"]]");
    p = add_epsg_def_ex (filter, first, last, 6836, "epsg", 6836,
        "NAD83(CORS96) / Oregon Ontario zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.25 +lon_0=-117 +k=1.0001 +x_0=8000");
    add_proj4text (p, 1,
        "0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Ontario zone (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating");
    add_srs_wkt (p, 2,
        "_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",43.25],PARAMETER[\"central_meridian\",-117],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.0001],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "80000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"6836\"]]");
    p = add_epsg_def_ex (filter, first, last, 6837, "epsg", 6837,
        "NAD83(CORS96) / Oregon Ontario zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.25 +lon_0=-117 +k=1.0001 +x_0=7999");
    add_proj4text (p, 1,
        "9.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Ontario zone (ft)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operatin");
    add_srs_wkt (p, 2,
        "g_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",43.25],PARAMETER[\"central_meridian\",-117],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.0001],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "262467.1916],PARAMETER[\"false_northing\",0],UNIT[\"foot");
    add_srs_wkt (p, 12,
        "\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6837\"]]");
    p = add_epsg_def_ex (filter, first, last, 6838, "epsg", 6838,
        "NAD83(2011) / Oregon Ontario zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.25 +lon_0=-117 +k=1.0001 +x_0=8000");
    add_proj4text (p, 1,
        "0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Ontario zone (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.25],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-117],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.0001],PARAMETER[\"false_easting\",80000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"6838\"]]");
    p = add_epsg_def_ex (filter, first, last, 6839, "epsg", 6839,
        "NAD83(2011) / Oregon Ontario zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.25 +lon_0=-117 +k=1.0001 +x_0=7999");
    add_proj4text (p, 1,
        "9.99999968 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Ontario zone (ft)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.25]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",-117],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.0001],PARAMETER[\"false_easting\",262467.1916");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"6839\"]]");
    p = add_epsg_def_ex (filter, first, last, 6840, "epsg", 6840,
        "NAD83(CORS96) / Oregon Coast zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Hotine_Oblique_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=44.75 +lonc=-124.05 +alpha=5 +k=1 +x_");
    add_proj4text (p, 1,
        "0=-300000 +y_0=-4600000 +no_uoff +gamma=5 +ellps=GRS80 +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Coast zone (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_R");
    add_srs_wkt (p, 2,
        "eference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Hotine_Oblique_Mercator\"],PARAMETER[\"latitude_of_cen");
    add_srs_wkt (p, 9,
        "ter\",44.75],PARAMETER[\"longitude_of_center\",-124.05],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"azimuth\",5],PARAMETER[\"rectified_grid_angl");
    add_srs_wkt (p, 11,
        "e\",5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",-300000],PARAMETER[\"false_northing\",-4600000]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6840\"]]");
    p = add_epsg_def_ex (filter, first, last, 6841, "epsg", 6841,
        "NAD83(CORS96) / Oregon Coast zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Hotine_Oblique_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=44.75 +lonc=-124.05 +alpha=5 +k=1 +x_");
    add_proj4text (p, 1,
        "0=-299999.9999988 +y_0=-4600000.00001208 +no_uoff +gamma");
    add_proj4text (p, 2,
        "=5 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Coast zone (ft)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_");
    add_srs_wkt (p, 2,
        "Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Hotine_Oblique_Mercator\"],PARAMETER[\"latitude_of_c");
    add_srs_wkt (p, 9,
        "enter\",44.75],PARAMETER[\"longitude_of_center\",-124.05");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"azimuth\",5],PARAMETER[\"rectified_grid_an");
    add_srs_wkt (p, 11,
        "gle\",5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",-984251.9685],PARAMETER[\"false_northing\",-1");
    add_srs_wkt (p, 13,
        "5091863.5171],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"6841\"]]");
    p = add_epsg_def_ex (filter, first, last, 6842, "epsg", 6842,
        "NAD83(2011) / Oregon Coast zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Hotine_Oblique_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=44.75 +lonc=-124.05 +alpha=5 +k=1 +x_");
    add_proj4text (p, 1,
        "0=-300000 +y_0=-4600000 +no_uoff +gamma=5 +ellps=GRS80 +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Coast zone (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Hotine_O");
    add_srs_wkt (p, 8,
        "blique_Mercator\"],PARAMETER[\"latitude_of_center\",44.7");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"longitude_of_center\",-124.05],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"azimuth\",5],PARAMETER[\"rectified_grid_angle\",5],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",-");
    add_srs_wkt (p, 12,
        "300000],PARAMETER[\"false_northing\",-4600000],UNIT[\"me");
    add_srs_wkt (p, 13,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 14,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6842\"]]");
    p = add_epsg_def_ex (filter, first, last, 6843, "epsg", 6843,
        "NAD83(2011) / Oregon Coast zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Hotine_Oblique_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=44.75 +lonc=-124.05 +alpha=5 +k=1 +x_");
    add_proj4text (p, 1,
        "0=-299999.9999988 +y_0=-4600000.00001208 +no_uoff +gamma");
    add_proj4text (p, 2,
        "=5 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Coast zone (ft)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Hotine_O");
    add_srs_wkt (p, 8,
        "blique_Mercator\"],PARAMETER[\"latitude_of_center\",44.7");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"longitude_of_center\",-124.05],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"azimuth\",5],PARAMETER[\"rectified_grid_angle\",5],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",-");
    add_srs_wkt (p, 12,
        "984251.9685],PARAMETER[\"false_northing\",-15091863.5171");
    add_srs_wkt (p, 13,
        "],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"684");
    add_srs_wkt (p, 15,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 6844, "epsg", 6844,
        "NAD83(CORS96) / Oregon Pendleton zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.25 +lon_0=-119.1666666666667 +k=1.");
    add_proj4text (p, 1,
        "000045 +x_0=60000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Pendleton zone (m)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operati");
    add_srs_wkt (p, 2,
        "ng_Reference_Station_1996\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",45.25],PARAMETER[\"central_meridian\",-119.166666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"scale_factor\",1.000045],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",60000],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6844\"]]");
    p = add_epsg_def_ex (filter, first, last, 6845, "epsg", 6845,
        "NAD83(CORS96) / Oregon Pendleton zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.25 +lon_0=-119.1666666666667 +k=1.");
    add_proj4text (p, 1,
        "000045 +x_0=59999.99999976 +y_0=0 +ellps=GRS80 +units=ft");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Pendleton zone (ft)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operat");
    add_srs_wkt (p, 2,
        "ing_Reference_Station_1996\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",45.25],PARAMETER[\"central_meridian\",-119.16666");
    add_srs_wkt (p, 10,
        "66666667],PARAMETER[\"scale_factor\",1.000045],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",196850.3937],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"6845\"]]");
    p = add_epsg_def_ex (filter, first, last, 6846, "epsg", 6846,
        "NAD83(2011) / Oregon Pendleton zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.25 +lon_0=-119.1666666666667 +k=1.");
    add_proj4text (p, 1,
        "000045 +x_0=60000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Pendleton zone (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",45.2");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-119.1666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1.000045],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",60000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6846\"]]");
    p = add_epsg_def_ex (filter, first, last, 6847, "epsg", 6847,
        "NAD83(2011) / Oregon Pendleton zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.25 +lon_0=-119.1666666666667 +k=1.");
    add_proj4text (p, 1,
        "000045 +x_0=59999.99999976 +y_0=0 +ellps=GRS80 +units=ft");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Pendleton zone (ft)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",45.2");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-119.1666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1.000045],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",196850.3937],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6847\"]]");
    p = add_epsg_def_ex (filter, first, last, 6848, "epsg", 6848,
        "NAD83(CORS96) / Oregon Pendleton-La Grande zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.08333333333334 +lon_0=-118.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000175 +x_0=30000 +y_0=0 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Pendleton-La Grande zone");
    add_srs_wkt (p, 1,
        " (m)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuous");
    add_srs_wkt (p, 2,
        "ly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 3,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",45.08333333333334],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-118.3333333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1.000175],PARAMETER[\"false_easting\",30000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"6848\"]]");
    p = add_epsg_def_ex (filter, first, last, 6849, "epsg", 6849,
        "NAD83(CORS96) / Oregon Pendleton-La Grande zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.08333333333334 +lon_0=-118.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000175 +x_0=30000.00001512 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Pendleton-La Grande zone");
    add_srs_wkt (p, 1,
        " (ft)\",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuou");
    add_srs_wkt (p, 2,
        "sly_Operating_Reference_Station_1996\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",45.08333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",-118.3333333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1.000175],PARAMETER[\"false_easting\",98425.1969],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"6849\"]]");
    p = add_epsg_def_ex (filter, first, last, 6850, "epsg", 6850,
        "NAD83(2011) / Oregon Pendleton-La Grande zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.08333333333334 +lon_0=-118.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000175 +x_0=30000 +y_0=0 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Pendleton-La Grande zone (");
    add_srs_wkt (p, 1,
        "m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",45.08333333333334],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 10,
        "118.3333333333333],PARAMETER[\"scale_factor\",1.000175],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",30000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"6850\"]]");
    p = add_epsg_def_ex (filter, first, last, 6851, "epsg", 6851,
        "NAD83(2011) / Oregon Pendleton-La Grande zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.08333333333334 +lon_0=-118.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.000175 +x_0=30000.00001512 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Pendleton-La Grande zone (");
    add_srs_wkt (p, 1,
        "ft)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spat");
    add_srs_wkt (p, 2,
        "ial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",45.08333333333334],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-118.3333333333333],PARAMETER[\"scale_factor\",1.000175");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",98425.1969],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"6851\"]]");
    p = add_epsg_def_ex (filter, first, last, 6852, "epsg", 6852,
        "NAD83(CORS96) / Oregon Portland zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.5 +lat_0=45.5 +lon_0=-122.75 +k_0=1.");
    add_proj4text (p, 1,
        "000002 +x_0=100000 +y_0=50000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Portland zone (m)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operatin");
    add_srs_wkt (p, 2,
        "g_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",45.5],PARAMETER[\"central_meridian\",-122.7");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1.000002],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",100000],PARAMETER[\"false_northing\",50000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6852\"]]");
    p = add_epsg_def_ex (filter, first, last, 6853, "epsg", 6853,
        "NAD83(CORS96) / Oregon Portland zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.5 +lat_0=45.5 +lon_0=-122.75 +k_0=1.");
    add_proj4text (p, 1,
        "000002 +x_0=99999.99999960001 +y_0=50000.00001504 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Portland zone (ft)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operati");
    add_srs_wkt (p, 2,
        "ng_Reference_Station_1996\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",45.5],PARAMETER[\"central_meridian\",-122");
    add_srs_wkt (p, 10,
        ".75],PARAMETER[\"scale_factor\",1.000002],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",328083.9895],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "164041.9948],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"6853\"]]");
    p = add_epsg_def_ex (filter, first, last, 6854, "epsg", 6854,
        "NAD83(2011) / Oregon Portland zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.5 +lat_0=45.5 +lon_0=-122.75 +k_0=1.");
    add_proj4text (p, 1,
        "000002 +x_0=100000 +y_0=50000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Portland zone (m)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lamber");
    add_srs_wkt (p, 8,
        "t_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",45.5],PARAMETER[\"central_meridian\",-122.75],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1.000002],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "100000],PARAMETER[\"false_northing\",50000],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6854\"]]");
    p = add_epsg_def_ex (filter, first, last, 6855, "epsg", 6855,
        "NAD83(2011) / Oregon Portland zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.5 +lat_0=45.5 +lon_0=-122.75 +k_0=1.");
    add_proj4text (p, 1,
        "000002 +x_0=99999.99999960001 +y_0=50000.00001504 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Portland zone (ft)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 8,
        "ert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",45.5],PARAMETER[\"central_meridian\",-122.75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1.000002],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",328083.9895],PARAMETER[\"false_northing\",164041.9948");
    add_srs_wkt (p, 12,
        "],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"685");
    add_srs_wkt (p, 14,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 6856, "epsg", 6856,
        "NAD83(CORS96) / Oregon Salem zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.33333333333334 +lon_0=-123.0833333");
    add_proj4text (p, 1,
        "333333 +k=1.00001 +x_0=50000 +y_0=0 +ellps=GRS80 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Salem zone (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_R");
    add_srs_wkt (p, 2,
        "eference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",44.33333333333334],PARAMETER[\"central_meridian\",-123.");
    add_srs_wkt (p, 10,
        "0833333333333],PARAMETER[\"scale_factor\",1.00001],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",50000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"685");
    add_srs_wkt (p, 14,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 6857, "epsg", 6857,
        "NAD83(CORS96) / Oregon Salem zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.33333333333334 +lon_0=-123.0833333");
    add_proj4text (p, 1,
        "333333 +k=1.00001 +x_0=50000.00001504 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Salem zone (ft)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_");
    add_srs_wkt (p, 2,
        "Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",44.33333333333334],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "23.0833333333333],PARAMETER[\"scale_factor\",1.00001],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",164041.9948],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6857\"]]");
    p = add_epsg_def_ex (filter, first, last, 6858, "epsg", 6858,
        "NAD83(2011) / Oregon Salem zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.33333333333334 +lon_0=-123.0833333");
    add_proj4text (p, 1,
        "333333 +k=1.00001 +x_0=50000 +y_0=0 +ellps=GRS80 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Salem zone (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.33333");
    add_srs_wkt (p, 9,
        "333333334],PARAMETER[\"central_meridian\",-123.083333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"scale_factor\",1.00001],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",50000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6858\"]]");
    p = add_epsg_def_ex (filter, first, last, 6859, "epsg", 6859,
        "NAD83(2011) / Oregon Salem zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.33333333333334 +lon_0=-123.0833333");
    add_proj4text (p, 1,
        "333333 +k=1.00001 +x_0=50000.00001504 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Salem zone (ft)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.33333");
    add_srs_wkt (p, 9,
        "333333334],PARAMETER[\"central_meridian\",-123.083333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"scale_factor\",1.00001],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",164041.9948],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"68");
    add_srs_wkt (p, 14,
        "59\"]]");
    p = add_epsg_def_ex (filter, first, last, 6860, "epsg", 6860,
        "NAD83(CORS96) / Oregon Santiam Pass zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.");
    add_proj4text (p, 1,
        "000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Santiam Pass zone (m)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Oper");
    add_srs_wkt (p, 2,
        "ating_Reference_Station_1996\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 3,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",44.08333333333334],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-122.5],PARAMETER[\"scale_factor\",1.000155],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6860\"]]");
    p = add_epsg_def_ex (filter, first, last, 6861, "epsg", 6861,
        "NAD83(CORS96) / Oregon Santiam Pass zone (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.");
    add_proj4text (p, 1,
        "000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon Santiam Pass zone (ft)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Ope");
    add_srs_wkt (p, 2,
        "rating_Reference_Station_1996\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 3,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PR");































































































































































































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",44.08333333333334],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",-122.5],PARAMETER[\"scale_factor\",1.000155],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",0],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 12,
        ",UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6861");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 6862, "epsg", 6862,
        "NAD83(2011) / Oregon Santiam Pass zone (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.");
    add_proj4text (p, 1,
        "000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Santiam Pass zone (m)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        "4.08333333333334],PARAMETER[\"central_meridian\",-122.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1.000155],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6862\"]]");
    p = add_epsg_def_ex (filter, first, last, 6863, "epsg", 6863,
        "NAD83(2011) / Oregon Santiam Pass (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.08333333333334 +lon_0=-122.5 +k=1.");
    add_proj4text (p, 1,
        "000155 +x_0=0 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Oregon Santiam Pass (ft)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",44.083");
    add_srs_wkt (p, 9,
        "33333333334],PARAMETER[\"central_meridian\",-122.5],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.000155],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",0],PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.");
    add_srs_wkt (p, 12,
        "3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6863\"]]");
    p = add_epsg_def_ex (filter, first, last, 6867, "epsg", 6867,
        "NAD83(CORS96) / Oregon LCC (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon LCC (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(CORS96)\",DATUM[\"NAD83_Continuously_Operating_Referenc");
    add_srs_wkt (p, 2,
        "e_Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 8,
        "ert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_1\",43],PARAMETER[\"standard_parallel_2\",45.5],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",41.75],PARAMETER[\"central_mer");
    add_srs_wkt (p, 11,
        "idian\",-120.5],PARAMETER[\"false_easting\",400000],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"6867\"]]");
    p = add_epsg_def_ex (filter, first, last, 6868, "epsg", 6868,
        "NAD83(CORS96) / Oregon GIC Lambert (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120");
    add_proj4text (p, 1,
        ".5 +x_0=399999.9999984 +y_0=0 +ellps=GRS80 +units=ft +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon GIC Lambert (ft)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(CORS96)\",DATUM[\"NAD83_Continuously_Operating");
    add_srs_wkt (p, 2,
        "_Reference_Station_1996\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard");
    add_srs_wkt (p, 9,
        "_parallel_1\",43],PARAMETER[\"standard_parallel_2\",45.5");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",41.75],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-120.5],PARAMETER[\"false_easting\",131");
    add_srs_wkt (p, 12,
        "2335.958],PARAMETER[\"false_northing\",0],UNIT[\"foot\",");
    add_srs_wkt (p, 13,
        "0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6868\"]]");
    p = add_epsg_def_ex (filter, first, last, 6870, "epsg", 6870,
        "ETRS89 / Albania TM 2010", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=20 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / Albania TM 2010\",GEOGCS[\"ETRS89\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"European_Terrestrial_Reference_System_1989\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",20],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"6870\"]]");
    p = add_epsg_def_ex (filter, first, last, 6871, "epsg", 6871,
        "WGS 84 / Pseudo-Mercator", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +uni");
    add_proj4text (p, 1,
        "ts=m +geoidgrids=egm08_25.gtx +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"WGS 84 / Pseudo-Mercator +  EGM2008 geoid hei");
    add_srs_wkt (p, 1,
        "ght\",PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 8");
    add_srs_wkt (p, 2,
        "4\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2");
    add_srs_wkt (p, 3,
        "57223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"M");
    add_srs_wkt (p, 8,
        "ercator_1SP\"],PARAMETER[\"central_meridian\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 12,
        "EXTENSION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +");
    add_srs_wkt (p, 13,
        "lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +n");
    add_srs_wkt (p, 14,
        "adgrids=@null +wktext +no_defs\"],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "857\"]],VERT_CS[\"EGM2008 geoid height\",VERT_DATUM[\"EG");
    add_srs_wkt (p, 16,
        "M2008 geoid\",2005,EXTENSION[\"PROJ4_GRIDS\",\"egm08_25.");
    add_srs_wkt (p, 17,
        "gtx\"],AUTHORITY[\"EPSG\",\"1027\"]],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 18,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"3855\"]],AUTHORITY[\"EPSG\",\"6871\"]]");
    p = add_epsg_def_ex (filter, first, last, 6875, "epsg", 6875,
        "RDN2008 / Italy zone (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9985000000000001 +x_");
    add_proj4text (p, 1,
        "0=7000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / Italy zone (N-E)\",GEOGCS[\"RDN2008\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1");
    add_srs_wkt (p, 2,
        "980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",12],PARAMETER[\"scale_factor\",0.9985");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",7000000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"6875\"]]");
    p = add_epsg_def_ex (filter, first, last, 6876, "epsg", 6876,
        "RDN2008 / Zone 12 (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=3000000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / Zone 12 (N-E)\",GEOGCS[\"RDN2008\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",12],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",3000000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"6876\"]]");
    p = add_epsg_def_ex (filter, first, last, 6879, "epsg", 6879,
        "NAD83(2011) / Wisconsin Central", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Wisconsin Central\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",45.");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"standard_parallel_2\",44.25],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",43.83333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-90],PARAMETER[\"false_easting\",600000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"6879\"]]");
    p = add_epsg_def_ex (filter, first, last, 6880, "epsg", 6880,
        "NAD83(2011) / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Nebraska (ftUS)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 8,
        "mal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",43],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"standard_parallel_2\",40],PARAMETER[\"latitud");
    add_srs_wkt (p, 10,
        "e_of_origin\",39.83333333333334],PARAMETER[\"central_mer");
    add_srs_wkt (p, 11,
        "idian\",-100],PARAMETER[\"false_easting\",1640416.6667],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6880\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 6881, "epsg", 6881,
        "Aden 1925", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Aden_1925", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-24,-203,268,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Aden 1925\",DATUM[\"Aden_1925\",SPHEROID[\"Clar");
    add_srs_wkt (p, 1,
        "ke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 2,
        "7012\"]],TOWGS84[-24,-203,268,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"1135\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6881\"]]");
    p = add_epsg_def_ex (filter, first, last, 6882, "epsg", 6882,
        "Bekaa Valley 1920", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Bekaa_Valley_1920", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-183,-15,273,0,0,0,");
    add_proj4text (p, 1,
        "0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Bekaa Valley 1920\",DATUM[\"Bekaa_Valley_1920\"");
    add_srs_wkt (p, 1,
        ",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.465,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7012\"]],TOWGS84[-183,-15,273,0,0,0,0],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"1137\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6882\"");
    add_srs_wkt (p, 7,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 6883, "epsg", 6883,
        "Bioko", 1, 1,
        "International 1924", "Greenwich",
        "Bioko", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=intl +towgs84=-235,-110,393,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Bioko\",DATUM[\"Bioko\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 1,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 2,
        "84[-235,-110,393,0,0,0,0],AUTHORITY[\"EPSG\",\"1136\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"6883\"]]");
    p = add_epsg_def_ex (filter, first, last, 6884, "epsg", 6884,
        "NAD83(CORS96) / Oregon North", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon North\",GEOGCS[\"NAD83(C");
    add_srs_wkt (p, 1,
        "ORS96)\",DATUM[\"NAD83_Continuously_Operating_Reference_");
    add_srs_wkt (p, 2,
        "Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "33\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",46],PARAMETER[\"standard_parallel_2\",44.33333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",43.66666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",2500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6884\"]]");
    p = add_epsg_def_ex (filter, first, last, 6885, "epsg", 6885,
        "NAD83(CORS96) / Oregon North (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000.0001424 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon North (ft)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_Refer");
    add_srs_wkt (p, 2,
        "ence_Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",46],PARAMETER[\"standard_parallel_2\",44.3333333");
    add_srs_wkt (p, 10,
        "3333334],PARAMETER[\"latitude_of_origin\",43.66666666666");
    add_srs_wkt (p, 11,
        "666],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",8202099.738],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 13,
        ",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 15,
        "885\"]]");
    p = add_epsg_def_ex (filter, first, last, 6886, "epsg", 6886,
        "NAD83(CORS96) / Oregon South", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon South\",GEOGCS[\"NAD83(C");
    add_srs_wkt (p, 1,
        "ORS96)\",DATUM[\"NAD83_Continuously_Operating_Reference_");
    add_srs_wkt (p, 2,
        "Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "33\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 9,
        ",44],PARAMETER[\"standard_parallel_2\",42.33333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",41.66666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",1500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6886\"]]");
    p = add_epsg_def_ex (filter, first, last, 6887, "epsg", 6887,
        "NAD83(CORS96) / Oregon South (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Continuously_Operating_Reference_Station_1996", "Lambert_Conformal_Conic_2SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000.0001464 +y_0=0 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CORS96) / Oregon South (ft)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(CORS96)\",DATUM[\"NAD83_Continuously_Operating_Refer");
    add_srs_wkt (p, 2,
        "ence_Station_1996\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1133\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6783\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",44],PARAMETER[\"standard_parallel_2\",42.3333333");
    add_srs_wkt (p, 10,
        "3333334],PARAMETER[\"latitude_of_origin\",41.66666666666");
    add_srs_wkt (p, 11,
        "666],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",4921259.843],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 13,
        ",0],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 15,
        "887\"]]");
    p = add_epsg_def_ex (filter, first, last, 6892, "epsg", 6892,
        "South East Island 1943", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "South_East_Island_1943", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-43.685,-179.785,-2");
    add_proj4text (p, 1,
        "67.721,0,0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"South East Island 1943\",DATUM[\"South_East_Isl");
    add_srs_wkt (p, 1,
        "and_1943\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,29");
    add_srs_wkt (p, 2,
        "3.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-43.685,-179");
    add_srs_wkt (p, 3,
        ".785,-267.721,0,0,0,0],AUTHORITY[\"EPSG\",\"1138\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6892\"]]");
    p = add_epsg_def_ex (filter, first, last, 6893, "epsg", 6893,
        "WGS 84 / World Mercator", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Mercator_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +uni");
    add_proj4text (p, 1,
        "ts=m +geoidgrids=egm08_25.gtx +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"WGS 84 / World Mercator +  EGM2008 height\",P");
    add_srs_wkt (p, 1,
        "ROJCS[\"WGS 84 / World Mercator\",GEOGCS[\"WGS 84\",DATU");
    add_srs_wkt (p, 2,
        "M[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Mercator");
    add_srs_wkt (p, 8,
        "_1SP\"],PARAMETER[\"central_meridian\",0],PARAMETER[\"sc");
    add_srs_wkt (p, 9,
        "ale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 12,
        "ORTH],AUTHORITY[\"EPSG\",\"3395\"]],VERT_CS[\"EGM2008 ge");
    add_srs_wkt (p, 13,
        "oid height\",VERT_DATUM[\"EGM2008 geoid\",2005,EXTENSION");
    add_srs_wkt (p, 14,
        "[\"PROJ4_GRIDS\",\"egm08_25.gtx\"],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "1027\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 16,
        "AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"3855\"]],AUTHORITY[");
    add_srs_wkt (p, 17,
        "\"EPSG\",\"6893\"]]");
    p = add_epsg_def_ex (filter, first, last, 6894, "epsg", 6894,
        "Gambia", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "Gambia", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-63,176,185,0,0,0,0");
    add_proj4text (p, 1,
        " +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Gambia\",DATUM[\"Gambia\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 1,
        "0 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"");
    add_srs_wkt (p, 2,
        "]],TOWGS84[-63,176,185,0,0,0,0],AUTHORITY[\"EPSG\",\"113");
    add_srs_wkt (p, 3,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
        "EAST],AUTHORITY[\"EPSG\",\"6894\"]]");
    p = add_epsg_def_ex (filter, first, last, 6915, "epsg", 6915,
        "South East Island 1943 / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "South_East_Island_1943", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-43.685,-179.7");
    add_proj4text (p, 1,
        "85,-267.721,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"South East Island 1943 / UTM zone 40N\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"South East Island 1943\",DATUM[\"South_East_Island_194");
    add_srs_wkt (p, 2,
        "3\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.465,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-43.685,-179.785,-2");
    add_srs_wkt (p, 4,
        "67.721,0,0,0,0],AUTHORITY[\"EPSG\",\"1138\"]],PRIMEM[\"G");
    add_srs_wkt (p, 5,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 6,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 7,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 8,
        "\"EPSG\",\"6892\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",57],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"6915\"]]");
    p = add_epsg_def_ex (filter, first, last, 6917, "epsg", 6917,
        "SVY21", 1, 1,
        "WGS 84", "Greenwich",
        "SVY21", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SVY21 + SHD height\",GEOGCS[\"SVY21\",DATUM[\"");
    add_srs_wkt (p, 1,
        "SVY21\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6757\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"4757\"]],VERT_CS[\"SHD height\",VERT_D");
    add_srs_wkt (p, 7,
        "ATUM[\"Singapore Height Datum\",2005,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 8,
        "\"1140\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 9,
        "],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"6916\"]],AUTHORIT");
    add_srs_wkt (p, 10,
        "Y[\"EPSG\",\"6917\"]]");
    p = add_epsg_def_ex (filter, first, last, 6922, "epsg", 6922,
        "NAD83 / Kansas LCC", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.5 +lat_2=37.5 +lat_0=36 +lon_0=-98.2");
    add_proj4text (p, 1,
        "5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kansas LCC\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",39.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",37.5],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",36],PARAMETER[\"central_meridian\",-98.25],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",400000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6922\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 6923, "epsg", 6923,
        "NAD83 / Kansas LCC (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.5 +lat_2=37.5 +lat_0=36 +lon_0=-98.2");
    add_proj4text (p, 1,
        "5 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kansas LCC (ftUS)\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",39.5],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"standard_parallel_2\",37.5],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",36],PARAMETER[\"central_meridian\",-98.25],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",1312333.3333],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",0],UNIT[\"US survey foot\",0.3048006096012");
    add_srs_wkt (p, 13,
        "192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 14,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6923\"]]");
    p = add_epsg_def_ex (filter, first, last, 6924, "epsg", 6924,
        "NAD83(2011) / Kansas LCC", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.5 +lat_2=37.5 +lat_0=36 +lon_0=-98.2");
    add_proj4text (p, 1,
        "5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Kansas LCC\",GEOGCS[\"NAD83(2011)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_National_Spatial_Reference_System_2011\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",39.5],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"standard_parallel_2\",37.5],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 10,
        "_origin\",36],PARAMETER[\"central_meridian\",-98.25],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",400000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "6924\"]]");
    p = add_epsg_def_ex (filter, first, last, 6925, "epsg", 6925,
        "NAD83(2011) / Kansas LCC (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.5 +lat_2=37.5 +lat_0=36 +lon_0=-98.2");
    add_proj4text (p, 1,
        "5 +x_0=399999.99998984 +y_0=0 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / Kansas LCC (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",39.");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"standard_parallel_2\",37.5],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",36],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "98.25],PARAMETER[\"false_easting\",1312333.3333],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6925\"]]");
    p = add_epsg_def_ex (filter, first, last, 6927, "epsg", 6927,
        "SVY21 / Singapore TM", 0, 1,
        "WGS 84", "Greenwich",
        "SVY21", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=1.366666666666667 +lon_0=103.83333333");
    add_proj4text (p, 1,
        "33333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +u");
    add_proj4text (p, 2,
        "nits=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SVY21 / Singapore TM + SHD height\",PROJCS[\"");
    add_srs_wkt (p, 1,
        "SVY21 / Singapore TM\",GEOGCS[\"SVY21\",DATUM[\"SVY21\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6757\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4757\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",1.366666666666667],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",103.8333333333333],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",28001.64");
    add_srs_wkt (p, 11,
        "2],PARAMETER[\"false_northing\",38744.572],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH");
    add_srs_wkt (p, 13,
        "],AXIS[\"Easting\",EAST],AUTHORITY[\"EPSG\",\"3414\"]],V");
    add_srs_wkt (p, 14,
        "ERT_CS[\"SHD height\",VERT_DATUM[\"Singapore Height Datu");
    add_srs_wkt (p, 15,
        "m\",2005,AUTHORITY[\"EPSG\",\"1140\"]],UNIT[\"metre\",1,");
    add_srs_wkt (p, 16,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[");
    add_srs_wkt (p, 17,
        "\"EPSG\",\"6916\"]],AUTHORITY[\"EPSG\",\"6927\"]]");
    p = add_epsg_def_ex (filter, first, last, 6931, "epsg", 6931,
        "WGS 84 / NSIDC EASE-Grid 2.0 North", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Azimuthal_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84");
    add_proj4text (p, 1,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid 2.0 North\",GEOGCS[\"W");
    add_srs_wkt (p, 1,
        "GS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 6,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTIO");
    add_srs_wkt (p, 7,
        "N[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 8,
        "_of_center\",90],PARAMETER[\"longitude_of_center\",0],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 10,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 11,
        "\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6931\"");
    add_srs_wkt (p, 12,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 6932, "epsg", 6932,
        "WGS 84 / NSIDC EASE-Grid 2.0 South", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Azimuthal_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS8");
    add_proj4text (p, 1,
        "4 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid 2.0 South\",GEOGCS[\"W");
    add_srs_wkt (p, 1,
        "GS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 6,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTIO");
    add_srs_wkt (p, 7,
        "N[\"Lambert_Azimuthal_Equal_Area\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 8,
        "_of_center\",-90],PARAMETER[\"longitude_of_center\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"false_easting\",0],PARAMETER[\"false_northing");
    add_srs_wkt (p, 10,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 11,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"693");
    add_srs_wkt (p, 12,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 6933, "epsg", 6933,
        "WGS 84 / NSIDC EASE-Grid 2.0 Global", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Cylindrical_Equal_Area", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84");
    add_proj4text (p, 1,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / NSIDC EASE-Grid 2.0 Global\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,");
    add_srs_wkt (p, 2,
        "298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 6,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTI");
    add_srs_wkt (p, 7,
        "ON[\"Cylindrical_Equal_Area\"],PARAMETER[\"standard_para");
    add_srs_wkt (p, 8,
        "llel_1\",30],PARAMETER[\"central_meridian\",0],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"false_easting\",0],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 10,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 11,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6933\"]]");
    p = add_epsg_def_ex (filter, first, last, 6956, "epsg", 6956,
        "VN-2000 / TM-3 zone 481", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=102 +k=0.9999 +x_0=0 +y_0=50");
    add_proj4text (p, 1,
        "0000 +ellps=WGS84 +towgs84=-191.90441429,-39.30318279,-1");
    add_proj4text (p, 2,
        "11.45032835,0.00928836,-0.01975479,0.00427372,0.25290627");
    add_proj4text (p, 3,
        "8 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / TM-3 zone 481\",GEOGCS[\"VN-2000\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.257");
    add_srs_wkt (p, 2,
        "223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-191.904414");
    add_srs_wkt (p, 3,
        "29,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.0");
    add_srs_wkt (p, 4,
        "0427372,0.252906278],AUTHORITY[\"EPSG\",\"6756\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4756\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",102],PARAMETER[\"scale_factor\",0.9999],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"6956\"]]");
    p = add_epsg_def_ex (filter, first, last, 6957, "epsg", 6957,
        "VN-2000 / TM-3 zone 482", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=0.9999 +x_0=0 +y_0=50");
    add_proj4text (p, 1,
        "0000 +ellps=WGS84 +towgs84=-191.90441429,-39.30318279,-1");
    add_proj4text (p, 2,
        "11.45032835,0.00928836,-0.01975479,0.00427372,0.25290627");
    add_proj4text (p, 3,
        "8 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / TM-3 zone 482\",GEOGCS[\"VN-2000\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.257");
    add_srs_wkt (p, 2,
        "223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-191.904414");
    add_srs_wkt (p, 3,
        "29,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.0");
    add_srs_wkt (p, 4,
        "0427372,0.252906278],AUTHORITY[\"EPSG\",\"6756\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4756\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",105],PARAMETER[\"scale_factor\",0.9999],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"6957\"]]");
    p = add_epsg_def_ex (filter, first, last, 6958, "epsg", 6958,
        "VN-2000 / TM-3 zone 491", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=108 +k=0.9999 +x_0=0 +y_0=50");
    add_proj4text (p, 1,
        "0000 +ellps=WGS84 +towgs84=-191.90441429,-39.30318279,-1");
    add_proj4text (p, 2,
        "11.45032835,0.00928836,-0.01975479,0.00427372,0.25290627");
    add_proj4text (p, 3,
        "8 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / TM-3 zone 491\",GEOGCS[\"VN-2000\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.257");
    add_srs_wkt (p, 2,
        "223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-191.904414");
    add_srs_wkt (p, 3,
        "29,-39.30318279,-111.45032835,0.00928836,-0.01975479,0.0");
    add_srs_wkt (p, 4,
        "0427372,0.252906278],AUTHORITY[\"EPSG\",\"6756\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4756\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",108],PARAMETER[\"scale_factor\",0.9999],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"6958\"]]");
    p = add_epsg_def_ex (filter, first, last, 6959, "epsg", 6959,
        "VN-2000 / TM-3 Da Nang zone", 0, 0,
        "WGS 84", "Greenwich",
        "Vietnam_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=107.75 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=500000 +ellps=WGS84 +towgs84=-191.90441429,-39.30318279");
    add_proj4text (p, 2,
        ",-111.45032835,0.00928836,-0.01975479,0.00427372,0.25290");
    add_proj4text (p, 3,
        "6278 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"VN-2000 / TM-3 Da Nang zone\",GEOGCS[\"VN-2000\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Vietnam_2000\",SPHEROID[\"WGS 84\",6378137,298.");
    add_srs_wkt (p, 2,
        "257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-191.904");
    add_srs_wkt (p, 3,
        "41429,-39.30318279,-111.45032835,0.00928836,-0.01975479,");
    add_srs_wkt (p, 4,
        "0.00427372,0.252906278],AUTHORITY[\"EPSG\",\"6756\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4756\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 9,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 10,
        "entral_meridian\",107.75],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 11,
        "999],PARAMETER[\"false_easting\",0],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"6959\"]]");
    p = add_epsg_def_ex (filter, first, last, 6962, "epsg", 6962,
        "ETRS89 / Albania LCC 2010", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39 +lat_2=43 +lat_0=41 +lon_0=20 +x_0=0");
    add_proj4text (p, 1,
        " +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / Albania LCC 2010\",GEOGCS[\"ETRS89\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"European_Terrestrial_Reference_System_1989\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",39],PARAMETER[\"standard_parallel_2\",43],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",41],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",20],PARAMETER[\"false_easting\",0],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"6962\"]]");
    p = add_epsg_def_ex (filter, first, last, 6980, "epsg", 6980,
        "IGD05", 1, 1,
        "GRS 1980", "Greenwich",
        "Israeli_Geodetic_Datum_2005", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IGD05\",DATUM[\"Israeli_Geodetic_Datum_2005\",S");
    add_srs_wkt (p, 1,
        "PHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"E");
    add_srs_wkt (p, 2,
        "PSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1143\"]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 4,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 5,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"6980\"]]");
    p = add_epsg_def_ex (filter, first, last, 6983, "epsg", 6983,
        "IG05 Intermediate CRS", 1, 1,
        "GRS 1980", "Greenwich",
        "IG05_Intermediate_Datum", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IG05 Intermediate CRS\",DATUM[\"IG05_Intermedia");
    add_srs_wkt (p, 1,
        "te_Datum\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1142\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"6983\"]]");
    p = add_epsg_def_ex (filter, first, last, 6984, "epsg", 6984,
        "Israeli Grid 05", 0, 0,
        "GRS 1980", "Greenwich",
        "IG05_Intermediate_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.204516944");
    add_proj4text (p, 1,
        "44445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Israeli Grid 05\",GEOGCS[\"IG05 Intermediate CR");
    add_srs_wkt (p, 1,
        "S\",DATUM[\"IG05_Intermediate_Datum\",SPHEROID[\"GRS 198");
    add_srs_wkt (p, 2,
        "0\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"1142\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6983\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",31.73439361111111],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",35.20451694444445],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "1.0000067],PARAMETER[\"false_easting\",219529.584],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",626907.39],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"6984\"]]");
    p = add_epsg_def_ex (filter, first, last, 6987, "epsg", 6987,
        "IGD05/12", 1, 1,
        "GRS 1980", "Greenwich",
        "Israeli_Geodetic_Datum_2005_2012", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IGD05/12\",DATUM[\"Israeli_Geodetic_Datum_2005_");
    add_srs_wkt (p, 1,
        "2012\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1145\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"6987\"]]");
    p = add_epsg_def_ex (filter, first, last, 6990, "epsg", 6990,
        "IG05/12 Intermediate CRS", 1, 1,
        "GRS 1980", "Greenwich",
        "IG05_12_Intermediate_Datum", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IG05/12 Intermediate CRS\",DATUM[\"IG05_12_Inte");
    add_srs_wkt (p, 1,
        "rmediate_Datum\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "1144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"6990\"]]");
    p = add_epsg_def_ex (filter, first, last, 6991, "epsg", 6991,
        "Israeli Grid 05/12", 0, 0,
        "GRS 1980", "Greenwich",
        "IG05_12_Intermediate_Datum", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73439361111111 +lon_0=35.204516944");
    add_proj4text (p, 1,
        "44445 +k=1.0000067 +x_0=219529.584 +y_0=626907.39 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Israeli Grid 05/12\",GEOGCS[\"IG05/12 Intermedi");
    add_srs_wkt (p, 1,
        "ate CRS\",DATUM[\"IG05_12_Intermediate_Datum\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],AUTHORITY[\"EPSG\",\"1144\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"6990\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",31.73439361111111],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",35.20451694444445],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.0000067],PARAMETER[\"false_easting\",219529.5");
    add_srs_wkt (p, 11,
        "84],PARAMETER[\"false_northing\",626907.39],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST");
    add_srs_wkt (p, 13,
        "],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"6991\"]]");
    p = add_epsg_def_ex (filter, first, last, 6996, "epsg", 6996,
        "NAD83(2011) / San Francisco CS13 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-122.45 +k=1.000007 +x_0");
    add_proj4text (p, 1,
        "=48000 +y_0=24000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / San Francisco CS13 (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",37.75],PARAMETER[\"central_meridian\",-122.45],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1.000007],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",48000],PARAMETER[\"false_northing\",24000],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"6996\"]]");
    p = add_epsg_def_ex (filter, first, last, 6997, "epsg", 6997,
        "NAD83(2011) / San Francisco CS13 (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-122.45 +k=1.000007 +x_0");
    add_proj4text (p, 1,
        "=48000 +y_0=24000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / San Francisco CS13 (ftUS) (deprec");
    add_srs_wkt (p, 1,
        "ated)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",37.75],PARAMETER[\"central_meridian\",-122.45],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1.000007],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",157480],PARAMETER[\"false_northing\",78740],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"6997\"]]");
    p = add_epsg_def_ex (filter, first, last, 7005, "epsg", 7005,
        "Nahrwan 1934 / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1934 / UTM zone 37N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1934\",DATUM[\"Nahrwan_1934\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6744\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4744\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",39],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7005\"]]");
    p = add_epsg_def_ex (filter, first, last, 7006, "epsg", 7006,
        "Nahrwan 1934 / UTM zone 38N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1934 / UTM zone 38N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1934\",DATUM[\"Nahrwan_1934\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6744\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4744\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",45],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7006\"]]");
    p = add_epsg_def_ex (filter, first, last, 7007, "epsg", 7007,
        "Nahrwan 1934 / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1934", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1934 / UTM zone 39N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1934\",DATUM[\"Nahrwan_1934\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6744\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4744\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",51],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7007\"]]");
    p = add_epsg_def_ex (filter, first, last, 7035, "epsg", 7035,
        "RGSPM06 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_Saint_Pierre_et_Miquelon_2006", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGSPM06 (lon-lat)\",DATUM[\"Reseau_Geodesique_d");
    add_srs_wkt (p, 1,
        "e_Saint_Pierre_et_Miquelon_2006\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"1038\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lon\",EAST],AXIS[");
    add_srs_wkt (p, 6,
        "\"Lat\",NORTH],AUTHORITY[\"EPSG\",\"7035\"]]");
    p = add_epsg_def_ex (filter, first, last, 7037, "epsg", 7037,
        "RGR92 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_la_Reunion_1992", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGR92 (lon-lat)\",DATUM[\"Reseau_Geodesique_de_");
    add_srs_wkt (p, 1,
        "la_Reunion_1992\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 2,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6627\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Lon\",EAST],AXIS[\"Lat\",NORTH],AU");
    add_srs_wkt (p, 6,
        "THORITY[\"EPSG\",\"7037\"]]");
    p = add_epsg_def_ex (filter, first, last, 7039, "epsg", 7039,
        "RGM04 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_de_Mayotte_2004", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGM04 (lon-lat)\",DATUM[\"Reseau_Geodesique_de_");
    add_srs_wkt (p, 1,
        "Mayotte_2004\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 2,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"10");
    add_srs_wkt (p, 3,
        "36\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Lon\",EAST],AXIS[\"Lat\",NORTH],AUTHO");
    add_srs_wkt (p, 6,
        "RITY[\"EPSG\",\"7039\"]]");
    p = add_epsg_def_ex (filter, first, last, 7041, "epsg", 7041,
        "RGFG95 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_Francais_Guyane_1995", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGFG95 (lon-lat)\",DATUM[\"Reseau_Geodesique_Fr");
    add_srs_wkt (p, 1,
        "ancais_Guyane_1995\",SPHEROID[\"GRS 1980\",6378137,298.2");
    add_srs_wkt (p, 2,
        "57222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6624\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Lon\",EAST],AXIS[\"Lat\",NORTH]");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"7041\"]]");
    p = add_epsg_def_ex (filter, first, last, 7057, "epsg", 7057,
        "NAD83(2011) / IaRCS zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.2 +lat_0=43.2 +lon_0=-95.25 +k_0=1.0");
    add_proj4text (p, 1,
        "00052 +x_0=3505207.010414021 +y_0=2926085.852171705 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 1\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43.2],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-95.25],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000052],PARAMETER[\"false_easting\",11500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",9600000.000000002],UNIT[\"US");
    add_srs_wkt (p, 12,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"7057\"]]");
    p = add_epsg_def_ex (filter, first, last, 7058, "epsg", 7058,
        "NAD83(2011) / IaRCS zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.16666666666666 +lat_0=43.16666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-92.75 +k_0=1.000043 +x_0=3810007.62001524 +y");
    add_proj4text (p, 2,
        "_0=2987045.974091948 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 2\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43.166666");
    add_srs_wkt (p, 9,
        "66666666],PARAMETER[\"central_meridian\",-92.75],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.000043],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",12500000],PARAMETER[\"false_northing\",9800000.00000000");
    add_srs_wkt (p, 12,
        "2],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"7058\"]]");
    p = add_epsg_def_ex (filter, first, last, 7059, "epsg", 7059,
        "NAD83(2011) / IaRCS zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-91.2 +k=1.000035 +x_0=4");
    add_proj4text (p, 1,
        "114808.229616459 +y_0=2529845.05969012 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 3\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-91.2],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        ".000035],PARAMETER[\"false_easting\",13500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",8300000.000000002],UNIT[\"US survey ");
    add_srs_wkt (p, 12,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7059\"]]");
    p = add_epsg_def_ex (filter, first, last, 7060, "epsg", 7060,
        "NAD83(2011) / IaRCS zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.53333333333333 +lat_0=42.53333333333");
    add_proj4text (p, 1,
        "333 +lon_0=-94.83333333333333 +k_0=1.000045 +x_0=4419608");
    add_proj4text (p, 2,
        ".839217679 +y_0=2621285.242570485 +ellps=GRS80 +units=us");
    add_proj4text (p, 3,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 4\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",42.533333");
    add_srs_wkt (p, 9,
        "33333333],PARAMETER[\"central_meridian\",-94.83333333333");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"scale_factor\",1.000045],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",14500000],PARAMETER[\"false_northing\",860");
    add_srs_wkt (p, 12,
        "0000.000000002],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 13,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7060\"]]");
    p = add_epsg_def_ex (filter, first, last, 7061, "epsg", 7061,
        "NAD83(2011) / IaRCS zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.65 +lat_0=42.65 +lon_0=-92.25 +k_0=1");
    add_proj4text (p, 1,
        ".000032 +x_0=4724409.448818898 +y_0=2712725.425450851 +e");
    add_proj4text (p, 2,
        "llps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 5\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",42.65],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-92.25],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.000032],PARAMETER[\"false_easting\",15500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",8900000.000000002],UNIT[\"U");
    add_srs_wkt (p, 12,
        "S survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"7061\"]]");
    p = add_epsg_def_ex (filter, first, last, 7062, "epsg", 7062,
        "NAD83(2011) / IaRCS zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-95.73333333333333 +k=1.");
    add_proj4text (p, 1,
        "000039 +x_0=5029210.058420117 +y_0=2011684.023368047 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 6\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-95.73333333333333],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000039],PARAMETER[\"false_easting\",165000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",6600000.000000002],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7062\"]]");
    p = add_epsg_def_ex (filter, first, last, 7063, "epsg", 7063,
        "NAD83(2011) / IaRCS zone 7", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-94.63333333333334 +k=1.");
    add_proj4text (p, 1,
        "000045 +x_0=5334010.668021336 +y_0=2072644.145288291 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 7\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-94.63333333333334],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000045],PARAMETER[\"false_easting\",175000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",6800000.000000002],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7063\"]]");
    p = add_epsg_def_ex (filter, first, last, 7064, "epsg", 7064,
        "NAD83(2011) / IaRCS zone 8", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-93.71666666666667 +k=1.");
    add_proj4text (p, 1,
        "000033 +x_0=5638811.277622555 +y_0=2133604.267208535 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 8\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-93.71666666666667],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000033],PARAMETER[\"false_easting\",185000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",7000000.000000002],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7064\"]]");
    p = add_epsg_def_ex (filter, first, last, 7065, "epsg", 7065,
        "NAD83(2011) / IaRCS zone 9", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-92.81666666666666 +k=1.");
    add_proj4text (p, 1,
        "000027 +x_0=5943611.887223775 +y_0=2194564.389128779 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 9\",GEOGCS[\"NAD83(201");
    add_srs_wkt (p, 1,
        "1)\",DATUM[\"NAD83_National_Spatial_Reference_System_201");
    add_srs_wkt (p, 2,
        "1\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-92.81666666666666],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000027],PARAMETER[\"false_easting\",195000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",7200000.000000002],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7065\"]]");
    p = add_epsg_def_ex (filter, first, last, 7066, "epsg", 7066,
        "NAD83(2011) / IaRCS zone 10", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.83333333333334 +lat_0=41.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-91.66666666666667 +k_0=1.00002 +x_0=6248412.");
    add_proj4text (p, 2,
        "496824994 +y_0=2438404.876809754 +ellps=GRS80 +units=us-");
    add_proj4text (p, 3,
        "ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 10\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",41.833333");
    add_srs_wkt (p, 9,
        "33333334],PARAMETER[\"central_meridian\",-91.66666666666");
    add_srs_wkt (p, 10,
        "667],PARAMETER[\"scale_factor\",1.00002],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",20500000],PARAMETER[\"false_northing\",8000");
    add_srs_wkt (p, 12,
        "000.000000002],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 13,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7066\"]]");
    p = add_epsg_def_ex (filter, first, last, 7067, "epsg", 7067,
        "NAD83(2011) / IaRCS zone 11", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-90.53333333333333 +k=1.");
    add_proj4text (p, 1,
        "000027 +x_0=6553213.106426213 +y_0=2316484.632969266 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 11\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-90.53333333333333],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000027],PARAMETER[\"false_easting\",215000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",7600000.000000002],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7067\"]]");
    p = add_epsg_def_ex (filter, first, last, 7068, "epsg", 7068,
        "NAD83(2011) / IaRCS zone 12", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.91666666666666 +lat_0=40.91666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-93.75 +k_0=1.000037 +x_0=6858013.716027432 +");
    add_proj4text (p, 2,
        "y_0=1889763.779527559 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 12\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",40.916666");
    add_srs_wkt (p, 9,
        "66666666],PARAMETER[\"central_meridian\",-93.75],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.000037],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",22500000],PARAMETER[\"false_northing\",6200000.00000000");
    add_srs_wkt (p, 12,
        "2],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"7068\"]]");
    p = add_epsg_def_ex (filter, first, last, 7069, "epsg", 7069,
        "NAD83(2011) / IaRCS zone 13", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-91.91666666666667 +k=1.");
    add_proj4text (p, 1,
        "00002 +x_0=7162814.325628651 +y_0=1950723.901447803 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 13\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-91.91666666666667],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.00002],PARAMETER[\"false_easting\",2350000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",6400000.000000002],UNIT[");
    add_srs_wkt (p, 12,
        "\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7069\"]]");
    p = add_epsg_def_ex (filter, first, last, 7070, "epsg", 7070,
        "NAD83(2011) / IaRCS zone 14", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.25 +lon_0=-91.25 +k=1.000018 +x_0=");
    add_proj4text (p, 1,
        "7467614.93522987 +y_0=1889763.779527559 +ellps=GRS80 +un");
    add_proj4text (p, 2,
        "its=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / IaRCS zone 14\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.25],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-91.25],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "1.000018],PARAMETER[\"false_easting\",24500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",6200000.000000002],UNIT[\"US survey");
    add_srs_wkt (p, 12,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7070\"]]");
    p = add_epsg_def_ex (filter, first, last, 7073, "epsg", 7073,
        "RGTAAF07", 1, 1,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGTAAF07\",DATUM[\"Reseau_Geodesique_des_Terres");
    add_srs_wkt (p, 1,
        "_Australes_et_Antarctiques_Francaises_2007\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "19\"]],AUTHORITY[\"EPSG\",\"1113\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "7073\"]]");
    p = add_epsg_def_ex (filter, first, last, 7074, "epsg", 7074,
        "RGTAAF07 / UTM zone 37S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 37S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7074\"]]");
    p = add_epsg_def_ex (filter, first, last, 7075, "epsg", 7075,
        "RGTAAF07 / UTM zone 38S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 38S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7075\"]]");
    p = add_epsg_def_ex (filter, first, last, 7076, "epsg", 7076,
        "RGTAAF07 / UTM zone 39S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 39S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7076\"]]");
    p = add_epsg_def_ex (filter, first, last, 7077, "epsg", 7077,
        "RGTAAF07 / UTM zone 40S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 40S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7077\"]]");
    p = add_epsg_def_ex (filter, first, last, 7078, "epsg", 7078,
        "RGTAAF07 / UTM zone 41S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 41S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7078\"]]");
    p = add_epsg_def_ex (filter, first, last, 7079, "epsg", 7079,
        "RGTAAF07 / UTM zone 42S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 42S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7079\"]]");
    p = add_epsg_def_ex (filter, first, last, 7080, "epsg", 7080,
        "RGTAAF07 / UTM zone 43S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 43S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7080\"]]");
    p = add_epsg_def_ex (filter, first, last, 7081, "epsg", 7081,
        "RGTAAF07 / UTM zone 44S", 0, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RGTAAF07 / UTM zone 44S\",GEOGCS[\"RGTAAF07\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Reseau_Geodesique_des_Terres_Australes_et_Antarct");
    add_srs_wkt (p, 2,
        "iques_Francaises_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"1113\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"7073\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7081\"]]");
    p = add_epsg_def_ex (filter, first, last, 7084, "epsg", 7084,
        "RGF93 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_Francais_1993", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGF93 (lon-lat)\",DATUM[\"Reseau_Geodesique_Fra");
    add_srs_wkt (p, 1,
        "ncais_1993\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6171");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"9122\"]],AXIS[\"Lon\",EAST],AXIS[\"Lat\",NORTH],AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"7084\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955





























































































































































































































































































































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_34 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 20032, "epsg", 20032,
        "Pulkovo 1995 / Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13");
    add_proj4text (p, 2,
        ",-0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 32\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-171],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",3250000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"20032\"]]");
    p = add_epsg_def_ex (filter, first, last, 20064, "epsg", 20064,
        "Pulkovo 1995 / Gauss-Kruger 4N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 4N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",21],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20064\"]]");
    p = add_epsg_def_ex (filter, first, last, 20065, "epsg", 20065,
        "Pulkovo 1995 / Gauss-Kruger 5N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 5N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",27],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20065\"]]");
    p = add_epsg_def_ex (filter, first, last, 20066, "epsg", 20066,
        "Pulkovo 1995 / Gauss-Kruger 6N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 6N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",33],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20066\"]]");
    p = add_epsg_def_ex (filter, first, last, 20067, "epsg", 20067,
        "Pulkovo 1995 / Gauss-Kruger 7N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 7N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",39],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20067\"]]");
    p = add_epsg_def_ex (filter, first, last, 20068, "epsg", 20068,
        "Pulkovo 1995 / Gauss-Kruger 8N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 8N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",45],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20068\"]]");
    p = add_epsg_def_ex (filter, first, last, 20069, "epsg", 20069,
        "Pulkovo 1995 / Gauss-Kruger 9N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 9N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",51],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20069\"]]");
    p = add_epsg_def_ex (filter, first, last, 20070, "epsg", 20070,
        "Pulkovo 1995 / Gauss-Kruger 10N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 10N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20070\"]]");
    p = add_epsg_def_ex (filter, first, last, 20071, "epsg", 20071,
        "Pulkovo 1995 / Gauss-Kruger 11N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 11N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",63],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20071\"]]");
    p = add_epsg_def_ex (filter, first, last, 20072, "epsg", 20072,
        "Pulkovo 1995 / Gauss-Kruger 12N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 12N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",69],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20072\"]]");
    p = add_epsg_def_ex (filter, first, last, 20073, "epsg", 20073,
        "Pulkovo 1995 / Gauss-Kruger 13N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 13N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",75],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20073\"]]");
    p = add_epsg_def_ex (filter, first, last, 20074, "epsg", 20074,
        "Pulkovo 1995 / Gauss-Kruger 14N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 14N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",81],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20074\"]]");
    p = add_epsg_def_ex (filter, first, last, 20075, "epsg", 20075,
        "Pulkovo 1995 / Gauss-Kruger 15N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 15N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",87],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20075\"]]");
    p = add_epsg_def_ex (filter, first, last, 20076, "epsg", 20076,
        "Pulkovo 1995 / Gauss-Kruger 16N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 16N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",93],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20076\"]]");
    p = add_epsg_def_ex (filter, first, last, 20077, "epsg", 20077,
        "Pulkovo 1995 / Gauss-Kruger 17N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 17N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",99],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20077\"]]");
    p = add_epsg_def_ex (filter, first, last, 20078, "epsg", 20078,
        "Pulkovo 1995 / Gauss-Kruger 18N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 18N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20078\"]]");
    p = add_epsg_def_ex (filter, first, last, 20079, "epsg", 20079,
        "Pulkovo 1995 / Gauss-Kruger 19N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 19N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20079\"]]");
    p = add_epsg_def_ex (filter, first, last, 20080, "epsg", 20080,
        "Pulkovo 1995 / Gauss-Kruger 20N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 20N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20080\"]]");
    p = add_epsg_def_ex (filter, first, last, 20081, "epsg", 20081,
        "Pulkovo 1995 / Gauss-Kruger 21N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 21N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20081\"]]");
    p = add_epsg_def_ex (filter, first, last, 20082, "epsg", 20082,
        "Pulkovo 1995 / Gauss-Kruger 22N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 22N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20082\"]]");
    p = add_epsg_def_ex (filter, first, last, 20083, "epsg", 20083,
        "Pulkovo 1995 / Gauss-Kruger 23N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 23N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20083\"]]");
    p = add_epsg_def_ex (filter, first, last, 20084, "epsg", 20084,
        "Pulkovo 1995 / Gauss-Kruger 24N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 24N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20084\"]]");
    p = add_epsg_def_ex (filter, first, last, 20085, "epsg", 20085,
        "Pulkovo 1995 / Gauss-Kruger 25N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 25N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20085\"]]");
    p = add_epsg_def_ex (filter, first, last, 20086, "epsg", 20086,
        "Pulkovo 1995 / Gauss-Kruger 26N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 26N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20086\"]]");
    p = add_epsg_def_ex (filter, first, last, 20087, "epsg", 20087,
        "Pulkovo 1995 / Gauss-Kruger 27N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 27N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20087\"]]");
    p = add_epsg_def_ex (filter, first, last, 20088, "epsg", 20088,
        "Pulkovo 1995 / Gauss-Kruger 28N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 28N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20088\"]]");
    p = add_epsg_def_ex (filter, first, last, 20089, "epsg", 20089,
        "Pulkovo 1995 / Gauss-Kruger 29N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 29N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20089\"]]");
    p = add_epsg_def_ex (filter, first, last, 20090, "epsg", 20090,
        "Pulkovo 1995 / Gauss-Kruger 30N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 30N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20090\"]]");
    p = add_epsg_def_ex (filter, first, last, 20091, "epsg", 20091,
        "Pulkovo 1995 / Gauss-Kruger 31N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 31N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20091\"]]");
    p = add_epsg_def_ex (filter, first, last, 20092, "epsg", 20092,
        "Pulkovo 1995 / Gauss-Kruger 32N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,-0,-0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 32N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,-0,-0,0.13,-0.22],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20092\"]]");
    p = add_epsg_def_ex (filter, first, last, 20135, "epsg", 20135,
        "Adindan / UTM zone 35N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 35N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20135\"]]");
    p = add_epsg_def_ex (filter, first, last, 20136, "epsg", 20136,
        "Adindan / UTM zone 36N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 36N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",33],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20136\"]]");
    p = add_epsg_def_ex (filter, first, last, 20137, "epsg", 20137,
        "Adindan / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 37N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20137\"]]");
    p = add_epsg_def_ex (filter, first, last, 20138, "epsg", 20138,
        "Adindan / UTM zone 38N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 38N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",45],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20138\"]]");
    p = add_epsg_def_ex (filter, first, last, 20248, "epsg", 20248,
        "AGD66 / AMG zone 48 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 48 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "66\",DATUM[\"Australian_Geodetic_Datum_1966\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-117.808,-51.536,137.784,0.3");
    add_srs_wkt (p, 4,
        "03,0.446,0.234,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIM");
    add_srs_wkt (p, 5,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4202\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",105],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"20248\"]]");
    p = add_epsg_def_ex (filter, first, last, 20249, "epsg", 20249,
        "AGD66 / AMG zone 49", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 49\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20249\"]]");
    p = add_epsg_def_ex (filter, first, last, 20250, "epsg", 20250,
        "AGD66 / AMG zone 50", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 50\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20250\"]]");
    p = add_epsg_def_ex (filter, first, last, 20251, "epsg", 20251,
        "AGD66 / AMG zone 51", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 51\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20251\"]]");
    p = add_epsg_def_ex (filter, first, last, 20252, "epsg", 20252,
        "AGD66 / AMG zone 52", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 52\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",129],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20252\"]]");
    p = add_epsg_def_ex (filter, first, last, 20253, "epsg", 20253,
        "AGD66 / AMG zone 53", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 53\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",135],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20253\"]]");
    p = add_epsg_def_ex (filter, first, last, 20254, "epsg", 20254,
        "AGD66 / AMG zone 54", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 54\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",141],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20254\"]]");
    p = add_epsg_def_ex (filter, first, last, 20255, "epsg", 20255,
        "AGD66 / AMG zone 55", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 55\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",147],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20255\"]]");
    p = add_epsg_def_ex (filter, first, last, 20256, "epsg", 20256,
        "AGD66 / AMG zone 56", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 56\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",153],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20256\"]]");
    p = add_epsg_def_ex (filter, first, last, 20257, "epsg", 20257,
        "AGD66 / AMG zone 57", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 57\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",159],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20257\"]]");
    p = add_epsg_def_ex (filter, first, last, 20258, "epsg", 20258,
        "AGD66 / AMG zone 58", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 58\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",165],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20258\"]]");
    p = add_epsg_def_ex (filter, first, last, 20348, "epsg", 20348,
        "AGD84 / AMG zone 48 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 48 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"Australian_Geodetic_Datum_1984\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",105],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2034");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 20349, "epsg", 20349,
        "AGD84 / AMG zone 49", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 49\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",111],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20349\"]]");
    p = add_epsg_def_ex (filter, first, last, 20350, "epsg", 20350,
        "AGD84 / AMG zone 50", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 50\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",117],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20350\"]]");
    p = add_epsg_def_ex (filter, first, last, 20351, "epsg", 20351,
        "AGD84 / AMG zone 51", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 51\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",123],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20351\"]]");
    p = add_epsg_def_ex (filter, first, last, 20352, "epsg", 20352,
        "AGD84 / AMG zone 52", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 52\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",129],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20352\"]]");
    p = add_epsg_def_ex (filter, first, last, 20353, "epsg", 20353,
        "AGD84 / AMG zone 53", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 53\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",135],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20353\"]]");
    p = add_epsg_def_ex (filter, first, last, 20354, "epsg", 20354,
        "AGD84 / AMG zone 54", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 54\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",141],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20354\"]]");
    p = add_epsg_def_ex (filter, first, last, 20355, "epsg", 20355,
        "AGD84 / AMG zone 55", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 55\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",147],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20355\"]]");
    p = add_epsg_def_ex (filter, first, last, 20356, "epsg", 20356,
        "AGD84 / AMG zone 56", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 56\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",153],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20356\"]]");
    p = add_epsg_def_ex (filter, first, last, 20357, "epsg", 20357,
        "AGD84 / AMG zone 57 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 57 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"Australian_Geodetic_Datum_1984\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",159],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2035");
    add_srs_wkt (p, 14,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 20358, "epsg", 20358,
        "AGD84 / AMG zone 58 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 58 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"Australian_Geodetic_Datum_1984\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",165],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2035");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 20436, "epsg", 20436,
        "Ain el Abd / UTM zone 36N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 36N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",33],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20436\"]]");
    p = add_epsg_def_ex (filter, first, last, 20437, "epsg", 20437,
        "Ain el Abd / UTM zone 37N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 37N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20437\"]]");
    p = add_epsg_def_ex (filter, first, last, 20438, "epsg", 20438,
        "Ain el Abd / UTM zone 38N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 38N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",45],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20438\"]]");
    p = add_epsg_def_ex (filter, first, last, 20439, "epsg", 20439,
        "Ain el Abd / UTM zone 39N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 39N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",51],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20439\"]]");
    p = add_epsg_def_ex (filter, first, last, 20440, "epsg", 20440,
        "Ain el Abd / UTM zone 40N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 40N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",57],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20440\"]]");
    p = add_epsg_def_ex (filter, first, last, 20499, "epsg", 20499,
        "Ain el Abd / Bahrain Grid", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / Bahrain Grid\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",51],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20499\"]]");
    p = add_epsg_def_ex (filter, first, last, 20538, "epsg", 20538,
        "Afgooye / UTM zone 38N", 0, 0,
        "Krassowsky 1940", "Greenwich",
        "Afgooye", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Afgooye / UTM zone 38N\",GEOGCS[\"Afgooye\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Afgooye\",SPHEROID[\"Krassowsky 1940\",6378245,298.");
    add_srs_wkt (p, 2,
        "3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[-43,-163,45,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6205\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4205\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",4");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"205");
    add_srs_wkt (p, 13,
        "38\"]]");
    p = add_epsg_def_ex (filter, first, last, 20539, "epsg", 20539,
        "Afgooye / UTM zone 39N", 0, 0,
        "Krassowsky 1940", "Greenwich",
        "Afgooye", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Afgooye / UTM zone 39N\",GEOGCS[\"Afgooye\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Afgooye\",SPHEROID[\"Krassowsky 1940\",6378245,298.");
    add_srs_wkt (p, 2,
        "3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[-43,-163,45,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6205\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4205\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",5");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"205");
    add_srs_wkt (p, 13,
        "39\"]]");
    p = add_epsg_def_ex (filter, first, last, 20790, "epsg", 20790,
        "Lisbon (Lisbon) / Portuguese National Grid", 0, 0,
        "International 1924", "Lisbon",
        "Lisbon_1937_Lisbon", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=");
    add_proj4text (p, 1,
        "200000 +y_0=300000 +ellps=intl +towgs84=-304.046,-60.576");
    add_proj4text (p, 2,
        ",103.64,0,0,0,0 +pm=lisbon +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Lisbon (Lisbon) / Portuguese National Grid\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"Lisbon (Lisbon)\",DATUM[\"Lisbon_1937_Lisbon\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"International 1924\",6378388,297,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7022\"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6803\"]],PRIMEM[\"Lisbon\",-9.1319");
    add_srs_wkt (p, 5,
        "06111111112,AUTHORITY[\"EPSG\",\"8902\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4803\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",39.66666666666666],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",1],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",200000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"20790\"]]");
    p = add_epsg_def_ex (filter, first, last, 20791, "epsg", 20791,
        "Lisbon (Lisbon) / Portuguese Grid", 0, 0,
        "International 1924", "Lisbon",
        "Lisbon_1937_Lisbon", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=0 +ellps=intl +towgs84=-304.046,-60.576,103.64,0,");
    add_proj4text (p, 2,
        "0,0,0 +pm=lisbon +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Lisbon (Lisbon) / Portuguese Grid\",GEOGCS[\"Li");
    add_srs_wkt (p, 1,
        "sbon (Lisbon)\",DATUM[\"Lisbon_1937_Lisbon\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6803\"]],PRIMEM[\"Lisbon\",-9.1319061111111");
    add_srs_wkt (p, 5,
        "12,AUTHORITY[\"EPSG\",\"8902\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4803\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",39.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",1],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",0],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"20791\"]]");
    p = add_epsg_def_ex (filter, first, last, 20822, "epsg", 20822,
        "Aratu / UTM zone 22S", 0, 0,
        "International 1924", "Greenwich",
        "Aratu", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=intl +towgs84=-151.99,2");
    add_proj4text (p, 1,
        "87.04,-147.45,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Aratu / UTM zone 22S\",GEOGCS[\"Aratu\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Aratu\",SPHEROID[\"International 1924\",6378388,297,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7022\"]],TOWGS84[-151.99,287.04,-147.45");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6208\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4208\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-51],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"20822\"]]");
    p = add_epsg_def_ex (filter, first, last, 20823, "epsg", 20823,
        "Aratu / UTM zone 23S", 0, 0,
        "International 1924", "Greenwich",
        "Aratu", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=intl +towgs84=-151.99,2");
    add_proj4text (p, 1,
        "87.04,-147.45,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Aratu / UTM zone 23S\",GEOGCS[\"Aratu\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Aratu\",SPHEROID[\"International 1924\",6378388,297,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7022\"]],TOWGS84[-151.99,287.04,-147.45");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6208\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4208\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-45],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"20823\"]]");
    p = add_epsg_def_ex (filter, first, last, 20824, "epsg", 20824,
        "Aratu / UTM zone 24S", 0, 0,
        "International 1924", "Greenwich",
        "Aratu", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=intl +towgs84=-151.99,2");
    add_proj4text (p, 1,
        "87.04,-147.45,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Aratu / UTM zone 24S\",GEOGCS[\"Aratu\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Aratu\",SPHEROID[\"International 1924\",6378388,297,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7022\"]],TOWGS84[-151.99,287.04,-147.45");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6208\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4208\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-39],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"20824\"]]");
    p = add_epsg_def_ex (filter, first, last, 20934, "epsg", 20934,
        "Arc 1950 / UTM zone 34S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Arc_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1950 / UTM zone 34S\",GEOGCS[\"Arc 1950\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1950\",SPHEROID[\"Clarke 1880 (Arc)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-90,-294,0,0,0,0],AUTHORITY[\"EPSG\",\"6209\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4209\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",21],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20934\"]]");
    p = add_epsg_def_ex (filter, first, last, 20935, "epsg", 20935,
        "Arc 1950 / UTM zone 35S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Arc_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1950 / UTM zone 35S\",GEOGCS[\"Arc 1950\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1950\",SPHEROID[\"Clarke 1880 (Arc)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-90,-294,0,0,0,0],AUTHORITY[\"EPSG\",\"6209\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4209\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",27],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20935\"]]");
    p = add_epsg_def_ex (filter, first, last, 20936, "epsg", 20936,
        "Arc 1950 / UTM zone 36S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Arc_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1950 / UTM zone 36S\",GEOGCS[\"Arc 1950\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1950\",SPHEROID[\"Clarke 1880 (Arc)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-90,-294,0,0,0,0],AUTHORITY[\"EPSG\",\"6209\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4209\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",33],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20936\"]]");
    p = add_epsg_def_ex (filter, first, last, 21035, "epsg", 21035,
        "Arc 1960 / UTM zone 35S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +ellps=clrk80 +towgs84=-160,-6");
    add_proj4text (p, 1,
        ",-302,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 35S\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",27],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21035\"]]");
    p = add_epsg_def_ex (filter, first, last, 21036, "epsg", 21036,
        "Arc 1960 / UTM zone 36S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=clrk80 +towgs84=-160,-6");
    add_proj4text (p, 1,
        ",-302,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 36S\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",33],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21036\"]]");
    p = add_epsg_def_ex (filter, first, last, 21037, "epsg", 21037,
        "Arc 1960 / UTM zone 37S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=clrk80 +towgs84=-160,-6");
    add_proj4text (p, 1,
        ",-302,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 37S\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21037\"]]");
    p = add_epsg_def_ex (filter, first, last, 21095, "epsg", 21095,
        "Arc 1960 / UTM zone 35N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=clrk80 +towgs84=-160,-6,-302,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 35N\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",27],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21095\"]]");
    p = add_epsg_def_ex (filter, first, last, 21096, "epsg", 21096,
        "Arc 1960 / UTM zone 36N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=clrk80 +towgs84=-160,-6,-302,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 36N\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",33],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21096\"]]");
    p = add_epsg_def_ex (filter, first, last, 21097, "epsg", 21097,
        "Arc 1960 / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-160,-6,-302,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 37N\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21097\"]]");
    p = add_epsg_def_ex (filter, first, last, 21100, "epsg", 21100,
        "Batavia (Jakarta) / NEIEZ (deprecated)", 0, 0,
        "Bessel 1841", "Jakarta",
        "Batavia_Jakarta", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +pm=jakarta ");
    add_proj4text (p, 2,
        "+units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia (Jakarta) / NEIEZ (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Batavia (Jakarta)\",DATUM[\"Batavia_Jakarta\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7004\"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6813\"]],PRIMEM[\"Jakarta\",106.8077194444444");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8908\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"48");
    add_srs_wkt (p, 8,
        "13\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",110],PARAMETER[\"scale_factor\",0.997],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",3900000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",900000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"21100\"]]");
    p = add_epsg_def_ex (filter, first, last, 21148, "epsg", 21148,
        "Batavia / UTM zone 48S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Batavia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=bessel +towgs84=-377,68");
    add_proj4text (p, 1,
        "1,-50,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia / UTM zone 48S\",GEOGCS[\"Batavia\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Batavia\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-377,681,-");
    add_srs_wkt (p, 3,
        "50,0,0,0,0],AUTHORITY[\"EPSG\",\"6211\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4211\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",105],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"21148\"]]");
    p = add_epsg_def_ex (filter, first, last, 21149, "epsg", 21149,
        "Batavia / UTM zone 49S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Batavia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=bessel +towgs84=-377,68");
    add_proj4text (p, 1,
        "1,-50,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia / UTM zone 49S\",GEOGCS[\"Batavia\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Batavia\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-377,681,-");
    add_srs_wkt (p, 3,
        "50,0,0,0,0],AUTHORITY[\"EPSG\",\"6211\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4211\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"21149\"]]");
    p = add_epsg_def_ex (filter, first, last, 21150, "epsg", 21150,
        "Batavia / UTM zone 50S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Batavia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=bessel +towgs84=-377,68");
    add_proj4text (p, 1,
        "1,-50,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia / UTM zone 50S\",GEOGCS[\"Batavia\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Batavia\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-377,681,-");
    add_srs_wkt (p, 3,
        "50,0,0,0,0],AUTHORITY[\"EPSG\",\"6211\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4211\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"21150\"]]");
    p = add_epsg_def_ex (filter, first, last, 21291, "epsg", 21291,
        "Barbados 1938 / British West Indies Grid", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Barbados_1938", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x");
    add_proj4text (p, 1,
        "_0=400000 +y_0=0 +ellps=clrk80 +towgs84=31.95,300.99,419");
    add_proj4text (p, 2,
        ".19,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Barbados 1938 / British West Indies Grid\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Barbados 1938\",DATUM[\"Barbados_1938\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7012\"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6212\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4212\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",-62],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9995],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",400000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"21291\"]]");
    p = add_epsg_def_ex (filter, first, last, 21292, "epsg", 21292,
        "Barbados 1938 / Barbados National Grid", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Barbados_1938", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222");
    add_proj4text (p, 1,
        "222222 +k=0.9999986 +x_0=30000 +y_0=75000 +ellps=clrk80 ");
    add_proj4text (p, 2,
        "+towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Barbados 1938 / Barbados National Grid\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Barbados 1938\",DATUM[\"Barbados_1938\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7012\"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"6212\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4212\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",13.17638888888889],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-59.55972222222222],PARAMETER[\"scale_factor\",0.999");
    add_srs_wkt (p, 11,
        "9986],PARAMETER[\"false_easting\",30000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",75000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"21292\"]]");
    p = add_epsg_def_ex (filter, first, last, 21413, "epsg", 21413,
        "Beijing 1954 / Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 13\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",75],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",13500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21413\"]]");
    p = add_epsg_def_ex (filter, first, last, 21414, "epsg", 21414,
        "Beijing 1954 / Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 14\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",81],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",14500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21414\"]]");
    p = add_epsg_def_ex (filter, first, last, 21415, "epsg", 21415,
        "Beijing 1954 / Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 15\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",87],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",15500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21415\"]]");
    p = add_epsg_def_ex (filter, first, last, 21416, "epsg", 21416,
        "Beijing 1954 / Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 16\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",93],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",16500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21416\"]]");
    p = add_epsg_def_ex (filter, first, last, 21417, "epsg", 21417,
        "Beijing 1954 / Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 17\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",99],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",17500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21417\"]]");
    p = add_epsg_def_ex (filter, first, last, 21418, "epsg", 21418,
        "Beijing 1954 / Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 18\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",105],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",18500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21418\"]]");
    p = add_epsg_def_ex (filter, first, last, 21419, "epsg", 21419,
        "Beijing 1954 / Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 19\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",111],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",19500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21419\"]]");
    p = add_epsg_def_ex (filter, first, last, 21420, "epsg", 21420,
        "Beijing 1954 / Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 20\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",117],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",20500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21420\"]]");
    p = add_epsg_def_ex (filter, first, last, 21421, "epsg", 21421,
        "Beijing 1954 / Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 21\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",123],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",21500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21421\"]]");
    p = add_epsg_def_ex (filter, first, last, 21422, "epsg", 21422,
        "Beijing 1954 / Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 22\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",129],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",22500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21422\"]]");
    p = add_epsg_def_ex (filter, first, last, 21423, "epsg", 21423,
        "Beijing 1954 / Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 23\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",135],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",23500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21423\"]]");
    p = add_epsg_def_ex (filter, first, last, 21453, "epsg", 21453,
        "Beijing 1954 / Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 75E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21453\"]]");
    p = add_epsg_def_ex (filter, first, last, 21454, "epsg", 21454,
        "Beijing 1954 / Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 81E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21454\"]]");
    p = add_epsg_def_ex (filter, first, last, 21455, "epsg", 21455,
        "Beijing 1954 / Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 87E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21455\"]]");
    p = add_epsg_def_ex (filter, first, last, 21456, "epsg", 21456,
        "Beijing 1954 / Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 93E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21456\"]]");
    p = add_epsg_def_ex (filter, first, last, 21457, "epsg", 21457,
        "Beijing 1954 / Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 99E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21457\"]]");
    p = add_epsg_def_ex (filter, first, last, 21458, "epsg", 21458,
        "Beijing 1954 / Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 105E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",105],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21458\"]]");
}

#endif /* full EPSG initialization enabled/disabled */






























































































































































































































































































































































































































































































































































































Changes to src/srsinit/epsg_inlined_35.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708













































































































































































































































709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_35 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 7086, "epsg", 7086,
        "RGAF09 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Antilles_Francaises_2009", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGAF09 (lon-lat)\",DATUM[\"Reseau_Geodesique_de");
    add_srs_wkt (p, 1,
        "s_Antilles_Francaises_2009\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 2,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"1073\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Lon\",EAST],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "\",NORTH],AUTHORITY[\"EPSG\",\"7086\"]]");
    p = add_epsg_def_ex (filter, first, last, 7088, "epsg", 7088,
        "RGTAAF07 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGTAAF07 (lon-lat)\",DATUM[\"Reseau_Geodesique_");
    add_srs_wkt (p, 1,
        "des_Terres_Australes_et_Antarctiques_Francaises_2007\",S");
    add_srs_wkt (p, 2,
        "PHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1113\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Lon\",EAST],AXIS[\"Lat\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "7088\"]]");
    p = add_epsg_def_ex (filter, first, last, 7109, "epsg", 7109,
        "NAD83(2011) / RMTCRS St Mary (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=48.5 +lon_0=-112.5 +k=1.00016 +x_0=15");
    add_proj4text (p, 1,
        "0000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS St Mary (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",48.5],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-112.5],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.00016],PARAMETER[\"false_easting\",150000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7109\"]]");
    p = add_epsg_def_ex (filter, first, last, 7110, "epsg", 7110,
        "NAD83(2011) / RMTCRS Blackfeet (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=48 +lon_0=-112.5 +k=1.00019 +x_0=1000");
    add_proj4text (p, 1,
        "00 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Blackfeet (m)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",48],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-112.5],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.00019],PARAMETER[\"false_easting\",100000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"7110\"]]");
    p = add_epsg_def_ex (filter, first, last, 7111, "epsg", 7111,
        "NAD83(2011) / RMTCRS Milk River (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.5 +lat_0=48.5 +lon_0=-111 +k_0=1.000");
    add_proj4text (p, 1,
        "145 +x_0=150000 +y_0=200000 +ellps=GRS80 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Milk River (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "48.5],PARAMETER[\"central_meridian\",-111],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000145],PARAMETER[\"false_easting\",1500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",200000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7111\"]]");
    p = add_epsg_def_ex (filter, first, last, 7112, "epsg", 7112,
        "NAD83(2011) / RMTCRS Fort Belknap (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.5 +lat_0=48.5 +lon_0=-108.5 +k_0=1.0");
    add_proj4text (p, 1,
        "0012 +x_0=200000 +y_0=150000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Fort Belknap (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 8,
        "_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",48.5],PARAMETER[\"central_meridian\",-108.5],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.00012],PARAMETER[\"false_easting\",20");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",150000],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7112\"]]");
    p = add_epsg_def_ex (filter, first, last, 7113, "epsg", 7113,
        "NAD83(2011) / RMTCRS Fort Peck Assiniboine (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.33333333333334 +lat_0=48.33333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-105.5 +k_0=1.00012 +x_0=200000 +y_0=100000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Fort Peck Assiniboine (m)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",48.33333333333334],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-105.5],PARAMETER[\"scale_factor\",1.00012],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",200000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",100000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7113\"]]");
    p = add_epsg_def_ex (filter, first, last, 7114, "epsg", 7114,
        "NAD83(2011) / RMTCRS Fort Peck Sioux (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.33333333333334 +lat_0=48.33333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-105.5 +k_0=1.00009 +x_0=100000 +y_0=50000 +e");
    add_proj4text (p, 2,
        "llps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Fort Peck Sioux (m)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 8,
        "ert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",48.33333333333334],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 10,
        "05.5],PARAMETER[\"scale_factor\",1.00009],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",100000],PARAMETER[\"false_northing\",50000");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7114\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7115, "epsg", 7115,
        "NAD83(2011) / RMTCRS Crow (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.75 +lon_0=-107.75 +k=1.000148 +x_0");
    add_proj4text (p, 1,
        "=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Crow (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",44.75],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-107.75],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000148],PARAMETER[\"false_easting\",200000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7115\"]]");
    p = add_epsg_def_ex (filter, first, last, 7116, "epsg", 7116,
        "NAD83(2011) / RMTCRS Bobcat (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.25 +lat_0=46.25 +lon_0=-111.25 +k_0=");
    add_proj4text (p, 1,
        "1.000185 +x_0=100000 +y_0=100000 +ellps=GRS80 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Bobcat (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",46.2");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-111.25],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000185],PARAMETER[\"false_easting\",1000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",100000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7116\"]]");
    p = add_epsg_def_ex (filter, first, last, 7117, "epsg", 7117,
        "NAD83(2011) / RMTCRS Billings (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.78333333333333 +lat_0=45.78333333333");
    add_proj4text (p, 1,
        "333 +lon_0=-108.4166666666667 +k_0=1.0001515 +x_0=200000");
    add_proj4text (p, 2,
        " +y_0=50000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Billings (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".78333333333333],PARAMETER[\"central_meridian\",-108.416");
    add_srs_wkt (p, 10,
        "6666666667],PARAMETER[\"scale_factor\",1.0001515],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",200000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",50000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7117\"]]");
    p = add_epsg_def_ex (filter, first, last, 7118, "epsg", 7118,
        "NAD83(2011) / RMTCRS Wind River (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.66666666666666 +lon_0=-108.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.00024 +x_0=100000 +y_0=0 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Wind River (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",42.66666");
    add_srs_wkt (p, 9,
        "666666666],PARAMETER[\"central_meridian\",-108.333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"scale_factor\",1.00024],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",100000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7118\"]]");
    p = add_epsg_def_ex (filter, first, last, 7119, "epsg", 7119,
        "NAD83(2011) / RMTCRS St Mary (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=48.5 +lon_0=-112.5 +k=1.00016 +x_0=15");
    add_proj4text (p, 1,
        "0000.00001464 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS St Mary (ft)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",48.5],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-112.5],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.00016],PARAMETER[\"false_easting\",492125.9843],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"7119\"]]");
    p = add_epsg_def_ex (filter, first, last, 7120, "epsg", 7120,
        "NAD83(2011) / RMTCRS Blackfeet (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=48 +lon_0=-112.5 +k=1.00019 +x_0=9999");
    add_proj4text (p, 1,
        "9.99999960001 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Blackfeet (ft)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",48],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-112.5],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.00019],PARAMETER[\"false_easting\",328083.9895],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"7120\"]]");
    p = add_epsg_def_ex (filter, first, last, 7121, "epsg", 7121,
        "NAD83(2011) / RMTCRS Milk River (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.5 +lat_0=48.5 +lon_0=-111 +k_0=1.000");
    add_proj4text (p, 1,
        "145 +x_0=150000.00001464 +y_0=199999.9999992 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Milk River (ft)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "48.5],PARAMETER[\"central_meridian\",-111],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000145],PARAMETER[\"false_easting\",4921");
    add_srs_wkt (p, 11,
        "25.9843],PARAMETER[\"false_northing\",656167.979],UNIT[\"");
    add_srs_wkt (p, 12,
        "foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7121\"]]");
    p = add_epsg_def_ex (filter, first, last, 7122, "epsg", 7122,
        "NAD83(2011) / RMTCRS Fort Belknap (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.5 +lat_0=48.5 +lon_0=-108.5 +k_0=1.0");
    add_proj4text (p, 1,
        "0012 +x_0=199999.9999992 +y_0=150000.00001464 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Fort Belknap (ft)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lamber");
    add_srs_wkt (p, 8,
        "t_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",48.5],PARAMETER[\"central_meridian\",-108.5],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.00012],PARAMETER[\"false_easting\",65");
    add_srs_wkt (p, 11,
        "6167.979],PARAMETER[\"false_northing\",492125.9843],UNIT");
    add_srs_wkt (p, 12,
        "[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7122\"]]");
    p = add_epsg_def_ex (filter, first, last, 7123, "epsg", 7123,
        "NAD83(2011) / RMTCRS Fort Peck Assiniboine (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.33333333333334 +lat_0=48.33333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-105.5 +k_0=1.00012 +x_0=199999.9999992 +y_0=");
    add_proj4text (p, 2,
        "99999.99999960001 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Fort Peck Assiniboine (ft)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial");
    add_srs_wkt (p, 2,
        "_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",48.33333333333334],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",-105.5],PARAMETER[\"scale_factor\",1.00012],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",656167.979],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",328083.9895],UNIT[\"foot\",0.3048,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"7123\"]]");
    p = add_epsg_def_ex (filter, first, last, 7124, "epsg", 7124,
        "NAD83(2011) / RMTCRS Fort Peck Sioux (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.33333333333334 +lat_0=48.33333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-105.5 +k_0=1.00009 +x_0=99999.99999960001 +y");
    add_proj4text (p, 2,
        "_0=49999.99971024 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Fort Peck Sioux (ft)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");













































































































































































































































    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 9,
        "gin\",48.33333333333334],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "-105.5],PARAMETER[\"scale_factor\",1.00009],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",328083.9895],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",164041.9938],UNIT[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"7124\"]]");
    p = add_epsg_def_ex (filter, first, last, 7125, "epsg", 7125,
        "NAD83(2011) / RMTCRS Crow (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.75 +lon_0=-107.75 +k=1.000148 +x_0");
    add_proj4text (p, 1,
        "=199999.9999992 +y_0=0 +ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Crow (ft)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",44.75],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-107.75],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000148],PARAMETER[\"false_easting\",656167.979],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"foot\",0.3048,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"7125\"]]");
    p = add_epsg_def_ex (filter, first, last, 7126, "epsg", 7126,
        "NAD83(2011) / RMTCRS Bobcat (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.25 +lat_0=46.25 +lon_0=-111.25 +k_0=");
    add_proj4text (p, 1,
        "1.000185 +x_0=99999.99999960001 +y_0=99999.99999960001 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +units=ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Bobcat (ft)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",46.");
    add_srs_wkt (p, 9,
        "25],PARAMETER[\"central_meridian\",-111.25],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000185],PARAMETER[\"false_easting\",328");
    add_srs_wkt (p, 11,
        "083.9895],PARAMETER[\"false_northing\",328083.9895],UNIT");
    add_srs_wkt (p, 12,
        "[\"foot\",0.3048,AUTHORITY[\"EPSG\",\"9002\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7126\"]]");
    p = add_epsg_def_ex (filter, first, last, 7127, "epsg", 7127,
        "NAD83(2011) / RMTCRS Billings (ft)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.78333333333333 +lat_0=45.78333333333");
    add_proj4text (p, 1,
        "333 +lon_0=-108.4166666666667 +k_0=1.0001515 +x_0=199999");
    add_proj4text (p, 2,
        ".9999992 +y_0=50000.00001504 +ellps=GRS80 +units=ft +no_");
    add_proj4text (p, 3,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Billings (ft)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".78333333333333],PARAMETER[\"central_meridian\",-108.416");
    add_srs_wkt (p, 10,
        "6666666667],PARAMETER[\"scale_factor\",1.0001515],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",656167.979],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",164041.9948],UNIT[\"foot\",0.3048,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9002\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"7127\"]]");
    p = add_epsg_def_ex (filter, first, last, 7128, "epsg", 7128,
        "NAD83(2011) / RMTCRS Wind River (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.66666666666666 +lon_0=-108.3333333");
    add_proj4text (p, 1,
        "333333 +k=1.00024 +x_0=99999.99998983997 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / RMTCRS Wind River (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",42.666");
    add_srs_wkt (p, 9,
        "66666666666],PARAMETER[\"central_meridian\",-108.3333333");
    add_srs_wkt (p, 10,
        "333333],PARAMETER[\"scale_factor\",1.00024],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",328083.3333],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"7128\"]]");
    p = add_epsg_def_ex (filter, first, last, 7131, "epsg", 7131,
        "NAD83(2011) / San Francisco CS13", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-122.45 +k=1.000007 +x_0");
    add_proj4text (p, 1,
        "=48000 +y_0=24000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / San Francisco CS13\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",37.75],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-122.45],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000007],PARAMETER[\"false_easting\",48000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",24000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"7131\"]]");
    p = add_epsg_def_ex (filter, first, last, 7132, "epsg", 7132,
        "NAD83(2011) / San Francisco CS13 (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-122.45 +k=1.000007 +x_0");
    add_proj4text (p, 1,
        "=48000 +y_0=24000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / San Francisco CS13 (ftUS)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",37.7");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-122.45],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000007],PARAMETER[\"false_easting\",1574");
    add_srs_wkt (p, 11,
        "80],PARAMETER[\"false_northing\",78740],UNIT[\"US survey");
    add_srs_wkt (p, 12,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7132\"]]");
    p = add_epsg_def_ex (filter, first, last, 7133, "epsg", 7133,
        "RGTAAF07 (lon-lat)", 1, 0,
        "GRS 1980", "Greenwich",
        "Reseau_Geodesique_des_Terres_Australes_et_Antarctiques_Francaises_2007", "none", "degree",
        "Lon", "East", "Lat", "North");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"RGTAAF07 (lon-lat)\",DATUM[\"Reseau_Geodesique_");
    add_srs_wkt (p, 1,
        "des_Terres_Australes_et_Antarctiques_Francaises_2007\",S");
    add_srs_wkt (p, 2,
        "PHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"E");
    add_srs_wkt (p, 3,
        "PSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1113\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Lon\",EAST],AXIS[\"Lat\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "7133\"]]");
    p = add_epsg_def_ex (filter, first, last, 7136, "epsg", 7136,
        "IGD05", 1, 1,
        "WGS 84", "Greenwich",
        "Israeli_Geodetic_Datum_2005", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IGD05\",DATUM[\"Israeli_Geodetic_Datum_2005\",S");
    add_srs_wkt (p, 1,
        "PHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPS");
    add_srs_wkt (p, 2,
        "G\",\"7030\"]],AUTHORITY[\"EPSG\",\"1114\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 3,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 4,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 5,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"7136\"]]");
    p = add_epsg_def_ex (filter, first, last, 7139, "epsg", 7139,
        "IGD05/12", 1, 1,
        "WGS 84", "Greenwich",
        "Israeli_Geodetic_Datum_2005_2012", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"IGD05/12\",DATUM[\"Israeli_Geodetic_Datum_2005_");
    add_srs_wkt (p, 1,
        "2012\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"1115\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"7139\"]]");
    p = add_epsg_def_ex (filter, first, last, 7142, "epsg", 7142,
        "Palestine 1923 / Palestine Grid modified", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73409694444445 +lon_0=35.212080555");
    add_proj4text (p, 1,
        "55556 +k=1 +x_0=170251.555 +y_0=126867.909 +a=6378300.78");
    add_proj4text (p, 2,
        "9 +b=6356566.435 +towgs84=-275.7224,94.7824,340.8944,-8.");
    add_proj4text (p, 3,
        "001,-4.42,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Palestine Grid modified\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Palestine 1923\",DATUM[\"Palestine_1923\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Clarke 1880 (Benoit)\",6378300.789,293.4663155389811,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7010\"]],TOWGS84[-275.7224,94.7824,3");
    add_srs_wkt (p, 4,
        "40.8944,-8.001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"628");
    add_srs_wkt (p, 5,
        "1\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 6,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 8,
        "EAST],AUTHORITY[\"EPSG\",\"4281\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 9,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",31.7340");
    add_srs_wkt (p, 10,
        "9694444445],PARAMETER[\"central_meridian\",35.2120805555");
    add_srs_wkt (p, 11,
        "5556],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_ea");
    add_srs_wkt (p, 12,
        "sting\",170251.555],PARAMETER[\"false_northing\",126867.");
    add_srs_wkt (p, 13,
        "909],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"7142\"]]");
    p = add_epsg_def_ex (filter, first, last, 7257, "epsg", 7257,
        "NAD83(2011) / InGCS Adams (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.55 +lon_0=-84.95 +k=1.000034 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Adams (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",40.55],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-84.95],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1.000034],PARAMETER[\"false_easting\",240000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"7257\"]]");
    p = add_epsg_def_ex (filter, first, last, 7258, "epsg", 7258,
        "NAD83(2011) / InGCS Adams (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.55 +lon_0=-84.95 +k=1.000034 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Adams (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",40.55],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-84.95],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000034],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7258\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7259, "epsg", 7259,
        "NAD83(2011) / InGCS Allen (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.9 +lon_0=-85.05 +k=1.000031 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Allen (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",40.9],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-85.05],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.000031],PARAMETER[\"false_easting\",240000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"7259\"]]");
    p = add_epsg_def_ex (filter, first, last, 7260, "epsg", 7260,
        "NAD83(2011) / InGCS Allen (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.9 +lon_0=-85.05 +k=1.000031 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Allen (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",40.9],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-85.05],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000031],PARAMETER[\"false_easting\",787400],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",118110],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 12,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7260\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7261, "epsg", 7261,
        "NAD83(2011) / InGCS Bartholomew (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39 +lon_0=-85.84999999999999 +k=1.000");
    add_proj4text (p, 1,
        "026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Bartholomew (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",39],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.85],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000026],PARAMETER[\"false_easting\",240000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"7261\"]]");
    p = add_epsg_def_ex (filter, first, last, 7262, "epsg", 7262,
        "NAD83(2011) / InGCS Bartholomew (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39 +lon_0=-85.84999999999999 +k=1.000");
    add_proj4text (p, 1,
        "026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Bartholomew (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",39],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-85.85],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.000026],PARAMETER[\"false_easting\",787400],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",118110],UNIT[\"US survey foot");
    add_srs_wkt (p, 12,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7262");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 7263, "epsg", 7263,
        "NAD83(2011) / InGCS Benton (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.45 +lon_0=-87.3 +k=1.000029 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Benton (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",40.45],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-87.3],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1.000029],PARAMETER[\"false_easting\",240000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"7263\"]]");
    p = add_epsg_def_ex (filter, first, last, 7264, "epsg", 7264,
        "NAD83(2011) / InGCS Benton (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.45 +lon_0=-87.3 +k=1.000029 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Benton (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",40.45],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-87.3],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000029],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7264\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7265, "epsg", 7265,
        "NAD83(2011) / InGCS Blackford-Delaware (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.05 +lon_0=-85.40000000000001 +k=1.");
    add_proj4text (p, 1,
        "000038 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Blackford-Delaware (m)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        "0.05],PARAMETER[\"central_meridian\",-85.4],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000038],PARAMETER[\"false_easting\",240");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7265\"]]");
    p = add_epsg_def_ex (filter, first, last, 7266, "epsg", 7266,
        "NAD83(2011) / InGCS Blackford-Delaware (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.05 +lon_0=-85.40000000000001 +k=1.");
    add_proj4text (p, 1,
        "000038 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Blackford-Delaware (ftUS)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",40.05],PARAMETER[\"central_meridian\",-85.4],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.000038],PARAMETER[\"false_easting\",7");
    add_srs_wkt (p, 11,
        "87400],PARAMETER[\"false_northing\",118110],UNIT[\"US su");
    add_srs_wkt (p, 12,
        "rvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"7266\"]]");
    p = add_epsg_def_ex (filter, first, last, 7267, "epsg", 7267,
        "NAD83(2011) / InGCS Boone-Hendricks (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.6 +lon_0=-86.5 +k=1.000036 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Boone-Hendricks (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.6");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-86.5],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1.000036],PARAMETER[\"false_easting\",240000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"7267\"]]");
    p = add_epsg_def_ex (filter, first, last, 7268, "epsg", 7268,
        "NAD83(2011) / InGCS Boone-Hendricks (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.6 +lon_0=-86.5 +k=1.000036 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Boone-Hendricks (ftUS)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 9,
        "9.6],PARAMETER[\"central_meridian\",-86.5],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000036],PARAMETER[\"false_easting\",7874");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",118110],UNIT[\"US surve");
    add_srs_wkt (p, 12,
        "y foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"7268\"]]");
    p = add_epsg_def_ex (filter, first, last, 7269, "epsg", 7269,
        "NAD83(2011) / InGCS Brown (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39 +lon_0=-86.3 +k=1.00003 +x_0=24000");
    add_proj4text (p, 1,
        "0 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Brown (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",39],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-86.3],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 10,
        ".00003],PARAMETER[\"false_easting\",240000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"7269\"]]");
    p = add_epsg_def_ex (filter, first, last, 7270, "epsg", 7270,
        "NAD83(2011) / InGCS Brown (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39 +lon_0=-86.3 +k=1.00003 +x_0=24000");
    add_proj4text (p, 1,
        "0 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Brown (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",39],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-86.3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.00003],PARAMETER[\"false_easting\",787400],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",118110],UNIT[\"US survey foot\",0.304");
    add_srs_wkt (p, 12,
        "8006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7270\"]]");
    p = add_epsg_def_ex (filter, first, last, 7271, "epsg", 7271,
        "NAD83(2011) / InGCS Carroll (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.4 +lon_0=-86.65000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Carroll (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",40.4],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-86.65],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000026],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7271\"]]");
    p = add_epsg_def_ex (filter, first, last, 7272, "epsg", 7272,
        "NAD83(2011) / InGCS Carroll (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.4 +lon_0=-86.65000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Carroll (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",40.4],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-86.65],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000026],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7272\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7273, "epsg", 7273,
        "NAD83(2011) / InGCS Cass (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.55 +lon_0=-86.40000000000001 +k=1.");
    add_proj4text (p, 1,
        "000028 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Cass (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",40.55],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",-86.4],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "1.000028],PARAMETER[\"false_easting\",240000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7273\"]]");
    p = add_epsg_def_ex (filter, first, last, 7274, "epsg", 7274,
        "NAD83(2011) / InGCS Cass (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.55 +lon_0=-86.40000000000001 +k=1.");
    add_proj4text (p, 1,
        "000028 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Cass (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",40.55],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-86.4],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000028],PARAMETER[\"false_easting\",787400],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",118110],UNIT[\"US survey foot\",0");
    add_srs_wkt (p, 12,
        ".3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7274\"]]");
    p = add_epsg_def_ex (filter, first, last, 7275, "epsg", 7275,
        "NAD83(2011) / InGCS Clark-Floyd-Scott (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.15 +lon_0=-85.59999999999999 +k=1.");
    add_proj4text (p, 1,
        "000021 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Clark-Floyd-Scott (m)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",38");
    add_srs_wkt (p, 9,
        ".15],PARAMETER[\"central_meridian\",-85.6],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000021],PARAMETER[\"false_easting\",2400");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"7275\"]]");
    p = add_epsg_def_ex (filter, first, last, 7276, "epsg", 7276,
        "NAD83(2011) / InGCS Clark-Floyd-Scott (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.15 +lon_0=-85.59999999999999 +k=1.");
    add_proj4text (p, 1,
        "000021 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Clark-Floyd-Scott (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "38.15],PARAMETER[\"central_meridian\",-85.6],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000021],PARAMETER[\"false_easting\",787");
    add_srs_wkt (p, 11,
        "400],PARAMETER[\"false_northing\",118110],UNIT[\"US surv");
    add_srs_wkt (p, 12,
        "ey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"7276\"]]");
    p = add_epsg_def_ex (filter, first, last, 7277, "epsg", 7277,
        "NAD83(2011) / InGCS Clay (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.15 +lon_0=-87.15000000000001 +k=1.");
    add_proj4text (p, 1,
        "000024 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Clay (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",39.15],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",-87.15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.000024],PARAMETER[\"false_easting\",240000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"7277\"]]");
    p = add_epsg_def_ex (filter, first, last, 7278, "epsg", 7278,
        "NAD83(2011) / InGCS Clay (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.15 +lon_0=-87.15000000000001 +k=1.");
    add_proj4text (p, 1,
        "000024 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Clay (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",39.15],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87.15],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000024],PARAMETER[\"false_easting\",787400],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",118110],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 12,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7278\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7279, "epsg", 7279,
        "NAD83(2011) / InGCS Clinton (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.15 +lon_0=-86.59999999999999 +k=1.");
    add_proj4text (p, 1,
        "000032 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Clinton (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",40.15],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-86.6],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000032],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7279\"]]");
    p = add_epsg_def_ex (filter, first, last, 7280, "epsg", 7280,
        "NAD83(2011) / InGCS Clinton (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.15 +lon_0=-86.59999999999999 +k=1.");
    add_proj4text (p, 1,
        "000032 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Clinton (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",40.15],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-86.6],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000032],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7280\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7281, "epsg", 7281,
        "NAD83(2011) / InGCS Crawford-Lawrence-Orange (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.1 +lon_0=-86.5 +k=1.000025 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Crawford-Lawrence-Orange (m");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",38.1],PARAMETER[\"central_meridian\",-86.5],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.000025],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",240000],PARAMETER[\"false_northing\",36000],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7281\"]]");
    p = add_epsg_def_ex (filter, first, last, 7282, "epsg", 7282,
        "NAD83(2011) / InGCS Crawford-Lawrence-Orange (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.1 +lon_0=-86.5 +k=1.000025 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Crawford-Lawrence-Orange (f");
    add_srs_wkt (p, 1,
        "tUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spa");
    add_srs_wkt (p, 2,
        "tial_Reference_System_2011\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",38.1],PARAMETER[\"central_meridian\",-86.5],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.000025],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",787400],PARAMETER[\"false_northing\",118110],UNIT[\"");
    add_srs_wkt (p, 12,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"7282\"]]");
    p = add_epsg_def_ex (filter, first, last, 7283, "epsg", 7283,
        "NAD83(2011) / InGCS Daviess-Greene (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.45 +lon_0=-87.09999999999999 +k=1.");
    add_proj4text (p, 1,
        "000018 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Daviess-Greene (m)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",38.45]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",-87.1],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1.000018],PARAMETER[\"false_easting\",240000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"7283\"]]");
    p = add_epsg_def_ex (filter, first, last, 7284, "epsg", 7284,
        "NAD83(2011) / InGCS Daviess-Greene (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.45 +lon_0=-87.09999999999999 +k=1.");
    add_proj4text (p, 1,
        "000018 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Daviess-Greene (ftUS)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",38");
    add_srs_wkt (p, 9,
        ".45],PARAMETER[\"central_meridian\",-87.1],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000018],PARAMETER[\"false_easting\",7874");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",118110],UNIT[\"US surve");
    add_srs_wkt (p, 12,
        "y foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"7284\"]]");
    p = add_epsg_def_ex (filter, first, last, 7285, "epsg", 7285,
        "NAD83(2011) / InGCS Dearborn-Ohio-Switzerland (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.65 +lon_0=-84.90000000000001 +k=1.");
    add_proj4text (p, 1,
        "000029 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Dearborn-Ohio-Switzerland (");
    add_srs_wkt (p, 1,
        "m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",38.65],PARAMETER[\"central_meridian\",-84.9],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1.000029],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",240000],PARAMETER[\"false_northing\",36000],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7285\"]]");
    p = add_epsg_def_ex (filter, first, last, 7286, "epsg", 7286,
        "NAD83(2011) / InGCS Dearborn-Ohio-Switzerland (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.65 +lon_0=-84.90000000000001 +k=1.");
    add_proj4text (p, 1,
        "000029 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Dearborn-Ohio-Switzerland (");
    add_srs_wkt (p, 1,
        "ftUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",38.65],PARAMETER[\"central_meridian\",-84.9],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1.000029],PARAMETER[\"false_east");
    add_srs_wkt (p, 11,
        "ing\",787400],PARAMETER[\"false_northing\",118110],UNIT[");
    add_srs_wkt (p, 12,
        "\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7286\"]]");
    p = add_epsg_def_ex (filter, first, last, 7287, "epsg", 7287,
        "NAD83(2011) / InGCS Decatur-Rush (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.1 +lon_0=-85.65000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00036 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Decatur-Rush (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",39.1],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-85.65],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.000036],PARAMETER[\"false_easting\",240000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"7287\"]]");
    p = add_epsg_def_ex (filter, first, last, 7288, "epsg", 7288,
        "NAD83(2011) / InGCS Decatur-Rush (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.1 +lon_0=-85.65000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00036 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Decatur-Rush (ftUS)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.1");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-85.65],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000036],PARAMETER[\"false_easting\",787400");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",118110],UNIT[\"US survey ");
    add_srs_wkt (p, 12,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7288\"]]");
    p = add_epsg_def_ex (filter, first, last, 7289, "epsg", 7289,
        "NAD83(2011) / InGCS DeKalb (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.25 +lon_0=-84.95 +k=1.000036 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS DeKalb (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",41.25],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-84.95],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000036],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7289\"]]");
    p = add_epsg_def_ex (filter, first, last, 7290, "epsg", 7290,
        "NAD83(2011) / InGCS DeKalb (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.25 +lon_0=-84.95 +k=1.000036 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS DeKalb (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",41.25],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-84.95],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000036],PARAMETER[\"false_easting\",787400],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7290\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7291, "epsg", 7291,
        "NAD83(2011) / InGCS Dubois-Martin (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.2 +lon_0=-86.95 +k=1.00002 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Dubois-Martin (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",38.2],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-86.95],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.00002],PARAMETER[\"false_easting\",240000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"7291\"]]");
    p = add_epsg_def_ex (filter, first, last, 7292, "epsg", 7292,
        "NAD83(2011) / InGCS Dubois-Martin (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.2 +lon_0=-86.95 +k=1.00002 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Dubois-Martin (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",38.2");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-86.95],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.00002],PARAMETER[\"false_easting\",787400]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",118110],UNIT[\"US survey f");
    add_srs_wkt (p, 12,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 14,
        "292\"]]");
    p = add_epsg_def_ex (filter, first, last, 7293, "epsg", 7293,
        "NAD83(2011) / InGCS Elkhart-Kosciusko-Wabash (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.65 +lon_0=-85.84999999999999 +k=1.");
    add_proj4text (p, 1,
        "000033 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Elkhart-Kosciusko-Wabash (m");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",40.65],PARAMETER[\"central_meridian\",-85.85],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1.000033],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",240000],PARAMETER[\"false_northing\",36000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 13,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7293\"]]");
    p = add_epsg_def_ex (filter, first, last, 7294, "epsg", 7294,
        "NAD83(2011) / InGCS Elkhart-Kosciusko-Wabash (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.65 +lon_0=-85.84999999999999 +k=1.");
    add_proj4text (p, 1,
        "000033 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Elkhart-Kosciusko-Wabash (f");
    add_srs_wkt (p, 1,
        "tUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spa");
    add_srs_wkt (p, 2,
        "tial_Reference_System_2011\",SPHEROID[\"GRS 1980\",63781");
    add_srs_wkt (p, 3,
        "37,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",40.65],PARAMETER[\"central_meridian\",-85.85],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1.000033],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",787400],PARAMETER[\"false_northing\",118110],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7294\"]]");
    p = add_epsg_def_ex (filter, first, last, 7295, "epsg", 7295,
        "NAD83(2011) / InGCS Fayette-Franklin-Union (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.25 +lon_0=-85.05 +k=1.000038 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Fayette-Franklin-Union (m)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",39.25],PARAMETER[\"central_meridian\",-85.05],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1.000038],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "240000],PARAMETER[\"false_northing\",36000],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7295\"]]");
    p = add_epsg_def_ex (filter, first, last, 7296, "epsg", 7296,
        "NAD83(2011) / InGCS Fayette-Franklin-Union (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.25 +lon_0=-85.05 +k=1.000038 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Fayette-Franklin-Union (ftU");
    add_srs_wkt (p, 1,
        "S)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",39.25],PARAMETER[\"central_meridian\",-85.05],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1.000038],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",787400],PARAMETER[\"false_northing\",118110],UNIT[\"");
    add_srs_wkt (p, 12,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"7296\"]]");
    p = add_epsg_def_ex (filter, first, last, 7297, "epsg", 7297,
        "NAD83(2011) / InGCS Fountain-Warren (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.95 +lon_0=-87.3 +k=1.000025 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Fountain-Warren (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.9");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-87.3],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000025],PARAMETER[\"false_easting\",240000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7297\"]]");
    p = add_epsg_def_ex (filter, first, last, 7298, "epsg", 7298,
        "NAD83(2011) / InGCS Fountain-Warren (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.95 +lon_0=-87.3 +k=1.000025 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Fountain-Warren (ftUS)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 9,
        "9.95],PARAMETER[\"central_meridian\",-87.3],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000025],PARAMETER[\"false_easting\",787");
    add_srs_wkt (p, 11,
        "400],PARAMETER[\"false_northing\",118110],UNIT[\"US surv");
    add_srs_wkt (p, 12,
        "ey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"7298\"]]");
    p = add_epsg_def_ex (filter, first, last, 7299, "epsg", 7299,
        "NAD83(2011) / InGCS Fulton-Marshall-St. Joseph (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.9 +lon_0=-86.3 +k=1.000031 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Fulton-Marshall-St. Joseph ");
    add_srs_wkt (p, 1,
        "(m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spat");
    add_srs_wkt (p, 2,
        "ial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 3,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",40.9],PARAMETER[\"central_meridian\",-86.3],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1.000031],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",240000],PARAMETER[\"false_northing\",36000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 13,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7299\"]]");
    p = add_epsg_def_ex (filter, first, last, 7300, "epsg", 7300,
        "NAD83(2011) / InGCS Fulton-Marshall-St. Joseph (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.9 +lon_0=-86.3 +k=1.000031 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Fulton-Marshall-St. Joseph ");
    add_srs_wkt (p, 1,
        "(ftUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_S");
    add_srs_wkt (p, 2,
        "patial_Reference_System_2011\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 3,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",40.9],PARAMETER[\"central_meridian\",-86.3],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1.000031],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",787400],PARAMETER[\"false_northing\",118110],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7300\"]]");
    p = add_epsg_def_ex (filter, first, last, 7301, "epsg", 7301,
        "NAD83(2011) / InGCS Gibson (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.15 +lon_0=-87.65000000000001 +k=1.");
    add_proj4text (p, 1,
        "000013 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Gibson (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",38.15],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-87.65],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000013],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7301\"]]");
    p = add_epsg_def_ex (filter, first, last, 7302, "epsg", 7302,
        "NAD83(2011) / InGCS Gibson (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.15 +lon_0=-87.65000000000001 +k=1.");
    add_proj4text (p, 1,
        "000013 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Gibson (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",38.15],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-87.65],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000013],PARAMETER[\"false_easting\",787400],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7302\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7303, "epsg", 7303,
        "NAD83(2011) / InGCS Grant (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.35 +lon_0=-85.7 +k=1.000034 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Grant (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",40.35],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-85.7],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.000034],PARAMETER[\"false_easting\",240000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"7303\"]]");
    p = add_epsg_def_ex (filter, first, last, 7304, "epsg", 7304,
        "NAD83(2011) / InGCS Grant (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.35 +lon_0=-85.7 +k=1.000034 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Grant (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",40.35],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.7],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000034],PARAMETER[\"false_easting\",787400],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",118110],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 12,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7304\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7305, "epsg", 7305,
        "NAD83(2011) / InGCS Hamilton-Tipton (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.9 +lon_0=-86 +k=1.000034 +x_0=2400");
    add_proj4text (p, 1,
        "00 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Hamilton-Tipton (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.9");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-86],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.000034],PARAMETER[\"false_easting\",240000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"7305\"]]");
    p = add_epsg_def_ex (filter, first, last, 7306, "epsg", 7306,
        "NAD83(2011) / InGCS Hamilton-Tipton (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.9 +lon_0=-86 +k=1.000034 +x_0=2400");
    add_proj4text (p, 1,
        "00 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Hamilton-Tipton (ftUS)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 9,
        "9.9],PARAMETER[\"central_meridian\",-86],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000034],PARAMETER[\"false_easting\",787400");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",118110],UNIT[\"US survey ");
    add_srs_wkt (p, 12,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7306\"]]");
    p = add_epsg_def_ex (filter, first, last, 7307, "epsg", 7307,
        "NAD83(2011) / InGCS Hancock-Madison (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.65 +lon_0=-85.8 +k=1.000036 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Hancock-Madison (m)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.6");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-85.8],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000036],PARAMETER[\"false_easting\",240000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7307\"]]");
    p = add_epsg_def_ex (filter, first, last, 7308, "epsg", 7308,
        "NAD83(2011) / InGCS Hancock-Madison (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.65 +lon_0=-85.8 +k=1.000036 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Hancock-Madison (ftUS)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 9,
        "9.65],PARAMETER[\"central_meridian\",-85.8],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000036],PARAMETER[\"false_easting\",787");
    add_srs_wkt (p, 11,
        "400],PARAMETER[\"false_northing\",118110],UNIT[\"US surv");
    add_srs_wkt (p, 12,
        "ey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"7308\"]]");
    p = add_epsg_def_ex (filter, first, last, 7309, "epsg", 7309,
        "NAD83(2011) / InGCS Harrison-Washington (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.95 +lon_0=-86.15000000000001 +k=1.");
    add_proj4text (p, 1,
        "000027 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Harrison-Washington (m)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Ref");
    add_srs_wkt (p, 2,
        "erence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2");
    add_srs_wkt (p, 3,
        "57222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 9,
        "7.95],PARAMETER[\"central_meridian\",-86.15],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000027],PARAMETER[\"false_easting\",240");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7309\"]]");
    p = add_epsg_def_ex (filter, first, last, 7310, "epsg", 7310,
        "NAD83(2011) / InGCS Harrison-Washington (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.95 +lon_0=-86.15000000000001 +k=1.");
    add_proj4text (p, 1,
        "000027 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Harrison-Washington (ftUS)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",37.95],PARAMETER[\"central_meridian\",-86.15],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1.000027],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "787400],PARAMETER[\"false_northing\",118110],UNIT[\"US s");
    add_srs_wkt (p, 12,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"7310\"]]");
    p = add_epsg_def_ex (filter, first, last, 7311, "epsg", 7311,
        "NAD83(2011) / InGCS Henry (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.75 +lon_0=-85.45 +k=1.000043 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Henry (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",39.75],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-85.45],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1.000043],PARAMETER[\"false_easting\",240000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"7311\"]]");
    p = add_epsg_def_ex (filter, first, last, 7312, "epsg", 7312,
        "NAD83(2011) / InGCS Henry (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.75 +lon_0=-85.45 +k=1.000043 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Henry (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",39.75],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.45],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000043],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7312\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7313, "epsg", 7313,
        "NAD83(2011) / InGCS Howard-Miami (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.35 +lon_0=-86.15000000000001 +k=1.");
    add_proj4text (p, 1,
        "000031 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Howard-Miami (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",40.35],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-86.15],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.000031],PARAMETER[\"false_easting\",240000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"7313\"]]");
    p = add_epsg_def_ex (filter, first, last, 7314, "epsg", 7314,
        "NAD83(2011) / InGCS Howard-Miami (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.35 +lon_0=-86.15000000000001 +k=1.");
    add_proj4text (p, 1,
        "000031 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Howard-Miami (ftUS)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",40.3");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-86.15],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1.000031],PARAMETER[\"false_easting\",78740");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",118110],UNIT[\"US survey");
    add_srs_wkt (p, 12,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7314\"]]");
    p = add_epsg_def_ex (filter, first, last, 7315, "epsg", 7315,
        "NAD83(2011) / InGCS Huntington-Whitley (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.65 +lon_0=-85.5 +k=1.000034 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Huntington-Whitley (m)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refe");
    add_srs_wkt (p, 2,
        "rence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        "0.65],PARAMETER[\"central_meridian\",-85.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000034],PARAMETER[\"false_easting\",240");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7315\"]]");
    p = add_epsg_def_ex (filter, first, last, 7316, "epsg", 7316,
        "NAD83(2011) / InGCS Huntington-Whitley (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.65 +lon_0=-85.5 +k=1.000034 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Huntington-Whitley (ftUS)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",40.65],PARAMETER[\"central_meridian\",-85.5],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.000034],PARAMETER[\"false_easting\",7");
    add_srs_wkt (p, 11,
        "87400],PARAMETER[\"false_northing\",118110],UNIT[\"US su");
    add_srs_wkt (p, 12,
        "rvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"7316\"]]");
    p = add_epsg_def_ex (filter, first, last, 7317, "epsg", 7317,
        "NAD83(2011) / InGCS Jackson (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.7 +lon_0=-85.95 +k=1.000022 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jackson (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",38.7],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-85.95],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000022],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7317\"]]");
    p = add_epsg_def_ex (filter, first, last, 7318, "epsg", 7318,
        "NAD83(2011) / InGCS Jackson (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.7 +lon_0=-85.95 +k=1.000022 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jackson (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",38.7],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.95],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000022],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7318\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7319, "epsg", 7319,
        "NAD83(2011) / InGCS Jasper-Porter (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.7 +lon_0=-87.09999999999999 +k=1.0");
    add_proj4text (p, 1,
        "00027 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jasper-Porter (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",40.7],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-87.1],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.000027],PARAMETER[\"false_easting\",240000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"7319\"]]");
    p = add_epsg_def_ex (filter, first, last, 7320, "epsg", 7320,
        "NAD83(2011) / InGCS Jasper-Porter (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.7 +lon_0=-87.09999999999999 +k=1.0");
    add_proj4text (p, 1,
        "00027 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jasper-Porter (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",40.7");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-87.1],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1.000027],PARAMETER[\"false_easting\",787400]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",118110],UNIT[\"US survey f");
    add_srs_wkt (p, 12,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 14,
        "320\"]]");
    p = add_epsg_def_ex (filter, first, last, 7321, "epsg", 7321,
        "NAD83(2011) / InGCS Jay (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.3 +lon_0=-85 +k=1.000038 +x_0=2400");
    add_proj4text (p, 1,
        "00 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jay (m)\",GEOGCS[\"NAD83(20");
    add_srs_wkt (p, 1,
        "11)\",DATUM[\"NAD83_National_Spatial_Reference_System_20");
    add_srs_wkt (p, 2,
        "11\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.3],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-85],PARAMETER[\"scale_factor\",1.000");
    add_srs_wkt (p, 10,
        "038],PARAMETER[\"false_easting\",240000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"7321\"]]");
    p = add_epsg_def_ex (filter, first, last, 7322, "epsg", 7322,
        "NAD83(2011) / InGCS Jay (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.3 +lon_0=-85 +k=1.000038 +x_0=2400");
    add_proj4text (p, 1,
        "00 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jay (ftUS)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",40.3],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-85],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "1.000038],PARAMETER[\"false_easting\",787400],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",118110],UNIT[\"US survey foot\",0.304");
    add_srs_wkt (p, 12,
        "8006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7322\"]]");
    p = add_epsg_def_ex (filter, first, last, 7323, "epsg", 7323,
        "NAD83(2011) / InGCS Jefferson (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.55 +lon_0=-85.34999999999999 +k=1.");
    add_proj4text (p, 1,
        "000028 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jefferson (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",38.55],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-85.35],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000028],PARAMETER[\"false_easting\",240000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"7323\"]]");
    p = add_epsg_def_ex (filter, first, last, 7324, "epsg", 7324,
        "NAD83(2011) / InGCS Jefferson (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.55 +lon_0=-85.34999999999999 +k=1.");
    add_proj4text (p, 1,
        "000028 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jefferson (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",38.55],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-85.35],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.000028],PARAMETER[\"false_easting\",787400],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",118110],UNIT[\"US survey foo");
    add_srs_wkt (p, 12,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"732");
    add_srs_wkt (p, 14,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 7325, "epsg", 7325,
        "NAD83(2011) / InGCS Jennings (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.8 +lon_0=-85.8 +k=1.000025 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jennings (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",38.8],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-85.8],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000025],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7325\"]]");
    p = add_epsg_def_ex (filter, first, last, 7326, "epsg", 7326,
        "NAD83(2011) / InGCS Jennings (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.8 +lon_0=-85.8 +k=1.000025 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Jennings (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",38.8],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-85.8],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000025],PARAMETER[\"false_easting\",787400],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7326\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7327, "epsg", 7327,
        "NAD83(2011) / InGCS Johnson-Marion (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.3 +lon_0=-86.15000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00031 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Johnson-Marion (m)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.3],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-86.15],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1.000031],PARAMETER[\"false_easting\",240000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"7327\"]]");
    p = add_epsg_def_ex (filter, first, last, 7328, "epsg", 7328,
        "NAD83(2011) / InGCS Johnson-Marion (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.3 +lon_0=-86.15000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00031 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Johnson-Marion (ftUS)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39");
    add_srs_wkt (p, 9,
        ".3],PARAMETER[\"central_meridian\",-86.15],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000031],PARAMETER[\"false_easting\",7874");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",118110],UNIT[\"US surve");
    add_srs_wkt (p, 12,
        "y foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"7328\"]]");
    p = add_epsg_def_ex (filter, first, last, 7329, "epsg", 7329,
        "NAD83(2011) / InGCS Knox (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.4 +lon_0=-87.45 +k=1.000015 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Knox (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",38.4],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-87.45],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "1.000015],PARAMETER[\"false_easting\",240000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7329\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927



























































































































































































































3928
3929
3930
3931
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_35 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 21459, "epsg", 21459,
        "Beijing 1954 / Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 111E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",111],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21459\"]]");
    p = add_epsg_def_ex (filter, first, last, 21460, "epsg", 21460,
        "Beijing 1954 / Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 117E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",117],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21460\"]]");
    p = add_epsg_def_ex (filter, first, last, 21461, "epsg", 21461,
        "Beijing 1954 / Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 123E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",123],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21461\"]]");
    p = add_epsg_def_ex (filter, first, last, 21462, "epsg", 21462,
        "Beijing 1954 / Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 129E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",129],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21462\"]]");
    p = add_epsg_def_ex (filter, first, last, 21463, "epsg", 21463,
        "Beijing 1954 / Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 135E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",135],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21463\"]]");
    p = add_epsg_def_ex (filter, first, last, 21473, "epsg", 21473,
        "Beijing 1954 / Gauss-Kruger 13N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 13N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21473\"]]");
    p = add_epsg_def_ex (filter, first, last, 21474, "epsg", 21474,
        "Beijing 1954 / Gauss-Kruger 14N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 14N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21474\"]]");
    p = add_epsg_def_ex (filter, first, last, 21475, "epsg", 21475,
        "Beijing 1954 / Gauss-Kruger 15N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 15N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21475\"]]");
    p = add_epsg_def_ex (filter, first, last, 21476, "epsg", 21476,
        "Beijing 1954 / Gauss-Kruger 16N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 16N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21476\"]]");
    p = add_epsg_def_ex (filter, first, last, 21477, "epsg", 21477,
        "Beijing 1954 / Gauss-Kruger 17N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 17N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21477\"]]");
    p = add_epsg_def_ex (filter, first, last, 21478, "epsg", 21478,
        "Beijing 1954 / Gauss-Kruger 18N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 18N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",105],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21478\"]]");
    p = add_epsg_def_ex (filter, first, last, 21479, "epsg", 21479,
        "Beijing 1954 / Gauss-Kruger 19N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 19N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",111],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21479\"]]");
    p = add_epsg_def_ex (filter, first, last, 21480, "epsg", 21480,
        "Beijing 1954 / Gauss-Kruger 20N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 20N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",117],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21480\"]]");
    p = add_epsg_def_ex (filter, first, last, 21481, "epsg", 21481,
        "Beijing 1954 / Gauss-Kruger 21N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 21N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",123],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21481\"]]");
    p = add_epsg_def_ex (filter, first, last, 21482, "epsg", 21482,
        "Beijing 1954 / Gauss-Kruger 22N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 22N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",129],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21482\"]]");
    p = add_epsg_def_ex (filter, first, last, 21483, "epsg", 21483,
        "Beijing 1954 / Gauss-Kruger 23N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 23N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",135],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21483\"]]");
    p = add_epsg_def_ex (filter, first, last, 21500, "epsg", 21500,
        "Belge 1950 (Brussels) / Belge Lambert 50", 0, 0,
        "International 1924", "Brussels",
        "Reseau_National_Belge_1950_Brussels", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666");
    add_proj4text (p, 1,
        "666 +lat_0=90 +lon_0=0 +x_0=150000 +y_0=5400000 +ellps=i");
    add_proj4text (p, 2,
        "ntl +pm=brussels +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Belge 1950 (Brussels) / Belge Lambert 50\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Belge 1950 (Brussels)\",DATUM[\"Reseau_National_Bel");
    add_srs_wkt (p, 2,
        "ge_1950_Brussels\",SPHEROID[\"International 1924\",63783");
    add_srs_wkt (p, 3,
        "88,297,AUTHORITY[\"EPSG\",\"7022\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6809\"]],PRIMEM[\"Brussels\",4.367975,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8910\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4809\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_1\",49.83333333333334],PARAMETER[\"standard_par");
    add_srs_wkt (p, 10,
        "allel_2\",51.16666666666666],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 11,
        "gin\",90],PARAMETER[\"central_meridian\",0],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",150000],PARAMETER[\"false_northing\",540");
    add_srs_wkt (p, 13,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"215");
    add_srs_wkt (p, 15,
        "00\"]]");
    p = add_epsg_def_ex (filter, first, last, 21780, "epsg", 21780,
        "Bern 1898 (Bern) / LV03C", 0, 0,
        "Bessel 1841", "Bern",
        "CH1903_Bern", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=0 +k_0=1 +x");
    add_proj4text (p, 1,
        "_0=0 +y_0=0 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,");
    add_proj4text (p, 2,
        "0,0 +pm=bern +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bern 1898 (Bern) / LV03C\",GEOGCS[\"Bern 1898 (");
    add_srs_wkt (p, 1,
        "Bern)\",DATUM[\"CH1903_Bern\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6801");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Bern\",7.439583333333333,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8907\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4801\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_center\",46.95240555555556],PARAMETER[\"long");
    add_srs_wkt (p, 10,
        "itude_of_center\",0],PARAMETER[\"azimuth\",90],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"rectified_grid_angle\",90],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 12,
        ",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_nor");
    add_srs_wkt (p, 13,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 15,
        "\"21780\"]]");
    p = add_epsg_def_ex (filter, first, last, 21781, "epsg", 21781,
        "CH1903 / LV03", 0, 0,
        "Bessel 1841", "Greenwich",
        "CH1903", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333");
    add_proj4text (p, 1,
        "333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +tow");
    add_proj4text (p, 2,
        "gs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CH1903 / LV03\",GEOGCS[\"CH1903\",DATUM[\"CH190");
    add_srs_wkt (p, 1,
        "3\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[674.4,15.1,405.3,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6149\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4149\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Ce");
    add_srs_wkt (p, 8,
        "nter\"],PARAMETER[\"latitude_of_center\",46.952405555555");
    add_srs_wkt (p, 9,
        "56],PARAMETER[\"longitude_of_center\",7.439583333333333]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_grid_an");
    add_srs_wkt (p, 11,
        "gle\",90],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",600000],PARAMETER[\"false_northing\",200000]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\",\"21781\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 21782, "epsg", 21782,
        "CH1903 / LV03C-G", 0, 0,
        "Bessel 1841", "Greenwich",
        "CH1903", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333");
    add_proj4text (p, 1,
        "333333 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.4");
    add_proj4text (p, 2,
        ",15.1,405.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CH1903 / LV03C-G\",GEOGCS[\"CH1903\",DATUM[\"CH");
    add_srs_wkt (p, 1,
        "1903\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[674.4,15.1,405.3,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6149\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4149\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth");
    add_srs_wkt (p, 8,
        "_Center\"],PARAMETER[\"latitude_of_center\",46.952405555");
    add_srs_wkt (p, 9,
        "55556],PARAMETER[\"longitude_of_center\",7.4395833333333");
    add_srs_wkt (p, 10,
        "33],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_grid");
    add_srs_wkt (p, 11,
        "_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\",\"21782\"]]");
    p = add_epsg_def_ex (filter, first, last, 21817, "epsg", 21817,
        "Bogota 1975 / UTM zone 17N (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=intl +towgs84=307,304,-318,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / UTM zone 17N (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Inter");
    add_srs_wkt (p, 2,
        "national 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"621");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-81],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"21817\"]]");
    p = add_epsg_def_ex (filter, first, last, 21818, "epsg", 21818,
        "Bogota 1975 / UTM zone 18N", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=intl +towgs84=307,304,-318,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / UTM zone 18N\",GEOGCS[\"Bogota 19");
    add_srs_wkt (p, 1,
        "75\",DATUM[\"Bogota_1975\",SPHEROID[\"International 1924");
    add_srs_wkt (p, 2,
        "\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[307");
    add_srs_wkt (p, 3,
        ",304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-75],PARAMETER[\"scale_factor\",0.9996],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"21818\"]]");
    p = add_epsg_def_ex (filter, first, last, 21891, "epsg", 21891,
        "Bogota 1975 / Colombia West zone (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia West zone (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6218\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4.");
    add_srs_wkt (p, 9,
        "599047222222222],PARAMETER[\"central_meridian\",-77.0809");
    add_srs_wkt (p, 10,
        "1666666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",1000000],PARAMETER[\"false_northing\",1000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2189");
    add_srs_wkt (p, 14,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 21892, "epsg", 21892,
        "Bogota 1975 / Colombia Bogota zone (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia Bogota zone (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6218\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        ".599047222222222],PARAMETER[\"central_meridian\",-74.080");
    add_srs_wkt (p, 10,
        "91666666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",1000000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"218");
    add_srs_wkt (p, 14,
        "92\"]]");
    p = add_epsg_def_ex (filter, first, last, 21893, "epsg", 21893,
        "Bogota 1975 / Colombia East Central zone (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East Central zone (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"International 1924\",6378388,297,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7022\"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6218\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",4.599047222222222],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-71.08091666666667],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",1000000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",1000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"21893\"]]");
    p = add_epsg_def_ex (filter, first, last, 21894, "epsg", 21894,
        "Bogota 1975 / Colombia East (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "18\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",4.59904");
    add_srs_wkt (p, 9,
        "7222222222],PARAMETER[\"central_meridian\",-68.080916666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",1000000],PARAMETER[\"false_northing\",1000000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"21894\"]]");
    p = add_epsg_def_ex (filter, first, last, 21896, "epsg", 21896,
        "Bogota 1975 / Colombia West zone", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia West zone\",GEOGCS[\"Bog");
    add_srs_wkt (p, 1,
        "ota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 2,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",4.599047222222");
    add_srs_wkt (p, 9,
        "222],PARAMETER[\"central_meridian\",-77.08091666666667],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",1000000],PARAMETER[\"false_northing\",1000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21896\"]]");
    p = add_epsg_def_ex (filter, first, last, 21897, "epsg", 21897,
        "Bogota 1975 / Colombia Bogota zone", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia Bogota zone\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "ogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Internatio");
    add_srs_wkt (p, 2,
        "nal 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",4.5990472222");
    add_srs_wkt (p, 9,
        "22222],PARAMETER[\"central_meridian\",-74.08091666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",1000000],PARAMETER[\"false_northing\",1000000],UNIT[");
    add_srs_wkt (p, 12,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NOR");
    add_srs_wkt (p, 13,
        "TH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21897\"]]");
    p = add_epsg_def_ex (filter, first, last, 21898, "epsg", 21898,
        "Bogota 1975 / Colombia East Central zone", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East Central zone\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "18\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",4.59904");
    add_srs_wkt (p, 9,
        "7222222222],PARAMETER[\"central_meridian\",-71.080916666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",1000000],PARAMETER[\"false_northing\",1000000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21898\"]]");
    p = add_epsg_def_ex (filter, first, last, 21899, "epsg", 21899,
        "Bogota 1975 / Colombia East", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East\",GEOGCS[\"Bogota 1");
    add_srs_wkt (p, 1,
        "975\",DATUM[\"Bogota_1975\",SPHEROID[\"International 192");
    add_srs_wkt (p, 2,
        "4\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[30");
    add_srs_wkt (p, 3,
        "7,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",4.599047222222222],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-68.08091666666667],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1],PARAMETER[\"false_easting\",100");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",1000000],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21899\"]]");
    p = add_epsg_def_ex (filter, first, last, 22032, "epsg", 22032,
        "Camacupa / UTM zone 32S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=clrk80 +towgs84=-50.9,-");
    add_proj4text (p, 1,
        "347.6,-231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / UTM zone 32S\",GEOGCS[\"Camacupa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9");
    add_srs_wkt (p, 3,
        ",-347.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"22032\"]]");
    p = add_epsg_def_ex (filter, first, last, 22033, "epsg", 22033,
        "Camacupa / UTM zone 33S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=clrk80 +towgs84=-50.9,-");
    add_proj4text (p, 1,
        "347.6,-231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / UTM zone 33S\",GEOGCS[\"Camacupa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9");
    add_srs_wkt (p, 3,
        ",-347.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",15],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"22033\"]]");
    p = add_epsg_def_ex (filter, first, last, 22091, "epsg", 22091,
        "Camacupa / TM 11.30 SE", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=10000000 +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / TM 11.30 SE\",GEOGCS[\"Camacupa\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.");
    add_srs_wkt (p, 2,
        "145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9,");
    add_srs_wkt (p, 3,
        "-347.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",11.5],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"22091\"]]");
    p = add_epsg_def_ex (filter, first, last, 22092, "epsg", 22092,
        "Camacupa / TM 12 SE", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=10000000 +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / TM 12 SE\",GEOGCS[\"Camacupa\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145");
    add_srs_wkt (p, 2,
        ",293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9,-34");
    add_srs_wkt (p, 3,
        "7.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",12],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"22092\"]]");
    p = add_epsg_def_ex (filter, first, last, 22171, "epsg", 22171,
        "POSGAR 98 / Argentina 1", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 1\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-72],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22171\"]]");
    p = add_epsg_def_ex (filter, first, last, 22172, "epsg", 22172,
        "POSGAR 98 / Argentina 2", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 2\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-69],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",2500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22172\"]]");
    p = add_epsg_def_ex (filter, first, last, 22173, "epsg", 22173,
        "POSGAR 98 / Argentina 3", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 3\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-66],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22173\"]]");
    p = add_epsg_def_ex (filter, first, last, 22174, "epsg", 22174,
        "POSGAR 98 / Argentina 4", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 4\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-63],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",4500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22174\"]]");
    p = add_epsg_def_ex (filter, first, last, 22175, "epsg", 22175,
        "POSGAR 98 / Argentina 5", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 5\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-60],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",5500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22175\"]]");
    p = add_epsg_def_ex (filter, first, last, 22176, "epsg", 22176,
        "POSGAR 98 / Argentina 6", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 6\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-57],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",6500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22176\"]]");
    p = add_epsg_def_ex (filter, first, last, 22177, "epsg", 22177,
        "POSGAR 98 / Argentina 7", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 7\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-54],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",7500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22177\"]]");
    p = add_epsg_def_ex (filter, first, last, 22181, "epsg", 22181,
        "POSGAR 94 / Argentina 1", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 1\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-72],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22181\"]]");
    p = add_epsg_def_ex (filter, first, last, 22182, "epsg", 22182,
        "POSGAR 94 / Argentina 2", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 2\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-69],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",2500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22182\"]]");
    p = add_epsg_def_ex (filter, first, last, 22183, "epsg", 22183,
        "POSGAR 94 / Argentina 3", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 3\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-66],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22183\"]]");
    p = add_epsg_def_ex (filter, first, last, 22184, "epsg", 22184,
        "POSGAR 94 / Argentina 4", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 4\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-63],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",4500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22184\"]]");
    p = add_epsg_def_ex (filter, first, last, 22185, "epsg", 22185,
        "POSGAR 94 / Argentina 5", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 5\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-60],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",5500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22185\"]]");
    p = add_epsg_def_ex (filter, first, last, 22186, "epsg", 22186,
        "POSGAR 94 / Argentina 6", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 6\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-57],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",6500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22186\"]]");
    p = add_epsg_def_ex (filter, first, last, 22187, "epsg", 22187,
        "POSGAR 94 / Argentina 7", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 7\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-54],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",7500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22187\"]]");
    p = add_epsg_def_ex (filter, first, last, 22191, "epsg", 22191,
        "Campo Inchauspe / Argentina 1", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 1\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-72],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22191\"]]");
    p = add_epsg_def_ex (filter, first, last, 22192, "epsg", 22192,
        "Campo Inchauspe / Argentina 2", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 2\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",2500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22192\"]]");
    p = add_epsg_def_ex (filter, first, last, 22193, "epsg", 22193,
        "Campo Inchauspe / Argentina 3", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 3\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-66],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22193\"]]");
    p = add_epsg_def_ex (filter, first, last, 22194, "epsg", 22194,
        "Campo Inchauspe / Argentina 4", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 4\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",4500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22194\"]]");
    p = add_epsg_def_ex (filter, first, last, 22195, "epsg", 22195,
        "Campo Inchauspe / Argentina 5", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 5\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-60],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",5500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22195\"]]");
    p = add_epsg_def_ex (filter, first, last, 22196, "epsg", 22196,
        "Campo Inchauspe / Argentina 6", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 6\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",6500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22196\"]]");
    p = add_epsg_def_ex (filter, first, last, 22197, "epsg", 22197,
        "Campo Inchauspe / Argentina 7", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 7\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-54],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",7500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22197\"]]");
    p = add_epsg_def_ex (filter, first, last, 22234, "epsg", 22234,
        "Cape / UTM zone 34S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / UTM zone 34S\",GEOGCS[\"Cape\",DATUM[\"C");
    add_srs_wkt (p, 1,
        "ape\",SPHEROID[\"Clarke 1880 (Arc)\",6378249.145,293.466");
    add_srs_wkt (p, 2,
        "3077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-29");
    add_srs_wkt (p, 3,
        "2,0,0,0,0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4222\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",21],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22234\"]]");
    p = add_epsg_def_ex (filter, first, last, 22235, "epsg", 22235,
        "Cape / UTM zone 35S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / UTM zone 35S\",GEOGCS[\"Cape\",DATUM[\"C");
    add_srs_wkt (p, 1,
        "ape\",SPHEROID[\"Clarke 1880 (Arc)\",6378249.145,293.466");
    add_srs_wkt (p, 2,
        "3077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-29");
    add_srs_wkt (p, 3,
        "2,0,0,0,0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4222\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22235\"]]");
    p = add_epsg_def_ex (filter, first, last, 22236, "epsg", 22236,
        "Cape / UTM zone 36S (deprecated)", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / UTM zone 36S (deprecated)\",GEOGCS[\"Cap");
    add_srs_wkt (p, 1,
        "e\",DATUM[\"Cape\",SPHEROID[\"Clarke 1880 (Arc)\",637824");
    add_srs_wkt (p, 2,
        "9.145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-136,-108,-292,0,0,0,0],AUTHORITY[\"EPSG\",\"6222\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4222\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",33],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"22236\"]]");
    p = add_epsg_def_ex (filter, first, last, 22275, "epsg", 22275,
        "Cape / Lo15", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo15\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",15],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22275\"]]");
    p = add_epsg_def_ex (filter, first, last, 22277, "epsg", 22277,
        "Cape / Lo17", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo17\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",17],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22277\"]]");
    p = add_epsg_def_ex (filter, first, last, 22279, "epsg", 22279,
        "Cape / Lo19", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo19\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",19],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22279\"]]");
    p = add_epsg_def_ex (filter, first, last, 22281, "epsg", 22281,
        "Cape / Lo21", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo21\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",21],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22281\"]]");
    p = add_epsg_def_ex (filter, first, last, 22283, "epsg", 22283,
        "Cape / Lo23", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo23\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",23],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22283\"]]");
    p = add_epsg_def_ex (filter, first, last, 22285, "epsg", 22285,
        "Cape / Lo25", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo25\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",25],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22285\"]]");
    p = add_epsg_def_ex (filter, first, last, 22287, "epsg", 22287,
        "Cape / Lo27", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo27\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",27],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22287\"]]");
    p = add_epsg_def_ex (filter, first, last, 22289, "epsg", 22289,
        "Cape / Lo29", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo29\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",29],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22289\"]]");
    p = add_epsg_def_ex (filter, first, last, 22291, "epsg", 22291,
        "Cape / Lo31", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo31\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",31],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22291\"]]");
    p = add_epsg_def_ex (filter, first, last, 22293, "epsg", 22293,
        "Cape / Lo33", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo33\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",33],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22293\"]]");
    p = add_epsg_def_ex (filter, first, last, 22332, "epsg", 22332,
        "Carthage / UTM zone 32N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Carthage", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-263");
    add_proj4text (p, 1,
        ",6,431,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / UTM zone 32N\",GEOGCS[\"Carthage\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249");
    add_srs_wkt (p, 2,
        ".2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4223\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"22332\"]]");
    p = add_epsg_def_ex (filter, first, last, 22391, "epsg", 22391,
        "Carthage / Nord Tunisie", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Carthage", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 2,
        "84=-263,6,431,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / Nord Tunisie\",GEOGCS[\"Carthage\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249");
    add_srs_wkt (p, 2,
        ".2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4223\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",36],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",9.9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999625544],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"22391\"]]");
    p = add_epsg_def_ex (filter, first, last, 22392, "epsg", 22392,
        "Carthage / Sud Tunisie", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Carthage", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=9.9 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +t");
    add_proj4text (p, 2,
        "owgs84=-263,6,431,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / Sud Tunisie\",GEOGCS[\"Carthage\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.");
    add_srs_wkt (p, 2,
        "2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4223\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",33.3],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",9.9],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999625769],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"22392\"]]");
    p = add_epsg_def_ex (filter, first, last, 22521, "epsg", 22521,
        "Corrego Alegre 1970-72 / UTM zone 21S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 21S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22521\"]]");
    p = add_epsg_def_ex (filter, first, last, 22522, "epsg", 22522,
        "Corrego Alegre 1970-72 / UTM zone 22S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 22S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22522\"]]");
    p = add_epsg_def_ex (filter, first, last, 22523, "epsg", 22523,
        "Corrego Alegre 1970-72 / UTM zone 23S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 23S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-4");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22523\"]]");
    p = add_epsg_def_ex (filter, first, last, 22524, "epsg", 22524,
        "Corrego Alegre 1970-72 / UTM zone 24S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 24S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22524\"]]");
    p = add_epsg_def_ex (filter, first, last, 22525, "epsg", 22525,
        "Corrego Alegre 1970-72 / UTM zone 25S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 25S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22525\"]]");
    p = add_epsg_def_ex (filter, first, last, 22700, "epsg", 22700,
        "Deir ez Zor / Levant Zone", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Deir_ez_Zor", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.");
    add_proj4text (p, 1,
        "9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Deir ez Zor / Levant Zone\",GEOGCS[\"Deir ez Zo");
    add_srs_wkt (p, 1,
        "r\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6227\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4227\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",34.65],PARAMETER[\"central_meridian\",37.35],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",0.9996256],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",300000],PARAMETER[\"false_northing\",300000],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"22700\"]]");
    p = add_epsg_def_ex (filter, first, last, 22770, "epsg", 22770,
        "Deir ez Zor / Syria Lambert", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Deir_ez_Zor", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.");
    add_proj4text (p, 1,
        "9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Deir ez Zor / Syria Lambert\",GEOGCS[\"Deir ez ");
    add_srs_wkt (p, 1,
        "Zor\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"Clarke 1880 (IGN)");
    add_srs_wkt (p, 2,
        "\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6227\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4227\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",34.65],PARAMETER[\"central_meridian\",37.35");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996256],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",300000],PARAMETER[\"false_northing\",300000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"22770\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 22780, "epsg", 22780,
        "Deir ez Zor / Levant Stereographic", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Deir_ez_Zor", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532");
    add_proj4text (p, 2,
        ",238.69,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Deir ez Zor / Levant Stereographic\",GEOGCS[\"D");
    add_srs_wkt (p, 1,
        "eir ez Zor\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 2,
        "0 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7011\"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6227\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4227\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",34.2],PARAMETER[\"central_meridian\",39.15");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9995341],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"22780\"]]");
    p = add_epsg_def_ex (filter, first, last, 22832, "epsg", 22832,
        "Douala / UTM zone 32N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Douala", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Douala / UTM zone 32N (deprecated)\",GEOGCS[\"D");
    add_srs_wkt (p, 1,
        "ouala\",DATUM[\"Douala\",SPHEROID[\"Clarke 1880 (IGN)\",");
    add_srs_wkt (p, 2,
        "6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6228\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"422");
    add_srs_wkt (p, 7,
        "8\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",9],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"22832");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 22991, "epsg", 22991,
        "Egypt 1907 / Blue Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=35 +k=1 +x_0=300000 +y_0=11");
    add_proj4text (p, 1,
        "00000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Blue Belt\",GEOGCS[\"Egypt 1907\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\",6378200,2");
    add_srs_wkt (p, 2,
        "98.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-130,110,-13,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4229\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",30],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 9,
        "n\",35],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",300000],PARAMETER[\"false_northing\",1100000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"22991\"]]");
    p = add_epsg_def_ex (filter, first, last, 22992, "epsg", 22992,
        "Egypt 1907 / Red Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=81");
    add_proj4text (p, 1,
        "0000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Red Belt\",GEOGCS[\"Egypt 1907\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\",6378200,29");
    add_srs_wkt (p, 2,
        "8.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-130,110,-13,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4229\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",30],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 9,
        "n\",31],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",615000],PARAMETER[\"false_northing\",810000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"22992\"]]");
    p = add_epsg_def_ex (filter, first, last, 22993, "epsg", 22993,
        "Egypt 1907 / Purple Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=20");
    add_proj4text (p, 1,
        "0000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Purple Belt\",GEOGCS[\"Egypt 1907\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\",6378200,");
    add_srs_wkt (p, 2,
        "298.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-130,110,-13");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4229\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",30],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",27],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_easting\",700000],PARAMETER[\"false_northing\",200000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"22993\"]]");
    p = add_epsg_def_ex (filter, first, last, 22994, "epsg", 22994,
        "Egypt 1907 / Extended Purple Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=12");
    add_proj4text (p, 1,
        "00000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Extended Purple Belt\",GEOGCS[\"Eg");
    add_srs_wkt (p, 1,
        "ypt 1907\",DATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\"");
    add_srs_wkt (p, 2,
        ",6378200,298.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-13");
    add_srs_wkt (p, 3,
        "0,110,-13,0,0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4229\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",30],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",27],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",700000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"22994\"]]");
    p = add_epsg_def_ex (filter, first, last, 23028, "epsg", 23028,
        "ED50 / UTM zone 28N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 28N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-15],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23028\"]]");
    p = add_epsg_def_ex (filter, first, last, 23029, "epsg", 23029,
        "ED50 / UTM zone 29N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 29N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-9],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23029\"]]");
    p = add_epsg_def_ex (filter, first, last, 23030, "epsg", 23030,
        "ED50 / UTM zone 30N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 30N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-3],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23030\"]]");
    p = add_epsg_def_ex (filter, first, last, 23031, "epsg", 23031,
        "ED50 / UTM zone 31N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 31N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23031\"]]");
    p = add_epsg_def_ex (filter, first, last, 23032, "epsg", 23032,
        "ED50 / UTM zone 32N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 32N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23032\"]]");
    p = add_epsg_def_ex (filter, first, last, 23033, "epsg", 23033,
        "ED50 / UTM zone 33N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 33N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",15],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23033\"]]");
    p = add_epsg_def_ex (filter, first, last, 23034, "epsg", 23034,
        "ED50 / UTM zone 34N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 34N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",21],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23034\"]]");
    p = add_epsg_def_ex (filter, first, last, 23035, "epsg", 23035,
        "ED50 / UTM zone 35N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 35N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23035\"]]");
    p = add_epsg_def_ex (filter, first, last, 23036, "epsg", 23036,
        "ED50 / UTM zone 36N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 36N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",33],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23036\"]]");
    p = add_epsg_def_ex (filter, first, last, 23037, "epsg", 23037,
        "ED50 / UTM zone 37N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 37N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23037\"]]");
    p = add_epsg_def_ex (filter, first, last, 23038, "epsg", 23038,
        "ED50 / UTM zone 38N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 38N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",45],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23038\"]]");
    p = add_epsg_def_ex (filter, first, last, 23090, "epsg", 23090,
        "ED50 / TM 0 N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9996 +x_0=500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / TM 0 N\",GEOGCS[\"ED50\",DATUM[\"Europea");
    add_srs_wkt (p, 1,
        "n_Datum_1950\",SPHEROID[\"International 1924\",6378388,2");
    add_srs_wkt (p, 2,
        "97,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-121,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4230\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"230");
    add_srs_wkt (p, 13,
        "90\"]]");
    p = add_epsg_def_ex (filter, first, last, 23095, "epsg", 23095,
        "ED50 / TM 5 NE", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=5 +k=0.9996 +x_0=500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / TM 5 NE\",GEOGCS[\"ED50\",DATUM[\"Europe");
    add_srs_wkt (p, 1,
        "an_Datum_1950\",SPHEROID[\"International 1924\",6378388,");
    add_srs_wkt (p, 2,
        "297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-121,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 9,
        "\",5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"fal");
    add_srs_wkt (p, 10,
        "se_easting\",500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 12,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "23095\"]]");
    p = add_epsg_def_ex (filter, first, last, 23239, "epsg", 23239,
        "Fahud / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Fahud", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-346,-1,224,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Fahud / UTM zone 39N\",GEOGCS[\"Fahud\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Fahud\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-346,-1,224,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6232\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4232\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",5");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"232");
    add_srs_wkt (p, 13,
        "39\"]]");
    p = add_epsg_def_ex (filter, first, last, 23240, "epsg", 23240,
        "Fahud / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Fahud", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-346,-1,224,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Fahud / UTM zone 40N\",GEOGCS[\"Fahud\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Fahud\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-346,-1,224,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6232\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4232\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",5");
    add_srs_wkt (p, 9,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"232");
    add_srs_wkt (p, 13,
        "40\"]]");
    p = add_epsg_def_ex (filter, first, last, 23433, "epsg", 23433,
        "Garoua / UTM zone 33N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Garoua", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Garoua / UTM zone 33N (deprecated)\",GEOGCS[\"G");
    add_srs_wkt (p, 1,
        "aroua\",DATUM[\"Garoua\",SPHEROID[\"Clarke 1880 (IGN)\",");
    add_srs_wkt (p, 2,
        "6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6234\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"423");
    add_srs_wkt (p, 7,
        "4\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",15]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2343");
    add_srs_wkt (p, 13,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 23700, "epsg", 23700,
        "HD72 / EOV", 0, 0,
        "GRS 1967", "Greenwich",
        "Hungarian_Datum_1972", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177");
    add_proj4text (p, 1,
        "777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67");
    add_proj4text (p, 2,
        " +towgs84=52.17,-71.82,-14.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"HD72 / EOV\",GEOGCS[\"HD72\",DATUM[\"Hungarian_");
    add_srs_wkt (p, 1,
        "Datum_1972\",SPHEROID[\"GRS 1967\",6378160,298.247167427");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7036\"]],TOWGS84[52.17,-71.82,-14.");
    add_srs_wkt (p, 3,
        "9,0,0,0,0],AUTHORITY[\"EPSG\",\"6237\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4237\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azim");
    add_srs_wkt (p, 8,
        "uth_Center\"],PARAMETER[\"latitude_of_center\",47.144393");
    add_srs_wkt (p, 9,
        "72222222],PARAMETER[\"longitude_of_center\",19.048571777");
    add_srs_wkt (p, 10,
        "77778],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_g");
    add_srs_wkt (p, 11,
        "rid_angle\",90],PARAMETER[\"scale_factor\",0.99993],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_easting\",650000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 13,
        "ng\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 14,
        "]],AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 15,
        ",\"23700\"]]");



























































































































































































































}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_36.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_36 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 7330, "epsg", 7330,
        "NAD83(2011) / InGCS Knox (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.4 +lon_0=-87.45 +k=1.000015 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Knox (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",38.4],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-87.45],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000015],PARAMETER[\"false_easting\",787400],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",118110],UNIT[\"US survey foot\",0");
    add_srs_wkt (p, 12,
        ".3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7330\"]]");
    p = add_epsg_def_ex (filter, first, last, 7331, "epsg", 7331,
        "NAD83(2011) / InGCS LaGrange-Noble (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.25 +lon_0=-85.45 +k=1.000037 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS LaGrange-Noble (m)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",41.25]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",-85.45],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1.000037],PARAMETER[\"false_easting\",240000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"7331\"]]");
    p = add_epsg_def_ex (filter, first, last, 7332, "epsg", 7332,
        "NAD83(2011) / InGCS LaGrange-Noble (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.25 +lon_0=-85.45 +k=1.000037 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS LaGrange-Noble (ftUS)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",41");
    add_srs_wkt (p, 9,
        ".25],PARAMETER[\"central_meridian\",-85.45],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000037],PARAMETER[\"false_easting\",787");
    add_srs_wkt (p, 11,
        "400],PARAMETER[\"false_northing\",118110],UNIT[\"US surv");
    add_srs_wkt (p, 12,
        "ey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"7332\"]]");
    p = add_epsg_def_ex (filter, first, last, 7333, "epsg", 7333,
        "NAD83(2011) / InGCS Lake-Newton (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.7 +lon_0=-87.40000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Lake-Newton (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",40.7],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-87.4],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000026],PARAMETER[\"false_easting\",240000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"7333\"]]");
    p = add_epsg_def_ex (filter, first, last, 7334, "epsg", 7334,
        "NAD83(2011) / InGCS Lake-Newton (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.7 +lon_0=-87.40000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Lake-Newton (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",40.7],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-87.4],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.000026],PARAMETER[\"false_easting\",787400],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",118110],UNIT[\"US survey foo");
    add_srs_wkt (p, 12,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"733");
    add_srs_wkt (p, 14,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 7335, "epsg", 7335,
        "NAD83(2011) / InGCS LaPorte-Pulaski-Starke (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.9 +lon_0=-86.75 +k=1.000027 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS LaPorte-Pulaski-Starke (m)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_R");
    add_srs_wkt (p, 2,
        "eference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298");
    add_srs_wkt (p, 3,
        ".257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",40.9],PARAMETER[\"central_meridian\",-86.75],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.000027],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 11,
        "40000],PARAMETER[\"false_northing\",36000],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7335\"]]");
    p = add_epsg_def_ex (filter, first, last, 7336, "epsg", 7336,
        "NAD83(2011) / InGCS LaPorte-Pulaski-Starke (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.9 +lon_0=-86.75 +k=1.000027 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS LaPorte-Pulaski-Starke (ftU");
    add_srs_wkt (p, 1,
        "S)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",40.9],PARAMETER[\"central_meridian\",-86.75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1.000027],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",787400],PARAMETER[\"false_northing\",118110],UNIT[\"U");
    add_srs_wkt (p, 12,
        "S survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"7336\"]]");
    p = add_epsg_def_ex (filter, first, last, 7337, "epsg", 7337,
        "NAD83(2011) / InGCS Monroe-Morgan (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.95 +lon_0=-86.5 +k=1.000028 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Monroe-Morgan (m)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",38.95],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-86.5],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",1.000028],PARAMETER[\"false_easting\",240000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"7337\"]]");
    p = add_epsg_def_ex (filter, first, last, 7338, "epsg", 7338,
        "NAD83(2011) / InGCS Monroe-Morgan (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.95 +lon_0=-86.5 +k=1.000028 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Monroe-Morgan (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",38.9");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-86.5],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000028],PARAMETER[\"false_easting\",787400");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",118110],UNIT[\"US survey ");
    add_srs_wkt (p, 12,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7338\"]]");
    p = add_epsg_def_ex (filter, first, last, 7339, "epsg", 7339,
        "NAD83(2011) / InGCS Montgomery-Putnam (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.45 +lon_0=-86.95 +k=1.000031 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Montgomery-Putnam (m)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39");
    add_srs_wkt (p, 9,
        ".45],PARAMETER[\"central_meridian\",-86.95],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000031],PARAMETER[\"false_easting\",240");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7339\"]]");
    p = add_epsg_def_ex (filter, first, last, 7340, "epsg", 7340,
        "NAD83(2011) / InGCS Montgomery-Putnam (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.45 +lon_0=-86.95 +k=1.000031 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Montgomery-Putnam (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "39.45],PARAMETER[\"central_meridian\",-86.95],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.000031],PARAMETER[\"false_easting\",7");
    add_srs_wkt (p, 11,
        "87400],PARAMETER[\"false_northing\",118110],UNIT[\"US su");
    add_srs_wkt (p, 12,
        "rvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"7340\"]]");
    p = add_epsg_def_ex (filter, first, last, 7341, "epsg", 7341,
        "NAD83(2011) / InGCS Owen (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.15 +lon_0=-86.90000000000001 +k=1.");
    add_proj4text (p, 1,
        "000026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Owen (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",39.15],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",-86.9],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "1.000026],PARAMETER[\"false_easting\",240000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7341\"]]");
    p = add_epsg_def_ex (filter, first, last, 7342, "epsg", 7342,
        "NAD83(2011) / InGCS Owen (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.15 +lon_0=-86.90000000000001 +k=1.");
    add_proj4text (p, 1,
        "000026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Owen (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",39.15],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-86.9],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000026],PARAMETER[\"false_easting\",787400],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",118110],UNIT[\"US survey foot\",0");
    add_srs_wkt (p, 12,
        ".3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7342\"]]");
    p = add_epsg_def_ex (filter, first, last, 7343, "epsg", 7343,
        "NAD83(2011) / InGCS Parke-Vermillion (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.6 +lon_0=-87.34999999999999 +k=1.0");
    add_proj4text (p, 1,
        "00022 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Parke-Vermillion (m)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.6");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-87.35],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000022],PARAMETER[\"false_easting\",240000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7343\"]]");
    p = add_epsg_def_ex (filter, first, last, 7344, "epsg", 7344,
        "NAD83(2011) / InGCS Parke-Vermillion (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.6 +lon_0=-87.34999999999999 +k=1.0");
    add_proj4text (p, 1,
        "00022 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Parke-Vermillion (ftUS)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Ref");
    add_srs_wkt (p, 2,
        "erence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2");
    add_srs_wkt (p, 3,
        "57222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 9,
        "9.6],PARAMETER[\"central_meridian\",-87.35],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.000022],PARAMETER[\"false_easting\",787");
    add_srs_wkt (p, 11,
        "400],PARAMETER[\"false_northing\",118110],UNIT[\"US surv");
    add_srs_wkt (p, 12,
        "ey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"7344\"]]");
    p = add_epsg_def_ex (filter, first, last, 7345, "epsg", 7345,
        "NAD83(2011) / InGCS Perry (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.8 +lon_0=-86.7 +k=1.00002 +x_0=240");
    add_proj4text (p, 1,
        "000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Perry (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",37.8],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-86.7],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.00002],PARAMETER[\"false_easting\",240000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7345\"]]");
    p = add_epsg_def_ex (filter, first, last, 7346, "epsg", 7346,
        "NAD83(2011) / InGCS Perry (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.8 +lon_0=-86.7 +k=1.00002 +x_0=240");
    add_proj4text (p, 1,
        "000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Perry (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",37.8],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-86.7],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.00002],PARAMETER[\"false_easting\",787400],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",118110],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 12,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7346\"]]");
    p = add_epsg_def_ex (filter, first, last, 7347, "epsg", 7347,
        "NAD83(2011) / InGCS Pike-Warrick (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.85 +lon_0=-87.3 +k=1.000015 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Pike-Warrick (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",37.85],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-87.3],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.000015],PARAMETER[\"false_easting\",240000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"7347\"]]");
    p = add_epsg_def_ex (filter, first, last, 7348, "epsg", 7348,
        "NAD83(2011) / InGCS Pike-Warrick (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.85 +lon_0=-87.3 +k=1.000015 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Pike-Warrick (ftUS)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",37.8");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",-87.3],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",1.000015],PARAMETER[\"false_easting\",787400");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",118110],UNIT[\"US survey ");
    add_srs_wkt (p, 12,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7348\"]]");
    p = add_epsg_def_ex (filter, first, last, 7349, "epsg", 7349,
        "NAD83(2011) / InGCS Posey (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-87.95 +k=1.000013 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Posey (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",37.75],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-87.95],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1.000013],PARAMETER[\"false_easting\",240000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"7349\"]]");
    p = add_epsg_def_ex (filter, first, last, 7350, "epsg", 7350,
        "NAD83(2011) / InGCS Posey (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-87.95 +k=1.000013 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Posey (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",37.75],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-87.95],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000013],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7350\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7351, "epsg", 7351,
        "NAD83(2011) / InGCS Randolph-Wayne (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.7 +lon_0=-85.05 +k=1.000044 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Randolph-Wayne (m)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.7],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-85.05],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1.000044],PARAMETER[\"false_easting\",240000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"7351\"]]");
    p = add_epsg_def_ex (filter, first, last, 7352, "epsg", 7352,
        "NAD83(2011) / InGCS Randolph-Wayne (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.7 +lon_0=-85.05 +k=1.000044 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Randolph-Wayne (ftUS)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",39");
    add_srs_wkt (p, 9,
        ".7],PARAMETER[\"central_meridian\",-85.05],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000044],PARAMETER[\"false_easting\",7874");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",118110],UNIT[\"US surve");
    add_srs_wkt (p, 12,
        "y foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"7352\"]]");
    p = add_epsg_def_ex (filter, first, last, 7353, "epsg", 7353,
        "NAD83(2011) / InGCS Ripley (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.9 +lon_0=-85.3 +k=1.000038 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Ripley (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",38.9],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-85.3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.000038],PARAMETER[\"false_easting\",240000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"7353\"]]");
    p = add_epsg_def_ex (filter, first, last, 7354, "epsg", 7354,
        "NAD83(2011) / InGCS Ripley (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.9 +lon_0=-85.3 +k=1.000038 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Ripley (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",38.9],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.3],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000038],PARAMETER[\"false_easting\",787400],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",118110],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 12,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7354\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7355, "epsg", 7355,
        "NAD83(2011) / InGCS Shelby (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.3 +lon_0=-85.90000000000001 +k=1.0");
    add_proj4text (p, 1,
        "0003 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Shelby (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",39.3],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-85.9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.00003],PARAMETER[\"false_easting\",240000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7355\"]]");
    p = add_epsg_def_ex (filter, first, last, 7356, "epsg", 7356,
        "NAD83(2011) / InGCS Shelby (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.3 +lon_0=-85.90000000000001 +k=1.0");
    add_proj4text (p, 1,
        "0003 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Shelby (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",39.3],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.9],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.00003],PARAMETER[\"false_easting\",787400],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",118110],UNIT[\"US survey foot\",0");
    add_srs_wkt (p, 12,
        ".3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7356\"]]");
    p = add_epsg_def_ex (filter, first, last, 7357, "epsg", 7357,
        "NAD83(2011) / InGCS Spencer (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-87.05 +k=1.000014 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Spencer (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",37.75],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87.05],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000014],PARAMETER[\"false_easting\",240000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"7357\"]]");
    p = add_epsg_def_ex (filter, first, last, 7358, "epsg", 7358,
        "NAD83(2011) / InGCS Spencer (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.75 +lon_0=-87.05 +k=1.000014 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Spencer (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",37.75],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-87.05],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000014],PARAMETER[\"false_easting\",787400],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7358\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7359, "epsg", 7359,
        "NAD83(2011) / InGCS Steuben (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-85 +k=1.000041 +x_0=2400");
    add_proj4text (p, 1,
        "00 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Steuben (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",41.5],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-85],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.000041],PARAMETER[\"false_easting\",240000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"7359\"]]");
    p = add_epsg_def_ex (filter, first, last, 7360, "epsg", 7360,
        "NAD83(2011) / InGCS Steuben (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-85 +k=1.000041 +x_0=2400");
    add_proj4text (p, 1,
        "00 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Steuben (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",41.5],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1.000041],PARAMETER[\"false_easting\",787400],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",118110],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 12,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7360\"]]");
    p = add_epsg_def_ex (filter, first, last, 7361, "epsg", 7361,
        "NAD83(2011) / InGCS Sullivan (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.9 +lon_0=-87.5 +k=1.000017 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Sullivan (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",38.9],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87.5],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1.000017],PARAMETER[\"false_easting\",240000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7361\"]]");
    p = add_epsg_def_ex (filter, first, last, 7362, "epsg", 7362,
        "NAD83(2011) / InGCS Sullivan (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.9 +lon_0=-87.5 +k=1.000017 +x_0=24");
    add_proj4text (p, 1,
        "0000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Sullivan (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",38.9],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-87.5],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",1.000017],PARAMETER[\"false_easting\",787400],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7362\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7363, "epsg", 7363,
        "NAD83(2011) / InGCS Tippecanoe-White (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.2 +lon_0=-86.90000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Tippecanoe-White (m)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refere");
    add_srs_wkt (p, 2,
        "nce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572");
    add_srs_wkt (p, 3,
        "22101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",40.2");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-86.9],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",1.000026],PARAMETER[\"false_easting\",240000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"7363\"]]");
    p = add_epsg_def_ex (filter, first, last, 7364, "epsg", 7364,
        "NAD83(2011) / InGCS Tippecanoe-White (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.2 +lon_0=-86.90000000000001 +k=1.0");
    add_proj4text (p, 1,
        "00026 +x_0=240000 +y_0=36000 +ellps=GRS80 +units=us-ft +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Tippecanoe-White (ftUS)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Ref");
    add_srs_wkt (p, 2,
        "erence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2");
    add_srs_wkt (p, 3,
        "57222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        "0.2],PARAMETER[\"central_meridian\",-86.9],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.000026],PARAMETER[\"false_easting\",7874");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",118110],UNIT[\"US surve");
    add_srs_wkt (p, 12,
        "y foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"7364\"]]");
    p = add_epsg_def_ex (filter, first, last, 7365, "epsg", 7365,
        "NAD83(2011) / InGCS Vanderburgh (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.8 +lon_0=-87.55 +k=1.000015 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Vanderburgh (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",37.8],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-87.55],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",1.000015],PARAMETER[\"false_easting\",240000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"7365\"]]");
    p = add_epsg_def_ex (filter, first, last, 7366, "epsg", 7366,
        "NAD83(2011) / InGCS Vanderburgh (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.8 +lon_0=-87.55 +k=1.000015 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Vanderburgh (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",37.8],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-87.55],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",1.000015],PARAMETER[\"false_easting\",787400],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",118110],UNIT[\"US survey fo");
    add_srs_wkt (p, 12,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"73");
    add_srs_wkt (p, 14,
        "66\"]]");
    p = add_epsg_def_ex (filter, first, last, 7367, "epsg", 7367,
        "NAD83(2011) / InGCS Vigo (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.25 +lon_0=-87.45 +k=1.00002 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Vigo (m)\",GEOGCS[\"NAD83(2");
    add_srs_wkt (p, 1,
        "011)\",DATUM[\"NAD83_National_Spatial_Reference_System_2");
    add_srs_wkt (p, 2,
        "011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",39.25],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",-87.45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.00002],PARAMETER[\"false_easting\",240000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7367\"]]");
    p = add_epsg_def_ex (filter, first, last, 7368, "epsg", 7368,
        "NAD83(2011) / InGCS Vigo (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.25 +lon_0=-87.45 +k=1.00002 +x_0=2");
    add_proj4text (p, 1,
        "40000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Vigo (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",39.25],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87.45],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.00002],PARAMETER[\"false_easting\",787400],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",118110],UNIT[\"US survey foot\",0");
    add_srs_wkt (p, 12,
        ".3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7368\"]]");
    p = add_epsg_def_ex (filter, first, last, 7369, "epsg", 7369,
        "NAD83(2011) / InGCS Wells (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.55 +lon_0=-85.25 +k=1.000034 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Wells (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",40.55],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-85.25],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1.000034],PARAMETER[\"false_easting\",240000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",36000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"7369\"]]");
    p = add_epsg_def_ex (filter, first, last, 7370, "epsg", 7370,
        "NAD83(2011) / InGCS Wells (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.55 +lon_0=-85.25 +k=1.000034 +x_0=");
    add_proj4text (p, 1,
        "240000 +y_0=36000 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / InGCS Wells (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",40.55],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-85.25],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",1.000034],PARAMETER[\"false_easting\",787400],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",118110],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7370\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7373, "epsg", 7373,
        "ONGD14", 1, 1,
        "GRS 1980", "Greenwich",
        "Oman_National_Geodetic_Datum_2014", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"ONGD14\",DATUM[\"Oman_National_Geodetic_Datum_2");
    add_srs_wkt (p, 1,
        "014\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"1147\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7373\"]]");
    p = add_epsg_def_ex (filter, first, last, 7374, "epsg", 7374,
        "ONGD14 / UTM zone 39N", 0, 0,
        "GRS 1980", "Greenwich",
        "Oman_National_Geodetic_Datum_2014", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ONGD14 / UTM zone 39N\",GEOGCS[\"ONGD14\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Oman_National_Geodetic_Datum_2014\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1147\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"7373\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",51],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"7374\"]]");
    p = add_epsg_def_ex (filter, first, last, 7375, "epsg", 7375,
        "ONGD14 / UTM zone 40N", 0, 0,
        "GRS 1980", "Greenwich",
        "Oman_National_Geodetic_Datum_2014", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ONGD14 / UTM zone 40N\",GEOGCS[\"ONGD14\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Oman_National_Geodetic_Datum_2014\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1147\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"7373\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",57],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"7375\"]]");
    p = add_epsg_def_ex (filter, first, last, 7376, "epsg", 7376,
        "ONGD14 / UTM zone 41N", 0, 0,
        "GRS 1980", "Greenwich",
        "Oman_National_Geodetic_Datum_2014", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ONGD14 / UTM zone 41N\",GEOGCS[\"ONGD14\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Oman_National_Geodetic_Datum_2014\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1147\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"7373\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",63],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"7376\"]]");
    p = add_epsg_def_ex (filter, first, last, 7400, "epsg", 7400,
        "NTF (Paris)", 1, 1,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "none", "grad",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,");
    add_proj4text (p, 1,
        "320,0,0,0,0 +pm=paris +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) + NGF IGN69 height\",GEOGCS[\"NTF");
    add_srs_wkt (p, 1,
        " (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Pari");
    add_srs_wkt (p, 2,
        "s\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212");
    add_srs_wkt (p, 3,
        "936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,32");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 5,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 6,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4807\"]],VERT_CS[\"NGF-IGN69 height\",VERT_DATUM");
    add_srs_wkt (p, 9,
        "[\"Nivellement General de la France - IGN69\",2005,AUTHO");
    add_srs_wkt (p, 10,
        "RITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 11,
        "SG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"572");
    add_srs_wkt (p, 12,
        "0\"]],AUTHORITY[\"EPSG\",\"7400\"]]");
    p = add_epsg_def_ex (filter, first, last, 7401, "epsg", 7401,
        "NTF (Paris) / France II (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / France II + NGF Lallemand\",PRO");
    add_srs_wkt (p, 1,
        "JCS[\"NTF (Paris) / France II (deprecated)\",GEOGCS[\"NT");
    add_srs_wkt (p, 2,
        "F (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Par");
    add_srs_wkt (p, 3,
        "is\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021");
    add_srs_wkt (p, 4,
        "2936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,3");
    add_srs_wkt (p, 5,
        "20,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris");
    add_srs_wkt (p, 6,
        "\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\"");
    add_srs_wkt (p, 7,
        ",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[");
    add_srs_wkt (p, 8,
        "\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 9,
        "EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1");
    add_srs_wkt (p, 10,
        "SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",0],PARAMETER[\"scale_factor\",0.999877");
    add_srs_wkt (p, 12,
        "42],PARAMETER[\"false_easting\",600000],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"27582\"]],VERT_CS[\"NGF Lallemand height\",V");
    add_srs_wkt (p, 16,
        "ERT_DATUM[\"Nivellement General de la France - Lallemand");
    add_srs_wkt (p, 17,
        "\",2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7401\"]]");
    p = add_epsg_def_ex (filter, first, last, 7402, "epsg", 7402,
        "NTF (Paris) / France II (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / France II + NGF IGN69\",PROJCS[");
    add_srs_wkt (p, 1,
        "\"NTF (Paris) / France II (deprecated)\",GEOGCS[\"NTF (P");
    add_srs_wkt (p, 2,
        "aris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 3,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 4,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 5,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 6,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 7,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 8,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 9,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 10,
        "\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"cen");
    add_srs_wkt (p, 11,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987742");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_easting\",600000],PARAMETER[\"false_");
    add_srs_wkt (p, 13,
        "northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"27582\"]],VERT_CS[\"NGF-IGN69 height\",VERT_D");
    add_srs_wkt (p, 16,
        "ATUM[\"Nivellement General de la France - IGN69\",2005,A");
    add_srs_wkt (p, 17,
        "UTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 18,
        "\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 19,
        "5720\"]],AUTHORITY[\"EPSG\",\"7402\"]]");
    p = add_epsg_def_ex (filter, first, last, 7403, "epsg", 7403,
        "NTF (Paris) / France III (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / France III + NGF IGN69\",PROJCS");
    add_srs_wkt (p, 1,
        "[\"NTF (Paris) / France III (deprecated)\",GEOGCS[\"NTF ");
    add_srs_wkt (p, 2,
        "(Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris");
    add_srs_wkt (p, 3,
        "\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129");
    add_srs_wkt (p, 4,
        "36269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320");
    add_srs_wkt (p, 5,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 6,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 7,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 8,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 9,
        "PSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 10,
        "P\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",0],PARAMETER[\"scale_factor\",0.9998774");
    add_srs_wkt (p, 12,
        "99],PARAMETER[\"false_easting\",600000],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"27583\"]],VERT_CS[\"NGF-IGN69 height\",VERT_");
    add_srs_wkt (p, 16,
        "DATUM[\"Nivellement General de la France - IGN69\",2005,");
    add_srs_wkt (p, 17,
        "AUTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 18,
        "[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 19,
        "\"5720\"]],AUTHORITY[\"EPSG\",\"7403\"]]");
    p = add_epsg_def_ex (filter, first, last, 7404, "epsg", 7404,
        "RT90", 1, 1,
        "Bessel 1841", "Greenwich",
        "Rikets_koordinatsystem_1990", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=414.1,41.3,603.1,-0");
    add_proj4text (p, 1,
        ".855,2.141,-7.023,0 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"RT90 + RH70 height\",GEOGCS[\"RT90\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Rikets_koordinatsystem_1990\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[414.1,41.3,603.1,-0.855,2.141,-7.023,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6124\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4124\"]],VERT_CS[");
    add_srs_wkt (p, 8,
        "\"RH70 height\",VERT_DATUM[\"Rikets hojdsystem 1970\",20");
    add_srs_wkt (p, 9,
        "05,AUTHORITY[\"EPSG\",\"5117\"]],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 10,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"5718\"]],AUTHORITY[\"EPSG\",\"7404\"]]");
    p = add_epsg_def_ex (filter, first, last, 7405, "epsg", 7405,
        "OSGB 1936 / British National Grid", 0, 0,
        "Airy 1830", "Greenwich",
        "OSGB_1936", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400");
    add_proj4text (p, 1,
        "000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,5");
    add_proj4text (p, 2,
        "42.06,0.15,0.247,0.842,-20.489 +units=m +vunits=m +no_de");
    add_proj4text (p, 3,
        "fs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"OSGB 1936 / British National Grid + ODN heigh");
    add_srs_wkt (p, 1,
        "t\",PROJCS[\"OSGB 1936 / British National Grid\",GEOGCS[");
    add_srs_wkt (p, 2,
        "\"OSGB 1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy 1830\"");
    add_srs_wkt (p, 3,
        ",6377563.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],T");
    add_srs_wkt (p, 4,
        "OWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489]");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"6277\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 6,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 7,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 8,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4277");
    add_srs_wkt (p, 9,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",49],PARAMETER[\"central_meridian\",-2]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"scale_factor\",0.9996012717],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_easting\",400000],PARAMETER[\"false_northing\",-1000");
    add_srs_wkt (p, 13,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 14,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"27700\"]],VERT_CS[\"ODN height\",VERT_DATUM[\"Or");
    add_srs_wkt (p, 16,
        "dnance Datum Newlyn\",2005,AUTHORITY[\"EPSG\",\"5101\"]]");
    add_srs_wkt (p, 17,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"U");
    add_srs_wkt (p, 18,
        "p\",UP],AUTHORITY[\"EPSG\",\"5701\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 19,
        ",\"7405\"]]");
    p = add_epsg_def_ex (filter, first, last, 7406, "epsg", 7406,
        "NAD27", 1, 1,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +datum=NAD27 +vunits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD27 + NGVD29 height\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],VERT_CS[\"NGVD29 height\",VERT_DATUM[\"National G");
    add_srs_wkt (p, 8,
        "eodetic Vertical Datum 1929\",2005,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 9,
        "5102\"]],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 10,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"Up\",UP],AUTHORITY[\"EP");
    add_srs_wkt (p, 11,
        "SG\",\"5702\"]],AUTHORITY[\"EPSG\",\"7406\"]]");
    p = add_epsg_def_ex (filter, first, last, 7407, "epsg", 7407,
        "NAD27 / Texas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=3");
    add_proj4text (p, 1,
        "4 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +vunits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NAD27 / Texas North + NGVD29 height\",PROJCS[");
    add_srs_wkt (p, 1,
        "\"NAD27 / Texas North\",GEOGCS[\"NAD27\",DATUM[\"North_A");
    add_srs_wkt (p, 2,
        "merican_Datum_1927\",SPHEROID[\"Clarke 1866\",6378206.4,");
    add_srs_wkt (p, 3,
        "294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",34.65],PARAMETER[\"standard_parallel_2\"");
    add_srs_wkt (p, 10,
        ",36.18333333333333],PARAMETER[\"latitude_of_origin\",34]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"central_meridian\",-101.5],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",2000000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 15,
        "TY[\"EPSG\",\"32037\"]],VERT_CS[\"NGVD29 height\",VERT_D");
    add_srs_wkt (p, 16,
        "ATUM[\"National Geodetic Vertical Datum 1929\",2005,AUTH");
    add_srs_wkt (p, 17,
        "ORITY[\"EPSG\",\"5102\"]],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 18,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"Up\",U");
    add_srs_wkt (p, 19,
        "P],AUTHORITY[\"EPSG\",\"5702\"]],AUTHORITY[\"EPSG\",\"74");
    add_srs_wkt (p, 20,
        "07\"]]");
    p = add_epsg_def_ex (filter, first, last, 7408, "epsg", 7408,
        "Amersfoort", 1, 1,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=565.2369,50.0087,46");
    add_proj4text (p, 1,
        "5.658,-0.406857,0.350733,-1.87035,4.0812 +vunits=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"RD/NAP\",GEOGCS[\"Amersfoort\",DATUM[\"Amersf");
    add_srs_wkt (p, 1,
        "oort\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.2369,50.0087,4");
    add_srs_wkt (p, 3,
        "65.658,-0.406857,0.350733,-1.87035,4.0812],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]],VERT_CS[\"");
    add_srs_wkt (p, 8,
        "NAP height\",VERT_DATUM[\"Normaal Amsterdams Peil\",2005");
    add_srs_wkt (p, 9,
        ",AUTHORITY[\"EPSG\",\"5109\"]],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 10,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 11,
        ",\"5709\"]],AUTHORITY[\"EPSG\",\"7408\"]]");
    p = add_epsg_def_ex (filter, first, last, 7409, "epsg", 7409,
        "ETRS89", 1, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunit");
    add_proj4text (p, 1,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 + EVRF2000 height\",GEOGCS[\"ETRS89\",");
    add_srs_wkt (p, 1,
        "DATUM[\"European_Terrestrial_Reference_System_1989\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],VERT_CS[\"EVRF");
    add_srs_wkt (p, 8,
        "2000 height\",VERT_DATUM[\"European Vertical Reference F");
    add_srs_wkt (p, 9,
        "rame 2000\",2005,AUTHORITY[\"EPSG\",\"5129\"]],UNIT[\"me");
    add_srs_wkt (p, 10,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AU");
    add_srs_wkt (p, 11,
        "THORITY[\"EPSG\",\"5730\"]],AUTHORITY[\"EPSG\",\"7409\"]");
    add_srs_wkt (p, 12,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7410, "epsg", 7410,
        "PSD93", 1, 1,
        "Clarke 1880 (RGS)", "Greenwich",
        "PDO_Survey_Datum_1993", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,1");
    add_proj4text (p, 1,
        "73.919,-0.81,-1.898,8.336,16.71006 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"PSHD93\",GEOGCS[\"PSD93\",DATUM[\"PDO_Survey_");
    add_srs_wkt (p, 1,
        "Datum_1993\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,");
    add_srs_wkt (p, 2,
        "293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-180.624,-");
    add_srs_wkt (p, 3,
        "225.516,173.919,-0.81,-1.898,8.336,16.71006],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6134\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4134\"]],VERT_CS[");
    add_srs_wkt (p, 8,
        "\"PHD93 height\",VERT_DATUM[\"PDO Height Datum 1993\",20");
    add_srs_wkt (p, 9,
        "05,AUTHORITY[\"EPSG\",\"5123\"]],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 10,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 11,
        "\",\"5724\"]],AUTHORITY[\"EPSG\",\"7410\"]]");
    p = add_epsg_def_ex (filter, first, last, 7411, "epsg", 7411,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone II + NGF Lallemand");
    add_srs_wkt (p, 1,
        " height\",PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGC");
    add_srs_wkt (p, 2,
        "S[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francai");
    add_srs_wkt (p, 3,
        "se_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.");
    add_srs_wkt (p, 4,
        "4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168");
    add_srs_wkt (p, 5,
        ",-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"");
    add_srs_wkt (p, 6,
        "Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"");
    add_srs_wkt (p, 7,
        "grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]]");
    add_srs_wkt (p, 8,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 9,
        "RITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 10,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 12,
        ".99987742],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 13,
        "[\"false_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"27572\"]],VERT_CS[\"NGF Lallemand he");
    add_srs_wkt (p, 16,
        "ight\",VERT_DATUM[\"Nivellement General de la France - L");
    add_srs_wkt (p, 17,
        "allemand\",2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"met");
    add_srs_wkt (p, 18,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUT");
    add_srs_wkt (p, 19,
        "HORITY[\"EPSG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7411\"]]");
    p = add_epsg_def_ex (filter, first, last, 7412, "epsg", 7412,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone II + NGF IGN69\",P");
    add_srs_wkt (p, 1,
        "ROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"NTF (Pa");
    add_srs_wkt (p, 2,
        "ris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129362");
    add_srs_wkt (p, 4,
        "69,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0,");
    add_srs_wkt (p, 5,
        "0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2.");
    add_srs_wkt (p, 6,
        "33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.0");
    add_srs_wkt (p, 7,
        "1570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"La");
    add_srs_wkt (p, 8,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 9,
        "G\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",0],PARAMETER[\"scale_factor\",0.99987742],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_easting\",600000],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"27572\"]],VERT_CS[\"NGF Lallemand height\",VERT");
    add_srs_wkt (p, 16,
        "_DATUM[\"Nivellement General de la France - Lallemand\",");
    add_srs_wkt (p, 17,
        "2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 18,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EP");
    add_srs_wkt (p, 19,
        "SG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7412\"]]");
    p = add_epsg_def_ex (filter, first, last, 7413, "epsg", 7413,
        "NTF (Paris) / Lambert zone III", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone III + NGF IGN69\",");
    add_srs_wkt (p, 1,
        "PROJCS[\"NTF (Paris) / Lambert zone III\",GEOGCS[\"NTF (");
    add_srs_wkt (p, 2,
        "Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 3,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 4,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 5,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 6,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 7,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 8,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 9,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 10,
        "\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"cen");
    add_srs_wkt (p, 11,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987749");
    add_srs_wkt (p, 12,
        "9],PARAMETER[\"false_easting\",600000],PARAMETER[\"false");
    add_srs_wkt (p, 13,
        "_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"27573\"]],VERT_CS[\"NGF Lallemand height\",V");
    add_srs_wkt (p, 16,
        "ERT_DATUM[\"Nivellement General de la France - Lallemand");
    add_srs_wkt (p, 17,
        "\",2005,AUTHORITY[\"EPSG\",\"5118\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"5719\"]],AUTHORITY[\"EPSG\",\"7413\"]]");
    p = add_epsg_def_ex (filter, first, last, 7414, "epsg", 7414,
        "Tokyo", 1, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=bessel +towgs84=-146.414,507.337,68");
    add_proj4text (p, 1,
        "0.507,0,0,0,0 +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"Tokyo + JSLD69 height\",GEOGCS[\"Tokyo\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397.155,299.152");
    add_srs_wkt (p, 2,
        "8128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-146.414,507.");
    add_srs_wkt (p, 3,
        "337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"6301\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4301\"]],VERT_CS[\"JSLD69 height\",VERT_");
    add_srs_wkt (p, 8,
        "DATUM[\"Japanese Standard Levelling Datum 1969\",2005,AU");
    add_srs_wkt (p, 9,
        "THORITY[\"EPSG\",\"5122\"]],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 10,
        "EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5");
    add_srs_wkt (p, 11,
        "723\"]],AUTHORITY[\"EPSG\",\"7414\"]]");
    p = add_epsg_def_ex (filter, first, last, 7415, "epsg", 7415,
        "Amersfoort / RD New", 0, 0,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.387638888");
    add_proj4text (p, 1,
        "88889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel");
    add_proj4text (p, 2,
        " +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1");
    add_proj4text (p, 3,
        ".87035,4.0812 +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"Amersfoort / RD New + NAP height\",PROJCS[\"A");
    add_srs_wkt (p, 1,
        "mersfoort / RD New\",GEOGCS[\"Amersfoort\",DATUM[\"Amers");
    add_srs_wkt (p, 2,
        "foort\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.2369,50.0087,");
    add_srs_wkt (p, 4,
        "465.658,-0.406857,0.350733,-1.87035,4.0812],AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 8,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]],PROJECTI");
    add_srs_wkt (p, 9,
        "ON[\"Oblique_Stereographic\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 10,
        "igin\",52.15616055555555],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",5.38763888888889],PARAMETER[\"scale_factor\",0.9999079]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_easting\",155000],PARAMETER[\"false_n");
    add_srs_wkt (p, 13,
        "orthing\",463000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"28992\"]],VERT_CS[\"NAP height\",VERT_DATUM[\"N");
    add_srs_wkt (p, 16,
        "ormaal Amsterdams Peil\",2005,AUTHORITY[\"EPSG\",\"5109\"");
    add_srs_wkt (p, 17,
        "]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 18,
        "Up\",UP],AUTHORITY[\"EPSG\",\"5709\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 19,
        ",\"7415\"]]");
    p = add_epsg_def_ex (filter, first, last, 7416, "epsg", 7416,
        "ETRS89 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 32N + DVR90 height\",PROJCS");
    add_srs_wkt (p, 1,
        "[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"Eur");
    add_srs_wkt (p, 2,
        "opean_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS");
    add_srs_wkt (p, 3,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]],");
    add_srs_wkt (p, 5,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",9],PARAMETER[\"scale_factor\",0.999");
    add_srs_wkt (p, 11,
        "6],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AU");
    add_srs_wkt (p, 14,
        "THORITY[\"EPSG\",\"25832\"]],VERT_CS[\"DVR90 height\",VE");
    add_srs_wkt (p, 15,
        "RT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHORIT");
    add_srs_wkt (p, 16,
        "Y[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 17,
        ",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5799\"]");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"7416\"]]");
    p = add_epsg_def_ex (filter, first, last, 7417, "epsg", 7417,
        "ETRS89 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / UTM zone 33N + DVR90 height\",PROJCS");
    add_srs_wkt (p, 1,
        "[\"ETRS89 / UTM zone 33N\",GEOGCS[\"ETRS89\",DATUM[\"Eur");
    add_srs_wkt (p, 2,
        "opean_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS");
    add_srs_wkt (p, 3,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]],");
    add_srs_wkt (p, 5,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",15],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"25833\"]],VERT_CS[\"DVR90 height\",V");
    add_srs_wkt (p, 15,
        "ERT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHORI");
    add_srs_wkt (p, 16,
        "TY[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 17,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5799\"");
    add_srs_wkt (p, 18,
        "]],AUTHORITY[\"EPSG\",\"7417\"]]");
    p = add_epsg_def_ex (filter, first, last, 7418, "epsg", 7418,
        "ETRS89 / Kp2000 Jutland", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9.5 +k=0.99995 +x_0=200000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vuni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / Kp2000 Jutland + DVR90 height\",PROJ");
    add_srs_wkt (p, 1,
        "CS[\"ETRS89 / Kp2000 Jutland\",GEOGCS[\"ETRS89\",DATUM[\"");
    add_srs_wkt (p, 2,
        "European_Terrestrial_Reference_System_1989\",SPHEROID[\"");
    add_srs_wkt (p, 3,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 4,
        "19\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 6,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 8,
        "T],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 9,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",9.5],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "0.99995],PARAMETER[\"false_easting\",200000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"2196\"]],VERT_CS[\"DVR90 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHO");
    add_srs_wkt (p, 16,
        "RITY[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 17,
        "SG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"579");
    add_srs_wkt (p, 18,
        "9\"]],AUTHORITY[\"EPSG\",\"7418\"]]");
    p = add_epsg_def_ex (filter, first, last, 7419, "epsg", 7419,
        "ETRS89 / Kp2000 Zealand", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.99995 +x_0=500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / Kp2000 Zealand + DVR90 height\",PROJ");
    add_srs_wkt (p, 1,
        "CS[\"ETRS89 / Kp2000 Zealand\",GEOGCS[\"ETRS89\",DATUM[\"");
    add_srs_wkt (p, 2,
        "European_Terrestrial_Reference_System_1989\",SPHEROID[\"");
    add_srs_wkt (p, 3,
        "GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 4,
        "19\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"");
    add_srs_wkt (p, 5,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 6,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 8,
        "T],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 9,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",12],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".99995],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"2197\"]],VERT_CS[\"DVR90 height\"");
    add_srs_wkt (p, 15,
        ",VERT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHO");
    add_srs_wkt (p, 16,
        "RITY[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 17,
        "SG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"579");
    add_srs_wkt (p, 18,
        "9\"]],AUTHORITY[\"EPSG\",\"7419\"]]");
    p = add_epsg_def_ex (filter, first, last, 7420, "epsg", 7420,
        "ETRS89 / Kp2000 Bornholm", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=900000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +vunits=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 / Kp2000 Bornholm + DVR90 height\",PRO");
    add_srs_wkt (p, 1,
        "JCS[\"ETRS89 / Kp2000 Bornholm\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 2,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 3,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 5,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 6,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 8,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 9,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 10,
        "METER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",900000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"2198\"]],VERT_CS[\"DVR90 height\",VE");
    add_srs_wkt (p, 15,
        "RT_DATUM[\"Dansk Vertikal Reference 1990\",2005,AUTHORIT");
    add_srs_wkt (p, 16,
        "Y[\"EPSG\",\"5206\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 17,
        ",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"5799\"]");
    add_srs_wkt (p, 18,
        "],AUTHORITY[\"EPSG\",\"7420\"]]");
    p = add_epsg_def_ex (filter, first, last, 7421, "epsg", 7421,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +vunits=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone II + NGF-IGN69 hei");
    add_srs_wkt (p, 1,
        "ght\",PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 3,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 4,
        "212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 5,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 6,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 7,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 8,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 9,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 10,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 12,
        "987742],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 13,
        "false_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 15,
        "ORITY[\"EPSG\",\"27572\"]],VERT_CS[\"NGF-IGN69 height\",");
    add_srs_wkt (p, 16,
        "VERT_DATUM[\"Nivellement General de la France - IGN69\",");
    add_srs_wkt (p, 17,
        "2005,AUTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 18,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EP");
    add_srs_wkt (p, 19,
        "SG\",\"5720\"]],AUTHORITY[\"EPSG\",\"7421\"]]");
    p = add_epsg_def_ex (filter, first, last, 7422, "epsg", 7422,
        "NTF (Paris) / Lambert zone III", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"NTF (Paris) / Lambert zone III + NGF-IGN69 he");
    add_srs_wkt (p, 1,
        "ight\",PROJCS[\"NTF (Paris) / Lambert zone III\",GEOGCS[");
    add_srs_wkt (p, 2,
        "\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise");
    add_srs_wkt (p, 3,
        "_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46");
    add_srs_wkt (p, 4,
        "60212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-");
    add_srs_wkt (p, 5,
        "60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"P");
    add_srs_wkt (p, 6,
        "aris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"g");
    add_srs_wkt (p, 7,
        "rad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],");
    add_srs_wkt (p, 8,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 9,
        "ITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 10,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",49],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 12,
        "999877499],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 13,
        "[\"false_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"27573\"]],VERT_CS[\"NGF-IGN69 height");
    add_srs_wkt (p, 16,
        "\",VERT_DATUM[\"Nivellement General de la France - IGN69");
    add_srs_wkt (p, 17,
        "\",2005,AUTHORITY[\"EPSG\",\"5119\"]],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 18,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"");
    add_srs_wkt (p, 19,
        "EPSG\",\"5720\"]],AUTHORITY[\"EPSG\",\"7422\"]]");
    p = add_epsg_def_ex (filter, first, last, 7423, "epsg", 7423,
        "ETRS89", 1, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +vunit");
    add_proj4text (p, 1,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"ETRS89 + EVRF2007 height\",GEOGCS[\"ETRS89\",");
    add_srs_wkt (p, 1,
        "DATUM[\"European_Terrestrial_Reference_System_1989\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],VERT_CS[\"EVRF");
    add_srs_wkt (p, 8,
        "2007 height\",VERT_DATUM[\"European Vertical Reference F");
    add_srs_wkt (p, 9,
        "rame 2007\",2005,AUTHORITY[\"EPSG\",\"5215\"]],UNIT[\"me");
    add_srs_wkt (p, 10,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up\",UP],AU");
    add_srs_wkt (p, 11,
        "THORITY[\"EPSG\",\"5621\"]],AUTHORITY[\"EPSG\",\"7423\"]");
    add_srs_wkt (p, 12,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7528, "epsg", 7528,
        "NAD83(2011) / WISCRS Adams and Juneau (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.36666666666667 +lon_0=-90 +k=1.000");
    add_proj4text (p, 1,
        "0365285 +x_0=147218.6942 +y_0=0.0037 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Adams and Juneau (m)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",43");
    add_srs_wkt (p, 9,
        ".36666666666667],PARAMETER[\"central_meridian\",-90],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1.0000365285],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",147218.6942],PARAMETER[\"false_northing\",0.00");
    add_srs_wkt (p, 12,
        "37],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7528\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 7529, "epsg", 7529,
        "NAD83(2011) / WISCRS Ashland (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.70611111111111 +lon_0=-90.62222222");
    add_proj4text (p, 1,
        "222222 +k=1.0000495683 +x_0=172821.9461 +y_0=0.0017 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Ashland (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",45.70611111");
    add_srs_wkt (p, 9,
        "111111],PARAMETER[\"central_meridian\",-90.6222222222222");
    add_srs_wkt (p, 10,
        "2],PARAMETER[\"scale_factor\",1.0000495683],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",172821.9461],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0017],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7529\"]]");
    p = add_epsg_def_ex (filter, first, last, 7530, "epsg", 7530,
        "NAD83(2011) / WISCRS Barron (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.13333333333333 +lon_0=-91.84999999");
    add_proj4text (p, 1,
        "999999 +k=1.0000486665 +x_0=93150 +y_0=0.0029 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Barron (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",45.133333333");
    add_srs_wkt (p, 9,
        "33333],PARAMETER[\"central_meridian\",-91.85],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.0000486665],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",93150],PARAMETER[\"false_northing\",0.0029],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7530\"]]");
    p = add_epsg_def_ex (filter, first, last, 7531, "epsg", 7531,
        "NAD83(2011) / WISCRS Bayfield (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.66964837722222 +lat_0=46.66964837722");
    add_proj4text (p, 1,
        "222 +lon_0=-91.15277777777779 +k_0=1.0000331195 +x_0=228");
    add_proj4text (p, 2,
        "600.4575 +y_0=148551.4837 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Bayfield (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",46");
    add_srs_wkt (p, 9,
        ".66964837722222],PARAMETER[\"central_meridian\",-91.1527");
    add_srs_wkt (p, 10,
        "7777777779],PARAMETER[\"scale_factor\",1.0000331195],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",228600.4575],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",148551.4837],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"7531\"]]");
    p = add_epsg_def_ex (filter, first, last, 7532, "epsg", 7532,
        "NAD83(2011) / WISCRS Brown (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43 +lon_0=-88 +k=1.00002 +x_0=31600 +");
    add_proj4text (p, 1,
        "y_0=4600 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Brown (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",43],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"central_meridian\",-88],PARAMETER[\"scale_factor\",1.");
    add_srs_wkt (p, 10,
        "00002],PARAMETER[\"false_easting\",31600],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",4600],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"7532\"]]");
    p = add_epsg_def_ex (filter, first, last, 7533, "epsg", 7533,
        "NAD83(2011) / WISCRS Buffalo (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.48138888888889 +lon_0=-91.79722222");
    add_proj4text (p, 1,
        "222222 +k=1.0000382778 +x_0=175260.3502 +y_0=0.0048 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Buffalo (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",43.48138888");
    add_srs_wkt (p, 9,
        "888889],PARAMETER[\"central_meridian\",-91.7972222222222");
    add_srs_wkt (p, 10,
        "2],PARAMETER[\"scale_factor\",1.0000382778],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",175260.3502],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0048],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7533\"]]");
    p = add_epsg_def_ex (filter, first, last, 7534, "epsg", 7534,
        "NAD83(2011) / WISCRS Burnett (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.89871486583333 +lat_0=45.89871486583");
    add_proj4text (p, 1,
        "333 +lon_0=-92.45777777777778 +k_0=1.0000383841 +x_0=640");
    add_proj4text (p, 2,
        "08.1276 +y_0=59445.9043 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Burnett (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45.");
    add_srs_wkt (p, 9,
        "89871486583333],PARAMETER[\"central_meridian\",-92.45777");
    add_srs_wkt (p, 10,
        "777777778],PARAMETER[\"scale_factor\",1.0000383841],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",64008.1276],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",59445.9043],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7534\"]]");
    p = add_epsg_def_ex (filter, first, last, 7535, "epsg", 7535,
        "NAD83(2011) / WISCRS Calumet, Fond du Lac, Outagamie and Winnebago (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.71944444444445 +lon_0=-88.5 +k=1.0");
    add_proj4text (p, 1,
        "000286569 +x_0=244754.8893 +y_0=0.0049 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Calumet, Fond du Lac, Outa");
    add_srs_wkt (p, 1,
        "gamie and Winnebago (m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"");
    add_srs_wkt (p, 2,
        "NAD83_National_Spatial_Reference_System_2011\",SPHEROID[");
    add_srs_wkt (p, 3,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"6318\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",42.71944444444445],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",-88.5],PARAMETER[\"scale_factor\",1.0");
    add_srs_wkt (p, 11,
        "000286569],PARAMETER[\"false_easting\",244754.8893],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_northing\",0.0049],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"7535\"]]");
    p = add_epsg_def_ex (filter, first, last, 7536, "epsg", 7536,
        "NAD83(2011) / WISCRS Chippewa (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.97785689861112 +lat_0=44.97785689861");
    add_proj4text (p, 1,
        "112 +lon_0=-91.29444444444444 +k_0=1.0000391127 +x_0=600");
    add_proj4text (p, 2,
        "45.72 +y_0=44091.4346 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Chippewa (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44");
    add_srs_wkt (p, 9,
        ".97785689861112],PARAMETER[\"central_meridian\",-91.2944");
    add_srs_wkt (p, 10,
        "4444444444],PARAMETER[\"scale_factor\",1.0000391127],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",60045.72],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",44091.4346],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"7536\"]]");
    p = add_epsg_def_ex (filter, first, last, 7537, "epsg", 7537,
        "NAD83(2011) / WISCRS Clark (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.6 +lon_0=-90.70833333333334 +k=1.0");
    add_proj4text (p, 1,
        "000463003 +x_0=199949.1989 +y_0=0.0086 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Clark (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",43.6],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-90.70833333333334],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.0000463003],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",199949.1989],PARAMETER[\"false_northing\",0.0086],UNIT[");
    add_srs_wkt (p, 12,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7537\"]]");
    p = add_epsg_def_ex (filter, first, last, 7538, "epsg", 7538,
        "NAD83(2011) / WISCRS Columbia (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.46254664583333 +lat_0=43.46254664583");
    add_proj4text (p, 1,
        "333 +lon_0=-89.39444444444445 +k_0=1.00003498 +x_0=16916");
    add_proj4text (p, 2,
        "4.3381 +y_0=111569.6134 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Columbia (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43");
    add_srs_wkt (p, 9,
        ".46254664583333],PARAMETER[\"central_meridian\",-89.3944");
    add_srs_wkt (p, 10,
        "4444444445],PARAMETER[\"scale_factor\",1.00003498],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",169164.3381],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",111569.6134],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7538\"]]");
    p = add_epsg_def_ex (filter, first, last, 7539, "epsg", 7539,
        "NAD83(2011) / WISCRS Crawford (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.200055605 +lat_0=43.200055605 +lon_0");
    add_proj4text (p, 1,
        "=-90.9388888888889 +k_0=1.0000349151 +x_0=113690.6274 +y");
    add_proj4text (p, 2,
        "_0=53703.1201 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Crawford (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43");
    add_srs_wkt (p, 9,
        ".200055605],PARAMETER[\"central_meridian\",-90.938888888");
    add_srs_wkt (p, 10,
        "8889],PARAMETER[\"scale_factor\",1.0000349151],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",113690.6274],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",53703.1201],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 14,
        "PSG\",\"7539\"]]");
    p = add_epsg_def_ex (filter, first, last, 7540, "epsg", 7540,
        "NAD83(2011) / WISCRS Dane (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.0695160375 +lat_0=43.0695160375 +lon");
    add_proj4text (p, 1,
        "_0=-89.42222222222223 +k_0=1.0000384786 +x_0=247193.2944");
    add_proj4text (p, 2,
        " +y_0=146591.9896 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Dane (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 8,
        "mal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43.069");
    add_srs_wkt (p, 9,
        "5160375],PARAMETER[\"central_meridian\",-89.422222222222");
    add_srs_wkt (p, 10,
        "23],PARAMETER[\"scale_factor\",1.0000384786],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",247193.2944],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",146591.9896],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"7540\"]]");
    p = add_epsg_def_ex (filter, first, last, 7541, "epsg", 7541,
        "NAD83(2011) / WISCRS Dodge and Jefferson (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.47222222222222 +lon_0=-88.77500000");
    add_proj4text (p, 1,
        "000001 +k=1.0000346418 +x_0=263347.7263 +y_0=0.0076 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Dodge and Jefferson (m)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "41.47222222222222],PARAMETER[\"central_meridian\",-88.77");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1.0000346418],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",263347.7263],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0076],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7541\"]]");
    p = add_epsg_def_ex (filter, first, last, 7542, "epsg", 7542,
        "NAD83(2011) / WISCRS Door (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.4 +lon_0=-87.27222222222223 +k=1.0");
    add_proj4text (p, 1,
        "000187521 +x_0=158801.1176 +y_0=0.0023 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Door (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",44.4],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-87.27222222222223],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.0000187521],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "158801.1176],PARAMETER[\"false_northing\",0.0023],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7542\"]]");
    p = add_epsg_def_ex (filter, first, last, 7543, "epsg", 7543,
        "NAD83(2011) / WISCRS Douglas (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.88333333333333 +lon_0=-91.91666666");
    add_proj4text (p, 1,
        "666667 +k=1.0000385418 +x_0=59131.3183 +y_0=0.0041 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Douglas (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",45.88333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"central_meridian\",-91.9166666666666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",1.0000385418],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",59131.3183],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0041],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7543\"]]");
    p = add_epsg_def_ex (filter, first, last, 7544, "epsg", 7544,
        "NAD83(2011) / WISCRS Dunn (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.40833333333333 +lon_0=-91.89444444");
    add_proj4text (p, 1,
        "444445 +k=1.0000410324 +x_0=51816.104 +y_0=0.003 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Dunn (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",44.40833333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"central_meridian\",-91.89444444444445],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.0000410324],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",51816.104],PARAMETER[\"false_northing\",0.0");
    add_srs_wkt (p, 12,
        "03],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7544\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 7545, "epsg", 7545,
        "NAD83(2011) / WISCRS Eau Claire (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.87228112638889 +lat_0=44.87228112638");
    add_proj4text (p, 1,
        "889 +lon_0=-91.28888888888889 +k_0=1.000035079 +x_0=1200");
    add_proj4text (p, 2,
        "91.4402 +y_0=91687.92389999999 +ellps=GRS80 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Eau Claire (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "44.87228112638889],PARAMETER[\"central_meridian\",-91.28");
    add_srs_wkt (p, 10,
        "888888888889],PARAMETER[\"scale_factor\",1.000035079],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",120091.4402],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",91687.9239],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"7545\"]]");
    p = add_epsg_def_ex (filter, first, last, 7546, "epsg", 7546,
        "NAD83(2011) / WISCRS Florence (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.43888888888888 +lon_0=-88.14166666");
    add_proj4text (p, 1,
        "666668 +k=1.0000552095 +x_0=133502.6683 +y_0=0.0063 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Florence (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",45.4388888");
    add_srs_wkt (p, 9,
        "8888888],PARAMETER[\"central_meridian\",-88.141666666666");
    add_srs_wkt (p, 10,
        "68],PARAMETER[\"scale_factor\",1.0000552095],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",133502.6683],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0063],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7546\"]]");
    p = add_epsg_def_ex (filter, first, last, 7547, "epsg", 7547,
        "NAD83(2011) / WISCRS Forest (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.00555555555555 +lon_0=-88.63333333");
    add_proj4text (p, 1,
        "333334 +k=1.0000673004 +x_0=275844.5533 +y_0=0.0157 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Forest (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",44.005555555");
    add_srs_wkt (p, 9,
        "55555],PARAMETER[\"central_meridian\",-88.63333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1.0000673004],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",275844.5533],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0157],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7547\"]]");
    p = add_epsg_def_ex (filter, first, last, 7548, "epsg", 7548,
        "NAD83(2011) / WISCRS Grant (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.41111111111111 +lon_0=-90.8 +k=1.0");
    add_proj4text (p, 1,
        "000349452 +x_0=242316.4841 +y_0=0.01 +ellps=GRS80 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Grant (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",41.4111111111");
    add_srs_wkt (p, 9,
        "1111],PARAMETER[\"central_meridian\",-90.8],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1.0000349452],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",242316.4841],PARAMETER[\"false_northing\",0.01],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7548\"]]");
    p = add_epsg_def_ex (filter, first, last, 7549, "epsg", 7549,
        "NAD83(2011) / WISCRS Green and Lafayette (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.63756227694444 +lat_0=42.63756227694");
    add_proj4text (p, 1,
        "444 +lon_0=-89.83888888888889 +k_0=1.0000390487 +x_0=170");
    add_proj4text (p, 2,
        "078.7403 +y_0=45830.2947 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Green and Lafayette (m)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",42.63756227694444],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-89.83888888888889],PARAMETER[\"scale_factor\",1.000039");
    add_srs_wkt (p, 11,
        "0487],PARAMETER[\"false_easting\",170078.7403],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",45830.2947],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"7549\"]]");
    p = add_epsg_def_ex (filter, first, last, 7550, "epsg", 7550,
        "NAD83(2011) / WISCRS Green Lake and Marquette (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.80700011777778 +lat_0=43.80700011777");
    add_proj4text (p, 1,
        "778 +lon_0=-89.24166666666667 +k_0=1.0000344057 +x_0=150");
    add_proj4text (p, 2,
        "876.3018 +y_0=79170.7795 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Green Lake and Marquette (");
    add_srs_wkt (p, 1,
        "m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",43.80700011777778],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",-89.24166666666667],PARAMETER[\"scale_factor\",1.");
    add_srs_wkt (p, 11,
        "0000344057],PARAMETER[\"false_easting\",150876.3018],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_northing\",79170.7795],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"7550\"]]");
    p = add_epsg_def_ex (filter, first, last, 7551, "epsg", 7551,
        "NAD83(2011) / WISCRS Iowa (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.53888888888888 +lon_0=-90.16111111");
    add_proj4text (p, 1,
        "111111 +k=1.0000394961 +x_0=113081.0261 +y_0=0.0045 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Iowa (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",42.53888888888");
    add_srs_wkt (p, 9,
        "888],PARAMETER[\"central_meridian\",-90.16111111111111],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.0000394961],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",113081.0261],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        ".0045],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"75");
    add_srs_wkt (p, 14,
        "51\"]]");
    p = add_epsg_def_ex (filter, first, last, 7552, "epsg", 7552,
        "NAD83(2011) / WISCRS Iron (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.43333333333333 +lon_0=-90.25555555");
    add_proj4text (p, 1,
        "555556 +k=1.0000677153 +x_0=220980.4419 +y_0=0.008500000");
    add_proj4text (p, 2,
        "000000001 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Iron (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",45.43333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"central_meridian\",-90.25555555555556],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.0000677153],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",220980.4419],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        ".0085],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"75");
    add_srs_wkt (p, 14,
        "52\"]]");
    p = add_epsg_def_ex (filter, first, last, 7553, "epsg", 7553,
        "NAD83(2011) / WISCRS Jackson (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.25333512777778 +lon_0=-90.84429651");
    add_proj4text (p, 1,
        "944444 +k=1.0000353 +x_0=27000 +y_0=25000 +ellps=GRS80 +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Jackson (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",44.25333512");
    add_srs_wkt (p, 9,
        "777778],PARAMETER[\"central_meridian\",-90.8442965194444");
    add_srs_wkt (p, 10,
        "4],PARAMETER[\"scale_factor\",1.0000353],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",27000],PARAMETER[\"false_northing\",25000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7553\"]]");
    p = add_epsg_def_ex (filter, first, last, 7554, "epsg", 7554,
        "NAD83(2011) / WISCRS Kenosha, Milwaukee, Ozaukee and Racine (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.21666666666667 +lon_0=-87.89444444");
    add_proj4text (p, 1,
        "444445 +k=1.0000260649 +x_0=185928.3728 +y_0=0.0009 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Kenosha, Milwaukee, Ozauke");
    add_srs_wkt (p, 1,
        "e and Racine (m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_");
    add_srs_wkt (p, 2,
        "National_Spatial_Reference_System_2011\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 3,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 4,
        "]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 8,
        "18\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",42.21666666666667],PARAMETER[\"centr");
    add_srs_wkt (p, 10,
        "al_meridian\",-87.89444444444445],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 11,
        "or\",1.0000260649],PARAMETER[\"false_easting\",185928.37");
    add_srs_wkt (p, 12,
        "28],PARAMETER[\"false_northing\",0.0009],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7554\"]]");
    p = add_epsg_def_ex (filter, first, last, 7555, "epsg", 7555,
        "NAD83(2011) / WISCRS Kewaunee, Manitowoc and Sheboygan (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.26666666666667 +lon_0=-87.55 +k=1.");
    add_proj4text (p, 1,
        "0000233704 +x_0=79857.7614 +y_0=0.0012 +ellps=GRS80 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Kewaunee, Manitowoc and Sh");
    add_srs_wkt (p, 1,
        "eboygan (m)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_Natio");
    add_srs_wkt (p, 2,
        "nal_Spatial_Reference_System_2011\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 3,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",43.26666666666667],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",-87.55],PARAMETER[\"scale_factor\",1.0000233704]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",79857.7614],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",0.0012],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7555\"]]");
    p = add_epsg_def_ex (filter, first, last, 7556, "epsg", 7556,
        "NAD83(2011) / WISCRS La Crosse (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.45111111111111 +lon_0=-91.31666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000319985 +x_0=130454.6598 +y_0=0.0033 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS La Crosse (m)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",43.4511111");
    add_srs_wkt (p, 9,
        "1111111],PARAMETER[\"central_meridian\",-91.316666666666");
    add_srs_wkt (p, 10,
        "66],PARAMETER[\"scale_factor\",1.0000319985],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",130454.6598],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0033],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7556\"]]");
    p = add_epsg_def_ex (filter, first, last, 7557, "epsg", 7557,
        "NAD83(2011) / WISCRS Langlade (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.15423710527778 +lat_0=45.15423710527");
    add_proj4text (p, 1,
        "778 +lon_0=-89.03333333333333 +k_0=1.0000627024 +x_0=198");
    add_proj4text (p, 2,
        "425.197 +y_0=105279.7829 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Langlade (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".15423710527778],PARAMETER[\"central_meridian\",-89.0333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1.0000627024],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",198425.197],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",105279.7829],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"7557\"]]");
    p = add_epsg_def_ex (filter, first, last, 7558, "epsg", 7558,
        "NAD83(2011) / WISCRS Lincoln (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.84444444444445 +lon_0=-89.73333333");
    add_proj4text (p, 1,
        "333333 +k=1.0000599003 +x_0=116129.0323 +y_0=0.0058 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Lincoln (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",44.84444444");
    add_srs_wkt (p, 9,
        "444445],PARAMETER[\"central_meridian\",-89.7333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",1.0000599003],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",116129.0323],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0058],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7558\"]]");
    p = add_epsg_def_ex (filter, first, last, 7559, "epsg", 7559,
        "NAD83(2011) / WISCRS Marathon (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.90090442361111 +lat_0=44.90090442361");
    add_proj4text (p, 1,
        "111 +lon_0=-89.77 +k_0=1.000053289 +x_0=74676.1493 +y_0=");
    add_proj4text (p, 2,
        "55049.2669 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Marathon (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44");
    add_srs_wkt (p, 9,
        ".90090442361111],PARAMETER[\"central_meridian\",-89.77],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.000053289],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",74676.1493],PARAMETER[\"false_northing\",550");
    add_srs_wkt (p, 12,
        "49.2669],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7559\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925










































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_36 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 23830, "epsg", 23830,
        "DGN95 / Indonesia TM-3 zone 46.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=94.5 +k=0.9999 +x_0=200000 +");
    add_proj4text (p, 1,
        "y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 46.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",94.5],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23830\"]]");
    p = add_epsg_def_ex (filter, first, last, 23831, "epsg", 23831,
        "DGN95 / Indonesia TM-3 zone 47.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=97.5 +k=0.9999 +x_0=200000 +");
    add_proj4text (p, 1,
        "y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 47.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",97.5],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23831\"]]");
    p = add_epsg_def_ex (filter, first, last, 23832, "epsg", 23832,
        "DGN95 / Indonesia TM-3 zone 47.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=100.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 47.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",100.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23832\"]]");
    p = add_epsg_def_ex (filter, first, last, 23833, "epsg", 23833,
        "DGN95 / Indonesia TM-3 zone 48.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=103.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 48.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",103.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23833\"]]");
    p = add_epsg_def_ex (filter, first, last, 23834, "epsg", 23834,
        "DGN95 / Indonesia TM-3 zone 48.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=106.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 48.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",106.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23834\"]]");
    p = add_epsg_def_ex (filter, first, last, 23835, "epsg", 23835,
        "DGN95 / Indonesia TM-3 zone 49.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=109.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 49.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",109.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23835\"]]");
    p = add_epsg_def_ex (filter, first, last, 23836, "epsg", 23836,
        "DGN95 / Indonesia TM-3 zone 49.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=112.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 49.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",112.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23836\"]]");
    p = add_epsg_def_ex (filter, first, last, 23837, "epsg", 23837,
        "DGN95 / Indonesia TM-3 zone 50.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=115.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 50.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",115.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23837\"]]");
    p = add_epsg_def_ex (filter, first, last, 23838, "epsg", 23838,
        "DGN95 / Indonesia TM-3 zone 50.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=118.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 50.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",118.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23838\"]]");
    p = add_epsg_def_ex (filter, first, last, 23839, "epsg", 23839,
        "DGN95 / Indonesia TM-3 zone 51.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=121.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 51.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",121.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23839\"]]");
    p = add_epsg_def_ex (filter, first, last, 23840, "epsg", 23840,
        "DGN95 / Indonesia TM-3 zone 51.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=124.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 51.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",124.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23840\"]]");
    p = add_epsg_def_ex (filter, first, last, 23841, "epsg", 23841,
        "DGN95 / Indonesia TM-3 zone 52.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=127.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 52.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",127.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23841\"]]");
    p = add_epsg_def_ex (filter, first, last, 23842, "epsg", 23842,
        "DGN95 / Indonesia TM-3 zone 52.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=130.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 52.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",130.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23842\"]]");
    p = add_epsg_def_ex (filter, first, last, 23843, "epsg", 23843,
        "DGN95 / Indonesia TM-3 zone 53.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=133.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 53.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",133.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23843\"]]");
    p = add_epsg_def_ex (filter, first, last, 23844, "epsg", 23844,
        "DGN95 / Indonesia TM-3 zone 53.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=136.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 53.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",136.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23844\"]]");
    p = add_epsg_def_ex (filter, first, last, 23845, "epsg", 23845,
        "DGN95 / Indonesia TM-3 zone 54.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=139.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 54.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",139.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23845\"]]");
    p = add_epsg_def_ex (filter, first, last, 23846, "epsg", 23846,
        "ID74 / UTM zone 46N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 46N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",93],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"23846\"]]");
    p = add_epsg_def_ex (filter, first, last, 23847, "epsg", 23847,
        "ID74 / UTM zone 47N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 47N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",99],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"23847\"]]");
    p = add_epsg_def_ex (filter, first, last, 23848, "epsg", 23848,
        "ID74 / UTM zone 48N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 48N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",105],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23848\"]]");
    p = add_epsg_def_ex (filter, first, last, 23849, "epsg", 23849,
        "ID74 / UTM zone 49N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 49N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",111],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23849\"]]");
    p = add_epsg_def_ex (filter, first, last, 23850, "epsg", 23850,
        "ID74 / UTM zone 50N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 50N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",117],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23850\"]]");
    p = add_epsg_def_ex (filter, first, last, 23851, "epsg", 23851,
        "ID74 / UTM zone 51N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 51N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",123],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23851\"]]");
    p = add_epsg_def_ex (filter, first, last, 23852, "epsg", 23852,
        "ID74 / UTM zone 52N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 52N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",129],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23852\"]]");
    p = add_epsg_def_ex (filter, first, last, 23853, "epsg", 23853,
        "ID74 / UTM zone 53N (deprecated)", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 53N (deprecated)\",GEOGCS[\"ID7");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"Indonesian_Datum_1974\",SPHEROID[\"Indonesia");
    add_srs_wkt (p, 2,
        "n National Spheroid\",6378160,298.247,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7021\"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6238\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",135],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"23853\"]]");
    p = add_epsg_def_ex (filter, first, last, 23866, "epsg", 23866,
        "DGN95 / UTM zone 46N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 46N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",93],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23866\"]]");
    p = add_epsg_def_ex (filter, first, last, 23867, "epsg", 23867,
        "DGN95 / UTM zone 47N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 47N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",99],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23867\"]]");
    p = add_epsg_def_ex (filter, first, last, 23868, "epsg", 23868,
        "DGN95 / UTM zone 48N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 48N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",105],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23868\"]]");
    p = add_epsg_def_ex (filter, first, last, 23869, "epsg", 23869,
        "DGN95 / UTM zone 49N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 49N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23869\"]]");
    p = add_epsg_def_ex (filter, first, last, 23870, "epsg", 23870,
        "DGN95 / UTM zone 50N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 50N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23870\"]]");
    p = add_epsg_def_ex (filter, first, last, 23871, "epsg", 23871,
        "DGN95 / UTM zone 51N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 51N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23871\"]]");
    p = add_epsg_def_ex (filter, first, last, 23872, "epsg", 23872,
        "DGN95 / UTM zone 52N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 52N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",129],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23872\"]]");
    p = add_epsg_def_ex (filter, first, last, 23877, "epsg", 23877,
        "DGN95 / UTM zone 47S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 47S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",99],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"23877\"]]");
    p = add_epsg_def_ex (filter, first, last, 23878, "epsg", 23878,
        "DGN95 / UTM zone 48S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 48S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",105],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23878\"]]");
    p = add_epsg_def_ex (filter, first, last, 23879, "epsg", 23879,
        "DGN95 / UTM zone 49S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 49S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23879\"]]");
    p = add_epsg_def_ex (filter, first, last, 23880, "epsg", 23880,
        "DGN95 / UTM zone 50S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 50S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23880\"]]");
    p = add_epsg_def_ex (filter, first, last, 23881, "epsg", 23881,
        "DGN95 / UTM zone 51S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 51S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23881\"]]");
    p = add_epsg_def_ex (filter, first, last, 23882, "epsg", 23882,
        "DGN95 / UTM zone 52S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 52S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",129],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23882\"]]");
    p = add_epsg_def_ex (filter, first, last, 23883, "epsg", 23883,
        "DGN95 / UTM zone 53S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 53S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",135],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23883\"]]");
    p = add_epsg_def_ex (filter, first, last, 23884, "epsg", 23884,
        "DGN95 / UTM zone 54S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 54S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",141],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23884\"]]");
    p = add_epsg_def_ex (filter, first, last, 23886, "epsg", 23886,
        "ID74 / UTM zone 46S (deprecated)", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 46S (deprecated)\",GEOGCS[\"ID7");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"Indonesian_Datum_1974\",SPHEROID[\"Indonesia");
    add_srs_wkt (p, 2,
        "n National Spheroid\",6378160,298.247,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7021\"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6238\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",93],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"23886\"]]");
    p = add_epsg_def_ex (filter, first, last, 23887, "epsg", 23887,
        "ID74 / UTM zone 47S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 47S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",99],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"23887\"]]");
    p = add_epsg_def_ex (filter, first, last, 23888, "epsg", 23888,
        "ID74 / UTM zone 48S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 48S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",105],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23888\"]]");
    p = add_epsg_def_ex (filter, first, last, 23889, "epsg", 23889,
        "ID74 / UTM zone 49S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 49S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",111],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23889\"]]");
    p = add_epsg_def_ex (filter, first, last, 23890, "epsg", 23890,
        "ID74 / UTM zone 50S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 50S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",117],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23890\"]]");
    p = add_epsg_def_ex (filter, first, last, 23891, "epsg", 23891,
        "ID74 / UTM zone 51S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 51S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",123],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23891\"]]");
    p = add_epsg_def_ex (filter, first, last, 23892, "epsg", 23892,
        "ID74 / UTM zone 52S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 52S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",129],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23892\"]]");
    p = add_epsg_def_ex (filter, first, last, 23893, "epsg", 23893,
        "ID74 / UTM zone 53S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 53S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",135],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23893\"]]");
    p = add_epsg_def_ex (filter, first, last, 23894, "epsg", 23894,
        "ID74 / UTM zone 54S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 54S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",141],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23894\"]]");
    p = add_epsg_def_ex (filter, first, last, 23946, "epsg", 23946,
        "Indian 1954 / UTM zone 46N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1954", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=217,823,299,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1954 / UTM zone 46N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Indian_1954\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6239\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4239\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",93],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"23946\"]]");
    p = add_epsg_def_ex (filter, first, last, 23947, "epsg", 23947,
        "Indian 1954 / UTM zone 47N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1954", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=217,823,299,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1954 / UTM zone 47N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Indian_1954\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6239\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4239\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",99],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"23947\"]]");
    p = add_epsg_def_ex (filter, first, last, 23948, "epsg", 23948,
        "Indian 1954 / UTM zone 48N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1954", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=217,823,299,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1954 / UTM zone 48N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Indian_1954\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6239\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4239\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",105],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"23948\"]]");
    p = add_epsg_def_ex (filter, first, last, 24047, "epsg", 24047,
        "Indian 1975 / UTM zone 47N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=210,814,289,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1975 / UTM zone 47N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "75\",DATUM[\"Indian_1975\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6240\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4240\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",99],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"24047\"]]");
    p = add_epsg_def_ex (filter, first, last, 24048, "epsg", 24048,
        "Indian 1975 / UTM zone 48N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=210,814,289,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1975 / UTM zone 48N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "75\",DATUM[\"Indian_1975\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6240\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4240\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",105],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"24048\"]]");
    p = add_epsg_def_ex (filter, first, last, 24100, "epsg", 24100,
        "Jamaica 1875 / Jamaica (Old Grid)", 0, 0,
        "Clarke 1880", "Greenwich",
        "Jamaica_1875", "Lambert_Conformal_Conic_1SP", "Clarke's foot",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167");
    add_proj4text (p, 1,
        "638.49597 +y_0=121918.90616 +a=6378249.144808011 +b=6356");
    add_proj4text (p, 2,
        "514.966204134 +to_meter=0.3047972654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Jamaica 1875 / Jamaica (Old Grid)\",GEOGCS[\"Ja");
    add_srs_wkt (p, 1,
        "maica 1875\",DATUM[\"Jamaica_1875\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "80\",6378249.144808011,293.4663076556349,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7034\"]],AUTHORITY[\"EPSG\",\"6241\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4241\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",18],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-77],PARAMETER[\"scale_factor\",1],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",550000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",400000],UNIT[\"Clarke's foot\",0.3047972654,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9005\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"24100\"]]");
    p = add_epsg_def_ex (filter, first, last, 24200, "epsg", 24200,
        "JAD69 / Jamaica National Grid", 0, 0,
        "Clarke 1866", "Greenwich",
        "Jamaica_1969", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250");
    add_proj4text (p, 1,
        "000 +y_0=150000 +ellps=clrk66 +towgs84=70,207,389.5,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JAD69 / Jamaica National Grid\",GEOGCS[\"JAD69\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Jamaica_1969\",SPHEROID[\"Clarke 1866\",6378206");
    add_srs_wkt (p, 2,
        ".4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[70,207,389.5,0,0,0,0],AUTHORITY[\"EPSG\",\"6242\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4242\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 8,
        "mal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",18],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-77],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",250000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",150000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24200\"]]");
    p = add_epsg_def_ex (filter, first, last, 24305, "epsg", 24305,
        "Kalianpur 1937 / UTM zone 45N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kalianpur_1937", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=214,804,268,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1937 / UTM zone 45N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1937\",DATUM[\"Kalianpur_1937\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1937 Adjustment)\",6377276.345,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7015\"]],TOWGS84[214,804,268,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4144\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",87],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24305\"]]");
    p = add_epsg_def_ex (filter, first, last, 24306, "epsg", 24306,
        "Kalianpur 1937 / UTM zone 46N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kalianpur_1937", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=214,804,268,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1937 / UTM zone 46N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1937\",DATUM[\"Kalianpur_1937\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1937 Adjustment)\",6377276.345,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7015\"]],TOWGS84[214,804,268,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4144\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",93],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24306\"]]");
    p = add_epsg_def_ex (filter, first, last, 24311, "epsg", 24311,
        "Kalianpur 1962 / UTM zone 41N", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +a=6377301.243 +b=6356100.230165384 +");
    add_proj4text (p, 1,
        "towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / UTM zone 41N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",63],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24311\"]]");
    p = add_epsg_def_ex (filter, first, last, 24312, "epsg", 24312,
        "Kalianpur 1962 / UTM zone 42N", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +a=6377301.243 +b=6356100.230165384 +");
    add_proj4text (p, 1,
        "towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / UTM zone 42N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",69],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24312\"]]");
    p = add_epsg_def_ex (filter, first, last, 24313, "epsg", 24313,
        "Kalianpur 1962 / UTM zone 43N", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +a=6377301.243 +b=6356100.230165384 +");
    add_proj4text (p, 1,
        "towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / UTM zone 43N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24313\"]]");
    p = add_epsg_def_ex (filter, first, last, 24342, "epsg", 24342,
        "Kalianpur 1975 / UTM zone 42N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 42N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",69],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24342\"]]");
    p = add_epsg_def_ex (filter, first, last, 24343, "epsg", 24343,
        "Kalianpur 1975 / UTM zone 43N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 43N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24343\"]]");
    p = add_epsg_def_ex (filter, first, last, 24344, "epsg", 24344,
        "Kalianpur 1975 / UTM zone 44N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 44N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",81],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24344\"]]");
    p = add_epsg_def_ex (filter, first, last, 24345, "epsg", 24345,
        "Kalianpur 1975 / UTM zone 45N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 45N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",87],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24345\"]]");
    p = add_epsg_def_ex (filter, first, last, 24346, "epsg", 24346,
        "Kalianpur 1975 / UTM zone 46N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 46N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",93],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24346\"]]");
    p = add_epsg_def_ex (filter, first, last, 24347, "epsg", 24347,
        "Kalianpur 1975 / UTM zone 47N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 47N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",99],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24347\"]]");
    p = add_epsg_def_ex (filter, first, last, 24370, "epsg", 24370,
        "Kalianpur 1880 / India zone 0", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846");
    add_proj4text (p, 1,
        "154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377");
    add_proj4text (p, 2,
        "299.36559538 +b=6356098.359005156 +to_meter=0.9143985307");
    add_proj4text (p, 3,
        "444408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone 0\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest (");
    add_srs_wkt (p, 2,
        "1830 Definition)\",6377299.36559538,300.8017255433552,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",39.");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",68],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.99846154],PARAMETER[\"false_easting\",2355500");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",2590000],UNIT[\"Indian ya");
    add_srs_wkt (p, 12,
        "rd\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"24370\"]]");
    p = add_epsg_def_ex (filter, first, last, 24371, "epsg", 24371,
        "Kalianpur 1880 / India zone I", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878");
    add_proj4text (p, 1,
        "641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=637");
    add_proj4text (p, 2,
        "7299.36559538 +b=6356098.359005156 +to_meter=0.914398530");
    add_proj4text (p, 3,
        "7444408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone I\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest (");
    add_srs_wkt (p, 2,
        "1830 Definition)\",6377299.36559538,300.8017255433552,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",32.");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",68],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.99878641],PARAMETER[\"false_easting\",3000000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",1000000],UNIT[\"Indian ya");
    add_srs_wkt (p, 12,
        "rd\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"24371\"]]");
    p = add_epsg_def_ex (filter, first, last, 24372, "epsg", 24372,
        "Kalianpur 1880 / India zone IIa", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IIa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " (1830 Definition)\",6377299.36559538,300.8017255433552,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",74],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.99878641],PARAMETER[\"false_easting\",3000000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",1000000],UNIT[\"Indian yar");
    add_srs_wkt (p, 12,
        "d\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"24372\"]]");
    p = add_epsg_def_ex (filter, first, last, 24373, "epsg", 24373,
        "Kalianpur 1880 / India zone IIIa", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IIIa\",GEOGCS[\"Kal");
    add_srs_wkt (p, 1,
        "ianpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everes");
    add_srs_wkt (p, 2,
        "t (1830 Definition)\",6377299.36559538,300.8017255433552");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "19],PARAMETER[\"central_meridian\",80],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99878641],PARAMETER[\"false_easting\",300000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",1000000],UNIT[\"Indian y");
    add_srs_wkt (p, 12,
        "ard\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"24373\"]]");
    p = add_epsg_def_ex (filter, first, last, 24374, "epsg", 24374,
        "Kalianpur 1880 / India zone IVa", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IVa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " (1830 Definition)\",6377299.36559538,300.8017255433552,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",12");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",80],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.99878641],PARAMETER[\"false_easting\",3000000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",1000000],UNIT[\"Indian yar");
    add_srs_wkt (p, 12,
        "d\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"24374\"]]");
    p = add_epsg_def_ex (filter, first, last, 24375, "epsg", 24375,
        "Kalianpur 1937 / India zone IIb", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kalianpur_1937", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075");
    add_proj4text (p, 2,
        ".41314024 +towgs84=214,804,268,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1937 / India zone IIb\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1937\",DATUM[\"Kalianpur_1937\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1937 Adjustment)\",6377276.345,300.8017,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7015\"]],TOWGS84[214,804,268,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4144\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",26],PARAMETER[\"central_meridian\",90");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",2743185.69],PARAMETER[\"false_northing\",91");
    add_srs_wkt (p, 12,
        "4395.23],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24375\"]]");
    p = add_epsg_def_ex (filter, first, last, 24376, "epsg", 24376,
        "Kalianpur 1962 / India zone I", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878");
    add_proj4text (p, 1,
        "641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=63561");
    add_proj4text (p, 2,
        "00.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / India zone I\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",32.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",68],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2743196.4],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "914398.8],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"24376\"]]");
    p = add_epsg_def_ex (filter, first, last, 24377, "epsg", 24377,
        "Kalianpur 1962 / India zone IIa", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.2");
    add_proj4text (p, 2,
        "30165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / India zone IIa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1962 Definition)\",6377301.243,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",26],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "74],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743196.4],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.8],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24377\"]]");
    p = add_epsg_def_ex (filter, first, last, 24378, "epsg", 24378,
        "Kalianpur 1975 / India zone I", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878");
    add_proj4text (p, 1,
        "641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=63560");
    add_proj4text (p, 2,
        "98.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone I\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",32.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",68],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2743195.5],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "914398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"24378\"]]");
    p = add_epsg_def_ex (filter, first, last, 24379, "epsg", 24379,
        "Kalianpur 1975 / India zone IIa", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IIa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",26],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "74],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743195.5],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24379\"]]");
    p = add_epsg_def_ex (filter, first, last, 24380, "epsg", 24380,
        "Kalianpur 1975 / India zone IIb", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IIb\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",26],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "90],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743195.5],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24380\"]]");
    p = add_epsg_def_ex (filter, first, last, 24381, "epsg", 24381,
        "Kalianpur 1975 / India zone IIIa", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IIIa\",GEOGCS[\"Kal");
    add_srs_wkt (p, 1,
        "ianpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everes");
    add_srs_wkt (p, 2,
        "t 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"latitude_of_origin\",19],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",80],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2743195.5],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "914398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"24381\"]]");
    p = add_epsg_def_ex (filter, first, last, 24382, "epsg", 24382,
        "Kalianpur 1880 / India zone IIb", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IIb\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " (1830 Definition)\",6377299.36559538,300.8017255433552,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",90],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.99878641],PARAMETER[\"false_easting\",3000000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",1000000],UNIT[\"Indian yar");
    add_srs_wkt (p, 12,
        "d\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"24382\"]]");
    p = add_epsg_def_ex (filter, first, last, 24383, "epsg", 24383,
        "Kalianpur 1975 / India zone IVa", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IVa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",12],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "80],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743195.5],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24383\"]]");
    p = add_epsg_def_ex (filter, first, last, 24500, "epsg", 24500,
        "Kertau 1968 / Singapore Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=1.287646666666667 +lon_0=103.853002222");
    add_proj4text (p, 1,
        "2222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038");
    add_proj4text (p, 2,
        "993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Singapore Grid\",GEOGCS[\"Kertau ");
    add_srs_wkt (p, 1,
        "1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Mod");
    add_srs_wkt (p, 2,
        "ified\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_So");
    add_srs_wkt (p, 8,
        "ldner\"],PARAMETER[\"latitude_of_origin\",1.287646666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"central_meridian\",103.8530022222222],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",30000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",30000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"24500\"]]");
    p = add_epsg_def_ex (filter, first, last, 24547, "epsg", 24547,
        "Kertau 1968 / UTM zone 47N", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 1,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / UTM zone 47N\",GEOGCS[\"Kertau 19");
    add_srs_wkt (p, 1,
        "68\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modif");
    add_srs_wkt (p, 2,
        "ied\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",99],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"24547\"]]");
    p = add_epsg_def_ex (filter, first, last, 24548, "epsg", 24548,
        "Kertau 1968 / UTM zone 48N", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 1,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / UTM zone 48N\",GEOGCS[\"Kertau 19");
    add_srs_wkt (p, 1,
        "68\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modif");
    add_srs_wkt (p, 2,
        "ied\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",105],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"24548\"]]");
    p = add_epsg_def_ex (filter, first, last, 24571, "epsg", 24571,
        "Kertau / R.S.O. Malaya (ch) (deprecated)", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Hotine_Oblique_Mercator", "British chain (Benoit 1895 B)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=");
    add_proj4text (p, 1,
        "0.99984 +x_0=804671.2997750348 +y_0=0 +no_uoff +gamma=32");
    add_proj4text (p, 2,
        "3.1301023611111 +a=6377304.063 +b=6356103.038993155 +tow");
    add_proj4text (p, 3,
        "gs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_d");
    add_proj4text (p, 4,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau / R.S.O. Malaya (ch) (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Kertau 1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Ever");
    add_srs_wkt (p, 2,
        "est 1830 Modified\",6377304.063,300.8017,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7018\"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6245\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Hotine_Oblique_Mercator\"],PARAMETER[\"latitude_of_cen");
    add_srs_wkt (p, 9,
        "ter\",4],PARAMETER[\"longitude_of_center\",102.25],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"azimuth\",323.0257905],PARAMETER[\"rectified_grid");
    add_srs_wkt (p, 11,
        "_angle\",323.1301023611111],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 12,
        ".99984],PARAMETER[\"false_easting\",40000],PARAMETER[\"f");
    add_srs_wkt (p, 13,
        "alse_northing\",0],UNIT[\"British chain (Benoit 1895 B)\"");
    add_srs_wkt (p, 14,
        ",20.11678249437587,AUTHORITY[\"EPSG\",\"9062\"]],AXIS[\"");
    add_srs_wkt (p, 15,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 16,
        "G\",\"24571\"]]");
    p = add_epsg_def_ex (filter, first, last, 24600, "epsg", 24600,
        "KOC Lambert", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Kuwait_Oil_Company", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.99878");
    add_proj4text (p, 1,
        "64078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +tow");
    add_proj4text (p, 2,
        "gs84=-294.7,-200.1,525.5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"KOC Lambert\",GEOGCS[\"KOC\",DATUM[\"Kuwait_Oil");
    add_srs_wkt (p, 1,
        "_Company\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,29");
    add_srs_wkt (p, 2,
        "3.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-294.7,-200.");
    add_srs_wkt (p, 3,
        "1,525.5,0,0,0,0],AUTHORITY[\"EPSG\",\"6246\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4246\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_1SP\"],PARAMETER[\"latitude_of_origin\",32.5],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",45],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9987864078],PARAMETER[\"false_easting\",1500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",1166200],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 13,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"24600\"]]");
    p = add_epsg_def_ex (filter, first, last, 24718, "epsg", 24718,
        "La Canoa / UTM zone 18N", 0, 0,
        "International 1924", "Greenwich",
        "La_Canoa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-35");
    add_proj4text (p, 1,
        "7.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"La Canoa / UTM zone 18N\",GEOGCS[\"La Canoa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"La_Canoa\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-273.5,110.6");
    add_srs_wkt (p, 3,
        ",-357.9,0,0,0,0],AUTHORITY[\"EPSG\",\"6247\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4247\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-75],PARAMETER[\"scale_factor\",0.9996],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"24718\"]]");
    p = add_epsg_def_ex (filter, first, last, 24719, "epsg", 24719,
        "La Canoa / UTM zone 19N", 0, 0,
        "International 1924", "Greenwich",
        "La_Canoa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-35");
    add_proj4text (p, 1,
        "7.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"La Canoa / UTM zone 19N\",GEOGCS[\"La Canoa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"La_Canoa\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-273.5,110.6");
    add_srs_wkt (p, 3,
        ",-357.9,0,0,0,0],AUTHORITY[\"EPSG\",\"6247\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4247\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-69],PARAMETER[\"scale_factor\",0.9996],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"24719\"]]");
    p = add_epsg_def_ex (filter, first, last, 24720, "epsg", 24720,
        "La Canoa / UTM zone 20N", 0, 0,
        "International 1924", "Greenwich",
        "La_Canoa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-35");
    add_proj4text (p, 1,
        "7.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"La Canoa / UTM zone 20N\",GEOGCS[\"La Canoa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"La_Canoa\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-273.5,110.6");
    add_srs_wkt (p, 3,
        ",-357.9,0,0,0,0],AUTHORITY[\"EPSG\",\"6247\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4247\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-63],PARAMETER[\"scale_factor\",0.9996],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"24720\"]]");
    p = add_epsg_def_ex (filter, first, last, 24817, "epsg", 24817,
        "PSAD56 / UTM zone 17N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 17N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24817\"]]");
    p = add_epsg_def_ex (filter, first, last, 24818, "epsg", 24818,
        "PSAD56 / UTM zone 18N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 18N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-75],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24818\"]]");
    p = add_epsg_def_ex (filter, first, last, 24819, "epsg", 24819,
        "PSAD56 / UTM zone 19N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 19N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-69],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24819\"]]");
    p = add_epsg_def_ex (filter, first, last, 24820, "epsg", 24820,
        "PSAD56 / UTM zone 20N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 20N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-63],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24820\"]]");
    p = add_epsg_def_ex (filter, first, last, 24821, "epsg", 24821,
        "PSAD56 / UTM zone 21N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 21N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-57],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24821\"]]");
    p = add_epsg_def_ex (filter, first, last, 24877, "epsg", 24877,
        "PSAD56 / UTM zone 17S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 17S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24877\"]]");
    p = add_epsg_def_ex (filter, first, last, 24878, "epsg", 24878,
        "PSAD56 / UTM zone 18S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 18S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-75],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24878\"]]");
    p = add_epsg_def_ex (filter, first, last, 24879, "epsg", 24879,
        "PSAD56 / UTM zone 19S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 19S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-69],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24879\"]]");
    p = add_epsg_def_ex (filter, first, last, 24880, "epsg", 24880,
        "PSAD56 / UTM zone 20S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 20S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-63],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24880\"]]");
    p = add_epsg_def_ex (filter, first, last, 24881, "epsg", 24881,
        "PSAD56 / UTM zone 21S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 21S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-57],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24881\"]]");
    p = add_epsg_def_ex (filter, first, last, 24882, "epsg", 24882,
        "PSAD56 / UTM zone 22S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 22S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-51],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24882\"]]");
    p = add_epsg_def_ex (filter, first, last, 24891, "epsg", 24891,
        "PSAD56 / Peru west zone", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.99983008 +x_0=22");
    add_proj4text (p, 1,
        "2000 +y_0=1426834.743 +ellps=intl +towgs84=-288,175,-376");
    add_proj4text (p, 2,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / Peru west zone\",GEOGCS[\"PSAD56\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Provisional_South_American_Datum_1956\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",-");
    add_srs_wkt (p, 9,
        "6],PARAMETER[\"central_meridian\",-80.5],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.99983008],PARAMETER[\"false_easting\",2220");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",1426834.743],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"24891\"]]");
    p = add_epsg_def_ex (filter, first, last, 24892, "epsg", 24892,
        "PSAD56 / Peru central zone", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.99932994 +x_0=72");
    add_proj4text (p, 1,
        "0000 +y_0=1039979.159 +ellps=intl +towgs84=-288,175,-376");
    add_proj4text (p, 2,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / Peru central zone\",GEOGCS[\"PSAD56\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Provisional_South_American_Datum_1956\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "-9.5],PARAMETER[\"central_meridian\",-76],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99932994],PARAMETER[\"false_easting\",720");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",1039979.159],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"24892\"]]");
}

#endif /* full EPSG initialization enabled/disabled */











































































































































































































































Changes to src/srsinit/epsg_inlined_37.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_37 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 7560, "epsg", 7560,
        "NAD83(2011) / WISCRS Marinette (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.69166666666666 +lon_0=-87.71111111");
    add_proj4text (p, 1,
        "111111 +k=1.0000234982 +x_0=238658.8794 +y_0=0.0032 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Marinette (m)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",44.6916666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"central_meridian\",-87.711111111111");
    add_srs_wkt (p, 10,
        "11],PARAMETER[\"scale_factor\",1.0000234982],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",238658.8794],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0032],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7560\"]]");
    p = add_epsg_def_ex (filter, first, last, 7561, "epsg", 7561,
        "NAD83(2011) / WISCRS Menominee (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.71666666666667 +lon_0=-88.41666666");
    add_proj4text (p, 1,
        "666667 +k=1.0000362499 +x_0=105461.0121 +y_0=0.0029 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Menominee (m)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",44.7166666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"central_meridian\",-88.416666666666");
    add_srs_wkt (p, 10,
        "67],PARAMETER[\"scale_factor\",1.0000362499],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",105461.0121],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0029],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7561\"]]");
    p = add_epsg_def_ex (filter, first, last, 7562, "epsg", 7562,
        "NAD83(2011) / WISCRS Monroe (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.00007392861111 +lat_0=44.00007392861");
    add_proj4text (p, 1,
        "111 +lon_0=-90.64166666666668 +k_0=1.0000434122 +x_0=204");
    add_proj4text (p, 2,
        "521.209 +y_0=121923.9861 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Monroe (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44.0");
    add_srs_wkt (p, 9,
        "0007392861111],PARAMETER[\"central_meridian\",-90.641666");
    add_srs_wkt (p, 10,
        "66666668],PARAMETER[\"scale_factor\",1.0000434122],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",204521.209],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",121923.9861],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7562\"]]");
    p = add_epsg_def_ex (filter, first, last, 7563, "epsg", 7563,
        "NAD83(2011) / WISCRS Oconto (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.39722222222222 +lon_0=-87.90833333");
    add_proj4text (p, 1,
        "333335 +k=1.0000236869 +x_0=182880.3676 +y_0=0.0033 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Oconto (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",44.397222222");
    add_srs_wkt (p, 9,
        "22222],PARAMETER[\"central_meridian\",-87.90833333333335");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1.0000236869],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",182880.3676],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0033],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7563\"]]");
    p = add_epsg_def_ex (filter, first, last, 7564, "epsg", 7564,
        "NAD83(2011) / WISCRS Oneida (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.70422377027778 +lat_0=45.70422377027");
    add_proj4text (p, 1,
        "778 +lon_0=-89.54444444444444 +k_0=1.0000686968 +x_0=701");
    add_proj4text (p, 2,
        "04.1401 +y_0=57588.0346 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Oneida (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45.7");
    add_srs_wkt (p, 9,
        "0422377027778],PARAMETER[\"central_meridian\",-89.544444");
    add_srs_wkt (p, 10,
        "44444444],PARAMETER[\"scale_factor\",1.0000686968],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",70104.1401],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",57588.0346],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"7564\"]]");
    p = add_epsg_def_ex (filter, first, last, 7565, "epsg", 7565,
        "NAD83(2011) / WISCRS Pepin and Pierce (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.63614887194444 +lat_0=44.63614887194");
    add_proj4text (p, 1,
        "444 +lon_0=-92.22777777777777 +k_0=1.0000362977 +x_0=167");
    add_proj4text (p, 2,
        "640.3354 +y_0=86033.0876 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Pepin and Pierce (m)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Refer");
    add_srs_wkt (p, 2,
        "ence_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 9,
        "gin\",44.63614887194444],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "-92.22777777777777],PARAMETER[\"scale_factor\",1.0000362");
    add_srs_wkt (p, 11,
        "977],PARAMETER[\"false_easting\",167640.3354],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",86033.0876],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"7565\"]]");
    p = add_epsg_def_ex (filter, first, last, 7566, "epsg", 7566,
        "NAD83(2011) / WISCRS Polk (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333");
    add_proj4text (p, 1,
        "333334 +k=1.0000433849 +x_0=141732.2823 +y_0=0.0059 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Polk (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",44.66111111111");
    add_srs_wkt (p, 9,
        "111],PARAMETER[\"central_meridian\",-92.63333333333334],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.0000433849],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",141732.2823],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        ".0059],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"75");
    add_srs_wkt (p, 14,
        "66\"]]");
    p = add_epsg_def_ex (filter, first, last, 7567, "epsg", 7567,
        "NAD83(2011) / WISCRS Portage (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.41682397527777 +lat_0=44.41682397527");
    add_proj4text (p, 1,
        "777 +lon_0=-89.5 +k_0=1.000039936 +x_0=56388.1128 +y_0=5");
    add_proj4text (p, 2,
        "0022.1874 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Portage (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44.");
    add_srs_wkt (p, 9,
        "41682397527777],PARAMETER[\"central_meridian\",-89.5],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1.000039936],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",56388.1128],PARAMETER[\"false_northing\",50022");
    add_srs_wkt (p, 12,
        ".1874],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"75");
    add_srs_wkt (p, 14,
        "67\"]]");
    p = add_epsg_def_ex (filter, first, last, 7568, "epsg", 7568,
        "NAD83(2011) / WISCRS Price (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.55555555555555 +lon_0=-90.48888888");
    add_proj4text (p, 1,
        "888889 +k=1.0000649554 +x_0=227990.8546 +y_0=0.0109 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Price (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",44.5555555555");
    add_srs_wkt (p, 9,
        "5555],PARAMETER[\"central_meridian\",-90.48888888888889]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1.0000649554],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",227990.8546],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0.0109],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 14,
        "568\"]]");
    p = add_epsg_def_ex (filter, first, last, 7569, "epsg", 7569,
        "NAD83(2011) / WISCRS Richland (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.3223129275 +lat_0=43.3223129275 +lon");
    add_proj4text (p, 1,
        "_0=-90.43055555555556 +k_0=1.0000375653 +x_0=202387.6048");
    add_proj4text (p, 2,
        " +y_0=134255.4253 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Richland (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43");
    add_srs_wkt (p, 9,
        ".3223129275],PARAMETER[\"central_meridian\",-90.43055555");
    add_srs_wkt (p, 10,
        "555556],PARAMETER[\"scale_factor\",1.0000375653],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_easting\",202387.6048],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",134255.4253],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"7569\"]]");
    p = add_epsg_def_ex (filter, first, last, 7570, "epsg", 7570,
        "NAD83(2011) / WISCRS Rock (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.94444444444444 +lon_0=-89.07222222");
    add_proj4text (p, 1,
        "222222 +k=1.0000337311 +x_0=146304.2926 +y_0=0.0068 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Rock (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",41.94444444444");
    add_srs_wkt (p, 9,
        "444],PARAMETER[\"central_meridian\",-89.07222222222222],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.0000337311],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",146304.2926],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        ".0068],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"75");
    add_srs_wkt (p, 14,
        "70\"]]");
    p = add_epsg_def_ex (filter, first, last, 7571, "epsg", 7571,
        "NAD83(2011) / WISCRS Rusk (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.91944444444444 +lon_0=-91.06666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000495976 +x_0=250546.1013 +y_0=0.0234 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Rusk (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",43.91944444444");
    add_srs_wkt (p, 9,
        "444],PARAMETER[\"central_meridian\",-91.06666666666666],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1.0000495976],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",250546.1013],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        ".0234],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"75");
    add_srs_wkt (p, 14,
        "71\"]]");
    p = add_epsg_def_ex (filter, first, last, 7572, "epsg", 7572,
        "NAD83(2011) / WISCRS Sauk (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.81944444444445 +lon_0=-89.90000000");
    add_proj4text (p, 1,
        "000001 +k=1.0000373868 +x_0=185623.5716 +y_0=0.0051 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Sauk (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",42.81944444444");
    add_srs_wkt (p, 9,
        "445],PARAMETER[\"central_meridian\",-89.9],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1.0000373868],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "185623.5716],PARAMETER[\"false_northing\",0.0051],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7572\"]]");
    p = add_epsg_def_ex (filter, first, last, 7573, "epsg", 7573,
        "NAD83(2011) / WISCRS Sawyer (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.90009913138888 +lat_0=45.90009913138");
    add_proj4text (p, 1,
        "888 +lon_0=-91.11666666666666 +k_0=1.0000573461 +x_0=216");
    add_proj4text (p, 2,
        "713.2336 +y_0=120734.1631 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Sawyer (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45.9");
    add_srs_wkt (p, 9,
        "0009913138888],PARAMETER[\"central_meridian\",-91.116666");
    add_srs_wkt (p, 10,
        "66666666],PARAMETER[\"scale_factor\",1.0000573461],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",216713.2336],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",120734.1631],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7573\"]]");
    p = add_epsg_def_ex (filter, first, last, 7574, "epsg", 7574,
        "NAD83(2011) / WISCRS Shawano (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.03611111111111 +lon_0=-88.60555555");
    add_proj4text (p, 1,
        "555555 +k=1.000032144 +x_0=262433.3253 +y_0=0.0095999999");
    add_proj4text (p, 2,
        "99999999 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Shawano (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",44.03611111");
    add_srs_wkt (p, 9,
        "111111],PARAMETER[\"central_meridian\",-88.6055555555555");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1.000032144],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",262433.3253],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0096],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7574\"]]");
    p = add_epsg_def_ex (filter, first, last, 7575, "epsg", 7575,
        "NAD83(2011) / WISCRS St. Croix (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.03611111111111 +lon_0=-92.63333333");
    add_proj4text (p, 1,
        "333334 +k=1.0000381803 +x_0=165506.7302 +y_0=0.0103 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS St. Croix (m)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",44.0361111");
    add_srs_wkt (p, 9,
        "1111111],PARAMETER[\"central_meridian\",-92.633333333333");
    add_srs_wkt (p, 10,
        "34],PARAMETER[\"scale_factor\",1.0000381803],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",165506.7302],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.0103],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7575\"]]");
    p = add_epsg_def_ex (filter, first, last, 7576, "epsg", 7576,
        "NAD83(2011) / WISCRS Taylor (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.17782208583333 +lat_0=45.17782208583");
    add_proj4text (p, 1,
        "333 +lon_0=-90.48333333333333 +k_0=1.0000597566 +x_0=187");
    add_proj4text (p, 2,
        "147.5744 +y_0=107746.7522 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Taylor (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45.1");
    add_srs_wkt (p, 9,
        "7782208583333],PARAMETER[\"central_meridian\",-90.483333");
    add_srs_wkt (p, 10,
        "33333333],PARAMETER[\"scale_factor\",1.0000597566],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",187147.5744],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",107746.7522],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7576\"]]");
    p = add_epsg_def_ex (filter, first, last, 7577, "epsg", 7577,
        "NAD83(2011) / WISCRS Trempealeau (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.16111111111111 +lon_0=-91.36666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000361538 +x_0=256946.9138 +y_0=0.0041 +ell");
    add_proj4text (p, 2,
        "ps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Trempealeau (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",43.16111");
    add_srs_wkt (p, 9,
        "111111111],PARAMETER[\"central_meridian\",-91.3666666666");
    add_srs_wkt (p, 10,
        "6666],PARAMETER[\"scale_factor\",1.0000361538],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",256946.9138],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0.0041],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"7577\"]]");
    p = add_epsg_def_ex (filter, first, last, 7578, "epsg", 7578,
        "NAD83(2011) / WISCRS Vernon (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972");
    add_proj4text (p, 1,
        "223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222");
    add_proj4text (p, 2,
        "504.4451 +y_0=47532.0602 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Vernon (m)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syste");
    add_srs_wkt (p, 2,
        "m_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 8,
        "ormal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43.5");
    add_srs_wkt (p, 9,
        "7503293972223],PARAMETER[\"central_meridian\",-90.783333");
    add_srs_wkt (p, 10,
        "33333333],PARAMETER[\"scale_factor\",1.0000408158],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",222504.4451],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",47532.0602],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7578\"]]");
    p = add_epsg_def_ex (filter, first, last, 7579, "epsg", 7579,
        "NAD83(2011) / WISCRS Vilas (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.07784409055556 +lat_0=46.07784409055");
    add_proj4text (p, 1,
        "556 +lon_0=-89.48888888888889 +k_0=1.0000730142 +x_0=134");
    add_proj4text (p, 2,
        "417.0689 +y_0=50337.1092 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Vilas (m)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "(2011)\",DATUM[\"NAD83_National_Spatial_Reference_System");
    add_srs_wkt (p, 2,
        "_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Confo");
    add_srs_wkt (p, 8,
        "rmal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",46.07");
    add_srs_wkt (p, 9,
        "784409055556],PARAMETER[\"central_meridian\",-89.4888888");
    add_srs_wkt (p, 10,
        "8888889],PARAMETER[\"scale_factor\",1.0000730142],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",134417.0689],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",50337.1092],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"7579\"]]");
    p = add_epsg_def_ex (filter, first, last, 7580, "epsg", 7580,
        "NAD83(2011) / WISCRS Walworth (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.66946209694444 +lat_0=42.66946209694");
    add_proj4text (p, 1,
        "444 +lon_0=-88.54166666666667 +k_0=1.0000367192 +x_0=232");
    add_proj4text (p, 2,
        "562.8651 +y_0=111088.2224 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Walworth (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",42");
    add_srs_wkt (p, 9,
        ".66946209694444],PARAMETER[\"central_meridian\",-88.5416");
    add_srs_wkt (p, 10,
        "6666666667],PARAMETER[\"scale_factor\",1.0000367192],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",232562.8651],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",111088.2224],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"7580\"]]");
    p = add_epsg_def_ex (filter, first, last, 7581, "epsg", 7581,
        "NAD83(2011) / WISCRS Washburn (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.96121983333334 +lat_0=45.96121983333");
    add_proj4text (p, 1,
        "334 +lon_0=-91.78333333333333 +k_0=1.0000475376 +x_0=234");
    add_proj4text (p, 2,
        "086.8682 +y_0=188358.6058 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Washburn (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".96121983333334],PARAMETER[\"central_meridian\",-91.7833");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1.0000475376],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",234086.8682],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",188358.6058],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"7581\"]]");
    p = add_epsg_def_ex (filter, first, last, 7582, "epsg", 7582,
        "NAD83(2011) / WISCRS Washington (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.91805555555555 +lon_0=-88.06388888");
    add_proj4text (p, 1,
        "888888 +k=1.00003738 +x_0=120091.4415 +y_0=0.003 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Washington (m)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",42.91805");
    add_srs_wkt (p, 9,
        "555555555],PARAMETER[\"central_meridian\",-88.0638888888");
    add_srs_wkt (p, 10,
        "8888],PARAMETER[\"scale_factor\",1.00003738],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",120091.4415],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.003],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 14,
        "582\"]]");
    p = add_epsg_def_ex (filter, first, last, 7583, "epsg", 7583,
        "NAD83(2011) / WISCRS Waukesha (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.56944444444445 +lon_0=-88.22499999");
    add_proj4text (p, 1,
        "999999 +k=1.0000346179 +x_0=208788.418 +y_0=0.0034 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Waukesha (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",42.5694444");
    add_srs_wkt (p, 9,
        "4444445],PARAMETER[\"central_meridian\",-88.225],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.0000346179],PARAMETER[\"false_east");
    add_srs_wkt (p, 11,
        "ing\",208788.418],PARAMETER[\"false_northing\",0.0034],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7583\"]]");
    p = add_epsg_def_ex (filter, first, last, 7584, "epsg", 7584,
        "NAD83(2011) / WISCRS Waupaca (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.42027777777778 +lon_0=-88.81666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000333645 +x_0=185013.9709 +y_0=0.007 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Waupaca (m)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",43.42027777");
    add_srs_wkt (p, 9,
        "777778],PARAMETER[\"central_meridian\",-88.8166666666666");
    add_srs_wkt (p, 10,
        "6],PARAMETER[\"scale_factor\",1.0000333645],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",185013.9709],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.007],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 14,
        "584\"]]");
    p = add_epsg_def_ex (filter, first, last, 7585, "epsg", 7585,
        "NAD83(2011) / WISCRS Waushara (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.11394404583334 +lat_0=44.11394404583");
    add_proj4text (p, 1,
        "334 +lon_0=-89.24166666666667 +k_0=1.0000392096 +x_0=120");
    add_proj4text (p, 2,
        "091.4402 +y_0=45069.7587 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Waushara (m)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44");
    add_srs_wkt (p, 9,
        ".11394404583334],PARAMETER[\"central_meridian\",-89.2416");
    add_srs_wkt (p, 10,
        "6666666667],PARAMETER[\"scale_factor\",1.0000392096],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",120091.4402],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",45069.7587],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"7585\"]]");
    p = add_epsg_def_ex (filter, first, last, 7586, "epsg", 7586,
        "NAD83(2011) / WISCRS Wood (m)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.36259546944444 +lat_0=44.36259546944");
    add_proj4text (p, 1,
        "444 +lon_0=-90 +k_0=1.0000421209 +x_0=208483.6173 +y_0=1");
    add_proj4text (p, 2,
        "34589.754 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Wood (m)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "2011)\",DATUM[\"NAD83_National_Spatial_Reference_System_");
    add_srs_wkt (p, 2,
        "2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 8,
        "mal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44.362");
    add_srs_wkt (p, 9,
        "59546944444],PARAMETER[\"central_meridian\",-90],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1.0000421209],PARAMETER[\"false_east");
    add_srs_wkt (p, 11,
        "ing\",208483.6173],PARAMETER[\"false_northing\",134589.7");
    add_srs_wkt (p, 12,
        "54],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7586\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 7587, "epsg", 7587,
        "NAD83(2011) / WISCRS Adams and Juneau (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.36666666666667 +lon_0=-90 +k=1.000");
    add_proj4text (p, 1,
        "0365285 +x_0=147218.6941325883 +y_0=0.00365760731521463 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Adams and Juneau (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "43.36666666666667],PARAMETER[\"central_meridian\",-90],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1.0000365285],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",482999.999],PARAMETER[\"false_northing\",0.0");
    add_srs_wkt (p, 12,
        "12],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"7587\"]]");
    p = add_epsg_def_ex (filter, first, last, 7588, "epsg", 7588,
        "NAD83(2011) / WISCRS Ashland (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.70611111111111 +lon_0=-90.62222222");
    add_proj4text (p, 1,
        "222222 +k=1.0000495683 +x_0=172821.945948692 +y_0=0.0018");
    add_proj4text (p, 2,
        "28803657607315 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Ashland (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",45.70611");
    add_srs_wkt (p, 9,
        "111111111],PARAMETER[\"central_meridian\",-90.6222222222");
    add_srs_wkt (p, 10,
        "2222],PARAMETER[\"scale_factor\",1.0000495683],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",567000.0010000002],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",0.006],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7588\"]]");
    p = add_epsg_def_ex (filter, first, last, 7589, "epsg", 7589,
        "NAD83(2011) / WISCRS Barron (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.13333333333333 +lon_0=-91.84999999");
    add_proj4text (p, 1,
        "999999 +k=1.0000486665 +x_0=93150 +y_0=0.003048006096012");
    add_proj4text (p, 2,
        "192 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Barron (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",45.1333333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"central_meridian\",-91.85],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1.0000486665],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",305609.625],PARAMETER[\"false_northing\",0.01],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7589\"]]");
    p = add_epsg_def_ex (filter, first, last, 7590, "epsg", 7590,
        "NAD83(2011) / WISCRS Bayfield (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.66964837722222 +lat_0=46.66964837722");
    add_proj4text (p, 1,
        "222 +lon_0=-91.15277777777779 +k_0=1.0000331195 +x_0=228");
    add_proj4text (p, 2,
        "600.4575057151 +y_0=148551.4835661671 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Bayfield (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "46.66964837722222],PARAMETER[\"central_meridian\",-91.15");
    add_srs_wkt (p, 10,
        "277777777779],PARAMETER[\"scale_factor\",1.0000331195],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",750000.0010000002],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",487372.659],UNIT[\"US survey foot\",0");
    add_srs_wkt (p, 13,
        ".3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7590\"]]");
    p = add_epsg_def_ex (filter, first, last, 7591, "epsg", 7591,
        "NAD83(2011) / WISCRS Brown (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43 +lon_0=-88 +k=1.00002 +x_0=31599.9");
    add_proj4text (p, 1,
        "9989839979 +y_0=4599.999898399797 +ellps=GRS80 +units=us");
    add_proj4text (p, 2,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Brown (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",43],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-88],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1.00002],PARAMETER[\"false_easting\",103674.333],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",15091.833],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 12,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7591\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7592, "epsg", 7592,
        "NAD83(2011) / WISCRS Buffalo (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.48138888888889 +lon_0=-91.79722222");
    add_proj4text (p, 1,
        "222222 +k=1.0000382778 +x_0=175260.3502159004 +y_0=0.004");
    add_proj4text (p, 2,
        "876809753619507 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Buffalo (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",43.48138");
    add_srs_wkt (p, 9,
        "888888889],PARAMETER[\"central_meridian\",-91.7972222222");
    add_srs_wkt (p, 10,
        "2222],PARAMETER[\"scale_factor\",1.0000382778],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",574999.999],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0.016],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"7592\"]]");
    p = add_epsg_def_ex (filter, first, last, 7593, "epsg", 7593,
        "NAD83(2011) / WISCRS Burnett (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.89871486583333 +lat_0=45.89871486583");
    add_proj4text (p, 1,
        "333 +lon_0=-92.45777777777778 +k_0=1.0000383841 +x_0=640");
    add_proj4text (p, 2,
        "08.12771145543 +y_0=59445.90419100838 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Burnett (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "45.89871486583333],PARAMETER[\"central_meridian\",-92.45");
    add_srs_wkt (p, 10,
        "777777777778],PARAMETER[\"scale_factor\",1.0000383841],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",209999.999],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",195032.104],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7593\"]]");
    p = add_epsg_def_ex (filter, first, last, 7594, "epsg", 7594,
        "NAD83(2011) / WISCRS Calumet, Fond du Lac, Outagamie and Winnebago (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.71944444444445 +lon_0=-88.5 +k=1.0");
    add_proj4text (p, 1,
        "000286569 +x_0=244754.8892049784 +y_0=0.0048768097536195");
    add_proj4text (p, 2,
        "07 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Calumet, Fond du Lac, Outa");
    add_srs_wkt (p, 1,
        "gamie and Winnebago (ftUS)\",GEOGCS[\"NAD83(2011)\",DATU");
    add_srs_wkt (p, 2,
        "M[\"NAD83_National_Spatial_Reference_System_2011\",SPHER");
    add_srs_wkt (p, 3,
        "OID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"6318\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 9,
        "METER[\"latitude_of_origin\",42.71944444444445],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"central_meridian\",-88.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1.0000286569],PARAMETER[\"false_easting\",802999.999],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0.016],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7594");
    add_srs_wkt (p, 15,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 7595, "epsg", 7595,
        "NAD83(2011) / WISCRS Chippewa (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.97785689861112 +lat_0=44.97785689861");
    add_proj4text (p, 1,
        "112 +lon_0=-91.29444444444444 +k_0=1.0000391127 +x_0=600");
    add_proj4text (p, 2,
        "45.72009144018 +y_0=44091.43449326898 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Chippewa (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "44.97785689861112],PARAMETER[\"central_meridian\",-91.29");
    add_srs_wkt (p, 10,
        "444444444444],PARAMETER[\"scale_factor\",1.0000391127],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",197000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",144656.648],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7595\"]]");
    p = add_epsg_def_ex (filter, first, last, 7596, "epsg", 7596,
        "NAD83(2011) / WISCRS Clark (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.6 +lon_0=-90.70833333333334 +k=1.0");
    add_proj4text (p, 1,
        "000463003 +x_0=199949.198983998 +y_0=0.00853441706883413");
    add_proj4text (p, 2,
        "7 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Clark (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",43.6],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-90.70833333333334],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1.0000463003],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",655999.997],PARAMETER[\"false_northing\",0.028],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7596\"]]");
    p = add_epsg_def_ex (filter, first, last, 7597, "epsg", 7597,
        "NAD83(2011) / WISCRS Columbia (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.46254664583333 +lat_0=43.46254664583");
    add_proj4text (p, 1,
        "333 +lon_0=-89.39444444444445 +k_0=1.00003498 +x_0=16916");
    add_proj4text (p, 2,
        "4.338023876 +y_0=111569.613512827 +ellps=GRS80 +units=us");
    add_proj4text (p, 3,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Columbia (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "43.46254664583333],PARAMETER[\"central_meridian\",-89.39");
    add_srs_wkt (p, 10,
        "444444444445],PARAMETER[\"scale_factor\",1.00003498],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",554999.999],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",366041.307],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7597\"]]");
    p = add_epsg_def_ex (filter, first, last, 7598, "epsg", 7598,
        "NAD83(2011) / WISCRS Crawford (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.200055605 +lat_0=43.200055605 +lon_0");
    add_proj4text (p, 1,
        "=-90.9388888888889 +k_0=1.0000349151 +x_0=113690.6273812");
    add_proj4text (p, 2,
        "548 +y_0=53703.12024384048 +ellps=GRS80 +units=us-ft +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Crawford (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "43.200055605],PARAMETER[\"central_meridian\",-90.9388888");
    add_srs_wkt (p, 10,
        "888889],PARAMETER[\"scale_factor\",1.0000349151],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_easting\",373000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",176190.987],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"7598\"]]");
    p = add_epsg_def_ex (filter, first, last, 7599, "epsg", 7599,
        "NAD83(2011) / WISCRS Dane (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.0695160375 +lat_0=43.0695160375 +lon");
    add_proj4text (p, 1,
        "_0=-89.42222222222223 +k_0=1.0000384786 +x_0=247193.2943");
    add_proj4text (p, 2,
        "865888 +y_0=146591.9896367793 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Dane (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43.");
    add_srs_wkt (p, 9,
        "0695160375],PARAMETER[\"central_meridian\",-89.422222222");
    add_srs_wkt (p, 10,
        "22223],PARAMETER[\"scale_factor\",1.0000384786],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",811000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",480943.886],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"7599\"]]");
    p = add_epsg_def_ex (filter, first, last, 7600, "epsg", 7600,
        "NAD83(2011) / WISCRS Dodge and Jefferson (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.47222222222222 +lon_0=-88.77500000");
    add_proj4text (p, 1,
        "000001 +k=1.0000346418 +x_0=263347.7263906528 +y_0=0.007");
    add_proj4text (p, 2,
        "62001524003048 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Dodge and Jefferson (ftUS)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial");
    add_srs_wkt (p, 2,
        "_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",41.47222222222222],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 10,
        "8.775],PARAMETER[\"scale_factor\",1.0000346418],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",863999.9990000002],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",0.025],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7600\"]]");
    p = add_epsg_def_ex (filter, first, last, 7601, "epsg", 7601,
        "NAD83(2011) / WISCRS Door (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.4 +lon_0=-87.27222222222223 +k=1.0");
    add_proj4text (p, 1,
        "000187521 +x_0=158801.1176022352 +y_0=0.0024384048768097");
    add_proj4text (p, 2,
        "54 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Door (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",44.4],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87.27222222222223],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.0000187521],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",521000],PARAMETER[\"false_northing\",0.00800000000000");
    add_srs_wkt (p, 12,
        "0002],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"7601\"]]");
    p = add_epsg_def_ex (filter, first, last, 7602, "epsg", 7602,
        "NAD83(2011) / WISCRS Douglas (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.88333333333333 +lon_0=-91.91666666");
    add_proj4text (p, 1,
        "666667 +k=1.0000385418 +x_0=59131.31826263652 +y_0=0.003");
    add_proj4text (p, 2,
        "962407924815849 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Douglas (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",45.88333");
    add_srs_wkt (p, 9,
        "333333333],PARAMETER[\"central_meridian\",-91.9166666666");
    add_srs_wkt (p, 10,
        "6667],PARAMETER[\"scale_factor\",1.0000385418],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",194000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0.013],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"7602\"]]");
    p = add_epsg_def_ex (filter, first, last, 7603, "epsg", 7603,
        "NAD83(2011) / WISCRS Dunn (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.40833333333333 +lon_0=-91.89444444");
    add_proj4text (p, 1,
        "444445 +k=1.0000410324 +x_0=51816.10393700787 +y_0=0.003");
    add_proj4text (p, 2,
        "048006096012192 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Dunn (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",44.40833333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"central_meridian\",-91.8944444444444");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1.0000410324],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",170000.001],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.01],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"7603\"]]");
    p = add_epsg_def_ex (filter, first, last, 7604, "epsg", 7604,
        "NAD83(2011) / WISCRS Eau Claire (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.87228112638889 +lat_0=44.87228112638");
    add_proj4text (p, 1,
        "889 +lon_0=-91.28888888888889 +k_0=1.000035079 +x_0=1200");
    add_proj4text (p, 2,
        "91.4401828804 +y_0=91687.92390144781 +ellps=GRS80 +units");
    add_proj4text (p, 3,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Eau Claire (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lamber");
    add_srs_wkt (p, 8,
        "t_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",44.87228112638889],PARAMETER[\"central_meridian\",-91.2");
    add_srs_wkt (p, 10,
        "8888888888889],PARAMETER[\"scale_factor\",1.000035079],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",394000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",300812.797],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7604\"]]");
    p = add_epsg_def_ex (filter, first, last, 7605, "epsg", 7605,
        "NAD83(2011) / WISCRS Florence (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.43888888888888 +lon_0=-88.14166666");
    add_proj4text (p, 1,
        "666668 +k=1.0000552095 +x_0=133502.6682245364 +y_0=0.006");
    add_proj4text (p, 2,
        "400812801625603 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Florence (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",45.43888");
    add_srs_wkt (p, 9,
        "888888888],PARAMETER[\"central_meridian\",-88.1416666666");
    add_srs_wkt (p, 10,
        "6668],PARAMETER[\"scale_factor\",1.0000552095],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",438000.004],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0.021],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"7605\"]]");
    p = add_epsg_def_ex (filter, first, last, 7606, "epsg", 7606,
        "NAD83(2011) / WISCRS Forest (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.00555555555555 +lon_0=-88.63333333");
    add_proj4text (p, 1,
        "333334 +k=1.0000673004 +x_0=275844.5532131065 +y_0=0.015");
    add_proj4text (p, 2,
        "8496316992634 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Forest (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",44.0055555");
    add_srs_wkt (p, 9,
        "5555555],PARAMETER[\"central_meridian\",-88.633333333333");
    add_srs_wkt (p, 10,
        "34],PARAMETER[\"scale_factor\",1.0000673004],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",905000.0050000002],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0.052],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 13,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7606\"]]");
    p = add_epsg_def_ex (filter, first, last, 7607, "epsg", 7607,
        "NAD83(2011) / WISCRS Grant (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.41111111111111 +lon_0=-90.8 +k=1.0");
    add_proj4text (p, 1,
        "000349452 +x_0=242316.484023368 +y_0=0.01005842011684023");
    add_proj4text (p, 2,
        " +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Grant (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",41.4111111");
    add_srs_wkt (p, 9,
        "1111111],PARAMETER[\"central_meridian\",-90.8],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1.0000349452],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",794999.998],PARAMETER[\"false_northing\",0.033],UNIT");
    add_srs_wkt (p, 12,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"7607\"]]");
    p = add_epsg_def_ex (filter, first, last, 7608, "epsg", 7608,
        "NAD83(2011) / WISCRS Green and Lafayette (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.63756227694444 +lat_0=42.63756227694");
    add_proj4text (p, 1,
        "444 +lon_0=-89.83888888888889 +k_0=1.0000390487 +x_0=170");
    add_proj4text (p, 2,
        "078.7401574803 +y_0=45830.29484378968 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Green and Lafayette (ftUS)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial");
    add_srs_wkt (p, 2,
        "_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 3,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",42.63756227694444],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",-89.83888888888889],PARAMETER[\"scale_factor\",1.0");
    add_srs_wkt (p, 11,
        "000390487],PARAMETER[\"false_easting\",558000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",150361.559],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7608\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7609, "epsg", 7609,
        "NAD83(2011) / WISCRS Green Lake and Marquette (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.80700011777778 +lat_0=43.80700011777");
    add_proj4text (p, 1,
        "778 +lon_0=-89.24166666666667 +k_0=1.0000344057 +x_0=150");
    add_proj4text (p, 2,
        "876.3017526035 +y_0=79170.77937515875 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Green Lake and Marquette (");
    add_srs_wkt (p, 1,
        "ftUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2011\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",43.80700011777778],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-89.24166666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1.0000344057],PARAMETER[\"false_easting\",495000],PARAM");
    add_srs_wkt (p, 12,
        "ETER[\"false_northing\",259746.132],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"760");
    add_srs_wkt (p, 15,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 7610, "epsg", 7610,
        "NAD83(2011) / WISCRS Iowa (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.53888888888888 +lon_0=-90.16111111");
    add_proj4text (p, 1,
        "111111 +k=1.0000394961 +x_0=113081.0261620523 +y_0=0.004");
    add_proj4text (p, 2,
        "572009144018288 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Iowa (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",42.53888888");
    add_srs_wkt (p, 9,
        "888888],PARAMETER[\"central_meridian\",-90.1611111111111");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",1.0000394961],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",371000],PARAMETER[\"false_northing\",0.0");
    add_srs_wkt (p, 12,
        "15],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"7610\"]]");
    p = add_epsg_def_ex (filter, first, last, 7611, "epsg", 7611,
        "NAD83(2011) / WISCRS Iron (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=45.43333333333333 +lon_0=-90.25555555");
    add_proj4text (p, 1,
        "555556 +k=1.0000677153 +x_0=220980.4419608839 +y_0=0.008");
    add_proj4text (p, 2,
        "534417068834137 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Iron (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",45.43333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"central_meridian\",-90.2555555555555");
    add_srs_wkt (p, 10,
        "6],PARAMETER[\"scale_factor\",1.0000677153],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",725000],PARAMETER[\"false_northing\",0.0");
    add_srs_wkt (p, 12,
        "28],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"7611\"]]");
    p = add_epsg_def_ex (filter, first, last, 7612, "epsg", 7612,
        "NAD83(2011) / WISCRS Jackson (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.25333512777778 +lon_0=-90.84429651");
    add_proj4text (p, 1,
        "944444 +k=1.0000353 +x_0=27000 +y_0=24999.99989839979 +e");
    add_proj4text (p, 2,
        "llps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Jackson (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.25333");
    add_srs_wkt (p, 9,
        "512777778],PARAMETER[\"central_meridian\",-90.8442965194");
    add_srs_wkt (p, 10,
        "4444],PARAMETER[\"scale_factor\",1.0000353],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",88582.5],PARAMETER[\"false_northing\",82");
    add_srs_wkt (p, 12,
        "020.833],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 14,
        "RTH],AUTHORITY[\"EPSG\",\"7612\"]]");
    p = add_epsg_def_ex (filter, first, last, 7613, "epsg", 7613,
        "NAD83(2011) / WISCRS Kenosha, Milwaukee, Ozaukee and Racine (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.21666666666667 +lon_0=-87.89444444");
    add_proj4text (p, 1,
        "444445 +k=1.0000260649 +x_0=185928.3727711455 +y_0=0.000");
    add_proj4text (p, 2,
        "9144018288036576 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Kenosha, Milwaukee, Ozauke");
    add_srs_wkt (p, 1,
        "e and Racine (ftUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD");
    add_srs_wkt (p, 2,
        "83_National_Spatial_Reference_System_2011\",SPHEROID[\"G");
    add_srs_wkt (p, 3,
        "RS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"701");
    add_srs_wkt (p, 4,
        "9\"]],AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "6318\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",42.21666666666667],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",-87.89444444444445],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1.0000260649],PARAMETER[\"false_easting\",610000.0");
    add_srs_wkt (p, 12,
        "03],PARAMETER[\"false_northing\",0.003],UNIT[\"US survey");
    add_srs_wkt (p, 13,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "7613\"]]");
    p = add_epsg_def_ex (filter, first, last, 7614, "epsg", 7614,
        "NAD83(2011) / WISCRS Kewaunee, Manitowoc and Sheboygan (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.26666666666667 +lon_0=-87.55 +k=1.");
    add_proj4text (p, 1,
        "0000233704 +x_0=79857.76154432308 +y_0=0.001219202438404");
    add_proj4text (p, 2,
        "877 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Kewaunee, Manitowoc and Sh");
    add_srs_wkt (p, 1,
        "eboygan (ftUS)\",GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_Na");
    add_srs_wkt (p, 2,
        "tional_Spatial_Reference_System_2011\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"1116\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"6318");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",43.26666666666667],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",-87.55],PARAMETER[\"scale_factor\",1.0000233");
    add_srs_wkt (p, 11,
        "704],PARAMETER[\"false_easting\",262000.006],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0.004],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7614\"]]");
    p = add_epsg_def_ex (filter, first, last, 7615, "epsg", 7615,
        "NAD83(2011) / WISCRS La Crosse (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.45111111111111 +lon_0=-91.31666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000319985 +x_0=130454.6596901194 +y_0=0.003");
    add_proj4text (p, 2,
        "352806705613411 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS La Crosse (ftUS)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.4511");
    add_srs_wkt (p, 9,
        "1111111111],PARAMETER[\"central_meridian\",-91.316666666");
    add_srs_wkt (p, 10,
        "66666],PARAMETER[\"scale_factor\",1.0000319985],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",427999.996],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0.011],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"7615\"]]");
    p = add_epsg_def_ex (filter, first, last, 7616, "epsg", 7616,
        "NAD83(2011) / WISCRS Langlade (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.15423710527778 +lat_0=45.15423710527");
    add_proj4text (p, 1,
        "778 +lon_0=-89.03333333333333 +k_0=1.0000627024 +x_0=198");
    add_proj4text (p, 2,
        "425.1968503937 +y_0=105279.7828803657 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Langlade (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "45.15423710527778],PARAMETER[\"central_meridian\",-89.03");
    add_srs_wkt (p, 10,
        "333333333333],PARAMETER[\"scale_factor\",1.0000627024],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",651000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",345405.421],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7616\"]]");
    p = add_epsg_def_ex (filter, first, last, 7617, "epsg", 7617,
        "NAD83(2011) / WISCRS Lincoln (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.84444444444445 +lon_0=-89.73333333");
    add_proj4text (p, 1,
        "333333 +k=1.0000599003 +x_0=116129.0322580645 +y_0=0.005");
    add_proj4text (p, 2,
        "791211582423164 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Lincoln (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.84444");
    add_srs_wkt (p, 9,
        "444444445],PARAMETER[\"central_meridian\",-89.7333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"scale_factor\",1.0000599003],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",381000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0.019],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"7617\"]]");
    p = add_epsg_def_ex (filter, first, last, 7618, "epsg", 7618,
        "NAD83(2011) / WISCRS Marathon (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.90090442361111 +lat_0=44.90090442361");
    add_proj4text (p, 1,
        "111 +lon_0=-89.77 +k_0=1.000053289 +x_0=74676.1493522987");
    add_proj4text (p, 2,
        " +y_0=55049.26695453391 +ellps=GRS80 +units=us-ft +no_de");
    add_proj4text (p, 3,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Marathon (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "44.90090442361111],PARAMETER[\"central_meridian\",-89.77");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1.000053289],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",245000],PARAMETER[\"false_northing\",18060");
    add_srs_wkt (p, 12,
        "7.47],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"7618\"]]");
    p = add_epsg_def_ex (filter, first, last, 7619, "epsg", 7619,
        "NAD83(2011) / WISCRS Marinette (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.69166666666666 +lon_0=-87.71111111");
    add_proj4text (p, 1,
        "111111 +k=1.0000234982 +x_0=238658.8794513589 +y_0=0.003");
    add_proj4text (p, 2,
        "048006096012192 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Marinette (ftUS)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",44.6916");
    add_srs_wkt (p, 9,
        "6666666666],PARAMETER[\"central_meridian\",-87.711111111");
    add_srs_wkt (p, 10,
        "11111],PARAMETER[\"scale_factor\",1.0000234982],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",783000.007],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0.01],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"7619\"]]");
    p = add_epsg_def_ex (filter, first, last, 7620, "epsg", 7620,
        "NAD83(2011) / WISCRS Menominee (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.71666666666667 +lon_0=-88.41666666");
    add_proj4text (p, 1,
        "666667 +k=1.0000362499 +x_0=105461.0121412243 +y_0=0.003");
    add_proj4text (p, 2,
        "048006096012192 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Menominee (ftUS)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",44.7166");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"central_meridian\",-88.416666666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",1.0000362499],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",346000.004],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0.01],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"7620\"]]");
    p = add_epsg_def_ex (filter, first, last, 7621, "epsg", 7621,
        "NAD83(2011) / WISCRS Monroe (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.00007392861111 +lat_0=44.00007392861");
    add_proj4text (p, 1,
        "111 +lon_0=-90.64166666666668 +k_0=1.0000434122 +x_0=204");
    add_proj4text (p, 2,
        "521.2090424181 +y_0=121923.9861823724 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Monroe (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44");
    add_srs_wkt (p, 9,
        ".00007392861111],PARAMETER[\"central_meridian\",-90.6416");
    add_srs_wkt (p, 10,
        "6666666668],PARAMETER[\"scale_factor\",1.0000434122],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",671000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",400012.278],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7621\"]]");
    p = add_epsg_def_ex (filter, first, last, 7622, "epsg", 7622,
        "NAD83(2011) / WISCRS Oconto (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.39722222222222 +lon_0=-87.90833333");
    add_proj4text (p, 1,
        "333335 +k=1.0000236869 +x_0=182880.3675895352 +y_0=0.003");
    add_proj4text (p, 2,
        "352806705613411 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Oconto (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",44.3972222");
    add_srs_wkt (p, 9,
        "2222222],PARAMETER[\"central_meridian\",-87.908333333333");
    add_srs_wkt (p, 10,
        "35],PARAMETER[\"scale_factor\",1.0000236869],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",600000.0060000002],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0.011],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 13,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7622\"]]");
    p = add_epsg_def_ex (filter, first, last, 7623, "epsg", 7623,
        "NAD83(2011) / WISCRS Oneida (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.70422377027778 +lat_0=45.70422377027");
    add_proj4text (p, 1,
        "778 +lon_0=-89.54444444444444 +k_0=1.0000686968 +x_0=701");
    add_proj4text (p, 2,
        "04.14020828041 +y_0=57588.03474726949 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Oneida (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".70422377027778],PARAMETER[\"central_meridian\",-89.5444");
    add_srs_wkt (p, 10,
        "4444444444],PARAMETER[\"scale_factor\",1.0000686968],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",230000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",188936.744],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7623\"]]");
    p = add_epsg_def_ex (filter, first, last, 7624, "epsg", 7624,
        "NAD83(2011) / WISCRS Pepin and Pierce (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.63614887194444 +lat_0=44.63614887194");
    add_proj4text (p, 1,
        "444 +lon_0=-92.22777777777777 +k_0=1.0000362977 +x_0=167");
    add_proj4text (p, 2,
        "640.3352806706 +y_0=86033.08773177546 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Pepin and Pierce (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",44.63614887194444],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-92.22777777777777],PARAMETER[\"scale_factor\",1.000036");
    add_srs_wkt (p, 11,
        "2977],PARAMETER[\"false_easting\",550000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",282260.222],UNIT[\"US survey foot\",0.304");
    add_srs_wkt (p, 13,
        "8006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7624\"]]");
    p = add_epsg_def_ex (filter, first, last, 7625, "epsg", 7625,
        "NAD83(2011) / WISCRS Polk (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.66111111111111 +lon_0=-92.63333333");
    add_proj4text (p, 1,
        "333334 +k=1.0000433849 +x_0=141732.2822453645 +y_0=0.005");
    add_proj4text (p, 2,
        "791211582423164 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Polk (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",44.66111111");
    add_srs_wkt (p, 9,
        "111111],PARAMETER[\"central_meridian\",-92.6333333333333");
    add_srs_wkt (p, 10,
        "4],PARAMETER[\"scale_factor\",1.0000433849],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",464999.996],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.019],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"7625\"]]");
    p = add_epsg_def_ex (filter, first, last, 7626, "epsg", 7626,
        "NAD83(2011) / WISCRS Portage (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.41682397527777 +lat_0=44.41682397527");
    add_proj4text (p, 1,
        "777 +lon_0=-89.5 +k_0=1.000039936 +x_0=56388.11277622555");
    add_proj4text (p, 2,
        " +y_0=50022.1874523749 +ellps=GRS80 +units=us-ft +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Portage (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "44.41682397527777],PARAMETER[\"central_meridian\",-89.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1.000039936],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",185000],PARAMETER[\"false_northing\",164114");
    add_srs_wkt (p, 12,
        ".46],UNIT[\"US survey foot\",0.3048006096012192,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"7626\"]]");
    p = add_epsg_def_ex (filter, first, last, 7627, "epsg", 7627,
        "NAD83(2011) / WISCRS Price (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.55555555555555 +lon_0=-90.48888888");
    add_proj4text (p, 1,
        "888889 +k=1.0000649554 +x_0=227990.8544577089 +y_0=0.010");
    add_proj4text (p, 2,
        "97282194564389 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Price (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",44.5555555");
    add_srs_wkt (p, 9,
        "5555555],PARAMETER[\"central_meridian\",-90.488888888888");
    add_srs_wkt (p, 10,
        "89],PARAMETER[\"scale_factor\",1.0000649554],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",747999.995],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0.036],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"7627\"]]");
    p = add_epsg_def_ex (filter, first, last, 7628, "epsg", 7628,
        "NAD83(2011) / WISCRS Richland (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.3223129275 +lat_0=43.3223129275 +lon");
    add_proj4text (p, 1,
        "_0=-90.43055555555556 +k_0=1.0000375653 +x_0=202387.6047");
    add_proj4text (p, 2,
        "752095 +y_0=134255.4254508509 +ellps=GRS80 +units=us-ft ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Richland (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "43.3223129275],PARAMETER[\"central_meridian\",-90.430555");
    add_srs_wkt (p, 10,
        "55555556],PARAMETER[\"scale_factor\",1.0000375653],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",664000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",440469.675],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 13,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7628\"]]");
    p = add_epsg_def_ex (filter, first, last, 7629, "epsg", 7629,
        "NAD83(2011) / WISCRS Rock (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.94444444444444 +lon_0=-89.07222222");
    add_proj4text (p, 1,
        "222222 +k=1.0000337311 +x_0=146304.2926085852 +y_0=0.006");
    add_proj4text (p, 2,
        "705613411226822 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Rock (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",41.94444444");
    add_srs_wkt (p, 9,
        "444444],PARAMETER[\"central_meridian\",-89.0722222222222");
    add_srs_wkt (p, 10,
        "2],PARAMETER[\"scale_factor\",1.0000337311],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",480000],PARAMETER[\"false_northing\",0.0");
    add_srs_wkt (p, 12,
        "22],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"7629\"]]");
    p = add_epsg_def_ex (filter, first, last, 7630, "epsg", 7630,
        "NAD83(2011) / WISCRS Rusk (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.91944444444444 +lon_0=-91.06666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000495976 +x_0=250546.1013970028 +y_0=0.023");
    add_proj4text (p, 2,
        "46964693929388 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Rusk (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",43.91944444");
    add_srs_wkt (p, 9,
        "444444],PARAMETER[\"central_meridian\",-91.0666666666666");
    add_srs_wkt (p, 10,
        "6],PARAMETER[\"scale_factor\",1.0000495976],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",822000.0010000002],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0.077],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 13,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7630\"]]");
    p = add_epsg_def_ex (filter, first, last, 7631, "epsg", 7631,
        "NAD83(2011) / WISCRS Sauk (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.81944444444445 +lon_0=-89.90000000");
    add_proj4text (p, 1,
        "000001 +k=1.0000373868 +x_0=185623.5715519431 +y_0=0.005");
    add_proj4text (p, 2,
        "181610363220727 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Sauk (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",42.81944444");
    add_srs_wkt (p, 9,
        "444445],PARAMETER[\"central_meridian\",-89.9],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1.0000373868],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",609000.0010000002],PARAMETER[\"false_northing\",0.017");
    add_srs_wkt (p, 12,
        "],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"7631\"]]");
    p = add_epsg_def_ex (filter, first, last, 7632, "epsg", 7632,
        "NAD83(2011) / WISCRS Sawyer (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.90009913138888 +lat_0=45.90009913138");
    add_proj4text (p, 1,
        "888 +lon_0=-91.11666666666666 +k_0=1.0000573461 +x_0=216");
    add_proj4text (p, 2,
        "713.2337312675 +y_0=120734.1631699263 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Sawyer (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".90009913138888],PARAMETER[\"central_meridian\",-91.1166");
    add_srs_wkt (p, 10,
        "6666666666],PARAMETER[\"scale_factor\",1.0000573461],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",711000.0010000002],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",396108.667],UNIT[\"US survey foot\",0.3");
    add_srs_wkt (p, 13,
        "048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7632\"]]");
    p = add_epsg_def_ex (filter, first, last, 7633, "epsg", 7633,
        "NAD83(2011) / WISCRS Shawano (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.03611111111111 +lon_0=-88.60555555");
    add_proj4text (p, 1,
        "555555 +k=1.000032144 +x_0=262433.3251714504 +y_0=0.0094");
    add_proj4text (p, 2,
        "48818897637795 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Shawano (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",44.03611");
    add_srs_wkt (p, 9,
        "111111111],PARAMETER[\"central_meridian\",-88.6055555555");
    add_srs_wkt (p, 10,
        "5555],PARAMETER[\"scale_factor\",1.000032144],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",861000.0010000002],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",0.031],UNIT[\"US survey foot\",0.3048006096012");
    add_srs_wkt (p, 13,
        "192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 14,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7633\"]]");
    p = add_epsg_def_ex (filter, first, last, 7634, "epsg", 7634,
        "NAD83(2011) / WISCRS St. Croix (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44.03611111111111 +lon_0=-92.63333333");
    add_proj4text (p, 1,
        "333334 +k=1.0000381803 +x_0=165506.7300990602 +y_0=0.010");
    add_proj4text (p, 2,
        "36322072644145 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS St. Croix (ftUS)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"11");
    add_srs_wkt (p, 4,
        "16\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",44.0361");
    add_srs_wkt (p, 9,
        "1111111111],PARAMETER[\"central_meridian\",-92.633333333");
    add_srs_wkt (p, 10,
        "33334],PARAMETER[\"scale_factor\",1.0000381803],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",542999.997],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0.034],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"7634\"]]");
    p = add_epsg_def_ex (filter, first, last, 7635, "epsg", 7635,
        "NAD83(2011) / WISCRS Taylor (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.17782208583333 +lat_0=45.17782208583");
    add_proj4text (p, 1,
        "333 +lon_0=-90.48333333333333 +k_0=1.0000597566 +x_0=187");
    add_proj4text (p, 2,
        "147.5742951486 +y_0=107746.7521463043 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Taylor (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",45");
    add_srs_wkt (p, 9,
        ".17782208583333],PARAMETER[\"central_meridian\",-90.4833");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1.0000597566],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",614000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",353499.136],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7635\"]]");
    p = add_epsg_def_ex (filter, first, last, 7636, "epsg", 7636,
        "NAD83(2011) / WISCRS Trempealeau (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.16111111111111 +lon_0=-91.36666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000361538 +x_0=256946.9138938278 +y_0=0.003");
    add_proj4text (p, 2,
        "962407924815849 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Trempealeau (ftUS)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "1116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.1");
    add_srs_wkt (p, 9,
        "6111111111111],PARAMETER[\"central_meridian\",-91.366666");
    add_srs_wkt (p, 10,
        "66666666],PARAMETER[\"scale_factor\",1.0000361538],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",843000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0.013],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"7636\"]]");
    p = add_epsg_def_ex (filter, first, last, 7637, "epsg", 7637,
        "NAD83(2011) / WISCRS Vernon (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972");
    add_proj4text (p, 1,
        "223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222");
    add_proj4text (p, 2,
        "504.44500889 +y_0=47532.0603505207 +ellps=GRS80 +units=u");
    add_proj4text (p, 3,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Vernon (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sy");
    add_srs_wkt (p, 2,
        "stem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",43");
    add_srs_wkt (p, 9,
        ".57503293972223],PARAMETER[\"central_meridian\",-90.7833");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1.0000408158],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",730000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",155944.768],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7637\"]]");
    p = add_epsg_def_ex (filter, first, last, 7638, "epsg", 7638,
        "NAD83(2011) / WISCRS Vilas (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.07784409055556 +lat_0=46.07784409055");
    add_proj4text (p, 1,
        "556 +lon_0=-89.48888888888889 +k_0=1.0000730142 +x_0=134");
    add_proj4text (p, 2,
        "417.0688341377 +y_0=50337.10927101854 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Vilas (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Sys");
    add_srs_wkt (p, 2,
        "tem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",46");
    add_srs_wkt (p, 9,
        ".07784409055556],PARAMETER[\"central_meridian\",-89.4888");
    add_srs_wkt (p, 10,
        "8888888889],PARAMETER[\"scale_factor\",1.0000730142],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",441000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",165147.666],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7638\"]]");
    p = add_epsg_def_ex (filter, first, last, 7639, "epsg", 7639,
        "NAD83(2011) / WISCRS Walworth (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.66946209694444 +lat_0=42.66946209694");
    add_proj4text (p, 1,
        "444 +lon_0=-88.54166666666667 +k_0=1.0000367192 +x_0=232");
    add_proj4text (p, 2,
        "562.8651257302 +y_0=111088.2224028448 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Walworth (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "42.66946209694444],PARAMETER[\"central_meridian\",-88.54");
    add_srs_wkt (p, 10,
        "166666666667],PARAMETER[\"scale_factor\",1.0000367192],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",763000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",364461.943],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7639\"]]");
    p = add_epsg_def_ex (filter, first, last, 7640, "epsg", 7640,
        "NAD83(2011) / WISCRS Washburn (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.96121983333334 +lat_0=45.96121983333");
    add_proj4text (p, 1,
        "334 +lon_0=-91.78333333333333 +k_0=1.0000475376 +x_0=234");
    add_proj4text (p, 2,
        "086.8681737363 +y_0=188358.6059436119 +ellps=GRS80 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Washburn (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "45.96121983333334],PARAMETER[\"central_meridian\",-91.78");
    add_srs_wkt (p, 10,
        "333333333333],PARAMETER[\"scale_factor\",1.0000475376],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",768000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",617973.193],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7640\"]]");
    p = add_epsg_def_ex (filter, first, last, 7641, "epsg", 7641,
        "NAD83(2011) / WISCRS Washington (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.91805555555555 +lon_0=-88.06388888");
    add_proj4text (p, 1,
        "888888 +k=1.00003738 +x_0=120091.4414020828 +y_0=0.00304");
    add_proj4text (p, 2,
        "8006096012192 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Washington (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Referenc");
    add_srs_wkt (p, 2,
        "e_System_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1");
    add_srs_wkt (p, 4,
        "116\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",42.918");
    add_srs_wkt (p, 9,
        "05555555555],PARAMETER[\"central_meridian\",-88.06388888");
    add_srs_wkt (p, 10,
        "888888],PARAMETER[\"scale_factor\",1.00003738],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",394000.004],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0.01],UNIT[\"US survey foot\",0.3048006096012192,AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 14,
        "ORTH],AUTHORITY[\"EPSG\",\"7641\"]]");
    p = add_epsg_def_ex (filter, first, last, 7642, "epsg", 7642,
        "NAD83(2011) / WISCRS Waukesha (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.56944444444445 +lon_0=-88.22499999");
    add_proj4text (p, 1,
        "999999 +k=1.0000346179 +x_0=208788.4178816358 +y_0=0.003");
    add_proj4text (p, 2,
        "352806705613411 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Waukesha (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",42.56944");
    add_srs_wkt (p, 9,
        "444444445],PARAMETER[\"central_meridian\",-88.225],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1.0000346179],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",685000.0010000002],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0.011],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"7642\"]]");
    p = add_epsg_def_ex (filter, first, last, 7643, "epsg", 7643,
        "NAD83(2011) / WISCRS Waupaca (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.42027777777778 +lon_0=-88.81666666");
    add_proj4text (p, 1,
        "666666 +k=1.0000333645 +x_0=185013.9709423419 +y_0=0.007");
    add_proj4text (p, 2,
        "010414020828041 +ellps=GRS80 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Waupaca (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",43.42027");
    add_srs_wkt (p, 9,
        "777777778],PARAMETER[\"central_meridian\",-88.8166666666");
    add_srs_wkt (p, 10,
        "6666],PARAMETER[\"scale_factor\",1.0000333645],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",607000.003],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0.023],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"7643\"]]");
    p = add_epsg_def_ex (filter, first, last, 7644, "epsg", 7644,
        "NAD83(2011) / WISCRS Waushara (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.11394404583334 +lat_0=44.11394404583");
    add_proj4text (p, 1,
        "334 +lon_0=-89.24166666666667 +k_0=1.0000392096 +x_0=120");
    add_proj4text (p, 2,
        "091.4401828804 +y_0=45069.7588011176 +ellps=GRS80 +units");
    add_proj4text (p, 3,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Waushara (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_S");
    add_srs_wkt (p, 2,
        "ystem_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "44.11394404583334],PARAMETER[\"central_meridian\",-89.24");
    add_srs_wkt (p, 10,
        "166666666667],PARAMETER[\"scale_factor\",1.0000392096],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",394000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",147866.367],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7644\"]]");
    p = add_epsg_def_ex (filter, first, last, 7645, "epsg", 7645,
        "NAD83(2011) / WISCRS Wood (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2011", "Lambert_Conformal_Conic_1SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.36259546944444 +lat_0=44.36259546944");
    add_proj4text (p, 1,
        "444 +lon_0=-90 +k_0=1.0000421209 +x_0=208483.6172720346 ");
    add_proj4text (p, 2,
        "+y_0=134589.7539243078 +ellps=GRS80 +units=us-ft +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(2011) / WISCRS Wood (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83(2011)\",DATUM[\"NAD83_National_Spatial_Reference_Syst");
    add_srs_wkt (p, 2,
        "em_2011\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1116\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"6318\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",44.");
    add_srs_wkt (p, 9,
        "36259546944444],PARAMETER[\"central_meridian\",-90],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.0000421209],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",684000.0010000002],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",441566.551],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"7645\"]]");
    p = add_epsg_def_ex (filter, first, last, 7683, "epsg", 7683,
        "GSK-2011", 1, 1,
        "GSK-2011", "Greenwich",
        "Geodezicheskaya_Sistema_Koordinat_2011", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +a=6378136.5 +b=6356751.757955603 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GSK-2011\",DATUM[\"Geodezicheskaya_Sistema_Koor");
    add_srs_wkt (p, 1,
        "dinat_2011\",SPHEROID[\"GSK-2011\",6378136.5,298.2564151");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"1025\"]],AUTHORITY[\"EPSG\",\"1159");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 6,
        "AST],AUTHORITY[\"EPSG\",\"7683\"]]");
    p = add_epsg_def_ex (filter, first, last, 7686, "epsg", 7686,
        "Kyrg-06", 1, 1,
        "GRS 1980", "Greenwich",
        "Kyrgyzstan_Geodetic_Datum_2006", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"Kyrg-06\",DATUM[\"Kyrgyzstan_Geodetic_Datum_200");
    add_srs_wkt (p, 1,
        "6\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1160\"]],PRIM");
    add_srs_wkt (p, 3,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"7686\"]]");
    p = add_epsg_def_ex (filter, first, last, 7692, "epsg", 7692,
        "Kyrg-06 / zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "Kyrgyzstan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=68.51666666666667 +k=1 +x_0=");
    add_proj4text (p, 1,
        "1300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kyrg-06 / zone 1\",GEOGCS[\"Kyrg-06\",DATUM[\"K");
    add_srs_wkt (p, 1,
        "yrgyzstan_Geodetic_Datum_2006\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"1160\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7686\"]],PR");
    add_srs_wkt (p, 7,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 8,
        "f_origin\",0],PARAMETER[\"central_meridian\",68.51666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",1300000],PARAMETER[\"false_northing\",14743.5]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7692\"]]");
    p = add_epsg_def_ex (filter, first, last, 7693, "epsg", 7693,
        "Kyrg-06 / zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "Kyrgyzstan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=71.51666666666667 +k=1 +x_0=");
    add_proj4text (p, 1,
        "2300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kyrg-06 / zone 2\",GEOGCS[\"Kyrg-06\",DATUM[\"K");
    add_srs_wkt (p, 1,
        "yrgyzstan_Geodetic_Datum_2006\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"1160\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7686\"]],PR");
    add_srs_wkt (p, 7,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 8,
        "f_origin\",0],PARAMETER[\"central_meridian\",71.51666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",2300000],PARAMETER[\"false_northing\",14743.5]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7693\"]]");
    p = add_epsg_def_ex (filter, first, last, 7694, "epsg", 7694,
        "Kyrg-06 / zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "Kyrgyzstan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=74.51666666666667 +k=1 +x_0=");
    add_proj4text (p, 1,
        "3300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kyrg-06 / zone 3\",GEOGCS[\"Kyrg-06\",DATUM[\"K");
    add_srs_wkt (p, 1,
        "yrgyzstan_Geodetic_Datum_2006\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"1160\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7686\"]],PR");
    add_srs_wkt (p, 7,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 8,
        "f_origin\",0],PARAMETER[\"central_meridian\",74.51666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",3300000],PARAMETER[\"false_northing\",14743.5]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7694\"]]");
    p = add_epsg_def_ex (filter, first, last, 7695, "epsg", 7695,
        "Kyrg-06 / zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "Kyrgyzstan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=77.51666666666667 +k=1 +x_0=");
    add_proj4text (p, 1,
        "4300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kyrg-06 / zone 4\",GEOGCS[\"Kyrg-06\",DATUM[\"K");
    add_srs_wkt (p, 1,
        "yrgyzstan_Geodetic_Datum_2006\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"1160\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7686\"]],PR");
    add_srs_wkt (p, 7,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 8,
        "f_origin\",0],PARAMETER[\"central_meridian\",77.51666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",4300000],PARAMETER[\"false_northing\",14743.5]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7695\"]]");
    p = add_epsg_def_ex (filter, first, last, 7696, "epsg", 7696,
        "Kyrg-06 / zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "Kyrgyzstan_Geodetic_Datum_2006", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=80.51666666666667 +k=1 +x_0=");
    add_proj4text (p, 1,
        "5300000 +y_0=14743.5 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kyrg-06 / zone 5\",GEOGCS[\"Kyrg-06\",DATUM[\"K");
    add_srs_wkt (p, 1,
        "yrgyzstan_Geodetic_Datum_2006\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"1160\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7686\"]],PR");
    add_srs_wkt (p, 7,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 8,
        "f_origin\",0],PARAMETER[\"central_meridian\",80.51666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",5300000],PARAMETER[\"false_northing\",14743.5]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7696\"]]");
    p = add_epsg_def_ex (filter, first, last, 7755, "epsg", 7755,
        "WGS 84 / India NSF LCC", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=12.472955 +lat_2=35.17280444444444 +lat");
    add_proj4text (p, 1,
        "_0=24 +lon_0=80 +x_0=4000000 +y_0=4000000 +datum=WGS84 +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / India NSF LCC\",GEOGCS[\"WGS 84\",DATU");
    add_srs_wkt (p, 1,
        "M[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 6,
        "AST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 7,
        "Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 8,
        ",12.472955],PARAMETER[\"standard_parallel_2\",35.1728044");
    add_srs_wkt (p, 9,
        "4444444],PARAMETER[\"latitude_of_origin\",24],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",80],PARAMETER[\"false_easting\",400");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",4000000],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 13,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7755\"]]");
    p = add_epsg_def_ex (filter, first, last, 7756, "epsg", 7756,
        "WGS 84 / Andhra Pradesh", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=13.75 +lat_2=18.75 +lat_0=16.25543298 +");
    add_proj4text (p, 1,
        "lon_0=80.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Andhra Pradesh\",GEOGCS[\"WGS 84\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.25722356");
    add_srs_wkt (p, 2,
        "3,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"632");
    add_srs_wkt (p, 3,
        "6\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
        "EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 7,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 8,
        ",13.75],PARAMETER[\"standard_parallel_2\",18.75],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"latitude_of_origin\",16.25543298],PARAMETER[\"centr");
    add_srs_wkt (p, 10,
        "al_meridian\",80.875],PARAMETER[\"false_easting\",100000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",1000000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7756\"]]");
    p = add_epsg_def_ex (filter, first, last, 7757, "epsg", 7757,
        "WGS 84 / Arunachal Pradesh", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27 +lat_2=29 +lat_0=28.00157897 +lon_0=");
    add_proj4text (p, 1,
        "94.5 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Arunachal Pradesh\",GEOGCS[\"WGS 84\",");
    add_srs_wkt (p, 1,
        "DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 7,
        "ert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 8,
        "_1\",27],PARAMETER[\"standard_parallel_2\",29],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"latitude_of_origin\",28.00157897],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",94.5],PARAMETER[\"false_easting\",1000000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"7757\"]]");
    p = add_epsg_def_ex (filter, first, last, 7758, "epsg", 7758,
        "WGS 84 / Assam", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=24.66666666666667 +lat_2=27.33333333333");
    add_proj4text (p, 1,
        "333 +lat_0=26.00257703 +lon_0=92.75 +x_0=1000000 +y_0=10");
    add_proj4text (p, 2,
        "00000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Assam\",GEOGCS[\"WGS 84\",DATUM[\"WGS_");
    add_srs_wkt (p, 1,
        "1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 7,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",24.66666");
    add_srs_wkt (p, 8,
        "666666667],PARAMETER[\"standard_parallel_2\",27.33333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"latitude_of_origin\",26.00257703],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"central_meridian\",92.75],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",1000000],PARAMETER[\"false_northing\",1000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7758\"]]");
    p = add_epsg_def_ex (filter, first, last, 7759, "epsg", 7759,
        "WGS 84 / Bihar", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=24.625 +lat_2=27.125 +lat_0=25.87725247");
    add_proj4text (p, 1,
        " +lon_0=85.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Bihar\",GEOGCS[\"WGS 84\",DATUM[\"WGS_");
    add_srs_wkt (p, 1,
        "1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 7,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",24.625],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_2\",27.125],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",25.87725247],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",85.875],PARAMETER[\"false_easting\",1000000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"7759\"]]");
    p = add_epsg_def_ex (filter, first, last, 7760, "epsg", 7760,
        "WGS 84 / Delhi", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=28.375 +lat_2=28.875 +lat_0=28.62510126");
    add_proj4text (p, 1,
        " +lon_0=77 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Delhi\",GEOGCS[\"WGS 84\",DATUM[\"WGS_");
    add_srs_wkt (p, 1,
        "1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRI");
    add_srs_wkt (p, 3,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 4,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 5,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 7,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",28.375],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_2\",28.875],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",28.62510126],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",77],PARAMETER[\"false_easting\",1000000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"7760\"]]");
    p = add_epsg_def_ex (filter, first, last, 7761, "epsg", 7761,
        "WGS 84 / Gujarat", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=20.79166666666667 +lat_2=23.95833333333");
    add_proj4text (p, 1,
        "333 +lat_0=22.37807121 +lon_0=71.375 +x_0=1000000 +y_0=1");
    add_proj4text (p, 2,
        "000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Gujarat\",GEOGCS[\"WGS 84\",DATUM[\"WG");
    add_srs_wkt (p, 1,
        "S_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 7,
        "mal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",20.79");
    add_srs_wkt (p, 8,
        "166666666667],PARAMETER[\"standard_parallel_2\",23.95833");
    add_srs_wkt (p, 9,
        "333333333],PARAMETER[\"latitude_of_origin\",22.37807121]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"central_meridian\",71.375],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",1000000],PARAMETER[\"false_northing\",100000");
    add_srs_wkt (p, 12,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7761\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7762, "epsg", 7762,
        "WGS 84 / Haryana", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=28.08333333333333 +lat_2=30.41666666666");
    add_proj4text (p, 1,
        "667 +lat_0=29.25226266 +lon_0=76 +x_0=1000000 +y_0=10000");
    add_proj4text (p, 2,
        "00 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Haryana\",GEOGCS[\"WGS 84\",DATUM[\"WG");
    add_srs_wkt (p, 1,
        "S_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 7,
        "mal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",28.08");
    add_srs_wkt (p, 8,
        "333333333333],PARAMETER[\"standard_parallel_2\",30.41666");
    add_srs_wkt (p, 9,
        "666666667],PARAMETER[\"latitude_of_origin\",29.25226266]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"central_meridian\",76],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",1000000],PARAMETER[\"false_northing\",1000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7762\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909


















































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_37 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 24893, "epsg", 24893,
        "PSAD56 / Peru east zone", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.99952992 +x_0=");
    add_proj4text (p, 1,
        "1324000 +y_0=1040084.558 +ellps=intl +towgs84=-288,175,-");
    add_proj4text (p, 2,
        "376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / Peru east zone\",GEOGCS[\"PSAD56\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Provisional_South_American_Datum_1956\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",-");
    add_srs_wkt (p, 9,
        "9.5],PARAMETER[\"central_meridian\",-70.5],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99952992],PARAMETER[\"false_easting\",13");
    add_srs_wkt (p, 11,
        "24000],PARAMETER[\"false_northing\",1040084.558],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"24893\"]]");
    p = add_epsg_def_ex (filter, first, last, 25000, "epsg", 25000,
        "Leigon / Ghana Metre Grid", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Leigon", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.9997");
    add_proj4text (p, 1,
        "5 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,3");
    add_proj4text (p, 2,
        "64,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Leigon / Ghana Metre Grid\",GEOGCS[\"Leigon\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Leigon\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.1");
    add_srs_wkt (p, 2,
        "45,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-130,29");
    add_srs_wkt (p, 3,
        ",364,0,0,0,0],AUTHORITY[\"EPSG\",\"6250\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4250\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",4.666666666666667],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-1],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".99975],PARAMETER[\"false_easting\",274319.51],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"25000\"]]");
    p = add_epsg_def_ex (filter, first, last, 25231, "epsg", 25231,
        "Lome / UTM zone 31N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Lome", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Lome / UTM zone 31N\",GEOGCS[\"Lome\",DATUM[\"L");
    add_srs_wkt (p, 1,
        "ome\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602");
    add_srs_wkt (p, 2,
        "12936265,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6252\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 7,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 9,
        "ctor\",0.9996],PARAMETER[\"false_easting\",500000],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 11,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 12,
        "\",NORTH],AUTHORITY[\"EPSG\",\"25231\"]]");
    p = add_epsg_def_ex (filter, first, last, 25391, "epsg", 25391,
        "Luzon 1911 / Philippines zone I", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone I\",GEOGCS[\"Luzo");
    add_srs_wkt (p, 1,
        "n 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"6253");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",117],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99995],PARAMETER[\"false_easting\",500000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"25391\"]]");
    p = add_epsg_def_ex (filter, first, last, 25392, "epsg", 25392,
        "Luzon 1911 / Philippines zone II", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone II\",GEOGCS[\"Luz");
    add_srs_wkt (p, 1,
        "on 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "3\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",119],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99995],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"25392\"]]");
    p = add_epsg_def_ex (filter, first, last, 25393, "epsg", 25393,
        "Luzon 1911 / Philippines zone III", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone III\",GEOGCS[\"Lu");
    add_srs_wkt (p, 1,
        "zon 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "53\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",121],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99995],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"25393\"]]");
    p = add_epsg_def_ex (filter, first, last, 25394, "epsg", 25394,
        "Luzon 1911 / Philippines zone IV", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone IV\",GEOGCS[\"Luz");
    add_srs_wkt (p, 1,
        "on 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "3\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",123],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99995],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"25394\"]]");
    p = add_epsg_def_ex (filter, first, last, 25395, "epsg", 25395,
        "Luzon 1911 / Philippines zone V", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone V\",GEOGCS[\"Luzo");
    add_srs_wkt (p, 1,
        "n 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"6253");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",125],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99995],PARAMETER[\"false_easting\",500000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"25395\"]]");
    p = add_epsg_def_ex (filter, first, last, 25700, "epsg", 25700,
        "Makassar (Jakarta) / NEIEZ (deprecated)", 0, 0,
        "Bessel 1841", "Jakarta",
        "Makassar_Jakarta", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=");
    add_proj4text (p, 2,
        "jakarta +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Makassar (Jakarta) / NEIEZ (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Makassar (Jakarta)\",DATUM[\"Makassar_Jakarta\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6804\"]],PRIMEM[\"Jakarta\",106.807");
    add_srs_wkt (p, 5,
        "7194444444,AUTHORITY[\"EPSG\",\"8908\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4804\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",110],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "97],PARAMETER[\"false_easting\",3900000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",900000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"25700\"]]");
    p = add_epsg_def_ex (filter, first, last, 25828, "epsg", 25828,
        "ETRS89 / UTM zone 28N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 28N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-15],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"25828\"]]");
    p = add_epsg_def_ex (filter, first, last, 25829, "epsg", 25829,
        "ETRS89 / UTM zone 29N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 29N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25829\"]]");
    p = add_epsg_def_ex (filter, first, last, 25830, "epsg", 25830,
        "ETRS89 / UTM zone 30N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 30N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25830\"]]");
    p = add_epsg_def_ex (filter, first, last, 25831, "epsg", 25831,
        "ETRS89 / UTM zone 31N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 31N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25831\"]]");
    p = add_epsg_def_ex (filter, first, last, 25832, "epsg", 25832,
        "ETRS89 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25832\"]]");
    p = add_epsg_def_ex (filter, first, last, 25833, "epsg", 25833,
        "ETRS89 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 33N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25833\"]]");
    p = add_epsg_def_ex (filter, first, last, 25834, "epsg", 25834,
        "ETRS89 / UTM zone 34N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 34N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25834\"]]");
    p = add_epsg_def_ex (filter, first, last, 25835, "epsg", 25835,
        "ETRS89 / UTM zone 35N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 35N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25835\"]]");
    p = add_epsg_def_ex (filter, first, last, 25836, "epsg", 25836,
        "ETRS89 / UTM zone 36N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 36N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25836\"]]");
    p = add_epsg_def_ex (filter, first, last, 25837, "epsg", 25837,
        "ETRS89 / UTM zone 37N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 37N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25837\"]]");
    p = add_epsg_def_ex (filter, first, last, 25838, "epsg", 25838,
        "ETRS89 / UTM zone 38N (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 38N (deprecated)\",GEOGCS[\"E");
    add_srs_wkt (p, 1,
        "TRS89\",DATUM[\"European_Terrestrial_Reference_System_19");
    add_srs_wkt (p, 2,
        "89\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.9996],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"25838\"]]");
    p = add_epsg_def_ex (filter, first, last, 25884, "epsg", 25884,
        "ETRS89 / TM Baltic93", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / TM Baltic93\",GEOGCS[\"ETRS89\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Terrestrial_Reference_System_1989\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",24],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"25884\"]]");
    p = add_epsg_def_ex (filter, first, last, 25932, "epsg", 25932,
        "Malongo 1987 / UTM zone 32S", 0, 0,
        "International 1924", "Greenwich",
        "Malongo_1987", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=intl +towgs84=-254.1,-5");
    add_proj4text (p, 1,
        ".36,-100.29,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Malongo 1987 / UTM zone 32S\",GEOGCS[\"Malongo ");
    add_srs_wkt (p, 1,
        "1987\",DATUM[\"Malongo_1987\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-254.1,-5.36,-100.29,0,0,0,0],AUTHORITY[\"EPSG\",\"6259\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4259\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"25932\"]]");
    p = add_epsg_def_ex (filter, first, last, 26191, "epsg", 26191,
        "Merchich / Nord Maroc", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +");
    add_proj4text (p, 2,
        "towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Nord Maroc\",GEOGCS[\"Merchich\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2");
    add_srs_wkt (p, 2,
        ",293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",33.3],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-5.4],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999625769],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"26191\"]]");
    p = add_epsg_def_ex (filter, first, last, 26192, "epsg", 26192,
        "Merchich / Sud Maroc", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "6155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=63");
    add_proj4text (p, 2,
        "56515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sud Maroc\",GEOGCS[\"Merchich\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,");
    add_srs_wkt (p, 2,
        "293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_1SP\"],PARAMETER[\"latitude_of_origin\",29.7],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-5.4],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999615596],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26192\"]]");
    p = add_epsg_def_ex (filter, first, last, 26193, "epsg", 26193,
        "Merchich / Sahara (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "6 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towg");
    add_proj4text (p, 2,
        "s84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sahara (deprecated)\",GEOGCS[\"Merch");
    add_srs_wkt (p, 1,
        "ich\",DATUM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",");
    add_srs_wkt (p, 2,
        "6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        ".1],PARAMETER[\"central_meridian\",-5.4],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.9996],PARAMETER[\"false_easting\",1200000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",400000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26193\"]]");
    p = add_epsg_def_ex (filter, first, last, 26194, "epsg", 26194,
        "Merchich / Sahara Nord", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "616304 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sahara Nord\",GEOGCS[\"Merchich\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.");
    add_srs_wkt (p, 2,
        "2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 8,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26.1],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-5.4],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999616304],PARAMETER[\"false_easting\",1200000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",400000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26194\"]]");
    p = add_epsg_def_ex (filter, first, last, 26195, "epsg", 26195,
        "Merchich / Sahara Sud", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=22.5 +lat_0=22.5 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "616437 +x_0=1500000 +y_0=400000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sahara Sud\",GEOGCS[\"Merchich\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2");
    add_srs_wkt (p, 2,
        ",293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",22.5],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-5.4],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999616437],PARAMETER[\"false_easting\",1500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",400000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"26195\"]]");
    p = add_epsg_def_ex (filter, first, last, 26237, "epsg", 26237,
        "Massawa / UTM zone 37N", 0, 0,
        "Bessel 1841", "Greenwich",
        "Massawa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Massawa / UTM zone 37N\",GEOGCS[\"Massawa\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Massawa\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[639,405,60");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6262\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4262\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"26237\"]]");
    p = add_epsg_def_ex (filter, first, last, 26331, "epsg", 26331,
        "Minna / UTM zone 31N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=clrk80 +towgs84=-92,-93,122,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / UTM zone 31N\",GEOGCS[\"Minna\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,122,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4263\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",3");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"263");
    add_srs_wkt (p, 13,
        "31\"]]");
    p = add_epsg_def_ex (filter, first, last, 26332, "epsg", 26332,
        "Minna / UTM zone 32N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=clrk80 +towgs84=-92,-93,122,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / UTM zone 32N\",GEOGCS[\"Minna\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,122,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4263\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",9");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"263");
    add_srs_wkt (p, 13,
        "32\"]]");
    p = add_epsg_def_ex (filter, first, last, 26391, "epsg", 26391,
        "Minna / Nigeria West Belt", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.99975 +x_0=230738.2");
    add_proj4text (p, 1,
        "6 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / Nigeria West Belt\",GEOGCS[\"Minna\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145");
    add_srs_wkt (p, 2,
        ",293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,1");
    add_srs_wkt (p, 3,
        "22,0,0,0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4263\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",4],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",4.5],PARAMETER[\"scale_factor\",0.99975],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",230738.26],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26391\"]]");
    p = add_epsg_def_ex (filter, first, last, 26392, "epsg", 26392,
        "Minna / Nigeria Mid Belt", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.99975 +x_0=670553.9");
    add_proj4text (p, 1,
        "8 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / Nigeria Mid Belt\",GEOGCS[\"Minna\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,");
    add_srs_wkt (p, 2,
        "293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,12");
    add_srs_wkt (p, 3,
        "2,0,0,0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4263\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",4],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",8.5],PARAMETER[\"scale_factor\",0.99975],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",670553.98],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26392\"]]");
    p = add_epsg_def_ex (filter, first, last, 26393, "epsg", 26393,
        "Minna / Nigeria East Belt", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.99975 +x_0=1110369");
    add_proj4text (p, 1,
        ".7 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / Nigeria East Belt\",GEOGCS[\"Minna\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145");
    add_srs_wkt (p, 2,
        ",293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,1");
    add_srs_wkt (p, 3,
        "22,0,0,0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4263\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",4],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",12.5],PARAMETER[\"scale_factor\",0.99975],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",1110369.7],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"26393\"]]");
    p = add_epsg_def_ex (filter, first, last, 26432, "epsg", 26432,
        "Mhast / UTM zone 32S (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Mhast", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-");
    add_proj4text (p, 1,
        "4.11,-96.38,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Mhast / UTM zone 32S (deprecated)\",GEOGCS[\"Mh");
    add_srs_wkt (p, 1,
        "ast\",DATUM[\"Mhast\",SPHEROID[\"International 1924\",63");
    add_srs_wkt (p, 2,
        "78388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-252.95,");
    add_srs_wkt (p, 3,
        "-4.11,-96.38,0,0,0,0],AUTHORITY[\"EPSG\",\"6264\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4264\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26432\"]]");
    p = add_epsg_def_ex (filter, first, last, 26591, "epsg", 26591,
        "Monte Mario (Rome) / Italy zone 1 (deprecated)", 0, 0,
        "International 1924", "Rome",
        "Monte_Mario_Rome", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-3.45233333333333 +k=0.9996 ");
    add_proj4text (p, 1,
        "+x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9");
    add_proj4text (p, 2,
        ".9,0.971,-2.917,0.714,-11.68 +pm=rome +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Monte Mario (Rome) / Italy zone 1 (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Monte Mario (Rome)\",DATUM[\"Monte_Mario_Rome\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7022\"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917");
    add_srs_wkt (p, 4,
        ",0.714,-11.68],AUTHORITY[\"EPSG\",\"6806\"]],PRIMEM[\"Ro");
    add_srs_wkt (p, 5,
        "me\",12.45233333333333,AUTHORITY[\"EPSG\",\"8906\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4806\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",-3.45233333333333],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",1500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"26591\"]]");
    p = add_epsg_def_ex (filter, first, last, 26592, "epsg", 26592,
        "Monte Mario (Rome) / Italy zone 2 (deprecated)", 0, 0,
        "International 1924", "Rome",
        "Monte_Mario_Rome", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=2.54766666666666 +k=0.9996 +");
    add_proj4text (p, 1,
        "x_0=2520000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.");
    add_proj4text (p, 2,
        "9,0.971,-2.917,0.714,-11.68 +pm=rome +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Monte Mario (Rome) / Italy zone 2 (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Monte Mario (Rome)\",DATUM[\"Monte_Mario_Rome\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7022\"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917");
    add_srs_wkt (p, 4,
        ",0.714,-11.68],AUTHORITY[\"EPSG\",\"6806\"]],PRIMEM[\"Ro");
    add_srs_wkt (p, 5,
        "me\",12.45233333333333,AUTHORITY[\"EPSG\",\"8906\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4806\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",2.54766666666666],PARAMETER[\"scale");
    add_srs_wkt (p, 11,
        "_factor\",0.9996],PARAMETER[\"false_easting\",2520000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"26592\"]]");
    p = add_epsg_def_ex (filter, first, last, 26632, "epsg", 26632,
        "M'poraloko / UTM zone 32N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "M_poraloko", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-74,");
    add_proj4text (p, 1,
        "-130,42,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"M'poraloko / UTM zone 32N\",GEOGCS[\"M'poraloko");
    add_srs_wkt (p, 1,
        "\",DATUM[\"M_poraloko\",SPHEROID[\"Clarke 1880 (IGN)\",6");
    add_srs_wkt (p, 2,
        "378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY[\"EPSG\",\"6266\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4266\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26632\"]]");
    p = add_epsg_def_ex (filter, first, last, 26692, "epsg", 26692,
        "M'poraloko / UTM zone 32S", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "M_poraloko", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 1,
        "84=-74,-130,42,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"M'poraloko / UTM zone 32S\",GEOGCS[\"M'poraloko");
    add_srs_wkt (p, 1,
        "\",DATUM[\"M_poraloko\",SPHEROID[\"Clarke 1880 (IGN)\",6");
    add_srs_wkt (p, 2,
        "378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY[\"EPSG\",\"6266\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4266\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26692\"]]");
    p = add_epsg_def_ex (filter, first, last, 26701, "epsg", 26701,
        "NAD27 / UTM zone 1N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 1N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26701");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26702, "epsg", 26702,
        "NAD27 / UTM zone 2N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 2N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26702");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26703, "epsg", 26703,
        "NAD27 / UTM zone 3N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 3N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-165],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26703");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26704, "epsg", 26704,
        "NAD27 / UTM zone 4N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 4N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-159],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26704");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26705, "epsg", 26705,
        "NAD27 / UTM zone 5N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 5N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-153],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26705");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26706, "epsg", 26706,
        "NAD27 / UTM zone 6N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 6N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-147],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26706");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26707, "epsg", 26707,
        "NAD27 / UTM zone 7N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 7N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26707");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26708, "epsg", 26708,
        "NAD27 / UTM zone 8N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 8N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-135],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26708");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26709, "epsg", 26709,
        "NAD27 / UTM zone 9N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 9N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-129],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26709");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26710, "epsg", 26710,
        "NAD27 / UTM zone 10N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 10N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-123],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26710");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26711, "epsg", 26711,
        "NAD27 / UTM zone 11N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 11N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-117],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26711");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26712, "epsg", 26712,
        "NAD27 / UTM zone 12N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 12N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-111],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26712");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26713, "epsg", 26713,
        "NAD27 / UTM zone 13N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 13N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-105],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26713");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26714, "epsg", 26714,
        "NAD27 / UTM zone 14N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 14N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-99],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26714\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26715, "epsg", 26715,
        "NAD27 / UTM zone 15N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 15N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-93],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26715\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26716, "epsg", 26716,
        "NAD27 / UTM zone 16N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 16N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-87],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26716\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26717, "epsg", 26717,
        "NAD27 / UTM zone 17N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 17N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-81],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26717\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26718, "epsg", 26718,
        "NAD27 / UTM zone 18N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 18N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-75],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26718\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26719, "epsg", 26719,
        "NAD27 / UTM zone 19N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 19N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-69],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26719\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26720, "epsg", 26720,
        "NAD27 / UTM zone 20N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 20N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-63],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26720\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26721, "epsg", 26721,
        "NAD27 / UTM zone 21N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 21N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-57],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26721\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26722, "epsg", 26722,
        "NAD27 / UTM zone 22N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 22N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-51],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26722\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26729, "epsg", 26729,
        "NAD27 / Alabama East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9996 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alabama East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30.5],PARAMETER[\"central_meridian\",-85");
    add_srs_wkt (p, 9,
        ".83333333333333],PARAMETER[\"scale_factor\",0.99996],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26729\"]]");
    p = add_epsg_def_ex (filter, first, last, 26730, "epsg", 26730,
        "NAD27 / Alabama West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=1");
    add_proj4text (p, 1,
        "52400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alabama West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30],PARAMETER[\"central_meridian\",-87.5");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.999933333],PARAMETER[\"fa");
    add_srs_wkt (p, 10,
        "lse_easting\",500000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 11,
        "IT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"26730\"]]");
    p = add_epsg_def_ex (filter, first, last, 26731, "epsg", 26731,
        "NAD27 / Alaska zone 1", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Hotine_Oblique_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=32");
    add_proj4text (p, 1,
        "3.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5");
    add_proj4text (p, 2,
        "000000.001016002 +no_uoff +gamma=323.1301023611111 +datu");
    add_proj4text (p, 3,
        "m=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 1\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Hotine_Oblique_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_center\",57],PARAMETER[\"longitude_of_center");
    add_srs_wkt (p, 9,
        "\",-133.6666666666667],PARAMETER[\"azimuth\",323.1301023");
    add_srs_wkt (p, 10,
        "611111],PARAMETER[\"rectified_grid_angle\",323.130102361");
    add_srs_wkt (p, 11,
        "1111],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",16404166.67],PARAMETER[\"false_northing\",-");
    add_srs_wkt (p, 13,
        "16404166.67],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26731\"]]");
    p = add_epsg_def_ex (filter, first, last, 26732, "epsg", 26732,
        "NAD27 / Alaska zone 2", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 2\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-14");
    add_srs_wkt (p, 9,
        "2],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26732\"]]");
    p = add_epsg_def_ex (filter, first, last, 26733, "epsg", 26733,
        "NAD27 / Alaska zone 3", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 3\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-14");
    add_srs_wkt (p, 9,
        "6],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26733\"]]");
    p = add_epsg_def_ex (filter, first, last, 26734, "epsg", 26734,
        "NAD27 / Alaska zone 4", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 4\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-15");
    add_srs_wkt (p, 9,
        "0],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26734\"]]");
    p = add_epsg_def_ex (filter, first, last, 26735, "epsg", 26735,
        "NAD27 / Alaska zone 5", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 5\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-15");
    add_srs_wkt (p, 9,
        "4],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26735\"]]");
    p = add_epsg_def_ex (filter, first, last, 26736, "epsg", 26736,
        "NAD27 / Alaska zone 6", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 6\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-15");
    add_srs_wkt (p, 9,
        "8],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26736\"]]");
    p = add_epsg_def_ex (filter, first, last, 26737, "epsg", 26737,
        "NAD27 / Alaska zone 7", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=213360.");
    add_proj4text (p, 1,
        "4267208534 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 7\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-16");
    add_srs_wkt (p, 9,
        "2],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",700000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26737\"]]");
    p = add_epsg_def_ex (filter, first, last, 26738, "epsg", 26738,
        "NAD27 / Alaska zone 8", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 8\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-16");
    add_srs_wkt (p, 9,
        "6],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26738\"]]");
    p = add_epsg_def_ex (filter, first, last, 26739, "epsg", 26739,
        "NAD27 / Alaska zone 9", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=182880.");
    add_proj4text (p, 1,
        "3657607315 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 9\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-17");
    add_srs_wkt (p, 9,
        "0],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",600000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26739\"]]");
    p = add_epsg_def_ex (filter, first, last, 26740, "epsg", 26740,
        "NAD27 / Alaska zone 10", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333");
    add_proj4text (p, 1,
        "334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 ");
    add_proj4text (p, 2,
        "+datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 10\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",53.83333333333334],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",51.83333333333334],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",51],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-176],PARAMETER[\"false_easting\",3000000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",0],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26740\"]]");
    p = add_epsg_def_ex (filter, first, last, 26741, "epsg", 26741,
        "NAD27 / California zone I", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.3");
    add_proj4text (p, 1,
        "3333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 ");
    add_proj4text (p, 2,
        "+datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone I\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",41.66666666666666],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",40],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 10,
        "origin\",39.33333333333334],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-122],PARAMETER[\"false_easting\",2000000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26741\"]]");
    p = add_epsg_def_ex (filter, first, last, 26742, "epsg", 26742,
        "NAD27 / California zone II", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.219");
    add_proj4text (p, 2,
        "2024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone II\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",39.83333333333334],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",38.33333333333334],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",37.66666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-122],PARAMETER[\"false_easting\",2000");
    add_srs_wkt (p, 12,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"US survey fo");
    add_srs_wkt (p, 13,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 14,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26");
    add_srs_wkt (p, 15,
        "742\"]]");
    p = add_epsg_def_ex (filter, first, last, 26743, "epsg", 26743,
        "NAD27 / California zone III", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone III\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",38.43333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",37.06666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",36.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-120.5],PARAMETER[\"false_easting\",2000000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 13,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26743\"]]");
    p = add_epsg_def_ex (filter, first, last, 26744, "epsg", 26744,
        "NAD27 / California zone IV", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.3333333333333");
    add_proj4text (p, 1,
        "4 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +datum=NAD27");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone IV\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",37.25],PARAMETER[\"standa");
    add_srs_wkt (p, 9,
        "rd_parallel_2\",36],PARAMETER[\"latitude_of_origin\",35.");
    add_srs_wkt (p, 10,
        "33333333333334],PARAMETER[\"central_meridian\",-119],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",2000000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 14,
        "ORTH],AUTHORITY[\"EPSG\",\"26744\"]]");
    p = add_epsg_def_ex (filter, first, last, 26745, "epsg", 26745,
        "NAD27 / California zone V", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone V\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",35.46666666666667],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",34.03333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",33.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-118],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26745\"]]");
    p = add_epsg_def_ex (filter, first, last, 26746, "epsg", 26746,
        "NAD27 / California zone VI", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.");
    add_proj4text (p, 2,
        "2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone VI\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",33.88333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",32.78333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",32.16666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-116.25],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 12,
        "000000],PARAMETER[\"false_northing\",0],UNIT[\"US survey");
    add_srs_wkt (p, 13,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "26746\"]]");
    p = add_epsg_def_ex (filter, first, last, 26747, "epsg", 26747,
        "NAD27 / California zone VII (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666");
    add_proj4text (p, 1,
        "667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=1276106.450596901 +y_0=127079.524511049 +datum=NAD27");
    add_proj4text (p, 3,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone VII (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",34.4166666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"standard_parallel_2\",33.8666666666");
    add_srs_wkt (p, 10,
        "6667],PARAMETER[\"latitude_of_origin\",34.13333333333333");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-118.3333333333333],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_easting\",4186692.58],PARAMETER[\"false_n");
    add_srs_wkt (p, 13,
        "orthing\",416926.74],UNIT[\"US survey foot\",0.304800609");
    add_srs_wkt (p, 14,
        "6012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 15,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26747\"]]");
    p = add_epsg_def_ex (filter, first, last, 26748, "epsg", 26748,
        "NAD27 / Arizona East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arizona East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",31],PARAMETER[\"central_meridian\",-110.");
    add_srs_wkt (p, 9,
        "1666666666667],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"26748\"]]");
    p = add_epsg_def_ex (filter, first, last, 26749, "epsg", 26749,
        "NAD27 / Arizona Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arizona Central\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "111.9166666666667],PARAMETER[\"scale_factor\",0.9999],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"26749\"]]");
    p = add_epsg_def_ex (filter, first, last, 26750, "epsg", 26750,
        "NAD27 / Arizona West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0");
    add_proj4text (p, 1,
        "=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arizona West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",31],PARAMETER[\"central_meridian\",-113.");
    add_srs_wkt (p, 9,
        "75],PARAMETER[\"scale_factor\",0.999933333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26750\"]]");
    p = add_epsg_def_ex (filter, first, last, 26751, "epsg", 26751,
        "NAD27 / Arkansas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arkansas North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",36.23333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",34.93333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",34.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-92],PARAMETER[\"false_easting\",2000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 13,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26751\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26752, "epsg", 26752,
        "NAD27 / Arkansas South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arkansas South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",34.76666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",33.3],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",32.66666666666666],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-92],PARAMETER[\"false_easting\",2000000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",0],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26752\"]]");
    p = add_epsg_def_ex (filter, first, last, 26753, "epsg", 26753,
        "NAD27 / Colorado North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Colorado North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",39.71666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",40.78333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",39.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-105.5],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"267");
    add_srs_wkt (p, 15,
        "53\"]]");
    p = add_epsg_def_ex (filter, first, last, 26754, "epsg", 26754,
        "NAD27 / Colorado Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.8333333333");
    add_proj4text (p, 1,
        "3334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +datum=");
    add_proj4text (p, 2,
        "NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Colorado Central\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",39.75],PARAMETER[\"standard");
    add_srs_wkt (p, 9,
        "_parallel_2\",38.45],PARAMETER[\"latitude_of_origin\",37");
    add_srs_wkt (p, 10,
        ".83333333333334],PARAMETER[\"central_meridian\",-105.5],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",2000000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26754\"]]");
    p = add_epsg_def_ex (filter, first, last, 26755, "epsg", 26755,
        "NAD27 / Colorado South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Colorado South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",38.43333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",37.23333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",36.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-105.5],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"267");
    add_srs_wkt (p, 15,
        "55\"]]");
    p = add_epsg_def_ex (filter, first, last, 26756, "epsg", 26756,
        "NAD27 / Connecticut", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40");
    add_proj4text (p, 1,
        ".83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Connecticut\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",41.86666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",41.2],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",40.83333333333334],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "72.75],PARAMETER[\"false_easting\",600000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",0],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26756\"]]");
    p = add_epsg_def_ex (filter, first, last, 26757, "epsg", 26757,
        "NAD27 / Delaware", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999");
    add_proj4text (p, 1,
        "995 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us");
    add_proj4text (p, 2,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Delaware\",GEOGCS[\"NAD27\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],");
    add_srs_wkt (p, 7,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 8,
        "_of_origin\",38],PARAMETER[\"central_meridian\",-75.4166");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"scale_factor\",0.999995],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"26757\"]]");
    p = add_epsg_def_ex (filter, first, last, 26758, "epsg", 26758,
        "NAD27 / Florida East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Florida East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",24.33333333333333],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-81],PARAMETER[\"scale_factor\",0.999941177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"26758\"]]");
    p = add_epsg_def_ex (filter, first, last, 26759, "epsg", 26759,
        "NAD27 / Florida West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Florida West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",24.33333333333333],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-82],PARAMETER[\"scale_factor\",0.999941177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"26759\"]]");
    p = add_epsg_def_ex (filter, first, last, 26760, "epsg", 26760,
        "NAD27 / Florida North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=2");
    add_proj4text (p, 1,
        "9 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Florida North\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",30.75],PARAMETER[\"standard_p");
    add_srs_wkt (p, 9,
        "arallel_2\",29.58333333333333],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",29],PARAMETER[\"central_meridian\",-84.5],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",2000000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"26760\"]]");
    p = add_epsg_def_ex (filter, first, last, 26766, "epsg", 26766,
        "NAD27 / Georgia East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Georgia East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30],PARAMETER[\"central_meridian\",-82.1");
    add_srs_wkt (p, 9,
        "6666666666667],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"26766\"]]");
    p = add_epsg_def_ex (filter, first, last, 26767, "epsg", 26767,
        "NAD27 / Georgia West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Georgia West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30],PARAMETER[\"central_meridian\",-84.1");
    add_srs_wkt (p, 9,
        "6666666666667],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"26767\"]]");
    p = add_epsg_def_ex (filter, first, last, 26768, "epsg", 26768,
        "NAD27 / Idaho East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Idaho East\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",41.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-112.1666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999947368],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 12,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26768\"]]");
    p = add_epsg_def_ex (filter, first, last, 26769, "epsg", 26769,
        "NAD27 / Idaho Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.99");
    add_proj4text (p, 1,
        "99473679999999 +x_0=152400.3048006096 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Idaho Central\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",41.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-114],PARAMETER[\"scale_factor\",0.999947368");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"US survey foot\",0.3048006096012192");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26769\"]]");
    p = add_epsg_def_ex (filter, first, last, 26770, "epsg", 26770,
        "NAD27 / Idaho West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +u");
    add_proj4text (p, 2,
        "nits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Idaho West\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",41.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-115.75],PARAMETER[\"scale_factor\",0.999933333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"US survey foot\",0.3048006096012192");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26770\"]]");
    p = add_epsg_def_ex (filter, first, last, 26771, "epsg", 26771,
        "NAD27 / Illinois East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=152400.3048006096 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Illinois East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-88.33333333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999975],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 12,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26771\"]]");
    p = add_epsg_def_ex (filter, first, last, 26772, "epsg", 26772,
        "NAD27 / Illinois West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Illinois West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-90.16666666666667],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999941177],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"US survey foot\",0.30");
    add_srs_wkt (p, 12,
        "48006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26772\"]]");
    p = add_epsg_def_ex (filter, first, last, 26773, "epsg", 26773,
        "NAD27 / Indiana East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Indiana East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",37.5],PARAMETER[\"central_meridian\",-85");
    add_srs_wkt (p, 9,
        ".66666666666667],PARAMETER[\"scale_factor\",0.999966667]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26773\"]]");
    p = add_epsg_def_ex (filter, first, last, 26774, "epsg", 26774,
        "NAD27 / Indiana West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Indiana West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",37.5],PARAMETER[\"central_meridian\",-87");
    add_srs_wkt (p, 9,
        ".08333333333333],PARAMETER[\"scale_factor\",0.999966667]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26774\"]]");
}

#endif /* full EPSG initialization enabled/disabled */



















































































































































































































































































Changes to src/srsinit/epsg_inlined_38.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837






































































































































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_38 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 7763, "epsg", 7763,
        "WGS 84 / Himachal Pradesh", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.75 +lat_2=32.75 +lat_0=31.75183497 +");
    add_proj4text (p, 1,
        "lon_0=77.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Himachal Pradesh\",GEOGCS[\"WGS 84\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223");
    add_srs_wkt (p, 2,
        "563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 3,
        "326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 4,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 6,
        ",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lamber");
    add_srs_wkt (p, 7,
        "t_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1");
    add_srs_wkt (p, 8,
        "\",30.75],PARAMETER[\"standard_parallel_2\",32.75],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",31.75183497],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",77.375],PARAMETER[\"false_easting\",1000");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",1000000],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7763\"]]");
    p = add_epsg_def_ex (filter, first, last, 7764, "epsg", 7764,
        "WGS 84 / Jammu and Kashmir", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.08333333333334 +lat_2=36.41666666666");
    add_proj4text (p, 1,
        "666 +lat_0=34.75570874 +lon_0=76.5 +x_0=1000000 +y_0=100");
    add_proj4text (p, 2,
        "0000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Jammu and Kashmir\",GEOGCS[\"WGS 84\",");
    add_srs_wkt (p, 1,
        "DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.25722");
    add_srs_wkt (p, 2,
        "3563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lamb");
    add_srs_wkt (p, 7,
        "ert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 8,
        "_1\",33.08333333333334],PARAMETER[\"standard_parallel_2\"");
    add_srs_wkt (p, 9,
        ",36.41666666666666],PARAMETER[\"latitude_of_origin\",34.");
    add_srs_wkt (p, 10,
        "75570874],PARAMETER[\"central_meridian\",76.5],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",1000000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",1000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "7764\"]]");
    p = add_epsg_def_ex (filter, first, last, 7765, "epsg", 7765,
        "WGS 84 / Jharkhand", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=22.54166666666667 +lat_2=24.70833333333");
    add_proj4text (p, 1,
        "333 +lat_0=23.62652682 +lon_0=85.625 +x_0=1000000 +y_0=1");
    add_proj4text (p, 2,
        "000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Jharkhand\",GEOGCS[\"WGS 84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 7,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",22.");
    add_srs_wkt (p, 8,
        "54166666666667],PARAMETER[\"standard_parallel_2\",24.708");
    add_srs_wkt (p, 9,
        "33333333333],PARAMETER[\"latitude_of_origin\",23.6265268");
    add_srs_wkt (p, 10,
        "2],PARAMETER[\"central_meridian\",85.625],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",1000000],PARAMETER[\"false_northing\",1000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7765");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 7766, "epsg", 7766,
        "WGS 84 / Madhya Pradesh", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=22 +lat_2=26 +lat_0=24.00529821 +lon_0=");
    add_proj4text (p, 1,
        "78.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Madhya Pradesh\",GEOGCS[\"WGS 84\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.25722356");
    add_srs_wkt (p, 2,
        "3,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"632");
    add_srs_wkt (p, 3,
        "6\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
        "EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 7,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 8,
        ",22],PARAMETER[\"standard_parallel_2\",26],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",24.00529821],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",78.375],PARAMETER[\"false_easting\",1000000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"7766\"]]");
    p = add_epsg_def_ex (filter, first, last, 7767, "epsg", 7767,
        "WGS 84 / Maharashtra", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=16.625 +lat_2=21.125 +lat_0=18.88015774");
    add_proj4text (p, 1,
        " +lon_0=76.75 +x_0=1000000 +y_0=1000000 +datum=WGS84 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Maharashtra\",GEOGCS[\"WGS 84\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 7,
        "nformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",1");
    add_srs_wkt (p, 8,
        "6.625],PARAMETER[\"standard_parallel_2\",21.125],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"latitude_of_origin\",18.88015774],PARAMETER[\"centr");
    add_srs_wkt (p, 10,
        "al_meridian\",76.75],PARAMETER[\"false_easting\",1000000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",1000000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"7767\"]]");
    p = add_epsg_def_ex (filter, first, last, 7768, "epsg", 7768,
        "WGS 84 / Manipur", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=24.08333333333333 +lat_2=25.41666666666");
    add_proj4text (p, 1,
        "667 +lat_0=24.75060911 +lon_0=94 +x_0=1000000 +y_0=10000");
    add_proj4text (p, 2,
        "00 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Manipur\",GEOGCS[\"WGS 84\",DATUM[\"WG");
    add_srs_wkt (p, 1,
        "S_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 7,
        "mal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",24.08");
    add_srs_wkt (p, 8,
        "333333333333],PARAMETER[\"standard_parallel_2\",25.41666");
    add_srs_wkt (p, 9,
        "666666667],PARAMETER[\"latitude_of_origin\",24.75060911]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"central_meridian\",94],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",1000000],PARAMETER[\"false_northing\",1000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7768\"]]");
    p = add_epsg_def_ex (filter, first, last, 7769, "epsg", 7769,
        "WGS 84 / Meghalaya", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=25.20833333333333 +lat_2=26.04166666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.62524747 +lon_0=91.375 +x_0=1000000 +y_0=1");
    add_proj4text (p, 2,
        "000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Meghalaya\",GEOGCS[\"WGS 84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 7,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",25.");
    add_srs_wkt (p, 8,
        "20833333333333],PARAMETER[\"standard_parallel_2\",26.041");
    add_srs_wkt (p, 9,
        "66666666667],PARAMETER[\"latitude_of_origin\",25.6252474");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"central_meridian\",91.375],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",1000000],PARAMETER[\"false_northing\",1000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7769");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 7770, "epsg", 7770,
        "WGS 84 / Nagaland", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=25.375 +lat_2=26.875 +lat_0=26.12581974");
    add_proj4text (p, 1,
        " +lon_0=94.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Nagaland\",GEOGCS[\"WGS 84\",DATUM[\"W");
    add_srs_wkt (p, 1,
        "GS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Confo");
    add_srs_wkt (p, 7,
        "rmal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",25.3");
    add_srs_wkt (p, 8,
        "75],PARAMETER[\"standard_parallel_2\",26.875],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"latitude_of_origin\",26.12581974],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",94.375],PARAMETER[\"false_easting\",1000000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"7770\"]]");
    p = add_epsg_def_ex (filter, first, last, 7771, "epsg", 7771,
        "WGS 84 / India Northeast", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=23.04166666666667 +lat_2=28.20833333333");
    add_proj4text (p, 1,
        "333 +lat_0=25.63452135 +lon_0=93.5 +x_0=1000000 +y_0=100");
    add_proj4text (p, 2,
        "0000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / India Northeast\",GEOGCS[\"WGS 84\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2572235");
    add_srs_wkt (p, 2,
        "63,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 3,
        "26\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 4,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 6,
        "EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert");
    add_srs_wkt (p, 7,
        "_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 8,
        ",23.04166666666667],PARAMETER[\"standard_parallel_2\",28");
    add_srs_wkt (p, 9,
        ".20833333333333],PARAMETER[\"latitude_of_origin\",25.634");
    add_srs_wkt (p, 10,
        "52135],PARAMETER[\"central_meridian\",93.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",1000000],PARAMETER[\"false_northing\",10");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"77");
    add_srs_wkt (p, 14,
        "71\"]]");
    p = add_epsg_def_ex (filter, first, last, 7772, "epsg", 7772,
        "WGS 84 / Orissa", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18.58333333333333 +lat_2=21.91666666666");
    add_proj4text (p, 1,
        "667 +lat_0=20.25305174 +lon_0=84.375 +x_0=1000000 +y_0=1");
    add_proj4text (p, 2,
        "000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Orissa\",GEOGCS[\"WGS 84\",DATUM[\"WGS");
    add_srs_wkt (p, 1,
        "_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 7,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",18.5833");
    add_srs_wkt (p, 8,
        "3333333333],PARAMETER[\"standard_parallel_2\",21.9166666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"latitude_of_origin\",20.25305174],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"central_meridian\",84.375],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",1000000],PARAMETER[\"false_northing\",1000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7772\"]]");
    p = add_epsg_def_ex (filter, first, last, 7773, "epsg", 7773,
        "WGS 84 / Punjab", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30 +lat_2=32 +lat_0=31.00178226 +lon_0=");
    add_proj4text (p, 1,
        "75.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Punjab\",GEOGCS[\"WGS 84\",DATUM[\"WGS");
    add_srs_wkt (p, 1,
        "_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 7,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",30],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_2\",32],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",31.00178226],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "75.375],PARAMETER[\"false_easting\",1000000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",1000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"7773\"]]");
    p = add_epsg_def_ex (filter, first, last, 7774, "epsg", 7774,
        "WGS 84 / Rajasthan", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=24.29166666666667 +lat_2=29.45833333333");
    add_proj4text (p, 1,
        "333 +lat_0=26.88505546 +lon_0=73.875 +x_0=1000000 +y_0=1");
    add_proj4text (p, 2,
        "000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Rajasthan\",GEOGCS[\"WGS 84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Conf");
    add_srs_wkt (p, 7,
        "ormal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",24.");
    add_srs_wkt (p, 8,
        "29166666666667],PARAMETER[\"standard_parallel_2\",29.458");
    add_srs_wkt (p, 9,
        "33333333333],PARAMETER[\"latitude_of_origin\",26.8850554");
    add_srs_wkt (p, 10,
        "6],PARAMETER[\"central_meridian\",73.875],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",1000000],PARAMETER[\"false_northing\",1000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"7774");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 7775, "epsg", 7775,
        "WGS 84 / Uttar Pradesh", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=24.875 +lat_2=29.375 +lat_0=27.13270823");
    add_proj4text (p, 1,
        " +lon_0=80.875 +x_0=1000000 +y_0=1000000 +datum=WGS84 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Uttar Pradesh\",GEOGCS[\"WGS 84\",DATU");
    add_srs_wkt (p, 1,
        "M[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326");
    add_srs_wkt (p, 3,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 4,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 6,
        "AST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 7,
        "Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\"");
    add_srs_wkt (p, 8,
        ",24.875],PARAMETER[\"standard_parallel_2\",29.375],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",27.13270823],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",80.875],PARAMETER[\"false_easting\",1000");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",1000000],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7775\"]]");
    p = add_epsg_def_ex (filter, first, last, 7776, "epsg", 7776,
        "WGS 84 / Uttaranchal", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=29 +lat_2=31 +lat_0=30.0017132 +lon_0=7");
    add_proj4text (p, 1,
        "9.375 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Uttaranchal\",GEOGCS[\"WGS 84\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 7,
        "nformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",2");
    add_srs_wkt (p, 8,
        "9],PARAMETER[\"standard_parallel_2\",31],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",30.0017132],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",79.375],PARAMETER[\"false_easting\",1000000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"7776\"]]");
    p = add_epsg_def_ex (filter, first, last, 7777, "epsg", 7777,
        "WGS 84 / Andaman and Nicobar", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=10.25 +lon_0=93.25 +k=0.9999428 +x_0=");
    add_proj4text (p, 1,
        "1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Andaman and Nicobar\",GEOGCS[\"WGS 84\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.2572");
    add_srs_wkt (p, 2,
        "23563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 4,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 6,
        "\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 7,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",10.2");
    add_srs_wkt (p, 8,
        "5],PARAMETER[\"central_meridian\",93.25],PARAMETER[\"sca");
    add_srs_wkt (p, 9,
        "le_factor\",0.9999428],PARAMETER[\"false_easting\",10000");
    add_srs_wkt (p, 10,
        "00],PARAMETER[\"false_northing\",1000000],UNIT[\"metre\"");
    add_srs_wkt (p, 11,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 12,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"7777\"]]");
    p = add_epsg_def_ex (filter, first, last, 7778, "epsg", 7778,
        "WGS 84 / Chhattisgarh", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21 +lon_0=82.25 +k=0.9998332 +x_0=100");
    add_proj4text (p, 1,
        "0000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Chhattisgarh\",GEOGCS[\"WGS 84\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 7,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",21],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"central_meridian\",82.25],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 9,
        "\",0.9998332],PARAMETER[\"false_easting\",1000000],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 11,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 12,
        "H],AUTHORITY[\"EPSG\",\"7778\"]]");
    p = add_epsg_def_ex (filter, first, last, 7779, "epsg", 7779,
        "WGS 84 / Goa", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=15.375 +lon_0=74 +k=0.9999913 +x_0=10");
    add_proj4text (p, 1,
        "00000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Goa\",GEOGCS[\"WGS 84\",DATUM[\"WGS_19");
    add_srs_wkt (p, 1,
        "84\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY");
    add_srs_wkt (p, 2,
        "[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIME");
    add_srs_wkt (p, 3,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 4,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 5,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 6,
        "RITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 7,
        "r\"],PARAMETER[\"latitude_of_origin\",15.375],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"central_meridian\",74],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 9,
        "99913],PARAMETER[\"false_easting\",1000000],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_northing\",1000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 11,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"7779\"]]");
    p = add_epsg_def_ex (filter, first, last, 7780, "epsg", 7780,
        "WGS 84 / Karnataka", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=15.125 +lon_0=76.375 +k=0.99980119999");
    add_proj4text (p, 1,
        "99999 +x_0=1000000 +y_0=1000000 +datum=WGS84 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Karnataka\",GEOGCS[\"WGS 84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 7,
        "ercator\"],PARAMETER[\"latitude_of_origin\",15.125],PARA");
    add_srs_wkt (p, 8,
        "METER[\"central_meridian\",76.375],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 9,
        "tor\",0.9998012],PARAMETER[\"false_easting\",1000000],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 11,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 12,
        "ORTH],AUTHORITY[\"EPSG\",\"7780\"]]");
    p = add_epsg_def_ex (filter, first, last, 7781, "epsg", 7781,
        "WGS 84 / Kerala", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=10.5 +lon_0=76 +k=0.9999177 +x_0=1000");
    add_proj4text (p, 1,
        "000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Kerala\",GEOGCS[\"WGS 84\",DATUM[\"WGS");
    add_srs_wkt (p, 1,
        "_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 7,
        "tor\"],PARAMETER[\"latitude_of_origin\",10.5],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"central_meridian\",76],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 9,
        "99177],PARAMETER[\"false_easting\",1000000],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_northing\",1000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 11,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"7781\"]]");
    p = add_epsg_def_ex (filter, first, last, 7782, "epsg", 7782,
        "WGS 84 / Lakshadweep", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=10 +lon_0=73.125 +k=0.9999536 +x_0=10");
    add_proj4text (p, 1,
        "00000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Lakshadweep\",GEOGCS[\"WGS 84\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 7,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",10],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"central_meridian\",73.125],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 9,
        "r\",0.9999536],PARAMETER[\"false_easting\",1000000],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 11,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 12,
        "TH],AUTHORITY[\"EPSG\",\"7782\"]]");
    p = add_epsg_def_ex (filter, first, last, 7783, "epsg", 7783,
        "WGS 84 / Mizoram", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=23.125 +lon_0=92.75 +k=0.9999821 +x_0");
    add_proj4text (p, 1,
        "=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Mizoram\",GEOGCS[\"WGS 84\",DATUM[\"WG");
    add_srs_wkt (p, 1,
        "S_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 7,
        "cator\"],PARAMETER[\"latitude_of_origin\",23.125],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"central_meridian\",92.75],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 9,
        "\",0.9999821],PARAMETER[\"false_easting\",1000000],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 11,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 12,
        "H],AUTHORITY[\"EPSG\",\"7783\"]]");
    p = add_epsg_def_ex (filter, first, last, 7784, "epsg", 7784,
        "WGS 84 / Sikkim", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=27.625 +lon_0=88.5 +k=0.9999926 +x_0=");
    add_proj4text (p, 1,
        "1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Sikkim\",GEOGCS[\"WGS 84\",DATUM[\"WGS");
    add_srs_wkt (p, 1,
        "_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHOR");
    add_srs_wkt (p, 2,
        "ITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PR");
    add_srs_wkt (p, 3,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 4,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 5,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 7,
        "tor\"],PARAMETER[\"latitude_of_origin\",27.625],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"central_meridian\",88.5],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 9,
        "0.9999926],PARAMETER[\"false_easting\",1000000],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"7784\"]]");
    p = add_epsg_def_ex (filter, first, last, 7785, "epsg", 7785,
        "WGS 84 / Tamil Nadu", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=10.875 +lon_0=78.375 +k=0.9997942 +x_");
    add_proj4text (p, 1,
        "0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Tamil Nadu\",GEOGCS[\"WGS 84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]]");
    add_srs_wkt (p, 3,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 4,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 5,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 7,
        "ercator\"],PARAMETER[\"latitude_of_origin\",10.875],PARA");
    add_srs_wkt (p, 8,
        "METER[\"central_meridian\",78.375],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 9,
        "tor\",0.9997942],PARAMETER[\"false_easting\",1000000],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 11,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 12,
        "ORTH],AUTHORITY[\"EPSG\",\"7785\"]]");
    p = add_epsg_def_ex (filter, first, last, 7786, "epsg", 7786,
        "WGS 84 / Tripura", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=23.75 +lon_0=91.75 +k=0.9999822 +x_0=");
    add_proj4text (p, 1,
        "1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / Tripura\",GEOGCS[\"WGS 84\",DATUM[\"WG");
    add_srs_wkt (p, 1,
        "S_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHO");
    add_srs_wkt (p, 2,
        "RITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],P");
    add_srs_wkt (p, 3,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 4,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 5,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 7,
        "cator\"],PARAMETER[\"latitude_of_origin\",23.75],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"central_meridian\",91.75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 9,
        ",0.9999822],PARAMETER[\"false_easting\",1000000],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_northing\",1000000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 11,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"7786\"]]");
    p = add_epsg_def_ex (filter, first, last, 7787, "epsg", 7787,
        "WGS 84 / West Bengal", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.375 +lon_0=87.875 +k=0.9998584 +x_");
    add_proj4text (p, 1,
        "0=1000000 +y_0=1000000 +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / West Bengal\",GEOGCS[\"WGS 84\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 7,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",24.375],PA");
    add_srs_wkt (p, 8,
        "RAMETER[\"central_meridian\",87.875],PARAMETER[\"scale_f");
    add_srs_wkt (p, 9,
        "actor\",0.9998584],PARAMETER[\"false_easting\",1000000],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 11,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",NORTH],AUTHORITY[\"EPSG\",\"7787\"]]");
    p = add_epsg_def_ex (filter, first, last, 7791, "epsg", 7791,
        "RDN2008 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / UTM zone 32N\",GEOGCS[\"RDN2008\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"7791\"]]");
    p = add_epsg_def_ex (filter, first, last, 7792, "epsg", 7792,
        "RDN2008 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / UTM zone 33N\",GEOGCS[\"RDN2008\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",15],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"7792\"]]");
    p = add_epsg_def_ex (filter, first, last, 7793, "epsg", 7793,
        "RDN2008 / UTM zone 34N", 0, 0,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / UTM zone 34N\",GEOGCS[\"RDN2008\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",21],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"7793\"]]");
    p = add_epsg_def_ex (filter, first, last, 7794, "epsg", 7794,
        "RDN2008 / Italy zone (E-N)", 0, 0,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9985000000000001 +x_");
    add_proj4text (p, 1,
        "0=7000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / Italy zone (E-N)\",GEOGCS[\"RDN2008\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1");
    add_srs_wkt (p, 2,
        "980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",12],PARAMETER[\"scale_factor\",0.9985");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",7000000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 12,
        "1\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"7794\"]]");
    p = add_epsg_def_ex (filter, first, last, 7795, "epsg", 7795,
        "RDN2008 / Zone 12 (E-N)", 0, 0,
        "GRS 1980", "Greenwich",
        "Rete_Dinamica_Nazionale_2008", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=3000000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RDN2008 / Zone 12 (E-N)\",GEOGCS[\"RDN2008\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Rete_Dinamica_Nazionale_2008\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"1132\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"6706\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",12],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",3000000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"7795\"]]");
    p = add_epsg_def_ex (filter, first, last, 7798, "epsg", 7798,
        "BGS2005", 1, 1,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"BGS2005\",DATUM[\"Bulgaria_Geodetic_System_2005");
    add_srs_wkt (p, 1,
        "\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY");
    add_srs_wkt (p, 2,
        "[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1167\"]],PRIME");
    add_srs_wkt (p, 3,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 4,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 5,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 6,
        "RITY[\"EPSG\",\"7798\"]]");
    p = add_epsg_def_ex (filter, first, last, 7799, "epsg", 7799,
        "BGS2005 / UTM zone 34N (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"BGS2005 / UTM zone 34N (N-E)\",GEOGCS[\"BGS2005");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Bulgaria_Geodetic_System_2005\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"1167\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "7798\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",2");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH");
    add_srs_wkt (p, 12,
        "],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"7799\"]]");
    p = add_epsg_def_ex (filter, first, last, 7800, "epsg", 7800,
        "BGS2005 / UTM zone 35N (N-E)", 0, 1,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"BGS2005 / UTM zone 35N (N-E)\",GEOGCS[\"BGS2005");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Bulgaria_Geodetic_System_2005\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"1167\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "7798\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",2");
    add_srs_wkt (p, 9,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH");
    add_srs_wkt (p, 12,
        "],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"7800\"]]");
    p = add_epsg_def_ex (filter, first, last, 7801, "epsg", 7801,
        "BGS2005 / CCS2005", 0, 1,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "Lambert_Conformal_Conic_2SP", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42 +lat_2=43.33333333333334 +lat_0=42.6");
    add_proj4text (p, 1,
        "6787568333333 +lon_0=25.5 +x_0=500000 +y_0=4725824.3591 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"BGS2005 / CCS2005\",GEOGCS[\"BGS2005\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Bulgaria_Geodetic_System_2005\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"1167\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 6,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7798\"]],PR");
    add_srs_wkt (p, 7,
        "OJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"st");
    add_srs_wkt (p, 8,
        "andard_parallel_1\",42],PARAMETER[\"standard_parallel_2\"");
    add_srs_wkt (p, 9,
        ",43.33333333333334],PARAMETER[\"latitude_of_origin\",42.");
    add_srs_wkt (p, 10,
        "66787568333333],PARAMETER[\"central_meridian\",25.5],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",4725824.3591],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"7801\"]]");
    p = add_epsg_def_ex (filter, first, last, 7803, "epsg", 7803,
        "BGS2005 / UTM zone 34N", 0, 0,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"BGS2005 / UTM zone 34N\",GEOGCS[\"BGS2005\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Bulgaria_Geodetic_System_2005\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"1167\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7798\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",21],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7803\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7804, "epsg", 7804,
        "BGS2005 / UTM zone 35N", 0, 0,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"BGS2005 / UTM zone 35N\",GEOGCS[\"BGS2005\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Bulgaria_Geodetic_System_2005\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"1167\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7798\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",21],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7804\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7805, "epsg", 7805,
        "BGS2005 / UTM zone 36N", 0, 0,
        "GRS 1980", "Greenwich",
        "Bulgaria_Geodetic_System_2005", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"BGS2005 / UTM zone 36N\",GEOGCS[\"BGS2005\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Bulgaria_Geodetic_System_2005\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"1167\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7798\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",33],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7805\"]");
    add_srs_wkt (p, 13,
        "]");
    p = add_epsg_def_ex (filter, first, last, 7825, "epsg", 7825,
        "Pulkovo 1942 / CS63 zone X1", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=23.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=1300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X1\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",23.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",1300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7825\"]]");
    p = add_epsg_def_ex (filter, first, last, 7826, "epsg", 7826,
        "Pulkovo 1942 / CS63 zone X2", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=26.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=2300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X2\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",26.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7826\"]]");
    p = add_epsg_def_ex (filter, first, last, 7827, "epsg", 7827,
        "Pulkovo 1942 / CS63 zone X3", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=29.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=3300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X3\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",29.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",3300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7827\"]]");
    p = add_epsg_def_ex (filter, first, last, 7828, "epsg", 7828,
        "Pulkovo 1942 / CS63 zone X4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=32.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=4300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X4\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",32.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",4300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7828\"]]");
    p = add_epsg_def_ex (filter, first, last, 7829, "epsg", 7829,
        "Pulkovo 1942 / CS63 zone X5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=35.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=5300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X5\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",35.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",5300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7829\"]]");
    p = add_epsg_def_ex (filter, first, last, 7830, "epsg", 7830,
        "Pulkovo 1942 / CS63 zone X6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=38.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=6300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X6\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",38.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",6300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7830\"]]");
    p = add_epsg_def_ex (filter, first, last, 7831, "epsg", 7831,
        "Pulkovo 1942 / CS63 zone X7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0.08333333333333333 +lon_0=41.5 +k=1 ");
    add_proj4text (p, 1,
        "+x_0=7300000 +y_0=0 +ellps=krass +towgs84=23.92,-141.27,");
    add_proj4text (p, 2,
        "-80.9,0,0.35,0.82,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / CS63 zone X7\",GEOGCS[\"Pulkovo ");
    add_srs_wkt (p, 1,
        "1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassowsky 1940");
    add_srs_wkt (p, 2,
        "\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[2");
    add_srs_wkt (p, 3,
        "3.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        ".08333333333333333],PARAMETER[\"central_meridian\",41.5]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",7300000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"7831\"]]");
    p = add_epsg_def_ex (filter, first, last, 7844, "epsg", 7844,
        "GDA2020", 1, 1,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"GDA2020\",DATUM[\"Geocentric_Datum_of_Australia");
    add_srs_wkt (p, 1,
        "_2020\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"1168\"]],");
    add_srs_wkt (p, 3,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 4,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 5,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"7844\"]]");
    p = add_epsg_def_ex (filter, first, last, 7845, "epsg", 7845,
        "GDA2020 / GA LCC", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=134 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / GA LCC\",GEOGCS[\"GDA2020\",DATUM[\"G");
    add_srs_wkt (p, 1,
        "eocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 5,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 6,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7844\"]]");
    add_srs_wkt (p, 7,
        ",PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "standard_parallel_1\",-18],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 9,
        "_2\",-36],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",134],PARAMETER[\"false_easting\",0]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"7845\"]]");
    p = add_epsg_def_ex (filter, first, last, 7846, "epsg", 7846,
        "GDA2020 / MGA zone 46", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 46\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",93");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"7846\"]]");
    p = add_epsg_def_ex (filter, first, last, 7847, "epsg", 7847,
        "GDA2020 / MGA zone 47", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 47\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",99");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"7847\"]]");
    p = add_epsg_def_ex (filter, first, last, 7848, "epsg", 7848,
        "GDA2020 / MGA zone 48", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 48\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",10");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7848\"]]");
    p = add_epsg_def_ex (filter, first, last, 7849, "epsg", 7849,
        "GDA2020 / MGA zone 49", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 49\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",11");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7849\"]]");
    p = add_epsg_def_ex (filter, first, last, 7850, "epsg", 7850,
        "GDA2020 / MGA zone 50", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 50\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",11");
    add_srs_wkt (p, 9,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7850\"]]");
    p = add_epsg_def_ex (filter, first, last, 7851, "epsg", 7851,
        "GDA2020 / MGA zone 51", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 51\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",12");
    add_srs_wkt (p, 9,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7851\"]]");
    p = add_epsg_def_ex (filter, first, last, 7852, "epsg", 7852,
        "GDA2020 / MGA zone 52", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 52\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",12");
    add_srs_wkt (p, 9,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7852\"]]");
    p = add_epsg_def_ex (filter, first, last, 7853, "epsg", 7853,
        "GDA2020 / MGA zone 53", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 53\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",13");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7853\"]]");
    p = add_epsg_def_ex (filter, first, last, 7854, "epsg", 7854,
        "GDA2020 / MGA zone 54", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 54\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",14");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7854\"]]");
    p = add_epsg_def_ex (filter, first, last, 7855, "epsg", 7855,
        "GDA2020 / MGA zone 55", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 55\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",14");
    add_srs_wkt (p, 9,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7855\"]]");
    p = add_epsg_def_ex (filter, first, last, 7856, "epsg", 7856,
        "GDA2020 / MGA zone 56", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 56\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",15");
    add_srs_wkt (p, 9,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7856\"]]");
    p = add_epsg_def_ex (filter, first, last, 7857, "epsg", 7857,
        "GDA2020 / MGA zone 57", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 57\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",15");
    add_srs_wkt (p, 9,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7857\"]]");
    p = add_epsg_def_ex (filter, first, last, 7858, "epsg", 7858,
        "GDA2020 / MGA zone 58", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 58\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",16");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7858\"]]");
    p = add_epsg_def_ex (filter, first, last, 7859, "epsg", 7859,
        "GDA2020 / MGA zone 59", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / MGA zone 59\",GEOGCS[\"GDA2020\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"78");
    add_srs_wkt (p, 7,
        "44\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",17");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"7859\"]]");
    p = add_epsg_def_ex (filter, first, last, 7877, "epsg", 7877,
        "Astro DOS 71 / SHLG71", 0, 0,
        "International 1924", "Greenwich",
        "Astro_DOS_71", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-15.96666666666667 +lon_0=-5.71666666");
    add_proj4text (p, 1,
        "6666667 +k=1 +x_0=300000 +y_0=2000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=-320,550,-494,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Astro DOS 71 / SHLG71\",GEOGCS[\"Astro DOS 71\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Astro_DOS_71\",SPHEROID[\"International 1924\",");
    add_srs_wkt (p, 2,
        "6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-320,5");
    add_srs_wkt (p, 3,
        "50,-494,0,0,0,0],AUTHORITY[\"EPSG\",\"6710\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4710\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",-15.96666666666667],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-5.716666666666667],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",30000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",2000000],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7877\"]]");
    p = add_epsg_def_ex (filter, first, last, 7878, "epsg", 7878,
        "Astro DOS 71 / UTM zone 30S", 0, 0,
        "International 1924", "Greenwich",
        "Astro_DOS_71", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=intl +towgs84=-320,550,");
    add_proj4text (p, 1,
        "-494,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Astro DOS 71 / UTM zone 30S\",GEOGCS[\"Astro DO");
    add_srs_wkt (p, 1,
        "S 71\",DATUM[\"Astro_DOS_71\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-320,550,-494,0,0,0,0],AUTHORITY[\"EPSG\",\"6710\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4710\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-3],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"7878\"]]");
    p = add_epsg_def_ex (filter, first, last, 7881, "epsg", 7881,
        "St. Helena Tritan", 1, 1,
        "WGS 84", "Greenwich",
        "St_Helena_Tritan", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=WGS84 +towgs84=-0.077,0.079,0.086,0");
    add_proj4text (p, 1,
        ",0,0,0 +no_defs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"St. Helena Tritan\",DATUM[\"St_Helena_Tritan\",");
    add_srs_wkt (p, 1,
        "SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EP");
    add_srs_wkt (p, 2,
        "SG\",\"7030\"]],TOWGS84[-0.077,0.079,0.086,0,0,0,0],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"1173\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7881\"]]");
    p = add_epsg_def_ex (filter, first, last, 7882, "epsg", 7882,
        "St. Helena Tritan / SHLG(Tritan)", 0, 0,
        "WGS 84", "Greenwich",
        "St_Helena_Tritan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-15.96666666666667 +lon_0=-5.71666666");
    add_proj4text (p, 1,
        "6666667 +k=1 +x_0=299483.737 +y_0=2000527.879 +ellps=WGS");
    add_proj4text (p, 2,
        "84 +towgs84=-0.077,0.079,0.086,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"St. Helena Tritan / SHLG(Tritan)\",GEOGCS[\"St.");
    add_srs_wkt (p, 1,
        " Helena Tritan\",DATUM[\"St_Helena_Tritan\",SPHEROID[\"W");
    add_srs_wkt (p, 2,
        "GS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-0.077,0.079,0.086,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1173\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"7881\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",-");
    add_srs_wkt (p, 9,
        "15.96666666666667],PARAMETER[\"central_meridian\",-5.716");
    add_srs_wkt (p, 10,
        "666666666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",299483.737],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",2000527.879],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"7882\"]]");
    p = add_epsg_def_ex (filter, first, last, 7883, "epsg", 7883,
        "St. Helena Tritan / UTM zone 30S", 0, 0,
        "WGS 84", "Greenwich",
        "St_Helena_Tritan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=WGS84 +towgs84=-0.077,0");
    add_proj4text (p, 1,
        ".079,0.086,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"St. Helena Tritan / UTM zone 30S\",GEOGCS[\"St.");
    add_srs_wkt (p, 1,
        " Helena Tritan\",DATUM[\"St_Helena_Tritan\",SPHEROID[\"W");
    add_srs_wkt (p, 2,
        "GS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-0.077,0.079,0.086,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"1173\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"7881\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-3],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"7883\"]]");
    p = add_epsg_def_ex (filter, first, last, 7886, "epsg", 7886,
        "SHGD2015", 1, 1,
        "GRS 1980", "Greenwich",
        "St_Helena_Geodetic_Datum_2015", "none", "degree",
        "Latitude", "North", "Longitude", "East");
    add_proj4text (p, 0,
        "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_de");
    add_proj4text (p, 1,
        "fs");
    add_srs_wkt (p, 0,
        "GEOGCS[\"SHGD2015\",DATUM[\"St_Helena_Geodetic_Datum_201");
    add_srs_wkt (p, 1,
        "5\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"1174\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 6,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"7886\"]]");
    p = add_epsg_def_ex (filter, first, last, 7887, "epsg", 7887,
        "SHMG2015", 0, 0,
        "GRS 1980", "Greenwich",
        "St_Helena_Geodetic_Datum_2015", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SHMG2015\",GEOGCS[\"SHGD2015\",DATUM[\"St_Helen");
    add_srs_wkt (p, 1,
        "a_Geodetic_Datum_2015\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"1174\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"7886\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 9,
        "\",-3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"fa");
    add_srs_wkt (p, 10,
        "lse_easting\",500000],PARAMETER[\"false_northing\",10000");
    add_srs_wkt (p, 11,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 12,
        "[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"7887\"]]");
    p = add_epsg_def_ex (filter, first, last, 7899, "epsg", 7899,
        "GDA2020 / Vicgrid", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_2020", "Lambert_Conformal_Conic_2SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=-36 +lat_2=-38 +lat_0=-37 +lon_0=145 +x");
    add_proj4text (p, 1,
        "_0=2500000 +y_0=2500000 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA2020 / Vicgrid\",GEOGCS[\"GDA2020\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_2020\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"1168\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7844\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",-36],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_2\",-38],PARAMETER[\"latitude_of_origin\",-37],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"central_meridian\",145],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2500000],PARAMETER[\"false_northing\",2500000],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"789");
    add_srs_wkt (p, 14,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 7954, "epsg", 7954,
        "Astro DOS 71 / UTM zone 30S", 0, 0,
        "International 1924", "Greenwich",
        "Astro_DOS_71", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=intl +towgs84=-320,550,");
    add_proj4text (p, 1,
        "-494,0,0,0,0 +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"Astro DOS 71 / UTM zone 30S + Jamestown 1971 ");
    add_srs_wkt (p, 1,
        "height\",PROJCS[\"Astro DOS 71 / UTM zone 30S\",GEOGCS[\"");
    add_srs_wkt (p, 2,
        "Astro DOS 71\",DATUM[\"Astro_DOS_71\",SPHEROID[\"Interna");
    add_srs_wkt (p, 3,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 4,
        "TOWGS84[-320,550,-494,0,0,0,0],AUTHORITY[\"EPSG\",\"6710");
    add_srs_wkt (p, 5,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 6,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 7,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 8,
        "AST],AUTHORITY[\"EPSG\",\"4710\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 9,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"7878\"]],VERT_CS[\"Jamest");
    add_srs_wkt (p, 15,
        "own 1971 height\",VERT_DATUM[\"Jamestown 1971\",2005,AUT");
    add_srs_wkt (p, 16,
        "HORITY[\"EPSG\",\"1175\"]],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 17,
        "EPSG\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 18,
        "888\"]],AUTHORITY[\"EPSG\",\"7954\"]]");
    p = add_epsg_def_ex (filter, first, last, 7955, "epsg", 7955,
        "St. Helena Tritan / UTM zone 30S", 0, 0,
        "WGS 84", "Greenwich",
        "St_Helena_Tritan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=WGS84 +towgs84=-0.077,0");
    add_proj4text (p, 1,
        ".079,0.086,0,0,0,0 +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"St. Helena Tritan / UTM zone 30S +  Tritan 20");
    add_srs_wkt (p, 1,
        "11 height\",PROJCS[\"St. Helena Tritan / UTM zone 30S\",");
    add_srs_wkt (p, 2,
        "GEOGCS[\"St. Helena Tritan\",DATUM[\"St_Helena_Tritan\",");
    add_srs_wkt (p, 3,
        "SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"7030\"]],TOWGS84[-0.077,0.079,0.086,0,0,0,0],AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"1173\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 7,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 8,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7881\"]],");
    add_srs_wkt (p, 9,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 10,
        "_of_origin\",0],PARAMETER[\"central_meridian\",-3],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 13,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7883");
    add_srs_wkt (p, 15,
        "\"]],VERT_CS[\"St. Helena Tritan 2011 height\",VERT_DATU");
    add_srs_wkt (p, 16,
        "M[\"St. Helena Tritan Vertical Datum 2011\",2005,AUTHORI");
    add_srs_wkt (p, 17,
        "TY[\"EPSG\",\"1176\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 18,
        "\",\"9001\"]],AXIS[\"Up\",UP],AUTHORITY[\"EPSG\",\"7889\"");
    add_srs_wkt (p, 19,
        "]],AUTHORITY[\"EPSG\",\"7955\"]]");
    p = add_epsg_def_ex (filter, first, last, 7956, "epsg", 7956,
        "SHMG2015", 0, 0,
        "GRS 1980", "Greenwich",
        "St_Helena_Geodetic_Datum_2015", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +vunits=m +no_defs");
    add_srs_wkt (p, 0,
        "COMPD_CS[\"SHMG2015 +  SHVD2015 height\",PROJCS[\"SHMG20");
    add_srs_wkt (p, 1,
        "15\",GEOGCS[\"SHGD2015\",DATUM[\"St_Helena_Geodetic_Datu");
    add_srs_wkt (p, 2,
        "m_2015\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"1174\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"7886\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",-3],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",10000000],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"7887\"");
    add_srs_wkt (p, 14,
        "]],VERT_CS[\"SHVD2015 height\",VERT_DATUM[\"St. Helena V");
    add_srs_wkt (p, 15,
        "ertical Datum 2015\",2005,AUTHORITY[\"EPSG\",\"1177\"]],");
    add_srs_wkt (p, 16,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Up");
    add_srs_wkt (p, 17,
        "\",UP],AUTHORITY[\"EPSG\",\"7890\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 18,
        "\"7956\"]]");
    p = add_epsg_def_ex (filter, first, last, 20004, "epsg", 20004,
        "Pulkovo 1995 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 4\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",4500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"20004\"]]");
    p = add_epsg_def_ex (filter, first, last, 20005, "epsg", 20005,
        "Pulkovo 1995 / Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 5\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",5500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"20005\"]]");
    p = add_epsg_def_ex (filter, first, last, 20006, "epsg", 20006,
        "Pulkovo 1995 / Gauss-Kruger zone 6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 6\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",6500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"20006\"]]");
    p = add_epsg_def_ex (filter, first, last, 20007, "epsg", 20007,
        "Pulkovo 1995 / Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 7\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",7500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"20007\"]]");
    p = add_epsg_def_ex (filter, first, last, 20008, "epsg", 20008,
        "Pulkovo 1995 / Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 8\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",8500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"20008\"]]");
    p = add_epsg_def_ex (filter, first, last, 20009, "epsg", 20009,
        "Pulkovo 1995 / Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 9\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",9500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"20009\"]]");
    p = add_epsg_def_ex (filter, first, last, 20010, "epsg", 20010,
        "Pulkovo 1995 / Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 10\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",10500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20010\"]]");
    p = add_epsg_def_ex (filter, first, last, 20011, "epsg", 20011,
        "Pulkovo 1995 / Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 11\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",11500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20011\"]]");
    p = add_epsg_def_ex (filter, first, last, 20012, "epsg", 20012,
        "Pulkovo 1995 / Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 12\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",12500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20012\"]]");
    p = add_epsg_def_ex (filter, first, last, 20013, "epsg", 20013,
        "Pulkovo 1995 / Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 13\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",13500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20013\"]]");
    p = add_epsg_def_ex (filter, first, last, 20014, "epsg", 20014,
        "Pulkovo 1995 / Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 14\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",14500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20014\"]]");
    p = add_epsg_def_ex (filter, first, last, 20015, "epsg", 20015,
        "Pulkovo 1995 / Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 15\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",15500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20015\"]]");
    p = add_epsg_def_ex (filter, first, last, 20016, "epsg", 20016,
        "Pulkovo 1995 / Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 16\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",16500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20016\"]]");
    p = add_epsg_def_ex (filter, first, last, 20017, "epsg", 20017,
        "Pulkovo 1995 / Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 17\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",17500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20017\"]]");
    p = add_epsg_def_ex (filter, first, last, 20018, "epsg", 20018,
        "Pulkovo 1995 / Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 18\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",105],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",18500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20018\"]]");
    p = add_epsg_def_ex (filter, first, last, 20019, "epsg", 20019,
        "Pulkovo 1995 / Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 19\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",111],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",19500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20019\"]]");
    p = add_epsg_def_ex (filter, first, last, 20020, "epsg", 20020,
        "Pulkovo 1995 / Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 20\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",117],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",20500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20020\"]]");
    p = add_epsg_def_ex (filter, first, last, 20021, "epsg", 20021,
        "Pulkovo 1995 / Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 21\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",123],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",21500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20021\"]]");
    p = add_epsg_def_ex (filter, first, last, 20022, "epsg", 20022,
        "Pulkovo 1995 / Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 22\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",129],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",22500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20022\"]]");
    p = add_epsg_def_ex (filter, first, last, 20023, "epsg", 20023,
        "Pulkovo 1995 / Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 23\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",135],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",23500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20023\"]]");
    p = add_epsg_def_ex (filter, first, last, 20024, "epsg", 20024,
        "Pulkovo 1995 / Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 24\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",141],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",24500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20024\"]]");
    p = add_epsg_def_ex (filter, first, last, 20025, "epsg", 20025,
        "Pulkovo 1995 / Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 25\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",147],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",25500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20025\"]]");
    p = add_epsg_def_ex (filter, first, last, 20026, "epsg", 20026,
        "Pulkovo 1995 / Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 26\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",153],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",26500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20026\"]]");
    p = add_epsg_def_ex (filter, first, last, 20027, "epsg", 20027,
        "Pulkovo 1995 / Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 27\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",159],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",27500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20027\"]]");
    p = add_epsg_def_ex (filter, first, last, 20028, "epsg", 20028,
        "Pulkovo 1995 / Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 28\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",165],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",28500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20028\"]]");
    p = add_epsg_def_ex (filter, first, last, 20029, "epsg", 20029,
        "Pulkovo 1995 / Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 29\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",171],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",29500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20029\"]]");
    p = add_epsg_def_ex (filter, first, last, 20030, "epsg", 20030,
        "Pulkovo 1995 / Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0");
    add_proj4text (p, 2,
        ".22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 30\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",177],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",30500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20030\"]]");
    p = add_epsg_def_ex (filter, first, last, 20031, "epsg", 20031,
        "Pulkovo 1995 / Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 31\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",-177],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",31500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20031\"]]");
    p = add_epsg_def_ex (filter, first, last, 20032, "epsg", 20032,
        "Pulkovo 1995 / Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-");
    add_proj4text (p, 2,
        "0.22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger zone 32\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",-171],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",32500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"20032\"]]");
    p = add_epsg_def_ex (filter, first, last, 20064, "epsg", 20064,
        "Pulkovo 1995 / Gauss-Kruger 4N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 4N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",21],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"20064\"]]");
}

#endif /* full EPSG initialization enabled/disabled */











































































































































































































































































































































































































|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_38 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 26775, "epsg", 26775,
        "NAD27 / Iowa North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Iowa North\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",43.26666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",42.06666666666667],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",41.5],PARAMETER[\"central_meridian\",-9");
    add_srs_wkt (p, 11,
        "3.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26775\"]]");
    p = add_epsg_def_ex (filter, first, last, 26776, "epsg", 26776,
        "NAD27 / Iowa South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666");
    add_proj4text (p, 1,
        "667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Iowa South\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",41.78333333333333],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",40.61666666666667],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",40],PARAMETER[\"central_meridian\",-93.");
    add_srs_wkt (p, 11,
        "5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 13,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26776\"]]");
    p = add_epsg_def_ex (filter, first, last, 26777, "epsg", 26777,
        "NAD27 / Kansas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kansas North\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",39.78333333333333],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",38.71666666666667],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",38.33333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-98],PARAMETER[\"false_easting\",2000000],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_northing\",0],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 13,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26777\"]]");
    p = add_epsg_def_ex (filter, first, last, 26778, "epsg", 26778,
        "NAD27 / Kansas South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kansas South\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",38.56666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",37.26666666666667],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-98.5],PARAMETER[\"false_easting\",2000000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26778\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26779, "epsg", 26779,
        "NAD27 / Kentucky North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kentucky North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",37.96666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",38.96666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",37.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-84.25],PARAMETER[\"false_easting\",2000000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26779\"]]");
    p = add_epsg_def_ex (filter, first, last, 26780, "epsg", 26780,
        "NAD27 / Kentucky South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kentucky South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",36.73333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",37.93333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",36.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-85.75],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"267");
    add_srs_wkt (p, 15,
        "80\"]]");
    p = add_epsg_def_ex (filter, first, last, 26781, "epsg", 26781,
        "NAD27 / Louisiana North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Louisiana North\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",31.16666666666667],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",32.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",30.66666666666667],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-92.5],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2678");
    add_srs_wkt (p, 15,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 26782, "epsg", 26782,
        "NAD27 / Louisiana South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.666666666666");
    add_proj4text (p, 1,
        "67 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Louisiana South\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",29.3],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",30.7],PARAMETER[\"latitude_of_origin\",28.6");
    add_srs_wkt (p, 10,
        "6666666666667],PARAMETER[\"central_meridian\",-91.333333");
    add_srs_wkt (p, 11,
        "33333333],PARAMETER[\"false_easting\",2000000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",0],UNIT[\"US survey foot\",0.3048006");
    add_srs_wkt (p, 13,
        "096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26782\"]]");
    p = add_epsg_def_ex (filter, first, last, 26783, "epsg", 26783,
        "NAD27 / Maine East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us");
    add_proj4text (p, 2,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Maine East\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",43.83333333333334],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-68.5],PARAMETER[\"scale_factor\",0.9999],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"26783\"]]");
    p = add_epsg_def_ex (filter, first, last, 26784, "epsg", 26784,
        "NAD27 / Maine West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Maine West\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",42.83333333333334],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-70.16666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999966667],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 12,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26784\"]]");
    p = add_epsg_def_ex (filter, first, last, 26785, "epsg", 26785,
        "NAD27 / Maryland", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Maryland\",GEOGCS[\"NAD27\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],");
    add_srs_wkt (p, 7,
        "PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "standard_parallel_1\",38.3],PARAMETER[\"standard_paralle");
    add_srs_wkt (p, 9,
        "l_2\",39.45],PARAMETER[\"latitude_of_origin\",37.8333333");
    add_srs_wkt (p, 10,
        "3333334],PARAMETER[\"central_meridian\",-77],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",800000.0000000002],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26785\"]]");
    p = add_epsg_def_ex (filter, first, last, 26786, "epsg", 26786,
        "NAD27 / Massachusetts Mainland", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333");
    add_proj4text (p, 1,
        "333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Massachusetts Mainland\",GEOGCS[\"NAD27");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 2,
        " 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",41.71666666666667],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",42.68333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",41],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-71.5],PARAMETER[\"false_easting\",600000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26786\"]]");
    p = add_epsg_def_ex (filter, first, last, 26787, "epsg", 26787,
        "NAD27 / Massachusetts Island", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Massachusetts Island\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",41.28333333333333],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",41.48333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",41],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-70.5],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26787\"]]");
    p = add_epsg_def_ex (filter, first, last, 26791, "epsg", 26791,
        "NAD27 / Minnesota North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Minnesota North\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",47.03333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",48.63333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",46.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-93.1],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26791\"]]");
    p = add_epsg_def_ex (filter, first, last, 26792, "epsg", 26792,
        "NAD27 / Minnesota Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Minnesota Central\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",45.61666666666667],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",47.05],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",45],PARAMETER[\"central_meridian\",-94.25],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",2000000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26792\"]]");
    p = add_epsg_def_ex (filter, first, last, 26793, "epsg", 26793,
        "NAD27 / Minnesota South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666");
    add_proj4text (p, 1,
        "667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Minnesota South\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",43.78333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",45.21666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",43],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-94],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26793\"]]");
    p = add_epsg_def_ex (filter, first, last, 26794, "epsg", 26794,
        "NAD27 / Mississippi East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333");
    add_proj4text (p, 1,
        "333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +datum=N");
    add_proj4text (p, 2,
        "AD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Mississippi East\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",29.66666666666667],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",-88.83333333333333],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.99996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 12,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26794\"]]");
    p = add_epsg_def_ex (filter, first, last, 26795, "epsg", 26795,
        "NAD27 / Mississippi West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Mississippi West\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",30.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 9,
        ",-90.33333333333333],PARAMETER[\"scale_factor\",0.999941");
    add_srs_wkt (p, 10,
        "177],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"US survey foot\",0.3048006096012");
    add_srs_wkt (p, 12,
        "192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26795\"]]");
    p = add_epsg_def_ex (filter, first, last, 26796, "epsg", 26796,
        "NAD27 / Missouri East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Missouri East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",35.83333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-90.5],PARAMETER[\"scale_factor\",0.99993333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26796\"]]");
    p = add_epsg_def_ex (filter, first, last, 26797, "epsg", 26797,
        "NAD27 / Missouri Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Missouri Central\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",35.83333333333334],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",-92.5],PARAMETER[\"scale_factor\",0.999933");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"US survey foot\",0.3048006096012");
    add_srs_wkt (p, 12,
        "192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26797\"]]");
    p = add_epsg_def_ex (filter, first, last, 26798, "epsg", 26798,
        "NAD27 / Missouri West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9");
    add_proj4text (p, 1,
        "99941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Missouri West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",36.16666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-94.5],PARAMETER[\"scale_factor\",0.99994117");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26798\"]]");
    p = add_epsg_def_ex (filter, first, last, 26799, "epsg", 26799,
        "NAD27 / California zone VII", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666");
    add_proj4text (p, 1,
        "667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=1276106.450596901 +y_0=1268253.006858014 +datum=NAD2");
    add_proj4text (p, 3,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone VII\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",34.41666666666666],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",33.86666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",34.13333333333333],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-118.3333333333333],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",4186692.58],PARAMETER[\"false_northing\",41609");
    add_srs_wkt (p, 13,
        "26.74],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 15,
        "H],AUTHORITY[\"EPSG\",\"26799\"]]");
    p = add_epsg_def_ex (filter, first, last, 26801, "epsg", 26801,
        "NAD Michigan / Michigan East (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99942857 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548");
    add_proj4text (p, 2,
        "896 +b=6356826.621488444 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan East (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866 Michigan\",6378450.047548896,294.97869716");
    add_srs_wkt (p, 3,
        "46739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",41.5");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-83.66666666666667],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999942857],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"26801\"]]");
    p = add_epsg_def_ex (filter, first, last, 26802, "epsg", 26802,
        "NAD Michigan / Michigan Old Central (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909091 +x_");
    add_proj4text (p, 1,
        "0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=63568");
    add_proj4text (p, 2,
        "26.621488444 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan Old Central (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",S");
    add_srs_wkt (p, 2,
        "PHEROID[\"Clarke 1866 Michigan\",6378450.047548896,294.9");
    add_srs_wkt (p, 3,
        "786971646739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",41.5],PARAMETER[\"central_meridian\",-85.75],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",0.999909091],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"US s");
    add_srs_wkt (p, 12,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"26802\"]]");
    p = add_epsg_def_ex (filter, first, last, 26803, "epsg", 26803,
        "NAD Michigan / Michigan West (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909091 +x_");
    add_proj4text (p, 1,
        "0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=63568");
    add_proj4text (p, 2,
        "26.621488444 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan West (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866 Michigan\",6378450.047548896,294.97869716");
    add_srs_wkt (p, 3,
        "46739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",41.5");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-88.75],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.999909091],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"US survey fo");
    add_srs_wkt (p, 12,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26");
    add_srs_wkt (p, 14,
        "803\"]]");
    p = add_epsg_def_ex (filter, first, last, 26811, "epsg", 26811,
        "NAD Michigan / Michigan North (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333");
    add_proj4text (p, 1,
        "334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 ");
    add_proj4text (p, 3,
        "+units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan North (deprecated)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866 Michigan\",6378450.047548896,294.9786971");
    add_srs_wkt (p, 3,
        "646739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",45.48333333333333],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 10,
        "2\",47.08333333333334],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "44.78333333333333],PARAMETER[\"central_meridian\",-87],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",2000000],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26811\"]]");
    p = add_epsg_def_ex (filter, first, last, 26812, "epsg", 26812,
        "NAD Michigan / Michigan Central (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43");
    add_proj4text (p, 1,
        ".31666666666667 +lon_0=-84.33333333333333 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +a=6378450.047548896 +b=6356826.62148844");
    add_proj4text (p, 3,
        "4 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan Central (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Clarke 1866 Michigan\",6378450.047548896,294.97869");
    add_srs_wkt (p, 3,
        "71646739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",44.18333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 10,
        "_2\",45.7],PARAMETER[\"latitude_of_origin\",43.316666666");
    add_srs_wkt (p, 11,
        "66667],PARAMETER[\"central_meridian\",-84.33333333333333");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_easting\",2000000],PARAMETER[\"false");
    add_srs_wkt (p, 13,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 14,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 15,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26812\"]]");
    p = add_epsg_def_ex (filter, first, last, 26813, "epsg", 26813,
        "NAD Michigan / Michigan South (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41");
    add_proj4text (p, 1,
        ".5 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-f");
    add_proj4text (p, 3,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan South (deprecated)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866 Michigan\",6378450.047548896,294.9786971");
    add_srs_wkt (p, 3,
        "646739,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",42.1],PARAMETER[\"standard_parallel_2\",43.666666");
    add_srs_wkt (p, 10,
        "66666666],PARAMETER[\"latitude_of_origin\",41.5],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",-84.33333333333333],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",2000000],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"26813\"]]");
    p = add_epsg_def_ex (filter, first, last, 26814, "epsg", 26814,
        "NAD83 / Maine East (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine East (ftUS) (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"626");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.6666");
    add_srs_wkt (p, 9,
        "6666666666],PARAMETER[\"central_meridian\",-68.5],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",300000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26814\"]]");
    p = add_epsg_def_ex (filter, first, last, 26815, "epsg", 26815,
        "NAD83 / Maine West (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine West (ftUS) (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"626");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",42.8333");
    add_srs_wkt (p, 9,
        "3333333334],PARAMETER[\"central_meridian\",-70.166666666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",0.999966667],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",900000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26815\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26819, "epsg", 26819,
        "NAD83 / Minnesota North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 3,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota North (ftUS) (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",48.63333333333333],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 10,
        "2\",47.03333333333333],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "46.5],PARAMETER[\"central_meridian\",-93.1],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",800000.0000101601],PARAMETER[\"false_nor");
    add_srs_wkt (p, 13,
        "thing\",99999.99998984],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26819\"]]");
    p = add_epsg_def_ex (filter, first, last, 26820, "epsg", 26820,
        "NAD83 / Minnesota Central (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.999989");
    add_proj4text (p, 2,
        "84 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota Central (ftUS) (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",47.05],PARAMETER[\"standard_parallel_2\",45.6166");
    add_srs_wkt (p, 10,
        "6666666667],PARAMETER[\"latitude_of_origin\",45],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",-94.25],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 12,
        "g\",800000.0000101601],PARAMETER[\"false_northing\",9999");
    add_srs_wkt (p, 13,
        "9.99998984],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 14,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 15,
        ",\"26820\"]]");
    p = add_epsg_def_ex (filter, first, last, 26821, "epsg", 26821,
        "NAD83 / Minnesota South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=999");
    add_proj4text (p, 2,
        "99.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota South (ftUS) (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",45.21666666666667],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 10,
        "2\",43.78333333333333],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "43],PARAMETER[\"central_meridian\",-94],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",800000.0000101601],PARAMETER[\"false_northin");
    add_srs_wkt (p, 13,
        "g\",99999.99998984],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"26821\"]]");
    p = add_epsg_def_ex (filter, first, last, 26822, "epsg", 26822,
        "NAD83 / Nebraska (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nebraska (ftUS) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"G");
    add_srs_wkt (p, 2,
        "RS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"701");
    add_srs_wkt (p, 3,
        "9\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",4");
    add_srs_wkt (p, 9,
        "3],PARAMETER[\"standard_parallel_2\",40],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",39.83333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-100],PARAMETER[\"false_easting\",500000.000");
    add_srs_wkt (p, 12,
        "0101601],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26822\"]]");
    p = add_epsg_def_ex (filter, first, last, 26823, "epsg", 26823,
        "NAD83 / West Virginia North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,");
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia North (ftUS) (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_1\",40.25],PARAMETER[\"standard_parallel_2\",39],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"latitude_of_origin\",38.5],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-79.5],PARAMETER[\"false_easting\",1968500");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"26823\"]]");
    p = add_epsg_def_ex (filter, first, last, 26824, "epsg", 26824,
        "NAD83 / West Virginia South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia South (ftUS) (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_1\",38.88333333333333],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 10,
        "lel_2\",37.48333333333333],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 11,
        "n\",37],PARAMETER[\"central_meridian\",-81],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1968500],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26824\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 26825, "epsg", 26825,
        "NAD83(HARN) / Maine East (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine East (ftUS) (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Refer");
    add_srs_wkt (p, 2,
        "ence_Network\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",43.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-68.5],PARAMETER[\"scale_factor\",0.9999],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",300000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 14,
        "6825\"]]");
    p = add_epsg_def_ex (filter, first, last, 26826, "epsg", 26826,
        "NAD83(HARN) / Maine West (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine West (ftUS) (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Refer");
    add_srs_wkt (p, 2,
        "ence_Network\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",42.83333333333334],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-70.16666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.999966667],PARAMETER[\"false_easting\",900000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"26826\"]]");
    p = add_epsg_def_ex (filter, first, last, 26830, "epsg", 26830,
        "NAD83(HARN) / Minnesota North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 3,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota North (ftUS) (deprecate");
    add_srs_wkt (p, 1,
        "d)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_");
    add_srs_wkt (p, 2,
        "Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",48.63333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",47.03333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",46.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 12,
        "an\",-93.1],PARAMETER[\"false_easting\",800000.000010160");
    add_srs_wkt (p, 13,
        "1],PARAMETER[\"false_northing\",99999.99998984],UNIT[\"m");
    add_srs_wkt (p, 14,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 15,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26830\"]]");
    p = add_epsg_def_ex (filter, first, last, 26831, "epsg", 26831,
        "NAD83(HARN) / Minnesota Central (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.999989");
    add_proj4text (p, 2,
        "84 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota Central (ftUS) (depreca");
    add_srs_wkt (p, 1,
        "ted)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accurac");
    add_srs_wkt (p, 2,
        "y_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",47.05],PARAMETER[\"standa");
    add_srs_wkt (p, 10,
        "rd_parallel_2\",45.61666666666667],PARAMETER[\"latitude_");
    add_srs_wkt (p, 11,
        "of_origin\",45],PARAMETER[\"central_meridian\",-94.25],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",800000.0000101601],PARAMETER[");
    add_srs_wkt (p, 13,
        "\"false_northing\",99999.99998984],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 15,
        "RTH],AUTHORITY[\"EPSG\",\"26831\"]]");
    p = add_epsg_def_ex (filter, first, last, 26832, "epsg", 26832,
        "NAD83(HARN) / Minnesota South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=999");
    add_proj4text (p, 2,
        "99.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota South (ftUS) (deprecate");
    add_srs_wkt (p, 1,
        "d)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_");
    add_srs_wkt (p, 2,
        "Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",45.21666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",43.78333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",43],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 12,
        "\",-94],PARAMETER[\"false_easting\",800000.0000101601],P");
    add_srs_wkt (p, 13,
        "ARAMETER[\"false_northing\",99999.99998984],UNIT[\"metre");
    add_srs_wkt (p, 14,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 15,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26832\"]]");
    p = add_epsg_def_ex (filter, first, last, 26833, "epsg", 26833,
        "NAD83(HARN) / Nebraska (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Nebraska (ftUS) (deprecated)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Referen");
    add_srs_wkt (p, 2,
        "ce_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_1\",43],PARAMETER[\"standard_paralle");
    add_srs_wkt (p, 10,
        "l_2\",40],PARAMETER[\"latitude_of_origin\",39.8333333333");
    add_srs_wkt (p, 11,
        "3334],PARAMETER[\"central_meridian\",-100],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_easting\",500000.0000101601],PARAMETER[\"false_nort");
    add_srs_wkt (p, 13,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "26833\"]]");
    p = add_epsg_def_ex (filter, first, last, 26834, "epsg", 26834,
        "NAD83(HARN) / West Virginia North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,");
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia North (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accur");
    add_srs_wkt (p, 2,
        "acy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"standard_parallel_1\",40.25],PARAMETER[\"sta");
    add_srs_wkt (p, 10,
        "ndard_parallel_2\",39],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "38.5],PARAMETER[\"central_meridian\",-79.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1968500],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26834\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 26835, "epsg", 26835,
        "NAD83(HARN) / West Virginia South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia South (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accur");
    add_srs_wkt (p, 2,
        "acy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"standard_parallel_1\",38.88333333333333],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"standard_parallel_2\",37.48333333333333],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"latitude_of_origin\",37],PARAMETER[\"central_merid");
    add_srs_wkt (p, 12,
        "ian\",-81],PARAMETER[\"false_easting\",1968500],PARAMETE");
    add_srs_wkt (p, 13,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26835\"]]");
    p = add_epsg_def_ex (filter, first, last, 26836, "epsg", 26836,
        "NAD83(NSRS2007) / Maine East (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine East (ftUS) (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 4,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4759\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",43.66666666666666],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",-68.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.9999],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"26836\"]]");
    p = add_epsg_def_ex (filter, first, last, 26837, "epsg", 26837,
        "NAD83(NSRS2007) / Maine West (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine West (ftUS) (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 4,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4759\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",42.83333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",-70.16666666666667],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "scale_factor\",0.999966667],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 12,
        "900000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26837\"]]");
    p = add_epsg_def_ex (filter, first, last, 26841, "epsg", 26841,
        "NAD83(NSRS2007) / Minnesota North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 3,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota North (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Nation");
    add_srs_wkt (p, 2,
        "al_Spatial_Reference_System_2007\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 3,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 4,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM");
    add_srs_wkt (p, 5,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 6,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",48.6333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"standard_parallel_2\",47.0333333333");
    add_srs_wkt (p, 11,
        "3333],PARAMETER[\"latitude_of_origin\",46.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "central_meridian\",-93.1],PARAMETER[\"false_easting\",80");
    add_srs_wkt (p, 13,
        "0000.0000101601],PARAMETER[\"false_northing\",99999.9999");
    add_srs_wkt (p, 14,
        "8984],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 15,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"268");
    add_srs_wkt (p, 16,
        "41\"]]");
    p = add_epsg_def_ex (filter, first, last, 26842, "epsg", 26842,
        "NAD83(NSRS2007) / Minnesota Central (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.999989");
    add_proj4text (p, 2,
        "84 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota Central (ftUS) (dep");
    add_srs_wkt (p, 1,
        "recated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Nati");
    add_srs_wkt (p, 2,
        "onal_Spatial_Reference_System_2007\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 3,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 4,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIM");
    add_srs_wkt (p, 5,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 9,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",47.05],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"standard_parallel_2\",45.61666666666667],PARA");
    add_srs_wkt (p, 11,
        "METER[\"latitude_of_origin\",45],PARAMETER[\"central_mer");
    add_srs_wkt (p, 12,
        "idian\",-94.25],PARAMETER[\"false_easting\",800000.00001");
    add_srs_wkt (p, 13,
        "01601],PARAMETER[\"false_northing\",99999.99998984],UNIT");
    add_srs_wkt (p, 14,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 15,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26842\"]]");
    p = add_epsg_def_ex (filter, first, last, 26843, "epsg", 26843,
        "NAD83(NSRS2007) / Minnesota South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=999");
    add_proj4text (p, 2,
        "99.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota South (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Nation");
    add_srs_wkt (p, 2,
        "al_Spatial_Reference_System_2007\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 3,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 4,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM");
    add_srs_wkt (p, 5,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 6,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",45.2166666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"standard_parallel_2\",43.7833333333");
    add_srs_wkt (p, 11,
        "3333],PARAMETER[\"latitude_of_origin\",43],PARAMETER[\"c");
    add_srs_wkt (p, 12,
        "entral_meridian\",-94],PARAMETER[\"false_easting\",80000");
    add_srs_wkt (p, 13,
        "0.0000101601],PARAMETER[\"false_northing\",99999.9999898");
    add_srs_wkt (p, 14,
        "4],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 15,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26843\"");
    add_srs_wkt (p, 16,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26844, "epsg", 26844,
        "NAD83(NSRS2007) / Nebraska (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Nebraska (ftUS) (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 4,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"st");
    add_srs_wkt (p, 10,
        "andard_parallel_2\",40],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",39.83333333333334],PARAMETER[\"central_meridian\",-100]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_easting\",500000.0000101601],PARAMETE");
    add_srs_wkt (p, 13,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26844\"]]");
    p = add_epsg_def_ex (filter, first, last, 26845, "epsg", 26845,
        "NAD83(NSRS2007) / West Virginia North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,");
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia North (ftUS) (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Na");
    add_srs_wkt (p, 2,
        "tional_Spatial_Reference_System_2007\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 9,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",40.25],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"standard_parallel_2\",39],PARAMETER[\"latitu");
    add_srs_wkt (p, 11,
        "de_of_origin\",38.5],PARAMETER[\"central_meridian\",-79.");
    add_srs_wkt (p, 12,
        "5],PARAMETER[\"false_easting\",1968500],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 14,
        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 15,
        "SG\",\"26845\"]]");
    p = add_epsg_def_ex (filter, first, last, 26846, "epsg", 26846,
        "NAD83(NSRS2007) / West Virginia South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia South (ftUS) (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Na");
    add_srs_wkt (p, 2,
        "tional_Spatial_Reference_System_2007\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 9,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",38.8833");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"standard_parallel_2\",37.4833333");
    add_srs_wkt (p, 11,
        "3333333],PARAMETER[\"latitude_of_origin\",37],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"central_meridian\",-81],PARAMETER[\"false_easting\",19");
    add_srs_wkt (p, 13,
        "68500],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26846\"]]");
    p = add_epsg_def_ex (filter, first, last, 26847, "epsg", 26847,
        "NAD83 / Maine East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine East (ftUS)\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",43.66666666666666],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-68.5],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",984250.000000");
    add_srs_wkt (p, 11,
        "0002],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 12,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 14,
        "6847\"]]");
    p = add_epsg_def_ex (filter, first, last, 26848, "epsg", 26848,
        "NAD83 / Maine West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine West (ftUS)\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",42.83333333333334],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-70.16666666666667],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",0.999966667],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",2952750],PARAMETER[\"false_northing\",0],UNIT[\"US ");
    add_srs_wkt (p, 12,
        "survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "03\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"26848\"]]");
    p = add_epsg_def_ex (filter, first, last, 26849, "epsg", 26849,
        "NAD83 / Minnesota North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,");
    add_proj4text (p, 3,
        "0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota North (ftUS)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",48.6333");
    add_srs_wkt (p, 9,
        "3333333333],PARAMETER[\"standard_parallel_2\",47.0333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"latitude_of_origin\",46.5],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"central_meridian\",-93.1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,
        ",2624666.6667],PARAMETER[\"false_northing\",328083.3333]");
    add_srs_wkt (p, 13,
        ",UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"26849\"]]");
    p = add_epsg_def_ex (filter, first, last, 26850, "epsg", 26850,
        "NAD83 / Minnesota Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.999989");
    add_proj4text (p, 2,
        "83997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota Central (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Confo");
    add_srs_wkt (p, 8,
        "rmal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",47.0");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"standard_parallel_2\",45.61666666666667],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"latitude_of_origin\",45],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-94.25],PARAMETER[\"false_easting\",2624666.");
    add_srs_wkt (p, 12,
        "6667],PARAMETER[\"false_northing\",328083.3333],UNIT[\"U");
    add_srs_wkt (p, 13,
        "S survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"26850\"]]");
    p = add_epsg_def_ex (filter, first, last, 26851, "epsg", 26851,
        "NAD83 / Minnesota South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=999");
    add_proj4text (p, 2,
        "99.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota South (ftUS)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",45.2166");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"standard_parallel_2\",43.7833333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"latitude_of_origin\",43],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-94],PARAMETER[\"false_easting\",26");
    add_srs_wkt (p, 12,
        "24666.6667],PARAMETER[\"false_northing\",328083.3333],UN");
    add_srs_wkt (p, 13,
        "IT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26851\"]]");
    p = add_epsg_def_ex (filter, first, last, 26852, "epsg", 26852,
        "NAD83 / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nebraska (ftUS)\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",43],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",40],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 10,
        "gin\",39.83333333333334],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-100],PARAMETER[\"false_easting\",1640416.6667],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26852\"]]");
    p = add_epsg_def_ex (filter, first, last, 26853, "epsg", 26853,
        "NAD83 / West Virginia North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia North (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",40");
    add_srs_wkt (p, 9,
        ".25],PARAMETER[\"standard_parallel_2\",39],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",38.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-79.5],PARAMETER[\"false_easting\",1968500],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26853\"]]");
    p = add_epsg_def_ex (filter, first, last, 26854, "epsg", 26854,
        "NAD83 / West Virginia South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia South (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",38");
    add_srs_wkt (p, 9,
        ".88333333333333],PARAMETER[\"standard_parallel_2\",37.48");
    add_srs_wkt (p, 10,
        "333333333333],PARAMETER[\"latitude_of_origin\",37],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-81],PARAMETER[\"false_easting");
    add_srs_wkt (p, 12,
        "\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US su");
    add_srs_wkt (p, 13,
        "rvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003");
    add_srs_wkt (p, 14,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 15,
        "\",\"26854\"]]");
    p = add_epsg_def_ex (filter, first, last, 26855, "epsg", 26855,
        "NAD83(HARN) / Maine East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine East (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",43.66666666666666],PARAMETER[\"central_meridian\",-68.5");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",984250.0000000002],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"26855\"]]");
    p = add_epsg_def_ex (filter, first, last, 26856, "epsg", 26856,
        "NAD83(HARN) / Maine West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine West (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",42.83333333333334],PARAMETER[\"central_meridian\",-70.1");
    add_srs_wkt (p, 10,
        "6666666666667],PARAMETER[\"scale_factor\",0.999966667],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",2952750],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26856\"]]");
    p = add_epsg_def_ex (filter, first, last, 26857, "epsg", 26857,
        "NAD83(HARN) / Minnesota North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,");
    add_proj4text (p, 3,
        "0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota North (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Netw");
    add_srs_wkt (p, 2,
        "ork\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",48.63333333333333],PARAMETER[\"standard");
    add_srs_wkt (p, 10,
        "_parallel_2\",47.03333333333333],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 11,
        "_origin\",46.5],PARAMETER[\"central_meridian\",-93.1],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_easting\",2624666.6667],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",328083.3333],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 14,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 15,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26857\"]]");
    p = add_epsg_def_ex (filter, first, last, 26858, "epsg", 26858,
        "NAD83(HARN) / Minnesota Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.999989");
    add_proj4text (p, 2,
        "83997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota Central (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_N");
    add_srs_wkt (p, 2,
        "etwork\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"st");
    add_srs_wkt (p, 9,
        "andard_parallel_1\",47.05],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 10,
        "_2\",45.61666666666667],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",45],PARAMETER[\"central_meridian\",-94.25],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",2624666.6667],PARAMETER[\"false_northing");
    add_srs_wkt (p, 13,
        "\",328083.3333],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 14,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 15,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26858\"]]");
    p = add_epsg_def_ex (filter, first, last, 26859, "epsg", 26859,
        "NAD83(HARN) / Minnesota South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=999");
    add_proj4text (p, 2,
        "99.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota South (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Netw");
    add_srs_wkt (p, 2,
        "ork\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",45.21666666666667],PARAMETER[\"standard");
    add_srs_wkt (p, 10,
        "_parallel_2\",43.78333333333333],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 11,
        "_origin\",43],PARAMETER[\"central_meridian\",-94],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_easting\",2624666.6667],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",328083.3333],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 14,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 15,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26859\"]]");
    p = add_epsg_def_ex (filter, first, last, 26860, "epsg", 26860,
        "NAD83(HARN) / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Nebraska (ftUS)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_1\",43],PARAMETER[\"standard_parallel_2\",40],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"latitude_of_origin\",39.83333333333334],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",-100],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,
        ",1640416.6667],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"26860\"]]");
    p = add_epsg_def_ex (filter, first, last, 26861, "epsg", 26861,
        "NAD83(HARN) / West Virginia North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia North (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference");
    add_srs_wkt (p, 2,
        "_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_1\",40.25],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 10,
        "el_2\",39],PARAMETER[\"latitude_of_origin\",38.5],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-79.5],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 12,
        "g\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US s");
    add_srs_wkt (p, 13,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 14,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"26861\"]]");
    p = add_epsg_def_ex (filter, first, last, 26862, "epsg", 26862,
        "NAD83(HARN) / West Virginia South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia South (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference");
    add_srs_wkt (p, 2,
        "_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_1\",38.88333333333333],PARAMETER[\"sta");
    add_srs_wkt (p, 10,
        "ndard_parallel_2\",37.48333333333333],PARAMETER[\"latitu");
    add_srs_wkt (p, 11,
        "de_of_origin\",37],PARAMETER[\"central_meridian\",-81],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",1968500],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26862\"]]");
    p = add_epsg_def_ex (filter, first, last, 26863, "epsg", 26863,
        "NAD83(NSRS2007) / Maine East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine East (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"475");
    add_srs_wkt (p, 8,
        "9\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",43.66666666666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",-68.5],PARAMETER[\"scale_factor\",0.9999],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",984250.0000000002],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26863\"]]");
    p = add_epsg_def_ex (filter, first, last, 26864, "epsg", 26864,
        "NAD83(NSRS2007) / Maine West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine West (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"475");
    add_srs_wkt (p, 8,
        "9\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",42.83333333333334],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",-70.16666666666667],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 11,
        "r\",0.999966667],PARAMETER[\"false_easting\",2952750],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_northing\",0],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 13,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26864\"]]");
    p = add_epsg_def_ex (filter, first, last, 26865, "epsg", 26865,
        "NAD83(NSRS2007) / Minnesota North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,");
    add_proj4text (p, 3,
        "0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota North (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",48.63333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",47.03333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",46.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 12,
        "an\",-93.1],PARAMETER[\"false_easting\",2624666.6667],PA");
    add_srs_wkt (p, 13,
        "RAMETER[\"false_northing\",328083.3333],UNIT[\"US survey");
    add_srs_wkt (p, 14,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 15,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 16,
        "26865\"]]");
    p = add_epsg_def_ex (filter, first, last, 26866, "epsg", 26866,
        "NAD83(NSRS2007) / Minnesota Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.999989");
    add_proj4text (p, 2,
        "83997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota Central (ftUS)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_");
    add_srs_wkt (p, 2,
        "Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"standard_parallel_1\",47.05],PARAMETER[\"sta");
    add_srs_wkt (p, 10,
        "ndard_parallel_2\",45.61666666666667],PARAMETER[\"latitu");
    add_srs_wkt (p, 11,
        "de_of_origin\",45],PARAMETER[\"central_meridian\",-94.25");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_easting\",2624666.6667],PARAMETER[\"");
    add_srs_wkt (p, 13,
        "false_northing\",328083.3333],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 14,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 15,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26866\"]]");
    p = add_epsg_def_ex (filter, first, last, 26867, "epsg", 26867,
        "NAD83(NSRS2007) / Minnesota South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=999");
    add_proj4text (p, 2,
        "99.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota South (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",45.21666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",43.78333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",43],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 12,
        "\",-94],PARAMETER[\"false_easting\",2624666.6667],PARAME");
    add_srs_wkt (p, 13,
        "TER[\"false_northing\",328083.3333],UNIT[\"US survey foo");
    add_srs_wkt (p, 14,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 15,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"268");
    add_srs_wkt (p, 16,
        "67\"]]");
    p = add_epsg_def_ex (filter, first, last, 26868, "epsg", 26868,
        "NAD83(NSRS2007) / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Nebraska (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4759\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_1\",43],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 10,
        "el_2\",40],PARAMETER[\"latitude_of_origin\",39.833333333");
    add_srs_wkt (p, 11,
        "33334],PARAMETER[\"central_meridian\",-100],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1640416.6667],PARAMETER[\"false_northing");
    add_srs_wkt (p, 13,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 15,
        "],AUTHORITY[\"EPSG\",\"26868\"]]");
    p = add_epsg_def_ex (filter, first, last, 26869, "epsg", 26869,
        "NAD83(NSRS2007) / West Virginia North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia North (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_1\",40.25],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "tandard_parallel_2\",39],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",38.5],PARAMETER[\"central_meridian\",-79.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1968500],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"26869\"]]");
    p = add_epsg_def_ex (filter, first, last, 26870, "epsg", 26870,
        "NAD83(NSRS2007) / West Virginia South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia South (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_1\",38.88333333333333],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"standard_parallel_2\",37.48333333333333],PARA");
    add_srs_wkt (p, 11,
        "METER[\"latitude_of_origin\",37],PARAMETER[\"central_mer");
    add_srs_wkt (p, 12,
        "idian\",-81],PARAMETER[\"false_easting\",1968500],PARAME");
    add_srs_wkt (p, 13,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 14,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 15,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26870\"]]");
    p = add_epsg_def_ex (filter, first, last, 26891, "epsg", 26891,
        "NAD83(CSRS) / MTM zone 11", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 11\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-82.5],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",0.9999],PARAMETER[\"false_easting\",304800],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 13,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"26891\"]]");
    p = add_epsg_def_ex (filter, first, last, 26892, "epsg", 26892,
        "NAD83(CSRS) / MTM zone 12", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 12\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26892\"]]");
    p = add_epsg_def_ex (filter, first, last, 26893, "epsg", 26893,
        "NAD83(CSRS) / MTM zone 13", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 13\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-84],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26893\"]]");
    p = add_epsg_def_ex (filter, first, last, 26894, "epsg", 26894,
        "NAD83(CSRS) / MTM zone 14", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 14\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-87],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26894\"]]");
    p = add_epsg_def_ex (filter, first, last, 26895, "epsg", 26895,
        "NAD83(CSRS) / MTM zone 15", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 15\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-90],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26895\"]]");
    p = add_epsg_def_ex (filter, first, last, 26896, "epsg", 26896,
        "NAD83(CSRS) / MTM zone 16", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 16\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-93],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26896\"]]");
    p = add_epsg_def_ex (filter, first, last, 26897, "epsg", 26897,
        "NAD83(CSRS) / MTM zone 17", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 17\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-96],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26897\"]]");
    p = add_epsg_def_ex (filter, first, last, 26898, "epsg", 26898,
        "NAD83(CSRS) / MTM zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 1\",GEOGCS[\"NAD83(CSRS)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-53],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"E(X)\",EAST],AXIS[\"N(Y)\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26898\"]]");
    p = add_epsg_def_ex (filter, first, last, 26899, "epsg", 26899,
        "NAD83(CSRS) / MTM zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 2\",GEOGCS[\"NAD83(CSRS)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-56],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"E(X)\",EAST],AXIS[\"N(Y)\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26899\"]]");
    p = add_epsg_def_ex (filter, first, last, 26901, "epsg", 26901,
        "NAD83 / UTM zone 1N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 1N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-177],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26901\"]]");
    p = add_epsg_def_ex (filter, first, last, 26902, "epsg", 26902,
        "NAD83 / UTM zone 2N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 2N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-171],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26902\"]]");
    p = add_epsg_def_ex (filter, first, last, 26903, "epsg", 26903,
        "NAD83 / UTM zone 3N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 3N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-165],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26903\"]]");
    p = add_epsg_def_ex (filter, first, last, 26904, "epsg", 26904,
        "NAD83 / UTM zone 4N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 4N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-159],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26904\"]]");
    p = add_epsg_def_ex (filter, first, last, 26905, "epsg", 26905,
        "NAD83 / UTM zone 5N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 5N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-153],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26905\"]]");
    p = add_epsg_def_ex (filter, first, last, 26906, "epsg", 26906,
        "NAD83 / UTM zone 6N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 6N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-147],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26906\"]]");
    p = add_epsg_def_ex (filter, first, last, 26907, "epsg", 26907,
        "NAD83 / UTM zone 7N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 7N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-141],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26907\"]]");
    p = add_epsg_def_ex (filter, first, last, 26908, "epsg", 26908,
        "NAD83 / UTM zone 8N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 8N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-135],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26908\"]]");
    p = add_epsg_def_ex (filter, first, last, 26909, "epsg", 26909,
        "NAD83 / UTM zone 9N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 9N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-129],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26909\"]]");
    p = add_epsg_def_ex (filter, first, last, 26910, "epsg", 26910,
        "NAD83 / UTM zone 10N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 10N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-123],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26910\"]]");
    p = add_epsg_def_ex (filter, first, last, 26911, "epsg", 26911,
        "NAD83 / UTM zone 11N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 11N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-117],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26911\"]]");
    p = add_epsg_def_ex (filter, first, last, 26912, "epsg", 26912,
        "NAD83 / UTM zone 12N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 12N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-111],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26912\"]]");
    p = add_epsg_def_ex (filter, first, last, 26913, "epsg", 26913,
        "NAD83 / UTM zone 13N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 13N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-105],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26913\"]]");
    p = add_epsg_def_ex (filter, first, last, 26914, "epsg", 26914,
        "NAD83 / UTM zone 14N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 14N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26914\"]]");
    p = add_epsg_def_ex (filter, first, last, 26915, "epsg", 26915,
        "NAD83 / UTM zone 15N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 15N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26915\"]]");
    p = add_epsg_def_ex (filter, first, last, 26916, "epsg", 26916,
        "NAD83 / UTM zone 16N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 16N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-87],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26916\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_39.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155









































































































































































































































































































































































































































































































































































































































































































































































3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_39 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 20065, "epsg", 20065,
        "Pulkovo 1995 / Gauss-Kruger 5N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 5N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",27],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"20065\"]]");
    p = add_epsg_def_ex (filter, first, last, 20066, "epsg", 20066,
        "Pulkovo 1995 / Gauss-Kruger 6N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 6N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",33],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"20066\"]]");
    p = add_epsg_def_ex (filter, first, last, 20067, "epsg", 20067,
        "Pulkovo 1995 / Gauss-Kruger 7N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 7N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",39],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"20067\"]]");
    p = add_epsg_def_ex (filter, first, last, 20068, "epsg", 20068,
        "Pulkovo 1995 / Gauss-Kruger 8N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 8N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",45],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"20068\"]]");
    p = add_epsg_def_ex (filter, first, last, 20069, "epsg", 20069,
        "Pulkovo 1995 / Gauss-Kruger 9N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 9N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",51],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",5000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"20069\"]]");
    p = add_epsg_def_ex (filter, first, last, 20070, "epsg", 20070,
        "Pulkovo 1995 / Gauss-Kruger 10N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 10N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",57],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20070\"]]");
    p = add_epsg_def_ex (filter, first, last, 20071, "epsg", 20071,
        "Pulkovo 1995 / Gauss-Kruger 11N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 11N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",63],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20071\"]]");
    p = add_epsg_def_ex (filter, first, last, 20072, "epsg", 20072,
        "Pulkovo 1995 / Gauss-Kruger 12N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 12N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",69],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20072\"]]");
    p = add_epsg_def_ex (filter, first, last, 20073, "epsg", 20073,
        "Pulkovo 1995 / Gauss-Kruger 13N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 13N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",75],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20073\"]]");
    p = add_epsg_def_ex (filter, first, last, 20074, "epsg", 20074,
        "Pulkovo 1995 / Gauss-Kruger 14N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 14N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",81],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20074\"]]");
    p = add_epsg_def_ex (filter, first, last, 20075, "epsg", 20075,
        "Pulkovo 1995 / Gauss-Kruger 15N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 15N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",87],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20075\"]]");
    p = add_epsg_def_ex (filter, first, last, 20076, "epsg", 20076,
        "Pulkovo 1995 / Gauss-Kruger 16N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 16N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",93],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20076\"]]");
    p = add_epsg_def_ex (filter, first, last, 20077, "epsg", 20077,
        "Pulkovo 1995 / Gauss-Kruger 17N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.22");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 17N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",99],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"20077\"]]");
    p = add_epsg_def_ex (filter, first, last, 20078, "epsg", 20078,
        "Pulkovo 1995 / Gauss-Kruger 18N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 18N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",105],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20078\"]]");
    p = add_epsg_def_ex (filter, first, last, 20079, "epsg", 20079,
        "Pulkovo 1995 / Gauss-Kruger 19N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 19N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",111],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20079\"]]");
    p = add_epsg_def_ex (filter, first, last, 20080, "epsg", 20080,
        "Pulkovo 1995 / Gauss-Kruger 20N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 20N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",117],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20080\"]]");
    p = add_epsg_def_ex (filter, first, last, 20081, "epsg", 20081,
        "Pulkovo 1995 / Gauss-Kruger 21N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 21N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",123],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20081\"]]");
    p = add_epsg_def_ex (filter, first, last, 20082, "epsg", 20082,
        "Pulkovo 1995 / Gauss-Kruger 22N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 22N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",129],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20082\"]]");
    p = add_epsg_def_ex (filter, first, last, 20083, "epsg", 20083,
        "Pulkovo 1995 / Gauss-Kruger 23N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 23N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",135],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20083\"]]");
    p = add_epsg_def_ex (filter, first, last, 20084, "epsg", 20084,
        "Pulkovo 1995 / Gauss-Kruger 24N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 24N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",141],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20084\"]]");
    p = add_epsg_def_ex (filter, first, last, 20085, "epsg", 20085,
        "Pulkovo 1995 / Gauss-Kruger 25N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 25N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",147],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20085\"]]");
    p = add_epsg_def_ex (filter, first, last, 20086, "epsg", 20086,
        "Pulkovo 1995 / Gauss-Kruger 26N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 26N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",153],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20086\"]]");
    p = add_epsg_def_ex (filter, first, last, 20087, "epsg", 20087,
        "Pulkovo 1995 / Gauss-Kruger 27N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 27N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",159],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20087\"]]");
    p = add_epsg_def_ex (filter, first, last, 20088, "epsg", 20088,
        "Pulkovo 1995 / Gauss-Kruger 28N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 28N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",165],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20088\"]]");
    p = add_epsg_def_ex (filter, first, last, 20089, "epsg", 20089,
        "Pulkovo 1995 / Gauss-Kruger 29N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 29N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",171],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20089\"]]");
    p = add_epsg_def_ex (filter, first, last, 20090, "epsg", 20090,
        "Pulkovo 1995 / Gauss-Kruger 30N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.2");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 30N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",177],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"20090\"]]");
    p = add_epsg_def_ex (filter, first, last, 20091, "epsg", 20091,
        "Pulkovo 1995 / Gauss-Kruger 31N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 31N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-177],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20091\"]]");
    p = add_epsg_def_ex (filter, first, last, 20092, "epsg", 20092,
        "Pulkovo 1995 / Gauss-Kruger 32N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1995", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=24.47,-130.89,-81.56,0,0,0.13,-0.");
    add_proj4text (p, 2,
        "22 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1995 / Gauss-Kruger 32N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1995\",DATUM[\"Pulkovo_1995\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[24.47,-130.89,-81.56,0,0,0.13,-0.22],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6200\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4200\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",-171],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"20092\"]]");
    p = add_epsg_def_ex (filter, first, last, 20135, "epsg", 20135,
        "Adindan / UTM zone 35N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 35N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20135\"]]");
    p = add_epsg_def_ex (filter, first, last, 20136, "epsg", 20136,
        "Adindan / UTM zone 36N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 36N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",33],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20136\"]]");
    p = add_epsg_def_ex (filter, first, last, 20137, "epsg", 20137,
        "Adindan / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 37N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20137\"]]");
    p = add_epsg_def_ex (filter, first, last, 20138, "epsg", 20138,
        "Adindan / UTM zone 38N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Adindan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=clrk80 +towgs84=-166,-15,204,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Adindan / UTM zone 38N\",GEOGCS[\"Adindan\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Adindan\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.14");
    add_srs_wkt (p, 2,
        "5,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-166,-15");
    add_srs_wkt (p, 3,
        ",204,0,0,0,0],AUTHORITY[\"EPSG\",\"6201\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4201\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",45],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"20138\"]]");
    p = add_epsg_def_ex (filter, first, last, 20248, "epsg", 20248,
        "AGD66 / AMG zone 48 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 48 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "66\",DATUM[\"Australian_Geodetic_Datum_1966\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-117.808,-51.536,137.784,0.3");
    add_srs_wkt (p, 4,
        "03,0.446,0.234,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIM");
    add_srs_wkt (p, 5,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4202\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",105],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"20248\"]]");
    p = add_epsg_def_ex (filter, first, last, 20249, "epsg", 20249,
        "AGD66 / AMG zone 49", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 49\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20249\"]]");
    p = add_epsg_def_ex (filter, first, last, 20250, "epsg", 20250,
        "AGD66 / AMG zone 50", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 50\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20250\"]]");
    p = add_epsg_def_ex (filter, first, last, 20251, "epsg", 20251,
        "AGD66 / AMG zone 51", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 51\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20251\"]]");
    p = add_epsg_def_ex (filter, first, last, 20252, "epsg", 20252,
        "AGD66 / AMG zone 52", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 52\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",129],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20252\"]]");
    p = add_epsg_def_ex (filter, first, last, 20253, "epsg", 20253,
        "AGD66 / AMG zone 53", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 53\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",135],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20253\"]]");
    p = add_epsg_def_ex (filter, first, last, 20254, "epsg", 20254,
        "AGD66 / AMG zone 54", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 54\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",141],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20254\"]]");
    p = add_epsg_def_ex (filter, first, last, 20255, "epsg", 20255,
        "AGD66 / AMG zone 55", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 55\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",147],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20255\"]]");
    p = add_epsg_def_ex (filter, first, last, 20256, "epsg", 20256,
        "AGD66 / AMG zone 56", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 56\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",153],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20256\"]]");
    p = add_epsg_def_ex (filter, first, last, 20257, "epsg", 20257,
        "AGD66 / AMG zone 57", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 57\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",159],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20257\"]]");
    p = add_epsg_def_ex (filter, first, last, 20258, "epsg", 20258,
        "AGD66 / AMG zone 58", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1966", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=aust_SA +towgs84=-117.8");
    add_proj4text (p, 1,
        "08,-51.536,137.784,0.303,0.446,0.234,-0.29 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD66 / AMG zone 58\",GEOGCS[\"AGD66\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1966\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-117.808,-51.536,137.784,0.303,0.446,0.2");
    add_srs_wkt (p, 4,
        "34,-0.29],AUTHORITY[\"EPSG\",\"6202\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 5,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4202\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 10,
        "an\",165],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"20258\"]]");
    p = add_epsg_def_ex (filter, first, last, 20348, "epsg", 20348,
        "AGD84 / AMG zone 48 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 48 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"Australian_Geodetic_Datum_1984\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",105],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2034");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 20349, "epsg", 20349,
        "AGD84 / AMG zone 49", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 49\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",111],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20349\"]]");
    p = add_epsg_def_ex (filter, first, last, 20350, "epsg", 20350,
        "AGD84 / AMG zone 50", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 50\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",117],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20350\"]]");
    p = add_epsg_def_ex (filter, first, last, 20351, "epsg", 20351,
        "AGD84 / AMG zone 51", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 51\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",123],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20351\"]]");
    p = add_epsg_def_ex (filter, first, last, 20352, "epsg", 20352,
        "AGD84 / AMG zone 52", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 52\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",129],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20352\"]]");
    p = add_epsg_def_ex (filter, first, last, 20353, "epsg", 20353,
        "AGD84 / AMG zone 53", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 53\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",135],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20353\"]]");
    p = add_epsg_def_ex (filter, first, last, 20354, "epsg", 20354,
        "AGD84 / AMG zone 54", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 54\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",141],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20354\"]]");
    p = add_epsg_def_ex (filter, first, last, 20355, "epsg", 20355,
        "AGD84 / AMG zone 55", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 55\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",147],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20355\"]]");
    p = add_epsg_def_ex (filter, first, last, 20356, "epsg", 20356,
        "AGD84 / AMG zone 56", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 56\",GEOGCS[\"AGD84\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Australian_Geodetic_Datum_1984\",SPHEROID[\"Australian N");
    add_srs_wkt (p, 2,
        "ational Spheroid\",6378160,298.25,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",153],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",10000000],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"20356\"]]");
    p = add_epsg_def_ex (filter, first, last, 20357, "epsg", 20357,
        "AGD84 / AMG zone 57 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 57 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"Australian_Geodetic_Datum_1984\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",159],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2035");
    add_srs_wkt (p, 14,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 20358, "epsg", 20358,
        "AGD84 / AMG zone 58 (deprecated)", 0, 0,
        "Australian National Spheroid", "Greenwich",
        "Australian_Geodetic_Datum_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=aust_SA +towgs84=-134,-");
    add_proj4text (p, 1,
        "48,149,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"AGD84 / AMG zone 58 (deprecated)\",GEOGCS[\"AGD");
    add_srs_wkt (p, 1,
        "84\",DATUM[\"Australian_Geodetic_Datum_1984\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Australian National Spheroid\",6378160,298.25,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7003\"]],TOWGS84[-134,-48,149,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6203\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4203\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",0],PARAMETER[\"central_meridian\",165],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2035");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 20436, "epsg", 20436,
        "Ain el Abd / UTM zone 36N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 36N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",33],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20436\"]]");
    p = add_epsg_def_ex (filter, first, last, 20437, "epsg", 20437,
        "Ain el Abd / UTM zone 37N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 37N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20437\"]]");
    p = add_epsg_def_ex (filter, first, last, 20438, "epsg", 20438,
        "Ain el Abd / UTM zone 38N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 38N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",45],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20438\"]]");
    p = add_epsg_def_ex (filter, first, last, 20439, "epsg", 20439,
        "Ain el Abd / UTM zone 39N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 39N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",51],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20439\"]]");
    p = add_epsg_def_ex (filter, first, last, 20440, "epsg", 20440,
        "Ain el Abd / UTM zone 40N", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / UTM zone 40N\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",57],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20440\"]]");
    p = add_epsg_def_ex (filter, first, last, 20499, "epsg", 20499,
        "Ain el Abd / Bahrain Grid", 0, 0,
        "International 1924", "Greenwich",
        "Ain_el_Abd_1970", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=intl +towgs84=-143,-236,7,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Ain el Abd / Bahrain Grid\",GEOGCS[\"Ain el Abd");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Ain_el_Abd_1970\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-236,7,0,0,0,0],AUTHORITY[\"EPSG\",\"6204\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4204\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",51],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"20499\"]]");
    p = add_epsg_def_ex (filter, first, last, 20538, "epsg", 20538,
        "Afgooye / UTM zone 38N", 0, 0,
        "Krassowsky 1940", "Greenwich",
        "Afgooye", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=krass +towgs84=-43,-163,45,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Afgooye / UTM zone 38N\",GEOGCS[\"Afgooye\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Afgooye\",SPHEROID[\"Krassowsky 1940\",6378245,298.");
    add_srs_wkt (p, 2,
        "3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[-43,-163,45,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6205\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4205\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",4");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"205");
    add_srs_wkt (p, 13,
        "38\"]]");
    p = add_epsg_def_ex (filter, first, last, 20539, "epsg", 20539,
        "Afgooye / UTM zone 39N", 0, 0,
        "Krassowsky 1940", "Greenwich",
        "Afgooye", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=krass +towgs84=-43,-163,45,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Afgooye / UTM zone 39N\",GEOGCS[\"Afgooye\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Afgooye\",SPHEROID[\"Krassowsky 1940\",6378245,298.");
    add_srs_wkt (p, 2,
        "3,AUTHORITY[\"EPSG\",\"7024\"]],TOWGS84[-43,-163,45,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6205\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4205\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",5");
    add_srs_wkt (p, 9,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"205");
    add_srs_wkt (p, 13,
        "39\"]]");
    p = add_epsg_def_ex (filter, first, last, 20790, "epsg", 20790,
        "Lisbon (Lisbon) / Portuguese National Grid", 0, 0,
        "International 1924", "Lisbon",
        "Lisbon_1937_Lisbon", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=");
    add_proj4text (p, 1,
        "200000 +y_0=300000 +ellps=intl +towgs84=-304.046,-60.576");
    add_proj4text (p, 2,
        ",103.64,0,0,0,0 +pm=lisbon +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Lisbon (Lisbon) / Portuguese National Grid\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"Lisbon (Lisbon)\",DATUM[\"Lisbon_1937_Lisbon\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"International 1924\",6378388,297,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7022\"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6803\"]],PRIMEM[\"Lisbon\",-9.1319");
    add_srs_wkt (p, 5,
        "06111111112,AUTHORITY[\"EPSG\",\"8902\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4803\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",39.66666666666666],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",1],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",200000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"20790\"]]");
    p = add_epsg_def_ex (filter, first, last, 20791, "epsg", 20791,
        "Lisbon (Lisbon) / Portuguese Grid", 0, 0,
        "International 1924", "Lisbon",
        "Lisbon_1937_Lisbon", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=1 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=0 +ellps=intl +towgs84=-304.046,-60.576,103.64,0,");
    add_proj4text (p, 2,
        "0,0,0 +pm=lisbon +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Lisbon (Lisbon) / Portuguese Grid\",GEOGCS[\"Li");
    add_srs_wkt (p, 1,
        "sbon (Lisbon)\",DATUM[\"Lisbon_1937_Lisbon\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-304.046,-60.576,103.64,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6803\"]],PRIMEM[\"Lisbon\",-9.1319061111111");
    add_srs_wkt (p, 5,
        "12,AUTHORITY[\"EPSG\",\"8902\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4803\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",39.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",1],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",0],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"20791\"]]");
    p = add_epsg_def_ex (filter, first, last, 20822, "epsg", 20822,
        "Aratu / UTM zone 22S", 0, 0,
        "International 1924", "Greenwich",
        "Aratu", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=intl +towgs84=-151.99,2");
    add_proj4text (p, 1,
        "87.04,-147.45,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Aratu / UTM zone 22S\",GEOGCS[\"Aratu\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Aratu\",SPHEROID[\"International 1924\",6378388,297,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7022\"]],TOWGS84[-151.99,287.04,-147.45");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6208\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4208\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-51],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"20822\"]]");
    p = add_epsg_def_ex (filter, first, last, 20823, "epsg", 20823,
        "Aratu / UTM zone 23S", 0, 0,
        "International 1924", "Greenwich",
        "Aratu", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=intl +towgs84=-151.99,2");
    add_proj4text (p, 1,
        "87.04,-147.45,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Aratu / UTM zone 23S\",GEOGCS[\"Aratu\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Aratu\",SPHEROID[\"International 1924\",6378388,297,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7022\"]],TOWGS84[-151.99,287.04,-147.45");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6208\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4208\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-45],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"20823\"]]");
    p = add_epsg_def_ex (filter, first, last, 20824, "epsg", 20824,
        "Aratu / UTM zone 24S", 0, 0,
        "International 1924", "Greenwich",
        "Aratu", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=intl +towgs84=-151.99,2");
    add_proj4text (p, 1,
        "87.04,-147.45,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Aratu / UTM zone 24S\",GEOGCS[\"Aratu\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Aratu\",SPHEROID[\"International 1924\",6378388,297,AUTH");
    add_srs_wkt (p, 2,
        "ORITY[\"EPSG\",\"7022\"]],TOWGS84[-151.99,287.04,-147.45");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6208\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4208\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-39],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"20824\"]]");
    p = add_epsg_def_ex (filter, first, last, 20934, "epsg", 20934,
        "Arc 1950 / UTM zone 34S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Arc_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1950 / UTM zone 34S\",GEOGCS[\"Arc 1950\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1950\",SPHEROID[\"Clarke 1880 (Arc)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-90,-294,0,0,0,0],AUTHORITY[\"EPSG\",\"6209\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4209\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",21],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20934\"]]");
    p = add_epsg_def_ex (filter, first, last, 20935, "epsg", 20935,
        "Arc 1950 / UTM zone 35S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Arc_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1950 / UTM zone 35S\",GEOGCS[\"Arc 1950\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1950\",SPHEROID[\"Clarke 1880 (Arc)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-90,-294,0,0,0,0],AUTHORITY[\"EPSG\",\"6209\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4209\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",27],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20935\"]]");
    p = add_epsg_def_ex (filter, first, last, 20936, "epsg", 20936,
        "Arc 1950 / UTM zone 36S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Arc_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1950 / UTM zone 36S\",GEOGCS[\"Arc 1950\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1950\",SPHEROID[\"Clarke 1880 (Arc)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "143,-90,-294,0,0,0,0],AUTHORITY[\"EPSG\",\"6209\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4209\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",33],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"20936\"]]");
    p = add_epsg_def_ex (filter, first, last, 21035, "epsg", 21035,
        "Arc 1960 / UTM zone 35S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +ellps=clrk80 +towgs84=-160,-6");
    add_proj4text (p, 1,
        ",-302,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 35S\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",27],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21035\"]]");
    p = add_epsg_def_ex (filter, first, last, 21036, "epsg", 21036,
        "Arc 1960 / UTM zone 36S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=clrk80 +towgs84=-160,-6");
    add_proj4text (p, 1,
        ",-302,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 36S\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",33],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21036\"]]");
    p = add_epsg_def_ex (filter, first, last, 21037, "epsg", 21037,
        "Arc 1960 / UTM zone 37S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=clrk80 +towgs84=-160,-6");
    add_proj4text (p, 1,
        ",-302,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 37S\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21037\"]]");
    p = add_epsg_def_ex (filter, first, last, 21095, "epsg", 21095,
        "Arc 1960 / UTM zone 35N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=clrk80 +towgs84=-160,-6,-302,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 35N\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",27],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21095\"]]");
    p = add_epsg_def_ex (filter, first, last, 21096, "epsg", 21096,
        "Arc 1960 / UTM zone 36N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=clrk80 +towgs84=-160,-6,-302,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 36N\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",33],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21096\"]]");
    p = add_epsg_def_ex (filter, first, last, 21097, "epsg", 21097,
        "Arc 1960 / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Arc_1960", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-160,-6,-302,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Arc 1960 / UTM zone 37N\",GEOGCS[\"Arc 1960\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Arc_1960\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-160,");
    add_srs_wkt (p, 3,
        "-6,-302,0,0,0,0],AUTHORITY[\"EPSG\",\"6210\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4210\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",39],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21097\"]]");
    p = add_epsg_def_ex (filter, first, last, 21100, "epsg", 21100,
        "Batavia (Jakarta) / NEIEZ (deprecated)", 0, 0,
        "Bessel 1841", "Jakarta",
        "Batavia_Jakarta", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=-377,681,-50,0,0,0,0 +pm=jakarta ");
    add_proj4text (p, 2,
        "+units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia (Jakarta) / NEIEZ (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Batavia (Jakarta)\",DATUM[\"Batavia_Jakarta\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7004\"]],TOWGS84[-377,681,-50,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6813\"]],PRIMEM[\"Jakarta\",106.8077194444444");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8908\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"48");
    add_srs_wkt (p, 8,
        "13\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",110],PARAMETER[\"scale_factor\",0.997],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",3900000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",900000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"21100\"]]");
    p = add_epsg_def_ex (filter, first, last, 21148, "epsg", 21148,
        "Batavia / UTM zone 48S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Batavia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=bessel +towgs84=-377,68");
    add_proj4text (p, 1,
        "1,-50,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia / UTM zone 48S\",GEOGCS[\"Batavia\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Batavia\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-377,681,-");
    add_srs_wkt (p, 3,
        "50,0,0,0,0],AUTHORITY[\"EPSG\",\"6211\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4211\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",105],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"21148\"]]");
    p = add_epsg_def_ex (filter, first, last, 21149, "epsg", 21149,
        "Batavia / UTM zone 49S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Batavia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=bessel +towgs84=-377,68");
    add_proj4text (p, 1,
        "1,-50,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia / UTM zone 49S\",GEOGCS[\"Batavia\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Batavia\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-377,681,-");
    add_srs_wkt (p, 3,
        "50,0,0,0,0],AUTHORITY[\"EPSG\",\"6211\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4211\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"21149\"]]");
    p = add_epsg_def_ex (filter, first, last, 21150, "epsg", 21150,
        "Batavia / UTM zone 50S", 0, 0,
        "Bessel 1841", "Greenwich",
        "Batavia", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=bessel +towgs84=-377,68");
    add_proj4text (p, 1,
        "1,-50,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Batavia / UTM zone 50S\",GEOGCS[\"Batavia\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Batavia\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-377,681,-");
    add_srs_wkt (p, 3,
        "50,0,0,0,0],AUTHORITY[\"EPSG\",\"6211\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4211\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"21150\"]]");
    p = add_epsg_def_ex (filter, first, last, 21291, "epsg", 21291,
        "Barbados 1938 / British West Indies Grid", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Barbados_1938", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x");
    add_proj4text (p, 1,
        "_0=400000 +y_0=0 +ellps=clrk80 +towgs84=31.95,300.99,419");
    add_proj4text (p, 2,
        ".19,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Barbados 1938 / British West Indies Grid\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Barbados 1938\",DATUM[\"Barbados_1938\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Clarke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7012\"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6212\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");









































































































































































































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4212\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",-62],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9995],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",400000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"21291\"]]");
    p = add_epsg_def_ex (filter, first, last, 21292, "epsg", 21292,
        "Barbados 1938 / Barbados National Grid", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Barbados_1938", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=13.17638888888889 +lon_0=-59.55972222");
    add_proj4text (p, 1,
        "222222 +k=0.9999986 +x_0=30000 +y_0=75000 +ellps=clrk80 ");
    add_proj4text (p, 2,
        "+towgs84=31.95,300.99,419.19,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Barbados 1938 / Barbados National Grid\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Barbados 1938\",DATUM[\"Barbados_1938\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7012\"]],TOWGS84[31.95,300.99,419.19,0,0,0,0],AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"6212\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[");
    add_srs_wkt (p, 5,
        "\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,A");
    add_srs_wkt (p, 6,
        "UTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AX");
    add_srs_wkt (p, 7,
        "IS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4212\"]],PRO");
    add_srs_wkt (p, 8,
        "JECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",13.17638888888889],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-59.55972222222222],PARAMETER[\"scale_factor\",0.999");
    add_srs_wkt (p, 11,
        "9986],PARAMETER[\"false_easting\",30000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",75000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"21292\"]]");
    p = add_epsg_def_ex (filter, first, last, 21413, "epsg", 21413,
        "Beijing 1954 / Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 13\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",75],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",13500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21413\"]]");
    p = add_epsg_def_ex (filter, first, last, 21414, "epsg", 21414,
        "Beijing 1954 / Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 14\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",81],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",14500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21414\"]]");
    p = add_epsg_def_ex (filter, first, last, 21415, "epsg", 21415,
        "Beijing 1954 / Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 15\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",87],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",15500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21415\"]]");
    p = add_epsg_def_ex (filter, first, last, 21416, "epsg", 21416,
        "Beijing 1954 / Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 16\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",93],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",16500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21416\"]]");
    p = add_epsg_def_ex (filter, first, last, 21417, "epsg", 21417,
        "Beijing 1954 / Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 17\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",99],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",1],PARAMETER[\"false_easting\",17500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21417\"]]");
    p = add_epsg_def_ex (filter, first, last, 21418, "epsg", 21418,
        "Beijing 1954 / Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 18\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",105],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",18500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21418\"]]");
    p = add_epsg_def_ex (filter, first, last, 21419, "epsg", 21419,
        "Beijing 1954 / Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 19\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",111],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",19500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21419\"]]");
    p = add_epsg_def_ex (filter, first, last, 21420, "epsg", 21420,
        "Beijing 1954 / Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 20\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",117],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",20500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21420\"]]");
    p = add_epsg_def_ex (filter, first, last, 21421, "epsg", 21421,
        "Beijing 1954 / Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 21\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",123],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",21500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21421\"]]");
    p = add_epsg_def_ex (filter, first, last, 21422, "epsg", 21422,
        "Beijing 1954 / Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 22\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",129],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",22500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21422\"]]");
    p = add_epsg_def_ex (filter, first, last, 21423, "epsg", 21423,
        "Beijing 1954 / Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger zone 23\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",135],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",23500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"21423\"]]");
    p = add_epsg_def_ex (filter, first, last, 21453, "epsg", 21453,
        "Beijing 1954 / Gauss-Kruger CM 75E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 75E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21453\"]]");
    p = add_epsg_def_ex (filter, first, last, 21454, "epsg", 21454,
        "Beijing 1954 / Gauss-Kruger CM 81E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 81E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21454\"]]");
    p = add_epsg_def_ex (filter, first, last, 21455, "epsg", 21455,
        "Beijing 1954 / Gauss-Kruger CM 87E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 87E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21455\"]]");
    p = add_epsg_def_ex (filter, first, last, 21456, "epsg", 21456,
        "Beijing 1954 / Gauss-Kruger CM 93E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 93E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21456\"]]");
    p = add_epsg_def_ex (filter, first, last, 21457, "epsg", 21457,
        "Beijing 1954 / Gauss-Kruger CM 99E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 99E\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "eijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "14\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"21457\"]]");
    p = add_epsg_def_ex (filter, first, last, 21458, "epsg", 21458,
        "Beijing 1954 / Gauss-Kruger CM 105E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 105E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",105],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21458\"]]");
    p = add_epsg_def_ex (filter, first, last, 21459, "epsg", 21459,
        "Beijing 1954 / Gauss-Kruger CM 111E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 111E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",111],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21459\"]]");
    p = add_epsg_def_ex (filter, first, last, 21460, "epsg", 21460,
        "Beijing 1954 / Gauss-Kruger CM 117E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 117E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",117],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21460\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135

























































































































































































































































































































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_39 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 26917, "epsg", 26917,
        "NAD83 / UTM zone 17N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 17N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26917\"]]");
    p = add_epsg_def_ex (filter, first, last, 26918, "epsg", 26918,
        "NAD83 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 18N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-75],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26918\"]]");
    p = add_epsg_def_ex (filter, first, last, 26919, "epsg", 26919,
        "NAD83 / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 19N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-69],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26919\"]]");
    p = add_epsg_def_ex (filter, first, last, 26920, "epsg", 26920,
        "NAD83 / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 20N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-63],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26920\"]]");
    p = add_epsg_def_ex (filter, first, last, 26921, "epsg", 26921,
        "NAD83 / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 21N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-57],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26921\"]]");
    p = add_epsg_def_ex (filter, first, last, 26922, "epsg", 26922,
        "NAD83 / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 22N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-51],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26922\"]]");
    p = add_epsg_def_ex (filter, first, last, 26923, "epsg", 26923,
        "NAD83 / UTM zone 23N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 23N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-45],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26923\"]]");
    p = add_epsg_def_ex (filter, first, last, 26929, "epsg", 26929,
        "NAD83 / Alabama East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alabama East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-85.83333333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99996],PARAMETER[\"false_easting\",200000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"26929\"]]");
    p = add_epsg_def_ex (filter, first, last, 26930, "epsg", 26930,
        "NAD83 / Alabama West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=6");
    add_proj4text (p, 1,
        "00000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alabama West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-87.5],PARAMETER[\"scale_factor\",0.999933333],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",600000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"26930\"]]");
    p = add_epsg_def_ex (filter, first, last, 26931, "epsg", 26931,
        "NAD83 / Alaska zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Hotine_Oblique_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=32");
    add_proj4text (p, 1,
        "3.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +no");
    add_proj4text (p, 2,
        "_uoff +gamma=323.1301023611111 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 3,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 1\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Hotine_Oblique_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_center\",57],PARAMETER[\"longit");
    add_srs_wkt (p, 9,
        "ude_of_center\",-133.6666666666667],PARAMETER[\"azimuth\"");
    add_srs_wkt (p, 10,
        ",323.1301023611111],PARAMETER[\"rectified_grid_angle\",3");
    add_srs_wkt (p, 11,
        "23.1301023611111],PARAMETER[\"scale_factor\",0.9999],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_easting\",5000000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 13,
        "hing\",-5000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"26931\"]]");
    p = add_epsg_def_ex (filter, first, last, 26932, "epsg", 26932,
        "NAD83 / Alaska zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 2\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-142],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "32\"]]");
    p = add_epsg_def_ex (filter, first, last, 26933, "epsg", 26933,
        "NAD83 / Alaska zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 3\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-146],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "33\"]]");
    p = add_epsg_def_ex (filter, first, last, 26934, "epsg", 26934,
        "NAD83 / Alaska zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 4\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-150],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "34\"]]");
    p = add_epsg_def_ex (filter, first, last, 26935, "epsg", 26935,
        "NAD83 / Alaska zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 5\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-154],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "35\"]]");
    p = add_epsg_def_ex (filter, first, last, 26936, "epsg", 26936,
        "NAD83 / Alaska zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 6\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-158],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "36\"]]");
    p = add_epsg_def_ex (filter, first, last, 26937, "epsg", 26937,
        "NAD83 / Alaska zone 7", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 7\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-162],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "37\"]]");
    p = add_epsg_def_ex (filter, first, last, 26938, "epsg", 26938,
        "NAD83 / Alaska zone 8", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 8\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-166],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "38\"]]");
    p = add_epsg_def_ex (filter, first, last, 26939, "epsg", 26939,
        "NAD83 / Alaska zone 9", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 9\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-170],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "39\"]]");
    p = add_epsg_def_ex (filter, first, last, 26940, "epsg", 26940,
        "NAD83 / Alaska zone 10", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333");
    add_proj4text (p, 1,
        "334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 10\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",53.83333333333");
    add_srs_wkt (p, 9,
        "334],PARAMETER[\"standard_parallel_2\",51.83333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",51],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-176],PARAMETER[\"false_easting\",1000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"26940\"]]");
    p = add_epsg_def_ex (filter, first, last, 26941, "epsg", 26941,
        "NAD83 / California zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.3");
    add_proj4text (p, 1,
        "3333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 1\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",41.66666666");
    add_srs_wkt (p, 9,
        "666666],PARAMETER[\"standard_parallel_2\",40],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",39.33333333333334],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-122],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",500000],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26941\"]]");
    p = add_epsg_def_ex (filter, first, last, 26942, "epsg", 26942,
        "NAD83 / California zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y");
    add_proj4text (p, 2,
        "_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 2\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",39.83333333");
    add_srs_wkt (p, 9,
        "333334],PARAMETER[\"standard_parallel_2\",38.33333333333");
    add_srs_wkt (p, 10,
        "334],PARAMETER[\"latitude_of_origin\",37.66666666666666]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"central_meridian\",-122],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",2000000],PARAMETER[\"false_northing\",500000],");
    add_srs_wkt (p, 13,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26942\"]]");
    p = add_epsg_def_ex (filter, first, last, 26943, "epsg", 26943,
        "NAD83 / California zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 3\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",38.43333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"standard_parallel_2\",37.06666666666");
    add_srs_wkt (p, 10,
        "667],PARAMETER[\"latitude_of_origin\",36.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-120.5],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 12,
        "000000],PARAMETER[\"false_northing\",500000],UNIT[\"metr");
    add_srs_wkt (p, 13,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26943\"]]");
    p = add_epsg_def_ex (filter, first, last, 26944, "epsg", 26944,
        "NAD83 / California zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.3333333333333");
    add_proj4text (p, 1,
        "4 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 4\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",37.25],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",36],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 10,
        "f_origin\",35.33333333333334],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-119],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",500000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"26944\"]]");
    p = add_epsg_def_ex (filter, first, last, 26945, "epsg", 26945,
        "NAD83 / California zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 5\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",35.46666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"standard_parallel_2\",34.03333333333");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"latitude_of_origin\",33.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-118],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",500000],UNIT[\"metre\"");
    add_srs_wkt (p, 13,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26945\"]]");
    p = add_epsg_def_ex (filter, first, last, 26946, "epsg", 26946,
        "NAD83 / California zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000");
    add_proj4text (p, 2,
        " +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 3,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 6\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",33.88333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"standard_parallel_2\",32.78333333333");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"latitude_of_origin\",32.16666666666666]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"central_meridian\",-116.25],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",2000000],PARAMETER[\"false_northing\",50000");
    add_srs_wkt (p, 13,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26946\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26948, "epsg", 26948,
        "NAD83 / Arizona East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arizona East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",31],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-110.1666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999],PARAMETER[\"false_easting\",213360],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26948\"]]");
    p = add_epsg_def_ex (filter, first, last, 26949, "epsg", 26949,
        "NAD83 / Arizona Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arizona Central\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-111.9166666666667],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.9999],PARAMETER[\"false_easting\",213360],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"26949\"]]");
    p = add_epsg_def_ex (filter, first, last, 26950, "epsg", 26950,
        "NAD83 / Arizona West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0");
    add_proj4text (p, 1,
        "=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arizona West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",31],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-113.75],PARAMETER[\"scale_factor\",0.999933333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",213360],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"26950\"]]");
    p = add_epsg_def_ex (filter, first, last, 26951, "epsg", 26951,
        "NAD83 / Arkansas North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arkansas North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",36.23333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",34.93333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",34.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-92],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",400000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 13,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26951\"]]");
    p = add_epsg_def_ex (filter, first, last, 26952, "epsg", 26952,
        "NAD83 / Arkansas South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arkansas South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",34.76666666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"standard_parallel_2\",33.3],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",32.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-92],PARAMETER[\"false_easting\",400000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",400000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26952\"]]");
    p = add_epsg_def_ex (filter, first, last, 26953, "epsg", 26953,
        "NAD83 / Colorado North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8");
    add_proj4text (p, 2,
        "289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 3,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Colorado North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",40.78333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",39.71666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",39.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-105.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",914401.8289],PARAMETER[\"false_northing\",30480");
    add_srs_wkt (p, 13,
        "0.6096],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 15,
        "6953\"]]");
    p = add_epsg_def_ex (filter, first, last, 26954, "epsg", 26954,
        "NAD83 / Colorado Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.8333333333");
    add_proj4text (p, 1,
        "3334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Colorado Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",39.75],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",38.45],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",37.83333333333334],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-105.5],PARAMETER[\"false_easting\",914401.8289],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",304800.6096],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26954\"]]");
    p = add_epsg_def_ex (filter, first, last, 26955, "epsg", 26955,
        "NAD83 / Colorado South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8");
    add_proj4text (p, 2,
        "289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 3,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Colorado South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",38.43333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",37.23333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",36.66666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-105.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",914401.8289],PARAMETER[\"false_northing\",30480");
    add_srs_wkt (p, 13,
        "0.6096],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 15,
        "6955\"]]");
    p = add_epsg_def_ex (filter, first, last, 26956, "epsg", 26956,
        "NAD83 / Connecticut", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40");
    add_proj4text (p, 1,
        ".83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=1524");
    add_proj4text (p, 2,
        "00.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Connecticut\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",41.86666666666667");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",41.2],PARAMETER[\"la");
    add_srs_wkt (p, 10,
        "titude_of_origin\",40.83333333333334],PARAMETER[\"centra");
    add_srs_wkt (p, 11,
        "l_meridian\",-72.75],PARAMETER[\"false_easting\",304800.");
    add_srs_wkt (p, 12,
        "6096],PARAMETER[\"false_northing\",152400.3048],UNIT[\"m");
    add_srs_wkt (p, 13,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26956\"]]");
    p = add_epsg_def_ex (filter, first, last, 26957, "epsg", 26957,
        "NAD83 / Delaware", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999");
    add_proj4text (p, 1,
        "995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Delaware\",GEOGCS[\"NAD83\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",38],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-75.41666666666667],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "99995],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26957\"]]");
    p = add_epsg_def_ex (filter, first, last, 26958, "epsg", 26958,
        "NAD83 / Florida East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Florida East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",24.33333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-81],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999941177],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"26958\"]]");
    p = add_epsg_def_ex (filter, first, last, 26959, "epsg", 26959,
        "NAD83 / Florida West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Florida West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",24.33333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-82],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999941177],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"26959\"]]");
    p = add_epsg_def_ex (filter, first, last, 26960, "epsg", 26960,
        "NAD83 / Florida North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=2");
    add_proj4text (p, 1,
        "9 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Florida North\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",30.75],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",29.58333333333333],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",29],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "84.5],PARAMETER[\"false_easting\",600000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"26960\"]]");
    p = add_epsg_def_ex (filter, first, last, 26961, "epsg", 26961,
        "NAD83 / Hawaii zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.");
    add_proj4text (p, 1,
        "999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 2,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 1\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",18.83333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-155.5],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999966667],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26961\"]]");
    p = add_epsg_def_ex (filter, first, last, 26962, "epsg", 26962,
        "NAD83 / Hawaii zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 2\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",20.33333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-156.6666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.999966667],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26962\"]]");
    p = add_epsg_def_ex (filter, first, last, 26963, "epsg", 26963,
        "NAD83 / Hawaii zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99");
    add_proj4text (p, 1,
        "999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 3\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",21.16666666666667],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-158],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99999],PARAMETER[\"false_easting\",500000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"26963\"]]");
    p = add_epsg_def_ex (filter, first, last, 26964, "epsg", 26964,
        "NAD83 / Hawaii zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.");
    add_proj4text (p, 1,
        "99999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0");
    add_proj4text (p, 2,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 4\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",21.83333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-159.5],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99999],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"26964\"]]");
    p = add_epsg_def_ex (filter, first, last, 26965, "epsg", 26965,
        "NAD83 / Hawaii zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 2,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 5\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",21.66666666666667],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-160.1666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"26965\"]]");
    p = add_epsg_def_ex (filter, first, last, 26966, "epsg", 26966,
        "NAD83 / Georgia East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Georgia East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-82.16666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26966\"]]");
    p = add_epsg_def_ex (filter, first, last, 26967, "epsg", 26967,
        "NAD83 / Georgia West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Georgia West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-84.16666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999],PARAMETER[\"false_easting\",700000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26967\"]]");
    p = add_epsg_def_ex (filter, first, last, 26968, "epsg", 26968,
        "NAD83 / Idaho East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Idaho East\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",41.66666666666666],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-112.1666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.999947368],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26968\"]]");
    p = add_epsg_def_ex (filter, first, last, 26969, "epsg", 26969,
        "NAD83 / Idaho Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.99");
    add_proj4text (p, 1,
        "99473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Idaho Central\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",41.66666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-114],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999947368],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26969\"]]");
    p = add_epsg_def_ex (filter, first, last, 26970, "epsg", 26970,
        "NAD83 / Idaho West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Idaho West\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",41.66666666666666],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-115.75],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999933333],PARAMETER[\"false_easting\",800000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26970\"]]");
    p = add_epsg_def_ex (filter, first, last, 26971, "epsg", 26971,
        "NAD83 / Illinois East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Illinois East\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36.66666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-88.33333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.999975],PARAMETER[\"false_easting\",300");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"26971\"]]");
    p = add_epsg_def_ex (filter, first, last, 26972, "epsg", 26972,
        "NAD83 / Illinois West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Illinois West\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36.66666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-90.16666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.999941177],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "700000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26972\"]]");
    p = add_epsg_def_ex (filter, first, last, 26973, "epsg", 26973,
        "NAD83 / Indiana East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0");
    add_proj4text (p, 2,
        ",0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Indiana East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",37.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-85.66666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999966667],PARAMETER[\"false_easting\",100000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",250000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26973\"]]");
    p = add_epsg_def_ex (filter, first, last, 26974, "epsg", 26974,
        "NAD83 / Indiana West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0");
    add_proj4text (p, 2,
        ",0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Indiana West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",37.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-87.08333333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999966667],PARAMETER[\"false_easting\",900000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",250000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26974\"]]");
    p = add_epsg_def_ex (filter, first, last, 26975, "epsg", 26975,
        "NAD83 / Iowa North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Iowa North\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",43.26666666666667]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",42.06666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",41.5],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-93.5],PARAMETER[\"false_easting\",1500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26975\"]]");
    p = add_epsg_def_ex (filter, first, last, 26976, "epsg", 26976,
        "NAD83 / Iowa South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666");
    add_proj4text (p, 1,
        "667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Iowa South\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",41.78333333333333]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",40.61666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",40],PARAMETER[\"central_m");
    add_srs_wkt (p, 11,
        "eridian\",-93.5],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"26976\"]]");
    p = add_epsg_def_ex (filter, first, last, 26977, "epsg", 26977,
        "NAD83 / Kansas North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kansas North\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",39.78333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",38.71666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",38.33333333333334],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-98],PARAMETER[\"false_easting");
    add_srs_wkt (p, 12,
        "\",400000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 13,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26977\"]]");
    p = add_epsg_def_ex (filter, first, last, 26978, "epsg", 26978,
        "NAD83 / Kansas South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y");
    add_proj4text (p, 2,
        "_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kansas South\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",38.56666666666667");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",37.26666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",36.66666666666666],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-98.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",400000],PARAMETER[\"false_northing\",400000],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26978\"]]");
    p = add_epsg_def_ex (filter, first, last, 26979, "epsg", 26979,
        "NAD83 / Kentucky North (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kentucky North (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"G");
    add_srs_wkt (p, 2,
        "RS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"701");
    add_srs_wkt (p, 3,
        "9\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",3");
    add_srs_wkt (p, 9,
        "7.96666666666667],PARAMETER[\"standard_parallel_2\",37.9");
    add_srs_wkt (p, 10,
        "6666666666667],PARAMETER[\"latitude_of_origin\",37.5],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-84.25],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26979\"]]");
    p = add_epsg_def_ex (filter, first, last, 26980, "epsg", 26980,
        "NAD83 / Kentucky South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +");
    add_proj4text (p, 2,
        "y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kentucky South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",37.93333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",36.73333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",36.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-85.75],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",500000],PARAMETER[\"false_northing\",500000],UN");
    add_srs_wkt (p, 13,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 14,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26980\"]]");
    p = add_epsg_def_ex (filter, first, last, 26981, "epsg", 26981,
        "NAD83 / Louisiana North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Louisiana North\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",32.6666666666");
    add_srs_wkt (p, 9,
        "6666],PARAMETER[\"standard_parallel_2\",31.1666666666666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"latitude_of_origin\",30.5],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-92.5],PARAMETER[\"false_easting\",1000");
    add_srs_wkt (p, 12,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26981\"]]");
    p = add_epsg_def_ex (filter, first, last, 26982, "epsg", 26982,
        "NAD83 / Louisiana South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91");
    add_proj4text (p, 1,
        ".33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs8");
    add_proj4text (p, 2,
        "4=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Louisiana South\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",30.7],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"standard_parallel_2\",29.3],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 10,
        "_origin\",28.5],PARAMETER[\"central_meridian\",-91.33333");
    add_srs_wkt (p, 11,
        "333333333],PARAMETER[\"false_easting\",1000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"26982\"]]");
    p = add_epsg_def_ex (filter, first, last, 26983, "epsg", 26983,
        "NAD83 / Maine East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine East\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",43.66666666666666],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-68.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26983\"]]");
    p = add_epsg_def_ex (filter, first, last, 26984, "epsg", 26984,
        "NAD83 / Maine West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine West\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",42.83333333333334],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-70.16666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.999966667],PARAMETER[\"false_easting\",9");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26984\"]]");
    p = add_epsg_def_ex (filter, first, last, 26985, "epsg", 26985,
        "NAD83 / Maryland", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maryland\",GEOGCS[\"NAD83\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"standard_parallel_1\",39.45],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",38.3],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 10,
        "n\",37.66666666666666],PARAMETER[\"central_meridian\",-7");
    add_srs_wkt (p, 11,
        "7],PARAMETER[\"false_easting\",400000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"26985\"]]");
    p = add_epsg_def_ex (filter, first, last, 26986, "epsg", 26986,
        "NAD83 / Massachusetts Mainland", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Massachusetts Mainland\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",42.6833");
    add_srs_wkt (p, 9,
        "3333333333],PARAMETER[\"standard_parallel_2\",41.7166666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"latitude_of_origin\",41],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-71.5],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 12,
        "200000],PARAMETER[\"false_northing\",750000],UNIT[\"metr");
    add_srs_wkt (p, 13,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26986\"]]");
    p = add_epsg_def_ex (filter, first, last, 26987, "epsg", 26987,
        "NAD83 / Massachusetts Island", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333");
    add_proj4text (p, 1,
        "333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Massachusetts Island\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41.48333");
    add_srs_wkt (p, 9,
        "333333333],PARAMETER[\"standard_parallel_2\",41.28333333");
    add_srs_wkt (p, 10,
        "333333],PARAMETER[\"latitude_of_origin\",41],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-70.5],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26987\"]]");
    p = add_epsg_def_ex (filter, first, last, 26988, "epsg", 26988,
        "NAD83 / Michigan North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_");
    add_proj4text (p, 2,
        "0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Michigan North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",47.08333333333");
    add_srs_wkt (p, 9,
        "334],PARAMETER[\"standard_parallel_2\",45.48333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",44.78333333333333],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-87],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",8000000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 13,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 14,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26988\"]]");
    p = add_epsg_def_ex (filter, first, last, 26989, "epsg", 26989,
        "NAD83 / Michigan Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43");
    add_proj4text (p, 1,
        ".31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Michigan Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",45.7],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"standard_parallel_2\",44.18333333333333],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",43.31666666666667],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-84.36666666666666],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",6000000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26989\"]]");
    p = add_epsg_def_ex (filter, first, last, 26990, "epsg", 26990,
        "NAD83 / Michigan South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41");
    add_proj4text (p, 1,
        ".5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Michigan South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",43.66666666666");
    add_srs_wkt (p, 9,
        "666],PARAMETER[\"standard_parallel_2\",42.1],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",41.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-84.36666666666666],PARAMETER[\"false_easting\",4000000");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"26990\"]]");
    p = add_epsg_def_ex (filter, first, last, 26991, "epsg", 26991,
        "NAD83 / Minnesota North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y");
    add_proj4text (p, 2,
        "_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota North\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",48.6333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",47.0333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",46.5],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-93.1],PARAMETER[\"false_easting\",8000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",100000],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26991\"]]");
    p = add_epsg_def_ex (filter, first, last, 26992, "epsg", 26992,
        "NAD83 / Minnesota Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +to");
    add_proj4text (p, 2,
        "wgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota Central\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",47.05],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",45.61666666666667],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",45],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-94.25],PARAMETER[\"false_easting\",800000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",100000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"26992\"]]");
    p = add_epsg_def_ex (filter, first, last, 26993, "epsg", 26993,
        "NAD83 / Minnesota South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota South\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",45.2166666666");
    add_srs_wkt (p, 9,
        "6667],PARAMETER[\"standard_parallel_2\",43.7833333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",43],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-94],PARAMETER[\"false_easting\",800000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",100000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26993\"]]");
    p = add_epsg_def_ex (filter, first, last, 26994, "epsg", 26994,
        "NAD83 / Mississippi East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Mississippi East\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",29.5],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",-88.83333333333333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.99995],PARAMETER[\"false_easting\",300000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26994\"]]");
    p = add_epsg_def_ex (filter, first, last, 26995, "epsg", 26995,
        "NAD83 / Mississippi West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Mississippi West\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",29.5],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",-90.33333333333333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.99995],PARAMETER[\"false_easting\",700000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26995\"]]");
    p = add_epsg_def_ex (filter, first, last, 26996, "epsg", 26996,
        "NAD83 / Missouri East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Missouri East\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",35.83333333333334],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-90.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999933333],PARAMETER[\"false_easting\",250000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26996\"]]");
    p = add_epsg_def_ex (filter, first, last, 26997, "epsg", 26997,
        "NAD83 / Missouri Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Missouri Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",35.83333333333334],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-92.5],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.999933333],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26997\"]]");
    p = add_epsg_def_ex (filter, first, last, 26998, "epsg", 26998,
        "NAD83 / Missouri West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9");
    add_proj4text (p, 1,
        "99941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Missouri West\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36.16666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-94.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999941177],PARAMETER[\"false_easting\",850000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26998\"]]");
    p = add_epsg_def_ex (filter, first, last, 27037, "epsg", 27037,
        "Nahrwan 1967 / UTM zone 37N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 37N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",39],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"27037\"]]");
    p = add_epsg_def_ex (filter, first, last, 27038, "epsg", 27038,
        "Nahrwan 1967 / UTM zone 38N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 38N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",45],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"27038\"]]");
    p = add_epsg_def_ex (filter, first, last, 27039, "epsg", 27039,
        "Nahrwan 1967 / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 39N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",51],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"27039\"]]");
    p = add_epsg_def_ex (filter, first, last, 27040, "epsg", 27040,
        "Nahrwan 1967 / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-242.2,-144.9,");
    add_proj4text (p, 1,
        "370.3,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 40N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-242.2,-144.9,370.3,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",57],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"27040\"]]");
    p = add_epsg_def_ex (filter, first, last, 27120, "epsg", 27120,
        "Naparima 1972 / UTM zone 20N", 0, 0,
        "International 1924", "Greenwich",
        "Naparima_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=intl +towgs84=-10,375,165,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Naparima 1972 / UTM zone 20N\",GEOGCS[\"Naparim");
    add_srs_wkt (p, 1,
        "a 1972\",DATUM[\"Naparima_1972\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 2,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-10,375,165,0,0,0,0],AUTHORITY[\"EPSG\",\"6271\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4271\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",-63],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"27120\"]]");
    p = add_epsg_def_ex (filter, first, last, 27200, "epsg", 27200,
        "NZGD49 / New Zealand Map Grid", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "New_Zealand_Map_Grid", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=60231");
    add_proj4text (p, 1,
        "50 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.0");
    add_proj4text (p, 2,
        "24,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / New Zealand Map Grid\",GEOGCS[\"NZGD49");
    add_srs_wkt (p, 1,
        "\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"New_Zealand_Map_Grid\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",-41],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",173],PARAMETER[\"false_easting\",2510000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",6023150],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"27200\"]]");
    p = add_epsg_def_ex (filter, first, last, 27205, "epsg", 27205,
        "NZGD49 / Mount Eden Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393");
    add_proj4text (p, 1,
        "611111 +k=0.9999 +x_0=300000 +y_0=700000 +ellps=intl +to");
    add_proj4text (p, 2,
        "wgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=");
    add_proj4text (p, 3,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount Eden Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-36.87986527777778],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",174.7643393611111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",0.9999],PARAMETER[\"false_easting\",300000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Eastin");
    add_srs_wkt (p, 14,
        "g\",EAST],AUTHORITY[\"EPSG\",\"27205\"]]");
    p = add_epsg_def_ex (filter, first, last, 27206, "epsg", 27206,
        "NZGD49 / Bay of Plenty Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.4661972");
    add_proj4text (p, 1,
        "5 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Bay of Plenty Circuit\",GEOGCS[\"NZGD4");
    add_srs_wkt (p, 1,
        "9\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",-37.76124980555556],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",176.46619725],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",300000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 14,
        "T],AUTHORITY[\"EPSG\",\"27206\"]]");
    p = add_epsg_def_ex (filter, first, last, 27207, "epsg", 27207,
        "NZGD49 / Poverty Bay Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362");
    add_proj4text (p, 1,
        "777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Poverty Bay Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-38.62470277777778],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",177.8856362777778],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27207\"]]");
    p = add_epsg_def_ex (filter, first, last, 27208, "epsg", 27208,
        "NZGD49 / Hawkes Bay Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805");
    add_proj4text (p, 1,
        "277778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Hawkes Bay Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-39.65092930555556],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",176.6736805277778],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27208\"]]");
    p = add_epsg_def_ex (filter, first, last, 27209, "epsg", 27209,
        "NZGD49 / Taranaki Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.2280117");
    add_proj4text (p, 1,
        "5 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Taranaki Circuit\",GEOGCS[\"NZGD49\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-39.13575830555556],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",174.22801175],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",300000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"27209\"]]");
    p = add_epsg_def_ex (filter, first, last, 27210, "epsg", 27210,
        "NZGD49 / Tuhirangi Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368");
    add_proj4text (p, 1,
        "055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Tuhirangi Circuit\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-39.51247038888889],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",175.6400368055556],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 14,
        "ST],AUTHORITY[\"EPSG\",\"27210\"]]");
    p = add_epsg_def_ex (filter, first, last, 27211, "epsg", 27211,
        "NZGD49 / Wanganui Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996");
    add_proj4text (p, 1,
        "111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Wanganui Circuit\",GEOGCS[\"NZGD49\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-40.24194713888889],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",175.4880996111111],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 14,
        "ST],AUTHORITY[\"EPSG\",\"27211\"]]");
    p = add_epsg_def_ex (filter, first, last, 27212, "epsg", 27212,
        "NZGD49 / Wairarapa Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Wairarapa Circuit\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-40.92553263888889],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",175.6473496666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 14,
        "ST],AUTHORITY[\"EPSG\",\"27212\"]]");
    p = add_epsg_def_ex (filter, first, last, 27213, "epsg", 27213,
        "NZGD49 / Wellington Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231");
    add_proj4text (p, 1,
        "111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Wellington Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-41.30131963888888],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",174.7766231111111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27213\"]]");
    p = add_epsg_def_ex (filter, first, last, 27214, "epsg", 27214,
        "NZGD49 / Collingwood Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465");
    add_proj4text (p, 1,
        " +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47");
    add_proj4text (p, 2,
        ",-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Collingwood Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-40.71475905555556],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",172.6720465],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27214\"]]");
    p = add_epsg_def_ex (filter, first, last, 27215, "epsg", 27215,
        "NZGD49 / Nelson Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168");
    add_proj4text (p, 1,
        "055555 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Nelson Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-41.27454472222222],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",173.2993168055555],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27215\"]]");
    p = add_epsg_def_ex (filter, first, last, 27216, "epsg", 27216,
        "NZGD49 / Karamea Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281");
    add_proj4text (p, 1,
        "944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Karamea Circuit\",GEOGCS[\"NZGD49\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inter");
    add_srs_wkt (p, 2,
        "national 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",-41.28991152777778],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",172.1090281944444],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",300000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 14,
        "T],AUTHORITY[\"EPSG\",\"27216\"]]");
    p = add_epsg_def_ex (filter, first, last, 27217, "epsg", 27217,
        "NZGD49 / Buller Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600");
    add_proj4text (p, 1,
        "555556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Buller Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-41.81080286111111],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",171.5812600555556],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27217\"]]");
    p = add_epsg_def_ex (filter, first, last, 27218, "epsg", 27218,
        "NZGD49 / Grey Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713");
    add_proj4text (p, 1,
        "055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Grey Circuit\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",-42.33369427777778],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",171.5497713055556],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27218\"]]");
    p = add_epsg_def_ex (filter, first, last, 27219, "epsg", 27219,
        "NZGD49 / Amuri Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333");
    add_proj4text (p, 1,
        "888889 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Amuri Circuit\",GEOGCS[\"NZGD49\",DATU");
    add_srs_wkt (p, 1,
        "M[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",-42.68911658333333],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",173.0101333888889],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27219\"]]");
    p = add_epsg_def_ex (filter, first, last, 27220, "epsg", 27220,
        "NZGD49 / Marlborough Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741");
    add_proj4text (p, 1,
        "111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Marlborough Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-41.54448666666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",173.8020741111111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27220\"]]");
    p = add_epsg_def_ex (filter, first, last, 27221, "epsg", 27221,
        "NZGD49 / Hokitika Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935");
    add_proj4text (p, 1,
        " +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47");
    add_proj4text (p, 2,
        ",-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Hokitika Circuit\",GEOGCS[\"NZGD49\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-42.88632236111111],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",170.9799935],PARAMETER[\"scale_factor\",1],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",300000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AU");
    add_srs_wkt (p, 14,
        "THORITY[\"EPSG\",\"27221\"]]");
    p = add_epsg_def_ex (filter, first, last, 27222, "epsg", 27222,
        "NZGD49 / Okarito Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Okarito Circuit\",GEOGCS[\"NZGD49\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inter");
    add_srs_wkt (p, 2,
        "national 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",-43.11012813888889],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",170.2609258333333],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",300000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 14,
        "T],AUTHORITY[\"EPSG\",\"27222\"]]");
    p = add_epsg_def_ex (filter, first, last, 27223, "epsg", 27223,
        "NZGD49 / Jacksons Bay Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 ");
    add_proj4text (p, 1,
        "+k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,");
    add_proj4text (p, 2,
        "-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Jacksons Bay Circuit\",GEOGCS[\"NZGD49");
    add_srs_wkt (p, 1,
        "\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",-43.97780288888889],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",168.606267],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27223\"]]");
}

#endif /* full EPSG initialization enabled/disabled */


























































































































































































































































































































































































































































































































































































Changes to src/srsinit/epsg_inlined_40.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953

























































































954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935

































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_40 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 21461, "epsg", 21461,
        "Beijing 1954 / Gauss-Kruger CM 123E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 123E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",123],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21461\"]]");
    p = add_epsg_def_ex (filter, first, last, 21462, "epsg", 21462,
        "Beijing 1954 / Gauss-Kruger CM 129E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 129E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",129],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21462\"]]");
    p = add_epsg_def_ex (filter, first, last, 21463, "epsg", 21463,
        "Beijing 1954 / Gauss-Kruger CM 135E", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger CM 135E\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",135],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"21463\"]]");
    p = add_epsg_def_ex (filter, first, last, 21473, "epsg", 21473,
        "Beijing 1954 / Gauss-Kruger 13N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 13N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21473\"]]");
    p = add_epsg_def_ex (filter, first, last, 21474, "epsg", 21474,
        "Beijing 1954 / Gauss-Kruger 14N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 14N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21474\"]]");
    p = add_epsg_def_ex (filter, first, last, 21475, "epsg", 21475,
        "Beijing 1954 / Gauss-Kruger 15N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 15N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21475\"]]");
    p = add_epsg_def_ex (filter, first, last, 21476, "epsg", 21476,
        "Beijing 1954 / Gauss-Kruger 16N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 16N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21476\"]]");
    p = add_epsg_def_ex (filter, first, last, 21477, "epsg", 21477,
        "Beijing 1954 / Gauss-Kruger 17N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 17N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",1],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"21477\"]]");
    p = add_epsg_def_ex (filter, first, last, 21478, "epsg", 21478,
        "Beijing 1954 / Gauss-Kruger 18N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 18N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",105],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21478\"]]");
    p = add_epsg_def_ex (filter, first, last, 21479, "epsg", 21479,
        "Beijing 1954 / Gauss-Kruger 19N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 19N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",111],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21479\"]]");
    p = add_epsg_def_ex (filter, first, last, 21480, "epsg", 21480,
        "Beijing 1954 / Gauss-Kruger 20N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 20N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",117],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21480\"]]");
    p = add_epsg_def_ex (filter, first, last, 21481, "epsg", 21481,
        "Beijing 1954 / Gauss-Kruger 21N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 21N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",123],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21481\"]]");
    p = add_epsg_def_ex (filter, first, last, 21482, "epsg", 21482,
        "Beijing 1954 / Gauss-Kruger 22N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 22N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",129],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21482\"]]");
    p = add_epsg_def_ex (filter, first, last, 21483, "epsg", 21483,
        "Beijing 1954 / Gauss-Kruger 23N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Beijing_1954", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=15.8,-154.4,-82.3,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Beijing 1954 / Gauss-Kruger 23N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Beijing 1954\",DATUM[\"Beijing_1954\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[15.8,-154.4,-82.3,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6214\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4214\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",135],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"21483\"]]");
    p = add_epsg_def_ex (filter, first, last, 21500, "epsg", 21500,
        "Belge 1950 (Brussels) / Belge Lambert 50", 0, 0,
        "International 1924", "Brussels",
        "Reseau_National_Belge_1950_Brussels", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666");
    add_proj4text (p, 1,
        "666 +lat_0=90 +lon_0=0 +x_0=150000 +y_0=5400000 +ellps=i");
    add_proj4text (p, 2,
        "ntl +pm=brussels +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Belge 1950 (Brussels) / Belge Lambert 50\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Belge 1950 (Brussels)\",DATUM[\"Reseau_National_Bel");
    add_srs_wkt (p, 2,
        "ge_1950_Brussels\",SPHEROID[\"International 1924\",63783");
    add_srs_wkt (p, 3,
        "88,297,AUTHORITY[\"EPSG\",\"7022\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6809\"]],PRIMEM[\"Brussels\",4.367975,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8910\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4809\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_1\",49.83333333333334],PARAMETER[\"standard_par");
    add_srs_wkt (p, 10,
        "allel_2\",51.16666666666666],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 11,
        "gin\",90],PARAMETER[\"central_meridian\",0],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",150000],PARAMETER[\"false_northing\",540");
    add_srs_wkt (p, 13,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"215");
    add_srs_wkt (p, 15,
        "00\"]]");
    p = add_epsg_def_ex (filter, first, last, 21780, "epsg", 21780,
        "Bern 1898 (Bern) / LV03C", 0, 0,
        "Bessel 1841", "Bern",
        "CH1903_Bern", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=0 +k_0=1 +x");
    add_proj4text (p, 1,
        "_0=0 +y_0=0 +ellps=bessel +towgs84=674.374,15.056,405.34");
    add_proj4text (p, 2,
        "6,0,0,0,0 +pm=bern +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bern 1898 (Bern) / LV03C\",GEOGCS[\"Bern 1898 (");
    add_srs_wkt (p, 1,
        "Bern)\",DATUM[\"CH1903_Bern\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[674.374,15.056,405.346,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6801\"]],PRIMEM[\"Bern\",7.439583333333333,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8907\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4801\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_center\",46.95240555555556],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"longitude_of_center\",0],PARAMETER[\"azimuth\",90],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"rectified_grid_angle\",90],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 12,
        "ctor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"fal");
    add_srs_wkt (p, 13,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "001\"]],AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"21780\"]]");
    p = add_epsg_def_ex (filter, first, last, 21781, "epsg", 21781,
        "CH1903 / LV03", 0, 0,
        "Bessel 1841", "Greenwich",
        "CH1903", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333");
    add_proj4text (p, 1,
        "333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +tow");
    add_proj4text (p, 2,
        "gs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CH1903 / LV03\",GEOGCS[\"CH1903\",DATUM[\"CH190");
    add_srs_wkt (p, 1,
        "3\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[674.374,15.056,405.34");
    add_srs_wkt (p, 3,
        "6,0,0,0,0],AUTHORITY[\"EPSG\",\"6149\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4149\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azim");
    add_srs_wkt (p, 8,
        "uth_Center\"],PARAMETER[\"latitude_of_center\",46.952405");
    add_srs_wkt (p, 9,
        "55555556],PARAMETER[\"longitude_of_center\",7.4395833333");
    add_srs_wkt (p, 10,
        "33333],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_g");
    add_srs_wkt (p, 11,
        "rid_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_easting\",600000],PARAMETER[\"false_northing\",2");
    add_srs_wkt (p, 13,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\",\"21");
    add_srs_wkt (p, 15,
        "781\"]]");
    p = add_epsg_def_ex (filter, first, last, 21782, "epsg", 21782,
        "CH1903 / LV03C-G", 0, 0,
        "Bessel 1841", "Greenwich",
        "CH1903", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333");
    add_proj4text (p, 1,
        "333333 +k_0=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=674.3");
    add_proj4text (p, 2,
        "74,15.056,405.346,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"CH1903 / LV03C-G\",GEOGCS[\"CH1903\",DATUM[\"CH");
    add_srs_wkt (p, 1,
        "1903\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[674.374,15.056,405");
    add_srs_wkt (p, 3,
        ".346,0,0,0,0],AUTHORITY[\"EPSG\",\"6149\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4149\"]],PROJECTION[\"Hotine_Oblique_Mercator_Az");
    add_srs_wkt (p, 8,
        "imuth_Center\"],PARAMETER[\"latitude_of_center\",46.9524");
    add_srs_wkt (p, 9,
        "0555555556],PARAMETER[\"longitude_of_center\",7.43958333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified");
    add_srs_wkt (p, 11,
        "_grid_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_easting\",0],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 13,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\",\"21782\"]]");
    p = add_epsg_def_ex (filter, first, last, 21817, "epsg", 21817,
        "Bogota 1975 / UTM zone 17N (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=intl +towgs84=307,304,-318,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / UTM zone 17N (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Inter");
    add_srs_wkt (p, 2,
        "national 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"621");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-81],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"21817\"]]");
    p = add_epsg_def_ex (filter, first, last, 21818, "epsg", 21818,
        "Bogota 1975 / UTM zone 18N", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=intl +towgs84=307,304,-318,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / UTM zone 18N\",GEOGCS[\"Bogota 19");
    add_srs_wkt (p, 1,
        "75\",DATUM[\"Bogota_1975\",SPHEROID[\"International 1924");
    add_srs_wkt (p, 2,
        "\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[307");
    add_srs_wkt (p, 3,
        ",304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-75],PARAMETER[\"scale_factor\",0.9996],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"21818\"]]");
    p = add_epsg_def_ex (filter, first, last, 21891, "epsg", 21891,
        "Bogota 1975 / Colombia West zone (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia West zone (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6218\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4.");
    add_srs_wkt (p, 9,
        "599047222222222],PARAMETER[\"central_meridian\",-77.0809");
    add_srs_wkt (p, 10,
        "1666666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",1000000],PARAMETER[\"false_northing\",1000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2189");
    add_srs_wkt (p, 14,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 21892, "epsg", 21892,
        "Bogota 1975 / Colombia Bogota zone (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia Bogota zone (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6218\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 9,
        ".599047222222222],PARAMETER[\"central_meridian\",-74.080");
    add_srs_wkt (p, 10,
        "91666666667],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",1000000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"218");
    add_srs_wkt (p, 14,
        "92\"]]");
    p = add_epsg_def_ex (filter, first, last, 21893, "epsg", 21893,
        "Bogota 1975 / Colombia East Central zone (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East Central zone (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"International 1924\",6378388,297,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7022\"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6218\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");

























































































    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",4.599047222222222],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-71.08091666666667],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",1000000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",1000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 13,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"21893\"]]");
    p = add_epsg_def_ex (filter, first, last, 21894, "epsg", 21894,
        "Bogota 1975 / Colombia East (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "18\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",4.59904");
    add_srs_wkt (p, 9,
        "7222222222],PARAMETER[\"central_meridian\",-68.080916666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",1000000],PARAMETER[\"false_northing\",1000000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"21894\"]]");
    p = add_epsg_def_ex (filter, first, last, 21896, "epsg", 21896,
        "Bogota 1975 / Colombia West zone", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-77.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia West zone\",GEOGCS[\"Bog");
    add_srs_wkt (p, 1,
        "ota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 2,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",4.599047222222");
    add_srs_wkt (p, 9,
        "222],PARAMETER[\"central_meridian\",-77.08091666666667],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",1000000],PARAMETER[\"false_northing\",1000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21896\"]]");
    p = add_epsg_def_ex (filter, first, last, 21897, "epsg", 21897,
        "Bogota 1975 / Colombia Bogota zone", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia Bogota zone\",GEOGCS[\"B");
    add_srs_wkt (p, 1,
        "ogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Internatio");
    add_srs_wkt (p, 2,
        "nal 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]]");
    add_srs_wkt (p, 4,
        ",PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UN");
    add_srs_wkt (p, 5,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 6,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 7,
        ",AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 8,
        "ercator\"],PARAMETER[\"latitude_of_origin\",4.5990472222");
    add_srs_wkt (p, 9,
        "22222],PARAMETER[\"central_meridian\",-74.08091666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",1000000],PARAMETER[\"false_northing\",1000000],UNIT[");
    add_srs_wkt (p, 12,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NOR");
    add_srs_wkt (p, 13,
        "TH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21897\"]]");
    p = add_epsg_def_ex (filter, first, last, 21898, "epsg", 21898,
        "Bogota 1975 / Colombia East Central zone", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-71.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East Central zone\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Bogota 1975\",DATUM[\"Bogota_1975\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "18\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",4.59904");
    add_srs_wkt (p, 9,
        "7222222222],PARAMETER[\"central_meridian\",-71.080916666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",1000000],PARAMETER[\"false_northing\",1000000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21898\"]]");
    p = add_epsg_def_ex (filter, first, last, 21899, "epsg", 21899,
        "Bogota 1975 / Colombia East", 0, 1,
        "International 1924", "Greenwich",
        "Bogota_1975", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.599047222222222 +lon_0=-68.08091666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs");
    add_proj4text (p, 2,
        "84=307,304,-318,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Bogota 1975 / Colombia East\",GEOGCS[\"Bogota 1");
    add_srs_wkt (p, 1,
        "975\",DATUM[\"Bogota_1975\",SPHEROID[\"International 192");
    add_srs_wkt (p, 2,
        "4\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[30");
    add_srs_wkt (p, 3,
        "7,304,-318,0,0,0,0],AUTHORITY[\"EPSG\",\"6218\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4218\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",4.599047222222222],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",-68.08091666666667],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1],PARAMETER[\"false_easting\",100");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",1000000],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"21899\"]]");
    p = add_epsg_def_ex (filter, first, last, 22032, "epsg", 22032,
        "Camacupa / UTM zone 32S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=clrk80 +towgs84=-50.9,-");
    add_proj4text (p, 1,
        "347.6,-231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / UTM zone 32S\",GEOGCS[\"Camacupa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9");
    add_srs_wkt (p, 3,
        ",-347.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"22032\"]]");
    p = add_epsg_def_ex (filter, first, last, 22033, "epsg", 22033,
        "Camacupa / UTM zone 33S", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=clrk80 +towgs84=-50.9,-");
    add_proj4text (p, 1,
        "347.6,-231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / UTM zone 33S\",GEOGCS[\"Camacupa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249");
    add_srs_wkt (p, 2,
        ".145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9");
    add_srs_wkt (p, 3,
        ",-347.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",15],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"22033\"]]");
    p = add_epsg_def_ex (filter, first, last, 22091, "epsg", 22091,
        "Camacupa / TM 11.30 SE", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=11.5 +k=0.9996 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=10000000 +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / TM 11.30 SE\",GEOGCS[\"Camacupa\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.");
    add_srs_wkt (p, 2,
        "145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9,");
    add_srs_wkt (p, 3,
        "-347.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",11.5],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"22091\"]]");
    p = add_epsg_def_ex (filter, first, last, 22092, "epsg", 22092,
        "Camacupa / TM 12 SE", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Camacupa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=10000000 +ellps=clrk80 +towgs84=-50.9,-347.6,-231,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Camacupa / TM 12 SE\",GEOGCS[\"Camacupa\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Camacupa\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145");
    add_srs_wkt (p, 2,
        ",293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-50.9,-34");
    add_srs_wkt (p, 3,
        "7.6,-231,0,0,0,0],AUTHORITY[\"EPSG\",\"6220\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4220\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",12],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"22092\"]]");
    p = add_epsg_def_ex (filter, first, last, 22171, "epsg", 22171,
        "POSGAR 98 / Argentina 1", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 1\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-72],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22171\"]]");
    p = add_epsg_def_ex (filter, first, last, 22172, "epsg", 22172,
        "POSGAR 98 / Argentina 2", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 2\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-69],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",2500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22172\"]]");
    p = add_epsg_def_ex (filter, first, last, 22173, "epsg", 22173,
        "POSGAR 98 / Argentina 3", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 3\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-66],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22173\"]]");
    p = add_epsg_def_ex (filter, first, last, 22174, "epsg", 22174,
        "POSGAR 98 / Argentina 4", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 4\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-63],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",4500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22174\"]]");
    p = add_epsg_def_ex (filter, first, last, 22175, "epsg", 22175,
        "POSGAR 98 / Argentina 5", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 5\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-60],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",5500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22175\"]]");
    p = add_epsg_def_ex (filter, first, last, 22176, "epsg", 22176,
        "POSGAR 98 / Argentina 6", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 6\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-57],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",6500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22176\"]]");
    p = add_epsg_def_ex (filter, first, last, 22177, "epsg", 22177,
        "POSGAR 98 / Argentina 7", 0, 1,
        "GRS 1980", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1998", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 98 / Argentina 7\",GEOGCS[\"POSGAR 98\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1998\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"619");
    add_srs_wkt (p, 4,
        "0\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4190\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-54],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",7500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22177\"]]");
    p = add_epsg_def_ex (filter, first, last, 22181, "epsg", 22181,
        "POSGAR 94 / Argentina 1", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 1\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-72],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22181\"]]");
    p = add_epsg_def_ex (filter, first, last, 22182, "epsg", 22182,
        "POSGAR 94 / Argentina 2", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 2\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-69],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",2500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22182\"]]");
    p = add_epsg_def_ex (filter, first, last, 22183, "epsg", 22183,
        "POSGAR 94 / Argentina 3", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 3\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-66],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22183\"]]");
    p = add_epsg_def_ex (filter, first, last, 22184, "epsg", 22184,
        "POSGAR 94 / Argentina 4", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 4\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-63],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",4500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22184\"]]");
    p = add_epsg_def_ex (filter, first, last, 22185, "epsg", 22185,
        "POSGAR 94 / Argentina 5", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 5\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-60],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",5500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22185\"]]");
    p = add_epsg_def_ex (filter, first, last, 22186, "epsg", 22186,
        "POSGAR 94 / Argentina 6", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 6\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-57],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",6500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22186\"]]");
    p = add_epsg_def_ex (filter, first, last, 22187, "epsg", 22187,
        "POSGAR 94 / Argentina 7", 0, 1,
        "WGS 84", "Greenwich",
        "Posiciones_Geodesicas_Argentinas_1994", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"POSGAR 94 / Argentina 7\",GEOGCS[\"POSGAR 94\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Posiciones_Geodesicas_Argentinas_1994\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6694");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4694\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-54],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",1],PARAMETER[\"false_easting\",7500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22187\"]]");
    p = add_epsg_def_ex (filter, first, last, 22191, "epsg", 22191,
        "Campo Inchauspe / Argentina 1", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-72 +k=1 +x_0=1500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 1\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-72],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",1500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22191\"]]");
    p = add_epsg_def_ex (filter, first, last, 22192, "epsg", 22192,
        "Campo Inchauspe / Argentina 2", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-69 +k=1 +x_0=2500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 2\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",2500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22192\"]]");
    p = add_epsg_def_ex (filter, first, last, 22193, "epsg", 22193,
        "Campo Inchauspe / Argentina 3", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-66 +k=1 +x_0=3500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 3\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-66],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",3500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22193\"]]");
    p = add_epsg_def_ex (filter, first, last, 22194, "epsg", 22194,
        "Campo Inchauspe / Argentina 4", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-63 +k=1 +x_0=4500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 4\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",4500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22194\"]]");
    p = add_epsg_def_ex (filter, first, last, 22195, "epsg", 22195,
        "Campo Inchauspe / Argentina 5", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-60 +k=1 +x_0=5500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 5\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-60],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",5500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22195\"]]");
    p = add_epsg_def_ex (filter, first, last, 22196, "epsg", 22196,
        "Campo Inchauspe / Argentina 6", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-57 +k=1 +x_0=6500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 6\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",6500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22196\"]]");
    p = add_epsg_def_ex (filter, first, last, 22197, "epsg", 22197,
        "Campo Inchauspe / Argentina 7", 0, 1,
        "International 1924", "Greenwich",
        "Campo_Inchauspe", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-90 +lon_0=-54 +k=1 +x_0=7500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-148,136,90,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Campo Inchauspe / Argentina 7\",GEOGCS[\"Campo ");
    add_srs_wkt (p, 1,
        "Inchauspe\",DATUM[\"Campo_Inchauspe\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[-148,136,90,0,0,0,0],AUTHORITY[\"EPSG\",\"6221\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4221\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",-90],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-54],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",1],PARAMETER[\"false_easting\",7500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"22197\"]]");
    p = add_epsg_def_ex (filter, first, last, 22234, "epsg", 22234,
        "Cape / UTM zone 34S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / UTM zone 34S\",GEOGCS[\"Cape\",DATUM[\"C");
    add_srs_wkt (p, 1,
        "ape\",SPHEROID[\"Clarke 1880 (Arc)\",6378249.145,293.466");
    add_srs_wkt (p, 2,
        "3077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-29");
    add_srs_wkt (p, 3,
        "2,0,0,0,0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4222\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",21],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22234\"]]");
    p = add_epsg_def_ex (filter, first, last, 22235, "epsg", 22235,
        "Cape / UTM zone 35S", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / UTM zone 35S\",GEOGCS[\"Cape\",DATUM[\"C");
    add_srs_wkt (p, 1,
        "ape\",SPHEROID[\"Clarke 1880 (Arc)\",6378249.145,293.466");
    add_srs_wkt (p, 2,
        "3077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-29");
    add_srs_wkt (p, 3,
        "2,0,0,0,0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4222\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",100");
    add_srs_wkt (p, 11,
        "00000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"22235\"]]");
    p = add_epsg_def_ex (filter, first, last, 22236, "epsg", 22236,
        "Cape / UTM zone 36S (deprecated)", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.9663");
    add_proj4text (p, 1,
        "98753 +towgs84=-136,-108,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / UTM zone 36S (deprecated)\",GEOGCS[\"Cap");
    add_srs_wkt (p, 1,
        "e\",DATUM[\"Cape\",SPHEROID[\"Clarke 1880 (Arc)\",637824");
    add_srs_wkt (p, 2,
        "9.145,293.4663077,AUTHORITY[\"EPSG\",\"7013\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-136,-108,-292,0,0,0,0],AUTHORITY[\"EPSG\",\"6222\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4222\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",33],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"22236\"]]");
    p = add_epsg_def_ex (filter, first, last, 22275, "epsg", 22275,
        "Cape / Lo15", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo15\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",15],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22275\"]]");
    p = add_epsg_def_ex (filter, first, last, 22277, "epsg", 22277,
        "Cape / Lo17", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo17\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",17],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22277\"]]");
    p = add_epsg_def_ex (filter, first, last, 22279, "epsg", 22279,
        "Cape / Lo19", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo19\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",19],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22279\"]]");
    p = add_epsg_def_ex (filter, first, last, 22281, "epsg", 22281,
        "Cape / Lo21", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo21\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",21],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22281\"]]");
    p = add_epsg_def_ex (filter, first, last, 22283, "epsg", 22283,
        "Cape / Lo23", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo23\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",23],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22283\"]]");
    p = add_epsg_def_ex (filter, first, last, 22285, "epsg", 22285,
        "Cape / Lo25", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo25\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",25],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22285\"]]");
    p = add_epsg_def_ex (filter, first, last, 22287, "epsg", 22287,
        "Cape / Lo27", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo27\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",27],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22287\"]]");
    p = add_epsg_def_ex (filter, first, last, 22289, "epsg", 22289,
        "Cape / Lo29", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=29 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo29\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",29],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22289\"]]");
    p = add_epsg_def_ex (filter, first, last, 22291, "epsg", 22291,
        "Cape / Lo31", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo31\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",31],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22291\"]]");
    p = add_epsg_def_ex (filter, first, last, 22293, "epsg", 22293,
        "Cape / Lo33", 0, 0,
        "Clarke 1880 (Arc)", "Greenwich",
        "Cape", "Transverse_Mercator_South_Orientated", "metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=0 +y_0=0 +axis=");
    add_proj4text (p, 1,
        "wsu +a=6378249.145 +b=6356514.966398753 +towgs84=-136,-1");
    add_proj4text (p, 2,
        "08,-292,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Cape / Lo33\",GEOGCS[\"Cape\",DATUM[\"Cape\",SP");
    add_srs_wkt (p, 1,
        "HEROID[\"Clarke 1880 (Arc)\",6378249.145,293.4663077,AUT");
    add_srs_wkt (p, 2,
        "HORITY[\"EPSG\",\"7013\"]],TOWGS84[-136,-108,-292,0,0,0,");
    add_srs_wkt (p, 3,
        "0],AUTHORITY[\"EPSG\",\"6222\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "22\"]],PROJECTION[\"Transverse_Mercator_South_Orientated");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",33],PARAMETER[\"scale_factor\",1],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Y\"");
    add_srs_wkt (p, 12,
        ",WEST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"22293\"]]");
    p = add_epsg_def_ex (filter, first, last, 22332, "epsg", 22332,
        "Carthage / UTM zone 32N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Carthage", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-263");
    add_proj4text (p, 1,
        ",6,431,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / UTM zone 32N\",GEOGCS[\"Carthage\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249");
    add_srs_wkt (p, 2,
        ".2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4223\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"22332\"]]");
    p = add_epsg_def_ex (filter, first, last, 22391, "epsg", 22391,
        "Carthage / Nord Tunisie", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Carthage", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=9.9 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 2,
        "84=-263,6,431,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / Nord Tunisie\",GEOGCS[\"Carthage\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249");
    add_srs_wkt (p, 2,
        ".2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRI");
    add_srs_wkt (p, 4,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4223\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",36],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",9.9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999625544],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"22391\"]]");
    p = add_epsg_def_ex (filter, first, last, 22392, "epsg", 22392,
        "Carthage / Sud Tunisie", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Carthage", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=9.9 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +t");
    add_proj4text (p, 2,
        "owgs84=-263,6,431,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Carthage / Sud Tunisie\",GEOGCS[\"Carthage\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Carthage\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.");
    add_srs_wkt (p, 2,
        "2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-263,6,431,0,0,0,0],AUTHORITY[\"EPSG\",\"6223\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4223\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",33.3],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",9.9],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999625769],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"22392\"]]");
    p = add_epsg_def_ex (filter, first, last, 22521, "epsg", 22521,
        "Corrego Alegre 1970-72 / UTM zone 21S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 21S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22521\"]]");
    p = add_epsg_def_ex (filter, first, last, 22522, "epsg", 22522,
        "Corrego Alegre 1970-72 / UTM zone 22S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 22S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22522\"]]");
    p = add_epsg_def_ex (filter, first, last, 22523, "epsg", 22523,
        "Corrego Alegre 1970-72 / UTM zone 23S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 23S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-4");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22523\"]]");
    p = add_epsg_def_ex (filter, first, last, 22524, "epsg", 22524,
        "Corrego Alegre 1970-72 / UTM zone 24S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 24S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22524\"]]");
    p = add_epsg_def_ex (filter, first, last, 22525, "epsg", 22525,
        "Corrego Alegre 1970-72 / UTM zone 25S", 0, 0,
        "International 1924", "Greenwich",
        "Corrego_Alegre_1970_72", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=intl +towgs84=-205.57,1");
    add_proj4text (p, 1,
        "68.77,-4.12,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Corrego Alegre 1970-72 / UTM zone 25S\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Corrego Alegre 1970-72\",DATUM[\"Corrego_Alegre_1970_7");
    add_srs_wkt (p, 2,
        "2\",SPHEROID[\"International 1924\",6378388,297,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7022\"]],TOWGS84[-205.57,168.77,-4.12,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6225\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "25\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"22525\"]]");
    p = add_epsg_def_ex (filter, first, last, 22700, "epsg", 22700,
        "Deir ez Zor / Levant Zone", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Deir_ez_Zor", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.");
    add_proj4text (p, 1,
        "9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Deir ez Zor / Levant Zone\",GEOGCS[\"Deir ez Zo");
    add_srs_wkt (p, 1,
        "r\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"Clarke 1880 (IGN)\"");
    add_srs_wkt (p, 2,
        ",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6227\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4227\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",34.65],PARAMETER[\"central_meridian\",37.35],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",0.9996256],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",300000],PARAMETER[\"false_northing\",300000],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"22700\"]]");
    p = add_epsg_def_ex (filter, first, last, 22770, "epsg", 22770,
        "Deir ez Zor / Syria Lambert", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Deir_ez_Zor", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_0=34.65 +lon_0=37.35 +k_0=0.");
    add_proj4text (p, 1,
        "9996256 +x_0=300000 +y_0=300000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=-190.421,8.532,238.69,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Deir ez Zor / Syria Lambert\",GEOGCS[\"Deir ez ");
    add_srs_wkt (p, 1,
        "Zor\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"Clarke 1880 (IGN)");
    add_srs_wkt (p, 2,
        "\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6227\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4227\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",34.65],PARAMETER[\"central_meridian\",37.35");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996256],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",300000],PARAMETER[\"false_northing\",300000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 13,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"22770\"]");
    add_srs_wkt (p, 14,
        "]");
    p = add_epsg_def_ex (filter, first, last, 22780, "epsg", 22780,
        "Deir ez Zor / Levant Stereographic", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Deir_ez_Zor", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=0 +a=6378249.2 +b=6356515 +towgs84=-190.421,8.532");
    add_proj4text (p, 2,
        ",238.69,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Deir ez Zor / Levant Stereographic\",GEOGCS[\"D");
    add_srs_wkt (p, 1,
        "eir ez Zor\",DATUM[\"Deir_ez_Zor\",SPHEROID[\"Clarke 188");
    add_srs_wkt (p, 2,
        "0 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7011\"]],TOWGS84[-190.421,8.532,238.69,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6227\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4227\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",34.2],PARAMETER[\"central_meridian\",39.15");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9995341],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"22780\"]]");
    p = add_epsg_def_ex (filter, first, last, 22832, "epsg", 22832,
        "Douala / UTM zone 32N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Douala", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Douala / UTM zone 32N (deprecated)\",GEOGCS[\"D");
    add_srs_wkt (p, 1,
        "ouala\",DATUM[\"Douala\",SPHEROID[\"Clarke 1880 (IGN)\",");
    add_srs_wkt (p, 2,
        "6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6228\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"422");
    add_srs_wkt (p, 7,
        "8\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",9],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"22832");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 22991, "epsg", 22991,
        "Egypt 1907 / Blue Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=35 +k=1 +x_0=300000 +y_0=11");
    add_proj4text (p, 1,
        "00000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Blue Belt\",GEOGCS[\"Egypt 1907\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\",6378200,2");
    add_srs_wkt (p, 2,
        "98.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-130,110,-13,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4229\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",30],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 9,
        "n\",35],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",300000],PARAMETER[\"false_northing\",1100000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"22991\"]]");
    p = add_epsg_def_ex (filter, first, last, 22992, "epsg", 22992,
        "Egypt 1907 / Red Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=31 +k=1 +x_0=615000 +y_0=81");
    add_proj4text (p, 1,
        "0000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Red Belt\",GEOGCS[\"Egypt 1907\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\",6378200,29");
    add_srs_wkt (p, 2,
        "8.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-130,110,-13,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4229\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",30],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 9,
        "n\",31],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",615000],PARAMETER[\"false_northing\",810000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"22992\"]]");
    p = add_epsg_def_ex (filter, first, last, 22993, "epsg", 22993,
        "Egypt 1907 / Purple Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=20");
    add_proj4text (p, 1,
        "0000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Purple Belt\",GEOGCS[\"Egypt 1907\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\",6378200,");
    add_srs_wkt (p, 2,
        "298.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-130,110,-13");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4229\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",30],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",27],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_easting\",700000],PARAMETER[\"false_northing\",200000]");
    add_srs_wkt (p, 11,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 12,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"22993\"]]");
    p = add_epsg_def_ex (filter, first, last, 22994, "epsg", 22994,
        "Egypt 1907 / Extended Purple Belt", 0, 0,
        "Helmert 1906", "Greenwich",
        "Egypt_1907", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=27 +k=1 +x_0=700000 +y_0=12");
    add_proj4text (p, 1,
        "00000 +ellps=helmert +towgs84=-130,110,-13,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Egypt 1907 / Extended Purple Belt\",GEOGCS[\"Eg");
    add_srs_wkt (p, 1,
        "ypt 1907\",DATUM[\"Egypt_1907\",SPHEROID[\"Helmert 1906\"");
    add_srs_wkt (p, 2,
        ",6378200,298.3,AUTHORITY[\"EPSG\",\"7020\"]],TOWGS84[-13");
    add_srs_wkt (p, 3,
        "0,110,-13,0,0,0,0],AUTHORITY[\"EPSG\",\"6229\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4229\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",30],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",27],PARAMETER[\"scale_factor\",1],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",700000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"22994\"]]");
    p = add_epsg_def_ex (filter, first, last, 23028, "epsg", 23028,
        "ED50 / UTM zone 28N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 28N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-15],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23028\"]]");
    p = add_epsg_def_ex (filter, first, last, 23029, "epsg", 23029,
        "ED50 / UTM zone 29N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 29N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-9],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23029\"]]");
    p = add_epsg_def_ex (filter, first, last, 23030, "epsg", 23030,
        "ED50 / UTM zone 30N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 30N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-3],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23030\"]]");
    p = add_epsg_def_ex (filter, first, last, 23031, "epsg", 23031,
        "ED50 / UTM zone 31N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 31N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23031\"]]");
    p = add_epsg_def_ex (filter, first, last, 23032, "epsg", 23032,
        "ED50 / UTM zone 32N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 32N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23032\"]]");
    p = add_epsg_def_ex (filter, first, last, 23033, "epsg", 23033,
        "ED50 / UTM zone 33N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 33N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",15],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23033\"]]");
    p = add_epsg_def_ex (filter, first, last, 23034, "epsg", 23034,
        "ED50 / UTM zone 34N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 34N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",21],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23034\"]]");
    p = add_epsg_def_ex (filter, first, last, 23035, "epsg", 23035,
        "ED50 / UTM zone 35N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 35N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",27],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23035\"]]");
    p = add_epsg_def_ex (filter, first, last, 23036, "epsg", 23036,
        "ED50 / UTM zone 36N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 36N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",33],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23036\"]]");
    p = add_epsg_def_ex (filter, first, last, 23037, "epsg", 23037,
        "ED50 / UTM zone 37N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 37N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23037\"]]");
    p = add_epsg_def_ex (filter, first, last, 23038, "epsg", 23038,
        "ED50 / UTM zone 38N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=intl +towgs84=-87,-98,-121,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / UTM zone 38N\",GEOGCS[\"ED50\",DATUM[\"E");
    add_srs_wkt (p, 1,
        "uropean_Datum_1950\",SPHEROID[\"International 1924\",637");
    add_srs_wkt (p, 2,
        "8388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-");
    add_srs_wkt (p, 3,
        "121,0,0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",45],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23038\"]]");
    p = add_epsg_def_ex (filter, first, last, 23090, "epsg", 23090,
        "ED50 / TM 0 N", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9996 +x_0=500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / TM 0 N\",GEOGCS[\"ED50\",DATUM[\"Europea");
    add_srs_wkt (p, 1,
        "n_Datum_1950\",SPHEROID[\"International 1924\",6378388,2");
    add_srs_wkt (p, 2,
        "97,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-121,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4230\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"230");
    add_srs_wkt (p, 13,
        "90\"]]");
    p = add_epsg_def_ex (filter, first, last, 23095, "epsg", 23095,
        "ED50 / TM 5 NE", 0, 0,
        "International 1924", "Greenwich",
        "European_Datum_1950", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=5 +k=0.9996 +x_0=500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +n");
    add_proj4text (p, 2,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ED50 / TM 5 NE\",GEOGCS[\"ED50\",DATUM[\"Europe");
    add_srs_wkt (p, 1,
        "an_Datum_1950\",SPHEROID[\"International 1924\",6378388,");
    add_srs_wkt (p, 2,
        "297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-87,-98,-121,0");
    add_srs_wkt (p, 3,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6230\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4230\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",0],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 9,
        "\",5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"fal");
    add_srs_wkt (p, 10,
        "se_easting\",500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 12,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "23095\"]]");
    p = add_epsg_def_ex (filter, first, last, 23239, "epsg", 23239,
        "Fahud / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Fahud", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-333.102,-11.0");
    add_proj4text (p, 1,
        "2,230.69,0,0,0.554,0.219 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Fahud / UTM zone 39N\",GEOGCS[\"Fahud\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Fahud\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-333.102,-11.02");
    add_srs_wkt (p, 3,
        ",230.69,0,0,0.554,0.219],AUTHORITY[\"EPSG\",\"6232\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4232\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",51],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"23239\"]]");
    p = add_epsg_def_ex (filter, first, last, 23240, "epsg", 23240,
        "Fahud / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Fahud", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-333.102,-11.0");
    add_proj4text (p, 1,
        "2,230.69,0,0,0.554,0.219 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Fahud / UTM zone 40N\",GEOGCS[\"Fahud\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Fahud\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-333.102,-11.02");
    add_srs_wkt (p, 3,
        ",230.69,0,0,0.554,0.219],AUTHORITY[\"EPSG\",\"6232\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4232\"]],PROJECTION[\"Transverse_Mer");
    add_srs_wkt (p, 8,
        "cator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",57],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"23240\"]]");
    p = add_epsg_def_ex (filter, first, last, 23433, "epsg", 23433,
        "Garoua / UTM zone 33N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Garoua", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Garoua / UTM zone 33N (deprecated)\",GEOGCS[\"G");
    add_srs_wkt (p, 1,
        "aroua\",DATUM[\"Garoua\",SPHEROID[\"Clarke 1880 (IGN)\",");
    add_srs_wkt (p, 2,
        "6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6234\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"423");
    add_srs_wkt (p, 7,
        "4\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",15]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2343");
    add_srs_wkt (p, 13,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 23700, "epsg", 23700,
        "HD72 / EOV", 0, 0,
        "GRS 1967", "Greenwich",
        "Hungarian_Datum_1972", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Y", "East", "X", "North");
    add_proj4text (p, 0,
        "+proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177");
    add_proj4text (p, 1,
        "777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67");
    add_proj4text (p, 2,
        " +towgs84=52.17,-71.82,-14.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"HD72 / EOV\",GEOGCS[\"HD72\",DATUM[\"Hungarian_");
    add_srs_wkt (p, 1,
        "Datum_1972\",SPHEROID[\"GRS 1967\",6378160,298.247167427");
    add_srs_wkt (p, 2,
        ",AUTHORITY[\"EPSG\",\"7036\"]],TOWGS84[52.17,-71.82,-14.");
    add_srs_wkt (p, 3,
        "9,0,0,0,0],AUTHORITY[\"EPSG\",\"6237\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4237\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azim");
    add_srs_wkt (p, 8,
        "uth_Center\"],PARAMETER[\"latitude_of_center\",47.144393");
    add_srs_wkt (p, 9,
        "72222222],PARAMETER[\"longitude_of_center\",19.048571777");
    add_srs_wkt (p, 10,
        "77778],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_g");
    add_srs_wkt (p, 11,
        "rid_angle\",90],PARAMETER[\"scale_factor\",0.99993],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_easting\",650000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 13,
        "ng\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 14,
        "]],AXIS[\"Y\",EAST],AXIS[\"X\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 15,
        ",\"23700\"]]");
    p = add_epsg_def_ex (filter, first, last, 23830, "epsg", 23830,
        "DGN95 / Indonesia TM-3 zone 46.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=94.5 +k=0.9999 +x_0=200000 +");
    add_proj4text (p, 1,
        "y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 46.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",94.5],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23830\"]]");
    p = add_epsg_def_ex (filter, first, last, 23831, "epsg", 23831,
        "DGN95 / Indonesia TM-3 zone 47.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=97.5 +k=0.9999 +x_0=200000 +");
    add_proj4text (p, 1,
        "y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 47.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",97.5],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23831\"]]");
}

#endif /* full EPSG initialization enabled/disabled */






































































































|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|



|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_40 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 27224, "epsg", 27224,
        "NZGD49 / Mount Pleasant Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935");
    add_proj4text (p, 1,
        "833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount Pleasant Circuit\",GEOGCS[\"NZGD");
    add_srs_wkt (p, 1,
        "49\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5");
    add_srs_wkt (p, 4,
        "993],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4272\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",-43.59063758333333],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",172.7271935833333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 14,
        ",EAST],AUTHORITY[\"EPSG\",\"27224\"]]");
    p = add_epsg_def_ex (filter, first, last, 27225, "epsg", 27225,
        "NZGD49 / Gawler Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484");
    add_proj4text (p, 1,
        "722222 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Gawler Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-43.74871155555556],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",171.3607484722222],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27225\"]]");
    p = add_epsg_def_ex (filter, first, last, 27226, "epsg", 27226,
        "NZGD49 / Timaru Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Timaru Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-44.40222036111111],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",171.0572508333333],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27226\"]]");
    p = add_epsg_def_ex (filter, first, last, 27227, "epsg", 27227,
        "NZGD49 / Lindis Peak Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550");
    add_proj4text (p, 1,
        "833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Lindis Peak Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-44.73526797222222],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",169.4677550833333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27227\"]]");
    p = add_epsg_def_ex (filter, first, last, 27228, "epsg", 27228,
        "NZGD49 / Mount Nicholas Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411");
    add_proj4text (p, 1,
        "944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount Nicholas Circuit\",GEOGCS[\"NZGD");
    add_srs_wkt (p, 1,
        "49\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5");
    add_srs_wkt (p, 4,
        "993],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4272\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",-45.13290258333333],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",168.3986411944444],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 14,
        ",EAST],AUTHORITY[\"EPSG\",\"27228\"]]");
    p = add_epsg_def_ex (filter, first, last, 27229, "epsg", 27229,
        "NZGD49 / Mount York Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617");
    add_proj4text (p, 1,
        "777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount York Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-45.56372616666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",167.7388617777778],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27229\"]]");
    p = add_epsg_def_ex (filter, first, last, 27230, "epsg", 27230,
        "NZGD49 / Observation Point Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Observation Point Circuit\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "ZGD49\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7022\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-");
    add_srs_wkt (p, 4,
        "4.5993],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 5,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4272\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",-45.81619661111111],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",170.6285951666667],PARAMETER[\"scale_");
    add_srs_wkt (p, 11,
        "factor\",1],PARAMETER[\"false_easting\",300000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"East");
    add_srs_wkt (p, 14,
        "ing\",EAST],AUTHORITY[\"EPSG\",\"27230\"]]");
    p = add_epsg_def_ex (filter, first, last, 27231, "epsg", 27231,
        "NZGD49 / North Taieri Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891");
    add_proj4text (p, 1,
        "111111 +k=0.99996 +x_0=300000 +y_0=700000 +ellps=intl +t");
    add_proj4text (p, 2,
        "owgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / North Taieri Circuit\",GEOGCS[\"NZGD49");
    add_srs_wkt (p, 1,
        "\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",-45.86151336111111],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",170.2825891111111],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 11,
        "or\",0.99996],PARAMETER[\"false_easting\",300000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",700000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Ea");
    add_srs_wkt (p, 14,
        "sting\",EAST],AUTHORITY[\"EPSG\",\"27231\"]]");
    p = add_epsg_def_ex (filter, first, last, 27232, "epsg", 27232,
        "NZGD49 / Bluff Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 ");
    add_proj4text (p, 1,
        "+k=1 +x_0=300002.66 +y_0=699999.58 +ellps=intl +towgs84=");
    add_proj4text (p, 2,
        "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_");
    add_proj4text (p, 3,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Bluff Circuit\",GEOGCS[\"NZGD49\",DATU");
    add_srs_wkt (p, 1,
        "M[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",-46.60000961111111],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",168.342872],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",300002.66],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",699999.58],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27232\"]]");
    p = add_epsg_def_ex (filter, first, last, 27258, "epsg", 27258,
        "NZGD49 / UTM zone 58S", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=intl +towgs84=59.47,-5.");
    add_proj4text (p, 1,
        "04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / UTM zone 58S\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",165],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2725");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 27259, "epsg", 27259,
        "NZGD49 / UTM zone 59S", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=intl +towgs84=59.47,-5.");
    add_proj4text (p, 1,
        "04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / UTM zone 59S\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",171],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2725");
    add_srs_wkt (p, 14,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 27260, "epsg", 27260,
        "NZGD49 / UTM zone 60S", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +south +ellps=intl +towgs84=59.47,-5.");
    add_proj4text (p, 1,
        "04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / UTM zone 60S\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",177],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2726");
    add_srs_wkt (p, 14,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 27291, "epsg", 27291,
        "NZGD49 / North Island Grid", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "British yard (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1 +x_0=274319.524");
    add_proj4text (p, 1,
        "3848086 +y_0=365759.3658464114 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +to_meter=0.91439");
    add_proj4text (p, 3,
        "84146160287 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / North Island Grid\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-39],PARAMETER[\"central_meridian\",175.");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",300000],PARAMETER[\"false_northing\",400000],UNIT[\"");
    add_srs_wkt (p, 12,
        "British yard (Sears 1922)\",0.9143984146160287,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9040\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 14,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"27291\"]]");
    p = add_epsg_def_ex (filter, first, last, 27292, "epsg", 27292,
        "NZGD49 / South Island Grid", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "British yard (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1 +x_0=457199.207");
    add_proj4text (p, 1,
        "3080143 +y_0=457199.2073080143 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +to_meter=0.91439");
    add_proj4text (p, 3,
        "84146160287 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / South Island Grid\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-44],PARAMETER[\"central_meridian\",171.");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",500000],UNIT[\"");
    add_srs_wkt (p, 12,
        "British yard (Sears 1922)\",0.9143984146160287,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9040\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 14,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"27292\"]]");
    p = add_epsg_def_ex (filter, first, last, 27391, "epsg", 27391,
        "NGO 1948 (Oslo) / NGO zone I", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=-4.666666666666667 +k=1 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=");
    add_proj4text (p, 2,
        "278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone I\",GEOGCS[\"NGO 194");
    add_srs_wkt (p, 1,
        "8 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mod");
    add_srs_wkt (p, 2,
        "ified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "5\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.72291666666");
    add_srs_wkt (p, 5,
        "667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.0174");
    add_srs_wkt (p, 6,
        "532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitu");
    add_srs_wkt (p, 7,
        "de\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 8,
        "\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"latitude_of_origin\",58],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 10,
        "\",-4.666666666666667],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27391");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27392, "epsg", 27392,
        "NGO 1948 (Oslo) / NGO zone II", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=-2.333333333333333 +k=1 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=");
    add_proj4text (p, 2,
        "278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone II\",GEOGCS[\"NGO 19");
    add_srs_wkt (p, 1,
        "48 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mo");
    add_srs_wkt (p, 2,
        "dified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "05\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.7229166666");
    add_srs_wkt (p, 5,
        "6667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-2.333333333333333],PARAMETER[\"scale_factor\",1],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27392");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27393, "epsg", 27393,
        "NGO 1948 (Oslo) / NGO zone III", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=637");
    add_proj4text (p, 1,
        "7492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.");
    add_proj4text (p, 2,
        "889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone III\",GEOGCS[\"NGO 1");
    add_srs_wkt (p, 1,
        "948 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel M");
    add_srs_wkt (p, 2,
        "odified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "005\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.722916666");
    add_srs_wkt (p, 5,
        "66667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"y\",EAST],AUTHORITY[\"EPSG\",\"27393\"]]");
    p = add_epsg_def_ex (filter, first, last, 27394, "epsg", 27394,
        "NGO 1948 (Oslo) / NGO zone IV", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=2.5 +k=1 +x_0=0 +y_0=0 +a=6");
    add_proj4text (p, 1,
        "377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,");
    add_proj4text (p, 2,
        "7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone IV\",GEOGCS[\"NGO 19");
    add_srs_wkt (p, 1,
        "48 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mo");
    add_srs_wkt (p, 2,
        "dified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "05\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.7229166666");
    add_srs_wkt (p, 5,
        "6667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",2.5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27394\"]]");
    p = add_epsg_def_ex (filter, first, last, 27395, "epsg", 27395,
        "NGO 1948 (Oslo) / NGO zone V", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=6.166666666666667 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone V\",GEOGCS[\"NGO 194");
    add_srs_wkt (p, 1,
        "8 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mod");
    add_srs_wkt (p, 2,
        "ified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "5\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.72291666666");
    add_srs_wkt (p, 5,
        "667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.0174");
    add_srs_wkt (p, 6,
        "532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitu");
    add_srs_wkt (p, 7,
        "de\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 8,
        "\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"latitude_of_origin\",58],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 10,
        "\",6.166666666666667],PARAMETER[\"scale_factor\",1],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",0],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27395\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 27396, "epsg", 27396,
        "NGO 1948 (Oslo) / NGO zone VI", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=10.16666666666667 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone VI\",GEOGCS[\"NGO 19");
    add_srs_wkt (p, 1,
        "48 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mo");
    add_srs_wkt (p, 2,
        "dified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "05\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.7229166666");
    add_srs_wkt (p, 5,
        "6667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",10.16666666666667],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27396");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27397, "epsg", 27397,
        "NGO 1948 (Oslo) / NGO zone VII", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=14.16666666666667 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone VII\",GEOGCS[\"NGO 1");
    add_srs_wkt (p, 1,
        "948 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel M");
    add_srs_wkt (p, 2,
        "odified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "005\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.722916666");
    add_srs_wkt (p, 5,
        "66667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",14.16666666666667],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27397");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27398, "epsg", 27398,
        "NGO 1948 (Oslo) / NGO zone VIII", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=18.33333333333333 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone VIII\",GEOGCS[\"NGO ");
    add_srs_wkt (p, 1,
        "1948 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel ");
    add_srs_wkt (p, 2,
        "Modified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7005\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.72291666");
    add_srs_wkt (p, 5,
        "666667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",58],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",18.33333333333333],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",0],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"273");
    add_srs_wkt (p, 14,
        "98\"]]");
    p = add_epsg_def_ex (filter, first, last, 27429, "epsg", 27429,
        "Datum 73 / UTM zone 29N", 0, 0,
        "International 1924", "Greenwich",
        "Datum_73", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=intl +towgs84=-223.237,110.193");
    add_proj4text (p, 1,
        ",36.649,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Datum 73 / UTM zone 29N\",GEOGCS[\"Datum 73\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Datum_73\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-223.237,110");
    add_srs_wkt (p, 3,
        ".193,36.649,0,0,0,0],AUTHORITY[\"EPSG\",\"6274\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4274\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"27429\"]]");
    p = add_epsg_def_ex (filter, first, last, 27492, "epsg", 27492,
        "Datum 73 / Modified Portuguese Grid (deprecated)", 0, 1,
        "International 1924", "Greenwich",
        "Datum_73", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111");
    add_proj4text (p, 1,
        "111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=");
    add_proj4text (p, 2,
        "intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Datum 73 / Modified Portuguese Grid (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"Datum 73\",DATUM[\"Datum_73\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-223.237,110.193,36.649,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6274\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4274\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",39.66666666666666],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-8.131906111111112],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",180.598],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",-86.99],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"27492\"]]");
    p = add_epsg_def_ex (filter, first, last, 27493, "epsg", 27493,
        "Datum 73 / Modified Portuguese Grid", 0, 0,
        "International 1924", "Greenwich",
        "Datum_73", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111");
    add_proj4text (p, 1,
        "111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=");
    add_proj4text (p, 2,
        "intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Datum 73 / Modified Portuguese Grid\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Datum 73\",DATUM[\"Datum_73\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-223.237,110.193,36.649,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "74\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4274\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.6666");
    add_srs_wkt (p, 9,
        "6666666666],PARAMETER[\"central_meridian\",-8.1319061111");
    add_srs_wkt (p, 10,
        "11112],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",180.598],PARAMETER[\"false_northing\",-86.99],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"27493\"]]");
    p = add_epsg_def_ex (filter, first, last, 27500, "epsg", 27500,
        "ATF (Paris) / Nord de Guerre", 0, 0,
        "Plessis 1817", "Paris RGS",
        "Ancienne_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=5.399999999999999 +k_0=0.99950908 +x_0=500000");
    add_proj4text (p, 2,
        " +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=2.33720");
    add_proj4text (p, 3,
        "8333333333 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ATF (Paris) / Nord de Guerre\",GEOGCS[\"ATF (Pa");
    add_srs_wkt (p, 1,
        "ris)\",DATUM[\"Ancienne_Triangulation_Francaise_Paris\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"Plessis 1817\",6376523,308.64,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7027\"]],AUTHORITY[\"EPSG\",\"6901\"]],PRIMEM[\"Pa");
    add_srs_wkt (p, 4,
        "ris RGS\",2.337208333333333,AUTHORITY[\"EPSG\",\"8914\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9105\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4901\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",55");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",5.999999999999998],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",0.99950908],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",300000],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"27500\"]]");
    p = add_epsg_def_ex (filter, first, last, 27561, "epsg", 27561,
        "NTF (Paris) / Lambert Nord France", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Nord France\",GEOGCS[\"NT");
    add_srs_wkt (p, 1,
        "F (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Par");
    add_srs_wkt (p, 2,
        "is\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021");
    add_srs_wkt (p, 3,
        "2936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,3");
    add_srs_wkt (p, 4,
        "20,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris");
    add_srs_wkt (p, 5,
        "\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\"");
    add_srs_wkt (p, 6,
        ",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[");
    add_srs_wkt (p, 7,
        "\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 8,
        "EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1");
    add_srs_wkt (p, 9,
        "SP\"],PARAMETER[\"latitude_of_origin\",55],PARAMETER[\"c");
    add_srs_wkt (p, 10,
        "entral_meridian\",0],PARAMETER[\"scale_factor\",0.999877");
    add_srs_wkt (p, 11,
        "341],PARAMETER[\"false_easting\",600000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"27561\"]]");
    p = add_epsg_def_ex (filter, first, last, 27562, "epsg", 27562,
        "NTF (Paris) / Lambert Centre France", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towg");
    add_proj4text (p, 2,
        "s84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Centre France\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "987742],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"27562\"]]");
    p = add_epsg_def_ex (filter, first, last, 27563, "epsg", 27563,
        "NTF (Paris) / Lambert Sud France", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Sud France\",GEOGCS[\"NTF");
    add_srs_wkt (p, 1,
        " (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Pari");
    add_srs_wkt (p, 2,
        "s\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212");
    add_srs_wkt (p, 3,
        "936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,32");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 5,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 6,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",0],PARAMETER[\"scale_factor\",0.9998774");
    add_srs_wkt (p, 11,
        "99],PARAMETER[\"false_easting\",600000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"27563\"]]");
    p = add_epsg_def_ex (filter, first, last, 27564, "epsg", 27564,
        "NTF (Paris) / Lambert Corse", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=185861.36");
    add_proj4text (p, 2,
        "9 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 ");
    add_proj4text (p, 3,
        "+pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Corse\",GEOGCS[\"NTF (Par");
    add_srs_wkt (p, 1,
        "is)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\",S");
    add_srs_wkt (p, 2,
        "PHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021293626");
    add_srs_wkt (p, 3,
        "5,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0,0");
    add_srs_wkt (p, 4,
        ",0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2.3");
    add_srs_wkt (p, 5,
        "3722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.01");
    add_srs_wkt (p, 6,
        "570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",46.85],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",0],PARAMETER[\"scale_factor\",0.9999447");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",234.358],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",185861.369],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"27564\"]]");
    p = add_epsg_def_ex (filter, first, last, 27571, "epsg", 27571,
        "NTF (Paris) / Lambert zone I", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone I\",GEOGCS[\"NTF (Pa");
    add_srs_wkt (p, 1,
        "ris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129362");
    add_srs_wkt (p, 3,
        "65,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2.");
    add_srs_wkt (p, 5,
        "33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.0");
    add_srs_wkt (p, 6,
        "1570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",55],PARAMETER[\"centr");
    add_srs_wkt (p, 10,
        "al_meridian\",0],PARAMETER[\"scale_factor\",0.999877341]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",600000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"27571\"]]");
    p = add_epsg_def_ex (filter, first, last, 27572, "epsg", 27572,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"NTF (P");
    add_srs_wkt (p, 1,
        "aris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 3,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 4,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 5,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 6,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987742");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",600000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"27572\"]]");
    p = add_epsg_def_ex (filter, first, last, 27573, "epsg", 27573,
        "NTF (Paris) / Lambert zone III", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone III\",GEOGCS[\"NTF (");
    add_srs_wkt (p, 1,
        "Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 3,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 4,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 5,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 6,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987749");
    add_srs_wkt (p, 11,
        "9],PARAMETER[\"false_easting\",600000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"27573\"]]");
    p = add_epsg_def_ex (filter, first, last, 27574, "epsg", 27574,
        "NTF (Paris) / Lambert zone IV", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.3");
    add_proj4text (p, 2,
        "69 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0");
    add_proj4text (p, 3,
        " +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone IV\",GEOGCS[\"NTF (P");
    add_srs_wkt (p, 1,
        "aris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 3,
        "265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 4,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 5,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 6,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",46.85],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",0],PARAMETER[\"scale_factor\",0.99994");
    add_srs_wkt (p, 11,
        "471],PARAMETER[\"false_easting\",234.358],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",4185861.369],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"27574\"]]");
    p = add_epsg_def_ex (filter, first, last, 27581, "epsg", 27581,
        "NTF (Paris) / France I (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France I (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",55],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "9877341],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",1200000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"27581\"]]");
    p = add_epsg_def_ex (filter, first, last, 27582, "epsg", 27582,
        "NTF (Paris) / France II (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France II (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "987742],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"27582\"]]");
    p = add_epsg_def_ex (filter, first, last, 27583, "epsg", 27583,
        "NTF (Paris) / France III (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France III (deprecated)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise");
    add_srs_wkt (p, 2,
        "_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46");
    add_srs_wkt (p, 3,
        "60212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-");
    add_srs_wkt (p, 4,
        "60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"P");
    add_srs_wkt (p, 5,
        "aris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"g");
    add_srs_wkt (p, 6,
        "rad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",49],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "999877499],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"27583\"]]");
    p = add_epsg_def_ex (filter, first, last, 27584, "epsg", 27584,
        "NTF (Paris) / France IV (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.3");
    add_proj4text (p, 2,
        "69 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0");
    add_proj4text (p, 3,
        " +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France IV (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",46.85],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".99994471],PARAMETER[\"false_easting\",234.358],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",4185861.369],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"27584\"]]");
    p = add_epsg_def_ex (filter, first, last, 27591, "epsg", 27591,
        "NTF (Paris) / Nord France (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Nord France (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francais");
    add_srs_wkt (p, 2,
        "e_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4");
    add_srs_wkt (p, 3,
        "660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,");
    add_srs_wkt (p, 4,
        "-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 9,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",55],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".999877341],PARAMETER[\"false_easting\",600000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"27591\"]]");
    p = add_epsg_def_ex (filter, first, last, 27592, "epsg", 27592,
        "NTF (Paris) / Centre France (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towg");
    add_proj4text (p, 2,
        "s84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Centre France (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Franca");
    add_srs_wkt (p, 2,
        "ise_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293");
    add_srs_wkt (p, 3,
        ".4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-16");
    add_srs_wkt (p, 4,
        "8,-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 9,
        "l_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARA");
    add_srs_wkt (p, 10,
        "METER[\"central_meridian\",0],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.99987742],PARAMETER[\"false_easting\",600000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",200000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27592\"]]");
    p = add_epsg_def_ex (filter, first, last, 27593, "epsg", 27593,
        "NTF (Paris) / Sud France (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Sud France (deprecated)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise");
    add_srs_wkt (p, 2,
        "_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46");
    add_srs_wkt (p, 3,
        "60212936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-");
    add_srs_wkt (p, 4,
        "60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"P");
    add_srs_wkt (p, 5,
        "aris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"g");
    add_srs_wkt (p, 6,
        "rad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",49],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "999877499],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"27593\"]]");
    p = add_epsg_def_ex (filter, first, last, 27594, "epsg", 27594,
        "NTF (Paris) / Corse (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=185861.36");
    add_proj4text (p, 2,
        "9 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 ");
    add_proj4text (p, 3,
        "+pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Corse (deprecated)\",GEOGCS[\"NTF");
    add_srs_wkt (p, 1,
        " (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Pari");
    add_srs_wkt (p, 2,
        "s\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212");
    add_srs_wkt (p, 3,
        "936265,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,32");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 5,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 6,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"latitude_of_origin\",46.85],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",0],PARAMETER[\"scale_factor\",0.99994");
    add_srs_wkt (p, 11,
        "471],PARAMETER[\"false_easting\",234.358],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",185861.369],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"27594\"]]");
    p = add_epsg_def_ex (filter, first, last, 27700, "epsg", 27700,
        "OSGB 1936 / British National Grid", 0, 0,
        "Airy 1830", "Greenwich",
        "OSGB_1936", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400");
    add_proj4text (p, 1,
        "000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,5");
    add_proj4text (p, 2,
        "42.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"OSGB 1936 / British National Grid\",GEOGCS[\"OS");
    add_srs_wkt (p, 1,
        "GB 1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy 1830\",637");
    add_srs_wkt (p, 2,
        "7563.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6277\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4277\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",49],PARAMETER[\"central_meridian\",-2],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.9996012717],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",400000],PARAMETER[\"false_northing\",-100000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 13,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"27700\"]]");
    p = add_epsg_def_ex (filter, first, last, 28191, "epsg", 28191,
        "Palestine 1923 / Palestine Grid", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=31.73409694444445 +lon_0=35.2120805555");
    add_proj4text (p, 1,
        "5556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6");
    add_proj4text (p, 2,
        "356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.4");
    add_proj4text (p, 3,
        "2,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Palestine Grid\",GEOGCS[\"Pale");
    add_srs_wkt (p, 1,
        "stine 1923\",DATUM[\"Palestine_1923\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (Benoit)\",6378300.789,293.4663155389802,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7010\"]],TOWGS84[-275.722,94.7824,340.894,-8.");
    add_srs_wkt (p, 4,
        "001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6281\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4281\"]],PROJECTION[\"Cassini_Soldner\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",31.73409694444445],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"central_meridian\",35.21208055555556],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",170251.555],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",126867.909],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"28191\"]]");
    p = add_epsg_def_ex (filter, first, last, 28192, "epsg", 28192,
        "Palestine 1923 / Palestine Belt", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73409694444445 +lon_0=35.212080555");
    add_proj4text (p, 1,
        "55556 +k=1 +x_0=170251.555 +y_0=1126867.909 +a=6378300.7");
    add_proj4text (p, 2,
        "89 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.0");
    add_proj4text (p, 3,
        "01,-4.42,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Palestine Belt\",GEOGCS[\"Pale");
    add_srs_wkt (p, 1,
        "stine 1923\",DATUM[\"Palestine_1923\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (Benoit)\",6378300.789,293.4663155389802,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7010\"]],TOWGS84[-275.722,94.7824,340.894,-8.");
    add_srs_wkt (p, 4,
        "001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6281\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4281\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",31.73409694444445]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"central_meridian\",35.21208055555556],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"scale_factor\",1],PARAMETER[\"false_easting\",170");
    add_srs_wkt (p, 12,
        "251.555],PARAMETER[\"false_northing\",1126867.909],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 15,
        "8192\"]]");
    p = add_epsg_def_ex (filter, first, last, 28193, "epsg", 28193,
        "Palestine 1923 / Israeli CS Grid", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=31.73409694444445 +lon_0=35.2120805555");
    add_proj4text (p, 1,
        "5556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=");
    add_proj4text (p, 2,
        "6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.");
    add_proj4text (p, 3,
        "42,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Israeli CS Grid\",GEOGCS[\"Pal");
    add_srs_wkt (p, 1,
        "estine 1923\",DATUM[\"Palestine_1923\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 2,
        " 1880 (Benoit)\",6378300.789,293.4663155389802,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7010\"]],TOWGS84[-275.722,94.7824,340.894,-8");
    add_srs_wkt (p, 4,
        ".001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6281\"]],PRIM");
    add_srs_wkt (p, 5,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4281\"]],PROJECTION[\"Cassini_Soldner\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",31.73409694444445],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"central_meridian\",35.21208055555556],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",170251.555],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",1126867.909],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"28193\"]]");
    p = add_epsg_def_ex (filter, first, last, 28232, "epsg", 28232,
        "Pointe Noire / UTM zone 32S", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Congo_1960_Pointe_Noire", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 1,
        "84=-148,51,-291,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pointe Noire / UTM zone 32S\",GEOGCS[\"Pointe N");
    add_srs_wkt (p, 1,
        "oire\",DATUM[\"Congo_1960_Pointe_Noire\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7011\"]],TOWGS84[-148,51,-291,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6282\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4282\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.9996],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 13,
        "AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"28232\"]]");
    p = add_epsg_def_ex (filter, first, last, 28348, "epsg", 28348,
        "GDA94 / MGA zone 48", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 48\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",105],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28348\"]]");
    p = add_epsg_def_ex (filter, first, last, 28349, "epsg", 28349,
        "GDA94 / MGA zone 49", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 49\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",111],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28349\"]]");
    p = add_epsg_def_ex (filter, first, last, 28350, "epsg", 28350,
        "GDA94 / MGA zone 50", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 50\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",117],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28350\"]]");
    p = add_epsg_def_ex (filter, first, last, 28351, "epsg", 28351,
        "GDA94 / MGA zone 51", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 51\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",123],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28351\"]]");
    p = add_epsg_def_ex (filter, first, last, 28352, "epsg", 28352,
        "GDA94 / MGA zone 52", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 52\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",129],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28352\"]]");
    p = add_epsg_def_ex (filter, first, last, 28353, "epsg", 28353,
        "GDA94 / MGA zone 53", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 53\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",135],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28353\"]]");
    p = add_epsg_def_ex (filter, first, last, 28354, "epsg", 28354,
        "GDA94 / MGA zone 54", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 54\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",141],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28354\"]]");
    p = add_epsg_def_ex (filter, first, last, 28355, "epsg", 28355,
        "GDA94 / MGA zone 55", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 55\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",147],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28355\"]]");
    p = add_epsg_def_ex (filter, first, last, 28356, "epsg", 28356,
        "GDA94 / MGA zone 56", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 56\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",153],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28356\"]]");
    p = add_epsg_def_ex (filter, first, last, 28357, "epsg", 28357,
        "GDA94 / MGA zone 57", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 57\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",159],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28357\"]]");
    p = add_epsg_def_ex (filter, first, last, 28358, "epsg", 28358,
        "GDA94 / MGA zone 58", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 58\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",165],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28358\"]]");
    p = add_epsg_def_ex (filter, first, last, 28402, "epsg", 28402,
        "Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.1");
    add_srs_wkt (p, 4,
        "2],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "84\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",9]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",2500000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"28402\"]]");
    p = add_epsg_def_ex (filter, first, last, 28403, "epsg", 28403,
        "Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.1");
    add_srs_wkt (p, 4,
        "2],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "84\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",15");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",3500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"28403\"]]");
    p = add_epsg_def_ex (filter, first, last, 28404, "epsg", 28404,
        "Pulkovo 1942 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 4\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",4500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"28404\"]]");
    p = add_epsg_def_ex (filter, first, last, 28405, "epsg", 28405,
        "Pulkovo 1942 / Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 5\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",5500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"28405\"]]");
    p = add_epsg_def_ex (filter, first, last, 28406, "epsg", 28406,
        "Pulkovo 1942 / Gauss-Kruger zone 6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 6\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",6500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"28406\"]]");
    p = add_epsg_def_ex (filter, first, last, 28407, "epsg", 28407,
        "Pulkovo 1942 / Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 7\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",7500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"28407\"]]");
    p = add_epsg_def_ex (filter, first, last, 28408, "epsg", 28408,
        "Pulkovo 1942 / Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 8\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",8500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"28408\"]]");
    p = add_epsg_def_ex (filter, first, last, 28409, "epsg", 28409,
        "Pulkovo 1942 / Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 9\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",9500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"28409\"]]");
    p = add_epsg_def_ex (filter, first, last, 28410, "epsg", 28410,
        "Pulkovo 1942 / Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 10\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",57],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",10500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28410\"]]");
    p = add_epsg_def_ex (filter, first, last, 28411, "epsg", 28411,
        "Pulkovo 1942 / Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 11\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",63],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",11500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28411\"]]");
    p = add_epsg_def_ex (filter, first, last, 28412, "epsg", 28412,
        "Pulkovo 1942 / Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 12\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",69],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",12500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28412\"]]");
    p = add_epsg_def_ex (filter, first, last, 28413, "epsg", 28413,
        "Pulkovo 1942 / Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 13\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",75],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",13500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28413\"]]");
    p = add_epsg_def_ex (filter, first, last, 28414, "epsg", 28414,
        "Pulkovo 1942 / Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 14\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",81],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",14500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28414\"]]");
    p = add_epsg_def_ex (filter, first, last, 28415, "epsg", 28415,
        "Pulkovo 1942 / Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 15\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",87],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",15500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28415\"]]");
    p = add_epsg_def_ex (filter, first, last, 28416, "epsg", 28416,
        "Pulkovo 1942 / Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 16\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",93],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",16500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28416\"]]");
    p = add_epsg_def_ex (filter, first, last, 28417, "epsg", 28417,
        "Pulkovo 1942 / Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 17\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",99],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",17500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28417\"]]");
    p = add_epsg_def_ex (filter, first, last, 28418, "epsg", 28418,
        "Pulkovo 1942 / Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 18\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",105],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",1850000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28418\"]]");
    p = add_epsg_def_ex (filter, first, last, 28419, "epsg", 28419,
        "Pulkovo 1942 / Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 19\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",111],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",1950000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28419\"]]");
    p = add_epsg_def_ex (filter, first, last, 28420, "epsg", 28420,
        "Pulkovo 1942 / Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 20\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",117],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2050000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28420\"]]");
    p = add_epsg_def_ex (filter, first, last, 28421, "epsg", 28421,
        "Pulkovo 1942 / Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 21\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",123],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2150000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28421\"]]");
    p = add_epsg_def_ex (filter, first, last, 28422, "epsg", 28422,
        "Pulkovo 1942 / Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 22\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",129],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2250000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28422\"]]");
    p = add_epsg_def_ex (filter, first, last, 28423, "epsg", 28423,
        "Pulkovo 1942 / Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 23\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",135],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2350000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28423\"]]");
    p = add_epsg_def_ex (filter, first, last, 28424, "epsg", 28424,
        "Pulkovo 1942 / Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 24\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",141],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2450000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28424\"]]");
    p = add_epsg_def_ex (filter, first, last, 28425, "epsg", 28425,
        "Pulkovo 1942 / Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 25\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",147],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2550000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28425\"]]");
    p = add_epsg_def_ex (filter, first, last, 28426, "epsg", 28426,
        "Pulkovo 1942 / Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 26\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",153],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2650000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28426\"]]");
    p = add_epsg_def_ex (filter, first, last, 28427, "epsg", 28427,
        "Pulkovo 1942 / Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 27\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",159],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2750000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28427\"]]");
    p = add_epsg_def_ex (filter, first, last, 28428, "epsg", 28428,
        "Pulkovo 1942 / Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 28\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",165],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2850000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28428\"]]");
    p = add_epsg_def_ex (filter, first, last, 28429, "epsg", 28429,
        "Pulkovo 1942 / Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 29\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",171],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",2950000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28429\"]]");
    p = add_epsg_def_ex (filter, first, last, 28430, "epsg", 28430,
        "Pulkovo 1942 / Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 30\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",177],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",3050000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28430\"]]");
    p = add_epsg_def_ex (filter, first, last, 28431, "epsg", 28431,
        "Pulkovo 1942 / Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 31\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",-177],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1],PARAMETER[\"false_easting\",315000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"28431\"]]");
    p = add_epsg_def_ex (filter, first, last, 28432, "epsg", 28432,
        "Pulkovo 1942 / Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.8");
    add_proj4text (p, 2,
        "2,-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 32\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",-171],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"scale_factor\",1],PARAMETER[\"false_easting\",325000");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"28432\"]]");
    p = add_epsg_def_ex (filter, first, last, 28462, "epsg", 28462,
        "Pulkovo 1942 / Gauss-Kruger 2N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +e");
    add_proj4text (p, 1,
        "llps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 2N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",9],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28462\"]]");
    p = add_epsg_def_ex (filter, first, last, 28463, "epsg", 28463,
        "Pulkovo 1942 / Gauss-Kruger 3N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 3N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",15],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28463\"]]");
    p = add_epsg_def_ex (filter, first, last, 28464, "epsg", 28464,
        "Pulkovo 1942 / Gauss-Kruger 4N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 4N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",21],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28464\"]]");
    p = add_epsg_def_ex (filter, first, last, 28465, "epsg", 28465,
        "Pulkovo 1942 / Gauss-Kruger 5N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 5N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",27],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28465\"]]");
    p = add_epsg_def_ex (filter, first, last, 28466, "epsg", 28466,
        "Pulkovo 1942 / Gauss-Kruger 6N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 6N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",33],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28466\"]]");
    p = add_epsg_def_ex (filter, first, last, 28467, "epsg", 28467,
        "Pulkovo 1942 / Gauss-Kruger 7N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 7N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",39],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28467\"]]");
    p = add_epsg_def_ex (filter, first, last, 28468, "epsg", 28468,
        "Pulkovo 1942 / Gauss-Kruger 8N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 8N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",45],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28468\"]]");
    p = add_epsg_def_ex (filter, first, last, 28469, "epsg", 28469,
        "Pulkovo 1942 / Gauss-Kruger 9N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 9N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",51],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",5");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",EAST],AUTHORITY[\"EPSG\",\"28469\"]]");
    p = add_epsg_def_ex (filter, first, last, 28470, "epsg", 28470,
        "Pulkovo 1942 / Gauss-Kruger 10N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 10N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28470\"]]");
    p = add_epsg_def_ex (filter, first, last, 28471, "epsg", 28471,
        "Pulkovo 1942 / Gauss-Kruger 11N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 11N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",63],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28471\"]]");
    p = add_epsg_def_ex (filter, first, last, 28472, "epsg", 28472,
        "Pulkovo 1942 / Gauss-Kruger 12N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 12N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",69],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28472\"]]");
    p = add_epsg_def_ex (filter, first, last, 28473, "epsg", 28473,
        "Pulkovo 1942 / Gauss-Kruger 13N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 13N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",75],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28473\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_41.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418


































































































































































































































































3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_41 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 23832, "epsg", 23832,
        "DGN95 / Indonesia TM-3 zone 47.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=100.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 47.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",100.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23832\"]]");
    p = add_epsg_def_ex (filter, first, last, 23833, "epsg", 23833,
        "DGN95 / Indonesia TM-3 zone 48.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=103.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 48.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",103.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23833\"]]");
    p = add_epsg_def_ex (filter, first, last, 23834, "epsg", 23834,
        "DGN95 / Indonesia TM-3 zone 48.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=106.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 48.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",106.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23834\"]]");
    p = add_epsg_def_ex (filter, first, last, 23835, "epsg", 23835,
        "DGN95 / Indonesia TM-3 zone 49.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=109.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 49.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",109.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23835\"]]");
    p = add_epsg_def_ex (filter, first, last, 23836, "epsg", 23836,
        "DGN95 / Indonesia TM-3 zone 49.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=112.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 49.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",112.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23836\"]]");
    p = add_epsg_def_ex (filter, first, last, 23837, "epsg", 23837,
        "DGN95 / Indonesia TM-3 zone 50.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=115.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 50.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",115.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23837\"]]");
    p = add_epsg_def_ex (filter, first, last, 23838, "epsg", 23838,
        "DGN95 / Indonesia TM-3 zone 50.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=118.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 50.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",118.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23838\"]]");
    p = add_epsg_def_ex (filter, first, last, 23839, "epsg", 23839,
        "DGN95 / Indonesia TM-3 zone 51.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=121.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 51.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",121.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23839\"]]");
    p = add_epsg_def_ex (filter, first, last, 23840, "epsg", 23840,
        "DGN95 / Indonesia TM-3 zone 51.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=124.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 51.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",124.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23840\"]]");
    p = add_epsg_def_ex (filter, first, last, 23841, "epsg", 23841,
        "DGN95 / Indonesia TM-3 zone 52.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=127.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 52.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",127.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23841\"]]");
    p = add_epsg_def_ex (filter, first, last, 23842, "epsg", 23842,
        "DGN95 / Indonesia TM-3 zone 52.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=130.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 52.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",130.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23842\"]]");
    p = add_epsg_def_ex (filter, first, last, 23843, "epsg", 23843,
        "DGN95 / Indonesia TM-3 zone 53.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=133.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 53.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",133.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23843\"]]");
    p = add_epsg_def_ex (filter, first, last, 23844, "epsg", 23844,
        "DGN95 / Indonesia TM-3 zone 53.2", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=136.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 53.2\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",136.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23844\"]]");
    p = add_epsg_def_ex (filter, first, last, 23845, "epsg", 23845,
        "DGN95 / Indonesia TM-3 zone 54.1", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=139.5 +k=0.9999 +x_0=200000 ");
    add_proj4text (p, 1,
        "+y_0=1500000 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / Indonesia TM-3 zone 54.1\",GEOGCS[\"DGN");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Datum_Geodesi_Nasional_1995\",SPHEROID[\"WG");
    add_srs_wkt (p, 2,
        "S 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4755\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",139.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",1500000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"23845\"]]");
    p = add_epsg_def_ex (filter, first, last, 23846, "epsg", 23846,
        "ID74 / UTM zone 46N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 46N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",93],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"23846\"]]");
    p = add_epsg_def_ex (filter, first, last, 23847, "epsg", 23847,
        "ID74 / UTM zone 47N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 47N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",99],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"23847\"]]");
    p = add_epsg_def_ex (filter, first, last, 23848, "epsg", 23848,
        "ID74 / UTM zone 48N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 48N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",105],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23848\"]]");
    p = add_epsg_def_ex (filter, first, last, 23849, "epsg", 23849,
        "ID74 / UTM zone 49N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 49N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",111],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23849\"]]");
    p = add_epsg_def_ex (filter, first, last, 23850, "epsg", 23850,
        "ID74 / UTM zone 50N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 50N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",117],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23850\"]]");
    p = add_epsg_def_ex (filter, first, last, 23851, "epsg", 23851,
        "ID74 / UTM zone 51N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 51N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",123],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23851\"]]");
    p = add_epsg_def_ex (filter, first, last, 23852, "epsg", 23852,
        "ID74 / UTM zone 52N", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 52N\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",129],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 12,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"23852\"]]");
    p = add_epsg_def_ex (filter, first, last, 23853, "epsg", 23853,
        "ID74 / UTM zone 53N (deprecated)", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +a=6378160 +b=6356774.50408554 +towgs");
    add_proj4text (p, 1,
        "84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 53N (deprecated)\",GEOGCS[\"ID7");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"Indonesian_Datum_1974\",SPHEROID[\"Indonesia");
    add_srs_wkt (p, 2,
        "n National Spheroid\",6378160,298.247,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7021\"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6238\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",135],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"23853\"]]");
    p = add_epsg_def_ex (filter, first, last, 23866, "epsg", 23866,
        "DGN95 / UTM zone 46N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 46N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",93],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23866\"]]");
    p = add_epsg_def_ex (filter, first, last, 23867, "epsg", 23867,
        "DGN95 / UTM zone 47N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 47N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",99],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"23867\"]]");
    p = add_epsg_def_ex (filter, first, last, 23868, "epsg", 23868,
        "DGN95 / UTM zone 48N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 48N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",105],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23868\"]]");
    p = add_epsg_def_ex (filter, first, last, 23869, "epsg", 23869,
        "DGN95 / UTM zone 49N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 49N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23869\"]]");
    p = add_epsg_def_ex (filter, first, last, 23870, "epsg", 23870,
        "DGN95 / UTM zone 50N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 50N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23870\"]]");
    p = add_epsg_def_ex (filter, first, last, 23871, "epsg", 23871,
        "DGN95 / UTM zone 51N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 51N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23871\"]]");
    p = add_epsg_def_ex (filter, first, last, 23872, "epsg", 23872,
        "DGN95 / UTM zone 52N", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 52N\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",129],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"23872\"]]");
    p = add_epsg_def_ex (filter, first, last, 23877, "epsg", 23877,
        "DGN95 / UTM zone 47S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 47S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",99],PARAMETER[\"scale_factor\",0.9996],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",500000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"23877\"]]");
    p = add_epsg_def_ex (filter, first, last, 23878, "epsg", 23878,
        "DGN95 / UTM zone 48S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 48S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",105],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23878\"]]");
    p = add_epsg_def_ex (filter, first, last, 23879, "epsg", 23879,
        "DGN95 / UTM zone 49S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 49S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",111],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23879\"]]");
    p = add_epsg_def_ex (filter, first, last, 23880, "epsg", 23880,
        "DGN95 / UTM zone 50S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 50S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",117],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23880\"]]");
    p = add_epsg_def_ex (filter, first, last, 23881, "epsg", 23881,
        "DGN95 / UTM zone 51S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 51S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",123],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23881\"]]");
    p = add_epsg_def_ex (filter, first, last, 23882, "epsg", 23882,
        "DGN95 / UTM zone 52S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 52S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",129],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23882\"]]");
    p = add_epsg_def_ex (filter, first, last, 23883, "epsg", 23883,
        "DGN95 / UTM zone 53S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 53S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",135],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23883\"]]");
    p = add_epsg_def_ex (filter, first, last, 23884, "epsg", 23884,
        "DGN95 / UTM zone 54S", 0, 0,
        "WGS 84", "Greenwich",
        "Datum_Geodesi_Nasional_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=WGS84 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DGN95 / UTM zone 54S\",GEOGCS[\"DGN95\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Datum_Geodesi_Nasional_1995\",SPHEROID[\"WGS 84\",637813");
    add_srs_wkt (p, 2,
        "7,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6755\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4755\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",141],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"23884\"]]");
    p = add_epsg_def_ex (filter, first, last, 23886, "epsg", 23886,
        "ID74 / UTM zone 46S (deprecated)", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 46S (deprecated)\",GEOGCS[\"ID7");
    add_srs_wkt (p, 1,
        "4\",DATUM[\"Indonesian_Datum_1974\",SPHEROID[\"Indonesia");
    add_srs_wkt (p, 2,
        "n National Spheroid\",6378160,298.247,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7021\"]],TOWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6238\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",93],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"23886\"]]");
    p = add_epsg_def_ex (filter, first, last, 23887, "epsg", 23887,
        "ID74 / UTM zone 47S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 47S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",99],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "96],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"23887\"]]");
    p = add_epsg_def_ex (filter, first, last, 23888, "epsg", 23888,
        "ID74 / UTM zone 48S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 48S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",105],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23888\"]]");
    p = add_epsg_def_ex (filter, first, last, 23889, "epsg", 23889,
        "ID74 / UTM zone 49S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 49S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",111],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23889\"]]");
    p = add_epsg_def_ex (filter, first, last, 23890, "epsg", 23890,
        "ID74 / UTM zone 50S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 50S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",117],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23890\"]]");
    p = add_epsg_def_ex (filter, first, last, 23891, "epsg", 23891,
        "ID74 / UTM zone 51S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 51S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",123],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23891\"]]");
    p = add_epsg_def_ex (filter, first, last, 23892, "epsg", 23892,
        "ID74 / UTM zone 52S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 52S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",129],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23892\"]]");
    p = add_epsg_def_ex (filter, first, last, 23893, "epsg", 23893,
        "ID74 / UTM zone 53S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 53S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",135],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23893\"]]");
    p = add_epsg_def_ex (filter, first, last, 23894, "epsg", 23894,
        "ID74 / UTM zone 54S", 0, 0,
        "Indonesian National Spheroid", "Greenwich",
        "Indonesian_Datum_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +a=6378160 +b=6356774.50408554");
    add_proj4text (p, 1,
        " +towgs84=-24,-15,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ID74 / UTM zone 54S\",GEOGCS[\"ID74\",DATUM[\"I");
    add_srs_wkt (p, 1,
        "ndonesian_Datum_1974\",SPHEROID[\"Indonesian National Sp");
    add_srs_wkt (p, 2,
        "heroid\",6378160,298.247,AUTHORITY[\"EPSG\",\"7021\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-24,-15,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6238\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4238\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",141],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"23894\"]]");
    p = add_epsg_def_ex (filter, first, last, 23946, "epsg", 23946,
        "Indian 1954 / UTM zone 46N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1954", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=217,823,299,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1954 / UTM zone 46N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Indian_1954\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6239\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4239\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",93],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"23946\"]]");
    p = add_epsg_def_ex (filter, first, last, 23947, "epsg", 23947,
        "Indian 1954 / UTM zone 47N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1954", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=217,823,299,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1954 / UTM zone 47N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Indian_1954\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6239\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4239\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",99],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"23947\"]]");
    p = add_epsg_def_ex (filter, first, last, 23948, "epsg", 23948,
        "Indian 1954 / UTM zone 48N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1954", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=217,823,299,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1954 / UTM zone 48N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "54\",DATUM[\"Indian_1954\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[217,823,299,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6239\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4239\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",105],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"23948\"]]");
    p = add_epsg_def_ex (filter, first, last, 24047, "epsg", 24047,
        "Indian 1975 / UTM zone 47N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=210,814,289,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1975 / UTM zone 47N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "75\",DATUM[\"Indian_1975\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6240\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4240\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",99],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.9996],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"24047\"]]");
    p = add_epsg_def_ex (filter, first, last, 24048, "epsg", 24048,
        "Indian 1975 / UTM zone 48N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Indian_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=210,814,289,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Indian 1975 / UTM zone 48N\",GEOGCS[\"Indian 19");
    add_srs_wkt (p, 1,
        "75\",DATUM[\"Indian_1975\",SPHEROID[\"Everest 1830 (1937");
    add_srs_wkt (p, 2,
        " Adjustment)\",6377276.345,300.8017,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7015\"]],TOWGS84[210,814,289,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6240\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4240\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",105],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"24048\"]]");
    p = add_epsg_def_ex (filter, first, last, 24100, "epsg", 24100,
        "Jamaica 1875 / Jamaica (Old Grid)", 0, 0,
        "Clarke 1880", "Greenwich",
        "Jamaica_1875", "Lambert_Conformal_Conic_1SP", "Clarke's foot",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=167");
    add_proj4text (p, 1,
        "638.49597 +y_0=121918.90616 +a=6378249.144808011 +b=6356");
    add_proj4text (p, 2,
        "514.966204134 +to_meter=0.3047972654 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Jamaica 1875 / Jamaica (Old Grid)\",GEOGCS[\"Ja");
    add_srs_wkt (p, 1,
        "maica 1875\",DATUM[\"Jamaica_1875\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "80\",6378249.144808011,293.4663076556365,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7034\"]],AUTHORITY[\"EPSG\",\"6241\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4241\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",18],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-77],PARAMETER[\"scale_factor\",1],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",550000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",400000],UNIT[\"Clarke's foot\",0.3047972654,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9005\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"24100\"]]");
    p = add_epsg_def_ex (filter, first, last, 24200, "epsg", 24200,
        "JAD69 / Jamaica National Grid", 0, 0,
        "Clarke 1866", "Greenwich",
        "Jamaica_1969", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18 +lat_0=18 +lon_0=-77 +k_0=1 +x_0=250");
    add_proj4text (p, 1,
        "000 +y_0=150000 +ellps=clrk66 +towgs84=70,207,389.5,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"JAD69 / Jamaica National Grid\",GEOGCS[\"JAD69\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Jamaica_1969\",SPHEROID[\"Clarke 1866\",6378206");
    add_srs_wkt (p, 2,
        ".4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[70,207,389.5,0,0,0,0],AUTHORITY[\"EPSG\",\"6242\"]],P");
    add_srs_wkt (p, 4,
        "RIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT");
    add_srs_wkt (p, 5,
        "[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122");
    add_srs_wkt (p, 6,
        "\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],A");
    add_srs_wkt (p, 7,
        "UTHORITY[\"EPSG\",\"4242\"]],PROJECTION[\"Lambert_Confor");
    add_srs_wkt (p, 8,
        "mal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",18],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-77],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1],PARAMETER[\"false_easting\",250000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",150000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24200\"]]");
    p = add_epsg_def_ex (filter, first, last, 24305, "epsg", 24305,
        "Kalianpur 1937 / UTM zone 45N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kalianpur_1937", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=214,804,268,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1937 / UTM zone 45N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1937\",DATUM[\"Kalianpur_1937\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1937 Adjustment)\",6377276.345,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7015\"]],TOWGS84[214,804,268,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4144\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",87],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24305\"]]");
    p = add_epsg_def_ex (filter, first, last, 24306, "epsg", 24306,
        "Kalianpur 1937 / UTM zone 46N", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kalianpur_1937", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6377276.345 +b=6356075.41314024 +t");
    add_proj4text (p, 1,
        "owgs84=214,804,268,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1937 / UTM zone 46N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1937\",DATUM[\"Kalianpur_1937\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1937 Adjustment)\",6377276.345,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7015\"]],TOWGS84[214,804,268,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4144\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",93],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24306\"]]");
    p = add_epsg_def_ex (filter, first, last, 24311, "epsg", 24311,
        "Kalianpur 1962 / UTM zone 41N", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +a=6377301.243 +b=6356100.230165384 +");
    add_proj4text (p, 1,
        "towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / UTM zone 41N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",63],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24311\"]]");
    p = add_epsg_def_ex (filter, first, last, 24312, "epsg", 24312,
        "Kalianpur 1962 / UTM zone 42N", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +a=6377301.243 +b=6356100.230165384 +");
    add_proj4text (p, 1,
        "towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / UTM zone 42N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",69],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24312\"]]");
    p = add_epsg_def_ex (filter, first, last, 24313, "epsg", 24313,
        "Kalianpur 1962 / UTM zone 43N", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +a=6377301.243 +b=6356100.230165384 +");
    add_proj4text (p, 1,
        "towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / UTM zone 43N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24313\"]]");
    p = add_epsg_def_ex (filter, first, last, 24342, "epsg", 24342,
        "Kalianpur 1975 / UTM zone 42N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 42N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",69],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24342\"]]");
    p = add_epsg_def_ex (filter, first, last, 24343, "epsg", 24343,
        "Kalianpur 1975 / UTM zone 43N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 43N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",75],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24343\"]]");
    p = add_epsg_def_ex (filter, first, last, 24344, "epsg", 24344,
        "Kalianpur 1975 / UTM zone 44N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 44N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",81],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24344\"]]");
    p = add_epsg_def_ex (filter, first, last, 24345, "epsg", 24345,
        "Kalianpur 1975 / UTM zone 45N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 45N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",87],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24345\"]]");
    p = add_epsg_def_ex (filter, first, last, 24346, "epsg", 24346,
        "Kalianpur 1975 / UTM zone 46N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 46N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",93],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24346\"]]");
    p = add_epsg_def_ex (filter, first, last, 24347, "epsg", 24347,
        "Kalianpur 1975 / UTM zone 47N", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377299.151 +b=6356098.145120132 +");
    add_proj4text (p, 1,
        "towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / UTM zone 47N\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",99],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"24347\"]]");
    p = add_epsg_def_ex (filter, first, last, 24370, "epsg", 24370,
        "Kalianpur 1880 / India zone 0", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.5 +lat_0=39.5 +lon_0=68 +k_0=0.99846");
    add_proj4text (p, 1,
        "154 +x_0=2153865.73916853 +y_0=2368292.194628102 +a=6377");
    add_proj4text (p, 2,
        "299.36559538 +b=6356098.359005156 +to_meter=0.9143985307");
    add_proj4text (p, 3,
        "444408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone 0\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest (");
    add_srs_wkt (p, 2,
        "1830 Definition)\",6377299.36559538,300.8017255433549,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",39.");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",68],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.99846154],PARAMETER[\"false_easting\",2355500");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",2590000],UNIT[\"Indian ya");
    add_srs_wkt (p, 12,
        "rd\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"24370\"]]");
    p = add_epsg_def_ex (filter, first, last, 24371, "epsg", 24371,
        "Kalianpur 1880 / India zone I", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878");
    add_proj4text (p, 1,
        "641 +x_0=2743195.592233322 +y_0=914398.5307444407 +a=637");
    add_proj4text (p, 2,
        "7299.36559538 +b=6356098.359005156 +to_meter=0.914398530");
    add_proj4text (p, 3,
        "7444408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone I\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest (");
    add_srs_wkt (p, 2,
        "1830 Definition)\",6377299.36559538,300.8017255433549,AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",32.");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"central_meridian\",68],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.99878641],PARAMETER[\"false_easting\",3000000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",1000000],UNIT[\"Indian ya");
    add_srs_wkt (p, 12,
        "rd\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"24371\"]]");
    p = add_epsg_def_ex (filter, first, last, 24372, "epsg", 24372,
        "Kalianpur 1880 / India zone IIa", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IIa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " (1830 Definition)\",6377299.36559538,300.8017255433549,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",74],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.99878641],PARAMETER[\"false_easting\",3000000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",1000000],UNIT[\"Indian yar");
    add_srs_wkt (p, 12,
        "d\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"24372\"]]");
    p = add_epsg_def_ex (filter, first, last, 24373, "epsg", 24373,
        "Kalianpur 1880 / India zone IIIa", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IIIa\",GEOGCS[\"Kal");
    add_srs_wkt (p, 1,
        "ianpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everes");
    add_srs_wkt (p, 2,
        "t (1830 Definition)\",6377299.36559538,300.8017255433549");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_");
    add_srs_wkt (p, 8,
        "Conformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "19],PARAMETER[\"central_meridian\",80],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99878641],PARAMETER[\"false_easting\",300000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",1000000],UNIT[\"Indian y");
    add_srs_wkt (p, 12,
        "ard\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"24373\"]]");
    p = add_epsg_def_ex (filter, first, last, 24374, "epsg", 24374,
        "Kalianpur 1880 / India zone IVa", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IVa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " (1830 Definition)\",6377299.36559538,300.8017255433549,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",12");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",80],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.99878641],PARAMETER[\"false_easting\",3000000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",1000000],UNIT[\"Indian yar");
    add_srs_wkt (p, 12,
        "d\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"24374\"]]");
    p = add_epsg_def_ex (filter, first, last, 24375, "epsg", 24375,
        "Kalianpur 1937 / India zone IIb", 0, 0,
        "Everest 1830 (1937 Adjustment)", "Greenwich",
        "Kalianpur_1937", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743185.69 +y_0=914395.23 +a=6377276.345 +b=6356075");
    add_proj4text (p, 2,
        ".41314024 +towgs84=214,804,268,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1937 / India zone IIb\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1937\",DATUM[\"Kalianpur_1937\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1937 Adjustment)\",6377276.345,300.8017,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7015\"]],TOWGS84[214,804,268,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6144\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4144\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",26],PARAMETER[\"central_meridian\",90");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",2743185.69],PARAMETER[\"false_northing\",91");
    add_srs_wkt (p, 12,
        "4395.23],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24375\"]]");
    p = add_epsg_def_ex (filter, first, last, 24376, "epsg", 24376,
        "Kalianpur 1962 / India zone I", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878");
    add_proj4text (p, 1,
        "641 +x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=63561");
    add_proj4text (p, 2,
        "00.230165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / India zone I\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1962 Definition)\",6377301.243,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",32.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",68],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2743196.4],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "914398.8],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"24376\"]]");
    p = add_epsg_def_ex (filter, first, last, 24377, "epsg", 24377,
        "Kalianpur 1962 / India zone IIa", 0, 0,
        "Everest 1830 (1962 Definition)", "Greenwich",
        "Kalianpur_1962", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743196.4 +y_0=914398.8 +a=6377301.243 +b=6356100.2");
    add_proj4text (p, 2,
        "30165384 +towgs84=283,682,231,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1962 / India zone IIa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1962\",DATUM[\"Kalianpur_1962\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1962 Definition)\",6377301.243,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7044\"]],TOWGS84[283,682,231,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6145\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4145\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",26],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "74],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743196.4],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.8],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24377\"]]");
    p = add_epsg_def_ex (filter, first, last, 24378, "epsg", 24378,
        "Kalianpur 1975 / India zone I", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=68 +k_0=0.99878");
    add_proj4text (p, 1,
        "641 +x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=63560");
    add_proj4text (p, 2,
        "98.145120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone I\",GEOGCS[\"Kalian");
    add_srs_wkt (p, 1,
        "pur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1975 Definition)\",6377299.151,300.8017255,AUTHORIT");
    add_srs_wkt (p, 3,
        "Y[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",32.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",68],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2743195.5],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "914398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"24378\"]]");
    p = add_epsg_def_ex (filter, first, last, 24379, "epsg", 24379,
        "Kalianpur 1975 / India zone IIa", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=74 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IIa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",26],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "74],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743195.5],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24379\"]]");
    p = add_epsg_def_ex (filter, first, last, 24380, "epsg", 24380,
        "Kalianpur 1975 / India zone IIb", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IIb\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",26],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "90],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743195.5],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24380\"]]");
    p = add_epsg_def_ex (filter, first, last, 24381, "epsg", 24381,
        "Kalianpur 1975 / India zone IIIa", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=19 +lat_0=19 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IIIa\",GEOGCS[\"Kal");
    add_srs_wkt (p, 1,
        "ianpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everes");
    add_srs_wkt (p, 2,
        "t 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"latitude_of_origin\",19],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",80],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",2743195.5],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "914398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"24381\"]]");
    p = add_epsg_def_ex (filter, first, last, 24382, "epsg", 24382,
        "Kalianpur 1880 / India zone IIb", 0, 0,
        "Everest (1830 Definition)", "Greenwich",
        "Kalianpur_1880", "Lambert_Conformal_Conic_1SP", "Indian yard",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26 +lat_0=26 +lon_0=90 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.592233322 +y_0=914398.5307444407 +a=6377299");
    add_proj4text (p, 2,
        ".36559538 +b=6356098.359005156 +to_meter=0.9143985307444");
    add_proj4text (p, 3,
        "408 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1880 / India zone IIb\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1880\",DATUM[\"Kalianpur_1880\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " (1830 Definition)\",6377299.36559538,300.8017255433549,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7042\"]],AUTHORITY[\"EPSG\",\"6243\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4243\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",90],PARAMETER[\"scale_f");
    add_srs_wkt (p, 10,
        "actor\",0.99878641],PARAMETER[\"false_easting\",3000000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",1000000],UNIT[\"Indian yar");
    add_srs_wkt (p, 12,
        "d\",0.9143985307444408,AUTHORITY[\"EPSG\",\"9084\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"24382\"]]");
    p = add_epsg_def_ex (filter, first, last, 24383, "epsg", 24383,
        "Kalianpur 1975 / India zone IVa", 0, 0,
        "Everest 1830 (1975 Definition)", "Greenwich",
        "Kalianpur_1975", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=12 +lat_0=12 +lon_0=80 +k_0=0.99878641 ");
    add_proj4text (p, 1,
        "+x_0=2743195.5 +y_0=914398.5 +a=6377299.151 +b=6356098.1");
    add_proj4text (p, 2,
        "45120132 +towgs84=295,736,257,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kalianpur 1975 / India zone IVa\",GEOGCS[\"Kali");
    add_srs_wkt (p, 1,
        "anpur 1975\",DATUM[\"Kalianpur_1975\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1975 Definition)\",6377299.151,300.8017255,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7045\"]],TOWGS84[295,736,257,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6146\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4146\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",12],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 10,
        "80],PARAMETER[\"scale_factor\",0.99878641],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",2743195.5],PARAMETER[\"false_northing\",9");
    add_srs_wkt (p, 12,
        "14398.5],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 13,
        "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"24383\"]]");
    p = add_epsg_def_ex (filter, first, last, 24500, "epsg", 24500,
        "Kertau 1968 / Singapore Grid", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=1.287646666666667 +lon_0=103.853002222");
    add_proj4text (p, 1,
        "2222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038");
    add_proj4text (p, 2,
        "993155 +towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / Singapore Grid\",GEOGCS[\"Kertau ");
    add_srs_wkt (p, 1,
        "1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Mod");
    add_srs_wkt (p, 2,
        "ified\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Cassini_So");
    add_srs_wkt (p, 8,
        "ldner\"],PARAMETER[\"latitude_of_origin\",1.287646666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"central_meridian\",103.8530022222222],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",30000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",30000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"24500\"]]");
    p = add_epsg_def_ex (filter, first, last, 24547, "epsg", 24547,
        "Kertau 1968 / UTM zone 47N", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 1,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / UTM zone 47N\",GEOGCS[\"Kertau 19");
    add_srs_wkt (p, 1,
        "68\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modif");
    add_srs_wkt (p, 2,
        "ied\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",99],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"24547\"]]");
    p = add_epsg_def_ex (filter, first, last, 24548, "epsg", 24548,
        "Kertau 1968 / UTM zone 48N", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +a=6377304.063 +b=6356103.038993155 +");
    add_proj4text (p, 1,
        "towgs84=-11,851,5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau 1968 / UTM zone 48N\",GEOGCS[\"Kertau 19");
    add_srs_wkt (p, 1,
        "68\",DATUM[\"Kertau_1968\",SPHEROID[\"Everest 1830 Modif");
    add_srs_wkt (p, 2,
        "ied\",6377304.063,300.8017,AUTHORITY[\"EPSG\",\"7018\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EPSG\",\"6245\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",105],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"24548\"]]");
    p = add_epsg_def_ex (filter, first, last, 24571, "epsg", 24571,
        "Kertau / R.S.O. Malaya (ch) (deprecated)", 0, 0,
        "Everest 1830 Modified", "Greenwich",
        "Kertau_1968", "Hotine_Oblique_Mercator", "British chain (Benoit 1895 B)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=");
    add_proj4text (p, 1,
        "0.99984 +x_0=804671.2997750348 +y_0=0 +no_uoff +gamma=32");
    add_proj4text (p, 2,
        "3.1301023611111 +a=6377304.063 +b=6356103.038993155 +tow");
    add_proj4text (p, 3,
        "gs84=-11,851,5,0,0,0,0 +to_meter=20.11678249437587 +no_d");
    add_proj4text (p, 4,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Kertau / R.S.O. Malaya (ch) (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Kertau 1968\",DATUM[\"Kertau_1968\",SPHEROID[\"Ever");
    add_srs_wkt (p, 2,
        "est 1830 Modified\",6377304.063,300.8017,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7018\"]],TOWGS84[-11,851,5,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6245\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4245\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Hotine_Oblique_Mercator\"],PARAMETER[\"latitude_of_cen");
    add_srs_wkt (p, 9,
        "ter\",4],PARAMETER[\"longitude_of_center\",102.25],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"azimuth\",323.0257905],PARAMETER[\"rectified_grid");
    add_srs_wkt (p, 11,
        "_angle\",323.1301023611111],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 12,
        ".99984],PARAMETER[\"false_easting\",40000],PARAMETER[\"f");
    add_srs_wkt (p, 13,
        "alse_northing\",0],UNIT[\"British chain (Benoit 1895 B)\"");
    add_srs_wkt (p, 14,
        ",20.11678249437587,AUTHORITY[\"EPSG\",\"9062\"]],AXIS[\"");
    add_srs_wkt (p, 15,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 16,
        "G\",\"24571\"]]");
    p = add_epsg_def_ex (filter, first, last, 24600, "epsg", 24600,
        "KOC Lambert", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Kuwait_Oil_Company", "Lambert_Conformal_Conic_1SP", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.5 +lat_0=32.5 +lon_0=45 +k_0=0.99878");
    add_proj4text (p, 1,
        "64078000001 +x_0=1500000 +y_0=1166200 +ellps=clrk80 +tow");
    add_proj4text (p, 2,
        "gs84=-294.7,-200.1,525.5,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"KOC Lambert\",GEOGCS[\"KOC\",DATUM[\"Kuwait_Oil");
    add_srs_wkt (p, 1,
        "_Company\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,29");
    add_srs_wkt (p, 2,
        "3.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-294.7,-200.");
    add_srs_wkt (p, 3,
        "1,525.5,0,0,0,0],AUTHORITY[\"EPSG\",\"6246\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4246\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_1SP\"],PARAMETER[\"latitude_of_origin\",32.5],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",45],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9987864078],PARAMETER[\"false_easting\",1500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",1166200],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 13,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"24600\"]]");
    p = add_epsg_def_ex (filter, first, last, 24718, "epsg", 24718,
        "La Canoa / UTM zone 18N", 0, 0,
        "International 1924", "Greenwich",
        "La_Canoa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=intl +towgs84=-273.5,110.6,-35");
    add_proj4text (p, 1,
        "7.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"La Canoa / UTM zone 18N\",GEOGCS[\"La Canoa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"La_Canoa\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-273.5,110.6");
    add_srs_wkt (p, 3,
        ",-357.9,0,0,0,0],AUTHORITY[\"EPSG\",\"6247\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4247\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-75],PARAMETER[\"scale_factor\",0.9996],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"24718\"]]");
    p = add_epsg_def_ex (filter, first, last, 24719, "epsg", 24719,
        "La Canoa / UTM zone 19N", 0, 0,
        "International 1924", "Greenwich",
        "La_Canoa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=intl +towgs84=-273.5,110.6,-35");
    add_proj4text (p, 1,
        "7.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"La Canoa / UTM zone 19N\",GEOGCS[\"La Canoa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"La_Canoa\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-273.5,110.6");
    add_srs_wkt (p, 3,
        ",-357.9,0,0,0,0],AUTHORITY[\"EPSG\",\"6247\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4247\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-69],PARAMETER[\"scale_factor\",0.9996],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"24719\"]]");
    p = add_epsg_def_ex (filter, first, last, 24720, "epsg", 24720,
        "La Canoa / UTM zone 20N", 0, 0,
        "International 1924", "Greenwich",
        "La_Canoa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=intl +towgs84=-273.5,110.6,-35");
    add_proj4text (p, 1,
        "7.9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"La Canoa / UTM zone 20N\",GEOGCS[\"La Canoa\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"La_Canoa\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-273.5,110.6");
    add_srs_wkt (p, 3,
        ",-357.9,0,0,0,0],AUTHORITY[\"EPSG\",\"6247\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4247\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-63],PARAMETER[\"scale_factor\",0.9996],PARA");
    add_srs_wkt (p, 10,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"24720\"]]");
    p = add_epsg_def_ex (filter, first, last, 24817, "epsg", 24817,
        "PSAD56 / UTM zone 17N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 17N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24817\"]]");
    p = add_epsg_def_ex (filter, first, last, 24818, "epsg", 24818,
        "PSAD56 / UTM zone 18N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 18N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");


































































































































































































































































    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-75],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24818\"]]");
    p = add_epsg_def_ex (filter, first, last, 24819, "epsg", 24819,
        "PSAD56 / UTM zone 19N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 19N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-69],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24819\"]]");
    p = add_epsg_def_ex (filter, first, last, 24820, "epsg", 24820,
        "PSAD56 / UTM zone 20N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 20N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-63],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24820\"]]");
    p = add_epsg_def_ex (filter, first, last, 24821, "epsg", 24821,
        "PSAD56 / UTM zone 21N", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=intl +towgs84=-288,175,-376,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 21N\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-57],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"24821\"]]");
    p = add_epsg_def_ex (filter, first, last, 24877, "epsg", 24877,
        "PSAD56 / UTM zone 17S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 17S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24877\"]]");
    p = add_epsg_def_ex (filter, first, last, 24878, "epsg", 24878,
        "PSAD56 / UTM zone 18S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 18S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-75],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24878\"]]");
    p = add_epsg_def_ex (filter, first, last, 24879, "epsg", 24879,
        "PSAD56 / UTM zone 19S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 19S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-69],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24879\"]]");
    p = add_epsg_def_ex (filter, first, last, 24880, "epsg", 24880,
        "PSAD56 / UTM zone 20S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 20S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-63],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24880\"]]");
    p = add_epsg_def_ex (filter, first, last, 24881, "epsg", 24881,
        "PSAD56 / UTM zone 21S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 21S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-57],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24881\"]]");
    p = add_epsg_def_ex (filter, first, last, 24882, "epsg", 24882,
        "PSAD56 / UTM zone 22S", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=intl +towgs84=-288,175,");
    add_proj4text (p, 1,
        "-376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / UTM zone 22S\",GEOGCS[\"PSAD56\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Provisional_South_American_Datum_1956\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-51],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"24882\"]]");
    p = add_epsg_def_ex (filter, first, last, 24891, "epsg", 24891,
        "PSAD56 / Peru west zone", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-6 +lon_0=-80.5 +k=0.99983008 +x_0=22");
    add_proj4text (p, 1,
        "2000 +y_0=1426834.743 +ellps=intl +towgs84=-288,175,-376");
    add_proj4text (p, 2,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / Peru west zone\",GEOGCS[\"PSAD56\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Provisional_South_American_Datum_1956\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",-");
    add_srs_wkt (p, 9,
        "6],PARAMETER[\"central_meridian\",-80.5],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.99983008],PARAMETER[\"false_easting\",2220");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",1426834.743],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"24891\"]]");
    p = add_epsg_def_ex (filter, first, last, 24892, "epsg", 24892,
        "PSAD56 / Peru central zone", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-9.5 +lon_0=-76 +k=0.99932994 +x_0=72");
    add_proj4text (p, 1,
        "0000 +y_0=1039979.159 +ellps=intl +towgs84=-288,175,-376");
    add_proj4text (p, 2,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / Peru central zone\",GEOGCS[\"PSAD56\",");
    add_srs_wkt (p, 1,
        "DATUM[\"Provisional_South_American_Datum_1956\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 4,
        "\",\"6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 5,
        "\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[");
    add_srs_wkt (p, 6,
        "\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Long");
    add_srs_wkt (p, 7,
        "itude\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"");
    add_srs_wkt (p, 8,
        "Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 9,
        "-9.5],PARAMETER[\"central_meridian\",-76],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.99932994],PARAMETER[\"false_easting\",720");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",1039979.159],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"24892\"]]");
    p = add_epsg_def_ex (filter, first, last, 24893, "epsg", 24893,
        "PSAD56 / Peru east zone", 0, 0,
        "International 1924", "Greenwich",
        "Provisional_South_American_Datum_1956", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-9.5 +lon_0=-70.5 +k=0.99952992 +x_0=");
    add_proj4text (p, 1,
        "1324000 +y_0=1040084.558 +ellps=intl +towgs84=-288,175,-");
    add_proj4text (p, 2,
        "376,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"PSAD56 / Peru east zone\",GEOGCS[\"PSAD56\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Provisional_South_American_Datum_1956\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-288,175,-376,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6248\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4248\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",-");
    add_srs_wkt (p, 9,
        "9.5],PARAMETER[\"central_meridian\",-70.5],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.99952992],PARAMETER[\"false_easting\",13");
    add_srs_wkt (p, 11,
        "24000],PARAMETER[\"false_northing\",1040084.558],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"24893\"]]");
    p = add_epsg_def_ex (filter, first, last, 25000, "epsg", 25000,
        "Leigon / Ghana Metre Grid", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Leigon", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4.666666666666667 +lon_0=-1 +k=0.9997");
    add_proj4text (p, 1,
        "5 +x_0=274319.51 +y_0=0 +ellps=clrk80 +towgs84=-130,29,3");
    add_proj4text (p, 2,
        "64,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Leigon / Ghana Metre Grid\",GEOGCS[\"Leigon\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Leigon\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.1");
    add_srs_wkt (p, 2,
        "45,293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-130,29");
    add_srs_wkt (p, 3,
        ",364,0,0,0,0],AUTHORITY[\"EPSG\",\"6250\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4250\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",4.666666666666667],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-1],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".99975],PARAMETER[\"false_easting\",274319.51],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"25000\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
































































































































































































































3960
3961
3962
3963
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_41 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 28474, "epsg", 28474,
        "Pulkovo 1942 / Gauss-Kruger 14N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 14N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",81],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28474\"]]");
    p = add_epsg_def_ex (filter, first, last, 28475, "epsg", 28475,
        "Pulkovo 1942 / Gauss-Kruger 15N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 15N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",87],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28475\"]]");
    p = add_epsg_def_ex (filter, first, last, 28476, "epsg", 28476,
        "Pulkovo 1942 / Gauss-Kruger 16N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 16N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",93],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28476\"]]");
    p = add_epsg_def_ex (filter, first, last, 28477, "epsg", 28477,
        "Pulkovo 1942 / Gauss-Kruger 17N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 17N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",99],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28477\"]]");
    p = add_epsg_def_ex (filter, first, last, 28478, "epsg", 28478,
        "Pulkovo 1942 / Gauss-Kruger 18N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 18N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28478\"]]");
    p = add_epsg_def_ex (filter, first, last, 28479, "epsg", 28479,
        "Pulkovo 1942 / Gauss-Kruger 19N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 19N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28479\"]]");
    p = add_epsg_def_ex (filter, first, last, 28480, "epsg", 28480,
        "Pulkovo 1942 / Gauss-Kruger 20N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 20N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28480\"]]");
    p = add_epsg_def_ex (filter, first, last, 28481, "epsg", 28481,
        "Pulkovo 1942 / Gauss-Kruger 21N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 21N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28481\"]]");
    p = add_epsg_def_ex (filter, first, last, 28482, "epsg", 28482,
        "Pulkovo 1942 / Gauss-Kruger 22N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 22N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28482\"]]");
    p = add_epsg_def_ex (filter, first, last, 28483, "epsg", 28483,
        "Pulkovo 1942 / Gauss-Kruger 23N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 23N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28483\"]]");
    p = add_epsg_def_ex (filter, first, last, 28484, "epsg", 28484,
        "Pulkovo 1942 / Gauss-Kruger 24N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 24N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28484\"]]");
    p = add_epsg_def_ex (filter, first, last, 28485, "epsg", 28485,
        "Pulkovo 1942 / Gauss-Kruger 25N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 25N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28485\"]]");
    p = add_epsg_def_ex (filter, first, last, 28486, "epsg", 28486,
        "Pulkovo 1942 / Gauss-Kruger 26N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 26N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28486\"]]");
    p = add_epsg_def_ex (filter, first, last, 28487, "epsg", 28487,
        "Pulkovo 1942 / Gauss-Kruger 27N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 27N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28487\"]]");
    p = add_epsg_def_ex (filter, first, last, 28488, "epsg", 28488,
        "Pulkovo 1942 / Gauss-Kruger 28N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 28N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28488\"]]");
    p = add_epsg_def_ex (filter, first, last, 28489, "epsg", 28489,
        "Pulkovo 1942 / Gauss-Kruger 29N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 29N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28489\"]]");
    p = add_epsg_def_ex (filter, first, last, 28490, "epsg", 28490,
        "Pulkovo 1942 / Gauss-Kruger 30N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 30N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28490\"]]");
    p = add_epsg_def_ex (filter, first, last, 28491, "epsg", 28491,
        "Pulkovo 1942 / Gauss-Kruger 31N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 31N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28491\"]]");
    p = add_epsg_def_ex (filter, first, last, 28492, "epsg", 28492,
        "Pulkovo 1942 / Gauss-Kruger 32N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 32N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28492\"]]");
    p = add_epsg_def_ex (filter, first, last, 28600, "epsg", 28600,
        "Qatar 1974 / Qatar National Grid", 0, 0,
        "International 1924", "Greenwich",
        "Qatar_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.9");
    add_proj4text (p, 1,
        "9999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-128.1");
    add_proj4text (p, 2,
        "6,-282.42,21.93,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Qatar 1974 / Qatar National Grid\",GEOGCS[\"Qat");
    add_srs_wkt (p, 1,
        "ar 1974\",DATUM[\"Qatar_1974\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-128.16,-282.42,21.93,0,0,0,0],AUTHORITY[\"EPSG\",\"628");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4285\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",24.45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",51.21666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.99999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",200000],PARAMETER[\"false_northing\",300000],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"28600\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 28991, "epsg", 28991,
        "Amersfoort / RD Old", 0, 0,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.387638888");
    add_proj4text (p, 1,
        "88889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +towgs84=");
    add_proj4text (p, 2,
        "565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.072");
    add_proj4text (p, 3,
        "5 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Amersfoort / RD Old\",GEOGCS[\"Amersfoort\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Amersfoort\",SPHEROID[\"Bessel 1841\",6377397.155,2");
    add_srs_wkt (p, 2,
        "99.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.417");
    add_srs_wkt (p, 3,
        ",50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",52.15616055555555],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",5.38763888888889],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "9999079],PARAMETER[\"false_easting\",0],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"28991\"]]");
    p = add_epsg_def_ex (filter, first, last, 28992, "epsg", 28992,
        "Amersfoort / RD New", 0, 0,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.387638888");
    add_proj4text (p, 1,
        "88889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel");
    add_proj4text (p, 2,
        " +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.");
    add_proj4text (p, 3,
        "8774,4.0725 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Amersfoort / RD New\",GEOGCS[\"Amersfoort\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Amersfoort\",SPHEROID[\"Bessel 1841\",6377397.155,2");
    add_srs_wkt (p, 2,
        "99.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.417");
    add_srs_wkt (p, 3,
        ",50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",52.15616055555555],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",5.38763888888889],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "9999079],PARAMETER[\"false_easting\",155000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",463000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"28992\"]]");
    p = add_epsg_def_ex (filter, first, last, 29100, "epsg", 29100,
        "SAD69 / Brazil Polyconic (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Polyconic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=1000000");
    add_proj4text (p, 1,
        "0 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / Brazil Polyconic (deprecated)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"SAD69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "GRS 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "36\"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "291\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Polyco");
    add_srs_wkt (p, 8,
        "nic\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",-54],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 10,
        "00],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\"");
    add_srs_wkt (p, 11,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 12,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"29100\"]]");
    p = add_epsg_def_ex (filter, first, last, 29101, "epsg", 29101,
        "SAD69 / Brazil Polyconic", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Polyconic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=1000000");
    add_proj4text (p, 1,
        "0 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / Brazil Polyconic\",GEOGCS[\"SAD69\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"South_American_Datum_1969\",SPHEROID[\"GRS 1967 Mod");
    add_srs_wkt (p, 2,
        "ified\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"66");
    add_srs_wkt (p, 4,
        "18\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Polycon");
    add_srs_wkt (p, 8,
        "ic\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-54],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 10,
        "0],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\"");
    add_srs_wkt (p, 11,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 12,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"29101\"]]");
    p = add_epsg_def_ex (filter, first, last, 29118, "epsg", 29118,
        "SAD69 / UTM zone 18N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-75],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29118\"]]");
    p = add_epsg_def_ex (filter, first, last, 29119, "epsg", 29119,
        "SAD69 / UTM zone 19N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-69],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29119\"]]");
    p = add_epsg_def_ex (filter, first, last, 29120, "epsg", 29120,
        "SAD69 / UTM zone 20N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-63],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29120\"]]");
    p = add_epsg_def_ex (filter, first, last, 29121, "epsg", 29121,
        "SAD69 / UTM zone 21N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-57],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29121\"]]");
    p = add_epsg_def_ex (filter, first, last, 29122, "epsg", 29122,
        "SAD69 / UTM zone 22N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-51],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29122\"]]");
    p = add_epsg_def_ex (filter, first, last, 29168, "epsg", 29168,
        "SAD69 / UTM zone 18N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29168\"]]");
    p = add_epsg_def_ex (filter, first, last, 29169, "epsg", 29169,
        "SAD69 / UTM zone 19N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-69],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29169\"]]");
    p = add_epsg_def_ex (filter, first, last, 29170, "epsg", 29170,
        "SAD69 / UTM zone 20N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-63],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29170\"]]");
    p = add_epsg_def_ex (filter, first, last, 29171, "epsg", 29171,
        "SAD69 / UTM zone 21N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-57],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29171\"]]");
    p = add_epsg_def_ex (filter, first, last, 29172, "epsg", 29172,
        "SAD69 / UTM zone 22N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-51],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29172\"]]");
    p = add_epsg_def_ex (filter, first, last, 29177, "epsg", 29177,
        "SAD69 / UTM zone 17S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 17S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-81],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29177\"]]");
    p = add_epsg_def_ex (filter, first, last, 29178, "epsg", 29178,
        "SAD69 / UTM zone 18S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-75],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29178\"]]");
    p = add_epsg_def_ex (filter, first, last, 29179, "epsg", 29179,
        "SAD69 / UTM zone 19S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-69],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29179\"]]");
    p = add_epsg_def_ex (filter, first, last, 29180, "epsg", 29180,
        "SAD69 / UTM zone 20S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-63],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29180\"]]");
    p = add_epsg_def_ex (filter, first, last, 29181, "epsg", 29181,
        "SAD69 / UTM zone 21S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-57],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29181\"]]");
    p = add_epsg_def_ex (filter, first, last, 29182, "epsg", 29182,
        "SAD69 / UTM zone 22S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-51],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29182\"]]");
    p = add_epsg_def_ex (filter, first, last, 29183, "epsg", 29183,
        "SAD69 / UTM zone 23S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 23S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-45],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29183\"]]");
    p = add_epsg_def_ex (filter, first, last, 29184, "epsg", 29184,
        "SAD69 / UTM zone 24S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 24S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-39],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29184\"]]");
    p = add_epsg_def_ex (filter, first, last, 29185, "epsg", 29185,
        "SAD69 / UTM zone 25S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 25S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-33],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29185\"]]");
    p = add_epsg_def_ex (filter, first, last, 29187, "epsg", 29187,
        "SAD69 / UTM zone 17S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 17S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-81],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29187\"]]");
    p = add_epsg_def_ex (filter, first, last, 29188, "epsg", 29188,
        "SAD69 / UTM zone 18S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29188\"]]");
    p = add_epsg_def_ex (filter, first, last, 29189, "epsg", 29189,
        "SAD69 / UTM zone 19S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-69],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29189\"]]");
    p = add_epsg_def_ex (filter, first, last, 29190, "epsg", 29190,
        "SAD69 / UTM zone 20S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-63],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29190\"]]");
    p = add_epsg_def_ex (filter, first, last, 29191, "epsg", 29191,
        "SAD69 / UTM zone 21S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-57],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29191\"]]");
    p = add_epsg_def_ex (filter, first, last, 29192, "epsg", 29192,
        "SAD69 / UTM zone 22S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-51],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29192\"]]");
    p = add_epsg_def_ex (filter, first, last, 29193, "epsg", 29193,
        "SAD69 / UTM zone 23S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 23S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-45],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29193\"]]");
    p = add_epsg_def_ex (filter, first, last, 29194, "epsg", 29194,
        "SAD69 / UTM zone 24S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 24S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-39],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29194\"]]");
    p = add_epsg_def_ex (filter, first, last, 29195, "epsg", 29195,
        "SAD69 / UTM zone 25S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 25S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-33],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29195\"]]");
    p = add_epsg_def_ex (filter, first, last, 29220, "epsg", 29220,
        "Sapper Hill 1943 / UTM zone 20S", 0, 0,
        "International 1924", "Greenwich",
        "Sapper_Hill_1943", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=intl +towgs84=-355,21,7");
    add_proj4text (p, 1,
        "2,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sapper Hill 1943 / UTM zone 20S\",GEOGCS[\"Sapp");
    add_srs_wkt (p, 1,
        "er Hill 1943\",DATUM[\"Sapper_Hill_1943\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY[\"EPSG\",\"6292");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4292\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29220\"]]");
    p = add_epsg_def_ex (filter, first, last, 29221, "epsg", 29221,
        "Sapper Hill 1943 / UTM zone 21S", 0, 0,
        "International 1924", "Greenwich",
        "Sapper_Hill_1943", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,7");
    add_proj4text (p, 1,
        "2,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sapper Hill 1943 / UTM zone 21S\",GEOGCS[\"Sapp");
    add_srs_wkt (p, 1,
        "er Hill 1943\",DATUM[\"Sapper_Hill_1943\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY[\"EPSG\",\"6292");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4292\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29221\"]]");
    p = add_epsg_def_ex (filter, first, last, 29333, "epsg", 29333,
        "Schwarzeck / UTM zone 33S", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=bess_nam +towgs84=616,9");
    add_proj4text (p, 1,
        "7,-251,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / UTM zone 33S\",GEOGCS[\"Schwarzeck");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\"");
    add_srs_wkt (p, 2,
        ",6377483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "293\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",15],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"29333\"]]");
    p = add_epsg_def_ex (filter, first, last, 29371, "epsg", 29371,
        "Schwarzeck / Lo22/11", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=11 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/11\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",11],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29371\"]]");
    p = add_epsg_def_ex (filter, first, last, 29373, "epsg", 29373,
        "Schwarzeck / Lo22/13", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=13 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/13\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",13],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29373\"]]");
    p = add_epsg_def_ex (filter, first, last, 29375, "epsg", 29375,
        "Schwarzeck / Lo22/15", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/15\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",15],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29375\"]]");
    p = add_epsg_def_ex (filter, first, last, 29377, "epsg", 29377,
        "Schwarzeck / Lo22/17", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/17\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",17],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29377\"]]");
    p = add_epsg_def_ex (filter, first, last, 29379, "epsg", 29379,
        "Schwarzeck / Lo22/19", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/19\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",19],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29379\"]]");
    p = add_epsg_def_ex (filter, first, last, 29381, "epsg", 29381,
        "Schwarzeck / Lo22/21", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/21\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",21],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29381\"]]");
    p = add_epsg_def_ex (filter, first, last, 29383, "epsg", 29383,
        "Schwarzeck / Lo22/23", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/23\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",23],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29383\"]]");
    p = add_epsg_def_ex (filter, first, last, 29385, "epsg", 29385,
        "Schwarzeck / Lo22/25", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/25\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",25],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29385\"]]");
    p = add_epsg_def_ex (filter, first, last, 29635, "epsg", 29635,
        "Sudan / UTM zone 35N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Sudan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sudan / UTM zone 35N (deprecated)\",GEOGCS[\"Su");
    add_srs_wkt (p, 1,
        "dan\",DATUM[\"Sudan\",SPHEROID[\"Clarke 1880 (IGN)\",637");
    add_srs_wkt (p, 2,
        "8249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6296\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4296\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",27],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29635\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 29636, "epsg", 29636,
        "Sudan / UTM zone 36N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Sudan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sudan / UTM zone 36N (deprecated)\",GEOGCS[\"Su");
    add_srs_wkt (p, 1,
        "dan\",DATUM[\"Sudan\",SPHEROID[\"Clarke 1880 (IGN)\",637");
    add_srs_wkt (p, 2,
        "8249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"7011\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6296\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4296\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",33],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29636\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 29700, "epsg", 29700,
        "Tananarive (Paris) / Laborde Grid (deprecated)", 0, 0,
        "International 1924", "Paris",
        "Tananarive_1925_Paris", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=");
    add_proj4text (p, 1,
        "18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +gamm");
    add_proj4text (p, 2,
        "a=18.9 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=pa");
    add_proj4text (p, 3,
        "ris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive (Paris) / Laborde Grid (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Tananarive (Paris)\",DATUM[\"Tananarive_1925_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"International 1924\",6378388,297,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7022\"]],TOWGS84[-189,-242,-91,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6810\"]],PRIMEM[\"Paris\",2.3372291");
    add_srs_wkt (p, 5,
        "7,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.01570796");
    add_srs_wkt (p, 6,
        "326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"48");
    add_srs_wkt (p, 8,
        "10\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Cent");
    add_srs_wkt (p, 9,
        "er\"],PARAMETER[\"latitude_of_center\",-21],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "longitude_of_center\",49],PARAMETER[\"azimuth\",21],PARA");
    add_srs_wkt (p, 11,
        "METER[\"rectified_grid_angle\",21],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 12,
        "tor\",0.9995],PARAMETER[\"false_easting\",400000],PARAME");
    add_srs_wkt (p, 13,
        "TER[\"false_northing\",800000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 15,
        ",AUTHORITY[\"EPSG\",\"29700\"]]");
    p = add_epsg_def_ex (filter, first, last, 29702, "epsg", 29702,
        "Tananarive (Paris) / Laborde Grid approximation", 0, 1,
        "International 1924", "Paris",
        "Tananarive_1925_Paris", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=");
    add_proj4text (p, 1,
        "18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +gamm");
    add_proj4text (p, 2,
        "a=18.9 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=pa");
    add_proj4text (p, 3,
        "ris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive (Paris) / Laborde Grid approximation");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Tananarive (Paris)\",DATUM[\"Tananarive_1925");
    add_srs_wkt (p, 2,
        "_Paris\",SPHEROID[\"International 1924\",6378388,297,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7022\"]],TOWGS84[-189,-242,-91,0,0,0,0");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6810\"]],PRIMEM[\"Paris\",2.33722");
    add_srs_wkt (p, 5,
        "917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.015707");
    add_srs_wkt (p, 6,
        "96326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4810\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Ce");
    add_srs_wkt (p, 9,
        "nter\"],PARAMETER[\"latitude_of_center\",-21],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"longitude_of_center\",49],PARAMETER[\"azimuth\",21],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",21],PARAMETER[\"scale_f");
    add_srs_wkt (p, 12,
        "actor\",0.9995],PARAMETER[\"false_easting\",400000],PARA");
    add_srs_wkt (p, 13,
        "METER[\"false_northing\",800000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 15,
        "T],AUTHORITY[\"EPSG\",\"29702\"]]");
    p = add_epsg_def_ex (filter, first, last, 29738, "epsg", 29738,
        "Tananarive / UTM zone 38S", 0, 0,
        "International 1924", "Greenwich",
        "Tananarive_1925", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242");
    add_proj4text (p, 1,
        ",-91,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive / UTM zone 38S\",GEOGCS[\"Tananarive");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Tananarive_1925\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "189,-242,-91,0,0,0,0],AUTHORITY[\"EPSG\",\"6297\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4297\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",45],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29738\"]]");
    p = add_epsg_def_ex (filter, first, last, 29739, "epsg", 29739,
        "Tananarive / UTM zone 39S", 0, 0,
        "International 1924", "Greenwich",
        "Tananarive_1925", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242");
    add_proj4text (p, 1,
        ",-91,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive / UTM zone 39S\",GEOGCS[\"Tananarive");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Tananarive_1925\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "189,-242,-91,0,0,0,0],AUTHORITY[\"EPSG\",\"6297\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4297\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",51],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29739\"]]");
    p = add_epsg_def_ex (filter, first, last, 29849, "epsg", 29849,
        "Timbalai 1948 / UTM zone 49N", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=evrstSS +towgs84=-679,669,-48,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / UTM zone 49N\",GEOGCS[\"Timbala");
    add_srs_wkt (p, 1,
        "i 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1830");
    add_srs_wkt (p, 2,
        " (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29849\"]]");
    p = add_epsg_def_ex (filter, first, last, 29850, "epsg", 29850,
        "Timbalai 1948 / UTM zone 50N", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=evrstSS +towgs84=-679,669,-48,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / UTM zone 50N\",GEOGCS[\"Timbala");
    add_srs_wkt (p, 1,
        "i 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1830");
    add_srs_wkt (p, 2,
        " (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",117],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29850\"]]");
    p = add_epsg_def_ex (filter, first, last, 29871, "epsg", 29871,
        "Timbalai 1948 / RSO Borneo (ch)", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Hotine_Oblique_Mercator_Azimuth_Center", "British chain (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 ");
    add_proj4text (p, 1,
        "+k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 ");
    add_proj4text (p, 2,
        "+gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,66");
    add_proj4text (p, 3,
        "9,-48,0,0,0,0 +to_meter=20.11676512155263 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / RSO Borneo (ch)\",GEOGCS[\"Timb");
    add_srs_wkt (p, 1,
        "alai 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_center\",4],PARAMETER[\"longitude_of_c");
    add_srs_wkt (p, 10,
        "enter\",115],PARAMETER[\"azimuth\",53.31582047222222],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",53.13010236111111],PARA");
    add_srs_wkt (p, 12,
        "METER[\"scale_factor\",0.99984],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 13,
        "g\",29352.4763],PARAMETER[\"false_northing\",22014.3572]");
    add_srs_wkt (p, 14,
        ",UNIT[\"British chain (Sears 1922)\",20.11676512155263,A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"9042\"]],AXIS[\"Easting\",EAST],AXIS");
    add_srs_wkt (p, 16,
        "[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29871\"]]");
    p = add_epsg_def_ex (filter, first, last, 29872, "epsg", 29872,
        "Timbalai 1948 / RSO Borneo (ft)", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Hotine_Oblique_Mercator_Azimuth_Center", "British foot (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 ");
    add_proj4text (p, 1,
        "+k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985");
    add_proj4text (p, 2,
        " +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,6");
    add_proj4text (p, 3,
        "69,-48,0,0,0,0 +to_meter=0.3047994715386762 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / RSO Borneo (ft)\",GEOGCS[\"Timb");
    add_srs_wkt (p, 1,
        "alai 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_center\",4],PARAMETER[\"longitude_of_c");
    add_srs_wkt (p, 10,
        "enter\",115],PARAMETER[\"azimuth\",53.31582047222222],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",53.13010236111111],PARA");
    add_srs_wkt (p, 12,
        "METER[\"scale_factor\",0.99984],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 13,
        "g\",1937263.44],PARAMETER[\"false_northing\",1452947.58]");
    add_srs_wkt (p, 14,
        ",UNIT[\"British foot (Sears 1922)\",0.3047994715386762,A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"9041\"]],AXIS[\"Easting\",EAST],AXIS");
    add_srs_wkt (p, 16,
        "[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29872\"]]");
    p = add_epsg_def_ex (filter, first, last, 29873, "epsg", 29873,
        "Timbalai 1948 / RSO Borneo (m)", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 ");
    add_proj4text (p, 1,
        "+k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010");
    add_proj4text (p, 2,
        "236111111 +ellps=evrstSS +towgs84=-679,669,-48,0,0,0,0 +");
    add_proj4text (p, 3,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / RSO Borneo (m)\",GEOGCS[\"Timba");
    add_srs_wkt (p, 1,
        "lai 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 18");
    add_srs_wkt (p, 2,
        "30 (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_center\",4],PARAMETER[\"longitude_of_c");
    add_srs_wkt (p, 10,
        "enter\",115],PARAMETER[\"azimuth\",53.31582047222222],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",53.13010236111111],PARA");
    add_srs_wkt (p, 12,
        "METER[\"scale_factor\",0.99984],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 13,
        "g\",590476.87],PARAMETER[\"false_northing\",442857.65],U");
    add_srs_wkt (p, 14,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 15,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 16,
        ",\"29873\"]]");
    p = add_epsg_def_ex (filter, first, last, 29900, "epsg", 29900,
        "TM65 / Irish National Grid (deprecated)", 0, 0,
        "Airy Modified 1849", "Greenwich",
        "TM65", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=20000");
    add_proj4text (p, 1,
        "0 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.");
    add_proj4text (p, 2,
        "6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TM65 / Irish National Grid (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"TM65\",DATUM[\"TM65\",SPHEROID[\"Airy Modified 1849\"");
    add_srs_wkt (p, 2,
        ",6377340.189,299.3249646,AUTHORITY[\"EPSG\",\"7002\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6299\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4299\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",53.5],PARAMETER[\"central_meridian\",-8],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1.000035],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",200000],PARAMETER[\"false_northing\",250000],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 13,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "29900\"]]");
    p = add_epsg_def_ex (filter, first, last, 29901, "epsg", 29901,
        "OSNI 1952 / Irish National Grid", 0, 0,
        "Airy 1830", "Greenwich",
        "OSNI_1952", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1 +x_0=200000 +y_0=");
    add_proj4text (p, 1,
        "250000 +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0");
    add_proj4text (p, 2,
        ".214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"OSNI 1952 / Irish National Grid\",GEOGCS[\"OSNI");
    add_srs_wkt (p, 1,
        " 1952\",DATUM[\"OSNI_1952\",SPHEROID[\"Airy 1830\",63775");
    add_srs_wkt (p, 2,
        "63.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6188\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4188\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",53.5],PARAMETER[\"central_meridian\",-8],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",250000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29901\"]]");
    p = add_epsg_def_ex (filter, first, last, 29902, "epsg", 29902,
        "TM65 / Irish Grid", 0, 0,
        "Airy Modified 1849", "Greenwich",
        "TM65", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=20000");
    add_proj4text (p, 1,
        "0 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.");
    add_proj4text (p, 2,
        "6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TM65 / Irish Grid\",GEOGCS[\"TM65\",DATUM[\"TM6");
    add_srs_wkt (p, 1,
        "5\",SPHEROID[\"Airy Modified 1849\",6377340.189,299.3249");
    add_srs_wkt (p, 2,
        "646,AUTHORITY[\"EPSG\",\"7002\"]],TOWGS84[482.5,-130.6,5");
    add_srs_wkt (p, 3,
        "64.6,-1.042,-0.214,-0.631,8.15],AUTHORITY[\"EPSG\",\"629");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4299\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",53.5],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-8],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000035],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",250000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"29902\"]]");
    p = add_epsg_def_ex (filter, first, last, 29903, "epsg", 29903,
        "TM75 / Irish Grid", 0, 0,
        "Airy Modified 1849", "Greenwich",
        "Geodetic_Datum_of_1965", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=20000");
    add_proj4text (p, 1,
        "0 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.");
    add_proj4text (p, 2,
        "6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TM75 / Irish Grid\",GEOGCS[\"TM75\",DATUM[\"Geo");
    add_srs_wkt (p, 1,
        "detic_Datum_of_1965\",SPHEROID[\"Airy Modified 1849\",63");
    add_srs_wkt (p, 2,
        "77340.189,299.3249646,AUTHORITY[\"EPSG\",\"7002\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6300\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4300\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",53.5],PARAMETER[\"central_meridian\",-8],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.000035],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",200000],PARAMETER[\"false_northing\",250000],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"299");
    add_srs_wkt (p, 14,
        "03\"]]");
    p = add_epsg_def_ex (filter, first, last, 30161, "epsg", 30161,
        "Tokyo / Japan Plane Rectangular CS I", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS I\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 4,
        "01\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",33],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",129.5],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"30161\"]]");
    p = add_epsg_def_ex (filter, first, last, 30162, "epsg", 30162,
        "Tokyo / Japan Plane Rectangular CS II", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS II\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",131],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30162\"]]");
    p = add_epsg_def_ex (filter, first, last, 30163, "epsg", 30163,
        "Tokyo / Japan Plane Rectangular CS III", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS III\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",132.1666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"30163\"]]");
    p = add_epsg_def_ex (filter, first, last, 30164, "epsg", 30164,
        "Tokyo / Japan Plane Rectangular CS IV", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS IV\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",133.5],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30164\"]]");
    p = add_epsg_def_ex (filter, first, last, 30165, "epsg", 30165,
        "Tokyo / Japan Plane Rectangular CS V", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS V\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 4,
        "01\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",134.3333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.9999],PARAMETER[\"false_easting\",0]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"30165\"]]");
    p = add_epsg_def_ex (filter, first, last, 30166, "epsg", 30166,
        "Tokyo / Japan Plane Rectangular CS VI", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS VI\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",136],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30166\"]]");
    p = add_epsg_def_ex (filter, first, last, 30167, "epsg", 30167,
        "Tokyo / Japan Plane Rectangular CS VII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS VII\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",137.1666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"30167\"]]");
    p = add_epsg_def_ex (filter, first, last, 30168, "epsg", 30168,
        "Tokyo / Japan Plane Rectangular CS VIII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS VIII\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",138.5],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"30168\"]]");
    p = add_epsg_def_ex (filter, first, last, 30169, "epsg", 30169,
        "Tokyo / Japan Plane Rectangular CS IX", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS IX\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",139.8333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"30169\"]]");
    p = add_epsg_def_ex (filter, first, last, 30170, "epsg", 30170,
        "Tokyo / Japan Plane Rectangular CS X", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS X\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 4,
        "01\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",40],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",140.8333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.9999],PARAMETER[\"false_easting\",0]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"30170\"]]");
    p = add_epsg_def_ex (filter, first, last, 30171, "epsg", 30171,
        "Tokyo / Japan Plane Rectangular CS XI", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XI\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",44],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",140.25],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"30171\"]]");
    p = add_epsg_def_ex (filter, first, last, 30172, "epsg", 30172,
        "Tokyo / Japan Plane Rectangular CS XII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XII\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",44],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",142.25],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"30172\"]]");
    p = add_epsg_def_ex (filter, first, last, 30173, "epsg", 30173,
        "Tokyo / Japan Plane Rectangular CS XIII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XIII\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",44");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",144.25],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"30173\"]]");
    p = add_epsg_def_ex (filter, first, last, 30174, "epsg", 30174,
        "Tokyo / Japan Plane Rectangular CS XIV", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XIV\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",142],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30174\"]]");
    p = add_epsg_def_ex (filter, first, last, 30175, "epsg", 30175,
        "Tokyo / Japan Plane Rectangular CS XV", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XV\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",127.5],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30175\"]]");
    p = add_epsg_def_ex (filter, first, last, 30176, "epsg", 30176,
        "Tokyo / Japan Plane Rectangular CS XVI", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XVI\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",124],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30176\"]]");
    p = add_epsg_def_ex (filter, first, last, 30177, "epsg", 30177,
        "Tokyo / Japan Plane Rectangular CS XVII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XVII\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",131],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30177\"]]");
    p = add_epsg_def_ex (filter, first, last, 30178, "epsg", 30178,
        "Tokyo / Japan Plane Rectangular CS XVIII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XVIII\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63");
    add_srs_wkt (p, 2,
        "77397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",2");
    add_srs_wkt (p, 9,
        "0],PARAMETER[\"central_meridian\",136],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"30178\"]]");
    p = add_epsg_def_ex (filter, first, last, 30179, "epsg", 30179,
        "Tokyo / Japan Plane Rectangular CS XIX", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XIX\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",154],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30179\"]]");
    p = add_epsg_def_ex (filter, first, last, 30200, "epsg", 30200,
        "Trinidad 1903 / Trinidad Grid", 0, 0,
        "Clarke 1858", "Greenwich",
        "Trinidad_1903", "Cassini_Soldner", "Clarke's link",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=10.44166666666667 +lon_0=-61.333333333");
    add_proj4text (p, 1,
        "33334 +x_0=86501.46392051999 +y_0=65379.0134283 +a=63782");
    add_proj4text (p, 2,
        "93.645208759 +b=6356617.987679838 +towgs84=-61.702,284.4");
    add_proj4text (p, 3,
        "88,472.052,0,0,0,0 +to_meter=0.201166195164 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Trinidad 1903 / Trinidad Grid\",GEOGCS[\"Trinid");
    add_srs_wkt (p, 1,
        "ad 1903\",DATUM[\"Trinidad_1903\",SPHEROID[\"Clarke 1858");
    add_srs_wkt (p, 2,
        "\",6378293.645208759,294.2606763692569,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7007\"]],TOWGS84[-61.702,284.488,472.052,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6302\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4302\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Cassini_Soldner\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",10.44166666666667],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-61.33333333333334],PARAMETER[\"false_easting\",4300");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",325000],UNIT[\"Clarke's");
    add_srs_wkt (p, 12,
        " link\",0.201166195164,AUTHORITY[\"EPSG\",\"9039\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"30200\"]]");
    p = add_epsg_def_ex (filter, first, last, 30339, "epsg", 30339,
        "TC(1948) / UTM zone 39N", 0, 0,
        "Helmert 1906", "Greenwich",
        "Trucial_Coast_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=helmert +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TC(1948) / UTM zone 39N\",GEOGCS[\"TC(1948)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Trucial_Coast_1948\",SPHEROID[\"Helmert 1906\",63");
    add_srs_wkt (p, 2,
        "78200,298.3,AUTHORITY[\"EPSG\",\"7020\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"6303\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4303\"]],PROJECTION[");
    add_srs_wkt (p, 7,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 8,
        ",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"scale");
    add_srs_wkt (p, 9,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 12,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"30339\"]]");
    p = add_epsg_def_ex (filter, first, last, 30340, "epsg", 30340,
        "TC(1948) / UTM zone 40N", 0, 0,
        "Helmert 1906", "Greenwich",
        "Trucial_Coast_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=helmert +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TC(1948) / UTM zone 40N\",GEOGCS[\"TC(1948)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Trucial_Coast_1948\",SPHEROID[\"Helmert 1906\",63");
    add_srs_wkt (p, 2,
        "78200,298.3,AUTHORITY[\"EPSG\",\"7020\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"6303\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4303\"]],PROJECTION[");
    add_srs_wkt (p, 7,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 8,
        ",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"scale");
    add_srs_wkt (p, 9,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 12,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"30340\"]]");
    p = add_epsg_def_ex (filter, first, last, 30491, "epsg", 30491,
        "Voirol 1875 / Nord Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1875", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 2,
        "84=-73,-247,227,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1875 / Nord Algerie (ancienne)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Voirol 1875\",DATUM[\"Voirol_1875\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7011\"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6304\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4304\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",36],PARAMETER[\"central_meridian\",2.7],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999625544],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",300000],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"30491\"]]");
































































































































































































































}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_42.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61







































































































































































































62











































































































































































































63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_42 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 25231, "epsg", 25231,







































































































































































































        "Lome / UTM zone 31N", 0, 0,











































































































































































































        "Clarke 1880 (IGN)", "Greenwich",
        "Lome", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Lome / UTM zone 31N\",GEOGCS[\"Lome\",DATUM[\"L");

    add_srs_wkt (p, 1,
        "ome\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602");
    add_srs_wkt (p, 2,
        "12936269,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6252\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4252\"]],PROJECTION[\"T");
    add_srs_wkt (p, 7,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 9,
        "ctor\",0.9996],PARAMETER[\"false_easting\",500000],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 11,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 12,
        "\",NORTH],AUTHORITY[\"EPSG\",\"25231\"]]");
    p = add_epsg_def_ex (filter, first, last, 25391, "epsg", 25391,
        "Luzon 1911 / Philippines zone I", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone I\",GEOGCS[\"Luzo");
    add_srs_wkt (p, 1,
        "n 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"6253");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",117],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99995],PARAMETER[\"false_easting\",500000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"25391\"]]");
    p = add_epsg_def_ex (filter, first, last, 25392, "epsg", 25392,
        "Luzon 1911 / Philippines zone II", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=119 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone II\",GEOGCS[\"Luz");
    add_srs_wkt (p, 1,
        "on 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "3\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",119],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99995],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"25392\"]]");
    p = add_epsg_def_ex (filter, first, last, 25393, "epsg", 25393,
        "Luzon 1911 / Philippines zone III", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=121 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone III\",GEOGCS[\"Lu");
    add_srs_wkt (p, 1,
        "zon 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "53\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",121],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99995],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"25393\"]]");
    p = add_epsg_def_ex (filter, first, last, 25394, "epsg", 25394,
        "Luzon 1911 / Philippines zone IV", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone IV\",GEOGCS[\"Luz");
    add_srs_wkt (p, 1,
        "on 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "3\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",123],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99995],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"25394\"]]");
    p = add_epsg_def_ex (filter, first, last, 25395, "epsg", 25395,
        "Luzon 1911 / Philippines zone V", 0, 0,
        "Clarke 1866", "Greenwich",
        "Luzon_1911", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=125 +k=0.99995 +x_0=500000 +");
    add_proj4text (p, 1,
        "y_0=0 +ellps=clrk66 +towgs84=-133,-77,-51,0,0,0,0 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Luzon 1911 / Philippines zone V\",GEOGCS[\"Luzo");
    add_srs_wkt (p, 1,
        "n 1911\",DATUM[\"Luzon_1911\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-133,-77,-51,0,0,0,0],AUTHORITY[\"EPSG\",\"6253");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4253\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",125],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99995],PARAMETER[\"false_easting\",500000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"25395\"]]");
    p = add_epsg_def_ex (filter, first, last, 25700, "epsg", 25700,
        "Makassar (Jakarta) / NEIEZ (deprecated)", 0, 0,
        "Bessel 1841", "Jakarta",
        "Makassar_Jakarta", "Mercator_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=merc +lon_0=110 +k=0.997 +x_0=3900000 +y_0=900000 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=-587.8,519.75,145.76,0,0,0,0 +pm=");
    add_proj4text (p, 2,
        "jakarta +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Makassar (Jakarta) / NEIEZ (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Makassar (Jakarta)\",DATUM[\"Makassar_Jakarta\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[-587.8,519.75,145.76,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6804\"]],PRIMEM[\"Jakarta\",106.807");
    add_srs_wkt (p, 5,
        "7194444444,AUTHORITY[\"EPSG\",\"8908\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4804\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",110],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "97],PARAMETER[\"false_easting\",3900000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",900000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"25700\"]]");
    p = add_epsg_def_ex (filter, first, last, 25828, "epsg", 25828,
        "ETRS89 / UTM zone 28N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 28N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-15],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"25828\"]]");
    p = add_epsg_def_ex (filter, first, last, 25829, "epsg", 25829,
        "ETRS89 / UTM zone 29N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 29N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25829\"]]");
    p = add_epsg_def_ex (filter, first, last, 25830, "epsg", 25830,
        "ETRS89 / UTM zone 30N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 30N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25830\"]]");
    p = add_epsg_def_ex (filter, first, last, 25831, "epsg", 25831,
        "ETRS89 / UTM zone 31N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 31N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25831\"]]");
    p = add_epsg_def_ex (filter, first, last, 25832, "epsg", 25832,
        "ETRS89 / UTM zone 32N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25832\"]]");
    p = add_epsg_def_ex (filter, first, last, 25833, "epsg", 25833,
        "ETRS89 / UTM zone 33N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 33N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25833\"]]");
    p = add_epsg_def_ex (filter, first, last, 25834, "epsg", 25834,
        "ETRS89 / UTM zone 34N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 34N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25834\"]]");
    p = add_epsg_def_ex (filter, first, last, 25835, "epsg", 25835,
        "ETRS89 / UTM zone 35N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 35N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25835\"]]");
    p = add_epsg_def_ex (filter, first, last, 25836, "epsg", 25836,
        "ETRS89 / UTM zone 36N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 36N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25836\"]]");
    p = add_epsg_def_ex (filter, first, last, 25837, "epsg", 25837,
        "ETRS89 / UTM zone 37N", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 37N\",GEOGCS[\"ETRS89\",DATUM");
    add_srs_wkt (p, 1,
        "[\"European_Terrestrial_Reference_System_1989\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"25837\"]]");
    p = add_epsg_def_ex (filter, first, last, 25838, "epsg", 25838,
        "ETRS89 / UTM zone 38N (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / UTM zone 38N (deprecated)\",GEOGCS[\"E");
    add_srs_wkt (p, 1,
        "TRS89\",DATUM[\"European_Terrestrial_Reference_System_19");
    add_srs_wkt (p, 2,
        "89\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORI");
    add_srs_wkt (p, 3,
        "TY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.9996],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Northing\",NORTH],AUTHORITY[\"EPSG\",\"25838\"]]");
    p = add_epsg_def_ex (filter, first, last, 25884, "epsg", 25884,
        "ETRS89 / TM Baltic93", 0, 1,
        "GRS 1980", "Greenwich",
        "European_Terrestrial_Reference_System_1989", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"ETRS89 / TM Baltic93\",GEOGCS[\"ETRS89\",DATUM[");
    add_srs_wkt (p, 1,
        "\"European_Terrestrial_Reference_System_1989\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"625");
    add_srs_wkt (p, 4,
        "8\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",24],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"25884\"]]");
    p = add_epsg_def_ex (filter, first, last, 25932, "epsg", 25932,
        "Malongo 1987 / UTM zone 32S", 0, 0,
        "International 1924", "Greenwich",
        "Malongo_1987", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=intl +towgs84=-254.1,-5");
    add_proj4text (p, 1,
        ".36,-100.29,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Malongo 1987 / UTM zone 32S\",GEOGCS[\"Malongo ");
    add_srs_wkt (p, 1,
        "1987\",DATUM[\"Malongo_1987\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-254.1,-5.36,-100.29,0,0,0,0],AUTHORITY[\"EPSG\",\"6259\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4259\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"25932\"]]");
    p = add_epsg_def_ex (filter, first, last, 26191, "epsg", 26191,
        "Merchich / Nord Maroc", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +");
    add_proj4text (p, 2,
        "towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Nord Maroc\",GEOGCS[\"Merchich\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2");
    add_srs_wkt (p, 2,
        ",293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",33.3],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-5.4],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999625769],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"26191\"]]");
    p = add_epsg_def_ex (filter, first, last, 26192, "epsg", 26192,
        "Merchich / Sud Maroc", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "6155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=63");
    add_proj4text (p, 2,
        "56515 +towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sud Maroc\",GEOGCS[\"Merchich\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,");
    add_srs_wkt (p, 2,
        "293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_1SP\"],PARAMETER[\"latitude_of_origin\",29.7],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"central_meridian\",-5.4],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999615596],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",300000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26192\"]]");
    p = add_epsg_def_ex (filter, first, last, 26193, "epsg", 26193,
        "Merchich / Sahara (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "6 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 +towg");
    add_proj4text (p, 2,
        "s84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sahara (deprecated)\",GEOGCS[\"Merch");
    add_srs_wkt (p, 1,
        "ich\",DATUM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",");
    add_srs_wkt (p, 2,
        "6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        ".1],PARAMETER[\"central_meridian\",-5.4],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.9996],PARAMETER[\"false_easting\",1200000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",400000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26193\"]]");
    p = add_epsg_def_ex (filter, first, last, 26194, "epsg", 26194,
        "Merchich / Sahara Nord", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "616304 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sahara Nord\",GEOGCS[\"Merchich\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.");
    add_srs_wkt (p, 2,
        "2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 8,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",26.1],PARA");
    add_srs_wkt (p, 9,
        "METER[\"central_meridian\",-5.4],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999616304],PARAMETER[\"false_easting\",1200000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",400000],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26194\"]]");
    p = add_epsg_def_ex (filter, first, last, 26195, "epsg", 26195,
        "Merchich / Sahara Sud", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Merchich", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=22.5 +lat_0=22.5 +lon_0=-5.4 +k_0=0.999");
    add_proj4text (p, 1,
        "616437 +x_0=1500000 +y_0=400000 +a=6378249.2 +b=6356515 ");
    add_proj4text (p, 2,
        "+towgs84=31,146,47,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Merchich / Sahara Sud\",GEOGCS[\"Merchich\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Merchich\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2");
    add_srs_wkt (p, 2,
        ",293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[31,146,47,0,0,0,0],AUTHORITY[\"EPSG\",\"6261\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4261\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",22.5],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-5.4],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999616437],PARAMETER[\"false_easting\",1500000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",400000],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"26195\"]]");
    p = add_epsg_def_ex (filter, first, last, 26237, "epsg", 26237,
        "Massawa / UTM zone 37N", 0, 0,
        "Bessel 1841", "Greenwich",
        "Massawa", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=bessel +towgs84=639,405,60,0,0");
    add_proj4text (p, 1,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Massawa / UTM zone 37N\",GEOGCS[\"Massawa\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Massawa\",SPHEROID[\"Bessel 1841\",6377397.155,299.");
    add_srs_wkt (p, 2,
        "1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[639,405,60");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6262\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4262\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",39],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"26237\"]]");
    p = add_epsg_def_ex (filter, first, last, 26331, "epsg", 26331,
        "Minna / UTM zone 31N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=clrk80 +towgs84=-92,-93,122,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / UTM zone 31N\",GEOGCS[\"Minna\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,122,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4263\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",3");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"263");
    add_srs_wkt (p, 13,
        "31\"]]");
    p = add_epsg_def_ex (filter, first, last, 26332, "epsg", 26332,
        "Minna / UTM zone 32N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=clrk80 +towgs84=-92,-93,122,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / UTM zone 32N\",GEOGCS[\"Minna\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,293.4");
    add_srs_wkt (p, 2,
        "65,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,122,0,0");
    add_srs_wkt (p, 3,
        ",0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4263\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",9");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"263");
    add_srs_wkt (p, 13,
        "32\"]]");
    p = add_epsg_def_ex (filter, first, last, 26391, "epsg", 26391,
        "Minna / Nigeria West Belt", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4 +lon_0=4.5 +k=0.99975 +x_0=230738.2");
    add_proj4text (p, 1,
        "6 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / Nigeria West Belt\",GEOGCS[\"Minna\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145");
    add_srs_wkt (p, 2,
        ",293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,1");
    add_srs_wkt (p, 3,
        "22,0,0,0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4263\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",4],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",4.5],PARAMETER[\"scale_factor\",0.99975],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",230738.26],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26391\"]]");
    p = add_epsg_def_ex (filter, first, last, 26392, "epsg", 26392,
        "Minna / Nigeria Mid Belt", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4 +lon_0=8.5 +k=0.99975 +x_0=670553.9");
    add_proj4text (p, 1,
        "8 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +uni");
    add_proj4text (p, 2,
        "ts=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / Nigeria Mid Belt\",GEOGCS[\"Minna\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145,");
    add_srs_wkt (p, 2,
        "293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,12");
    add_srs_wkt (p, 3,
        "2,0,0,0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4263\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",4],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",8.5],PARAMETER[\"scale_factor\",0.99975],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",670553.98],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26392\"]]");
    p = add_epsg_def_ex (filter, first, last, 26393, "epsg", 26393,
        "Minna / Nigeria East Belt", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Minna", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=4 +lon_0=12.5 +k=0.99975 +x_0=1110369");
    add_proj4text (p, 1,
        ".7 +y_0=0 +ellps=clrk80 +towgs84=-92,-93,122,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Minna / Nigeria East Belt\",GEOGCS[\"Minna\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Minna\",SPHEROID[\"Clarke 1880 (RGS)\",6378249.145");
    add_srs_wkt (p, 2,
        ",293.465,AUTHORITY[\"EPSG\",\"7012\"]],TOWGS84[-92,-93,1");
    add_srs_wkt (p, 3,
        "22,0,0,0,0],AUTHORITY[\"EPSG\",\"6263\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4263\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",4],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",12.5],PARAMETER[\"scale_factor\",0.99975],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",1110369.7],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 12,
        "XIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"26393\"]]");
    p = add_epsg_def_ex (filter, first, last, 26432, "epsg", 26432,
        "Mhast / UTM zone 32S (deprecated)", 0, 0,
        "International 1924", "Greenwich",
        "Mhast", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=intl +towgs84=-252.95,-");
    add_proj4text (p, 1,
        "4.11,-96.38,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Mhast / UTM zone 32S (deprecated)\",GEOGCS[\"Mh");
    add_srs_wkt (p, 1,
        "ast\",DATUM[\"Mhast\",SPHEROID[\"International 1924\",63");
    add_srs_wkt (p, 2,
        "78388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-252.95,");
    add_srs_wkt (p, 3,
        "-4.11,-96.38,0,0,0,0],AUTHORITY[\"EPSG\",\"6264\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4264\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26432\"]]");
    p = add_epsg_def_ex (filter, first, last, 26591, "epsg", 26591,
        "Monte Mario (Rome) / Italy zone 1 (deprecated)", 0, 0,
        "International 1924", "Rome",
        "Monte_Mario_Rome", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-3.45233333333333 +k=0.9996 ");
    add_proj4text (p, 1,
        "+x_0=1500000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9");
    add_proj4text (p, 2,
        ".9,0.971,-2.917,0.714,-11.68 +pm=rome +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Monte Mario (Rome) / Italy zone 1 (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Monte Mario (Rome)\",DATUM[\"Monte_Mario_Rome\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7022\"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917");
    add_srs_wkt (p, 4,
        ",0.714,-11.68],AUTHORITY[\"EPSG\",\"6806\"]],PRIMEM[\"Ro");
    add_srs_wkt (p, 5,
        "me\",12.45233333333333,AUTHORITY[\"EPSG\",\"8906\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4806\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",-3.45233333333333],PARAMETER[\"scal");
    add_srs_wkt (p, 11,
        "e_factor\",0.9996],PARAMETER[\"false_easting\",1500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"26591\"]]");
    p = add_epsg_def_ex (filter, first, last, 26592, "epsg", 26592,
        "Monte Mario (Rome) / Italy zone 2 (deprecated)", 0, 0,
        "International 1924", "Rome",
        "Monte_Mario_Rome", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=2.54766666666666 +k=0.9996 +");
    add_proj4text (p, 1,
        "x_0=2520000 +y_0=0 +ellps=intl +towgs84=-104.1,-49.1,-9.");
    add_proj4text (p, 2,
        "9,0.971,-2.917,0.714,-11.68 +pm=rome +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Monte Mario (Rome) / Italy zone 2 (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Monte Mario (Rome)\",DATUM[\"Monte_Mario_Rome\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"International 1924\",6378388,297,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7022\"]],TOWGS84[-104.1,-49.1,-9.9,0.971,-2.917");
    add_srs_wkt (p, 4,
        ",0.714,-11.68],AUTHORITY[\"EPSG\",\"6806\"]],PRIMEM[\"Ro");
    add_srs_wkt (p, 5,
        "me\",12.45233333333333,AUTHORITY[\"EPSG\",\"8906\"]],UNI");
    add_srs_wkt (p, 6,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 7,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 8,
        "AUTHORITY[\"EPSG\",\"4806\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 9,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",2.54766666666666],PARAMETER[\"scale");
    add_srs_wkt (p, 11,
        "_factor\",0.9996],PARAMETER[\"false_easting\",2520000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"26592\"]]");
    p = add_epsg_def_ex (filter, first, last, 26632, "epsg", 26632,
        "M'poraloko / UTM zone 32N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "M_poraloko", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +a=6378249.2 +b=6356515 +towgs84=-74,");
    add_proj4text (p, 1,
        "-130,42,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"M'poraloko / UTM zone 32N\",GEOGCS[\"M'poraloko");
    add_srs_wkt (p, 1,
        "\",DATUM[\"M_poraloko\",SPHEROID[\"Clarke 1880 (IGN)\",6");
    add_srs_wkt (p, 2,
        "378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY[\"EPSG\",\"6266\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4266\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26632\"]]");
    p = add_epsg_def_ex (filter, first, last, 26692, "epsg", 26692,
        "M'poraloko / UTM zone 32S", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "M_poraloko", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 1,
        "84=-74,-130,42,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"M'poraloko / UTM zone 32S\",GEOGCS[\"M'poraloko");
    add_srs_wkt (p, 1,
        "\",DATUM[\"M_poraloko\",SPHEROID[\"Clarke 1880 (IGN)\",6");
    add_srs_wkt (p, 2,
        "378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[-74,-130,42,0,0,0,0],AUTHORITY[\"EPSG\",\"6266\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4266\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 10,
        "9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26692\"]]");
    p = add_epsg_def_ex (filter, first, last, 26701, "epsg", 26701,
        "NAD27 / UTM zone 1N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 1N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26701");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26702, "epsg", 26702,
        "NAD27 / UTM zone 2N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 2N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26702");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26703, "epsg", 26703,
        "NAD27 / UTM zone 3N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 3N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-165],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26703");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26704, "epsg", 26704,
        "NAD27 / UTM zone 4N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 4N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-159],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26704");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26705, "epsg", 26705,
        "NAD27 / UTM zone 5N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 5N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-153],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26705");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26706, "epsg", 26706,
        "NAD27 / UTM zone 6N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 6N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-147],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26706");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26707, "epsg", 26707,
        "NAD27 / UTM zone 7N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 7N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26707");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26708, "epsg", 26708,
        "NAD27 / UTM zone 8N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 8N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-135],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26708");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26709, "epsg", 26709,
        "NAD27 / UTM zone 9N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 9N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-129],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26709");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26710, "epsg", 26710,
        "NAD27 / UTM zone 10N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 10N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-123],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26710");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26711, "epsg", 26711,
        "NAD27 / UTM zone 11N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 11N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-117],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26711");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26712, "epsg", 26712,
        "NAD27 / UTM zone 12N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 12N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-111],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26712");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26713, "epsg", 26713,
        "NAD27 / UTM zone 13N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 13N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-105],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26713");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 26714, "epsg", 26714,
        "NAD27 / UTM zone 14N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 14N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-99],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26714\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26715, "epsg", 26715,
        "NAD27 / UTM zone 15N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 15N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-93],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26715\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26716, "epsg", 26716,
        "NAD27 / UTM zone 16N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 16N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-87],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26716\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26717, "epsg", 26717,
        "NAD27 / UTM zone 17N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 17N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-81],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26717\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26718, "epsg", 26718,
        "NAD27 / UTM zone 18N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 18N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-75],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26718\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26719, "epsg", 26719,
        "NAD27 / UTM zone 19N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 19N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-69],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26719\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26720, "epsg", 26720,
        "NAD27 / UTM zone 20N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 20N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-63],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26720\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26721, "epsg", 26721,
        "NAD27 / UTM zone 21N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 21N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-57],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26721\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26722, "epsg", 26722,
        "NAD27 / UTM zone 22N", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / UTM zone 22N\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-51],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"26722\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26729, "epsg", 26729,
        "NAD27 / Alabama East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9996 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alabama East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30.5],PARAMETER[\"central_meridian\",-85");
    add_srs_wkt (p, 9,
        ".83333333333333],PARAMETER[\"scale_factor\",0.99996],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26729\"]]");
    p = add_epsg_def_ex (filter, first, last, 26730, "epsg", 26730,
        "NAD27 / Alabama West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=1");
    add_proj4text (p, 1,
        "52400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alabama West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30],PARAMETER[\"central_meridian\",-87.5");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.999933333],PARAMETER[\"fa");
    add_srs_wkt (p, 10,
        "lse_easting\",500000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 11,
        "IT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"26730\"]]");
    p = add_epsg_def_ex (filter, first, last, 26731, "epsg", 26731,
        "NAD27 / Alaska zone 1", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Hotine_Oblique_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=32");
    add_proj4text (p, 1,
        "3.1301023611111 +k=0.9999 +x_0=5000000.001016002 +y_0=-5");
    add_proj4text (p, 2,
        "000000.001016002 +no_uoff +gamma=323.1301023611111 +datu");
    add_proj4text (p, 3,
        "m=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 1\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Hotine_Oblique_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_center\",57],PARAMETER[\"longitude_of_center");
    add_srs_wkt (p, 9,
        "\",-133.6666666666667],PARAMETER[\"azimuth\",323.1301023");
    add_srs_wkt (p, 10,
        "611111],PARAMETER[\"rectified_grid_angle\",323.130102361");
    add_srs_wkt (p, 11,
        "1111],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",16404166.67],PARAMETER[\"false_northing\",-");
    add_srs_wkt (p, 13,
        "16404166.67],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26731\"]]");
    p = add_epsg_def_ex (filter, first, last, 26732, "epsg", 26732,
        "NAD27 / Alaska zone 2", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 2\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-14");
    add_srs_wkt (p, 9,
        "2],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26732\"]]");
    p = add_epsg_def_ex (filter, first, last, 26733, "epsg", 26733,
        "NAD27 / Alaska zone 3", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 3\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-14");
    add_srs_wkt (p, 9,
        "6],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26733\"]]");
    p = add_epsg_def_ex (filter, first, last, 26734, "epsg", 26734,
        "NAD27 / Alaska zone 4", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 4\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-15");
    add_srs_wkt (p, 9,
        "0],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26734\"]]");
    p = add_epsg_def_ex (filter, first, last, 26735, "epsg", 26735,
        "NAD27 / Alaska zone 5", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 5\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-15");
    add_srs_wkt (p, 9,
        "4],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26735\"]]");
    p = add_epsg_def_ex (filter, first, last, 26736, "epsg", 26736,
        "NAD27 / Alaska zone 6", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 6\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-15");
    add_srs_wkt (p, 9,
        "8],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26736\"]]");
    p = add_epsg_def_ex (filter, first, last, 26737, "epsg", 26737,
        "NAD27 / Alaska zone 7", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=213360.");
    add_proj4text (p, 1,
        "4267208534 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 7\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-16");
    add_srs_wkt (p, 9,
        "2],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",700000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26737\"]]");
    p = add_epsg_def_ex (filter, first, last, 26738, "epsg", 26738,
        "NAD27 / Alaska zone 8", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=152400.");
    add_proj4text (p, 1,
        "3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 8\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-16");
    add_srs_wkt (p, 9,
        "6],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26738\"]]");
    p = add_epsg_def_ex (filter, first, last, 26739, "epsg", 26739,
        "NAD27 / Alaska zone 9", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=182880.");
    add_proj4text (p, 1,
        "3657607315 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 9\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",54],PARAMETER[\"central_meridian\",-17");
    add_srs_wkt (p, 9,
        "0],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_");
    add_srs_wkt (p, 10,
        "easting\",600000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26739\"]]");
    p = add_epsg_def_ex (filter, first, last, 26740, "epsg", 26740,
        "NAD27 / Alaska zone 10", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333");
    add_proj4text (p, 1,
        "334 +lat_0=51 +lon_0=-176 +x_0=914401.8288036576 +y_0=0 ");
    add_proj4text (p, 2,
        "+datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Alaska zone 10\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",53.83333333333334],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",51.83333333333334],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",51],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-176],PARAMETER[\"false_easting\",3000000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",0],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26740\"]]");
    p = add_epsg_def_ex (filter, first, last, 26741, "epsg", 26741,
        "NAD27 / California zone I", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.3");
    add_proj4text (p, 1,
        "3333333333334 +lon_0=-122 +x_0=609601.2192024384 +y_0=0 ");
    add_proj4text (p, 2,
        "+datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone I\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",41.66666666666666],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",40],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 10,
        "origin\",39.33333333333334],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-122],PARAMETER[\"false_easting\",2000000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26741\"]]");
    p = add_epsg_def_ex (filter, first, last, 26742, "epsg", 26742,
        "NAD27 / California zone II", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=609601.219");
    add_proj4text (p, 2,
        "2024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone II\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",39.83333333333334],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",38.33333333333334],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",37.66666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-122],PARAMETER[\"false_easting\",2000");
    add_srs_wkt (p, 12,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"US survey fo");
    add_srs_wkt (p, 13,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 14,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26");
    add_srs_wkt (p, 15,
        "742\"]]");
    p = add_epsg_def_ex (filter, first, last, 26743, "epsg", 26743,
        "NAD27 / California zone III", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.5 +lon_0=-120.5 +x_0=609601.2192024384 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone III\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",38.43333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",37.06666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",36.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-120.5],PARAMETER[\"false_easting\",2000000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 13,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26743\"]]");
    p = add_epsg_def_ex (filter, first, last, 26744, "epsg", 26744,
        "NAD27 / California zone IV", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.3333333333333");
    add_proj4text (p, 1,
        "4 +lon_0=-119 +x_0=609601.2192024384 +y_0=0 +datum=NAD27");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone IV\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",37.25],PARAMETER[\"standa");
    add_srs_wkt (p, 9,
        "rd_parallel_2\",36],PARAMETER[\"latitude_of_origin\",35.");
    add_srs_wkt (p, 10,
        "33333333333334],PARAMETER[\"central_meridian\",-119],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",2000000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 14,
        "ORTH],AUTHORITY[\"EPSG\",\"26744\"]]");
    p = add_epsg_def_ex (filter, first, last, 26745, "epsg", 26745,
        "NAD27 / California zone V", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.5 +lon_0=-118 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone V\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",35.46666666666667],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",34.03333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",33.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-118],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26745\"]]");
    p = add_epsg_def_ex (filter, first, last, 26746, "epsg", 26746,
        "NAD27 / California zone VI", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=609601.");
    add_proj4text (p, 2,
        "2192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone VI\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",33.88333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",32.78333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",32.16666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-116.25],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 12,
        "000000],PARAMETER[\"false_northing\",0],UNIT[\"US survey");
    add_srs_wkt (p, 13,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "26746\"]]");
    p = add_epsg_def_ex (filter, first, last, 26747, "epsg", 26747,
        "NAD27 / California zone VII (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666");
    add_proj4text (p, 1,
        "667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=1276106.450596901 +y_0=127079.524511049 +datum=NAD27");
    add_proj4text (p, 3,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone VII (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",34.4166666");
    add_srs_wkt (p, 9,
        "6666666],PARAMETER[\"standard_parallel_2\",33.8666666666");
    add_srs_wkt (p, 10,
        "6667],PARAMETER[\"latitude_of_origin\",34.13333333333333");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-118.3333333333333],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_easting\",4186692.58],PARAMETER[\"false_n");
    add_srs_wkt (p, 13,
        "orthing\",416926.74],UNIT[\"US survey foot\",0.304800609");
    add_srs_wkt (p, 14,
        "6012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 15,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26747\"]]");
    p = add_epsg_def_ex (filter, first, last, 26748, "epsg", 26748,
        "NAD27 / Arizona East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arizona East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",31],PARAMETER[\"central_meridian\",-110.");
    add_srs_wkt (p, 9,
        "1666666666667],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"26748\"]]");
    p = add_epsg_def_ex (filter, first, last, 26749, "epsg", 26749,
        "NAD27 / Arizona Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arizona Central\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "111.9166666666667],PARAMETER[\"scale_factor\",0.9999],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 11,
        "hing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"26749\"]]");
    p = add_epsg_def_ex (filter, first, last, 26750, "epsg", 26750,
        "NAD27 / Arizona West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0");
    add_proj4text (p, 1,
        "=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arizona West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",31],PARAMETER[\"central_meridian\",-113.");
    add_srs_wkt (p, 9,
        "75],PARAMETER[\"scale_factor\",0.999933333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26750\"]]");
    p = add_epsg_def_ex (filter, first, last, 26751, "epsg", 26751,
        "NAD27 / Arkansas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arkansas North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",36.23333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",34.93333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",34.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-92],PARAMETER[\"false_easting\",2000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 13,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26751\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26752, "epsg", 26752,
        "NAD27 / Arkansas South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-92 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Arkansas South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",34.76666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",33.3],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",32.66666666666666],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-92],PARAMETER[\"false_easting\",2000000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",0],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26752\"]]");
    p = add_epsg_def_ex (filter, first, last, 26753, "epsg", 26753,
        "NAD27 / Colorado North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Colorado North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",39.71666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",40.78333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",39.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-105.5],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"267");
    add_srs_wkt (p, 15,
        "53\"]]");
    p = add_epsg_def_ex (filter, first, last, 26754, "epsg", 26754,
        "NAD27 / Colorado Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.8333333333");
    add_proj4text (p, 1,
        "3334 +lon_0=-105.5 +x_0=609601.2192024384 +y_0=0 +datum=");
    add_proj4text (p, 2,
        "NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Colorado Central\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",39.75],PARAMETER[\"standard");
    add_srs_wkt (p, 9,
        "_parallel_2\",38.45],PARAMETER[\"latitude_of_origin\",37");
    add_srs_wkt (p, 10,
        ".83333333333334],PARAMETER[\"central_meridian\",-105.5],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",2000000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26754\"]]");
    p = add_epsg_def_ex (filter, first, last, 26755, "epsg", 26755,
        "NAD27 / Colorado South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Colorado South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",38.43333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",37.23333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",36.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-105.5],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"267");
    add_srs_wkt (p, 15,
        "55\"]]");
    p = add_epsg_def_ex (filter, first, last, 26756, "epsg", 26756,
        "NAD27 / Connecticut", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40");
    add_proj4text (p, 1,
        ".83333333333334 +lon_0=-72.75 +x_0=182880.3657607315 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Connecticut\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",41.86666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",41.2],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",40.83333333333334],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "72.75],PARAMETER[\"false_easting\",600000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",0],UNIT[\"US survey foot\",0.30480060960");
    add_srs_wkt (p, 13,
        "12192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26756\"]]");
    p = add_epsg_def_ex (filter, first, last, 26757, "epsg", 26757,
        "NAD27 / Delaware", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999");
    add_proj4text (p, 1,
        "995 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us");
    add_proj4text (p, 2,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Delaware\",GEOGCS[\"NAD27\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],");
    add_srs_wkt (p, 7,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 8,
        "_of_origin\",38],PARAMETER[\"central_meridian\",-75.4166");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"scale_factor\",0.999995],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"26757\"]]");
    p = add_epsg_def_ex (filter, first, last, 26758, "epsg", 26758,
        "NAD27 / Florida East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Florida East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",24.33333333333333],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-81],PARAMETER[\"scale_factor\",0.999941177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"26758\"]]");
    p = add_epsg_def_ex (filter, first, last, 26759, "epsg", 26759,
        "NAD27 / Florida West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Florida West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",24.33333333333333],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-82],PARAMETER[\"scale_factor\",0.999941177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"26759\"]]");
    p = add_epsg_def_ex (filter, first, last, 26760, "epsg", 26760,
        "NAD27 / Florida North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=2");
    add_proj4text (p, 1,
        "9 +lon_0=-84.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Florida North\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",30.75],PARAMETER[\"standard_p");
    add_srs_wkt (p, 9,
        "arallel_2\",29.58333333333333],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",29],PARAMETER[\"central_meridian\",-84.5],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",2000000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"26760\"]]");
    p = add_epsg_def_ex (filter, first, last, 26766, "epsg", 26766,
        "NAD27 / Georgia East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Georgia East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30],PARAMETER[\"central_meridian\",-82.1");
    add_srs_wkt (p, 9,
        "6666666666667],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"26766\"]]");
    p = add_epsg_def_ex (filter, first, last, 26767, "epsg", 26767,
        "NAD27 / Georgia West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Georgia West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",30],PARAMETER[\"central_meridian\",-84.1");
    add_srs_wkt (p, 9,
        "6666666666667],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"26767\"]]");
    p = add_epsg_def_ex (filter, first, last, 26768, "epsg", 26768,
        "NAD27 / Idaho East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=152400.3048006096 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Idaho East\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",41.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-112.1666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999947368],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 12,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26768\"]]");
    p = add_epsg_def_ex (filter, first, last, 26769, "epsg", 26769,
        "NAD27 / Idaho Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.99");
    add_proj4text (p, 1,
        "99473679999999 +x_0=152400.3048006096 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Idaho Central\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",41.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-114],PARAMETER[\"scale_factor\",0.999947368");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"US survey foot\",0.3048006096012192");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26769\"]]");
    p = add_epsg_def_ex (filter, first, last, 26770, "epsg", 26770,
        "NAD27 / Idaho West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +u");
    add_proj4text (p, 2,
        "nits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Idaho West\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",41.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-115.75],PARAMETER[\"scale_factor\",0.999933333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"US survey foot\",0.3048006096012192");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26770\"]]");
    p = add_epsg_def_ex (filter, first, last, 26771, "epsg", 26771,
        "NAD27 / Illinois East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=152400.3048006096 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Illinois East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-88.33333333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999975],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 12,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26771\"]]");
    p = add_epsg_def_ex (filter, first, last, 26772, "epsg", 26772,
        "NAD27 / Illinois West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Illinois West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-90.16666666666667],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999941177],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"US survey foot\",0.30");
    add_srs_wkt (p, 12,
        "48006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26772\"]]");
    p = add_epsg_def_ex (filter, first, last, 26773, "epsg", 26773,
        "NAD27 / Indiana East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Indiana East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",37.5],PARAMETER[\"central_meridian\",-85");
    add_srs_wkt (p, 9,
        ".66666666666667],PARAMETER[\"scale_factor\",0.999966667]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26773\"]]");
    p = add_epsg_def_ex (filter, first, last, 26774, "epsg", 26774,
        "NAD27 / Indiana West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Indiana West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",37.5],PARAMETER[\"central_meridian\",-87");
    add_srs_wkt (p, 9,
        ".08333333333333],PARAMETER[\"scale_factor\",0.999966667]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26774\"]]");
    p = add_epsg_def_ex (filter, first, last, 26775, "epsg", 26775,
        "NAD27 / Iowa North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=41.5 +lon_0=-93.5 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Iowa North\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",43.26666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",42.06666666666667],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",41.5],PARAMETER[\"central_meridian\",-9");
    add_srs_wkt (p, 11,
        "3.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26775\"]]");
    p = add_epsg_def_ex (filter, first, last, 26776, "epsg", 26776,
        "NAD27 / Iowa South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666");
    add_proj4text (p, 1,
        "667 +lat_0=40 +lon_0=-93.5 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Iowa South\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",41.78333333333333],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",40.61666666666667],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",40],PARAMETER[\"central_meridian\",-93.");
    add_srs_wkt (p, 11,
        "5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 13,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26776\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







<
<
<

<










|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|


|



<
>

|

|

|





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468

469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009


















































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_42 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 30492, "epsg", 30492,
        "Voirol 1875 / Sud Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1875", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +t");
    add_proj4text (p, 2,
        "owgs84=-73,-247,227,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1875 / Sud Algerie (ancienne)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Voirol 1875\",DATUM[\"Voirol_1875\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "80 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7011\"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6304\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4304\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",33.3],PARAMETER[\"central_meridian\",2.7],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",0.999625769],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",300000],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"30492\"]]");
    p = add_epsg_def_ex (filter, first, last, 30493, "epsg", 30493,
        "Voirol 1879 / Nord Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1879", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1879 / Nord Algerie (ancienne)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Voirol 1879\",DATUM[\"Voirol_1879\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7011\"]],AUTHORITY[\"EPSG\",\"6671\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4671\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",36],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",2.7],PARAMETER[\"scale_factor\",0.99962");
    add_srs_wkt (p, 10,
        "5544],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"30493\"]]");
    p = add_epsg_def_ex (filter, first, last, 30494, "epsg", 30494,
        "Voirol 1879 / Sud Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1879", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1879 / Sud Algerie (ancienne)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Voirol 1879\",DATUM[\"Voirol_1879\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "80 (IGN)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6671\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4671\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",33.3],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",2.7],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "25769],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30494\"]]");
    p = add_epsg_def_ex (filter, first, last, 30729, "epsg", 30729,
        "Nord Sahara 1959 / UTM zone 29N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=clrk80 +towgs84=-209.362,-87.8");
    add_proj4text (p, 1,
        "162,404.62,0.0046,3.4784,0.5805,-1.4547 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 29N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.362,-87.8162,404.62,0.0046,3.478");
    add_srs_wkt (p, 4,
        "4,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",-9],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"30729\"]]");
    p = add_epsg_def_ex (filter, first, last, 30730, "epsg", 30730,
        "Nord Sahara 1959 / UTM zone 30N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=clrk80 +towgs84=-209.362,-87.8");
    add_proj4text (p, 1,
        "162,404.62,0.0046,3.4784,0.5805,-1.4547 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 30N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.362,-87.8162,404.62,0.0046,3.478");
    add_srs_wkt (p, 4,
        "4,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",-3],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"30730\"]]");
    p = add_epsg_def_ex (filter, first, last, 30731, "epsg", 30731,
        "Nord Sahara 1959 / UTM zone 31N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=clrk80 +towgs84=-209.362,-87.8");
    add_proj4text (p, 1,
        "162,404.62,0.0046,3.4784,0.5805,-1.4547 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 31N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.362,-87.8162,404.62,0.0046,3.478");
    add_srs_wkt (p, 4,
        "4,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"30731\"]]");
    p = add_epsg_def_ex (filter, first, last, 30732, "epsg", 30732,
        "Nord Sahara 1959 / UTM zone 32N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=clrk80 +towgs84=-209.362,-87.8");
    add_proj4text (p, 1,
        "162,404.62,0.0046,3.4784,0.5805,-1.4547 +units=m +no_def");
    add_proj4text (p, 2,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 32N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.362,-87.8162,404.62,0.0046,3.478");
    add_srs_wkt (p, 4,
        "4,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",9],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"30732\"]]");
    p = add_epsg_def_ex (filter, first, last, 30791, "epsg", 30791,
        "Nord Sahara 1959 / Nord Algerie", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500135 +y_0=300090 +ellps=clrk80 +towgs84=-209.36");
    add_proj4text (p, 2,
        "2,-87.8162,404.62,0.0046,3.4784,0.5805,-1.4547 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / Nord Algerie\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.362,-87.8162,404.62,0.0046,3.478");
    add_srs_wkt (p, 4,
        "4,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4307\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 9,
        "c_1SP\"],PARAMETER[\"latitude_of_origin\",36],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"central_meridian\",2.7],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 11,
        "99625544],PARAMETER[\"false_easting\",500135],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",300090],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"30791\"]]");
    p = add_epsg_def_ex (filter, first, last, 30792, "epsg", 30792,
        "Nord Sahara 1959 / Sud Algerie", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500135 +y_0=300090 +ellps=clrk80 +towgs84=-20");
    add_proj4text (p, 2,
        "9.362,-87.8162,404.62,0.0046,3.4784,0.5805,-1.4547 +unit");
    add_proj4text (p, 3,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / Sud Algerie\",GEOGCS[\"Nord ");
    add_srs_wkt (p, 1,
        "Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7012\"]],TOWGS84[-209.362,-87.8162,404.62,0.0046,3.4784,");
    add_srs_wkt (p, 4,
        "0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[\"G");
    add_srs_wkt (p, 5,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 6,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 7,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 8,
        "\"EPSG\",\"4307\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 9,
        "_1SP\"],PARAMETER[\"latitude_of_origin\",33.3],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",2.7],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "999625769],PARAMETER[\"false_easting\",500135],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",300090],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"30792\"]]");
    p = add_epsg_def_ex (filter, first, last, 30800, "epsg", 30800,
        "RT38 2.5 gon W (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Stockholm_1938", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=");
    add_proj4text (p, 1,
        "1500000 +y_0=0 +ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RT38 2.5 gon W (deprecated)\",GEOGCS[\"RT38\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Stockholm_1938\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"6308\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4308\"]],PROJE");
    add_srs_wkt (p, 7,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 8,
        "rigin\",0],PARAMETER[\"central_meridian\",15.80827777777");
    add_srs_wkt (p, 9,
        "778],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",1500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"30800\"]]");
    p = add_epsg_def_ex (filter, first, last, 31028, "epsg", 31028,
        "Yoff / UTM zone 28N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Yoff", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,

        "PROJCS[\"Yoff / UTM zone 28N\",GEOGCS[\"Yoff\",DATUM[\"Y");
    add_srs_wkt (p, 1,
        "off\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602");
    add_srs_wkt (p, 2,
        "12936265,AUTHORITY[\"EPSG\",\"7011\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"6310\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 6,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4310\"]],PROJECTION[\"T");
    add_srs_wkt (p, 7,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"central_meridian\",-15],PARAMETER[\"scale_");
    add_srs_wkt (p, 9,
        "factor\",0.9996],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 11,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 12,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"31028\"]]");
    p = add_epsg_def_ex (filter, first, last, 31121, "epsg", 31121,
        "Zanderij / UTM zone 21N", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / UTM zone 21N\",GEOGCS[\"Zanderij\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Zanderij\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-35");
    add_srs_wkt (p, 3,
        "8,0,0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4311\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-57],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"31121\"]]");
    p = add_epsg_def_ex (filter, first, last, 31154, "epsg", 31154,
        "Zanderij / TM 54 NW", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-54 +k=0.9996 +x_0=500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / TM 54 NW\",GEOGCS[\"Zanderij\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Zanderij\",SPHEROID[\"International 1924\",6378388,29");
    add_srs_wkt (p, 2,
        "7,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-358,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4311\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "54],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false");
    add_srs_wkt (p, 10,
        "_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 11,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting");
    add_srs_wkt (p, 12,
        "\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 13,
        "1154\"]]");
    p = add_epsg_def_ex (filter, first, last, 31170, "epsg", 31170,
        "Zanderij / Suriname Old TM", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9996");
    add_proj4text (p, 1,
        " +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0");
    add_proj4text (p, 2,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / Suriname Old TM\",GEOGCS[\"Zanderij\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Zanderij\",SPHEROID[\"International 1924\",6378");
    add_srs_wkt (p, 2,
        "388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-");
    add_srs_wkt (p, 3,
        "358,0,0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4311\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-55.68333333333333],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"31170\"]]");
    p = add_epsg_def_ex (filter, first, last, 31171, "epsg", 31171,
        "Zanderij / Suriname TM", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0");
    add_proj4text (p, 2,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / Suriname TM\",GEOGCS[\"Zanderij\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Zanderij\",SPHEROID[\"International 1924\",6378388");
    add_srs_wkt (p, 2,
        ",297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-358");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4311\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-55.68333333333333],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "99],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"31171\"]]");
    p = add_epsg_def_ex (filter, first, last, 31251, "epsg", 31251,
        "MGI (Ferro) / Austria GK West Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria GK West Zone\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI (Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferr");
    add_srs_wkt (p, 2,
        "o\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666");
    add_srs_wkt (p, 5,
        "6666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",28],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",0],PARAMETER[\"false_northing\",-5000000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31251\"]]");
    p = add_epsg_def_ex (filter, first, last, 31252, "epsg", 31252,
        "MGI (Ferro) / Austria GK Central Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria GK Central Zone\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"MGI (Ferro)\",DATUM[\"Militar_Geographische_Institut_F");
    add_srs_wkt (p, 2,
        "erro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6");
    add_srs_wkt (p, 5,
        "6666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 10,
        "_meridian\",31],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",0],PARAMETER[\"false_northing\",-50000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31252");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31253, "epsg", 31253,
        "MGI (Ferro) / Austria GK East Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +");
    add_proj4text (p, 2,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria GK East Zone\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI (Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferr");
    add_srs_wkt (p, 2,
        "o\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666");
    add_srs_wkt (p, 5,
        "6666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",34],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",0],PARAMETER[\"false_northing\",-5000000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31253\"]]");
    p = add_epsg_def_ex (filter, first, last, 31254, "epsg", 31254,
        "MGI / Austria GK West", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,46");
    add_proj4text (p, 2,
        "3.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK West\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",10.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",0],PARAMETER[\"false_northing\",-50000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31254");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31255, "epsg", 31255,
        "MGI / Austria GK Central", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,46");
    add_proj4text (p, 2,
        "3.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK Central\",GEOGCS[\"MGI\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Militar_Geographische_Institute\",SPHEROID[\"Bessel 1");
    add_srs_wkt (p, 2,
        "841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.42");
    add_srs_wkt (p, 4,
        "32],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"43");
    add_srs_wkt (p, 8,
        "12\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",13");
    add_srs_wkt (p, 10,
        ".33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",0],PARAMETER[\"false_northing\",-5000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3125");
    add_srs_wkt (p, 14,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 31256, "epsg", 31256,
        "MGI / Austria GK East", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,46");
    add_proj4text (p, 2,
        "3.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK East\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",16.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",0],PARAMETER[\"false_northing\",-50000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31256");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31257, "epsg", 31257,
        "MGI / Austria GK M28", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "150000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.1");
    add_proj4text (p, 2,
        "29,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK M28\",GEOGCS[\"MGI\",DATUM[\"M");
    add_srs_wkt (p, 1,
        "ilitar_Geographische_Institute\",SPHEROID[\"Bessel 1841\"");
    add_srs_wkt (p, 2,
        ",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",10.333");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",150000],PARAMETER[\"false_northing\",-500");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"312");
    add_srs_wkt (p, 14,
        "57\"]]");
    p = add_epsg_def_ex (filter, first, last, 31258, "epsg", 31258,
        "MGI / Austria GK M31", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.1");
    add_proj4text (p, 2,
        "29,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK M31\",GEOGCS[\"MGI\",DATUM[\"M");
    add_srs_wkt (p, 1,
        "ilitar_Geographische_Institute\",SPHEROID[\"Bessel 1841\"");
    add_srs_wkt (p, 2,
        ",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",13.333");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",450000],PARAMETER[\"false_northing\",-500");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"312");
    add_srs_wkt (p, 14,
        "58\"]]");
    p = add_epsg_def_ex (filter, first, last, 31259, "epsg", 31259,
        "MGI / Austria GK M34", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "750000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.1");
    add_proj4text (p, 2,
        "29,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK M34\",GEOGCS[\"MGI\",DATUM[\"M");
    add_srs_wkt (p, 1,
        "ilitar_Geographische_Institute\",SPHEROID[\"Bessel 1841\"");
    add_srs_wkt (p, 2,
        ",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",16.333");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",750000],PARAMETER[\"false_northing\",-500");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"312");
    add_srs_wkt (p, 14,
        "59\"]]");
    p = add_epsg_def_ex (filter, first, last, 31265, "epsg", 31265,
        "MGI / 3-degree Gauss zone 5 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 5 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",15],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",5500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "265\"]]");
    p = add_epsg_def_ex (filter, first, last, 31266, "epsg", 31266,
        "MGI / 3-degree Gauss zone 6 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 6 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",18],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",6500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "266\"]]");
    p = add_epsg_def_ex (filter, first, last, 31267, "epsg", 31267,
        "MGI / 3-degree Gauss zone 7 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 7 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",21],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",7500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "267\"]]");
    p = add_epsg_def_ex (filter, first, last, 31268, "epsg", 31268,
        "MGI / 3-degree Gauss zone 8 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 8 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",24],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",8500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "268\"]]");
    p = add_epsg_def_ex (filter, first, last, 31275, "epsg", 31275,
        "MGI / Balkans zone 5 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 5 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",15],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",5500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31275");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31276, "epsg", 31276,
        "MGI / Balkans zone 6 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 6 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",18],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",6500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31276");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31277, "epsg", 31277,
        "MGI / Balkans zone 7 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 7 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",21],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",7500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31277");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31278, "epsg", 31278,
        "MGI / Balkans zone 8 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 8 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",21],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",7500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31278");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31279, "epsg", 31279,
        "MGI / Balkans zone 8 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 8 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",24],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",8500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31279");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31281, "epsg", 31281,
        "MGI (Ferro) / Austria West Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria West Zone\",GEOGCS[\"MGI ");
    add_srs_wkt (p, 1,
        "(Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferro\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666666");
    add_srs_wkt (p, 5,
        "6666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",28],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],");
    add_srs_wkt (p, 13,
        "AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31281\"]]");
    p = add_epsg_def_ex (filter, first, last, 31282, "epsg", 31282,
        "MGI (Ferro) / Austria Central Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria Central Zone\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI (Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferr");
    add_srs_wkt (p, 2,
        "o\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666");
    add_srs_wkt (p, 5,
        "6666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",31],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31282\"]]");
    p = add_epsg_def_ex (filter, first, last, 31283, "epsg", 31283,
        "MGI (Ferro) / Austria East Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria East Zone\",GEOGCS[\"MGI ");
    add_srs_wkt (p, 1,
        "(Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferro\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666666");
    add_srs_wkt (p, 5,
        "6666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",34],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],");
    add_srs_wkt (p, 13,
        "AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31283\"]]");
    p = add_epsg_def_ex (filter, first, last, 31284, "epsg", 31284,
        "MGI / Austria M28", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria M28\",GEOGCS[\"MGI\",DATUM[\"Mili");
    add_srs_wkt (p, 1,
        "tar_Geographische_Institute\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",10.3333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",150000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31284\"]]");
    p = add_epsg_def_ex (filter, first, last, 31285, "epsg", 31285,
        "MGI / Austria M31", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria M31\",GEOGCS[\"MGI\",DATUM[\"Mili");
    add_srs_wkt (p, 1,
        "tar_Geographische_Institute\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",13.3333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",450000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31285\"]]");
    p = add_epsg_def_ex (filter, first, last, 31286, "epsg", 31286,
        "MGI / Austria M34", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria M34\",GEOGCS[\"MGI\",DATUM[\"Mili");
    add_srs_wkt (p, 1,
        "tar_Geographische_Institute\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",16.3333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",750000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31286\"]]");
    p = add_epsg_def_ex (filter, first, last, 31287, "epsg", 31287,
        "MGI / Austria Lambert", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.3333");
    add_proj4text (p, 1,
        "3333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs8");
    add_proj4text (p, 2,
        "4=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria Lambert\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_1\",49],PARAMETER[\"standard_par");
    add_srs_wkt (p, 10,
        "allel_2\",46],PARAMETER[\"latitude_of_origin\",47.5],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"central_meridian\",13.33333333333333],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_easting\",400000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 13,
        "400000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "1287\"]]");
    p = add_epsg_def_ex (filter, first, last, 31288, "epsg", 31288,
        "MGI (Ferro) / M28", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / M28\",GEOGCS[\"MGI (Ferro)\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Militar_Geographische_Institut_Ferro\",SPHEROID[\"Be");
    add_srs_wkt (p, 2,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7004\"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6805\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",28],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",1500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"31288\"]]");
    p = add_epsg_def_ex (filter, first, last, 31289, "epsg", 31289,
        "MGI (Ferro) / M31", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=450000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / M31\",GEOGCS[\"MGI (Ferro)\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Militar_Geographische_Institut_Ferro\",SPHEROID[\"Be");
    add_srs_wkt (p, 2,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7004\"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6805\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",31],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",4500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"31289\"]]");
    p = add_epsg_def_ex (filter, first, last, 31290, "epsg", 31290,
        "MGI (Ferro) / M34", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=750000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / M34\",GEOGCS[\"MGI (Ferro)\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Militar_Geographische_Institut_Ferro\",SPHEROID[\"Be");
    add_srs_wkt (p, 2,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7004\"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6805\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",34],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",7500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"31290\"]]");
    p = add_epsg_def_ex (filter, first, last, 31291, "epsg", 31291,
        "MGI (Ferro) / Austria West Zone (deprecated)", 0, 0,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria West Zone (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"MGI (Ferro)\",DATUM[\"Militar_Geographische_Ins");
    add_srs_wkt (p, 2,
        "titut_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1");
    add_srs_wkt (p, 3,
        "528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,48");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\"");
    add_srs_wkt (p, 5,
        ",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",28],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31291\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31292, "epsg", 31292,
        "MGI (Ferro) / Austria Central Zone (deprecated)", 0, 0,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria Central Zone (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"MGI (Ferro)\",DATUM[\"Militar_Geographische_");
    add_srs_wkt (p, 2,
        "Institut_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,29");
    add_srs_wkt (p, 3,
        "9.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203");
    add_srs_wkt (p, 4,
        ",480,0,0,0,0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Fer");
    add_srs_wkt (p, 5,
        "ro\",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UN");
    add_srs_wkt (p, 6,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 7,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 8,
        ",AUTHORITY[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 9,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",31],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "292\"]]");
    p = add_epsg_def_ex (filter, first, last, 31293, "epsg", 31293,
        "MGI (Ferro) / Austria East Zone (deprecated)", 0, 0,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria East Zone (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"MGI (Ferro)\",DATUM[\"Militar_Geographische_Ins");
    add_srs_wkt (p, 2,
        "titut_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1");
    add_srs_wkt (p, 3,
        "528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,48");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\"");
    add_srs_wkt (p, 5,
        ",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",34],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31293\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31294, "epsg", 31294,
        "MGI / M28 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / M28 (deprecated)\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",10.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",150000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31294\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31295, "epsg", 31295,
        "MGI / M31 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / M31 (deprecated)\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",13.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",450000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31295\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31296, "epsg", 31296,
        "MGI / M34 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / M34 (deprecated)\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",16.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",750000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31296\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31297, "epsg", 31297,
        "MGI / Austria Lambert (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.3333");
    add_proj4text (p, 1,
        "3333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs8");
    add_proj4text (p, 2,
        "4=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria Lambert (deprecated)\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474");
    add_srs_wkt (p, 4,
        ",5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"standard_parallel_1\",49],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "tandard_parallel_2\",46],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",47.5],PARAMETER[\"central_meridian\",13.33333333333333]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_easting\",400000],PARAMETER[\"false_n");
    add_srs_wkt (p, 13,
        "orthing\",400000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"31297\"]]");
    p = add_epsg_def_ex (filter, first, last, 31300, "epsg", 31300,
        "Belge 1972 / Belge Lambert 72", 0, 0,
        "International 1924", "Greenwich",
        "Reseau_National_Belge_1972", "Lambert_Conformal_Conic_2SP_Belgium", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666");
    add_proj4text (p, 1,
        "666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256");
    add_proj4text (p, 2,
        " +y_0=5400088.4378 +ellps=intl +towgs84=-106.869,52.2978");
    add_proj4text (p, 3,
        ",-103.724,0.3366,-0.457,1.8422,-1.2747 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Belge 1972 / Belge Lambert 72\",GEOGCS[\"Belge ");
    add_srs_wkt (p, 1,
        "1972\",DATUM[\"Reseau_National_Belge_1972\",SPHEROID[\"I");
    add_srs_wkt (p, 2,
        "nternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "2\"]],TOWGS84[-106.869,52.2978,-103.724,0.3366,-0.457,1.");
    add_srs_wkt (p, 4,
        "8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 5,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4313\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 9,
        "P_Belgium\"],PARAMETER[\"standard_parallel_1\",49.833333");
    add_srs_wkt (p, 10,
        "33333334],PARAMETER[\"standard_parallel_2\",51.166666666");
    add_srs_wkt (p, 11,
        "66666],PARAMETER[\"latitude_of_origin\",90],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "central_meridian\",4.356939722222222],PARAMETER[\"false_");
    add_srs_wkt (p, 13,
        "easting\",150000.01256],PARAMETER[\"false_northing\",540");
    add_srs_wkt (p, 14,
        "0088.4378],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 15,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 16,
        "\"31300\"]]");
    p = add_epsg_def_ex (filter, first, last, 31370, "epsg", 31370,
        "Belge 1972 / Belgian Lambert 72", 0, 0,
        "International 1924", "Greenwich",
        "Reseau_National_Belge_1972", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +la");
    add_proj4text (p, 1,
        "t_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=540");
    add_proj4text (p, 2,
        "0088.438 +ellps=intl +towgs84=-106.869,52.2978,-103.724,");
    add_proj4text (p, 3,
        "0.3366,-0.457,1.8422,-1.2747 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Belge 1972 / Belgian Lambert 72\",GEOGCS[\"Belg");
    add_srs_wkt (p, 1,
        "e 1972\",DATUM[\"Reseau_National_Belge_1972\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-106.869,52.2978,-103.724,0.3366,-0.457,1");
    add_srs_wkt (p, 4,
        ".8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4313\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"standard_parallel_1\",51.16666723333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"standard_parallel_2\",49.8333339],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"latitude_of_origin\",90],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 12,
        "n\",4.367486666666666],PARAMETER[\"false_easting\",15000");
    add_srs_wkt (p, 13,
        "0.013],PARAMETER[\"false_northing\",5400088.438],UNIT[\"");
    add_srs_wkt (p, 14,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 15,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31370\"]]");
    p = add_epsg_def_ex (filter, first, last, 31461, "epsg", 31461,
        "DHDN / 3-degree Gauss zone 1 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 1 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",3],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",1500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31461\"]]");
    p = add_epsg_def_ex (filter, first, last, 31462, "epsg", 31462,
        "DHDN / 3-degree Gauss zone 2 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 2 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",6],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",2500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31462\"]]");
    p = add_epsg_def_ex (filter, first, last, 31463, "epsg", 31463,
        "DHDN / 3-degree Gauss zone 3 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 3 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",9],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",3500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31463\"]]");
    p = add_epsg_def_ex (filter, first, last, 31464, "epsg", 31464,
        "DHDN / 3-degree Gauss zone 4 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 4 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",12],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",4500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31464\"]]");
    p = add_epsg_def_ex (filter, first, last, 31465, "epsg", 31465,
        "DHDN / 3-degree Gauss zone 5 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 5 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",15],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",5500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31465\"]]");
    p = add_epsg_def_ex (filter, first, last, 31466, "epsg", 31466,
        "DHDN / 3-degree Gauss-Kruger zone 2", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 2\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",6");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",2500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31466\"]]");
    p = add_epsg_def_ex (filter, first, last, 31467, "epsg", 31467,
        "DHDN / 3-degree Gauss-Kruger zone 3", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 3\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",9");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",3500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31467\"]]");
    p = add_epsg_def_ex (filter, first, last, 31468, "epsg", 31468,
        "DHDN / 3-degree Gauss-Kruger zone 4", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 4\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",1");
    add_srs_wkt (p, 10,
        "2],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",4500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31468\"]]");
    p = add_epsg_def_ex (filter, first, last, 31469, "epsg", 31469,
        "DHDN / 3-degree Gauss-Kruger zone 5", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 5\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",1");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",5500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31469\"]]");
    p = add_epsg_def_ex (filter, first, last, 31491, "epsg", 31491,
        "Germany_Zone_1", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_1\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",1500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",3.0],PARAMETER[\"Scale_Factor\"");
    add_srs_wkt (p, 7,
        ",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter");
    add_srs_wkt (p, 8,
        "\",1.0],AUTHORITY[\"EPSG\",\"31491\"]]");
    p = add_epsg_def_ex (filter, first, last, 31492, "epsg", 31492,
        "Germany_Zone_2", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_2\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",2500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",6.0],PARAMETER[\"Scale_Factor\"");
    add_srs_wkt (p, 7,
        ",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter");
    add_srs_wkt (p, 8,
        "\",1.0],AUTHORITY[\"EPSG\",\"31492\"]]");
    p = add_epsg_def_ex (filter, first, last, 31493, "epsg", 31493,
        "Germany_Zone_3", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_3\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",3500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",9.0],PARAMETER[\"Scale_Factor\"");
    add_srs_wkt (p, 7,
        ",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter");
    add_srs_wkt (p, 8,
        "\",1.0],AUTHORITY[\"EPSG\",\"31493\"]]");
    p = add_epsg_def_ex (filter, first, last, 31494, "epsg", 31494,
        "Germany_Zone_4", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_4\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",4500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",12.0],PARAMETER[\"Scale_Factor");
    add_srs_wkt (p, 7,
        "\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Met");
    add_srs_wkt (p, 8,
        "er\",1.0],AUTHORITY[\"EPSG\",\"31494\"]]");
    p = add_epsg_def_ex (filter, first, last, 31495, "epsg", 31495,
        "Germany_Zone_5", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_5\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",5500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",15.0],PARAMETER[\"Scale_Factor");
    add_srs_wkt (p, 7,
        "\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Met");
    add_srs_wkt (p, 8,
        "er\",1.0],AUTHORITY[\"EPSG\",\"31495\"]]");
    p = add_epsg_def_ex (filter, first, last, 31528, "epsg", 31528,
        "Conakry 1905 / UTM zone 28N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Conakry_1905", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,");
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Conakry 1905 / UTM zone 28N\",GEOGCS[\"Conakry ");
    add_srs_wkt (p, 1,
        "1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Clarke 1880 (IG");
    add_srs_wkt (p, 2,
        "N)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "11\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4315\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-15],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"31528\"]]");
    p = add_epsg_def_ex (filter, first, last, 31529, "epsg", 31529,
        "Conakry 1905 / UTM zone 29N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Conakry_1905", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,");
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Conakry 1905 / UTM zone 29N\",GEOGCS[\"Conakry ");
    add_srs_wkt (p, 1,
        "1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Clarke 1880 (IG");
    add_srs_wkt (p, 2,
        "N)\",6378249.2,293.4660212936265,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "11\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4315\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-9],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"31529\"]]");
    p = add_epsg_def_ex (filter, first, last, 31600, "epsg", 31600,
        "Dealul Piscului 1930 / Stereo 33", 0, 0,
        "International 1924", "Greenwich",
        "Dealul_Piscului_1930", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9");
    add_proj4text (p, 1,
        "996667 +x_0=500000 +y_0=500000 +ellps=intl +towgs84=103.");
    add_proj4text (p, 2,
        "25,-100.4,-307.19,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dealul Piscului 1930 / Stereo 33\",GEOGCS[\"Dea");
    add_srs_wkt (p, 1,
        "lul Piscului 1930\",DATUM[\"Dealul_Piscului_1930\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7022\"]],TOWGS84[103.25,-100.4,-307.19,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6316\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4316\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",45.9],PARAMETER[\"central_meridian\",25.39");
    add_srs_wkt (p, 10,
        "246588888889],PARAMETER[\"scale_factor\",0.9996667],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31600\"]]");
    p = add_epsg_def_ex (filter, first, last, 31700, "epsg", 31700,
        "Dealul Piscului 1970/ Stereo 70 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Dealul_Piscului_1970", "Oblique_Stereographic", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=500000 +ellps=krass +towgs84=28,-121,-77,0,0,0,0 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dealul Piscului 1970/ Stereo 70 (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Dealul Piscului 1970\",DATUM[\"Dealul_Piscului_");
    add_srs_wkt (p, 2,
        "1970\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7024\"]],TOWGS84[28,-121,-77,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6317\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4317\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",46],PARAMETER[\"central_meridian\",25],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",0.99975],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",500000],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NO");
    add_srs_wkt (p, 13,
        "RTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31700\"]]");
    p = add_epsg_def_ex (filter, first, last, 31838, "epsg", 31838,
        "NGN / UTM zone 38N", 0, 0,
        "WGS 84", "Greenwich",
        "National_Geodetic_Network", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGN / UTM zone 38N\",GEOGCS[\"NGN\",DATUM[\"Nat");
    add_srs_wkt (p, 1,
        "ional_Geodetic_Network\",SPHEROID[\"WGS 84\",6378137,298");
    add_srs_wkt (p, 2,
        ".257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-3.2,-5");
    add_srs_wkt (p, 3,
        ".7,2.8,0,0,0,0],AUTHORITY[\"EPSG\",\"6318\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4318\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",45],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"31838\"]]");
    p = add_epsg_def_ex (filter, first, last, 31839, "epsg", 31839,
        "NGN / UTM zone 39N", 0, 0,
        "WGS 84", "Greenwich",
        "National_Geodetic_Network", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGN / UTM zone 39N\",GEOGCS[\"NGN\",DATUM[\"Nat");
    add_srs_wkt (p, 1,
        "ional_Geodetic_Network\",SPHEROID[\"WGS 84\",6378137,298");
    add_srs_wkt (p, 2,
        ".257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-3.2,-5");
    add_srs_wkt (p, 3,
        ".7,2.8,0,0,0,0],AUTHORITY[\"EPSG\",\"6318\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4318\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",51],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"31839\"]]");
    p = add_epsg_def_ex (filter, first, last, 31900, "epsg", 31900,
        "KUDAMS / KTM (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "Kuwait_Utility", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"KUDAMS / KTM (deprecated)\",GEOGCS[\"KUDAMS\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Kuwait_Utility\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[-20.8,");
    add_srs_wkt (p, 3,
        "11.3,2.4,0,0,0,0],AUTHORITY[\"EPSG\",\"6319\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4319\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",48],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"31900\"]]");
    p = add_epsg_def_ex (filter, first, last, 31901, "epsg", 31901,
        "KUDAMS / KTM", 0, 0,
        "GRS 1980", "Greenwich",
        "Kuwait_Utility", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"KUDAMS / KTM\",GEOGCS[\"KUDAMS\",DATUM[\"Kuwait");
    add_srs_wkt (p, 1,
        "_Utility\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7019\"]],TOWGS84[-20.8,11.3,2.4,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6319\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4319\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",4");
    add_srs_wkt (p, 9,
        "8],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"31901\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31965, "epsg", 31965,
        "SIRGAS 2000 / UTM zone 11N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 11N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-117");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "65\"]]");
    p = add_epsg_def_ex (filter, first, last, 31966, "epsg", 31966,
        "SIRGAS 2000 / UTM zone 12N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 12N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-111");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "66\"]]");
    p = add_epsg_def_ex (filter, first, last, 31967, "epsg", 31967,
        "SIRGAS 2000 / UTM zone 13N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 13N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-105");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "67\"]]");
    p = add_epsg_def_ex (filter, first, last, 31968, "epsg", 31968,
        "SIRGAS 2000 / UTM zone 14N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 14N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-99]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3196");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 31969, "epsg", 31969,
        "SIRGAS 2000 / UTM zone 15N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 15N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-93]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3196");
    add_srs_wkt (p, 14,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 31970, "epsg", 31970,
        "SIRGAS 2000 / UTM zone 16N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 16N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-87]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 31971, "epsg", 31971,
        "SIRGAS 2000 / UTM zone 17N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 17N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 31972, "epsg", 31972,
        "SIRGAS 2000 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 18N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 31973, "epsg", 31973,
        "SIRGAS 2000 / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 19N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 31974, "epsg", 31974,
        "SIRGAS 2000 / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 20N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 31975, "epsg", 31975,
        "SIRGAS 2000 / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 21N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 31976, "epsg", 31976,
        "SIRGAS 2000 / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 22N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 31977, "epsg", 31977,
        "SIRGAS 2000 / UTM zone 17S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 17S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31977\"]]");
    p = add_epsg_def_ex (filter, first, last, 31978, "epsg", 31978,
        "SIRGAS 2000 / UTM zone 18S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 18S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31978\"]]");
    p = add_epsg_def_ex (filter, first, last, 31979, "epsg", 31979,
        "SIRGAS 2000 / UTM zone 19S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 19S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31979\"]]");
    p = add_epsg_def_ex (filter, first, last, 31980, "epsg", 31980,
        "SIRGAS 2000 / UTM zone 20S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 20S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31980\"]]");
    p = add_epsg_def_ex (filter, first, last, 31981, "epsg", 31981,
        "SIRGAS 2000 / UTM zone 21S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 21S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31981\"]]");
    p = add_epsg_def_ex (filter, first, last, 31982, "epsg", 31982,
        "SIRGAS 2000 / UTM zone 22S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 22S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31982\"]]");
    p = add_epsg_def_ex (filter, first, last, 31983, "epsg", 31983,
        "SIRGAS 2000 / UTM zone 23S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 23S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-45]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31983\"]]");
    p = add_epsg_def_ex (filter, first, last, 31984, "epsg", 31984,
        "SIRGAS 2000 / UTM zone 24S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 24S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-39]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31984\"]]");
    p = add_epsg_def_ex (filter, first, last, 31985, "epsg", 31985,
        "SIRGAS 2000 / UTM zone 25S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 25S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-33]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31985\"]]");
    p = add_epsg_def_ex (filter, first, last, 31986, "epsg", 31986,
        "SIRGAS 1995 / UTM zone 17N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 17N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "86\"]]");
    p = add_epsg_def_ex (filter, first, last, 31987, "epsg", 31987,
        "SIRGAS 1995 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 18N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-7");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "87\"]]");
    p = add_epsg_def_ex (filter, first, last, 31988, "epsg", 31988,
        "SIRGAS 1995 / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 19N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "88\"]]");
    p = add_epsg_def_ex (filter, first, last, 31989, "epsg", 31989,
        "SIRGAS 1995 / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 20N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "89\"]]");
    p = add_epsg_def_ex (filter, first, last, 31990, "epsg", 31990,
        "SIRGAS 1995 / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 21N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "90\"]]");
    p = add_epsg_def_ex (filter, first, last, 31991, "epsg", 31991,
        "SIRGAS 1995 / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 22N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "91\"]]");
}

#endif /* full EPSG initialization enabled/disabled */



















































































































































































































































































































Changes to src/srsinit/epsg_inlined_43.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731


















































































































































































































732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842





































843







































































































































































































































































































































































































































































































































































































































































































































844
845
846













































































































































































































































































































































































































































































































































































































847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
....
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596


3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621

3622
3623
3624
3625

3626
3627

3628
3629

3630
3631
3632

3633


3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658

3659
3660
3661
3662

3663
3664
3665
3666

3667
3668
3669

3670


3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692







































3693
3694
3695
3696
3697
3698
3699

3700
3701

3702
3703

3704
3705
3706

3707


3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732

3733
3734
3735
3736

3737
3738

3739
3740

3741
3742
3743

3744


3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_43 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 26777, "epsg", 26777,
        "NAD27 / Kansas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kansas North\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",39.78333333333333],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",38.71666666666667],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",38.33333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-98],PARAMETER[\"false_easting\",2000000],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_northing\",0],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 13,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26777\"]]");
    p = add_epsg_def_ex (filter, first, last, 26778, "epsg", 26778,
        "NAD27 / Kansas South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kansas South\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",38.56666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",37.26666666666667],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-98.5],PARAMETER[\"false_easting\",2000000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26778\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26779, "epsg", 26779,
        "NAD27 / Kentucky North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=37.5 +lon_0=-84.25 +x_0=609601.2192024384 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kentucky North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",37.96666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",38.96666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",37.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-84.25],PARAMETER[\"false_easting\",2000000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26779\"]]");
    p = add_epsg_def_ex (filter, first, last, 26780, "epsg", 26780,
        "NAD27 / Kentucky South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Kentucky South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",36.73333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",37.93333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",36.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-85.75],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"267");
    add_srs_wkt (p, 15,
        "80\"]]");
    p = add_epsg_def_ex (filter, first, last, 26781, "epsg", 26781,
        "NAD27 / Louisiana North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=30.66666666666667 +lon_0=-92.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Louisiana North\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",31.16666666666667],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",32.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",30.66666666666667],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-92.5],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2678");
    add_srs_wkt (p, 15,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 26782, "epsg", 26782,
        "NAD27 / Louisiana South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.666666666666");
    add_proj4text (p, 1,
        "67 +lon_0=-91.33333333333333 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Louisiana South\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",29.3],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",30.7],PARAMETER[\"latitude_of_origin\",28.6");
    add_srs_wkt (p, 10,
        "6666666666667],PARAMETER[\"central_meridian\",-91.333333");
    add_srs_wkt (p, 11,
        "33333333],PARAMETER[\"false_easting\",2000000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",0],UNIT[\"US survey foot\",0.3048006");
    add_srs_wkt (p, 13,
        "096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26782\"]]");
    p = add_epsg_def_ex (filter, first, last, 26783, "epsg", 26783,
        "NAD27 / Maine East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.83333333333334 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=us");
    add_proj4text (p, 2,
        "-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Maine East\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",43.83333333333334],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-68.5],PARAMETER[\"scale_factor\",0.9999],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"26783\"]]");
    p = add_epsg_def_ex (filter, first, last, 26784, "epsg", 26784,
        "NAD27 / Maine West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Maine West\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",42.83333333333334],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-70.16666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999966667],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 12,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 13,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26784\"]]");
    p = add_epsg_def_ex (filter, first, last, 26785, "epsg", 26785,
        "NAD27 / Maryland", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-77 +x_0=243840.4876809754 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Maryland\",GEOGCS[\"NAD27\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637820");
    add_srs_wkt (p, 2,
        "6.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AUTH");
    add_srs_wkt (p, 3,
        "ORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 4,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 5,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],");
    add_srs_wkt (p, 7,
        "PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "standard_parallel_1\",38.3],PARAMETER[\"standard_paralle");
    add_srs_wkt (p, 9,
        "l_2\",39.45],PARAMETER[\"latitude_of_origin\",37.8333333");
    add_srs_wkt (p, 10,
        "3333334],PARAMETER[\"central_meridian\",-77],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_easting\",800000.0000000002],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26785\"]]");
    p = add_epsg_def_ex (filter, first, last, 26786, "epsg", 26786,
        "NAD27 / Massachusetts Mainland", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333");
    add_proj4text (p, 1,
        "333 +lat_0=41 +lon_0=-71.5 +x_0=182880.3657607315 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Massachusetts Mainland\",GEOGCS[\"NAD27");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 2,
        " 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",41.71666666666667],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",42.68333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",41],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-71.5],PARAMETER[\"false_easting\",600000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26786\"]]");
    p = add_epsg_def_ex (filter, first, last, 26787, "epsg", 26787,
        "NAD27 / Massachusetts Island", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=41 +lon_0=-70.5 +x_0=60960.12192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Massachusetts Island\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",41.28333333333333],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",41.48333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",41],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-70.5],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26787\"]]");
    p = add_epsg_def_ex (filter, first, last, 26791, "epsg", 26791,
        "NAD27 / Minnesota North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Minnesota North\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",47.03333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",48.63333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",46.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-93.1],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26791\"]]");
    p = add_epsg_def_ex (filter, first, last, 26792, "epsg", 26792,
        "NAD27 / Minnesota Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Minnesota Central\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",45.61666666666667],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",47.05],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",45],PARAMETER[\"central_meridian\",-94.25],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",2000000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26792\"]]");
    p = add_epsg_def_ex (filter, first, last, 26793, "epsg", 26793,
        "NAD27 / Minnesota South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666");
    add_proj4text (p, 1,
        "667 +lat_0=43 +lon_0=-94 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Minnesota South\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",43.78333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",45.21666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",43],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-94],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26793\"]]");
    p = add_epsg_def_ex (filter, first, last, 26794, "epsg", 26794,
        "NAD27 / Mississippi East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=29.66666666666667 +lon_0=-88.83333333");
    add_proj4text (p, 1,
        "333333 +k=0.99996 +x_0=152400.3048006096 +y_0=0 +datum=N");
    add_proj4text (p, 2,
        "AD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Mississippi East\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",29.66666666666667],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",-88.83333333333333],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.99996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 12,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26794\"]]");
    p = add_epsg_def_ex (filter, first, last, 26795, "epsg", 26795,
        "NAD27 / Mississippi West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30.5 +lon_0=-90.33333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Mississippi West\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",30.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 9,
        ",-90.33333333333333],PARAMETER[\"scale_factor\",0.999941");
    add_srs_wkt (p, 10,
        "177],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"US survey foot\",0.3048006096012");
    add_srs_wkt (p, 12,
        "192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26795\"]]");
    p = add_epsg_def_ex (filter, first, last, 26796, "epsg", 26796,
        "NAD27 / Missouri East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Missouri East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");


















































































































































































































    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",35.83333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-90.5],PARAMETER[\"scale_factor\",0.99993333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26796\"]]");
    p = add_epsg_def_ex (filter, first, last, 26797, "epsg", 26797,
        "NAD27 / Missouri Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Missouri Central\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",35.83333333333334],PARAMETER[\"centr");
    add_srs_wkt (p, 9,
        "al_meridian\",-92.5],PARAMETER[\"scale_factor\",0.999933");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"false_easting\",500000],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_northing\",0],UNIT[\"US survey foot\",0.3048006096012");
    add_srs_wkt (p, 12,
        "192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26797\"]]");
    p = add_epsg_def_ex (filter, first, last, 26798, "epsg", 26798,
        "NAD27 / Missouri West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9");
    add_proj4text (p, 1,
        "99941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Missouri West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",36.16666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-94.5],PARAMETER[\"scale_factor\",0.99994117");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26798\"]]");
    p = add_epsg_def_ex (filter, first, last, 26799, "epsg", 26799,
        "NAD27 / California zone VII", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.41666666666666 +lat_2=33.86666666666");
    add_proj4text (p, 1,
        "667 +lat_0=34.13333333333333 +lon_0=-118.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=1276106.450596901 +y_0=1268253.006858014 +datum=NAD2");





































    add_proj4text (p, 3,







































































































































































































































































































































































































































































































































































































































































































































        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / California zone VII\",GEOGCS[\"NAD27\",");













































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",34.41666666666666],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",33.86666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",34.13333333333333],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-118.3333333333333],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",4186692.58],PARAMETER[\"false_northing\",41609");
    add_srs_wkt (p, 13,
        "26.74],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 15,
        "H],AUTHORITY[\"EPSG\",\"26799\"]]");
    p = add_epsg_def_ex (filter, first, last, 26801, "epsg", 26801,
        "NAD Michigan / Michigan East (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-83.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99942857 +x_0=152400.3048006096 +y_0=0 +a=6378450.047548");
    add_proj4text (p, 2,
        "896 +b=6356826.621488444 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan East (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866 Michigan\",6378450.047548896,294.97869716");
    add_srs_wkt (p, 3,
        "46772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",41.5");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-83.66666666666667],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999942857],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"26801\"]]");
    p = add_epsg_def_ex (filter, first, last, 26802, "epsg", 26802,
        "NAD Michigan / Michigan Old Central (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-85.75 +k=0.999909091 +x_");
    add_proj4text (p, 1,
        "0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=63568");
    add_proj4text (p, 2,
        "26.621488444 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan Old Central (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",S");
    add_srs_wkt (p, 2,
        "PHEROID[\"Clarke 1866 Michigan\",6378450.047548896,294.9");
    add_srs_wkt (p, 3,
        "786971646772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",41.5],PARAMETER[\"central_meridian\",-85.75],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",0.999909091],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"US s");
    add_srs_wkt (p, 12,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"26802\"]]");
    p = add_epsg_def_ex (filter, first, last, 26803, "epsg", 26803,
        "NAD Michigan / Michigan West (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.5 +lon_0=-88.75 +k=0.999909091 +x_");
    add_proj4text (p, 1,
        "0=152400.3048006096 +y_0=0 +a=6378450.047548896 +b=63568");
    add_proj4text (p, 2,
        "26.621488444 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan West (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866 Michigan\",6378450.047548896,294.97869716");
    add_srs_wkt (p, 3,
        "46772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",41.5");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-88.75],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.999909091],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"US survey fo");
    add_srs_wkt (p, 12,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26");
    add_srs_wkt (p, 14,
        "803\"]]");
    p = add_epsg_def_ex (filter, first, last, 26811, "epsg", 26811,
        "NAD Michigan / Michigan North (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333");
    add_proj4text (p, 1,
        "334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +a=6378450.047548896 +b=6356826.621488444 ");
    add_proj4text (p, 3,
        "+units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan North (deprecated)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866 Michigan\",6378450.047548896,294.9786971");
    add_srs_wkt (p, 3,
        "646772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",45.48333333333333],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 10,
        "2\",47.08333333333334],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "44.78333333333333],PARAMETER[\"central_meridian\",-87],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",2000000],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26811\"]]");
    p = add_epsg_def_ex (filter, first, last, 26812, "epsg", 26812,
        "NAD Michigan / Michigan Central (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43");
    add_proj4text (p, 1,
        ".31666666666667 +lon_0=-84.33333333333333 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +a=6378450.047548896 +b=6356826.62148844");
    add_proj4text (p, 3,
        "4 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan Central (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Clarke 1866 Michigan\",6378450.047548896,294.97869");
    add_srs_wkt (p, 3,
        "71646772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",44.18333333333333],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 10,
        "_2\",45.7],PARAMETER[\"latitude_of_origin\",43.316666666");
    add_srs_wkt (p, 11,
        "66667],PARAMETER[\"central_meridian\",-84.33333333333333");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_easting\",2000000],PARAMETER[\"false");
    add_srs_wkt (p, 13,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 14,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 15,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26812\"]]");
    p = add_epsg_def_ex (filter, first, last, 26813, "epsg", 26813,
        "NAD Michigan / Michigan South (deprecated)", 0, 0,
        "Clarke 1866 Michigan", "Greenwich",
        "NAD27_Michigan", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41");
    add_proj4text (p, 1,
        ".5 +lon_0=-84.33333333333333 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +a=6378450.047548896 +b=6356826.621488444 +units=us-f");
    add_proj4text (p, 3,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD Michigan / Michigan South (deprecated)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD27 Michigan\",DATUM[\"NAD27_Michigan\",SPHEROI");
    add_srs_wkt (p, 2,
        "D[\"Clarke 1866 Michigan\",6378450.047548896,294.9786971");
    add_srs_wkt (p, 3,
        "646772,AUTHORITY[\"EPSG\",\"7009\"]],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6268\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4268\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",42.1],PARAMETER[\"standard_parallel_2\",43.666666");
    add_srs_wkt (p, 10,
        "66666666],PARAMETER[\"latitude_of_origin\",41.5],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",-84.33333333333333],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",2000000],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"26813\"]]");
    p = add_epsg_def_ex (filter, first, last, 26814, "epsg", 26814,
        "NAD83 / Maine East (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine East (ftUS) (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"626");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",43.6666");
    add_srs_wkt (p, 9,
        "6666666666],PARAMETER[\"central_meridian\",-68.5],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",300000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26814\"]]");
    p = add_epsg_def_ex (filter, first, last, 26815, "epsg", 26815,
        "NAD83 / Maine West (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine West (ftUS) (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"626");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",42.8333");
    add_srs_wkt (p, 9,
        "3333333334],PARAMETER[\"central_meridian\",-70.166666666");
    add_srs_wkt (p, 10,
        "66667],PARAMETER[\"scale_factor\",0.999966667],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",900000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26815\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26819, "epsg", 26819,
        "NAD83 / Minnesota North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 3,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota North (ftUS) (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",48.63333333333333],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 10,
        "2\",47.03333333333333],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "46.5],PARAMETER[\"central_meridian\",-93.1],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",800000.0000101601],PARAMETER[\"false_nor");
    add_srs_wkt (p, 13,
        "thing\",99999.99998984],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26819\"]]");
    p = add_epsg_def_ex (filter, first, last, 26820, "epsg", 26820,
        "NAD83 / Minnesota Central (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.999989");
    add_proj4text (p, 2,
        "84 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota Central (ftUS) (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"L");
    add_srs_wkt (p, 8,
        "ambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 9,
        "lel_1\",47.05],PARAMETER[\"standard_parallel_2\",45.6166");
    add_srs_wkt (p, 10,
        "6666666667],PARAMETER[\"latitude_of_origin\",45],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",-94.25],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 12,
        "g\",800000.0000101601],PARAMETER[\"false_northing\",9999");
    add_srs_wkt (p, 13,
        "9.99998984],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 14,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 15,
        ",\"26820\"]]");
    p = add_epsg_def_ex (filter, first, last, 26821, "epsg", 26821,
        "NAD83 / Minnesota South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=999");
    add_proj4text (p, 2,
        "99.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota South (ftUS) (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHE");
    add_srs_wkt (p, 2,
        "ROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"La");
    add_srs_wkt (p, 8,
        "mbert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 9,
        "el_1\",45.21666666666667],PARAMETER[\"standard_parallel_");
    add_srs_wkt (p, 10,
        "2\",43.78333333333333],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "43],PARAMETER[\"central_meridian\",-94],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",800000.0000101601],PARAMETER[\"false_northin");
    add_srs_wkt (p, 13,
        "g\",99999.99998984],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"26821\"]]");
    p = add_epsg_def_ex (filter, first, last, 26822, "epsg", 26822,
        "NAD83 / Nebraska (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nebraska (ftUS) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"G");
    add_srs_wkt (p, 2,
        "RS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"701");
    add_srs_wkt (p, 3,
        "9\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",4");
    add_srs_wkt (p, 9,
        "3],PARAMETER[\"standard_parallel_2\",40],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",39.83333333333334],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-100],PARAMETER[\"false_easting\",500000.000");
    add_srs_wkt (p, 12,
        "0101601],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26822\"]]");
    p = add_epsg_def_ex (filter, first, last, 26823, "epsg", 26823,
        "NAD83 / West Virginia North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,");
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia North (ftUS) (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_1\",40.25],PARAMETER[\"standard_parallel_2\",39],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"latitude_of_origin\",38.5],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-79.5],PARAMETER[\"false_easting\",1968500");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"26823\"]]");
    p = add_epsg_def_ex (filter, first, last, 26824, "epsg", 26824,
        "NAD83 / West Virginia South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia South (ftUS) (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_1\",38.88333333333333],PARAMETER[\"standard_paral");
    add_srs_wkt (p, 10,
        "lel_2\",37.48333333333333],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 11,
        "n\",37],PARAMETER[\"central_meridian\",-81],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1968500],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26824\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 26825, "epsg", 26825,
        "NAD83(HARN) / Maine East (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine East (ftUS) (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Refer");
    add_srs_wkt (p, 2,
        "ence_Network\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",43.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-68.5],PARAMETER[\"scale_factor\",0.9999],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",300000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 14,
        "6825\"]]");
    p = add_epsg_def_ex (filter, first, last, 26826, "epsg", 26826,
        "NAD83(HARN) / Maine West (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine West (ftUS) (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Refer");
    add_srs_wkt (p, 2,
        "ence_Network\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",42.83333333333334],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",-70.16666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.999966667],PARAMETER[\"false_easting\",900000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"26826\"]]");
    p = add_epsg_def_ex (filter, first, last, 26830, "epsg", 26830,
        "NAD83(HARN) / Minnesota North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 3,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota North (ftUS) (deprecate");
    add_srs_wkt (p, 1,
        "d)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_");
    add_srs_wkt (p, 2,
        "Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",48.63333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",47.03333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",46.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 12,
        "an\",-93.1],PARAMETER[\"false_easting\",800000.000010160");
    add_srs_wkt (p, 13,
        "1],PARAMETER[\"false_northing\",99999.99998984],UNIT[\"m");
    add_srs_wkt (p, 14,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 15,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26830\"]]");
    p = add_epsg_def_ex (filter, first, last, 26831, "epsg", 26831,
        "NAD83(HARN) / Minnesota Central (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.999989");
    add_proj4text (p, 2,
        "84 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota Central (ftUS) (depreca");
    add_srs_wkt (p, 1,
        "ted)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accurac");
    add_srs_wkt (p, 2,
        "y_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",47.05],PARAMETER[\"standa");
    add_srs_wkt (p, 10,
        "rd_parallel_2\",45.61666666666667],PARAMETER[\"latitude_");
    add_srs_wkt (p, 11,
        "of_origin\",45],PARAMETER[\"central_meridian\",-94.25],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",800000.0000101601],PARAMETER[");
    add_srs_wkt (p, 13,
        "\"false_northing\",99999.99998984],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 15,
        "RTH],AUTHORITY[\"EPSG\",\"26831\"]]");
    p = add_epsg_def_ex (filter, first, last, 26832, "epsg", 26832,
        "NAD83(HARN) / Minnesota South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=999");
    add_proj4text (p, 2,
        "99.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota South (ftUS) (deprecate");
    add_srs_wkt (p, 1,
        "d)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_");
    add_srs_wkt (p, 2,
        "Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.25");
    add_srs_wkt (p, 3,
        "7222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",45.21666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",43.78333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",43],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 12,
        "\",-94],PARAMETER[\"false_easting\",800000.0000101601],P");
    add_srs_wkt (p, 13,
        "ARAMETER[\"false_northing\",99999.99998984],UNIT[\"metre");
    add_srs_wkt (p, 14,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 15,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26832\"]]");
    p = add_epsg_def_ex (filter, first, last, 26833, "epsg", 26833,
        "NAD83(HARN) / Nebraska (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Nebraska (ftUS) (deprecated)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Referen");
    add_srs_wkt (p, 2,
        "ce_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_1\",43],PARAMETER[\"standard_paralle");
    add_srs_wkt (p, 10,
        "l_2\",40],PARAMETER[\"latitude_of_origin\",39.8333333333");
    add_srs_wkt (p, 11,
        "3334],PARAMETER[\"central_meridian\",-100],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_easting\",500000.0000101601],PARAMETER[\"false_nort");
    add_srs_wkt (p, 13,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 14,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "26833\"]]");
    p = add_epsg_def_ex (filter, first, last, 26834, "epsg", 26834,
        "NAD83(HARN) / West Virginia North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,");
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia North (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accur");
    add_srs_wkt (p, 2,
        "acy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"standard_parallel_1\",40.25],PARAMETER[\"sta");
    add_srs_wkt (p, 10,
        "ndard_parallel_2\",39],PARAMETER[\"latitude_of_origin\",");
    add_srs_wkt (p, 11,
        "38.5],PARAMETER[\"central_meridian\",-79.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1968500],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X");
    add_srs_wkt (p, 14,
        "\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26834\"]");
    add_srs_wkt (p, 15,
        "]");
    p = add_epsg_def_ex (filter, first, last, 26835, "epsg", 26835,
        "NAD83(HARN) / West Virginia South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia South (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accur");
    add_srs_wkt (p, 2,
        "acy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"standard_parallel_1\",38.88333333333333],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"standard_parallel_2\",37.48333333333333],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"latitude_of_origin\",37],PARAMETER[\"central_merid");
    add_srs_wkt (p, 12,
        "ian\",-81],PARAMETER[\"false_easting\",1968500],PARAMETE");
    add_srs_wkt (p, 13,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26835\"]]");
    p = add_epsg_def_ex (filter, first, last, 26836, "epsg", 26836,
        "NAD83(NSRS2007) / Maine East (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine East (ftUS) (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 4,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4759\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",43.66666666666666],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",-68.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.9999],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"26836\"]]");
    p = add_epsg_def_ex (filter, first, last, 26837, "epsg", 26837,
        "NAD83(NSRS2007) / Maine West (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine West (ftUS) (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Sp");
    add_srs_wkt (p, 2,
        "atial_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 3,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 4,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4759\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",42.83333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",-70.16666666666667],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "scale_factor\",0.999966667],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 12,
        "900000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26837\"]]");
    p = add_epsg_def_ex (filter, first, last, 26841, "epsg", 26841,
        "NAD83(NSRS2007) / Minnesota North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101601 +y_0=99999.99998984 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 3,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota North (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Nation");
    add_srs_wkt (p, 2,
        "al_Spatial_Reference_System_2007\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 3,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 4,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM");
    add_srs_wkt (p, 5,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 6,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",48.6333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"standard_parallel_2\",47.0333333333");
    add_srs_wkt (p, 11,
        "3333],PARAMETER[\"latitude_of_origin\",46.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "central_meridian\",-93.1],PARAMETER[\"false_easting\",80");
    add_srs_wkt (p, 13,
        "0000.0000101601],PARAMETER[\"false_northing\",99999.9999");
    add_srs_wkt (p, 14,
        "8984],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 15,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"268");
    add_srs_wkt (p, 16,
        "41\"]]");
    p = add_epsg_def_ex (filter, first, last, 26842, "epsg", 26842,
        "NAD83(NSRS2007) / Minnesota Central (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101601 +y_0=99999.999989");
    add_proj4text (p, 2,
        "84 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota Central (ftUS) (dep");
    add_srs_wkt (p, 1,
        "recated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Nati");
    add_srs_wkt (p, 2,
        "onal_Spatial_Reference_System_2007\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 3,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 4,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIM");
    add_srs_wkt (p, 5,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 9,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",47.05],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"standard_parallel_2\",45.61666666666667],PARA");
    add_srs_wkt (p, 11,
        "METER[\"latitude_of_origin\",45],PARAMETER[\"central_mer");
    add_srs_wkt (p, 12,
        "idian\",-94.25],PARAMETER[\"false_easting\",800000.00001");
    add_srs_wkt (p, 13,
        "01601],PARAMETER[\"false_northing\",99999.99998984],UNIT");
    add_srs_wkt (p, 14,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 15,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26842\"]]");
    p = add_epsg_def_ex (filter, first, last, 26843, "epsg", 26843,
        "NAD83(NSRS2007) / Minnesota South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101601 +y_0=999");
    add_proj4text (p, 2,
        "99.99998984 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota South (ftUS) (depre");
    add_srs_wkt (p, 1,
        "cated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Nation");
    add_srs_wkt (p, 2,
        "al_Spatial_Reference_System_2007\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 3,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 4,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM");
    add_srs_wkt (p, 5,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 6,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",45.2166666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"standard_parallel_2\",43.7833333333");
    add_srs_wkt (p, 11,
        "3333],PARAMETER[\"latitude_of_origin\",43],PARAMETER[\"c");
    add_srs_wkt (p, 12,
        "entral_meridian\",-94],PARAMETER[\"false_easting\",80000");
    add_srs_wkt (p, 13,
        "0.0000101601],PARAMETER[\"false_northing\",99999.9999898");
    add_srs_wkt (p, 14,
        "4],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 15,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26843\"");
    add_srs_wkt (p, 16,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26844, "epsg", 26844,
        "NAD83(NSRS2007) / Nebraska (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.0000101601 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Nebraska (ftUS) (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spati");
    add_srs_wkt (p, 2,
        "al_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 3,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 4,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 5,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 6,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"st");
    add_srs_wkt (p, 10,
        "andard_parallel_2\",40],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",39.83333333333334],PARAMETER[\"central_meridian\",-100]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_easting\",500000.0000101601],PARAMETE");
    add_srs_wkt (p, 13,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26844\"]]");
    p = add_epsg_def_ex (filter, first, last, 26845, "epsg", 26845,
        "NAD83(NSRS2007) / West Virginia North (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=1968500 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,");
    add_proj4text (p, 2,
        "0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia North (ftUS) (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Na");
    add_srs_wkt (p, 2,
        "tional_Spatial_Reference_System_2007\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 9,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",40.25],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"standard_parallel_2\",39],PARAMETER[\"latitu");
    add_srs_wkt (p, 11,
        "de_of_origin\",38.5],PARAMETER[\"central_meridian\",-79.");
    add_srs_wkt (p, 12,
        "5],PARAMETER[\"false_easting\",1968500],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 14,
        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 15,
        "SG\",\"26845\"]]");
    p = add_epsg_def_ex (filter, first, last, 26846, "epsg", 26846,
        "NAD83(NSRS2007) / West Virginia South (ftUS) (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=1968500 +y_0=0 +ellps=GRS8");
    add_proj4text (p, 2,
        "0 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia South (ftUS) (d");
    add_srs_wkt (p, 1,
        "eprecated)\",GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_Na");
    add_srs_wkt (p, 2,
        "tional_Spatial_Reference_System_2007\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 3,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 4,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4759\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 9,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",38.8833");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"standard_parallel_2\",37.4833333");
    add_srs_wkt (p, 11,
        "3333333],PARAMETER[\"latitude_of_origin\",37],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"central_meridian\",-81],PARAMETER[\"false_easting\",19");
    add_srs_wkt (p, 13,
        "68500],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26846\"]]");
    p = add_epsg_def_ex (filter, first, last, 26847, "epsg", 26847,
        "NAD83 / Maine East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine East (ftUS)\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",43.66666666666666],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-68.5],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",984250.000000");
    add_srs_wkt (p, 11,
        "0002],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 12,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 13,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 14,
        "6847\"]]");
    p = add_epsg_def_ex (filter, first, last, 26848, "epsg", 26848,
        "NAD83 / Maine West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine West (ftUS)\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"latitude_of_origin\",42.83333333333334],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"central_meridian\",-70.16666666666667],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",0.999966667],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",2952750],PARAMETER[\"false_northing\",0],UNIT[\"US ");
    add_srs_wkt (p, 12,
        "survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "03\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 14,
        "SG\",\"26848\"]]");
    p = add_epsg_def_ex (filter, first, last, 26849, "epsg", 26849,
        "NAD83 / Minnesota North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,");
    add_proj4text (p, 3,
        "0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota North (ftUS)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",48.6333");
    add_srs_wkt (p, 9,
        "3333333333],PARAMETER[\"standard_parallel_2\",47.0333333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"latitude_of_origin\",46.5],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"central_meridian\",-93.1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,
        ",2624666.6667],PARAMETER[\"false_northing\",328083.3333]");
    add_srs_wkt (p, 13,
        ",UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"26849\"]]");
    p = add_epsg_def_ex (filter, first, last, 26850, "epsg", 26850,
        "NAD83 / Minnesota Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.999989");
    add_proj4text (p, 2,
        "83997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota Central (ftUS)\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Confo");
    add_srs_wkt (p, 8,
        "rmal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",47.0");
    add_srs_wkt (p, 9,
        "5],PARAMETER[\"standard_parallel_2\",45.61666666666667],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"latitude_of_origin\",45],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-94.25],PARAMETER[\"false_easting\",2624666.");
    add_srs_wkt (p, 12,
        "6667],PARAMETER[\"false_northing\",328083.3333],UNIT[\"U");
    add_srs_wkt (p, 13,
        "S survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"26850\"]]");
    p = add_epsg_def_ex (filter, first, last, 26851, "epsg", 26851,
        "NAD83 / Minnesota South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=999");
    add_proj4text (p, 2,
        "99.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota South (ftUS)\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",45.2166");
    add_srs_wkt (p, 9,
        "6666666667],PARAMETER[\"standard_parallel_2\",43.7833333");
    add_srs_wkt (p, 10,
        "3333333],PARAMETER[\"latitude_of_origin\",43],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-94],PARAMETER[\"false_easting\",26");
    add_srs_wkt (p, 12,
        "24666.6667],PARAMETER[\"false_northing\",328083.3333],UN");
    add_srs_wkt (p, 13,
        "IT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 15,
        "ITY[\"EPSG\",\"26851\"]]");
    p = add_epsg_def_ex (filter, first, last, 26852, "epsg", 26852,
        "NAD83 / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nebraska (ftUS)\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",43],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",40],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 10,
        "gin\",39.83333333333334],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-100],PARAMETER[\"false_easting\",1640416.6667],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26852\"]]");
    p = add_epsg_def_ex (filter, first, last, 26853, "epsg", 26853,
        "NAD83 / West Virginia North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia North (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",40");
    add_srs_wkt (p, 9,
        ".25],PARAMETER[\"standard_parallel_2\",39],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",38.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-79.5],PARAMETER[\"false_easting\",1968500],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26853\"]]");
    p = add_epsg_def_ex (filter, first, last, 26854, "epsg", 26854,
        "NAD83 / West Virginia South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia South (ftUS)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GR");
    add_srs_wkt (p, 2,
        "S 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Con");
    add_srs_wkt (p, 8,
        "formal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",38");
    add_srs_wkt (p, 9,
        ".88333333333333],PARAMETER[\"standard_parallel_2\",37.48");
    add_srs_wkt (p, 10,
        "333333333333],PARAMETER[\"latitude_of_origin\",37],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-81],PARAMETER[\"false_easting");
    add_srs_wkt (p, 12,
        "\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US su");
    add_srs_wkt (p, 13,
        "rvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003");
    add_srs_wkt (p, 14,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 15,
        "\",\"26854\"]]");
    p = add_epsg_def_ex (filter, first, last, 26855, "epsg", 26855,
        "NAD83(HARN) / Maine East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine East (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",43.66666666666666],PARAMETER[\"central_meridian\",-68.5");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",984250.0000000002],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"26855\"]]");
    p = add_epsg_def_ex (filter, first, last, 26856, "epsg", 26856,
        "NAD83(HARN) / Maine West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Maine West (ftUS)\",GEOGCS[\"NAD8");
    add_srs_wkt (p, 1,
        "3(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 9,
        ",42.83333333333334],PARAMETER[\"central_meridian\",-70.1");
    add_srs_wkt (p, 10,
        "6666666666667],PARAMETER[\"scale_factor\",0.999966667],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",2952750],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26856\"]]");
    p = add_epsg_def_ex (filter, first, last, 26857, "epsg", 26857,
        "NAD83(HARN) / Minnesota North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,");
    add_proj4text (p, 3,
        "0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota North (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Netw");
    add_srs_wkt (p, 2,
        "ork\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",48.63333333333333],PARAMETER[\"standard");
    add_srs_wkt (p, 10,
        "_parallel_2\",47.03333333333333],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 11,
        "_origin\",46.5],PARAMETER[\"central_meridian\",-93.1],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_easting\",2624666.6667],PARAMETER[\"fals");
    add_srs_wkt (p, 13,
        "e_northing\",328083.3333],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 14,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 15,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26857\"]]");
    p = add_epsg_def_ex (filter, first, last, 26858, "epsg", 26858,
        "NAD83(HARN) / Minnesota Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.999989");
    add_proj4text (p, 2,
        "83997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota Central (ftUS)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_N");
    add_srs_wkt (p, 2,
        "etwork\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"st");
    add_srs_wkt (p, 9,
        "andard_parallel_1\",47.05],PARAMETER[\"standard_parallel");
    add_srs_wkt (p, 10,
        "_2\",45.61666666666667],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",45],PARAMETER[\"central_meridian\",-94.25],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",2624666.6667],PARAMETER[\"false_northing");
    add_srs_wkt (p, 13,
        "\",328083.3333],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 14,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 15,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26858\"]]");
    p = add_epsg_def_ex (filter, first, last, 26859, "epsg", 26859,
        "NAD83(HARN) / Minnesota South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=999");
    add_proj4text (p, 2,
        "99.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Minnesota South (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Netw");
    add_srs_wkt (p, 2,
        "ork\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"stand");
    add_srs_wkt (p, 9,
        "ard_parallel_1\",45.21666666666667],PARAMETER[\"standard");
    add_srs_wkt (p, 10,
        "_parallel_2\",43.78333333333333],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 11,
        "_origin\",43],PARAMETER[\"central_meridian\",-94],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_easting\",2624666.6667],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",328083.3333],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 14,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 15,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26859\"]]");
    p = add_epsg_def_ex (filter, first, last, 26860, "epsg", 26860,
        "NAD83(HARN) / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / Nebraska (ftUS)\",GEOGCS[\"NAD83(");
    add_srs_wkt (p, 1,
        "HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPS");
    add_srs_wkt (p, 4,
        "G\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_1\",43],PARAMETER[\"standard_parallel_2\",40],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"latitude_of_origin\",39.83333333333334],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"central_meridian\",-100],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,
        ",1640416.6667],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"26860\"]]");
    p = add_epsg_def_ex (filter, first, last, 26861, "epsg", 26861,
        "NAD83(HARN) / West Virginia North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia North (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference");
    add_srs_wkt (p, 2,
        "_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_1\",40.25],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 10,
        "el_2\",39],PARAMETER[\"latitude_of_origin\",38.5],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-79.5],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 12,
        "g\",1968500],PARAMETER[\"false_northing\",0],UNIT[\"US s");
    add_srs_wkt (p, 13,
        "urvey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 14,
        "3\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 15,
        "G\",\"26861\"]]");
    p = add_epsg_def_ex (filter, first, last, 26862, "epsg", 26862,
        "NAD83(HARN) / West Virginia South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_High_Accuracy_Reference_Network", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(HARN) / West Virginia South (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference");
    add_srs_wkt (p, 2,
        "_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4152\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_1\",38.88333333333333],PARAMETER[\"sta");
    add_srs_wkt (p, 10,
        "ndard_parallel_2\",37.48333333333333],PARAMETER[\"latitu");
    add_srs_wkt (p, 11,
        "de_of_origin\",37],PARAMETER[\"central_meridian\",-81],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_easting\",1968500],PARAMETER[\"false_no");
    add_srs_wkt (p, 13,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 15,
        ",NORTH],AUTHORITY[\"EPSG\",\"26862\"]]");
    p = add_epsg_def_ex (filter, first, last, 26863, "epsg", 26863,
        "NAD83(NSRS2007) / Maine East (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine East (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"475");
    add_srs_wkt (p, 8,
        "9\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",43.66666666666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",-68.5],PARAMETER[\"scale_factor\",0.9999],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",984250.0000000002],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26863\"]]");
    p = add_epsg_def_ex (filter, first, last, 26864, "epsg", 26864,
        "NAD83(NSRS2007) / Maine West (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Maine West (ftUS)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Referen");
    add_srs_wkt (p, 2,
        "ce_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.25722");
    add_srs_wkt (p, 3,
        "2101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"475");
    add_srs_wkt (p, 8,
        "9\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",42.83333333333334],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",-70.16666666666667],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 11,
        "r\",0.999966667],PARAMETER[\"false_easting\",2952750],PA");
    add_srs_wkt (p, 12,
        "RAMETER[\"false_northing\",0],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 13,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26864\"]]");
    p = add_epsg_def_ex (filter, first, last, 26865, "epsg", 26865,
        "NAD83(NSRS2007) / Minnesota North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000.00");
    add_proj4text (p, 2,
        "00101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,");
    add_proj4text (p, 3,
        "0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota North (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",48.63333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",47.03333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",46.5],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 12,
        "an\",-93.1],PARAMETER[\"false_easting\",2624666.6667],PA");
    add_srs_wkt (p, 13,
        "RAMETER[\"false_northing\",328083.3333],UNIT[\"US survey");
    add_srs_wkt (p, 14,
        " foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]]");
    add_srs_wkt (p, 15,
        ",AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 16,
        "26865\"]]");
    p = add_epsg_def_ex (filter, first, last, 26866, "epsg", 26866,
        "NAD83(NSRS2007) / Minnesota Central (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000.0000101599 +y_0=99999.999989");
    add_proj4text (p, 2,
        "83997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota Central (ftUS)\",GE");
    add_srs_wkt (p, 1,
        "OGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_");
    add_srs_wkt (p, 2,
        "Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 3,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 5,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"standard_parallel_1\",47.05],PARAMETER[\"sta");
    add_srs_wkt (p, 10,
        "ndard_parallel_2\",45.61666666666667],PARAMETER[\"latitu");
    add_srs_wkt (p, 11,
        "de_of_origin\",45],PARAMETER[\"central_meridian\",-94.25");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_easting\",2624666.6667],PARAMETER[\"");
    add_srs_wkt (p, 13,
        "false_northing\",328083.3333],UNIT[\"US survey foot\",0.");
    add_srs_wkt (p, 14,
        "3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\"");
    add_srs_wkt (p, 15,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26866\"]]");
    p = add_epsg_def_ex (filter, first, last, 26867, "epsg", 26867,
        "NAD83(NSRS2007) / Minnesota South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000.0000101599 +y_0=999");
    add_proj4text (p, 2,
        "99.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 3,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Minnesota South (ftUS)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Re");
    add_srs_wkt (p, 2,
        "ference_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.");
    add_srs_wkt (p, 3,
        "257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 5,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 6,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_1\",45.21666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"standard_parallel_2\",43.78333333333333],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"latitude_of_origin\",43],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 12,
        "\",-94],PARAMETER[\"false_easting\",2624666.6667],PARAME");
    add_srs_wkt (p, 13,
        "TER[\"false_northing\",328083.3333],UNIT[\"US survey foo");
    add_srs_wkt (p, 14,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 15,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"268");
    add_srs_wkt (p, 16,
        "67\"]]");
    p = add_epsg_def_ex (filter, first, last, 26868, "epsg", 26868,
        "NAD83(NSRS2007) / Nebraska (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000.00001016 +y_0=0 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / Nebraska (ftUS)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83(NSRS2007)\",DATUM[\"NAD83_National_Spatial_Reference");
    add_srs_wkt (p, 2,
        "_System_2007\",SPHEROID[\"GRS 1980\",6378137,298.2572221");
    add_srs_wkt (p, 3,
        "01,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4759\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_1\",43],PARAMETER[\"standard_parall");
    add_srs_wkt (p, 10,
        "el_2\",40],PARAMETER[\"latitude_of_origin\",39.833333333");
    add_srs_wkt (p, 11,
        "33334],PARAMETER[\"central_meridian\",-100],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1640416.6667],PARAMETER[\"false_northing");
    add_srs_wkt (p, 13,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 15,
        "],AUTHORITY[\"EPSG\",\"26868\"]]");
    p = add_epsg_def_ex (filter, first, last, 26869, "epsg", 26869,
        "NAD83(NSRS2007) / West Virginia North (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia North (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_1\",40.25],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "tandard_parallel_2\",39],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",38.5],PARAMETER[\"central_meridian\",-79.5],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_easting\",1968500],PARAMETER[\"false_northing\",0]");
    add_srs_wkt (p, 13,
        ",UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 15,
        "HORITY[\"EPSG\",\"26869\"]]");
    p = add_epsg_def_ex (filter, first, last, 26870, "epsg", 26870,
        "NAD83(NSRS2007) / West Virginia South (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_National_Spatial_Reference_System_2007", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(NSRS2007) / West Virginia South (ftUS)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"NAD83(NSRS2007)\",DATUM[\"NAD83_National_Spatia");
    add_srs_wkt (p, 2,
        "l_Reference_System_2007\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 3,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6759\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4759\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_1\",38.88333333333333],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"standard_parallel_2\",37.48333333333333],PARA");
    add_srs_wkt (p, 11,
        "METER[\"latitude_of_origin\",37],PARAMETER[\"central_mer");
    add_srs_wkt (p, 12,
        "idian\",-81],PARAMETER[\"false_easting\",1968500],PARAME");
    add_srs_wkt (p, 13,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 14,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 15,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26870\"]]");
    p = add_epsg_def_ex (filter, first, last, 26891, "epsg", 26891,
        "NAD83(CSRS) / MTM zone 11", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 11\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-82.5],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",0.9999],PARAMETER[\"false_easting\",304800],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nort");
    add_srs_wkt (p, 13,
        "hing\",NORTH],AUTHORITY[\"EPSG\",\"26891\"]]");
    p = add_epsg_def_ex (filter, first, last, 26892, "epsg", 26892,
        "NAD83(CSRS) / MTM zone 12", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 12\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26892\"]]");
    p = add_epsg_def_ex (filter, first, last, 26893, "epsg", 26893,
        "NAD83(CSRS) / MTM zone 13", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 13\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-84],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26893\"]]");
    p = add_epsg_def_ex (filter, first, last, 26894, "epsg", 26894,
        "NAD83(CSRS) / MTM zone 14", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 14\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-87],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26894\"]]");
    p = add_epsg_def_ex (filter, first, last, 26895, "epsg", 26895,
        "NAD83(CSRS) / MTM zone 15", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 15\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-90],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26895\"]]");
    p = add_epsg_def_ex (filter, first, last, 26896, "epsg", 26896,
        "NAD83(CSRS) / MTM zone 16", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 16\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-93],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26896\"]]");
    p = add_epsg_def_ex (filter, first, last, 26897, "epsg", 26897,
        "NAD83(CSRS) / MTM zone 17", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 17\",GEOGCS[\"NAD83(CSRS");
    add_srs_wkt (p, 1,
        ")\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SP");
    add_srs_wkt (p, 2,
        "HEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-96],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northi");
    add_srs_wkt (p, 13,
        "ng\",NORTH],AUTHORITY[\"EPSG\",\"26897\"]]");
    p = add_epsg_def_ex (filter, first, last, 26898, "epsg", 26898,
        "NAD83(CSRS) / MTM zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 1\",GEOGCS[\"NAD83(CSRS)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-53],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"E(X)\",EAST],AXIS[\"N(Y)\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26898\"]]");
    p = add_epsg_def_ex (filter, first, last, 26899, "epsg", 26899,
        "NAD83(CSRS) / MTM zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "NAD83_Canadian_Spatial_Reference_System", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83(CSRS) / MTM zone 2\",GEOGCS[\"NAD83(CSRS)");
    add_srs_wkt (p, 1,
        "\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",-56],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",304800],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"E(X)\",EAST],AXIS[\"N(Y)\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"26899\"]]");
    p = add_epsg_def_ex (filter, first, last, 26901, "epsg", 26901,
        "NAD83 / UTM zone 1N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 1N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-177],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26901\"]]");
    p = add_epsg_def_ex (filter, first, last, 26902, "epsg", 26902,
        "NAD83 / UTM zone 2N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,


        "+proj=utm +zone=2 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 2N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-171],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");

    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26902\"]]");

    p = add_epsg_def_ex (filter, first, last, 26903, "epsg", 26903,
        "NAD83 / UTM zone 3N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,


        "+proj=utm +zone=3 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 3N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-165],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");

    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26903\"]]");
    p = add_epsg_def_ex (filter, first, last, 26904, "epsg", 26904,
        "NAD83 / UTM zone 4N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,


        "+proj=utm +zone=4 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 4N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,







































        "idian\",-159],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26904\"]]");

    p = add_epsg_def_ex (filter, first, last, 26905, "epsg", 26905,
        "NAD83 / UTM zone 5N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,


        "+proj=utm +zone=5 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 5N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-153],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");

    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26905\"]]");

    p = add_epsg_def_ex (filter, first, last, 26906, "epsg", 26906,
        "NAD83 / UTM zone 6N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,


        "+proj=utm +zone=6 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 6N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-147],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26906\"]]");
    p = add_epsg_def_ex (filter, first, last, 26907, "epsg", 26907,
        "NAD83 / UTM zone 7N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 7N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-141],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26907\"]]");
    p = add_epsg_def_ex (filter, first, last, 26908, "epsg", 26908,
        "NAD83 / UTM zone 8N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 8N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-135],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26908\"]]");
    p = add_epsg_def_ex (filter, first, last, 26909, "epsg", 26909,
        "NAD83 / UTM zone 9N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +u");
    add_proj4text (p, 1,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 9N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-129],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26909\"]]");
    p = add_epsg_def_ex (filter, first, last, 26910, "epsg", 26910,
        "NAD83 / UTM zone 10N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 10N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-123],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26910\"]]");
    p = add_epsg_def_ex (filter, first, last, 26911, "epsg", 26911,
        "NAD83 / UTM zone 11N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 11N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-117],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26911\"]]");
    p = add_epsg_def_ex (filter, first, last, 26912, "epsg", 26912,
        "NAD83 / UTM zone 12N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 12N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-111],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26912\"]]");
    p = add_epsg_def_ex (filter, first, last, 26913, "epsg", 26913,
        "NAD83 / UTM zone 13N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 13N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-105],PARAMETER[\"scale_factor\",0.9996],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26913\"]]");
    p = add_epsg_def_ex (filter, first, last, 26914, "epsg", 26914,
        "NAD83 / UTM zone 14N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 14N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26914\"]]");
    p = add_epsg_def_ex (filter, first, last, 26915, "epsg", 26915,
        "NAD83 / UTM zone 15N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 15N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26915\"]]");
    p = add_epsg_def_ex (filter, first, last, 26916, "epsg", 26916,
        "NAD83 / UTM zone 16N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 16N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-87],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26916\"]]");
    p = add_epsg_def_ex (filter, first, last, 26917, "epsg", 26917,
        "NAD83 / UTM zone 17N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 17N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26917\"]]");
    p = add_epsg_def_ex (filter, first, last, 26918, "epsg", 26918,
        "NAD83 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 18N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-75],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26918\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>











|

|

|

|

|

|
|
|




|

|

|

|



|











|

|

|

|

|

|
|
|




|

|

|

|



|











|

|

|

|

|

|
|
|




|

|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|











|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|

|

|

|

|
|
|


|

>
>
|
|
|

|

|

|

|

|

|





|

|

<
>

|

<
>

<
>
|
<
>


<
>

>
>
|
|
|

|

|

|

|

|

|

|

|

|

|

<
>

|

<
>

|
|
<
>


<
>

>
>
|
|
|

|

|

|

|

|

|

|

|

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|

|

<
>

<
>
|
<
>


<
>

>
>
|
|
|

|

|

|

|

|

|

|

|

|

|

<
>

|

<
>

<
>
|
<
>


<
>

>
>
|
|
|

|

|

|

|

|

|





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803

1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































3553
3554
3555
3556
3557
3558
3559
....
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610

3611
3612
3613
3614

3615
3616

3617
3618

3619
3620
3621

3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649

3650
3651
3652
3653

3654
3655
3656
3657

3658
3659
3660

3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731

3732
3733

3734
3735

3736
3737
3738

3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766

3767
3768
3769
3770

3771
3772

3773
3774

3775
3776
3777

3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_43 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 31992, "epsg", 31992,
        "SIRGAS 1995 / UTM zone 17S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 17S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31992\"]]");
    p = add_epsg_def_ex (filter, first, last, 31993, "epsg", 31993,
        "SIRGAS 1995 / UTM zone 18S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 18S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-7");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31993\"]]");
    p = add_epsg_def_ex (filter, first, last, 31994, "epsg", 31994,
        "SIRGAS 1995 / UTM zone 19S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 19S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31994\"]]");
    p = add_epsg_def_ex (filter, first, last, 31995, "epsg", 31995,
        "SIRGAS 1995 / UTM zone 20S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 20S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31995\"]]");
    p = add_epsg_def_ex (filter, first, last, 31996, "epsg", 31996,
        "SIRGAS 1995 / UTM zone 21S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 21S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31996\"]]");
    p = add_epsg_def_ex (filter, first, last, 31997, "epsg", 31997,
        "SIRGAS 1995 / UTM zone 22S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 22S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31997\"]]");
    p = add_epsg_def_ex (filter, first, last, 31998, "epsg", 31998,
        "SIRGAS 1995 / UTM zone 23S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 23S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-4");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31998\"]]");
    p = add_epsg_def_ex (filter, first, last, 31999, "epsg", 31999,
        "SIRGAS 1995 / UTM zone 24S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 24S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31999\"]]");
    p = add_epsg_def_ex (filter, first, last, 32000, "epsg", 32000,
        "SIRGAS 1995 / UTM zone 25S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 25S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"32000\"]]");
    p = add_epsg_def_ex (filter, first, last, 32001, "epsg", 32001,
        "NAD27 / Montana North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=4");
    add_proj4text (p, 1,
        "7 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Montana North\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",48.71666666666667],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",47.85],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",47],PARAMETER[\"central_meridian\",-109.5],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",2000000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"32001\"]]");
    p = add_epsg_def_ex (filter, first, last, 32002, "epsg", 32002,
        "NAD27 / Montana Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=4");
    add_proj4text (p, 1,
        "5.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Montana Central\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",47.88333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",46.45],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 10,
        "_origin\",45.83333333333334],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 11,
        "n\",-109.5],PARAMETER[\"false_easting\",2000000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32002\"]]");
    p = add_epsg_def_ex (filter, first, last, 32003, "epsg", 32003,
        "NAD27 / Montana South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44");
    add_proj4text (p, 1,
        " +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Montana South\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",46.4],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_2\",44.86666666666667],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 10,
        "igin\",44],PARAMETER[\"central_meridian\",-109.5],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",2000000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"32003\"]]");
    p = add_epsg_def_ex (filter, first, last, 32005, "epsg", 32005,
        "NAD27 / Nebraska North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "1.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nebraska North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",41.85],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",42.81666666666667],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 10,
        "origin\",41.33333333333334],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-100],PARAMETER[\"false_easting\",2000000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32005\"]]");
    p = add_epsg_def_ex (filter, first, last, 32006, "epsg", 32006,
        "NAD27 / Nebraska South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nebraska South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",40.28333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",41.71666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",39.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-99.5],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3200");
    add_srs_wkt (p, 15,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32007, "epsg", 32007,
        "NAD27 / Nevada East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nevada East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",34.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 9,
        "15.5833333333333],PARAMETER[\"scale_factor\",0.9999],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"32007\"]]");
    p = add_epsg_def_ex (filter, first, last, 32008, "epsg", 32008,
        "NAD27 / Nevada Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nevada Central\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",34.75],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 9,
        ",-116.6666666666667],PARAMETER[\"scale_factor\",0.9999],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32008\"]]");
    p = add_epsg_def_ex (filter, first, last, 32009, "epsg", 32009,
        "NAD27 / Nevada West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nevada West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",34.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 9,
        "18.5833333333333],PARAMETER[\"scale_factor\",0.9999],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"32009\"]]");
    p = add_epsg_def_ex (filter, first, last, 32010, "epsg", 32010,
        "NAD27 / New Hampshire", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Hampshire\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",42.5],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "71.66666666666667],PARAMETER[\"scale_factor\",0.99996666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32010\"]]");
    p = add_epsg_def_ex (filter, first, last, 32011, "epsg", 32011,
        "NAD27 / New Jersey", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999749999999999 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Jersey\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",38.83333333333334],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-74.66666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999975],PARAMETER[\"false_easting\",2000000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"US survey foot\",0.3048006");
    add_srs_wkt (p, 12,
        "096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32011\"]]");
    p = add_epsg_def_ex (filter, first, last, 32012, "epsg", 32012,
        "NAD27 / New Mexico East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999");
    add_proj4text (p, 1,
        "909091 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Mexico East\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "104.3333333333333],PARAMETER[\"scale_factor\",0.99990909");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32012\"]]");
    p = add_epsg_def_ex (filter, first, last, 32013, "epsg", 32013,
        "NAD27 / New Mexico Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=1524");
    add_proj4text (p, 1,
        "00.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Mexico Central\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",31],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 9,
        "-106.25],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"32013\"]]");
    p = add_epsg_def_ex (filter, first, last, 32014, "epsg", 32014,
        "NAD27 / New Mexico West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999");
    add_proj4text (p, 1,
        "916667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Mexico West\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "107.8333333333333],PARAMETER[\"scale_factor\",0.99991666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32014\"]]");
    p = add_epsg_def_ex (filter, first, last, 32015, "epsg", 32015,
        "NAD27 / New York East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999");
    add_proj4text (p, 1,
        "966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",40],PARAMETER[\"central_meridian\",-74");
    add_srs_wkt (p, 9,
        ".33333333333333],PARAMETER[\"scale_factor\",0.999966667]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32015\"]]");
    p = add_epsg_def_ex (filter, first, last, 32016, "epsg", 32016,
        "NAD27 / New York Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York Central\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",40],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "76.58333333333333],PARAMETER[\"scale_factor\",0.9999375]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32016\"]]");
    p = add_epsg_def_ex (filter, first, last, 32017, "epsg", 32017,
        "NAD27 / New York West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",40],PARAMETER[\"central_meridian\",-78");
    add_srs_wkt (p, 9,
        ".58333333333333],PARAMETER[\"scale_factor\",0.9999375],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32017\"]]");
    p = add_epsg_def_ex (filter, first, last, 32018, "epsg", 32018,
        "NAD27 / New York Long Island (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York Long Island (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 8,
        "Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41.033333");
    add_srs_wkt (p, 9,
        "33333333],PARAMETER[\"standard_parallel_2\",40.666666666");
    add_srs_wkt (p, 10,
        "66666],PARAMETER[\"latitude_of_origin\",40.5],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-74],PARAMETER[\"false_easting\",10");
    add_srs_wkt (p, 12,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"US survey ");
    add_srs_wkt (p, 13,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 14,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "32018\"]]");
    p = add_epsg_def_ex (filter, first, last, 32019, "epsg", 32019,
        "NAD27 / North Carolina", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666");
    add_proj4text (p, 1,
        "666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / North Carolina\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",34.33333333333334],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",36.16666666666666],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",33.75],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-79],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32019\"]]");
    p = add_epsg_def_ex (filter, first, last, 32020, "epsg", 32020,
        "NAD27 / North Dakota North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / North Dakota North\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",47.43333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",48.73333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",47],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-100.5],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32020\"]]");
    p = add_epsg_def_ex (filter, first, last, 32021, "epsg", 32021,
        "NAD27 / North Dakota South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / North Dakota South\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",46.18333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",47.48333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",45.66666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-100.5],PARAMETER[\"false_easting\",20");
    add_srs_wkt (p, 12,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"US survey ");
    add_srs_wkt (p, 13,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 14,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "32021\"]]");
    p = add_epsg_def_ex (filter, first, last, 32022, "epsg", 32022,
        "NAD27 / Ohio North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Ohio North\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",40.43333333333333],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",41.7],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 10,
        "n\",39.66666666666666],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 11,
        "2.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32022\"]]");
    p = add_epsg_def_ex (filter, first, last, 32023, "epsg", 32023,
        "NAD27 / Ohio South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Ohio South\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",38.73333333333333],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",40.03333333333333],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",38],PARAMETER[\"central_meridian\",-82.");
    add_srs_wkt (p, 11,
        "5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 13,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32023\"]]");
    p = add_epsg_def_ex (filter, first, last, 32024, "epsg", 32024,
        "NAD27 / Oklahoma North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oklahoma North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",35.56666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",36.76666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",35],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-98],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32024\"]]");
    p = add_epsg_def_ex (filter, first, last, 32025, "epsg", 32025,
        "NAD27 / Oklahoma South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oklahoma South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",33.93333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",35.23333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",33.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-98],PARAMETER[\"false_easting\",2000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 13,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32025\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32026, "epsg", 32026,
        "NAD27 / Oregon North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oregon North\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",44.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",46],PARAMETER[\"latitude_of_origin");
    add_srs_wkt (p, 10,
        "\",43.66666666666666],PARAMETER[\"central_meridian\",-12");
    add_srs_wkt (p, 11,
        "0.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32026\"]]");
    p = add_epsg_def_ex (filter, first, last, 32027, "epsg", 32027,
        "NAD27 / Oregon South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oregon South\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",42.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",44],PARAMETER[\"latitude_of_origin");
    add_srs_wkt (p, 10,
        "\",41.66666666666666],PARAMETER[\"central_meridian\",-12");
    add_srs_wkt (p, 11,
        "0.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32027\"]]");
    p = add_epsg_def_ex (filter, first, last, 32028, "epsg", 32028,
        "NAD27 / Pennsylvania North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=4");
    add_proj4text (p, 1,
        "0.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Pennsylvania North\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",40.88333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",41.95],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",40.16666666666666],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-77.75],PARAMETER[\"false_easting\",2000000],PARAM");
    add_srs_wkt (p, 12,
        "ETER[\"false_northing\",0],UNIT[\"US survey foot\",0.304");
    add_srs_wkt (p, 13,
        "8006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32028\"]]");
    p = add_epsg_def_ex (filter, first, last, 32029, "epsg", 32029,
        "NAD27 / Pennsylvania South (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39");
    add_proj4text (p, 1,
        ".33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Pennsylvania South (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",39.9333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",40.8],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",39.33333333333334],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-77.75],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 13,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2029\"]]");
    p = add_epsg_def_ex (filter, first, last, 32030, "epsg", 32030,
        "NAD27 / Rhode Island", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9");
    add_proj4text (p, 1,
        "999938 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Rhode Island\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",41.08333333333334],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-71.5],PARAMETER[\"scale_factor\",0.9999938],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32030\"]]");
    p = add_epsg_def_ex (filter, first, last, 32031, "epsg", 32031,
        "NAD27 / South Carolina North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Carolina North\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",33.76666666666667],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",34.96666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",33],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-81],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32031\"]]");
    p = add_epsg_def_ex (filter, first, last, 32033, "epsg", 32033,
        "NAD27 / South Carolina South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Carolina South\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",32.33333333333334],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",33.66666666666666],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",31.83333333333333],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-81],PARAMETER[\"false_easting\",20");
    add_srs_wkt (p, 12,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"US survey ");
    add_srs_wkt (p, 13,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 14,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "32033\"]]");
    p = add_epsg_def_ex (filter, first, last, 32034, "epsg", 32034,
        "NAD27 / South Dakota North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.219");
    add_proj4text (p, 2,
        "2024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Dakota North\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",44.41666666666666],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",45.68333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",43.83333333333334],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-100],PARAMETER[\"false_easting\",2000");
    add_srs_wkt (p, 12,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"US survey fo");
    add_srs_wkt (p, 13,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 14,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32");
    add_srs_wkt (p, 15,
        "034\"]]");
    p = add_epsg_def_ex (filter, first, last, 32035, "epsg", 32035,
        "NAD27 / South Dakota South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42");
    add_proj4text (p, 1,
        ".33333333333334 +lon_0=-100.3333333333333 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Dakota South\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",42.83333333333334],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",44.4],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 10,
        "f_origin\",42.33333333333334],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-100.3333333333333],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 13,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2035\"]]");
    p = add_epsg_def_ex (filter, first, last, 32036, "epsg", 32036,
        "NAD27 / Tennessee (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=3");
    add_proj4text (p, 1,
        "4.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Tennessee (deprecated)\",GEOGCS[\"NAD27");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 2,
        " 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",35.25],PARAMETER[\"sta");
    add_srs_wkt (p, 9,
        "ndard_parallel_2\",36.41666666666666],PARAMETER[\"latitu");
    add_srs_wkt (p, 10,
        "de_of_origin\",34.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 11,
        "ridian\",-86],PARAMETER[\"false_easting\",100000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 13,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32036\"]]");
    p = add_epsg_def_ex (filter, first, last, 32037, "epsg", 32037,
        "NAD27 / Texas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=3");
    add_proj4text (p, 1,
        "4 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,

        "PROJCS[\"NAD27 / Texas North\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",34.65],PARAMETER[\"standard_par");
    add_srs_wkt (p, 9,
        "allel_2\",36.18333333333333],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 10,
        "gin\",34],PARAMETER[\"central_meridian\",-101.5],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_easting\",2000000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32037\"]]");
    p = add_epsg_def_ex (filter, first, last, 32038, "epsg", 32038,
        "NAD27 / Texas North Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas North Central\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",32.13333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",33.96666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",31.66666666666667],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-97.5],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 13,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2038\"]]");
    p = add_epsg_def_ex (filter, first, last, 32039, "epsg", 32039,
        "NAD27 / Texas Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333");
    add_proj4text (p, 1,
        "333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas Central\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",30.11666666666667],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",31.88333333333333],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",29.66666666666667],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-100.3333333333333],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",2000000],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"32039\"]]");
    p = add_epsg_def_ex (filter, first, last, 32040, "epsg", 32040,
        "NAD27 / Texas South Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333");
    add_proj4text (p, 1,
        "333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas South Central\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",28.38333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",30.28333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",27.83333333333333],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-99],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"320");
    add_srs_wkt (p, 15,
        "40\"]]");
    p = add_epsg_def_ex (filter, first, last, 32041, "epsg", 32041,
        "NAD27 / Texas South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333");
    add_proj4text (p, 1,
        "333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas South\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",26.16666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",27.83333333333333],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",25.66666666666667],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-98.5],PARAMETER[\"false_easting\",2000000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32041\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32042, "epsg", 32042,
        "NAD27 / Utah North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Utah North\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",40.71666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",41.78333333333333],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",40.33333333333334],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-111.5],PARAMETER[\"false_easting\",2000000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32042\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32043, "epsg", 32043,
        "NAD27 / Utah Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=3");
    add_proj4text (p, 1,
        "8.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Utah Central\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",39.01666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",40.65],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 10,
        "gin\",38.33333333333334],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-111.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32043\"]]");
    p = add_epsg_def_ex (filter, first, last, 32044, "epsg", 32044,
        "NAD27 / Utah South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=3");
    add_proj4text (p, 1,
        "6.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Utah South\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",37.21666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",38.35],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",36.66666666666666],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "111.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32044\"]]");
    p = add_epsg_def_ex (filter, first, last, 32045, "epsg", 32045,
        "NAD27 / Vermont", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0");
    add_proj4text (p, 1,
        "=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Vermont\",GEOGCS[\"NAD27\",DATUM[\"Nort");
    add_srs_wkt (p, 1,
        "h_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378206");
    add_srs_wkt (p, 2,
        ".4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 6,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],P");
    add_srs_wkt (p, 7,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 8,
        "of_origin\",42.5],PARAMETER[\"central_meridian\",-72.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.999964286],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_easting\",500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 11,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"32045\"]]");
    p = add_epsg_def_ex (filter, first, last, 32046, "epsg", 32046,
        "NAD27 / Virginia North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Virginia North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",38.03333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",39.2],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",37.66666666666666],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-78.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32046\"]]");
    p = add_epsg_def_ex (filter, first, last, 32047, "epsg", 32047,
        "NAD27 / Virginia South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Virginia South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",36.76666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",37.96666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",36.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-78.5],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3204");
    add_srs_wkt (p, 15,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32048, "epsg", 32048,
        "NAD27 / Washington North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47");
    add_proj4text (p, 1,
        " +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Washington North\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",47.5],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",48.73333333333333],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 10,
        "origin\",47],PARAMETER[\"central_meridian\",-120.8333333");
    add_srs_wkt (p, 11,
        "333333],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32048\"]]");
    p = add_epsg_def_ex (filter, first, last, 32049, "epsg", 32049,
        "NAD27 / Washington South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Washington South\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",45.83333333333334],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",47.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",45.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-120.5],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"320");
    add_srs_wkt (p, 15,
        "49\"]]");
    p = add_epsg_def_ex (filter, first, last, 32050, "epsg", 32050,
        "NAD27 / West Virginia North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / West Virginia North\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",39],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",40.25],PARAMETER[\"latitude_of_origin\",38.");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"central_meridian\",-79.5],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",2000000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"32050\"]]");
    p = add_epsg_def_ex (filter, first, last, 32051, "epsg", 32051,
        "NAD27 / West Virginia South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / West Virginia South\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",37.48333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",38.88333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",37],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-81],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32051\"]]");
    p = add_epsg_def_ex (filter, first, last, 32052, "epsg", 32052,
        "NAD27 / Wisconsin North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666");
    add_proj4text (p, 1,
        "667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin North\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",45.56666666666667],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",46.76666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",45.16666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-90],PARAMETER[\"false_easting\",2000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 13,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32052\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32053, "epsg", 32053,
        "NAD27 / Wisconsin Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin Central\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",44.25],PARAMETER[\"standa");
    add_srs_wkt (p, 9,
        "rd_parallel_2\",45.5],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 10,
        "3.83333333333334],PARAMETER[\"central_meridian\",-90],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",2000000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"32053\"]]");
    p = add_epsg_def_ex (filter, first, last, 32054, "epsg", 32054,
        "NAD27 / Wisconsin South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin South\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",42.73333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",44.06666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",42],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-90],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32054\"]]");
    p = add_epsg_def_ex (filter, first, last, 32055, "epsg", 32055,
        "NAD27 / Wyoming East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",40.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-105.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999941177],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 12,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32055\"]]");
    p = add_epsg_def_ex (filter, first, last, 32056, "epsg", 32056,
        "NAD27 / Wyoming East Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333");
    add_proj4text (p, 1,
        "333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming East Central\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",40.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-107.3333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.999941177],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 12,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3205");
    add_srs_wkt (p, 14,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32057, "epsg", 32057,
        "NAD27 / Wyoming West Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0");
    add_proj4text (p, 1,
        ".999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +u");
    add_proj4text (p, 2,
        "nits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming West Central\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",40.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-108.75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".999941177],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 12,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32057\"]]");
    p = add_epsg_def_ex (filter, first, last, 32058, "epsg", 32058,
        "NAD27 / Wyoming West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333");
    add_proj4text (p, 1,
        "333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",40.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-110.0833333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999941177],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 12,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32058\"]]");
    p = add_epsg_def_ex (filter, first, last, 32061, "epsg", 32061,
        "NAD27 / Guatemala Norte (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666");
    add_proj4text (p, 1,
        "667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=50000");
    add_proj4text (p, 2,
        "0 +y_0=292209.579 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Guatemala Norte (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",16.81666666666667]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",-90.33333333333333],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",0.99992226],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",292209.579],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32061\"]]");
    p = add_epsg_def_ex (filter, first, last, 32062, "epsg", 32062,
        "NAD27 / Guatemala Sur (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333");
    add_proj4text (p, 1,
        "333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +datum=N");
    add_proj4text (p, 2,
        "AD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Guatemala Sur (deprecated)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",14.9],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-90.33333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99989906],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",325992.681],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32062\"]]");
    p = add_epsg_def_ex (filter, first, last, 32064, "epsg", 32064,
        "NAD27 / BLM 14N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 14N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-99");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32064\"]]");
    p = add_epsg_def_ex (filter, first, last, 32065, "epsg", 32065,
        "NAD27 / BLM 15N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 15N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-93");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32065\"]]");
    p = add_epsg_def_ex (filter, first, last, 32066, "epsg", 32066,
        "NAD27 / BLM 16N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 16N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-87");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32066\"]]");
    p = add_epsg_def_ex (filter, first, last, 32067, "epsg", 32067,
        "NAD27 / BLM 17N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 17N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-81");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32067\"]]");
    p = add_epsg_def_ex (filter, first, last, 32074, "epsg", 32074,
        "NAD27 / BLM 14N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 14N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32074\"]]");
    p = add_epsg_def_ex (filter, first, last, 32075, "epsg", 32075,
        "NAD27 / BLM 15N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 15N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32075\"]]");
    p = add_epsg_def_ex (filter, first, last, 32076, "epsg", 32076,
        "NAD27 / BLM 16N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 16N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-87],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32076\"]]");
    p = add_epsg_def_ex (filter, first, last, 32077, "epsg", 32077,
        "NAD27 / BLM 17N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 17N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982139006,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32077\"]]");
    p = add_epsg_def_ex (filter, first, last, 32081, "epsg", 32081,
        "NAD27 / MTM zone 1", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 1\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-53],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",304800],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32081\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32082, "epsg", 32082,
        "NAD27 / MTM zone 2", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 2\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-56],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",304800],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32082\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32083, "epsg", 32083,
        "NAD27 / MTM zone 3", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 3\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-58.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32083");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32084, "epsg", 32084,
        "NAD27 / MTM zone 4", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 4\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-61.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32084");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32085, "epsg", 32085,
        "NAD27 / MTM zone 5", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 5\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-64.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32085");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32086, "epsg", 32086,
        "NAD27 / MTM zone 6", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 6\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-67.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32086");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32098, "epsg", 32098,
        "NAD27 / Quebec Lambert", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Quebec Lambert\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",60],PARAMETER[\"standard_par");
    add_srs_wkt (p, 9,
        "allel_2\",46],PARAMETER[\"latitude_of_origin\",44],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"central_meridian\",-68.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32098\"]]");
    p = add_epsg_def_ex (filter, first, last, 32099, "epsg", 32099,
        "NAD27 / Louisiana Offshore", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.66666666666667 +lon_0=-91.33333333333333 +");
    add_proj4text (p, 2,
        "x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Louisiana Offshore\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982139006,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",27.83333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",26.16666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",25.66666666666667],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-91.33333333333333],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",2000000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 13,
        "\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"32099\"]]");
    p = add_epsg_def_ex (filter, first, last, 32100, "epsg", 32100,
        "NAD83 / Montana", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5");
    add_proj4text (p, 1,
        " +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 ");
    add_proj4text (p, 2,
        "+units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Montana\",GEOGCS[\"NAD83\",DATUM[\"Nort");
    add_srs_wkt (p, 1,
        "h_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",49],PARAMETER[\"standa");
    add_srs_wkt (p, 9,
        "rd_parallel_2\",45],PARAMETER[\"latitude_of_origin\",44.");
    add_srs_wkt (p, 10,
        "25],PARAMETER[\"central_meridian\",-109.5],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",600000],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32100\"]]");
    p = add_epsg_def_ex (filter, first, last, 32104, "epsg", 32104,
        "NAD83 / Nebraska", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nebraska\",GEOGCS[\"NAD83\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"stan");
    add_srs_wkt (p, 9,
        "dard_parallel_2\",40],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 10,
        "9.83333333333334],PARAMETER[\"central_meridian\",-100],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"32104\"]]");
    p = add_epsg_def_ex (filter, first, last, 32107, "epsg", 32107,
        "NAD83 / Nevada East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nevada East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",34.75],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-115.5833333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9999],PARAMETER[\"false_easting\",200000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",8000000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32107\"]]");
    p = add_epsg_def_ex (filter, first, last, 32108, "epsg", 32108,
        "NAD83 / Nevada Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nevada Central\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",34.75],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",-116.6666666666667],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9999],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",6000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"32108\"]]");
    p = add_epsg_def_ex (filter, first, last, 32109, "epsg", 32109,
        "NAD83 / Nevada West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nevada West\",GEOGCS[\"NAD83\",DATUM[\"");






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",34.75],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-118.5833333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9999],PARAMETER[\"false_easting\",800000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",4000000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32109\"]]");
    p = add_epsg_def_ex (filter, first, last, 32110, "epsg", 32110,
        "NAD83 / New Hampshire", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Hampshire\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",42.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-71.66666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,

        ",0.999966667],PARAMETER[\"false_easting\",300000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,

        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,

        "ORITY[\"EPSG\",\"32110\"]]");
    p = add_epsg_def_ex (filter, first, last, 32111, "epsg", 32111,

        "NAD83 / New Jersey", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Jersey\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",38.83333333333334],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-74.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,

        ",0.9999],PARAMETER[\"false_easting\",150000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,

        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"32111\"]]");
    p = add_epsg_def_ex (filter, first, last, 32112, "epsg", 32112,

        "NAD83 / New Mexico East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999");
    add_proj4text (p, 1,
        "909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Mexico East\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-104.3333333333333],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999909091],PARAMETER[\"false_easting\",165000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32112\"]]");
    p = add_epsg_def_ex (filter, first, last, 32113, "epsg", 32113,
        "NAD83 / New Mexico Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=5000");
    add_proj4text (p, 1,
        "00 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Mexico Central\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-106.25],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "99],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,

        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,

        "SG\",\"32113\"]]");
    p = add_epsg_def_ex (filter, first, last, 32114, "epsg", 32114,

        "NAD83 / New Mexico West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999");
    add_proj4text (p, 1,
        "916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Mexico West\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-107.8333333333333],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,

        "r\",0.999916667],PARAMETER[\"false_easting\",830000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,

        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,

        "UTHORITY[\"EPSG\",\"32114\"]]");
    p = add_epsg_def_ex (filter, first, last, 32115, "epsg", 32115,

        "NAD83 / New York East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York East\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",38.83333333333334],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-74.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",150000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"32115\"]]");
    p = add_epsg_def_ex (filter, first, last, 32116, "epsg", 32116,
        "NAD83 / New York Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",40],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-76.58333333333333],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.9999375],PARAMETER[\"false_easting\",250000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"32116\"]]");
    p = add_epsg_def_ex (filter, first, last, 32117, "epsg", 32117,
        "NAD83 / New York West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York West\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",40],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-78.58333333333333],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999375],PARAMETER[\"false_easting\",350000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32117\"]]");
    p = add_epsg_def_ex (filter, first, last, 32118, "epsg", 32118,
        "NAD83 / New York Long Island", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York Long Island\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41.03333");
    add_srs_wkt (p, 9,
        "333333333],PARAMETER[\"standard_parallel_2\",40.66666666");
    add_srs_wkt (p, 10,
        "666666],PARAMETER[\"latitude_of_origin\",40.166666666666");
    add_srs_wkt (p, 11,
        "66],PARAMETER[\"central_meridian\",-74],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",300000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 13,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32118\"]]");
    p = add_epsg_def_ex (filter, first, last, 32119, "epsg", 32119,
        "NAD83 / North Carolina", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / North Carolina\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",36.16666666666");
    add_srs_wkt (p, 9,
        "666],PARAMETER[\"standard_parallel_2\",34.33333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",33.75],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-79],PARAMETER[\"false_easting\",609601");
    add_srs_wkt (p, 12,
        ".22],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"32119\"]]");
    p = add_epsg_def_ex (filter, first, last, 32120, "epsg", 32120,
        "NAD83 / North Dakota North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333");
    add_proj4text (p, 1,
        "333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GR");
    add_proj4text (p, 2,
        "S80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / North Dakota North\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",48.7333333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",47.4333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",47],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-100.5],PARAMETER[\"false_easting\",60");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"32120\"]]");
    p = add_epsg_def_ex (filter, first, last, 32121, "epsg", 32121,
        "NAD83 / North Dakota South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333");
    add_proj4text (p, 1,
        "333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / North Dakota South\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",47.4833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",46.1833333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",45.66666666666666");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-100.5],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",600000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32121\"]]");
    p = add_epsg_def_ex (filter, first, last, 32122, "epsg", 32122,
        "NAD83 / Ohio North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Ohio North\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",41.7],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",40.43333333333333],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",39.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-82.5],PARAMETER[\"false_easting\",600000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"32122\"]]");
}

#endif /* full EPSG initialization enabled/disabled */
































































































































































Changes to src/srsinit/epsg_inlined_44.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

63
64
65

66
67

68


69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86


87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105


106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

125
126

127
128

129


130
131
132

133
134

135
136

137
138
139

140
141

142


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160




161
162
163

164
165
166
167
168
169
170
171
172
173

174
175
176

177
178

179


180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

199
200

201
202

203


204
205
206

207
208

209
210

211
212
213

214
215

216


217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234




235
236
237

238
239
240
241





































242
243

244
245



246
247

248
249
250
251
252

253


254
255
256
257
258

259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274

275
276

277
278

279


280
281
282
283
284

285
286

287
288
289
290
291

292
293
294
295
296
297
298
299
300
301
302
303
304
...
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689

690
691
692
693
694
695
696
697
698
699
700
...
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
....
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470

1471
1472

1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
....
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
....
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184



































2185




2186
2187







































2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218

2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
....
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302









































2303
2304
2305
2306
2307
2308
2309
2310
2311


2312
2313

2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330


















































































2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343

2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
....
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633

2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682

2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712

2713
2714
2715
2716
2717

2718
2719

2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
....
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936





















































































































































































































































































































































































































































































































































































































































































































































































































































2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
































































































































































































































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_44 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 26919, "epsg", 26919,
        "NAD83 / UTM zone 19N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");

    add_proj4text (p, 1,


        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 19N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,


        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-69],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26919\"]]");
    p = add_epsg_def_ex (filter, first, last, 26920, "epsg", 26920,
        "NAD83 / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,


        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 20N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");

    add_srs_wkt (p, 9,
        "idian\",-63],PARAMETER[\"scale_factor\",0.9996],PARAMETE");

    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");

    add_srs_wkt (p, 11,


        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26920\"]]");

    p = add_epsg_def_ex (filter, first, last, 26921, "epsg", 26921,
        "NAD83 / UTM zone 21N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");

    add_proj4text (p, 1,


        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 21N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,




        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-57],PARAMETER[\"scale_factor\",0.9996],PARAMETE");

    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"26921\"]]");
    p = add_epsg_def_ex (filter, first, last, 26922, "epsg", 26922,
        "NAD83 / UTM zone 22N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");

    add_proj4text (p, 1,


        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 22N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");

    add_srs_wkt (p, 9,
        "idian\",-51],PARAMETER[\"scale_factor\",0.9996],PARAMETE");

    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");

    add_srs_wkt (p, 11,


        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26922\"]]");

    p = add_epsg_def_ex (filter, first, last, 26923, "epsg", 26923,
        "NAD83 / UTM zone 23N", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");

    add_proj4text (p, 0,
        "+proj=utm +zone=23 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");

    add_proj4text (p, 1,


        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / UTM zone 23N\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,




        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-45],PARAMETER[\"scale_factor\",0.9996],PARAMETE");

    add_srs_wkt (p, 10,
        "R[\"false_easting\",500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");





































    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");

    add_srs_wkt (p, 13,
        "PSG\",\"26923\"]]");



    p = add_epsg_def_ex (filter, first, last, 26929, "epsg", 26929,
        "NAD83 / Alabama East", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.9");

    add_proj4text (p, 1,


        "9996 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alabama East\",GEOGCS[\"NAD83\",DATUM[\"");

    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30.5],PARAMETER[\"central_");

    add_srs_wkt (p, 9,
        "meridian\",-85.83333333333333],PARAMETER[\"scale_factor\"");

    add_srs_wkt (p, 10,
        ",0.99996],PARAMETER[\"false_easting\",200000],PARAMETER[");

    add_srs_wkt (p, 11,


        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"26929\"]]");

    p = add_epsg_def_ex (filter, first, last, 26930, "epsg", 26930,
        "NAD83 / Alabama West", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.999933333 +x_0=6");

    add_proj4text (p, 1,
        "00000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alabama West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-87.5],PARAMETER[\"scale_factor\",0.999933333],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",600000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 12,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"26930\"]]");
    p = add_epsg_def_ex (filter, first, last, 26931, "epsg", 26931,
        "NAD83 / Alaska zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Hotine_Oblique_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=32");
    add_proj4text (p, 1,
        "3.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +no");
    add_proj4text (p, 2,
        "_uoff +gamma=323.1301023611111 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 3,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 1\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Hotine_Oblique_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_center\",57],PARAMETER[\"longit");
    add_srs_wkt (p, 9,
        "ude_of_center\",-133.6666666666667],PARAMETER[\"azimuth\"");
    add_srs_wkt (p, 10,
        ",323.1301023611111],PARAMETER[\"rectified_grid_angle\",3");
    add_srs_wkt (p, 11,
        "23.1301023611111],PARAMETER[\"scale_factor\",0.9999],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_easting\",5000000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 13,
        "hing\",-5000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"26931\"]]");
    p = add_epsg_def_ex (filter, first, last, 26932, "epsg", 26932,
        "NAD83 / Alaska zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 2\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-142],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "32\"]]");
    p = add_epsg_def_ex (filter, first, last, 26933, "epsg", 26933,
        "NAD83 / Alaska zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 3\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-146],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "33\"]]");
    p = add_epsg_def_ex (filter, first, last, 26934, "epsg", 26934,
        "NAD83 / Alaska zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 4\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-150],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "34\"]]");
    p = add_epsg_def_ex (filter, first, last, 26935, "epsg", 26935,
        "NAD83 / Alaska zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 5\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-154],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "35\"]]");
    p = add_epsg_def_ex (filter, first, last, 26936, "epsg", 26936,
        "NAD83 / Alaska zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 6\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-158],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "36\"]]");
    p = add_epsg_def_ex (filter, first, last, 26937, "epsg", 26937,
        "NAD83 / Alaska zone 7", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 7\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-162],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "37\"]]");
    p = add_epsg_def_ex (filter, first, last, 26938, "epsg", 26938,
        "NAD83 / Alaska zone 8", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 8\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-166],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "38\"]]");
    p = add_epsg_def_ex (filter, first, last, 26939, "epsg", 26939,
        "NAD83 / Alaska zone 9", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 9\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",54],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-170],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"269");
    add_srs_wkt (p, 13,
        "39\"]]");
    p = add_epsg_def_ex (filter, first, last, 26940, "epsg", 26940,
        "NAD83 / Alaska zone 10", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=53.83333333333334 +lat_2=51.83333333333");
    add_proj4text (p, 1,
        "334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS");

    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Alaska zone 10\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",53.83333333333");
    add_srs_wkt (p, 9,
        "334],PARAMETER[\"standard_parallel_2\",51.83333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",51],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-176],PARAMETER[\"false_easting\",1000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"26940\"]]");
    p = add_epsg_def_ex (filter, first, last, 26941, "epsg", 26941,
        "NAD83 / California zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.66666666666666 +lat_2=40 +lat_0=39.3");
    add_proj4text (p, 1,
        "3333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 1\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",41.66666666");
    add_srs_wkt (p, 9,
        "666666],PARAMETER[\"standard_parallel_2\",40],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",39.33333333333334],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-122],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",500000],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26941\"]]");
    p = add_epsg_def_ex (filter, first, last, 26942, "epsg", 26942,
        "NAD83 / California zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.83333333333334 +lat_2=38.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y");
    add_proj4text (p, 2,
        "_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 2\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",39.83333333");
    add_srs_wkt (p, 9,
        "333334],PARAMETER[\"standard_parallel_2\",38.33333333333");
    add_srs_wkt (p, 10,
        "334],PARAMETER[\"latitude_of_origin\",37.66666666666666]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"central_meridian\",-122],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",2000000],PARAMETER[\"false_northing\",500000],");
    add_srs_wkt (p, 13,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26942\"]]");
    p = add_epsg_def_ex (filter, first, last, 26943, "epsg", 26943,
        "NAD83 / California zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 3\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",38.43333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"standard_parallel_2\",37.06666666666");
    add_srs_wkt (p, 10,
        "667],PARAMETER[\"latitude_of_origin\",36.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-120.5],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 12,
        "000000],PARAMETER[\"false_northing\",500000],UNIT[\"metr");
    add_srs_wkt (p, 13,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26943\"]]");
    p = add_epsg_def_ex (filter, first, last, 26944, "epsg", 26944,
        "NAD83 / California zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.25 +lat_2=36 +lat_0=35.3333333333333");
    add_proj4text (p, 1,
        "4 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +tow");
    add_proj4text (p, 2,
        "gs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 4\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",37.25],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",36],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 10,
        "f_origin\",35.33333333333334],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-119],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",500000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"26944\"]]");
    p = add_epsg_def_ex (filter, first, last, 26945, "epsg", 26945,
        "NAD83 / California zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.46666666666667 +lat_2=34.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 5\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",35.46666666");
    add_srs_wkt (p, 9,
        "666667],PARAMETER[\"standard_parallel_2\",34.03333333333");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"latitude_of_origin\",33.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-118],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",500000],UNIT[\"metre\"");
    add_srs_wkt (p, 13,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26945\"]]");
    p = add_epsg_def_ex (filter, first, last, 26946, "epsg", 26946,
        "NAD83 / California zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.88333333333333 +lat_2=32.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000");
    add_proj4text (p, 2,
        " +y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=");
    add_proj4text (p, 3,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / California zone 6\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",33.88333333");
    add_srs_wkt (p, 9,
        "333333],PARAMETER[\"standard_parallel_2\",32.78333333333");
    add_srs_wkt (p, 10,
        "333],PARAMETER[\"latitude_of_origin\",32.16666666666666]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"central_meridian\",-116.25],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",2000000],PARAMETER[\"false_northing\",50000");
    add_srs_wkt (p, 13,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26946\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 26948, "epsg", 26948,
        "NAD83 / Arizona East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arizona East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",31],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-110.1666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999],PARAMETER[\"false_easting\",213360],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26948\"]]");
    p = add_epsg_def_ex (filter, first, last, 26949, "epsg", 26949,
        "NAD83 / Arizona Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arizona Central\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-111.9166666666667],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.9999],PARAMETER[\"false_easting\",213360],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"26949\"]]");
    p = add_epsg_def_ex (filter, first, last, 26950, "epsg", 26950,
        "NAD83 / Arizona West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.999933333 +x_0");
    add_proj4text (p, 1,
        "=213360 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arizona West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",31],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-113.75],PARAMETER[\"scale_factor\",0.999933333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",213360],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"26950\"]]");
    p = add_epsg_def_ex (filter, first, last, 26951, "epsg", 26951,
        "NAD83 / Arkansas North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.23333333333333 +lat_2=34.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arkansas North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",36.23333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",34.93333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",34.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-92],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",400000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 13,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26951\"]]");
    p = add_epsg_def_ex (filter, first, last, 26952, "epsg", 26952,
        "NAD83 / Arkansas South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.76666666666667 +lat_2=33.3 +lat_0=32");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Arkansas South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",34.76666666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"standard_parallel_2\",33.3],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",32.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-92],PARAMETER[\"false_easting\",400000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",400000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26952\"]]");
    p = add_epsg_def_ex (filter, first, last, 26953, "epsg", 26953,
        "NAD83 / Colorado North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.78333333333333 +lat_2=39.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8");
    add_proj4text (p, 2,
        "289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 3,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Colorado North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",40.78333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",39.71666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",39.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-105.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",914401.8289],PARAMETER[\"false_northing\",30480");
    add_srs_wkt (p, 13,
        "0.6096],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 15,
        "6953\"]]");
    p = add_epsg_def_ex (filter, first, last, 26954, "epsg", 26954,
        "NAD83 / Colorado Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.75 +lat_2=38.45 +lat_0=37.8333333333");
    add_proj4text (p, 1,
        "3334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +el");
    add_proj4text (p, 2,
        "lps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Colorado Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",39.75],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",38.45],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",37.83333333333334],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-105.5],PARAMETER[\"false_easting\",914401.8289],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",304800.6096],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26954\"]]");
    p = add_epsg_def_ex (filter, first, last, 26955, "epsg", 26955,
        "NAD83 / Colorado South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.43333333333333 +lat_2=37.23333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8");
    add_proj4text (p, 2,
        "289 +y_0=304800.6096 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 3,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Colorado South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",38.43333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",37.23333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",36.66666666666666],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-105.5],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",914401.8289],PARAMETER[\"false_northing\",30480");
    add_srs_wkt (p, 13,
        "0.6096],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"2");
    add_srs_wkt (p, 15,
        "6955\"]]");
    p = add_epsg_def_ex (filter, first, last, 26956, "epsg", 26956,
        "NAD83 / Connecticut", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.86666666666667 +lat_2=41.2 +lat_0=40");
    add_proj4text (p, 1,
        ".83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=1524");
    add_proj4text (p, 2,
        "00.3048 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Connecticut\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",41.86666666666667");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",41.2],PARAMETER[\"la");
    add_srs_wkt (p, 10,
        "titude_of_origin\",40.83333333333334],PARAMETER[\"centra");
    add_srs_wkt (p, 11,
        "l_meridian\",-72.75],PARAMETER[\"false_easting\",304800.");
    add_srs_wkt (p, 12,
        "6096],PARAMETER[\"false_northing\",152400.3048],UNIT[\"m");
    add_srs_wkt (p, 13,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26956\"]]");
    p = add_epsg_def_ex (filter, first, last, 26957, "epsg", 26957,
        "NAD83 / Delaware", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999");
    add_proj4text (p, 1,
        "995 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Delaware\",GEOGCS[\"NAD83\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",38],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-75.41666666666667],PARAMETER[\"scale_factor\",0.9");
    add_srs_wkt (p, 10,
        "99995],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"26957\"]]");
    p = add_epsg_def_ex (filter, first, last, 26958, "epsg", 26958,
        "NAD83 / Florida East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Florida East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",24.33333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-81],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999941177],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"26958\"]]");
    p = add_epsg_def_ex (filter, first, last, 26959, "epsg", 26959,
        "NAD83 / Florida West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.999");
    add_proj4text (p, 1,
        "941177 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Florida West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",24.33333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-82],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999941177],PARAMETER[\"false_easting\",200000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"26959\"]]");
    p = add_epsg_def_ex (filter, first, last, 26960, "epsg", 26960,
        "NAD83 / Florida North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.75 +lat_2=29.58333333333333 +lat_0=2");

    add_proj4text (p, 1,
        "9 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=");

    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Florida North\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",30.75],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",29.58333333333333],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",29],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "84.5],PARAMETER[\"false_easting\",600000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"26960\"]]");
    p = add_epsg_def_ex (filter, first, last, 26961, "epsg", 26961,
        "NAD83 / Hawaii zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.");
    add_proj4text (p, 1,
        "999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0");
    add_proj4text (p, 2,
        ",0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 1\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",18.83333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-155.5],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999966667],PARAMETER[\"false_easting\",500000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26961\"]]");
    p = add_epsg_def_ex (filter, first, last, 26962, "epsg", 26962,
        "NAD83 / Hawaii zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=500000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 2\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",20.33333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-156.6666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.999966667],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26962\"]]");
    p = add_epsg_def_ex (filter, first, last, 26963, "epsg", 26963,
        "NAD83 / Hawaii zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99");
    add_proj4text (p, 1,
        "999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 3\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",21.16666666666667],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-158],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99999],PARAMETER[\"false_easting\",500000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"26963\"]]");
    p = add_epsg_def_ex (filter, first, last, 26964, "epsg", 26964,
        "NAD83 / Hawaii zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.");
    add_proj4text (p, 1,
        "99999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0");
    add_proj4text (p, 2,
        ",0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 4\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",21.83333333333333],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-159.5],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.99999],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"26964\"]]");
    p = add_epsg_def_ex (filter, first, last, 26965, "epsg", 26965,
        "NAD83 / Hawaii zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 2,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Hawaii zone 5\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",21.66666666666667],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-160.1666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"26965\"]]");
    p = add_epsg_def_ex (filter, first, last, 26966, "epsg", 26966,
        "NAD83 / Georgia East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Georgia East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-82.16666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999],PARAMETER[\"false_easting\",200000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26966\"]]");
    p = add_epsg_def_ex (filter, first, last, 26967, "epsg", 26967,
        "NAD83 / Georgia West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.999");
    add_proj4text (p, 1,
        "9 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Georgia West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",30],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-84.16666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999],PARAMETER[\"false_easting\",700000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26967\"]]");
    p = add_epsg_def_ex (filter, first, last, 26968, "epsg", 26968,
        "NAD83 / Idaho East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999473679999999 +x_0=200000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Idaho East\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",41.66666666666666],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-112.1666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.999947368],PARAMETER[\"false_easting\",2");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26968\"]]");
    p = add_epsg_def_ex (filter, first, last, 26969, "epsg", 26969,
        "NAD83 / Idaho Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.99");
    add_proj4text (p, 1,
        "99473679999999 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Idaho Central\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",41.66666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-114],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999947368],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26969\"]]");
    p = add_epsg_def_ex (filter, first, last, 26970, "epsg", 26970,
        "NAD83 / Idaho West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0");
    add_proj4text (p, 1,
        ".999933333 +x_0=800000 +y_0=0 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Idaho West\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",41.66666666666666],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-115.75],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.999933333],PARAMETER[\"false_easting\",800000],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26970\"]]");
    p = add_epsg_def_ex (filter, first, last, 26971, "epsg", 26971,
        "NAD83 / Illinois East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333");
    add_proj4text (p, 1,
        "333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Illinois East\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36.66666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-88.33333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.999975],PARAMETER[\"false_easting\",300");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"26971\"]]");
    p = add_epsg_def_ex (filter, first, last, 26972, "epsg", 26972,
        "NAD83 / Illinois West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=700000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Illinois West\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36.66666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-90.16666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.999941177],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "700000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"26972\"]]");
    p = add_epsg_def_ex (filter, first, last, 26973, "epsg", 26973,
        "NAD83 / Indiana East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=100000 +y_0=250000 +ellps=GRS80 +towgs84=0");
    add_proj4text (p, 2,
        ",0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Indiana East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",37.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-85.66666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999966667],PARAMETER[\"false_easting\",100000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",250000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26973\"]]");
    p = add_epsg_def_ex (filter, first, last, 26974, "epsg", 26974,
        "NAD83 / Indiana West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=900000 +y_0=250000 +ellps=GRS80 +towgs84=0");
    add_proj4text (p, 2,
        ",0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Indiana West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",37.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-87.08333333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999966667],PARAMETER[\"false_easting\",900000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",250000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26974\"]]");
    p = add_epsg_def_ex (filter, first, last, 26975, "epsg", 26975,
        "NAD83 / Iowa North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.26666666666667 +lat_2=42.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Iowa North\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",43.26666666666667]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",42.06666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",41.5],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-93.5],PARAMETER[\"false_easting\",1500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",1000000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26975\"]]");
    p = add_epsg_def_ex (filter, first, last, 26976, "epsg", 26976,
        "NAD83 / Iowa South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.61666666666");
    add_proj4text (p, 1,
        "667 +lat_0=40 +lon_0=-93.5 +x_0=500000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Iowa South\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",41.78333333333333]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",40.61666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",40],PARAMETER[\"central_m");
    add_srs_wkt (p, 11,
        "eridian\",-93.5],PARAMETER[\"false_easting\",500000],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"26976\"]]");
    p = add_epsg_def_ex (filter, first, last, 26977, "epsg", 26977,
        "NAD83 / Kansas North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.78333333333333 +lat_2=38.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kansas North\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",39.78333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",38.71666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",38.33333333333334],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-98],PARAMETER[\"false_easting");
    add_srs_wkt (p, 12,
        "\",400000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 13,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26977\"]]");
    p = add_epsg_def_ex (filter, first, last, 26978, "epsg", 26978,
        "NAD83 / Kansas South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.56666666666667 +lat_2=37.26666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y");
    add_proj4text (p, 2,
        "_0=400000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");



































    add_proj4text (p, 3,




        "no_defs");
    add_srs_wkt (p, 0,







































        "PROJCS[\"NAD83 / Kansas South\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",38.56666666666667");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",37.26666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",36.66666666666666],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-98.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",400000],PARAMETER[\"false_northing\",400000],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26978\"]]");
    p = add_epsg_def_ex (filter, first, last, 26979, "epsg", 26979,
        "NAD83 / Kentucky North (deprecated)", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.96666666666667 +lat_2=37.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kentucky North (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"G");
    add_srs_wkt (p, 2,
        "RS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"701");
    add_srs_wkt (p, 3,
        "9\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",3");
    add_srs_wkt (p, 9,
        "7.96666666666667],PARAMETER[\"standard_parallel_2\",37.9");
    add_srs_wkt (p, 10,
        "6666666666667],PARAMETER[\"latitude_of_origin\",37.5],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-84.25],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26979\"]]");
    p = add_epsg_def_ex (filter, first, last, 26980, "epsg", 26980,
        "NAD83 / Kentucky South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.93333333333333 +lat_2=36.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +");
    add_proj4text (p, 2,
        "y_0=500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Kentucky South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",37.93333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",36.73333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",36.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-85.75],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",500000],PARAMETER[\"false_northing\",500000],UN");
    add_srs_wkt (p, 13,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 14,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26980\"]]");
    p = add_epsg_def_ex (filter, first, last, 26981, "epsg", 26981,
        "NAD83 / Louisiana North", 0, 0,









































        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.66666666666666 +lat_2=31.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Louisiana North\",GEOGCS[\"NAD83\",DATU");

    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",32.6666666666");
    add_srs_wkt (p, 9,


















































































        "6666],PARAMETER[\"standard_parallel_2\",31.1666666666666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"latitude_of_origin\",30.5],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-92.5],PARAMETER[\"false_easting\",1000");
    add_srs_wkt (p, 12,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26981\"]]");
    p = add_epsg_def_ex (filter, first, last, 26982, "epsg", 26982,
        "NAD83 / Louisiana South", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.7 +lat_2=29.3 +lat_0=28.5 +lon_0=-91");
    add_proj4text (p, 1,
        ".33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +towgs8");
    add_proj4text (p, 2,
        "4=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Louisiana South\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",30.7],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"standard_parallel_2\",29.3],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 10,
        "_origin\",28.5],PARAMETER[\"central_meridian\",-91.33333");
    add_srs_wkt (p, 11,
        "333333333],PARAMETER[\"false_easting\",1000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"26982\"]]");
    p = add_epsg_def_ex (filter, first, last, 26983, "epsg", 26983,
        "NAD83 / Maine East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine East\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",43.66666666666666],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-68.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"26983\"]]");
    p = add_epsg_def_ex (filter, first, last, 26984, "epsg", 26984,
        "NAD83 / Maine West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666");
    add_proj4text (p, 1,
        "666667 +k=0.999966667 +x_0=900000 +y_0=0 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maine West\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",42.83333333333334],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-70.16666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",0.999966667],PARAMETER[\"false_easting\",9");
    add_srs_wkt (p, 11,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"26984\"]]");
    p = add_epsg_def_ex (filter, first, last, 26985, "epsg", 26985,
        "NAD83 / Maryland", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.45 +lat_2=38.3 +lat_0=37.66666666666");
    add_proj4text (p, 1,
        "666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Maryland\",GEOGCS[\"NAD83\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"standard_parallel_1\",39.45],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",38.3],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 10,
        "n\",37.66666666666666],PARAMETER[\"central_meridian\",-7");
    add_srs_wkt (p, 11,
        "7],PARAMETER[\"false_easting\",400000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 14,
        "G\",\"26985\"]]");
    p = add_epsg_def_ex (filter, first, last, 26986, "epsg", 26986,
        "NAD83 / Massachusetts Mainland", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellp");
    add_proj4text (p, 2,
        "s=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Massachusetts Mainland\",GEOGCS[\"NAD83");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 19");
    add_srs_wkt (p, 2,
        "80\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 8,
        "l_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",42.6833");
    add_srs_wkt (p, 9,
        "3333333333],PARAMETER[\"standard_parallel_2\",41.7166666");
    add_srs_wkt (p, 10,
        "6666667],PARAMETER[\"latitude_of_origin\",41],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-71.5],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 12,
        "200000],PARAMETER[\"false_northing\",750000],UNIT[\"metr");
    add_srs_wkt (p, 13,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXI");
    add_srs_wkt (p, 14,
        "S[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26986\"]]");
    p = add_epsg_def_ex (filter, first, last, 26987, "epsg", 26987,
        "NAD83 / Massachusetts Island", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.48333333333333 +lat_2=41.28333333333");
    add_proj4text (p, 1,
        "333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Massachusetts Island\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41.48333");
    add_srs_wkt (p, 9,
        "333333333],PARAMETER[\"standard_parallel_2\",41.28333333");
    add_srs_wkt (p, 10,
        "333333],PARAMETER[\"latitude_of_origin\",41],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-70.5],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"26987\"]]");
    p = add_epsg_def_ex (filter, first, last, 26988, "epsg", 26988,
        "NAD83 / Michigan North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.08333333333334 +lat_2=45.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_");
    add_proj4text (p, 2,
        "0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Michigan North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",47.08333333333");
    add_srs_wkt (p, 9,
        "334],PARAMETER[\"standard_parallel_2\",45.48333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",44.78333333333333],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-87],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",8000000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 13,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 14,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26988\"]]");
    p = add_epsg_def_ex (filter, first, last, 26989, "epsg", 26989,
        "NAD83 / Michigan Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.7 +lat_2=44.18333333333333 +lat_0=43");

    add_proj4text (p, 1,
        ".31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Michigan Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",45.7],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"standard_parallel_2\",44.18333333333333],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",43.31666666666667],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-84.36666666666666],PARAMETER[\"false_e");
    add_srs_wkt (p, 12,
        "asting\",6000000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"26989\"]]");
    p = add_epsg_def_ex (filter, first, last, 26990, "epsg", 26990,
        "NAD83 / Michigan South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43.66666666666666 +lat_2=42.1 +lat_0=41");
    add_proj4text (p, 1,
        ".5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Michigan South\",GEOGCS[\"NAD83\",DATUM");

    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",43.66666666666");
    add_srs_wkt (p, 9,
        "666],PARAMETER[\"standard_parallel_2\",42.1],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",41.5],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-84.36666666666666],PARAMETER[\"false_easting\",4000000");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"26990\"]]");
    p = add_epsg_def_ex (filter, first, last, 26991, "epsg", 26991,
        "NAD83 / Minnesota North", 0, 0,

        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.63333333333333 +lat_2=47.03333333333");

    add_proj4text (p, 1,
        "333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y");

    add_proj4text (p, 2,
        "_0=100000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota North\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",48.6333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",47.0333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",46.5],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-93.1],PARAMETER[\"false_easting\",8000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",100000],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"26991\"]]");
    p = add_epsg_def_ex (filter, first, last, 26992, "epsg", 26992,
        "NAD83 / Minnesota Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.05 +lat_2=45.61666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "5 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +to");
    add_proj4text (p, 2,
        "wgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota Central\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",47.05],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",45.61666666666667],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",45],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-94.25],PARAMETER[\"false_easting\",800000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",100000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"26992\"]]");
    p = add_epsg_def_ex (filter, first, last, 26993, "epsg", 26993,
        "NAD83 / Minnesota South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.21666666666667 +lat_2=43.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=");
    add_proj4text (p, 2,
        "GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Minnesota South\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",45.2166666666");
    add_srs_wkt (p, 9,
        "6667],PARAMETER[\"standard_parallel_2\",43.7833333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",43],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-94],PARAMETER[\"false_easting\",800000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",100000],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"26993\"]]");
    p = add_epsg_def_ex (filter, first, last, 26994, "epsg", 26994,
        "NAD83 / Mississippi East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9995 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Mississippi East\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",29.5],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",-88.83333333333333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.99995],PARAMETER[\"false_easting\",300000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26994\"]]");
    p = add_epsg_def_ex (filter, first, last, 26995, "epsg", 26995,
        "NAD83 / Mississippi West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.9");
    add_proj4text (p, 1,
        "9995 +x_0=700000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Mississippi West\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",29.5],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",-90.33333333333333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.99995],PARAMETER[\"false_easting\",700000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"26995\"]]");
    p = add_epsg_def_ex (filter, first, last, 26996, "epsg", 26996,
        "NAD83 / Missouri East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Missouri East\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");





















































































































































































































































































































































































































































































































































































































































































































































































































































    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",35.83333333333334],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-90.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999933333],PARAMETER[\"false_easting\",250000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26996\"]]");
    p = add_epsg_def_ex (filter, first, last, 26997, "epsg", 26997,
        "NAD83 / Missouri Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9");
    add_proj4text (p, 1,
        "99933333 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Missouri Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",35.83333333333334],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",-92.5],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.999933333],PARAMETER[\"false_easting\",500000],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 12,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"26997\"]]");
    p = add_epsg_def_ex (filter, first, last, 26998, "epsg", 26998,
        "NAD83 / Missouri West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9");
    add_proj4text (p, 1,
        "99941177 +x_0=850000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Missouri West\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",36.16666666666666],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-94.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999941177],PARAMETER[\"false_easting\",850000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"26998\"]]");
    p = add_epsg_def_ex (filter, first, last, 27037, "epsg", 27037,
        "Nahrwan 1967 / UTM zone 37N (deprecated)", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=clrk80 +towgs84=-249,-156,381,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 37N (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Nahrwan 1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7012\"]],TOWGS84[-249,-156,381,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.9996],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"27037\"]]");
    p = add_epsg_def_ex (filter, first, last, 27038, "epsg", 27038,
        "Nahrwan 1967 / UTM zone 38N (deprecated)", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=clrk80 +towgs84=-249,-156,381,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 38N (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Nahrwan 1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7012\"]],TOWGS84[-249,-156,381,0,0,0,0],AUTHORITY[\"E");
    add_srs_wkt (p, 4,
        "PSG\",\"6270\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 5,
        "\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORI");
    add_srs_wkt (p, 6,
        "TY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"L");
    add_srs_wkt (p, 7,
        "ongitude\",EAST],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTIO");
    add_srs_wkt (p, 8,
        "N[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 9,
        "n\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"sc");
    add_srs_wkt (p, 10,
        "ale_factor\",0.9996],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"No");
    add_srs_wkt (p, 13,
        "rthing\",NORTH],AUTHORITY[\"EPSG\",\"27038\"]]");
    p = add_epsg_def_ex (filter, first, last, 27039, "epsg", 27039,
        "Nahrwan 1967 / UTM zone 39N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=clrk80 +towgs84=-249,-156,381,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 39N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-249,-156,381,0,0,0,0],AUTHORITY[\"EPSG\",\"6270\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",51],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"27039\"]]");
    p = add_epsg_def_ex (filter, first, last, 27040, "epsg", 27040,
        "Nahrwan 1967 / UTM zone 40N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nahrwan_1967", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=clrk80 +towgs84=-249,-156,381,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nahrwan 1967 / UTM zone 40N\",GEOGCS[\"Nahrwan ");
    add_srs_wkt (p, 1,
        "1967\",DATUM[\"Nahrwan_1967\",SPHEROID[\"Clarke 1880 (RG");
    add_srs_wkt (p, 2,
        "S)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"7012\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[-249,-156,381,0,0,0,0],AUTHORITY[\"EPSG\",\"6270\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4270\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",57],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"27040\"]]");
    p = add_epsg_def_ex (filter, first, last, 27120, "epsg", 27120,
        "Naparima 1972 / UTM zone 20N", 0, 0,
        "International 1924", "Greenwich",
        "Naparima_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=intl +towgs84=-10,375,165,0,0,");
    add_proj4text (p, 1,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Naparima 1972 / UTM zone 20N\",GEOGCS[\"Naparim");
    add_srs_wkt (p, 1,
        "a 1972\",DATUM[\"Naparima_1972\",SPHEROID[\"Internationa");
    add_srs_wkt (p, 2,
        "l 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-10,375,165,0,0,0,0],AUTHORITY[\"EPSG\",\"6271\"]],PR");
    add_srs_wkt (p, 4,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 5,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 6,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 7,
        "HORITY[\"EPSG\",\"4271\"]],PROJECTION[\"Transverse_Merca");
    add_srs_wkt (p, 8,
        "tor\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",-63],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 12,
        "\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"27120\"]]");
    p = add_epsg_def_ex (filter, first, last, 27200, "epsg", 27200,
        "NZGD49 / New Zealand Map Grid", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "New_Zealand_Map_Grid", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=60231");
    add_proj4text (p, 1,
        "50 +ellps=intl +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.0");
    add_proj4text (p, 2,
        "24,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / New Zealand Map Grid\",GEOGCS[\"NZGD49");
    add_srs_wkt (p, 1,
        "\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"New_Zealand_Map_Grid\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",-41],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",173],PARAMETER[\"false_easting\",2510000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",6023150],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"27200\"]]");
    p = add_epsg_def_ex (filter, first, last, 27205, "epsg", 27205,
        "NZGD49 / Mount Eden Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-36.87986527777778 +lon_0=174.7643393");
    add_proj4text (p, 1,
        "611111 +k=0.9999 +x_0=300000 +y_0=700000 +ellps=intl +to");
    add_proj4text (p, 2,
        "wgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=");
    add_proj4text (p, 3,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount Eden Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-36.87986527777778],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",174.7643393611111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",0.9999],PARAMETER[\"false_easting\",300000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Eastin");
    add_srs_wkt (p, 14,
        "g\",EAST],AUTHORITY[\"EPSG\",\"27205\"]]");
    p = add_epsg_def_ex (filter, first, last, 27206, "epsg", 27206,
        "NZGD49 / Bay of Plenty Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-37.76124980555556 +lon_0=176.4661972");
    add_proj4text (p, 1,
        "5 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Bay of Plenty Circuit\",GEOGCS[\"NZGD4");
    add_srs_wkt (p, 1,
        "9\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",-37.76124980555556],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",176.46619725],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",300000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 14,
        "T],AUTHORITY[\"EPSG\",\"27206\"]]");
    p = add_epsg_def_ex (filter, first, last, 27207, "epsg", 27207,
        "NZGD49 / Poverty Bay Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-38.62470277777778 +lon_0=177.8856362");
    add_proj4text (p, 1,
        "777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Poverty Bay Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-38.62470277777778],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",177.8856362777778],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27207\"]]");
    p = add_epsg_def_ex (filter, first, last, 27208, "epsg", 27208,
        "NZGD49 / Hawkes Bay Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39.65092930555556 +lon_0=176.6736805");
    add_proj4text (p, 1,
        "277778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Hawkes Bay Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-39.65092930555556],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",176.6736805277778],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27208\"]]");
    p = add_epsg_def_ex (filter, first, last, 27209, "epsg", 27209,
        "NZGD49 / Taranaki Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39.13575830555556 +lon_0=174.2280117");
    add_proj4text (p, 1,
        "5 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Taranaki Circuit\",GEOGCS[\"NZGD49\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-39.13575830555556],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",174.22801175],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",300000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 13,
        "01\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"27209\"]]");
    p = add_epsg_def_ex (filter, first, last, 27210, "epsg", 27210,
        "NZGD49 / Tuhirangi Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39.51247038888889 +lon_0=175.6400368");
    add_proj4text (p, 1,
        "055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Tuhirangi Circuit\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-39.51247038888889],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",175.6400368055556],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 14,
        "ST],AUTHORITY[\"EPSG\",\"27210\"]]");
    p = add_epsg_def_ex (filter, first, last, 27211, "epsg", 27211,
        "NZGD49 / Wanganui Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-40.24194713888889 +lon_0=175.4880996");
    add_proj4text (p, 1,
        "111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Wanganui Circuit\",GEOGCS[\"NZGD49\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-40.24194713888889],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",175.4880996111111],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 14,
        "ST],AUTHORITY[\"EPSG\",\"27211\"]]");
    p = add_epsg_def_ex (filter, first, last, 27212, "epsg", 27212,
        "NZGD49 / Wairarapa Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-40.92553263888889 +lon_0=175.6473496");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Wairarapa Circuit\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-40.92553263888889],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",175.6473496666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 14,
        "ST],AUTHORITY[\"EPSG\",\"27212\"]]");
    p = add_epsg_def_ex (filter, first, last, 27213, "epsg", 27213,
        "NZGD49 / Wellington Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.30131963888888 +lon_0=174.7766231");
    add_proj4text (p, 1,
        "111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Wellington Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-41.30131963888888],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",174.7766231111111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27213\"]]");
    p = add_epsg_def_ex (filter, first, last, 27214, "epsg", 27214,
        "NZGD49 / Collingwood Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-40.71475905555556 +lon_0=172.6720465");
    add_proj4text (p, 1,
        " +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47");
    add_proj4text (p, 2,
        ",-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Collingwood Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-40.71475905555556],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",172.6720465],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27214\"]]");
    p = add_epsg_def_ex (filter, first, last, 27215, "epsg", 27215,
        "NZGD49 / Nelson Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.27454472222222 +lon_0=173.2993168");
    add_proj4text (p, 1,
        "055555 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Nelson Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-41.27454472222222],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",173.2993168055555],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27215\"]]");
    p = add_epsg_def_ex (filter, first, last, 27216, "epsg", 27216,
        "NZGD49 / Karamea Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.28991152777778 +lon_0=172.1090281");
    add_proj4text (p, 1,
        "944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Karamea Circuit\",GEOGCS[\"NZGD49\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inter");
    add_srs_wkt (p, 2,
        "national 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",-41.28991152777778],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",172.1090281944444],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",300000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 14,
        "T],AUTHORITY[\"EPSG\",\"27216\"]]");
    p = add_epsg_def_ex (filter, first, last, 27217, "epsg", 27217,
        "NZGD49 / Buller Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.81080286111111 +lon_0=171.5812600");
    add_proj4text (p, 1,
        "555556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Buller Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-41.81080286111111],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",171.5812600555556],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27217\"]]");
    p = add_epsg_def_ex (filter, first, last, 27218, "epsg", 27218,
        "NZGD49 / Grey Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-42.33369427777778 +lon_0=171.5497713");
    add_proj4text (p, 1,
        "055556 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Grey Circuit\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",-42.33369427777778],PARAMETER[\"central_meri");
    add_srs_wkt (p, 10,
        "dian\",171.5497713055556],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",300000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27218\"]]");
    p = add_epsg_def_ex (filter, first, last, 27219, "epsg", 27219,
        "NZGD49 / Amuri Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-42.68911658333333 +lon_0=173.0101333");
    add_proj4text (p, 1,
        "888889 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Amuri Circuit\",GEOGCS[\"NZGD49\",DATU");
    add_srs_wkt (p, 1,
        "M[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",-42.68911658333333],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",173.0101333888889],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27219\"]]");
    p = add_epsg_def_ex (filter, first, last, 27220, "epsg", 27220,
        "NZGD49 / Marlborough Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-41.54448666666666 +lon_0=173.8020741");
    add_proj4text (p, 1,
        "111111 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Marlborough Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-41.54448666666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",173.8020741111111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27220\"]]");
    p = add_epsg_def_ex (filter, first, last, 27221, "epsg", 27221,
        "NZGD49 / Hokitika Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-42.88632236111111 +lon_0=170.9799935");
    add_proj4text (p, 1,
        " +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47");
    add_proj4text (p, 2,
        ",-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Hokitika Circuit\",GEOGCS[\"NZGD49\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inte");
    add_srs_wkt (p, 2,
        "rnational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-42.88632236111111],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",170.9799935],PARAMETER[\"scale_factor\",1],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",300000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"900");
    add_srs_wkt (p, 13,
        "1\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],AU");
    add_srs_wkt (p, 14,
        "THORITY[\"EPSG\",\"27221\"]]");
    p = add_epsg_def_ex (filter, first, last, 27222, "epsg", 27222,
        "NZGD49 / Okarito Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.11012813888889 +lon_0=170.2609258");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Okarito Circuit\",GEOGCS[\"NZGD49\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Inter");
    add_srs_wkt (p, 2,
        "national 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]");
    add_srs_wkt (p, 3,
        "],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",-43.11012813888889],PARAMETER[\"central_m");
    add_srs_wkt (p, 10,
        "eridian\",170.2609258333333],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",300000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 14,
        "T],AUTHORITY[\"EPSG\",\"27222\"]]");
    p = add_epsg_def_ex (filter, first, last, 27223, "epsg", 27223,
        "NZGD49 / Jacksons Bay Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.97780288888889 +lon_0=168.606267 ");
    add_proj4text (p, 1,
        "+k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84=59.47,");
    add_proj4text (p, 2,
        "-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Jacksons Bay Circuit\",GEOGCS[\"NZGD49");
    add_srs_wkt (p, 1,
        "\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",-43.97780288888889],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",168.606267],PARAMETER[\"scale_factor\",1]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",300000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27223\"]]");
    p = add_epsg_def_ex (filter, first, last, 27224, "epsg", 27224,
        "NZGD49 / Mount Pleasant Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.59063758333333 +lon_0=172.7271935");
    add_proj4text (p, 1,
        "833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount Pleasant Circuit\",GEOGCS[\"NZGD");
    add_srs_wkt (p, 1,
        "49\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5");
    add_srs_wkt (p, 4,
        "993],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4272\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",-43.59063758333333],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",172.7271935833333],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 14,
        ",EAST],AUTHORITY[\"EPSG\",\"27224\"]]");
    p = add_epsg_def_ex (filter, first, last, 27225, "epsg", 27225,
        "NZGD49 / Gawler Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-43.74871155555556 +lon_0=171.3607484");
    add_proj4text (p, 1,
        "722222 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Gawler Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-43.74871155555556],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",171.3607484722222],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27225\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





































































































































































































































































































































































































































































































|







 







<
<
<

<










|
<
>

|
<
>

<
>

>
>
|

|

|

|

|

|

|

|

|

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|

|

>
>
|

|

|

|

|

|

|

|

|

<
>

<
>

<
>

>
>
|
|
<
>
|
<
>
|
<
>

|
<
>

<
>

>
>
|

|

|

|

|

|

|

|

|

>
>
>
>
|
|
<
>
|
|
|
|
|
|
<
<
|
<
>

|
<
>

<
>

>
>
|

|













|

<
>

<
>

<
>

>
>
|
|
<
>
|
<
>
|
<
>

|
<
>

<
>

>
>
|

|













|

>
>
>
>
|
|
<
>
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

<
>

<
>
>
>
|
<
>

|


<
>

>
>
|
|
|

<
>

|

|

|

|

|

|

|

<
>

<
>

<
>

>
>
|
|
|
|
<
>
|
<
>




<
>

|

|

|







 







|

|

|

|

|

|
|
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|

<
>



|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|

|

|

|

|

|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|




<
>

<
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|

|

|

|

|

|
|
|




|

|

|

|







 







|

|

|

|

|

|

|
|
|




|

|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|

|

|

|

|

|

|

|

|

|

|

|

|

|
|
<
>




|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|

|

|







 







|

|



|

|

|

|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




|

|

|
>
>

<
>

|

|

|









|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

|

|

|

|

|
|
<
>




|

|

|

|







 







|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|

|

|



|
|
|




<
>

<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

<
>

|

|

|

|

|

|

|

|

|

|

|

|

|

|
|
<
>




<
>

<
>

|
<
<

|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
54
55
56
57

58
59
60

61
62

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

126
127

128
129

130
131
132
133
134
135

136
137

138
139

140
141
142

143
144

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172

173
174
175
176
177
178
179


180

181
182
183

184
185

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

208
209

210
211

212
213
214
215
216
217

218
219

220
221

222
223
224

225
226

227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254

255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297

298
299

300
301
302
303

304
305
306
307
308

309
310
311
312
313
314
315
316

317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

333
334

335
336

337
338
339
340
341
342
343
344

345
346

347
348
349
350
351

352
353
354
355
356
357
358
359
360
361
362
363
364
365
...
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387





































































































































































































































































































































































388
389
390
391
392

393
394
395
396
397
398
399
400
401
402
403
404
...
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741

























































































































































































































































































742
743
744
745
746
747
748
...
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770





















































































































771
772
773
774
775

776
777

778
779










































































































































































































































780
781
782
783































































































































































































































































































































































784









































785
786
787
788
789
790
791
...
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
...
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975

976
977
978
979
980
981
982









































983
984
985
986
987
988
989
990
991
992
993
994
995
996
...
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072

1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184

1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
....
1205
1206
1207
1208
1209
1210
1211
1212
1213




















































































































































































































































1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230

1231
1232


1233









































1234
1235
1236

1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266

1267
1268
1269
1270
1271

1272
1273

1274
1275
1276


1277
1278
1279
1280
1281
1282
1283
1284
1285
....
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_44 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32123, "epsg", 32123,

        "NAD83 / Ohio South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Ohio South\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",40.03333333333333]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",38.73333333333333],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",38],PARAMETER[\"central_m");
    add_srs_wkt (p, 11,
        "eridian\",-82.5],PARAMETER[\"false_easting\",600000],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"32123\"]]");
    p = add_epsg_def_ex (filter, first, last, 32124, "epsg", 32124,
        "NAD83 / Oklahoma North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oklahoma North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,

        "_2SP\"],PARAMETER[\"standard_parallel_1\",36.76666666666");
    add_srs_wkt (p, 9,

        "667],PARAMETER[\"standard_parallel_2\",35.56666666666667");
    add_srs_wkt (p, 10,

        "],PARAMETER[\"latitude_of_origin\",35],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-98],PARAMETER[\"false_easting\",600000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,

        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,

        ",AUTHORITY[\"EPSG\",\"32124\"]]");
    p = add_epsg_def_ex (filter, first, last, 32125, "epsg", 32125,

        "NAD83 / Oklahoma South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oklahoma South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",35.23333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",33.93333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",33.33333333333334],PA");
    add_srs_wkt (p, 11,

        "RAMETER[\"central_meridian\",-98],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",600000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 13,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32125\"]]");


    p = add_epsg_def_ex (filter, first, last, 32126, "epsg", 32126,

        "NAD83 / Oregon North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oregon North\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,

        "P\"],PARAMETER[\"standard_parallel_1\",46],PARAMETER[\"s");
    add_srs_wkt (p, 9,

        "tandard_parallel_2\",44.33333333333334],PARAMETER[\"lati");
    add_srs_wkt (p, 10,

        "tude_of_origin\",43.66666666666666],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-120.5],PARAMETER[\"false_easting\",2500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,

        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,

        "],AUTHORITY[\"EPSG\",\"32126\"]]");
    p = add_epsg_def_ex (filter, first, last, 32127, "epsg", 32127,

        "NAD83 / Oregon South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",

        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oregon South\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",44],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",42.33333333333334],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",41.66666666666666],PARAMETER[\"central_");
    add_srs_wkt (p, 11,

        "meridian\",-120.5],PARAMETER[\"false_easting\",1500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32127\"]]");
    p = add_epsg_def_ex (filter, first, last, 32128, "epsg", 32128,
        "NAD83 / Pennsylvania North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=4");
    add_proj4text (p, 1,
        "0.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Pennsylvania North\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",41.95],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",40.88333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",40.16666666666666],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-77.75],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,

        ",600000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 13,

        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32128\"]]");
    p = add_epsg_def_ex (filter, first, last, 32129, "epsg", 32129,

        "NAD83 / Pennsylvania South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,

        "PROJCS[\"NAD83 / Pennsylvania South\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,

        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",40.9666666");
    add_srs_wkt (p, 9,

        "6666667],PARAMETER[\"standard_parallel_2\",39.9333333333");
    add_srs_wkt (p, 10,

        "3333],PARAMETER[\"latitude_of_origin\",39.33333333333334");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-77.75],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",600000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,

        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32129\"]]");
    p = add_epsg_def_ex (filter, first, last, 32130, "epsg", 32130,

        "NAD83 / Rhode Island", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9");
    add_proj4text (p, 1,
        "9999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0");
    add_proj4text (p, 2,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Rhode Island\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",41.08333333333334],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-71.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99999375],PARAMETER[\"false_easting\",100000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"32130\"]]");
    p = add_epsg_def_ex (filter, first, last, 32133, "epsg", 32133,
        "NAD83 / South Carolina", 0, 0,
        "GRS 1980", "Greenwich",





































































































































































































































































































































































        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31");
    add_proj4text (p, 1,

        ".83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / South Carolina\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",34.83333333333");
    add_srs_wkt (p, 9,
        "334],PARAMETER[\"standard_parallel_2\",32.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",31.83333333333333],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-81],PARAMETER[\"false_easting\",609600],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32133\"]]");
    p = add_epsg_def_ex (filter, first, last, 32134, "epsg", 32134,
        "NAD83 / South Dakota North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666");
    add_proj4text (p, 1,
        "666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_");
    add_proj4text (p, 2,
        "0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / South Dakota North\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",45.6833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",44.4166666666");
    add_srs_wkt (p, 10,
        "6666],PARAMETER[\"latitude_of_origin\",43.83333333333334");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-100],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",600000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32134\"]]");
    p = add_epsg_def_ex (filter, first, last, 32135, "epsg", 32135,
        "NAD83 / South Dakota South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42");
    add_proj4text (p, 1,
        ".33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y");
    add_proj4text (p, 2,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 3,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / South Dakota South\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",44.4],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",42.83333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",42.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-100.3333333333333],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",600000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32135\"]]");
    p = add_epsg_def_ex (filter, first, last, 32136, "epsg", 32136,
        "NAD83 / Tennessee", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=3");
    add_proj4text (p, 1,
        "4.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GR");
    add_proj4text (p, 2,
        "S80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Tennessee\",GEOGCS[\"NAD83\",DATUM[\"No");
    add_srs_wkt (p, 1,
        "rth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 2,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"standard_parallel_1\",36.41666666666666],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"standard_parallel_2\",35.25],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",34.33333333333334],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-86],PARAMETER[\"false_easting\",600000],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"32136\"]]");
    p = add_epsg_def_ex (filter, first, last, 32137, "epsg", 32137,
        "NAD83 / Texas North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=3");
    add_proj4text (p, 1,
        "4 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas North\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",36.18333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",34.65],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",34],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "101.5],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",1000000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"32137\"]]");
    p = add_epsg_def_ex (filter, first, last, 32138, "epsg", 32138,
        "NAD83 / Texas North Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333");
    add_proj4text (p, 1,
        "333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y");
    add_proj4text (p, 2,
        "_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas North Central\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",33.9666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"standard_parallel_2\",32.1333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",31.66666666666667");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-98.5],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",600000],PARAMETER[\"false_northing\",2000000");
    add_srs_wkt (p, 13,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32138\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32139, "epsg", 32139,
        "NAD83 / Texas Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666");
    add_proj4text (p, 1,
        "667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 3,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas Central\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",31.88333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",30.11666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",29.66666666666667],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-100.3333333333333],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_easting\",700000],PARAMETER[\"false_northing\",3");
    add_srs_wkt (p, 13,
        "000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2139\"]]");
    p = add_epsg_def_ex (filter, first, last, 32140, "epsg", 32140,
        "NAD83 / Texas South Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333");
    add_proj4text (p, 1,
        "333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas South Central\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",30.2833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",28.3833333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",27.83333333333333");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-99],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",600000],PARAMETER[\"false_northing\",4000000],");
    add_srs_wkt (p, 13,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32140\"]]");
    p = add_epsg_def_ex (filter, first, last, 32141, "epsg", 32141,
        "NAD83 / Texas South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y");
    add_proj4text (p, 2,
        "_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas South\",GEOGCS[\"NAD83\",DATUM[\"");

























































































































































































































































































    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",27.83333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",26.16666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",25.66666666666667],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-98.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",300000],PARAMETER[\"false_northing\",5000000],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32141\"]]");
    p = add_epsg_def_ex (filter, first, last, 32142, "epsg", 32142,





















































































































        "NAD83 / Utah North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666");
    add_proj4text (p, 1,

        "667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +");
    add_proj4text (p, 2,










































































































































































































































        "y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,































































































































































































































































































































































        "PROJCS[\"NAD83 / Utah North\",GEOGCS[\"NAD83\",DATUM[\"N");









































    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",41.78333333333333]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",40.71666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",40.33333333333334],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-111.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",500000],PARAMETER[\"false_northing\",1000000],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32142\"]]");
    p = add_epsg_def_ex (filter, first, last, 32143, "epsg", 32143,
        "NAD83 / Utah Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=3");
    add_proj4text (p, 1,
        "8.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Utah Central\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",40.65],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",39.01666666666667],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",38.33333333333334],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-111.5],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",2000000],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32143\"]]");
    p = add_epsg_def_ex (filter, first, last, 32144, "epsg", 32144,
        "NAD83 / Utah South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=3");
    add_proj4text (p, 1,
        "6.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Utah South\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",38.35],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",37.21666666666667],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-111.5],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",3000000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"32144\"]]");
    p = add_epsg_def_ex (filter, first, last, 32145, "epsg", 32145,
        "NAD83 / Vermont", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0");
    add_proj4text (p, 1,
        "=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Vermont\",GEOGCS[\"NAD83\",DATUM[\"Nort");
    add_srs_wkt (p, 1,
        "h_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",42.5],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-72.5],PARAMETER[\"scale_factor\",0.999964286],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32145\"]]");
    p = add_epsg_def_ex (filter, first, last, 32146, "epsg", 32146,
        "NAD83 / Virginia North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Virginia North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",39.2],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",38.03333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",37.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-78.5],PARAMETER[\"false_easting\",350000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",2000000],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32146\"]]");
    p = add_epsg_def_ex (filter, first, last, 32147, "epsg", 32147,

        "NAD83 / Virginia South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666");
    add_proj4text (p, 1,









































        "667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +");
    add_proj4text (p, 2,
        "y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Virginia South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",37.96666666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"standard_parallel_2\",36.76666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",36.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-78.5],PARAMETER[\"false_ea");
    add_srs_wkt (p, 12,
        "sting\",3500000],PARAMETER[\"false_northing\",1000000],U");
    add_srs_wkt (p, 13,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32147\"]]");
    p = add_epsg_def_ex (filter, first, last, 32148, "epsg", 32148,
        "NAD83 / Washington North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47");
    add_proj4text (p, 1,
        " +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Washington North\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",48.7333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",47.5],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",47],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-120.8333333333333],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"32148\"]]");
    p = add_epsg_def_ex (filter, first, last, 32149, "epsg", 32149,
        "NAD83 / Washington South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333");
    add_proj4text (p, 1,
        "334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,

        "PROJCS[\"NAD83 / Washington South\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",47.3333333333");
    add_srs_wkt (p, 9,
        "3334],PARAMETER[\"standard_parallel_2\",45.8333333333333");
    add_srs_wkt (p, 10,
        "4],PARAMETER[\"latitude_of_origin\",45.33333333333334],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32149\"]]");
    p = add_epsg_def_ex (filter, first, last, 32150, "epsg", 32150,
        "NAD83 / West Virginia North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia North\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",40.25],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",39],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",38.5],PARAMETER[\"central_meridian\",-79.5],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",600000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"32150\"]]");
    p = add_epsg_def_ex (filter, first, last, 32151, "epsg", 32151,
        "NAD83 / West Virginia South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia South\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",38.8833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",37.4833333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",37],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-81],PARAMETER[\"false_easting\",60000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 14,
        "RTH],AUTHORITY[\"EPSG\",\"32151\"]]");
    p = add_epsg_def_ex (filter, first, last, 32152, "epsg", 32152,

        "NAD83 / Wisconsin North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wisconsin North\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",46.7666666666");
    add_srs_wkt (p, 9,




















































































































































































































































        "6667],PARAMETER[\"standard_parallel_2\",45.5666666666666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"latitude_of_origin\",45.16666666666666],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"central_meridian\",-90],PARAMETER[\"false_eas");
    add_srs_wkt (p, 12,
        "ting\",600000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 13,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 14,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32152\"]]");
    p = add_epsg_def_ex (filter, first, last, 32153, "epsg", 32153,
        "NAD83 / Wisconsin Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333");
    add_proj4text (p, 1,


        "334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=");









































    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,

        "PROJCS[\"NAD83 / Wisconsin Central\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",45.5],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"standard_parallel_2\",44.25],PARAMETER[\"latitude");
    add_srs_wkt (p, 10,
        "_of_origin\",43.83333333333334],PARAMETER[\"central_meri");
    add_srs_wkt (p, 11,
        "dian\",-90],PARAMETER[\"false_easting\",600000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"32153\"]]");
    p = add_epsg_def_ex (filter, first, last, 32154, "epsg", 32154,

        "NAD83 / Wisconsin South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,

        "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333");
    add_proj4text (p, 1,

        "333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");


    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wisconsin South\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
................................................................................
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",44.0666666666");
    add_srs_wkt (p, 9,
        "6667],PARAMETER[\"standard_parallel_2\",42.7333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",42],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-90],PARAMETER[\"false_easting\",600000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32154\"]]");
    p = add_epsg_def_ex (filter, first, last, 32155, "epsg", 32155,
        "NAD83 / Wyoming East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9");
    add_proj4text (p, 1,
        "999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",40.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-105.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999375],PARAMETER[\"false_easting\",200000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"32155\"]]");
    p = add_epsg_def_ex (filter, first, last, 32156, "epsg", 32156,
        "NAD83 / Wyoming East Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9");
    add_proj4text (p, 1,
        "999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 2,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming East Central\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-107.3333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999375],PARAMETER[\"false_easting\",400000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",100000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32156\"]]");
    p = add_epsg_def_ex (filter, first, last, 32157, "epsg", 32157,
        "NAD83 / Wyoming West Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0");
    add_proj4text (p, 1,
        "=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming West Central\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-108.75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999375],PARAMETER[\"false_easting\",600000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"32157\"]]");
    p = add_epsg_def_ex (filter, first, last, 32158, "epsg", 32158,
        "NAD83 / Wyoming West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9");
    add_proj4text (p, 1,
        "999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 2,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",40.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-110.0833333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999375],PARAMETER[\"false_easting\",800000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",100000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32158\"]]");
    p = add_epsg_def_ex (filter, first, last, 32161, "epsg", 32161,
        "NAD83 / Puerto Rico & Virgin Is.", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +");
    add_proj4text (p, 2,
        "x_0=200000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 3,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Puerto Rico & Virgin Is.\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Confo");
    add_srs_wkt (p, 8,
        "rmal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",18.4");
    add_srs_wkt (p, 9,
        "3333333333333],PARAMETER[\"standard_parallel_2\",18.0333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"latitude_of_origin\",17.83333333");
    add_srs_wkt (p, 11,
        "333333],PARAMETER[\"central_meridian\",-66.4333333333333");
    add_srs_wkt (p, 12,
        "4],PARAMETER[\"false_easting\",200000],PARAMETER[\"false");
    add_srs_wkt (p, 13,
        "_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"32161\"]]");
    p = add_epsg_def_ex (filter, first, last, 32164, "epsg", 32164,
        "NAD83 / BLM 14N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 14N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32164\"]]");
    p = add_epsg_def_ex (filter, first, last, 32165, "epsg", 32165,
        "NAD83 / BLM 15N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 15N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32165\"]]");
    p = add_epsg_def_ex (filter, first, last, 32166, "epsg", 32166,
        "NAD83 / BLM 16N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 16N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-87],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32166\"]]");
    p = add_epsg_def_ex (filter, first, last, 32167, "epsg", 32167,
        "NAD83 / BLM 17N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 17N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32167\"]]");
    p = add_epsg_def_ex (filter, first, last, 32180, "epsg", 32180,
        "NAD83 / SCoPQ zone 2 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / SCoPQ zone 2 (deprecated)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-55.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",304800],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"32180\"]]");
    p = add_epsg_def_ex (filter, first, last, 32181, "epsg", 32181,
        "NAD83 / MTM zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 1\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-53],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",304800],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 13,
        "2181\"]]");
    p = add_epsg_def_ex (filter, first, last, 32182, "epsg", 32182,
        "NAD83 / MTM zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 2\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-56],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",304800],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 13,
        "2182\"]]");
    p = add_epsg_def_ex (filter, first, last, 32183, "epsg", 32183,
        "NAD83 / MTM zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 3\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-58.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32183\"]]");
    p = add_epsg_def_ex (filter, first, last, 32184, "epsg", 32184,
        "NAD83 / MTM zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 4\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-61.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32184\"]]");
    p = add_epsg_def_ex (filter, first, last, 32185, "epsg", 32185,
        "NAD83 / MTM zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 5\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-64.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32185\"]]");
    p = add_epsg_def_ex (filter, first, last, 32186, "epsg", 32186,
        "NAD83 / MTM zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 6\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-67.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32186\"]]");
    p = add_epsg_def_ex (filter, first, last, 32187, "epsg", 32187,
        "NAD83 / MTM zone 7", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 7\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-70.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32187\"]]");
    p = add_epsg_def_ex (filter, first, last, 32188, "epsg", 32188,
        "NAD83 / MTM zone 8", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 8\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-73.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32188\"]]");
    p = add_epsg_def_ex (filter, first, last, 32189, "epsg", 32189,
        "NAD83 / MTM zone 9", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 9\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-76.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32189\"]]");
    p = add_epsg_def_ex (filter, first, last, 32190, "epsg", 32190,
        "NAD83 / MTM zone 10", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 10\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-79.5],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",304800],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32190\"]]");
    p = add_epsg_def_ex (filter, first, last, 32191, "epsg", 32191,
        "NAD83 / MTM zone 11", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 11\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-82.5],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",304800],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"32191\"]]");
    p = add_epsg_def_ex (filter, first, last, 32192, "epsg", 32192,
        "NAD83 / MTM zone 12", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 12\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-81],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32192\"]]");
    p = add_epsg_def_ex (filter, first, last, 32193, "epsg", 32193,
        "NAD83 / MTM zone 13", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 13\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-84],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32193\"]]");
    p = add_epsg_def_ex (filter, first, last, 32194, "epsg", 32194,
        "NAD83 / MTM zone 14", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 14\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-87],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32194\"]]");
    p = add_epsg_def_ex (filter, first, last, 32195, "epsg", 32195,
        "NAD83 / MTM zone 15", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 15\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-90],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32195\"]]");
    p = add_epsg_def_ex (filter, first, last, 32196, "epsg", 32196,
        "NAD83 / MTM zone 16", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 16\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-93],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32196\"]]");
    p = add_epsg_def_ex (filter, first, last, 32197, "epsg", 32197,
        "NAD83 / MTM zone 17", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 17\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-96],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32197\"]]");
    p = add_epsg_def_ex (filter, first, last, 32198, "epsg", 32198,
        "NAD83 / Quebec Lambert", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Quebec Lambert\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",60],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",46],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",44],PARAMETER[\"central_meridian\",-68.5],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",0],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32198\"]]");
    p = add_epsg_def_ex (filter, first, last, 32199, "epsg", 32199,
        "NAD83 / Louisiana Offshore", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=1000000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Louisiana Offshore\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",27.8333333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",26.1666666666");
    add_srs_wkt (p, 10,
        "6667],PARAMETER[\"latitude_of_origin\",25.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-91.33333333333333],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",1000000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 13,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32199\"]]");
    p = add_epsg_def_ex (filter, first, last, 32201, "epsg", 32201,
        "WGS 72 / UTM zone 1N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 1N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32201");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32202, "epsg", 32202,
        "WGS 72 / UTM zone 2N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 2N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32202");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32203, "epsg", 32203,
        "WGS 72 / UTM zone 3N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 3N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-165],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32203");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32204, "epsg", 32204,
        "WGS 72 / UTM zone 4N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 4N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-159],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32204");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32205, "epsg", 32205,
        "WGS 72 / UTM zone 5N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 5N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-153],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32205");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32206, "epsg", 32206,
        "WGS 72 / UTM zone 6N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 6N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-147],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32206");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32207, "epsg", 32207,
        "WGS 72 / UTM zone 7N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 7N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32207");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32208, "epsg", 32208,
        "WGS 72 / UTM zone 8N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 8N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-135],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32208");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32209, "epsg", 32209,
        "WGS 72 / UTM zone 9N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 9N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-129],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32209");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32210, "epsg", 32210,
        "WGS 72 / UTM zone 10N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 10N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-123");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "10\"]]");
    p = add_epsg_def_ex (filter, first, last, 32211, "epsg", 32211,
        "WGS 72 / UTM zone 11N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 11N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-117");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "11\"]]");
    p = add_epsg_def_ex (filter, first, last, 32212, "epsg", 32212,
        "WGS 72 / UTM zone 12N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 12N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-111");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "12\"]]");
    p = add_epsg_def_ex (filter, first, last, 32213, "epsg", 32213,
        "WGS 72 / UTM zone 13N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 13N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-105");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "13\"]]");
    p = add_epsg_def_ex (filter, first, last, 32214, "epsg", 32214,
        "WGS 72 / UTM zone 14N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 14N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-99]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 32215, "epsg", 32215,
        "WGS 72 / UTM zone 15N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 15N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-93]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 32216, "epsg", 32216,
        "WGS 72 / UTM zone 16N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 16N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-87]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32217, "epsg", 32217,
        "WGS 72 / UTM zone 17N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 17N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32218, "epsg", 32218,
        "WGS 72 / UTM zone 18N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 18N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32219, "epsg", 32219,
        "WGS 72 / UTM zone 19N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 19N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 32220, "epsg", 32220,
        "WGS 72 / UTM zone 20N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 20N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 32221, "epsg", 32221,
        "WGS 72 / UTM zone 21N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 21N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 32222, "epsg", 32222,
        "WGS 72 / UTM zone 22N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 22N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 32223, "epsg", 32223,
        "WGS 72 / UTM zone 23N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 23N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-45]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 32224, "epsg", 32224,
        "WGS 72 / UTM zone 24N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 24N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-39]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 32225, "epsg", 32225,
        "WGS 72 / UTM zone 25N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 25N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-33]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 32226, "epsg", 32226,
        "WGS 72 / UTM zone 26N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 26N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-27]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32227, "epsg", 32227,
        "WGS 72 / UTM zone 27N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 27N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-21]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32228, "epsg", 32228,
        "WGS 72 / UTM zone 28N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 28N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-15]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32229, "epsg", 32229,
        "WGS 72 / UTM zone 29N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 29N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-9],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32229");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32230, "epsg", 32230,
        "WGS 72 / UTM zone 30N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 30N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-3],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32230");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32231, "epsg", 32231,
        "WGS 72 / UTM zone 31N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 31N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",3],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32231\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32232, "epsg", 32232,
        "WGS 72 / UTM zone 32N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 32N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",9],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32232\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32233, "epsg", 32233,
        "WGS 72 / UTM zone 33N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 33N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",15],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32233");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32234, "epsg", 32234,
        "WGS 72 / UTM zone 34N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 34N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",21],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32234");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32235, "epsg", 32235,
        "WGS 72 / UTM zone 35N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 35N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",27],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32235");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32236, "epsg", 32236,
        "WGS 72 / UTM zone 36N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 36N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32236");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32237, "epsg", 32237,
        "WGS 72 / UTM zone 37N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 37N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",39],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32237");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32238, "epsg", 32238,
        "WGS 72 / UTM zone 38N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 38N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32238");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32239, "epsg", 32239,
        "WGS 72 / UTM zone 39N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 39N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",51],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32239");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32240, "epsg", 32240,
        "WGS 72 / UTM zone 40N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 40N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",57],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32240");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32241, "epsg", 32241,
        "WGS 72 / UTM zone 41N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 41N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",63],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32241");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32242, "epsg", 32242,
        "WGS 72 / UTM zone 42N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 42N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",69],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32242");
    add_srs_wkt (p, 13,
        "\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

Changes to src/srsinit/epsg_inlined_45.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_45 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 27226, "epsg", 27226,
        "NZGD49 / Timaru Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44.40222036111111 +lon_0=171.0572508");
    add_proj4text (p, 1,
        "333333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Timaru Circuit\",GEOGCS[\"NZGD49\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Intern");
    add_srs_wkt (p, 2,
        "ational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",-44.40222036111111],PARAMETER[\"central_me");
    add_srs_wkt (p, 10,
        "ridian\",171.0572508333333],PARAMETER[\"scale_factor\",1");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",300000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"27226\"]]");
    p = add_epsg_def_ex (filter, first, last, 27227, "epsg", 27227,
        "NZGD49 / Lindis Peak Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44.73526797222222 +lon_0=169.4677550");
    add_proj4text (p, 1,
        "833333 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Lindis Peak Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-44.73526797222222],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",169.4677550833333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27227\"]]");
    p = add_epsg_def_ex (filter, first, last, 27228, "epsg", 27228,
        "NZGD49 / Mount Nicholas Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.13290258333333 +lon_0=168.3986411");
    add_proj4text (p, 1,
        "944444 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount Nicholas Circuit\",GEOGCS[\"NZGD");
    add_srs_wkt (p, 1,
        "49\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7022\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5");
    add_srs_wkt (p, 4,
        "993],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4272\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",-45.13290258333333],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",168.3986411944444],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 11,
        "tor\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\"");
    add_srs_wkt (p, 14,
        ",EAST],AUTHORITY[\"EPSG\",\"27228\"]]");
    p = add_epsg_def_ex (filter, first, last, 27229, "epsg", 27229,
        "NZGD49 / Mount York Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.56372616666666 +lon_0=167.7388617");
    add_proj4text (p, 1,
        "777778 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Mount York Circuit\",GEOGCS[\"NZGD49\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",-45.56372616666666],PARAMETER[\"centra");
    add_srs_wkt (p, 10,
        "l_meridian\",167.7388617777778],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 11,
        "\",1],PARAMETER[\"false_easting\",300000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",700000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 13,
        "\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",");
    add_srs_wkt (p, 14,
        "EAST],AUTHORITY[\"EPSG\",\"27229\"]]");
    p = add_epsg_def_ex (filter, first, last, 27230, "epsg", 27230,
        "NZGD49 / Observation Point Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.81619661111111 +lon_0=170.6285951");
    add_proj4text (p, 1,
        "666667 +k=1 +x_0=300000 +y_0=700000 +ellps=intl +towgs84");
    add_proj4text (p, 2,
        "=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no");
    add_proj4text (p, 3,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Observation Point Circuit\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "ZGD49\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7022\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-");
    add_srs_wkt (p, 4,
        "4.5993],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 5,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4272\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",-45.81619661111111],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",170.6285951666667],PARAMETER[\"scale_");
    add_srs_wkt (p, 11,
        "factor\",1],PARAMETER[\"false_easting\",300000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",700000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"East");
    add_srs_wkt (p, 14,
        "ing\",EAST],AUTHORITY[\"EPSG\",\"27230\"]]");
    p = add_epsg_def_ex (filter, first, last, 27231, "epsg", 27231,
        "NZGD49 / North Taieri Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-45.86151336111111 +lon_0=170.2825891");
    add_proj4text (p, 1,
        "111111 +k=0.99996 +x_0=300000 +y_0=700000 +ellps=intl +t");
    add_proj4text (p, 2,
        "owgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / North Taieri Circuit\",GEOGCS[\"NZGD49");
    add_srs_wkt (p, 1,
        "\",DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.599");
    add_srs_wkt (p, 4,
        "3],AUTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 5,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 6,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 8,
        "72\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",-45.86151336111111],PARAMETER[\"cent");
    add_srs_wkt (p, 10,
        "ral_meridian\",170.2825891111111],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 11,
        "or\",0.99996],PARAMETER[\"false_easting\",300000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",700000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Ea");
    add_srs_wkt (p, 14,
        "sting\",EAST],AUTHORITY[\"EPSG\",\"27231\"]]");
    p = add_epsg_def_ex (filter, first, last, 27232, "epsg", 27232,
        "NZGD49 / Bluff Circuit", 0, 1,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Northing", "North", "Easting", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-46.60000961111111 +lon_0=168.342872 ");
    add_proj4text (p, 1,
        "+k=1 +x_0=300002.66 +y_0=699999.58 +ellps=intl +towgs84=");
    add_proj4text (p, 2,
        "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_");
    add_proj4text (p, 3,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / Bluff Circuit\",GEOGCS[\"NZGD49\",DATU");
    add_srs_wkt (p, 1,
        "M[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Interna");
    add_srs_wkt (p, 2,
        "tional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],");
    add_srs_wkt (p, 3,
        "TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORI");
    add_srs_wkt (p, 5,
        "TY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519943");
    add_srs_wkt (p, 6,
        "3,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],");
    add_srs_wkt (p, 8,
        "PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",-46.60000961111111],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",168.342872],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",300002.66],PARAMETER[\"false_north");
    add_srs_wkt (p, 12,
        "ing\",699999.58],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Northing\",NORTH],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27232\"]]");
    p = add_epsg_def_ex (filter, first, last, 27258, "epsg", 27258,
        "NZGD49 / UTM zone 58S", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=intl +towgs84=59.47,-5.");
    add_proj4text (p, 1,
        "04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / UTM zone 58S\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",165],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2725");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 27259, "epsg", 27259,
        "NZGD49 / UTM zone 59S", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=intl +towgs84=59.47,-5.");
    add_proj4text (p, 1,
        "04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / UTM zone 59S\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",171],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2725");
    add_srs_wkt (p, 14,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 27260, "epsg", 27260,
        "NZGD49 / UTM zone 60S", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +south +ellps=intl +towgs84=59.47,-5.");
    add_proj4text (p, 1,
        "04,187.44,0.47,-0.1,1.024,-4.5993 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / UTM zone 60S\",GEOGCS[\"NZGD49\",DATUM");
    add_srs_wkt (p, 1,
        "[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Internat");
    add_srs_wkt (p, 2,
        "ional 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",177],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",10000000],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2726");
    add_srs_wkt (p, 14,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 27291, "epsg", 27291,
        "NZGD49 / North Island Grid", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "British yard (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-39 +lon_0=175.5 +k=1 +x_0=274319.524");
    add_proj4text (p, 1,
        "3848086 +y_0=365759.3658464114 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +to_meter=0.91439");
    add_proj4text (p, 3,
        "84146160287 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / North Island Grid\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-39],PARAMETER[\"central_meridian\",175.");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",300000],PARAMETER[\"false_northing\",400000],UNIT[\"");
    add_srs_wkt (p, 12,
        "British yard (Sears 1922)\",0.9143984146160287,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9040\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 14,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"27291\"]]");
    p = add_epsg_def_ex (filter, first, last, 27292, "epsg", 27292,
        "NZGD49 / South Island Grid", 0, 0,
        "International 1924", "Greenwich",
        "New_Zealand_Geodetic_Datum_1949", "Transverse_Mercator", "British yard (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-44 +lon_0=171.5 +k=1 +x_0=457199.207");
    add_proj4text (p, 1,
        "3080143 +y_0=457199.2073080143 +ellps=intl +towgs84=59.4");
    add_proj4text (p, 2,
        "7,-5.04,187.44,0.47,-0.1,1.024,-4.5993 +to_meter=0.91439");
    add_proj4text (p, 3,
        "84146160287 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NZGD49 / South Island Grid\",GEOGCS[\"NZGD49\",");
    add_srs_wkt (p, 1,
        "DATUM[\"New_Zealand_Geodetic_Datum_1949\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6272\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4272\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",-44],PARAMETER[\"central_meridian\",171.");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",500000],PARAMETER[\"false_northing\",500000],UNIT[\"");
    add_srs_wkt (p, 12,
        "British yard (Sears 1922)\",0.9143984146160287,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9040\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 14,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"27292\"]]");
    p = add_epsg_def_ex (filter, first, last, 27391, "epsg", 27391,
        "NGO 1948 (Oslo) / NGO zone I", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=-4.666666666666667 +k=1 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=");
    add_proj4text (p, 2,
        "278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone I\",GEOGCS[\"NGO 194");
    add_srs_wkt (p, 1,
        "8 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mod");
    add_srs_wkt (p, 2,
        "ified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "5\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.72291666666");
    add_srs_wkt (p, 5,
        "667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.0174");
    add_srs_wkt (p, 6,
        "532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitu");
    add_srs_wkt (p, 7,
        "de\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 8,
        "\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"latitude_of_origin\",58],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 10,
        "\",-4.666666666666667],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27391");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27392, "epsg", 27392,
        "NGO 1948 (Oslo) / NGO zone II", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=-2.333333333333333 +k=1 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=");
    add_proj4text (p, 2,
        "278.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone II\",GEOGCS[\"NGO 19");
    add_srs_wkt (p, 1,
        "48 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mo");
    add_srs_wkt (p, 2,
        "dified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "05\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.7229166666");
    add_srs_wkt (p, 5,
        "6667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-2.333333333333333],PARAMETER[\"scale_factor\",1],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27392");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27393, "epsg", 27393,
        "NGO 1948 (Oslo) / NGO zone III", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=637");
    add_proj4text (p, 1,
        "7492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,7.");
    add_proj4text (p, 2,
        "889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone III\",GEOGCS[\"NGO 1");
    add_srs_wkt (p, 1,
        "948 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel M");
    add_srs_wkt (p, 2,
        "odified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "005\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.722916666");
    add_srs_wkt (p, 5,
        "66667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"y\",EAST],AUTHORITY[\"EPSG\",\"27393\"]]");
    p = add_epsg_def_ex (filter, first, last, 27394, "epsg", 27394,
        "NGO 1948 (Oslo) / NGO zone IV", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=2.5 +k=1 +x_0=0 +y_0=0 +a=6");
    add_proj4text (p, 1,
        "377492.018 +b=6356173.508712696 +towgs84=278.3,93,474.5,");
    add_proj4text (p, 2,
        "7.889,0.05,-6.61,6.21 +pm=oslo +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone IV\",GEOGCS[\"NGO 19");
    add_srs_wkt (p, 1,
        "48 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mo");
    add_srs_wkt (p, 2,
        "dified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "05\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.7229166666");
    add_srs_wkt (p, 5,
        "6667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",2.5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"x\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27394\"]]");
    p = add_epsg_def_ex (filter, first, last, 27395, "epsg", 27395,
        "NGO 1948 (Oslo) / NGO zone V", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=6.166666666666667 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone V\",GEOGCS[\"NGO 194");
    add_srs_wkt (p, 1,
        "8 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mod");
    add_srs_wkt (p, 2,
        "ified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "5\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.72291666666");
    add_srs_wkt (p, 5,
        "667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.0174");
    add_srs_wkt (p, 6,
        "532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitu");
    add_srs_wkt (p, 7,
        "de\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 8,
        "\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"latitude_of_origin\",58],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 10,
        "\",6.166666666666667],PARAMETER[\"scale_factor\",1],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",0],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 12,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27395\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 27396, "epsg", 27396,
        "NGO 1948 (Oslo) / NGO zone VI", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=10.16666666666667 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone VI\",GEOGCS[\"NGO 19");
    add_srs_wkt (p, 1,
        "48 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel Mo");
    add_srs_wkt (p, 2,
        "dified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "05\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.7229166666");
    add_srs_wkt (p, 5,
        "6667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 6,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 7,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",10.16666666666667],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27396");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27397, "epsg", 27397,
        "NGO 1948 (Oslo) / NGO zone VII", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=14.16666666666667 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone VII\",GEOGCS[\"NGO 1");
    add_srs_wkt (p, 1,
        "948 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel M");
    add_srs_wkt (p, 2,
        "odified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "005\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.722916666");
    add_srs_wkt (p, 5,
        "66667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 6,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 7,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 8,
        ",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"latitude_of_origin\",58],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",14.16666666666667],PARAMETER[\"scale_factor\",1],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"27397");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 27398, "epsg", 27398,
        "NGO 1948 (Oslo) / NGO zone VIII", 0, 1,
        "Bessel Modified", "Oslo",
        "NGO_1948_Oslo", "Transverse_Mercator", "metre",
        "x", "North", "y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=58 +lon_0=18.33333333333333 +k=1 +x_0");
    add_proj4text (p, 1,
        "=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +towgs84=2");
    add_proj4text (p, 2,
        "78.3,93,474.5,7.889,0.05,-6.61,6.21 +pm=oslo +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGO 1948 (Oslo) / NGO zone VIII\",GEOGCS[\"NGO ");
    add_srs_wkt (p, 1,
        "1948 (Oslo)\",DATUM[\"NGO_1948_Oslo\",SPHEROID[\"Bessel ");
    add_srs_wkt (p, 2,
        "Modified\",6377492.018,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7005\"]],TOWGS84[278.3,93,474.5,7.889,0.05,-6.61,6.21],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6817\"]],PRIMEM[\"Oslo\",10.72291666");
    add_srs_wkt (p, 5,
        "666667,AUTHORITY[\"EPSG\",\"8913\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 6,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4817\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_origin\",58],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",18.33333333333333],PARAMETER[\"scale_factor\",1],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",0],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"x\",NORTH],AXIS[\"y\",EAST],AUTHORITY[\"EPSG\",\"273");
    add_srs_wkt (p, 14,
        "98\"]]");
    p = add_epsg_def_ex (filter, first, last, 27429, "epsg", 27429,
        "Datum 73 / UTM zone 29N", 0, 0,
        "International 1924", "Greenwich",
        "Datum_73", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=intl +towgs84=-223.237,110.193");
    add_proj4text (p, 1,
        ",36.649,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Datum 73 / UTM zone 29N\",GEOGCS[\"Datum 73\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Datum_73\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-223.237,110");
    add_srs_wkt (p, 3,
        ".193,36.649,0,0,0,0],AUTHORITY[\"EPSG\",\"6274\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4274\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 8,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 12,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"27429\"]]");
    p = add_epsg_def_ex (filter, first, last, 27492, "epsg", 27492,
        "Datum 73 / Modified Portuguese Grid (deprecated)", 0, 1,
        "International 1924", "Greenwich",
        "Datum_73", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111");
    add_proj4text (p, 1,
        "111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=");
    add_proj4text (p, 2,
        "intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Datum 73 / Modified Portuguese Grid (deprecated");
    add_srs_wkt (p, 1,
        ")\",GEOGCS[\"Datum 73\",DATUM[\"Datum_73\",SPHEROID[\"In");
    add_srs_wkt (p, 2,
        "ternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[-223.237,110.193,36.649,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6274\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4274\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",39.66666666666666],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 10,
        ",-8.131906111111112],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",180.598],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",-86.99],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"27492\"]]");
    p = add_epsg_def_ex (filter, first, last, 27493, "epsg", 27493,
        "Datum 73 / Modified Portuguese Grid", 0, 0,
        "International 1924", "Greenwich",
        "Datum_73", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111");
    add_proj4text (p, 1,
        "111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=");
    add_proj4text (p, 2,
        "intl +towgs84=-223.237,110.193,36.649,0,0,0,0 +units=m +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Datum 73 / Modified Portuguese Grid\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Datum 73\",DATUM[\"Datum_73\",SPHEROID[\"International 1");
    add_srs_wkt (p, 2,
        "924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-223.237,110.193,36.649,0,0,0,0],AUTHORITY[\"EPSG\",\"62");
    add_srs_wkt (p, 4,
        "74\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4274\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",39.6666");
    add_srs_wkt (p, 9,
        "6666666666],PARAMETER[\"central_meridian\",-8.1319061111");
    add_srs_wkt (p, 10,
        "11112],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",180.598],PARAMETER[\"false_northing\",-86.99],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"27493\"]]");
    p = add_epsg_def_ex (filter, first, last, 27500, "epsg", 27500,
        "ATF (Paris) / Nord de Guerre", 0, 0,
        "Plessis 1817", "Paris RGS",
        "Ancienne_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=5.399999999999999 +k_0=0.99950908 +x_0=500000");
    add_proj4text (p, 2,
        " +y_0=300000 +a=6376523 +b=6355862.933255573 +pm=2.33720");
    add_proj4text (p, 3,
        "8333333333 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"ATF (Paris) / Nord de Guerre\",GEOGCS[\"ATF (Pa");
    add_srs_wkt (p, 1,
        "ris)\",DATUM[\"Ancienne_Triangulation_Francaise_Paris\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"Plessis 1817\",6376523,308.64,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7027\"]],AUTHORITY[\"EPSG\",\"6901\"]],PRIMEM[\"Pa");
    add_srs_wkt (p, 4,
        "ris RGS\",2.337208333333333,AUTHORITY[\"EPSG\",\"8914\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9105\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4901\"]],PROJECTION[\"Lambert_Co");
    add_srs_wkt (p, 8,
        "nformal_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",55");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",5.999999999999998],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",0.99950908],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",300000],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"27500\"]]");
    p = add_epsg_def_ex (filter, first, last, 27561, "epsg", 27561,
        "NTF (Paris) / Lambert Nord France", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Nord France\",GEOGCS[\"NT");
    add_srs_wkt (p, 1,
        "F (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Par");
    add_srs_wkt (p, 2,
        "is\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021");
    add_srs_wkt (p, 3,
        "2936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,3");
    add_srs_wkt (p, 4,
        "20,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris");
    add_srs_wkt (p, 5,
        "\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\"");
    add_srs_wkt (p, 6,
        ",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[");
    add_srs_wkt (p, 7,
        "\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"");
    add_srs_wkt (p, 8,
        "EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1");
    add_srs_wkt (p, 9,
        "SP\"],PARAMETER[\"latitude_of_origin\",55],PARAMETER[\"c");
    add_srs_wkt (p, 10,
        "entral_meridian\",0],PARAMETER[\"scale_factor\",0.999877");
    add_srs_wkt (p, 11,
        "341],PARAMETER[\"false_easting\",600000],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"27561\"]]");
    p = add_epsg_def_ex (filter, first, last, 27562, "epsg", 27562,
        "NTF (Paris) / Lambert Centre France", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towg");
    add_proj4text (p, 2,
        "s84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Centre France\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "987742],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"27562\"]]");
    p = add_epsg_def_ex (filter, first, last, 27563, "epsg", 27563,
        "NTF (Paris) / Lambert Sud France", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Sud France\",GEOGCS[\"NTF");
    add_srs_wkt (p, 1,
        " (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Pari");
    add_srs_wkt (p, 2,
        "s\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212");
    add_srs_wkt (p, 3,
        "936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,32");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 5,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 6,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",0],PARAMETER[\"scale_factor\",0.9998774");
    add_srs_wkt (p, 11,
        "99],PARAMETER[\"false_easting\",600000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"27563\"]]");
    p = add_epsg_def_ex (filter, first, last, 27564, "epsg", 27564,
        "NTF (Paris) / Lambert Corse", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=185861.36");
    add_proj4text (p, 2,
        "9 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 ");
    add_proj4text (p, 3,
        "+pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert Corse\",GEOGCS[\"NTF (Par");
    add_srs_wkt (p, 1,
        "is)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\",S");
    add_srs_wkt (p, 2,
        "PHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.466021293626");
    add_srs_wkt (p, 3,
        "9,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0,0");
    add_srs_wkt (p, 4,
        ",0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2.3");
    add_srs_wkt (p, 5,
        "3722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.01");
    add_srs_wkt (p, 6,
        "570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Lat");
    add_srs_wkt (p, 7,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 8,
        "\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",46.85],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",0],PARAMETER[\"scale_factor\",0.9999447");
    add_srs_wkt (p, 11,
        "1],PARAMETER[\"false_easting\",234.358],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",185861.369],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"27564\"]]");
    p = add_epsg_def_ex (filter, first, last, 27571, "epsg", 27571,
        "NTF (Paris) / Lambert zone I", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone I\",GEOGCS[\"NTF (Pa");
    add_srs_wkt (p, 1,
        "ris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\",");
    add_srs_wkt (p, 2,
        "SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602129362");
    add_srs_wkt (p, 3,
        "69,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0,");
    add_srs_wkt (p, 4,
        "0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2.");
    add_srs_wkt (p, 5,
        "33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.0");
    add_srs_wkt (p, 6,
        "1570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",55],PARAMETER[\"centr");
    add_srs_wkt (p, 10,
        "al_meridian\",0],PARAMETER[\"scale_factor\",0.999877341]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_easting\",600000],PARAMETER[\"false_n");
    add_srs_wkt (p, 12,
        "orthing\",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"27571\"]]");
    p = add_epsg_def_ex (filter, first, last, 27572, "epsg", 27572,
        "NTF (Paris) / Lambert zone II", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone II\",GEOGCS[\"NTF (P");
    add_srs_wkt (p, 1,
        "aris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 3,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 4,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 5,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 6,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987742");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_easting\",600000],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 14,
        "\"EPSG\",\"27572\"]]");
    p = add_epsg_def_ex (filter, first, last, 27573, "epsg", 27573,
        "NTF (Paris) / Lambert zone III", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone III\",GEOGCS[\"NTF (");
    add_srs_wkt (p, 1,
        "Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 3,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 4,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 5,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 6,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",0],PARAMETER[\"scale_factor\",0.99987749");
    add_srs_wkt (p, 11,
        "9],PARAMETER[\"false_easting\",600000],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 14,
        "[\"EPSG\",\"27573\"]]");
    p = add_epsg_def_ex (filter, first, last, 27574, "epsg", 27574,
        "NTF (Paris) / Lambert zone IV", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.3");
    add_proj4text (p, 2,
        "69 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0");
    add_proj4text (p, 3,
        " +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Lambert zone IV\",GEOGCS[\"NTF (P");
    add_srs_wkt (p, 1,
        "aris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Paris\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212936");
    add_srs_wkt (p, 3,
        "269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,320,0");
    add_srs_wkt (p, 4,
        ",0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\",2");
    add_srs_wkt (p, 5,
        ".33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.");
    add_srs_wkt (p, 6,
        "01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"L");
    add_srs_wkt (p, 7,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 8,
        "SG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 9,
        "\"],PARAMETER[\"latitude_of_origin\",46.85],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",0],PARAMETER[\"scale_factor\",0.99994");
    add_srs_wkt (p, 11,
        "471],PARAMETER[\"false_easting\",234.358],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",4185861.369],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"27574\"]]");
    p = add_epsg_def_ex (filter, first, last, 27581, "epsg", 27581,
        "NTF (Paris) / France I (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France I (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",55],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "9877341],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",1200000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"27581\"]]");
    p = add_epsg_def_ex (filter, first, last, 27582, "epsg", 27582,
        "NTF (Paris) / France II (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +tow");
    add_proj4text (p, 2,
        "gs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France II (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 11,
        "987742],PARAMETER[\"false_easting\",600000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",2200000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 14,
        "ORITY[\"EPSG\",\"27582\"]]");
    p = add_epsg_def_ex (filter, first, last, 27583, "epsg", 27583,
        "NTF (Paris) / France III (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +");
    add_proj4text (p, 2,
        "a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm");
    add_proj4text (p, 3,
        "=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France III (deprecated)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise");
    add_srs_wkt (p, 2,
        "_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46");
    add_srs_wkt (p, 3,
        "60212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-");
    add_srs_wkt (p, 4,
        "60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"P");
    add_srs_wkt (p, 5,
        "aris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"g");
    add_srs_wkt (p, 6,
        "rad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",49],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "999877499],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",3200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"27583\"]]");
    p = add_epsg_def_ex (filter, first, last, 27584, "epsg", 27584,
        "NTF (Paris) / France IV (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.3");
    add_proj4text (p, 2,
        "69 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0");
    add_proj4text (p, 3,
        " +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / France IV (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660");
    add_srs_wkt (p, 3,
        "212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60");
    add_srs_wkt (p, 4,
        ",320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Par");
    add_srs_wkt (p, 5,
        "is\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"gra");
    add_srs_wkt (p, 6,
        "d\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AX");
    add_srs_wkt (p, 7,
        "IS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORIT");
    add_srs_wkt (p, 8,
        "Y[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Con");
    add_srs_wkt (p, 9,
        "ic_1SP\"],PARAMETER[\"latitude_of_origin\",46.85],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".99994471],PARAMETER[\"false_easting\",234.358],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",4185861.369],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"27584\"]]");
    p = add_epsg_def_ex (filter, first, last, 27591, "epsg", 27591,
        "NTF (Paris) / Nord France (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Nord France (deprecated)\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francais");
    add_srs_wkt (p, 2,
        "e_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4");
    add_srs_wkt (p, 3,
        "660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,");
    add_srs_wkt (p, 4,
        "-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 9,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",55],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 11,
        ".999877341],PARAMETER[\"false_easting\",600000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",200000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"27591\"]]");
    p = add_epsg_def_ex (filter, first, last, 27592, "epsg", 27592,
        "NTF (Paris) / Centre France (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.999877");
    add_proj4text (p, 1,
        "42 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towg");
    add_proj4text (p, 2,
        "s84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Centre France (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Franca");
    add_srs_wkt (p, 2,
        "ise_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293");
    add_srs_wkt (p, 3,
        ".4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-16");
    add_srs_wkt (p, 4,
        "8,-60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Paris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"grad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conforma");
    add_srs_wkt (p, 9,
        "l_Conic_1SP\"],PARAMETER[\"latitude_of_origin\",52],PARA");
    add_srs_wkt (p, 10,
        "METER[\"central_meridian\",0],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.99987742],PARAMETER[\"false_easting\",600000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",200000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"27592\"]]");
    p = add_epsg_def_ex (filter, first, last, 27593, "epsg", 27593,
        "NTF (Paris) / Sud France (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=200000 +a");
    add_proj4text (p, 2,
        "=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=");
    add_proj4text (p, 3,
        "paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Sud France (deprecated)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"NTF (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise");
    add_srs_wkt (p, 2,
        "_Paris\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46");
    add_srs_wkt (p, 3,
        "60212936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-");
    add_srs_wkt (p, 4,
        "60,320,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"P");
    add_srs_wkt (p, 5,
        "aris\",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"g");
    add_srs_wkt (p, 6,
        "rad\",0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],");
    add_srs_wkt (p, 7,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 8,
        "ITY[\"EPSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 9,
        "onic_1SP\"],PARAMETER[\"latitude_of_origin\",49],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"central_meridian\",0],PARAMETER[\"scale_factor\",0.");
    add_srs_wkt (p, 11,
        "999877499],PARAMETER[\"false_easting\",600000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"27593\"]]");
    p = add_epsg_def_ex (filter, first, last, 27594, "epsg", 27594,
        "NTF (Paris) / Corse (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Paris",
        "Nouvelle_Triangulation_Francaise_Paris", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000");
    add_proj4text (p, 1,
        "001 +lon_0=0 +k_0=0.99994471 +x_0=234.358 +y_0=185861.36");
    add_proj4text (p, 2,
        "9 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 ");
    add_proj4text (p, 3,
        "+pm=paris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NTF (Paris) / Corse (deprecated)\",GEOGCS[\"NTF");
    add_srs_wkt (p, 1,
        " (Paris)\",DATUM[\"Nouvelle_Triangulation_Francaise_Pari");
    add_srs_wkt (p, 2,
        "s\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.4660212");
    add_srs_wkt (p, 3,
        "936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-168,-60,32");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6807\"]],PRIMEM[\"Paris\"");
    add_srs_wkt (p, 5,
        ",2.33722917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",");
    add_srs_wkt (p, 6,
        "0.01570796326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4807\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"latitude_of_origin\",46.85],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "central_meridian\",0],PARAMETER[\"scale_factor\",0.99994");
    add_srs_wkt (p, 11,
        "471],PARAMETER[\"false_easting\",234.358],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",185861.369],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"27594\"]]");
    p = add_epsg_def_ex (filter, first, last, 27700, "epsg", 27700,
        "OSGB 1936 / British National Grid", 0, 0,
        "Airy 1830", "Greenwich",
        "OSGB_1936", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400");
    add_proj4text (p, 1,
        "000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,5");
    add_proj4text (p, 2,
        "42.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"OSGB 1936 / British National Grid\",GEOGCS[\"OS");
    add_srs_wkt (p, 1,
        "GB 1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy 1830\",637");
    add_srs_wkt (p, 2,
        "7563.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6277\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4277\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",49],PARAMETER[\"central_meridian\",-2],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.9996012717],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",400000],PARAMETER[\"false_northing\",-100000],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 13,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"27700\"]]");
    p = add_epsg_def_ex (filter, first, last, 28191, "epsg", 28191,
        "Palestine 1923 / Palestine Grid", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=31.73409694444445 +lon_0=35.2120805555");
    add_proj4text (p, 1,
        "5556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6");
    add_proj4text (p, 2,
        "356566.435 +towgs84=-275.7224,94.7824,340.8944,-8.001,-4");
    add_proj4text (p, 3,
        ".42,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Palestine Grid\",GEOGCS[\"Pale");
    add_srs_wkt (p, 1,
        "stine 1923\",DATUM[\"Palestine_1923\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (Benoit)\",6378300.789,293.4663155389811,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7010\"]],TOWGS84[-275.7224,94.7824,340.8944,-");
    add_srs_wkt (p, 4,
        "8.001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6281\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4281\"]],PROJECTION[\"Cassini_Soldner\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",31.73409694444445],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"central_meridian\",35.21208055555556],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",170251.555],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",126867.909],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 13,
        "001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],");
    add_srs_wkt (p, 14,
        "AUTHORITY[\"EPSG\",\"28191\"]]");
    p = add_epsg_def_ex (filter, first, last, 28192, "epsg", 28192,
        "Palestine 1923 / Palestine Belt", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31.73409694444445 +lon_0=35.212080555");
    add_proj4text (p, 1,
        "55556 +k=1 +x_0=170251.555 +y_0=1126867.909 +a=6378300.7");
    add_proj4text (p, 2,
        "89 +b=6356566.435 +towgs84=-275.7224,94.7824,340.8944,-8");
    add_proj4text (p, 3,
        ".001,-4.42,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Palestine Belt\",GEOGCS[\"Pale");
    add_srs_wkt (p, 1,
        "stine 1923\",DATUM[\"Palestine_1923\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (Benoit)\",6378300.789,293.4663155389811,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7010\"]],TOWGS84[-275.7224,94.7824,340.8944,-");
    add_srs_wkt (p, 4,
        "8.001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6281\"]],PRI");
    add_srs_wkt (p, 5,
        "MEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4281\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",31.73409694444445");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"central_meridian\",35.21208055555556],PARA");
    add_srs_wkt (p, 11,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",17");
    add_srs_wkt (p, 12,
        "0251.555],PARAMETER[\"false_northing\",1126867.909],UNIT");
    add_srs_wkt (p, 13,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eastin");
    add_srs_wkt (p, 14,
        "g\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "28192\"]]");
    p = add_epsg_def_ex (filter, first, last, 28193, "epsg", 28193,
        "Palestine 1923 / Israeli CS Grid", 0, 0,
        "Clarke 1880 (Benoit)", "Greenwich",
        "Palestine_1923", "Cassini_Soldner", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=31.73409694444445 +lon_0=35.2120805555");
    add_proj4text (p, 1,
        "5556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=");
    add_proj4text (p, 2,
        "6356566.435 +towgs84=-275.7224,94.7824,340.8944,-8.001,-");
    add_proj4text (p, 3,
        "4.42,-11.821,1 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Palestine 1923 / Israeli CS Grid\",GEOGCS[\"Pal");
    add_srs_wkt (p, 1,
        "estine 1923\",DATUM[\"Palestine_1923\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 2,
        " 1880 (Benoit)\",6378300.789,293.4663155389811,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7010\"]],TOWGS84[-275.7224,94.7824,340.8944,");
    add_srs_wkt (p, 4,
        "-8.001,-4.42,-11.821,1],AUTHORITY[\"EPSG\",\"6281\"]],PR");
    add_srs_wkt (p, 5,
        "IMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[");
    add_srs_wkt (p, 6,
        "\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"");
    add_srs_wkt (p, 7,
        "]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUT");
    add_srs_wkt (p, 8,
        "HORITY[\"EPSG\",\"4281\"]],PROJECTION[\"Cassini_Soldner\"");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"latitude_of_origin\",31.73409694444445],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"central_meridian\",35.21208055555556],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_easting\",170251.555],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",1126867.909],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"28193\"]]");
    p = add_epsg_def_ex (filter, first, last, 28232, "epsg", 28232,
        "Pointe Noire / UTM zone 32S", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Congo_1960_Pointe_Noire", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 1,
        "84=-148,51,-291,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pointe Noire / UTM zone 32S\",GEOGCS[\"Pointe N");
    add_srs_wkt (p, 1,
        "oire\",DATUM[\"Congo_1960_Pointe_Noire\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7011\"]],TOWGS84[-148,51,-291,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6282\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4282\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",0.9996],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 13,
        "AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"28232\"]]");
    p = add_epsg_def_ex (filter, first, last, 28348, "epsg", 28348,
        "GDA94 / MGA zone 48", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 48\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",105],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28348\"]]");
    p = add_epsg_def_ex (filter, first, last, 28349, "epsg", 28349,
        "GDA94 / MGA zone 49", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 49\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",111],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28349\"]]");
    p = add_epsg_def_ex (filter, first, last, 28350, "epsg", 28350,
        "GDA94 / MGA zone 50", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 50\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",117],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28350\"]]");
    p = add_epsg_def_ex (filter, first, last, 28351, "epsg", 28351,
        "GDA94 / MGA zone 51", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 51\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",123],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28351\"]]");
    p = add_epsg_def_ex (filter, first, last, 28352, "epsg", 28352,
        "GDA94 / MGA zone 52", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 52\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",129],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28352\"]]");
    p = add_epsg_def_ex (filter, first, last, 28353, "epsg", 28353,
        "GDA94 / MGA zone 53", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 53\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",135],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28353\"]]");
    p = add_epsg_def_ex (filter, first, last, 28354, "epsg", 28354,
        "GDA94 / MGA zone 54", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 54\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",141],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28354\"]]");
    p = add_epsg_def_ex (filter, first, last, 28355, "epsg", 28355,
        "GDA94 / MGA zone 55", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 55\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",147],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28355\"]]");
    p = add_epsg_def_ex (filter, first, last, 28356, "epsg", 28356,
        "GDA94 / MGA zone 56", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 56\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",153],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28356\"]]");
    p = add_epsg_def_ex (filter, first, last, 28357, "epsg", 28357,
        "GDA94 / MGA zone 57", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 57\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",159],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28357\"]]");
    p = add_epsg_def_ex (filter, first, last, 28358, "epsg", 28358,
        "GDA94 / MGA zone 58", 0, 0,
        "GRS 1980", "Greenwich",
        "Geocentric_Datum_of_Australia_1994", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"GDA94 / MGA zone 58\",GEOGCS[\"GDA94\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Geocentric_Datum_of_Australia_1994\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6283\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4283\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",165],PARAMETER[\"scale_factor\",0.9996]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"28358\"]]");
    p = add_epsg_def_ex (filter, first, last, 28402, "epsg", 28402,
        "Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 2 (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"428");
    add_srs_wkt (p, 8,
        "4\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",9],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",2500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[");
    add_srs_wkt (p, 13,
        "\"Y\",EAST],AUTHORITY[\"EPSG\",\"28402\"]]");
    p = add_epsg_def_ex (filter, first, last, 28403, "epsg", 28403,
        "Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=3500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 3 (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"428");
    add_srs_wkt (p, 8,
        "4\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",15]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting");
    add_srs_wkt (p, 11,
        "\",3500000],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 12,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXI");
    add_srs_wkt (p, 13,
        "S[\"Y\",EAST],AUTHORITY[\"EPSG\",\"28403\"]]");
    p = add_epsg_def_ex (filter, first, last, 28404, "epsg", 28404,
        "Pulkovo 1942 / Gauss-Kruger zone 4", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 4\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",21],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",4500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"28404\"]]");
    p = add_epsg_def_ex (filter, first, last, 28405, "epsg", 28405,
        "Pulkovo 1942 / Gauss-Kruger zone 5", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 5\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",27],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",5500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"28405\"]]");
    p = add_epsg_def_ex (filter, first, last, 28406, "epsg", 28406,
        "Pulkovo 1942 / Gauss-Kruger zone 6", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 6\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",33],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",6500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"28406\"]]");
    p = add_epsg_def_ex (filter, first, last, 28407, "epsg", 28407,
        "Pulkovo 1942 / Gauss-Kruger zone 7", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 7\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",39],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",7500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"28407\"]]");
    p = add_epsg_def_ex (filter, first, last, 28408, "epsg", 28408,
        "Pulkovo 1942 / Gauss-Kruger zone 8", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 8\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",45],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",8500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"28408\"]]");
    p = add_epsg_def_ex (filter, first, last, 28409, "epsg", 28409,
        "Pulkovo 1942 / Gauss-Kruger zone 9", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=9500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 9\",GEOGCS[\"P");
    add_srs_wkt (p, 1,
        "ulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassows");
    add_srs_wkt (p, 2,
        "ky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 9,
        "in\",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "cale_factor\",1],PARAMETER[\"false_easting\",9500000],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],");
    add_srs_wkt (p, 13,
        "AUTHORITY[\"EPSG\",\"28409\"]]");
    p = add_epsg_def_ex (filter, first, last, 28410, "epsg", 28410,
        "Pulkovo 1942 / Gauss-Kruger zone 10", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=10500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 10\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",10500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28410\"]]");
    p = add_epsg_def_ex (filter, first, last, 28411, "epsg", 28411,
        "Pulkovo 1942 / Gauss-Kruger zone 11", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=11500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 11\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",63],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",11500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28411\"]]");
    p = add_epsg_def_ex (filter, first, last, 28412, "epsg", 28412,
        "Pulkovo 1942 / Gauss-Kruger zone 12", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=12500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 12\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",69],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",12500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28412\"]]");
    p = add_epsg_def_ex (filter, first, last, 28413, "epsg", 28413,
        "Pulkovo 1942 / Gauss-Kruger zone 13", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=13500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 13\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",75],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",13500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28413\"]]");
    p = add_epsg_def_ex (filter, first, last, 28414, "epsg", 28414,
        "Pulkovo 1942 / Gauss-Kruger zone 14", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=14500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 14\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",81],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",14500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28414\"]]");
    p = add_epsg_def_ex (filter, first, last, 28415, "epsg", 28415,
        "Pulkovo 1942 / Gauss-Kruger zone 15", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=15500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 15\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",87],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",15500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28415\"]]");
    p = add_epsg_def_ex (filter, first, last, 28416, "epsg", 28416,
        "Pulkovo 1942 / Gauss-Kruger zone 16", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=16500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 16\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",93],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",16500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28416\"]]");
    p = add_epsg_def_ex (filter, first, last, 28417, "epsg", 28417,
        "Pulkovo 1942 / Gauss-Kruger zone 17", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=17500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 17\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",99],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "scale_factor\",1],PARAMETER[\"false_easting\",17500000],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"28417\"]]");
    p = add_epsg_def_ex (filter, first, last, 28418, "epsg", 28418,
        "Pulkovo 1942 / Gauss-Kruger zone 18", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=18500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 18\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",105],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",18500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28418\"]]");
    p = add_epsg_def_ex (filter, first, last, 28419, "epsg", 28419,
        "Pulkovo 1942 / Gauss-Kruger zone 19", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=19500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 19\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",19500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28419\"]]");
    p = add_epsg_def_ex (filter, first, last, 28420, "epsg", 28420,
        "Pulkovo 1942 / Gauss-Kruger zone 20", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=20500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 20\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",117],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",20500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28420\"]]");
    p = add_epsg_def_ex (filter, first, last, 28421, "epsg", 28421,
        "Pulkovo 1942 / Gauss-Kruger zone 21", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=21500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 21\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",123],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",21500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28421\"]]");
    p = add_epsg_def_ex (filter, first, last, 28422, "epsg", 28422,
        "Pulkovo 1942 / Gauss-Kruger zone 22", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=22500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 22\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",129],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",22500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28422\"]]");
    p = add_epsg_def_ex (filter, first, last, 28423, "epsg", 28423,
        "Pulkovo 1942 / Gauss-Kruger zone 23", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=23500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 23\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",135],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",23500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28423\"]]");
    p = add_epsg_def_ex (filter, first, last, 28424, "epsg", 28424,
        "Pulkovo 1942 / Gauss-Kruger zone 24", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=24500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 24\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",141],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",24500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28424\"]]");
    p = add_epsg_def_ex (filter, first, last, 28425, "epsg", 28425,
        "Pulkovo 1942 / Gauss-Kruger zone 25", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=25500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 25\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",147],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",25500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28425\"]]");
    p = add_epsg_def_ex (filter, first, last, 28426, "epsg", 28426,
        "Pulkovo 1942 / Gauss-Kruger zone 26", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=26500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 26\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",153],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",26500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28426\"]]");
    p = add_epsg_def_ex (filter, first, last, 28427, "epsg", 28427,
        "Pulkovo 1942 / Gauss-Kruger zone 27", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=27500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 27\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",159],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",27500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28427\"]]");
    p = add_epsg_def_ex (filter, first, last, 28428, "epsg", 28428,
        "Pulkovo 1942 / Gauss-Kruger zone 28", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=28500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 28\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",165],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",28500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28428\"]]");
    p = add_epsg_def_ex (filter, first, last, 28429, "epsg", 28429,
        "Pulkovo 1942 / Gauss-Kruger zone 29", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=29500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 29\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",171],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",29500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28429\"]]");
    p = add_epsg_def_ex (filter, first, last, 28430, "epsg", 28430,
        "Pulkovo 1942 / Gauss-Kruger zone 30", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=30500000 +y_0=");
    add_proj4text (p, 1,
        "0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,");
    add_proj4text (p, 2,
        "-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 30\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",177],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",1],PARAMETER[\"false_easting\",30500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EA");
    add_srs_wkt (p, 13,
        "ST],AUTHORITY[\"EPSG\",\"28430\"]]");
    p = add_epsg_def_ex (filter, first, last, 28431, "epsg", 28431,
        "Pulkovo 1942 / Gauss-Kruger zone 31", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=31500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 31\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-177],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",3150000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28431\"]]");
    p = add_epsg_def_ex (filter, first, last, 28432, "epsg", 28432,
        "Pulkovo 1942 / Gauss-Kruger zone 32", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=32500000 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82");
    add_proj4text (p, 2,
        ",-0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger zone 32\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"Krassow");
    add_srs_wkt (p, 2,
        "sky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7024\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",-171],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",3250000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",E");
    add_srs_wkt (p, 13,
        "AST],AUTHORITY[\"EPSG\",\"28432\"]]");
    p = add_epsg_def_ex (filter, first, last, 28462, "epsg", 28462,
        "Pulkovo 1942 / Gauss-Kruger 2N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=500000 +y_0=0 +e");
    add_proj4text (p, 1,
        "llps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.1");
    add_proj4text (p, 2,
        "2 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 2N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",9],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"scale_factor\",1],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28462\"]]");
    p = add_epsg_def_ex (filter, first, last, 28463, "epsg", 28463,
        "Pulkovo 1942 / Gauss-Kruger 3N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 3N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",15],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28463\"]]");
    p = add_epsg_def_ex (filter, first, last, 28464, "epsg", 28464,
        "Pulkovo 1942 / Gauss-Kruger 4N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 4N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",21],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28464\"]]");
    p = add_epsg_def_ex (filter, first, last, 28465, "epsg", 28465,
        "Pulkovo 1942 / Gauss-Kruger 5N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=27 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 5N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",27],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28465\"]]");
    p = add_epsg_def_ex (filter, first, last, 28466, "epsg", 28466,
        "Pulkovo 1942 / Gauss-Kruger 6N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 6N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",33],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28466\"]]");
    p = add_epsg_def_ex (filter, first, last, 28467, "epsg", 28467,
        "Pulkovo 1942 / Gauss-Kruger 7N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=39 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 7N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",39],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28467\"]]");
    p = add_epsg_def_ex (filter, first, last, 28468, "epsg", 28468,
        "Pulkovo 1942 / Gauss-Kruger 8N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=45 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 8N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",45],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28468\"]]");
    p = add_epsg_def_ex (filter, first, last, 28469, "epsg", 28469,
        "Pulkovo 1942 / Gauss-Kruger 9N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=51 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 9N (deprecated)\",G");
    add_srs_wkt (p, 1,
        "EOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "4\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",0],PARAMETER[\"central_meridian\",51],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1],PARAMETER[\"false_easting\",50");
    add_srs_wkt (p, 11,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",EAST],AUTHORITY[\"EPSG\",\"28469\"]]");
    p = add_epsg_def_ex (filter, first, last, 28470, "epsg", 28470,
        "Pulkovo 1942 / Gauss-Kruger 10N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=57 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 10N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",57],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28470\"]]");
    p = add_epsg_def_ex (filter, first, last, 28471, "epsg", 28471,
        "Pulkovo 1942 / Gauss-Kruger 11N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=63 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 11N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",63],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28471\"]]");
    p = add_epsg_def_ex (filter, first, last, 28472, "epsg", 28472,
        "Pulkovo 1942 / Gauss-Kruger 12N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=69 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 12N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",69],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28472\"]]");
    p = add_epsg_def_ex (filter, first, last, 28473, "epsg", 28473,
        "Pulkovo 1942 / Gauss-Kruger 13N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=75 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 13N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",75],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28473\"]]");
    p = add_epsg_def_ex (filter, first, last, 28474, "epsg", 28474,
        "Pulkovo 1942 / Gauss-Kruger 14N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=81 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 14N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",81],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28474\"]]");
    p = add_epsg_def_ex (filter, first, last, 28475, "epsg", 28475,
        "Pulkovo 1942 / Gauss-Kruger 15N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=87 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 15N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",87],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28475\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
































































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_45 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32243, "epsg", 32243,
        "WGS 72 / UTM zone 43N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 43N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",75],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32243");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32244, "epsg", 32244,
        "WGS 72 / UTM zone 44N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 44N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",81],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32244");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32245, "epsg", 32245,
        "WGS 72 / UTM zone 45N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 45N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",87],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32245");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32246, "epsg", 32246,
        "WGS 72 / UTM zone 46N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 46N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",93],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32246");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32247, "epsg", 32247,
        "WGS 72 / UTM zone 47N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 47N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",99],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32247");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32248, "epsg", 32248,
        "WGS 72 / UTM zone 48N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 48N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",105]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3224");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32249, "epsg", 32249,
        "WGS 72 / UTM zone 49N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 49N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",111]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3224");
    add_srs_wkt (p, 13,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 32250, "epsg", 32250,
        "WGS 72 / UTM zone 50N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 50N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",117]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 32251, "epsg", 32251,
        "WGS 72 / UTM zone 51N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 51N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",123]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 32252, "epsg", 32252,
        "WGS 72 / UTM zone 52N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 52N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",129]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 32253, "epsg", 32253,
        "WGS 72 / UTM zone 53N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 53N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",135]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 32254, "epsg", 32254,
        "WGS 72 / UTM zone 54N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 54N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",141]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 32255, "epsg", 32255,
        "WGS 72 / UTM zone 55N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 55N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",147]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 32256, "epsg", 32256,
        "WGS 72 / UTM zone 56N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 56N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",153]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32257, "epsg", 32257,
        "WGS 72 / UTM zone 57N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 57N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",159]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32258, "epsg", 32258,
        "WGS 72 / UTM zone 58N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 58N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",165]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32259, "epsg", 32259,
        "WGS 72 / UTM zone 59N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 59N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",171]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 32260, "epsg", 32260,
        "WGS 72 / UTM zone 60N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 60N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",177]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3226");
    add_srs_wkt (p, 13,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 32301, "epsg", 32301,
        "WGS 72 / UTM zone 1S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 1S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32301\"]]");
    p = add_epsg_def_ex (filter, first, last, 32302, "epsg", 32302,
        "WGS 72 / UTM zone 2S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 2S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32302\"]]");
    p = add_epsg_def_ex (filter, first, last, 32303, "epsg", 32303,
        "WGS 72 / UTM zone 3S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 3S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-165],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32303\"]]");
    p = add_epsg_def_ex (filter, first, last, 32304, "epsg", 32304,
        "WGS 72 / UTM zone 4S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 4S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-159],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32304\"]]");
    p = add_epsg_def_ex (filter, first, last, 32305, "epsg", 32305,
        "WGS 72 / UTM zone 5S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 5S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-153],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32305\"]]");
    p = add_epsg_def_ex (filter, first, last, 32306, "epsg", 32306,
        "WGS 72 / UTM zone 6S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 6S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-147],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32306\"]]");
    p = add_epsg_def_ex (filter, first, last, 32307, "epsg", 32307,
        "WGS 72 / UTM zone 7S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 7S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32307\"]]");
    p = add_epsg_def_ex (filter, first, last, 32308, "epsg", 32308,
        "WGS 72 / UTM zone 8S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 8S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-135],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32308\"]]");
    p = add_epsg_def_ex (filter, first, last, 32309, "epsg", 32309,
        "WGS 72 / UTM zone 9S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 9S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-129],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32309\"]]");
    p = add_epsg_def_ex (filter, first, last, 32310, "epsg", 32310,
        "WGS 72 / UTM zone 10S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 10S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-123");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32310\"]]");
    p = add_epsg_def_ex (filter, first, last, 32311, "epsg", 32311,
        "WGS 72 / UTM zone 11S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 11S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-117");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32311\"]]");
    p = add_epsg_def_ex (filter, first, last, 32312, "epsg", 32312,
        "WGS 72 / UTM zone 12S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 12S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-111");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32312\"]]");
    p = add_epsg_def_ex (filter, first, last, 32313, "epsg", 32313,
        "WGS 72 / UTM zone 13S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 13S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-105");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32313\"]]");
    p = add_epsg_def_ex (filter, first, last, 32314, "epsg", 32314,
        "WGS 72 / UTM zone 14S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 14S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-99]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32314\"]]");
    p = add_epsg_def_ex (filter, first, last, 32315, "epsg", 32315,
        "WGS 72 / UTM zone 15S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 15S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-93]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32315\"]]");
    p = add_epsg_def_ex (filter, first, last, 32316, "epsg", 32316,
        "WGS 72 / UTM zone 16S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 16S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-87]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32316\"]]");
    p = add_epsg_def_ex (filter, first, last, 32317, "epsg", 32317,
        "WGS 72 / UTM zone 17S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 17S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32317\"]]");
    p = add_epsg_def_ex (filter, first, last, 32318, "epsg", 32318,
        "WGS 72 / UTM zone 18S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 18S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32318\"]]");
    p = add_epsg_def_ex (filter, first, last, 32319, "epsg", 32319,
        "WGS 72 / UTM zone 19S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 19S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32319\"]]");
    p = add_epsg_def_ex (filter, first, last, 32320, "epsg", 32320,
        "WGS 72 / UTM zone 20S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 20S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32320\"]]");
    p = add_epsg_def_ex (filter, first, last, 32321, "epsg", 32321,
        "WGS 72 / UTM zone 21S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 21S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32321\"]]");
    p = add_epsg_def_ex (filter, first, last, 32322, "epsg", 32322,
        "WGS 72 / UTM zone 22S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 22S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32322\"]]");
    p = add_epsg_def_ex (filter, first, last, 32323, "epsg", 32323,
        "WGS 72 / UTM zone 23S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 23S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-45]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32323\"]]");
    p = add_epsg_def_ex (filter, first, last, 32324, "epsg", 32324,
        "WGS 72 / UTM zone 24S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 24S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-39]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32324\"]]");
    p = add_epsg_def_ex (filter, first, last, 32325, "epsg", 32325,
        "WGS 72 / UTM zone 25S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 25S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-33]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32325\"]]");
    p = add_epsg_def_ex (filter, first, last, 32326, "epsg", 32326,
        "WGS 72 / UTM zone 26S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 26S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-27]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32326\"]]");
    p = add_epsg_def_ex (filter, first, last, 32327, "epsg", 32327,
        "WGS 72 / UTM zone 27S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 27S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-21]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32327\"]]");
    p = add_epsg_def_ex (filter, first, last, 32328, "epsg", 32328,
        "WGS 72 / UTM zone 28S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 28S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-15]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32328\"]]");
    p = add_epsg_def_ex (filter, first, last, 32329, "epsg", 32329,
        "WGS 72 / UTM zone 29S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 29S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-9],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32329\"]]");
    p = add_epsg_def_ex (filter, first, last, 32330, "epsg", 32330,
        "WGS 72 / UTM zone 30S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 30S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-3],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32330\"]]");
    p = add_epsg_def_ex (filter, first, last, 32331, "epsg", 32331,
        "WGS 72 / UTM zone 31S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 31S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",3],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",10000000],UNI");
    add_srs_wkt (p, 11,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 12,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32331\"]]");
    p = add_epsg_def_ex (filter, first, last, 32332, "epsg", 32332,
        "WGS 72 / UTM zone 32S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 32S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",9],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",10000000],UNI");
    add_srs_wkt (p, 11,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 12,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32332\"]]");
    p = add_epsg_def_ex (filter, first, last, 32333, "epsg", 32333,
        "WGS 72 / UTM zone 33S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 33S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",15],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32333\"]]");
    p = add_epsg_def_ex (filter, first, last, 32334, "epsg", 32334,
        "WGS 72 / UTM zone 34S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 34S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",21],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32334\"]]");
    p = add_epsg_def_ex (filter, first, last, 32335, "epsg", 32335,
        "WGS 72 / UTM zone 35S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 35S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",27],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32335\"]]");
    p = add_epsg_def_ex (filter, first, last, 32336, "epsg", 32336,
        "WGS 72 / UTM zone 36S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 36S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32336\"]]");
    p = add_epsg_def_ex (filter, first, last, 32337, "epsg", 32337,
        "WGS 72 / UTM zone 37S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 37S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",39],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32337\"]]");
    p = add_epsg_def_ex (filter, first, last, 32338, "epsg", 32338,
        "WGS 72 / UTM zone 38S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 38S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32338\"]]");
    p = add_epsg_def_ex (filter, first, last, 32339, "epsg", 32339,
        "WGS 72 / UTM zone 39S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 39S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",51],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32339\"]]");
    p = add_epsg_def_ex (filter, first, last, 32340, "epsg", 32340,
        "WGS 72 / UTM zone 40S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 40S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",57],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32340\"]]");
    p = add_epsg_def_ex (filter, first, last, 32341, "epsg", 32341,
        "WGS 72 / UTM zone 41S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 41S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",63],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32341\"]]");
    p = add_epsg_def_ex (filter, first, last, 32342, "epsg", 32342,
        "WGS 72 / UTM zone 42S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 42S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",69],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32342\"]]");
    p = add_epsg_def_ex (filter, first, last, 32343, "epsg", 32343,
        "WGS 72 / UTM zone 43S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 43S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",75],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32343\"]]");
    p = add_epsg_def_ex (filter, first, last, 32344, "epsg", 32344,
        "WGS 72 / UTM zone 44S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 44S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",81],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32344\"]]");
    p = add_epsg_def_ex (filter, first, last, 32345, "epsg", 32345,
        "WGS 72 / UTM zone 45S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 45S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",87],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32345\"]]");
    p = add_epsg_def_ex (filter, first, last, 32346, "epsg", 32346,
        "WGS 72 / UTM zone 46S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 46S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",93],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32346\"]]");
    p = add_epsg_def_ex (filter, first, last, 32347, "epsg", 32347,
        "WGS 72 / UTM zone 47S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 47S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",99],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32347\"]]");
    p = add_epsg_def_ex (filter, first, last, 32348, "epsg", 32348,
        "WGS 72 / UTM zone 48S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 48S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",105]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32348\"]]");
    p = add_epsg_def_ex (filter, first, last, 32349, "epsg", 32349,
        "WGS 72 / UTM zone 49S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 49S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",111]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32349\"]]");
    p = add_epsg_def_ex (filter, first, last, 32350, "epsg", 32350,
        "WGS 72 / UTM zone 50S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 50S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",117]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32350\"]]");
    p = add_epsg_def_ex (filter, first, last, 32351, "epsg", 32351,
        "WGS 72 / UTM zone 51S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 51S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",123]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32351\"]]");
    p = add_epsg_def_ex (filter, first, last, 32352, "epsg", 32352,
        "WGS 72 / UTM zone 52S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 52S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",129]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32352\"]]");
    p = add_epsg_def_ex (filter, first, last, 32353, "epsg", 32353,
        "WGS 72 / UTM zone 53S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 53S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",135]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32353\"]]");
    p = add_epsg_def_ex (filter, first, last, 32354, "epsg", 32354,
        "WGS 72 / UTM zone 54S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 54S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",141]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32354\"]]");
    p = add_epsg_def_ex (filter, first, last, 32355, "epsg", 32355,
        "WGS 72 / UTM zone 55S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 55S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",147]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32355\"]]");
    p = add_epsg_def_ex (filter, first, last, 32356, "epsg", 32356,
        "WGS 72 / UTM zone 56S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 56S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",153]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32356\"]]");
    p = add_epsg_def_ex (filter, first, last, 32357, "epsg", 32357,
        "WGS 72 / UTM zone 57S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 57S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",159]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32357\"]]");
    p = add_epsg_def_ex (filter, first, last, 32358, "epsg", 32358,
        "WGS 72 / UTM zone 58S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 58S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",165]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32358\"]]");
    p = add_epsg_def_ex (filter, first, last, 32359, "epsg", 32359,
        "WGS 72 / UTM zone 59S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 59S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",171]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32359\"]]");
    p = add_epsg_def_ex (filter, first, last, 32360, "epsg", 32360,
        "WGS 72 / UTM zone 60S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 60S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",177]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32360\"]]");
    p = add_epsg_def_ex (filter, first, last, 32401, "epsg", 32401,
        "WGS 72BE / UTM zone 1N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 1N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-177],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32401\"]]");
    p = add_epsg_def_ex (filter, first, last, 32402, "epsg", 32402,
        "WGS 72BE / UTM zone 2N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 2N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-171],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32402\"]]");
    p = add_epsg_def_ex (filter, first, last, 32403, "epsg", 32403,
        "WGS 72BE / UTM zone 3N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 3N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-165],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32403\"]]");
    p = add_epsg_def_ex (filter, first, last, 32404, "epsg", 32404,
        "WGS 72BE / UTM zone 4N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 4N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-159],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32404\"]]");
    p = add_epsg_def_ex (filter, first, last, 32405, "epsg", 32405,
        "WGS 72BE / UTM zone 5N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 5N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-153],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32405\"]]");
    p = add_epsg_def_ex (filter, first, last, 32406, "epsg", 32406,
        "WGS 72BE / UTM zone 6N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 6N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-147],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32406\"]]");
    p = add_epsg_def_ex (filter, first, last, 32407, "epsg", 32407,
        "WGS 72BE / UTM zone 7N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 7N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-141],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32407\"]]");
    p = add_epsg_def_ex (filter, first, last, 32408, "epsg", 32408,
        "WGS 72BE / UTM zone 8N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 8N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-135],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32408\"]]");
    p = add_epsg_def_ex (filter, first, last, 32409, "epsg", 32409,
        "WGS 72BE / UTM zone 9N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 9N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-129],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32409\"]]");
    p = add_epsg_def_ex (filter, first, last, 32410, "epsg", 32410,
        "WGS 72BE / UTM zone 10N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 10N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-123],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32410\"]]");
    p = add_epsg_def_ex (filter, first, last, 32411, "epsg", 32411,
        "WGS 72BE / UTM zone 11N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 11N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-117],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32411\"]]");
    p = add_epsg_def_ex (filter, first, last, 32412, "epsg", 32412,
        "WGS 72BE / UTM zone 12N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 12N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32412\"]]");
    p = add_epsg_def_ex (filter, first, last, 32413, "epsg", 32413,
        "WGS 72BE / UTM zone 13N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 13N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-105],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32413\"]]");
    p = add_epsg_def_ex (filter, first, last, 32414, "epsg", 32414,
        "WGS 72BE / UTM zone 14N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 14N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32414\"]]");
    p = add_epsg_def_ex (filter, first, last, 32415, "epsg", 32415,
        "WGS 72BE / UTM zone 15N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 15N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32415\"]]");
    p = add_epsg_def_ex (filter, first, last, 32416, "epsg", 32416,
        "WGS 72BE / UTM zone 16N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 16N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32416\"]]");
    p = add_epsg_def_ex (filter, first, last, 32417, "epsg", 32417,
        "WGS 72BE / UTM zone 17N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 17N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32417\"]]");
    p = add_epsg_def_ex (filter, first, last, 32418, "epsg", 32418,
        "WGS 72BE / UTM zone 18N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 18N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32418\"]]");
    p = add_epsg_def_ex (filter, first, last, 32419, "epsg", 32419,
        "WGS 72BE / UTM zone 19N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 19N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32419\"]]");
    p = add_epsg_def_ex (filter, first, last, 32420, "epsg", 32420,
        "WGS 72BE / UTM zone 20N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 20N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32420\"]]");
    p = add_epsg_def_ex (filter, first, last, 32421, "epsg", 32421,
        "WGS 72BE / UTM zone 21N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 21N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32421\"]]");
    p = add_epsg_def_ex (filter, first, last, 32422, "epsg", 32422,
        "WGS 72BE / UTM zone 22N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 22N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32422\"]]");
    p = add_epsg_def_ex (filter, first, last, 32423, "epsg", 32423,
        "WGS 72BE / UTM zone 23N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 23N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32423\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

































































































































































































































































































































Changes to src/srsinit/epsg_inlined_46.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_46 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 28476, "epsg", 28476,
        "Pulkovo 1942 / Gauss-Kruger 16N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=93 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 16N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",93],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28476\"]]");
    p = add_epsg_def_ex (filter, first, last, 28477, "epsg", 28477,
        "Pulkovo 1942 / Gauss-Kruger 17N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=99 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0.");
    add_proj4text (p, 2,
        "12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 17N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",99],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",");
    add_srs_wkt (p, 11,
        "500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28477\"]]");
    p = add_epsg_def_ex (filter, first, last, 28478, "epsg", 28478,
        "Pulkovo 1942 / Gauss-Kruger 18N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 18N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",105],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28478\"]]");
    p = add_epsg_def_ex (filter, first, last, 28479, "epsg", 28479,
        "Pulkovo 1942 / Gauss-Kruger 19N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 19N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",111],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28479\"]]");
    p = add_epsg_def_ex (filter, first, last, 28480, "epsg", 28480,
        "Pulkovo 1942 / Gauss-Kruger 20N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 20N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",117],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28480\"]]");
    p = add_epsg_def_ex (filter, first, last, 28481, "epsg", 28481,
        "Pulkovo 1942 / Gauss-Kruger 21N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=123 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 21N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",123],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28481\"]]");
    p = add_epsg_def_ex (filter, first, last, 28482, "epsg", 28482,
        "Pulkovo 1942 / Gauss-Kruger 22N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=129 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 22N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",129],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28482\"]]");
    p = add_epsg_def_ex (filter, first, last, 28483, "epsg", 28483,
        "Pulkovo 1942 / Gauss-Kruger 23N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=135 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 23N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",135],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28483\"]]");
    p = add_epsg_def_ex (filter, first, last, 28484, "epsg", 28484,
        "Pulkovo 1942 / Gauss-Kruger 24N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=141 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 24N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",141],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28484\"]]");
    p = add_epsg_def_ex (filter, first, last, 28485, "epsg", 28485,
        "Pulkovo 1942 / Gauss-Kruger 25N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=147 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 25N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",147],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28485\"]]");
    p = add_epsg_def_ex (filter, first, last, 28486, "epsg", 28486,
        "Pulkovo 1942 / Gauss-Kruger 26N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=153 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 26N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",153],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28486\"]]");
    p = add_epsg_def_ex (filter, first, last, 28487, "epsg", 28487,
        "Pulkovo 1942 / Gauss-Kruger 27N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=159 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 27N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",159],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28487\"]]");
    p = add_epsg_def_ex (filter, first, last, 28488, "epsg", 28488,
        "Pulkovo 1942 / Gauss-Kruger 28N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=165 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 28N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",165],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28488\"]]");
    p = add_epsg_def_ex (filter, first, last, 28489, "epsg", 28489,
        "Pulkovo 1942 / Gauss-Kruger 29N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=171 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 29N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",171],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28489\"]]");
    p = add_epsg_def_ex (filter, first, last, 28490, "epsg", 28490,
        "Pulkovo 1942 / Gauss-Kruger 30N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=177 +k=1 +x_0=500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-0");
    add_proj4text (p, 2,
        ".12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 30N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",177],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28490\"]]");
    p = add_epsg_def_ex (filter, first, last, 28491, "epsg", 28491,
        "Pulkovo 1942 / Gauss-Kruger 31N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-177 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 31N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28491\"]]");
    p = add_epsg_def_ex (filter, first, last, 28492, "epsg", 28492,
        "Pulkovo 1942 / Gauss-Kruger 32N (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Pulkovo_1942", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-171 +k=1 +x_0=500000 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=krass +towgs84=23.92,-141.27,-80.9,0,0.35,0.82,-");
    add_proj4text (p, 2,
        "0.12 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Pulkovo 1942 / Gauss-Kruger 32N (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Pulkovo 1942\",DATUM[\"Pulkovo_1942\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Krassowsky 1940\",6378245,298.3,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "024\"]],TOWGS84[23.92,-141.27,-80.9,0,0.35,0.82,-0.12],A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"6284\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 5,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 6,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 7,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4284\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 12,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",EAST],AUTHORITY[\"EPSG\",\"28492\"]]");
    p = add_epsg_def_ex (filter, first, last, 28600, "epsg", 28600,
        "Qatar 1974 / Qatar National Grid", 0, 0,
        "International 1924", "Greenwich",
        "Qatar_1974", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=24.45 +lon_0=51.21666666666667 +k=0.9");
    add_proj4text (p, 1,
        "9999 +x_0=200000 +y_0=300000 +ellps=intl +towgs84=-128.1");
    add_proj4text (p, 2,
        "6,-282.42,21.93,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Qatar 1974 / Qatar National Grid\",GEOGCS[\"Qat");
    add_srs_wkt (p, 1,
        "ar 1974\",DATUM[\"Qatar_1974\",SPHEROID[\"International ");
    add_srs_wkt (p, 2,
        "1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-128.16,-282.42,21.93,0,0,0,0],AUTHORITY[\"EPSG\",\"628");
    add_srs_wkt (p, 4,
        "5\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4285\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",24.45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",51.21666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.99999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",200000],PARAMETER[\"false_northing\",300000],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"28600\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 28991, "epsg", 28991,
        "Amersfoort / RD Old", 0, 0,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.387638888");
    add_proj4text (p, 1,
        "88889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +towgs84=");
    add_proj4text (p, 2,
        "565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0");
    add_proj4text (p, 3,
        "812 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Amersfoort / RD Old\",GEOGCS[\"Amersfoort\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Amersfoort\",SPHEROID[\"Bessel 1841\",6377397.155,2");
    add_srs_wkt (p, 2,
        "99.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.236");
    add_srs_wkt (p, 3,
        "9,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"lati");
    add_srs_wkt (p, 9,
        "tude_of_origin\",52.15616055555555],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",5.38763888888889],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "0.9999079],PARAMETER[\"false_easting\",0],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"28991\"]]");
    p = add_epsg_def_ex (filter, first, last, 28992, "epsg", 28992,
        "Amersfoort / RD New", 0, 0,
        "Bessel 1841", "Greenwich",
        "Amersfoort", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.387638888");
    add_proj4text (p, 1,
        "88889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel");
    add_proj4text (p, 2,
        " +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1");
    add_proj4text (p, 3,
        ".87035,4.0812 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Amersfoort / RD New\",GEOGCS[\"Amersfoort\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"Amersfoort\",SPHEROID[\"Bessel 1841\",6377397.155,2");
    add_srs_wkt (p, 2,
        "99.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[565.236");
    add_srs_wkt (p, 3,
        "9,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6289\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4289\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"lati");
    add_srs_wkt (p, 9,
        "tude_of_origin\",52.15616055555555],PARAMETER[\"central_");
    add_srs_wkt (p, 10,
        "meridian\",5.38763888888889],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 11,
        "0.9999079],PARAMETER[\"false_easting\",155000],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_northing\",463000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"28992\"]]");
    p = add_epsg_def_ex (filter, first, last, 29100, "epsg", 29100,
        "SAD69 / Brazil Polyconic (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Polyconic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=1000000");
    add_proj4text (p, 1,
        "0 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 2,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / Brazil Polyconic (deprecated)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"SAD69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "GRS 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "36\"]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "291\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Polyco");
    add_srs_wkt (p, 8,
        "nic\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",-54],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 10,
        "00],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\"");
    add_srs_wkt (p, 11,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 12,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"29100\"]]");
    p = add_epsg_def_ex (filter, first, last, 29101, "epsg", 29101,
        "SAD69 / Brazil Polyconic", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Polyconic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=1000000");
    add_proj4text (p, 1,
        "0 +ellps=aust_SA +towgs84=-66.87,4.37,-38.52,0,0,0,0 +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / Brazil Polyconic\",GEOGCS[\"SAD69\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"South_American_Datum_1969\",SPHEROID[\"GRS 1967 Mod");
    add_srs_wkt (p, 2,
        "ified\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"66");
    add_srs_wkt (p, 4,
        "18\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Polycon");
    add_srs_wkt (p, 8,
        "ic\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",-54],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 10,
        "0],PARAMETER[\"false_northing\",10000000],UNIT[\"metre\"");
    add_srs_wkt (p, 11,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 12,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"29101\"]]");
    p = add_epsg_def_ex (filter, first, last, 29118, "epsg", 29118,
        "SAD69 / UTM zone 18N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-75],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29118\"]]");
    p = add_epsg_def_ex (filter, first, last, 29119, "epsg", 29119,
        "SAD69 / UTM zone 19N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-69],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29119\"]]");
    p = add_epsg_def_ex (filter, first, last, 29120, "epsg", 29120,
        "SAD69 / UTM zone 20N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-63],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29120\"]]");
    p = add_epsg_def_ex (filter, first, last, 29121, "epsg", 29121,
        "SAD69 / UTM zone 21N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-57],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29121\"]]");
    p = add_epsg_def_ex (filter, first, last, 29122, "epsg", 29122,
        "SAD69 / UTM zone 22N (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS67 +towgs84=-57,1,-41,0,0,0");
    add_proj4text (p, 1,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22N (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-51],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"29122\"]]");
    p = add_epsg_def_ex (filter, first, last, 29168, "epsg", 29168,
        "SAD69 / UTM zone 18N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29168\"]]");
    p = add_epsg_def_ex (filter, first, last, 29169, "epsg", 29169,
        "SAD69 / UTM zone 19N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-69],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29169\"]]");
    p = add_epsg_def_ex (filter, first, last, 29170, "epsg", 29170,
        "SAD69 / UTM zone 20N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-63],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29170\"]]");
    p = add_epsg_def_ex (filter, first, last, 29171, "epsg", 29171,
        "SAD69 / UTM zone 21N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-57],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29171\"]]");
    p = add_epsg_def_ex (filter, first, last, 29172, "epsg", 29172,
        "SAD69 / UTM zone 22N", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=aust_SA +towgs84=-66.87,4.37,-");
    add_proj4text (p, 1,
        "38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22N\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-51],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29172\"]]");
    p = add_epsg_def_ex (filter, first, last, 29177, "epsg", 29177,
        "SAD69 / UTM zone 17S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 17S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-81],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29177\"]]");
    p = add_epsg_def_ex (filter, first, last, 29178, "epsg", 29178,
        "SAD69 / UTM zone 18S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-75],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29178\"]]");
    p = add_epsg_def_ex (filter, first, last, 29179, "epsg", 29179,
        "SAD69 / UTM zone 19S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-69],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29179\"]]");
    p = add_epsg_def_ex (filter, first, last, 29180, "epsg", 29180,
        "SAD69 / UTM zone 20S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-63],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29180\"]]");
    p = add_epsg_def_ex (filter, first, last, 29181, "epsg", 29181,
        "SAD69 / UTM zone 21S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-57],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29181\"]]");
    p = add_epsg_def_ex (filter, first, last, 29182, "epsg", 29182,
        "SAD69 / UTM zone 22S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-51],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29182\"]]");
    p = add_epsg_def_ex (filter, first, last, 29183, "epsg", 29183,
        "SAD69 / UTM zone 23S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 23S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-45],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29183\"]]");
    p = add_epsg_def_ex (filter, first, last, 29184, "epsg", 29184,
        "SAD69 / UTM zone 24S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 24S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-39],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29184\"]]");
    p = add_epsg_def_ex (filter, first, last, 29185, "epsg", 29185,
        "SAD69 / UTM zone 25S (deprecated)", 0, 0,
        "GRS 1967", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=GRS67 +towgs84=-57,1,-4");
    add_proj4text (p, 1,
        "1,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 25S (deprecated)\",GEOGCS[\"SA");
    add_srs_wkt (p, 1,
        "D69\",DATUM[\"South_American_Datum_1969\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1967\",6378160,298.247167427,AUTHORITY[\"EPSG\",\"7036\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-57,1,-41,0,0,0,0],AUTHORITY[\"EPSG\",\"6291\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9108\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4291\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-33],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29185\"]]");
    p = add_epsg_def_ex (filter, first, last, 29187, "epsg", 29187,
        "SAD69 / UTM zone 17S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 17S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-81],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29187\"]]");
    p = add_epsg_def_ex (filter, first, last, 29188, "epsg", 29188,
        "SAD69 / UTM zone 18S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 18S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29188\"]]");
    p = add_epsg_def_ex (filter, first, last, 29189, "epsg", 29189,
        "SAD69 / UTM zone 19S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 19S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-69],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29189\"]]");
    p = add_epsg_def_ex (filter, first, last, 29190, "epsg", 29190,
        "SAD69 / UTM zone 20S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 20S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-63],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29190\"]]");
    p = add_epsg_def_ex (filter, first, last, 29191, "epsg", 29191,
        "SAD69 / UTM zone 21S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 21S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-57],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29191\"]]");
    p = add_epsg_def_ex (filter, first, last, 29192, "epsg", 29192,
        "SAD69 / UTM zone 22S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 22S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-51],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29192\"]]");
    p = add_epsg_def_ex (filter, first, last, 29193, "epsg", 29193,
        "SAD69 / UTM zone 23S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 23S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-45],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29193\"]]");
    p = add_epsg_def_ex (filter, first, last, 29194, "epsg", 29194,
        "SAD69 / UTM zone 24S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 24S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-39],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29194\"]]");
    p = add_epsg_def_ex (filter, first, last, 29195, "epsg", 29195,
        "SAD69 / UTM zone 25S", 0, 0,
        "GRS 1967 Modified", "Greenwich",
        "South_American_Datum_1969", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=aust_SA +towgs84=-66.87");
    add_proj4text (p, 1,
        ",4.37,-38.52,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SAD69 / UTM zone 25S\",GEOGCS[\"SAD69\",DATUM[\"");
    add_srs_wkt (p, 1,
        "South_American_Datum_1969\",SPHEROID[\"GRS 1967 Modified");
    add_srs_wkt (p, 2,
        "\",6378160,298.25,AUTHORITY[\"EPSG\",\"7050\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "-66.87,4.37,-38.52,0,0,0,0],AUTHORITY[\"EPSG\",\"6618\"]");
    add_srs_wkt (p, 4,
        "],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],U");
    add_srs_wkt (p, 5,
        "NIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 6,
        "122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST");
    add_srs_wkt (p, 7,
        "],AUTHORITY[\"EPSG\",\"4618\"]],PROJECTION[\"Transverse_");
    add_srs_wkt (p, 8,
        "Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-33],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"29195\"]]");
    p = add_epsg_def_ex (filter, first, last, 29220, "epsg", 29220,
        "Sapper Hill 1943 / UTM zone 20S", 0, 0,
        "International 1924", "Greenwich",
        "Sapper_Hill_1943", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=intl +towgs84=-355,21,7");
    add_proj4text (p, 1,
        "2,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sapper Hill 1943 / UTM zone 20S\",GEOGCS[\"Sapp");
    add_srs_wkt (p, 1,
        "er Hill 1943\",DATUM[\"Sapper_Hill_1943\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY[\"EPSG\",\"6292");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4292\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29220\"]]");
    p = add_epsg_def_ex (filter, first, last, 29221, "epsg", 29221,
        "Sapper Hill 1943 / UTM zone 21S", 0, 0,
        "International 1924", "Greenwich",
        "Sapper_Hill_1943", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=intl +towgs84=-355,21,7");
    add_proj4text (p, 1,
        "2,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sapper Hill 1943 / UTM zone 21S\",GEOGCS[\"Sapp");
    add_srs_wkt (p, 1,
        "er Hill 1943\",DATUM[\"Sapper_Hill_1943\",SPHEROID[\"Int");
    add_srs_wkt (p, 2,
        "ernational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[-355,21,72,0,0,0,0],AUTHORITY[\"EPSG\",\"6292");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4292\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"29221\"]]");
    p = add_epsg_def_ex (filter, first, last, 29333, "epsg", 29333,
        "Schwarzeck / UTM zone 33S", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=bess_nam +towgs84=616,9");
    add_proj4text (p, 1,
        "7,-251,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / UTM zone 33S\",GEOGCS[\"Schwarzeck");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\"");
    add_srs_wkt (p, 2,
        ",6377483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046");
    add_srs_wkt (p, 3,
        "\"]],TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6");
    add_srs_wkt (p, 4,
        "293\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901");
    add_srs_wkt (p, 5,
        "\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 6,
        "\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\"");
    add_srs_wkt (p, 7,
        ",EAST],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transv");
    add_srs_wkt (p, 8,
        "erse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",15],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"29333\"]]");
    p = add_epsg_def_ex (filter, first, last, 29371, "epsg", 29371,
        "Schwarzeck / Lo22/11", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=11 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/11\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",11],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29371\"]]");
    p = add_epsg_def_ex (filter, first, last, 29373, "epsg", 29373,
        "Schwarzeck / Lo22/13", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=13 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/13\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",13],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29373\"]]");
    p = add_epsg_def_ex (filter, first, last, 29375, "epsg", 29375,
        "Schwarzeck / Lo22/15", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=15 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/15\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",15],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29375\"]]");
    p = add_epsg_def_ex (filter, first, last, 29377, "epsg", 29377,
        "Schwarzeck / Lo22/17", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=17 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/17\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",17],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29377\"]]");
    p = add_epsg_def_ex (filter, first, last, 29379, "epsg", 29379,
        "Schwarzeck / Lo22/19", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/19\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",19],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29379\"]]");
    p = add_epsg_def_ex (filter, first, last, 29381, "epsg", 29381,
        "Schwarzeck / Lo22/21", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=21 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/21\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",21],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29381\"]]");
    p = add_epsg_def_ex (filter, first, last, 29383, "epsg", 29383,
        "Schwarzeck / Lo22/23", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=23 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/23\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",23],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29383\"]]");
    p = add_epsg_def_ex (filter, first, last, 29385, "epsg", 29385,
        "Schwarzeck / Lo22/25", 0, 0,
        "Bessel Namibia (GLM)", "Greenwich",
        "Schwarzeck", "Transverse_Mercator_South_Orientated", "German legal metre",
        "Y", "West", "X", "South");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=-22 +lon_0=25 +k=1 +x_0=0 +y_0=0 +axi");
    add_proj4text (p, 1,
        "s=wsu +ellps=bess_nam +towgs84=616,97,-251,0,0,0,0 +to_m");
    add_proj4text (p, 2,
        "eter=1.0000135965 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Schwarzeck / Lo22/25\",GEOGCS[\"Schwarzeck\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Schwarzeck\",SPHEROID[\"Bessel Namibia (GLM)\",637");
    add_srs_wkt (p, 2,
        "7483.865280419,299.1528128,AUTHORITY[\"EPSG\",\"7046\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[616,97,-251,0,0,0,0],AUTHORITY[\"EPSG\",\"6293\"");
    add_srs_wkt (p, 4,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 5,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 6,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 7,
        "T],AUTHORITY[\"EPSG\",\"4293\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 8,
        "_Mercator_South_Orientated\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",-22],PARAMETER[\"central_meridian\",25],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_northing\",0],UNIT[\"German legal metre\",");
    add_srs_wkt (p, 12,
        "1.0000135965,AUTHORITY[\"EPSG\",\"9031\"]],AXIS[\"Y\",WE");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"X\",SOUTH],AUTHORITY[\"EPSG\",\"29385\"]]");
    p = add_epsg_def_ex (filter, first, last, 29635, "epsg", 29635,
        "Sudan / UTM zone 35N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Sudan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sudan / UTM zone 35N (deprecated)\",GEOGCS[\"Su");
    add_srs_wkt (p, 1,
        "dan\",DATUM[\"Sudan\",SPHEROID[\"Clarke 1880 (IGN)\",637");
    add_srs_wkt (p, 2,
        "8249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6296\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4296\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",27],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29635\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 29636, "epsg", 29636,
        "Sudan / UTM zone 36N (deprecated)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Sudan", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +a=6378249.2 +b=6356515 +units=m +no_");
    add_proj4text (p, 1,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Sudan / UTM zone 36N (deprecated)\",GEOGCS[\"Su");
    add_srs_wkt (p, 1,
        "dan\",DATUM[\"Sudan\",SPHEROID[\"Clarke 1880 (IGN)\",637");
    add_srs_wkt (p, 2,
        "8249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"7011\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6296\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4296\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",33],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29636\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 29700, "epsg", 29700,
        "Tananarive (Paris) / Laborde Grid (deprecated)", 0, 0,
        "International 1924", "Paris",
        "Tananarive_1925_Paris", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=");
    add_proj4text (p, 1,
        "18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +gamm");
    add_proj4text (p, 2,
        "a=18.9 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=pa");
    add_proj4text (p, 3,
        "ris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive (Paris) / Laborde Grid (deprecated)\"");
    add_srs_wkt (p, 1,
        ",GEOGCS[\"Tananarive (Paris)\",DATUM[\"Tananarive_1925_P");
    add_srs_wkt (p, 2,
        "aris\",SPHEROID[\"International 1924\",6378388,297,AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"7022\"]],TOWGS84[-189,-242,-91,0,0,0,0],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6810\"]],PRIMEM[\"Paris\",2.3372291");
    add_srs_wkt (p, 5,
        "7,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.01570796");
    add_srs_wkt (p, 6,
        "326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"48");
    add_srs_wkt (p, 8,
        "10\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Cent");
    add_srs_wkt (p, 9,
        "er\"],PARAMETER[\"latitude_of_center\",-21],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "longitude_of_center\",49],PARAMETER[\"azimuth\",21],PARA");
    add_srs_wkt (p, 11,
        "METER[\"rectified_grid_angle\",21],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 12,
        "tor\",0.9995],PARAMETER[\"false_easting\",400000],PARAME");
    add_srs_wkt (p, 13,
        "TER[\"false_northing\",800000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 14,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 15,
        ",AUTHORITY[\"EPSG\",\"29700\"]]");
    p = add_epsg_def_ex (filter, first, last, 29702, "epsg", 29702,
        "Tananarive (Paris) / Laborde Grid approximation", 0, 1,
        "International 1924", "Paris",
        "Tananarive_1925_Paris", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=-18.9 +lonc=44.10000000000001 +alpha=");
    add_proj4text (p, 1,
        "18.9 +k=0.9995000000000001 +x_0=400000 +y_0=800000 +gamm");
    add_proj4text (p, 2,
        "a=18.9 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +pm=pa");
    add_proj4text (p, 3,
        "ris +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive (Paris) / Laborde Grid approximation");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"Tananarive (Paris)\",DATUM[\"Tananarive_1925");
    add_srs_wkt (p, 2,
        "_Paris\",SPHEROID[\"International 1924\",6378388,297,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7022\"]],TOWGS84[-189,-242,-91,0,0,0,0");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6810\"]],PRIMEM[\"Paris\",2.33722");
    add_srs_wkt (p, 5,
        "917,AUTHORITY[\"EPSG\",\"8903\"]],UNIT[\"grad\",0.015707");
    add_srs_wkt (p, 6,
        "96326794897,AUTHORITY[\"EPSG\",\"9105\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 7,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4810\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Ce");
    add_srs_wkt (p, 9,
        "nter\"],PARAMETER[\"latitude_of_center\",-21],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"longitude_of_center\",49],PARAMETER[\"azimuth\",21],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",21],PARAMETER[\"scale_f");
    add_srs_wkt (p, 12,
        "actor\",0.9995],PARAMETER[\"false_easting\",400000],PARA");
    add_srs_wkt (p, 13,
        "METER[\"false_northing\",800000],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 15,
        "T],AUTHORITY[\"EPSG\",\"29702\"]]");
    p = add_epsg_def_ex (filter, first, last, 29738, "epsg", 29738,
        "Tananarive / UTM zone 38S", 0, 0,
        "International 1924", "Greenwich",
        "Tananarive_1925", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=intl +towgs84=-189,-242");
    add_proj4text (p, 1,
        ",-91,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive / UTM zone 38S\",GEOGCS[\"Tananarive");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Tananarive_1925\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "189,-242,-91,0,0,0,0],AUTHORITY[\"EPSG\",\"6297\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4297\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",45],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29738\"]]");
    p = add_epsg_def_ex (filter, first, last, 29739, "epsg", 29739,
        "Tananarive / UTM zone 39S", 0, 0,
        "International 1924", "Greenwich",
        "Tananarive_1925", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=intl +towgs84=-189,-242");
    add_proj4text (p, 1,
        ",-91,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tananarive / UTM zone 39S\",GEOGCS[\"Tananarive");
    add_srs_wkt (p, 1,
        "\",DATUM[\"Tananarive_1925\",SPHEROID[\"International 19");
    add_srs_wkt (p, 2,
        "24\",6378388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "189,-242,-91,0,0,0,0],AUTHORITY[\"EPSG\",\"6297\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4297\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",51],PARAMETER[\"scale_factor\",0.9996],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"29739\"]]");
    p = add_epsg_def_ex (filter, first, last, 29849, "epsg", 29849,
        "Timbalai 1948 / UTM zone 49N", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=evrstSS +towgs84=-679,669,-48,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / UTM zone 49N\",GEOGCS[\"Timbala");
    add_srs_wkt (p, 1,
        "i 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1830");
    add_srs_wkt (p, 2,
        " (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",111],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29849\"]]");
    p = add_epsg_def_ex (filter, first, last, 29850, "epsg", 29850,
        "Timbalai 1948 / UTM zone 50N", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=evrstSS +towgs84=-679,669,-48,");
    add_proj4text (p, 1,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / UTM zone 50N\",GEOGCS[\"Timbala");
    add_srs_wkt (p, 1,
        "i 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1830");
    add_srs_wkt (p, 2,
        " (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORITY[");
    add_srs_wkt (p, 4,
        "\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"E");
    add_srs_wkt (p, 5,
        "PSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTH");
    add_srs_wkt (p, 6,
        "ORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[");
    add_srs_wkt (p, 7,
        "\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJEC");
    add_srs_wkt (p, 8,
        "TION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 9,
        "igin\",0],PARAMETER[\"central_meridian\",117],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500");
    add_srs_wkt (p, 11,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[");
    add_srs_wkt (p, 13,
        "\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29850\"]]");
    p = add_epsg_def_ex (filter, first, last, 29871, "epsg", 29871,
        "Timbalai 1948 / RSO Borneo (ch)", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Hotine_Oblique_Mercator_Azimuth_Center", "British chain (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 ");
    add_proj4text (p, 1,
        "+k=0.99984 +x_0=590476.8714630401 +y_0=442857.653094361 ");
    add_proj4text (p, 2,
        "+gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,66");
    add_proj4text (p, 3,
        "9,-48,0,0,0,0 +to_meter=20.11676512155263 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / RSO Borneo (ch)\",GEOGCS[\"Timb");
    add_srs_wkt (p, 1,
        "alai 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 1");
    add_srs_wkt (p, 2,
        "830 (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_center\",4],PARAMETER[\"longitude_of_c");
    add_srs_wkt (p, 10,
        "enter\",115],PARAMETER[\"azimuth\",53.31582047222222],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",53.13010236111111],PARA");
    add_srs_wkt (p, 12,
        "METER[\"scale_factor\",0.99984],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 13,
        "g\",29352.4763],PARAMETER[\"false_northing\",22014.3572]");
    add_srs_wkt (p, 14,
        ",UNIT[\"British chain (Sears 1922)\",20.11676512155263,A");
    add_srs_wkt (p, 15,
        "UTHORITY[\"EPSG\",\"9042\"]],AXIS[\"Easting\",EAST],AXIS");
    add_srs_wkt (p, 16,
        "[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29871\"]]");
    p = add_epsg_def_ex (filter, first, last, 29872, "epsg", 29872,
        "Timbalai 1948 / RSO Borneo (ftSe)", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Hotine_Oblique_Mercator_Azimuth_Center", "British foot (Sears 1922)",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 ");
    add_proj4text (p, 1,
        "+k=0.99984 +x_0=590476.8727431979 +y_0=442857.6545573985");
    add_proj4text (p, 2,
        " +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-679,6");
    add_proj4text (p, 3,
        "69,-48,0,0,0,0 +to_meter=0.3047994715386762 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / RSO Borneo (ftSe)\",GEOGCS[\"Ti");
    add_srs_wkt (p, 1,
        "mbalai 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest");
    add_srs_wkt (p, 2,
        " 1830 (1967 Definition)\",6377298.556,300.8017,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"latitude_of_center\",4],PARAMETER[\"longitude_");
    add_srs_wkt (p, 10,
        "of_center\",115],PARAMETER[\"azimuth\",53.31582047222222");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"rectified_grid_angle\",53.13010236111111],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"scale_factor\",0.99984],PARAMETER[\"false_ea");
    add_srs_wkt (p, 13,
        "sting\",1937263.44],PARAMETER[\"false_northing\",1452947");
    add_srs_wkt (p, 14,
        ".58],UNIT[\"British foot (Sears 1922)\",0.30479947153867");
    add_srs_wkt (p, 15,
        "62,AUTHORITY[\"EPSG\",\"9041\"]],AXIS[\"Easting\",EAST],");
    add_srs_wkt (p, 16,
        "AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29872\"]]");
    p = add_epsg_def_ex (filter, first, last, 29873, "epsg", 29873,
        "Timbalai 1948 / RSO Borneo (m)", 0, 0,
        "Everest 1830 (1967 Definition)", "Greenwich",
        "Timbalai_1948", "Hotine_Oblique_Mercator_Azimuth_Center", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 ");
    add_proj4text (p, 1,
        "+k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010");
    add_proj4text (p, 2,
        "236111111 +ellps=evrstSS +towgs84=-679,669,-48,0,0,0,0 +");
    add_proj4text (p, 3,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Timbalai 1948 / RSO Borneo (m)\",GEOGCS[\"Timba");
    add_srs_wkt (p, 1,
        "lai 1948\",DATUM[\"Timbalai_1948\",SPHEROID[\"Everest 18");
    add_srs_wkt (p, 2,
        "30 (1967 Definition)\",6377298.556,300.8017,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7016\"]],TOWGS84[-679,669,-48,0,0,0,0],AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"6298\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4298\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"latitude_of_center\",4],PARAMETER[\"longitude_of_c");
    add_srs_wkt (p, 10,
        "enter\",115],PARAMETER[\"azimuth\",53.31582047222222],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"rectified_grid_angle\",53.13010236111111],PARA");
    add_srs_wkt (p, 12,
        "METER[\"scale_factor\",0.99984],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 13,
        "g\",590476.87],PARAMETER[\"false_northing\",442857.65],U");
    add_srs_wkt (p, 14,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 15,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 16,
        ",\"29873\"]]");
    p = add_epsg_def_ex (filter, first, last, 29900, "epsg", 29900,
        "TM65 / Irish National Grid (deprecated)", 0, 0,
        "Airy Modified 1849", "Greenwich",
        "TM65", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=20000");
    add_proj4text (p, 1,
        "0 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.");
    add_proj4text (p, 2,
        "6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TM65 / Irish National Grid (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"TM65\",DATUM[\"TM65\",SPHEROID[\"Airy Modified 1849\"");
    add_srs_wkt (p, 2,
        ",6377340.189,299.3249646,AUTHORITY[\"EPSG\",\"7002\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6299\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4299\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",53.5],PARAMETER[\"central_meridian\",-8],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",1.000035],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",200000],PARAMETER[\"false_northing\",250000],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 13,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "29900\"]]");
    p = add_epsg_def_ex (filter, first, last, 29901, "epsg", 29901,
        "OSNI 1952 / Irish National Grid", 0, 0,
        "Airy 1830", "Greenwich",
        "OSNI_1952", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1 +x_0=200000 +y_0=");
    add_proj4text (p, 1,
        "250000 +ellps=airy +towgs84=482.5,-130.6,564.6,-1.042,-0");
    add_proj4text (p, 2,
        ".214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"OSNI 1952 / Irish National Grid\",GEOGCS[\"OSNI");
    add_srs_wkt (p, 1,
        " 1952\",DATUM[\"OSNI_1952\",SPHEROID[\"Airy 1830\",63775");
    add_srs_wkt (p, 2,
        "63.396,299.3249646,AUTHORITY[\"EPSG\",\"7001\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHORITY");
    add_srs_wkt (p, 4,
        "[\"EPSG\",\"6188\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 5,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 6,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 7,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4188\"]],PROJE");
    add_srs_wkt (p, 8,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 9,
        "rigin\",53.5],PARAMETER[\"central_meridian\",-8],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"scale_factor\",1],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",250000],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AX");
    add_srs_wkt (p, 13,
        "IS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"29901\"]]");
    p = add_epsg_def_ex (filter, first, last, 29902, "epsg", 29902,
        "TM65 / Irish Grid", 0, 0,
        "Airy Modified 1849", "Greenwich",
        "TM65", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=20000");
    add_proj4text (p, 1,
        "0 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.");
    add_proj4text (p, 2,
        "6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TM65 / Irish Grid\",GEOGCS[\"TM65\",DATUM[\"TM6");
    add_srs_wkt (p, 1,
        "5\",SPHEROID[\"Airy Modified 1849\",6377340.189,299.3249");
    add_srs_wkt (p, 2,
        "646,AUTHORITY[\"EPSG\",\"7002\"]],TOWGS84[482.5,-130.6,5");
    add_srs_wkt (p, 3,
        "64.6,-1.042,-0.214,-0.631,8.15],AUTHORITY[\"EPSG\",\"629");
    add_srs_wkt (p, 4,
        "9\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4299\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",53.5],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-8],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",1.000035],PARAMETER[\"false_easting\",200000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",250000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Nor");
    add_srs_wkt (p, 13,
        "thing\",NORTH],AUTHORITY[\"EPSG\",\"29902\"]]");
    p = add_epsg_def_ex (filter, first, last, 29903, "epsg", 29903,
        "TM75 / Irish Grid", 0, 0,
        "Airy Modified 1849", "Greenwich",
        "Geodetic_Datum_of_1965", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=53.5 +lon_0=-8 +k=1.000035 +x_0=20000");
    add_proj4text (p, 1,
        "0 +y_0=250000 +ellps=mod_airy +towgs84=482.5,-130.6,564.");
    add_proj4text (p, 2,
        "6,-1.042,-0.214,-0.631,8.15 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TM75 / Irish Grid\",GEOGCS[\"TM75\",DATUM[\"Geo");
    add_srs_wkt (p, 1,
        "detic_Datum_of_1965\",SPHEROID[\"Airy Modified 1849\",63");
    add_srs_wkt (p, 2,
        "77340.189,299.3249646,AUTHORITY[\"EPSG\",\"7002\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],AUTHOR");
    add_srs_wkt (p, 4,
        "ITY[\"EPSG\",\"6300\"]],PRIMEM[\"Greenwich\",0,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,");
    add_srs_wkt (p, 6,
        "AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],A");
    add_srs_wkt (p, 7,
        "XIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4300\"]],PR");
    add_srs_wkt (p, 8,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 9,
        "f_origin\",53.5],PARAMETER[\"central_meridian\",-8],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",1.000035],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",200000],PARAMETER[\"false_northing\",250000],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"299");
    add_srs_wkt (p, 14,
        "03\"]]");
    p = add_epsg_def_ex (filter, first, last, 30161, "epsg", 30161,
        "Tokyo / Japan Plane Rectangular CS I", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=129.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS I\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 4,
        "01\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",33],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",129.5],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"30161\"]]");
    p = add_epsg_def_ex (filter, first, last, 30162, "epsg", 30162,
        "Tokyo / Japan Plane Rectangular CS II", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS II\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",131],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30162\"]]");
    p = add_epsg_def_ex (filter, first, last, 30163, "epsg", 30163,
        "Tokyo / Japan Plane Rectangular CS III", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=132.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS III\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",132.1666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"30163\"]]");
    p = add_epsg_def_ex (filter, first, last, 30164, "epsg", 30164,
        "Tokyo / Japan Plane Rectangular CS IV", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=33 +lon_0=133.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS IV\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",133.5],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30164\"]]");
    p = add_epsg_def_ex (filter, first, last, 30165, "epsg", 30165,
        "Tokyo / Japan Plane Rectangular CS V", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=134.3333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS V\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 4,
        "01\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",134.3333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.9999],PARAMETER[\"false_easting\",0]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"30165\"]]");
    p = add_epsg_def_ex (filter, first, last, 30166, "epsg", 30166,
        "Tokyo / Japan Plane Rectangular CS VI", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS VI\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",136],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30166\"]]");
    p = add_epsg_def_ex (filter, first, last, 30167, "epsg", 30167,
        "Tokyo / Japan Plane Rectangular CS VII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=137.1666666666667 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS VII\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",137.1666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"30167\"]]");
    p = add_epsg_def_ex (filter, first, last, 30168, "epsg", 30168,
        "Tokyo / Japan Plane Rectangular CS VIII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=138.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS VIII\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",138.5],PARAMETER[\"scal");
    add_srs_wkt (p, 10,
        "e_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"30168\"]]");
    p = add_epsg_def_ex (filter, first, last, 30169, "epsg", 30169,
        "Tokyo / Japan Plane Rectangular CS IX", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=36 +lon_0=139.8333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS IX\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",36],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",139.8333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",0.9999],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 11,
        ",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"30169\"]]");
    p = add_epsg_def_ex (filter, first, last, 30170, "epsg", 30170,
        "Tokyo / Japan Plane Rectangular CS X", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=140.8333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=0 +y_0=0 +ellps=bessel +towgs84=-146.414,507.337,6");
    add_proj4text (p, 2,
        "80.507,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS X\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[-");
    add_srs_wkt (p, 3,
        "146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"63");
    add_srs_wkt (p, 4,
        "01\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"");
    add_srs_wkt (p, 5,
        "]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",");
    add_srs_wkt (p, 7,
        "EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Transve");
    add_srs_wkt (p, 8,
        "rse_Mercator\"],PARAMETER[\"latitude_of_origin\",40],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"central_meridian\",140.8333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"scale_factor\",0.9999],PARAMETER[\"false_easting\",0]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 12,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAS");
    add_srs_wkt (p, 13,
        "T],AUTHORITY[\"EPSG\",\"30170\"]]");
    p = add_epsg_def_ex (filter, first, last, 30171, "epsg", 30171,
        "Tokyo / Japan Plane Rectangular CS XI", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44 +lon_0=140.25 +k=0.9999 +x_0=0 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XI\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",44],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",140.25],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"30171\"]]");
    p = add_epsg_def_ex (filter, first, last, 30172, "epsg", 30172,
        "Tokyo / Japan Plane Rectangular CS XII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44 +lon_0=142.25 +k=0.9999 +x_0=0 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XII\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",44],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",142.25],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"30172\"]]");
    p = add_epsg_def_ex (filter, first, last, 30173, "epsg", 30173,
        "Tokyo / Japan Plane Rectangular CS XIII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=44 +lon_0=144.25 +k=0.9999 +x_0=0 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XIII\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",44");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",144.25],PARAMETER[\"sca");
    add_srs_wkt (p, 10,
        "le_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"30173\"]]");
    p = add_epsg_def_ex (filter, first, last, 30174, "epsg", 30174,
        "Tokyo / Japan Plane Rectangular CS XIV", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=142 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XIV\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",142],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30174\"]]");
    p = add_epsg_def_ex (filter, first, last, 30175, "epsg", 30175,
        "Tokyo / Japan Plane Rectangular CS XV", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=127.5 +k=0.9999 +x_0=0 +y_0");
    add_proj4text (p, 1,
        "=0 +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XV\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63773");
    add_srs_wkt (p, 2,
        "97.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",127.5],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30175\"]]");
    p = add_epsg_def_ex (filter, first, last, 30176, "epsg", 30176,
        "Tokyo / Japan Plane Rectangular CS XVI", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=124 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XVI\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",124],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30176\"]]");
    p = add_epsg_def_ex (filter, first, last, 30177, "epsg", 30177,
        "Tokyo / Japan Plane Rectangular CS XVII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=131 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XVII\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",637");
    add_srs_wkt (p, 2,
        "7397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 4,
        "\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8");
    add_srs_wkt (p, 5,
        "901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"E");
    add_srs_wkt (p, 6,
        "PSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitu");
    add_srs_wkt (p, 7,
        "de\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tr");
    add_srs_wkt (p, 8,
        "ansverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"central_meridian\",131],PARAMETER[\"scale_");
    add_srs_wkt (p, 10,
        "factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30177\"]]");
    p = add_epsg_def_ex (filter, first, last, 30178, "epsg", 30178,
        "Tokyo / Japan Plane Rectangular CS XVIII", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=20 +lon_0=136 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XVIII\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",63");
    add_srs_wkt (p, 2,
        "77397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"");
    add_srs_wkt (p, 6,
        "EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longit");
    add_srs_wkt (p, 7,
        "ude\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"T");
    add_srs_wkt (p, 8,
        "ransverse_Mercator\"],PARAMETER[\"latitude_of_origin\",2");
    add_srs_wkt (p, 9,
        "0],PARAMETER[\"central_meridian\",136],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999],PARAMETER[\"false_easting\",0],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"30178\"]]");
    p = add_epsg_def_ex (filter, first, last, 30179, "epsg", 30179,
        "Tokyo / Japan Plane Rectangular CS XIX", 0, 1,
        "Bessel 1841", "Greenwich",
        "Tokyo", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=26 +lon_0=154 +k=0.9999 +x_0=0 +y_0=0");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=-146.414,507.337,680.507,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Tokyo / Japan Plane Rectangular CS XIX\",GEOGCS");
    add_srs_wkt (p, 1,
        "[\"Tokyo\",DATUM[\"Tokyo\",SPHEROID[\"Bessel 1841\",6377");
    add_srs_wkt (p, 2,
        "397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[-146.414,507.337,680.507,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6301\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4301\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",26],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"central_meridian\",154],PARAMETER[\"scale_fa");
    add_srs_wkt (p, 10,
        "ctor\",0.9999],PARAMETER[\"false_easting\",0],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"30179\"]]");
    p = add_epsg_def_ex (filter, first, last, 30200, "epsg", 30200,
        "Trinidad 1903 / Trinidad Grid", 0, 0,
        "Clarke 1858", "Greenwich",
        "Trinidad_1903", "Cassini_Soldner", "Clarke's link",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=cass +lat_0=10.44166666666667 +lon_0=-61.333333333");
    add_proj4text (p, 1,
        "33334 +x_0=86501.46392051999 +y_0=65379.0134283 +a=63782");
    add_proj4text (p, 2,
        "93.645208759 +b=6356617.987679838 +towgs84=-61.702,284.4");
    add_proj4text (p, 3,
        "88,472.052,0,0,0,0 +to_meter=0.201166195164 +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Trinidad 1903 / Trinidad Grid\",GEOGCS[\"Trinid");
    add_srs_wkt (p, 1,
        "ad 1903\",DATUM[\"Trinidad_1903\",SPHEROID[\"Clarke 1858");
    add_srs_wkt (p, 2,
        "\",6378293.645208759,294.2606763692606,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7007\"]],TOWGS84[-61.702,284.488,472.052,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6302\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4302\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Cassini_Soldner\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",10.44166666666667],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 10,
        "n\",-61.33333333333334],PARAMETER[\"false_easting\",4300");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",325000],UNIT[\"Clarke's");
    add_srs_wkt (p, 12,
        " link\",0.201166195164,AUTHORITY[\"EPSG\",\"9039\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 14,
        "EPSG\",\"30200\"]]");
    p = add_epsg_def_ex (filter, first, last, 30339, "epsg", 30339,
        "TC(1948) / UTM zone 39N", 0, 0,
        "Helmert 1906", "Greenwich",
        "Trucial_Coast_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=helmert +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TC(1948) / UTM zone 39N\",GEOGCS[\"TC(1948)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Trucial_Coast_1948\",SPHEROID[\"Helmert 1906\",63");
    add_srs_wkt (p, 2,
        "78200,298.3,AUTHORITY[\"EPSG\",\"7020\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"6303\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4303\"]],PROJECTION[");
    add_srs_wkt (p, 7,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 8,
        ",0],PARAMETER[\"central_meridian\",51],PARAMETER[\"scale");
    add_srs_wkt (p, 9,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 12,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"30339\"]]");
    p = add_epsg_def_ex (filter, first, last, 30340, "epsg", 30340,
        "TC(1948) / UTM zone 40N", 0, 0,
        "Helmert 1906", "Greenwich",
        "Trucial_Coast_1948", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=helmert +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"TC(1948) / UTM zone 40N\",GEOGCS[\"TC(1948)\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Trucial_Coast_1948\",SPHEROID[\"Helmert 1906\",63");
    add_srs_wkt (p, 2,
        "78200,298.3,AUTHORITY[\"EPSG\",\"7020\"]],AUTHORITY[\"EP");
    add_srs_wkt (p, 3,
        "SG\",\"6303\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 5,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 6,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4303\"]],PROJECTION[");
    add_srs_wkt (p, 7,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 8,
        ",0],PARAMETER[\"central_meridian\",57],PARAMETER[\"scale");
    add_srs_wkt (p, 9,
        "_factor\",0.9996],PARAMETER[\"false_easting\",500000],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 11,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 12,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"30340\"]]");
    p = add_epsg_def_ex (filter, first, last, 30491, "epsg", 30491,
        "Voirol 1875 / Nord Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1875", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +towgs");
    add_proj4text (p, 2,
        "84=-73,-247,227,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1875 / Nord Algerie (ancienne)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Voirol 1875\",DATUM[\"Voirol_1875\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7011\"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"6304\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPS");
    add_srs_wkt (p, 5,
        "G\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 6,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 7,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4304\"]],PROJECTI");
    add_srs_wkt (p, 8,
        "ON[\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude");
    add_srs_wkt (p, 9,
        "_of_origin\",36],PARAMETER[\"central_meridian\",2.7],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"scale_factor\",0.999625544],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",300000],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"30491\"]]");
    p = add_epsg_def_ex (filter, first, last, 30492, "epsg", 30492,
        "Voirol 1875 / Sud Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1875", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +t");
    add_proj4text (p, 2,
        "owgs84=-73,-247,227,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1875 / Sud Algerie (ancienne)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Voirol 1875\",DATUM[\"Voirol_1875\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "80 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7011\"]],TOWGS84[-73,-247,227,0,0,0,0],AUTHORITY[\"EP");
    add_srs_wkt (p, 4,
        "SG\",\"6304\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 5,
        ",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 6,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 7,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4304\"]],PROJECTION[");
    add_srs_wkt (p, 8,
        "\"Lambert_Conformal_Conic_1SP\"],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 9,
        "_origin\",33.3],PARAMETER[\"central_meridian\",2.7],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",0.999625769],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",300000],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"30492\"]]");
    p = add_epsg_def_ex (filter, first, last, 30493, "epsg", 30493,
        "Voirol 1879 / Nord Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1879", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +units");
    add_proj4text (p, 2,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1879 / Nord Algerie (ancienne)\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"Voirol 1879\",DATUM[\"Voirol_1879\",SPHEROID[\"Clarke ");
    add_srs_wkt (p, 2,
        "1880 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7011\"]],AUTHORITY[\"EPSG\",\"6671\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4671\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",36],PARAMETER[\"ce");
    add_srs_wkt (p, 9,
        "ntral_meridian\",2.7],PARAMETER[\"scale_factor\",0.99962");
    add_srs_wkt (p, 10,
        "5544],PARAMETER[\"false_easting\",500000],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_northing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"30493\"]]");
}

#endif /* full EPSG initialization enabled/disabled */





|







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649






























































































































































































































































































































/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#include "config.h"

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_46 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32424, "epsg", 32424,
        "WGS 72BE / UTM zone 24N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 24N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32424\"]]");
    p = add_epsg_def_ex (filter, first, last, 32425, "epsg", 32425,
        "WGS 72BE / UTM zone 25N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 25N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32425\"]]");
    p = add_epsg_def_ex (filter, first, last, 32426, "epsg", 32426,
        "WGS 72BE / UTM zone 26N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 26N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32426\"]]");
    p = add_epsg_def_ex (filter, first, last, 32427, "epsg", 32427,
        "WGS 72BE / UTM zone 27N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 27N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32427\"]]");
    p = add_epsg_def_ex (filter, first, last, 32428, "epsg", 32428,
        "WGS 72BE / UTM zone 28N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 28N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32428\"]]");
    p = add_epsg_def_ex (filter, first, last, 32429, "epsg", 32429,
        "WGS 72BE / UTM zone 29N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 29N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32429\"]]");
    p = add_epsg_def_ex (filter, first, last, 32430, "epsg", 32430,
        "WGS 72BE / UTM zone 30N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 30N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32430\"]]");
    p = add_epsg_def_ex (filter, first, last, 32431, "epsg", 32431,
        "WGS 72BE / UTM zone 31N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 31N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32431\"]]");
    p = add_epsg_def_ex (filter, first, last, 32432, "epsg", 32432,
        "WGS 72BE / UTM zone 32N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 32N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32432\"]]");
    p = add_epsg_def_ex (filter, first, last, 32433, "epsg", 32433,
        "WGS 72BE / UTM zone 33N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 33N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32433\"]]");
    p = add_epsg_def_ex (filter, first, last, 32434, "epsg", 32434,
        "WGS 72BE / UTM zone 34N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 34N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32434\"]]");
    p = add_epsg_def_ex (filter, first, last, 32435, "epsg", 32435,
        "WGS 72BE / UTM zone 35N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 35N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32435\"]]");
    p = add_epsg_def_ex (filter, first, last, 32436, "epsg", 32436,
        "WGS 72BE / UTM zone 36N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 36N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32436\"]]");
    p = add_epsg_def_ex (filter, first, last, 32437, "epsg", 32437,
        "WGS 72BE / UTM zone 37N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 37N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32437\"]]");
    p = add_epsg_def_ex (filter, first, last, 32438, "epsg", 32438,
        "WGS 72BE / UTM zone 38N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 38N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32438\"]]");
    p = add_epsg_def_ex (filter, first, last, 32439, "epsg", 32439,
        "WGS 72BE / UTM zone 39N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 39N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32439\"]]");
    p = add_epsg_def_ex (filter, first, last, 32440, "epsg", 32440,
        "WGS 72BE / UTM zone 40N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 40N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32440\"]]");
    p = add_epsg_def_ex (filter, first, last, 32441, "epsg", 32441,
        "WGS 72BE / UTM zone 41N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 41N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32441\"]]");
    p = add_epsg_def_ex (filter, first, last, 32442, "epsg", 32442,
        "WGS 72BE / UTM zone 42N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 42N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32442\"]]");
    p = add_epsg_def_ex (filter, first, last, 32443, "epsg", 32443,
        "WGS 72BE / UTM zone 43N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 43N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32443\"]]");
    p = add_epsg_def_ex (filter, first, last, 32444, "epsg", 32444,
        "WGS 72BE / UTM zone 44N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 44N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32444\"]]");
    p = add_epsg_def_ex (filter, first, last, 32445, "epsg", 32445,
        "WGS 72BE / UTM zone 45N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 45N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32445\"]]");
    p = add_epsg_def_ex (filter, first, last, 32446, "epsg", 32446,
        "WGS 72BE / UTM zone 46N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 46N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32446\"]]");
    p = add_epsg_def_ex (filter, first, last, 32447, "epsg", 32447,
        "WGS 72BE / UTM zone 47N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 47N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32447\"]]");
    p = add_epsg_def_ex (filter, first, last, 32448, "epsg", 32448,
        "WGS 72BE / UTM zone 48N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 48N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",105],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32448\"]]");
    p = add_epsg_def_ex (filter, first, last, 32449, "epsg", 32449,
        "WGS 72BE / UTM zone 49N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 49N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",111],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32449\"]]");
    p = add_epsg_def_ex (filter, first, last, 32450, "epsg", 32450,
        "WGS 72BE / UTM zone 50N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 50N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",117],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32450\"]]");
    p = add_epsg_def_ex (filter, first, last, 32451, "epsg", 32451,
        "WGS 72BE / UTM zone 51N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 51N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",123],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32451\"]]");
    p = add_epsg_def_ex (filter, first, last, 32452, "epsg", 32452,
        "WGS 72BE / UTM zone 52N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 52N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",129],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32452\"]]");
    p = add_epsg_def_ex (filter, first, last, 32453, "epsg", 32453,
        "WGS 72BE / UTM zone 53N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 53N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",135],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32453\"]]");
    p = add_epsg_def_ex (filter, first, last, 32454, "epsg", 32454,
        "WGS 72BE / UTM zone 54N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 54N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",141],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32454\"]]");
    p = add_epsg_def_ex (filter, first, last, 32455, "epsg", 32455,
        "WGS 72BE / UTM zone 55N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 55N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",147],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32455\"]]");
    p = add_epsg_def_ex (filter, first, last, 32456, "epsg", 32456,
        "WGS 72BE / UTM zone 56N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 56N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",153],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32456\"]]");
    p = add_epsg_def_ex (filter, first, last, 32457, "epsg", 32457,
        "WGS 72BE / UTM zone 57N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 57N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",159],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32457\"]]");
    p = add_epsg_def_ex (filter, first, last, 32458, "epsg", 32458,
        "WGS 72BE / UTM zone 58N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 58N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",165],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32458\"]]");
    p = add_epsg_def_ex (filter, first, last, 32459, "epsg", 32459,
        "WGS 72BE / UTM zone 59N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 59N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",171],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32459\"]]");
    p = add_epsg_def_ex (filter, first, last, 32460, "epsg", 32460,
        "WGS 72BE / UTM zone 60N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 60N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",177],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32460\"]]");
    p = add_epsg_def_ex (filter, first, last, 32501, "epsg", 32501,
        "WGS 72BE / UTM zone 1S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 1S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-177],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32501\"]]");
    p = add_epsg_def_ex (filter, first, last, 32502, "epsg", 32502,
        "WGS 72BE / UTM zone 2S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 2S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-171],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32502\"]]");
    p = add_epsg_def_ex (filter, first, last, 32503, "epsg", 32503,
        "WGS 72BE / UTM zone 3S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 3S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-165],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32503\"]]");
    p = add_epsg_def_ex (filter, first, last, 32504, "epsg", 32504,
        "WGS 72BE / UTM zone 4S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 4S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-159],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32504\"]]");
    p = add_epsg_def_ex (filter, first, last, 32505, "epsg", 32505,
        "WGS 72BE / UTM zone 5S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 5S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-153],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32505\"]]");
    p = add_epsg_def_ex (filter, first, last, 32506, "epsg", 32506,
        "WGS 72BE / UTM zone 6S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 6S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-147],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32506\"]]");
    p = add_epsg_def_ex (filter, first, last, 32507, "epsg", 32507,
        "WGS 72BE / UTM zone 7S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 7S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-141],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32507\"]]");
    p = add_epsg_def_ex (filter, first, last, 32508, "epsg", 32508,
        "WGS 72BE / UTM zone 8S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 8S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-135],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32508\"]]");
    p = add_epsg_def_ex (filter, first, last, 32509, "epsg", 32509,
        "WGS 72BE / UTM zone 9S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 9S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-129],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32509\"]]");
    p = add_epsg_def_ex (filter, first, last, 32510, "epsg", 32510,
        "WGS 72BE / UTM zone 10S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 10S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-123],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32510\"]]");
    p = add_epsg_def_ex (filter, first, last, 32511, "epsg", 32511,
        "WGS 72BE / UTM zone 11S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 11S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-117],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32511\"]]");
    p = add_epsg_def_ex (filter, first, last, 32512, "epsg", 32512,
        "WGS 72BE / UTM zone 12S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 12S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32512\"]]");
    p = add_epsg_def_ex (filter, first, last, 32513, "epsg", 32513,
        "WGS 72BE / UTM zone 13S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 13S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-105],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32513\"]]");
    p = add_epsg_def_ex (filter, first, last, 32514, "epsg", 32514,
        "WGS 72BE / UTM zone 14S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 14S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32514\"]]");
    p = add_epsg_def_ex (filter, first, last, 32515, "epsg", 32515,
        "WGS 72BE / UTM zone 15S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 15S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32515\"]]");
    p = add_epsg_def_ex (filter, first, last, 32516, "epsg", 32516,
        "WGS 72BE / UTM zone 16S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 16S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32516\"]]");
    p = add_epsg_def_ex (filter, first, last, 32517, "epsg", 32517,
        "WGS 72BE / UTM zone 17S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 17S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32517\"]]");
    p = add_epsg_def_ex (filter, first, last, 32518, "epsg", 32518,
        "WGS 72BE / UTM zone 18S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 18S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32518\"]]");
    p = add_epsg_def_ex (filter, first, last, 32519, "epsg", 32519,
        "WGS 72BE / UTM zone 19S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 19S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32519\"]]");
    p = add_epsg_def_ex (filter, first, last, 32520, "epsg", 32520,
        "WGS 72BE / UTM zone 20S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 20S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32520\"]]");
    p = add_epsg_def_ex (filter, first, last, 32521, "epsg", 32521,
        "WGS 72BE / UTM zone 21S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 21S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32521\"]]");
    p = add_epsg_def_ex (filter, first, last, 32522, "epsg", 32522,
        "WGS 72BE / UTM zone 22S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 22S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32522\"]]");
    p = add_epsg_def_ex (filter, first, last, 32523, "epsg", 32523,
        "WGS 72BE / UTM zone 23S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 23S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32523\"]]");
    p = add_epsg_def_ex (filter, first, last, 32524, "epsg", 32524,
        "WGS 72BE / UTM zone 24S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 24S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32524\"]]");
    p = add_epsg_def_ex (filter, first, last, 32525, "epsg", 32525,
        "WGS 72BE / UTM zone 25S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 25S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32525\"]]");
    p = add_epsg_def_ex (filter, first, last, 32526, "epsg", 32526,
        "WGS 72BE / UTM zone 26S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 26S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32526\"]]");
    p = add_epsg_def_ex (filter, first, last, 32527, "epsg", 32527,
        "WGS 72BE / UTM zone 27S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 27S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32527\"]]");
    p = add_epsg_def_ex (filter, first, last, 32528, "epsg", 32528,
        "WGS 72BE / UTM zone 28S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 28S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32528\"]]");
    p = add_epsg_def_ex (filter, first, last, 32529, "epsg", 32529,
        "WGS 72BE / UTM zone 29S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 29S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32529\"]]");
    p = add_epsg_def_ex (filter, first, last, 32530, "epsg", 32530,
        "WGS 72BE / UTM zone 30S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 30S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32530\"]]");
    p = add_epsg_def_ex (filter, first, last, 32531, "epsg", 32531,
        "WGS 72BE / UTM zone 31S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 31S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32531\"]]");
    p = add_epsg_def_ex (filter, first, last, 32532, "epsg", 32532,
        "WGS 72BE / UTM zone 32S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 32S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32532\"]]");
    p = add_epsg_def_ex (filter, first, last, 32533, "epsg", 32533,
        "WGS 72BE / UTM zone 33S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 33S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32533\"]]");
    p = add_epsg_def_ex (filter, first, last, 32534, "epsg", 32534,
        "WGS 72BE / UTM zone 34S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 34S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32534\"]]");
    p = add_epsg_def_ex (filter, first, last, 32535, "epsg", 32535,
        "WGS 72BE / UTM zone 35S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 35S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32535\"]]");
    p = add_epsg_def_ex (filter, first, last, 32536, "epsg", 32536,
        "WGS 72BE / UTM zone 36S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 36S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32536\"]]");
    p = add_epsg_def_ex (filter, first, last, 32537, "epsg", 32537,
        "WGS 72BE / UTM zone 37S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 37S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32537\"]]");
    p = add_epsg_def_ex (filter, first, last, 32538, "epsg", 32538,
        "WGS 72BE / UTM zone 38S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 38S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32538\"]]");
    p = add_epsg_def_ex (filter, first, last, 32539, "epsg", 32539,
        "WGS 72BE / UTM zone 39S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 39S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32539\"]]");
    p = add_epsg_def_ex (filter, first, last, 32540, "epsg", 32540,
        "WGS 72BE / UTM zone 40S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 40S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32540\"]]");
    p = add_epsg_def_ex (filter, first, last, 32541, "epsg", 32541,
        "WGS 72BE / UTM zone 41S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 41S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32541\"]]");
    p = add_epsg_def_ex (filter, first, last, 32542, "epsg", 32542,
        "WGS 72BE / UTM zone 42S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 42S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32542\"]]");
    p = add_epsg_def_ex (filter, first, last, 32543, "epsg", 32543,
        "WGS 72BE / UTM zone 43S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 43S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32543\"]]");
    p = add_epsg_def_ex (filter, first, last, 32544, "epsg", 32544,
        "WGS 72BE / UTM zone 44S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 44S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32544\"]]");
    p = add_epsg_def_ex (filter, first, last, 32545, "epsg", 32545,
        "WGS 72BE / UTM zone 45S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 45S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32545\"]]");
    p = add_epsg_def_ex (filter, first, last, 32546, "epsg", 32546,
        "WGS 72BE / UTM zone 46S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 46S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32546\"]]");
    p = add_epsg_def_ex (filter, first, last, 32547, "epsg", 32547,
        "WGS 72BE / UTM zone 47S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 47S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32547\"]]");
    p = add_epsg_def_ex (filter, first, last, 32548, "epsg", 32548,
        "WGS 72BE / UTM zone 48S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 48S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",105],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32548\"]]");
    p = add_epsg_def_ex (filter, first, last, 32549, "epsg", 32549,
        "WGS 72BE / UTM zone 49S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 49S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",111],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32549\"]]");
    p = add_epsg_def_ex (filter, first, last, 32550, "epsg", 32550,
        "WGS 72BE / UTM zone 50S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 50S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",117],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32550\"]]");
    p = add_epsg_def_ex (filter, first, last, 32551, "epsg", 32551,
        "WGS 72BE / UTM zone 51S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 51S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",123],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32551\"]]");
    p = add_epsg_def_ex (filter, first, last, 32552, "epsg", 32552,
        "WGS 72BE / UTM zone 52S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 52S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",129],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32552\"]]");
    p = add_epsg_def_ex (filter, first, last, 32553, "epsg", 32553,
        "WGS 72BE / UTM zone 53S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 53S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",135],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32553\"]]");
    p = add_epsg_def_ex (filter, first, last, 32554, "epsg", 32554,
        "WGS 72BE / UTM zone 54S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 54S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",141],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32554\"]]");
    p = add_epsg_def_ex (filter, first, last, 32555, "epsg", 32555,
        "WGS 72BE / UTM zone 55S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 55S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",147],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32555\"]]");
    p = add_epsg_def_ex (filter, first, last, 32556, "epsg", 32556,
        "WGS 72BE / UTM zone 56S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 56S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",153],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32556\"]]");
    p = add_epsg_def_ex (filter, first, last, 32557, "epsg", 32557,
        "WGS 72BE / UTM zone 57S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 57S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",159],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32557\"]]");
    p = add_epsg_def_ex (filter, first, last, 32558, "epsg", 32558,
        "WGS 72BE / UTM zone 58S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 58S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",165],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32558\"]]");
    p = add_epsg_def_ex (filter, first, last, 32559, "epsg", 32559,
        "WGS 72BE / UTM zone 59S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 59S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",171],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32559\"]]");
    p = add_epsg_def_ex (filter, first, last, 32560, "epsg", 32560,
        "WGS 72BE / UTM zone 60S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 60S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",177],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32560\"]]");
}

#endif /* full EPSG initialization enabled/disabled */































































































































































































































































































































Deleted src/srsinit/epsg_inlined_47.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri

Portions created by the Initial Developer are Copyright (C) 2008
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_47 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 30494, "epsg", 30494,
        "Voirol 1879 / Sud Algerie (ancienne)", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Voirol_1879", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356515 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Voirol 1879 / Sud Algerie (ancienne)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "Voirol 1879\",DATUM[\"Voirol_1879\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "80 (IGN)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7011\"]],AUTHORITY[\"EPSG\",\"6671\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4671\"]],PROJECTION[\"Lambert_Conformal_Conic_1SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",33.3],PARAMETER[\"c");
    add_srs_wkt (p, 9,
        "entral_meridian\",2.7],PARAMETER[\"scale_factor\",0.9996");
    add_srs_wkt (p, 10,
        "25769],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",300000],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"30494\"]]");
    p = add_epsg_def_ex (filter, first, last, 30729, "epsg", 30729,
        "Nord Sahara 1959 / UTM zone 29N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=clrk80 +towgs84=-209.3622,-87.");
    add_proj4text (p, 1,
        "8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 29N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.3622,-87.8162,404.6198,0.0046,3.");
    add_srs_wkt (p, 4,
        "4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",-9],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"30729\"]]");
    p = add_epsg_def_ex (filter, first, last, 30730, "epsg", 30730,
        "Nord Sahara 1959 / UTM zone 30N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=clrk80 +towgs84=-209.3622,-87.");
    add_proj4text (p, 1,
        "8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 30N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.3622,-87.8162,404.6198,0.0046,3.");
    add_srs_wkt (p, 4,
        "4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",-3],PARAMETER[\"scale_factor\",0.9996],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"30730\"]]");
    p = add_epsg_def_ex (filter, first, last, 30731, "epsg", 30731,
        "Nord Sahara 1959 / UTM zone 31N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=clrk80 +towgs84=-209.3622,-87.");
    add_proj4text (p, 1,
        "8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 31N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.3622,-87.8162,404.6198,0.0046,3.");
    add_srs_wkt (p, 4,
        "4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"30731\"]]");
    p = add_epsg_def_ex (filter, first, last, 30732, "epsg", 30732,
        "Nord Sahara 1959 / UTM zone 32N", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=clrk80 +towgs84=-209.3622,-87.");
    add_proj4text (p, 1,
        "8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / UTM zone 32N\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.3622,-87.8162,404.6198,0.0046,3.");
    add_srs_wkt (p, 4,
        "4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4307\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",9],PARAMETER[\"scale_factor\",0.9996],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",500000],PARAMETER[\"false_nort");
    add_srs_wkt (p, 12,
        "hing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORI");
    add_srs_wkt (p, 14,
        "TY[\"EPSG\",\"30732\"]]");
    p = add_epsg_def_ex (filter, first, last, 30791, "epsg", 30791,
        "Nord Sahara 1959 / Nord Algerie", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.99962554");
    add_proj4text (p, 1,
        "4 +x_0=500135 +y_0=300090 +ellps=clrk80 +towgs84=-209.36");
    add_proj4text (p, 2,
        "22,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / Nord Algerie\",GEOGCS[\"Nord");
    add_srs_wkt (p, 1,
        " Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Cla");
    add_srs_wkt (p, 2,
        "rke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 3,
        "\"7012\"]],TOWGS84[-209.3622,-87.8162,404.6198,0.0046,3.");
    add_srs_wkt (p, 4,
        "4784,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4307\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 9,
        "Conic_1SP\"],PARAMETER[\"latitude_of_origin\",36],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"central_meridian\",2.7],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.999625544],PARAMETER[\"false_easting\",500135],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",300090],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"30791\"]]");
    p = add_epsg_def_ex (filter, first, last, 30792, "epsg", 30792,
        "Nord Sahara 1959 / Sud Algerie", 0, 0,
        "Clarke 1880 (RGS)", "Greenwich",
        "Nord_Sahara_1959", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.9996");
    add_proj4text (p, 1,
        "25769 +x_0=500135 +y_0=300090 +ellps=clrk80 +towgs84=-20");
    add_proj4text (p, 2,
        "9.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +u");
    add_proj4text (p, 3,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Nord Sahara 1959 / Sud Algerie\",GEOGCS[\"Nord ");
    add_srs_wkt (p, 1,
        "Sahara 1959\",DATUM[\"Nord_Sahara_1959\",SPHEROID[\"Clar");
    add_srs_wkt (p, 2,
        "ke 1880 (RGS)\",6378249.145,293.465,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7012\"]],TOWGS84[-209.3622,-87.8162,404.6198,0.0046,3.47");
    add_srs_wkt (p, 4,
        "84,0.5805,-1.4547],AUTHORITY[\"EPSG\",\"6307\"]],PRIMEM[");
    add_srs_wkt (p, 5,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 6,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 7,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 8,
        "TY[\"EPSG\",\"4307\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 9,
        "nic_1SP\"],PARAMETER[\"latitude_of_origin\",33.3],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"central_meridian\",2.7],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 11,
        ",0.999625769],PARAMETER[\"false_easting\",500135],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",300090],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"30792\"]]");
    p = add_epsg_def_ex (filter, first, last, 30800, "epsg", 30800,
        "RT38 2.5 gon W (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Stockholm_1938", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=");
    add_proj4text (p, 1,
        "1500000 +y_0=0 +ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"RT38 2.5 gon W (deprecated)\",GEOGCS[\"RT38\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Stockholm_1938\",SPHEROID[\"Bessel 1841\",6377397");
    add_srs_wkt (p, 2,
        ".155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"6308\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"");
    add_srs_wkt (p, 4,
        "EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS");
    add_srs_wkt (p, 6,
        "[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4308\"]],PROJE");
    add_srs_wkt (p, 7,
        "CTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 8,
        "rigin\",0],PARAMETER[\"central_meridian\",15.80827777777");
    add_srs_wkt (p, 9,
        "778],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",1500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH]");
    add_srs_wkt (p, 12,
        ",AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"30800\"]]");
    p = add_epsg_def_ex (filter, first, last, 31028, "epsg", 31028,
        "Yoff / UTM zone 28N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Yoff", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-30,");
    add_proj4text (p, 1,
        "190,89,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Yoff / UTM zone 28N\",GEOGCS[\"Yoff\",DATUM[\"Y");
    add_srs_wkt (p, 1,
        "off\",SPHEROID[\"Clarke 1880 (IGN)\",6378249.2,293.46602");
    add_srs_wkt (p, 2,
        "12936269,AUTHORITY[\"EPSG\",\"7011\"]],TOWGS84[-30,190,8");
    add_srs_wkt (p, 3,
        "9,0,0,0,0],AUTHORITY[\"EPSG\",\"6310\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4310\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-15],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"31028\"]]");
    p = add_epsg_def_ex (filter, first, last, 31121, "epsg", 31121,
        "Zanderij / UTM zone 21N", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=intl +towgs84=-265,120,-358,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / UTM zone 21N\",GEOGCS[\"Zanderij\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Zanderij\",SPHEROID[\"International 1924\",637838");
    add_srs_wkt (p, 2,
        "8,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-35");
    add_srs_wkt (p, 3,
        "8,0,0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4311\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-57],PARAMETER[\"scale_factor\",0.9996],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"false_easting\",500000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 11,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"31121\"]]");
    p = add_epsg_def_ex (filter, first, last, 31154, "epsg", 31154,
        "Zanderij / TM 54 NW", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-54 +k=0.9996 +x_0=500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=intl +towgs84=-265,120,-358,0,0,0,0 +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / TM 54 NW\",GEOGCS[\"Zanderij\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Zanderij\",SPHEROID[\"International 1924\",6378388,29");
    add_srs_wkt (p, 2,
        "7,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-358,0,");
    add_srs_wkt (p, 3,
        "0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4311\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "54],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false");
    add_srs_wkt (p, 10,
        "_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 11,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting");
    add_srs_wkt (p, 12,
        "\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 13,
        "1154\"]]");
    p = add_epsg_def_ex (filter, first, last, 31170, "epsg", 31170,
        "Zanderij / Suriname Old TM", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9996");
    add_proj4text (p, 1,
        " +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0");
    add_proj4text (p, 2,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / Suriname Old TM\",GEOGCS[\"Zanderij\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"Zanderij\",SPHEROID[\"International 1924\",6378");
    add_srs_wkt (p, 2,
        "388,297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-");
    add_srs_wkt (p, 3,
        "358,0,0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4311\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-55.68333333333333],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"31170\"]]");
    p = add_epsg_def_ex (filter, first, last, 31171, "epsg", 31171,
        "Zanderij / Suriname TM", 0, 0,
        "International 1924", "Greenwich",
        "Zanderij", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-55.68333333333333 +k=0.9999");
    add_proj4text (p, 1,
        " +x_0=500000 +y_0=0 +ellps=intl +towgs84=-265,120,-358,0");
    add_proj4text (p, 2,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Zanderij / Suriname TM\",GEOGCS[\"Zanderij\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"Zanderij\",SPHEROID[\"International 1924\",6378388");
    add_srs_wkt (p, 2,
        ",297,AUTHORITY[\"EPSG\",\"7022\"]],TOWGS84[-265,120,-358");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6311\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4311\"]],PROJECTION[\"Transverse_Mercator\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"latitude_of_origin\",0],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 9,
        "an\",-55.68333333333333],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "99],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"31171\"]]");
    p = add_epsg_def_ex (filter, first, last, 31251, "epsg", 31251,
        "MGI (Ferro) / Austria GK West Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=-5000000");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.4");
    add_proj4text (p, 2,
        "74,5.297,2.4232 +pm=ferro +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria GK West Zone\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI (Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferr");
    add_srs_wkt (p, 2,
        "o\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.91");
    add_srs_wkt (p, 4,
        "9,5.137,1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6805\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8909\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",28],PARAMETER[\"scale");
    add_srs_wkt (p, 11,
        "_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",-5000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"31251\"]]");
    p = add_epsg_def_ex (filter, first, last, 31252, "epsg", 31252,
        "MGI (Ferro) / Austria GK Central Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=-5000000");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.4");
    add_proj4text (p, 2,
        "74,5.297,2.4232 +pm=ferro +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria GK Central Zone\",GEOGCS[");
    add_srs_wkt (p, 1,
        "\"MGI (Ferro)\",DATUM[\"Militar_Geographische_Institut_F");
    add_srs_wkt (p, 2,
        "erro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463");
    add_srs_wkt (p, 4,
        ".919,5.137,1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6805");
    add_srs_wkt (p, 5,
        "\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"8909\"]],UNIT[\"degree\",0.0174532925199433,AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"");
    add_srs_wkt (p, 8,
        "Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],PROJECTI");
    add_srs_wkt (p, 9,
        "ON[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",0],PARAMETER[\"central_meridian\",31],PARAMETER[\"s");
    add_srs_wkt (p, 11,
        "cale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",-5000000],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"31252\"]]");
    p = add_epsg_def_ex (filter, first, last, 31253, "epsg", 31253,
        "MGI (Ferro) / Austria GK East Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=-5000000");
    add_proj4text (p, 1,
        " +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.4");
    add_proj4text (p, 2,
        "74,5.297,2.4232 +pm=ferro +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria GK East Zone\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI (Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferr");
    add_srs_wkt (p, 2,
        "o\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.91");
    add_srs_wkt (p, 4,
        "9,5.137,1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6805\"]");
    add_srs_wkt (p, 5,
        "],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 6,
        ",\"8909\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Lon");
    add_srs_wkt (p, 8,
        "gitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],PROJECTION[");
    add_srs_wkt (p, 9,
        "\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 10,
        ",0],PARAMETER[\"central_meridian\",34],PARAMETER[\"scale");
    add_srs_wkt (p, 11,
        "_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",-5000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"31253\"]]");
    p = add_epsg_def_ex (filter, first, last, 31254, "epsg", 31254,
        "MGI / Austria GK West", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,46");
    add_proj4text (p, 2,
        "3.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK West\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",10.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",0],PARAMETER[\"false_northing\",-50000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31254");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31255, "epsg", 31255,
        "MGI / Austria GK Central", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,46");
    add_proj4text (p, 2,
        "3.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK Central\",GEOGCS[\"MGI\",DATUM");
    add_srs_wkt (p, 1,
        "[\"Militar_Geographische_Institute\",SPHEROID[\"Bessel 1");
    add_srs_wkt (p, 2,
        "841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.42");
    add_srs_wkt (p, 4,
        "32],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"43");
    add_srs_wkt (p, 8,
        "12\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",13");
    add_srs_wkt (p, 10,
        ".33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",0],PARAMETER[\"false_northing\",-5000");
    add_srs_wkt (p, 12,
        "000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3125");
    add_srs_wkt (p, 14,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 31256, "epsg", 31256,
        "MGI / Austria GK East", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,46");
    add_proj4text (p, 2,
        "3.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK East\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",16.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",0],PARAMETER[\"false_northing\",-50000");
    add_srs_wkt (p, 12,
        "00],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31256");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31257, "epsg", 31257,
        "MGI / Austria GK M28", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "150000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.1");
    add_proj4text (p, 2,
        "29,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK M28\",GEOGCS[\"MGI\",DATUM[\"M");
    add_srs_wkt (p, 1,
        "ilitar_Geographische_Institute\",SPHEROID[\"Bessel 1841\"");
    add_srs_wkt (p, 2,
        ",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",10.333");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",150000],PARAMETER[\"false_northing\",-500");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"312");
    add_srs_wkt (p, 14,
        "57\"]]");
    p = add_epsg_def_ex (filter, first, last, 31258, "epsg", 31258,
        "MGI / Austria GK M31", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "450000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.1");
    add_proj4text (p, 2,
        "29,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK M31\",GEOGCS[\"MGI\",DATUM[\"M");
    add_srs_wkt (p, 1,
        "ilitar_Geographische_Institute\",SPHEROID[\"Bessel 1841\"");
    add_srs_wkt (p, 2,
        ",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",13.333");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",450000],PARAMETER[\"false_northing\",-500");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"312");
    add_srs_wkt (p, 14,
        "58\"]]");
    p = add_epsg_def_ex (filter, first, last, 31259, "epsg", 31259,
        "MGI / Austria GK M34", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "750000 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.1");
    add_proj4text (p, 2,
        "29,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria GK M34\",GEOGCS[\"MGI\",DATUM[\"M");
    add_srs_wkt (p, 1,
        "ilitar_Geographische_Institute\",SPHEROID[\"Bessel 1841\"");
    add_srs_wkt (p, 2,
        ",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 5,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 6,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 7,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"");
    add_srs_wkt (p, 8,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",16.333");
    add_srs_wkt (p, 10,
        "33333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",750000],PARAMETER[\"false_northing\",-500");
    add_srs_wkt (p, 12,
        "0000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 13,
        "S[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"312");
    add_srs_wkt (p, 14,
        "59\"]]");
    p = add_epsg_def_ex (filter, first, last, 31265, "epsg", 31265,
        "MGI / 3-degree Gauss zone 5 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 5 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",15],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",5500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "265\"]]");
    p = add_epsg_def_ex (filter, first, last, 31266, "epsg", 31266,
        "MGI / 3-degree Gauss zone 6 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=6500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 6 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",18],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",6500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "266\"]]");
    p = add_epsg_def_ex (filter, first, last, 31267, "epsg", 31267,
        "MGI / 3-degree Gauss zone 7 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=1 +x_0=7500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 7 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",21],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",7500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "267\"]]");
    p = add_epsg_def_ex (filter, first, last, 31268, "epsg", 31268,
        "MGI / 3-degree Gauss zone 8 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=1 +x_0=8500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.47");
    add_proj4text (p, 2,
        "4,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / 3-degree Gauss zone 8 (deprecated)\",GEOG");
    add_srs_wkt (p, 1,
        "CS[\"MGI\",DATUM[\"Militar_Geographische_Institute\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[");
    add_srs_wkt (p, 3,
        "\"EPSG\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137");
    add_srs_wkt (p, 4,
        ",1.474,5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIME");
    add_srs_wkt (p, 5,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 6,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 7,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 8,
        "RITY[\"EPSG\",\"4312\"]],PROJECTION[\"Transverse_Mercato");
    add_srs_wkt (p, 9,
        "r\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"cen");
    add_srs_wkt (p, 10,
        "tral_meridian\",24],PARAMETER[\"scale_factor\",1],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",8500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "268\"]]");
    p = add_epsg_def_ex (filter, first, last, 31275, "epsg", 31275,
        "MGI / Balkans zone 5 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 5 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",15],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",5500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31275");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31276, "epsg", 31276,
        "MGI / Balkans zone 6 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 6 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",18],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",6500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31276");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31277, "epsg", 31277,
        "MGI / Balkans zone 7 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 7 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",21],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",7500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31277");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31278, "epsg", 31278,
        "MGI / Balkans zone 8 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 8 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",21],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",7500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31278");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31279, "epsg", 31279,
        "MGI / Balkans zone 8 (deprecated)", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9999 +x_0=8500000 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137");
    add_proj4text (p, 2,
        ",1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Balkans zone 8 (deprecated)\",GEOGCS[\"MG");
    add_srs_wkt (p, 1,
        "I\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474,5");
    add_srs_wkt (p, 4,
        ".297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 5,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 6,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",24],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",8500000],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 12,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 13,
        "\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31279");
    add_srs_wkt (p, 14,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 31281, "epsg", 31281,
        "MGI (Ferro) / Austria West Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria West Zone\",GEOGCS[\"MGI ");
    add_srs_wkt (p, 1,
        "(Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferro\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666666");
    add_srs_wkt (p, 5,
        "6666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",28],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],");
    add_srs_wkt (p, 13,
        "AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31281\"]]");
    p = add_epsg_def_ex (filter, first, last, 31282, "epsg", 31282,
        "MGI (Ferro) / Austria Central Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria Central Zone\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI (Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferr");
    add_srs_wkt (p, 2,
        "o\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUT");
    add_srs_wkt (p, 3,
        "HORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666");
    add_srs_wkt (p, 5,
        "6666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 10,
        "idian\",31],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31282\"]]");
    p = add_epsg_def_ex (filter, first, last, 31283, "epsg", 31283,
        "MGI (Ferro) / Austria East Zone", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria East Zone\",GEOGCS[\"MGI ");
    add_srs_wkt (p, 1,
        "(Ferro)\",DATUM[\"Militar_Geographische_Institut_Ferro\"");
    add_srs_wkt (p, 2,
        ",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,480,0,0,0,0],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\",-17.6666666");
    add_srs_wkt (p, 5,
        "6666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4805\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",34],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 12,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],");
    add_srs_wkt (p, 13,
        "AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31283\"]]");
    p = add_epsg_def_ex (filter, first, last, 31284, "epsg", 31284,
        "MGI / Austria M28", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria M28\",GEOGCS[\"MGI\",DATUM[\"Mili");
    add_srs_wkt (p, 1,
        "tar_Geographische_Institute\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",10.3333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",150000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31284\"]]");
    p = add_epsg_def_ex (filter, first, last, 31285, "epsg", 31285,
        "MGI / Austria M31", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria M31\",GEOGCS[\"MGI\",DATUM[\"Mili");
    add_srs_wkt (p, 1,
        "tar_Geographische_Institute\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",13.3333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",450000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31285\"]]");
    p = add_epsg_def_ex (filter, first, last, 31286, "epsg", 31286,
        "MGI / Austria M34", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria M34\",GEOGCS[\"MGI\",DATUM[\"Mili");
    add_srs_wkt (p, 1,
        "tar_Geographische_Institute\",SPHEROID[\"Bessel 1841\",6");
    add_srs_wkt (p, 2,
        "377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232],AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 5,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 6,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 7,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4312\"]");
    add_srs_wkt (p, 8,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 9,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",16.3333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"fa");
    add_srs_wkt (p, 11,
        "lse_easting\",750000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31286\"]]");
    p = add_epsg_def_ex (filter, first, last, 31287, "epsg", 31287,
        "MGI / Austria Lambert", 0, 1,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.3333");
    add_proj4text (p, 1,
        "3333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs8");
    add_proj4text (p, 2,
        "4=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria Lambert\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_1\",49],PARAMETER[\"standard_par");
    add_srs_wkt (p, 10,
        "allel_2\",46],PARAMETER[\"latitude_of_origin\",47.5],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"central_meridian\",13.33333333333333],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"false_easting\",400000],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 13,
        "400000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",NORTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "1287\"]]");
    p = add_epsg_def_ex (filter, first, last, 31288, "epsg", 31288,
        "MGI (Ferro) / M28", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=150000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / M28\",GEOGCS[\"MGI (Ferro)\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Militar_Geographische_Institut_Ferro\",SPHEROID[\"Be");
    add_srs_wkt (p, 2,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7004\"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6805\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",28],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",1500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"31288\"]]");
    p = add_epsg_def_ex (filter, first, last, 31289, "epsg", 31289,
        "MGI (Ferro) / M31", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=450000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / M31\",GEOGCS[\"MGI (Ferro)\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Militar_Geographische_Institut_Ferro\",SPHEROID[\"Be");
    add_srs_wkt (p, 2,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7004\"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6805\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",31],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",4500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"31289\"]]");
    p = add_epsg_def_ex (filter, first, last, 31290, "epsg", 31290,
        "MGI (Ferro) / M34", 0, 1,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=750000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +un");
    add_proj4text (p, 2,
        "its=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / M34\",GEOGCS[\"MGI (Ferro)\",DATU");
    add_srs_wkt (p, 1,
        "M[\"Militar_Geographische_Institut_Ferro\",SPHEROID[\"Be");
    add_srs_wkt (p, 2,
        "ssel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7004\"]],TOWGS84[682,-203,480,0,0,0,0],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 4,
        ",\"6805\"]],PRIMEM[\"Ferro\",-17.66666666666667,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8909\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4805\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 9,
        "of_origin\",0],PARAMETER[\"central_meridian\",34],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"scale_factor\",1],PARAMETER[\"false_easting\",7500");
    add_srs_wkt (p, 11,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUT");
    add_srs_wkt (p, 12,
        "HORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "EAST],AUTHORITY[\"EPSG\",\"31290\"]]");
    p = add_epsg_def_ex (filter, first, last, 31291, "epsg", 31291,
        "MGI (Ferro) / Austria West Zone (deprecated)", 0, 0,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria West Zone (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"MGI (Ferro)\",DATUM[\"Militar_Geographische_Ins");
    add_srs_wkt (p, 2,
        "titut_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1");
    add_srs_wkt (p, 3,
        "528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,48");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\"");
    add_srs_wkt (p, 5,
        ",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",28],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31291\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31292, "epsg", 31292,
        "MGI (Ferro) / Austria Central Zone (deprecated)", 0, 0,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=31 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria Central Zone (deprecated)");
    add_srs_wkt (p, 1,
        "\",GEOGCS[\"MGI (Ferro)\",DATUM[\"Militar_Geographische_");
    add_srs_wkt (p, 2,
        "Institut_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,29");
    add_srs_wkt (p, 3,
        "9.1528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203");
    add_srs_wkt (p, 4,
        ",480,0,0,0,0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Fer");
    add_srs_wkt (p, 5,
        "ro\",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UN");
    add_srs_wkt (p, 6,
        "IT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"91");
    add_srs_wkt (p, 7,
        "22\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST]");
    add_srs_wkt (p, 8,
        ",AUTHORITY[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_M");
    add_srs_wkt (p, 9,
        "ercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"central_meridian\",31],PARAMETER[\"scale_factor\",1],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 13,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31");
    add_srs_wkt (p, 14,
        "292\"]]");
    p = add_epsg_def_ex (filter, first, last, 31293, "epsg", 31293,
        "MGI (Ferro) / Austria East Zone (deprecated)", 0, 0,
        "Bessel 1841", "Ferro",
        "Militar_Geographische_Institut_Ferro", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=34 +k=1 +x_0=0 +y_0=0 +ellps");
    add_proj4text (p, 1,
        "=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m");
    add_proj4text (p, 2,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI (Ferro) / Austria East Zone (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"MGI (Ferro)\",DATUM[\"Militar_Geographische_Ins");
    add_srs_wkt (p, 2,
        "titut_Ferro\",SPHEROID[\"Bessel 1841\",6377397.155,299.1");
    add_srs_wkt (p, 3,
        "528128,AUTHORITY[\"EPSG\",\"7004\"]],TOWGS84[682,-203,48");
    add_srs_wkt (p, 4,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6805\"]],PRIMEM[\"Ferro\"");
    add_srs_wkt (p, 5,
        ",-17.66666666666667,AUTHORITY[\"EPSG\",\"8909\"]],UNIT[\"");
    add_srs_wkt (p, 6,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 7,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 8,
        "ORITY[\"EPSG\",\"4805\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 9,
        "or\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"ce");
    add_srs_wkt (p, 10,
        "ntral_meridian\",34],PARAMETER[\"scale_factor\",1],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",0],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31293\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31294, "epsg", 31294,
        "MGI / M28 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "150000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / M28 (deprecated)\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",10.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",150000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31294\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31295, "epsg", 31295,
        "MGI / M31 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "450000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / M31 (deprecated)\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",13.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",450000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31295\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31296, "epsg", 31296,
        "MGI / M34 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=");
    add_proj4text (p, 1,
        "750000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.");
    add_proj4text (p, 2,
        "919,5.137,1.474,5.297,2.4232 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / M34 (deprecated)\",GEOGCS[\"MGI\",DATUM[\"");
    add_srs_wkt (p, 1,
        "Militar_Geographische_Institute\",SPHEROID[\"Bessel 1841");
    add_srs_wkt (p, 2,
        "\",6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]]");
    add_srs_wkt (p, 3,
        ",TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232");
    add_srs_wkt (p, 4,
        "],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 5,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 6,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 7,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"431");
    add_srs_wkt (p, 8,
        "2\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 9,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",16.");
    add_srs_wkt (p, 10,
        "33333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_easting\",750000],PARAMETER[\"false_northing\",0");
    add_srs_wkt (p, 12,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 13,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31296\"");
    add_srs_wkt (p, 14,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31297, "epsg", 31297,
        "MGI / Austria Lambert (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Militar_Geographische_Institute", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.3333");
    add_proj4text (p, 1,
        "3333333333 +x_0=400000 +y_0=400000 +ellps=bessel +towgs8");
    add_proj4text (p, 2,
        "4=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units");
    add_proj4text (p, 3,
        "=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"MGI / Austria Lambert (deprecated)\",GEOGCS[\"M");
    add_srs_wkt (p, 1,
        "GI\",DATUM[\"Militar_Geographische_Institute\",SPHEROID[");
    add_srs_wkt (p, 2,
        "\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7004\"]],TOWGS84[577.326,90.129,463.919,5.137,1.474");
    add_srs_wkt (p, 4,
        ",5.297,2.4232],AUTHORITY[\"EPSG\",\"6312\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 5,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 6,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 7,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 8,
        "PSG\",\"4312\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 9,
        "P\"],PARAMETER[\"standard_parallel_1\",49],PARAMETER[\"s");
    add_srs_wkt (p, 10,
        "tandard_parallel_2\",46],PARAMETER[\"latitude_of_origin\"");
    add_srs_wkt (p, 11,
        ",47.5],PARAMETER[\"central_meridian\",13.33333333333333]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_easting\",400000],PARAMETER[\"false_n");
    add_srs_wkt (p, 13,
        "orthing\",400000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 14,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 15,
        "EPSG\",\"31297\"]]");
    p = add_epsg_def_ex (filter, first, last, 31300, "epsg", 31300,
        "Belge 1972 / Belge Lambert 72", 0, 0,
        "International 1924", "Greenwich",
        "Reseau_National_Belge_1972", "Lambert_Conformal_Conic_2SP_Belgium", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49.83333333333334 +lat_2=51.16666666666");
    add_proj4text (p, 1,
        "666 +lat_0=90 +lon_0=4.356939722222222 +x_0=150000.01256");
    add_proj4text (p, 2,
        " +y_0=5400088.4378 +ellps=intl +towgs84=-106.8686,52.297");
    add_proj4text (p, 3,
        "8,-103.7239,0.3366,-0.457,1.8422,-1.2747 +units=m +no_de");
    add_proj4text (p, 4,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Belge 1972 / Belge Lambert 72\",GEOGCS[\"Belge ");
    add_srs_wkt (p, 1,
        "1972\",DATUM[\"Reseau_National_Belge_1972\",SPHEROID[\"I");
    add_srs_wkt (p, 2,
        "nternational 1924\",6378388,297,AUTHORITY[\"EPSG\",\"702");
    add_srs_wkt (p, 3,
        "2\"]],TOWGS84[-106.8686,52.2978,-103.7239,0.3366,-0.457,");
    add_srs_wkt (p, 4,
        "1.8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"]],PRIMEM[\"G");
    add_srs_wkt (p, 5,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 6,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 7,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 8,
        "\"EPSG\",\"4313\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 9,
        "_2SP_Belgium\"],PARAMETER[\"standard_parallel_1\",49.833");
    add_srs_wkt (p, 10,
        "33333333334],PARAMETER[\"standard_parallel_2\",51.166666");
    add_srs_wkt (p, 11,
        "66666666],PARAMETER[\"latitude_of_origin\",90],PARAMETER");
    add_srs_wkt (p, 12,
        "[\"central_meridian\",4.356939722222222],PARAMETER[\"fal");
    add_srs_wkt (p, 13,
        "se_easting\",150000.01256],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 14,
        "5400088.4378],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001");
    add_srs_wkt (p, 15,
        "\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 16,
        "\",\"31300\"]]");
    p = add_epsg_def_ex (filter, first, last, 31370, "epsg", 31370,
        "Belge 1972 / Belgian Lambert 72", 0, 0,
        "International 1924", "Greenwich",
        "Reseau_National_Belge_1972", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +la");
    add_proj4text (p, 1,
        "t_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=540");
    add_proj4text (p, 2,
        "0088.438 +ellps=intl +towgs84=-106.8686,52.2978,-103.723");
    add_proj4text (p, 3,
        "9,0.3366,-0.457,1.8422,-1.2747 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Belge 1972 / Belgian Lambert 72\",GEOGCS[\"Belg");
    add_srs_wkt (p, 1,
        "e 1972\",DATUM[\"Reseau_National_Belge_1972\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "International 1924\",6378388,297,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "22\"]],TOWGS84[-106.8686,52.2978,-103.7239,0.3366,-0.457");
    add_srs_wkt (p, 4,
        ",1.8422,-1.2747],AUTHORITY[\"EPSG\",\"6313\"]],PRIMEM[\"");
    add_srs_wkt (p, 5,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 6,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 7,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 8,
        "[\"EPSG\",\"4313\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 9,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",51.1666672333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"standard_parallel_2\",49.8333339],PARA");
    add_srs_wkt (p, 11,
        "METER[\"latitude_of_origin\",90],PARAMETER[\"central_mer");
    add_srs_wkt (p, 12,
        "idian\",4.367486666666666],PARAMETER[\"false_easting\",1");
    add_srs_wkt (p, 13,
        "50000.013],PARAMETER[\"false_northing\",5400088.438],UNI");
    add_srs_wkt (p, 14,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 15,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31370\"]]");
    p = add_epsg_def_ex (filter, first, last, 31461, "epsg", 31461,
        "DHDN / 3-degree Gauss zone 1 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 1 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",3],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",1500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31461\"]]");
    p = add_epsg_def_ex (filter, first, last, 31462, "epsg", 31462,
        "DHDN / 3-degree Gauss zone 2 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 2 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",6],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",2500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31462\"]]");
    p = add_epsg_def_ex (filter, first, last, 31463, "epsg", 31463,
        "DHDN / 3-degree Gauss zone 3 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 3 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",9],PARAMETER[\"scale_factor\",1],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_easting\",3500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31463\"]]");
    p = add_epsg_def_ex (filter, first, last, 31464, "epsg", 31464,
        "DHDN / 3-degree Gauss zone 4 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 4 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",12],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",4500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31464\"]]");
    p = add_epsg_def_ex (filter, first, last, 31465, "epsg", 31465,
        "DHDN / 3-degree Gauss zone 5 (deprecated)", 0, 0,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss zone 5 (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-");
    add_srs_wkt (p, 4,
        "2.455,6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 5,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 6,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 7,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 8,
        "G\",\"4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"latitude_of_origin\",0],PARAMETER[\"central_merid");
    add_srs_wkt (p, 10,
        "ian\",15],PARAMETER[\"scale_factor\",1],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_easting\",5500000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 12,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 13,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"31465\"]]");
    p = add_epsg_def_ex (filter, first, last, 31466, "epsg", 31466,
        "DHDN / 3-degree Gauss-Kruger zone 2", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 2\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",6");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",2500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31466\"]]");
    p = add_epsg_def_ex (filter, first, last, 31467, "epsg", 31467,
        "DHDN / 3-degree Gauss-Kruger zone 3", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.45");
    add_proj4text (p, 2,
        "5,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 3\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",9");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_eastin");
    add_srs_wkt (p, 11,
        "g\",3500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 12,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],AX");
    add_srs_wkt (p, 13,
        "IS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31467\"]]");
    p = add_epsg_def_ex (filter, first, last, 31468, "epsg", 31468,
        "DHDN / 3-degree Gauss-Kruger zone 4", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 4\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",1");
    add_srs_wkt (p, 10,
        "2],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",4500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31468\"]]");
    p = add_epsg_def_ex (filter, first, last, 31469, "epsg", 31469,
        "DHDN / 3-degree Gauss-Kruger zone 5", 0, 1,
        "Bessel 1841", "Greenwich",
        "Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.4");
    add_proj4text (p, 2,
        "55,6.7 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"DHDN / 3-degree Gauss-Kruger zone 5\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "DHDN\",DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "Bessel 1841\",6377397.155,299.1528128,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7004\"]],TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,");
    add_srs_wkt (p, 4,
        "6.7],AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 5,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 6,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 7,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 8,
        "4314\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",1");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",5500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 12,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NORTH],A");
    add_srs_wkt (p, 13,
        "XIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31469\"]]");
    p = add_epsg_def_ex (filter, first, last, 31491, "epsg", 31491,
        "Germany_Zone_1", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=3 +k=1 +x_0=1500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_1\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",1500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",3.0],PARAMETER[\"Scale_Factor\"");
    add_srs_wkt (p, 7,
        ",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter");
    add_srs_wkt (p, 8,
        "\",1.0],AUTHORITY[\"EPSG\",\"31491\"]]");
    p = add_epsg_def_ex (filter, first, last, 31492, "epsg", 31492,
        "Germany_Zone_2", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_2\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",2500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",6.0],PARAMETER[\"Scale_Factor\"");
    add_srs_wkt (p, 7,
        ",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter");
    add_srs_wkt (p, 8,
        "\",1.0],AUTHORITY[\"EPSG\",\"31492\"]]");
    p = add_epsg_def_ex (filter, first, last, 31493, "epsg", 31493,
        "Germany_Zone_3", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_3\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",3500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",9.0],PARAMETER[\"Scale_Factor\"");
    add_srs_wkt (p, 7,
        ",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter");
    add_srs_wkt (p, 8,
        "\",1.0],AUTHORITY[\"EPSG\",\"31493\"]]");
    p = add_epsg_def_ex (filter, first, last, 31494, "epsg", 31494,
        "Germany_Zone_4", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_4\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",4500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",12.0],PARAMETER[\"Scale_Factor");
    add_srs_wkt (p, 7,
        "\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Met");
    add_srs_wkt (p, 8,
        "er\",1.0],AUTHORITY[\"EPSG\",\"31494\"]]");
    p = add_epsg_def_ex (filter, first, last, 31495, "epsg", 31495,
        "Germany_Zone_5", 0, 0,
        "Bessel_1841", "Greenwich",
        "D_Deutsches_Hauptdreiecksnetz", "Transverse_Mercator", "Meter",
        "unknown", "unknown", "unknown", "unknown");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=15 +k=1 +x_0=5500000 +y_0=0 ");
    add_proj4text (p, 1,
        "+ellps=bessel +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Germany_Zone_5\",GEOGCS[\"GCS_Deutsches_Hauptdr");
    add_srs_wkt (p, 1,
        "eiecksnetz\",DATUM[\"D_Deutsches_Hauptdreiecksnetz\",SPH");
    add_srs_wkt (p, 2,
        "EROID[\"Bessel_1841\",6377397.155,299.1528128]],PRIMEM[\"");
    add_srs_wkt (p, 3,
        "Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PR");
    add_srs_wkt (p, 4,
        "OJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_East");
    add_srs_wkt (p, 5,
        "ing\",5500000.0],PARAMETER[\"False_Northing\",0.0],PARAM");
    add_srs_wkt (p, 6,
        "ETER[\"Central_Meridian\",15.0],PARAMETER[\"Scale_Factor");
    add_srs_wkt (p, 7,
        "\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Met");
    add_srs_wkt (p, 8,
        "er\",1.0],AUTHORITY[\"EPSG\",\"31495\"]]");
    p = add_epsg_def_ex (filter, first, last, 31528, "epsg", 31528,
        "Conakry 1905 / UTM zone 28N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Conakry_1905", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +a=6378249.2 +b=6356515 +towgs84=-23,");
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Conakry 1905 / UTM zone 28N\",GEOGCS[\"Conakry ");
    add_srs_wkt (p, 1,
        "1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Clarke 1880 (IG");
    add_srs_wkt (p, 2,
        "N)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "11\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4315\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-15],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9996],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"31528\"]]");
    p = add_epsg_def_ex (filter, first, last, 31529, "epsg", 31529,
        "Conakry 1905 / UTM zone 29N", 0, 0,
        "Clarke 1880 (IGN)", "Greenwich",
        "Conakry_1905", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +a=6378249.2 +b=6356515 +towgs84=-23,");
    add_proj4text (p, 1,
        "259,-9,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Conakry 1905 / UTM zone 29N\",GEOGCS[\"Conakry ");
    add_srs_wkt (p, 1,
        "1905\",DATUM[\"Conakry_1905\",SPHEROID[\"Clarke 1880 (IG");
    add_srs_wkt (p, 2,
        "N)\",6378249.2,293.4660212936269,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "11\"]],TOWGS84[-23,259,-9,0,0,0,0],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 4,
        "6315\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"890");
    add_srs_wkt (p, 5,
        "1\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPS");
    add_srs_wkt (p, 6,
        "G\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude");
    add_srs_wkt (p, 7,
        "\",EAST],AUTHORITY[\"EPSG\",\"4315\"]],PROJECTION[\"Tran");
    add_srs_wkt (p, 8,
        "sverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"central_meridian\",-9],PARAMETER[\"scale_fact");
    add_srs_wkt (p, 10,
        "or\",0.9996],PARAMETER[\"false_easting\",500000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"31529\"]]");
    p = add_epsg_def_ex (filter, first, last, 31600, "epsg", 31600,
        "Dealul Piscului 1930 / Stereo 33", 0, 0,
        "International 1924", "Greenwich",
        "Dealul_Piscului_1930", "Oblique_Stereographic", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9");
    add_proj4text (p, 1,
        "996667 +x_0=500000 +y_0=500000 +ellps=intl +towgs84=103.");
    add_proj4text (p, 2,
        "25,-100.4,-307.19,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dealul Piscului 1930 / Stereo 33\",GEOGCS[\"Dea");
    add_srs_wkt (p, 1,
        "lul Piscului 1930\",DATUM[\"Dealul_Piscului_1930\",SPHER");
    add_srs_wkt (p, 2,
        "OID[\"International 1924\",6378388,297,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 3,
        ",\"7022\"]],TOWGS84[103.25,-100.4,-307.19,0,0,0,0],AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"6316\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 5,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 6,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 7,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4316\"]],P");
    add_srs_wkt (p, 8,
        "ROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latitud");
    add_srs_wkt (p, 9,
        "e_of_origin\",45.9],PARAMETER[\"central_meridian\",25.39");
    add_srs_wkt (p, 10,
        "246588888889],PARAMETER[\"scale_factor\",0.9996667],PARA");
    add_srs_wkt (p, 11,
        "METER[\"false_easting\",500000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",500000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31600\"]]");
    p = add_epsg_def_ex (filter, first, last, 31700, "epsg", 31700,
        "Dealul Piscului 1970/ Stereo 70 (deprecated)", 0, 1,
        "Krassowsky 1940", "Greenwich",
        "Dealul_Piscului_1970", "Oblique_Stereographic", "metre",
        "X", "North", "Y", "East");
    add_proj4text (p, 0,
        "+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 ");
    add_proj4text (p, 1,
        "+y_0=500000 +ellps=krass +towgs84=28,-121,-77,0,0,0,0 +u");
    add_proj4text (p, 2,
        "nits=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"Dealul Piscului 1970/ Stereo 70 (deprecated)\",");
    add_srs_wkt (p, 1,
        "GEOGCS[\"Dealul Piscului 1970\",DATUM[\"Dealul_Piscului_");
    add_srs_wkt (p, 2,
        "1970\",SPHEROID[\"Krassowsky 1940\",6378245,298.3,AUTHOR");
    add_srs_wkt (p, 3,
        "ITY[\"EPSG\",\"7024\"]],TOWGS84[28,-121,-77,0,0,0,0],AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"6317\"]],PRIMEM[\"Greenwich\",0,AUTHOR");
    add_srs_wkt (p, 5,
        "ITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994");
    add_srs_wkt (p, 6,
        "33,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH");
    add_srs_wkt (p, 7,
        "],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4317\"]]");
    add_srs_wkt (p, 8,
        ",PROJECTION[\"Oblique_Stereographic\"],PARAMETER[\"latit");
    add_srs_wkt (p, 9,
        "ude_of_origin\",46],PARAMETER[\"central_meridian\",25],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"scale_factor\",0.99975],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",500000],UNIT");
    add_srs_wkt (p, 12,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",NO");
    add_srs_wkt (p, 13,
        "RTH],AXIS[\"Y\",EAST],AUTHORITY[\"EPSG\",\"31700\"]]");
    p = add_epsg_def_ex (filter, first, last, 31838, "epsg", 31838,
        "NGN / UTM zone 38N", 0, 0,
        "WGS 84", "Greenwich",
        "National_Geodetic_Network", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGN / UTM zone 38N\",GEOGCS[\"NGN\",DATUM[\"Nat");
    add_srs_wkt (p, 1,
        "ional_Geodetic_Network\",SPHEROID[\"WGS 84\",6378137,298");
    add_srs_wkt (p, 2,
        ".257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-3.2,-5");
    add_srs_wkt (p, 3,
        ".7,2.8,0,0,0,0],AUTHORITY[\"EPSG\",\"6318\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4318\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",45],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"31838\"]]");
    p = add_epsg_def_ex (filter, first, last, 31839, "epsg", 31839,
        "NGN / UTM zone 39N", 0, 0,
        "WGS 84", "Greenwich",
        "National_Geodetic_Network", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=WGS84 +towgs84=-3.2,-5.7,2.8,0");
    add_proj4text (p, 1,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NGN / UTM zone 39N\",GEOGCS[\"NGN\",DATUM[\"Nat");
    add_srs_wkt (p, 1,
        "ional_Geodetic_Network\",SPHEROID[\"WGS 84\",6378137,298");
    add_srs_wkt (p, 2,
        ".257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[-3.2,-5");
    add_srs_wkt (p, 3,
        ".7,2.8,0,0,0,0],AUTHORITY[\"EPSG\",\"6318\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4318\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",51],PARAMETER[\"scale_factor\",0.9996],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",500000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"31839\"]]");
    p = add_epsg_def_ex (filter, first, last, 31900, "epsg", 31900,
        "KUDAMS / KTM (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "Kuwait_Utility", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=0.9996 +x_0=500000 +y_");
    add_proj4text (p, 1,
        "0=0 +ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +units=");
    add_proj4text (p, 2,
        "m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"KUDAMS / KTM (deprecated)\",GEOGCS[\"KUDAMS\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"Kuwait_Utility\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[-20.8,");
    add_srs_wkt (p, 3,
        "11.3,2.4,0,0,0,0],AUTHORITY[\"EPSG\",\"6319\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4319\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",48],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",500000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 11,
        "g\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AX");
    add_srs_wkt (p, 12,
        "IS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"31900\"]]");
    p = add_epsg_def_ex (filter, first, last, 31901, "epsg", 31901,
        "KUDAMS / KTM", 0, 0,
        "GRS 1980", "Greenwich",
        "Kuwait_Utility", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=48 +k=1 +x_0=500000 +y_0=0 +");
    add_proj4text (p, 1,
        "ellps=GRS80 +towgs84=-20.8,11.3,2.4,0,0,0,0 +units=m +no");
    add_proj4text (p, 2,
        "_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"KUDAMS / KTM\",GEOGCS[\"KUDAMS\",DATUM[\"Kuwait");
    add_srs_wkt (p, 1,
        "_Utility\",SPHEROID[\"GRS 1980\",6378137,298.257222101,A");
    add_srs_wkt (p, 2,
        "UTHORITY[\"EPSG\",\"7019\"]],TOWGS84[-20.8,11.3,2.4,0,0,");
    add_srs_wkt (p, 3,
        "0,0],AUTHORITY[\"EPSG\",\"6319\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4319\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",0],PARAMETER[\"central_meridian\",4");
    add_srs_wkt (p, 9,
        "8],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"31901\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 31965, "epsg", 31965,
        "SIRGAS 2000 / UTM zone 11N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 11N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-117");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "65\"]]");
    p = add_epsg_def_ex (filter, first, last, 31966, "epsg", 31966,
        "SIRGAS 2000 / UTM zone 12N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 12N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-111");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "66\"]]");
    p = add_epsg_def_ex (filter, first, last, 31967, "epsg", 31967,
        "SIRGAS 2000 / UTM zone 13N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 13N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-105");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 11,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "67\"]]");
    p = add_epsg_def_ex (filter, first, last, 31968, "epsg", 31968,
        "SIRGAS 2000 / UTM zone 14N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 14N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-99]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3196");
    add_srs_wkt (p, 14,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 31969, "epsg", 31969,
        "SIRGAS 2000 / UTM zone 15N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 15N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-93]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3196");
    add_srs_wkt (p, 14,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 31970, "epsg", 31970,
        "SIRGAS 2000 / UTM zone 16N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 16N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-87]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 31971, "epsg", 31971,
        "SIRGAS 2000 / UTM zone 17N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 17N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 31972, "epsg", 31972,
        "SIRGAS 2000 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 18N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 31973, "epsg", 31973,
        "SIRGAS 2000 / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 19N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 31974, "epsg", 31974,
        "SIRGAS 2000 / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 20N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 31975, "epsg", 31975,
        "SIRGAS 2000 / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 21N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 31976, "epsg", 31976,
        "SIRGAS 2000 / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 22N\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 12,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3197");
    add_srs_wkt (p, 14,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 31977, "epsg", 31977,
        "SIRGAS 2000 / UTM zone 17S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 17S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31977\"]]");
    p = add_epsg_def_ex (filter, first, last, 31978, "epsg", 31978,
        "SIRGAS 2000 / UTM zone 18S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 18S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31978\"]]");
    p = add_epsg_def_ex (filter, first, last, 31979, "epsg", 31979,
        "SIRGAS 2000 / UTM zone 19S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 19S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31979\"]]");
    p = add_epsg_def_ex (filter, first, last, 31980, "epsg", 31980,
        "SIRGAS 2000 / UTM zone 20S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 20S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31980\"]]");
    p = add_epsg_def_ex (filter, first, last, 31981, "epsg", 31981,
        "SIRGAS 2000 / UTM zone 21S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 21S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31981\"]]");
    p = add_epsg_def_ex (filter, first, last, 31982, "epsg", 31982,
        "SIRGAS 2000 / UTM zone 22S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 22S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31982\"]]");
    p = add_epsg_def_ex (filter, first, last, 31983, "epsg", 31983,
        "SIRGAS 2000 / UTM zone 23S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 23S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-45]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31983\"]]");
    p = add_epsg_def_ex (filter, first, last, 31984, "epsg", 31984,
        "SIRGAS 2000 / UTM zone 24S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 24S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-39]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31984\"]]");
    p = add_epsg_def_ex (filter, first, last, 31985, "epsg", 31985,
        "SIRGAS 2000 / UTM zone 25S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 2000 / UTM zone 25S\",GEOGCS[\"SIRGAS 20");
    add_srs_wkt (p, 1,
        "00\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_las_");
    add_srs_wkt (p, 2,
        "AmericaS_2000\",SPHEROID[\"GRS 1980\",6378137,298.257222");
    add_srs_wkt (p, 3,
        "101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0]");
    add_srs_wkt (p, 4,
        ",AUTHORITY[\"EPSG\",\"6674\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 5,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 6,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 7,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4674");
    add_srs_wkt (p, 8,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 9,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-33]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 11,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 13,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"31985\"]]");
    p = add_epsg_def_ex (filter, first, last, 31986, "epsg", 31986,
        "SIRGAS 1995 / UTM zone 17N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 17N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "86\"]]");
    p = add_epsg_def_ex (filter, first, last, 31987, "epsg", 31987,
        "SIRGAS 1995 / UTM zone 18N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 18N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-7");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "87\"]]");
    p = add_epsg_def_ex (filter, first, last, 31988, "epsg", 31988,
        "SIRGAS 1995 / UTM zone 19N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 19N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "88\"]]");
    p = add_epsg_def_ex (filter, first, last, 31989, "epsg", 31989,
        "SIRGAS 1995 / UTM zone 20N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 20N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "89\"]]");
    p = add_epsg_def_ex (filter, first, last, 31990, "epsg", 31990,
        "SIRGAS 1995 / UTM zone 21N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 21N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "90\"]]");
    p = add_epsg_def_ex (filter, first, last, 31991, "epsg", 31991,
        "SIRGAS 1995 / UTM zone 22N", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +");
    add_proj4text (p, 1,
        "units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 22N\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 12,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"319");
    add_srs_wkt (p, 14,
        "91\"]]");
    p = add_epsg_def_ex (filter, first, last, 31992, "epsg", 31992,
        "SIRGAS 1995 / UTM zone 17S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 17S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31992\"]]");
    p = add_epsg_def_ex (filter, first, last, 31993, "epsg", 31993,
        "SIRGAS 1995 / UTM zone 18S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 18S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-7");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31993\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/srsinit/epsg_inlined_48.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri

Portions created by the Initial Developer are Copyright (C) 2008
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_48 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 31994, "epsg", 31994,
        "SIRGAS 1995 / UTM zone 19S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 19S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31994\"]]");
    p = add_epsg_def_ex (filter, first, last, 31995, "epsg", 31995,
        "SIRGAS 1995 / UTM zone 20S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 20S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-6");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31995\"]]");
    p = add_epsg_def_ex (filter, first, last, 31996, "epsg", 31996,
        "SIRGAS 1995 / UTM zone 21S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 21S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31996\"]]");
    p = add_epsg_def_ex (filter, first, last, 31997, "epsg", 31997,
        "SIRGAS 1995 / UTM zone 22S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 22S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-5");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31997\"]]");
    p = add_epsg_def_ex (filter, first, last, 31998, "epsg", 31998,
        "SIRGAS 1995 / UTM zone 23S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 23S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-4");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31998\"]]");
    p = add_epsg_def_ex (filter, first, last, 31999, "epsg", 31999,
        "SIRGAS 1995 / UTM zone 24S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 24S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"31999\"]]");
    p = add_epsg_def_ex (filter, first, last, 32000, "epsg", 32000,
        "SIRGAS 1995 / UTM zone 25S", 0, 0,
        "GRS 1980", "Greenwich",
        "Sistema_de_Referencia_Geocentrico_para_America_del_Sur_1995", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 1,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"SIRGAS 1995 / UTM zone 25S\",GEOGCS[\"SIRGAS 19");
    add_srs_wkt (p, 1,
        "95\",DATUM[\"Sistema_de_Referencia_Geocentrico_para_Amer");
    add_srs_wkt (p, 2,
        "ica_del_Sur_1995\",SPHEROID[\"GRS 1980\",6378137,298.257");
    add_srs_wkt (p, 3,
        "222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0");
    add_srs_wkt (p, 4,
        ",0],AUTHORITY[\"EPSG\",\"6170\"]],PRIMEM[\"Greenwich\",0");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532");
    add_srs_wkt (p, 6,
        "925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 7,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"41");
    add_srs_wkt (p, 8,
        "70\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 9,
        "atitude_of_origin\",0],PARAMETER[\"central_meridian\",-3");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_");
    add_srs_wkt (p, 11,
        "easting\",500000],PARAMETER[\"false_northing\",10000000]");
    add_srs_wkt (p, 12,
        ",UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"E");
    add_srs_wkt (p, 13,
        "asting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 14,
        "\",\"32000\"]]");
    p = add_epsg_def_ex (filter, first, last, 32001, "epsg", 32001,
        "NAD27 / Montana North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.71666666666667 +lat_2=47.85 +lat_0=4");
    add_proj4text (p, 1,
        "7 +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Montana North\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",48.71666666666667],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",47.85],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",47],PARAMETER[\"central_meridian\",-109.5],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_easting\",2000000],PARAMETER[\"false_northi");
    add_srs_wkt (p, 12,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 14,
        "TH],AUTHORITY[\"EPSG\",\"32001\"]]");
    p = add_epsg_def_ex (filter, first, last, 32002, "epsg", 32002,
        "NAD27 / Montana Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.88333333333333 +lat_2=46.45 +lat_0=4");
    add_proj4text (p, 1,
        "5.83333333333334 +lon_0=-109.5 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Montana Central\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",47.88333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",46.45],PARAMETER[\"latitude_of");
    add_srs_wkt (p, 10,
        "_origin\",45.83333333333334],PARAMETER[\"central_meridia");
    add_srs_wkt (p, 11,
        "n\",-109.5],PARAMETER[\"false_easting\",2000000],PARAMET");
    add_srs_wkt (p, 12,
        "ER[\"false_northing\",0],UNIT[\"US survey foot\",0.30480");
    add_srs_wkt (p, 13,
        "06096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32002\"]]");
    p = add_epsg_def_ex (filter, first, last, 32003, "epsg", 32003,
        "NAD27 / Montana South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.4 +lat_2=44.86666666666667 +lat_0=44");
    add_proj4text (p, 1,
        " +lon_0=-109.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Montana South\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",46.4],PARAMETER[\"standard_pa");
    add_srs_wkt (p, 9,
        "rallel_2\",44.86666666666667],PARAMETER[\"latitude_of_or");
    add_srs_wkt (p, 10,
        "igin\",44],PARAMETER[\"central_meridian\",-109.5],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_easting\",2000000],PARAMETER[\"false_northin");
    add_srs_wkt (p, 12,
        "g\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"32003\"]]");
    p = add_epsg_def_ex (filter, first, last, 32005, "epsg", 32005,
        "NAD27 / Nebraska North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.85 +lat_2=42.81666666666667 +lat_0=4");
    add_proj4text (p, 1,
        "1.33333333333334 +lon_0=-100 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nebraska North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",41.85],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",42.81666666666667],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 10,
        "origin\",41.33333333333334],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-100],PARAMETER[\"false_easting\",2000000],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_northing\",0],UNIT[\"US survey foot\",0.30480060");
    add_srs_wkt (p, 13,
        "96012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],");
    add_srs_wkt (p, 14,
        "AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32005\"]]");
    p = add_epsg_def_ex (filter, first, last, 32006, "epsg", 32006,
        "NAD27 / Nebraska South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.28333333333333 +lat_2=41.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=39.66666666666666 +lon_0=-99.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nebraska South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",40.28333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",41.71666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",39.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-99.5],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3200");
    add_srs_wkt (p, 15,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32007, "epsg", 32007,
        "NAD27 / Nevada East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nevada East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",34.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 9,
        "15.5833333333333],PARAMETER[\"scale_factor\",0.9999],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"32007\"]]");
    p = add_epsg_def_ex (filter, first, last, 32008, "epsg", 32008,
        "NAD27 / Nevada Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nevada Central\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",34.75],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 9,
        ",-116.6666666666667],PARAMETER[\"scale_factor\",0.9999],");
    add_srs_wkt (p, 10,
        "PARAMETER[\"false_easting\",500000],PARAMETER[\"false_no");
    add_srs_wkt (p, 11,
        "rthing\",0],UNIT[\"US survey foot\",0.3048006096012192,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32008\"]]");
    p = add_epsg_def_ex (filter, first, last, 32009, "epsg", 32009,
        "NAD27 / Nevada West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Nevada West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",34.75],PARAMETER[\"central_meridian\",-1");
    add_srs_wkt (p, 9,
        "18.5833333333333],PARAMETER[\"scale_factor\",0.9999],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTH");
    add_srs_wkt (p, 12,
        "ORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 13,
        "RTH],AUTHORITY[\"EPSG\",\"32009\"]]");
    p = add_epsg_def_ex (filter, first, last, 32010, "epsg", 32010,
        "NAD27 / New Hampshire", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +uni");
    add_proj4text (p, 2,
        "ts=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Hampshire\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",42.5],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "71.66666666666667],PARAMETER[\"scale_factor\",0.99996666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32010\"]]");
    p = add_epsg_def_ex (filter, first, last, 32011, "epsg", 32011,
        "NAD27 / New Jersey", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.66666666");
    add_proj4text (p, 1,
        "666667 +k=0.9999749999999999 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Jersey\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",38.83333333333334],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-74.66666666666667],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.999975],PARAMETER[\"false_easting\",2000000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"US survey foot\",0.3048006");
    add_srs_wkt (p, 12,
        "096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 13,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32011\"]]");
    p = add_epsg_def_ex (filter, first, last, 32012, "epsg", 32012,
        "NAD27 / New Mexico East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999");
    add_proj4text (p, 1,
        "909091 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Mexico East\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "104.3333333333333],PARAMETER[\"scale_factor\",0.99990909");
    add_srs_wkt (p, 10,
        "1],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32012\"]]");
    p = add_epsg_def_ex (filter, first, last, 32013, "epsg", 32013,
        "NAD27 / New Mexico Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=1524");
    add_proj4text (p, 1,
        "00.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Mexico Central\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"");
    add_srs_wkt (p, 8,
        "latitude_of_origin\",31],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 9,
        "-106.25],PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "false_easting\",500000],PARAMETER[\"false_northing\",0],");
    add_srs_wkt (p, 11,
        "UNIT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"32013\"]]");
    p = add_epsg_def_ex (filter, first, last, 32014, "epsg", 32014,
        "NAD27 / New Mexico West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999");
    add_proj4text (p, 1,
        "916667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New Mexico West\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",31],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "107.8333333333333],PARAMETER[\"scale_factor\",0.99991666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"false_easting\",500000],PARAMETER[\"false");
    add_srs_wkt (p, 11,
        "_northing\",0],UNIT[\"US survey foot\",0.304800609601219");
    add_srs_wkt (p, 12,
        "2,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32014\"]]");
    p = add_epsg_def_ex (filter, first, last, 32015, "epsg", 32015,
        "NAD27 / New York East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-74.33333333333333 +k=0.999");
    add_proj4text (p, 1,
        "966667 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York East\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",40],PARAMETER[\"central_meridian\",-74");
    add_srs_wkt (p, 9,
        ".33333333333333],PARAMETER[\"scale_factor\",0.999966667]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32015\"]]");
    p = add_epsg_def_ex (filter, first, last, 32016, "epsg", 32016,
        "NAD27 / New York Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York Central\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"l");
    add_srs_wkt (p, 8,
        "atitude_of_origin\",40],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 9,
        "76.58333333333333],PARAMETER[\"scale_factor\",0.9999375]");
    add_srs_wkt (p, 10,
        ",PARAMETER[\"false_easting\",500000],PARAMETER[\"false_n");
    add_srs_wkt (p, 11,
        "orthing\",0],UNIT[\"US survey foot\",0.3048006096012192,");
    add_srs_wkt (p, 12,
        "AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32016\"]]");
    p = add_epsg_def_ex (filter, first, last, 32017, "epsg", 32017,
        "NAD27 / New York West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units=u");
    add_proj4text (p, 2,
        "s-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York West\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",40],PARAMETER[\"central_meridian\",-78");
    add_srs_wkt (p, 9,
        ".58333333333333],PARAMETER[\"scale_factor\",0.9999375],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32017\"]]");
    p = add_epsg_def_ex (filter, first, last, 32018, "epsg", 32018,
        "NAD27 / New York Long Island (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=40.5 +lon_0=-74 +x_0=304800.6096012192 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / New York Long Island (deprecated)\",GEO");
    add_srs_wkt (p, 1,
        "GCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHERO");
    add_srs_wkt (p, 2,
        "ID[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY");
    add_srs_wkt (p, 3,
        "[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIME");
    add_srs_wkt (p, 4,
        "M[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"d");
    add_srs_wkt (p, 5,
        "egree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]");
    add_srs_wkt (p, 6,
        ",AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHO");
    add_srs_wkt (p, 7,
        "RITY[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_");
    add_srs_wkt (p, 8,
        "Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41.033333");
    add_srs_wkt (p, 9,
        "33333333],PARAMETER[\"standard_parallel_2\",40.666666666");
    add_srs_wkt (p, 10,
        "66666],PARAMETER[\"latitude_of_origin\",40.5],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-74],PARAMETER[\"false_easting\",10");
    add_srs_wkt (p, 12,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"US survey ");
    add_srs_wkt (p, 13,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 14,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "32018\"]]");
    p = add_epsg_def_ex (filter, first, last, 32019, "epsg", 32019,
        "NAD27 / North Carolina", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666");
    add_proj4text (p, 1,
        "666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / North Carolina\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",34.33333333333334],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",36.16666666666666],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",33.75],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-79],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32019\"]]");
    p = add_epsg_def_ex (filter, first, last, 32020, "epsg", 32020,
        "NAD27 / North Dakota North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=47 +lon_0=-100.5 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / North Dakota North\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",47.43333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",48.73333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",47],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-100.5],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32020\"]]");
    p = add_epsg_def_ex (filter, first, last, 32021, "epsg", 32021,
        "NAD27 / North Dakota South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / North Dakota South\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",46.18333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",47.48333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",45.66666666666666],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-100.5],PARAMETER[\"false_easting\",20");
    add_srs_wkt (p, 12,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"US survey ");
    add_srs_wkt (p, 13,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 14,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "32021\"]]");
    p = add_epsg_def_ex (filter, first, last, 32022, "epsg", 32022,
        "NAD27 / Ohio North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-82.5 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Ohio North\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",40.43333333333333],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",41.7],PARAMETER[\"latitude_of_origi");
    add_srs_wkt (p, 10,
        "n\",39.66666666666666],PARAMETER[\"central_meridian\",-8");
    add_srs_wkt (p, 11,
        "2.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32022\"]]");
    p = add_epsg_def_ex (filter, first, last, 32023, "epsg", 32023,
        "NAD27 / Ohio South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Ohio South\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",38.73333333333333],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",40.03333333333333],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",38],PARAMETER[\"central_meridian\",-82.");
    add_srs_wkt (p, 11,
        "5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_northing\",0],UNIT[\"US survey foot\",0.30480060960121");
    add_srs_wkt (p, 13,
        "92,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32023\"]]");
    p = add_epsg_def_ex (filter, first, last, 32024, "epsg", 32024,
        "NAD27 / Oklahoma North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oklahoma North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",35.56666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",36.76666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",35],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-98],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32024\"]]");
    p = add_epsg_def_ex (filter, first, last, 32025, "epsg", 32025,
        "NAD27 / Oklahoma South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oklahoma South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",33.93333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",35.23333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",33.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-98],PARAMETER[\"false_easting\",2000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 13,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32025\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32026, "epsg", 32026,
        "NAD27 / Oregon North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oregon North\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",44.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",46],PARAMETER[\"latitude_of_origin");
    add_srs_wkt (p, 10,
        "\",43.66666666666666],PARAMETER[\"central_meridian\",-12");
    add_srs_wkt (p, 11,
        "0.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32026\"]]");
    p = add_epsg_def_ex (filter, first, last, 32027, "epsg", 32027,
        "NAD27 / Oregon South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=609601.2192024384 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Oregon South\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",42.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",44],PARAMETER[\"latitude_of_origin");
    add_srs_wkt (p, 10,
        "\",41.66666666666666],PARAMETER[\"central_meridian\",-12");
    add_srs_wkt (p, 11,
        "0.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32027\"]]");
    p = add_epsg_def_ex (filter, first, last, 32028, "epsg", 32028,
        "NAD27 / Pennsylvania North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=4");
    add_proj4text (p, 1,
        "0.16666666666666 +lon_0=-77.75 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Pennsylvania North\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",40.88333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",41.95],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",40.16666666666666],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-77.75],PARAMETER[\"false_easting\",2000000],PARAM");
    add_srs_wkt (p, 12,
        "ETER[\"false_northing\",0],UNIT[\"US survey foot\",0.304");
    add_srs_wkt (p, 13,
        "8006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32028\"]]");
    p = add_epsg_def_ex (filter, first, last, 32029, "epsg", 32029,
        "NAD27 / Pennsylvania South (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.93333333333333 +lat_2=40.8 +lat_0=39");
    add_proj4text (p, 1,
        ".33333333333334 +lon_0=-77.75 +x_0=609601.2192024384 +y_");
    add_proj4text (p, 2,
        "0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Pennsylvania South (deprecated)\",GEOGC");
    add_srs_wkt (p, 1,
        "S[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID");
    add_srs_wkt (p, 2,
        "[\"Clarke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"");
    add_srs_wkt (p, 3,
        "EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",39.9333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",40.8],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",39.33333333333334],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-77.75],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 13,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2029\"]]");
    p = add_epsg_def_ex (filter, first, last, 32030, "epsg", 32030,
        "NAD27 / Rhode Island", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9");
    add_proj4text (p, 1,
        "999938 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +units");
    add_proj4text (p, 2,
        "=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Rhode Island\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",41.08333333333334],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-71.5],PARAMETER[\"scale_factor\",0.9999938],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32030\"]]");
    p = add_epsg_def_ex (filter, first, last, 32031, "epsg", 32031,
        "NAD27 / South Carolina North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.76666666666667 +lat_2=34.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=33 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Carolina North\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",33.76666666666667],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",34.96666666666667],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",33],PARAMETER[\"central_merid");
    add_srs_wkt (p, 11,
        "ian\",-81],PARAMETER[\"false_easting\",2000000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 13,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 14,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32031\"]]");
    p = add_epsg_def_ex (filter, first, last, 32033, "epsg", 32033,
        "NAD27 / South Carolina South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.33333333333334 +lat_2=33.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Carolina South\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",32.33333333333334],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",33.66666666666666],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",31.83333333333333],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-81],PARAMETER[\"false_easting\",20");
    add_srs_wkt (p, 12,
        "00000],PARAMETER[\"false_northing\",0],UNIT[\"US survey ");
    add_srs_wkt (p, 13,
        "foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],");
    add_srs_wkt (p, 14,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 15,
        "32033\"]]");
    p = add_epsg_def_ex (filter, first, last, 32034, "epsg", 32034,
        "NAD27 / South Dakota North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333");
    add_proj4text (p, 1,
        "333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=609601.219");
    add_proj4text (p, 2,
        "2024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Dakota North\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",44.41666666666666],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",45.68333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",43.83333333333334],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-100],PARAMETER[\"false_easting\",2000");
    add_srs_wkt (p, 12,
        "000],PARAMETER[\"false_northing\",0],UNIT[\"US survey fo");
    add_srs_wkt (p, 13,
        "ot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AX");
    add_srs_wkt (p, 14,
        "IS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32");
    add_srs_wkt (p, 15,
        "034\"]]");
    p = add_epsg_def_ex (filter, first, last, 32035, "epsg", 32035,
        "NAD27 / South Dakota South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42");
    add_proj4text (p, 1,
        ".33333333333334 +lon_0=-100.3333333333333 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / South Dakota South\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",42.83333333333334],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",44.4],PARAMETER[\"latitude_o");
    add_srs_wkt (p, 10,
        "f_origin\",42.33333333333334],PARAMETER[\"central_meridi");
    add_srs_wkt (p, 11,
        "an\",-100.3333333333333],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 13,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2035\"]]");
    p = add_epsg_def_ex (filter, first, last, 32036, "epsg", 32036,
        "NAD27 / Tennessee (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=3");
    add_proj4text (p, 1,
        "4.66666666666666 +lon_0=-86 +x_0=30480.06096012192 +y_0=");
    add_proj4text (p, 2,
        "0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Tennessee (deprecated)\",GEOGCS[\"NAD27");
    add_srs_wkt (p, 1,
        "\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke");
    add_srs_wkt (p, 2,
        " 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 3,
        "7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",35.25],PARAMETER[\"sta");
    add_srs_wkt (p, 9,
        "ndard_parallel_2\",36.41666666666666],PARAMETER[\"latitu");
    add_srs_wkt (p, 10,
        "de_of_origin\",34.66666666666666],PARAMETER[\"central_me");
    add_srs_wkt (p, 11,
        "ridian\",-86],PARAMETER[\"false_easting\",100000],PARAME");
    add_srs_wkt (p, 12,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 13,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32036\"]]");
    p = add_epsg_def_ex (filter, first, last, 32037, "epsg", 32037,
        "NAD27 / Texas North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=3");
    add_proj4text (p, 1,
        "4 +lon_0=-101.5 +x_0=609601.2192024384 +y_0=0 +datum=NAD");
    add_proj4text (p, 2,
        "27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas North\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",34.65],PARAMETER[\"standard_par");
    add_srs_wkt (p, 9,
        "allel_2\",36.18333333333333],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 10,
        "gin\",34],PARAMETER[\"central_meridian\",-101.5],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_easting\",2000000],PARAMETER[\"false_northing");
    add_srs_wkt (p, 12,
        "\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32037\"]]");
    p = add_epsg_def_ex (filter, first, last, 32038, "epsg", 32038,
        "NAD27 / Texas North Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=31.66666666666667 +lon_0=-97.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas North Central\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",32.13333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",33.96666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",31.66666666666667],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-97.5],PARAMETER[\"false_easting\",200");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"US survey f");
    add_srs_wkt (p, 13,
        "oot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2038\"]]");
    p = add_epsg_def_ex (filter, first, last, 32039, "epsg", 32039,
        "NAD27 / Texas Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333");
    add_proj4text (p, 1,
        "333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas Central\",GEOGCS[\"NAD27\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6");
    add_srs_wkt (p, 2,
        "378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"standard_parallel_1\",30.11666666666667],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",31.88333333333333],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",29.66666666666667],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-100.3333333333333],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",2000000],PARAMETER[\"false_northing\",0],UNIT[\"US");
    add_srs_wkt (p, 13,
        " survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9");
    add_srs_wkt (p, 14,
        "003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 15,
        "PSG\",\"32039\"]]");
    p = add_epsg_def_ex (filter, first, last, 32040, "epsg", 32040,
        "NAD27 / Texas South Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333");
    add_proj4text (p, 1,
        "333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas South Central\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",28.38333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",30.28333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",27.83333333333333],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-99],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"320");
    add_srs_wkt (p, 15,
        "40\"]]");
    p = add_epsg_def_ex (filter, first, last, 32041, "epsg", 32041,
        "NAD27 / Texas South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333");
    add_proj4text (p, 1,
        "333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Texas South\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",26.16666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",27.83333333333333],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",25.66666666666667],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-98.5],PARAMETER[\"false_easting\",2000000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32041\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32042, "epsg", 32042,
        "NAD27 / Utah North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333");
    add_proj4text (p, 1,
        "333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Utah North\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",40.71666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",41.78333333333333],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",40.33333333333334],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-111.5],PARAMETER[\"false_easting\",2000000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\",");
    add_srs_wkt (p, 13,
        "0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32042\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32043, "epsg", 32043,
        "NAD27 / Utah Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=3");
    add_proj4text (p, 1,
        "8.33333333333334 +lon_0=-111.5 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Utah Central\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER");
    add_srs_wkt (p, 8,
        "[\"standard_parallel_1\",39.01666666666667],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",40.65],PARAMETER[\"latitude_of_ori");
    add_srs_wkt (p, 10,
        "gin\",38.33333333333334],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-111.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32043\"]]");
    p = add_epsg_def_ex (filter, first, last, 32044, "epsg", 32044,
        "NAD27 / Utah South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=3");
    add_proj4text (p, 1,
        "6.66666666666666 +lon_0=-111.5 +x_0=609601.2192024384 +y");
    add_proj4text (p, 2,
        "_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Utah South\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[");
    add_srs_wkt (p, 8,
        "\"standard_parallel_1\",37.21666666666667],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",38.35],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",36.66666666666666],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "111.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32044\"]]");
    p = add_epsg_def_ex (filter, first, last, 32045, "epsg", 32045,
        "NAD27 / Vermont", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0");
    add_proj4text (p, 1,
        "=152400.3048006096 +y_0=0 +datum=NAD27 +units=us-ft +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Vermont\",GEOGCS[\"NAD27\",DATUM[\"Nort");
    add_srs_wkt (p, 1,
        "h_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378206");
    add_srs_wkt (p, 2,
        ".4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AUTHO");
    add_srs_wkt (p, 3,
        "RITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHORIT");
    add_srs_wkt (p, 4,
        "Y[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433");
    add_srs_wkt (p, 5,
        ",AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],");
    add_srs_wkt (p, 6,
        "AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]],P");
    add_srs_wkt (p, 7,
        "ROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_");
    add_srs_wkt (p, 8,
        "of_origin\",42.5],PARAMETER[\"central_meridian\",-72.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.999964286],PARAMETER[\"fals");
    add_srs_wkt (p, 10,
        "e_easting\",500000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 11,
        "[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"32045\"]]");
    p = add_epsg_def_ex (filter, first, last, 32046, "epsg", 32046,
        "NAD27 / Virginia North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-78.5 +x_0=609601.2192024384 +y_0");
    add_proj4text (p, 2,
        "=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Virginia North\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",38.03333333333333],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",39.2],PARAMETER[\"latitude_of_o");
    add_srs_wkt (p, 10,
        "rigin\",37.66666666666666],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-78.5],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32046\"]]");
    p = add_epsg_def_ex (filter, first, last, 32047, "epsg", 32047,
        "NAD27 / Virginia South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=609601.21");
    add_proj4text (p, 2,
        "92024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Virginia South\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",36.76666666666667],PARAMETER");
    add_srs_wkt (p, 9,
        "[\"standard_parallel_2\",37.96666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",36.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-78.5],PARAMETER[\"false_easting\",200000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 13,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 14,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3204");
    add_srs_wkt (p, 15,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32048, "epsg", 32048,
        "NAD27 / Washington North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47");
    add_proj4text (p, 1,
        " +lon_0=-120.8333333333333 +x_0=609601.2192024384 +y_0=0");
    add_proj4text (p, 2,
        " +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Washington North\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",47.5],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",48.73333333333333],PARAMETER[\"latitude_of_");
    add_srs_wkt (p, 10,
        "origin\",47],PARAMETER[\"central_meridian\",-120.8333333");
    add_srs_wkt (p, 11,
        "333333],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32048\"]]");
    p = add_epsg_def_ex (filter, first, last, 32049, "epsg", 32049,
        "NAD27 / Washington South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=609601.2");
    add_proj4text (p, 2,
        "192024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Washington South\",GEOGCS[\"NAD27\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",45.83333333333334],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",47.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",45.33333333333334],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-120.5],PARAMETER[\"false_easting\",20000");
    add_srs_wkt (p, 12,
        "00],PARAMETER[\"false_northing\",0],UNIT[\"US survey foo");
    add_srs_wkt (p, 13,
        "t\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXI");
    add_srs_wkt (p, 14,
        "S[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"320");
    add_srs_wkt (p, 15,
        "49\"]]");
    p = add_epsg_def_ex (filter, first, last, 32050, "epsg", 32050,
        "NAD27 / West Virginia North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-f");
    add_proj4text (p, 2,
        "t +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / West Virginia North\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",39],PARAMETER[\"standard_");
    add_srs_wkt (p, 9,
        "parallel_2\",40.25],PARAMETER[\"latitude_of_origin\",38.");
    add_srs_wkt (p, 10,
        "5],PARAMETER[\"central_meridian\",-79.5],PARAMETER[\"fal");
    add_srs_wkt (p, 11,
        "se_easting\",2000000],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"32050\"]]");
    p = add_epsg_def_ex (filter, first, last, 32051, "epsg", 32051,
        "NAD27 / West Virginia South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / West Virginia South\",GEOGCS[\"NAD27\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 18");
    add_srs_wkt (p, 2,
        "66\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"70");
    add_srs_wkt (p, 3,
        "08\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",37.48333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",38.88333333333333],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",37],PARAMETER[\"central_meridian");
    add_srs_wkt (p, 11,
        "\",-81],PARAMETER[\"false_easting\",2000000],PARAMETER[\"");
    add_srs_wkt (p, 12,
        "false_northing\",0],UNIT[\"US survey foot\",0.3048006096");
    add_srs_wkt (p, 13,
        "012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32051\"]]");
    p = add_epsg_def_ex (filter, first, last, 32052, "epsg", 32052,
        "NAD27 / Wisconsin North", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666");
    add_proj4text (p, 1,
        "667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=609601.2192");
    add_proj4text (p, 2,
        "024384 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin North\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",45.56666666666667],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",46.76666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",45.16666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-90],PARAMETER[\"false_easting\",2000000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"US survey foot\"");
    add_srs_wkt (p, 13,
        ",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32052\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32053, "epsg", 32053,
        "NAD27 / Wisconsin Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +datum=NAD2");
    add_proj4text (p, 2,
        "7 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin Central\",GEOGCS[\"NAD27\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866");
    add_srs_wkt (p, 2,
        "\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008");
    add_srs_wkt (p, 3,
        "\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",");
    add_srs_wkt (p, 4,
        "0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453");
    add_srs_wkt (p, 5,
        "2925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude");
    add_srs_wkt (p, 6,
        "\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",44.25],PARAMETER[\"standa");
    add_srs_wkt (p, 9,
        "rd_parallel_2\",45.5],PARAMETER[\"latitude_of_origin\",4");
    add_srs_wkt (p, 10,
        "3.83333333333334],PARAMETER[\"central_meridian\",-90],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"false_easting\",2000000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"32053\"]]");
    p = add_epsg_def_ex (filter, first, last, 32054, "epsg", 32054,
        "NAD27 / Wisconsin South", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666");
    add_proj4text (p, 1,
        "667 +lat_0=42 +lon_0=-90 +x_0=609601.2192024384 +y_0=0 +");
    add_proj4text (p, 2,
        "datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wisconsin South\",GEOGCS[\"NAD27\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"");
    add_srs_wkt (p, 2,
        ",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"42");
    add_srs_wkt (p, 7,
        "67\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAM");
    add_srs_wkt (p, 8,
        "ETER[\"standard_parallel_1\",42.73333333333333],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",44.06666666666667],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",42],PARAMETER[\"central_meridian\",");
    add_srs_wkt (p, 11,
        "-90],PARAMETER[\"false_easting\",2000000],PARAMETER[\"fa");
    add_srs_wkt (p, 12,
        "lse_northing\",0],UNIT[\"US survey foot\",0.304800609601");
    add_srs_wkt (p, 13,
        "2192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 14,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32054\"]]");
    p = add_epsg_def_ex (filter, first, last, 32055, "epsg", 32055,
        "NAD27 / Wyoming East", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-105.1666666");
    add_proj4text (p, 1,
        "666667 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming East\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",40.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-105.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999941177],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 12,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32055\"]]");
    p = add_epsg_def_ex (filter, first, last, 32056, "epsg", 32056,
        "NAD27 / Wyoming East Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-107.3333333");
    add_proj4text (p, 1,
        "333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming East Central\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",40.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-107.3333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.999941177],PARAMETER[\"false_easting\",50000");
    add_srs_wkt (p, 11,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"US survey foot");
    add_srs_wkt (p, 12,
        "\",0.3048006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS");
    add_srs_wkt (p, 13,
        "[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3205");
    add_srs_wkt (p, 14,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32057, "epsg", 32057,
        "NAD27 / Wyoming West Central", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-108.75 +k=0");
    add_proj4text (p, 1,
        ".999941177 +x_0=152400.3048006096 +y_0=0 +datum=NAD27 +u");
    add_proj4text (p, 2,
        "nits=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming West Central\",GEOGCS[\"NAD27\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1");
    add_srs_wkt (p, 2,
        "866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7");
    add_srs_wkt (p, 3,
        "008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich");
    add_srs_wkt (p, 4,
        "\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017");
    add_srs_wkt (p, 5,
        "4532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latit");
    add_srs_wkt (p, 6,
        "ude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",40.66666666666666],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-108.75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".999941177],PARAMETER[\"false_easting\",500000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"US survey foot\",0.304800");
    add_srs_wkt (p, 12,
        "6096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST");
    add_srs_wkt (p, 13,
        "],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32057\"]]");
    p = add_epsg_def_ex (filter, first, last, 32058, "epsg", 32058,
        "NAD27 / Wyoming West", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.66666666666666 +lon_0=-110.0833333");
    add_proj4text (p, 1,
        "333333 +k=0.999941177 +x_0=152400.3048006096 +y_0=0 +dat");
    add_proj4text (p, 2,
        "um=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Wyoming West\",GEOGCS[\"NAD27\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",637");
    add_srs_wkt (p, 2,
        "8206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],A");
    add_srs_wkt (p, 3,
        "UTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTH");
    add_srs_wkt (p, 4,
        "ORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292519");
    add_srs_wkt (p, 5,
        "9433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NOR");
    add_srs_wkt (p, 6,
        "TH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",40.66666666666666],PARAMETER[\"central_m");
    add_srs_wkt (p, 9,
        "eridian\",-110.0833333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999941177],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"US survey foot\",0.3048");
    add_srs_wkt (p, 12,
        "006096012192,AUTHORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 13,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32058\"]]");
    p = add_epsg_def_ex (filter, first, last, 32061, "epsg", 32061,
        "NAD27 / Guatemala Norte (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=16.81666666666667 +lat_0=16.81666666666");
    add_proj4text (p, 1,
        "667 +lon_0=-90.33333333333333 +k_0=0.99992226 +x_0=50000");
    add_proj4text (p, 2,
        "0 +y_0=292209.579 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Guatemala Norte (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",16.81666666666667]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"central_meridian\",-90.33333333333333],PARA");
    add_srs_wkt (p, 10,
        "METER[\"scale_factor\",0.99992226],PARAMETER[\"false_eas");
    add_srs_wkt (p, 11,
        "ting\",500000],PARAMETER[\"false_northing\",292209.579],");
    add_srs_wkt (p, 12,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32061\"]]");
    p = add_epsg_def_ex (filter, first, last, 32062, "epsg", 32062,
        "NAD27 / Guatemala Sur (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_1SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=14.9 +lat_0=14.9 +lon_0=-90.33333333333");
    add_proj4text (p, 1,
        "333 +k_0=0.99989906 +x_0=500000 +y_0=325992.681 +datum=N");
    add_proj4text (p, 2,
        "AD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Guatemala Sur (deprecated)\",GEOGCS[\"N");
    add_srs_wkt (p, 1,
        "AD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Cl");
    add_srs_wkt (p, 2,
        "arke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 3,
        "\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gre");
    add_srs_wkt (p, 4,
        "enwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_1S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"latitude_of_origin\",14.9],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-90.33333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.99989906],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"false_northing\",325992.681],UNIT[\"metre\"");
    add_srs_wkt (p, 12,
        ",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 13,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32062\"]]");
    p = add_epsg_def_ex (filter, first, last, 32064, "epsg", 32064,
        "NAD27 / BLM 14N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 14N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-99");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32064\"]]");
    p = add_epsg_def_ex (filter, first, last, 32065, "epsg", 32065,
        "NAD27 / BLM 15N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 15N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-93");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32065\"]]");
    p = add_epsg_def_ex (filter, first, last, 32066, "epsg", 32066,
        "NAD27 / BLM 16N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 16N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-87");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32066\"]]");
    p = add_epsg_def_ex (filter, first, last, 32067, "epsg", 32067,
        "NAD27 / BLM 17N (ftUS)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 17N (ftUS)\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"la");
    add_srs_wkt (p, 8,
        "titude_of_origin\",0],PARAMETER[\"central_meridian\",-81");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",1640416.67],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 11,
        "T[\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32067\"]]");
    p = add_epsg_def_ex (filter, first, last, 32074, "epsg", 32074,
        "NAD27 / BLM 14N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 14N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32074\"]]");
    p = add_epsg_def_ex (filter, first, last, 32075, "epsg", 32075,
        "NAD27 / BLM 15N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 15N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32075\"]]");
    p = add_epsg_def_ex (filter, first, last, 32076, "epsg", 32076,
        "NAD27 / BLM 16N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 16N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-87],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32076\"]]");
    p = add_epsg_def_ex (filter, first, last, 32077, "epsg", 32077,
        "NAD27 / BLM 17N (feet) (deprecated)", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +datum=NAD27 +units=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / BLM 17N (feet) (deprecated)\",GEOGCS[\"");
    add_srs_wkt (p, 1,
        "NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"C");
    add_srs_wkt (p, 2,
        "larke 1866\",6378206.4,294.9786982138982,AUTHORITY[\"EPS");
    add_srs_wkt (p, 3,
        "G\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4267\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",1640416.67],PARAMETER[\"false_northi");
    add_srs_wkt (p, 11,
        "ng\",0],UNIT[\"US survey foot\",0.3048006096012192,AUTHO");
    add_srs_wkt (p, 12,
        "RITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NOR");
    add_srs_wkt (p, 13,
        "TH],AUTHORITY[\"EPSG\",\"32077\"]]");
    p = add_epsg_def_ex (filter, first, last, 32081, "epsg", 32081,
        "NAD27 / MTM zone 1", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 1\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-53],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",304800],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32081\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32082, "epsg", 32082,
        "NAD27 / MTM zone 2", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 2\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-56],PA");
    add_srs_wkt (p, 9,
        "RAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_easti");
    add_srs_wkt (p, 10,
        "ng\",304800],PARAMETER[\"false_northing\",0],UNIT[\"metr");
    add_srs_wkt (p, 11,
        "e\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAS");
    add_srs_wkt (p, 12,
        "T],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32082\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32083, "epsg", 32083,
        "NAD27 / MTM zone 3", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 3\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-58.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32083");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32084, "epsg", 32084,
        "NAD27 / MTM zone 4", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 4\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-61.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32084");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32085, "epsg", 32085,
        "NAD27 / MTM zone 5", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 5\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-64.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32085");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32086, "epsg", 32086,
        "NAD27 / MTM zone 6", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / MTM zone 6\",GEOGCS[\"NAD27\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378");
    add_srs_wkt (p, 2,
        "206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]],AU");
    add_srs_wkt (p, 3,
        "THORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,AUTHO");
    add_srs_wkt (p, 4,
        "RITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199");
    add_srs_wkt (p, 5,
        "433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORT");
    add_srs_wkt (p, 6,
        "H],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4267\"]");
    add_srs_wkt (p, 7,
        "],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitu");
    add_srs_wkt (p, 8,
        "de_of_origin\",0],PARAMETER[\"central_meridian\",-67.5],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9999],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",304800],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32086");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32098, "epsg", 32098,
        "NAD27 / Quebec Lambert", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +datum=NAD27 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Quebec Lambert\",GEOGCS[\"NAD27\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",");
    add_srs_wkt (p, 2,
        "6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"7008\"]");
    add_srs_wkt (p, 3,
        "],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0,A");
    add_srs_wkt (p, 4,
        "UTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.017453292");
    add_srs_wkt (p, 5,
        "5199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",");
    add_srs_wkt (p, 6,
        "NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"426");
    add_srs_wkt (p, 7,
        "7\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAME");
    add_srs_wkt (p, 8,
        "TER[\"standard_parallel_1\",60],PARAMETER[\"standard_par");
    add_srs_wkt (p, 9,
        "allel_2\",46],PARAMETER[\"latitude_of_origin\",44],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"central_meridian\",-68.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 11,
        "ng\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1");
    add_srs_wkt (p, 12,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32098\"]]");
    p = add_epsg_def_ex (filter, first, last, 32099, "epsg", 32099,
        "NAD27 / Louisiana Offshore", 0, 0,
        "Clarke 1866", "Greenwich",
        "North_American_Datum_1927", "Lambert_Conformal_Conic_2SP", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.66666666666667 +lon_0=-91.33333333333333 +");
    add_proj4text (p, 2,
        "x_0=609601.2192024384 +y_0=0 +datum=NAD27 +units=us-ft +");
    add_proj4text (p, 3,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD27 / Louisiana Offshore\",GEOGCS[\"NAD27\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 186");
    add_srs_wkt (p, 2,
        "6\",6378206.4,294.9786982138982,AUTHORITY[\"EPSG\",\"700");
    add_srs_wkt (p, 3,
        "8\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\"");
    add_srs_wkt (p, 4,
        ",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745");
    add_srs_wkt (p, 5,
        "32925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitud");
    add_srs_wkt (p, 6,
        "e\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 7,
        "4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"standard_parallel_1\",27.83333333333333],PARAME");
    add_srs_wkt (p, 9,
        "TER[\"standard_parallel_2\",26.16666666666667],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"latitude_of_origin\",25.66666666666667],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-91.33333333333333],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",2000000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 13,
        "\"US survey foot\",0.3048006096012192,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 15,
        "[\"EPSG\",\"32099\"]]");
    p = add_epsg_def_ex (filter, first, last, 32100, "epsg", 32100,
        "NAD83 / Montana", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=49 +lat_2=45 +lat_0=44.25 +lon_0=-109.5");
    add_proj4text (p, 1,
        " +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 ");
    add_proj4text (p, 2,
        "+units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Montana\",GEOGCS[\"NAD83\",DATUM[\"Nort");
    add_srs_wkt (p, 1,
        "h_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"standard_parallel_1\",49],PARAMETER[\"standa");
    add_srs_wkt (p, 9,
        "rd_parallel_2\",45],PARAMETER[\"latitude_of_origin\",44.");
    add_srs_wkt (p, 10,
        "25],PARAMETER[\"central_meridian\",-109.5],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_easting\",600000],PARAMETER[\"false_northing\",0],U");
    add_srs_wkt (p, 12,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 13,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32100\"]]");
    p = add_epsg_def_ex (filter, first, last, 32104, "epsg", 32104,
        "NAD83 / Nebraska", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=43 +lat_2=40 +lat_0=39.83333333333334 +");
    add_proj4text (p, 1,
        "lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nebraska\",GEOGCS[\"NAD83\",DATUM[\"Nor");
    add_srs_wkt (p, 1,
        "th_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,2");
    add_srs_wkt (p, 2,
        "98.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwi");
    add_srs_wkt (p, 4,
        "ch\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0");
    add_srs_wkt (p, 5,
        "174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lat");
    add_srs_wkt (p, 6,
        "itude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG");
    add_srs_wkt (p, 7,
        "\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"stan");
    add_srs_wkt (p, 9,
        "dard_parallel_2\",40],PARAMETER[\"latitude_of_origin\",3");
    add_srs_wkt (p, 10,
        "9.83333333333334],PARAMETER[\"central_meridian\",-100],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"false_easting\",500000],PARAMETER[\"false_nor");
    add_srs_wkt (p, 12,
        "thing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]");
    add_srs_wkt (p, 13,
        "],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"32104\"]]");
    p = add_epsg_def_ex (filter, first, last, 32107, "epsg", 32107,
        "NAD83 / Nevada East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nevada East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",34.75],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-115.5833333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9999],PARAMETER[\"false_easting\",200000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",8000000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32107\"]]");
    p = add_epsg_def_ex (filter, first, last, 32108, "epsg", 32108,
        "NAD83 / Nevada Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nevada Central\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",34.75],PARAMETER[\"cent");
    add_srs_wkt (p, 9,
        "ral_meridian\",-116.6666666666667],PARAMETER[\"scale_fac");
    add_srs_wkt (p, 10,
        "tor\",0.9999],PARAMETER[\"false_easting\",500000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",6000000],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 12,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 13,
        "],AUTHORITY[\"EPSG\",\"32108\"]]");
    p = add_epsg_def_ex (filter, first, last, 32109, "epsg", 32109,
        "NAD83 / Nevada West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.");
    add_proj4text (p, 1,
        "9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +towgs84=0,0,");
    add_proj4text (p, 2,
        "0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Nevada West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",34.75],PARAMETER[\"central");
    add_srs_wkt (p, 9,
        "_meridian\",-118.5833333333333],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9999],PARAMETER[\"false_easting\",800000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",4000000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32109\"]]");
    p = add_epsg_def_ex (filter, first, last, 32110, "epsg", 32110,
        "NAD83 / New Hampshire", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9");
    add_proj4text (p, 1,
        "99966667 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,");
    add_proj4text (p, 2,
        "0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Hampshire\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",42.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-71.66666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.999966667],PARAMETER[\"false_easting\",300000],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 12,
        "PSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"32110\"]]");
    p = add_epsg_def_ex (filter, first, last, 32111, "epsg", 32111,
        "NAD83 / New Jersey", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Jersey\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",38.83333333333334],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"central_meridian\",-74.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",150000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"32111\"]]");
    p = add_epsg_def_ex (filter, first, last, 32112, "epsg", 32112,
        "NAD83 / New Mexico East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.999");
    add_proj4text (p, 1,
        "909091 +x_0=165000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Mexico East\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-104.3333333333333],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999909091],PARAMETER[\"false_easting\",165000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32112\"]]");
    p = add_epsg_def_ex (filter, first, last, 32113, "epsg", 32113,
        "NAD83 / New Mexico Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=5000");
    add_proj4text (p, 1,
        "00 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +");
    add_proj4text (p, 2,
        "no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Mexico Central\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"cen");
    add_srs_wkt (p, 9,
        "tral_meridian\",-106.25],PARAMETER[\"scale_factor\",0.99");
    add_srs_wkt (p, 10,
        "99],PARAMETER[\"false_easting\",500000],PARAMETER[\"fals");
    add_srs_wkt (p, 11,
        "e_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"90");
    add_srs_wkt (p, 12,
        "01\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"32113\"]]");
    p = add_epsg_def_ex (filter, first, last, 32114, "epsg", 32114,
        "NAD83 / New Mexico West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.999");
    add_proj4text (p, 1,
        "916667 +x_0=830000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New Mexico West\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",31],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-107.8333333333333],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.999916667],PARAMETER[\"false_easting\",830000],PAR");
    add_srs_wkt (p, 11,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32114\"]]");
    p = add_epsg_def_ex (filter, first, last, 32115, "epsg", 32115,
        "NAD83 / New York East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9");
    add_proj4text (p, 1,
        "999 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 2,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York East\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",38.83333333333334],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-74.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999],PARAMETER[\"false_easting\",150000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"32115\"]]");
    p = add_epsg_def_ex (filter, first, last, 32116, "epsg", 32116,
        "NAD83 / New York Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York Central\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"]");
    add_srs_wkt (p, 8,
        ",PARAMETER[\"latitude_of_origin\",40],PARAMETER[\"centra");
    add_srs_wkt (p, 9,
        "l_meridian\",-76.58333333333333],PARAMETER[\"scale_facto");
    add_srs_wkt (p, 10,
        "r\",0.9999375],PARAMETER[\"false_easting\",250000],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 13,
        "HORITY[\"EPSG\",\"32116\"]]");
    p = add_epsg_def_ex (filter, first, last, 32117, "epsg", 32117,
        "NAD83 / New York West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.999");
    add_proj4text (p, 1,
        "9375 +x_0=350000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 2,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York West\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",40],PARAMETER[\"central_me");
    add_srs_wkt (p, 9,
        "ridian\",-78.58333333333333],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9999375],PARAMETER[\"false_easting\",350000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"32117\"]]");
    p = add_epsg_def_ex (filter, first, last, 32118, "epsg", 32118,
        "NAD83 / New York Long Island", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666");
    add_proj4text (p, 1,
        "666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / New York Long Island\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal");
    add_srs_wkt (p, 8,
        "_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",41.03333");
    add_srs_wkt (p, 9,
        "333333333],PARAMETER[\"standard_parallel_2\",40.66666666");
    add_srs_wkt (p, 10,
        "666666],PARAMETER[\"latitude_of_origin\",40.166666666666");
    add_srs_wkt (p, 11,
        "66],PARAMETER[\"central_meridian\",-74],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",300000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 13,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32118\"]]");
    p = add_epsg_def_ex (filter, first, last, 32119, "epsg", 32119,
        "NAD83 / North Carolina", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333");
    add_proj4text (p, 1,
        "334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / North Carolina\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",36.16666666666");
    add_srs_wkt (p, 9,
        "666],PARAMETER[\"standard_parallel_2\",34.33333333333334");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",33.75],PARAMETER[\"ce");
    add_srs_wkt (p, 11,
        "ntral_meridian\",-79],PARAMETER[\"false_easting\",609601");
    add_srs_wkt (p, 12,
        ".22],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AU");
    add_srs_wkt (p, 13,
        "THORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 14,
        "NORTH],AUTHORITY[\"EPSG\",\"32119\"]]");
    p = add_epsg_def_ex (filter, first, last, 32120, "epsg", 32120,
        "NAD83 / North Dakota North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.43333333333");
    add_proj4text (p, 1,
        "333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GR");
    add_proj4text (p, 2,
        "S80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / North Dakota North\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",48.7333333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",47.4333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",47],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-100.5],PARAMETER[\"false_easting\",60");
    add_srs_wkt (p, 12,
        "0000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"32120\"]]");
    p = add_epsg_def_ex (filter, first, last, 32121, "epsg", 32121,
        "NAD83 / North Dakota South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.48333333333333 +lat_2=46.18333333333");
    add_proj4text (p, 1,
        "333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / North Dakota South\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",47.4833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",46.1833333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",45.66666666666666");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-100.5],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",600000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32121\"]]");
    p = add_epsg_def_ex (filter, first, last, 32122, "epsg", 32122,
        "NAD83 / Ohio North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Ohio North\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",41.7],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",40.43333333333333],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",39.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-82.5],PARAMETER[\"false_easting\",600000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"32122\"]]");
    p = add_epsg_def_ex (filter, first, last, 32123, "epsg", 32123,
        "NAD83 / Ohio South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Ohio South\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",40.03333333333333]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",38.73333333333333],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",38],PARAMETER[\"central_m");
    add_srs_wkt (p, 11,
        "eridian\",-82.5],PARAMETER[\"false_easting\",600000],PAR");
    add_srs_wkt (p, 12,
        "AMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 13,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 14,
        "UTHORITY[\"EPSG\",\"32123\"]]");
    p = add_epsg_def_ex (filter, first, last, 32124, "epsg", 32124,
        "NAD83 / Oklahoma North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.76666666666667 +lat_2=35.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oklahoma North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",36.76666666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"standard_parallel_2\",35.56666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",35],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-98],PARAMETER[\"false_easting\",600000],P");
    add_srs_wkt (p, 12,
        "ARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORIT");
    add_srs_wkt (p, 13,
        "Y[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]");
    add_srs_wkt (p, 14,
        ",AUTHORITY[\"EPSG\",\"32124\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/srsinit/epsg_inlined_49.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri

Portions created by the Initial Developer are Copyright (C) 2008
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_49 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32125, "epsg", 32125,
        "NAD83 / Oklahoma South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=35.23333333333333 +lat_2=33.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oklahoma South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",35.23333333333");
    add_srs_wkt (p, 9,
        "333],PARAMETER[\"standard_parallel_2\",33.93333333333333");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",33.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-98],PARAMETER[\"false_east");
    add_srs_wkt (p, 12,
        "ing\",600000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 13,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AX");
    add_srs_wkt (p, 14,
        "IS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32125\"]]");
    p = add_epsg_def_ex (filter, first, last, 32126, "epsg", 32126,
        "NAD83 / Oregon North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46 +lat_2=44.33333333333334 +lat_0=43.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oregon North\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",46],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",44.33333333333334],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",43.66666666666666],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-120.5],PARAMETER[\"false_easting\",2500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32126\"]]");
    p = add_epsg_def_ex (filter, first, last, 32127, "epsg", 32127,
        "NAD83 / Oregon South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44 +lat_2=42.33333333333334 +lat_0=41.6");
    add_proj4text (p, 1,
        "6666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=G");
    add_proj4text (p, 2,
        "RS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Oregon South\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",44],PARAMETER[\"s");
    add_srs_wkt (p, 9,
        "tandard_parallel_2\",42.33333333333334],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",41.66666666666666],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-120.5],PARAMETER[\"false_easting\",1500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32127\"]]");
    p = add_epsg_def_ex (filter, first, last, 32128, "epsg", 32128,
        "NAD83 / Pennsylvania North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.95 +lat_2=40.88333333333333 +lat_0=4");
    add_proj4text (p, 1,
        "0.16666666666666 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps");
    add_proj4text (p, 2,
        "=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Pennsylvania North\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",41.95],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",40.88333333333333],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"latitude_of_origin\",40.16666666666666],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"central_meridian\",-77.75],PARAMETER[\"false_easting\"");
    add_srs_wkt (p, 12,
        ",600000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32128\"]]");
    p = add_epsg_def_ex (filter, first, last, 32129, "epsg", 32129,
        "NAD83 / Pennsylvania South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333");
    add_proj4text (p, 1,
        "333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Pennsylvania South\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",40.9666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"standard_parallel_2\",39.9333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",39.33333333333334");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-77.75],PARAMETER[\"fal");
    add_srs_wkt (p, 12,
        "se_easting\",600000],PARAMETER[\"false_northing\",0],UNI");
    add_srs_wkt (p, 13,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",E");
    add_srs_wkt (p, 14,
        "AST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32129\"]]");
    p = add_epsg_def_ex (filter, first, last, 32130, "epsg", 32130,
        "NAD83 / Rhode Island", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.9");
    add_proj4text (p, 1,
        "9999375 +x_0=100000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0");
    add_proj4text (p, 2,
        ",0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Rhode Island\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",41.08333333333334],PARAMET");
    add_srs_wkt (p, 9,
        "ER[\"central_meridian\",-71.5],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.99999375],PARAMETER[\"false_easting\",100000],PARAMET");
    add_srs_wkt (p, 11,
        "ER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 12,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 13,
        "RITY[\"EPSG\",\"32130\"]]");
    p = add_epsg_def_ex (filter, first, last, 32133, "epsg", 32133,
        "NAD83 / South Carolina", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=34.83333333333334 +lat_2=32.5 +lat_0=31");
    add_proj4text (p, 1,
        ".83333333333333 +lon_0=-81 +x_0=609600 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / South Carolina\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",34.83333333333");
    add_srs_wkt (p, 9,
        "334],PARAMETER[\"standard_parallel_2\",32.5],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",31.83333333333333],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-81],PARAMETER[\"false_easting\",609600],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32133\"]]");
    p = add_epsg_def_ex (filter, first, last, 32134, "epsg", 32134,
        "NAD83 / South Dakota North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.68333333333333 +lat_2=44.41666666666");
    add_proj4text (p, 1,
        "666 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_");
    add_proj4text (p, 2,
        "0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_def");
    add_proj4text (p, 3,
        "s");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / South Dakota North\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",45.6833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",44.4166666666");
    add_srs_wkt (p, 10,
        "6666],PARAMETER[\"latitude_of_origin\",43.83333333333334");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-100],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",600000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32134\"]]");
    p = add_epsg_def_ex (filter, first, last, 32135, "epsg", 32135,
        "NAD83 / South Dakota South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.4 +lat_2=42.83333333333334 +lat_0=42");
    add_proj4text (p, 1,
        ".33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y");
    add_proj4text (p, 2,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 3,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / South Dakota South\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",44.4],PARA");
    add_srs_wkt (p, 9,
        "METER[\"standard_parallel_2\",42.83333333333334],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"latitude_of_origin\",42.33333333333334],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-100.3333333333333],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",600000],PARAMETER[\"false_northing\",0],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32135\"]]");
    p = add_epsg_def_ex (filter, first, last, 32136, "epsg", 32136,
        "NAD83 / Tennessee", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.41666666666666 +lat_2=35.25 +lat_0=3");
    add_proj4text (p, 1,
        "4.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GR");
    add_proj4text (p, 2,
        "S80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Tennessee\",GEOGCS[\"NAD83\",DATUM[\"No");
    add_srs_wkt (p, 1,
        "rth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,");
    add_srs_wkt (p, 2,
        "298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenw");
    add_srs_wkt (p, 4,
        "ich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.");
    add_srs_wkt (p, 5,
        "0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"La");
    add_srs_wkt (p, 6,
        "titude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPS");
    add_srs_wkt (p, 7,
        "G\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"");
    add_srs_wkt (p, 8,
        "],PARAMETER[\"standard_parallel_1\",36.41666666666666],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"standard_parallel_2\",35.25],PARAMETER[\"lati");
    add_srs_wkt (p, 10,
        "tude_of_origin\",34.33333333333334],PARAMETER[\"central_");
    add_srs_wkt (p, 11,
        "meridian\",-86],PARAMETER[\"false_easting\",600000],PARA");
    add_srs_wkt (p, 12,
        "METER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUT");
    add_srs_wkt (p, 14,
        "HORITY[\"EPSG\",\"32136\"]]");
    p = add_epsg_def_ex (filter, first, last, 32137, "epsg", 32137,
        "NAD83 / Texas North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=36.18333333333333 +lat_2=34.65 +lat_0=3");
    add_proj4text (p, 1,
        "4 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +t");
    add_proj4text (p, 2,
        "owgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas North\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",36.18333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",34.65],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",34],PARAMETER[\"central_meridian\",-");
    add_srs_wkt (p, 11,
        "101.5],PARAMETER[\"false_easting\",200000],PARAMETER[\"f");
    add_srs_wkt (p, 12,
        "alse_northing\",1000000],UNIT[\"metre\",1,AUTHORITY[\"EP");
    add_srs_wkt (p, 13,
        "SG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHO");
    add_srs_wkt (p, 14,
        "RITY[\"EPSG\",\"32137\"]]");
    p = add_epsg_def_ex (filter, first, last, 32138, "epsg", 32138,
        "NAD83 / Texas North Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=33.96666666666667 +lat_2=32.13333333333");
    add_proj4text (p, 1,
        "333 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y");
    add_proj4text (p, 2,
        "_0=2000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas North Central\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",33.9666666");
    add_srs_wkt (p, 9,
        "6666667],PARAMETER[\"standard_parallel_2\",32.1333333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",31.66666666666667");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-98.5],PARAMETER[\"fals");
    add_srs_wkt (p, 12,
        "e_easting\",600000],PARAMETER[\"false_northing\",2000000");
    add_srs_wkt (p, 13,
        "],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 14,
        "X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32138\"");
    add_srs_wkt (p, 15,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32139, "epsg", 32139,
        "NAD83 / Texas Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=31.88333333333333 +lat_2=30.11666666666");
    add_proj4text (p, 1,
        "667 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +");
    add_proj4text (p, 2,
        "x_0=700000 +y_0=3000000 +ellps=GRS80 +towgs84=0,0,0,0,0,");
    add_proj4text (p, 3,
        "0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas Central\",GEOGCS[\"NAD83\",DATUM[");
    add_srs_wkt (p, 1,
        "\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378");
    add_srs_wkt (p, 2,
        "137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gr");
    add_srs_wkt (p, 4,
        "eenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\"");
    add_srs_wkt (p, 5,
        ",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",31.88333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",30.11666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",29.66666666666667],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-100.3333333333333],PARAMETER[");
    add_srs_wkt (p, 12,
        "\"false_easting\",700000],PARAMETER[\"false_northing\",3");
    add_srs_wkt (p, 13,
        "000000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],A");
    add_srs_wkt (p, 14,
        "XIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 15,
        "2139\"]]");
    p = add_epsg_def_ex (filter, first, last, 32140, "epsg", 32140,
        "NAD83 / Texas South Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=30.28333333333333 +lat_2=28.38333333333");
    add_proj4text (p, 1,
        "333 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +n");
    add_proj4text (p, 3,
        "o_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas South Central\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",30.2833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",28.3833333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",27.83333333333333");
    add_srs_wkt (p, 11,
        "],PARAMETER[\"central_meridian\",-99],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",600000],PARAMETER[\"false_northing\",4000000],");
    add_srs_wkt (p, 13,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32140\"]]");
    p = add_epsg_def_ex (filter, first, last, 32141, "epsg", 32141,
        "NAD83 / Texas South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y");
    add_proj4text (p, 2,
        "_0=5000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 3,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Texas South\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",27.83333333333333");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"standard_parallel_2\",26.16666666666667],P");
    add_srs_wkt (p, 10,
        "ARAMETER[\"latitude_of_origin\",25.66666666666667],PARAM");
    add_srs_wkt (p, 11,
        "ETER[\"central_meridian\",-98.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",300000],PARAMETER[\"false_northing\",5000000],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32141\"]]");
    p = add_epsg_def_ex (filter, first, last, 32142, "epsg", 32142,
        "NAD83 / Utah North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=41.78333333333333 +lat_2=40.71666666666");
    add_proj4text (p, 1,
        "667 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +");
    add_proj4text (p, 2,
        "y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Utah North\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",41.78333333333333]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"standard_parallel_2\",40.71666666666667],PA");
    add_srs_wkt (p, 10,
        "RAMETER[\"latitude_of_origin\",40.33333333333334],PARAME");
    add_srs_wkt (p, 11,
        "TER[\"central_meridian\",-111.5],PARAMETER[\"false_easti");
    add_srs_wkt (p, 12,
        "ng\",500000],PARAMETER[\"false_northing\",1000000],UNIT[");
    add_srs_wkt (p, 13,
        "\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAS");
    add_srs_wkt (p, 14,
        "T],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32142\"]]");
    p = add_epsg_def_ex (filter, first, last, 32143, "epsg", 32143,
        "NAD83 / Utah Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.65 +lat_2=39.01666666666667 +lat_0=3");
    add_proj4text (p, 1,
        "8.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Utah Central\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2S");
    add_srs_wkt (p, 8,
        "P\"],PARAMETER[\"standard_parallel_1\",40.65],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",39.01666666666667],PARAMETER[\"l");
    add_srs_wkt (p, 10,
        "atitude_of_origin\",38.33333333333334],PARAMETER[\"centr");
    add_srs_wkt (p, 11,
        "al_meridian\",-111.5],PARAMETER[\"false_easting\",500000");
    add_srs_wkt (p, 12,
        "],PARAMETER[\"false_northing\",2000000],UNIT[\"metre\",1");
    add_srs_wkt (p, 13,
        ",AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y");
    add_srs_wkt (p, 14,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32143\"]]");
    p = add_epsg_def_ex (filter, first, last, 32144, "epsg", 32144,
        "NAD83 / Utah South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.35 +lat_2=37.21666666666667 +lat_0=3");
    add_proj4text (p, 1,
        "6.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 ");
    add_proj4text (p, 2,
        "+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Utah South\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP");
    add_srs_wkt (p, 8,
        "\"],PARAMETER[\"standard_parallel_1\",38.35],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "standard_parallel_2\",37.21666666666667],PARAMETER[\"lat");
    add_srs_wkt (p, 10,
        "itude_of_origin\",36.66666666666666],PARAMETER[\"central");
    add_srs_wkt (p, 11,
        "_meridian\",-111.5],PARAMETER[\"false_easting\",500000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",3000000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 14,
        ",NORTH],AUTHORITY[\"EPSG\",\"32144\"]]");
    p = add_epsg_def_ex (filter, first, last, 32145, "epsg", 32145,
        "NAD83 / Vermont", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.999964286 +x_0");
    add_proj4text (p, 1,
        "=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Vermont\",GEOGCS[\"NAD83\",DATUM[\"Nort");
    add_srs_wkt (p, 1,
        "h_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,29");
    add_srs_wkt (p, 2,
        "8.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,");
    add_srs_wkt (p, 3,
        "0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwic");
    add_srs_wkt (p, 4,
        "h\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01");
    add_srs_wkt (p, 5,
        "74532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Lati");
    add_srs_wkt (p, 6,
        "tude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 7,
        ",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETE");
    add_srs_wkt (p, 8,
        "R[\"latitude_of_origin\",42.5],PARAMETER[\"central_merid");
    add_srs_wkt (p, 9,
        "ian\",-72.5],PARAMETER[\"scale_factor\",0.999964286],PAR");
    add_srs_wkt (p, 10,
        "AMETER[\"false_easting\",500000],PARAMETER[\"false_north");
    add_srs_wkt (p, 11,
        "ing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt (p, 12,
        "AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32145\"]]");
    p = add_epsg_def_ex (filter, first, last, 32146, "epsg", 32146,
        "NAD83 / Virginia North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=39.2 +lat_2=38.03333333333333 +lat_0=37");
    add_proj4text (p, 1,
        ".66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +");
    add_proj4text (p, 2,
        "ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Virginia North\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",39.2],PARAMETE");
    add_srs_wkt (p, 9,
        "R[\"standard_parallel_2\",38.03333333333333],PARAMETER[\"");
    add_srs_wkt (p, 10,
        "latitude_of_origin\",37.66666666666666],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-78.5],PARAMETER[\"false_easting\",350000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",2000000],UNIT[\"metre\",");
    add_srs_wkt (p, 13,
        "1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"");
    add_srs_wkt (p, 14,
        "Y\",NORTH],AUTHORITY[\"EPSG\",\"32146\"]]");
    p = add_epsg_def_ex (filter, first, last, 32147, "epsg", 32147,
        "NAD83 / Virginia South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=37.96666666666667 +lat_2=36.76666666666");
    add_proj4text (p, 1,
        "667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +");
    add_proj4text (p, 2,
        "y_0=1000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m");
    add_proj4text (p, 3,
        " +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Virginia South\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",37.96666666666");
    add_srs_wkt (p, 9,
        "667],PARAMETER[\"standard_parallel_2\",36.76666666666667");
    add_srs_wkt (p, 10,
        "],PARAMETER[\"latitude_of_origin\",36.33333333333334],PA");
    add_srs_wkt (p, 11,
        "RAMETER[\"central_meridian\",-78.5],PARAMETER[\"false_ea");
    add_srs_wkt (p, 12,
        "sting\",3500000],PARAMETER[\"false_northing\",1000000],U");
    add_srs_wkt (p, 13,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\"");
    add_srs_wkt (p, 14,
        ",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32147\"]]");
    p = add_epsg_def_ex (filter, first, last, 32148, "epsg", 32148,
        "NAD83 / Washington North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47");
    add_proj4text (p, 1,
        " +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS");
    add_proj4text (p, 2,
        "80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Washington North\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",48.7333333333");
    add_srs_wkt (p, 9,
        "3333],PARAMETER[\"standard_parallel_2\",47.5],PARAMETER[");
    add_srs_wkt (p, 10,
        "\"latitude_of_origin\",47],PARAMETER[\"central_meridian\"");
    add_srs_wkt (p, 11,
        ",-120.8333333333333],PARAMETER[\"false_easting\",500000]");
    add_srs_wkt (p, 12,
        ",PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORT");
    add_srs_wkt (p, 14,
        "H],AUTHORITY[\"EPSG\",\"32148\"]]");
    p = add_epsg_def_ex (filter, first, last, 32149, "epsg", 32149,
        "NAD83 / Washington South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=47.33333333333334 +lat_2=45.83333333333");
    add_proj4text (p, 1,
        "334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Washington South\",GEOGCS[\"NAD83\",DAT");
    add_srs_wkt (p, 1,
        "UM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6");
    add_srs_wkt (p, 2,
        "378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS");
    add_srs_wkt (p, 3,
        "84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",47.3333333333");
    add_srs_wkt (p, 9,
        "3334],PARAMETER[\"standard_parallel_2\",45.8333333333333");
    add_srs_wkt (p, 10,
        "4],PARAMETER[\"latitude_of_origin\",45.33333333333334],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"central_meridian\",-120.5],PARAMETER[\"false_");
    add_srs_wkt (p, 12,
        "easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 13,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST]");
    add_srs_wkt (p, 14,
        ",AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32149\"]]");
    p = add_epsg_def_ex (filter, first, last, 32150, "epsg", 32150,
        "NAD83 / West Virginia North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=40.25 +lat_2=39 +lat_0=38.5 +lon_0=-79.");
    add_proj4text (p, 1,
        "5 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0");
    add_proj4text (p, 2,
        " +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia North\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",40.25],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"standard_parallel_2\",39],PARAMETER[\"latitude_");
    add_srs_wkt (p, 10,
        "of_origin\",38.5],PARAMETER[\"central_meridian\",-79.5],");
    add_srs_wkt (p, 11,
        "PARAMETER[\"false_easting\",600000],PARAMETER[\"false_no");
    add_srs_wkt (p, 12,
        "rthing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"");
    add_srs_wkt (p, 13,
        "]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 14,
        ",\"32150\"]]");
    p = add_epsg_def_ex (filter, first, last, 32151, "epsg", 32151,
        "NAD83 / West Virginia South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=38.88333333333333 +lat_2=37.48333333333");
    add_proj4text (p, 1,
        "333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / West Virginia South\",GEOGCS[\"NAD83\",");
    add_srs_wkt (p, 1,
        "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",38.8833333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",37.4833333333");
    add_srs_wkt (p, 10,
        "3333],PARAMETER[\"latitude_of_origin\",37],PARAMETER[\"c");
    add_srs_wkt (p, 11,
        "entral_meridian\",-81],PARAMETER[\"false_easting\",60000");
    add_srs_wkt (p, 12,
        "0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTH");
    add_srs_wkt (p, 13,
        "ORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NO");
    add_srs_wkt (p, 14,
        "RTH],AUTHORITY[\"EPSG\",\"32151\"]]");
    p = add_epsg_def_ex (filter, first, last, 32152, "epsg", 32152,
        "NAD83 / Wisconsin North", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=46.76666666666667 +lat_2=45.56666666666");
    add_proj4text (p, 1,
        "667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0");
    add_proj4text (p, 2,
        "=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wisconsin North\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",46.7666666666");
    add_srs_wkt (p, 9,
        "6667],PARAMETER[\"standard_parallel_2\",45.5666666666666");
    add_srs_wkt (p, 10,
        "7],PARAMETER[\"latitude_of_origin\",45.16666666666666],P");
    add_srs_wkt (p, 11,
        "ARAMETER[\"central_meridian\",-90],PARAMETER[\"false_eas");
    add_srs_wkt (p, 12,
        "ting\",600000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 13,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],A");
    add_srs_wkt (p, 14,
        "XIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32152\"]]");
    p = add_epsg_def_ex (filter, first, last, 32153, "epsg", 32153,
        "NAD83 / Wisconsin Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=45.5 +lat_2=44.25 +lat_0=43.83333333333");
    add_proj4text (p, 1,
        "334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=");
    add_proj4text (p, 2,
        "0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wisconsin Central\",GEOGCS[\"NAD83\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",");
    add_srs_wkt (p, 2,
        "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWG");
    add_srs_wkt (p, 3,
        "S84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[");
    add_srs_wkt (p, 4,
        "\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"deg");
    add_srs_wkt (p, 5,
        "ree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],A");
    add_srs_wkt (p, 6,
        "XIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORI");
    add_srs_wkt (p, 7,
        "TY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Co");
    add_srs_wkt (p, 8,
        "nic_2SP\"],PARAMETER[\"standard_parallel_1\",45.5],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"standard_parallel_2\",44.25],PARAMETER[\"latitude");
    add_srs_wkt (p, 10,
        "_of_origin\",43.83333333333334],PARAMETER[\"central_meri");
    add_srs_wkt (p, 11,
        "dian\",-90],PARAMETER[\"false_easting\",600000],PARAMETE");
    add_srs_wkt (p, 12,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 13,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 14,
        "ITY[\"EPSG\",\"32153\"]]");
    p = add_epsg_def_ex (filter, first, last, 32154, "epsg", 32154,
        "NAD83 / Wisconsin South", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=44.06666666666667 +lat_2=42.73333333333");
    add_proj4text (p, 1,
        "333 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80");
    add_proj4text (p, 2,
        " +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wisconsin South\",GEOGCS[\"NAD83\",DATU");
    add_srs_wkt (p, 1,
        "M[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",63");
    add_srs_wkt (p, 2,
        "78137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS8");
    add_srs_wkt (p, 3,
        "4[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"");
    add_srs_wkt (p, 4,
        "Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degre");
    add_srs_wkt (p, 5,
        "e\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXI");
    add_srs_wkt (p, 6,
        "S[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY");
    add_srs_wkt (p, 7,
        "[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Coni");
    add_srs_wkt (p, 8,
        "c_2SP\"],PARAMETER[\"standard_parallel_1\",44.0666666666");
    add_srs_wkt (p, 9,
        "6667],PARAMETER[\"standard_parallel_2\",42.7333333333333");
    add_srs_wkt (p, 10,
        "3],PARAMETER[\"latitude_of_origin\",42],PARAMETER[\"cent");
    add_srs_wkt (p, 11,
        "ral_meridian\",-90],PARAMETER[\"false_easting\",600000],");
    add_srs_wkt (p, 12,
        "PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORI");
    add_srs_wkt (p, 13,
        "TY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH");
    add_srs_wkt (p, 14,
        "],AUTHORITY[\"EPSG\",\"32154\"]]");
    p = add_epsg_def_ex (filter, first, last, 32155, "epsg", 32155,
        "NAD83 / Wyoming East", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9");
    add_proj4text (p, 1,
        "999375 +x_0=200000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,");
    add_proj4text (p, 2,
        "0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming East\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",40.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-105.1666666666667],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999375],PARAMETER[\"false_easting\",200000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPS");
    add_srs_wkt (p, 12,
        "G\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHOR");
    add_srs_wkt (p, 13,
        "ITY[\"EPSG\",\"32155\"]]");
    p = add_epsg_def_ex (filter, first, last, 32156, "epsg", 32156,
        "NAD83 / Wyoming East Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9");
    add_proj4text (p, 1,
        "999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 2,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming East Central\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-107.3333333333333],PARAMETER[\"scale");
    add_srs_wkt (p, 10,
        "_factor\",0.9999375],PARAMETER[\"false_easting\",400000]");
    add_srs_wkt (p, 11,
        ",PARAMETER[\"false_northing\",100000],UNIT[\"metre\",1,A");
    add_srs_wkt (p, 12,
        "UTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\"");
    add_srs_wkt (p, 13,
        ",NORTH],AUTHORITY[\"EPSG\",\"32156\"]]");
    p = add_epsg_def_ex (filter, first, last, 32157, "epsg", 32157,
        "NAD83 / Wyoming West Central", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0");
    add_proj4text (p, 1,
        "=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming West Central\",GEOGCS[\"NAD83\"");
    add_srs_wkt (p, 1,
        ",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980");
    add_srs_wkt (p, 2,
        "\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],T");
    add_srs_wkt (p, 3,
        "OWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIM");
    add_srs_wkt (p, 4,
        "EM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"");
    add_srs_wkt (p, 5,
        "degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]");
    add_srs_wkt (p, 6,
        "],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTH");
    add_srs_wkt (p, 7,
        "ORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercat");
    add_srs_wkt (p, 8,
        "or\"],PARAMETER[\"latitude_of_origin\",40.5],PARAMETER[\"");
    add_srs_wkt (p, 9,
        "central_meridian\",-108.75],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999375],PARAMETER[\"false_easting\",600000],PARAMETER[");
    add_srs_wkt (p, 11,
        "\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 12,
        ",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY");
    add_srs_wkt (p, 13,
        "[\"EPSG\",\"32157\"]]");
    p = add_epsg_def_ex (filter, first, last, 32158, "epsg", 32158,
        "NAD83 / Wyoming West", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9");
    add_proj4text (p, 1,
        "999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +towgs84=0,0");
    add_proj4text (p, 2,
        ",0,0,0,0,0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Wyoming West\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",40.5],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-110.0833333333333],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9999375],PARAMETER[\"false_easting\",800000],PARAMETE");
    add_srs_wkt (p, 11,
        "R[\"false_northing\",100000],UNIT[\"metre\",1,AUTHORITY[");
    add_srs_wkt (p, 12,
        "\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],A");
    add_srs_wkt (p, 13,
        "UTHORITY[\"EPSG\",\"32158\"]]");
    p = add_epsg_def_ex (filter, first, last, 32161, "epsg", 32161,
        "NAD83 / Puerto Rico & Virgin Is.", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=18.43333333333333 +lat_2=18.03333333333");
    add_proj4text (p, 1,
        "333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +");
    add_proj4text (p, 2,
        "x_0=200000 +y_0=200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0");
    add_proj4text (p, 3,
        ",0 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Puerto Rico & Virgin Is.\",GEOGCS[\"NAD");
    add_srs_wkt (p, 1,
        "83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS ");
    add_srs_wkt (p, 2,
        "1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Confo");
    add_srs_wkt (p, 8,
        "rmal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",18.4");
    add_srs_wkt (p, 9,
        "3333333333333],PARAMETER[\"standard_parallel_2\",18.0333");
    add_srs_wkt (p, 10,
        "3333333333],PARAMETER[\"latitude_of_origin\",17.83333333");
    add_srs_wkt (p, 11,
        "333333],PARAMETER[\"central_meridian\",-66.4333333333333");
    add_srs_wkt (p, 12,
        "4],PARAMETER[\"false_easting\",200000],PARAMETER[\"false");
    add_srs_wkt (p, 13,
        "_northing\",200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 14,
        "\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[");
    add_srs_wkt (p, 15,
        "\"EPSG\",\"32161\"]]");
    p = add_epsg_def_ex (filter, first, last, 32164, "epsg", 32164,
        "NAD83 / BLM 14N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 14N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32164\"]]");
    p = add_epsg_def_ex (filter, first, last, 32165, "epsg", 32165,
        "NAD83 / BLM 15N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 15N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-93],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32165\"]]");
    p = add_epsg_def_ex (filter, first, last, 32166, "epsg", 32166,
        "NAD83 / BLM 16N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 16N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-87],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32166\"]]");
    p = add_epsg_def_ex (filter, first, last, 32167, "epsg", 32167,
        "NAD83 / BLM 17N (ftUS)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9996 +x_0=500000.00");
    add_proj4text (p, 1,
        "1016002 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +unit");
    add_proj4text (p, 2,
        "s=us-ft +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / BLM 17N (ftUS)\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],");
    add_srs_wkt (p, 8,
        "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_");
    add_srs_wkt (p, 9,
        "meridian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAM");
    add_srs_wkt (p, 10,
        "ETER[\"false_easting\",1640416.67],PARAMETER[\"false_nor");
    add_srs_wkt (p, 11,
        "thing\",0],UNIT[\"US survey foot\",0.3048006096012192,AU");
    add_srs_wkt (p, 12,
        "THORITY[\"EPSG\",\"9003\"]],AXIS[\"X\",EAST],AXIS[\"Y\",");
    add_srs_wkt (p, 13,
        "NORTH],AUTHORITY[\"EPSG\",\"32167\"]]");
    p = add_epsg_def_ex (filter, first, last, 32180, "epsg", 32180,
        "NAD83 / SCoPQ zone 2 (deprecated)", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-55.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / SCoPQ zone 2 (deprecated)\",GEOGCS[\"NA");
    add_srs_wkt (p, 1,
        "D83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS");
    add_srs_wkt (p, 2,
        " 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"");
    add_srs_wkt (p, 3,
        "]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],");
    add_srs_wkt (p, 4,
        "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNI");
    add_srs_wkt (p, 5,
        "T[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"912");
    add_srs_wkt (p, 6,
        "2\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],");
    add_srs_wkt (p, 7,
        "AUTHORITY[\"EPSG\",\"4269\"]],PROJECTION[\"Transverse_Me");
    add_srs_wkt (p, 8,
        "rcator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"central_meridian\",-55.5],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 10,
        ".9999],PARAMETER[\"false_easting\",304800],PARAMETER[\"f");
    add_srs_wkt (p, 11,
        "alse_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 12,
        "9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"32180\"]]");
    p = add_epsg_def_ex (filter, first, last, 32181, "epsg", 32181,
        "NAD83 / MTM zone 1", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-53 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 1\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-53],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",304800],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 13,
        "2181\"]]");
    p = add_epsg_def_ex (filter, first, last, 32182, "epsg", 32182,
        "NAD83 / MTM zone 2", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-56 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 2\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-56],PARAMETER[\"scale_factor\",0.9999],PARAMETER");
    add_srs_wkt (p, 10,
        "[\"false_easting\",304800],PARAMETER[\"false_northing\",");
    add_srs_wkt (p, 11,
        "0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"");
    add_srs_wkt (p, 12,
        "E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"3");
    add_srs_wkt (p, 13,
        "2182\"]]");
    p = add_epsg_def_ex (filter, first, last, 32183, "epsg", 32183,
        "NAD83 / MTM zone 3", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-58.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 3\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-58.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32183\"]]");
    p = add_epsg_def_ex (filter, first, last, 32184, "epsg", 32184,
        "NAD83 / MTM zone 4", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-61.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 4\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-61.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32184\"]]");
    p = add_epsg_def_ex (filter, first, last, 32185, "epsg", 32185,
        "NAD83 / MTM zone 5", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-64.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 5\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-64.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32185\"]]");
    p = add_epsg_def_ex (filter, first, last, 32186, "epsg", 32186,
        "NAD83 / MTM zone 6", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-67.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 6\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-67.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32186\"]]");
    p = add_epsg_def_ex (filter, first, last, 32187, "epsg", 32187,
        "NAD83 / MTM zone 7", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 7\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-70.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32187\"]]");
    p = add_epsg_def_ex (filter, first, last, 32188, "epsg", 32188,
        "NAD83 / MTM zone 8", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 8\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-73.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32188\"]]");
    p = add_epsg_def_ex (filter, first, last, 32189, "epsg", 32189,
        "NAD83 / MTM zone 9", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 9\",GEOGCS[\"NAD83\",DATUM[\"N");
    add_srs_wkt (p, 1,
        "orth_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137");
    add_srs_wkt (p, 2,
        ",298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0");
    add_srs_wkt (p, 3,
        ",0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Green");
    add_srs_wkt (p, 4,
        "wich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0");
    add_srs_wkt (p, 5,
        ".0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"L");
    add_srs_wkt (p, 6,
        "atitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EP");
    add_srs_wkt (p, 7,
        "SG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PARA");
    add_srs_wkt (p, 8,
        "METER[\"latitude_of_origin\",0],PARAMETER[\"central_meri");
    add_srs_wkt (p, 9,
        "dian\",-76.5],PARAMETER[\"scale_factor\",0.9999],PARAMET");
    add_srs_wkt (p, 10,
        "ER[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32189\"]]");
    p = add_epsg_def_ex (filter, first, last, 32190, "epsg", 32190,
        "NAD83 / MTM zone 10", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "E(X)", "East", "N(Y)", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 10\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-79.5],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",304800],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"E(X)\",EAST],AXIS[\"N(Y)\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32190\"]]");
    p = add_epsg_def_ex (filter, first, last, 32191, "epsg", 32191,
        "NAD83 / MTM zone 11", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 ");
    add_proj4text (p, 1,
        "+y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_");
    add_proj4text (p, 2,
        "defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 11\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-82.5],PARAMETER[\"scale_factor\",0.9999],PARAME");
    add_srs_wkt (p, 10,
        "TER[\"false_easting\",304800],PARAMETER[\"false_northing");
    add_srs_wkt (p, 11,
        "\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXI");
    add_srs_wkt (p, 12,
        "S[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"");
    add_srs_wkt (p, 13,
        "EPSG\",\"32191\"]]");
    p = add_epsg_def_ex (filter, first, last, 32192, "epsg", 32192,
        "NAD83 / MTM zone 12", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 12\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-81],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32192\"]]");
    p = add_epsg_def_ex (filter, first, last, 32193, "epsg", 32193,
        "NAD83 / MTM zone 13", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 13\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-84],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32193\"]]");
    p = add_epsg_def_ex (filter, first, last, 32194, "epsg", 32194,
        "NAD83 / MTM zone 14", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 14\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-87],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32194\"]]");
    p = add_epsg_def_ex (filter, first, last, 32195, "epsg", 32195,
        "NAD83 / MTM zone 15", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 15\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-90],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32195\"]]");
    p = add_epsg_def_ex (filter, first, last, 32196, "epsg", 32196,
        "NAD83 / MTM zone 16", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 16\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-93],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32196\"]]");
    p = add_epsg_def_ex (filter, first, last, 32197, "epsg", 32197,
        "NAD83 / MTM zone 17", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y");
    add_proj4text (p, 1,
        "_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_de");
    add_proj4text (p, 2,
        "fs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / MTM zone 17\",GEOGCS[\"NAD83\",DATUM[\"");
    add_srs_wkt (p, 1,
        "North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637813");
    add_srs_wkt (p, 2,
        "7,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,");
    add_srs_wkt (p, 3,
        "0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Gree");
    add_srs_wkt (p, 4,
        "nwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",");
    add_srs_wkt (p, 5,
        "0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"");
    add_srs_wkt (p, 6,
        "Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"E");
    add_srs_wkt (p, 7,
        "PSG\",\"4269\"]],PROJECTION[\"Transverse_Mercator\"],PAR");
    add_srs_wkt (p, 8,
        "AMETER[\"latitude_of_origin\",0],PARAMETER[\"central_mer");
    add_srs_wkt (p, 9,
        "idian\",-96],PARAMETER[\"scale_factor\",0.9999],PARAMETE");
    add_srs_wkt (p, 10,
        "R[\"false_easting\",304800],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 11,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 12,
        "\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"E");
    add_srs_wkt (p, 13,
        "PSG\",\"32197\"]]");
    p = add_epsg_def_ex (filter, first, last, 32198, "epsg", 32198,
        "NAD83 / Quebec Lambert", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=60 +lat_2=46 +lat_0=44 +lon_0=-68.5 +x_");
    add_proj4text (p, 1,
        "0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m ");
    add_proj4text (p, 2,
        "+no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Quebec Lambert\",GEOGCS[\"NAD83\",DATUM");
    add_srs_wkt (p, 1,
        "[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",637");
    add_srs_wkt (p, 2,
        "8137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84");
    add_srs_wkt (p, 3,
        "[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"G");
    add_srs_wkt (p, 4,
        "reenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree");
    add_srs_wkt (p, 5,
        "\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS");
    add_srs_wkt (p, 6,
        "[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[");
    add_srs_wkt (p, 7,
        "\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_Conic");
    add_srs_wkt (p, 8,
        "_2SP\"],PARAMETER[\"standard_parallel_1\",60],PARAMETER[");
    add_srs_wkt (p, 9,
        "\"standard_parallel_2\",46],PARAMETER[\"latitude_of_orig");
    add_srs_wkt (p, 10,
        "in\",44],PARAMETER[\"central_meridian\",-68.5],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_easting\",0],PARAMETER[\"false_northing\",0],UN");
    add_srs_wkt (p, 12,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",");
    add_srs_wkt (p, 13,
        "EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32198\"]]");
    p = add_epsg_def_ex (filter, first, last, 32199, "epsg", 32199,
        "NAD83 / Louisiana Offshore", 0, 0,
        "GRS 1980", "Greenwich",
        "North_American_Datum_1983", "Lambert_Conformal_Conic_2SP", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=lcc +lat_1=27.83333333333333 +lat_2=26.16666666666");
    add_proj4text (p, 1,
        "667 +lat_0=25.5 +lon_0=-91.33333333333333 +x_0=1000000 +");
    add_proj4text (p, 2,
        "y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_d");
    add_proj4text (p, 3,
        "efs");
    add_srs_wkt (p, 0,
        "PROJCS[\"NAD83 / Louisiana Offshore\",GEOGCS[\"NAD83\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"");
    add_srs_wkt (p, 2,
        ",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOW");
    add_srs_wkt (p, 3,
        "GS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM");
    add_srs_wkt (p, 4,
        "[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"de");
    add_srs_wkt (p, 5,
        "gree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],");
    add_srs_wkt (p, 6,
        "AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHOR");
    add_srs_wkt (p, 7,
        "ITY[\"EPSG\",\"4269\"]],PROJECTION[\"Lambert_Conformal_C");
    add_srs_wkt (p, 8,
        "onic_2SP\"],PARAMETER[\"standard_parallel_1\",27.8333333");
    add_srs_wkt (p, 9,
        "3333333],PARAMETER[\"standard_parallel_2\",26.1666666666");
    add_srs_wkt (p, 10,
        "6667],PARAMETER[\"latitude_of_origin\",25.5],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "central_meridian\",-91.33333333333333],PARAMETER[\"false");
    add_srs_wkt (p, 12,
        "_easting\",1000000],PARAMETER[\"false_northing\",0],UNIT");
    add_srs_wkt (p, 13,
        "[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EA");
    add_srs_wkt (p, 14,
        "ST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32199\"]]");
    p = add_epsg_def_ex (filter, first, last, 32201, "epsg", 32201,
        "WGS 72 / UTM zone 1N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 1N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32201");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32202, "epsg", 32202,
        "WGS 72 / UTM zone 2N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 2N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32202");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32203, "epsg", 32203,
        "WGS 72 / UTM zone 3N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 3N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-165],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32203");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32204, "epsg", 32204,
        "WGS 72 / UTM zone 4N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 4N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-159],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32204");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32205, "epsg", 32205,
        "WGS 72 / UTM zone 5N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 5N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-153],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32205");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32206, "epsg", 32206,
        "WGS 72 / UTM zone 6N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 6N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-147],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32206");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32207, "epsg", 32207,
        "WGS 72 / UTM zone 7N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 7N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32207");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32208, "epsg", 32208,
        "WGS 72 / UTM zone 8N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 8N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-135],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32208");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32209, "epsg", 32209,
        "WGS 72 / UTM zone 9N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.55");
    add_proj4text (p, 1,
        "4,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 9N\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-129],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32209");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32210, "epsg", 32210,
        "WGS 72 / UTM zone 10N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 10N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-123");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "10\"]]");
    p = add_epsg_def_ex (filter, first, last, 32211, "epsg", 32211,
        "WGS 72 / UTM zone 11N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 11N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-117");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "11\"]]");
    p = add_epsg_def_ex (filter, first, last, 32212, "epsg", 32212,
        "WGS 72 / UTM zone 12N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 12N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-111");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "12\"]]");
    p = add_epsg_def_ex (filter, first, last, 32213, "epsg", 32213,
        "WGS 72 / UTM zone 13N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 13N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-105");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"");
    add_srs_wkt (p, 11,
        "metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\"");
    add_srs_wkt (p, 12,
        ",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"322");
    add_srs_wkt (p, 13,
        "13\"]]");
    p = add_epsg_def_ex (filter, first, last, 32214, "epsg", 32214,
        "WGS 72 / UTM zone 14N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 14N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-99]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 32215, "epsg", 32215,
        "WGS 72 / UTM zone 15N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 15N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-93]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 32216, "epsg", 32216,
        "WGS 72 / UTM zone 16N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 16N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-87]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32217, "epsg", 32217,
        "WGS 72 / UTM zone 17N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 17N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32218, "epsg", 32218,
        "WGS 72 / UTM zone 18N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 18N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32219, "epsg", 32219,
        "WGS 72 / UTM zone 19N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 19N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3221");
    add_srs_wkt (p, 13,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 32220, "epsg", 32220,
        "WGS 72 / UTM zone 20N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 20N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 32221, "epsg", 32221,
        "WGS 72 / UTM zone 21N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 21N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 32222, "epsg", 32222,
        "WGS 72 / UTM zone 22N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 22N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 32223, "epsg", 32223,
        "WGS 72 / UTM zone 23N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 23N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-45]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 32224, "epsg", 32224,
        "WGS 72 / UTM zone 24N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 24N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-39]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 32225, "epsg", 32225,
        "WGS 72 / UTM zone 25N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 25N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-33]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 32226, "epsg", 32226,
        "WGS 72 / UTM zone 26N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 26N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-27]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32227, "epsg", 32227,
        "WGS 72 / UTM zone 27N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 27N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-21]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32228, "epsg", 32228,
        "WGS 72 / UTM zone 28N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 28N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-15]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3222");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32229, "epsg", 32229,
        "WGS 72 / UTM zone 29N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 29N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-9],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32229");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32230, "epsg", 32230,
        "WGS 72 / UTM zone 30N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 30N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-3],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32230");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32231, "epsg", 32231,
        "WGS 72 / UTM zone 31N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 31N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",3],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32231\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32232, "epsg", 32232,
        "WGS 72 / UTM zone 32N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 32N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",9],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",0],UNIT[\"met");
    add_srs_wkt (p, 11,
        "re\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EA");
    add_srs_wkt (p, 12,
        "ST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32232\"");
    add_srs_wkt (p, 13,
        "]]");
    p = add_epsg_def_ex (filter, first, last, 32233, "epsg", 32233,
        "WGS 72 / UTM zone 33N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 33N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",15],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32233");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32234, "epsg", 32234,
        "WGS 72 / UTM zone 34N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 34N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",21],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32234");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32235, "epsg", 32235,
        "WGS 72 / UTM zone 35N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 35N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",27],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32235");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32236, "epsg", 32236,
        "WGS 72 / UTM zone 36N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 36N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32236");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32237, "epsg", 32237,
        "WGS 72 / UTM zone 37N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 37N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",39],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32237");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32238, "epsg", 32238,
        "WGS 72 / UTM zone 38N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 38N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32238");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32239, "epsg", 32239,
        "WGS 72 / UTM zone 39N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 39N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",51],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32239");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32240, "epsg", 32240,
        "WGS 72 / UTM zone 40N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 40N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",57],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32240");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32241, "epsg", 32241,
        "WGS 72 / UTM zone 41N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 41N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",63],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32241");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32242, "epsg", 32242,
        "WGS 72 / UTM zone 42N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 42N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",69],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32242");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32243, "epsg", 32243,
        "WGS 72 / UTM zone 43N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 43N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",75],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32243");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32244, "epsg", 32244,
        "WGS 72 / UTM zone 44N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 44N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",81],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32244");
    add_srs_wkt (p, 13,
        "\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/srsinit/epsg_inlined_50.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri

Portions created by the Initial Developer are Copyright (C) 2008
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_50 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32245, "epsg", 32245,
        "WGS 72 / UTM zone 45N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 45N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",87],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32245");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32246, "epsg", 32246,
        "WGS 72 / UTM zone 46N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 46N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",93],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32246");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32247, "epsg", 32247,
        "WGS 72 / UTM zone 47N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 47N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",99],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"me");
    add_srs_wkt (p, 11,
        "tre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",E");
    add_srs_wkt (p, 12,
        "AST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32247");
    add_srs_wkt (p, 13,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32248, "epsg", 32248,
        "WGS 72 / UTM zone 48N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 48N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",105]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3224");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32249, "epsg", 32249,
        "WGS 72 / UTM zone 49N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 49N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",111]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3224");
    add_srs_wkt (p, 13,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 32250, "epsg", 32250,
        "WGS 72 / UTM zone 50N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 50N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",117]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 32251, "epsg", 32251,
        "WGS 72 / UTM zone 51N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 51N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",123]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "1\"]]");
    p = add_epsg_def_ex (filter, first, last, 32252, "epsg", 32252,
        "WGS 72 / UTM zone 52N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 52N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",129]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "2\"]]");
    p = add_epsg_def_ex (filter, first, last, 32253, "epsg", 32253,
        "WGS 72 / UTM zone 53N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 53N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",135]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "3\"]]");
    p = add_epsg_def_ex (filter, first, last, 32254, "epsg", 32254,
        "WGS 72 / UTM zone 54N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 54N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",141]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "4\"]]");
    p = add_epsg_def_ex (filter, first, last, 32255, "epsg", 32255,
        "WGS 72 / UTM zone 55N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 55N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",147]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "5\"]]");
    p = add_epsg_def_ex (filter, first, last, 32256, "epsg", 32256,
        "WGS 72 / UTM zone 56N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 56N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",153]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "6\"]]");
    p = add_epsg_def_ex (filter, first, last, 32257, "epsg", 32257,
        "WGS 72 / UTM zone 57N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 57N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",159]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "7\"]]");
    p = add_epsg_def_ex (filter, first, last, 32258, "epsg", 32258,
        "WGS 72 / UTM zone 58N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 58N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",165]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "8\"]]");
    p = add_epsg_def_ex (filter, first, last, 32259, "epsg", 32259,
        "WGS 72 / UTM zone 59N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 59N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",171]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3225");
    add_srs_wkt (p, 13,
        "9\"]]");
    p = add_epsg_def_ex (filter, first, last, 32260, "epsg", 32260,
        "WGS 72 / UTM zone 60N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.5");
    add_proj4text (p, 1,
        "54,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 60N\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",177]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"m");
    add_srs_wkt (p, 11,
        "etre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",");
    add_srs_wkt (p, 12,
        "EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"3226");
    add_srs_wkt (p, 13,
        "0\"]]");
    p = add_epsg_def_ex (filter, first, last, 32301, "epsg", 32301,
        "WGS 72 / UTM zone 1S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 1S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-177],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32301\"]]");
    p = add_epsg_def_ex (filter, first, last, 32302, "epsg", 32302,
        "WGS 72 / UTM zone 2S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 2S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-171],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32302\"]]");
    p = add_epsg_def_ex (filter, first, last, 32303, "epsg", 32303,
        "WGS 72 / UTM zone 3S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 3S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-165],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32303\"]]");
    p = add_epsg_def_ex (filter, first, last, 32304, "epsg", 32304,
        "WGS 72 / UTM zone 4S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 4S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-159],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32304\"]]");
    p = add_epsg_def_ex (filter, first, last, 32305, "epsg", 32305,
        "WGS 72 / UTM zone 5S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 5S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-153],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32305\"]]");
    p = add_epsg_def_ex (filter, first, last, 32306, "epsg", 32306,
        "WGS 72 / UTM zone 6S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 6S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-147],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32306\"]]");
    p = add_epsg_def_ex (filter, first, last, 32307, "epsg", 32307,
        "WGS 72 / UTM zone 7S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 7S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-141],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32307\"]]");
    p = add_epsg_def_ex (filter, first, last, 32308, "epsg", 32308,
        "WGS 72 / UTM zone 8S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 8S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-135],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32308\"]]");
    p = add_epsg_def_ex (filter, first, last, 32309, "epsg", 32309,
        "WGS 72 / UTM zone 9S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,4.5,0");
    add_proj4text (p, 1,
        ",0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 9S\",GEOGCS[\"WGS 72\",DATUM[");
    add_srs_wkt (p, 1,
        "\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORIT");
    add_srs_wkt (p, 2,
        "Y[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263],");
    add_srs_wkt (p, 3,
        "AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AUT");
    add_srs_wkt (p, 4,
        "HORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251");
    add_srs_wkt (p, 5,
        "99433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NO");
    add_srs_wkt (p, 6,
        "RTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322\"");
    add_srs_wkt (p, 7,
        "]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",-129],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32309\"]]");
    p = add_epsg_def_ex (filter, first, last, 32310, "epsg", 32310,
        "WGS 72 / UTM zone 10S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 10S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-123");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32310\"]]");
    p = add_epsg_def_ex (filter, first, last, 32311, "epsg", 32311,
        "WGS 72 / UTM zone 11S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 11S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-117");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32311\"]]");
    p = add_epsg_def_ex (filter, first, last, 32312, "epsg", 32312,
        "WGS 72 / UTM zone 12S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 12S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-111");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32312\"]]");
    p = add_epsg_def_ex (filter, first, last, 32313, "epsg", 32313,
        "WGS 72 / UTM zone 13S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 13S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-105");
    add_srs_wkt (p, 9,
        "],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_e");
    add_srs_wkt (p, 10,
        "asting\",500000],PARAMETER[\"false_northing\",10000000],");
    add_srs_wkt (p, 11,
        "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Ea");
    add_srs_wkt (p, 12,
        "sting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32313\"]]");
    p = add_epsg_def_ex (filter, first, last, 32314, "epsg", 32314,
        "WGS 72 / UTM zone 14S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 14S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-99]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32314\"]]");
    p = add_epsg_def_ex (filter, first, last, 32315, "epsg", 32315,
        "WGS 72 / UTM zone 15S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 15S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-93]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32315\"]]");
    p = add_epsg_def_ex (filter, first, last, 32316, "epsg", 32316,
        "WGS 72 / UTM zone 16S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 16S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-87]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32316\"]]");
    p = add_epsg_def_ex (filter, first, last, 32317, "epsg", 32317,
        "WGS 72 / UTM zone 17S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 17S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-81]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32317\"]]");
    p = add_epsg_def_ex (filter, first, last, 32318, "epsg", 32318,
        "WGS 72 / UTM zone 18S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 18S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-75]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32318\"]]");
    p = add_epsg_def_ex (filter, first, last, 32319, "epsg", 32319,
        "WGS 72 / UTM zone 19S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 19S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-69]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32319\"]]");
    p = add_epsg_def_ex (filter, first, last, 32320, "epsg", 32320,
        "WGS 72 / UTM zone 20S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 20S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-63]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32320\"]]");
    p = add_epsg_def_ex (filter, first, last, 32321, "epsg", 32321,
        "WGS 72 / UTM zone 21S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 21S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-57]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32321\"]]");
    p = add_epsg_def_ex (filter, first, last, 32322, "epsg", 32322,
        "WGS 72 / UTM zone 22S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 22S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-51]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32322\"]]");
    p = add_epsg_def_ex (filter, first, last, 32323, "epsg", 32323,
        "WGS 72 / UTM zone 23S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 23S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-45]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32323\"]]");
    p = add_epsg_def_ex (filter, first, last, 32324, "epsg", 32324,
        "WGS 72 / UTM zone 24S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 24S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-39]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32324\"]]");
    p = add_epsg_def_ex (filter, first, last, 32325, "epsg", 32325,
        "WGS 72 / UTM zone 25S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 25S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-33]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32325\"]]");
    p = add_epsg_def_ex (filter, first, last, 32326, "epsg", 32326,
        "WGS 72 / UTM zone 26S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 26S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-27]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32326\"]]");
    p = add_epsg_def_ex (filter, first, last, 32327, "epsg", 32327,
        "WGS 72 / UTM zone 27S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 27S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-21]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32327\"]]");
    p = add_epsg_def_ex (filter, first, last, 32328, "epsg", 32328,
        "WGS 72 / UTM zone 28S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 28S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-15]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32328\"]]");
    p = add_epsg_def_ex (filter, first, last, 32329, "epsg", 32329,
        "WGS 72 / UTM zone 29S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 29S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-9],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32329\"]]");
    p = add_epsg_def_ex (filter, first, last, 32330, "epsg", 32330,
        "WGS 72 / UTM zone 30S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 30S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",-3],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32330\"]]");
    p = add_epsg_def_ex (filter, first, last, 32331, "epsg", 32331,
        "WGS 72 / UTM zone 31S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 31S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",3],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",10000000],UNI");
    add_srs_wkt (p, 11,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 12,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32331\"]]");
    p = add_epsg_def_ex (filter, first, last, 32332, "epsg", 32332,
        "WGS 72 / UTM zone 32S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 32S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",9],P");
    add_srs_wkt (p, 9,
        "ARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_east");
    add_srs_wkt (p, 10,
        "ing\",500000],PARAMETER[\"false_northing\",10000000],UNI");
    add_srs_wkt (p, 11,
        "T[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easti");
    add_srs_wkt (p, 12,
        "ng\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 13,
        "32332\"]]");
    p = add_epsg_def_ex (filter, first, last, 32333, "epsg", 32333,
        "WGS 72 / UTM zone 33S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 33S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",15],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32333\"]]");
    p = add_epsg_def_ex (filter, first, last, 32334, "epsg", 32334,
        "WGS 72 / UTM zone 34S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 34S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",21],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32334\"]]");
    p = add_epsg_def_ex (filter, first, last, 32335, "epsg", 32335,
        "WGS 72 / UTM zone 35S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 35S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",27],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32335\"]]");
    p = add_epsg_def_ex (filter, first, last, 32336, "epsg", 32336,
        "WGS 72 / UTM zone 36S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 36S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",33],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32336\"]]");
    p = add_epsg_def_ex (filter, first, last, 32337, "epsg", 32337,
        "WGS 72 / UTM zone 37S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 37S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",39],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32337\"]]");
    p = add_epsg_def_ex (filter, first, last, 32338, "epsg", 32338,
        "WGS 72 / UTM zone 38S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 38S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",45],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32338\"]]");
    p = add_epsg_def_ex (filter, first, last, 32339, "epsg", 32339,
        "WGS 72 / UTM zone 39S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 39S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",51],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32339\"]]");
    p = add_epsg_def_ex (filter, first, last, 32340, "epsg", 32340,
        "WGS 72 / UTM zone 40S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 40S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",57],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32340\"]]");
    p = add_epsg_def_ex (filter, first, last, 32341, "epsg", 32341,
        "WGS 72 / UTM zone 41S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 41S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",63],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32341\"]]");
    p = add_epsg_def_ex (filter, first, last, 32342, "epsg", 32342,
        "WGS 72 / UTM zone 42S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 42S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",69],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32342\"]]");
    p = add_epsg_def_ex (filter, first, last, 32343, "epsg", 32343,
        "WGS 72 / UTM zone 43S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 43S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",75],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32343\"]]");
    p = add_epsg_def_ex (filter, first, last, 32344, "epsg", 32344,
        "WGS 72 / UTM zone 44S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 44S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",81],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32344\"]]");
    p = add_epsg_def_ex (filter, first, last, 32345, "epsg", 32345,
        "WGS 72 / UTM zone 45S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 45S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",87],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32345\"]]");
    p = add_epsg_def_ex (filter, first, last, 32346, "epsg", 32346,
        "WGS 72 / UTM zone 46S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 46S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",93],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32346\"]]");
    p = add_epsg_def_ex (filter, first, last, 32347, "epsg", 32347,
        "WGS 72 / UTM zone 47S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 47S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",99],");
    add_srs_wkt (p, 9,
        "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_eas");
    add_srs_wkt (p, 10,
        "ting\",500000],PARAMETER[\"false_northing\",10000000],UN");
    add_srs_wkt (p, 11,
        "IT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"East");
    add_srs_wkt (p, 12,
        "ing\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 13,
        "\"32347\"]]");
    p = add_epsg_def_ex (filter, first, last, 32348, "epsg", 32348,
        "WGS 72 / UTM zone 48S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 48S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",105]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32348\"]]");
    p = add_epsg_def_ex (filter, first, last, 32349, "epsg", 32349,
        "WGS 72 / UTM zone 49S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 49S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",111]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32349\"]]");
    p = add_epsg_def_ex (filter, first, last, 32350, "epsg", 32350,
        "WGS 72 / UTM zone 50S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 50S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",117]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32350\"]]");
    p = add_epsg_def_ex (filter, first, last, 32351, "epsg", 32351,
        "WGS 72 / UTM zone 51S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 51S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",123]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32351\"]]");
    p = add_epsg_def_ex (filter, first, last, 32352, "epsg", 32352,
        "WGS 72 / UTM zone 52S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 52S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",129]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32352\"]]");
    p = add_epsg_def_ex (filter, first, last, 32353, "epsg", 32353,
        "WGS 72 / UTM zone 53S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 53S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",135]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32353\"]]");
    p = add_epsg_def_ex (filter, first, last, 32354, "epsg", 32354,
        "WGS 72 / UTM zone 54S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 54S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",141]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32354\"]]");
    p = add_epsg_def_ex (filter, first, last, 32355, "epsg", 32355,
        "WGS 72 / UTM zone 55S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 55S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",147]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32355\"]]");
    p = add_epsg_def_ex (filter, first, last, 32356, "epsg", 32356,
        "WGS 72 / UTM zone 56S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 56S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",153]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32356\"]]");
    p = add_epsg_def_ex (filter, first, last, 32357, "epsg", 32357,
        "WGS 72 / UTM zone 57S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 57S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",159]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32357\"]]");
    p = add_epsg_def_ex (filter, first, last, 32358, "epsg", 32358,
        "WGS 72 / UTM zone 58S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 58S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",165]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32358\"]]");
    p = add_epsg_def_ex (filter, first, last, 32359, "epsg", 32359,
        "WGS 72 / UTM zone 59S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 59S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",171]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32359\"]]");
    p = add_epsg_def_ex (filter, first, last, 32360, "epsg", 32360,
        "WGS 72 / UTM zone 60S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,4.5,");
    add_proj4text (p, 1,
        "0,0,0.554,0.2263 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72 / UTM zone 60S\",GEOGCS[\"WGS 72\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1972\",SPHEROID[\"WGS 72\",6378135,298.26,AUTHORI");
    add_srs_wkt (p, 2,
        "TY[\"EPSG\",\"7043\"]],TOWGS84[0,0,4.5,0,0,0.554,0.2263]");
    add_srs_wkt (p, 3,
        ",AUTHORITY[\"EPSG\",\"6322\"]],PRIMEM[\"Greenwich\",0,AU");
    add_srs_wkt (p, 4,
        "THORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925");
    add_srs_wkt (p, 5,
        "199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",N");
    add_srs_wkt (p, 6,
        "ORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4322");
    add_srs_wkt (p, 7,
        "\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"lat");
    add_srs_wkt (p, 8,
        "itude_of_origin\",0],PARAMETER[\"central_meridian\",177]");
    add_srs_wkt (p, 9,
        ",PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_ea");
    add_srs_wkt (p, 10,
        "sting\",500000],PARAMETER[\"false_northing\",10000000],U");
    add_srs_wkt (p, 11,
        "NIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Eas");
    add_srs_wkt (p, 12,
        "ting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\"");
    add_srs_wkt (p, 13,
        ",\"32360\"]]");
    p = add_epsg_def_ex (filter, first, last, 32401, "epsg", 32401,
        "WGS 72BE / UTM zone 1N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 1N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-177],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32401\"]]");
    p = add_epsg_def_ex (filter, first, last, 32402, "epsg", 32402,
        "WGS 72BE / UTM zone 2N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 2N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-171],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32402\"]]");
    p = add_epsg_def_ex (filter, first, last, 32403, "epsg", 32403,
        "WGS 72BE / UTM zone 3N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 3N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-165],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32403\"]]");
    p = add_epsg_def_ex (filter, first, last, 32404, "epsg", 32404,
        "WGS 72BE / UTM zone 4N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 4N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-159],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32404\"]]");
    p = add_epsg_def_ex (filter, first, last, 32405, "epsg", 32405,
        "WGS 72BE / UTM zone 5N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 5N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-153],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32405\"]]");
    p = add_epsg_def_ex (filter, first, last, 32406, "epsg", 32406,
        "WGS 72BE / UTM zone 6N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 6N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-147],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32406\"]]");
    p = add_epsg_def_ex (filter, first, last, 32407, "epsg", 32407,
        "WGS 72BE / UTM zone 7N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 7N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-141],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32407\"]]");
    p = add_epsg_def_ex (filter, first, last, 32408, "epsg", 32408,
        "WGS 72BE / UTM zone 8N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 8N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-135],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32408\"]]");
    p = add_epsg_def_ex (filter, first, last, 32409, "epsg", 32409,
        "WGS 72BE / UTM zone 9N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.81");
    add_proj4text (p, 1,
        "4,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 9N\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-129],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32409\"]]");
    p = add_epsg_def_ex (filter, first, last, 32410, "epsg", 32410,
        "WGS 72BE / UTM zone 10N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 10N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-123],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32410\"]]");
    p = add_epsg_def_ex (filter, first, last, 32411, "epsg", 32411,
        "WGS 72BE / UTM zone 11N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 11N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-117],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32411\"]]");
    p = add_epsg_def_ex (filter, first, last, 32412, "epsg", 32412,
        "WGS 72BE / UTM zone 12N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 12N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32412\"]]");
    p = add_epsg_def_ex (filter, first, last, 32413, "epsg", 32413,
        "WGS 72BE / UTM zone 13N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 13N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-105],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG");
    add_srs_wkt (p, 12,
        "\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",N");
    add_srs_wkt (p, 13,
        "ORTH],AUTHORITY[\"EPSG\",\"32413\"]]");
    p = add_epsg_def_ex (filter, first, last, 32414, "epsg", 32414,
        "WGS 72BE / UTM zone 14N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 14N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32414\"]]");
    p = add_epsg_def_ex (filter, first, last, 32415, "epsg", 32415,
        "WGS 72BE / UTM zone 15N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 15N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32415\"]]");
    p = add_epsg_def_ex (filter, first, last, 32416, "epsg", 32416,
        "WGS 72BE / UTM zone 16N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 16N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32416\"]]");
    p = add_epsg_def_ex (filter, first, last, 32417, "epsg", 32417,
        "WGS 72BE / UTM zone 17N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 17N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32417\"]]");
    p = add_epsg_def_ex (filter, first, last, 32418, "epsg", 32418,
        "WGS 72BE / UTM zone 18N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 18N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32418\"]]");
    p = add_epsg_def_ex (filter, first, last, 32419, "epsg", 32419,
        "WGS 72BE / UTM zone 19N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 19N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32419\"]]");
    p = add_epsg_def_ex (filter, first, last, 32420, "epsg", 32420,
        "WGS 72BE / UTM zone 20N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 20N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32420\"]]");
    p = add_epsg_def_ex (filter, first, last, 32421, "epsg", 32421,
        "WGS 72BE / UTM zone 21N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 21N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32421\"]]");
    p = add_epsg_def_ex (filter, first, last, 32422, "epsg", 32422,
        "WGS 72BE / UTM zone 22N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 22N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32422\"]]");
    p = add_epsg_def_ex (filter, first, last, 32423, "epsg", 32423,
        "WGS 72BE / UTM zone 23N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 23N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32423\"]]");
    p = add_epsg_def_ex (filter, first, last, 32424, "epsg", 32424,
        "WGS 72BE / UTM zone 24N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 24N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32424\"]]");
    p = add_epsg_def_ex (filter, first, last, 32425, "epsg", 32425,
        "WGS 72BE / UTM zone 25N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 25N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32425\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/srsinit/epsg_inlined_51.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri

Portions created by the Initial Developer are Copyright (C) 2008
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_51 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32426, "epsg", 32426,
        "WGS 72BE / UTM zone 26N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 26N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32426\"]]");
    p = add_epsg_def_ex (filter, first, last, 32427, "epsg", 32427,
        "WGS 72BE / UTM zone 27N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 27N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32427\"]]");
    p = add_epsg_def_ex (filter, first, last, 32428, "epsg", 32428,
        "WGS 72BE / UTM zone 28N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 28N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32428\"]]");
    p = add_epsg_def_ex (filter, first, last, 32429, "epsg", 32429,
        "WGS 72BE / UTM zone 29N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 29N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32429\"]]");
    p = add_epsg_def_ex (filter, first, last, 32430, "epsg", 32430,
        "WGS 72BE / UTM zone 30N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 30N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32430\"]]");
    p = add_epsg_def_ex (filter, first, last, 32431, "epsg", 32431,
        "WGS 72BE / UTM zone 31N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 31N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32431\"]]");
    p = add_epsg_def_ex (filter, first, last, 32432, "epsg", 32432,
        "WGS 72BE / UTM zone 32N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 32N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32432\"]]");
    p = add_epsg_def_ex (filter, first, last, 32433, "epsg", 32433,
        "WGS 72BE / UTM zone 33N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 33N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32433\"]]");
    p = add_epsg_def_ex (filter, first, last, 32434, "epsg", 32434,
        "WGS 72BE / UTM zone 34N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 34N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32434\"]]");
    p = add_epsg_def_ex (filter, first, last, 32435, "epsg", 32435,
        "WGS 72BE / UTM zone 35N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 35N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32435\"]]");
    p = add_epsg_def_ex (filter, first, last, 32436, "epsg", 32436,
        "WGS 72BE / UTM zone 36N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 36N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32436\"]]");
    p = add_epsg_def_ex (filter, first, last, 32437, "epsg", 32437,
        "WGS 72BE / UTM zone 37N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 37N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32437\"]]");
    p = add_epsg_def_ex (filter, first, last, 32438, "epsg", 32438,
        "WGS 72BE / UTM zone 38N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 38N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32438\"]]");
    p = add_epsg_def_ex (filter, first, last, 32439, "epsg", 32439,
        "WGS 72BE / UTM zone 39N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 39N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32439\"]]");
    p = add_epsg_def_ex (filter, first, last, 32440, "epsg", 32440,
        "WGS 72BE / UTM zone 40N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 40N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32440\"]]");
    p = add_epsg_def_ex (filter, first, last, 32441, "epsg", 32441,
        "WGS 72BE / UTM zone 41N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 41N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32441\"]]");
    p = add_epsg_def_ex (filter, first, last, 32442, "epsg", 32442,
        "WGS 72BE / UTM zone 42N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 42N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32442\"]]");
    p = add_epsg_def_ex (filter, first, last, 32443, "epsg", 32443,
        "WGS 72BE / UTM zone 43N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 43N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32443\"]]");
    p = add_epsg_def_ex (filter, first, last, 32444, "epsg", 32444,
        "WGS 72BE / UTM zone 44N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 44N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32444\"]]");
    p = add_epsg_def_ex (filter, first, last, 32445, "epsg", 32445,
        "WGS 72BE / UTM zone 45N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 45N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32445\"]]");
    p = add_epsg_def_ex (filter, first, last, 32446, "epsg", 32446,
        "WGS 72BE / UTM zone 46N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 46N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32446\"]]");
    p = add_epsg_def_ex (filter, first, last, 32447, "epsg", 32447,
        "WGS 72BE / UTM zone 47N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 47N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32447\"]]");
    p = add_epsg_def_ex (filter, first, last, 32448, "epsg", 32448,
        "WGS 72BE / UTM zone 48N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 48N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",105],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32448\"]]");
    p = add_epsg_def_ex (filter, first, last, 32449, "epsg", 32449,
        "WGS 72BE / UTM zone 49N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 49N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",111],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32449\"]]");
    p = add_epsg_def_ex (filter, first, last, 32450, "epsg", 32450,
        "WGS 72BE / UTM zone 50N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 50N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",117],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32450\"]]");
    p = add_epsg_def_ex (filter, first, last, 32451, "epsg", 32451,
        "WGS 72BE / UTM zone 51N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 51N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",123],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32451\"]]");
    p = add_epsg_def_ex (filter, first, last, 32452, "epsg", 32452,
        "WGS 72BE / UTM zone 52N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 52N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",129],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32452\"]]");
    p = add_epsg_def_ex (filter, first, last, 32453, "epsg", 32453,
        "WGS 72BE / UTM zone 53N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 53N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",135],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32453\"]]");
    p = add_epsg_def_ex (filter, first, last, 32454, "epsg", 32454,
        "WGS 72BE / UTM zone 54N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 54N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",141],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32454\"]]");
    p = add_epsg_def_ex (filter, first, last, 32455, "epsg", 32455,
        "WGS 72BE / UTM zone 55N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 55N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",147],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32455\"]]");
    p = add_epsg_def_ex (filter, first, last, 32456, "epsg", 32456,
        "WGS 72BE / UTM zone 56N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 56N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",153],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32456\"]]");
    p = add_epsg_def_ex (filter, first, last, 32457, "epsg", 32457,
        "WGS 72BE / UTM zone 57N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 57N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",159],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32457\"]]");
    p = add_epsg_def_ex (filter, first, last, 32458, "epsg", 32458,
        "WGS 72BE / UTM zone 58N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 58N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",165],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32458\"]]");
    p = add_epsg_def_ex (filter, first, last, 32459, "epsg", 32459,
        "WGS 72BE / UTM zone 59N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 59N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",171],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32459\"]]");
    p = add_epsg_def_ex (filter, first, last, 32460, "epsg", 32460,
        "WGS 72BE / UTM zone 60N", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.8");
    add_proj4text (p, 1,
        "14,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 60N\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",177],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 12,
        "\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORT");
    add_srs_wkt (p, 13,
        "H],AUTHORITY[\"EPSG\",\"32460\"]]");
    p = add_epsg_def_ex (filter, first, last, 32501, "epsg", 32501,
        "WGS 72BE / UTM zone 1S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=1 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 1S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-177],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32501\"]]");
    p = add_epsg_def_ex (filter, first, last, 32502, "epsg", 32502,
        "WGS 72BE / UTM zone 2S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=2 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 2S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-171],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32502\"]]");
    p = add_epsg_def_ex (filter, first, last, 32503, "epsg", 32503,
        "WGS 72BE / UTM zone 3S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=3 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 3S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-165],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32503\"]]");
    p = add_epsg_def_ex (filter, first, last, 32504, "epsg", 32504,
        "WGS 72BE / UTM zone 4S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=4 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 4S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-159],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32504\"]]");
    p = add_epsg_def_ex (filter, first, last, 32505, "epsg", 32505,
        "WGS 72BE / UTM zone 5S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=5 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 5S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-153],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32505\"]]");
    p = add_epsg_def_ex (filter, first, last, 32506, "epsg", 32506,
        "WGS 72BE / UTM zone 6S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=6 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 6S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-147],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32506\"]]");
    p = add_epsg_def_ex (filter, first, last, 32507, "epsg", 32507,
        "WGS 72BE / UTM zone 7S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=7 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 7S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-141],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32507\"]]");
    p = add_epsg_def_ex (filter, first, last, 32508, "epsg", 32508,
        "WGS 72BE / UTM zone 8S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=8 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 8S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-135],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32508\"]]");
    p = add_epsg_def_ex (filter, first, last, 32509, "epsg", 32509,
        "WGS 72BE / UTM zone 9S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=9 +south +ellps=WGS72 +towgs84=0,0,1.9,0");
    add_proj4text (p, 1,
        ",0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 9S\",GEOGCS[\"WGS 72BE\",DA");
    add_srs_wkt (p, 1,
        "TUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-129],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32509\"]]");
    p = add_epsg_def_ex (filter, first, last, 32510, "epsg", 32510,
        "WGS 72BE / UTM zone 10S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=10 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 10S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-123],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32510\"]]");
    p = add_epsg_def_ex (filter, first, last, 32511, "epsg", 32511,
        "WGS 72BE / UTM zone 11S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=11 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 11S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-117],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32511\"]]");
    p = add_epsg_def_ex (filter, first, last, 32512, "epsg", 32512,
        "WGS 72BE / UTM zone 12S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=12 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 12S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-111],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32512\"]]");
    p = add_epsg_def_ex (filter, first, last, 32513, "epsg", 32513,
        "WGS 72BE / UTM zone 13S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=13 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 13S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-105],PARAMETER[\"scale_factor");
    add_srs_wkt (p, 10,
        "\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER");
    add_srs_wkt (p, 11,
        "[\"false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY");
    add_srs_wkt (p, 12,
        "[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"North");
    add_srs_wkt (p, 13,
        "ing\",NORTH],AUTHORITY[\"EPSG\",\"32513\"]]");
    p = add_epsg_def_ex (filter, first, last, 32514, "epsg", 32514,
        "WGS 72BE / UTM zone 14S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=14 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 14S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32514\"]]");
    p = add_epsg_def_ex (filter, first, last, 32515, "epsg", 32515,
        "WGS 72BE / UTM zone 15S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=15 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 15S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32515\"]]");
    p = add_epsg_def_ex (filter, first, last, 32516, "epsg", 32516,
        "WGS 72BE / UTM zone 16S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=16 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 16S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32516\"]]");
    p = add_epsg_def_ex (filter, first, last, 32517, "epsg", 32517,
        "WGS 72BE / UTM zone 17S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=17 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 17S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32517\"]]");
    p = add_epsg_def_ex (filter, first, last, 32518, "epsg", 32518,
        "WGS 72BE / UTM zone 18S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=18 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 18S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32518\"]]");
    p = add_epsg_def_ex (filter, first, last, 32519, "epsg", 32519,
        "WGS 72BE / UTM zone 19S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=19 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 19S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32519\"]]");
    p = add_epsg_def_ex (filter, first, last, 32520, "epsg", 32520,
        "WGS 72BE / UTM zone 20S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=20 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 20S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32520\"]]");
    p = add_epsg_def_ex (filter, first, last, 32521, "epsg", 32521,
        "WGS 72BE / UTM zone 21S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=21 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 21S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32521\"]]");
    p = add_epsg_def_ex (filter, first, last, 32522, "epsg", 32522,
        "WGS 72BE / UTM zone 22S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=22 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 22S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32522\"]]");
    p = add_epsg_def_ex (filter, first, last, 32523, "epsg", 32523,
        "WGS 72BE / UTM zone 23S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=23 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 23S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32523\"]]");
    p = add_epsg_def_ex (filter, first, last, 32524, "epsg", 32524,
        "WGS 72BE / UTM zone 24S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=24 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 24S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32524\"]]");
    p = add_epsg_def_ex (filter, first, last, 32525, "epsg", 32525,
        "WGS 72BE / UTM zone 25S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=25 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 25S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32525\"]]");
    p = add_epsg_def_ex (filter, first, last, 32526, "epsg", 32526,
        "WGS 72BE / UTM zone 26S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=26 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 26S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32526\"]]");
    p = add_epsg_def_ex (filter, first, last, 32527, "epsg", 32527,
        "WGS 72BE / UTM zone 27S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=27 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 27S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32527\"]]");
    p = add_epsg_def_ex (filter, first, last, 32528, "epsg", 32528,
        "WGS 72BE / UTM zone 28S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=28 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 28S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32528\"]]");
    p = add_epsg_def_ex (filter, first, last, 32529, "epsg", 32529,
        "WGS 72BE / UTM zone 29S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=29 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 29S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-9],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32529\"]]");
    p = add_epsg_def_ex (filter, first, last, 32530, "epsg", 32530,
        "WGS 72BE / UTM zone 30S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=30 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 30S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",-3],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32530\"]]");
    p = add_epsg_def_ex (filter, first, last, 32531, "epsg", 32531,
        "WGS 72BE / UTM zone 31S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=31 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 31S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32531\"]]");
    p = add_epsg_def_ex (filter, first, last, 32532, "epsg", 32532,
        "WGS 72BE / UTM zone 32S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=32 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 32S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",");
    add_srs_wkt (p, 10,
        "0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32532\"]]");
    p = add_epsg_def_ex (filter, first, last, 32533, "epsg", 32533,
        "WGS 72BE / UTM zone 33S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=33 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 33S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",15],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32533\"]]");
    p = add_epsg_def_ex (filter, first, last, 32534, "epsg", 32534,
        "WGS 72BE / UTM zone 34S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 34S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",21],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32534\"]]");
    p = add_epsg_def_ex (filter, first, last, 32535, "epsg", 32535,
        "WGS 72BE / UTM zone 35S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 35S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",27],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32535\"]]");
    p = add_epsg_def_ex (filter, first, last, 32536, "epsg", 32536,
        "WGS 72BE / UTM zone 36S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=36 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 36S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",33],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32536\"]]");
    p = add_epsg_def_ex (filter, first, last, 32537, "epsg", 32537,
        "WGS 72BE / UTM zone 37S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=37 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 37S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",39],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32537\"]]");
    p = add_epsg_def_ex (filter, first, last, 32538, "epsg", 32538,
        "WGS 72BE / UTM zone 38S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=38 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 38S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",45],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32538\"]]");
    p = add_epsg_def_ex (filter, first, last, 32539, "epsg", 32539,
        "WGS 72BE / UTM zone 39S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=39 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 39S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",51],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32539\"]]");
    p = add_epsg_def_ex (filter, first, last, 32540, "epsg", 32540,
        "WGS 72BE / UTM zone 40S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=40 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 40S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",57],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32540\"]]");
    p = add_epsg_def_ex (filter, first, last, 32541, "epsg", 32541,
        "WGS 72BE / UTM zone 41S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=41 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 41S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",63],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32541\"]]");
    p = add_epsg_def_ex (filter, first, last, 32542, "epsg", 32542,
        "WGS 72BE / UTM zone 42S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=42 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 42S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",69],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32542\"]]");
    p = add_epsg_def_ex (filter, first, last, 32543, "epsg", 32543,
        "WGS 72BE / UTM zone 43S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=43 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 43S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",75],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32543\"]]");
    p = add_epsg_def_ex (filter, first, last, 32544, "epsg", 32544,
        "WGS 72BE / UTM zone 44S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=44 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 44S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",81],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32544\"]]");
    p = add_epsg_def_ex (filter, first, last, 32545, "epsg", 32545,
        "WGS 72BE / UTM zone 45S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=45 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 45S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",87],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32545\"]]");
    p = add_epsg_def_ex (filter, first, last, 32546, "epsg", 32546,
        "WGS 72BE / UTM zone 46S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=46 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 46S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",93],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32546\"]]");
    p = add_epsg_def_ex (filter, first, last, 32547, "epsg", 32547,
        "WGS 72BE / UTM zone 47S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=47 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 47S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",99],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32547\"]]");
    p = add_epsg_def_ex (filter, first, last, 32548, "epsg", 32548,
        "WGS 72BE / UTM zone 48S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=48 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 48S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",105],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32548\"]]");
    p = add_epsg_def_ex (filter, first, last, 32549, "epsg", 32549,
        "WGS 72BE / UTM zone 49S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=49 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 49S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",111],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32549\"]]");
    p = add_epsg_def_ex (filter, first, last, 32550, "epsg", 32550,
        "WGS 72BE / UTM zone 50S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=50 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 50S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",117],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32550\"]]");
    p = add_epsg_def_ex (filter, first, last, 32551, "epsg", 32551,
        "WGS 72BE / UTM zone 51S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=51 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 51S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",123],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32551\"]]");
    p = add_epsg_def_ex (filter, first, last, 32552, "epsg", 32552,
        "WGS 72BE / UTM zone 52S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=52 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 52S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",129],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32552\"]]");
    p = add_epsg_def_ex (filter, first, last, 32553, "epsg", 32553,
        "WGS 72BE / UTM zone 53S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=53 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 53S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",135],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32553\"]]");
    p = add_epsg_def_ex (filter, first, last, 32554, "epsg", 32554,
        "WGS 72BE / UTM zone 54S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=54 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 54S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",141],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32554\"]]");
    p = add_epsg_def_ex (filter, first, last, 32555, "epsg", 32555,
        "WGS 72BE / UTM zone 55S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=55 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 55S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",147],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32555\"]]");
    p = add_epsg_def_ex (filter, first, last, 32556, "epsg", 32556,
        "WGS 72BE / UTM zone 56S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=56 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 56S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",153],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32556\"]]");
    p = add_epsg_def_ex (filter, first, last, 32557, "epsg", 32557,
        "WGS 72BE / UTM zone 57S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=57 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 57S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",159],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32557\"]]");
    p = add_epsg_def_ex (filter, first, last, 32558, "epsg", 32558,
        "WGS 72BE / UTM zone 58S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=58 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 58S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",165],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32558\"]]");
    p = add_epsg_def_ex (filter, first, last, 32559, "epsg", 32559,
        "WGS 72BE / UTM zone 59S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=59 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 59S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",171],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32559\"]]");
    p = add_epsg_def_ex (filter, first, last, 32560, "epsg", 32560,
        "WGS 72BE / UTM zone 60S", 0, 0,
        "WGS 72", "Greenwich",
        "WGS_1972_Transit_Broadcast_Ephemeris", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=60 +south +ellps=WGS72 +towgs84=0,0,1.9,");
    add_proj4text (p, 1,
        "0,0,0.814,-0.38 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 72BE / UTM zone 60S\",GEOGCS[\"WGS 72BE\",D");
    add_srs_wkt (p, 1,
        "ATUM[\"WGS_1972_Transit_Broadcast_Ephemeris\",SPHEROID[\"");
    add_srs_wkt (p, 2,
        "WGS 72\",6378135,298.26,AUTHORITY[\"EPSG\",\"7043\"]],TO");
    add_srs_wkt (p, 3,
        "WGS84[0,0,1.9,0,0,0.814,-0.38],AUTHORITY[\"EPSG\",\"6324");
    add_srs_wkt (p, 4,
        "\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]");
    add_srs_wkt (p, 5,
        "],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",");
    add_srs_wkt (p, 6,
        "\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",E");
    add_srs_wkt (p, 7,
        "AST],AUTHORITY[\"EPSG\",\"4324\"]],PROJECTION[\"Transver");
    add_srs_wkt (p, 8,
        "se_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAM");
    add_srs_wkt (p, 9,
        "ETER[\"central_meridian\",177],PARAMETER[\"scale_factor\"");
    add_srs_wkt (p, 10,
        ",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"");
    add_srs_wkt (p, 11,
        "false_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"");
    add_srs_wkt (p, 12,
        "EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing");
    add_srs_wkt (p, 13,
        "\",NORTH],AUTHORITY[\"EPSG\",\"32560\"]]");
}

#endif /* full EPSG initialization enabled/disabled */

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/srsinit/epsg_inlined_extra.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
...
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

/* declaring prototypes */
SPATIALITE_PRIVATE void initialize_epsg_00 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_01 (
................................................................................
SPATIALITE_PRIVATE void initialize_epsg_43 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_44 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_45 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_46 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_47 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_48 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_49 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_50 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_51 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_wgs84_00 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_wgs84_01 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_prussian (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
................................................................................
        initialize_epsg_40 (filter, first, last);
        initialize_epsg_41 (filter, first, last);
        initialize_epsg_42 (filter, first, last);
        initialize_epsg_43 (filter, first, last);
        initialize_epsg_44 (filter, first, last);
        initialize_epsg_45 (filter, first, last);
        initialize_epsg_46 (filter, first, last);
        initialize_epsg_47 (filter, first, last);
        initialize_epsg_48 (filter, first, last);
        initialize_epsg_49 (filter, first, last);
        initialize_epsg_50 (filter, first, last);
        initialize_epsg_51 (filter, first, last);
        initialize_epsg_prussian (filter, first, last);
        initialize_epsg_extra (filter, first, last);
#endif /* full EPSG initialization enabled/disabled */
    }
    initialize_epsg_wgs84_00 (filter, first, last);
    initialize_epsg_wgs84_01 (filter, first, last);
}




|







 







<
<
<

<







 







<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
137
138
139
140
141
142
143










144
145
146
147
148
149
150
...
250
251
252
253
254
255
256





257
258
259
260
261
262
263
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

/* declaring prototypes */
SPATIALITE_PRIVATE void initialize_epsg_00 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_01 (
................................................................................
SPATIALITE_PRIVATE void initialize_epsg_43 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_44 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_45 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_46 (










	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_wgs84_00 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_wgs84_01 (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
SPATIALITE_PRIVATE void initialize_epsg_prussian (
	int filter, struct epsg_defs **first, struct epsg_defs **last);
................................................................................
        initialize_epsg_40 (filter, first, last);
        initialize_epsg_41 (filter, first, last);
        initialize_epsg_42 (filter, first, last);
        initialize_epsg_43 (filter, first, last);
        initialize_epsg_44 (filter, first, last);
        initialize_epsg_45 (filter, first, last);
        initialize_epsg_46 (filter, first, last);





        initialize_epsg_prussian (filter, first, last);
        initialize_epsg_extra (filter, first, last);
#endif /* full EPSG initialization enabled/disabled */
    }
    initialize_epsg_wgs84_00 (filter, first, last);
    initialize_epsg_wgs84_01 (filter, first, last);
}

Changes to src/srsinit/epsg_inlined_prussian.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text(p,0,"+proj=longlat +ellps=bessel +datum=potsdam +pm=ferro +no_defs");
    add_srs_wkt(p,0,"PROJCS[\"DHDN / Ferro / Deutsches_Hauptdreiecksnetz\",");
    add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
    add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",");
    add_srs_wkt(p,3,"SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt(p,4,"AUTHORITY[\"EPSG\",\"7004\"]], AUTHORITY[\"EPSG\",\"6314\"]],");
    add_srs_wkt(p,5,"PRIMEM[\"ferro\",-17.66666666666667],UNIT[\"Degree\",0.017453292519943295,");
    add_srs_wkt(p,6,"AUTHORITY[\"mj10777.de\",\"187998\"]],AUTHORITY[\"EPSG\",\"4314\"]]]");
/* mj10777: Not existing System, used for testing purposes. */
    p = add_epsg_def(filter,first,last,187999,"mj10777.de",187999,"DHDN / Brandenburger Tor");
    add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 ");
    add_proj4text(p,1,"+x_0=16816.615499858 +y_0=-11047.322499366 +ellps=bessel +datum=potsdam +units=m +no_defs");
    add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner Brandenburger Tor\",");
    add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
    add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
    add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
    add_srs_wkt(p,4,"AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt(p,5,"AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,");
    add_srs_wkt(p,6,"AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4314\"]],");
    add_srs_wkt(p,7,"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt(p,8,"PROJECTION[\"Cassini_Soldner\"],");
    add_srs_wkt(p,9,"PARAMETER[\"latitude_of_origin\",52.41864827777778],");
    add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],");
    add_srs_wkt(p,11,"PARAMETER[\"false_easting\",16816.615499858],PARAMETER[\"false_northing\",-11047.322499366],");
    add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187999\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
    p = add_epsg_def (filter,first, last, 325833, "mj10777.de", 325833,"ETRS89 / UTM zone 33N (Brandenburg)");
    add_proj4text(p,0,"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt(p,0,"PROJCS[\"ETRS89 / UTM zone 33N (Brandenburg)\",GEOGCS[\"ETRS89\",");
    add_srs_wkt(p,1,"DATUM[\"European_Terrestrial_Reference_System_1989\",");
    add_srs_wkt(p,2,"SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt(p,3,"AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6258\"]],");




|







 







<
<
<

<







 







|
|


|











|







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45



46

47
48
49
50
51
52
53
...
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/




#include "config.h"


#include <spatialite_private.h>

#ifndef OMIT_EPSG    /* full EPSG initialization enabled */

SPATIALITE_PRIVATE void
initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs **last)
................................................................................
    add_proj4text(p,0,"+proj=longlat +ellps=bessel +datum=potsdam +pm=ferro +no_defs");
    add_srs_wkt(p,0,"PROJCS[\"DHDN / Ferro / Deutsches_Hauptdreiecksnetz\",");
    add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
    add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",");
    add_srs_wkt(p,3,"SPHEROID[\"Bessel 1841\",6377397.155,299.1528128,");
    add_srs_wkt(p,4,"AUTHORITY[\"EPSG\",\"7004\"]], AUTHORITY[\"EPSG\",\"6314\"]],");
    add_srs_wkt(p,5,"PRIMEM[\"ferro\",-17.66666666666667],UNIT[\"Degree\",0.017453292519943295,");
    add_srs_wkt(p,6,"AUTHORITY[\"mj10777.de\",\"187998\"]],AUTHORITY[\"EPSG\",\"4314\"]]");
/* mj10777: Not exsiting System, used for testing purposes. */
    p = add_epsg_def(filter,first,last,187999,"mj10777.de",187999,"DHDN / Brandenburger Tor");
    add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 ");
    add_proj4text(p,1,"+x_0=16819.76033675660074 +y_0=-11046.08218553455117 +ellps=bessel +datum=potsdam +units=m +no_defs");
    add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner Brandenburger Tor\",");
    add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
    add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
    add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
    add_srs_wkt(p,4,"AUTHORITY[\"EPSG\",\"6314\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt(p,5,"AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,");
    add_srs_wkt(p,6,"AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4314\"]],");
    add_srs_wkt(p,7,"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],");
    add_srs_wkt(p,8,"PROJECTION[\"Cassini_Soldner\"],");
    add_srs_wkt(p,9,"PARAMETER[\"latitude_of_origin\",52.41864827777778],");
    add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],");
    add_srs_wkt(p,11,"PARAMETER[\"false_easting\",16819.76033675660074],PARAMETER[\"false_northing\",-11046.08218553455117],");
    add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187999\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
    p = add_epsg_def (filter,first, last, 325833, "mj10777.de", 325833,"ETRS89 / UTM zone 33N (Brandenburg)");
    add_proj4text(p,0,"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs");
    add_srs_wkt(p,0,"PROJCS[\"ETRS89 / UTM zone 33N (Brandenburg)\",GEOGCS[\"ETRS89\",");
    add_srs_wkt(p,1,"DATUM[\"European_Terrestrial_Reference_System_1989\",");
    add_srs_wkt(p,2,"SPHEROID[\"GRS 1980\",6378137,298.257222101,");
    add_srs_wkt(p,3,"AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6258\"]],");

Changes to src/srsinit/epsg_inlined_wgs84_00.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
....
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
....
3383
3384
3385
3386
3387
3388
3389

































3390
3391
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

SPATIALITE_PRIVATE void
initialize_epsg_wgs84_00 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list [WGS84] */
    struct epsg_defs *p;
................................................................................
        "0],PARAMETER[\"central_meridian\",0],PARAMETER[\"false_e");
    add_srs_wkt (p, 9,
        "asting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 10,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 11,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32662\"]]");
    p = add_epsg_def_ex (filter, first, last, 32663, "epsg", 32663,
        "WGS 84 / World Equidistant Cylindrical (deprecated)", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Equirectangular", "metre",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +dat");
    add_proj4text (p, 1,
        "um=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / World Equidistant Cylindrical (depreca");
    add_srs_wkt (p, 1,
        "ted)\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"W");
    add_srs_wkt (p, 2,
        "GS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"");
    add_srs_wkt (p, 3,
        "]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,");
    add_srs_wkt (p, 4,
        "AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329");
    add_srs_wkt (p, 5,
        "25199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\"");
    add_srs_wkt (p, 6,
        ",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"43");
    add_srs_wkt (p, 7,
        "26\"]],PROJECTION[\"Equirectangular\"],PARAMETER[\"latit");
    add_srs_wkt (p, 8,
        "ude_of_origin\",0],PARAMETER[\"central_meridian\",0],PAR");
    add_srs_wkt (p, 9,
        "AMETER[\"false_easting\",0],PARAMETER[\"false_northing\"");
    add_srs_wkt (p, 10,
        ",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[");
    add_srs_wkt (p, 11,
        "\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32663");
    add_srs_wkt (p, 12,
        "\"]]");
    p = add_epsg_def_ex (filter, first, last, 32664, "epsg", 32664,
        "WGS 84 / BLM 14N (ftUS)", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
................................................................................
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 10,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 11,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 12,
        ",NORTH],AUTHORITY[\"EPSG\",\"32733\"]]");

































}





|







 







<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45






46
47
48
49
50
51
52
....
2113
2114
2115
2116
2117
2118
2119



































2120
2121
2122
2123
2124
2125
2126
....
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/







#include <spatialite_private.h>

SPATIALITE_PRIVATE void
initialize_epsg_wgs84_00 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list [WGS84] */
    struct epsg_defs *p;
................................................................................
        "0],PARAMETER[\"central_meridian\",0],PARAMETER[\"false_e");
    add_srs_wkt (p, 9,
        "asting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre");
    add_srs_wkt (p, 10,
        "\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS");
    add_srs_wkt (p, 11,
        "[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"32662\"]]");



































    p = add_epsg_def_ex (filter, first, last, 32664, "epsg", 32664,
        "WGS 84 / BLM 14N (ftUS)", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "US survey foot",
        "X", "East", "Y", "North");
    add_proj4text (p, 0,
        "+proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.00");
................................................................................
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 10,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 11,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 12,
        ",NORTH],AUTHORITY[\"EPSG\",\"32733\"]]");
    p = add_epsg_def_ex (filter, first, last, 32734, "epsg", 32734,
        "WGS 84 / UTM zone 34S", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / UTM zone 34S\",GEOGCS[\"WGS 84\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 7,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"central_meridian\",21],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 9,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 10,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 11,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 12,
        ",NORTH],AUTHORITY[\"EPSG\",\"32734\"]]");
}

Changes to src/srsinit/epsg_inlined_wgs84_01.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Wed Mar 21 19:30:16 2018

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite_private.h>

SPATIALITE_PRIVATE void
initialize_epsg_wgs84_01 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list [WGS84] */
    struct epsg_defs *p;
    p = add_epsg_def_ex (filter, first, last, 32734, "epsg", 32734,
        "WGS 84 / UTM zone 34S", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=34 +south +datum=WGS84 +units=m +no_defs");
    add_srs_wkt (p, 0,
        "PROJCS[\"WGS 84 / UTM zone 34S\",GEOGCS[\"WGS 84\",DATUM");
    add_srs_wkt (p, 1,
        "[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,");
    add_srs_wkt (p, 2,
        "AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"");
    add_srs_wkt (p, 3,
        "]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],");
    add_srs_wkt (p, 4,
        "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"");
    add_srs_wkt (p, 5,
        "9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAS");
    add_srs_wkt (p, 6,
        "T],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse");
    add_srs_wkt (p, 7,
        "_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMET");
    add_srs_wkt (p, 8,
        "ER[\"central_meridian\",21],PARAMETER[\"scale_factor\",0");
    add_srs_wkt (p, 9,
        ".9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"f");
    add_srs_wkt (p, 10,
        "alse_northing\",10000000],UNIT[\"metre\",1,AUTHORITY[\"E");
    add_srs_wkt (p, 11,
        "PSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\"");
    add_srs_wkt (p, 12,
        ",NORTH],AUTHORITY[\"EPSG\",\"32734\"]]");
    p = add_epsg_def_ex (filter, first, last, 32735, "epsg", 32735,
        "WGS 84 / UTM zone 35S", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs");




|







 







<
<
<
<
<
<







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
..
39
40
41
42
43
44
45






46
47
48
49
50
51
52

































53
54
55
56
57
58
59
/*

 helper function for srs_init.c -- populating the SPATIAL_REF_SYS table

 this code was autogenerated by "auto_epsg_ext" on Fri Dec  5 11:07:13 2014

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------

 Version: MPL 1.1/GPL 2.0/LGPL 2.1

................................................................................
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.

*/







#include <spatialite_private.h>

SPATIALITE_PRIVATE void
initialize_epsg_wgs84_01 (int filter, struct epsg_defs **first, struct epsg_defs **last)
{
/* initializing the EPSG defs list [WGS84] */
    struct epsg_defs *p;

































    p = add_epsg_def_ex (filter, first, last, 32735, "epsg", 32735,
        "WGS 84 / UTM zone 35S", 0, 0,
        "WGS 84", "Greenwich",
        "WGS_1984", "Transverse_Mercator", "metre",
        "Easting", "East", "Northing", "North");
    add_proj4text (p, 0,
        "+proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs");

Changes to src/srsinit/epsg_update/Makefile.am.

1
2
3
4

EXTRA_DIST = README.txt README-obsolete.txt auto_epsg.c \
	epsg_from_gdal.c auto_epsg_ext.c check_srid_spatialite.sh



|

1
2
3
4

EXTRA_DIST = README.txt README-obsolete.txt auto_epsg.c \
	epsg_from_gdal.c auto_epsg_ext.c

Changes to src/srsinit/epsg_update/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
...
265
266
267
268
269
270
271

272
273
274
275
276
277
278
...
439
440
441
442
443
444
445
446
447
448
449
450
451
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/srsinit/epsg_update

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = README.txt README-obsolete.txt auto_epsg.c \
	epsg_from_gdal.c auto_epsg_ext.c check_srid_spatialite.sh

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/srsinit/epsg_update/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/srsinit/epsg_update/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
...
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
...
429
430
431
432
433
434
435


436
437
438
439
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/srsinit/epsg_update
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = README.txt README-obsolete.txt auto_epsg.c \
	epsg_from_gdal.c auto_epsg_ext.c

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/srsinit/epsg_update/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/srsinit/epsg_update/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/srsinit/epsg_update/README.txt.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--------
# cd {libspatialite-source}/src/srsinit/epsg_update

Linux:
# gcc epsg_from_gdal.c -o epsg_from_gdal -lgdal

Windows [MinGW]:
# gcc -I/usr/local/include epsg_from_gdal.c -o epsg_from_gdal.exe \
      -L/usr/local/lib -lgdal



STEP #2: getting the basic EPSG file
--------
# rm epsg
................................................................................
--------
- copy the generated file into the parent dir:
  rm ../epsg_inlined*.c
  cp epsg_inlined*.c ..
- be sure to update as required the repository (ADD/DEL)
- be sure to update as required Makefile.am
- and finally commit into the repository



STEP #6: pre-release final check
--------
- after building and installing the new libspatialite
  incorporating the most recent SRSes defined by GDAL
  always remember to run from the shell the test script:
  ./check_srid_spatialite.sh

- then carefully check for any possible error detected
  by the above mentioned test script








|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
60
61
62
63
64
65
66













--------
# cd {libspatialite-source}/src/srsinit/epsg_update

Linux:
# gcc epsg_from_gdal.c -o epsg_from_gdal -lgdal

Windows [MinGW]:
# gcc -I/usr/local/include epsg_from_gdal.c -o epsg_from_gdal,exe \
      -L/usr/local/lib -lgdal



STEP #2: getting the basic EPSG file
--------
# rm epsg
................................................................................
--------
- copy the generated file into the parent dir:
  rm ../epsg_inlined*.c
  cp epsg_inlined*.c ..
- be sure to update as required the repository (ADD/DEL)
- be sure to update as required Makefile.am
- and finally commit into the repository













Changes to src/srsinit/epsg_update/auto_epsg.c.

1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
....
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
    fprintf (out,
	     "    add_srs_wkt(p,3,\"SPHEROID[\\\"Bessel 1841\\\",6377397.155,299.1528128,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,4,\"AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]], AUTHORITY[\\\"EPSG\\\",\\\"6314\\\"]],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,5,\"PRIMEM[\\\"ferro\\\",-17.66666666666667],UNIT[\\\"Degree\\\",0.017453292519943295,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,6,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187998\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4314\\\"]]]\");\n");
    fprintf (out,
	     "/* mj10777: Not existing System, used for testing purposes. */\n");
    fprintf (out,
	     "    p = add_epsg_def(filter,first,last,187999,\"mj10777.de\",187999,\"DHDN / Brandenburger Tor\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 \");\n");
    fprintf (out,
	     "    add_proj4text(p,1,\"+x_0=16816.615499858 +y_0=-11047.322499366 +ellps=bessel +datum=potsdam +units=m +no_defs\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,0,\"PROJCS[\\\"DHDN / Soldner Brandenburger Tor\\\",\");\n");
    fprintf (out, "    add_srs_wkt(p,1,\"GEOGCS[\\\"DHDN\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,2,\"DATUM[\\\"Deutsches_Hauptdreiecksnetz\\\",SPHEROID[\\\"Bessel 1841\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,3,\"6377397.155,299.1528128,AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]],\");\n");
................................................................................
    fprintf (out,
	     "    add_srs_wkt(p,8,\"PROJECTION[\\\"Cassini_Soldner\\\"],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,9,\"PARAMETER[\\\"latitude_of_origin\\\",52.41864827777778],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,10,\"PARAMETER[\\\"central_meridian\\\",13.62720366666667],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,11,\"PARAMETER[\\\"false_easting\\\",16816.615499858],PARAMETER[\\\"false_northing\\\",-11047.322499366],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,12,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187999\\\"],AXIS[\\\"x\\\",NORTH],AXIS[\\\"y\\\",EAST]]\");\n");
    fprintf (out,
	     "    p = add_epsg_def (filter,first, last, 325833, \"mj10777.de\", 325833,\"ETRS89 / UTM zone 33N (Brandenburg)\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs\");\n");
    fprintf (out,







|

|





|







 







|







1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
....
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
    fprintf (out,
	     "    add_srs_wkt(p,3,\"SPHEROID[\\\"Bessel 1841\\\",6377397.155,299.1528128,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,4,\"AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]], AUTHORITY[\\\"EPSG\\\",\\\"6314\\\"]],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,5,\"PRIMEM[\\\"ferro\\\",-17.66666666666667],UNIT[\\\"Degree\\\",0.017453292519943295,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,6,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187998\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4314\\\"]]\");\n");
    fprintf (out,
	     "/* mj10777: Not exsiting System, used for testing purposes. */\n");
    fprintf (out,
	     "    p = add_epsg_def(filter,first,last,187999,\"mj10777.de\",187999,\"DHDN / Brandenburger Tor\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 \");\n");
    fprintf (out,
	     "    add_proj4text(p,1,\"+x_0=16819.76033675660074 +y_0=-11046.08218553455117 +ellps=bessel +datum=potsdam +units=m +no_defs\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,0,\"PROJCS[\\\"DHDN / Soldner Brandenburger Tor\\\",\");\n");
    fprintf (out, "    add_srs_wkt(p,1,\"GEOGCS[\\\"DHDN\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,2,\"DATUM[\\\"Deutsches_Hauptdreiecksnetz\\\",SPHEROID[\\\"Bessel 1841\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,3,\"6377397.155,299.1528128,AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]],\");\n");
................................................................................
    fprintf (out,
	     "    add_srs_wkt(p,8,\"PROJECTION[\\\"Cassini_Soldner\\\"],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,9,\"PARAMETER[\\\"latitude_of_origin\\\",52.41864827777778],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,10,\"PARAMETER[\\\"central_meridian\\\",13.62720366666667],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,11,\"PARAMETER[\\\"false_easting\\\",16819.76033675660074],PARAMETER[\\\"false_northing\\\",-11046.08218553455117],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,12,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187999\\\"],AXIS[\\\"x\\\",NORTH],AXIS[\\\"y\\\",EAST]]\");\n");
    fprintf (out,
	     "    p = add_epsg_def (filter,first, last, 325833, \"mj10777.de\", 325833,\"ETRS89 / UTM zone 33N (Brandenburg)\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs\");\n");
    fprintf (out,

Changes to src/srsinit/epsg_update/auto_epsg_ext.c.

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
...
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
...
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
....
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
....
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
....
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
....
1936
1937
1938
1939
1940
1941
1942

1943
1944
1945
1946
1947
1948
1949
1950
....
2070
2071
2072
2073
2074
2075
2076

2077
2078
2079
2080
2081
2082
2083
2084
	free (p->ref_sys_name);
    if (p->proj4text)
	free (p->proj4text);
    if (p->srtext)
	free (p->srtext);
    if (p->spheroid)
	free (p->spheroid);
    if (p->prime_meridian)
	free (p->prime_meridian);
    if (p->datum)
	free (p->datum);
    if (p->projection)
	free (p->projection);
    if (p->unit)
	free (p->unit);
    if (p->axis_1)
................................................................................
	free (epsg->sorted);
}

static void
epsg_insert (struct epsg_dict *epsg, int srid, int is_geographic,
	     int flipped_axes, const char *unit, const char *axis_1,
	     const char *orientation_1, const char *axis_2,
	     const char *orientation_2, const char *spheroid,
	     const char *prime_meridian, const char *datum,
	     const char *projection, const char *name, const char *proj4text,
	     const char *srtext)
{
/* inserting an entry into the EPSG dictionary */
    int len;
    struct epsg_entry *p = malloc (sizeof (struct epsg_entry));
    p->srid = srid;
................................................................................
    strcpy (p->axis_2, axis_2);
    len = strlen (orientation_2);
    p->orientation_2 = malloc (len + 1);
    strcpy (p->orientation_2, orientation_2);
    len = strlen (spheroid);
    p->spheroid = malloc (len + 1);
    strcpy (p->spheroid, spheroid);
    len = strlen (prime_meridian);
    p->prime_meridian = malloc (len + 1);
    strcpy (p->prime_meridian, prime_meridian);
    len = strlen (datum);
    p->datum = malloc (len + 1);
    strcpy (p->datum, datum);
    len = strlen (projection);
    p->projection = malloc (len + 1);
    strcpy (p->projection, projection);
    p->next = NULL;
................................................................................
	  if (c == '\n')
	    {
		if (out != NULL)
		    *out = '\0';
		if (!err)
		    epsg_insert (epsg, atoi (srid), atoi (is_geographic),
				 atoi (flipped_axes), unit, axis_1,
				 orientation_1, axis_2, orientation_2, spheroid,
				 prime_meridian, datum, projection, name,
				 proj4text, srtext);
		row_no++;
		*srid = '\0';
		*is_geographic = '\0';
		*flipped_axes = '\0';
		*unit = '\0';
		*axis_1 = '\0';
		*orientation_1 = '\0';
................................................................................
    fprintf (out,
	     "    add_srs_wkt(p,3,\"SPHEROID[\\\"Bessel 1841\\\",6377397.155,299.1528128,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,4,\"AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]], AUTHORITY[\\\"EPSG\\\",\\\"6314\\\"]],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,5,\"PRIMEM[\\\"ferro\\\",-17.66666666666667],UNIT[\\\"Degree\\\",0.017453292519943295,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,6,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187998\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4314\\\"]]]\");\n");
    fprintf (out,
	     "/* mj10777: Not existing System, used for testing purposes. */\n");
    fprintf (out,
	     "    p = add_epsg_def(filter,first,last,187999,\"mj10777.de\",187999,\"DHDN / Brandenburger Tor\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 \");\n");
    fprintf (out,
	     "    add_proj4text(p,1,\"+x_0=16816.615499858 +y_0=-11047.322499366 +ellps=bessel +datum=potsdam +units=m +no_defs\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,0,\"PROJCS[\\\"DHDN / Soldner Brandenburger Tor\\\",\");\n");
    fprintf (out, "    add_srs_wkt(p,1,\"GEOGCS[\\\"DHDN\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,2,\"DATUM[\\\"Deutsches_Hauptdreiecksnetz\\\",SPHEROID[\\\"Bessel 1841\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,3,\"6377397.155,299.1528128,AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]],\");\n");
................................................................................
    fprintf (out,
	     "    add_srs_wkt(p,8,\"PROJECTION[\\\"Cassini_Soldner\\\"],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,9,\"PARAMETER[\\\"latitude_of_origin\\\",52.41864827777778],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,10,\"PARAMETER[\\\"central_meridian\\\",13.62720366666667],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,11,\"PARAMETER[\\\"false_easting\\\",16816.615499858],PARAMETER[\\\"false_northing\\\",-11047.322499366],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,12,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187999\\\"],AXIS[\\\"x\\\",NORTH],AXIS[\\\"y\\\",EAST]]\");\n");
    fprintf (out,
	     "    p = add_epsg_def (filter,first, last, 325833, \"mj10777.de\", 325833,\"ETRS89 / UTM zone 33N (Brandenburg)\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs\");\n");
    fprintf (out,
................................................................................
	     "decision by deleting the provisions above and replace them with the notice\n");
    fprintf (out,
	     "and other provisions required by the GPL or the LGPL. If you do not delete\n");
    fprintf (out,
	     "the provisions above, a recipient may use your version of this file under\n");
    fprintf (out,
	     "the terms of any one of the MPL, the GPL or the LGPL.\n\n*/\n\n");
    fprintf (out, "#if defined(_WIN32) && !defined(__MINGW32__)\n");
    fprintf (out, "#include \"config-msvc.h\"\n#else\n");
    fprintf (out, "#include \"config.h\"\n#endif\n\n");
    fprintf (out, "#include <spatialite_private.h>\n\n");

    if (macro)
	fprintf (out,
		 "#ifndef OMIT_EPSG    /* full EPSG initialization enabled */\n\n");
}

................................................................................
	  fprintf (out,
		   "    p = add_epsg_def_ex (filter, first, last, %d, \"epsg\", %d,\n",
		   p->srid, p->srid);
	  fprintf (out,
		   "        \"%s\", %d, %d,\n",
		   p->ref_sys_name, p->is_geographic, p->flipped_axes);
	  fprintf (out,

		   "        \"%s\", \"%s\",\n", p->spheroid, p->prime_meridian);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\",\n",
		   p->datum, p->projection, p->unit);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\", \"%s\");\n",
		   p->axis_1, p->orientation_1, p->axis_2, p->orientation_2);

................................................................................
	  fprintf (out,
		   "    p = add_epsg_def_ex (filter, first, last, %d, \"epsg\", %d,\n",
		   p->srid, p->srid);
	  fprintf (out,
		   "        \"%s\", %d, %d,\n",
		   p->ref_sys_name, p->is_geographic, p->flipped_axes);
	  fprintf (out,

		   "        \"%s\", \"%s\",\n", p->spheroid, p->prime_meridian);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\",\n",
		   p->datum, p->projection, p->unit);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\", \"%s\");\n",
		   p->axis_1, p->orientation_1, p->axis_2, p->orientation_2);








|
|







 







|
<







 







|
|
|







 







|
<
|







 







|

|





|







 







|







 







<
<
|







 







>
|







 







>
|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
108
109
110
111
112
113
114
115

116
117
118
119
120
121
122
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
...
256
257
258
259
260
261
262
263

264
265
266
267
268
269
270
271
....
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
....
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
....
1849
1850
1851
1852
1853
1854
1855


1856
1857
1858
1859
1860
1861
1862
1863
....
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
....
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
	free (p->ref_sys_name);
    if (p->proj4text)
	free (p->proj4text);
    if (p->srtext)
	free (p->srtext);
    if (p->spheroid)
	free (p->spheroid);
	if (p->prime_meridian)
	free(p->prime_meridian);
    if (p->datum)
	free (p->datum);
    if (p->projection)
	free (p->projection);
    if (p->unit)
	free (p->unit);
    if (p->axis_1)
................................................................................
	free (epsg->sorted);
}

static void
epsg_insert (struct epsg_dict *epsg, int srid, int is_geographic,
	     int flipped_axes, const char *unit, const char *axis_1,
	     const char *orientation_1, const char *axis_2,
	     const char *orientation_2, const char *spheroid, const char *prime_meridian, const char *datum,

	     const char *projection, const char *name, const char *proj4text,
	     const char *srtext)
{
/* inserting an entry into the EPSG dictionary */
    int len;
    struct epsg_entry *p = malloc (sizeof (struct epsg_entry));
    p->srid = srid;
................................................................................
    strcpy (p->axis_2, axis_2);
    len = strlen (orientation_2);
    p->orientation_2 = malloc (len + 1);
    strcpy (p->orientation_2, orientation_2);
    len = strlen (spheroid);
    p->spheroid = malloc (len + 1);
    strcpy (p->spheroid, spheroid);
    len = strlen(prime_meridian);
    p->prime_meridian = malloc(len + 1);
    strcpy(p->prime_meridian, prime_meridian);
    len = strlen (datum);
    p->datum = malloc (len + 1);
    strcpy (p->datum, datum);
    len = strlen (projection);
    p->projection = malloc (len + 1);
    strcpy (p->projection, projection);
    p->next = NULL;
................................................................................
	  if (c == '\n')
	    {
		if (out != NULL)
		    *out = '\0';
		if (!err)
		    epsg_insert (epsg, atoi (srid), atoi (is_geographic),
				 atoi (flipped_axes), unit, axis_1,
				 orientation_1, axis_2, orientation_2, spheroid, prime_meridian,

				 datum, projection, name, proj4text, srtext);
		row_no++;
		*srid = '\0';
		*is_geographic = '\0';
		*flipped_axes = '\0';
		*unit = '\0';
		*axis_1 = '\0';
		*orientation_1 = '\0';
................................................................................
    fprintf (out,
	     "    add_srs_wkt(p,3,\"SPHEROID[\\\"Bessel 1841\\\",6377397.155,299.1528128,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,4,\"AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]], AUTHORITY[\\\"EPSG\\\",\\\"6314\\\"]],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,5,\"PRIMEM[\\\"ferro\\\",-17.66666666666667],UNIT[\\\"Degree\\\",0.017453292519943295,\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,6,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187998\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4314\\\"]]\");\n");
    fprintf (out,
	     "/* mj10777: Not exsiting System, used for testing purposes. */\n");
    fprintf (out,
	     "    p = add_epsg_def(filter,first,last,187999,\"mj10777.de\",187999,\"DHDN / Brandenburger Tor\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 \");\n");
    fprintf (out,
	     "    add_proj4text(p,1,\"+x_0=16819.76033675660074 +y_0=-11046.08218553455117 +ellps=bessel +datum=potsdam +units=m +no_defs\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,0,\"PROJCS[\\\"DHDN / Soldner Brandenburger Tor\\\",\");\n");
    fprintf (out, "    add_srs_wkt(p,1,\"GEOGCS[\\\"DHDN\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,2,\"DATUM[\\\"Deutsches_Hauptdreiecksnetz\\\",SPHEROID[\\\"Bessel 1841\\\",\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,3,\"6377397.155,299.1528128,AUTHORITY[\\\"EPSG\\\",\\\"7004\\\"]],\");\n");
................................................................................
    fprintf (out,
	     "    add_srs_wkt(p,8,\"PROJECTION[\\\"Cassini_Soldner\\\"],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,9,\"PARAMETER[\\\"latitude_of_origin\\\",52.41864827777778],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,10,\"PARAMETER[\\\"central_meridian\\\",13.62720366666667],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,11,\"PARAMETER[\\\"false_easting\\\",16819.76033675660074],PARAMETER[\\\"false_northing\\\",-11046.08218553455117],\");\n");
    fprintf (out,
	     "    add_srs_wkt(p,12,\"AUTHORITY[\\\"mj10777.de\\\",\\\"187999\\\"],AXIS[\\\"x\\\",NORTH],AXIS[\\\"y\\\",EAST]]\");\n");
    fprintf (out,
	     "    p = add_epsg_def (filter,first, last, 325833, \"mj10777.de\", 325833,\"ETRS89 / UTM zone 33N (Brandenburg)\");\n");
    fprintf (out,
	     "    add_proj4text(p,0,\"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs\");\n");
    fprintf (out,
................................................................................
	     "decision by deleting the provisions above and replace them with the notice\n");
    fprintf (out,
	     "and other provisions required by the GPL or the LGPL. If you do not delete\n");
    fprintf (out,
	     "the provisions above, a recipient may use your version of this file under\n");
    fprintf (out,
	     "the terms of any one of the MPL, the GPL or the LGPL.\n\n*/\n\n");


    fprintf (out, "#include \"config.h\"\n\n");
    fprintf (out, "#include <spatialite_private.h>\n\n");

    if (macro)
	fprintf (out,
		 "#ifndef OMIT_EPSG    /* full EPSG initialization enabled */\n\n");
}

................................................................................
	  fprintf (out,
		   "    p = add_epsg_def_ex (filter, first, last, %d, \"epsg\", %d,\n",
		   p->srid, p->srid);
	  fprintf (out,
		   "        \"%s\", %d, %d,\n",
		   p->ref_sys_name, p->is_geographic, p->flipped_axes);
	  fprintf (out,
		   "        \"%s\", \"%s\",\n",
		   p->spheroid, p->prime_meridian);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\",\n",
		   p->datum, p->projection, p->unit);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\", \"%s\");\n",
		   p->axis_1, p->orientation_1, p->axis_2, p->orientation_2);

................................................................................
	  fprintf (out,
		   "    p = add_epsg_def_ex (filter, first, last, %d, \"epsg\", %d,\n",
		   p->srid, p->srid);
	  fprintf (out,
		   "        \"%s\", %d, %d,\n",
		   p->ref_sys_name, p->is_geographic, p->flipped_axes);
	  fprintf (out,
		   "        \"%s\", \"%s\",\n",
		   p->spheroid, p->prime_meridian);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\",\n",
		   p->datum, p->projection, p->unit);
	  fprintf (out,
		   "        \"%s\", \"%s\", \"%s\", \"%s\");\n",
		   p->axis_1, p->orientation_1, p->axis_2, p->orientation_2);

Deleted src/srsinit/epsg_update/check_srid_spatialite.sh.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#"/bin/bash
# ./check_srid_spatialite.sh
#-------------------------------------------------------------------------------
RED='\033[0;31m';
BRED='\033[1;31m'         # Red
BOLD='\033[1m'  # \x1B[31m
CYAN='\033[0;36m';
BCYAN='\033[1;36m'        # Cyan
BROWN='\033[0;33m';
BBROWN='\033[1;33m'        # Cyan
GREEN='\033[0;32m';
BGREEN='\033[1;32m'       # Green
NC='\033[0m' # No Color
# echo -e "\033[1mThis is bold text.\033[0m"
#-------------------------------------------------------------------------------
BENE="'${GREEN}Tutto bene!${NC}'";
BENENO="'${BRED}No bene!${NC}'";
HABE_FERTIG="${BOLD}Ich habe fertig.${NC}";
BASE_NAME=`basename $0`;
BASE_NAME_CUT=`basename $0 | cut -d '.' -f1`;
MTI="${GREEN}-I->${NC}";
MTW="${BROWN}-W->${NC}";
MTE="${BRED}-E->${NC}";
MESSAGE_TYPE=${MTI};
FORCE_CREATE_DB=0;
VALGRIND_USE=0;
CMD_SPATIALITE=`which spatialite`;
CMD_GDALSRSINFO=`which gdalsrsinfo`;
CMD_SQLITE3=`which sqlite3`;
CMD_VALGRIND=`which valgrind`;
exit_rc=0;
# export "SPATIALITE_SECURITY=relaxed"
#-------------------------------------------------------------------------------
# DateTime functions
# - convert a date into a UNIX timestamp
#  dt_unix_start=$(date2stamp "now");
#  echo "convert a date into a UNIX timestamp [" $dt_unix_start "]";
#-------------------------------------------------------------------------------
date2stamp() 
{
 date --utc --date "$1" +%s
}
#-------------------------------------------------------------------------------
# DateTime functions
# calculate different in seconds from 2 timestamps
#  dt_diff=$(daterun $dt_unix_start $dt_unix_end);
# echo "difference [" $dt_diff "]";
#-------------------------------------------------------------------------------
daterun() 
{
 let diffSec=${2}-${1};
 echo $diffSec;
}
#-------------------------------------------------------------------------------
# DateTime functions
# from from seconds from 2 timestamps
# dt_diff=$(daterun $1 $2);
# echo $(displaytime $dt_diff);
#-------------------------------------------------------------------------------
function displaytime 
{
 local T=$1;
 local D=$((T/60/60/24));
 local H=$((T/60/60%24));
 local M=$((T/60%60));
 local S=$((T%60));
 RESULT="";
 if [ $D -gt 0 ] 
 then
  RESULT="${RESULT}$D days ";
 fi
 if [ $H -gt 0 ] || [ ! -z "${RESULT}" ]
 then
  RESULT="${RESULT}$H hrs ";
 fi
 if [ $M -gt 0 ] || [ ! -z "${RESULT}" ]
 then
  RESULT="${RESULT}$M min ";
 fi
 RESULT="${RESULT}$S sec";
 echo ${RESULT};
}
#-------------------------------------------------------------------------------
# DateTime functions
# calculate different in seconds from 2 timestamps
# echo "run_time [" $(run_time $dt_diff) "]"
#-------------------------------------------------------------------------------
run_time() 
{
 dt_diff=$(daterun $1 $2);
 echo $(displaytime "$dt_diff");
}
#-------------------------------------------------------------------------------
# Start of script
#-------------------------------------------------------------------------------
dt_unix_start=$(date2stamp "now");
#-------------------------------------------------------------------------------
# Adapt db/sql diretory path where needed
#-------------------------------------------------------------------------------
DIR_ERROR_SRID="srid_error";
DB_FILE="check_srid.db";
CSV_FILE="check_srid.csv";
SQL_CHECK="SELECT srid||'#'||srtext||'\n' FROM spatial_ref_sys WHERE srtext <> 'Undefined';";
SQL_FILE="check_srid.sql";
#-------------------------------------------------------------------------------
if [ -f "${DB_FILE}" ]
then
 rm ${DB_FILE};
fi
if [ -f "${CSV_FILE}" ]
then
 rm ${CSV_FILE};
fi
if [  -f "${SQL_FILE}" ]
then
 rm ${SQL_FILE};
fi
#-------------------------------------------------------------------------------
exit_rc=100;
if [ ! -f "${DB_DB_FILE}" ]
then
 if [ ! -f "${SQL_FILE}" ]
 then
  echo ${SQL_CHECK} > ${SQL_FILE};
 fi
 echo -e "${MTI} Database will be created[${DB_PATH}] and a dump of spatial_ref_sys made [${CSV_FILE}].";
 RESULT_TEST=`${CMD_SPATIALITE} ${DB_PATH} < ${SQL_FILE}`;
 if [ ! -z "${RESULT_TEST}" ]
 then
  echo -e ${RESULT_TEST} > ${CSV_FILE};
 else
  echo -e "${MTE} db-creation failed rc[${DB_PATH}]";
 fi
 if [ -f "${CSV_FILE}" ]
 then
  exit_rc=0;
 fi
fi
#-------------------------------------------------------------------------------
count_line=0;
count_srid=0;
count_srid_error=0;
count_srid_ok=0;
declare -a ARRAY_SRID=( );
declare -a ARRAY_SRTEXT=( );
OUTPUT_FILE_SRID="srid_check.txt";
if [ "$exit_rc" -eq "0" ]
then
 while read line
 do
  # line=${CONFIG_FILE_READ_ARRAY[$Config_File_Line_Nr]}
  ((count_line++));
  IFS_SAVE=$IFS;
  IFS='#'
  INPUT_STR_ARRAY=( ${line} );
  IFS=$IFS_SAVE;
  SRID_TEXT="${INPUT_STR_ARRAY[0]}";
  SRTEXT_TEXT="${INPUT_STR_ARRAY[1]}";
  if [ ! -z "${SRID_TEXT}" ] && [ ! -z "${SRTEXT_TEXT}" ] 
  then
   ((count_srid++));
   echo -e ${SRTEXT_TEXT} > ${OUTPUT_FILE_SRID};
   if [ -f "${OUTPUT_FILE_SRID}" ]
   then
    RESULT_TEST=`${CMD_GDALSRSINFO} ${OUTPUT_FILE_SRID} 2>&1`;
    exit_rc=$?
    # echo "-I-> result_text[${RESULT_TEST}]";
    if [ ! -z "${RESULT_TEST}" ]
    then
     srid_rc=0;
     case ${RESULT_TEST} in ERROR*)
      srid_rc=1;
     esac
     if [ "$srid_rc" -eq "0" ]
     then
      echo -e "${MTI} gdalsrsinfo for srid[${SRID_TEXT}] rc[${srid_rc}] ";
      ((count_srid_ok++));
     else
      ((count_srid_error++));
      if [ ! -d "$DIR_ERROR_SRID" ]
      then
       echo -e "${MTW} creating srid-error directory[${DIR_ERROR_SRID}]";
       mkdir $DIR_ERROR_SRID
      fi
      OUTPUT_FILE_SRID_ERROR="${DIR_ERROR_SRID}/srid_${SRID_TEXT}.txt";
      echo -e ${SRTEXT_TEXT} > ${OUTPUT_FILE_SRID_ERROR};
      echo -e "${MTE} srid[${SRID_TEXT}] srtext['${SRTEXT_TEXT}'] ";
     fi
    fi
   fi
  fi
  #------------------------------------------------------------------------------
  line_prev=$line;
  #------------------------------------------------------------------------------
 done < "${CSV_FILE}";
 #------------------------------------------------------------------------------
fi
#-------------------------------------------------------------------------------
echo -e "${MTI} removing work files (database, sql, csv and srid-output)";
if [  -f "${DB_DB_FILE}" ]
then
 rm ${DB_DB_FILE}M
fi
if [ -f "${SQL_FILE}" ]
then
 rm ${SQL_FILE};
fi
if [ -f "${CSV_FILE}" ]
then
 rm ${CSV_FILE};
fi
if [ -f "${OUTPUT_FILE_SRID}" ]
then
 rm ${OUTPUT_FILE_SRID};
fi
#-------------------------------------------------------------------------------
if [ "$count_srid_error" -eq "0" ]
then
 exit_rc=0;
 echo -e "${MTI} gdalsrsinfo checked ${count_srid} srids. correct[${count_srid_ok}] errors[${count_srid_error}] ";
else
 exit_rc=10;
 echo -e "${MTE} gdalsrsinfo checked ${count_srid} srids. correct[${count_srid_ok}] errors[${count_srid_error}] ";
fi
#-------------------------------------------------------------------------------
dt_unix_end=$(date2stamp "now");
dt_run=$(run_time $dt_unix_start $dt_unix_end)
if [ "$exit_rc" -eq "0" ]
then
 RC_TEXT=$BENE;
 TIME_RUN="time_run[${GREEN}$dt_run${NC}]"
else
 TIME_RUN="time_run[${BRED}$dt_run${NC}]"
 RC_TEXT="$BENENO";
 MESSAGE_TYPE=${MTE};
fi
echo -e "${MESSAGE_TYPE} ${BASE_NAME_CUT} rc=$exit_rc - ${TIME_RUN} - [${RC_TEXT}] - ${HABE_FERTIG}";
exit $exit_rc;
#-------------------------------------------------------------------------------

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































Changes to src/srsinit/epsg_update/epsg_from_gdal.c.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
...
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/ a tool autogenerating C code for SpatiaLite
/ [spatial_ref_sys self-initialization routines]
/
/ version 1.0, 2014 December 2014
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 2014  Alessandro Furieri
/
/    This program is free software: you can redistribute it and/or modify
/    it under the terms of the GNU General Public License as published by
/    the Free Software Foundation, either version 3 of the License, or
/    (at your option) any later version.
/
/    This program is distributed in the hope that it will be useful,
................................................................................
/
*/

#include <stdlib.h>
#include <stdio.h>

#include <ogr_srs_api.h>
#include <cpl_conv.h>

static void
print_wkt (int srid)
{
    OGRSpatialReferenceH handle;
    handle = OSRNewSpatialReference (NULL);
    if (handle == NULL)
................................................................................
			   axis_1, orient_1, axis_2, orient_2,
			   spheroid, prime_meridian, datum, projection, name,
			   proj4, wkt);
		  }
	    }
	skip:
	  if (proj4 != NULL)
	      CPLFree (proj4);
	  if (wkt != NULL)
	      CPLFree (wkt);
	  OSRRelease (handle);
      }
}

int
main (void)
{
    int srid;
    for (srid = 1; srid <= 32766; srid++)
	print_wkt (srid);
    return 0;
}







|







 







<







 







|

|












4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
..
25
26
27
28
29
30
31

32
33
34
35
36
37
38
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/ a tool autogenerating C code for SpatiaLite
/ [spatial_ref_sys self-initialization routines]
/
/ version 1.0, 2014 December 2014
/
/ Author: Sandro Furieri a.furieri@lqt.it
/
/ Copyright (C) 20141  Alessandro Furieri
/
/    This program is free software: you can redistribute it and/or modify
/    it under the terms of the GNU General Public License as published by
/    the Free Software Foundation, either version 3 of the License, or
/    (at your option) any later version.
/
/    This program is distributed in the hope that it will be useful,
................................................................................
/
*/

#include <stdlib.h>
#include <stdio.h>

#include <ogr_srs_api.h>


static void
print_wkt (int srid)
{
    OGRSpatialReferenceH handle;
    handle = OSRNewSpatialReference (NULL);
    if (handle == NULL)
................................................................................
			   axis_1, orient_1, axis_2, orient_2,
			   spheroid, prime_meridian, datum, projection, name,
			   proj4, wkt);
		  }
	    }
	skip:
	  if (proj4 != NULL)
	      OGRFree (proj4);
	  if (wkt != NULL)
	      OGRFree (wkt);
	  OSRRelease (handle);
      }
}

int
main (void)
{
    int srid;
    for (srid = 1; srid <= 32766; srid++)
	print_wkt (srid);
    return 0;
}

Changes to src/srsinit/srs_init.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
...
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
...
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
/*

 srs_init.c -- populating the SPATIAL_REF_SYS table

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	free (ptr->ref_sys_name);
    if (ptr->proj4text)
	free (ptr->proj4text);
    if (ptr->srs_wkt)
	free (ptr->srs_wkt);
    if (ptr->spheroid)
	free (ptr->spheroid);
    if (ptr->prime_meridian)
	free (ptr->prime_meridian);
    if (ptr->datum)
	free (ptr->datum);
    if (ptr->projection)
	free (ptr->projection);
    if (ptr->unit)
	free (ptr->unit);
    if (ptr->axis_1)
................................................................................
    return NULL;
}

SPATIALITE_PRIVATE struct epsg_defs *
add_epsg_def_ex (int filter_srid, struct epsg_defs **first,
		 struct epsg_defs **last, int srid, const char *auth_name,
		 int auth_srid, const char *ref_sys_name, int is_geographic,
		 int flipped_axes, const char *spheroid,
		 const char *prime_meridian, const char *datum,
		 const char *projection, const char *unit, const char *axis_1,
		 const char *orientation_1, const char *axis_2,
		 const char *orientation_2)
{
/* appending an EPSG def to the list */
    int len;
    struct epsg_defs *p;
................................................................................
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));
	  goto error;
      }
/* preparing the SQL parameterized statement (aux) */
    strcpy (sql, "INSERT INTO spatial_ref_sys_aux ");
    strcat (sql,
	    "(srid, is_geographic, has_flipped_axes, spheroid, prime_meridian, ");
    strcat (sql, "datum, projection, unit, axis_1_name, axis_1_orientation, ");
    strcat (sql, "axis_2_name, axis_2_orientation) ");
    strcat (sql, "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_aux, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));
................................................................................
	sqlite3_finalize (stmt_aux);
/* freeing the EPSG defs list */
    free_epsg (first);

    return 0;
}

SPATIALITE_PRIVATE int
exists_spatial_ref_sys (void *p_sqlite)
{
/* checking if the SPATIAL_REF_SYS table exists */
    int ret;
    int ok = 0;
    char sql[1024];
    char **results;
    int n_rows;
    int n_columns;
    char *err_msg = NULL;

    sqlite3 *handle = (sqlite3 *) p_sqlite;

    strcpy (sql,
	    "SELECT name FROM sqlite_master WHERE type = 'table' AND name LIKE 'spatial_ref_sys'");
    ret =
	sqlite3_get_table (handle, sql, &results, &n_rows, &n_columns,
			   &err_msg);
    if (ret != SQLITE_OK)
      {
................................................................................
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));
	  error = 1;
	  goto stop;
      }
/* preparing the SQL parameterized statement (aux) */
    strcpy (sql, "INSERT INTO spatial_ref_sys_aux ");
    strcat (sql,
	    "(srid, is_geographic, has_flipped_axes, spheroid, prime_meridian, ");
    strcat (sql, "datum, projection, unit, axis_1_name, axis_1_orientation, ");
    strcat (sql, "axis_2_name, axis_2_orientation) ");
    strcat (sql, "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_aux, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));




|







 







|







 







|
|







 







|
<







 







<
|







 







|
|










<
<







 







<
|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
...
158
159
160
161
162
163
164
165

166
167
168
169
170
171
172
...
439
440
441
442
443
444
445

446
447
448
449
450
451
452
453
...
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620


621
622
623
624
625
626
627
...
823
824
825
826
827
828
829

830
831
832
833
834
835
836
837
/*

 srs_init.c -- populating the SPATIAL_REF_SYS table

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
	free (ptr->ref_sys_name);
    if (ptr->proj4text)
	free (ptr->proj4text);
    if (ptr->srs_wkt)
	free (ptr->srs_wkt);
    if (ptr->spheroid)
	free (ptr->spheroid);
	if (ptr->prime_meridian)
	free(ptr->prime_meridian);
    if (ptr->datum)
	free (ptr->datum);
    if (ptr->projection)
	free (ptr->projection);
    if (ptr->unit)
	free (ptr->unit);
    if (ptr->axis_1)
................................................................................
    return NULL;
}

SPATIALITE_PRIVATE struct epsg_defs *
add_epsg_def_ex (int filter_srid, struct epsg_defs **first,
		 struct epsg_defs **last, int srid, const char *auth_name,
		 int auth_srid, const char *ref_sys_name, int is_geographic,
		 int flipped_axes, const char *spheroid, const char *prime_meridian, const char *datum,

		 const char *projection, const char *unit, const char *axis_1,
		 const char *orientation_1, const char *axis_2,
		 const char *orientation_2)
{
/* appending an EPSG def to the list */
    int len;
    struct epsg_defs *p;
................................................................................
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));
	  goto error;
      }
/* preparing the SQL parameterized statement (aux) */
    strcpy (sql, "INSERT INTO spatial_ref_sys_aux ");

    strcat (sql, "(srid, is_geographic, has_flipped_axes, spheroid, prime_meridian, ");
    strcat (sql, "datum, projection, unit, axis_1_name, axis_1_orientation, ");
    strcat (sql, "axis_2_name, axis_2_orientation) ");
    strcat (sql, "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_aux, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));
................................................................................
	sqlite3_finalize (stmt_aux);
/* freeing the EPSG defs list */
    free_epsg (first);

    return 0;
}

static int
exists_spatial_ref_sys (sqlite3 * handle)
{
/* checking if the SPATIAL_REF_SYS table exists */
    int ret;
    int ok = 0;
    char sql[1024];
    char **results;
    int n_rows;
    int n_columns;
    char *err_msg = NULL;



    strcpy (sql,
	    "SELECT name FROM sqlite_master WHERE type = 'table' AND name LIKE 'spatial_ref_sys'");
    ret =
	sqlite3_get_table (handle, sql, &results, &n_rows, &n_columns,
			   &err_msg);
    if (ret != SQLITE_OK)
      {
................................................................................
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));
	  error = 1;
	  goto stop;
      }
/* preparing the SQL parameterized statement (aux) */
    strcpy (sql, "INSERT INTO spatial_ref_sys_aux ");

    strcat (sql, "(srid, is_geographic, has_flipped_axes, spheroid, prime_meridian, ");
    strcat (sql, "datum, projection, unit, axis_1_name, axis_1_orientation, ");
    strcat (sql, "axis_2_name, axis_2_orientation) ");
    strcat (sql, "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_aux, NULL);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s\n", sqlite3_errmsg (handle));

Deleted src/stored_procedures/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libstored_procedures.la stored_procedures.la

libstored_procedures_la_SOURCES = stored_procedures.c

stored_procedures_la_SOURCES = stored_procedures.c

stored_procedures_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
stored_procedures_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
stored_procedures_la_CPPFLAGS += -DLOADABLE_EXTENSION
stored_procedures_la_LDFLAGS = -module
stored_procedures_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Deleted src/stored_procedures/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/stored_procedures
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libstored_procedures_la_LIBADD =
am_libstored_procedures_la_OBJECTS = stored_procedures.lo
libstored_procedures_la_OBJECTS =  \
	$(am_libstored_procedures_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
stored_procedures_la_LIBADD =
am_stored_procedures_la_OBJECTS =  \
	stored_procedures_la-stored_procedures.lo
stored_procedures_la_OBJECTS = $(am_stored_procedures_la_OBJECTS)
stored_procedures_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(stored_procedures_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(stored_procedures_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(libstored_procedures_la_SOURCES) \
	$(stored_procedures_la_SOURCES)
DIST_SOURCES = $(libstored_procedures_la_SOURCES) \
	$(stored_procedures_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libstored_procedures.la stored_procedures.la
libstored_procedures_la_SOURCES = stored_procedures.c
stored_procedures_la_SOURCES = stored_procedures.c
stored_procedures_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
stored_procedures_la_LDFLAGS = -module
stored_procedures_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/stored_procedures/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/stored_procedures/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

libstored_procedures.la: $(libstored_procedures_la_OBJECTS) $(libstored_procedures_la_DEPENDENCIES) $(EXTRA_libstored_procedures_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libstored_procedures_la_OBJECTS) $(libstored_procedures_la_LIBADD) $(LIBS)

stored_procedures.la: $(stored_procedures_la_OBJECTS) $(stored_procedures_la_DEPENDENCIES) $(EXTRA_stored_procedures_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(stored_procedures_la_LINK)  $(stored_procedures_la_OBJECTS) $(stored_procedures_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stored_procedures.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stored_procedures_la-stored_procedures.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

stored_procedures_la-stored_procedures.lo: stored_procedures.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(stored_procedures_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stored_procedures_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stored_procedures_la-stored_procedures.lo -MD -MP -MF $(DEPDIR)/stored_procedures_la-stored_procedures.Tpo -c -o stored_procedures_la-stored_procedures.lo `test -f 'stored_procedures.c' || echo '$(srcdir)/'`stored_procedures.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/stored_procedures_la-stored_procedures.Tpo $(DEPDIR)/stored_procedures_la-stored_procedures.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='stored_procedures.c' object='stored_procedures_la-stored_procedures.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(stored_procedures_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stored_procedures_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stored_procedures_la-stored_procedures.lo `test -f 'stored_procedures.c' || echo '$(srcdir)/'`stored_procedures.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:
	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
	mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
	ctags-am distclean distclean-compile distclean-generic \
	distclean-libtool distclean-tags distdir dvi dvi-am html \
	html-am info info-am install install-am install-data \
	install-data-am install-dvi install-dvi-am install-exec \
	install-exec-am install-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/stored_procedures/stored_procedures.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
/*

 stored_procedures.c -- SpatiaLite Stored Procedures support

 version 4.5, 2017 October 22

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2017
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#include <spatialite/sqlite.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaiaaux.h>
#include <spatialite/gg_const.h>
#include <spatialite/gg_formats.h>
#include <spatialite/stored_procedures.h>
#include <spatialite_private.h>
#include <spatialite/debug.h>

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

/* 64 bit integer: portable format for printf() */
#if defined(_WIN32) && !defined(__MINGW32__)
#define FRMT64 "%I64d"
#else
#define FRMT64 "%lld"
#endif

struct sp_var_item
{
/* a variable Argument item */
    char *varname;
    short count;
    struct sp_var_item *next;
};

struct sp_var_list
{
/* a list of Variable Arguments */
    struct sp_var_item *first;
    struct sp_var_item *last;
};

static void
stored_proc_reset_error (const void *ctx)
{
/* resetting the Stored Procedures Last Error Message */
    struct splite_internal_cache *cache = (struct splite_internal_cache *) ctx;
    if (cache != NULL)
      {
	  if (cache->storedProcError != NULL)
	    {
		free (cache->storedProcError);
		cache->storedProcError = NULL;
	    }
      }
}

SPATIALITE_PRIVATE void
gaia_sql_proc_set_error (const void *ctx, const char *errmsg)
{
/* setting the Stored Procedures Last Error Message */
    struct splite_internal_cache *cache = (struct splite_internal_cache *) ctx;
    if (cache != NULL)
      {
	  int len;
	  if (cache->storedProcError != NULL)
	    {
		free (cache->storedProcError);
		cache->storedProcError = NULL;
	    }
	  if (errmsg == NULL)
	      return;

	  len = strlen (errmsg);
	  cache->storedProcError = malloc (len + 1);
	  strcpy (cache->storedProcError, errmsg);
      }
}

SQLPROC_DECLARE char *
gaia_sql_proc_get_last_error (const void *p_cache)
{
/* return the last Stored Procedures Error Message (if any) */
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;

    if (cache == NULL)
	return NULL;
    return cache->storedProcError;
}

SQLPROC_DECLARE SqlProc_VarListPtr
gaia_sql_proc_create_variables ()
{
/* allocating an empty list of Variables with Values */
    SqlProc_VarListPtr list = malloc (sizeof (SqlProc_VarList));
    if (list == NULL)
	return NULL;

    list->Error = 0;
    list->ErrMessage = NULL;
    list->First = NULL;
    list->Last = NULL;
    return list;
}

SQLPROC_DECLARE void
gaia_sql_proc_destroy_variables (SqlProc_VarListPtr list)
{
/* destroying a List of Variables with Values */
    SqlProc_VariablePtr var;
    SqlProc_VariablePtr n_var;
    if (list == NULL)
	return;

    var = list->First;
    while (var != NULL)
      {
	  n_var = var->Next;
	  if (var->Name != NULL)
	      free (var->Name);
	  if (var->Value != NULL)
	      free (var->Value);
	  free (var);
	  var = n_var;
      }
    if (list->ErrMessage != NULL)
	sqlite3_free (list->ErrMessage);
    free (list);
}

static int
parse_variable_name_value (const char *str, char **name, char **value)
{
/* attempting to parse a Variable with Value definition */
    char marker = '\0';
    int end = 0;
    int start;
    int name_len;
    int value_len;
    char *nm;
    char *val;
    int i;

    *name = NULL;
    *value = NULL;
    if (*str == '@')
	marker = '@';
    if (*str == '$')
	marker = '$';
    if (marker == '\0')
	return 0;

/* searching the closing marker - variable name */
    for (i = 1; i < (int) strlen (str); i++)
      {
	  if (str[i] == marker)
	    {
		end = i;
		break;
	    }
      }
    if (end == 0)
	return 0;

/* searching the start position of Value */
    if (end + 1 >= (int) strlen (str))
	return 0;
    if (str[end + 1] != '=')
	return 0;
    start = end + 2;

    name_len = end - 1;
    value_len = strlen (str + start);
    if (name_len == 0 || value_len == 0)
	return 0;
    nm = malloc (name_len + 1);
    memcpy (nm, str + 1, end - 1);
    *(nm + name_len) = '\0';
    val = malloc (value_len + 1);
    strcpy (val, str + start);

    *name = nm;
    *value = val;
    return 1;
}

SQLPROC_DECLARE int
gaia_sql_proc_add_variable (SqlProc_VarListPtr list, const char *str)
{
/* adding a Variable with Values to the List */
    char *name;
    char *value;
    SqlProc_VariablePtr var;
    if (list == NULL)
	return 0;

    if (!parse_variable_name_value (str, &name, &value))
      {
	  list->ErrMessage =
	      sqlite3_mprintf ("Illegal Variable with Value definition: %s",
			       str);
	  return 0;
      }

    var = list->First;
    while (var != NULL)
      {
	  /* checking for redefined variables */
	  if (strcasecmp (name, var->Name) == 0)
	    {
		list->ErrMessage =
		    sqlite3_mprintf
		    ("Duplicated Variable: @%s@ is already defined.", name);
		return 0;
	    }
	  var = var->Next;
      }

/* adding the Variable with Value */
    var = malloc (sizeof (SqlProc_Variable));
    var->Name = name;
    var->Value = value;
    var->Next = NULL;
    if (list->First == NULL)
	list->First = var;
    if (list->Last != NULL)
	list->Last->Next = var;
    list->Last = var;
    return 1;
}

SQLPROC_DECLARE int
gaia_sql_proc_is_valid_var_value (const char *str)
{
/* checking a Variable with Values for validity */
    char *name;
    char *value;

    if (!parse_variable_name_value (str, &name, &value))
	return 0;
    free (name);
    free (value);
    return 1;
}


static struct sp_var_list *
alloc_var_list ()
{
/* allocating an empty list of Variables */
    struct sp_var_list *list = malloc (sizeof (struct sp_var_list));
    list->first = NULL;
    list->last = NULL;
    return list;
}

static void
free_var_list (struct sp_var_list *list)
{
/* destroying a list of Variables */
    struct sp_var_item *item;
    struct sp_var_item *nitem;

    if (list == NULL)
	return;
    item = list->first;
    while (item != NULL)
      {
	  nitem = item->next;
	  if (item->varname != NULL)
	      free (item->varname);
	  free (item);
	  item = nitem;
      }
    free (list);
}

static void
add_variable_ex (struct sp_var_list *list, char *varname, short ref_count)
{
/* adding a Variable to the List */
    struct sp_var_item *item;

    if (list == NULL)
	return;
    if (varname == NULL)
	return;

/* inserting a new variable */
    item = malloc (sizeof (struct sp_var_item));
    item->varname = varname;
    item->count = ref_count;
    item->next = NULL;
    if (list->first == NULL)
	list->first = item;
    if (list->last != NULL)
	list->last->next = item;
    list->last = item;
}

#ifndef OMIT_ICONV		/* ICONV is supported */

static void
add_variable (struct sp_var_list *list, char *varname)
{
/* adding a Variable to the List */
    struct sp_var_item *item;

    if (list == NULL)
	return;
    if (varname == NULL)
	return;

/* checking for already defined variables */
    item = list->first;
    while (item != NULL)
      {
	  if (strcasecmp (item->varname, varname) == 0)
	    {
		/* already defined */
		item->count += 1;	/* increasing the reference count */
		free (varname);
		return;
	    }
	  item = item->next;
      }

/* inserting a new variable */
    item = malloc (sizeof (struct sp_var_item));
    item->varname = varname;
    item->count = 1;
    item->next = NULL;
    if (list->first == NULL)
	list->first = item;
    if (list->last != NULL)
	list->last->next = item;
    list->last = item;
}

static int
var_list_required_size (struct sp_var_list *list)
{
/* computing the size required to store the List into the BLOB */
    struct sp_var_item *item;
    int size = 0;
/* checking for already defined variables */
    item = list->first;
    while (item != NULL)
      {
	  size += strlen (item->varname) + 7;
	  item = item->next;
      }
    return size;
}

static short
var_list_count_items (struct sp_var_list *list)
{
/* counting how many variables are there */
    struct sp_var_item *item;
    short count = 0;
/* checking for already defined variables */
    item = list->first;
    while (item != NULL)
      {
	  count++;
	  item = item->next;
      }
    return count;
}

#endif

SQLPROC_DECLARE int
gaia_sql_proc_parse (const void *cache, const char *xsql,
		     const char *charset, unsigned char **blob, int *blob_sz)
{
/* attempting to parse a Stored Procedure from Text */
#ifndef OMIT_ICONV		/* ICONV is supported */
    int len;
    int i;
    char *sql = NULL;
    int start_line;
    int macro;
    int comment;
    int variable;
    char varMark;
    int varStart;
    struct sp_var_list *list = NULL;
    struct sp_var_item *item;
    unsigned char *stored_proc = NULL;
    unsigned char *p_out;
    int stored_proc_sz;
    short num_vars;
    int sql_len;
    int endian_arch = gaiaEndianArch ();
    stored_proc_reset_error (cache);

    if (xsql == NULL)
      {
	  const char *errmsg = "NULL SQL body\n";
	  gaia_sql_proc_set_error (cache, errmsg);
	  goto err;
      }
    len = strlen (xsql);
    if (len == 0)
      {
	  const char *errmsg = "Empty SQL body\n";
	  gaia_sql_proc_set_error (cache, errmsg);
	  goto err;
      }
    sql = sqlite3_malloc (len + 1);
    strcpy (sql, xsql);

/* converting the SQL body to UTF-8 */
    if (!gaiaConvertCharset (&sql, charset, "UTF-8"))
      {
	  char *errmsg =
	      sqlite3_mprintf
	      ("Unable to convert the SQL body from %s to UTF-8\n", charset);
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  goto err;
      }

/* parsing the SQL body */
    len = strlen (sql);
    start_line = 1;
    macro = 0;
    comment = 0;
    variable = 0;
    list = alloc_var_list ();
    for (i = 0; i < len; i++)
      {
	  if (sql[i] == '\n')
	    {
		/* EndOfLine found */
		macro = 0;
		comment = 0;
		variable = 0;
		start_line = 1;
		continue;
	    }
	  if (start_line && (sql[i] == ' ' || sql[i] == '\t'))
	    {
		/* skipping leading blanks */
		continue;
	    }
	  if (start_line && sql[i] == '.')
	      macro = 1;
	  if (start_line && sql[i] == '-')
	    {
		if (i < len - 1)
		  {
		      if (sql[i + 1] == '-')
			  comment = 1;
		  }
	    }
	  start_line = 0;
	  if (macro || comment)
	      continue;
	  if (sql[i] == '@' || sql[i] == '$')
	    {
		if (variable && sql[i] == varMark)
		  {
		      /* a variable name ends here */
		      int sz = i - varStart;
		      int j;
		      int k;
		      char *varname = malloc (sz);
		      for (k = 0, j = varStart + 1; j < i; j++, k++)
			  *(varname + k) = sql[j];
		      *(varname + k) = '\0';
		      add_variable (list, varname);
		      variable = 0;
		  }
		else
		  {
		      /* a variable name may start here */
		      variable = 1;
		      varMark = sql[i];
		      varStart = i;
		  }
	    }
      }

/* computing the BLOB size */
    stored_proc_sz = 13;
    sql_len = strlen (sql);
    stored_proc_sz += sql_len;
    stored_proc_sz += var_list_required_size (list);

/* allocating the Stored Procedure BLOB object */
    stored_proc = malloc (stored_proc_sz);
    p_out = stored_proc;

/* preparing the Stored Procedure BLOB object */
    *p_out++ = '\0';
    *p_out++ = SQLPROC_START;	/* START signature */
    *p_out++ = GAIA_LITTLE_ENDIAN;	/* byte ordering */
    *p_out++ = SQLPROC_DELIM;	/* DELIMITER signature */
    num_vars = var_list_count_items (list);
    gaiaExport16 (p_out, num_vars, 1, endian_arch);	/* Number of Variables */
    p_out += 2;
    *p_out++ = SQLPROC_DELIM;	/* DELIMITER signature */
    item = list->first;
    while (item != NULL)
      {
	  len = strlen (item->varname);
	  gaiaExport16 (p_out, len, 1, endian_arch);	/* Variable Name length */
	  p_out += 2;
	  *p_out++ = SQLPROC_DELIM;	/* DELIMITER signature */
	  memcpy (p_out, item->varname, len);
	  p_out += len;
	  *p_out++ = SQLPROC_DELIM;	/* DELIMITER signature */
	  gaiaExport16 (p_out, item->count, 1, endian_arch);	/* Variable reference count */
	  p_out += 2;
	  *p_out++ = SQLPROC_DELIM;	/* DELIMITER signature */
	  item = item->next;
      }
    gaiaExport32 (p_out, sql_len, 1, endian_arch);	/* SQL Body Length */
    p_out += 4;
    *p_out++ = SQLPROC_DELIM;	/* DELIMITER signature */
    memcpy (p_out, sql, sql_len);
    p_out += sql_len;
    *p_out = SQLPROC_STOP;	/* STOP signature */

    sqlite3_free (sql);
    free_var_list (list);
    *blob = stored_proc;
    *blob_sz = stored_proc_sz;
    return 1;

  err:
    if (sql != NULL)
	sqlite3_free (sql);
    if (list != NULL)
	free_var_list (list);
    *blob = NULL;
    *blob_sz = 0;
    return 0;

#endif /* ICONV conditional */

    if (cache == NULL && xsql == NULL && charset == NULL)
	cache = NULL;		/* silencing stupid compiler warnings */

    spatialite_e
	("gaia_sql_proc_parse: ICONV support was disabled in this build !!!\n");

    *blob = NULL;
    *blob_sz = 0;
    return 0;
}

SQLPROC_DECLARE int
gaia_sql_proc_import (const void *cache, const char *filepath,
		      const char *charset, unsigned char **blob, int *blob_sz)
{
/* attempting to import a Stored Procedure from an external File */
    FILE *in = NULL;
    size_t size;
    char *sql = NULL;
    stored_proc_reset_error (cache);

/* opening the input file */
    in = fopen (filepath, "rb");
    if (in == NULL)
      {
	  char *errmsg = sqlite3_mprintf ("Unable to open: %s\n", filepath);
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  goto err;
      }

/* determining the file size */
    if (fseek (in, 0, SEEK_END) != 0)
      {
	  char *errmsg =
	      sqlite3_mprintf ("Unable to read from: %s\n", filepath);
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  goto err;
      }
    size = ftell (in);
    rewind (in);

/* allocating and feeding the SQL body */
    sql = malloc (size + 1);
    if (fread (sql, 1, size, in) != size)
      {
	  char *errmsg =
	      sqlite3_mprintf ("Unable to read from: %s\n", filepath);
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  goto err;
      }
    *(sql + size) = '\0';

/* attempting to parse the SQL body */
    if (!gaia_sql_proc_parse (cache, sql, charset, blob, blob_sz))
	goto err;

    free (sql);
    fclose (in);
    return 1;

  err:
    if (in != NULL)
	fclose (in);
    if (sql != NULL)
	free (sql);
    return 0;
}

SQLPROC_DECLARE int
gaia_sql_proc_is_valid (const unsigned char *blob, int blob_sz)
{
/* checking for a valid Stored Procedure BLOB Object */
    const unsigned char *p_out = blob;
    int endian;
    int endian_arch = gaiaEndianArch ();
    short size;
    short num_vars;
    short i_vars;
    int len;
    if (blob == NULL)
	return 0;
    if (blob_sz < 9)
	return 0;

    if (*p_out++ != '\0')	/* first byte should alway be null */
	return 0;
    if (*p_out++ != SQLPROC_START)	/* start marker */
	return 0;
    endian = *p_out++;
    if (endian != GAIA_LITTLE_ENDIAN && endian != GAIA_BIG_ENDIAN)	/* endianness */
	return 0;
    if (*p_out++ != SQLPROC_DELIM)	/* delimiter marker */
	return 0;
    if ((p_out - blob) >= blob_sz)
	return 0;
    num_vars = gaiaImport16 (p_out, endian, endian_arch);	/* Variables Count */
    p_out += 2;
    if ((p_out - blob) >= blob_sz)
	return 0;
    if (*p_out++ != SQLPROC_DELIM)
	return 0;
    for (i_vars = 0; i_vars < num_vars; i_vars++)
      {
	  if ((p_out - blob) >= blob_sz)
	      return 0;
	  size = gaiaImport16 (p_out, endian, endian_arch);	/* Variable Name Length */
	  p_out += 2;
	  if ((p_out - blob) >= blob_sz)
	      return 0;
	  if (*p_out++ != SQLPROC_DELIM)
	      return 0;
	  p_out += size;	/* skipping the variable name */
	  if ((p_out - blob) >= blob_sz)
	      return 0;
	  if (*p_out++ != SQLPROC_DELIM)
	      return 0;
	  if ((p_out - blob) >= blob_sz)
	      return 0;
	  p_out += 2;		/* Variable Name Length */
	  if ((p_out - blob) >= blob_sz)
	      return 0;
	  if (*p_out++ != SQLPROC_DELIM)
	      return 0;
      }
    if ((p_out - blob) >= blob_sz)
	return 0;
    len = gaiaImport32 (p_out, endian, endian_arch);	/* SQL Body Length */
    p_out += 4;
    if ((p_out - blob) >= blob_sz)
	return 0;
    if (*p_out++ != SQLPROC_DELIM)
	return 0;
    p_out += len;		/* skipping the SQL body */
    if ((p_out - blob) >= blob_sz)
	return 0;
    if (*p_out != SQLPROC_STOP)
	return 0;

    return 1;
}

SQLPROC_DECLARE int
gaia_sql_proc_var_count (const unsigned char *blob, int blob_sz)
{
/* return the total count of Variabiles from a Stored Procedure BLOB Object */
    const unsigned char *p_out = blob;
    int endian;
    int endian_arch = gaiaEndianArch ();
    short num_vars;
    if (!gaia_sql_proc_is_valid (blob, blob_sz))
	return 0;

    p_out += 2;
    endian = *p_out++;
    p_out++;
    num_vars = gaiaImport16 (p_out, endian, endian_arch);	/* Variables Count */
    return num_vars;
}

SQLPROC_DECLARE char *
gaia_sql_proc_variable (const unsigned char *blob, int blob_sz, int index)
{
/* return the Name of the Nth Variabile from a Stored Procedure BLOB Object */
    const unsigned char *p_out = blob;
    int endian;
    int endian_arch = gaiaEndianArch ();
    short size;
    short num_vars;
    short i_vars;
    if (!gaia_sql_proc_is_valid (blob, blob_sz))
	return NULL;
    if (index < 0)
	return NULL;

    p_out += 2;
    endian = *p_out++;
    p_out++;
    num_vars = gaiaImport16 (p_out, endian, endian_arch);	/* Variables Count */
    p_out += 3;
    for (i_vars = 0; i_vars < num_vars; i_vars++)
      {
	  size = gaiaImport16 (p_out, endian, endian_arch);	/* Variable Name Length */
	  p_out += 3;
	  if (i_vars == index)
	    {
		char *varname = malloc (size + 3);
		*varname = '@';
		memcpy (varname + 1, p_out, size);
		*(varname + size + 1) = '@';
		*(varname + size + 2) = '\0';
		return varname;
	    }
	  p_out += size;	/* skipping the variable name */
	  p_out++;
	  p_out += 3;		/* skipping the reference count */
      }
    return NULL;
}

SQLPROC_DECLARE char *
gaia_sql_proc_all_variables (const unsigned char *blob, int blob_sz)
{
/* return a comma separated list of Variable Names from a Stored Procedure BLOB Object */
    const unsigned char *p_out = blob;
    int endian;
    int endian_arch = gaiaEndianArch ();
    short size;
    short num_vars;
    short i_vars;
    char *varname;
    char *varlist = NULL;
    if (!gaia_sql_proc_is_valid (blob, blob_sz))
	return NULL;

    p_out += 2;
    endian = *p_out++;
    p_out++;
    num_vars = gaiaImport16 (p_out, endian, endian_arch);	/* Variables Count */
    p_out += 3;
    for (i_vars = 0; i_vars < num_vars; i_vars++)
      {
	  size = gaiaImport16 (p_out, endian, endian_arch);	/* Variable Name Length */
	  p_out += 3;
	  varname = malloc (size + 3);
	  *varname = '@';
	  memcpy (varname + 1, p_out, size);
	  *(varname + size + 1) = '@';
	  *(varname + size + 2) = '\0';
	  if (varlist == NULL)
	      varlist = sqlite3_mprintf ("%s", varname);
	  else
	    {
		char *prev = varlist;
		varlist = sqlite3_mprintf ("%s %s", prev, varname);
		sqlite3_free (prev);
	    }
	  free (varname);
	  p_out += size;	/* skipping the variable name */
	  p_out++;
	  p_out += 3;		/* skipping the reference count */
      }
    return varlist;
}

SQLPROC_DECLARE char *
gaia_sql_proc_raw_sql (const unsigned char *blob, int blob_sz)
{
/* return the raw SQL body from a Stored Procedure BLOB Object */
    const unsigned char *p_out = blob;
    int endian;
    int endian_arch = gaiaEndianArch ();
    short size;
    int len;
    short num_vars;
    short i_vars;
    char *sql = NULL;
    if (!gaia_sql_proc_is_valid (blob, blob_sz))
	return NULL;

    p_out += 2;
    endian = *p_out++;
    p_out++;
    num_vars = gaiaImport16 (p_out, endian, endian_arch);	/* Variables Count */
    p_out += 3;
    for (i_vars = 0; i_vars < num_vars; i_vars++)
      {
	  size = gaiaImport16 (p_out, endian, endian_arch);	/* Variable Name Length */
	  p_out += 3;
	  p_out += size;	/* skipping the variable name */
	  p_out++;
	  p_out += 3;		/* skipping the reference count */
      }
    len = gaiaImport32 (p_out, endian, endian_arch);	/* SQL Body Length */
    p_out += 5;
    sql = malloc (len + 1);
    memcpy (sql, p_out, len);
    *(sql + len) = '\0';
    return sql;
}

static struct sp_var_list *
build_var_list (const unsigned char *blob, int blob_sz)
{
/* building a list of Variables with Values and reference count */
    const unsigned char *p_out = blob;
    int endian;
    int endian_arch = gaiaEndianArch ();
    short size;
    short ref_count;
    short num_vars;
    short i_vars;
    char *varname;
    struct sp_var_list *list = NULL;
    if (!gaia_sql_proc_is_valid (blob, blob_sz))
	return NULL;

    list = alloc_var_list ();
    p_out += 2;
    endian = *p_out++;
    p_out++;
    num_vars = gaiaImport16 (p_out, endian, endian_arch);	/* Variables Count */
    p_out += 3;
    for (i_vars = 0; i_vars < num_vars; i_vars++)
      {
	  size = gaiaImport16 (p_out, endian, endian_arch);	/* Variable Name Length */
	  p_out += 3;
	  varname = malloc (size + 1);
	  memcpy (varname, p_out, size);
	  *(varname + size) = '\0';
	  p_out += size;	/* skipping the variable name */
	  p_out++;
	  ref_count = gaiaImport16 (p_out, endian, endian_arch);	/* Variable reference count */
	  p_out += 3;		/* skipping the reference count */
	  add_variable_ex (list, varname, ref_count);
      }
    return list;
}

static const char *
search_replacement_value (SqlProc_VarListPtr variables, const char *varname)
{
/* searching a Variable replacement value (if any) */
    SqlProc_VariablePtr var = variables->First;
    while (var != NULL)
      {
	  if (strcasecmp (var->Name, varname) == 0)
	    {
		/* found a replacement value */
		return var->Value;
	    }
	  var = var->Next;
      }
    return NULL;
}

static char *
search_stored_var (sqlite3 * handle, const char *varname)
{
/* searching a Stored Variable */
    const char *sql;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *var_with_value = NULL;

    sql = "SELECT value FROM stored_variables WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	return NULL;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, varname, strlen (varname), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *data =
			  (const char *) sqlite3_column_text (stmt, 0);
		      var_with_value = sqlite3_mprintf ("%s", data);
		  }
	    }
      }
    sqlite3_finalize (stmt);
    return var_with_value;
}

static int
get_value_length (sqlite3 * handle, SqlProc_VarListPtr variables,
		  const char *varname)
{
/* retieving a Variable replacement Value length */
    char *stored_var;
    SqlProc_VariablePtr var = variables->First;
    while (var != NULL)
      {
	  if (strcasecmp (var->Name, varname) == 0)
	    {
		/* found a replacement value */
		return strlen (var->Value);
	    }
	  var = var->Next;
      }

/* attempting to get a Stored Variable */
    stored_var = search_stored_var (handle, varname);
    if (stored_var != NULL)
      {
	  int len = strlen (stored_var);
	  sqlite3_free (stored_var);
	  return len;
      }
    return 4;			/* undefined; defaults to NULL */
}

SQLPROC_DECLARE int
gaia_sql_proc_cooked_sql (sqlite3 * handle, const void *cache,
			  const unsigned char *blob, int blob_sz,
			  SqlProc_VarListPtr variables, char **sql)
{
/* return the cooked SQL body from a raw SQL body by replacing Variable Values */
    int len;
    int i;
    int start_line;
    int macro;
    int comment;
    int variable;
    char varMark;
    int varStart;
    char *raw = NULL;
    char *cooked = NULL;
    char *p_out;
    int buf_size;
    struct sp_var_list *list = NULL;
    struct sp_var_item *item;
    stored_proc_reset_error (cache);

    *sql = NULL;
    if (variables == NULL)
      {
	  const char *errmsg = "NULL Variables List (Arguments)\n";
	  gaia_sql_proc_set_error (cache, errmsg);
	  goto err;
      }

/* retrieving the Raw SQL Body */
    raw = gaia_sql_proc_raw_sql (blob, blob_sz);
    if (raw == NULL)
      {
	  const char *errmsg = "NULL Raw SQL body\n";
	  gaia_sql_proc_set_error (cache, errmsg);
	  goto err;
      }
    len = strlen (raw);
    if (len == 0)
      {
	  const char *errmsg = "Empty Raw SQL body\n";
	  gaia_sql_proc_set_error (cache, errmsg);
	  goto err;
      }

/* building the Variables List from the BLOB */
    list = build_var_list (blob, blob_sz);
    if (list == NULL)
      {
	  const char *errmsg = "NULL Variables List (Raw SQL)\n";
	  gaia_sql_proc_set_error (cache, errmsg);
	  goto err;
      }

/* allocating the Cooked buffer */
    buf_size = strlen (raw);
    item = list->first;
    while (item != NULL)
      {
	  int value_len = get_value_length (handle, variables, item->varname);
	  buf_size -= (strlen (item->varname) + 2) * item->count;
	  buf_size += value_len * item->count;
	  item = item->next;
      }
    cooked = malloc (buf_size + 1);
    p_out = cooked;

/* parsing the Raw SQL body */
    start_line = 1;
    macro = 0;
    comment = 0;
    variable = 0;
    for (i = 0; i < len; i++)
      {
	  if (raw[i] == '\n')
	    {
		/* EndOfLine found */
		macro = 0;
		comment = 0;
		variable = 0;
		start_line = 1;
		*p_out++ = raw[i];
		continue;
	    }
	  if (start_line && (raw[i] == ' ' || raw[i] == '\t'))
	    {
		/* skipping leading blanks */
		*p_out++ = raw[i];
		continue;
	    }
	  if (start_line && raw[i] == '.')
	      macro = 1;
	  if (start_line && raw[i] == '-')
	    {
		if (i < len - 1)
		  {
		      if (raw[i + 1] == '-')
			  comment = 1;
		  }
	    }
	  start_line = 0;
	  if (macro || comment)
	    {
		*p_out++ = raw[i];
		continue;
	    }
	  if (raw[i] == '@' || raw[i] == '$')
	    {
		if (variable && raw[i] == varMark)
		  {
		      /* a variable name ends here */
		      int sz = i - varStart;
		      int j;
		      int k;
		      char *stored_var = NULL;
		      const char *replacement_value;
		      char *varname = malloc (sz);
		      for (k = 0, j = varStart + 1; j < i; j++, k++)
			  *(varname + k) = raw[j];
		      *(varname + k) = '\0';
		      replacement_value =
			  search_replacement_value (variables, varname);
		      if (replacement_value == NULL)
			{
			    /* attempting to get a Stored Variable */
			    stored_var = search_stored_var (handle, varname);
			    replacement_value = stored_var;
			}
		      free (varname);
		      if (replacement_value == NULL)
			  replacement_value = "NULL";
		      for (k = 0; k < (int) strlen (replacement_value); k++)
			  *p_out++ = replacement_value[k];
		      if (stored_var != NULL)
			  sqlite3_free (stored_var);
		      variable = 0;
		  }
		else
		  {
		      /* a variable name may start here */
		      variable = 1;
		      varMark = raw[i];
		      varStart = i;
		  }
		continue;
	    }
	  if (!variable)
	      *p_out++ = raw[i];
      }
    *p_out = '\0';

    free (raw);
    free_var_list (list);
    *sql = cooked;
    return 1;

  err:
    if (raw != NULL)
	free (raw);
    if (cooked != NULL)
	free (cooked);
    if (list != NULL)
	free_var_list (list);
    return 0;
}

static int
test_stored_proc_tables (sqlite3 * handle)
{
/* testing if the Stored Procedures Tables are already defined */
    int ok_name = 0;
    int ok_title = 0;
    int ok_sql_proc = 0;
    int ok_var_value = 0;
    char sql[1024];
    int ret;
    const char *name;
    int i;
    char **results;
    int rows;
    int columns;

/* checking the STORED_PROCEDURES table */
    strcpy (sql, "PRAGMA table_info(stored_procedures)");
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcasecmp (name, "name") == 0)
		    ok_name = 1;
		if (strcasecmp (name, "title") == 0)
		    ok_title = 1;
		if (strcasecmp (name, "sql_proc") == 0)
		    ok_sql_proc = 1;
	    }
      }
    sqlite3_free_table (results);
    if (ok_name && ok_title && ok_sql_proc)
	;
    else
	return 0;

/* checking the STORED_PROCEDURES table */
    ok_name = 0;
    ok_title = 0;
    strcpy (sql, "PRAGMA table_info(stored_variables)");
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcasecmp (name, "name") == 0)
		    ok_name = 1;
		if (strcasecmp (name, "title") == 0)
		    ok_title = 1;
		if (strcasecmp (name, "value") == 0)
		    ok_var_value = 1;
	    }
      }
    sqlite3_free_table (results);
    if (ok_name && ok_title && ok_var_value)
	return 1;
    return 0;
}

SQLPROC_DECLARE int
gaia_stored_proc_create_tables (sqlite3 * handle, const void *cache)
{
/* attempts to create the Stored Procedures Tables */
    char sql[4192];
    char *errMsg = NULL;
    int ret;

    if (test_stored_proc_tables (handle))
	return 1;
    stored_proc_reset_error (cache);

/* creating the STORED_PROCEDURES table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "stored_procedures (\n");
    strcat (sql, "name TEXT NOT NULL PRIMARY KEY,\n");
    strcat (sql, "title TEXT NOT NULL,\n");
    strcat (sql, "sql_proc BLOB NOT NULL)");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  char *errmsg =
	      sqlite3_mprintf ("gaia_stored_create \"stored_procedures\": %s",
			       sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

/* creating Triggers supporting STORED_PROCEDURES */
    sprintf (sql,
	     "CREATE TRIGGER storproc_ins BEFORE INSERT ON stored_procedures\n"
	     "FOR EACH ROW BEGIN\n"
	     "SELECT RAISE(ROLLBACK, 'Invalid \"sql_proc\": not a BLOB of the SQL Procedure type')\n"
	     "WHERE SqlProc_IsValid(NEW.sql_proc) <> 1;\nEND");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  char *errmsg =
	      sqlite3_mprintf ("gaia_stored_create \"storproc_ins\": %s",
			       sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }
    sprintf (sql,
	     "CREATE TRIGGER storproc_upd BEFORE UPDATE OF sql_proc ON stored_procedures\n"
	     "FOR EACH ROW BEGIN\n"
	     "SELECT RAISE(ROLLBACK, 'Invalid \"sql_proc\": not a BLOB of the SQL Procedure type')\n"
	     "WHERE SqlProc_IsValid(NEW.sql_proc) <> 1;\nEND");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  char *errmsg =
	      sqlite3_mprintf ("gaia_stored_create \"storproc_upd\": %s",
			       sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

/* creating the STORED_VALUES table */
    strcpy (sql, "CREATE TABLE IF NOT EXISTS ");
    strcat (sql, "stored_variables (\n");
    strcat (sql, "name TEXT NOT NULL PRIMARY KEY,\n");
    strcat (sql, "title TEXT NOT NULL,\n");
    strcat (sql, "value TEXT NOT NULL)");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &errMsg);
    if (ret != SQLITE_OK)
      {
	  char *errmsg =
	      sqlite3_mprintf ("gaia_stored_create \"stored_variables\": %s",
			       sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    if (test_stored_proc_tables (handle))
	return 1;
    return 0;
}

SQLPROC_DECLARE int
gaia_stored_proc_store (sqlite3 * handle, const void *cache, const char *name,
			const char *title, const unsigned char *blob,
			int blob_sz)
{
/* permanently registering a Stored Procedure */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql =
	"INSERT INTO stored_procedures(name, title, sql_proc) VALUES (?, ?, ?)";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_store: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, name, strlen (name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, title, strlen (title), SQLITE_STATIC);
    sqlite3_bind_blob (stmt, 3, blob, blob_sz, SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_store: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_proc_fetch (sqlite3 * handle, const void *cache, const char *name,
			unsigned char **blob, int *blob_sz)
{
/* will return the SQL Procedure BLOB from a given Stored Procedure */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    unsigned char *p_blob = NULL;
    int p_blob_sz = 0;
    stored_proc_reset_error (cache);

    sql = "SELECT sql_proc FROM stored_procedures WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_fetch: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, name, strlen (name), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *data = sqlite3_column_blob (stmt, 0);
		      p_blob_sz = sqlite3_column_bytes (stmt, 0);
		      p_blob = malloc (p_blob_sz);
		      memcpy (p_blob, data, p_blob_sz);
		  }
	    }
      }
    sqlite3_finalize (stmt);

    *blob = p_blob;
    *blob_sz = p_blob_sz;
    if (p_blob == NULL)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_proc_delete (sqlite3 * handle, const void *cache, const char *name)
{
/* removing a permanently registered Stored Procedure */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "DELETE FROM stored_procedures WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_delete: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, name, strlen (name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_delete: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    if (sqlite3_changes (handle) == 0)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_proc_update_title (sqlite3 * handle, const void *cache,
			       const char *name, const char *title)
{
/* updating a permanently registered Stored Procedure - Title */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "UPDATE stored_procedures SET title = ? WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_update_title: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, title, strlen (title), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, name, strlen (name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_update_title: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    if (sqlite3_changes (handle) == 0)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_proc_update_sql (sqlite3 * handle, const void *cache,
			     const char *name, const unsigned char *blob,
			     int blob_sz)
{
/* updating a permanently registered Stored Procedure - SQL body */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "UPDATE stored_procedures SET sql_proc = ? WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_update_sql: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, blob, blob_sz, SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, name, strlen (name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_proc_update_sql: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    if (sqlite3_changes (handle) == 0)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_var_store (sqlite3 * handle, const void *cache, const char *name,
		       const char *title, const char *value)
{
/* permanently registering a Stored Variable */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "INSERT INTO stored_variables(name, title, value) VALUES (?, ?, ?)";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_store: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, name, strlen (name), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, title, strlen (title), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 3, value, strlen (value), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_store: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_var_fetch (sqlite3 * handle, const void *cache, const char *name,
		       int variable_with_value, char **value)
{
/* will return a Variable with Value string from a given Stored Variable */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    char *p_value = NULL;
    stored_proc_reset_error (cache);

    sql = "SELECT value FROM stored_variables WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_fetch: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, name, strlen (name), SQLITE_STATIC);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *data =
			  (const char *) sqlite3_column_text (stmt, 0);
		      char *var_with_val;
		      if (variable_with_value)
			{
			    /* returning a Variable with Value string */
			    var_with_val =
				sqlite3_mprintf ("@%s@=%s", name, data);
			}
		      else
			{
			    /* just returning the bare Value alone */
			    var_with_val = sqlite3_mprintf ("%s", data);
			}
		      p_value = malloc (strlen (var_with_val) + 1);
		      strcpy (p_value, var_with_val);
		      sqlite3_free (var_with_val);
		  }
	    }
      }
    sqlite3_finalize (stmt);

    *value = p_value;;
    if (p_value == NULL)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_var_delete (sqlite3 * handle, const void *cache, const char *name)
{
/* removing a permanently registered Stored Variable */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "DELETE FROM stored_variables WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_delete: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, name, strlen (name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_delete: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    if (sqlite3_changes (handle) == 0)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_var_update_title (sqlite3 * handle, const void *cache,
			      const char *name, const char *title)
{
/* updating a permanently registered Stored Variable - Title */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "UPDATE stored_variables SET title = ? WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_update_title: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, title, strlen (title), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, name, strlen (name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_update_title: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    if (sqlite3_changes (handle) == 0)
	return 0;
    return 1;
}

SQLPROC_DECLARE int
gaia_stored_var_update_value (sqlite3 * handle, const void *cache,
			      const char *name, const char *value)
{
/* updating a permanently registered Stored Variable - Variable with Value */
    const char *sql;
    sqlite3_stmt *stmt;
    int ret;
    stored_proc_reset_error (cache);

    sql = "UPDATE stored_variables SET value = ? WHERE name = ?";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_update_value: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  return 0;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, value, strlen (value), SQLITE_STATIC);
    sqlite3_bind_text (stmt, 2, name, strlen (name), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *errmsg = sqlite3_mprintf ("gaia_stored_var_update_value: %s",
					  sqlite3_errmsg (handle));
	  gaia_sql_proc_set_error (cache, errmsg);
	  sqlite3_free (errmsg);
	  sqlite3_finalize (stmt);
	  return 0;
      }
    sqlite3_finalize (stmt);
    if (sqlite3_changes (handle) == 0)
	return 0;
    return 1;
}

static const char *
consume_empty_sql (const char *ptr)
{
/* testing for an empty SQL string */
    int comment_marker = 0;
    const char *p = ptr;
    while (1)
      {
	  char c = *p;
	  if (c == '\0')
	      break;
	  if (c == ' ' || c == '\0' || c == '\t' || c == '\r' || c == '\n')
	    {
		p++;
		continue;	/* ignoring leading blanks */
	    }
	  if (c == '.')
	    {
		while (1)
		  {
		      /* consuming a dot-macro until the end of the line */
		      c = *p;
		      if (c == '\n' || c == '\0')
			  break;
		      p++;
		  }
		if (c != '\0')
		    p++;
		continue;
	    }
	  if (c == '-')
	    {
		if (comment_marker)
		  {
		      while (1)
			{
			    /* consuming a comment until the end of the line */
			    c = *p;
			    if (c == '\n' || c == '\0')
				break;
			    p++;
			}
		      comment_marker = 0;
		      if (c != '\0')
			  p++;
		      continue;
		  }
		comment_marker = 1;
		p++;
		continue;
	    }
	  break;
      }
    return p;
}

static void
do_clean_double (char *buffer)
{
/* cleans unneeded trailing zeros */
    int i;
    for (i = strlen (buffer) - 1; i > 0; i--)
      {
	  if (buffer[i] == '0')
	      buffer[i] = '\0';
	  else
	      break;
      }
    if (buffer[i] == '.')
	buffer[i] = '\0';
    if (strcmp (buffer, "-0") == 0)
      {
	  /* avoiding to return embarassing NEGATIVE ZEROes */
	  strcpy (buffer, "0");
      }

    if (strcmp (buffer, "-1.#QNAN") == 0 || strcmp (buffer, "NaN") == 0
	|| strcmp (buffer, "1.#QNAN") == 0
	|| strcmp (buffer, "-1.#IND") == 0 || strcmp (buffer, "1.#IND") == 0)
      {
	  /* on Windows a NaN could be represented in "odd" ways */
	  /* this is intended to restore a consistent behaviour  */
	  strcpy (buffer, "nan");
      }
}

static void
do_log_double (FILE * log, double value, int precision)
{
/* printing a well-formatted DOUBLE into the Logfile */
    char *buf;
    if (precision < 0)
	buf = sqlite3_mprintf ("%1.6f", value);
    else
	buf = sqlite3_mprintf ("%.*f", precision, value);
    do_clean_double (buf);
    fprintf (log, "%s", buf);
    sqlite3_free (buf);
}

static char *
do_title_bar (int len)
{
/* building a bar line */
    int i;
    char *line = sqlite3_malloc (len + 1);
    for (i = 0; i < len; i++)
	*(line + i) = '-';
    *(line + len) = '\0';
    return line;
}

static void
print_elapsed_time (FILE * log, double seconds)
{
/* well formatting elapsed time */
    int int_time = (int) seconds;
    int millis = (int) ((seconds - (double) int_time) * 1000.0);
    int secs = int_time % 60;
    int_time /= 60;
    int mins = int_time % 60;
    int_time /= 60;
    int hh = int_time;
    if (hh == 0 && mins == 0)
	fprintf (log, "Execution time: %d.%03d\n", secs, millis);
    else if (hh == 0)
	fprintf (log, "Execution time: %d:%02d.%03d\n", mins, secs, millis);
    else
	fprintf (log, "Execution time: %d:%02d:%02d.%03d\n", hh, mins, secs,
		 millis);
}

static char *
get_timestamp (sqlite3 * sqlite)
{
/* retrieving the current timestamp */
    char *now;
    const char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;

    sql = "SELECT DateTime('now')";
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    if (ret != SQLITE_OK)
	goto error;
    for (i = 1; i <= rows; i++)
      {
	  const char *timestamp = results[(i * columns) + 0];
	  now = sqlite3_mprintf ("%s", timestamp);
      }
    sqlite3_free_table (results);
    return now;

  error:
    now = sqlite3_mprintf ("unknown");
    return now;
}

static char *
do_clean_failing_sql (const char *pSql)
{
/* attempting to insulate the failing SQL statement */
    int max = 0;
    const char *in = pSql;
    char *fail = NULL;
    char *out;

    while (1)
      {
	  if (*in == '\0')
	      break;
	  if (*in == ';')
	    {
		max++;
		break;
	    }
	  max++;
	  in++;
      }
    fail = malloc (max + 1);
    out = fail;
    in = pSql;
    while (max > 0)
      {
	  *out++ = *in++;
	  max--;
      }
    *out = '\0';
    return fail;
}

SQLPROC_DECLARE int
gaia_sql_proc_execute (sqlite3 * handle, const void *ctx, const char *sql)
{
/* executing an already cooked SQL Body */
    const char *pSql = sql;
    sqlite3_stmt *stmt;
    int retval = 0;
    int n_stmts = 0;
    FILE *log = NULL;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) ctx;

    if (cache != NULL)
      {
	  cache->SqlProcContinue = 1;
	  log = cache->SqlProcLog;
      }

    if (log != NULL)
      {
	  /* printing a session header */
	  char *now = get_timestamp (handle);
	  fprintf (log,
		   "=========================================================================================\n");
	  fprintf (log, "==     SQL session start   =   %s\n", now);
	  sqlite3_free (now);
	  fprintf (log,
		   "=========================================================================================\n");
      }

    while (1)
      {
	  const char *sql_tail;
	  int ret;
	  int title;
	  clock_t clock_start;
	  clock_t clock_end;
	  double seconds;
	  int n_rows;
	  int rs;

	  if (cache != NULL)
	    {
		if (cache->SqlProcContinue == 0)
		  {
		      /* found a pending EXIT request */
		      if (log != NULL)
			  fprintf (log,
				   "\n***** quitting ... found a pending EXIT request *************\n\n");
		      break;
		  }
	    }

	  pSql = consume_empty_sql (pSql);
	  if (strlen (pSql) == 0)
	      break;
	  clock_start = clock ();
	  ret = sqlite3_prepare_v2 (handle, pSql, strlen (pSql), &stmt,
				    &sql_tail);
	  if (ret != SQLITE_OK)
	    {
		if (log != NULL)
		  {
		      char *failSql = do_clean_failing_sql (pSql);
		      fprintf (log, "=== SQL error: %s\n",
			       sqlite3_errmsg (handle));
		      fprintf (log, "failing SQL statement was:\n%s\n\n",
			       failSql);
		      free (failSql);
		  }
		goto stop;
	    }
	  pSql = sql_tail;
	  if (log != NULL)
	      fprintf (log, "%s\n", sqlite3_sql (stmt));
	  title = 1;
	  n_rows = 0;
	  rs = 0;
	  n_stmts++;
	  while (1)
	    {
		/* executing an SQL statement */
		int i;
		int n_cols;
		ret = sqlite3_step (stmt);
		if (title && log != NULL
		    && (ret == SQLITE_DONE || ret == SQLITE_ROW))
		  {
		      char *bar;
		      char *line;
		      char *names;
		      char *prev;
		      n_cols = sqlite3_column_count (stmt);
		      if (n_cols > 0)
			{
			    /* printing column names */
			    rs = 1;
			    for (i = 0; i < n_cols; i++)
			      {
				  const char *nm =
				      sqlite3_column_name (stmt, i);
				  if (i == 0)
				    {
					line = do_title_bar (strlen (nm));
					bar = sqlite3_mprintf ("%s", line);
					sqlite3_free (line);
					names = sqlite3_mprintf ("%s", nm);
				    }
				  else
				    {
					prev = bar;
					line = do_title_bar (strlen (nm));
					bar =
					    sqlite3_mprintf ("%s+%s", prev,
							     line);
					sqlite3_free (line);
					sqlite3_free (prev);
					prev = names;
					names =
					    sqlite3_mprintf ("%s|%s", prev, nm);
					sqlite3_free (prev);
				    }
			      }
			    fprintf (log, "%s\n", bar);
			    fprintf (log, "%s\n", names);
			    fprintf (log, "%s\n", bar);
			    sqlite3_free (names);
			    sqlite3_free (bar);
			}
		      title = 0;
		  }
		if (ret == SQLITE_DONE)
		    break;
		else if (ret == SQLITE_ROW)
		  {
		      sqlite3_int64 int64;
		      double dbl;
		      int sz;
		      if (log == NULL)
			  continue;
		      n_rows++;
		      /* updating the Logfile */
		      n_cols = sqlite3_column_count (stmt);
		      for (i = 0; i < n_cols; i++)
			{
			    /* printing column values */
			    if (i > 0)
				fprintf (log, "|");
			    switch (sqlite3_column_type (stmt, i))
			      {
			      case SQLITE_INTEGER:
				  int64 = sqlite3_column_int64 (stmt, i);
				  fprintf (log, FRMT64, int64);
				  break;
			      case SQLITE_FLOAT:
				  dbl = sqlite3_column_double (stmt, i);
				  do_log_double (log, dbl,
						 cache->decimal_precision);
				  break;
			      case SQLITE_TEXT:
				  sz = sqlite3_column_bytes (stmt, i);
				  if (sz <= 128)
				      fprintf (log, "%s",
					       (const char *)
					       sqlite3_column_text (stmt, i));
				  else
				      fprintf (log, "TEXT[%d bytes]", sz);
				  break;
			      case SQLITE_BLOB:
				  sz = sqlite3_column_bytes (stmt, i);
				  fprintf (log, "BLOB[%d bytes]", sz);
				  break;
			      case SQLITE_NULL:
			      default:
				  fprintf (log, "NULL");
				  break;
			      };
			}
		      fprintf (log, "\n");
		  }
		else
		  {
		      char *errmsg =
			  sqlite3_mprintf ("gaia_sql_proc_execute: %s",
					   sqlite3_errmsg (handle));
		      gaia_sql_proc_set_error (cache, errmsg);
		      if (log != NULL)
			{
			    fprintf (log, "=== SQL error: %s\n",
				     sqlite3_errmsg (handle));
			}
		      sqlite3_free (errmsg);
		      sqlite3_finalize (stmt);
		      goto stop;
		  }
	    }
	  sqlite3_finalize (stmt);
	  clock_end = clock ();
	  seconds =
	      (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC;
	  if (log != NULL)
	    {
		if (rs)
		    fprintf (log, "=== %d %s === ", n_rows,
			     (n_rows == 1) ? "row" : "rows");
		else
		    fprintf (log, "=== ");
		print_elapsed_time (log, seconds);
		fprintf (log, "\n");
		fflush (log);
	    }
      }
    retval = 1;

  stop:
    if (log != NULL)
      {
	  /* printing a session footer */
	  char *now = get_timestamp (handle);
	  fprintf (log,
		   "=========================================================================================\n");
	  fprintf (log,
		   "==     SQL session end   =   %s   =   %d statement%s executed\n",
		   now, n_stmts, (n_stmts == 1) ? " was" : "s were");
	  sqlite3_free (now);
	  fprintf (log,
		   "=========================================================================================\n\n\n");
	  fflush (log);
      }
    return retval;
}

SQLPROC_DECLARE int
gaia_sql_proc_logfile (const void *ctx, const char *filepath, int append)
{
/* enabling/disabling the Logfile */
    FILE *log;
    int len;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) ctx;

    if (cache == NULL)
	return 0;

    if (filepath == NULL)
      {
	  /* disabling the Logfile */
	  if (cache->SqlProcLogfile != NULL)
	    {
		free (cache->SqlProcLogfile);
		cache->SqlProcLogfile = NULL;
	    }
	  if (cache->SqlProcLog != NULL)
	      fclose (cache->SqlProcLog);
	  cache->SqlProcLog = NULL;
	  return 1;
      }

/* attempting to enable the Logfile */
    if (append)
	log = fopen (filepath, "ab");
    else
	log = fopen (filepath, "wb");
    if (log == NULL)
	return 0;

/* closing the current Logfile (if any) */
    if (cache->SqlProcLogfile != NULL)
	free (cache->SqlProcLogfile);
    if (cache->SqlProcLog != NULL)
	fclose (cache->SqlProcLog);

/* resetting the current Logfile */
    len = strlen (filepath);
    cache->SqlProcLogfile = malloc (len + 1);
    strcpy (cache->SqlProcLogfile, filepath);
    cache->SqlProcLog = log;
    return 1;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers -I.

noinst_HEADERS = topology_private.h \
	network_private.h \
	lwn_network.h \
	lwn_network_private.h
noinst_LTLIBRARIES = libtopology.la topology.la

libtopology_la_SOURCES = gaia_topology.c \
	gaia_auxtopo.c \
	gaia_auxtopo_table.c \
	gaia_topostmts.c \
	topo_callbacks.c \
	lwn_network.c \
	gaia_network.c \
	gaia_auxnet.c \
	gaia_netstmts.c \
	net_callbacks.c

topology_la_SOURCES = gaia_topology.c \
	gaia_auxtopo.c \
	gaia_auxtopo_table.c \
	gaia_topostmts.c \
	topo_callbacks.c \
	lwn_network.c \
	gaia_network.c \
	gaia_auxnet.c \
	gaia_netstmts.c \
	net_callbacks.c

topology_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
topology_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
topology_la_CPPFLAGS += -DLOADABLE_EXTENSION
topology_la_LDFLAGS = -module
topology_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted src/topology/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@


VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/topology
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
	$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libtopology_la_LIBADD =
am_libtopology_la_OBJECTS = gaia_topology.lo gaia_auxtopo.lo \
	gaia_auxtopo_table.lo gaia_topostmts.lo topo_callbacks.lo \
	lwn_network.lo gaia_network.lo gaia_auxnet.lo gaia_netstmts.lo \
	net_callbacks.lo
libtopology_la_OBJECTS = $(am_libtopology_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 = 
topology_la_LIBADD =
am_topology_la_OBJECTS = topology_la-gaia_topology.lo \
	topology_la-gaia_auxtopo.lo topology_la-gaia_auxtopo_table.lo \
	topology_la-gaia_topostmts.lo topology_la-topo_callbacks.lo \
	topology_la-lwn_network.lo topology_la-gaia_network.lo \
	topology_la-gaia_auxnet.lo topology_la-gaia_netstmts.lo \
	topology_la-net_callbacks.lo
topology_la_OBJECTS = $(am_topology_la_OBJECTS)
topology_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
	$(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
	$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(topology_la_LDFLAGS) \
	$(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
	$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo "  CC      " $@;
am__v_CC_1 = 
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = $(libtopology_la_SOURCES) $(topology_la_SOURCES)
DIST_SOURCES = $(libtopology_la_SOURCES) $(topology_la_SOURCES)
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
HEADERS = $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers -I.
noinst_HEADERS = topology_private.h \
	network_private.h \
	lwn_network.h \
	lwn_network_private.h

noinst_LTLIBRARIES = libtopology.la topology.la
libtopology_la_SOURCES = gaia_topology.c \
	gaia_auxtopo.c \
	gaia_auxtopo_table.c \
	gaia_topostmts.c \
	topo_callbacks.c \
	lwn_network.c \
	gaia_network.c \
	gaia_auxnet.c \
	gaia_netstmts.c \
	net_callbacks.c

topology_la_SOURCES = gaia_topology.c \
	gaia_auxtopo.c \
	gaia_auxtopo_table.c \
	gaia_topostmts.c \
	topo_callbacks.c \
	lwn_network.c \
	gaia_network.c \
	gaia_auxnet.c \
	gaia_netstmts.c \
	net_callbacks.c

topology_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers \
	-I. -DLOADABLE_EXTENSION
topology_la_LDFLAGS = -module
topology_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/topology/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/topology/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

clean-noinstLTLIBRARIES:
	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
	@list='$(noinst_LTLIBRARIES)'; \
	locs=`for p in $$list; do echo $$p; done | \
	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
	      sort -u`; \
	test -z "$$locs" || { \
	  echo rm -f $${locs}; \
	  rm -f $${locs}; \
	}

libtopology.la: $(libtopology_la_OBJECTS) $(libtopology_la_DEPENDENCIES) $(EXTRA_libtopology_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(LINK)  $(libtopology_la_OBJECTS) $(libtopology_la_LIBADD) $(LIBS)

topology.la: $(topology_la_OBJECTS) $(topology_la_DEPENDENCIES) $(EXTRA_topology_la_DEPENDENCIES) 
	$(AM_V_CCLD)$(topology_la_LINK)  $(topology_la_OBJECTS) $(topology_la_LIBADD) $(LIBS)

mostlyclean-compile:
	-rm -f *.$(OBJEXT)

distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_auxnet.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_auxtopo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_auxtopo_table.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_netstmts.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_network.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_topology.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gaia_topostmts.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lwn_network.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_callbacks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topo_callbacks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_auxnet.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_auxtopo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_auxtopo_table.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_netstmts.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_network.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_topology.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-gaia_topostmts.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-lwn_network.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-net_callbacks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology_la-topo_callbacks.Plo@am__quote@

.c.o:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<

.c.obj:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`

.c.lo:
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<

topology_la-gaia_topology.lo: gaia_topology.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_topology.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_topology.Tpo -c -o topology_la-gaia_topology.lo `test -f 'gaia_topology.c' || echo '$(srcdir)/'`gaia_topology.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_topology.Tpo $(DEPDIR)/topology_la-gaia_topology.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_topology.c' object='topology_la-gaia_topology.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_topology.lo `test -f 'gaia_topology.c' || echo '$(srcdir)/'`gaia_topology.c

topology_la-gaia_auxtopo.lo: gaia_auxtopo.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_auxtopo.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_auxtopo.Tpo -c -o topology_la-gaia_auxtopo.lo `test -f 'gaia_auxtopo.c' || echo '$(srcdir)/'`gaia_auxtopo.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_auxtopo.Tpo $(DEPDIR)/topology_la-gaia_auxtopo.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_auxtopo.c' object='topology_la-gaia_auxtopo.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_auxtopo.lo `test -f 'gaia_auxtopo.c' || echo '$(srcdir)/'`gaia_auxtopo.c

topology_la-gaia_auxtopo_table.lo: gaia_auxtopo_table.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_auxtopo_table.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_auxtopo_table.Tpo -c -o topology_la-gaia_auxtopo_table.lo `test -f 'gaia_auxtopo_table.c' || echo '$(srcdir)/'`gaia_auxtopo_table.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_auxtopo_table.Tpo $(DEPDIR)/topology_la-gaia_auxtopo_table.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_auxtopo_table.c' object='topology_la-gaia_auxtopo_table.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_auxtopo_table.lo `test -f 'gaia_auxtopo_table.c' || echo '$(srcdir)/'`gaia_auxtopo_table.c

topology_la-gaia_topostmts.lo: gaia_topostmts.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_topostmts.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_topostmts.Tpo -c -o topology_la-gaia_topostmts.lo `test -f 'gaia_topostmts.c' || echo '$(srcdir)/'`gaia_topostmts.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_topostmts.Tpo $(DEPDIR)/topology_la-gaia_topostmts.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_topostmts.c' object='topology_la-gaia_topostmts.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_topostmts.lo `test -f 'gaia_topostmts.c' || echo '$(srcdir)/'`gaia_topostmts.c

topology_la-topo_callbacks.lo: topo_callbacks.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-topo_callbacks.lo -MD -MP -MF $(DEPDIR)/topology_la-topo_callbacks.Tpo -c -o topology_la-topo_callbacks.lo `test -f 'topo_callbacks.c' || echo '$(srcdir)/'`topo_callbacks.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-topo_callbacks.Tpo $(DEPDIR)/topology_la-topo_callbacks.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='topo_callbacks.c' object='topology_la-topo_callbacks.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-topo_callbacks.lo `test -f 'topo_callbacks.c' || echo '$(srcdir)/'`topo_callbacks.c

topology_la-lwn_network.lo: lwn_network.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-lwn_network.lo -MD -MP -MF $(DEPDIR)/topology_la-lwn_network.Tpo -c -o topology_la-lwn_network.lo `test -f 'lwn_network.c' || echo '$(srcdir)/'`lwn_network.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-lwn_network.Tpo $(DEPDIR)/topology_la-lwn_network.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='lwn_network.c' object='topology_la-lwn_network.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-lwn_network.lo `test -f 'lwn_network.c' || echo '$(srcdir)/'`lwn_network.c

topology_la-gaia_network.lo: gaia_network.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_network.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_network.Tpo -c -o topology_la-gaia_network.lo `test -f 'gaia_network.c' || echo '$(srcdir)/'`gaia_network.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_network.Tpo $(DEPDIR)/topology_la-gaia_network.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_network.c' object='topology_la-gaia_network.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_network.lo `test -f 'gaia_network.c' || echo '$(srcdir)/'`gaia_network.c

topology_la-gaia_auxnet.lo: gaia_auxnet.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_auxnet.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_auxnet.Tpo -c -o topology_la-gaia_auxnet.lo `test -f 'gaia_auxnet.c' || echo '$(srcdir)/'`gaia_auxnet.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_auxnet.Tpo $(DEPDIR)/topology_la-gaia_auxnet.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_auxnet.c' object='topology_la-gaia_auxnet.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_auxnet.lo `test -f 'gaia_auxnet.c' || echo '$(srcdir)/'`gaia_auxnet.c

topology_la-gaia_netstmts.lo: gaia_netstmts.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-gaia_netstmts.lo -MD -MP -MF $(DEPDIR)/topology_la-gaia_netstmts.Tpo -c -o topology_la-gaia_netstmts.lo `test -f 'gaia_netstmts.c' || echo '$(srcdir)/'`gaia_netstmts.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-gaia_netstmts.Tpo $(DEPDIR)/topology_la-gaia_netstmts.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='gaia_netstmts.c' object='topology_la-gaia_netstmts.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-gaia_netstmts.lo `test -f 'gaia_netstmts.c' || echo '$(srcdir)/'`gaia_netstmts.c

topology_la-net_callbacks.lo: net_callbacks.c
@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT topology_la-net_callbacks.lo -MD -MP -MF $(DEPDIR)/topology_la-net_callbacks.Tpo -c -o topology_la-net_callbacks.lo `test -f 'net_callbacks.c' || echo '$(srcdir)/'`net_callbacks.c
@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/topology_la-net_callbacks.Tpo $(DEPDIR)/topology_la-net_callbacks.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='net_callbacks.c' object='topology_la-net_callbacks.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(topology_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(topology_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o topology_la-net_callbacks.lo `test -f 'net_callbacks.c' || echo '$(srcdir)/'`net_callbacks.c

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-am

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:
	-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
	mostlyclean-am

distclean: distclean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
	distclean-tags

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -rf ./$(DEPDIR)
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
	clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
	ctags-am distclean distclean-compile distclean-generic \
	distclean-libtool distclean-tags distdir dvi dvi-am html \
	html-am info info-am install install-am install-data \
	install-data-am install-dvi install-dvi-am install-exec \
	install-exec-am install-html install-html-am install-info \
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_auxnet.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
/*

 gaia_auxnet.c -- implementation of the Topology-Network module methods
    
 version 4.3, 2015 August 12

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_network.h>
#include <spatialite/gaia_topology.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>

#include <lwn_network.h>

#include "network_private.h"
#include "topology_private.h"

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

#define GAIA_UNUSED() if (argc || argv) argc = argc;

SPATIALITE_PRIVATE void
free_internal_cache_networks (void *firstNetwork)
{
/* destroying all Networks registered into the Internal Connection Cache */
    struct gaia_network *p_net = (struct gaia_network *) firstNetwork;
    struct gaia_network *p_net_n;

    while (p_net != NULL)
      {
	  p_net_n = p_net->next;
	  gaiaNetworkDestroy ((GaiaNetworkAccessorPtr) p_net);
	  p_net = p_net_n;
      }
}

SPATIALITE_PRIVATE int
do_create_networks (void *sqlite_handle)
{
/* attempting to create the Networks table (if not already existing) */
    const char *sql;
    char *err_msg = NULL;
    int ret;
    sqlite3 *handle = (sqlite3 *) sqlite_handle;

    sql = "CREATE TABLE IF NOT EXISTS networks (\n"
	"\tnetwork_name TEXT NOT NULL PRIMARY KEY,\n"
	"\tspatial INTEGER NOT NULL,\n"
	"\tsrid INTEGER NOT NULL,\n"
	"\thas_z INTEGER NOT NULL,\n"
	"\tallow_coincident INTEGER NOT NULL,\n"
	"\tnext_node_id INTEGER NOT NULL DEFAULT 1,\n"
	"\tnext_link_id INTEGER NOT NULL DEFAULT 1,\n"
	"\tCONSTRAINT net_srid_fk FOREIGN KEY (srid) "
	"REFERENCES spatial_ref_sys (srid))";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE networks - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating Networks triggers */
    sql = "CREATE TRIGGER IF NOT EXISTS network_name_insert\n"
	"BEFORE INSERT ON 'networks'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'insert on networks violates constraint: "
	"network_name value must not contain a single quote')\n"
	"WHERE NEW.network_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'insert on networks violates constraint: "
	"network_name value must not contain a double quote')\n"
	"WHERE NEW.network_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'insert on networks violates constraint: "
	"network_name value must be lower case')\n"
	"WHERE NEW.network_name <> lower(NEW.network_name);\nEND";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER IF NOT EXISTS network_name_update\n"
	"BEFORE UPDATE OF 'network_name' ON 'networks'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'update on networks violates constraint: "
	"network_name value must not contain a single quote')\n"
	"WHERE NEW.network_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'update on networks violates constraint: "
	"network_name value must not contain a double quote')\n"
	"WHERE NEW.network_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'update on networks violates constraint: "
	"network_name value must be lower case')\n"
	"WHERE NEW.network_name <> lower(NEW.network_name);\nEND";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
check_new_network (sqlite3 * handle, const char *network_name)
{
/* testing if some already defined DB object forbids creating the new Network */
    char *sql;
    char *prev;
    char *table;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    const char *value;
    int error = 0;

/* testing if the same Network is already defined */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.networks WHERE "
			   "Lower(network_name) = Lower(%Q)", network_name);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if some table/geom is already defined in geometry_columns */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.geometry_columns WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", network_name);
    sql =
	sqlite3_mprintf
	("%s (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geometry')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_link", network_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geometry')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if some table is already defined */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM sqlite_master WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", network_name);
    sql = sqlite3_mprintf ("%s Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_link", network_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_node_geometry", network_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_link_geometry", network_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

    return 1;
}

NETWORK_PRIVATE LWN_LINE *
gaianet_convert_linestring_to_lwnline (gaiaLinestringPtr ln, int srid,
				       int has_z)
{
/* converting a Linestring into an LWN_LINE */
    int iv;
    LWN_LINE *line = lwn_alloc_line (ln->Points, srid, has_z);
    for (iv = 0; iv < ln->Points; iv++)
      {
	  double x;
	  double y;
	  double z;
	  double m;
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  line->x[iv] = x;
	  line->y[iv] = y;
	  if (has_z)
	      line->z[iv] = z;
      }
    return line;
}

static int
do_create_node (sqlite3 * handle, const char *network_name, int srid, int has_z)
{
/* attempting to create the Network Node table */
    char *sql;
    char *table;
    char *xtable;
    char *trigger;
    char *xtrigger;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_node", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tnode_id INTEGER PRIMARY KEY AUTOINCREMENT)",
			   xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE network-NODE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "next_node_ins" trigger */
    trigger = sqlite3_mprintf ("%s_node_next_ins", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_node", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER INSERT ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE networks SET next_node_id = NEW.node_id + 1 "
			   "WHERE Lower(network_name) = Lower(%Q) AND next_node_id < NEW.node_id + 1;\n"
			   "END", xtrigger, xtable, network_name);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER network-NODE next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "next_node_upd" trigger */
    trigger = sqlite3_mprintf ("%s_node_next_upd", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_node", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TRIGGER \"%s\" AFTER UPDATE OF node_id ON \"%s\"\n"
	 "FOR EACH ROW BEGIN\n"
	 "\tUPDATE networks SET next_node_id = NEW.node_id + 1 "
	 "WHERE Lower(network_name) = Lower(%Q) AND next_node_id < NEW.node_id + 1;\n"
	 "END", xtrigger, xtable, network_name);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER network-NODE next UPDATE - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Node Geometry */
    table = sqlite3_mprintf ("%s_node", network_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'geometry', %d, 'POINT', %Q)", table,
	 srid, has_z ? "XYZ" : "XY");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn network-NODE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Node Geometry */
    table = sqlite3_mprintf ("%s_node", network_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'geometry')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex network-NODE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_link (sqlite3 * handle, const char *network_name, int srid, int has_z)
{
/* attempting to create the Network Link table */
    char *sql;
    char *table;
    char *xtable;
    char *xconstraint1;
    char *xconstraint2;
    char *xnodes;
    char *trigger;
    char *xtrigger;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_link_node_start_fk", network_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_link_node_end_fk", network_name);
    xconstraint2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", network_name);
    xnodes = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tlink_id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tstart_node INTEGER NOT NULL,\n"
			   "\tend_node INTEGER NOT NULL,\n"
			   "\ttimestamp DATETIME,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (start_node) "
			   "REFERENCES \"%s\" (node_id),\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (end_node) "
			   "REFERENCES \"%s\" (node_id))",
			   xtable, xconstraint1, xnodes, xconstraint2, xnodes);
    free (xtable);
    free (xconstraint1);
    free (xconstraint2);
    free (xnodes);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE network-LINK - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "next_link_ins" trigger */
    trigger = sqlite3_mprintf ("%s_link_next_ins", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER INSERT ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE networks SET next_link_id = NEW.link_id + 1 "
			   "WHERE Lower(network_name) = Lower(%Q) AND next_link_id < NEW.link_id + 1;\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE link_id = NEW.link_id;"
			   "END", xtrigger, xtable, network_name, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER network-LINK next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "link_update" trigger */
    trigger = sqlite3_mprintf ("%s_link_update", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER UPDATE ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE link_id = NEW.link_id;"
			   "END", xtrigger, xtable, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER topology-LINK next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "next_link_upd" trigger */
    trigger = sqlite3_mprintf ("%s_link_next_upd", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TRIGGER \"%s\" AFTER UPDATE OF link_id ON \"%s\"\n"
	 "FOR EACH ROW BEGIN\n"
	 "\tUPDATE networks SET next_link_id = NEW.link_id + 1 "
	 "WHERE Lower(network_name) = Lower(%Q) AND next_link_id < NEW.link_id + 1;\n"
	 "END", xtrigger, xtable, network_name);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER network-LINK next UPDATE - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Link Geometry */
    table = sqlite3_mprintf ("%s_link", network_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'geometry', %d, 'LINESTRING', %Q)",
	 table, srid, has_z ? "XYZ" : "XY");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn network-LINK - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Link Geometry */
    table = sqlite3_mprintf ("%s_link", network_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'geometry')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex network-LINK - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "start_node" */
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_start_node", network_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (start_node)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX link-startnode - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "end_node" */
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_end_node", network_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (end_node)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX link-endnode - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "timestamp" */
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_timestamp", network_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (timestamp)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX link-timestamps - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_seeds (sqlite3 * handle, const char *network_name, int srid,
		 int has_z)
{
/* attempting to create the Network Seeds table */
    char *sql;
    char *table;
    char *xtable;
    char *xconstraint;
    char *xlinks;
    char *trigger;
    char *xtrigger;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_seeds", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_seeds_link_fk", network_name);
    xconstraint = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_link", network_name);
    xlinks = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tseed_id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tlink_id INTEGER NOT NULL,\n"
			   "\ttimestamp DATETIME,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (link_id) "
			   "REFERENCES \"%s\" (link_id) ON DELETE CASCADE)",
			   xtable, xconstraint, xlinks);
    free (xtable);
    free (xconstraint);
    free (xlinks);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE network-SEEDS - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "seeds_ins" trigger */
    trigger = sqlite3_mprintf ("%s_seeds_ins", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_seeds", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER INSERT ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE seed_id = NEW.seed_id;"
			   "END", xtrigger, xtable, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER network-SEEDS next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "seeds_update" trigger */
    trigger = sqlite3_mprintf ("%s_seeds_update", network_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_seeds", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER UPDATE ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE seed_id = NEW.seed_id;"
			   "END", xtrigger, xtable, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER network-SEED next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Seeds Geometry */
    table = sqlite3_mprintf ("%s_seeds", network_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'geometry', %d, 'POINT', %Q, 1)",
	 table, srid, has_z ? "XYZ" : "XY");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn network-SEEDS - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Seeds Geometry */
    table = sqlite3_mprintf ("%s_seeds", network_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'geometry')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex network-SEEDS - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "link_id" */
    table = sqlite3_mprintf ("%s_seeds", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_link", network_name);
    xconstraint = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (link_id)",
			 xconstraint, xtable);
    free (xtable);
    free (xconstraint);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX seeds-link - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "timestamp" */
    table = sqlite3_mprintf ("%s_seeds", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_seeds_timestamp", network_name);
    xconstraint = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (timestamp)",
			 xconstraint, xtable);
    free (xtable);
    free (xconstraint);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX seeds-timestamps - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

GAIANET_DECLARE int
gaiaNetworkCreate (sqlite3 * handle, const char *network_name, int spatial,
		   int srid, int has_z, int allow_coincident)
{
/* attempting to create a new Network */
    int ret;
    char *sql;

/* creating the Networks table (just in case) */
    if (!do_create_networks (handle))
	return 0;

/* testing for forbidding objects */
    if (!check_new_network (handle, network_name))
	return 0;

/* creating the Network own Tables */
    if (!do_create_node (handle, network_name, srid, has_z))
	goto error;
    if (!do_create_link (handle, network_name, srid, has_z))
	goto error;
    if (!do_create_seeds (handle, network_name, srid, has_z))
	goto error;

/* registering the Network */
    sql = sqlite3_mprintf ("INSERT INTO MAIN.networks (network_name, "
			   "spatial, srid, has_z, allow_coincident) VALUES (Lower(%Q), %d, %d, %d, %d)",
			   network_name, spatial, srid, has_z,
			   allow_coincident);
    ret = sqlite3_exec (handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;

    return 1;

  error:
    return 0;
}

static int
check_existing_network (sqlite3 * handle, const char *network_name,
			int full_check)
{
/* testing if a Network is already defined */
    char *sql;
    char *prev;
    char *table;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    const char *value;
    int error = 0;

/* testing if the Network is already defined */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.networks WHERE "
			   "Lower(network_name) = Lower(%Q)", network_name);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 1)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;
    if (!full_check)
	return 1;

/* testing if all table/geom are correctly defined in geometry_columns */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.geometry_columns WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", network_name);
    sql =
	sqlite3_mprintf
	("%s (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geometry')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_link", network_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geometry')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 2)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if all tables are already defined */
    sql =
	sqlite3_mprintf
	("SELECT Count(*) FROM sqlite_master WHERE type = 'table' AND (");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", network_name);
    sql = sqlite3_mprintf ("%s Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_link", network_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_node_geometry", network_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_link_geometry", network_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q))", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 4)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

    return 1;
}

static int
do_drop_network_table (sqlite3 * handle, const char *network_name,
		       const char *which)
{
/* attempting to drop some Network table */
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    int ret;

/* disabling the corresponding Spatial Index */
    table = sqlite3_mprintf ("%s_%s", network_name, which);
    sql = sqlite3_mprintf ("SELECT DisableSpatialIndex(%Q, 'geometry')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("DisableSpatialIndex network-%s - error: %s\n", which, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* discarding the Geometry column */
    table = sqlite3_mprintf ("%s_%s", network_name, which);
    sql =
	sqlite3_mprintf ("SELECT DiscardGeometryColumn(%Q, 'geometry')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("DisableGeometryColumn network-%s - error: %s\n", which,
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* dropping the main table */
    table = sqlite3_mprintf ("%s_%s", network_name, which);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("DROP network-%s - error: %s\n", which, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* dropping the corresponding Spatial Index */
    table = sqlite3_mprintf ("idx_%s_%s_geometry", network_name, which);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\"", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("DROP SpatialIndex network-%s - error: %s\n", which, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_get_network (sqlite3 * handle, const char *net_name, char **network_name,
		int *spatial, int *srid, int *has_z, int *allow_coincident)
{
/* retrieving a Network configuration */
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int ok = 0;
    char *xnetwork_name = NULL;
    int xsrid;
    int xhas_z;
    int xspatial;
    int xallow_coincident;

/* preparing the SQL query */
    sql =
	sqlite3_mprintf
	("SELECT network_name, spatial, srid, has_z, allow_coincident "
	 "FROM MAIN.networks WHERE Lower(network_name) = Lower(%Q)", net_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM networks error: \"%s\"\n",
			sqlite3_errmsg (handle));
	  return 0;
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_name = 0;
		int ok_srid = 0;
		int ok_z = 0;
		int ok_spatial = 0;
		int ok_allow_coincident = 0;
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *str =
			  (const char *) sqlite3_column_text (stmt, 0);
		      if (xnetwork_name != NULL)
			  free (xnetwork_name);
		      xnetwork_name = malloc (strlen (str) + 1);
		      strcpy (xnetwork_name, str);
		      ok_name = 1;
		  }
		if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
		  {
		      xspatial = sqlite3_column_int (stmt, 1);
		      ok_spatial = 1;
		  }
		if (sqlite3_column_type (stmt, 2) == SQLITE_INTEGER)
		  {
		      xsrid = sqlite3_column_int (stmt, 2);
		      ok_srid = 1;
		  }
		if (sqlite3_column_type (stmt, 3) == SQLITE_INTEGER)
		  {
		      xhas_z = sqlite3_column_int (stmt, 3);
		      ok_z = 1;
		  }
		if (sqlite3_column_type (stmt, 4) == SQLITE_INTEGER)
		  {
		      xallow_coincident = sqlite3_column_int (stmt, 4);
		      ok_allow_coincident = 1;
		  }
		if (ok_name && ok_spatial && ok_srid && ok_z
		    && ok_allow_coincident)
		  {
		      ok = 1;
		      break;
		  }
	    }
	  else
	    {
		spatialite_e
		    ("step: SELECT FROM networks error: \"%s\"\n",
		     sqlite3_errmsg (handle));
		sqlite3_finalize (stmt);
		return 0;
	    }
      }
    sqlite3_finalize (stmt);

    if (ok)
      {
	  *network_name = xnetwork_name;
	  *srid = xsrid;
	  *has_z = xhas_z;
	  *spatial = xspatial;
	  *allow_coincident = xallow_coincident;
	  return 1;
      }

    if (xnetwork_name != NULL)
	free (xnetwork_name);
    return 0;
}

GAIANET_DECLARE GaiaNetworkAccessorPtr
gaiaGetNetwork (sqlite3 * handle, const void *cache, const char *network_name)
{
/* attempting to get a reference to some Network Accessor Object */
    GaiaNetworkAccessorPtr accessor;

/* attempting to retrieve an alredy cached definition */
    accessor = gaiaNetworkFromCache (cache, network_name);
    if (accessor != NULL)
	return accessor;

/* attempting to create a new Network Accessor */
    accessor = gaiaNetworkFromDBMS (handle, cache, network_name);
    return accessor;
}

GAIANET_DECLARE GaiaNetworkAccessorPtr
gaiaNetworkFromCache (const void *p_cache, const char *network_name)
{
/* attempting to retrieve an already defined Network Accessor Object from the Connection Cache */
    struct gaia_network *ptr;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == 0)
	return NULL;

    ptr = (struct gaia_network *) (cache->firstNetwork);
    while (ptr != NULL)
      {
	  /* checking for an already registered Network */
	  if (strcasecmp (network_name, ptr->network_name) == 0)
	      return (GaiaNetworkAccessorPtr) ptr;
	  ptr = ptr->next;
      }
    return NULL;
}

GAIANET_DECLARE int
gaiaReadNetworkFromDBMS (sqlite3 *
			 handle,
			 const char
			 *net_name, char **network_name, int *spatial,
			 int *srid, int *has_z, int *allow_coincident)
{
/* testing for existing DBMS objects */
    if (!check_existing_network (handle, net_name, 1))
	return 0;

/* retrieving the Network configuration */
    if (!do_get_network
	(handle, net_name, network_name, spatial, srid, has_z,
	 allow_coincident))
	return 0;
    return 1;
}

GAIANET_DECLARE GaiaNetworkAccessorPtr
gaiaNetworkFromDBMS (sqlite3 * handle, const void *p_cache,
		     const char *network_name)
{
/* attempting to create a Network Accessor Object into the Connection Cache */
    const RTCTX *ctx = NULL;
    LWN_BE_CALLBACKS *callbacks;
    struct gaia_network *ptr;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == 0)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

/* allocating and initializing the opaque object */
    ptr = malloc (sizeof (struct gaia_network));
    ptr->db_handle = handle;
    ptr->cache = cache;
    ptr->network_name = NULL;
    ptr->srid = -1;
    ptr->has_z = 0;
    ptr->spatial = 0;
    ptr->allow_coincident = 0;
    ptr->last_error_message = NULL;
    ptr->lwn_iface = lwn_CreateBackendIface (ctx, (const LWN_BE_DATA *) ptr);
    ptr->prev = cache->lastNetwork;
    ptr->next = NULL;

    callbacks = malloc (sizeof (LWN_BE_CALLBACKS));
    callbacks->netGetSRID = netcallback_netGetSRID;
    callbacks->netHasZ = netcallback_netHasZ;
    callbacks->netIsSpatial = netcallback_netIsSpatial;
    callbacks->netAllowCoincident = netcallback_netAllowCoincident;
    callbacks->netGetGEOS = netcallback_netGetGEOS;
    callbacks->createNetwork = NULL;
    callbacks->loadNetworkByName = netcallback_loadNetworkByName;
    callbacks->freeNetwork = netcallback_freeNetwork;
    callbacks->getNetNodeWithinDistance2D =
	netcallback_getNetNodeWithinDistance2D;
    callbacks->getLinkWithinDistance2D = netcallback_getLinkWithinDistance2D;
    callbacks->insertNetNodes = netcallback_insertNetNodes;
    callbacks->getNetNodeById = netcallback_getNetNodeById;
    callbacks->updateNetNodesById = netcallback_updateNetNodesById;
    callbacks->deleteNetNodesById = netcallback_deleteNetNodesById;
    callbacks->getLinkByNetNode = netcallback_getLinkByNetNode;
    callbacks->getNextLinkId = netcallback_getNextLinkId;
    callbacks->getNetNodeWithinBox2D = netcallback_getNetNodeWithinBox2D;
    callbacks->getNextLinkId = netcallback_getNextLinkId;
    callbacks->insertLinks = netcallback_insertLinks;
    callbacks->updateLinksById = netcallback_updateLinksById;
    callbacks->getLinkById = netcallback_getLinkById;
    callbacks->deleteLinksById = netcallback_deleteLinksById;
    ptr->callbacks = callbacks;

    lwn_BackendIfaceRegisterCallbacks (ptr->lwn_iface, callbacks);
    ptr->lwn_network = lwn_LoadNetwork (ptr->lwn_iface, network_name);

    ptr->stmt_getNetNodeWithinDistance2D = NULL;
    ptr->stmt_getLinkWithinDistance2D = NULL;
    ptr->stmt_insertNetNodes = NULL;
    ptr->stmt_deleteNetNodesById = NULL;
    ptr->stmt_getNetNodeWithinBox2D = NULL;
    ptr->stmt_getNextLinkId = NULL;
    ptr->stmt_setNextLinkId = NULL;
    ptr->stmt_insertLinks = NULL;
    ptr->stmt_deleteLinksById = NULL;
    if (ptr->lwn_network == NULL)
	goto invalid;

/* creating the SQL prepared statements */
    create_toponet_prepared_stmts ((GaiaNetworkAccessorPtr) ptr);
    return (GaiaNetworkAccessorPtr) ptr;

  invalid:
    gaiaNetworkDestroy ((GaiaNetworkAccessorPtr) ptr);
    return NULL;
}

GAIANET_DECLARE void
gaiaNetworkDestroy (GaiaNetworkAccessorPtr net_ptr)
{
/* destroying a Network Accessor Object */
    struct gaia_network *prev;
    struct gaia_network *next;
    struct splite_internal_cache *cache;
    struct gaia_network *ptr = (struct gaia_network *) net_ptr;
    if (ptr == NULL)
	return;

    prev = ptr->prev;
    next = ptr->next;
    cache = (struct splite_internal_cache *) (ptr->cache);
    if (ptr->lwn_network != NULL)
	lwn_FreeNetwork ((LWN_NETWORK *) (ptr->lwn_network));
    if (ptr->lwn_iface != NULL)
	lwn_FreeBackendIface ((LWN_BE_IFACE *) (ptr->lwn_iface));
    if (ptr->callbacks != NULL)
	free (ptr->callbacks);
    if (ptr->network_name != NULL)
	free (ptr->network_name);
    if (ptr->last_error_message != NULL)
	free (ptr->last_error_message);

    finalize_toponet_prepared_stmts (net_ptr);
    free (ptr);

/* unregistering from the Internal Cache double linked list */
    if (prev != NULL)
	prev->next = next;
    if (next != NULL)
	next->prev = prev;
    if (cache->firstNetwork == ptr)
	cache->firstNetwork = next;
    if (cache->lastNetwork == ptr)
	cache->lastNetwork = prev;
}

NETWORK_PRIVATE void
finalize_toponet_prepared_stmts (GaiaNetworkAccessorPtr accessor)
{
/* finalizing the SQL prepared statements */
    struct gaia_network *ptr = (struct gaia_network *) accessor;
    if (ptr->stmt_getNetNodeWithinDistance2D != NULL)
	sqlite3_finalize (ptr->stmt_getNetNodeWithinDistance2D);
    if (ptr->stmt_getLinkWithinDistance2D != NULL)
	sqlite3_finalize (ptr->stmt_getLinkWithinDistance2D);
    if (ptr->stmt_insertNetNodes != NULL)
	sqlite3_finalize (ptr->stmt_insertNetNodes);
    if (ptr->stmt_deleteNetNodesById != NULL)
	sqlite3_finalize (ptr->stmt_deleteNetNodesById);
    if (ptr->stmt_getNetNodeWithinBox2D != NULL)
	sqlite3_finalize (ptr->stmt_getNetNodeWithinBox2D);
    if (ptr->stmt_getNextLinkId != NULL)
	sqlite3_finalize (ptr->stmt_getNextLinkId);
    if (ptr->stmt_setNextLinkId != NULL)
	sqlite3_finalize (ptr->stmt_setNextLinkId);
    if (ptr->stmt_insertLinks != NULL)
	sqlite3_finalize (ptr->stmt_insertLinks);
    if (ptr->stmt_deleteLinksById != NULL)
	sqlite3_finalize (ptr->stmt_deleteLinksById);
    ptr->stmt_getNetNodeWithinDistance2D = NULL;
    ptr->stmt_getLinkWithinDistance2D = NULL;
    ptr->stmt_insertNetNodes = NULL;
    ptr->stmt_deleteNetNodesById = NULL;
    ptr->stmt_getNetNodeWithinBox2D = NULL;
    ptr->stmt_getNextLinkId = NULL;
    ptr->stmt_setNextLinkId = NULL;
    ptr->stmt_insertLinks = NULL;
    ptr->stmt_deleteLinksById = NULL;
}

NETWORK_PRIVATE void
create_toponet_prepared_stmts (GaiaNetworkAccessorPtr accessor)
{
/* creating the SQL prepared statements */
    struct gaia_network *ptr = (struct gaia_network *) accessor;
    finalize_toponet_prepared_stmts (accessor);
    ptr->stmt_getNetNodeWithinDistance2D =
	do_create_stmt_getNetNodeWithinDistance2D (accessor);
    ptr->stmt_getLinkWithinDistance2D =
	do_create_stmt_getLinkWithinDistance2D (accessor);
    ptr->stmt_deleteNetNodesById = do_create_stmt_deleteNetNodesById (accessor);
    ptr->stmt_insertNetNodes = do_create_stmt_insertNetNodes (accessor);
    ptr->stmt_getNetNodeWithinBox2D =
	do_create_stmt_getNetNodeWithinBox2D (accessor);
    ptr->stmt_getNextLinkId = do_create_stmt_getNextLinkId (accessor);
    ptr->stmt_setNextLinkId = do_create_stmt_setNextLinkId (accessor);
    ptr->stmt_insertLinks = do_create_stmt_insertLinks (accessor);
    ptr->stmt_deleteLinksById = do_create_stmt_deleteLinksById (accessor);
}

NETWORK_PRIVATE void
gaianet_reset_last_error_msg (GaiaNetworkAccessorPtr accessor)
{
/* resets the last Network error message */
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net == NULL)
	return;

    if (net->last_error_message != NULL)
	free (net->last_error_message);
    net->last_error_message = NULL;
}

NETWORK_PRIVATE void
gaianet_set_last_error_msg (GaiaNetworkAccessorPtr accessor, const char *msg)
{
/* sets the last Network error message */
    int len;
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (msg == NULL)
	msg = "no message available";

    spatialite_e ("%s\n", msg);
    if (net == NULL)
	return;

    if (net->last_error_message != NULL)
	return;

    len = strlen (msg);
    net->last_error_message = malloc (len + 1);
    strcpy (net->last_error_message, msg);
}

NETWORK_PRIVATE const char *
gaianet_get_last_exception (GaiaNetworkAccessorPtr accessor)
{
/* returns the last Network error message */
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net == NULL)
	return NULL;

    return net->last_error_message;
}

GAIANET_DECLARE int
gaiaNetworkDrop (sqlite3 * handle, const char *network_name)
{
/* attempting to drop an already existing Network */
    int ret;
    char *sql;

/* creating the Networks table (just in case) */
    if (!do_create_networks (handle))
	return 0;

/* testing for existing DBMS objects */
    if (!check_existing_network (handle, network_name, 0))
	return 0;

/* dropping the Network own Tables */
    if (!do_drop_network_table (handle, network_name, "seeds"))
	goto error;
    if (!do_drop_network_table (handle, network_name, "link"))
	goto error;
    if (!do_drop_network_table (handle, network_name, "node"))
	goto error;

/* unregistering the Network */
    sql =
	sqlite3_mprintf
	("DELETE FROM MAIN.networks WHERE Lower(network_name) = Lower(%Q)",
	 network_name);
    ret = sqlite3_exec (handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;

    return 1;

  error:
    return 0;
}

GAIANET_DECLARE sqlite3_int64
gaiaAddIsoNetNode (GaiaNetworkAccessorPtr accessor, gaiaPointPtr pt)
{
/* LWN wrapper - AddIsoNetNode */
    sqlite3_int64 ret;
    LWN_POINT *point = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (pt != NULL)
      {
	  if (pt->DimensionModel == GAIA_XY_Z
	      || pt->DimensionModel == GAIA_XY_Z_M)
	      point = lwn_create_point3d (network->srid, pt->X, pt->Y, pt->Z);
	  else
	      point = lwn_create_point2d (network->srid, pt->X, pt->Y);
      }
    lwn_ResetErrorMsg (network->lwn_iface);
    ret = lwn_AddIsoNetNode ((LWN_NETWORK *) (network->lwn_network), point);
    lwn_free_point (point);

    return ret;
}

GAIANET_DECLARE int
gaiaMoveIsoNetNode (GaiaNetworkAccessorPtr accessor,
		    sqlite3_int64 node, gaiaPointPtr pt)
{
/* LWN wrapper - MoveIsoNetNode */
    int ret;
    LWN_POINT *point = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (pt != NULL)
      {
	  if (pt->DimensionModel == GAIA_XY_Z
	      || pt->DimensionModel == GAIA_XY_Z_M)
	      point = lwn_create_point3d (network->srid, pt->X, pt->Y, pt->Z);
	  else
	      point = lwn_create_point2d (network->srid, pt->X, pt->Y);
      }
    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_MoveIsoNetNode ((LWN_NETWORK *) (network->lwn_network), node,
			    point);
    lwn_free_point (point);

    if (ret == 0)
	return 1;
    return 0;
}

GAIANET_DECLARE int
gaiaRemIsoNetNode (GaiaNetworkAccessorPtr accessor, sqlite3_int64 node)
{
/* LWN wrapper - RemIsoNetNode */
    int ret;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    lwn_ResetErrorMsg (network->lwn_iface);
    ret = lwn_RemIsoNetNode ((LWN_NETWORK *) (network->lwn_network), node);

    if (ret == 0)
	return 1;
    return 0;
}

GAIANET_DECLARE sqlite3_int64
gaiaAddLink (GaiaNetworkAccessorPtr accessor,
	     sqlite3_int64 start_node, sqlite3_int64 end_node,
	     gaiaLinestringPtr ln)
{
/* LWN wrapper - AddLink */
    sqlite3_int64 ret;
    LWN_LINE *lwn_line = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (ln != NULL)
      {
	  lwn_line =
	      gaianet_convert_linestring_to_lwnline (ln, network->srid,
						     network->has_z);
      }

    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_AddLink ((LWN_NETWORK *) (network->lwn_network), start_node,
		     end_node, lwn_line);

    lwn_free_line (lwn_line);
    return ret;
}

GAIANET_DECLARE int
gaiaChangeLinkGeom (GaiaNetworkAccessorPtr accessor,
		    sqlite3_int64 link_id, gaiaLinestringPtr ln)
{
/* LWN wrapper - ChangeLinkGeom */
    int ret;
    LWN_LINE *lwn_line = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (ln != NULL)
      {
	  lwn_line =
	      gaianet_convert_linestring_to_lwnline (ln, network->srid,
						     network->has_z);
      }

    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_ChangeLinkGeom ((LWN_NETWORK *) (network->lwn_network), link_id,
			    lwn_line);
    lwn_free_line (lwn_line);

    if (ret == 0)
	return 1;
    return 0;
}

GAIANET_DECLARE int
gaiaRemoveLink (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link)
{
/* LWN wrapper - RemoveLink */
    int ret;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    lwn_ResetErrorMsg (network->lwn_iface);
    ret = lwn_RemoveLink ((LWN_NETWORK *) (network->lwn_network), link);

    if (ret == 0)
	return 1;
    return 0;
}

GAIANET_DECLARE sqlite3_int64
gaiaNewLogLinkSplit (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link)
{
/* LWN wrapper - NewLogLinkSplit  */
    sqlite3_int64 ret;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    lwn_ResetErrorMsg (network->lwn_iface);
    ret = lwn_NewLogLinkSplit ((LWN_NETWORK *) (network->lwn_network), link);
    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaModLogLinkSplit (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link)
{
/* LWN wrapper - ModLogLinkSplit  */
    sqlite3_int64 ret;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    lwn_ResetErrorMsg (network->lwn_iface);
    ret = lwn_ModLogLinkSplit ((LWN_NETWORK *) (network->lwn_network), link);
    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaNewGeoLinkSplit (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link,
		     gaiaPointPtr pt)
{
/* LWN wrapper - NewGeoLinkSplit  */
    sqlite3_int64 ret;
    LWN_POINT *point = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (pt != NULL)
      {
	  if (pt->DimensionModel == GAIA_XY_Z
	      || pt->DimensionModel == GAIA_XY_Z_M)
	      point = lwn_create_point3d (network->srid, pt->X, pt->Y, pt->Z);
	  else
	      point = lwn_create_point2d (network->srid, pt->X, pt->Y);
      }
    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_NewGeoLinkSplit ((LWN_NETWORK *) (network->lwn_network), link,
			     point);
    lwn_free_point (point);
    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaModGeoLinkSplit (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link,
		     gaiaPointPtr pt)
{
/* LWN wrapper - ModGeoLinkSplit  */
    sqlite3_int64 ret;
    LWN_POINT *point = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (pt != NULL)
      {
	  if (pt->DimensionModel == GAIA_XY_Z
	      || pt->DimensionModel == GAIA_XY_Z_M)
	      point = lwn_create_point3d (network->srid, pt->X, pt->Y, pt->Z);
	  else
	      point = lwn_create_point2d (network->srid, pt->X, pt->Y);
      }
    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_ModGeoLinkSplit ((LWN_NETWORK *) (network->lwn_network), link,
			     point);
    lwn_free_point (point);
    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaNewLinkHeal (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link,
		 sqlite3_int64 anotherlink)
{
/* LWN wrapper - NewLinkHeal  */
    sqlite3_int64 ret;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_NewLinkHeal ((LWN_NETWORK *) (network->lwn_network), link,
			 anotherlink);

    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaModLinkHeal (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link,
		 sqlite3_int64 anotherlink)
{
/* LWN wrapper - ModLinkHeal  */
    sqlite3_int64 ret;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    lwn_ResetErrorMsg (network->lwn_iface);
    ret =
	lwn_ModLinkHeal ((LWN_NETWORK *) (network->lwn_network), link,
			 anotherlink);

    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaGetNetNodeByPoint (GaiaNetworkAccessorPtr accessor, gaiaPointPtr pt,
		       double tolerance)
{
/* LWN wrapper - GetNetNodeByPoint */
    sqlite3_int64 ret;
    LWN_POINT *point = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (pt != NULL)
      {
	  if (pt->DimensionModel == GAIA_XY_Z
	      || pt->DimensionModel == GAIA_XY_Z_M)
	      point = lwn_create_point3d (network->srid, pt->X, pt->Y, pt->Z);
	  else
	      point = lwn_create_point2d (network->srid, pt->X, pt->Y);
      }
    lwn_ResetErrorMsg (network->lwn_iface);

    ret =
	lwn_GetNetNodeByPoint ((LWN_NETWORK *) (network->lwn_network), point,
			       tolerance);

    lwn_free_point (point);
    return ret;
}

GAIANET_DECLARE sqlite3_int64
gaiaGetLinkByPoint (GaiaNetworkAccessorPtr accessor, gaiaPointPtr pt,
		    double tolerance)
{
/* LWN wrapper - GetLinkByPoint */
    sqlite3_int64 ret;
    LWN_POINT *point = NULL;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    if (pt != NULL)
      {
	  if (pt->DimensionModel == GAIA_XY_Z
	      || pt->DimensionModel == GAIA_XY_Z_M)
	      point = lwn_create_point3d (network->srid, pt->X, pt->Y, pt->Z);
	  else
	      point = lwn_create_point2d (network->srid, pt->X, pt->Y);
      }
    lwn_ResetErrorMsg (network->lwn_iface);

    ret =
	lwn_GetLinkByPoint ((LWN_NETWORK *) (network->lwn_network), point,
			    tolerance);

    lwn_free_point (point);
    return ret;
}

static int
do_check_create_valid_logicalnet_table (GaiaNetworkAccessorPtr accessor)
{
/* attemtping to create or validate the target table */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    char *errMsg = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

/* finalizing all prepared Statements */
    finalize_all_topo_prepared_stmts (net->cache);

/* attempting to drop the table (just in case if it already exists) */
    table = sqlite3_mprintf ("%s_valid_logicalnet", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS TEMP.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    create_all_topo_prepared_stmts (net->cache);	/* recreating prepared stsms */
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidLogicalNet exception: %s", errMsg);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }

/* attempting to create the table */
    table = sqlite3_mprintf ("%s_valid_logicalnet", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TEMP TABLE \"%s\" (\n\terror TEXT,\n"
	 "\tprimitive1 INTEGER,\n\tprimitive2 INTEGER)", xtable);
    free (xtable);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidLogicalNet exception: %s", errMsg);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    return 1;
}

static int
do_loginet_check_nodes (GaiaNetworkAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for nodes with geometry */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT node_id FROM MAIN.\"%s\" WHERE geometry IS NOT NULL", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidLogicalNet() - Nodes error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 0);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "node has geometry", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, node_id);
		sqlite3_bind_null (stmt, 3);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidLogicalNet() insert error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidLogicalNet() - Nodes step error: %s",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_loginet_check_links (GaiaNetworkAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for links with geometry */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT link_id FROM MAIN.\"%s\" WHERE geometry IS NOT NULL", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidLogicalNet() - Links error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt_in, 0);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "link has geometry", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, link_id);
		sqlite3_bind_null (stmt, 3);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidLogicalNet() insert error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidLogicalNet() - Links step error: %s",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

GAIANET_DECLARE int
gaiaValidLogicalNet (GaiaNetworkAccessorPtr accessor)
{
/* generating a validity report for a given Logical Network */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net == NULL)
	return 0;

    if (!do_check_create_valid_logicalnet_table (accessor))
	return 0;

    table = sqlite3_mprintf ("%s_valid_logicalnet", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO TEMP.\"%s\" (error, primitive1, primitive2) VALUES (?, ?, ?)",
	 xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_ValidLogicalNet error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    if (!do_loginet_check_nodes (accessor, stmt))
	goto error;

    if (!do_loginet_check_links (accessor, stmt))
	goto error;

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
do_check_create_valid_spatialnet_table (GaiaNetworkAccessorPtr accessor)
{
/* attemtping to create or validate the target table */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    char *errMsg;
    struct gaia_network *net = (struct gaia_network *) accessor;

/* attempting to drop the table (just in case if it already exists) */
    table = sqlite3_mprintf ("%s_valid_spatialnet", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS temp.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidSpatialNet exception: %s", errMsg);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }

/* attempting to create the table */
    table = sqlite3_mprintf ("%s_valid_spatialnet", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TEMP TABLE \"%s\" (\n\terror TEXT,\n"
	 "\tprimitive1 INTEGER,\n\tprimitive2 INTEGER)", xtable);
    free (xtable);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidSpatialNet exception: %s", errMsg);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    return 1;
}

static int
do_spatnet_check_nodes (GaiaNetworkAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for nodes without geometry */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT node_id FROM MAIN.\"%s\" WHERE geometry IS NULL", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidSpatialNet() - Nodes error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 0);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "missing node geometry", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, node_id);
		sqlite3_bind_null (stmt, 3);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidSpatialNet() insert error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidSpatialNet() - Nodes step error: %s",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_spatnet_check_links (GaiaNetworkAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for links without geometry */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT link_id FROM MAIN.\"%s\" WHERE geometry IS NULL", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidSpatialNet() - Links error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt_in, 0);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "missing link geometry", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, link_id);
		sqlite3_bind_null (stmt, 3);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidSpatialNet() insert error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidSpatialNet() - Links step error: %s",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_spatnet_check_start_nodes (GaiaNetworkAccessorPtr accessor,
			      sqlite3_stmt * stmt)
{
/* checking for links mismatching start nodes */
    char *sql;
    char *table;
    char *xtable1;
    char *xtable2;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT l.link_id, l.start_node FROM MAIN.\"%s\" AS l "
			 "JOIN MAIN.\"%s\" AS n ON (l.start_node = n.node_id) "
			 "WHERE ST_Disjoint(ST_StartPoint(l.geometry), n.geometry) = 1",
			 xtable1, xtable2);
    free (xtable1);
    free (xtable2);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidSpatialNet() - StartNodes error: \"%s\"",
	       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "geometry start mismatch", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, link_id);
		sqlite3_bind_int64 (stmt, 3, node_id);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidSpatialNet() insert error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidSpatialNet() - StartNodes step error: %s",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_spatnet_check_end_nodes (GaiaNetworkAccessorPtr accessor,
			    sqlite3_stmt * stmt)
{
/* checking for links mismatching end nodes */
    char *sql;
    char *table;
    char *xtable1;
    char *xtable2;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT l.link_id, l.end_node FROM MAIN.\"%s\" AS l "
			   "JOIN MAIN.\"%s\" AS n ON (l.end_node = n.node_id) "
			   "WHERE ST_Disjoint(ST_EndPoint(l.geometry), n.geometry) = 1",
			   xtable1, xtable2);
    free (xtable1);
    free (xtable2);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidSpatialNet() - EndNodes error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "geometry end mismatch", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, link_id);
		sqlite3_bind_int64 (stmt, 3, node_id);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidSpatialNet() insert error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidSpatialNet() - EndNodes step error: %s",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

GAIANET_DECLARE int
gaiaValidSpatialNet (GaiaNetworkAccessorPtr accessor)
{
/* generating a validity report for a given Spatial Network */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net == NULL)
	return 0;

    if (!do_check_create_valid_spatialnet_table (accessor))
	return 0;

    table = sqlite3_mprintf ("%s_valid_spatialnet", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO TEMP.\"%s\" (error, primitive1, primitive2) VALUES (?, ?, ?)",
	 xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_ValidSpatialNet error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    if (!do_spatnet_check_nodes (accessor, stmt))
	goto error;

    if (!do_spatnet_check_links (accessor, stmt))
	goto error;

    if (!do_spatnet_check_start_nodes (accessor, stmt))
	goto error;

    if (!do_spatnet_check_end_nodes (accessor, stmt))
	goto error;

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

NETWORK_PRIVATE int
auxnet_insert_into_network (GaiaNetworkAccessorPtr accessor,
			    gaiaGeomCollPtr geom)
{
/* processing all individual geometry items */
    sqlite3_int64 ret;
    gaiaLinestringPtr ln;
    gaiaPoint pt;
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network == NULL)
	return 0;

    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  /* looping on Linestrings items */
	  int last = ln->Points - 1;
	  double x;
	  double y;
	  double z = 0.0;
	  double m = 0.0;
	  sqlite3_int64 start_node;
	  sqlite3_int64 end_node;
	  LWN_LINE *lwn_line;
	  lwn_ResetErrorMsg (network->lwn_iface);

	  /* attempting to retrieve or insert the Start Node */
	  if (geom->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, 0, &x, &y, &z);
	    }
	  else if (geom->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, 0, &x, &y, &z, &m);
	    }
	  else if (geom->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, 0, &x, &y, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, 0, &x, &y);
	    }
	  if (network->has_z)
	    {
		pt.DimensionModel = GAIA_XY_Z;
		pt.X = x;
		pt.Y = y;
		pt.Z = z;
	    }
	  else
	    {
		pt.DimensionModel = GAIA_XY;
		pt.X = x;
		pt.Y = y;
	    }
	  start_node = gaiaGetNetNodeByPoint (accessor, &pt, 0.0);
	  if (start_node < 0)
	      start_node = gaiaAddIsoNetNode (accessor, &pt);
	  if (start_node < 0)
	    {
		const char *msg = lwn_GetErrorMsg (network->lwn_iface);
		gaianet_set_last_error_msg (accessor, msg);
		goto error;
	    }

	  /* attempting to retrieve or insert the End Node */
	  if (geom->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, last, &x, &y, &z);
	    }
	  else if (geom->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, last, &x, &y, &z, &m);
	    }
	  else if (geom->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, last, &x, &y, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, last, &x, &y);
	    }
	  if (network->has_z)
	    {
		pt.DimensionModel = GAIA_XY_Z;
		pt.X = x;
		pt.Y = y;
		pt.Z = z;
	    }
	  else
	    {
		pt.DimensionModel = GAIA_XY;
		pt.X = x;
		pt.Y = y;
	    }
	  end_node = gaiaGetNetNodeByPoint (accessor, &pt, 0.0);
	  if (end_node < 0)
	      end_node = gaiaAddIsoNetNode (accessor, &pt);
	  if (end_node < 0)
	    {
		const char *msg = lwn_GetErrorMsg (network->lwn_iface);
		gaianet_set_last_error_msg (accessor, msg);
		goto error;
	    }

	  lwn_line = gaianet_convert_linestring_to_lwnline (ln, network->srid,
							    network->has_z);
	  ret =
	      lwn_AddLink ((LWN_NETWORK *) (network->lwn_network), start_node,
			   end_node, lwn_line);
	  lwn_free_line (lwn_line);
	  if (ret <= 0)
	    {
		const char *msg = lwn_GetErrorMsg (network->lwn_iface);
		gaianet_set_last_error_msg (accessor, msg);
		goto error;
	    }

	  ln = ln->Next;
      }

    return 1;

  error:
    return 0;
}

GAIANET_DECLARE int
gaiaTopoNet_FromGeoTable (GaiaNetworkAccessorPtr accessor,
			  const char *db_prefix, const char *table,
			  const char *column)
{
/* attempting to import a whole GeoTable into a Topoology-Network */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;

    if (net == NULL)
	return 0;
    if (net->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (net->cache);
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }

/* building the SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xcolumn = gaiaDoubleQuotedSql (column);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\"", xcolumn,
			 xprefix, xtable);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_FromGeoTable error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_NULL)
		    continue;
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int blob_sz = sqlite3_column_bytes (stmt, 0);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz, gpkg_mode,
						       gpkg_amphibious);
		      if (geom != NULL)
			{
			    if (!auxnet_insert_into_network (accessor, geom))
			      {
				  gaiaFreeGeomColl (geom);
				  goto error;
			      }
			    gaiaFreeGeomColl (geom);
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("TopoNet_FromGeoTable error: Invalid Geometry");
			    gaianet_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoNet_FromGeoTable error: not a BLOB value");
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoNet_FromGeoTable error: \"%s\"",
				     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

GAIANET_DECLARE gaiaGeomCollPtr
gaiaGetLinkSeed (GaiaNetworkAccessorPtr accessor, sqlite3_int64 link)
{
/* attempting to get a Point (seed) identifying a Network Link */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    gaiaGeomCollPtr point = NULL;
    if (net == NULL)
	return NULL;

/* building the SQL statement */
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT geometry FROM MAIN.\"%s\" WHERE link_id = ?",
			 xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("GetLinkSeed error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, link);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int blob_sz = sqlite3_column_bytes (stmt, 0);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      if (geom != NULL)
			{
			    int iv;
			    double x;
			    double y;
			    double z = 0.0;
			    double m = 0.0;
			    gaiaLinestringPtr ln = geom->FirstLinestring;
			    if (ln == NULL)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("TopoNet_GetLinkSeed error: Invalid Geometry");
				  gaianet_set_last_error_msg (accessor, msg);
				  sqlite3_free (msg);
				  gaiaFreeGeomColl (geom);
				  goto error;
			      }
			    iv = ln->Points / 2;
			    if (ln->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
			      }
			    else if (ln->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
			      }
			    else if (ln->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z,
						    &m);
			      }
			    else
			      {
				  gaiaGetPoint (ln->Coords, iv, &x, &y);
			      }
			    gaiaFreeGeomColl (geom);
			    if (net->has_z)
			      {
				  point = gaiaAllocGeomCollXYZ ();
				  gaiaAddPointToGeomCollXYZ (point, x, y, z);
			      }
			    else
			      {
				  point = gaiaAllocGeomColl ();
				  gaiaAddPointToGeomColl (point, x, y);
			      }
			    point->Srid = net->srid;
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("TopoNet_GetLinkSeed error: Invalid Geometry");
			    gaianet_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoNet_GetLinkSeed error: not a BLOB value");
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoNet_GetLinkSeed error: \"%s\"",
				     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    return point;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return NULL;
}

static int
delete_all_seeds (struct gaia_network *net)
{
/* deleting all existing Seeds */
    char *table;
    char *xtable;
    char *sql;
    char *errMsg;
    int ret;

    table = sqlite3_mprintf ("%s_seeds", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

static int
update_outdated_link_seeds (struct gaia_network *net)
{
/* updating all outdated Link Seeds */
    char *table;
    char *xseeds;
    char *xlinks;
    char *sql;
    int ret;
    sqlite3_stmt *stmt_out;
    sqlite3_stmt *stmt_in;

/* preparing the UPDATE statement */
    table = sqlite3_mprintf ("%s_seeds", net->network_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET geometry = "
			   "TopoNet_GetLinkSeed(%Q, link_id) WHERE link_id = ?",
			   xseeds, net->network_name);
    free (xseeds);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_UpdateSeeds() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SELECT statement */
    table = sqlite3_mprintf ("%s_seeds", net->network_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xlinks = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT s.link_id FROM MAIN.\"%s\" AS s "
			   "JOIN MAIN.\"%s\" AS l ON (l.link_id = s.link_id) "
			   "WHERE s.link_id IS NOT NULL AND l.timestamp > s.timestamp",
			   xseeds, xlinks);
    free (xseeds);
    free (xlinks);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_UpdateSeeds() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		sqlite3_bind_int64 (stmt_out, 1,
				    sqlite3_column_int64 (stmt_in, 0));
		/* updating the Seeds table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoNet_UpdateSeeds() error: \"%s\"",
			   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr)
						  net, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoNet_UpdateSeeds() error: \"%s\"",
				     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

GAIANET_DECLARE int
gaiaTopoNetUpdateSeeds (GaiaNetworkAccessorPtr accessor, int incremental_mode)
{
/* updating all TopoNet Seeds */
    char *table;
    char *xseeds;
    char *xlinks;
    char *sql;
    char *errMsg;
    int ret;
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net == NULL)
	return 0;

    if (!incremental_mode)
      {
	  /* deleting all existing Seeds */
	  if (!delete_all_seeds (net))
	      return 0;
      }

/* paranoid precaution: deleting all orphan Link Seeds */
    table = sqlite3_mprintf ("%s_seeds", net->network_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xlinks = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE link_id IN ("
			   "SELECT s.link_id FROM MAIN.\"%s\" AS s "
			   "LEFT JOIN MAIN.\"%s\" AS l ON (s.link_id = l.link_id) "
			   "WHERE l.link_id IS NULL)", xseeds, xseeds, xlinks);
    free (xseeds);
    free (xlinks);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* updating all outdated Link Seeds */
    if (!update_outdated_link_seeds (net))
	return 0;

/* inserting all missing Link Seeds */
    table = sqlite3_mprintf ("%s_seeds", net->network_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xlinks = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (seed_id, link_id, geometry) "
	 "SELECT NULL, l.link_id, TopoNet_GetLinkSeed(%Q, l.link_id) "
	 "FROM MAIN.\"%s\" AS l "
	 "LEFT JOIN MAIN.\"%s\" AS s ON (l.link_id = s.link_id) WHERE s.link_id IS NULL",
	 xseeds, net->network_name, xlinks, xseeds);
    free (xseeds);
    free (xlinks);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

static gaiaGeomCollPtr
do_interpolate_middlepoint (gaiaGeomCollPtr geom)
{
/* building a three-point segment */
    gaiaGeomCollPtr newg;
    gaiaLinestringPtr old_ln;
    gaiaLinestringPtr new_ln;
    double x0;
    double y0;
    double z0;
    double x1;
    double y1;
    double z1;
    double mx;
    double my;
    double mz;

    if (geom == NULL)
	return NULL;
    if (geom->FirstPoint != NULL || geom->FirstPolygon != NULL)
	return NULL;
    if (geom->FirstLinestring != geom->LastLinestring)
	return NULL;
    old_ln = geom->FirstLinestring;
    if (old_ln == NULL)
	return NULL;
    if (old_ln->Points != 2)
	return NULL;

    if (geom->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (old_ln->Coords, 0, &x0, &y0, &z0);
	  gaiaGetPointXYZ (old_ln->Coords, 1, &x1, &y1, &z1);
	  newg = gaiaAllocGeomCollXYZ ();
      }
    else
      {
	  gaiaGetPoint (old_ln->Coords, 0, &x0, &y0);
	  gaiaGetPoint (old_ln->Coords, 1, &x1, &y1);
	  newg = gaiaAllocGeomColl ();
      }
    newg->Srid = geom->Srid;

    if (x0 > x1)
	mx = x1 + ((x0 - x1) / 2.0);
    else
	mx = x0 + ((x1 - x0) / 2.0);
    if (y0 > y1)
	my = y1 + ((y0 - y1) / 2.0);
    else
	my = y0 + ((y1 - y0) / 2.0);
    if (geom->DimensionModel == GAIA_XY_Z)
      {
	  if (z0 > z1)
	      mz = z1 + ((z0 - z1) / 2.0);
	  else
	      mz = z0 + ((z1 - z0) / 2.0);
      }

    new_ln = gaiaAddLinestringToGeomColl (newg, 3);
    if (newg->DimensionModel == GAIA_XY_Z)
      {
	  gaiaSetPointXYZ (new_ln->Coords, 0, x0, y0, z0);
	  gaiaSetPointXYZ (new_ln->Coords, 1, mx, my, mz);
	  gaiaSetPointXYZ (new_ln->Coords, 2, x1, y1, z1);
      }
    else
      {
	  gaiaSetPoint (new_ln->Coords, 0, x0, y0);
	  gaiaSetPoint (new_ln->Coords, 1, mx, my);
	  gaiaSetPoint (new_ln->Coords, 2, x1, y1);
      }

    return newg;
}

GAIANET_DECLARE int
gaiaTopoNet_DisambiguateSegmentLinks (GaiaNetworkAccessorPtr accessor)
{
/*
/ Ensures that all Links on a Topology-Network will have not less
/ than three vertices; for all Links found beign simple two-points 
/ segments a third intermediate point will be interpolated.
*/
    struct gaia_network *net = (struct gaia_network *) accessor;
    int ret;
    char *sql;
    char *link;
    char *xlink;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int count = 0;
    if (net == NULL)
	return -1;

/* preparing the SQL query identifying all two-points Links */
    link = sqlite3_mprintf ("%s_link", net->network_name);
    xlink = gaiaDoubleQuotedSql (link);
    sqlite3_free (link);
    sql =
	sqlite3_mprintf
	("SELECT link_id, geometry FROM \"%s\" WHERE ST_NumPoints(geometry) = 2 "
	 "ORDER BY link_id", xlink);
    free (xlink);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_DisambiguateSegmentLinks error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the UPDATE SQL query */
    sql =
	sqlite3_mprintf ("SELECT ST_ChangeLinkGeom(%Q, ?, ?)",
			 net->network_name);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_out, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_DisambiguateSegmentLinks error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt_in, 0);
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_in, 1);
		      int blob_sz = sqlite3_column_bytes (stmt_in, 1);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      if (geom != NULL)
			{
			    gaiaGeomCollPtr newg =
				do_interpolate_middlepoint (geom);
			    gaiaFreeGeomColl (geom);
			    if (newg != NULL)
			      {
				  unsigned char *outblob = NULL;
				  int outblob_size = 0;
				  sqlite3_reset (stmt_out);
				  sqlite3_clear_bindings (stmt_out);
				  sqlite3_bind_int64 (stmt_out, 1, link_id);
				  gaiaToSpatiaLiteBlobWkb (newg, &outblob,
							   &outblob_size);
				  gaiaFreeGeomColl (newg);
				  if (blob == NULL)
				      continue;
				  else
				      sqlite3_bind_blob (stmt_out, 2, outblob,
							 outblob_size, free);
				  /* updating the Links table */
				  ret = sqlite3_step (stmt_out);
				  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
				      count++;
				  else
				    {
					char *msg =
					    sqlite3_mprintf
					    ("TopoNet_DisambiguateSegmentLinks() error: \"%s\"",
					     sqlite3_errmsg (net->db_handle));
					gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
					sqlite3_free (msg);
					goto error;
				    }
			      }
			}
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoNet_DisambiguateSegmentLinks error: \"%s\"",
		     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return count;

  error:
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return -1;
}

static void
do_eval_toponet_point (struct gaia_network *net, gaiaGeomCollPtr result,
		       gaiaGeomCollPtr reference, sqlite3_stmt * stmt_node)
{
/* retrieving Points from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;

/* initializing the Topo-Node query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_node);
    sqlite3_clear_bindings (stmt_node);
    sqlite3_bind_blob (stmt_node, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_node, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_node);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt_node, 0);
		int blob_sz = sqlite3_column_bytes (stmt_node, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      gaiaPointPtr pt = geom->FirstPoint;
		      while (pt != NULL)
			{
			    /* copying all Points into the result Geometry */
			    if (net->has_z)
				gaiaAddPointToGeomCollXYZ (result, pt->X, pt->Y,
							   pt->Z);
			    else
				gaiaAddPointToGeomColl (result, pt->X, pt->Y);
			    pt = pt->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static void
do_collect_topo_links (struct gaia_network *net, gaiaGeomCollPtr sparse,
		       sqlite3_stmt * stmt_link, sqlite3_int64 link_id)
{
/* collecting Link Geometries one by one */
    int ret;

/* initializing the Topo-Link query */
    sqlite3_reset (stmt_link);
    sqlite3_clear_bindings (stmt_link);
    sqlite3_bind_int64 (stmt_link, 1, link_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_link);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt_link, 0);
		int blob_sz = sqlite3_column_bytes (stmt_link, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      gaiaLinestringPtr ln = geom->FirstLinestring;
		      while (ln != NULL)
			{
			    if (net->has_z)
				auxtopo_copy_linestring3d (ln, sparse);
			    else
				auxtopo_copy_linestring (ln, sparse);
			    ln = ln->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static void
do_eval_toponet_line (struct gaia_network *net, gaiaGeomCollPtr result,
		      gaiaGeomCollPtr reference, sqlite3_stmt * stmt_seed_link,
		      sqlite3_stmt * stmt_link)
{
/* retrieving Linestrings from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr sparse;
    gaiaGeomCollPtr rearranged;
    gaiaLinestringPtr ln;

    if (net->has_z)
	sparse = gaiaAllocGeomCollXYZ ();
    else
	sparse = gaiaAllocGeomColl ();
    sparse->Srid = net->srid;

/* initializing the Topo-Seed-Link query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_seed_link);
    sqlite3_clear_bindings (stmt_seed_link);
    sqlite3_bind_blob (stmt_seed_link, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_seed_link, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_seed_link);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id =
		    sqlite3_column_int64 (stmt_seed_link, 0);
		do_collect_topo_links (net, sparse, stmt_link, link_id);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		gaiaFreeGeomColl (sparse);
		return;
	    }
      }

/* attempting to rearrange sparse lines */
    rearranged = gaiaLineMerge_r (net->cache, sparse);
    gaiaFreeGeomColl (sparse);
    if (rearranged == NULL)
	return;
    ln = rearranged->FirstLinestring;
    while (ln != NULL)
      {
	  if (net->has_z)
	      auxtopo_copy_linestring3d (ln, result);
	  else
	      auxtopo_copy_linestring (ln, result);
	  ln = ln->Next;
      }
    gaiaFreeGeomColl (rearranged);
}

static gaiaGeomCollPtr
do_eval_toponet_geom (struct gaia_network *net, gaiaGeomCollPtr geom,
		      sqlite3_stmt * stmt_seed_link,
		      sqlite3_stmt * stmt_node, sqlite3_stmt * stmt_link,
		      int out_type)
{
/* retrieving Topology-Network geometries via matching Seeds */
    gaiaGeomCollPtr result;

    if (net->has_z)
	result = gaiaAllocGeomCollXYZ ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = net->srid;
    result->DeclaredType = out_type;

    if (out_type == GAIA_POINT || out_type == GAIA_MULTIPOINT
	|| out_type == GAIA_GEOMETRYCOLLECTION || out_type == GAIA_UNKNOWN)
      {
	  /* processing all Points */
	  gaiaPointPtr pt = geom->FirstPoint;
	  while (pt != NULL)
	    {
		gaiaPointPtr next = pt->Next;
		gaiaGeomCollPtr reference = (gaiaGeomCollPtr)
		    auxtopo_make_geom_from_point (net->srid, net->has_z, pt);
		do_eval_toponet_point (net, result, reference, stmt_node);
		auxtopo_destroy_geom_from (reference);
		pt->Next = next;
		pt = pt->Next;
	    }
      }

    if (out_type == GAIA_MULTILINESTRING || out_type == GAIA_GEOMETRYCOLLECTION
	|| out_type == GAIA_UNKNOWN)
      {
	  /* processing all Linestrings */
	  gaiaLinestringPtr ln = geom->FirstLinestring;
	  while (ln != NULL)
	    {
		gaiaLinestringPtr next = ln->Next;
		gaiaGeomCollPtr reference = (gaiaGeomCollPtr)
		    auxtopo_make_geom_from_line (net->srid, ln);
		do_eval_toponet_line (net, result, reference, stmt_seed_link,
				      stmt_link);
		auxtopo_destroy_geom_from (reference);
		ln->Next = next;
		ln = ln->Next;
	    }
      }

    if (out_type == GAIA_MULTIPOLYGON || out_type == GAIA_GEOMETRYCOLLECTION
	|| out_type == GAIA_UNKNOWN)
      {
	  /* processing all Polygons */
	  if (geom->FirstPolygon != NULL)
	      goto error;
      }

    if (result->FirstPoint == NULL && result->FirstLinestring == NULL
	&& result->FirstPolygon == NULL)
	goto error;
    return result;

  error:
    gaiaFreeGeomColl (result);
    return NULL;
}

static int
do_eval_toponet_seeds (struct gaia_network *net, sqlite3_stmt * stmt_ref,
		       int ref_geom_col, sqlite3_stmt * stmt_ins,
		       sqlite3_stmt * stmt_seed_link, sqlite3_stmt * stmt_node,
		       sqlite3_stmt * stmt_link, int out_type)
{
/* querying the ref-table */
    int ret;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_ref);
		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_ref, icol);
		      if (icol == ref_geom_col)
			{
			    /* the geometry column */
			    const unsigned char *blob =
				sqlite3_column_blob (stmt_ref, icol);
			    int blob_sz = sqlite3_column_bytes (stmt_ref, icol);
			    gaiaGeomCollPtr geom =
				gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
			    if (geom != NULL)
			      {
				  gaiaGeomCollPtr result;
				  unsigned char *p_blob;
				  int n_bytes;
				  int gpkg_mode = 0;
				  int tiny_point = 0;
				  if (net->cache != NULL)
				    {
					struct splite_internal_cache *cache =
					    (struct splite_internal_cache
					     *) (net->cache);
					gpkg_mode = cache->gpkg_mode;
					tiny_point = cache->tinyPointEnabled;
				    }
				  result =
				      do_eval_toponet_geom (net, geom,
							    stmt_seed_link,
							    stmt_node,
							    stmt_link,
							    out_type);
				  gaiaFreeGeomColl (geom);
				  if (result != NULL)
				    {
					gaiaToSpatiaLiteBlobWkbEx2 (result,
								    &p_blob,
								    &n_bytes,
								    gpkg_mode,
								    tiny_point);
					gaiaFreeGeomColl (result);
					sqlite3_bind_blob (stmt_ins, icol + 1,
							   p_blob, n_bytes,
							   free);
				    }
				  else
				      sqlite3_bind_null (stmt_ins, icol + 1);
			      }
			    else
				sqlite3_bind_null (stmt_ins, icol + 1);
			    continue;
			}
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_ins, icol + 1,
						sqlite3_column_int64 (stmt_ref,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_ins, icol + 1,
						 sqlite3_column_double
						 (stmt_ref, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_ins, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_ins, icol + 1,
					       sqlite3_column_blob (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_ins, icol + 1);
			    break;
			};
		  }
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
					   sqlite3_errmsg (net->db_handle));
		      gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr)
						  net, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
				     sqlite3_errmsg (net->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

GAIANET_DECLARE int
gaiaTopoNet_ToGeoTableGeneralize (GaiaNetworkAccessorPtr accessor,
				  const char *db_prefix, const char *ref_table,
				  const char *ref_column, const char *out_table,
				  double tolerance, int with_spatial_index)
{
/* 
/ attempting to create and populate a new GeoTable out from a Topology-Network
/ (simplified/generalized version)
*/
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    sqlite3_stmt *stmt_seed_link = NULL;
    sqlite3_stmt *stmt_node = NULL;
    sqlite3_stmt *stmt_link = NULL;
    int ret;
    char *create;
    char *select;
    char *insert;
    char *sql;
    char *errMsg;
    char *xprefix;
    char *xtable;
    int ref_type;
    const char *type;
    int out_type;
    int ref_geom_col;
    if (net == NULL)
	return 0;

/* incrementally updating all Topology Seeds */
    if (!gaiaTopoNetUpdateSeeds (accessor, 1))
	return 0;

/* composing the CREATE TABLE output-table statement */
    if (!auxtopo_create_togeotable_sql
	(net->db_handle, db_prefix, ref_table, ref_column, out_table, &create,
	 &select, &insert, &ref_geom_col))
	goto error;

/* creating the output-table */
    ret = sqlite3_exec (net->db_handle, create, NULL, NULL, &errMsg);
    sqlite3_free (create);
    create = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* checking the Geometry Type */
    if (!auxtopo_retrieve_geometry_type
	(net->db_handle, db_prefix, ref_table, ref_column, &ref_type))
	goto error;
    switch (ref_type)
      {
      case GAIA_POINT:
      case GAIA_POINTZ:
      case GAIA_POINTM:
      case GAIA_POINTZM:
	  type = "POINT";
	  out_type = GAIA_POINT;
	  break;
      case GAIA_MULTIPOINT:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTIPOINTZM:
	  type = "MULTIPOINT";
	  out_type = GAIA_MULTIPOINT;
	  break;
      case GAIA_LINESTRING:
      case GAIA_LINESTRINGZ:
      case GAIA_LINESTRINGM:
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTILINESTRINGZM:
	  type = "MULTILINESTRING";
	  out_type = GAIA_MULTILINESTRING;
	  break;
      case GAIA_GEOMETRYCOLLECTION:
      case GAIA_GEOMETRYCOLLECTIONZ:
      case GAIA_GEOMETRYCOLLECTIONM:
      case GAIA_GEOMETRYCOLLECTIONZM:
	  type = "GEOMETRYCOLLECTION";
	  out_type = GAIA_GEOMETRYCOLLECTION;
	  break;
      default:
	  type = "GEOMETRY";
	  out_type = GAIA_UNKNOWN;
	  break;
      };

/* creating the output Geometry Column */
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(Lower(%Q), Lower(%Q), %d, '%s', '%s')",
	 out_table, ref_column, net->srid, type,
	 (net->has_z == 0) ? "XY" : "XYZ");
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    if (with_spatial_index)
      {
	  /* adding a Spatial Index supporting the Geometry Column */
	  sql =
	      sqlite3_mprintf
	      ("SELECT CreateSpatialIndex(Lower(%Q), Lower(%Q))",
	       out_table, ref_column);
	  ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_ToGeoTable() error: \"%s\"",
				     errMsg);
		sqlite3_free (errMsg);
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

/* preparing the "SELECT * FROM ref-table" query */
    ret =
	sqlite3_prepare_v2 (net->db_handle, select, strlen (select), &stmt_ref,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO out-table" query */
    ret =
	sqlite3_prepare_v2 (net->db_handle, insert, strlen (insert), &stmt_ins,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Seed-Links query */
    xprefix = sqlite3_mprintf ("%s_seeds", net->network_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT link_id FROM MAIN.\"%s\" "
			   "WHERE ST_Intersects(geometry, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_seed_link,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Nodes query */
    xprefix = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT geometry FROM MAIN.\"%s\" "
			   "WHERE ST_Intersects(geometry, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_node,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Links query */
    xprefix = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    if (tolerance > 0.0)
	sql =
	    sqlite3_mprintf
	    ("SELECT ST_SimplifyPreserveTopology(geometry, %1.6f) FROM MAIN.\"%s\" WHERE link_id = ?",
	     tolerance, xtable, xprefix);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT geometry FROM MAIN.\"%s\" WHERE link_id = ?", xtable,
	     xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt_link,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoNet_ToGeoTable() error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* evaluating feature/topology matching via coincident topo-seeds */
    if (!do_eval_toponet_seeds
	(net, stmt_ref, ref_geom_col, stmt_ins, stmt_seed_link, stmt_node,
	 stmt_link, out_type))
	goto error;

    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    sqlite3_finalize (stmt_seed_link);
    sqlite3_finalize (stmt_node);
    sqlite3_finalize (stmt_link);
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    if (stmt_seed_link != NULL)
	sqlite3_finalize (stmt_seed_link);
    if (stmt_node != NULL)
	sqlite3_finalize (stmt_node);
    if (stmt_link != NULL)
	sqlite3_finalize (stmt_link);
    return 0;
}

GAIANET_DECLARE int
gaiaTopoNet_ToGeoTable (GaiaNetworkAccessorPtr accessor,
			const char *db_prefix, const char *ref_table,
			const char *ref_column, const char *out_table,
			int with_spatial_index)
{
/* attempting to create and populate a new GeoTable out from a Topology-Network */
    return gaiaTopoNet_ToGeoTableGeneralize (accessor, db_prefix, ref_table,
					     ref_column, out_table, -1.0,
					     with_spatial_index);
}

static int
find_linelink_matches (struct gaia_network *network,
		       sqlite3_stmt * stmt_ref, sqlite3_stmt * stmt_ins,
		       sqlite3_int64 link_id, const unsigned char *blob,
		       int blob_sz)
{
/* retrieving LineLink relationships */
    int ret;
    int count = 0;
    char direction[2];
    strcpy (direction, "?");

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    sqlite3_bind_int64 (stmt_ref, 1, link_id);

    while (1)
      {
	  /* scrolling the result set rows - Spatial Relationships */
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 rowid = sqlite3_column_int64 (stmt_ref, 0);

		if (sqlite3_column_type (stmt_ref, 1) == SQLITE_BLOB)
		  {
		      /* testing directions */
		      gaiaGeomCollPtr geom_link = NULL;
		      gaiaGeomCollPtr geom_line = NULL;
		      const unsigned char *blob2 =
			  sqlite3_column_blob (stmt_ref, 1);
		      int blob2_sz = sqlite3_column_bytes (stmt_ref, 1);
		      geom_link = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      geom_line = gaiaFromSpatiaLiteBlobWkb (blob2, blob2_sz);
		      if (geom_link != NULL && geom_line != NULL)
			  gaia_do_check_direction (geom_link, geom_line,
						   direction);
		      if (geom_link != NULL)
			  gaiaFreeGeomColl (geom_link);
		      if (geom_line != NULL)
			  gaiaFreeGeomColl (geom_line);
		  }

		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		sqlite3_bind_int64 (stmt_ins, 1, link_id);
		sqlite3_bind_int64 (stmt_ins, 2, rowid);
		sqlite3_bind_text (stmt_ins, 3, direction, 1, SQLITE_STATIC);
		/* inserting a row into the output table */
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    count++;
		else
		  {
		      char *msg =
			  sqlite3_mprintf ("LineLinksList error: \"%s\"",
					   sqlite3_errmsg (network->db_handle));
		      gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr)
						  network, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
					     sqlite3_errmsg
					     (network->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) network,
					    msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    if (count == 0)
      {
	  /* unrelated Link */
	  sqlite3_reset (stmt_ins);
	  sqlite3_clear_bindings (stmt_ins);
	  sqlite3_bind_int64 (stmt_ins, 1, link_id);
	  sqlite3_bind_null (stmt_ins, 2);
	  sqlite3_bind_null (stmt_ins, 3);
	  /* inserting a row into the output table */
	  ret = sqlite3_step (stmt_ins);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
					     sqlite3_errmsg
					     (network->db_handle));
		gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) network,
					    msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

static int
insert_linelink_reverse (struct gaia_network *network, sqlite3_stmt * stmt_ins,
			 sqlite3_int64 polygon_id)
{
/* found a mismatching RefLinestring - inserting into the output table */
    int ret;

    sqlite3_reset (stmt_ins);
    sqlite3_clear_bindings (stmt_ins);
    sqlite3_bind_null (stmt_ins, 1);
    sqlite3_bind_int64 (stmt_ins, 2, polygon_id);
    sqlite3_bind_null (stmt_ins, 3);
    /* inserting a row into the output table */
    ret = sqlite3_step (stmt_ins);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) network, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

GAIANET_DECLARE int
gaiaTopoNet_LineLinksList (GaiaNetworkAccessorPtr accessor,
			   const char *db_prefix, const char *ref_table,
			   const char *ref_column, const char *out_table)
{
/* creating and populating a new Table reporting about Links/Linestring correspondencies */
    struct gaia_network *network = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt_links = NULL;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_rev = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    int ret;
    char *sql;
    char *table;
    char *idx_name;
    char *xtable;
    char *xprefix;
    char *xcolumn;
    char *xidx_name;
    char *rtree_name;
    char *seeds;
    char *xseeds;
    int ref_has_spatial_index = 0;
    if (network == NULL)
	return 0;

/* attempting to build the output table */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("CREATE TABLE main.\"%s\" (\n"
			   "\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tlink_id INTEGER,\n"
			   "\tref_rowid INTEGER,\n"
			   "\tdirection TEXT)", xtable);
    free (xtable);
    ret = sqlite3_exec (network->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    idx_name = sqlite3_mprintf ("idx_%s_link_id", out_table);
    xidx_name = gaiaDoubleQuotedSql (idx_name);
    sqlite3_free (idx_name);
    xtable = gaiaDoubleQuotedSql (out_table);
    sql =
	sqlite3_mprintf
	("CREATE INDEX main.\"%s\" ON \"%s\" (link_id, ref_rowid)", xidx_name,
	 xtable);
    free (xidx_name);
    free (xtable);
    ret = sqlite3_exec (network->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Links SQL statement */
    table = sqlite3_mprintf ("%s_link", network->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT link_id, geometry FROM main.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (network->db_handle, sql, strlen (sql), &stmt_links,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the RefTable SQL statement */
    seeds = sqlite3_mprintf ("%s_seeds", network->network_name);
    rtree_name = sqlite3_mprintf ("DB=%s.%s", db_prefix, ref_table);
    ref_has_spatial_index =
	gaia_check_spatial_index (network->db_handle, db_prefix, ref_table,
				  ref_column);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    xcolumn = gaiaDoubleQuotedSql (ref_column);
    xseeds = gaiaDoubleQuotedSql (seeds);
    if (ref_has_spatial_index)
	sql =
	    sqlite3_mprintf
	    ("SELECT r.rowid, r.\"%s\" FROM MAIN.\"%s\" AS s, \"%s\".\"%s\" AS r "
	     "WHERE ST_Intersects(r.\"%s\", s.geometry) == 1 AND s.link_id = ? "
	     "AND r.rowid IN (SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q "
	     "AND f_geometry_column = %Q AND search_frame = s.geometry)",
	     xcolumn, xseeds, xprefix, xtable, xcolumn, rtree_name, xcolumn);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT r.rowid, r.\"%s\" FROM MAIN.\"%s\" AS s, \"%s\".\"%s\" AS r "
	     "WHERE  ST_Intersects(r.\"%s\", s.geometry) == 1 AND s.link_id = ?",
	     xcolumn, xseeds, xprefix, xtable, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    free (xseeds);
    sqlite3_free (rtree_name);
    sqlite3_free (seeds);
    ret =
	sqlite3_prepare_v2 (network->db_handle, sql, strlen (sql), &stmt_ref,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Reverse RefTable SQL statement */
    seeds = sqlite3_mprintf ("%s_seeds", network->network_name);
    rtree_name = sqlite3_mprintf ("DB=%s.%s", db_prefix, ref_table);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    xcolumn = gaiaDoubleQuotedSql (ref_column);
    xseeds = gaiaDoubleQuotedSql (seeds);
    sql = sqlite3_mprintf ("SELECT r.rowid FROM \"%s\".\"%s\" AS r "
			   "LEFT JOIN MAIN.\"%s\" AS s ON (ST_Intersects(r.\"%s\", s.geometry) = 1 "
			   "AND s.link_id IS NOT NULL AND s.rowid IN (SELECT rowid FROM SpatialIndex "
			   "WHERE f_table_name = %Q AND search_frame = r.\"%s\")) "
			   "WHERE s.link_id IS NULL", xprefix, xtable, xseeds,
			   xcolumn, rtree_name, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    free (xseeds);
    sqlite3_free (rtree_name);
    sqlite3_free (seeds);
    ret =
	sqlite3_prepare_v2 (network->db_handle, sql, strlen (sql), &stmt_rev,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Insert SQL statement */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("INSERT INTO main.\"%s\" (id, link_id, ref_rowid, "
			   "direction) VALUES (NULL, ?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (network->db_handle, sql, strlen (sql), &stmt_ins,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
				       sqlite3_errmsg (network->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - Links */
	  ret = sqlite3_step (stmt_links);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt_links, 0);
		if (sqlite3_column_type (stmt_links, 1) == SQLITE_BLOB)
		  {
		      if (!find_linelink_matches
			  (network, stmt_ref, stmt_ins, link_id,
			   sqlite3_column_blob (stmt_links, 1),
			   sqlite3_column_bytes (stmt_links, 1)))
			  goto error;
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("LineLinksList error: Link not a BLOB value");
		      gaianet_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
					     sqlite3_errmsg
					     (network->db_handle));
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    while (1)
      {
	  /* scrolling the Reverse result set rows - Linestrings */
	  ret = sqlite3_step (stmt_rev);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 line_id = sqlite3_column_int64 (stmt_rev, 0);
		if (!insert_linelink_reverse (network, stmt_ins, line_id))
		    goto error;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("LineLinksList error: \"%s\"",
					     sqlite3_errmsg
					     (network->db_handle));
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_links);
    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_rev);
    sqlite3_finalize (stmt_ins);
    return 1;

  error:
    if (stmt_links != NULL)
	sqlite3_finalize (stmt_links);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_rev != NULL)
	sqlite3_finalize (stmt_rev);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    return 0;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_auxtopo.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
/*

 gaia_auxtopo.c -- implementation of the Topology module methods
    
 version 4.3, 2015 July 15

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by: 
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(Topology support) 

CIG: 6038019AE5

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <math.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "process.h"
#else
#include "unistd.h"
#endif

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_topology.h>
#include <spatialite/gaia_network.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>

#include <lwn_network.h>

#include "topology_private.h"
#include "network_private.h"

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

#define GAIA_UNUSED() if (argc || argv) argc = argc;

SPATIALITE_PRIVATE void
free_internal_cache_topologies (void *firstTopology)
{
/* destroying all Topologies registered into the Internal Connection Cache */
    struct gaia_topology *p_topo = (struct gaia_topology *) firstTopology;
    struct gaia_topology *p_topo_n;

    while (p_topo != NULL)
      {
	  p_topo_n = p_topo->next;
	  gaiaTopologyDestroy ((GaiaTopologyAccessorPtr) p_topo);
	  p_topo = p_topo_n;
      }
}

SPATIALITE_PRIVATE int
do_create_topologies (void *sqlite_handle)
{
/* attempting to create the Topologies table (if not already existing) */
    const char *sql;
    char *err_msg = NULL;
    int ret;
    sqlite3 *handle = (sqlite3 *) sqlite_handle;

    sql = "CREATE TABLE IF NOT EXISTS topologies (\n"
	"\ttopology_name TEXT NOT NULL PRIMARY KEY,\n"
	"\tsrid INTEGER NOT NULL,\n"
	"\ttolerance DOUBLE NOT NULL,\n"
	"\thas_z INTEGER NOT NULL,\n"
	"\tnext_edge_id INTEGER NOT NULL DEFAULT 1,\n"
	"\tCONSTRAINT topo_srid_fk FOREIGN KEY (srid) "
	"REFERENCES spatial_ref_sys (srid))";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topologies - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating Topologies triggers */
    sql = "CREATE TRIGGER IF NOT EXISTS topology_name_insert\n"
	"BEFORE INSERT ON 'topologies'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'insert on topologies violates constraint: "
	"topology_name value must not contain a single quote')\n"
	"WHERE NEW.topology_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'insert on topologies violates constraint: "
	"topology_name value must not contain a double quote')\n"
	"WHERE NEW.topology_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'insert on topologies violates constraint: "
	"topology_name value must be lower case')\n"
	"WHERE NEW.topology_name <> lower(NEW.topology_name);\nEND";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    sql = "CREATE TRIGGER IF NOT EXISTS topology_name_update\n"
	"BEFORE UPDATE OF 'topology_name' ON 'topologies'\nFOR EACH ROW BEGIN\n"
	"SELECT RAISE(ABORT,'update on topologies violates constraint: "
	"topology_name value must not contain a single quote')\n"
	"WHERE NEW.topology_name LIKE ('%''%');\n"
	"SELECT RAISE(ABORT,'update on topologies violates constraint: "
	"topology_name value must not contain a double quote')\n"
	"WHERE NEW.topology_name LIKE ('%\"%');\n"
	"SELECT RAISE(ABORT,'update on topologies violates constraint: "
	"topology_name value must be lower case')\n"
	"WHERE NEW.topology_name <> lower(NEW.topology_name);\nEND";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
check_new_topology (sqlite3 * handle, const char *topo_name)
{
/* testing if some already defined DB object forbids creating the new Topology */
    char *sql;
    char *prev;
    char *table;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    const char *value;
    int error = 0;

/* testing if the same Topology is already defined */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.topologies WHERE "
			   "Lower(topology_name) = Lower(%Q)", topo_name);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if some table/geom is already defined in geometry_columns */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM geometry_columns WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql =
	sqlite3_mprintf
	("%s (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'mbr')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_node", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if some Spatial View is already defined in views_geometry_columns */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM views_geometry_columns WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_face_geoms", topo_name);
    sql =
	sqlite3_mprintf
	("%s (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'mbr')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_seeds", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge_seeds", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if some table is already defined */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM sqlite_master WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", topo_name);
    sql = sqlite3_mprintf ("%s Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_topolayers", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_topofeatures", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_node_geom", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_edge_geom", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_face_mbr", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_seeds_geom", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_geoms", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_seeds", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge_seeds", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

    return 1;
}

static int
do_create_face (sqlite3 * handle, const char *topo_name, int srid)
{
/* attempting to create the Topology Face table */
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_face", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tface_id INTEGER PRIMARY KEY AUTOINCREMENT)",
			   xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topology-FACE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Face BBOX Geometry */
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'mbr', %d, 'POLYGON', 'XY')",
	 table, srid);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn topology-FACE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Face Geometry */
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'mbr')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex topology-FACE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* inserting the default World Face */
    table = sqlite3_mprintf ("%s_face", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" VALUES (0, NULL)", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT WorldFACE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_node (sqlite3 * handle, const char *topo_name, int srid, int has_z)
{
/* attempting to create the Topology Node table */
    char *sql;
    char *table;
    char *xtable;
    char *xconstraint;
    char *xmother;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_node", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node_face_fk", topo_name);
    xconstraint = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo_name);
    xmother = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tnode_id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tcontaining_face INTEGER,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (containing_face) "
			   "REFERENCES \"%s\" (face_id))", xtable, xconstraint,
			   xmother);
    free (xtable);
    free (xconstraint);
    free (xmother);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topology-NODE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Node Geometry */
    table = sqlite3_mprintf ("%s_node", topo_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'geom', %d, 'POINT', %Q, 1)", table,
	 srid, has_z ? "XYZ" : "XY");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn topology-NODE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Node Geometry */
    table = sqlite3_mprintf ("%s_node", topo_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'geom')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex topology-NODE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "containing_face" */
    table = sqlite3_mprintf ("%s_node", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_node_contface", topo_name);
    xconstraint = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (containing_face)",
			 xconstraint, xtable);
    free (xtable);
    free (xconstraint);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX node-contface - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_edge (sqlite3 * handle, const char *topo_name, int srid, int has_z)
{
/* attempting to create the Topology Edge table */
    char *sql;
    char *table;
    char *xtable;
    char *xconstraint1;
    char *xconstraint2;
    char *xconstraint3;
    char *xconstraint4;
    char *xnodes;
    char *xfaces;
    char *trigger;
    char *xtrigger;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge_node_start_fk", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge_node_end_fk", topo_name);
    xconstraint2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge_face_left_fk", topo_name);
    xconstraint3 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge_face_right_fk", topo_name);
    xconstraint4 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo_name);
    xnodes = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo_name);
    xfaces = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tedge_id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tstart_node INTEGER NOT NULL,\n"
			   "\tend_node INTEGER NOT NULL,\n"
			   "\tnext_left_edge INTEGER NOT NULL,\n"
			   "\tnext_right_edge INTEGER NOT NULL,\n"
			   "\tleft_face INTEGER,\n"
			   "\tright_face INTEGER,\n"
			   "\ttimestamp DATETIME,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (start_node) "
			   "REFERENCES \"%s\" (node_id),\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (end_node) "
			   "REFERENCES \"%s\" (node_id),\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (left_face) "
			   "REFERENCES \"%s\" (face_id),\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (right_face) "
			   "REFERENCES \"%s\" (face_id))",
			   xtable, xconstraint1, xnodes, xconstraint2, xnodes,
			   xconstraint3, xfaces, xconstraint4, xfaces);
    free (xtable);
    free (xconstraint1);
    free (xconstraint2);
    free (xconstraint3);
    free (xconstraint4);
    free (xnodes);
    free (xfaces);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topology-EDGE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "next_edge_ins" trigger */
    trigger = sqlite3_mprintf ("%s_edge_next_ins", topo_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER INSERT ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE topologies SET next_edge_id = NEW.edge_id + 1 "
			   "WHERE Lower(topology_name) = Lower(%Q) AND next_edge_id < NEW.edge_id + 1;\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE edge_id = NEW.edge_id;"
			   "END", xtrigger, xtable, topo_name, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER topology-EDGE next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "edge_update" trigger */
    trigger = sqlite3_mprintf ("%s_edge_update", topo_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER UPDATE ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE edge_id = NEW.edge_id;"
			   "END", xtrigger, xtable, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER topology-EDGE next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "next_edge_upd" trigger */
    trigger = sqlite3_mprintf ("%s_edge_next_upd", topo_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TRIGGER \"%s\" AFTER UPDATE OF edge_id ON \"%s\"\n"
	 "FOR EACH ROW BEGIN\n"
	 "\tUPDATE topologies SET next_edge_id = NEW.edge_id + 1 "
	 "WHERE Lower(topology_name) = Lower(%Q) AND next_edge_id < NEW.edge_id + 1;\n"
	 "END", xtrigger, xtable, topo_name);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER topology-EDGE next UPDATE - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Edge Geometry */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'geom', %d, 'LINESTRING', %Q, 1)",
	 table, srid, has_z ? "XYZ" : "XY");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn topology-EDGE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Edge Geometry */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'geom')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex topology-EDGE - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "start_node" */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_start_node", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (start_node)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX edge-startnode - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "end_node" */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_end_node", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (end_node)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX edge-endnode - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "left_face" */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_edge_leftface", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (left_face)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX edge-leftface - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "right_face" */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_edge_rightface", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (right_face)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX edge-rightface - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "timestamp" */
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_timestamp", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (timestamp)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX edge-timestamps - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_seeds (sqlite3 * handle, const char *topo_name, int srid, int has_z)
{
/* attempting to create the Topology Seeds table */
    char *sql;
    char *table;
    char *xtable;
    char *xconstraint1;
    char *xconstraint2;
    char *xedges;
    char *xfaces;
    char *trigger;
    char *xtrigger;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_seeds_edge_fk", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_seeds_face_fk", topo_name);
    xconstraint2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xedges = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo_name);
    xfaces = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tseed_id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tedge_id INTEGER,\n"
			   "\tface_id INTEGER,\n"
			   "\ttimestamp DATETIME,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (edge_id) "
			   "REFERENCES \"%s\" (edge_id) ON DELETE CASCADE,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (face_id) "
			   "REFERENCES \"%s\" (face_id) ON DELETE CASCADE)",
			   xtable, xconstraint1, xedges, xconstraint2, xfaces);
    free (xtable);
    free (xconstraint1);
    free (xconstraint2);
    free (xedges);
    free (xfaces);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topology-SEEDS - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "seeds_ins" trigger */
    trigger = sqlite3_mprintf ("%s_seeds_ins", topo_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER INSERT ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE seed_id = NEW.seed_id;"
			   "END", xtrigger, xtable, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER topology-SEEDS next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* adding the "seeds_update" trigger */
    trigger = sqlite3_mprintf ("%s_seeds_update", topo_name);
    xtrigger = gaiaDoubleQuotedSql (trigger);
    sqlite3_free (trigger);
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER \"%s\" AFTER UPDATE ON \"%s\"\n"
			   "FOR EACH ROW BEGIN\n"
			   "\tUPDATE \"%s\" SET timestamp = strftime('%%Y-%%m-%%dT%%H:%%M:%%fZ', 'now') "
			   "WHERE seed_id = NEW.seed_id;"
			   "END", xtrigger, xtable, xtable);
    free (xtrigger);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CREATE TRIGGER topology-SEED next INSERT - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating the Seeds Geometry */
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(%Q, 'geom', %d, 'POINT', %Q, 1)",
	 table, srid, has_z ? "XYZ" : "XY");
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("AddGeometryColumn topology-SEEDS - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating a Spatial Index supporting Seeds Geometry */
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    sql = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, 'geom')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("CreateSpatialIndex topology-SEEDS - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "edge_id" */
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_sdedge", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (edge_id)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX seeds-edge - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "face_id" */
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_sdface", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (face_id)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX seeds-face - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "timestamp" */
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_seeds_timestamp", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (timestamp)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX seeds-timestamps - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_edge_seeds (sqlite3 * handle, const char *topo_name)
{
/* attempting to create the Edge Seeds view */
    char *sql;
    char *table;
    char *xtable;
    char *xview;
    char *err_msg = NULL;
    int ret;

/* creating the view */
    table = sqlite3_mprintf ("%s_edge_seeds", topo_name);
    xview = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE VIEW \"%s\" AS\n"
			   "SELECT seed_id AS rowid, edge_id AS edge_id, geom AS geom\n"
			   "FROM \"%s\"\n"
			   "WHERE edge_id IS NOT NULL", xview, xtable);
    free (xtable);
    free (xview);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW topology-EDGE-SEEDS - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* registering a Spatial View */
    xview = sqlite3_mprintf ("%s_edge_seeds", topo_name);
    xtable = sqlite3_mprintf ("%s_seeds", topo_name);
    sql = sqlite3_mprintf ("INSERT INTO views_geometry_columns (view_name, "
			   "view_geometry, view_rowid, f_table_name, f_geometry_column, read_only) "
			   "VALUES (Lower(%Q), 'geom', 'rowid', Lower(%Q), 'geom', 1)",
			   xview, xtable);
    sqlite3_free (xview);
    sqlite3_free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("Registering Spatial VIEW topology-EDGE-SEEDS - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_face_seeds (sqlite3 * handle, const char *topo_name)
{
/* attempting to create the Face Seeds view */
    char *sql;
    char *table;
    char *xtable;
    char *xview;
    char *err_msg = NULL;
    int ret;

/* creating the view */
    table = sqlite3_mprintf ("%s_face_seeds", topo_name);
    xview = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_seeds", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE VIEW \"%s\" AS\n"
			   "SELECT seed_id AS rowid, face_id AS face_id, geom AS geom\n"
			   "FROM \"%s\"\n"
			   "WHERE face_id IS NOT NULL", xview, xtable);
    free (xtable);
    free (xview);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW topology-FACE-SEEDS - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* registering a Spatial View */
    xview = sqlite3_mprintf ("%s_face_seeds", topo_name);
    xtable = sqlite3_mprintf ("%s_seeds", topo_name);
    sql = sqlite3_mprintf ("INSERT INTO views_geometry_columns (view_name, "
			   "view_geometry, view_rowid, f_table_name, f_geometry_column, read_only) "
			   "VALUES (Lower(%Q), 'geom', 'rowid', Lower(%Q), 'geom', 1)",
			   xview, xtable);
    sqlite3_free (xview);
    sqlite3_free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("Registering Spatial VIEW topology-FACE-SEEDS - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_face_geoms (sqlite3 * handle, const char *topo_name)
{
/* attempting to create the Face Geoms view */
    char *sql;
    char *table;
    char *xtable;
    char *xview;
    char *err_msg = NULL;
    int ret;

/* creating the view */
    table = sqlite3_mprintf ("%s_face_geoms", topo_name);
    xview = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE VIEW \"%s\" AS\n"
			   "SELECT face_id AS rowid, ST_GetFaceGeometry(%Q, face_id) AS geom\n"
			   "FROM \"%s\"\n"
			   "WHERE face_id <> 0", xview, topo_name, xtable);
    free (xtable);
    free (xview);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE VIEW topology-FACE-GEOMS - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* registering a Spatial View */
    xview = sqlite3_mprintf ("%s_face_geoms", topo_name);
    xtable = sqlite3_mprintf ("%s_face", topo_name);
    sql = sqlite3_mprintf ("INSERT INTO views_geometry_columns (view_name, "
			   "view_geometry, view_rowid, f_table_name, f_geometry_column, read_only) "
			   "VALUES (Lower(%Q), 'geom', 'rowid', Lower(%Q), 'mbr', 1)",
			   xview, xtable);
    sqlite3_free (xview);
    sqlite3_free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("Registering Spatial VIEW topology-FACE-GEOMS - error: %s\n",
	       err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_topolayers (sqlite3 * handle, const char *topo_name)
{
/* attempting to create the TopoLayers table */
    char *sql;
    char *table;
    char *xtable;
    char *xtrigger;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_topolayers", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\ttopolayer_id INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\ttopolayer_name NOT NULL UNIQUE)", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topology-TOPOLAYERS - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating TopoLayers triggers */
    table = sqlite3_mprintf ("%s_topolayers", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_topolayer_name_insert", topo_name);
    xtrigger = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER IF NOT EXISTS \"%s\"\n"
			   "BEFORE INSERT ON \"%s\"\nFOR EACH ROW BEGIN\n"
			   "SELECT RAISE(ABORT,'insert on topolayers violates constraint: "
			   "topolayer_name value must not contain a single quote')\n"
			   "WHERE NEW.topolayer_name LIKE ('%%''%%');\n"
			   "SELECT RAISE(ABORT,'insert on topolayers violates constraint: "
			   "topolayers_name value must not contain a double quote')\n"
			   "WHERE NEW.topolayer_name LIKE ('%%\"%%');\n"
			   "SELECT RAISE(ABORT,'insert on topolayers violates constraint: "
			   "topolayer_name value must be lower case')\n"
			   "WHERE NEW.topolayer_name <> lower(NEW.topolayer_name);\nEND",
			   xtrigger, xtable);
    free (xtable);
    free (xtrigger);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    table = sqlite3_mprintf ("%s_topolayers", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_topolayer_name_update", topo_name);
    xtrigger = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TRIGGER IF NOT EXISTS \"%s\"\n"
			   "BEFORE UPDATE OF 'topolayer_name' ON \"%s\"\nFOR EACH ROW BEGIN\n"
			   "SELECT RAISE(ABORT,'update on topolayers violates constraint: "
			   "topolayer_name value must not contain a single quote')\n"
			   "WHERE NEW.topolayer_name LIKE ('%%''%%');\n"
			   "SELECT RAISE(ABORT,'update on topolayers violates constraint: "
			   "topolayer_name value must not contain a double quote')\n"
			   "WHERE NEW.topolayer_name LIKE ('%%\"%%');\n"
			   "SELECT RAISE(ABORT,'update on topolayers violates constraint: "
			   "topolayer_name value must be lower case')\n"
			   "WHERE NEW.topolayer_name <> lower(NEW.topolayer_name);\nEND",
			   xtrigger, xtable);
    free (xtable);
    free (xtrigger);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SQL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_create_topofeatures (sqlite3 * handle, const char *topo_name)
{
/* attempting to create the TopoFeatures table */
    char *sql;
    char *table;
    char *xtable;
    char *xtable1;
    char *xtable2;
    char *xtable3;
    char *xtable4;
    char *xconstraint1;
    char *xconstraint2;
    char *xconstraint3;
    char *xconstraint4;
    char *err_msg = NULL;
    int ret;

/* creating the main table */
    table = sqlite3_mprintf ("%s_topofeatures", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo_name);
    xtable3 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_topolayers", topo_name);
    xtable4 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("fk_%s_ftnode", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("fk_%s_ftedge", topo_name);
    xconstraint2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("fk_%s_ftface", topo_name);
    xconstraint3 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("fk_%s_topolayer", topo_name);
    xconstraint4 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\" (\n"
			   "\tuid INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tnode_id INTEGER,\n\tedge_id INTEGER,\n"
			   "\tface_id INTEGER,\n\ttopolayer_id INTEGER NOT NULL,\n"
			   "\tfid INTEGER NOT NULL,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (node_id) "
			   "REFERENCES \"%s\" (node_id) ON DELETE CASCADE,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (edge_id) "
			   "REFERENCES \"%s\" (edge_id) ON DELETE CASCADE,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (face_id) "
			   "REFERENCES \"%s\" (face_id) ON DELETE CASCADE,\n"
			   "\tCONSTRAINT \"%s\" FOREIGN KEY (topolayer_id) "
			   "REFERENCES \"%s\" (topolayer_id) ON DELETE CASCADE)",
			   xtable, xconstraint1, xtable1, xconstraint2, xtable2,
			   xconstraint3, xtable3, xconstraint4, xtable4);
    free (xtable);
    free (xtable1);
    free (xtable2);
    free (xtable3);
    free (xtable4);
    free (xconstraint1);
    free (xconstraint2);
    free (xconstraint3);
    free (xconstraint4);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE TABLE topology-TOPOFEATURES - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "node_id" */
    table = sqlite3_mprintf ("%s_topofeatures", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_ftnode", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (node_id)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX topofeatures-node - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "edge_id" */
    table = sqlite3_mprintf ("%s_topofeatures", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_ftedge", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (edge_id)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX topofeatures-edge - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "face_id" */
    table = sqlite3_mprintf ("%s_topofeatures", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_ftface", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (face_id)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX topofeatures-face - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* creating an Index supporting "topolayers_id" */
    table = sqlite3_mprintf ("%s_topofeatures", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("idx_%s_fttopolayers", topo_name);
    xconstraint1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("CREATE INDEX \"%s\" ON \"%s\" (topolayer_id, fid)",
			 xconstraint1, xtable);
    free (xtable);
    free (xconstraint1);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("CREATE INDEX topofeatures-topolayers - error: %s\n",
			err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

GAIATOPO_DECLARE int
gaiaTopologyCreate (sqlite3 * handle, const char *topo_name, int srid,
		    double tolerance, int has_z)
{
/* attempting to create a new Topology */
    int ret;
    char *sql;

/* creating the Topologies table (just in case) */
    if (!do_create_topologies (handle))
	return 0;

/* testing for forbidding objects */
    if (!check_new_topology (handle, topo_name))
	return 0;

/* creating the Topology own Tables */
    if (!do_create_face (handle, topo_name, srid))
	goto error;
    if (!do_create_node (handle, topo_name, srid, has_z))
	goto error;
    if (!do_create_edge (handle, topo_name, srid, has_z))
	goto error;
    if (!do_create_seeds (handle, topo_name, srid, has_z))
	goto error;
    if (!do_create_edge_seeds (handle, topo_name))
	goto error;
    if (!do_create_face_seeds (handle, topo_name))
	goto error;
    if (!do_create_face_geoms (handle, topo_name))
	goto error;
    if (!do_create_topolayers (handle, topo_name))
	goto error;
    if (!do_create_topofeatures (handle, topo_name))
	goto error;

/* registering the Topology */
    sql = sqlite3_mprintf ("INSERT INTO MAIN.topologies (topology_name, "
			   "srid, tolerance, has_z) VALUES (Lower(%Q), %d, %f, %d)",
			   topo_name, srid, tolerance, has_z);
    ret = sqlite3_exec (handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;

    return 1;

  error:
    return 0;
}

static int
check_existing_topology (sqlite3 * handle, const char *topo_name,
			 int full_check)
{
/* testing if a Topology is already defined */
    char *sql;
    char *prev;
    char *table;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    const char *value;
    int error = 0;

/* testing if the Topology is already defined */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.topologies WHERE "
			   "Lower(topology_name) = Lower(%Q)", topo_name);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 1)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;
    if (!full_check)
	return 1;

/* testing if all table/geom are correctly defined in geometry_columns */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM geometry_columns WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", topo_name);
    sql =
	sqlite3_mprintf
	("%s (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(f_table_name) = Lower(%Q) AND f_geometry_column = 'mbr')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 3)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* testing if all Spatial Views are correctly defined in geometry_columns */
    sql = sqlite3_mprintf ("SELECT Count(*) FROM views_geometry_columns WHERE");
    prev = sql;
    table = sqlite3_mprintf ("%s_edge_seeds", topo_name);
    sql =
	sqlite3_mprintf
	("%s (Lower(view_name) = Lower(%Q) AND view_geometry = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_seeds", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(view_name) = Lower(%Q) AND view_geometry = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_geoms", topo_name);
    sql =
	sqlite3_mprintf
	("%s OR (Lower(view_name) = Lower(%Q) AND view_geometry = 'geom')",
	 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 3)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;


/* testing if all tables are already defined */
    sql =
	sqlite3_mprintf
	("SELECT Count(*) FROM sqlite_master WHERE (type = 'table' AND (");
    prev = sql;
    table = sqlite3_mprintf ("%s_node", topo_name);
    sql = sqlite3_mprintf ("%s Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_node_geom", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_edge_geom", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("idx_%s_face_mbr", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)))", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_edge_seeds", topo_name);
    sql =
	sqlite3_mprintf ("%s OR (type = 'view' AND (Lower(name) = Lower(%Q)",
			 prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_seeds", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    prev = sql;
    table = sqlite3_mprintf ("%s_face_geoms", topo_name);
    sql = sqlite3_mprintf ("%s OR Lower(name) = Lower(%Q)))", prev, table);
    sqlite3_free (table);
    sqlite3_free (prev);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 9)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

    return 1;
}

static int
do_drop_topo_face (sqlite3 * handle, const char *topo_name)
{
/* attempting to drop the Topology-Face table */
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    int ret;

/* disabling the corresponding Spatial Index */
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql = sqlite3_mprintf ("SELECT DisableSpatialIndex(%Q, 'mbr')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("DisableSpatialIndex topology-face - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* discarding the Geometry column */
    table = sqlite3_mprintf ("%s_face", topo_name);
    sql = sqlite3_mprintf ("SELECT DiscardGeometryColumn(%Q, 'mbr')", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("DisableGeometryColumn topology-face - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* dropping the main table */
    table = sqlite3_mprintf ("%s_face", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("DROP topology-face - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

/* dropping the corresponding Spatial Index */
    table = sqlite3_mprintf ("idx_%s_face_mbr", topo_name);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS \"%s\"", table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (table);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("DROP SpatialIndex topology-face - error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_drop_topo_table (sqlite3 * handle, const char *topo_name, const char *which,
		    int spatial)
{
/* attempting to drop some Topology table */
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    int ret;

    if (strcmp (which, "face") == 0)
	return do_drop_topo_face (handle, topo_name);

    if (spatial)
      {
	  /* disabling the corresponding Spatial Index */
	  table = sqlite3_mprintf ("%s_%s", topo_name, which);
	  sql =
	      sqlite3_mprintf ("SELECT DisableSpatialIndex(%Q, 'geom')", table);
	  ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
	  sqlite3_free (table);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e
		    ("DisableSpatialIndex topology-%s - error: %s\n", which,
		     err_msg);
		sqlite3_free (err_msg);
		return 0;
	    }
	  /* discarding the Geometry column */
	  table = sqlite3_mprintf ("%s_%s", topo_name, which);
	  sql =
	      sqlite3_mprintf ("SELECT DiscardGeometryColumn(%Q, 'geom')",
			       table);
	  ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
	  sqlite3_free (table);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e
		    ("DisableGeometryColumn topology-%s - error: %s\n", which,
		     err_msg);
		sqlite3_free (err_msg);
		return 0;
	    }
      }

/* dropping the main table */
    table = sqlite3_mprintf ("%s_%s", topo_name, which);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS MAIN.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("DROP topology-%s - error: %s\n", which, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    if (spatial)
      {
	  /* dropping the corresponding Spatial Index */
	  table = sqlite3_mprintf ("idx_%s_%s_geom", topo_name, which);
	  sql = sqlite3_mprintf ("DROP TABLE IF EXISTS MAIN.\"%s\"", table);
	  ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
	  sqlite3_free (table);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		spatialite_e
		    ("DROP SpatialIndex topology-%s - error: %s\n", which,
		     err_msg);
		sqlite3_free (err_msg);
		return 0;
	    }
      }

    return 1;
}

static int
do_drop_topo_view (sqlite3 * handle, const char *topo_name, const char *which)
{
/* attempting to drop some Topology view */
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    int ret;

/* unregistering the Spatial View */
    table = sqlite3_mprintf ("%s_%s", topo_name, which);
    sql =
	sqlite3_mprintf
	("DELETE FROM views_geometry_columns WHERE view_name = Lower(%Q)",
	 table);
    sqlite3_free (table);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("Unregister Spatial View -%s - error: %s\n", which,
			err_msg);
	  sqlite3_free (err_msg);
      }

/* dropping the view */
    table = sqlite3_mprintf ("%s_%s", topo_name, which);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP VIEW IF EXISTS MAIN.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("DROP topology-%s - error: %s\n", which, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
do_drop_topofeature_tables (sqlite3 * handle, const char *topo_name)
{
/* dropping any eventual topofeatures table */
    char *table;
    char *xtable;
    char *sql;
    char *err_msg = NULL;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;

    table = sqlite3_mprintf ("%s_topolayers", topo_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT topolayer_id FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 1;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		const char *id = results[(i * columns) + 0];
		table = sqlite3_mprintf ("%s_topofeatures_%s", topo_name, id);
		xtable = gaiaDoubleQuotedSql (table);
		sqlite3_free (table);
		sql =
		    sqlite3_mprintf ("DROP TABLE IF EXISTS MAIN.\"%s\"",
				     xtable);
		free (xtable);
		ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
		sqlite3_free (sql);
		if (ret != SQLITE_OK)
		  {
		      spatialite_e ("DROP topology-features (%s) - error: %s\n",
				    id, err_msg);
		      sqlite3_free (err_msg);
		      return 0;
		  }
	    }
      }
    sqlite3_free_table (results);
    return 1;
}

static int
do_get_topology (sqlite3 * handle, const char *topo_name, char **topology_name,
		 int *srid, double *tolerance, int *has_z)
{
/* retrieving a Topology configuration */
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int ok = 0;
    char *xtopology_name = NULL;
    int xsrid;
    double xtolerance;
    int xhas_z;

/* preparing the SQL query */
    sql =
	sqlite3_mprintf
	("SELECT topology_name, srid, tolerance, has_z FROM MAIN.topologies WHERE "
	 "Lower(topology_name) = Lower(%Q)", topo_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM topologys error: \"%s\"\n",
			sqlite3_errmsg (handle));
	  return 0;
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_name = 0;
		int ok_srid = 0;
		int ok_tolerance = 0;
		int ok_z = 0;
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *str =
			  (const char *) sqlite3_column_text (stmt, 0);
		      if (xtopology_name != NULL)
			  free (xtopology_name);
		      xtopology_name = malloc (strlen (str) + 1);
		      strcpy (xtopology_name, str);
		      ok_name = 1;
		  }
		if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
		  {
		      xsrid = sqlite3_column_int (stmt, 1);
		      ok_srid = 1;
		  }
		if (sqlite3_column_type (stmt, 2) == SQLITE_FLOAT)
		  {
		      xtolerance = sqlite3_column_double (stmt, 2);
		      ok_tolerance = 1;
		  }
		if (sqlite3_column_type (stmt, 3) == SQLITE_INTEGER)
		  {
		      xhas_z = sqlite3_column_int (stmt, 3);
		      ok_z = 1;
		  }
		if (ok_name && ok_srid && ok_tolerance && ok_z)
		  {
		      ok = 1;
		      break;
		  }
	    }
	  else
	    {
		spatialite_e
		    ("step: SELECT FROM topologies error: \"%s\"\n",
		     sqlite3_errmsg (handle));
		sqlite3_finalize (stmt);
		return 0;
	    }
      }
    sqlite3_finalize (stmt);

    if (ok)
      {
	  *topology_name = xtopology_name;
	  *srid = xsrid;
	  *tolerance = xtolerance;
	  *has_z = xhas_z;
	  return 1;
      }

    if (xtopology_name != NULL)
	free (xtopology_name);
    return 0;
}

GAIATOPO_DECLARE GaiaTopologyAccessorPtr
gaiaGetTopology (sqlite3 * handle, const void *cache, const char *topo_name)
{
/* attempting to get a reference to some Topology Accessor Object */
    GaiaTopologyAccessorPtr accessor;

/* attempting to retrieve an alredy cached definition */
    accessor = gaiaTopologyFromCache (cache, topo_name);
    if (accessor != NULL)
	return accessor;

/* attempting to create a new Topology Accessor */
    accessor = gaiaTopologyFromDBMS (handle, cache, topo_name);
    return accessor;
}

GAIATOPO_DECLARE GaiaTopologyAccessorPtr
gaiaTopologyFromCache (const void *p_cache, const char *topo_name)
{
/* attempting to retrieve an already defined Topology Accessor Object from the Connection Cache */
    struct gaia_topology *ptr;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == 0)
	return NULL;

    ptr = (struct gaia_topology *) (cache->firstTopology);
    while (ptr != NULL)
      {
	  /* checking for an already registered Topology */
	  if (strcasecmp (topo_name, ptr->topology_name) == 0)
	      return (GaiaTopologyAccessorPtr) ptr;
	  ptr = ptr->next;
      }
    return NULL;
}

GAIATOPO_DECLARE int
gaiaReadTopologyFromDBMS (sqlite3 *
			  handle,
			  const char
			  *topo_name, char **topology_name, int *srid,
			  double *tolerance, int *has_z)
{
/* testing for existing DBMS objects */
    if (!check_existing_topology (handle, topo_name, 1))
	return 0;

/* retrieving the Topology configuration */
    if (!do_get_topology
	(handle, topo_name, topology_name, srid, tolerance, has_z))
	return 0;
    return 1;
}

GAIATOPO_DECLARE GaiaTopologyAccessorPtr
gaiaTopologyFromDBMS (sqlite3 * handle, const void *p_cache,
		      const char *topo_name)
{
/* attempting to create a Topology Accessor Object into the Connection Cache */
    const RTCTX *ctx = NULL;
    RTT_BE_CALLBACKS *callbacks;
    struct gaia_topology *ptr;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == 0)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

/* allocating and initializing the opaque object */
    ptr = malloc (sizeof (struct gaia_topology));
    ptr->db_handle = handle;
    ptr->cache = cache;
    ptr->topology_name = NULL;
    ptr->srid = -1;
    ptr->tolerance = 0;
    ptr->has_z = 0;
    ptr->last_error_message = NULL;
    ptr->rtt_iface = rtt_CreateBackendIface (ctx, (const RTT_BE_DATA *) ptr);
    ptr->prev = cache->lastTopology;
    ptr->next = NULL;

    callbacks = malloc (sizeof (RTT_BE_CALLBACKS));
    callbacks->lastErrorMessage = callback_lastErrorMessage;
    callbacks->topoGetSRID = callback_topoGetSRID;
    callbacks->topoGetPrecision = callback_topoGetPrecision;
    callbacks->topoHasZ = callback_topoHasZ;
    callbacks->createTopology = NULL;
    callbacks->loadTopologyByName = callback_loadTopologyByName;
    callbacks->freeTopology = callback_freeTopology;
    callbacks->getNodeById = callback_getNodeById;
    callbacks->getNodeWithinDistance2D = callback_getNodeWithinDistance2D;
    callbacks->insertNodes = callback_insertNodes;
    callbacks->getEdgeById = callback_getEdgeById;
    callbacks->getEdgeWithinDistance2D = callback_getEdgeWithinDistance2D;
    callbacks->getNextEdgeId = callback_getNextEdgeId;
    callbacks->insertEdges = callback_insertEdges;
    callbacks->updateEdges = callback_updateEdges;
    callbacks->getFaceById = callback_getFaceById;
    callbacks->getFaceContainingPoint = callback_getFaceContainingPoint;
    callbacks->deleteEdges = callback_deleteEdges;
    callbacks->getNodeWithinBox2D = callback_getNodeWithinBox2D;
    callbacks->getEdgeWithinBox2D = callback_getEdgeWithinBox2D;
    callbacks->getEdgeByNode = callback_getEdgeByNode;
    callbacks->updateNodes = callback_updateNodes;
    callbacks->insertFaces = callback_insertFaces;
    callbacks->updateFacesById = callback_updateFacesById;
    callbacks->deleteFacesById = callback_deleteFacesById;
    callbacks->getRingEdges = callback_getRingEdges;
    callbacks->updateEdgesById = callback_updateEdgesById;
    callbacks->getEdgeByFace = callback_getEdgeByFace;
    callbacks->getNodeByFace = callback_getNodeByFace;
    callbacks->updateNodesById = callback_updateNodesById;
    callbacks->deleteNodesById = callback_deleteNodesById;
    callbacks->updateTopoGeomEdgeSplit = callback_updateTopoGeomEdgeSplit;
    callbacks->updateTopoGeomFaceSplit = callback_updateTopoGeomFaceSplit;
    callbacks->checkTopoGeomRemEdge = callback_checkTopoGeomRemEdge;
    callbacks->updateTopoGeomFaceHeal = callback_updateTopoGeomFaceHeal;
    callbacks->checkTopoGeomRemNode = callback_checkTopoGeomRemNode;
    callbacks->updateTopoGeomEdgeHeal = callback_updateTopoGeomEdgeHeal;
    callbacks->getFaceWithinBox2D = callback_getFaceWithinBox2D;
    ptr->callbacks = callbacks;

    rtt_BackendIfaceRegisterCallbacks (ptr->rtt_iface, callbacks);
    ptr->rtt_topology = rtt_LoadTopology (ptr->rtt_iface, topo_name);

    ptr->stmt_getNodeWithinDistance2D = NULL;
    ptr->stmt_insertNodes = NULL;
    ptr->stmt_getEdgeWithinDistance2D = NULL;
    ptr->stmt_getNextEdgeId = NULL;
    ptr->stmt_setNextEdgeId = NULL;
    ptr->stmt_insertEdges = NULL;
    ptr->stmt_getFaceContainingPoint_1 = NULL;
    ptr->stmt_getFaceContainingPoint_2 = NULL;
    ptr->stmt_deleteEdges = NULL;
    ptr->stmt_getNodeWithinBox2D = NULL;
    ptr->stmt_getEdgeWithinBox2D = NULL;
    ptr->stmt_getFaceWithinBox2D = NULL;
    ptr->stmt_getAllEdges = NULL;
    ptr->stmt_updateNodes = NULL;
    ptr->stmt_insertFaces = NULL;
    ptr->stmt_updateFacesById = NULL;
    ptr->stmt_deleteFacesById = NULL;
    ptr->stmt_deleteNodesById = NULL;
    ptr->stmt_getRingEdges = NULL;
    if (ptr->rtt_topology == NULL)
      {
	  char *msg =
	      sqlite3_mprintf ("Topology \"%s\" is undefined !!!", topo_name);
	  gaiaSetRtTopoErrorMsg (p_cache, msg);
	  sqlite3_free (msg);
	  goto invalid;
      }

/* creating the SQL prepared statements */
    create_topogeo_prepared_stmts ((GaiaTopologyAccessorPtr) ptr);

    return (GaiaTopologyAccessorPtr) ptr;

  invalid:
    gaiaTopologyDestroy ((GaiaTopologyAccessorPtr) ptr);
    return NULL;
}

GAIATOPO_DECLARE void
gaiaTopologyDestroy (GaiaTopologyAccessorPtr topo_ptr)
{
/* destroying a Topology Accessor Object */
    struct gaia_topology *prev;
    struct gaia_topology *next;
    struct splite_internal_cache *cache;
    struct gaia_topology *ptr = (struct gaia_topology *) topo_ptr;
    if (ptr == NULL)
	return;

    prev = ptr->prev;
    next = ptr->next;
    cache = (struct splite_internal_cache *) (ptr->cache);
    if (ptr->rtt_topology != NULL)
	rtt_FreeTopology ((RTT_TOPOLOGY *) (ptr->rtt_topology));
    if (ptr->rtt_iface != NULL)
	rtt_FreeBackendIface ((RTT_BE_IFACE *) (ptr->rtt_iface));
    if (ptr->callbacks != NULL)
	free (ptr->callbacks);
    if (ptr->topology_name != NULL)
	free (ptr->topology_name);
    if (ptr->last_error_message != NULL)
	free (ptr->last_error_message);

    finalize_topogeo_prepared_stmts (topo_ptr);
    free (ptr);

/* unregistering from the Internal Cache double linked list */
    if (prev != NULL)
	prev->next = next;
    if (next != NULL)
	next->prev = prev;
    if (cache->firstTopology == ptr)
	cache->firstTopology = next;
    if (cache->lastTopology == ptr)
	cache->lastTopology = prev;
}

TOPOLOGY_PRIVATE void
finalize_topogeo_prepared_stmts (GaiaTopologyAccessorPtr accessor)
{
/* finalizing the SQL prepared statements */
    struct gaia_topology *ptr = (struct gaia_topology *) accessor;
    if (ptr->stmt_getNodeWithinDistance2D != NULL)
	sqlite3_finalize (ptr->stmt_getNodeWithinDistance2D);
    if (ptr->stmt_insertNodes != NULL)
	sqlite3_finalize (ptr->stmt_insertNodes);
    if (ptr->stmt_getEdgeWithinDistance2D != NULL)
	sqlite3_finalize (ptr->stmt_getEdgeWithinDistance2D);
    if (ptr->stmt_getNextEdgeId != NULL)
	sqlite3_finalize (ptr->stmt_getNextEdgeId);
    if (ptr->stmt_setNextEdgeId != NULL)
	sqlite3_finalize (ptr->stmt_setNextEdgeId);
    if (ptr->stmt_insertEdges != NULL)
	sqlite3_finalize (ptr->stmt_insertEdges);
    if (ptr->stmt_getFaceContainingPoint_1 != NULL)
	sqlite3_finalize (ptr->stmt_getFaceContainingPoint_1);
    if (ptr->stmt_getFaceContainingPoint_2 != NULL)
	sqlite3_finalize (ptr->stmt_getFaceContainingPoint_2);
    if (ptr->stmt_deleteEdges != NULL)
	sqlite3_finalize (ptr->stmt_deleteEdges);
    if (ptr->stmt_getNodeWithinBox2D != NULL)
	sqlite3_finalize (ptr->stmt_getNodeWithinBox2D);
    if (ptr->stmt_getEdgeWithinBox2D != NULL)
	sqlite3_finalize (ptr->stmt_getEdgeWithinBox2D);
    if (ptr->stmt_getFaceWithinBox2D != NULL)
	sqlite3_finalize (ptr->stmt_getFaceWithinBox2D);
    if (ptr->stmt_getAllEdges != NULL)
	sqlite3_finalize (ptr->stmt_getAllEdges);
    if (ptr->stmt_updateNodes != NULL)
	sqlite3_finalize (ptr->stmt_updateNodes);
    if (ptr->stmt_insertFaces != NULL)
	sqlite3_finalize (ptr->stmt_insertFaces);
    if (ptr->stmt_updateFacesById != NULL)
	sqlite3_finalize (ptr->stmt_updateFacesById);
    if (ptr->stmt_deleteFacesById != NULL)
	sqlite3_finalize (ptr->stmt_deleteFacesById);
    if (ptr->stmt_deleteNodesById != NULL)
	sqlite3_finalize (ptr->stmt_deleteNodesById);
    if (ptr->stmt_getRingEdges != NULL)
	sqlite3_finalize (ptr->stmt_getRingEdges);
    ptr->stmt_getNodeWithinDistance2D = NULL;
    ptr->stmt_insertNodes = NULL;
    ptr->stmt_getEdgeWithinDistance2D = NULL;
    ptr->stmt_getNextEdgeId = NULL;
    ptr->stmt_setNextEdgeId = NULL;
    ptr->stmt_insertEdges = NULL;
    ptr->stmt_getFaceContainingPoint_1 = NULL;
    ptr->stmt_getFaceContainingPoint_2 = NULL;
    ptr->stmt_deleteEdges = NULL;
    ptr->stmt_getNodeWithinBox2D = NULL;
    ptr->stmt_getEdgeWithinBox2D = NULL;
    ptr->stmt_getFaceWithinBox2D = NULL;
    ptr->stmt_getAllEdges = NULL;
    ptr->stmt_updateNodes = NULL;
    ptr->stmt_insertFaces = NULL;
    ptr->stmt_updateFacesById = NULL;
    ptr->stmt_deleteFacesById = NULL;
    ptr->stmt_deleteNodesById = NULL;
    ptr->stmt_getRingEdges = NULL;
}

TOPOLOGY_PRIVATE void
create_topogeo_prepared_stmts (GaiaTopologyAccessorPtr accessor)
{
/* creating the SQL prepared statements */
    struct gaia_topology *ptr = (struct gaia_topology *) accessor;
    finalize_topogeo_prepared_stmts (accessor);
    ptr->stmt_getNodeWithinDistance2D =
	do_create_stmt_getNodeWithinDistance2D (accessor);
    ptr->stmt_insertNodes = do_create_stmt_insertNodes (accessor);
    ptr->stmt_getEdgeWithinDistance2D =
	do_create_stmt_getEdgeWithinDistance2D (accessor);
    ptr->stmt_getNextEdgeId = do_create_stmt_getNextEdgeId (accessor);
    ptr->stmt_setNextEdgeId = do_create_stmt_setNextEdgeId (accessor);
    ptr->stmt_insertEdges = do_create_stmt_insertEdges (accessor);
    ptr->stmt_getFaceContainingPoint_1 =
	do_create_stmt_getFaceContainingPoint_1 (accessor);
    ptr->stmt_getFaceContainingPoint_2 =
	do_create_stmt_getFaceContainingPoint_2 (accessor);
    ptr->stmt_deleteEdges = NULL;
    ptr->stmt_getNodeWithinBox2D = do_create_stmt_getNodeWithinBox2D (accessor);
    ptr->stmt_getEdgeWithinBox2D = do_create_stmt_getEdgeWithinBox2D (accessor);
    ptr->stmt_getFaceWithinBox2D = do_create_stmt_getFaceWithinBox2D (accessor);
    ptr->stmt_getAllEdges = do_create_stmt_getAllEdges (accessor);
    ptr->stmt_updateNodes = NULL;
    ptr->stmt_insertFaces = do_create_stmt_insertFaces (accessor);
    ptr->stmt_updateFacesById = do_create_stmt_updateFacesById (accessor);
    ptr->stmt_deleteFacesById = do_create_stmt_deleteFacesById (accessor);
    ptr->stmt_deleteNodesById = do_create_stmt_deleteNodesById (accessor);
    ptr->stmt_getRingEdges = do_create_stmt_getRingEdges (accessor);
}

TOPOLOGY_PRIVATE void
finalize_all_topo_prepared_stmts (const void *p_cache)
{
/* finalizing all Topology-related prepared Stms */
    struct gaia_topology *p_topo;
    struct gaia_network *p_network;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

    p_topo = (struct gaia_topology *) cache->firstTopology;
    while (p_topo != NULL)
      {
	  finalize_topogeo_prepared_stmts ((GaiaTopologyAccessorPtr) p_topo);
	  p_topo = p_topo->next;
      }

    p_network = (struct gaia_network *) cache->firstNetwork;
    while (p_network != NULL)
      {
	  finalize_toponet_prepared_stmts ((GaiaNetworkAccessorPtr) p_network);
	  p_network = p_network->next;
      }
}

TOPOLOGY_PRIVATE void
create_all_topo_prepared_stmts (const void *p_cache)
{
/* (re)creating all Topology-related prepared Stms */
    struct gaia_topology *p_topo;
    struct gaia_network *p_network;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) p_cache;
    if (cache == NULL)
	return;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return;

    p_topo = (struct gaia_topology *) cache->firstTopology;
    while (p_topo != NULL)
      {
	  create_topogeo_prepared_stmts ((GaiaTopologyAccessorPtr) p_topo);
	  p_topo = p_topo->next;
      }

    p_network = (struct gaia_network *) cache->firstNetwork;
    while (p_network != NULL)
      {
	  create_toponet_prepared_stmts ((GaiaNetworkAccessorPtr) p_network);
	  p_network = p_network->next;
      }
}

TOPOLOGY_PRIVATE void
gaiatopo_reset_last_error_msg (GaiaTopologyAccessorPtr accessor)
{
/* resets the last Topology error message */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return;

    if (topo->cache != NULL)
	gaiaResetRtTopoMsg (topo->cache);
    if (topo->last_error_message != NULL)
	free (topo->last_error_message);
    topo->last_error_message = NULL;
}

TOPOLOGY_PRIVATE void
gaiatopo_set_last_error_msg (GaiaTopologyAccessorPtr accessor, const char *msg)
{
/* sets the last Topology error message */
    int len;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (msg == NULL)
	msg = "no message available";

    spatialite_e ("%s\n", msg);
    if (topo == NULL)
	return;

    if (topo->last_error_message != NULL)
	return;

    len = strlen (msg);
    topo->last_error_message = malloc (len + 1);
    strcpy (topo->last_error_message, msg);
}

TOPOLOGY_PRIVATE const char *
gaiatopo_get_last_exception (GaiaTopologyAccessorPtr accessor)
{
/* returns the last Topology error message */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return NULL;

    return topo->last_error_message;
}

GAIATOPO_DECLARE int
gaiaTopologyDrop (sqlite3 * handle, const char *topo_name)
{
/* attempting to drop an already existing Topology */
    int ret;
    char *sql;

/* creating the Topologies table (just in case) */
    if (!do_create_topologies (handle))
	return 0;

/* testing for existing DBMS objects */
    if (!check_existing_topology (handle, topo_name, 0))
	return 0;

/* dropping all topofeature tables (if any) */
    if (!do_drop_topofeature_tables (handle, topo_name))
	goto error;

/* dropping the Topology own Tables */
    if (!do_drop_topo_view (handle, topo_name, "edge_seeds"))
	goto error;
    if (!do_drop_topo_view (handle, topo_name, "face_seeds"))
	goto error;
    if (!do_drop_topo_view (handle, topo_name, "face_geoms"))
	goto error;
    if (!do_drop_topo_table (handle, topo_name, "topofeatures", 0))
	goto error;
    if (!do_drop_topo_table (handle, topo_name, "topolayers", 0))
	goto error;
    if (!do_drop_topo_table (handle, topo_name, "seeds", 1))
	goto error;
    if (!do_drop_topo_table (handle, topo_name, "edge", 1))
	goto error;
    if (!do_drop_topo_table (handle, topo_name, "node", 1))
	goto error;
    if (!do_drop_topo_table (handle, topo_name, "face", 1))
	goto error;

/* unregistering the Topology */
    sql =
	sqlite3_mprintf
	("DELETE FROM MAIN.topologies WHERE Lower(topology_name) = Lower(%Q)",
	 topo_name);
    ret = sqlite3_exec (handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;

    return 1;

  error:
    return 0;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaAddIsoNode (GaiaTopologyAccessorPtr accessor,
		sqlite3_int64 face, gaiaPointPtr pt, int skip_checks)
{
/* RTT wrapper - AddIsoNode */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_AddIsoNode ((RTT_TOPOLOGY *) (topo->rtt_topology), face, rt_pt,
			skip_checks);

    rtpoint_free (ctx, rt_pt);
    return ret;
}

GAIATOPO_DECLARE int
gaiaMoveIsoNode (GaiaTopologyAccessorPtr accessor,
		 sqlite3_int64 node, gaiaPointPtr pt)
{
/* RTT wrapper - MoveIsoNode */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    int ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    gaiaResetRtTopoMsg (cache);
    ret = rtt_MoveIsoNode ((RTT_TOPOLOGY *) (topo->rtt_topology), node, rt_pt);

    rtpoint_free (ctx, rt_pt);
    if (ret == 0)
	return 1;
    return 0;
}

GAIATOPO_DECLARE int
gaiaRemIsoNode (GaiaTopologyAccessorPtr accessor, sqlite3_int64 node)
{
/* RTT wrapper - RemIsoNode */
    struct splite_internal_cache *cache = NULL;
    int ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;

    gaiaResetRtTopoMsg (cache);
    ret = rtt_RemoveIsoNode ((RTT_TOPOLOGY *) (topo->rtt_topology), node);

    if (ret == 0)
	return 1;
    return 0;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaAddIsoEdge (GaiaTopologyAccessorPtr accessor,
		sqlite3_int64 start_node, sqlite3_int64 end_node,
		gaiaLinestringPtr ln)
{
/* RTT wrapper - AddIsoEdge */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    RTLINE *rt_line;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_line =
	gaia_convert_linestring_to_rtline (ctx, ln, topo->srid, topo->has_z);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_AddIsoEdge ((RTT_TOPOLOGY *) (topo->rtt_topology), start_node,
			end_node, rt_line);

    rtline_free (ctx, rt_line);
    return ret;
}

GAIATOPO_DECLARE int
gaiaRemIsoEdge (GaiaTopologyAccessorPtr accessor, sqlite3_int64 edge)
{
/* RTT wrapper - RemIsoEdge */
    struct splite_internal_cache *cache = NULL;
    int ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;

    gaiaResetRtTopoMsg (cache);
    ret = rtt_RemIsoEdge ((RTT_TOPOLOGY *) (topo->rtt_topology), edge);

    if (ret == 0)
	return 1;
    return 0;
}

GAIATOPO_DECLARE int
gaiaChangeEdgeGeom (GaiaTopologyAccessorPtr accessor,
		    sqlite3_int64 edge_id, gaiaLinestringPtr ln)
{
/* RTT wrapper - ChangeEdgeGeom  */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    int ret;
    RTLINE *rt_line;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_line =
	gaia_convert_linestring_to_rtline (ctx, ln, topo->srid, topo->has_z);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_ChangeEdgeGeom ((RTT_TOPOLOGY *) (topo->rtt_topology), edge_id,
			    rt_line);

    rtline_free (ctx, rt_line);
    if (ret == 0)
	return 1;
    return 0;
}

static void
do_check_mod_split_edge3d (struct gaia_topology *topo, gaiaPointPtr pt,
			   sqlite3_int64 old_edge)
{
/*
/ defensive programming: carefully ensuring that lwgeom could
/ never shift Edges' start/end points after computing ModSplit
/ 3D topology
*/
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    double x1s;
    double y1s;
    double z1s;
    double x1e;
    double y1e;
    double z1e;
    double x2s;
    double y2s;
    double z2s;
    double x2e;
    double y2e;
    double z2e;
    sqlite3_int64 new_edge = sqlite3_last_insert_rowid (topo->db_handle);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("SELECT ST_X(ST_StartPoint(geom)), ST_Y(ST_StartPoint(geom)), "
	 "ST_Z(ST_StartPoint(geom)), ST_X(ST_EndPoint(geom)), ST_Y(ST_EndPoint(geom)), "
	 "ST_Z(ST_EndPoint(geom)) FROM \"%s\" WHERE edge_id = ?", xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, old_edge);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		x1s = sqlite3_column_double (stmt, 0);
		y1s = sqlite3_column_double (stmt, 1);
		z1s = sqlite3_column_double (stmt, 2);
		x1e = sqlite3_column_double (stmt, 3);
		y1e = sqlite3_column_double (stmt, 4);
		z1e = sqlite3_column_double (stmt, 5);
	    }
	  else
	      goto error;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, new_edge);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		x2s = sqlite3_column_double (stmt, 0);
		y2s = sqlite3_column_double (stmt, 1);
		z2s = sqlite3_column_double (stmt, 2);
		x2e = sqlite3_column_double (stmt, 3);
		y2e = sqlite3_column_double (stmt, 4);
		z2e = sqlite3_column_double (stmt, 5);
	    }
	  else
	      goto error;
      }
    if (x1s == x2e && y1s == y2e && z1s == z2e)
      {
	  /* just silencing stupid compiler warnings */
	  ;
      }
    if (x1e == x2s && y1e == y2s && z1e == z2s)
      {
	  if (x1e != pt->X || y1e != pt->Y || z1e != pt->Z)
	      goto fixme;
      }
  error:
    sqlite3_finalize (stmt);
    return;

  fixme:
    sqlite3_finalize (stmt);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("UPDATE \"%s\" SET geom = ST_SetEndPoint(geom, MakePointZ(?, ?, ?)) WHERE edge_id = ?",
	 xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, pt->X);
    sqlite3_bind_double (stmt, 2, pt->Y);
    sqlite3_bind_double (stmt, 3, pt->Z);
    sqlite3_bind_int64 (stmt, 4, old_edge);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	goto error2;

    sqlite3_finalize (stmt);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("UPDATE \"%s\" SET geom = ST_SetStartPoint(geom, MakePointZ(?, ?, ?)) WHERE edge_id = ?",
	 xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, pt->X);
    sqlite3_bind_double (stmt, 2, pt->Y);
    sqlite3_bind_double (stmt, 3, pt->Z);
    sqlite3_bind_int64 (stmt, 4, new_edge);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	goto error2;

  error2:
    sqlite3_finalize (stmt);
    return;
}

static void
do_check_mod_split_edge (struct gaia_topology *topo, gaiaPointPtr pt,
			 sqlite3_int64 old_edge)
{
/*
/ defensive programming: carefully ensuring that lwgeom could
/ never shift Edges' start/end points after computing ModSplit
/ 2D topology
*/
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    double x1s;
    double y1s;
    double x1e;
    double y1e;
    double x2s;
    double y2s;
    double x2e;
    double y2e;
    sqlite3_int64 new_edge;
    if (topo->has_z)
      {
	  do_check_mod_split_edge3d (topo, pt, old_edge);
	  return;
      }

    new_edge = sqlite3_last_insert_rowid (topo->db_handle);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("SELECT ST_X(ST_StartPoint(geom)), ST_Y(ST_StartPoint(geom)), "
	 "ST_X(ST_EndPoint(geom)), ST_Y(ST_EndPoint(geom)) FROM \"%s\" WHERE edge_id = ?",
	 xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, old_edge);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		x1s = sqlite3_column_double (stmt, 0);
		y1s = sqlite3_column_double (stmt, 1);
		x1e = sqlite3_column_double (stmt, 2);
		y1e = sqlite3_column_double (stmt, 3);
	    }
	  else
	      goto error;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, new_edge);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		x2s = sqlite3_column_double (stmt, 0);
		y2s = sqlite3_column_double (stmt, 1);
		x2e = sqlite3_column_double (stmt, 2);
		y2e = sqlite3_column_double (stmt, 3);
	    }
	  else
	      goto error;
      }
    if (x1s == x2e && y1s == y2e)
      {
	  /* just silencing stupid compiler warnings */
	  ;
      }
    if (x1e == x2s && y1e == y2s)
      {
	  if (x1e != pt->X || y1e != pt->Y)
	      goto fixme;
      }
  error:
    sqlite3_finalize (stmt);
    return;

  fixme:
    sqlite3_finalize (stmt);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("UPDATE \"%s\" SET geom = ST_SetEndPoint(geom, MakePoint(?, ?)) WHERE edge_id = ?",
	 xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, pt->X);
    sqlite3_bind_double (stmt, 2, pt->Y);
    sqlite3_bind_int64 (stmt, 3, old_edge);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	goto error2;

    sqlite3_finalize (stmt);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("UPDATE \"%s\" SET geom = ST_SetStartPoint(geom, MakePoint(?, ?)) WHERE edge_id = ?",
	 xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return;
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, pt->X);
    sqlite3_bind_double (stmt, 2, pt->Y);
    sqlite3_bind_int64 (stmt, 3, new_edge);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
	goto error2;

  error2:
    sqlite3_finalize (stmt);
    return;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaModEdgeSplit (GaiaTopologyAccessorPtr accessor,
		  sqlite3_int64 edge, gaiaPointPtr pt, int skip_checks)
{
/* RTT wrapper - ModEdgeSplit */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_ModEdgeSplit ((RTT_TOPOLOGY *) (topo->rtt_topology), edge, rt_pt,
			  skip_checks);

    rtpoint_free (ctx, rt_pt);

    if (ret > 0)
	do_check_mod_split_edge (topo, pt, edge);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaNewEdgesSplit (GaiaTopologyAccessorPtr accessor,
		   sqlite3_int64 edge, gaiaPointPtr pt, int skip_checks)
{
/* RTT wrapper - NewEdgesSplit */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_NewEdgesSplit ((RTT_TOPOLOGY *) (topo->rtt_topology), edge, rt_pt,
			   skip_checks);

    rtpoint_free (ctx, rt_pt);
    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaAddEdgeModFace (GaiaTopologyAccessorPtr accessor,
		    sqlite3_int64 start_node, sqlite3_int64 end_node,
		    gaiaLinestringPtr ln, int skip_checks)
{
/* RTT wrapper - AddEdgeModFace */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    RTLINE *rt_line;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_line =
	gaia_convert_linestring_to_rtline (ctx, ln, topo->srid, topo->has_z);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_AddEdgeModFace ((RTT_TOPOLOGY *) (topo->rtt_topology), start_node,
			    end_node, rt_line, skip_checks);

    rtline_free (ctx, rt_line);
    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaAddEdgeNewFaces (GaiaTopologyAccessorPtr accessor,
		     sqlite3_int64 start_node, sqlite3_int64 end_node,
		     gaiaLinestringPtr ln, int skip_checks)
{
/* RTT wrapper - AddEdgeNewFaces */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    RTLINE *rt_line;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_line =
	gaia_convert_linestring_to_rtline (ctx, ln, topo->srid, topo->has_z);

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_AddEdgeNewFaces ((RTT_TOPOLOGY *) (topo->rtt_topology), start_node,
			     end_node, rt_line, skip_checks);

    rtline_free (ctx, rt_line);
    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaRemEdgeNewFace (GaiaTopologyAccessorPtr accessor, sqlite3_int64 edge_id)
{
/* RTT wrapper - RemEdgeNewFace */
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;

    gaiaResetRtTopoMsg (cache);
    ret = rtt_RemEdgeNewFace ((RTT_TOPOLOGY *) (topo->rtt_topology), edge_id);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaRemEdgeModFace (GaiaTopologyAccessorPtr accessor, sqlite3_int64 edge_id)
{
/* RTT wrapper - RemEdgeModFace */
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;

    gaiaResetRtTopoMsg (cache);
    ret = rtt_RemEdgeModFace ((RTT_TOPOLOGY *) (topo->rtt_topology), edge_id);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaNewEdgeHeal (GaiaTopologyAccessorPtr accessor, sqlite3_int64 edge_id1,
		 sqlite3_int64 edge_id2)
{
/* RTT wrapper - NewEdgeHeal */
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_NewEdgeHeal ((RTT_TOPOLOGY *) (topo->rtt_topology), edge_id1,
			 edge_id2);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaModEdgeHeal (GaiaTopologyAccessorPtr accessor, sqlite3_int64 edge_id1,
		 sqlite3_int64 edge_id2)
{
/* RTT wrapper - ModEdgeHeal */
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_ModEdgeHeal ((RTT_TOPOLOGY *) (topo->rtt_topology), edge_id1,
			 edge_id2);

    return ret;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaGetFaceGeometry (GaiaTopologyAccessorPtr accessor, sqlite3_int64 face)
{
/* RTT wrapper - GetFaceGeometry */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    RTGEOM *result = NULL;
    RTPOLY *rtpoly;
    int has_z = 0;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int iv;
    int ib;
    double x;
    double y;
    double z;
    gaiaGeomCollPtr geom;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    int dimension_model;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    result = rtt_GetFaceGeometry ((RTT_TOPOLOGY *) (topo->rtt_topology), face);
    if (result == NULL)
	return NULL;

/* converting the result as a Gaia Geometry */
    rtpoly = (RTPOLY *) result;
    if (rtpoly->nrings <= 0)
      {
	  /* empty geometry */
	  rtgeom_free (ctx, result);
	  return NULL;
      }
    pa = rtpoly->rings[0];
    if (pa->npoints <= 0)
      {
	  /* empty geometry */
	  rtgeom_free (ctx, result);
	  return NULL;
      }
    if (RTFLAGS_GET_Z (pa->flags))
	has_z = 1;
    if (has_z)
      {
	  dimension_model = GAIA_XY_Z;
	  geom = gaiaAllocGeomCollXYZ ();
      }
    else
      {
	  dimension_model = GAIA_XY;
	  geom = gaiaAllocGeomColl ();
      }
    pg = gaiaAddPolygonToGeomColl (geom, pa->npoints, rtpoly->nrings - 1);
    rng = pg->Exterior;
    for (iv = 0; iv < pa->npoints; iv++)
      {
	  /* copying Exterior Ring vertices */
	  rt_getPoint4d_p (ctx, pa, iv, &pt4d);
	  x = pt4d.x;
	  y = pt4d.y;
	  if (has_z)
	      z = pt4d.z;
	  else
	      z = 0.0;
	  if (dimension_model == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
	    }
	  else
	    {
		gaiaSetPoint (rng->Coords, iv, x, y);
	    }
      }
    for (ib = 1; ib < rtpoly->nrings; ib++)
      {
	  has_z = 0;
	  pa = rtpoly->rings[ib];
	  if (RTFLAGS_GET_Z (pa->flags))
	      has_z = 1;
	  rng = gaiaAddInteriorRing (pg, ib - 1, pa->npoints);
	  for (iv = 0; iv < pa->npoints; iv++)
	    {
		/* copying Exterior Ring vertices */
		rt_getPoint4d_p (ctx, pa, iv, &pt4d);
		x = pt4d.x;
		y = pt4d.y;
		if (has_z)
		    z = pt4d.z;
		else
		    z = 0.0;
		if (dimension_model == GAIA_XY_Z)
		  {
		      gaiaSetPointXYZ (rng->Coords, iv, x, y, z);
		  }
		else
		  {
		      gaiaSetPoint (rng->Coords, iv, x, y);
		  }
	    }
      }
    rtgeom_free (ctx, result);
    geom->DeclaredType = GAIA_POLYGON;
    geom->Srid = topo->srid;
    return geom;
}

static int
do_check_create_faceedges_table (GaiaTopologyAccessorPtr accessor)
{
/* attemtping to create or validate the target table */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int exists = 0;
    int ok_face_id = 0;
    int ok_sequence = 0;
    int ok_edge_id = 0;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

/* testing for an already existing table */
    table = sqlite3_mprintf ("%s_face_edges_temp", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("PRAGMA TEMP.table_info(\"%s\")", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_GetFaceEdges exception: %s", errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *name = results[(i * columns) + 1];
	  const char *type = results[(i * columns) + 2];
	  const char *notnull = results[(i * columns) + 3];
	  const char *dflt_value = results[(i * columns) + 4];
	  const char *pk = results[(i * columns) + 5];
	  if (strcmp (name, "face_id") == 0 && strcmp (type, "INTEGER") == 0
	      && strcmp (notnull, "1") == 0 && dflt_value == NULL
	      && strcmp (pk, "1") == 0)
	      ok_face_id = 1;
	  if (strcmp (name, "sequence") == 0 && strcmp (type, "INTEGER") == 0
	      && strcmp (notnull, "1") == 0 && dflt_value == NULL
	      && strcmp (pk, "2") == 0)
	      ok_sequence = 1;
	  if (strcmp (name, "edge_id") == 0 && strcmp (type, "INTEGER") == 0
	      && strcmp (notnull, "1") == 0 && dflt_value == NULL
	      && strcmp (pk, "0") == 0)
	      ok_edge_id = 1;
	  exists = 1;
      }
    sqlite3_free_table (results);
    if (ok_face_id && ok_sequence && ok_edge_id)
	return 1;		/* already existing and valid */

    if (exists)
	return 0;		/* already existing but invalid */

/* attempting to create the table */
    table = sqlite3_mprintf ("%s_face_edges_temp", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TEMP TABLE \"%s\" (\n\tface_id INTEGER NOT NULL,\n"
	 "\tsequence INTEGER NOT NULL,\n\tedge_id INTEGER NOT NULL,\n"
	 "\tCONSTRAINT pk_topo_facee_edges PRIMARY KEY (face_id, sequence))",
	 xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_GetFaceEdges exception: %s", errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    return 1;
}

static int
do_populate_faceedges_table (GaiaTopologyAccessorPtr accessor,
			     sqlite3_int64 face, RTT_ELEMID * edges,
			     int num_edges)
{
/* populating the target table */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    int i;
    sqlite3_stmt *stmt = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

/* deleting all rows belonging to Face (if any) */
    table = sqlite3_mprintf ("%s_face_edges_temp", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM TEMP.\"%s\" WHERE face_id = ?", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_GetFaceEdges exception: %s",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, face);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *msg = sqlite3_mprintf ("ST_GetFaceEdges exception: %s",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    sqlite3_finalize (stmt);
    stmt = NULL;

/* preparing the INSERT statement */
    table = sqlite3_mprintf ("%s_face_edges_temp", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO TEMP.\"%s\" (face_id, sequence, edge_id) VALUES (?, ?, ?)",
	 xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_GetFaceEdges exception: %s",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    for (i = 0; i < num_edges; i++)
      {
	  /* inserting all Face/Edges */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, face);
	  sqlite3_bind_int (stmt, 2, i + 1);
	  sqlite3_bind_int64 (stmt, 3, *(edges + i));
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		char *msg = sqlite3_mprintf ("ST_GetFaceEdges exception: %s",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

GAIATOPO_DECLARE int
gaiaGetFaceEdges (GaiaTopologyAccessorPtr accessor, sqlite3_int64 face)
{
/* RTT wrapper - GetFaceEdges */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    RTT_ELEMID *edges = NULL;
    int num_edges;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    gaiaResetRtTopoMsg (cache);

    num_edges =
	rtt_GetFaceEdges ((RTT_TOPOLOGY *) (topo->rtt_topology), face, &edges);

    if (num_edges < 0)
	return 0;

    if (num_edges > 0)
      {
	  /* attemtping to create or validate the target table */
	  if (!do_check_create_faceedges_table (accessor))
	    {
		rtfree (ctx, edges);
		return 0;
	    }

	  /* populating the target table */
	  if (!do_populate_faceedges_table (accessor, face, edges, num_edges))
	    {
		rtfree (ctx, edges);
		return 0;
	    }
      }
    rtfree (ctx, edges);
    return 1;
}

static int
do_check_create_validate_topogeo_table (GaiaTopologyAccessorPtr accessor)
{
/* attemtping to create or validate the target table */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    char *errMsg = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

/* finalizing all prepared Statements */
    finalize_all_topo_prepared_stmts (topo->cache);

/* attempting to drop the table (just in case if it already exists) */
    table = sqlite3_mprintf ("%s_validate_topogeo", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE IF EXISTS temp.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    create_all_topo_prepared_stmts (topo->cache);	/* recreating prepared stsms */
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidSpatialNet exception: %s", errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }
/* attempting to create the table */
    table = sqlite3_mprintf ("%s_validate_topogeo", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("CREATE TEMP TABLE \"%s\" (\n\terror TEXT,\n"
	 "\tprimitive1 INTEGER,\n\tprimitive2 INTEGER)", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidateTopoGeo exception: %s", errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    return 1;
}

static int
do_topo_check_coincident_nodes (GaiaTopologyAccessorPtr accessor,
				sqlite3_stmt * stmt)
{
/* checking for coincident nodes */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT n1.node_id, n2.node_id FROM MAIN.\"%s\" AS n1 "
			 "JOIN MAIN.\"%s\" AS n2 ON (n1.node_id <> n2.node_id AND "
			 "ST_Equals(n1.geom, n2.geom) = 1 AND n2.node_id IN "
			 "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = n1.geom))",
			 xtable, xtable, table);
    sqlite3_free (table);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - CoicidentNodes error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id1 = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 node_id2 = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "coincident nodes", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, node_id1);
		sqlite3_bind_int64 (stmt, 3, node_id2);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #1 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - CoicidentNodes step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_edge_node (GaiaTopologyAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for edge-node crossing */
    char *sql;
    char *table;
    char *xtable1;
    char *xtable2;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("SELECT e.edge_id, n.node_id FROM MAIN.\"%s\" AS e "
			   "JOIN MAIN.\"%s\" AS n ON (ST_Distance(e.geom, n.geom) <= 0 "
			   "AND ST_Disjoint(ST_StartPoint(e.geom), n.geom) = 1 AND "
			   "ST_Disjoint(ST_EndPoint(e.geom), n.geom) = 1 AND n.node_id IN "
			   "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND "
			   "f_geometry_column = 'geom' AND search_frame = e.geom))",
			   xtable1, xtable2, table);
    sqlite3_free (table);
    free (xtable1);
    free (xtable2);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - EdgeCrossedNode error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "edge crosses node", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, node_id);
		sqlite3_bind_int64 (stmt, 3, edge_id);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #2 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - EdgeCrossedNode step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_non_simple (GaiaTopologyAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for non-simple edges */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT edge_id FROM MAIN.\"%s\" WHERE ST_IsSimple(geom) = 0", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - NonSimpleEdge error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_in, 0);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "edge not simple", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, edge_id);
		sqlite3_bind_null (stmt, 3);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #3 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - NonSimpleEdge step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_edge_edge (GaiaTopologyAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for edge-edge crossing */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
/*
    sql =
	sqlite3_mprintf ("SELECT e1.edge_id, e2.edge_id FROM MAIN.\"%s\" AS e1 "
			 "JOIN MAIN.\"%s\" AS e2 ON (e1.edge_id <> e2.edge_id AND "
			 "ST_Crosses(e1.geom, e2.geom) = 1 AND e2.edge_id IN "
			 "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = e1.geom))",
			 xtable, xtable, table);
*/
    sql =
	sqlite3_mprintf ("SELECT e1.edge_id, e2.edge_id FROM MAIN.\"%s\" AS e1 "
			 "JOIN MAIN.\"%s\" AS e2 ON (e1.edge_id <> e2.edge_id AND "
			 "ST_RelateMatch(ST_Relate(e1.geom, e2.geom), '0******0*') = 1 AND e2.edge_id IN "
			 "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = e1.geom))",
			 xtable, xtable, table);
    sqlite3_free (table);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - EdgeCrossesEdge error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id1 = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 edge_id2 = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "edge crosses edge", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, edge_id1);
		sqlite3_bind_int64 (stmt, 3, edge_id2);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #4 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - EdgeCrossesEdge step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_start_nodes (GaiaTopologyAccessorPtr accessor,
			   sqlite3_stmt * stmt)
{
/* checking for edges mismatching start nodes */
    char *sql;
    char *table;
    char *xtable1;
    char *xtable2;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT e.edge_id, e.start_node FROM MAIN.\"%s\" AS e "
			 "JOIN MAIN.\"%s\" AS n ON (e.start_node = n.node_id) "
			 "WHERE ST_Disjoint(ST_StartPoint(e.geom), n.geom) = 1",
			 xtable1, xtable2);
    free (xtable1);
    free (xtable2);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - StartNodes error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "geometry start mismatch", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, edge_id);
		sqlite3_bind_int64 (stmt, 3, node_id);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #5 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - StartNodes step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_end_nodes (GaiaTopologyAccessorPtr accessor, sqlite3_stmt * stmt)
{
/* checking for edges mismatching end nodes */
    char *sql;
    char *table;
    char *xtable1;
    char *xtable2;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT e.edge_id, e.end_node FROM MAIN.\"%s\" AS e "
			   "JOIN MAIN.\"%s\" AS n ON (e.end_node = n.node_id) "
			   "WHERE ST_Disjoint(ST_EndPoint(e.geom), n.geom) = 1",
			   xtable1, xtable2);
    free (xtable1);
    free (xtable2);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidateTopoGeo() - EndNodes error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "geometry end mismatch", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, edge_id);
		sqlite3_bind_int64 (stmt, 3, node_id);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #6 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - EndNodes step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_face_no_edges (GaiaTopologyAccessorPtr accessor,
			     sqlite3_stmt * stmt)
{
/* checking for faces with no edges */
    char *sql;
    char *table;
    char *xtable1;
    char *xtable2;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT f.face_id, Count(e1.edge_id) AS cnt1, "
			   "Count(e2.edge_id) AS cnt2 FROM MAIN.\"%s\" AS f "
			   "LEFT JOIN MAIN.\"%s\" AS e1 ON (f.face_id = e1.left_face) "
			   "LEFT JOIN MAIN.\"%s\" AS e2 ON (f.face_id = e2.right_face) "
			   "GROUP BY f.face_id HAVING cnt1 = 0 AND cnt2 = 0",
			   xtable1, xtable2, xtable2);
    free (xtable1);
    free (xtable2);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - FaceNoEdges error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id = sqlite3_column_int64 (stmt_in, 0);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "face without edges", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, face_id);
		sqlite3_bind_null (stmt, 3);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #7 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - FaceNoEdges step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_no_universal_face (GaiaTopologyAccessorPtr accessor,
				 sqlite3_stmt * stmt)
{
/* checking for missing universal face */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int count = 0;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\" WHERE face_id = 0",
			 xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  count = atoi (results[(i * columns) + 0]);
      }
    sqlite3_free_table (results);

    if (count <= 0)
      {
	  /* reporting the error */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_text (stmt, 1, "no universal face", -1, SQLITE_STATIC);
	  sqlite3_bind_null (stmt, 2);
	  sqlite3_bind_null (stmt, 3);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() insert #8 error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    return 1;
}

static int
do_topo_check_create_aux_faces (GaiaTopologyAccessorPtr accessor)
{
/* creating the aux-Face temp table */
    char *table;
    char *xtable;
    char *sql;
    char *errMsg;
    int ret;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

/* creating the aux-face Temp Table */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    table = sqlite3_mprintf ("%s_aux_face_%d", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE TEMPORARY TABLE \"%s\" (\n"
			   "\tface_id INTEGER PRIMARY KEY,\n\tgeom BLOB)",
			   xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("CREATE TEMPORARY TABLE aux_face - error: %s\n",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* creating the exotic spatial index */
    table = sqlite3_mprintf ("%s_aux_face_%d_rtree", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("CREATE VIRTUAL TABLE temp.\"%s\" USING RTree "
			   "(id_face, x_min, x_max, y_min, y_max)", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("CREATE TEMPORARY TABLE aux_face - error: %s\n",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

static int
do_topo_check_build_aux_faces (GaiaTopologyAccessorPtr accessor,
			       sqlite3_stmt * stmt)
{
/* populating the aux-face Temp Table */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    sqlite3_stmt *stmt_rtree = NULL;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

/* preparing the input SQL statement */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT face_id, ST_GetFaceGeometry(%Q, face_id) "
			   "FROM MAIN.\"%s\" WHERE face_id <> 0",
			   topo->topology_name, xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - GetFaceGeometry error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the output SQL statement */
    table = sqlite3_mprintf ("%s_aux_face_%d", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO TEMP.\"%s\" (face_id, geom) VALUES (?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_ValidateTopoGeo() - AuxFace error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the RTree SQL statement */
    table = sqlite3_mprintf ("%s_aux_face_%d_rtree", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("INSERT INTO TEMP.\"%s\" "
			   "(id_face, x_min, x_max, y_min, y_max) VALUES (?, ?, ?, ?, ?)",
			   xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_rtree,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - AuxFaceRTree error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		gaiaGeomCollPtr geom = NULL;
		const unsigned char *blob;
		int blob_sz;
		sqlite3_int64 face_id = sqlite3_column_int64 (stmt_in, 0);
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		  {
		      blob = sqlite3_column_blob (stmt_in, 1);
		      blob_sz = sqlite3_column_bytes (stmt_in, 1);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		  }
		if (geom == NULL)
		  {
		      /* reporting the error */
		      sqlite3_reset (stmt);
		      sqlite3_clear_bindings (stmt);
		      sqlite3_bind_text (stmt, 1, "invalid face geometry", -1,
					 SQLITE_STATIC);
		      sqlite3_bind_int64 (stmt, 2, face_id);
		      sqlite3_bind_null (stmt, 3);
		      ret = sqlite3_step (stmt);
		      if (ret == SQLITE_DONE || ret == SQLITE_ROW)
			  ;
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("ST_ValidateTopoGeo() insert #9 error: \"%s\"",
				 sqlite3_errmsg (topo->db_handle));
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      double xmin = geom->MinX;
		      double xmax = geom->MaxX;
		      double ymin = geom->MinY;
		      double ymax = geom->MaxY;
		      gaiaFreeGeomColl (geom);
		      /* inserting into AuxFace */
		      sqlite3_reset (stmt_out);
		      sqlite3_clear_bindings (stmt_out);
		      sqlite3_bind_int64 (stmt_out, 1, face_id);
		      sqlite3_bind_blob (stmt_out, 2, blob, blob_sz,
					 SQLITE_STATIC);
		      ret = sqlite3_step (stmt_out);
		      if (ret == SQLITE_DONE || ret == SQLITE_ROW)
			  ;
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("ST_ValidateTopoGeo() insert #10 error: \"%s\"",
				 sqlite3_errmsg (topo->db_handle));
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		      /* updating the AuxFaceRTree */
		      sqlite3_reset (stmt_rtree);
		      sqlite3_clear_bindings (stmt_rtree);
		      sqlite3_bind_int64 (stmt_rtree, 1, face_id);
		      sqlite3_bind_double (stmt_rtree, 2, xmin);
		      sqlite3_bind_double (stmt_rtree, 3, xmax);
		      sqlite3_bind_double (stmt_rtree, 4, ymin);
		      sqlite3_bind_double (stmt_rtree, 5, ymax);
		      ret = sqlite3_step (stmt_rtree);
		      if (ret == SQLITE_DONE || ret == SQLITE_ROW)
			  ;
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("ST_ValidateTopoGeo() insert #11 error: \"%s\"",
				 sqlite3_errmsg (topo->db_handle));
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - GetFaceGeometry step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    sqlite3_finalize (stmt_rtree);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out == NULL)
	sqlite3_finalize (stmt_out);
    if (stmt_rtree == NULL)
	sqlite3_finalize (stmt_rtree);
    return 0;
}

static int
do_topo_check_overlapping_faces (GaiaTopologyAccessorPtr accessor,
				 sqlite3_stmt * stmt)
{
/* checking for overlapping faces */
    char *sql;
    char *table;
    char *xtable;
    char *rtree;
    int ret;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;


#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    table = sqlite3_mprintf ("%s_aux_face_%d", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_aux_face_%d_rtree", topo->topology_name, pid);
    rtree = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT a.face_id, b.face_id FROM TEMP.\"%s\" AS a, TEMP.\"%s\" AS b "
	 "WHERE a.geom IS NOT NULL AND a.face_id <> b.face_id AND ST_Overlaps(a.geom, b.geom) = 1 "
	 "AND b.face_id IN (SELECT id_face FROM TEMP.\"%s\" WHERE x_min <= MbrMaxX(a.geom) "
	 "AND x_max >= MbrMinX(a.geom) AND y_min <= MbrMaxY(a.geom) AND y_max >= MbrMinY(a.geom))",
	 xtable, xtable, rtree);
    free (xtable);
    free (rtree);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - OverlappingFaces error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id1 = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 face_id2 = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "face overlaps face", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, face_id1);
		sqlite3_bind_int64 (stmt, 3, face_id2);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #12 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - OverlappingFaces step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_face_within_face (GaiaTopologyAccessorPtr accessor,
				sqlite3_stmt * stmt)
{
/* checking for face-within-face */
    char *sql;
    char *table;
    char *xtable;
    char *rtree;
    int ret;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    sqlite3_stmt *stmt_in = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;


#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    table = sqlite3_mprintf ("%s_aux_face_%d", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_aux_face_%d_rtree", topo->topology_name, pid);
    rtree = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT a.face_id, b.face_id FROM TEMP.\"%s\" AS a, TEMP.\"%s\" AS b "
	 "WHERE a.geom IS NOT NULL AND a.face_id <> b.face_id AND ST_Within(a.geom, b.geom) = 1 "
	 "AND b.face_id IN (SELECT id_face FROM TEMP.\"%s\" WHERE x_min <= MbrMaxX(a.geom) "
	 "AND x_max >= MbrMinX(a.geom) AND y_min <= MbrMaxY(a.geom) AND y_max >= MbrMinY(a.geom))",
	 xtable, xtable, rtree);
    free (xtable);
    free (rtree);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("ST_ValidateTopoGeo() - FaceWithinFace error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id1 = sqlite3_column_int64 (stmt_in, 0);
		sqlite3_int64 face_id2 = sqlite3_column_int64 (stmt_in, 1);
		/* reporting the error */
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_text (stmt, 1, "face within face", -1,
				   SQLITE_STATIC);
		sqlite3_bind_int64 (stmt, 2, face_id1);
		sqlite3_bind_int64 (stmt, 3, face_id2);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("ST_ValidateTopoGeo() insert #13 error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("ST_ValidateTopoGeo() - FaceWithinFace step error: %s",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_in);

    return 1;

  error:
    if (stmt_in == NULL)
	sqlite3_finalize (stmt_in);
    return 0;
}

static int
do_topo_check_drop_aux_faces (GaiaTopologyAccessorPtr accessor)
{
/* dropping the aux-Face temp table */
    char *table;
    char *xtable;
    char *sql;
    char *errMsg;
    int ret;
#if defined(_WIN32) && !defined(__MINGW32__)
    int pid;
#else
    pid_t pid;
#endif
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

/* finalizing all prepared Statements */
    finalize_all_topo_prepared_stmts (topo->cache);

/* dropping the aux-face Temp Table */
#if defined(_WIN32) && !defined(__MINGW32__)
    pid = _getpid ();
#else
    pid = getpid ();
#endif
    table = sqlite3_mprintf ("%s_aux_face_%d", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE TEMP.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    create_all_topo_prepared_stmts (topo->cache);	/* recreating prepared stsms */
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("DROP TABLE temp.aux_face - error: %s\n",
				       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* dropping the aux-face Temp RTree */
    table = sqlite3_mprintf ("%s_aux_face_%d_rtree", topo->topology_name, pid);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE TEMP.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("DROP TABLE temp.aux_face_rtree - error: %s\n",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

GAIATOPO_DECLARE int
gaiaValidateTopoGeo (GaiaTopologyAccessorPtr accessor)
{
/* generating a validity report for a given Topology */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    if (!do_check_create_validate_topogeo_table (accessor))
	return 0;

    table = sqlite3_mprintf ("%s_validate_topogeo", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO TEMP.\"%s\" (error, primitive1, primitive2) VALUES (?, ?, ?)",
	 xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("ST_ValidateTopoGeo error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    if (!do_topo_check_coincident_nodes (accessor, stmt))
	goto error;

    if (!do_topo_check_edge_node (accessor, stmt))
	goto error;

    if (!do_topo_check_non_simple (accessor, stmt))
	goto error;

    if (!do_topo_check_edge_edge (accessor, stmt))
	goto error;

    if (!do_topo_check_start_nodes (accessor, stmt))
	goto error;

    if (!do_topo_check_end_nodes (accessor, stmt))
	goto error;

    if (!do_topo_check_face_no_edges (accessor, stmt))
	goto error;

    if (!do_topo_check_no_universal_face (accessor, stmt))
	goto error;

    if (!do_topo_check_create_aux_faces (accessor))
	goto error;

    if (!do_topo_check_build_aux_faces (accessor, stmt))
	goto error;

    if (!do_topo_check_overlapping_faces (accessor, stmt))
	goto error;

    if (!do_topo_check_face_within_face (accessor, stmt))
	goto error;

    if (!do_topo_check_drop_aux_faces (accessor))
	goto error;

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaGetNodeByPoint (GaiaTopologyAccessorPtr accessor, gaiaPointPtr pt,
		    double tolerance)
{
/* RTT wrapper - GetNodeByPoint */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    if (tolerance < 0.0)
	tolerance = topo->tolerance;	/* using the standard tolerance */

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_GetNodeByPoint ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_pt,
			    tolerance);
    rtpoint_free (ctx, rt_pt);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaGetEdgeByPoint (GaiaTopologyAccessorPtr accessor, gaiaPointPtr pt,
		    double tolerance)
{
/* RTT wrapper - GetEdgeByPoint */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    if (tolerance < 0.0)
	tolerance = topo->tolerance;	/* using the standard tolerance */

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_GetEdgeByPoint ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_pt,
			    tolerance);
    rtpoint_free (ctx, rt_pt);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaGetFaceByPoint (GaiaTopologyAccessorPtr accessor, gaiaPointPtr pt,
		    double tolerance)
{
/* RTT wrapper - GetFaceByPoint */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    if (tolerance < 0.0)
	tolerance = topo->tolerance;	/* using the standard tolerance */

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_GetFaceByPoint ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_pt,
			    tolerance);
    rtpoint_free (ctx, rt_pt);

    return ret;
}

GAIATOPO_DECLARE sqlite3_int64
gaiaTopoGeo_AddPoint (GaiaTopologyAccessorPtr accessor, gaiaPointPtr pt,
		      double tolerance)
{
/* RTT wrapper - AddPoint */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    sqlite3_int64 ret;
    int has_z = 0;
    RTPOINT *rt_pt;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (pt->DimensionModel == GAIA_XY_Z || pt->DimensionModel == GAIA_XY_Z_M)
	has_z = 1;
    pa = ptarray_construct (ctx, has_z, 0, 1);
    point.x = pt->X;
    point.y = pt->Y;
    if (has_z)
	point.z = pt->Z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rt_pt = rtpoint_construct (ctx, topo->srid, NULL, pa);

    if (tolerance < 0.0)
	tolerance = topo->tolerance;	/* using the standard tolerance */

    gaiaResetRtTopoMsg (cache);
    ret =
	rtt_AddPoint ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_pt, tolerance);
    rtpoint_free (ctx, rt_pt);

    return ret;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_AddLineString (GaiaTopologyAccessorPtr accessor,
			   gaiaLinestringPtr ln, double tolerance,
			   sqlite3_int64 ** edge_ids, int *ids_count)
{
/* RTT wrapper - AddLinestring */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    int ret = 0;
    RTT_ELEMID *edgeids;
    int nedges;
    int i;
    sqlite3_int64 *ids;
    RTLINE *rt_line;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    *edge_ids = NULL;
    *ids_count = 0;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_line =
	gaia_convert_linestring_to_rtline (ctx, ln, topo->srid, topo->has_z);

    if (tolerance < 0.0)
	tolerance = topo->tolerance;	/* using the standard tolerance */

    gaiaResetRtTopoMsg (cache);
    edgeids =
	rtt_AddLine ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_line, tolerance,
		     &nedges);

    rtline_free (ctx, rt_line);
    if (edgeids != NULL)
      {
	  ids = malloc (sizeof (sqlite3_int64) * nedges);
	  for (i = 0; i < nedges; i++)
	      ids[i] = edgeids[i];
	  *edge_ids = ids;
	  *ids_count = nedges;
	  ret = 1;
	  rtfree (ctx, edgeids);
      }
    return ret;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_AddLineStringNoFace (GaiaTopologyAccessorPtr accessor,
				 gaiaLinestringPtr ln, double tolerance,
				 sqlite3_int64 ** edge_ids, int *ids_count)
{
/* RTT wrapper - AddLinestring NO FACE */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    int ret = 0;
    RTT_ELEMID *edgeids;
    int nedges;
    int i;
    sqlite3_int64 *ids;
    RTLINE *rt_line;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    *edge_ids = NULL;
    *ids_count = 0;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_line =
	gaia_convert_linestring_to_rtline (ctx, ln, topo->srid, topo->has_z);

    if (tolerance < 0.0)
	tolerance = topo->tolerance;	/* using the standard tolerance */

    gaiaResetRtTopoMsg (cache);
    edgeids =
	rtt_AddLineNoFace ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_line,
			   tolerance, &nedges);

    rtline_free (ctx, rt_line);
    if (edgeids != NULL)
      {
	  ids = malloc (sizeof (sqlite3_int64) * nedges);
	  for (i = 0; i < nedges; i++)
	      ids[i] = edgeids[i];
	  *edge_ids = ids;
	  *ids_count = nedges;
	  ret = 1;
	  rtfree (ctx, edgeids);
      }
    return ret;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_Polygonize (GaiaTopologyAccessorPtr accessor)
{
/* RTT wrapper - Determine and register all topology faces */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    gaiaResetRtTopoMsg (cache);
    if (rtt_Polygonize ((RTT_TOPOLOGY *) (topo->rtt_topology)) == 0)
	return 1;
    return 0;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaTopoSnap (GaiaTopologyAccessorPtr accessor, gaiaGeomCollPtr geom,
	      double tolerance_snap, double tolerance_removal, int iterate)
{
/* RTT wrapper - TopoSnap */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    RTGEOM *input = NULL;
    RTGEOM *result = NULL;
    gaiaGeomCollPtr output;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;
    if (!geom)
	return NULL;

    input = toRTGeom (ctx, geom);
    if (!input)
	return NULL;

    if (tolerance_snap < 0.0)
	tolerance_snap = topo->tolerance;

    result =
	rtt_tpsnap ((RTT_TOPOLOGY *) (topo->rtt_topology), input,
		    tolerance_snap, tolerance_removal, iterate);
    rtgeom_free (ctx, input);
    if (result == NULL)
	return NULL;

/* converting the result as a Gaia Geometry */
    output = fromRTGeom (ctx, result, geom->DimensionModel, geom->DeclaredType);
    output->Srid = geom->Srid;
    rtgeom_free (ctx, result);
    return output;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_AddPolygon (GaiaTopologyAccessorPtr accessor, gaiaPolygonPtr pg,
			double tolerance, sqlite3_int64 ** face_ids,
			int *ids_count)
{
/* RTT wrapper - AddPolygon */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    int ret = 0;
    RTT_ELEMID *faceids;
    int nfaces;
    int i;
    sqlite3_int64 *ids;
    RTPOLY *rt_polyg;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    cache = (struct splite_internal_cache *) topo->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    rt_polyg =
	gaia_convert_polygon_to_rtpoly (ctx, pg, topo->srid, topo->has_z);

    gaiaResetRtTopoMsg (cache);
    faceids =
	rtt_AddPolygon ((RTT_TOPOLOGY *) (topo->rtt_topology), rt_polyg,
			tolerance, &nfaces);

    rtpoly_free (ctx, rt_polyg);
    if (faceids != NULL)
      {
	  ids = malloc (sizeof (sqlite3_int64) * nfaces);
	  for (i = 0; i < nfaces; i++)
	      ids[i] = faceids[i];
	  *face_ids = ids;
	  *ids_count = nfaces;
	  ret = 1;
	  rtfree (ctx, faceids);
      }
    return ret;
}

static void
do_split_line (gaiaGeomCollPtr geom, gaiaDynamicLinePtr dyn)
{
/* inserting a new linestring into the collection of split lines */
    int points = 0;
    int iv = 0;
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;

    pt = dyn->First;
    while (pt != NULL)
      {
	  /* counting how many points */
	  points++;
	  pt = pt->Next;
      }

    ln = gaiaAddLinestringToGeomColl (geom, points);
    pt = dyn->First;
    while (pt != NULL)
      {
	  /* copying all points */
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaSetPointXYZ (ln->Coords, iv, pt->X, pt->Y, pt->Z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaSetPointXYM (ln->Coords, iv, pt->X, pt->Y, pt->M);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaSetPointXYZM (ln->Coords, iv, pt->X, pt->Y, pt->Z, pt->M);
	    }
	  else
	    {
		gaiaSetPoint (ln->Coords, iv, pt->X, pt->Y);
	    }
	  iv++;
	  pt = pt->Next;
      }
}

static void
do_geom_split_line (gaiaGeomCollPtr geom, gaiaLinestringPtr in,
		    int line_max_points, double max_length)
{
/* splitting a Linestring into a collection of shorter Linestrings */
    int iv;
    int count = 0;
    int split = 0;
    double tot_length = 0.0;
    gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine ();

    for (iv = 0; iv < in->Points; iv++)
      {
	  /* consuming all Points from the input Linestring */
	  double ox;
	  double oy;
	  double x;
	  double y;
	  double z = 0.0;
	  double m = 0.0;
	  if (in->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (in->Coords, iv, &x, &y, &z);
	    }
	  else if (in->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (in->Coords, iv, &x, &y, &m);
	    }
	  else if (in->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (in->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (in->Coords, iv, &x, &y);
	    }

	  split = 0;
	  if (max_length > 0.0)
	    {
		if (tot_length > max_length)
		    split = 1;
	    }
	  if (line_max_points > 0)
	    {
		if (count == line_max_points)
		    split = 1;
	    }
	  if (split && count >= 2)
	    {
		/* line break */
		double oz;
		double om;
		ox = dyn->Last->X;
		oy = dyn->Last->Y;
		if (in->DimensionModel == GAIA_XY_Z
		    || in->DimensionModel == GAIA_XY_Z_M)
		    oz = dyn->Last->Z;
		if (in->DimensionModel == GAIA_XY_M
		    || in->DimensionModel == GAIA_XY_Z_M)
		    om = dyn->Last->M;
		do_split_line (geom, dyn);
		gaiaFreeDynamicLine (dyn);
		dyn = gaiaAllocDynamicLine ();
		/* reinserting the last point */
		if (in->DimensionModel == GAIA_XY_Z)
		    gaiaAppendPointZToDynamicLine (dyn, ox, oy, oz);
		else if (in->DimensionModel == GAIA_XY_M)
		    gaiaAppendPointMToDynamicLine (dyn, ox, oy, om);
		else if (in->DimensionModel == GAIA_XY_Z_M)
		    gaiaAppendPointZMToDynamicLine (dyn, ox, oy, oz, om);
		else
		    gaiaAppendPointToDynamicLine (dyn, ox, oy);
		count = 1;
		tot_length = 0.0;
	    }

	  /* inserting a point */
	  if (in->DimensionModel == GAIA_XY_Z)
	      gaiaAppendPointZToDynamicLine (dyn, x, y, z);
	  else if (in->DimensionModel == GAIA_XY_M)
	      gaiaAppendPointMToDynamicLine (dyn, x, y, m);
	  else if (in->DimensionModel == GAIA_XY_Z_M)
	      gaiaAppendPointZMToDynamicLine (dyn, x, y, z, m);
	  else
	      gaiaAppendPointToDynamicLine (dyn, x, y);
	  if (count > 0)
	    {
		if (max_length > 0.0)
		  {
		      double dist =
			  sqrt (((ox - x) * (ox - x)) + ((oy - y) * (oy - y)));
		      tot_length += dist;
		  }
	    }
	  ox = x;
	  oy = y;
	  count++;
      }

    if (dyn->First != NULL)
      {
	  /* flushing the last Line */
	  do_split_line (geom, dyn);
      }
    gaiaFreeDynamicLine (dyn);
}

static gaiaGeomCollPtr
do_linearize (gaiaGeomCollPtr geom)
{
/* attempts to transform Polygon Rings into a (multi)linestring */
    gaiaGeomCollPtr result;
    gaiaLinestringPtr new_ln;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng;
    int iv;
    int ib;
    double x;
    double y;
    double m;
    double z;
    if (!geom)
	return NULL;

    if (geom->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = geom->Srid;

    pg = geom->FirstPolygon;
    while (pg)
      {
	  /* dissolving any POLYGON as simple LINESTRINGs (rings) */
	  rng = pg->Exterior;
	  new_ln = gaiaAddLinestringToGeomColl (result, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* copying the EXTERIOR RING as LINESTRING */
		if (geom->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		      gaiaSetPointXYZM (new_ln->Coords, iv, x, y, z, m);
		  }
		else if (geom->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		      gaiaSetPointXYZ (new_ln->Coords, iv, x, y, z);
		  }
		else if (geom->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		      gaiaSetPointXYM (new_ln->Coords, iv, x, y, m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		      gaiaSetPoint (new_ln->Coords, iv, x, y);
		  }
	    }
	  for (ib = 0; ib < pg->NumInteriors; ib++)
	    {
		rng = pg->Interiors + ib;
		new_ln = gaiaAddLinestringToGeomColl (result, rng->Points);
		for (iv = 0; iv < rng->Points; iv++)
		  {
		      /* copying an INTERIOR RING as LINESTRING */
		      if (geom->DimensionModel == GAIA_XY_Z_M)
			{
			    gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
			    gaiaSetPointXYZM (new_ln->Coords, iv, x, y, z, m);
			}
		      else if (geom->DimensionModel == GAIA_XY_Z)
			{
			    gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
			    gaiaSetPointXYZ (new_ln->Coords, iv, x, y, z);
			}
		      else if (geom->DimensionModel == GAIA_XY_M)
			{
			    gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
			    gaiaSetPointXYM (new_ln->Coords, iv, x, y, m);
			}
		      else
			{
			    gaiaGetPoint (rng->Coords, iv, &x, &y);
			    gaiaSetPoint (new_ln->Coords, iv, x, y);
			}
		  }
	    }
	  pg = pg->Next;
      }
    if (result->FirstLinestring == NULL)
      {
	  gaiaFreeGeomColl (result);
	  return NULL;
      }
    return result;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaTopoGeo_SubdivideLines (gaiaGeomCollPtr geom, int line_max_points,
			    double max_length)
{
/* subdividing a (multi)Linestring into a collection of simpler Linestrings */
    gaiaLinestringPtr ln;
    gaiaGeomCollPtr result;

    if (geom == NULL)
	return NULL;

    if (geom->FirstPoint != NULL)
	return NULL;
    if (geom->FirstLinestring == NULL && geom->FirstPolygon != NULL)
	return NULL;

    if (geom->DimensionModel == GAIA_XY_Z)
	result = gaiaAllocGeomCollXYZ ();
    else if (geom->DimensionModel == GAIA_XY_M)
	result = gaiaAllocGeomCollXYM ();
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	result = gaiaAllocGeomCollXYZM ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = geom->Srid;
    result->DeclaredType = GAIA_MULTILINESTRING;
    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  do_geom_split_line (result, ln, line_max_points, max_length);
	  ln = ln->Next;
      }

    if (geom->FirstPolygon != NULL)
      {
	  /* transforming all Polygon Rings into Linestrings */
	  gaiaGeomCollPtr pg_rings = do_linearize (geom);
	  if (pg_rings != NULL)
	    {
		ln = pg_rings->FirstLinestring;
		while (ln != NULL)
		  {
		      do_geom_split_line (result, ln, line_max_points,
					  max_length);
		      ln = ln->Next;
		  }
		gaiaFreeGeomColl (pg_rings);
	    }
      }
    return result;
}

static gaiaGeomCollPtr
do_build_failing_point (int srid, int dims, gaiaPointPtr pt)
{
/* building a Point geometry */
    gaiaGeomCollPtr geom;
    if (dims == GAIA_XY_Z)
	geom = gaiaAllocGeomCollXYZ ();
    else if (dims == GAIA_XY_M)
	geom = gaiaAllocGeomCollXYM ();
    else if (dims == GAIA_XY_Z_M)
	geom = gaiaAllocGeomCollXYZM ();
    else
	geom = gaiaAllocGeomColl ();
    geom->Srid = srid;
    if (dims == GAIA_XY_Z)
	gaiaAddPointToGeomCollXYZ (geom, pt->X, pt->Y, pt->Z);
    else if (geom->DimensionModel == GAIA_XY_M)
	gaiaAddPointToGeomCollXYM (geom, pt->X, pt->Y, pt->M);
    else if (geom->DimensionModel == GAIA_XY_Z_M)
	gaiaAddPointToGeomCollXYZM (geom, pt->X, pt->Y, pt->Z, pt->M);
    else
	gaiaAddPointToGeomColl (geom, pt->X, pt->Y);
    return geom;
}

static gaiaGeomCollPtr
do_build_failing_line (int srid, int dims, gaiaLinestringPtr line)
{
/* building a Linestring geometry */
    gaiaGeomCollPtr geom;
    gaiaLinestringPtr ln;
    if (dims == GAIA_XY_Z)
	geom = gaiaAllocGeomCollXYZ ();
    else if (dims == GAIA_XY_M)
	geom = gaiaAllocGeomCollXYM ();
    else if (dims == GAIA_XY_Z_M)
	geom = gaiaAllocGeomCollXYZM ();
    else
	geom = gaiaAllocGeomColl ();
    geom->Srid = srid;
    ln = gaiaAddLinestringToGeomColl (geom, line->Points);
    gaiaCopyLinestringCoords (ln, line);
    return geom;
}

TOPOLOGY_PRIVATE int
auxtopo_insert_into_topology (GaiaTopologyAccessorPtr accessor,
			      gaiaGeomCollPtr geom, double tolerance,
			      int line_max_points, double max_length, int mode,
			      gaiaGeomCollPtr * failing_geometry)
{
/* processing all individual geometry items */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaGeomCollPtr g;
    gaiaGeomCollPtr split = NULL;
    gaiaGeomCollPtr pg_rings;
    sqlite3_int64 *ids = NULL;
    int ids_count;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    if (failing_geometry != NULL)
	*failing_geometry = NULL;
    if (topo == NULL)
	return 0;

    pt = geom->FirstPoint;
    while (pt != NULL)
      {
	  /* looping on Point items */
	  if (gaiaTopoGeo_AddPoint (accessor, pt, tolerance) < 0)
	    {
		if (failing_geometry != NULL)
		    *failing_geometry =
			do_build_failing_point (geom->Srid,
						geom->DimensionModel, pt);
		return 0;
	    }
	  pt = pt->Next;
      }

    if (line_max_points <= 0 && max_length <= 0.0)
	g = geom;
    else
      {
	  /* subdividing Linestrings */
	  split =
	      gaiaTopoGeo_SubdivideLines (geom, line_max_points, max_length);
	  if (split != NULL)
	      g = split;
	  else
	      g = geom;
      }
    ln = g->FirstLinestring;
    while (ln != NULL)
      {
	  /* looping on Linestrings items */
	  int ret;
	  if (mode == GAIA_MODE_TOPO_NO_FACE)
	      ret = gaiaTopoGeo_AddLineStringNoFace
		  (accessor, ln, tolerance, &ids, &ids_count);
	  else
	      ret = gaiaTopoGeo_AddLineString
		  (accessor, ln, tolerance, &ids, &ids_count);
	  if (ret == 0)
	    {
		if (failing_geometry != NULL)
		    *failing_geometry =
			do_build_failing_line (geom->Srid, geom->DimensionModel,
					       ln);
		if (ids != NULL)
		    free (ids);
		if (split != NULL)
		    gaiaFreeGeomColl (split);
		return 0;
	    }
	  if (ids != NULL)
	      free (ids);
	  ln = ln->Next;
      }
    if (split != NULL)
	gaiaFreeGeomColl (split);
    split = NULL;

/* transforming all Polygon Rings into Linestrings */
    pg_rings = do_linearize (geom);
    if (pg_rings != NULL)
      {
	  if (line_max_points <= 0 && max_length <= 0.0)
	      g = pg_rings;
	  else
	    {
		/* subdividing Linestrings */
		split =
		    gaiaTopoGeo_SubdivideLines (pg_rings, line_max_points,
						max_length);
		if (split != NULL)
		    g = split;
		else
		    g = pg_rings;
	    }
	  ln = g->FirstLinestring;
	  while (ln != NULL)
	    {
		/* looping on Linestrings items */
		int ret;
		if (mode == GAIA_MODE_TOPO_NO_FACE)
		    ret = gaiaTopoGeo_AddLineStringNoFace
			(accessor, ln, tolerance, &ids, &ids_count);
		else
		    ret = gaiaTopoGeo_AddLineString
			(accessor, ln, tolerance, &ids, &ids_count);
		if (ret == 0)
		  {
		      if (failing_geometry != NULL)
			  *failing_geometry =
			      do_build_failing_line (geom->Srid,
						     geom->DimensionModel, ln);
		      if (ids != NULL)
			  free (ids);
		      gaiaFreeGeomColl (pg_rings);
		      if (split != NULL)
			  gaiaFreeGeomColl (split);
		      return 0;
		  }
		if (ids != NULL)
		    free (ids);
		ln = ln->Next;
	    }
	  gaiaFreeGeomColl (pg_rings);
	  if (split != NULL)
	      gaiaFreeGeomColl (split);
	  split = NULL;
      }

    return 1;
}

#endif /* end ENABLE_RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_auxtopo_table.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
/*

 gaia_auxtopo_table.c -- implementation of the Topology module
                         methods processing a whole GeoTable
    
 version 4.3, 2015 July 15

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by: 
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(Topology support) 

CIG: 6038019AE5

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <math.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_topology.h>
#include <spatialite/gaia_network.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>

#include <lwn_network.h>

#include "topology_private.h"
#include "network_private.h"

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

#define GAIA_UNUSED() if (argc || argv) argc = argc;

GAIATOPO_DECLARE int
gaiaTopoGeo_FromGeoTable (GaiaTopologyAccessorPtr accessor,
			  const char *db_prefix, const char *table,
			  const char *column, double tolerance,
			  int line_max_points, double max_length)
{
/* attempting to import a whole GeoTable into a Topology-Geometry */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;

    if (topo == NULL)
	return 0;
    if (topo->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (topo->cache);
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }

/* building the SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xcolumn = gaiaDoubleQuotedSql (column);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\"", xcolumn,
			 xprefix, xtable);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_FromGeoTable error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_NULL)
		    continue;
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int blob_sz = sqlite3_column_bytes (stmt, 0);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz, gpkg_mode,
						       gpkg_amphibious);
		      if (geom != NULL)
			{
			    if (!auxtopo_insert_into_topology
				(accessor, geom, tolerance, line_max_points,
				 max_length, GAIA_MODE_TOPO_FACE, NULL))
			      {
				  gaiaFreeGeomColl (geom);
				  goto error;
			      }
			    gaiaFreeGeomColl (geom);
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("TopoGeo_FromGeoTable error: Invalid Geometry");
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_FromGeoTable error: not a BLOB value");
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_FromGeoTable error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_FromGeoTableNoFace (GaiaTopologyAccessorPtr accessor,
				const char *db_prefix, const char *table,
				const char *column, double tolerance,
				int line_max_points, double max_length)
{
/* attempting to import a whole GeoTable into a Topology-Geometry
/  without determining generated faces */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *xprefix;
    char *xtable;
    char *xcolumn;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;

    if (topo == NULL)
	return 0;
    if (topo->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (topo->cache);
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }

/* building the SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    xcolumn = gaiaDoubleQuotedSql (column);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\"", xcolumn,
			 xprefix, xtable);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_FromGeoTableNoFace error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_NULL)
		    continue;
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int blob_sz = sqlite3_column_bytes (stmt, 0);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz, gpkg_mode,
						       gpkg_amphibious);
		      if (geom != NULL)
			{
			    if (!auxtopo_insert_into_topology
				(accessor, geom, tolerance, line_max_points,
				 max_length, GAIA_MODE_TOPO_NO_FACE, NULL))
			      {
				  gaiaFreeGeomColl (geom);
				  goto error;
			      }
			    gaiaFreeGeomColl (geom);
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("TopoGeo_FromGeoTableNoFace error: Invalid Geometry");
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_FromGeoTableNoFace error: not a BLOB value");
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_FromGeoTableNoFace error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
insert_into_dustbin (sqlite3 * sqlite, const void *cache,
		     sqlite3_stmt * stmt_dustbin, sqlite3_int64 pk_value,
		     const char *message, double tolerance, int *count,
		     gaiaGeomCollPtr geom)
{
/* failing feature: inserting a reference into the dustbin table */
    int ret;

    start_topo_savepoint (sqlite, cache);
    sqlite3_reset (stmt_dustbin);
    sqlite3_clear_bindings (stmt_dustbin);
/* binding the Primary Key */
    sqlite3_bind_int64 (stmt_dustbin, 1, pk_value);
/* binding the error message */
    sqlite3_bind_text (stmt_dustbin, 2, message, strlen (message),
		       SQLITE_STATIC);
/* binding the tolerance value */
    sqlite3_bind_double (stmt_dustbin, 3, tolerance);
/* binding the failing geometry */
    if (geom == NULL)
	sqlite3_bind_null (stmt_dustbin, 4);
    else
      {
	  unsigned char *blob = NULL;
	  int blob_size = 0;
	  gaiaToSpatiaLiteBlobWkb (geom, &blob, &blob_size);
	  if (blob == NULL)
	      sqlite3_bind_null (stmt_dustbin, 4);
	  else
	      sqlite3_bind_blob (stmt_dustbin, 4, blob, blob_size, free);
      }
    ret = sqlite3_step (stmt_dustbin);

/* inserting the row into the dustbin table */
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
      {
	  release_topo_savepoint (sqlite, cache);
	  *count += 1;
	  return 1;
      }

    /* some unexpected error occurred */
    spatialite_e ("TopoGeo_FromGeoTableExt error: \"%s\"",
		  sqlite3_errmsg (sqlite));
    rollback_topo_savepoint (sqlite, cache);
    return 0;
}

static int
do_FromGeoTableExtended_block (GaiaTopologyAccessorPtr accessor,
			       sqlite3_stmt * stmt, sqlite3_stmt * stmt_dustbin,
			       double tolerance, int line_max_points,
			       double max_length, sqlite3_int64 start,
			       sqlite3_int64 * last, sqlite3_int64 * invalid,
			       int *dustbin_count, sqlite3_int64 * dustbin_row,
			       int mode)
{
/* attempting to import a whole block of input features */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    int ret;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int totcnt = 0;
    sqlite3_int64 last_rowid;

    if (topo->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (topo->cache);
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }

    start_topo_savepoint (topo->db_handle, topo->cache);

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, start);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 rowid = sqlite3_column_int64 (stmt, 0);
		int igeo = sqlite3_column_count (stmt) - 1;	/* geometry always corresponds to the last resultset column */
		if (rowid == *invalid)
		  {
		      /* succesfully recovered a previously failing block */
		      release_topo_savepoint (topo->db_handle, topo->cache);
		      *last = last_rowid;
		      return 1;
		  }
		totcnt++;
		if (totcnt > 256)
		  {
		      /* succesfully imported a full block */
		      release_topo_savepoint (topo->db_handle, topo->cache);
		      *last = last_rowid;
		      return 1;
		  }
		if (sqlite3_column_type (stmt, igeo) == SQLITE_NULL)
		  {
		      last_rowid = rowid;
		      continue;
		  }
		if (sqlite3_column_type (stmt, igeo) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt, igeo);
		      int blob_sz = sqlite3_column_bytes (stmt, igeo);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz, gpkg_mode,
						       gpkg_amphibious);
		      if (geom != NULL)
			{
			    gaiaGeomCollPtr failing_geometry = NULL;
			    gaiatopo_reset_last_error_msg (accessor);
			    if (tolerance < 0.0)
				tolerance = topo->tolerance;
			    if (!auxtopo_insert_into_topology
				(accessor, geom, tolerance, line_max_points,
				 max_length, mode, &failing_geometry))
			      {
				  char *msg;
				  const char *rt_msg =
				      gaiaGetRtTopoErrorMsg (topo->cache);
				  if (rt_msg == NULL)
				      msg =
					  sqlite3_mprintf
					  ("TopoGeo_FromGeoTableExt exception: UNKNOWN reason");
				  else
				      msg = sqlite3_mprintf ("%s", rt_msg);
				  rollback_topo_savepoint (topo->db_handle,
							   topo->cache);
				  gaiaFreeGeomColl (geom);
				  if (tolerance < 0.0)
				      tolerance = topo->tolerance;
				  if (!insert_into_dustbin
				      (topo->db_handle, topo->cache,
				       stmt_dustbin, rowid, msg, tolerance,
				       dustbin_count, failing_geometry))
				    {
					sqlite3_free (msg);
					goto error;
				    }
				  sqlite3_free (msg);
				  if (failing_geometry != NULL)
				      gaiaFreeGeomColl (failing_geometry);
				  last_rowid = rowid;
				  *invalid = rowid;
				  *dustbin_row =
				      sqlite3_last_insert_rowid
				      (topo->db_handle);
				  return 0;
			      }
			    gaiaFreeGeomColl (geom);
			    if (failing_geometry != NULL)
				gaiaFreeGeomColl (failing_geometry);
			    last_rowid = rowid;
			}
		      else
			{
			    rollback_topo_savepoint (topo->db_handle,
						     topo->cache);
			    if (tolerance < 0.0)
				tolerance = topo->tolerance;
			    if (!insert_into_dustbin
				(topo->db_handle, topo->cache, stmt_dustbin,
				 rowid,
				 "TopoGeo_FromGeoTableExt error: Invalid Geometry",
				 tolerance, dustbin_count, NULL))
				goto error;
			}
		      last_rowid = rowid;
		  }
		else
		  {
		      rollback_topo_savepoint (topo->db_handle, topo->cache);
		      if (!insert_into_dustbin
			  (topo->db_handle, topo->cache, stmt_dustbin, rowid,
			   "TopoGeo_FromGeoTableExt error: not a BLOB value",
			   tolerance, dustbin_count, NULL))
			  goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_FromGeoTableExt error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		rollback_topo_savepoint (topo->db_handle, topo->cache);
		goto error;
	    }
      }
/* eof */
    release_topo_savepoint (topo->db_handle, topo->cache);
    return 2;

  error:
    return -1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_FromGeoTableExtended (GaiaTopologyAccessorPtr accessor,
				  const char *sql_in, const char *sql_out,
				  const char *sql_in2, double tolerance,
				  int line_max_points, double max_length)
{
/* attempting to import a whole GeoTable into a Topology-Geometry - Extended mode */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_dustbin = NULL;
    sqlite3_stmt *stmt_retry = NULL;
    int ret;
    int dustbin_count = 0;
    sqlite3_int64 start = -1;
    sqlite3_int64 last;
    sqlite3_int64 invalid = -1;
    sqlite3_int64 dustbin_row = -1;

    if (topo == NULL)
	return 0;
    if (sql_in == NULL)
	return 0;
    if (sql_out == NULL)
	return 0;

/* building the SQL statement */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql_in, strlen (sql_in), &stmt,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_FromGeoTableExt error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the SQL dustbin statement */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql_out, strlen (sql_out),
			    &stmt_dustbin, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_FromGeoTableExt error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the SQL retry statement */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql_in2, strlen (sql_in2),
			    &stmt_retry, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_FromGeoTableExt error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* main loop: attempting to import a block of features */
	  ret =
	      do_FromGeoTableExtended_block (accessor, stmt, stmt_dustbin,
					     tolerance, line_max_points,
					     max_length, start, &last, &invalid,
					     &dustbin_count, &dustbin_row,
					     GAIA_MODE_TOPO_FACE);
	  if (ret < 0)		/* some unexpected error occurred */
	      goto error;
	  if (ret > 1)
	    {
		/* eof */
		break;
	    }
	  if (ret == 0)
	    {
		/* found a failing feature; recovering */
		ret =
		    do_FromGeoTableExtended_block (accessor, stmt, stmt_dustbin,
						   tolerance, line_max_points,
						   max_length, start, &last,
						   &invalid, &dustbin_count,
						   &dustbin_row,
						   GAIA_MODE_TOPO_FACE);
		if (ret != 1)
		    goto error;
		start = invalid;
		invalid = -1;
		dustbin_row = -1;
		continue;
	    }
	  start = last;
	  invalid = -1;
	  dustbin_row = -1;
      }

    sqlite3_finalize (stmt);
    sqlite3_finalize (stmt_dustbin);
    sqlite3_finalize (stmt_retry);
    return dustbin_count;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_dustbin != NULL)
	sqlite3_finalize (stmt_dustbin);
    return -1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_FromGeoTableNoFaceExtended (GaiaTopologyAccessorPtr accessor,
					const char *sql_in, const char *sql_out,
					const char *sql_in2, double tolerance,
					int line_max_points, double max_length)
{
/* attempting to import a whole GeoTable into a Topology-Geometry 
/  without determining generated faces - Extended mode */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_dustbin = NULL;
    sqlite3_stmt *stmt_retry = NULL;
    int ret;
    int dustbin_count = 0;
    sqlite3_int64 start = -1;
    sqlite3_int64 last;
    sqlite3_int64 invalid = -1;
    sqlite3_int64 dustbin_row = -1;

    if (topo == NULL)
	return 0;
    if (sql_in == NULL)
	return 0;
    if (sql_out == NULL)
	return 0;

/* building the SQL statement */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql_in, strlen (sql_in), &stmt,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_FromGeoTableNoFaceExt error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the SQL dustbin statement */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql_out, strlen (sql_out),
			    &stmt_dustbin, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_FromGeoTableNoFaceExt error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the SQL retry statement */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql_in2, strlen (sql_in2),
			    &stmt_retry, NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_FromGeoTableNoFaceExt error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* main loop: attempting to import a block of features */
	  ret =
	      do_FromGeoTableExtended_block (accessor, stmt, stmt_dustbin,
					     tolerance, line_max_points,
					     max_length, start, &last, &invalid,
					     &dustbin_count, &dustbin_row,
					     GAIA_MODE_TOPO_NO_FACE);
	  if (ret < 0)		/* some unexpected error occurred */
	      goto error;
	  if (ret > 1)
	    {
		/* eof */
		break;
	    }
	  if (ret == 0)
	    {
		/* found a failing feature; recovering */
		ret =
		    do_FromGeoTableExtended_block (accessor, stmt, stmt_dustbin,
						   tolerance, line_max_points,
						   max_length, start, &last,
						   &invalid, &dustbin_count,
						   &dustbin_row,
						   GAIA_MODE_TOPO_NO_FACE);
		if (ret != 1)
		    goto error;
		start = invalid;
		invalid = -1;
		dustbin_row = -1;
		continue;
	    }
	  start = last;
	  invalid = -1;
	  dustbin_row = -1;
      }

    sqlite3_finalize (stmt);
    sqlite3_finalize (stmt_dustbin);
    sqlite3_finalize (stmt_retry);
    return dustbin_count;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_dustbin != NULL)
	sqlite3_finalize (stmt_dustbin);
    return -1;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaGetEdgeSeed (GaiaTopologyAccessorPtr accessor, sqlite3_int64 edge)
{
/* attempting to get a Point (seed) identifying a Topology Edge */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    gaiaGeomCollPtr point = NULL;
    if (topo == NULL)
	return NULL;

/* building the SQL statement */
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" WHERE edge_id = ?",
			 xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("GetEdgeSeed error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, edge);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int blob_sz = sqlite3_column_bytes (stmt, 0);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      if (geom != NULL)
			{
			    int iv;
			    double x;
			    double y;
			    double z = 0.0;
			    double m = 0.0;
			    gaiaLinestringPtr ln = geom->FirstLinestring;
			    if (ln == NULL)
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("TopoGeo_GetEdgeSeed error: Invalid Geometry");
				  gaiatopo_set_last_error_msg (accessor, msg);
				  sqlite3_free (msg);
				  gaiaFreeGeomColl (geom);
				  goto error;
			      }
			    if (ln->Points == 2)
			      {
				  /*
				     // special case: if the Edge has only 2 points then
				     // the Seed will always be placed on the first point
				   */
				  iv = 0;
			      }
			    else
			      {
				  /* ordinary case: placing the Seed into the middle */
				  iv = ln->Points / 2;
			      }
			    if (ln->DimensionModel == GAIA_XY_Z)
			      {
				  gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
			      }
			    else if (ln->DimensionModel == GAIA_XY_M)
			      {
				  gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
			      }
			    else if (ln->DimensionModel == GAIA_XY_Z_M)
			      {
				  gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z,
						    &m);
			      }
			    else
			      {
				  gaiaGetPoint (ln->Coords, iv, &x, &y);
			      }
			    gaiaFreeGeomColl (geom);
			    if (topo->has_z)
			      {
				  point = gaiaAllocGeomCollXYZ ();
				  gaiaAddPointToGeomCollXYZ (point, x, y, z);
			      }
			    else
			      {
				  point = gaiaAllocGeomColl ();
				  gaiaAddPointToGeomColl (point, x, y);
			      }
			    point->Srid = topo->srid;
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("TopoGeo_GetEdgeSeed error: Invalid Geometry");
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_GetEdgeSeed error: not a BLOB value");
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_GetEdgeSeed error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    return point;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return NULL;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaGetFaceSeed (GaiaTopologyAccessorPtr accessor, sqlite3_int64 face)
{
/* attempting to get a Point (seed) identifying a Topology Face */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    gaiaGeomCollPtr point = NULL;
    if (topo == NULL)
	return NULL;

/* building the SQL statement */
    sql =
	sqlite3_mprintf ("SELECT ST_PointOnSurface(ST_GetFaceGeometry(%Q, ?))",
			 topo->topology_name);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("GetFaceSeed error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, face);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *blob = sqlite3_column_blob (stmt, 0);
		      int blob_sz = sqlite3_column_bytes (stmt, 0);
		      point = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      if (point == NULL)
			{
			    char *msg =
				sqlite3_mprintf
				("TopoGeo_GetFaceSeed error: Invalid Geometry");
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_GetFaceSeed error: not a BLOB value");
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_GetFaceSeed error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    return point;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return NULL;
}

static int
delete_all_seeds (struct gaia_topology *topo)
{
/* deleting all existing Seeds */
    char *table;
    char *xtable;
    char *sql;
    char *errMsg;
    int ret;

    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

static int
update_outdated_edge_seeds (struct gaia_topology *topo)
{
/* updating all outdated Edge Seeds */
    char *table;
    char *xseeds;
    char *xedges;
    char *sql;
    int ret;
    sqlite3_stmt *stmt_out;
    sqlite3_stmt *stmt_in;

/* preparing the UPDATE statement */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET geom = "
			   "TopoGeo_GetEdgeSeed(%Q, edge_id) WHERE edge_id = ?",
			   xseeds, topo->topology_name);
    free (xseeds);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SELECT statement */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedges = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT s.edge_id FROM MAIN.\"%s\" AS s "
			   "JOIN MAIN.\"%s\" AS e ON (e.edge_id = s.edge_id) "
			   "WHERE s.edge_id IS NOT NULL AND e.timestamp > s.timestamp",
			   xseeds, xedges);
    free (xseeds);
    free (xedges);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		sqlite3_bind_int64 (stmt_out, 1,
				    sqlite3_column_int64 (stmt_in, 0));
		/* updating the Seeds table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_UpdateSeeds() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static int
update_outdated_face_seeds (struct gaia_topology *topo)
{
/* updating all outdated Face Seeds */
    char *table;
    char *xseeds;
    char *xedges;
    char *xfaces;
    char *sql;
    int ret;
    sqlite3_stmt *stmt_out;
    sqlite3_stmt *stmt_in;

/* preparing the UPDATE statement */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET geom = "
			   "TopoGeo_GetFaceSeed(%Q, face_id) WHERE face_id = ?",
			   xseeds, topo->topology_name);
    free (xseeds);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SELECT statement */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedges = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xfaces = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT x.face_id FROM MAIN.\"%s\" AS s, "
			   "(SELECT f.face_id AS face_id, Max(e.timestamp) AS max_tm "
			   "FROM MAIN.\"%s\" AS f "
			   "JOIN MAIN.\"%s\" AS e ON (e.left_face = f.face_id OR e.right_face = f.face_id) "
			   "GROUP BY f.face_id) AS x "
			   "WHERE s.face_id IS NOT NULL AND s.face_id = x.face_id AND x.max_tm > s.timestamp",
			   xseeds, xfaces, xedges);
    free (xseeds);
    free (xedges);
    free (xfaces);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		sqlite3_bind_int64 (stmt_out, 1,
				    sqlite3_column_int64 (stmt_in, 0));
		/* updating the Seeds table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_UpdateSeeds() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

GAIATOPO_DECLARE int
gaiaTopoGeoUpdateSeeds (GaiaTopologyAccessorPtr accessor, int incremental_mode)
{
/* updating all TopoGeo Seeds */
    char *table;
    char *xseeds;
    char *xedges;
    char *xfaces;
    char *sql;
    char *errMsg;
    int ret;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    if (!incremental_mode)
      {
	  /* deleting all existing Seeds */
	  if (!delete_all_seeds (topo))
	      return 0;
      }

/* paranoid precaution: deleting all orphan Edge Seeds */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedges = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE edge_id IN ("
			   "SELECT s.edge_id FROM MAIN.\"%s\" AS s "
			   "LEFT JOIN MAIN.\"%s\" AS e ON (s.edge_id = e.edge_id) "
			   "WHERE s.edge_id IS NOT NULL AND e.edge_id IS NULL)",
			   xseeds, xseeds, xedges);
    free (xseeds);
    free (xedges);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* paranoid precaution: deleting all orphan Face Seeds */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xfaces = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE face_id IN ("
			   "SELECT s.face_id FROM MAIN.\"%s\" AS s "
			   "LEFT JOIN MAIN.\"%s\" AS f ON (s.face_id = f.face_id) "
			   "WHERE s.face_id IS NOT NULL AND f.face_id IS NULL)",
			   xseeds, xseeds, xfaces);
    free (xseeds);
    free (xfaces);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* updating all outdated Edge Seeds */
    if (!update_outdated_edge_seeds (topo))
	return 0;

/* updating all outdated Facee Seeds */
    if (!update_outdated_face_seeds (topo))
	return 0;

/* inserting all missing Edge Seeds */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedges = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (seed_id, edge_id, face_id, geom) "
	 "SELECT NULL, e.edge_id, NULL, TopoGeo_GetEdgeSeed(%Q, e.edge_id) "
	 "FROM MAIN.\"%s\" AS e "
	 "LEFT JOIN MAIN.\"%s\" AS s ON (e.edge_id = s.edge_id) WHERE s.edge_id IS NULL",
	 xseeds, topo->topology_name, xedges, xseeds);
    free (xseeds);
    free (xedges);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    /* inserting all missing Face Seeds */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xseeds = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xfaces = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (seed_id, edge_id, face_id, geom) "
	 "SELECT NULL, NULL, f.face_id, TopoGeo_GetFaceSeed(%Q, f.face_id) "
	 "FROM MAIN.\"%s\" AS f "
	 "LEFT JOIN MAIN.\"%s\" AS s ON (f.face_id = s.face_id) "
	 "WHERE s.face_id IS NULL AND f.face_id <> 0", xseeds,
	 topo->topology_name, xfaces, xseeds);
    free (xseeds);
    free (xfaces);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_UpdateSeeds() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaTopoGeoSnapPointToSeed (GaiaTopologyAccessorPtr accessor,
			    gaiaGeomCollPtr pt, double distance)
{
/* snapping a Point to TopoSeeds */
    char *sql;
    char *table;
    char *xtable;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_snap = NULL;
    int ret;
    unsigned char *blob;
    int blob_size;
    unsigned char *blob2;
    int blob_size2;
    gaiaGeomCollPtr result = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return NULL;

/* preparing the Snap statement */
    sql = "SELECT ST_Snap(?, ?, ?)";
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_snap,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnapPointToSeed() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SELECT statement */
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("SELECT geom "
			   "FROM \"%s\" WHERE ST_Distance(?, geom) <= ? AND rowid IN "
			   "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ST_Buffer(?, ?))",
			   xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnapPointToSeed() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* querying Seeds */
    if (topo->has_z)
	result = gaiaAllocGeomCollXYZ ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = pt->Srid;
    gaiaToSpatiaLiteBlobWkb (pt, &blob, &blob_size);
    gaiaToSpatiaLiteBlobWkb (pt, &blob2, &blob_size2);
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, blob, blob_size, free);
    sqlite3_bind_double (stmt, 2, distance);
    sqlite3_bind_blob (stmt, 3, blob2, blob_size2, free);
    sqlite3_bind_double (stmt, 4, distance * 1.2);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *p_blob = sqlite3_column_blob (stmt, 0);
		int blobsz = sqlite3_column_bytes (stmt, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (p_blob, blobsz);
		if (geom != NULL)
		  {
		      gaiaPointPtr pt = geom->FirstPoint;
		      while (pt != NULL)
			{
			    /* copying all Points into the result Geometry */
			    if (topo->has_z)
				gaiaAddPointToGeomCollXYZ (result, pt->X, pt->Y,
							   pt->Z);
			    else
				gaiaAddPointToGeomColl (result, pt->X, pt->Y);
			    pt = pt->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_SnapPointToSeed error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    stmt = NULL;
    if (result->FirstPoint == NULL)
	goto error;

/* Snap */
    gaiaToSpatiaLiteBlobWkb (pt, &blob, &blob_size);
    gaiaToSpatiaLiteBlobWkb (result, &blob2, &blob_size2);
    gaiaFreeGeomColl (result);
    result = NULL;
    sqlite3_reset (stmt_snap);
    sqlite3_clear_bindings (stmt_snap);
    sqlite3_bind_blob (stmt_snap, 1, blob, blob_size, free);
    sqlite3_bind_blob (stmt_snap, 2, blob2, blob_size2, free);
    sqlite3_bind_double (stmt_snap, 3, distance);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_snap);

	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt_snap, 0) != SQLITE_NULL)
		  {
		      const unsigned char *p_blob =
			  sqlite3_column_blob (stmt_snap, 0);
		      int blobsz = sqlite3_column_bytes (stmt_snap, 0);
		      if (result != NULL)
			  gaiaFreeGeomColl (result);
		      result = gaiaFromSpatiaLiteBlobWkb (p_blob, blobsz);
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_SnapPointToSeed error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_snap);
    stmt_snap = NULL;
    if (result == NULL)
	goto error;
    if (result->FirstLinestring != NULL || result->FirstPolygon != NULL)
	goto error;
    if (result->FirstPoint == NULL)
	goto error;
    if (result->FirstPoint != result->LastPoint)
	goto error;
    return result;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_snap != NULL)
	sqlite3_finalize (stmt_snap);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    return NULL;
}

GAIATOPO_DECLARE gaiaGeomCollPtr
gaiaTopoGeoSnapLinestringToSeed (GaiaTopologyAccessorPtr accessor,
				 gaiaGeomCollPtr ln, double distance)
{
/* snapping a Linestring to TopoSeeds */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    unsigned char *blob;
    int blob_size;
    unsigned char *blob2;
    int blob_size2;
    gaiaGeomCollPtr result = NULL;
    sqlite3_stmt *stmt = NULL;
    sqlite3_stmt *stmt_snap = NULL;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return NULL;

/* preparing the Snap statement */
    sql = "SELECT ST_Snap(?, ?, ?)";
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_snap,
			    NULL);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnapLinestringToSeed() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SELECT statement */
    table = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("SELECT edge_id, geom "
			   "FROM \"%s\" WHERE ST_Distance(?, geom) <= ? AND rowid IN "
			   "(SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ST_Buffer(?, ?))",
			   xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnapLinestringToSeed() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* querying Seeds */
    if (topo->has_z)
	result = gaiaAllocGeomCollXYZ ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = ln->Srid;
    gaiaToSpatiaLiteBlobWkb (ln, &blob, &blob_size);
    gaiaToSpatiaLiteBlobWkb (ln, &blob2, &blob_size2);
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_blob (stmt, 1, blob, blob_size, free);
    sqlite3_bind_double (stmt, 2, distance);
    sqlite3_bind_blob (stmt, 3, blob2, blob_size2, free);
    sqlite3_bind_double (stmt, 4, distance * 1.2);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) != SQLITE_NULL)
		  {
		      const unsigned char *p_blob =
			  sqlite3_column_blob (stmt, 1);
		      int blobsz = sqlite3_column_bytes (stmt, 1);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkb (p_blob, blobsz);
		      if (geom != NULL)
			{
			    gaiaPointPtr pt = geom->FirstPoint;
			    while (pt != NULL)
			      {
				  /* copying all Points into the result Geometry */
				  if (topo->has_z)
				      gaiaAddPointToGeomCollXYZ (result, pt->X,
								 pt->Y, pt->Z);
				  else
				      gaiaAddPointToGeomColl (result, pt->X,
							      pt->Y);
				  pt = pt->Next;
			      }
			    gaiaFreeGeomColl (geom);
			}
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_SnapLinestringToSeed error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    stmt = NULL;
    if (result->FirstPoint == NULL)
	goto error;

/* Snap */
    gaiaToSpatiaLiteBlobWkb (ln, &blob, &blob_size);
    gaiaToSpatiaLiteBlobWkb (result, &blob2, &blob_size2);
    gaiaFreeGeomColl (result);
    result = NULL;
    sqlite3_reset (stmt_snap);
    sqlite3_clear_bindings (stmt_snap);
    sqlite3_bind_blob (stmt_snap, 1, blob, blob_size, free);
    sqlite3_bind_blob (stmt_snap, 2, blob2, blob_size2, free);
    sqlite3_bind_double (stmt_snap, 3, distance);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_snap);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt_snap, 0) == SQLITE_BLOB)
		  {
		      const unsigned char *p_blob =
			  sqlite3_column_blob (stmt_snap, 0);
		      int blobsz = sqlite3_column_bytes (stmt_snap, 0);
		      if (result != NULL)
			  gaiaFreeGeomColl (result);
		      result = gaiaFromSpatiaLiteBlobWkb (p_blob, blobsz);
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_SnapLinestringToSeed error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt_snap);
    stmt_snap = NULL;
    if (result == NULL)
	goto error;
    if (result->FirstPoint != NULL || result->FirstPolygon != NULL)
	goto error;
    if (result->FirstLinestring == NULL)
	goto error;
    if (result->FirstLinestring != result->LastLinestring)
	goto error;
    return result;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    if (stmt_snap != NULL)
	sqlite3_finalize (stmt_snap);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    return NULL;
}

static gaiaGeomCollPtr
make_geom_from_polyg (int srid, gaiaPolygonPtr pg)
{
/* quick constructor: Geometry based on external polyg */
    gaiaGeomCollPtr reference;
    if (pg->DimensionModel == GAIA_XY_Z_M)
	reference = gaiaAllocGeomCollXYZM ();
    else if (pg->DimensionModel == GAIA_XY_Z)
	reference = gaiaAllocGeomCollXYZ ();
    else if (pg->DimensionModel == GAIA_XY_M)
	reference = gaiaAllocGeomCollXYM ();
    else
	reference = gaiaAllocGeomColl ();
    reference->Srid = srid;
    pg->Next = NULL;
    reference->FirstPolygon = pg;
    reference->LastPolygon = pg;
    return reference;
}

static void
do_eval_topogeo_point (struct gaia_topology *topo, gaiaGeomCollPtr result,
		       gaiaGeomCollPtr reference, sqlite3_stmt * stmt_node)
{
/* retrieving Points from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;

/* initializing the Topo-Node query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_node);
    sqlite3_clear_bindings (stmt_node);
    sqlite3_bind_blob (stmt_node, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_node, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_node);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt_node, 0);
		int blob_sz = sqlite3_column_bytes (stmt_node, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      gaiaPointPtr pt = geom->FirstPoint;
		      while (pt != NULL)
			{
			    /* copying all Points into the result Geometry */
			    if (topo->has_z)
				gaiaAddPointToGeomCollXYZ (result, pt->X, pt->Y,
							   pt->Z);
			    else
				gaiaAddPointToGeomColl (result, pt->X, pt->Y);
			    pt = pt->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoGeo_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static void
do_collect_topo_edges (struct gaia_topology *topo, gaiaGeomCollPtr sparse,
		       sqlite3_stmt * stmt_edge, sqlite3_int64 edge_id)
{
/* collecting Edge Geometries one by one */
    int ret;

/* initializing the Topo-Edge query */
    sqlite3_reset (stmt_edge);
    sqlite3_clear_bindings (stmt_edge);
    sqlite3_bind_int64 (stmt_edge, 1, edge_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_edge);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt_edge, 0);
		int blob_sz = sqlite3_column_bytes (stmt_edge, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      gaiaLinestringPtr ln = geom->FirstLinestring;
		      while (ln != NULL)
			{
			    if (topo->has_z)
				auxtopo_copy_linestring3d (ln, sparse);
			    else
				auxtopo_copy_linestring (ln, sparse);
			    ln = ln->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoGeo_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static void
do_eval_topogeo_line (struct gaia_topology *topo, gaiaGeomCollPtr result,
		      gaiaGeomCollPtr reference, sqlite3_stmt * stmt_seed_edge,
		      sqlite3_stmt * stmt_edge)
{
/* retrieving Linestrings from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr sparse;
    gaiaGeomCollPtr rearranged;
    gaiaLinestringPtr ln;

    if (topo->has_z)
	sparse = gaiaAllocGeomCollXYZ ();
    else
	sparse = gaiaAllocGeomColl ();
    sparse->Srid = topo->srid;

/* initializing the Topo-Seed-Edge query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_seed_edge);
    sqlite3_clear_bindings (stmt_seed_edge);
    sqlite3_bind_blob (stmt_seed_edge, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_seed_edge, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_seed_edge);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id =
		    sqlite3_column_int64 (stmt_seed_edge, 0);
		do_collect_topo_edges (topo, sparse, stmt_edge, edge_id);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoGeo_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		gaiaFreeGeomColl (sparse);
		return;
	    }
      }

/* attempting to rearrange sparse lines */
    rearranged = gaiaLineMerge_r (topo->cache, sparse);
    gaiaFreeGeomColl (sparse);
    if (rearranged == NULL)
	return;
    ln = rearranged->FirstLinestring;
    while (ln != NULL)
      {
	  if (topo->has_z)
	      auxtopo_copy_linestring3d (ln, result);
	  else
	      auxtopo_copy_linestring (ln, result);
	  ln = ln->Next;
      }
    gaiaFreeGeomColl (rearranged);
}

static void
do_explode_topo_face (struct gaia_topology *topo, struct face_edges *list,
		      sqlite3_stmt * stmt_face, sqlite3_int64 face_id)
{
/* exploding all Edges required by the same face */
    int ret;

/* initializing the Topo-Face query */
    sqlite3_reset (stmt_face);
    sqlite3_clear_bindings (stmt_face);
    sqlite3_bind_int64 (stmt_face, 1, face_id);
    sqlite3_bind_int64 (stmt_face, 2, face_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_face);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_face, 0);
		sqlite3_int64 left_face = sqlite3_column_int64 (stmt_face, 1);
		sqlite3_int64 right_face = sqlite3_column_int64 (stmt_face, 2);
		const unsigned char *blob = sqlite3_column_blob (stmt_face, 3);
		int blob_sz = sqlite3_column_bytes (stmt_face, 3);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		    auxtopo_add_face_edge (list, face_id, edge_id, left_face,
					   right_face, geom);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoGeo_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static void
do_copy_ring3d (gaiaRingPtr in, gaiaRingPtr out)
{
/* inserting/copying a Ring 3D into another Ring */
    int iv;
    double x;
    double y;
    double z;
    for (iv = 0; iv < in->Points; iv++)
      {
	  gaiaGetPointXYZ (in->Coords, iv, &x, &y, &z);
	  gaiaSetPointXYZ (out->Coords, iv, x, y, z);
      }
}

static void
do_copy_ring (gaiaRingPtr in, gaiaRingPtr out)
{
/* inserting/copying a Ring into another Ring */
    int iv;
    double x;
    double y;
    for (iv = 0; iv < in->Points; iv++)
      {
	  gaiaGetPoint (in->Coords, iv, &x, &y);
	  gaiaSetPoint (out->Coords, iv, x, y);
      }
}

static void
do_copy_polygon3d (gaiaPolygonPtr in, gaiaGeomCollPtr geom)
{
/* inserting/copying a Polygon 3D into another Geometry */
    int ib;
    gaiaRingPtr rng_out;
    gaiaRingPtr rng_in = in->Exterior;
    gaiaPolygonPtr out =
	gaiaAddPolygonToGeomColl (geom, rng_in->Points, in->NumInteriors);
    rng_out = out->Exterior;
    do_copy_ring3d (rng_in, rng_out);
    for (ib = 0; ib < in->NumInteriors; ib++)
      {
	  rng_in = in->Interiors + ib;
	  rng_out = gaiaAddInteriorRing (out, ib, rng_in->Points);
	  do_copy_ring3d (rng_in, rng_out);
      }
}

static void
do_copy_polygon (gaiaPolygonPtr in, gaiaGeomCollPtr geom)
{
/* inserting/copying a Polygon into another Geometry */
    int ib;
    gaiaRingPtr rng_out;
    gaiaRingPtr rng_in = in->Exterior;
    gaiaPolygonPtr out =
	gaiaAddPolygonToGeomColl (geom, rng_in->Points, in->NumInteriors);
    rng_out = out->Exterior;
    do_copy_ring (rng_in, rng_out);
    for (ib = 0; ib < in->NumInteriors; ib++)
      {
	  rng_in = in->Interiors + ib;
	  rng_out = gaiaAddInteriorRing (out, ib, rng_in->Points);
	  do_copy_ring (rng_in, rng_out);
      }
}

static void
do_copy_filter_polygon3d (gaiaPolygonPtr in, gaiaGeomCollPtr geom,
			  const void *cache, double tolerance)
{
/* inserting/copying a Polygon 3D into another Geometry (with tolerance) */
    int ib;
    gaiaGeomCollPtr polyg;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng_out;
    gaiaRingPtr rng_in = in->Exterior;
    gaiaPolygonPtr out;
    double area;
    int ret;
    int numints = 0;

    polyg = gaiaAllocGeomCollXYZ ();
    pg = gaiaAddPolygonToGeomColl (polyg, rng_in->Points, 0);
    rng_out = pg->Exterior;
    do_copy_ring3d (rng_in, rng_out);
    ret = gaiaGeomCollArea_r (cache, polyg, &area);
    gaiaFreeGeomColl (polyg);
    if (!ret)
	return;
    if ((tolerance * tolerance) > area)
	return;			/* skipping smaller polygons */

    for (ib = 0; ib < in->NumInteriors; ib++)
      {
	  /* counting how many interior rings do we really have */
	  rng_in = in->Interiors + ib;
	  polyg = gaiaAllocGeomCollXYZ ();
	  pg = gaiaAddPolygonToGeomColl (polyg, rng_in->Points, 0);
	  rng_out = pg->Exterior;
	  do_copy_ring3d (rng_in, rng_out);
	  ret = gaiaGeomCollArea_r (cache, polyg, &area);
	  gaiaFreeGeomColl (polyg);
	  if (!ret)
	      continue;
	  if ((tolerance * tolerance) > area)
	      continue;		/* skipping smaller holes */
	  numints++;
      }

    rng_in = in->Exterior;
    out = gaiaAddPolygonToGeomColl (geom, rng_in->Points, numints);
    rng_out = out->Exterior;
    do_copy_ring3d (rng_in, rng_out);
    numints = 0;
    for (ib = 0; ib < in->NumInteriors; ib++)
      {
	  /* copying interior rings */
	  rng_in = in->Interiors + ib;
	  polyg = gaiaAllocGeomCollXYZ ();
	  pg = gaiaAddPolygonToGeomColl (polyg, rng_in->Points, 0);
	  rng_out = pg->Exterior;
	  do_copy_ring3d (rng_in, rng_out);
	  ret = gaiaGeomCollArea_r (cache, polyg, &area);
	  gaiaFreeGeomColl (polyg);
	  if (!ret)
	      continue;
	  if ((tolerance * tolerance) > area)
	      continue;		/* skipping smaller holes */
	  rng_out = gaiaAddInteriorRing (out, numints++, rng_in->Points);
	  do_copy_ring3d (rng_in, rng_out);
      }
}

static void
do_copy_filter_polygon (gaiaPolygonPtr in, gaiaGeomCollPtr geom,
			const void *cache, double tolerance)
{
/* inserting/copying a Polygon into another Geometry (with tolerance) */
    int ib;
    gaiaGeomCollPtr polyg;
    gaiaPolygonPtr pg;
    gaiaRingPtr rng_out;
    gaiaRingPtr rng_in = in->Exterior;
    gaiaPolygonPtr out;
    double area;
    int ret;
    int numints = 0;

    polyg = gaiaAllocGeomColl ();
    pg = gaiaAddPolygonToGeomColl (polyg, rng_in->Points, 0);
    rng_out = pg->Exterior;
    do_copy_ring (rng_in, rng_out);
    ret = gaiaGeomCollArea_r (cache, polyg, &area);
    gaiaFreeGeomColl (polyg);
    if (!ret)
	return;
    if ((tolerance * tolerance) > area)
	return;			/* skipping smaller polygons */

    for (ib = 0; ib < in->NumInteriors; ib++)
      {
	  /* counting how many interior rings do we really have */
	  rng_in = in->Interiors + ib;
	  polyg = gaiaAllocGeomColl ();
	  pg = gaiaAddPolygonToGeomColl (polyg, rng_in->Points, 0);
	  rng_out = pg->Exterior;
	  do_copy_ring (rng_in, rng_out);
	  ret = gaiaGeomCollArea_r (cache, polyg, &area);
	  gaiaFreeGeomColl (polyg);
	  if (!ret)
	      continue;
	  if ((tolerance * tolerance) > area)
	      continue;		/* skipping smaller holes */
	  numints++;
      }

    rng_in = in->Exterior;
    out = gaiaAddPolygonToGeomColl (geom, rng_in->Points, numints);
    rng_out = out->Exterior;
    do_copy_ring (rng_in, rng_out);
    numints = 0;
    for (ib = 0; ib < in->NumInteriors; ib++)
      {
	  /* copying interior rings */
	  rng_in = in->Interiors + ib;
	  polyg = gaiaAllocGeomColl ();
	  pg = gaiaAddPolygonToGeomColl (polyg, rng_in->Points, 0);
	  rng_out = pg->Exterior;
	  do_copy_ring (rng_in, rng_out);
	  ret = gaiaGeomCollArea_r (cache, polyg, &area);
	  gaiaFreeGeomColl (polyg);
	  if (!ret)
	      continue;
	  if ((tolerance * tolerance) > area)
	      continue;		/* skipping smaller holes */
	  rng_out = gaiaAddInteriorRing (out, numints++, rng_in->Points);
	  do_copy_ring (rng_in, rng_out);
      }
}

static void
do_eval_topo_polyg (struct gaia_topology *topo, gaiaGeomCollPtr result,
		    gaiaGeomCollPtr reference, sqlite3_stmt * stmt_seed_face,
		    sqlite3_stmt * stmt_face)
{
/* retrieving Polygons from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr rearranged;
    gaiaPolygonPtr pg;
    struct face_edges *list =
	auxtopo_create_face_edges (topo->has_z, topo->srid);

/* initializing the Topo-Seed-Face query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_seed_face);
    sqlite3_clear_bindings (stmt_seed_face);
    sqlite3_bind_blob (stmt_seed_face, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_seed_face, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_seed_face);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id =
		    sqlite3_column_int64 (stmt_seed_face, 0);
		do_explode_topo_face (topo, list, stmt_face, face_id);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoGeo_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		auxtopo_free_face_edges (list);
		return;
	    }
      }

/* attempting to rearrange sparse lines into Polygons */
    auxtopo_select_valid_face_edges (list);
    rearranged = auxtopo_polygonize_face_edges (list, topo->cache);
    auxtopo_free_face_edges (list);
    if (rearranged == NULL)
	return;
    pg = rearranged->FirstPolygon;
    while (pg != NULL)
      {
	  if (topo->has_z)
	      do_copy_polygon3d (pg, result);
	  else
	      do_copy_polygon (pg, result);
	  pg = pg->Next;
      }
    gaiaFreeGeomColl (rearranged);
}

static void
do_eval_topo_polyg_generalize (struct gaia_topology *topo,
			       gaiaGeomCollPtr result,
			       gaiaGeomCollPtr reference,
			       sqlite3_stmt * stmt_seed_face,
			       sqlite3_stmt * stmt_face, double tolerance)
{
/* retrieving Polygons from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr rearranged;
    gaiaPolygonPtr pg;
    struct face_edges *list =
	auxtopo_create_face_edges (topo->has_z, topo->srid);

/* initializing the Topo-Seed-Face query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_seed_face);
    sqlite3_clear_bindings (stmt_seed_face);
    sqlite3_bind_blob (stmt_seed_face, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_seed_face, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_seed_face);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id =
		    sqlite3_column_int64 (stmt_seed_face, 0);
		do_explode_topo_face (topo, list, stmt_face, face_id);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("TopoGeo_ToGeoTable error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		auxtopo_free_face_edges (list);
		return;
	    }
      }

/* attempting to rearrange sparse lines into Polygons */
    auxtopo_select_valid_face_edges (list);
    rearranged = auxtopo_polygonize_face_edges_generalize (list, topo->cache);
    auxtopo_free_face_edges (list);
    if (rearranged == NULL)
	return;
    pg = rearranged->FirstPolygon;
    while (pg != NULL)
      {
	  if (topo->has_z)
	      do_copy_filter_polygon3d (pg, result, topo->cache, tolerance);
	  else
	      do_copy_filter_polygon (pg, result, topo->cache, tolerance);
	  pg = pg->Next;
      }
    gaiaFreeGeomColl (rearranged);
}

static gaiaGeomCollPtr
do_eval_topogeo_geom (struct gaia_topology *topo, gaiaGeomCollPtr geom,
		      sqlite3_stmt * stmt_seed_edge,
		      sqlite3_stmt * stmt_seed_face, sqlite3_stmt * stmt_node,
		      sqlite3_stmt * stmt_edge, sqlite3_stmt * stmt_face,
		      int out_type, double tolerance)
{
/* retrieving Topology-Geometry geometries via matching Seeds */
    gaiaGeomCollPtr result;

    if (topo->has_z)
	result = gaiaAllocGeomCollXYZ ();
    else
	result = gaiaAllocGeomColl ();
    result->Srid = topo->srid;
    result->DeclaredType = out_type;

    if (out_type == GAIA_POINT || out_type == GAIA_MULTIPOINT
	|| out_type == GAIA_GEOMETRYCOLLECTION || out_type == GAIA_UNKNOWN)
      {
	  /* processing all Points */
	  gaiaPointPtr pt = geom->FirstPoint;
	  while (pt != NULL)
	    {
		gaiaPointPtr next = pt->Next;
		gaiaGeomCollPtr reference = (gaiaGeomCollPtr)
		    auxtopo_make_geom_from_point (topo->srid, topo->has_z, pt);
		do_eval_topogeo_point (topo, result, reference, stmt_node);
		auxtopo_destroy_geom_from (reference);
		pt->Next = next;
		pt = pt->Next;
	    }
      }

    if (out_type == GAIA_MULTILINESTRING || out_type == GAIA_GEOMETRYCOLLECTION
	|| out_type == GAIA_UNKNOWN)
      {
	  /* processing all Linestrings */
	  gaiaLinestringPtr ln = geom->FirstLinestring;
	  while (ln != NULL)
	    {
		gaiaLinestringPtr next = ln->Next;
		gaiaGeomCollPtr reference = (gaiaGeomCollPtr)
		    auxtopo_make_geom_from_line (topo->srid, ln);
		do_eval_topogeo_line (topo, result, reference, stmt_seed_edge,
				      stmt_edge);
		auxtopo_destroy_geom_from (reference);
		ln->Next = next;
		ln = ln->Next;
	    }
      }

    if (out_type == GAIA_MULTIPOLYGON || out_type == GAIA_GEOMETRYCOLLECTION
	|| out_type == GAIA_UNKNOWN)
      {
	  /* processing all Polygons */
	  gaiaPolygonPtr pg = geom->FirstPolygon;
	  while (pg != NULL)
	    {
		gaiaPolygonPtr next = pg->Next;
		gaiaGeomCollPtr reference =
		    make_geom_from_polyg (topo->srid, pg);
		if (tolerance > 0.0)
		    do_eval_topo_polyg_generalize (topo, result, reference,
						   stmt_seed_face, stmt_face,
						   tolerance);
		else
		    do_eval_topo_polyg (topo, result, reference, stmt_seed_face,
					stmt_face);
		auxtopo_destroy_geom_from (reference);
		pg->Next = next;
		pg = pg->Next;
	    }
      }

    if (result->FirstPoint == NULL && result->FirstLinestring == NULL
	&& result->FirstPolygon == NULL)
	goto error;
    return result;

  error:
    gaiaFreeGeomColl (result);
    return NULL;
}

static int
do_eval_topogeo_seeds (struct gaia_topology *topo, sqlite3_stmt * stmt_ref,
		       int ref_geom_col, sqlite3_stmt * stmt_ins,
		       sqlite3_stmt * stmt_seed_edge,
		       sqlite3_stmt * stmt_seed_face, sqlite3_stmt * stmt_node,
		       sqlite3_stmt * stmt_edge, sqlite3_stmt * stmt_face,
		       int out_type, double tolerance)
{
/* querying the ref-table */
    int ret;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_ref);
		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_ref, icol);
		      if (icol == ref_geom_col)
			{
			    /* the geometry column */
			    const unsigned char *blob =
				sqlite3_column_blob (stmt_ref, icol);
			    int blob_sz = sqlite3_column_bytes (stmt_ref, icol);
			    gaiaGeomCollPtr geom =
				gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
			    if (geom != NULL)
			      {
				  gaiaGeomCollPtr result;
				  unsigned char *p_blob;
				  int n_bytes;
				  int gpkg_mode = 0;
				  int tiny_point = 0;
				  if (topo->cache != NULL)
				    {
					struct splite_internal_cache *cache =
					    (struct splite_internal_cache
					     *) (topo->cache);
					gpkg_mode = cache->gpkg_mode;
					tiny_point = cache->tinyPointEnabled;
				    }
				  result = do_eval_topogeo_geom (topo, geom,
								 stmt_seed_edge,
								 stmt_seed_face,
								 stmt_node,
								 stmt_edge,
								 stmt_face,
								 out_type,
								 tolerance);
				  gaiaFreeGeomColl (geom);
				  if (result != NULL)
				    {
					gaiaToSpatiaLiteBlobWkbEx2 (result,
								    &p_blob,
								    &n_bytes,
								    gpkg_mode,
								    tiny_point);
					gaiaFreeGeomColl (result);
					sqlite3_bind_blob (stmt_ins, icol + 1,
							   p_blob, n_bytes,
							   free);
				    }
				  else
				      sqlite3_bind_null (stmt_ins, icol + 1);
			      }
			    else
				sqlite3_bind_null (stmt_ins, icol + 1);
			    continue;
			}
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_ins, icol + 1,
						sqlite3_column_int64 (stmt_ref,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_ins, icol + 1,
						 sqlite3_column_double
						 (stmt_ref, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_ins, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_ins, icol + 1,
					       sqlite3_column_blob (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_ins, icol + 1);
			    break;
			};
		  }
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf ("TopoGeo_ToGeoTable() error: \"%s\"",
					   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_ToGeoTable() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_ToGeoTableGeneralize (GaiaTopologyAccessorPtr accessor,
				  const char *db_prefix, const char *ref_table,
				  const char *ref_column, const char *out_table,
				  double tolerance, int with_spatial_index)
{
/* 
/ attempting to create and populate a new GeoTable out from a Topology-Geometry 
/ (simplified/generalized form)
*/
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    sqlite3_stmt *stmt_seed_edge = NULL;
    sqlite3_stmt *stmt_seed_face = NULL;
    sqlite3_stmt *stmt_node = NULL;
    sqlite3_stmt *stmt_edge = NULL;
    sqlite3_stmt *stmt_face = NULL;
    int ret;
    char *create;
    char *select;
    char *insert;
    char *sql;
    char *errMsg;
    char *xprefix;
    char *xtable;
    int ref_type;
    const char *type;
    int out_type;
    int ref_geom_col;
    if (topo == NULL)
	return 0;

/* incrementally updating all Topology Seeds */
    if (!gaiaTopoGeoUpdateSeeds (accessor, 1))
	return 0;

/* composing the CREATE TABLE output-table statement */
    if (!auxtopo_create_togeotable_sql
	(topo->db_handle, db_prefix, ref_table, ref_column, out_table, &create,
	 &select, &insert, &ref_geom_col))
	goto error;

/* creating the output-table */
    ret = sqlite3_exec (topo->db_handle, create, NULL, NULL, &errMsg);
    sqlite3_free (create);
    create = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* checking the Geometry Type */
    if (!auxtopo_retrieve_geometry_type
	(topo->db_handle, db_prefix, ref_table, ref_column, &ref_type))
	goto error;
    switch (ref_type)
      {
      case GAIA_POINT:
      case GAIA_POINTZ:
      case GAIA_POINTM:
      case GAIA_POINTZM:
	  type = "POINT";
	  out_type = GAIA_POINT;
	  break;
      case GAIA_MULTIPOINT:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTIPOINTZM:
	  type = "MULTIPOINT";
	  out_type = GAIA_MULTIPOINT;
	  break;
      case GAIA_LINESTRING:
      case GAIA_LINESTRINGZ:
      case GAIA_LINESTRINGM:
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTILINESTRINGZM:
	  type = "MULTILINESTRING";
	  out_type = GAIA_MULTILINESTRING;
	  break;
      case GAIA_POLYGON:
      case GAIA_POLYGONZ:
      case GAIA_POLYGONM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGON:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_MULTIPOLYGONM:
      case GAIA_MULTIPOLYGONZM:
	  type = "MULTIPOLYGON";
	  out_type = GAIA_MULTIPOLYGON;
	  break;
      case GAIA_GEOMETRYCOLLECTION:
      case GAIA_GEOMETRYCOLLECTIONZ:
      case GAIA_GEOMETRYCOLLECTIONM:
      case GAIA_GEOMETRYCOLLECTIONZM:
	  type = "GEOMETRYCOLLECTION";
	  out_type = GAIA_GEOMETRYCOLLECTION;
	  break;
      default:
	  type = "GEOMETRY";
	  out_type = GAIA_UNKNOWN;
	  break;
      };

/* creating the output Geometry Column */
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(Lower(%Q), Lower(%Q), %d, '%s', '%s')",
	 out_table, ref_column, topo->srid, type,
	 (topo->has_z == 0) ? "XY" : "XYZ");
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    if (with_spatial_index)
      {
	  /* adding a Spatial Index supporting the Geometry Column */
	  sql =
	      sqlite3_mprintf
	      ("SELECT CreateSpatialIndex(Lower(%Q), Lower(%Q))",
	       out_table, ref_column);
	  ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
		     errMsg);
		sqlite3_free (errMsg);
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

/* preparing the "SELECT * FROM ref-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, select, strlen (select), &stmt_ref,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO out-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, insert, strlen (insert), &stmt_ins,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Seed-Edges query */
    xprefix = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT edge_id FROM MAIN.\"%s\" "
			   "WHERE edge_id IS NOT NULL AND ST_Intersects(geom, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_seed_edge,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Seed-Faces query */
    xprefix = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT face_id FROM MAIN.\"%s\" "
			   "WHERE face_id IS NOT NULL AND ST_Intersects(geom, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_seed_face,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Nodes query */
    xprefix = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" "
			   "WHERE ST_Intersects(geom, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_node,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Edges query */
    xprefix = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    if (tolerance > 0.0)
	sql =
	    sqlite3_mprintf
	    ("SELECT ST_SimplifyPreserveTopology(geom, %1.6f) FROM MAIN.\"%s\" WHERE edge_id = ?",
	     tolerance, xtable, xprefix);
    else
	sql = sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" WHERE edge_id = ?",
			       xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_edge,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Faces query */
    xprefix = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    if (tolerance > 0.0)
	sql =
	    sqlite3_mprintf
	    ("SELECT edge_id, left_face, right_face, ST_SimplifyPreserveTopology(geom, %1.6f) FROM MAIN.\"%s\" "
	     "WHERE left_face = ? OR right_face = ?", tolerance, xtable);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT edge_id, left_face, right_face, geom FROM MAIN.\"%s\" "
	     "WHERE left_face = ? OR right_face = ?", xtable);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_face,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ToGeoTableGeneralize() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* evaluating feature/topology matching via coincident topo-seeds */
    if (!do_eval_topogeo_seeds
	(topo, stmt_ref, ref_geom_col, stmt_ins, stmt_seed_edge, stmt_seed_face,
	 stmt_node, stmt_edge, stmt_face, out_type, tolerance))
	goto error;

    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    sqlite3_finalize (stmt_seed_edge);
    sqlite3_finalize (stmt_seed_face);
    sqlite3_finalize (stmt_node);
    sqlite3_finalize (stmt_edge);
    sqlite3_finalize (stmt_face);
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    if (stmt_seed_edge != NULL)
	sqlite3_finalize (stmt_seed_edge);
    if (stmt_seed_face != NULL)
	sqlite3_finalize (stmt_seed_face);
    if (stmt_node != NULL)
	sqlite3_finalize (stmt_node);
    if (stmt_edge != NULL)
	sqlite3_finalize (stmt_edge);
    if (stmt_face != NULL)
	sqlite3_finalize (stmt_face);
    return 0;
}

static int
do_remove_small_faces2 (struct gaia_topology *topo, sqlite3_int64 edge_id,
			sqlite3_stmt * stmt_rem)
{
/* removing an Edge from a Face (step 2) */
    int ret;
    sqlite3_reset (stmt_rem);
    sqlite3_clear_bindings (stmt_rem);
    sqlite3_bind_int64 (stmt_rem, 1, edge_id);

    ret = sqlite3_step (stmt_rem);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;
    else
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_RemoveSmallFaces error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
      }
    return 0;
}

static int
do_remove_small_faces1 (struct gaia_topology *topo, sqlite3_int64 face_id,
			sqlite3_stmt * stmt_edge, sqlite3_stmt * stmt_rem)
{
/* removing the longer Edge from a Face (step 1) */
    int ret;
    int first = 1;
    sqlite3_reset (stmt_edge);
    sqlite3_clear_bindings (stmt_edge);
    sqlite3_bind_int64 (stmt_edge, 1, face_id);
    sqlite3_bind_int64 (stmt_edge, 2, face_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_edge);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_edge, 0);
		if (first)
		  {
		      first = 0;
		      if (do_remove_small_faces2 (topo, edge_id, stmt_rem))
			  goto error;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_RemoveSmallFaces error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    return 1;

  error:
    return 0;

}

GAIATOPO_DECLARE int
gaiaTopoGeo_RemoveSmallFaces (GaiaTopologyAccessorPtr accessor,
			      double min_circularity, double min_area)
{
/* 
/ attempting to remove all small faces from a Topology-Geometry 
*/
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_rem = NULL;
    sqlite3_stmt *stmt_face = NULL;
    sqlite3_stmt *stmt_edge = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    int count;
    if (topo == NULL)
	return 0;

/* preparing the SELECT Face query */
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    if (min_circularity < 1.0 && min_area > 0.0)
      {
	  sql = sqlite3_mprintf ("SELECT face_id FROM (SELECT face_id, "
				 "ST_GetFaceGeometry(%Q, face_id) AS geom FROM MAIN.\"%s\" "
				 "WHERE face_id > 0) WHERE Circularity(geom) < %1.12f "
				 "AND ST_Area(geom) < %1.12f",
				 topo->topology_name, xtable, min_circularity,
				 min_area);
      }
    else if (min_circularity >= 1.0 && min_area > 0.0)
      {
	  sql =
	      sqlite3_mprintf
	      ("SELECT face_id FROM MAIN.\"%s\" WHERE face_id > 0 "
	       "AND ST_Area(ST_GetFaceGeometry(%Q, face_id)) < %1.12f", xtable,
	       topo->topology_name, min_area);
      }
    else if (min_circularity < 1.0 && min_area <= 0.0)
      {
	  sql =
	      sqlite3_mprintf
	      ("SELECT face_id FROM MAIN.\"%s\" WHERE face_id > 0 "
	       "AND Circularity(ST_GetFaceGeometry(%Q, face_id)) < %1.12f",
	       xtable, topo->topology_name, min_circularity);
      }
    else
      {
	  free (xtable);
	  return 0;
      }
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_face,
			    NULL);
    sqlite3_free (sql);
    sql = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveSmallFaces() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SELECT Edge query */
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT edge_id FROM MAIN.\"%s\" WHERE right_face = ? "
			 "OR left_face = ? ORDER BY ST_Length(geom) DESC",
			 xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_edge,
			    NULL);
    sqlite3_free (sql);
    sql = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveSmallFaces() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the ST_RemEdgeNewFace() query */
    sql =
	sqlite3_mprintf ("SELECT ST_RemEdgeNewFace(%Q, ?)",
			 topo->topology_name);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_rem,
			    NULL);
    sqlite3_free (sql);
    sql = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveSmallFaces() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    count = 1;
    while (count)
      {
	  sqlite3_reset (stmt_face);
	  sqlite3_clear_bindings (stmt_face);
	  count = 0;
	  while (1)
	    {
		/* scrolling the result set rows */
		ret = sqlite3_step (stmt_face);
		if (ret == SQLITE_DONE)
		    break;	/* end of result set */
		if (ret == SQLITE_ROW)
		  {
		      sqlite3_int64 face_id =
			  sqlite3_column_int64 (stmt_face, 0);
		      if (do_remove_small_faces1
			  (topo, face_id, stmt_edge, stmt_rem))
			  goto error;
		      count++;
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_RemoveSmallFaces error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
      }

    sqlite3_finalize (stmt_face);
    sqlite3_finalize (stmt_edge);
    sqlite3_finalize (stmt_rem);
    return 1;

  error:
    if (sql != NULL)
	sqlite3_free (sql);
    if (stmt_face != NULL)
	sqlite3_finalize (stmt_face);
    if (stmt_edge != NULL)
	sqlite3_finalize (stmt_edge);
    if (stmt_rem != NULL)
	sqlite3_finalize (stmt_rem);
    return 0;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_RemoveDanglingEdges (GaiaTopologyAccessorPtr accessor)
{
/* 
/ attempting to remove all dangling edges from a Topology-Geometry 
*/
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    if (topo == NULL)
	return 0;

/* preparing the ST_RemEdgeNewFace() query */
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT ST_RemEdgeNewFace(%Q, edge_id) FROM MAIN.\"%s\" "
	 "WHERE left_face = right_face", topo->topology_name, xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveDanglingEdges error: \"%s\"",
			       err_msg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (err_msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_RemoveDanglingNodes (GaiaTopologyAccessorPtr accessor)
{
/* 
/ attempting to remove all dangling nodes from a Topology-Geometry 
*/
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    char *err_msg = NULL;
    if (topo == NULL)
	return 0;

/* preparing the ST_RemIsoNode() query */
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT ST_RemIsoNode(%Q, node_id) FROM MAIN.\"%s\" "
			 "WHERE containing_face IS NOT NULL",
			 topo->topology_name, xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveDanglingNodes error: \"%s\"",
			       err_msg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (err_msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_ToGeoTable (GaiaTopologyAccessorPtr accessor,
			const char *db_prefix, const char *ref_table,
			const char *ref_column, const char *out_table,
			int with_spatial_index)
{
/* attempting to create and populate a new GeoTable out from a Topology-Geometry */
    return gaiaTopoGeo_ToGeoTableGeneralize (accessor, db_prefix, ref_table,
					     ref_column, out_table, -1.0,
					     with_spatial_index);
}

SPATIALITE_PRIVATE int
gaia_do_eval_disjoint (const void *handle, const char *matrix)
{
/* same as ST_Disjoint */
    sqlite3 *sqlite = (sqlite3 *) handle;
    char **results;
    int ret;
    int rows;
    int columns;
    int i;
    int value = 0;
    char *sql =
	sqlite3_mprintf ("SELECT ST_RelateMatch(%Q, 'FF*FF****')", matrix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
	value = atoi (results[(i * columns) + 0]);
    sqlite3_free_table (results);
    return value;
}

SPATIALITE_PRIVATE int
gaia_do_eval_overlaps (const void *handle, const char *matrix)
{
/* same as ST_Overlaps */
    sqlite3 *sqlite = (sqlite3 *) handle;
    char **results;
    int ret;
    int rows;
    int columns;
    int i;
    int value = 0;
    char *sql = sqlite3_mprintf ("SELECT ST_RelateMatch(%Q, 'T*T***T**') "
				 "OR ST_RelateMatch(%Q, '1*T***T**')", matrix,
				 matrix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
	value = atoi (results[(i * columns) + 0]);
    sqlite3_free_table (results);
    return value;
}

SPATIALITE_PRIVATE int
gaia_do_eval_covers (const void *handle, const char *matrix)
{
/* same as ST_Covers */
    sqlite3 *sqlite = (sqlite3 *) handle;
    char **results;
    int ret;
    int rows;
    int columns;
    int i;
    int value = 0;
    char *sql = sqlite3_mprintf ("SELECT ST_RelateMatch(%Q, 'T*****FF*') "
				 "OR ST_RelateMatch(%Q, '*T****FF*') OR ST_RelateMatch(%Q, '***T**FF*') "
				 "OR ST_RelateMatch(%Q, '****T*FF*')", matrix,
				 matrix, matrix, matrix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
	value = atoi (results[(i * columns) + 0]);
    sqlite3_free_table (results);
    return value;
}

SPATIALITE_PRIVATE int
gaia_do_eval_covered_by (const void *handle, const char *matrix)
{
/* same as ST_CoveredBy */
    sqlite3 *sqlite = (sqlite3 *) handle;
    char **results;
    int ret;
    int rows;
    int columns;
    int i;
    int value = 0;
    char *sql = sqlite3_mprintf ("SELECT ST_RelateMatch(%Q, 'T*F**F***') "
				 "OR ST_RelateMatch(%Q, '*TF**F***') OR ST_RelateMatch(%Q, '**FT*F***') "
				 "OR ST_RelateMatch(%Q, '**F*TF***')", matrix,
				 matrix, matrix, matrix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
	value = atoi (results[(i * columns) + 0]);
    sqlite3_free_table (results);
    return value;
}

static int
find_polyface_matches (struct gaia_topology *topo, sqlite3_stmt * stmt_ref,
		       sqlite3_stmt * stmt_ins, sqlite3_int64 face_id,
		       sqlite3_int64 containing_face)
{
/* retrieving PolyFace matches */
    int ret;
    int count = 0;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    sqlite3_bind_int64 (stmt_ref, 1, face_id);

    while (1)
      {
	  /* scrolling the result set rows - Spatial Relationships */
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 rowid = sqlite3_column_int64 (stmt_ref, 0);

		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		sqlite3_bind_int64 (stmt_ins, 1, face_id);
		if (containing_face <= 0)
		  {
		      sqlite3_bind_int (stmt_ins, 2, 0);
		      sqlite3_bind_null (stmt_ins, 3);
		  }
		else
		  {
		      sqlite3_bind_int (stmt_ins, 2, 1);
		      sqlite3_bind_int64 (stmt_ins, 3, containing_face);
		  }
		sqlite3_bind_int64 (stmt_ins, 4, rowid);
		/* inserting a row into the output table */
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    count++;
		else
		  {
		      char *msg =
			  sqlite3_mprintf ("PolyFacesList error: \"%s\"",
					   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    if (count == 0)
      {
	  /* unrelated Face */
	  sqlite3_reset (stmt_ins);
	  sqlite3_clear_bindings (stmt_ins);
	  sqlite3_bind_int64 (stmt_ins, 1, face_id);
	  if (containing_face <= 0)
	    {
		sqlite3_bind_int (stmt_ins, 2, 0);
		sqlite3_bind_null (stmt_ins, 3);
	    }
	  else
	    {
		sqlite3_bind_int (stmt_ins, 2, 1);
		sqlite3_bind_int64 (stmt_ins, 3, containing_face);
	    }
	  sqlite3_bind_null (stmt_ins, 4);
	  /* inserting a row into the output table */
	  ret = sqlite3_step (stmt_ins);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

static int
insert_polyface_reverse (struct gaia_topology *topo, sqlite3_stmt * stmt_ins,
			 sqlite3_int64 polygon_id)
{
/* found a mismatching RefPolygon - inserting into the output table */
    int ret;

    sqlite3_reset (stmt_ins);
    sqlite3_clear_bindings (stmt_ins);
    sqlite3_bind_null (stmt_ins, 1);
    sqlite3_bind_int (stmt_ins, 2, 0);
    sqlite3_bind_null (stmt_ins, 3);
    sqlite3_bind_int64 (stmt_ins, 4, polygon_id);
    /* inserting a row into the output table */
    ret = sqlite3_step (stmt_ins);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

static sqlite3_int64
check_hole_face (struct gaia_topology *topo, sqlite3_stmt * stmt_holes,
		 sqlite3_int64 face_id)
{
/* checking if some Face actually is an "hole" within another Face */
    int ret;
    int count_edges = 0;
    int count_valid = 0;
    sqlite3_int64 containing_face = -1;

    sqlite3_reset (stmt_holes);
    sqlite3_clear_bindings (stmt_holes);
    sqlite3_bind_int64 (stmt_holes, 1, face_id);

    while (1)
      {
	  /* scrolling the result set rows - containing face */
	  ret = sqlite3_step (stmt_holes);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 other_face_id =
		    sqlite3_column_int64 (stmt_holes, 0);
		count_edges++;
		if (containing_face < 0)
		    containing_face = other_face_id;
		if (containing_face == other_face_id)
		    count_valid++;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return -1;
	    }
      }
    if (count_edges == count_valid && count_edges > 0 && containing_face > 0)
	;
    else
	containing_face = -1;

    return containing_face;
}

SPATIALITE_PRIVATE int
gaia_check_spatial_index (const void *handle, const char *db_prefix,
			  const char *ref_table, const char *ref_column)
{
/* testing if the RefTable has an R*Tree Spatial Index */
    sqlite3 *sqlite = (sqlite3 *) handle;
    char *sql;
    char *xprefix;
    int has_rtree = 0;
    char **results;
    int ret;
    int rows;
    int columns;
    int i;
    char *errMsg = NULL;

    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT spatial_index_enabled FROM \"%s\".geometry_columns "
	 "WHERE f_table_name = %Q AND f_geometry_column = %Q", xprefix,
	 ref_table, ref_column);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    for (i = 1; i <= rows; i++)
      {
	  has_rtree = atoi (results[(i * columns) + 0]);
      }
    sqlite3_free_table (results);
    return has_rtree;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_PolyFacesList (GaiaTopologyAccessorPtr accessor,
			   const char *db_prefix, const char *ref_table,
			   const char *ref_column, const char *out_table)
{
/* creating and populating a new Table reporting about Faces/Polygon correspondencies */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_faces = NULL;
    sqlite3_stmt *stmt_holes = NULL;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_rev = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    int ret;
    char *sql;
    char *table;
    char *idx_name;
    char *xtable;
    char *xprefix;
    char *xcolumn;
    char *xidx_name;
    char *rtree_name;
    char *seeds;
    char *xseeds;
    int ref_has_spatial_index = 0;
    if (topo == NULL)
	return 0;

/* attempting to build the output table */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("CREATE TABLE main.\"%s\" (\n"
			   "\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tface_id INTEGER,\n"
			   "\tis_hole INTEGER NOT NULL,\n"
			   "\tcontaining_face INTEGER,\n"
			   "\tref_rowid INTEGER)", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    idx_name = sqlite3_mprintf ("idx_%s_face_id", out_table);
    xidx_name = gaiaDoubleQuotedSql (idx_name);
    sqlite3_free (idx_name);
    xtable = gaiaDoubleQuotedSql (out_table);
    sql =
	sqlite3_mprintf
	("CREATE INDEX main.\"%s\" ON \"%s\" (face_id, ref_rowid)", xidx_name,
	 xtable);
    free (xidx_name);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    idx_name = sqlite3_mprintf ("idx_%s_holes", out_table);
    xidx_name = gaiaDoubleQuotedSql (idx_name);
    sqlite3_free (idx_name);
    xtable = gaiaDoubleQuotedSql (out_table);
    sql =
	sqlite3_mprintf
	("CREATE INDEX main.\"%s\" ON \"%s\" (containing_face, face_id)",
	 xidx_name, xtable);
    free (xidx_name);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Faces SQL statement */
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT face_id FROM main.\"%s\" WHERE face_id > 0",
			 xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_faces,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the IsHole SQL statement */
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("SELECT left_face AS other_face FROM main.\"%s\" "
			   "WHERE right_face = ? UNION "
			   "SELECT right_face AS other_face FROM main.\"%s\" WHERE left_face = ?",
			   xtable, xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_holes,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the RefTable SQL statement */
    seeds = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    rtree_name = sqlite3_mprintf ("DB=%s.%s", db_prefix, ref_table);
    ref_has_spatial_index =
	gaia_check_spatial_index (topo->db_handle, db_prefix, ref_table,
				  ref_column);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    xcolumn = gaiaDoubleQuotedSql (ref_column);
    xseeds = gaiaDoubleQuotedSql (seeds);
    if (ref_has_spatial_index)
	sql =
	    sqlite3_mprintf
	    ("SELECT r.rowid FROM MAIN.\"%s\" AS s, \"%s\".\"%s\" AS r "
	     "WHERE ST_Intersects(r.\"%s\", s.geom) == 1 AND s.face_id = ? "
	     "AND r.rowid IN (SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q "
	     "AND f_geometry_column = %Q AND search_frame = s.geom)", xseeds,
	     xprefix, xtable, xcolumn, rtree_name, xcolumn);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT r.rowid FROM MAIN.\"%s\" AS s, \"%s\".\"%s\" AS r "
	     "WHERE  ST_Intersects(r.\"%s\", s.geom) == 1 AND s.face_id = ?",
	     xseeds, xprefix, xtable, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    free (xseeds);
    sqlite3_free (rtree_name);
    sqlite3_free (seeds);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_ref,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Reverse RefTable SQL statement */
    seeds = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    rtree_name =
	sqlite3_mprintf ("DB=%s.%s_seeds", db_prefix, topo->topology_name);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    xcolumn = gaiaDoubleQuotedSql (ref_column);
    xseeds = gaiaDoubleQuotedSql (seeds);
    sql = sqlite3_mprintf ("SELECT r.rowid FROM \"%s\".\"%s\" AS r "
			   "LEFT JOIN MAIN.\"%s\" AS s ON (ST_Intersects(r.\"%s\", s.geom) = 1 "
			   "AND s.face_id IS NOT NULL AND s.rowid IN (SELECT rowid FROM SpatialIndex "
			   "WHERE f_table_name = %Q AND search_frame = r.\"%s\")) "
			   "WHERE s.face_id IS NULL", xprefix, xtable, xseeds,
			   xcolumn, rtree_name, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    free (xseeds);
    sqlite3_free (rtree_name);
    sqlite3_free (seeds);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_rev,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Insert SQL statement */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("INSERT INTO main.\"%s\" (id, face_id, is_hole, "
			   "containing_face, ref_rowid) "
			   "VALUES (NULL, ?, ?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_ins,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - Faces */
	  ret = sqlite3_step (stmt_faces);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id = sqlite3_column_int64 (stmt_faces, 0);
		sqlite3_int64 containing_face =
		    check_hole_face (topo, stmt_holes, face_id);
		if (!find_polyface_matches
		    (topo, stmt_ref, stmt_ins, face_id, containing_face))
		    goto error;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    while (1)
      {
	  /* scrolling the Reverse result set rows - Polygons */
	  ret = sqlite3_step (stmt_rev);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 polyg_id = sqlite3_column_int64 (stmt_rev, 0);
		if (!insert_polyface_reverse (topo, stmt_ins, polyg_id))
		    goto error;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("PolyFacesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_faces);
    sqlite3_finalize (stmt_holes);
    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_rev);
    sqlite3_finalize (stmt_ins);
    return 1;

  error:
    if (stmt_faces != NULL)
	sqlite3_finalize (stmt_faces);
    if (stmt_holes != NULL)
	sqlite3_finalize (stmt_holes);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_rev != NULL)
	sqlite3_finalize (stmt_rev);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    return 0;
}

static int
do_find_matching_point (gaiaLinestringPtr ln1, int *idx1, gaiaLinestringPtr ln2,
			int *idx2)
{
/* searching for a common point in both Linestrings */
    int i1;
    int i2;
    double x1;
    double y1;
    double z1;
    double m1;
    double x2;
    double y2;
    double z2;
    double m2;
    for (i1 = 0; i1 < ln1->Points; i1++)
      {
	  /* extracting a Vertex from the first Linestring */
	  z1 = 0.0;
	  m1 = 0.0;
	  if (ln1->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln1->Coords, i1, &x1, &y1, &z1);
	    }
	  else if (ln1->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln1->Coords, i1, &x1, &y1, &m1);
	    }
	  else if (ln1->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln1->Coords, i1, &x1, &y1, &z1, &m1);
	    }
	  else
	    {
		gaiaGetPoint (ln1->Coords, i1, &x1, &y1);
	    }
	  for (i2 = 0; i2 < ln2->Points; i2++)
	    {
		/* extracting a Vertex from the second Linestring */
		z2 = 0.0;
		m2 = 0.0;
		if (ln2->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln2->Coords, i2, &x2, &y2, &z2);
		  }
		else if (ln2->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (ln2->Coords, i2, &x2, &y2, &m2);
		  }
		else if (ln2->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln2->Coords, i2, &x2, &y2, &z2, &m2);
		  }
		else
		  {
		      gaiaGetPoint (ln2->Coords, i2, &x2, &y2);
		  }
		if (x1 == x2 && y1 == y2 && z1 == z2 && m1 == m2)
		  {
		      *idx1 = i1;
		      *idx2 = i2;
		      return 1;
		  }
	    }
      }
    *idx1 = -1;
    *idx2 = -1;
    return 0;
}

static int
do_check_forward (gaiaLinestringPtr ln1, int idx1, gaiaLinestringPtr ln2,
		  int idx2)
{
/* testing for further matching Vertices (same directions) */
    int i1;
    int i2;
    double x1;
    double y1;
    double z1;
    double m1;
    double x2;
    double y2;
    double z2;
    double m2;
    int count = 0;
    for (i1 = idx1; i1 < ln1->Points; i1++)
      {
	  /* extracting a Vertex from the first Linestring */
	  z1 = 0.0;
	  m1 = 0.0;
	  if (ln1->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln1->Coords, i1, &x1, &y1, &z1);
	    }
	  else if (ln1->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln1->Coords, i1, &x1, &y1, &m1);
	    }
	  else if (ln1->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln1->Coords, i1, &x1, &y1, &z1, &m1);
	    }
	  else
	    {
		gaiaGetPoint (ln1->Coords, i1, &x1, &y1);
	    }
	  for (i2 = idx2; i2 < ln2->Points; i2++)
	    {
		/* extracting a Vertex from the second Linestring */
		z2 = 0.0;
		m2 = 0.0;
		if (ln2->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln2->Coords, i2, &x2, &y2, &z2);
		  }
		else if (ln2->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (ln2->Coords, i2, &x2, &y2, &m2);
		  }
		else if (ln2->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln2->Coords, i2, &x2, &y2, &z2, &m2);
		  }
		else
		  {
		      gaiaGetPoint (ln2->Coords, i2, &x2, &y2);
		  }
		if (x1 == x2 && y1 == y2 && z1 == z2 && m1 == m2)
		  {
		      idx2++;
		      count++;
		      break;
		  }
	    }
      }
    if (count >= 2)
	return 1;
    return 0;
}

static int
do_check_backward (gaiaLinestringPtr ln1, int idx1, gaiaLinestringPtr ln2,
		   int idx2)
{
/* testing for further matching Vertices (opposite directions) */
    int i1;
    int i2;
    double x1;
    double y1;
    double z1;
    double m1;
    double x2;
    double y2;
    double z2;
    double m2;
    int count = 0;
    for (i1 = idx1; i1 < ln1->Points; i1++)
      {
	  /* extracting a Vertex from the first Linestring */
	  z1 = 0.0;
	  m1 = 0.0;
	  if (ln1->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln1->Coords, i1, &x1, &y1, &z1);
	    }
	  else if (ln1->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln1->Coords, i1, &x1, &y1, &m1);
	    }
	  else if (ln1->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln1->Coords, i1, &x1, &y1, &z1, &m1);
	    }
	  else
	    {
		gaiaGetPoint (ln1->Coords, i1, &x1, &y1);
	    }
	  for (i2 = idx2; i2 >= 0; i2--)
	    {
		/* extracting a Vertex from the second Linestring */
		z2 = 0.0;
		m2 = 0.0;
		if (ln2->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (ln2->Coords, i2, &x2, &y2, &z2);
		  }
		else if (ln2->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (ln2->Coords, i2, &x2, &y2, &m2);
		  }
		else if (ln2->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (ln2->Coords, i2, &x2, &y2, &z2, &m2);
		  }
		else
		  {
		      gaiaGetPoint (ln2->Coords, i2, &x2, &y2);
		  }
		if (x1 == x2 && y1 == y2 && z1 == z2 && m1 == m2)
		  {
		      idx2--;
		      count++;
		      break;
		  }
	    }
      }
    if (count >= 2)
	return 1;
    return 0;
}

SPATIALITE_PRIVATE void
gaia_do_check_direction (const void *x1, const void *x2, char *direction)
{
/* checking if two Linestrings have the same direction */
    gaiaGeomCollPtr g1 = (gaiaGeomCollPtr) x1;
    gaiaGeomCollPtr g2 = (gaiaGeomCollPtr) x2;
    int idx1;
    int idx2;
    gaiaLinestringPtr ln1 = g1->FirstLinestring;
    gaiaLinestringPtr ln2 = g2->FirstLinestring;
    while (ln2 != NULL)
      {
	  /* the second Geometry could be a MultiLinestring */
	  if (do_find_matching_point (ln1, &idx1, ln2, &idx2))
	    {
		if (do_check_forward (ln1, idx1, ln2, idx2))
		  {
		      /* ok, same directions */
		      *direction = '+';
		      return;
		  }
		if (do_check_backward (ln1, idx1, ln2, idx2))
		  {
		      /* ok, opposite directions */
		      *direction = '-';
		      return;
		  }
	    }
	  ln2 = ln2->Next;
      }
    *direction = '?';
}

static int
find_lineedge_relationships (struct gaia_topology *topo,
			     sqlite3_stmt * stmt_ref, sqlite3_stmt * stmt_ins,
			     sqlite3_int64 edge_id, const unsigned char *blob,
			     int blob_sz)
{
/* retrieving LineEdge relationships */
    int ret;
    int count = 0;
    char direction[2];
    strcpy (direction, "?");

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    sqlite3_bind_blob (stmt_ref, 1, blob, blob_sz, SQLITE_STATIC);
    sqlite3_bind_blob (stmt_ref, 2, blob, blob_sz, SQLITE_STATIC);

    while (1)
      {
	  /* scrolling the result set rows - Spatial Relationships */
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int overlaps = 0;
		int covers = 0;
		int covered_by = 0;
		sqlite3_int64 rowid = sqlite3_column_int64 (stmt_ref, 0);
		const char *matrix =
		    (const char *) sqlite3_column_text (stmt_ref, 1);
		if (gaia_do_eval_disjoint (topo->db_handle, matrix))
		    continue;
		overlaps = gaia_do_eval_overlaps (topo->db_handle, matrix);
		covers = gaia_do_eval_covers (topo->db_handle, matrix);
		covered_by = gaia_do_eval_covered_by (topo->db_handle, matrix);
		if (!overlaps && !covers && !covered_by)
		    continue;

		if (sqlite3_column_type (stmt_ref, 2) == SQLITE_BLOB)
		  {
		      /* testing directions */
		      gaiaGeomCollPtr geom_edge = NULL;
		      gaiaGeomCollPtr geom_line = NULL;
		      const unsigned char *blob2 =
			  sqlite3_column_blob (stmt_ref, 2);
		      int blob2_sz = sqlite3_column_bytes (stmt_ref, 2);
		      geom_edge = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      geom_line = gaiaFromSpatiaLiteBlobWkb (blob2, blob2_sz);
		      if (geom_edge != NULL && geom_line != NULL)
			  gaia_do_check_direction (geom_edge, geom_line,
						   direction);
		      if (geom_edge != NULL)
			  gaiaFreeGeomColl (geom_edge);
		      if (geom_line != NULL)
			  gaiaFreeGeomColl (geom_line);
		  }

		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		sqlite3_bind_int64 (stmt_ins, 1, edge_id);
		sqlite3_bind_int64 (stmt_ins, 2, rowid);
		sqlite3_bind_text (stmt_ins, 3, direction, 1, SQLITE_STATIC);
		sqlite3_bind_text (stmt_ins, 4, matrix, strlen (matrix),
				   SQLITE_STATIC);
		sqlite3_bind_int (stmt_ins, 5, overlaps);
		sqlite3_bind_int (stmt_ins, 6, covers);
		sqlite3_bind_int (stmt_ins, 7, covered_by);
		/* inserting a row into the output table */
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    count++;
		else
		  {
		      char *msg =
			  sqlite3_mprintf ("LineEdgesList error: \"%s\"",
					   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    if (count == 0)
      {
	  /* unrelated Edge */
	  sqlite3_reset (stmt_ins);
	  sqlite3_clear_bindings (stmt_ins);
	  sqlite3_bind_int64 (stmt_ins, 1, edge_id);
	  sqlite3_bind_null (stmt_ins, 2);
	  sqlite3_bind_null (stmt_ins, 3);
	  sqlite3_bind_null (stmt_ins, 4);
	  sqlite3_bind_null (stmt_ins, 5);
	  sqlite3_bind_null (stmt_ins, 6);
	  sqlite3_bind_null (stmt_ins, 7);
	  /* inserting a row into the output table */
	  ret = sqlite3_step (stmt_ins);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      ;
	  else
	    {
		char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_LineEdgesList (GaiaTopologyAccessorPtr accessor,
			   const char *db_prefix, const char *ref_table,
			   const char *ref_column, const char *out_table)
{
/* creating and populating a new Table reporting about Edges/Linestring correspondencies */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_edges = NULL;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    int ret;
    char *sql;
    char *table;
    char *idx_name;
    char *xtable;
    char *xprefix;
    char *xcolumn;
    char *xidx_name;
    char *rtree_name;
    int ref_has_spatial_index = 0;
    if (topo == NULL)
	return 0;

/* attempting to build the output table */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("CREATE TABLE main.\"%s\" (\n"
			   "\tid INTEGER PRIMARY KEY AUTOINCREMENT,\n"
			   "\tedge_id INTEGER NOT NULL,\n"
			   "\tref_rowid INTEGER,\n"
			   "\tdirection TEXT,\n"
			   "\tmatrix TEXT,\n"
			   "\toverlaps INTEGER,\n"
			   "\tcovers INTEGER,\n"
			   "\tcovered_by INTEGER)", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    idx_name = sqlite3_mprintf ("idx_%s_edge_id", out_table);
    xidx_name = gaiaDoubleQuotedSql (idx_name);
    sqlite3_free (idx_name);
    xtable = gaiaDoubleQuotedSql (out_table);
    sql =
	sqlite3_mprintf
	("CREATE INDEX main.\"%s\" ON \"%s\" (edge_id, ref_rowid)", xidx_name,
	 xtable);
    free (xidx_name);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Edges SQL statement */
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT edge_id, geom FROM main.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_edges,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the RefTable SQL statement */
    rtree_name = sqlite3_mprintf ("DB=%s.%s", db_prefix, ref_table);
    ref_has_spatial_index =
	gaia_check_spatial_index (topo->db_handle, db_prefix, ref_table,
				  ref_column);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    xcolumn = gaiaDoubleQuotedSql (ref_column);
    if (ref_has_spatial_index)
	sql =
	    sqlite3_mprintf
	    ("SELECT rowid, ST_Relate(?, \"%s\"), \"%s\" FROM \"%s\".\"%s\" "
	     "WHERE  rowid IN ("
	     "SELECT rowid FROM SpatialIndex WHERE f_table_name = %Q AND "
	     "f_geometry_column = %Q AND search_frame = ?)", xcolumn, xcolumn,
	     xprefix, xtable, rtree_name, ref_column);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT rowid, ST_Relate(?, \"%s\"), \"%s\"  FROM \"%s\".\"%s\" "
	     "WHERE MbrIntersects(?, \"%s\")", xcolumn, xcolumn, xprefix,
	     xtable, xcolumn);
    free (xprefix);
    free (xtable);
    free (xcolumn);
    sqlite3_free (rtree_name);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_ref,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* building the Insert SQL statement */
    xtable = gaiaDoubleQuotedSql (out_table);
    sql = sqlite3_mprintf ("INSERT INTO main.\"%s\" (id, edge_id, ref_rowid, "
			   "direction, matrix, overlaps, covers, covered_by) "
			   "VALUES (NULL, ?, ?, ?, ?, ?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_ins,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows - Edges */
	  ret = sqlite3_step (stmt_edges);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_edges, 0);
		if (sqlite3_column_type (stmt_edges, 1) == SQLITE_BLOB)
		  {
		      if (!find_lineedge_relationships
			  (topo, stmt_ref, stmt_ins, edge_id,
			   sqlite3_column_blob (stmt_edges, 1),
			   sqlite3_column_bytes (stmt_edges, 1)))
			  goto error;
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("LineEdgesList error: Edge not a BLOB value");
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("LineEdgesList error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_edges);
    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    return 1;

  error:
    if (stmt_edges != NULL)
	sqlite3_finalize (stmt_edges);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    return 0;
}

static struct face_item *
create_face_item (sqlite3_int64 face_id)
{
/* creating a Face Item */
    struct face_item *item = malloc (sizeof (struct face_item));
    item->face_id = face_id;
    item->next = NULL;
    return item;
}

static void
destroy_face_item (struct face_item *item)
{
/* destroying a Face Item */
    if (item == NULL)
	return;
    free (item);
}

static struct face_edge_item *
create_face_edge_item (sqlite3_int64 edge_id, sqlite3_int64 left_face,
		       sqlite3_int64 right_face, gaiaGeomCollPtr geom)
{
/* creating a Face-Edge Item */
    struct face_edge_item *item = malloc (sizeof (struct face_edge_item));
    item->edge_id = edge_id;
    item->left_face = left_face;
    item->right_face = right_face;
    item->geom = geom;
    item->count = 0;
    item->next = NULL;
    return item;
}

static void
destroy_face_edge_item (struct face_edge_item *item)
{
/* destroying a Face-Edge Item */
    if (item == NULL)
	return;
    if (item->geom != NULL)
	gaiaFreeGeomColl (item->geom);
    free (item);
}

TOPOLOGY_PRIVATE struct face_edges *
auxtopo_create_face_edges (int has_z, int srid)
{
/* creating an empty Face-Edges list */
    struct face_edges *list = malloc (sizeof (struct face_edges));
    list->has_z = has_z;
    list->srid = srid;
    list->first_edge = NULL;
    list->last_edge = NULL;
    list->first_face = NULL;
    list->last_face = NULL;
    return list;
}

TOPOLOGY_PRIVATE void
auxtopo_free_face_edges (struct face_edges *list)
{
/* destroying a Face-Edges list */
    struct face_edge_item *fe;
    struct face_edge_item *fen;
    struct face_item *f;
    struct face_item *fn;
    if (list == NULL)
	return;

    fe = list->first_edge;
    while (fe != NULL)
      {
	  /* destroying all Face-Edge items */
	  fen = fe->next;
	  destroy_face_edge_item (fe);
	  fe = fen;
      }
    f = list->first_face;
    while (f != NULL)
      {
	  /* destroying all Face items */
	  fn = f->next;
	  destroy_face_item (f);
	  f = fn;
      }
    free (list);
}

TOPOLOGY_PRIVATE void
auxtopo_add_face_edge (struct face_edges *list, sqlite3_int64 face_id,
		       sqlite3_int64 edge_id, sqlite3_int64 left_face,
		       sqlite3_int64 right_face, gaiaGeomCollPtr geom)
{
/* adding a Face-Edge Item into the list */
    struct face_item *f;
    struct face_edge_item *fe =
	create_face_edge_item (edge_id, left_face, right_face, geom);
    if (list->first_edge == NULL)
	list->first_edge = fe;
    if (list->last_edge != NULL)
	list->last_edge->next = fe;
    list->last_edge = fe;

    f = list->first_face;
    while (f != NULL)
      {
	  if (f->face_id == face_id)
	      return;
	  f = f->next;
      }

    /* inserting the Face-ID into the list */
    f = create_face_item (face_id);
    if (list->first_face == NULL)
	list->first_face = f;
    if (list->last_face != NULL)
	list->last_face->next = f;
    list->last_face = f;
}

TOPOLOGY_PRIVATE void
auxtopo_select_valid_face_edges (struct face_edges *list)
{
/* identifying all useless Edges */
    struct face_edge_item *fe = list->first_edge;
    while (fe != NULL)
      {
	  struct face_item *f = list->first_face;
	  while (f != NULL)
	    {
		if (f->face_id == fe->left_face)
		    fe->count += 1;
		if (f->face_id == fe->right_face)
		    fe->count += 1;
		f = f->next;
	    }
	  fe = fe->next;
      }
}

TOPOLOGY_PRIVATE gaiaGeomCollPtr
auxtopo_polygonize_face_edges (struct face_edges *list, const void *cache)
{
/* attempting to reaggregrate Polygons from valid Edges */
    gaiaGeomCollPtr sparse;
    gaiaGeomCollPtr rearranged;
    struct face_edge_item *fe;

    if (list->has_z)
	sparse = gaiaAllocGeomCollXYZ ();
    else
	sparse = gaiaAllocGeomColl ();
    sparse->Srid = list->srid;

    fe = list->first_edge;
    while (fe != NULL)
      {
	  if (fe->count < 2)
	    {
		/* found a valid Edge: adding to the MultiListring */
		gaiaLinestringPtr ln = fe->geom->FirstLinestring;
		while (ln != NULL)
		  {
		      if (list->has_z)
			  auxtopo_copy_linestring3d (ln, sparse);
		      else
			  auxtopo_copy_linestring (ln, sparse);
		      ln = ln->Next;
		  }
	    }
	  fe = fe->next;
      }
    rearranged = gaiaPolygonize_r (cache, sparse, 0);
    gaiaFreeGeomColl (sparse);
    return rearranged;
}

TOPOLOGY_PRIVATE gaiaGeomCollPtr
auxtopo_polygonize_face_edges_generalize (struct face_edges * list,
					  const void *cache)
{
/* attempting to reaggregrate Polygons from valid Edges */
    gaiaGeomCollPtr sparse;
    gaiaGeomCollPtr renoded;
    gaiaGeomCollPtr rearranged;
    struct face_edge_item *fe;

    if (list->has_z)
	sparse = gaiaAllocGeomCollXYZ ();
    else
	sparse = gaiaAllocGeomColl ();
    sparse->Srid = list->srid;

    fe = list->first_edge;
    while (fe != NULL)
      {
	  if (fe->count < 2)
	    {
		/* found a valid Edge: adding to the MultiListring */
		gaiaLinestringPtr ln = fe->geom->FirstLinestring;
		while (ln != NULL)
		  {
		      if (list->has_z)
			  auxtopo_copy_linestring3d (ln, sparse);
		      else
			  auxtopo_copy_linestring (ln, sparse);
		      ln = ln->Next;
		  }
	    }
	  fe = fe->next;
      }
    renoded = gaiaNodeLines (cache, sparse);
    gaiaFreeGeomColl (sparse);
    if (renoded == NULL)
	return NULL;
    rearranged = gaiaPolygonize_r (cache, renoded, 0);
    gaiaFreeGeomColl (renoded);
    return rearranged;
}

TOPOLOGY_PRIVATE gaiaGeomCollPtr
auxtopo_make_geom_from_point (int srid, int has_z, gaiaPointPtr pt)
{
/* quick constructor: Geometry based on external point */
    gaiaGeomCollPtr reference;
    if (has_z)
	reference = gaiaAllocGeomCollXYZ ();
    else
	reference = gaiaAllocGeomColl ();
    reference->Srid = srid;
    pt->Next = NULL;
    reference->FirstPoint = pt;
    reference->LastPoint = pt;
    return reference;
}

TOPOLOGY_PRIVATE gaiaGeomCollPtr
auxtopo_make_geom_from_line (int srid, gaiaLinestringPtr ln)
{
/* quick constructor: Geometry based on external line */
    gaiaGeomCollPtr reference;
    if (ln->DimensionModel == GAIA_XY_Z_M)
	reference = gaiaAllocGeomCollXYZM ();
    else if (ln->DimensionModel == GAIA_XY_Z)
	reference = gaiaAllocGeomCollXYZ ();
    else if (ln->DimensionModel == GAIA_XY_M)
	reference = gaiaAllocGeomCollXYM ();
    else
	reference = gaiaAllocGeomColl ();
    reference->Srid = srid;
    ln->Next = NULL;
    reference->FirstLinestring = ln;
    reference->LastLinestring = ln;
    return reference;
}

TOPOLOGY_PRIVATE void
auxtopo_copy_linestring3d (gaiaLinestringPtr in, gaiaGeomCollPtr geom)
{
/* inserting/copying a Linestring 3D into another Geometry */
    int iv;
    double x;
    double y;
    double z;
    gaiaLinestringPtr out = gaiaAddLinestringToGeomColl (geom, in->Points);
    for (iv = 0; iv < in->Points; iv++)
      {
	  gaiaGetPointXYZ (in->Coords, iv, &x, &y, &z);
	  gaiaSetPointXYZ (out->Coords, iv, x, y, z);
      }
}

TOPOLOGY_PRIVATE void
auxtopo_copy_linestring (gaiaLinestringPtr in, gaiaGeomCollPtr geom)
{
/* inserting/copying a Linestring into another Geometry */
    int iv;
    double x;
    double y;
    gaiaLinestringPtr out = gaiaAddLinestringToGeomColl (geom, in->Points);
    for (iv = 0; iv < in->Points; iv++)
      {
	  gaiaGetPoint (in->Coords, iv, &x, &y);
	  gaiaSetPoint (out->Coords, iv, x, y);
      }
}

TOPOLOGY_PRIVATE void
auxtopo_destroy_geom_from (gaiaGeomCollPtr reference)
{
/* safely destroying a reference geometry */
    if (reference == NULL)
	return;

/* releasing ownership on external points, lines and polygs */
    reference->FirstPoint = NULL;
    reference->LastPoint = NULL;
    reference->FirstLinestring = NULL;
    reference->LastLinestring = NULL;
    reference->FirstPolygon = NULL;
    reference->LastPolygon = NULL;

    gaiaFreeGeomColl (reference);
}

TOPOLOGY_PRIVATE int
auxtopo_retrieve_geometry_type (sqlite3 * db_handle, const char *db_prefix,
				const char *table, const char *column,
				int *ref_type)
{
/* attempting to retrive the reference Geometry Type */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    char *xprefix;
    int type = -1;

/* querying GEOMETRY_COLUMNS */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT geometry_type "
	 "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) AND "
	 "Lower(f_geometry_column) = Lower(%Q)", xprefix, table, column);
    free (xprefix);
    ret =
	sqlite3_get_table (db_handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  type = atoi (results[(i * columns) + 0]);
      }
    sqlite3_free_table (results);

    if (type < 0)
	return 0;

    *ref_type = type;
    return 1;
}

TOPOLOGY_PRIVATE int
auxtopo_create_togeotable_sql (sqlite3 * db_handle, const char *db_prefix,
			       const char *ref_table, const char *ref_column,
			       const char *out_table, char **xcreate,
			       char **xselect, char **xinsert,
			       int *ref_geom_col)
{
/* composing the CREATE TABLE output-table statement */
    char *create = NULL;
    char *select = NULL;
    char *insert = NULL;
    char *prev;
    char *sql;
    char *xprefix;
    char *xtable;
    int i;
    char **results;
    int rows;
    int columns;
    const char *name;
    const char *type;
    int notnull;
    int pk_no;
    int ret;
    int first_create = 1;
    int first_select = 1;
    int first_insert = 1;
    int npk = 0;
    int ipk;
    int ncols = 0;
    int icol;
    int ref_col = 0;
    int xref_geom_col;

    *xcreate = NULL;
    *xselect = NULL;
    *xinsert = NULL;
    *ref_geom_col = -1;

    xtable = gaiaDoubleQuotedSql (out_table);
    create = sqlite3_mprintf ("CREATE TABLE MAIN.\"%s\" (", xtable);
    select = sqlite3_mprintf ("SELECT ");
    insert = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" (", xtable);
    free (xtable);

    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (db_handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		/* counting how many PK columns are there */
		if (atoi (results[(i * columns) + 5]) != 0)
		    npk++;
	    }
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		type = results[(i * columns) + 2];
		notnull = atoi (results[(i * columns) + 3]);
		pk_no = atoi (results[(i * columns) + 5]);
		/* SELECT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = select;
		if (first_select)
		    select = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    select = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_select = 0;
		free (xprefix);
		sqlite3_free (prev);
		if (strcasecmp (name, ref_column) == 0)
		  {
		      /* saving the index of ref-geometry */
		      xref_geom_col = ref_col;
		  }
		ref_col++;
		/* INSERT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = insert;
		if (first_insert)
		    insert = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    insert = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_insert = 0;
		free (xprefix);
		sqlite3_free (prev);
		ncols++;
		/* CREATE: adding a column definition */
		if (strcasecmp (name, ref_column) == 0)
		  {
		      /* skipping the geometry column */
		      continue;
		  }
		prev = create;
		xprefix = gaiaDoubleQuotedSql (name);
		if (first_create)
		  {
		      first_create = 0;
		      if (notnull)
			  create =
			      sqlite3_mprintf ("%s\n\t\"%s\" %s NOT NULL", prev,
					       xprefix, type);
		      else
			  create =
			      sqlite3_mprintf ("%s\n\t\"%s\" %s", prev, xprefix,
					       type);
		  }
		else
		  {
		      if (notnull)
			  create =
			      sqlite3_mprintf ("%s,\n\t\"%s\" %s NOT NULL",
					       prev, xprefix, type);
		      else
			  create =
			      sqlite3_mprintf ("%s,\n\t\"%s\" %s", prev,
					       xprefix, type);
		  }
		free (xprefix);
		sqlite3_free (prev);
		if (npk == 1 && pk_no != 0)
		  {
		      /* declaring a single-column Primary Key */
		      prev = create;
		      create = sqlite3_mprintf ("%s PRIMARY KEY", prev);
		      sqlite3_free (prev);
		  }
	    }
	  if (npk > 1)
	    {
		/* declaring a multi-column Primary Key */
		prev = create;
		sql = sqlite3_mprintf ("pk_%s", out_table);
		xprefix = gaiaDoubleQuotedSql (sql);
		sqlite3_free (sql);
		create =
		    sqlite3_mprintf ("%s,\n\tCONSTRAINT \"%s\" PRIMARY KEY (",
				     prev, xprefix);
		free (xprefix);
		sqlite3_free (prev);
		for (ipk = 1; ipk <= npk; ipk++)
		  {
		      /* searching a Primary Key column */
		      for (i = 1; i <= rows; i++)
			{
			    if (atoi (results[(i * columns) + 5]) == ipk)
			      {
				  /* declaring a Primary Key column */
				  name = results[(i * columns) + 1];
				  xprefix = gaiaDoubleQuotedSql (name);
				  prev = create;
				  if (ipk == 1)
				      create =
					  sqlite3_mprintf ("%s\"%s\"", prev,
							   xprefix);
				  else
				      create =
					  sqlite3_mprintf ("%s, \"%s\"", prev,
							   xprefix);
				  free (xprefix);
				  sqlite3_free (prev);
			      }
			}
		  }
		prev = create;
		create = sqlite3_mprintf ("%s)", prev);
		sqlite3_free (prev);
	    }
      }
    sqlite3_free_table (results);

/* completing the SQL statements */
    prev = create;
    create = sqlite3_mprintf ("%s)", prev);
    sqlite3_free (prev);
    prev = select;
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    select = sqlite3_mprintf ("%s FROM \"%s\".\"%s\"", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = insert;
    insert = sqlite3_mprintf ("%s) VALUES (", prev);
    sqlite3_free (prev);
    for (icol = 0; icol < ncols; icol++)
      {
	  prev = insert;
	  if (icol == 0)
	      insert = sqlite3_mprintf ("%s?", prev);
	  else
	      insert = sqlite3_mprintf ("%s, ?", prev);
	  sqlite3_free (prev);
      }
    prev = insert;
    insert = sqlite3_mprintf ("%s)", prev);
    sqlite3_free (prev);

    *xcreate = create;
    *xselect = select;
    *xinsert = insert;
    *ref_geom_col = xref_geom_col;
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    return 0;
}

static int
is_geometry_column (sqlite3 * db_handle, const char *db_prefix,
		    const char *table, const char *column)
{
/* testing for Geometry columns */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    char *xprefix;
    int count = 0;

/* querying GEOMETRY_COLUMNS */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT Count(*) "
	 "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) AND "
	 "Lower(f_geometry_column) = Lower(%Q)", xprefix, table, column);
    free (xprefix);
    ret =
	sqlite3_get_table (db_handle, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  count = atoi (results[(i * columns) + 0]);
      }
    sqlite3_free_table (results);

    if (count > 0)
	return 1;
    return 0;
}

static int
auxtopo_create_features_sql (sqlite3 * db_handle, const char *db_prefix,
			     const char *ref_table, const char *ref_column,
			     const char *topology_name,
			     sqlite3_int64 topolayer_id, char **xcreate,
			     char **xselect, char **xinsert)
{
/* composing the CREATE TABLE fatures-table statement */
    char *create = NULL;
    char *select = NULL;
    char *insert = NULL;
    char *prev;
    char *sql;
    char *xprefix;
    char *xgeom;
    char *table;
    char *xtable;
    char dummy[64];
    int i;
    char **results;
    int rows;
    int columns;
    const char *name;
    const char *type;
    int notnull;
    int ret;
    int first_select = 1;
    int first_insert = 1;
    int ncols = 0;
    int icol;
    int ref_col = 0;

    *xcreate = NULL;
    *xselect = NULL;
    *xinsert = NULL;

    sprintf (dummy, "%lld", topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topology_name, dummy);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    create =
	sqlite3_mprintf
	("CREATE TABLE MAIN.\"%s\" (\n\tfid INTEGER PRIMARY KEY AUTOINCREMENT",
	 xtable);
    select = sqlite3_mprintf ("SELECT ");
    insert = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" (", xtable);
    free (xtable);

    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (db_handle, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		type = results[(i * columns) + 2];
		notnull = atoi (results[(i * columns) + 3]);
		if (strcasecmp (name, "fid") == 0)
		    continue;
		if (is_geometry_column (db_handle, db_prefix, ref_table, name))
		    continue;
		if (ref_column != NULL)
		  {
		      if (strcasecmp (ref_column, name) == 0)
			  continue;
		  }
		/* SELECT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = select;
		if (first_select)
		    select = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    select = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_select = 0;
		free (xprefix);
		sqlite3_free (prev);
		ref_col++;
		/* INSERT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = insert;
		if (first_insert)
		    insert = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    insert = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_insert = 0;
		free (xprefix);
		sqlite3_free (prev);
		ncols++;
		/* CREATE: adding a column definition */
		prev = create;
		xprefix = gaiaDoubleQuotedSql (name);
		if (notnull)
		    create =
			sqlite3_mprintf ("%s,\n\t\"%s\" %s NOT NULL",
					 prev, xprefix, type);
		else
		    create =
			sqlite3_mprintf ("%s,\n\t\"%s\" %s", prev,
					 xprefix, type);
		free (xprefix);
		sqlite3_free (prev);
	    }
      }
    sqlite3_free_table (results);

/* completing the SQL statements */
    prev = create;
    create = sqlite3_mprintf ("%s)", prev);
    sqlite3_free (prev);
    prev = select;
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (ref_table);
    if (ref_column != NULL)
      {
	  xgeom = gaiaDoubleQuotedSql (ref_column);
	  select =
	      sqlite3_mprintf ("%s, \"%s\" FROM \"%s\".\"%s\"", prev, xgeom,
			       xprefix, xtable);
	  free (xgeom);
      }
    else
	select =
	    sqlite3_mprintf ("%s FROM \"%s\".\"%s\"", prev, xprefix, xtable);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev);
    prev = insert;
    insert = sqlite3_mprintf ("%s) VALUES (", prev);
    sqlite3_free (prev);
    for (icol = 0; icol < ncols; icol++)
      {
	  prev = insert;
	  if (icol == 0)
	      insert = sqlite3_mprintf ("%s?", prev);
	  else
	      insert = sqlite3_mprintf ("%s, ?", prev);
	  sqlite3_free (prev);
      }
    prev = insert;
    insert = sqlite3_mprintf ("%s)", prev);
    sqlite3_free (prev);

    *xcreate = create;
    *xselect = select;
    *xinsert = insert;
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    return 0;
}

static int
do_register_topolayer (struct gaia_topology *topo, const char *topolayer_name,
		       sqlite3_int64 * topolayer_id)
{
/* attempting to register a new TopoLayer */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    char *err_msg = NULL;

    table = sqlite3_mprintf ("%s_topolayers", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO \"%s\" (topolayer_name) VALUES (Lower(%Q))", xtable,
	 topolayer_name);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("RegisterTopoLayer error: \"%s\"", err_msg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (err_msg);
	  sqlite3_free (msg);
	  return 0;
      }

    *topolayer_id = sqlite3_last_insert_rowid (topo->db_handle);
    return 1;
}

static int
do_eval_topolayer_point (struct gaia_topology *topo, gaiaGeomCollPtr reference,
			 sqlite3_stmt * stmt_node, sqlite3_stmt * stmt_rels,
			 sqlite3_int64 topolayer_id, sqlite3_int64 fid)
{
/* retrieving Points from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;

/* initializing the Topo-Node query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_node);
    sqlite3_clear_bindings (stmt_node);
    sqlite3_bind_blob (stmt_node, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_node, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_node);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt_node, 0);
		sqlite3_reset (stmt_rels);
		sqlite3_clear_bindings (stmt_rels);
		sqlite3_bind_int64 (stmt_rels, 1, node_id);
		sqlite3_bind_null (stmt_rels, 2);
		sqlite3_bind_null (stmt_rels, 3);
		sqlite3_bind_int64 (stmt_rels, 4, topolayer_id);
		sqlite3_bind_int64 (stmt_rels, 5, fid);
		ret = sqlite3_step (stmt_rels);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_CreateTopoLayer error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

static int
do_eval_topolayer_line (struct gaia_topology *topo, gaiaGeomCollPtr reference,
			sqlite3_stmt * stmt_edge, sqlite3_stmt * stmt_rels,
			sqlite3_int64 topolayer_id, sqlite3_int64 fid)
{
/* retrieving Linestrings from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;

/* initializing the Topo-Edge query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_edge);
    sqlite3_clear_bindings (stmt_edge);
    sqlite3_bind_blob (stmt_edge, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_edge, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_edge);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_edge, 0);
		sqlite3_reset (stmt_rels);
		sqlite3_clear_bindings (stmt_rels);
		sqlite3_bind_null (stmt_rels, 1);
		sqlite3_bind_int64 (stmt_rels, 2, edge_id);
		sqlite3_bind_null (stmt_rels, 3);
		sqlite3_bind_int64 (stmt_rels, 4, topolayer_id);
		sqlite3_bind_int64 (stmt_rels, 5, fid);
		ret = sqlite3_step (stmt_rels);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_CreateTopoLayer error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

static int
do_eval_topolayer_polyg (struct gaia_topology *topo, gaiaGeomCollPtr reference,
			 sqlite3_stmt * stmt_face, sqlite3_stmt * stmt_rels,
			 sqlite3_int64 topolayer_id, sqlite3_int64 fid)
{
/* retrieving Polygon from Topology */
    int ret;
    unsigned char *p_blob;
    int n_bytes;

/* initializing the Topo-Face query */
    gaiaToSpatiaLiteBlobWkb (reference, &p_blob, &n_bytes);
    sqlite3_reset (stmt_face);
    sqlite3_clear_bindings (stmt_face);
    sqlite3_bind_blob (stmt_face, 1, p_blob, n_bytes, SQLITE_TRANSIENT);
    sqlite3_bind_blob (stmt_face, 2, p_blob, n_bytes, SQLITE_TRANSIENT);
    free (p_blob);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_face);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id = sqlite3_column_int64 (stmt_face, 0);
		sqlite3_reset (stmt_rels);
		sqlite3_clear_bindings (stmt_rels);
		sqlite3_bind_null (stmt_rels, 1);
		sqlite3_bind_null (stmt_rels, 2);
		sqlite3_bind_int64 (stmt_rels, 3, face_id);
		sqlite3_bind_int64 (stmt_rels, 4, topolayer_id);
		sqlite3_bind_int64 (stmt_rels, 5, fid);
		ret = sqlite3_step (stmt_rels);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_CreateTopoLayer error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

static int
do_eval_topolayer_geom (struct gaia_topology *topo, gaiaGeomCollPtr geom,
			sqlite3_stmt * stmt_node, sqlite3_stmt * stmt_edge,
			sqlite3_stmt * stmt_face, sqlite3_stmt * stmt_rels,
			sqlite3_int64 topolayer_id, sqlite3_int64 fid)
{
/* retrieving Features via matching Seeds/Geometries */
    gaiaPointPtr pt;
    gaiaLinestringPtr ln;
    gaiaPolygonPtr pg;
    int ret;

    /* processing all Points */
    pt = geom->FirstPoint;
    while (pt != NULL)
      {
	  gaiaPointPtr next = pt->Next;
	  gaiaGeomCollPtr reference = (gaiaGeomCollPtr)
	      auxtopo_make_geom_from_point (topo->srid, topo->has_z, pt);
	  ret =
	      do_eval_topolayer_point (topo, reference, stmt_node, stmt_rels,
				       topolayer_id, fid);
	  auxtopo_destroy_geom_from (reference);
	  pt->Next = next;
	  if (ret == 0)
	      return 0;
	  pt = pt->Next;
      }

    /* processing all Linestrings */
    ln = geom->FirstLinestring;
    while (ln != NULL)
      {
	  gaiaLinestringPtr next = ln->Next;
	  gaiaGeomCollPtr reference = (gaiaGeomCollPtr)
	      auxtopo_make_geom_from_line (topo->srid, ln);
	  ret =
	      do_eval_topolayer_line (topo, reference, stmt_edge, stmt_rels,
				      topolayer_id, fid);
	  auxtopo_destroy_geom_from (reference);
	  ln->Next = next;
	  if (ret == 0)
	      return 0;
	  ln = ln->Next;
      }

    /* processing all Polygons */
    pg = geom->FirstPolygon;
    while (pg != NULL)
      {
	  gaiaPolygonPtr next = pg->Next;
	  gaiaGeomCollPtr reference = make_geom_from_polyg (topo->srid, pg);
	  ret = do_eval_topolayer_polyg (topo, reference, stmt_face, stmt_rels,
					 topolayer_id, fid);
	  auxtopo_destroy_geom_from (reference);
	  pg->Next = next;
	  if (ret == 0)
	      return 0;
	  pg = pg->Next;
      }

    return 1;
}

static int
do_eval_topolayer_seeds (struct gaia_topology *topo, sqlite3_stmt * stmt_ref,
			 sqlite3_stmt * stmt_ins, sqlite3_stmt * stmt_rels,
			 sqlite3_stmt * stmt_node, sqlite3_stmt * stmt_edge,
			 sqlite3_stmt * stmt_face, sqlite3_int64 topolayer_id)
{
/* querying the ref-table */
    int ret;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    while (1)
      {
	  /* scrolling the result set rows */
	  gaiaGeomCollPtr geom = NULL;
	  sqlite3_int64 fid;
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_ref);
		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_ref, icol);
		      if (icol == ncol - 1)
			{
			    /* the last column is always expected to be the geometry column */
			    const unsigned char *blob =
				sqlite3_column_blob (stmt_ref, icol);
			    int blob_sz = sqlite3_column_bytes (stmt_ref, icol);
			    geom = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
			    continue;
			}
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_ins, icol + 1,
						sqlite3_column_int64 (stmt_ref,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_ins, icol + 1,
						 sqlite3_column_double
						 (stmt_ref, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_ins, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_ins, icol + 1,
					       sqlite3_column_blob (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_ins, icol + 1);
			    break;
			};
		  }
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
		fid = sqlite3_last_insert_rowid (topo->db_handle);
		/* evaluating the feature's geometry */
		if (geom != NULL)
		  {
		      ret =
			  do_eval_topolayer_geom (topo, geom, stmt_node,
						  stmt_edge, stmt_face,
						  stmt_rels, topolayer_id, fid);
		      gaiaFreeGeomColl (geom);
		      if (ret == 0)
			  return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_CreateTopoLayer (GaiaTopologyAccessorPtr accessor,
			     const char *db_prefix, const char *ref_table,
			     const char *ref_column, const char *topolayer_name)
{
/* attempting to create a TopoLayer */
    sqlite3_int64 topolayer_id;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    sqlite3_stmt *stmt_rels = NULL;
    sqlite3_stmt *stmt_node = NULL;
    sqlite3_stmt *stmt_edge = NULL;
    sqlite3_stmt *stmt_face = NULL;
    int ret;
    char *sql;
    char *create;
    char *select;
    char *insert;
    char *xprefix;
    char *table;
    char *xtable;
    char *errMsg;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    if (topo == NULL)
	return 0;

/* attempting to register a new TopoLayer */
    if (!do_register_topolayer (topo, topolayer_name, &topolayer_id))
	return 0;

/* incrementally updating all Topology Seeds */
    if (!gaiaTopoGeoUpdateSeeds (accessor, 1))
	return 0;

/* composing the CREATE TABLE feature-table statement */
    if (!auxtopo_create_features_sql
	(topo->db_handle, db_prefix, ref_table, ref_column, topo->topology_name,
	 topolayer_id, &create, &select, &insert))
	goto error;

/* creating the feature-table */
    ret = sqlite3_exec (topo->db_handle, create, NULL, NULL, &errMsg);
    sqlite3_free (create);
    create = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "SELECT * FROM ref-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, select, strlen (select), &stmt_ref,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO features-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, insert, strlen (insert), &stmt_ins,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO features-ref" query */
    table = sqlite3_mprintf ("%s_topofeatures", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO \"%s\" (node_id, edge_id, face_id, topolayer_id, fid) "
	 "VALUES (?, ?, ?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_rels,
			    NULL);
    sqlite3_free (sql);
    sql = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Seed-Edges query */
    xprefix = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT edge_id FROM MAIN.\"%s\" "
			   "WHERE edge_id IS NOT NULL AND ST_Intersects(geom, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_edge,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Seed-Faces query */
    xprefix = sqlite3_mprintf ("%s_seeds", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT face_id FROM MAIN.\"%s\" "
			   "WHERE face_id IS NOT NULL AND ST_Intersects(geom, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_face,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Nodes query */
    xprefix = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT node_id FROM MAIN.\"%s\" "
			   "WHERE ST_Intersects(geom, ?) = 1 AND ROWID IN ("
			   "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND search_frame = ?)",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_node,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* evaluating feature/topology matching via coincident topo-seeds */
    if (!do_eval_topolayer_seeds
	(topo, stmt_ref, stmt_ins, stmt_rels, stmt_node, stmt_edge, stmt_face,
	 topolayer_id))
	goto error;

    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    sqlite3_finalize (stmt_rels);
    sqlite3_finalize (stmt_node);
    sqlite3_finalize (stmt_edge);
    sqlite3_finalize (stmt_face);
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    if (stmt_rels != NULL)
	sqlite3_finalize (stmt_rels);
    if (stmt_node != NULL)
	sqlite3_finalize (stmt_node);
    if (stmt_edge != NULL)
	sqlite3_finalize (stmt_edge);
    if (stmt_face != NULL)
	sqlite3_finalize (stmt_face);
    return 0;
}

static int
do_populate_topolayer (struct gaia_topology *topo, sqlite3_stmt * stmt_ref,
		       sqlite3_stmt * stmt_ins)
{
/* querying the ref-table */
    int ret;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_ref);
		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_ref, icol);
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_ins, icol + 1,
						sqlite3_column_int64 (stmt_ref,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_ins, icol + 1,
						 sqlite3_column_double
						 (stmt_ref, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_ins, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_ins, icol + 1,
					       sqlite3_column_blob (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_ins, icol + 1);
			    break;
			};
		  }
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_InitTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_InitTopoLayer() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_InitTopoLayer (GaiaTopologyAccessorPtr accessor,
			   const char *db_prefix, const char *ref_table,
			   const char *topolayer_name)
{
/* attempting to create a TopoLayer */
    sqlite3_int64 topolayer_id;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    int ret;
    char *create;
    char *select;
    char *insert;
    char *errMsg;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    if (topo == NULL)
	return 0;

/* attempting to register a new TopoLayer */
    if (!do_register_topolayer (topo, topolayer_name, &topolayer_id))
	return 0;

/* composing the CREATE TABLE feature-table statement */
    if (!auxtopo_create_features_sql
	(topo->db_handle, db_prefix, ref_table, NULL, topo->topology_name,
	 topolayer_id, &create, &select, &insert))
	goto error;

/* creating the feature-table */
    ret = sqlite3_exec (topo->db_handle, create, NULL, NULL, &errMsg);
    sqlite3_free (create);
    create = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_InitTopoLayer() error: \"%s\"",
				       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "SELECT * FROM ref-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, select, strlen (select), &stmt_ref,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO features-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, insert, strlen (insert), &stmt_ins,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* populating the TopoFeatures table */
    if (!do_populate_topolayer (topo, stmt_ref, stmt_ins))
	goto error;

    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    return 0;
}

static int
check_topolayer (struct gaia_topology *topo, const char *topolayer_name,
		 sqlite3_int64 * topolayer_id)
{
/* checking if a TopoLayer do really exist */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    int found = 0;
    sqlite3_stmt *stmt = NULL;

/* creating the SQL statement - SELECT */
    table = sqlite3_mprintf ("%s_topolayers", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT topolayer_id FROM \"%s\" WHERE topolayer_name = Lower(%Q)",
	 xtable, topolayer_name);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Check_TopoLayer() error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* retrieving the TopoLayer ID */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		*topolayer_id = sqlite3_column_int64 (stmt, 0);
		found = 1;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("Check_TopoLayer() error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    if (!found)
	goto error;

    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
do_unregister_topolayer (struct gaia_topology *topo, const char *topolayer_name,
			 sqlite3_int64 * topolayer_id)
{
/* attempting to unregister a existing TopoLayer */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    sqlite3_int64 id;
    sqlite3_stmt *stmt = NULL;

    if (!check_topolayer (topo, topolayer_name, &id))
	return 0;

/* creating the first SQL statement - DELETE */
    table = sqlite3_mprintf ("%s_topolayers", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM \"%s\" WHERE topolayer_id = ?", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    create_all_topo_prepared_stmts (topo->cache);	/* recreating prepared stsms */
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* deleting the TopoLayer */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, id);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	;
    else
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_RemoveTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    *topolayer_id = id;
    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_RemoveTopoLayer (GaiaTopologyAccessorPtr accessor,
			     const char *topolayer_name)
{
/* attempting to remove a TopoLayer */
    sqlite3_int64 topolayer_id;
    int ret;
    char *sql;
    char *errMsg;
    char *table;
    char *xtable;
    char *xtable2;
    char dummy[64];
    struct gaia_topology *topo = (struct gaia_topology *) accessor;

    if (topo == NULL)
	return 0;

/* deleting all Feature relations */
    table = sqlite3_mprintf ("%s_topofeatures", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_topolayers", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM \"%s\" WHERE topolayer_id = "
			   "(SELECT topolayer_id FROM \"%s\" WHERE topolayer_name = Lower(%Q))",
			   xtable, xtable2, topolayer_name);
    free (xtable);
    free (xtable2);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_RemoveTopoLayer() error: %s\n",
				       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* unregistering the TopoLayer */
    if (!do_unregister_topolayer (topo, topolayer_name, &topolayer_id))
	return 0;

/* finalizing all prepared Statements */
    finalize_all_topo_prepared_stmts (topo->cache);

/* dropping the TopoFeatures Table */
    sprintf (dummy, "%lld", topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DROP TABLE \"%s\"", xtable);
    free (xtable);
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    create_all_topo_prepared_stmts (topo->cache);	/* recreating prepared stsms */
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_RemoveTopoLayer() error: %s\n",
				       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

static int
is_unique_geom_name (sqlite3 * sqlite, const char *table, const char *geom)
{
/* checking for duplicate names */
    char *xtable;
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    const char *name;

    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA MAIN.table_info(\"%s\")", xtable);
    free (xtable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcasecmp (name, geom) == 0)
		    continue;
	    }
      }
    sqlite3_free_table (results);

    return 1;
}

static int
auxtopo_create_export_sql (struct gaia_topology *topo,
			   const char *topolayer_name, const char *out_table,
			   char **xcreate, char **xselect, char **xinsert,
			   char **geometry, sqlite3_int64 * topolayer_id)
{
/* composing the CREATE TABLE export-table statement */
    char *create = NULL;
    char *select = NULL;
    char *insert = NULL;
    char *prev;
    char *sql;
    char *table;
    char *xtable;
    char *xprefix;
    char dummy[64];
    int i;
    char **results;
    int rows;
    int columns;
    const char *name;
    const char *type;
    int notnull;
    int ret;
    int first_select = 1;
    int first_insert = 1;
    int ncols = 0;
    int icol;
    int ref_col = 0;
    char *geometry_name;
    int geom_alias = 0;

    *xcreate = NULL;
    *xselect = NULL;
    *xinsert = NULL;

/* checking the TopoLayer */
    if (!check_topolayer (topo, topolayer_name, topolayer_id))
	return 0;

    xtable = gaiaDoubleQuotedSql (out_table);
    create =
	sqlite3_mprintf
	("CREATE TABLE MAIN.\"%s\" (\n\tfid INTEGER PRIMARY KEY", xtable);
    select = sqlite3_mprintf ("SELECT fid, ");
    insert = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" (fid, ", xtable);
    free (xtable);
    sprintf (dummy, "%lld", *topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("PRAGMA MAIN.table_info(\"%s\")", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcmp (name, "fid") == 0)
		    continue;
		type = results[(i * columns) + 2];
		notnull = atoi (results[(i * columns) + 3]);
		/* SELECT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = select;
		if (first_select)
		    select = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    select = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_select = 0;
		free (xprefix);
		sqlite3_free (prev);
		ref_col++;
		/* INSERT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = insert;
		if (first_insert)
		    insert = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    insert = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_insert = 0;
		free (xprefix);
		sqlite3_free (prev);
		ncols++;
		/* CREATE: adding a column definition */
		prev = create;
		xprefix = gaiaDoubleQuotedSql (name);
		if (notnull)
		    create =
			sqlite3_mprintf ("%s,\n\t\"%s\" %s NOT NULL",
					 prev, xprefix, type);
		else
		    create =
			sqlite3_mprintf ("%s,\n\t\"%s\" %s", prev,
					 xprefix, type);
		free (xprefix);
		sqlite3_free (prev);
	    }
      }
    sqlite3_free_table (results);

    geometry_name = malloc (strlen ("geometry") + 1);
    strcpy (geometry_name, "geometry");
    sprintf (dummy, "%lld", *topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    while (1)
      {
	  /* searching an unique Geometry name */
	  if (is_unique_geom_name (topo->db_handle, table, geometry_name))
	      break;
	  sprintf (dummy, "geom_%d", ++geom_alias);
	  free (geometry_name);
	  geometry_name = malloc (strlen (dummy) + 1);
	  strcpy (geometry_name, dummy);
      }
    sqlite3_free (table);

/* completing the SQL statements */
    prev = create;
    create = sqlite3_mprintf ("%s)", prev);
    sqlite3_free (prev);
    prev = select;
    sprintf (dummy, "%lld", *topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    select = sqlite3_mprintf ("%s FROM MAIN.\"%s\"", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    prev = insert;
    insert = sqlite3_mprintf ("%s, \"%s\") VALUES (?, ", prev, geometry_name);
    sqlite3_free (prev);
    for (icol = 0; icol < ncols; icol++)
      {
	  prev = insert;
	  if (icol == 0)
	      insert = sqlite3_mprintf ("%s?", prev);
	  else
	      insert = sqlite3_mprintf ("%s, ?", prev);
	  sqlite3_free (prev);
      }
    prev = insert;
    insert = sqlite3_mprintf ("%s, ?)", prev);
    sqlite3_free (prev);

    *xcreate = create;
    *xselect = select;
    *xinsert = insert;
    *geometry = geometry_name;
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    return 0;
}

static int
auxtopo_retrieve_export_geometry_type (struct gaia_topology *topo,
				       const char *topolayer_name,
				       int *ref_type)
{
/* determining the Geometry Type for Export TopoLayer */
    char *table;
    char *xtable;
    char *xtable2;
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int nodes;
    int edges;
    int faces;

    table = sqlite3_mprintf ("%s_topolayers", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_topofeatures", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT Count(f.node_id), Count(f.edge_id), Count(f.face_id) "
	 "FROM \"%s\" AS l JOIN \"%s\" AS f ON (l.topolayer_id = f.topolayer_id) "
	 "WHERE l.topolayer_name = Lower(%Q)", xtable, xtable2, topolayer_name);
    free (xtable);
    free (xtable2);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		nodes = atoi (results[(i * columns) + 0]);
		edges = atoi (results[(i * columns) + 1]);
		faces = atoi (results[(i * columns) + 2]);
	    }
      }
    sqlite3_free_table (results);

    *ref_type = GAIA_UNKNOWN;
    if (nodes && !edges && !faces)
	*ref_type = GAIA_POINT;
    if (!nodes && edges && !faces)
	*ref_type = GAIA_LINESTRING;
    if (!nodes && !edges && faces)
	*ref_type = GAIA_POLYGON;

    return 1;
}

static void
do_eval_topo_node (struct gaia_topology *topo, sqlite3_stmt * stmt_node,
		   sqlite3_int64 node_id, gaiaGeomCollPtr result)
{
/* retrieving Points from Topology Nodes */
    int ret;

/* initializing the Topo-Node query */
    sqlite3_reset (stmt_node);
    sqlite3_clear_bindings (stmt_node);
    sqlite3_bind_int64 (stmt_node, 1, node_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_node);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt_node, 0);
		int blob_sz = sqlite3_column_bytes (stmt_node, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      gaiaPointPtr pt = geom->FirstPoint;
		      while (pt != NULL)
			{
			    /* copying all Points into the result Geometry */
			    if (topo->has_z)
				gaiaAddPointToGeomCollXYZ (result, pt->X, pt->Y,
							   pt->Z);
			    else
				gaiaAddPointToGeomColl (result, pt->X, pt->Y);
			    pt = pt->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_FeatureFromTopoLayer error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static void
do_eval_topo_edge (struct gaia_topology *topo, sqlite3_stmt * stmt_edge,
		   sqlite3_int64 edge_id, gaiaGeomCollPtr result)
{
/* retrieving Linestrings from Topology Edges */
    int ret;

/* initializing the Topo-Edge query */
    sqlite3_reset (stmt_edge);
    sqlite3_clear_bindings (stmt_edge);
    sqlite3_bind_int64 (stmt_edge, 1, edge_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_edge);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt_edge, 0);
		int blob_sz = sqlite3_column_bytes (stmt_edge, 0);
		gaiaGeomCollPtr geom =
		    gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      gaiaLinestringPtr ln = geom->FirstLinestring;
		      while (ln != NULL)
			{
			    /* copying all Linestrings into the result Geometry */
			    if (topo->has_z)
				auxtopo_copy_linestring3d (ln, result);
			    else
				auxtopo_copy_linestring (ln, result);
			    ln = ln->Next;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_FeatureFromTopoLayer error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return;
	    }
      }
}

static gaiaGeomCollPtr
do_eval_topo_geometry (struct gaia_topology *topo, sqlite3_stmt * stmt_rels,
		       sqlite3_stmt * stmt_node, sqlite3_stmt * stmt_edge,
		       sqlite3_stmt * stmt_face, sqlite3_int64 fid,
		       sqlite3_int64 topolayer_id, int out_type)
{
/* materializing a Geometry out of Topology */
    int ret;
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr sparse_lines;
    struct face_edges *list =
	auxtopo_create_face_edges (topo->has_z, topo->srid);

    if (topo->has_z)
      {
	  geom = gaiaAllocGeomCollXYZ ();
	  sparse_lines = gaiaAllocGeomCollXYZ ();
      }
    else
      {
	  geom = gaiaAllocGeomColl ();
	  sparse_lines = gaiaAllocGeomColl ();
      }
    geom->Srid = topo->srid;
    geom->DeclaredType = out_type;

    sqlite3_reset (stmt_rels);
    sqlite3_clear_bindings (stmt_rels);
    sqlite3_bind_int64 (stmt_rels, 1, topolayer_id);
    sqlite3_bind_int64 (stmt_rels, 2, fid);
    while (1)
      {
	  /* scrolling the result set rows */
	  sqlite3_int64 id;
	  ret = sqlite3_step (stmt_rels);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt_rels, 0) != SQLITE_NULL)
		  {
		      id = sqlite3_column_int64 (stmt_rels, 0);
		      do_eval_topo_node (topo, stmt_node, id, geom);
		  }
		if (sqlite3_column_type (stmt_rels, 1) != SQLITE_NULL)
		  {
		      id = sqlite3_column_int64 (stmt_rels, 1);
		      do_eval_topo_edge (topo, stmt_edge, id, sparse_lines);
		  }
		if (sqlite3_column_type (stmt_rels, 2) != SQLITE_NULL)
		  {
		      id = sqlite3_column_int64 (stmt_rels, 2);
		      do_explode_topo_face (topo, list, stmt_face, id);
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_FeatureFromTopoLayer() error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }


    if (sparse_lines->FirstLinestring != NULL)
      {
	  /* attempting to better rearrange sparse lines */
	  gaiaGeomCollPtr rearranged =
	      gaiaLineMerge_r (topo->cache, sparse_lines);
	  gaiaFreeGeomColl (sparse_lines);
	  if (rearranged != NULL)
	    {
		gaiaLinestringPtr ln = rearranged->FirstLinestring;
		while (ln != NULL)
		  {
		      if (topo->has_z)
			  auxtopo_copy_linestring3d (ln, geom);
		      else
			  auxtopo_copy_linestring (ln, geom);
		      ln = ln->Next;
		  }
		gaiaFreeGeomColl (rearranged);
	    }
      }
    else
	gaiaFreeGeomColl (sparse_lines);
    sparse_lines = NULL;

    if (list->first_edge != NULL)
      {
	  /* attempting to rearrange sparse lines into Polygons */
	  gaiaGeomCollPtr rearranged;
	  auxtopo_select_valid_face_edges (list);
	  rearranged = auxtopo_polygonize_face_edges (list, topo->cache);
	  auxtopo_free_face_edges (list);
	  if (rearranged != NULL)
	    {
		gaiaPolygonPtr pg = rearranged->FirstPolygon;
		while (pg != NULL)
		  {
		      if (topo->has_z)
			  do_copy_polygon3d (pg, geom);
		      else
			  do_copy_polygon (pg, geom);
		      pg = pg->Next;
		  }
		gaiaFreeGeomColl (rearranged);
	    }
      }

    if (geom->FirstPoint == NULL && geom->FirstLinestring == NULL
	&& geom->FirstPolygon == NULL)
	goto error;
    return geom;

  error:
    gaiaFreeGeomColl (geom);
    if (sparse_lines != NULL)
	gaiaFreeGeomColl (sparse_lines);
    return NULL;
}

static int
do_eval_topogeo_features (struct gaia_topology *topo, sqlite3_stmt * stmt_ref,
			  sqlite3_stmt * stmt_ins, sqlite3_stmt * stmt_rels,
			  sqlite3_stmt * stmt_node, sqlite3_stmt * stmt_edge,
			  sqlite3_stmt * stmt_face, sqlite3_int64 topolayer_id,
			  int out_type)
{
/* querying the ref-table */
    int ret;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    while (1)
      {
	  /* scrolling the result set rows */
	  gaiaGeomCollPtr geom = NULL;
	  sqlite3_int64 fid;
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_ref);
		fid = sqlite3_column_int64 (stmt_ref, 0);
		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_ref, icol);
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_ins, icol + 1,
						sqlite3_column_int64 (stmt_ref,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_ins, icol + 1,
						 sqlite3_column_double
						 (stmt_ref, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_ins, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_ins, icol + 1,
					       sqlite3_column_blob (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_ins, icol + 1);
			    break;
			};
		  }
		/* the Geometry column */
		ncol = sqlite3_bind_parameter_count (stmt_ins);
		geom =
		    do_eval_topo_geometry (topo, stmt_rels, stmt_node,
					   stmt_edge, stmt_face, fid,
					   topolayer_id, out_type);
		if (geom != NULL)
		  {
		      unsigned char *p_blob;
		      int n_bytes;
		      gaiaToSpatiaLiteBlobWkb (geom, &p_blob, &n_bytes);
		      sqlite3_bind_blob (stmt_ins, ncol, p_blob, n_bytes,
					 SQLITE_TRANSIENT);
		      free (p_blob);
		      gaiaFreeGeomColl (geom);
		  }
		else
		    sqlite3_bind_null (stmt_ins, ncol);
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_ExportTopoLayer (GaiaTopologyAccessorPtr accessor,
			     const char *topolayer_name, const char *out_table,
			     int with_spatial_index, int create_only)
{
/* attempting to export a full TopoLayer */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    sqlite3_stmt *stmt_rels = NULL;
    sqlite3_stmt *stmt_node = NULL;
    sqlite3_stmt *stmt_edge = NULL;
    sqlite3_stmt *stmt_face = NULL;
    int ret;
    char *create = NULL;
    char *select = NULL;
    char *insert;
    char *geometry_name;
    char *sql;
    char *errMsg;
    char *xprefix;
    char *table;
    char *xtable;
    int ref_type;
    const char *type;
    int out_type;
    sqlite3_int64 topolayer_id;
    if (topo == NULL)
	return 0;

/* composing the CREATE TABLE output-table statement */
    if (!auxtopo_create_export_sql
	(topo, topolayer_name, out_table, &create,
	 &select, &insert, &geometry_name, &topolayer_id))
	goto error;

/* creating the output-table */
    ret = sqlite3_exec (topo->db_handle, create, NULL, NULL, &errMsg);
    sqlite3_free (create);
    create = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* checking the Geometry Type */
    if (!auxtopo_retrieve_export_geometry_type
	(topo, topolayer_name, &ref_type))
	goto error;
    switch (ref_type)
      {
      case GAIA_POINT:
	  type = "MULTIPOINT";
	  out_type = GAIA_MULTIPOINT;
	  break;
      case GAIA_LINESTRING:
	  type = "MULTILINESTRING";
	  out_type = GAIA_MULTILINESTRING;
	  break;
      case GAIA_POLYGON:
	  type = "MULTIPOLYGON";
	  out_type = GAIA_MULTIPOLYGON;
	  break;
      case GAIA_GEOMETRYCOLLECTION:
	  type = "GEOMETRYCOLLECTION";
	  out_type = GAIA_GEOMETRYCOLLECTION;
	  break;
      default:
	  type = "GEOMETRY";
	  out_type = GAIA_UNKNOWN;
	  break;
      };

/* creating the output Geometry Column */
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(Lower(%Q), %Q, %d, '%s', '%s')",
	 out_table, geometry_name, topo->srid, type,
	 (topo->has_z == 0) ? "XY" : "XYZ");
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    if (with_spatial_index)
      {
	  /* creating a Spatial Index supporting the Geometry Column */
	  sql =
	      sqlite3_mprintf
	      ("SELECT CreateSpatialIndex(Lower(%Q), %Q)",
	       out_table, geometry_name);
	  ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
				     errMsg);
		sqlite3_free (errMsg);
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    free (geometry_name);
    if (create_only)
      {
	  sqlite3_free (select);
	  sqlite3_free (insert);
	  return 1;
      }

/* preparing the "SELECT * FROM topo-features-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, select, strlen (select), &stmt_ref,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO out-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, insert, strlen (insert), &stmt_ins,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "SELECT * FROM topo-features" query */
    table = sqlite3_mprintf ("%s_topofeatures", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT node_id, edge_id, face_id FROM \"%s\" "
			   "WHERE topolayer_id = ? AND fid = ?", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_rels,
			    NULL);
    sqlite3_free (sql);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Nodes query */
    xprefix = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" WHERE node_id = ?",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_node,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Edges query */
    xprefix = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" WHERE edge_id = ?",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_edge,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Faces query */
    xprefix = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql =
	sqlite3_mprintf
	("SELECT edge_id, left_face, right_face, geom FROM MAIN.\"%s\" "
	 "WHERE left_face = ? OR right_face = ?", xtable);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_face,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_ExportTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* evaluating TopoLayer's Features */
    if (!do_eval_topogeo_features
	(topo, stmt_ref, stmt_ins, stmt_rels, stmt_node, stmt_edge, stmt_face,
	 topolayer_id, out_type))
	goto error;

    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    sqlite3_finalize (stmt_rels);
    sqlite3_finalize (stmt_node);
    sqlite3_finalize (stmt_edge);
    sqlite3_finalize (stmt_face);
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    if (stmt_rels != NULL)
	sqlite3_finalize (stmt_rels);
    if (stmt_node != NULL)
	sqlite3_finalize (stmt_node);
    if (stmt_edge != NULL)
	sqlite3_finalize (stmt_edge);
    if (stmt_face != NULL)
	sqlite3_finalize (stmt_face);
    return 0;
}

static int
check_output_table (struct gaia_topology *topo, const char *out_table,
		    int *out_type)
{
/* checking the output table */
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    int count = 0;
    int type;

    sql =
	sqlite3_mprintf
	("SELECT geometry_type FROM MAIN.geometry_columns WHERE f_table_name = Lower(%Q)",
	 out_table);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		type = atoi (results[(i * columns) + 0]);
		count++;
	    }
      }
    sqlite3_free_table (results);

    if (count != 1)
	return 0;

    switch (type)
      {
      case GAIA_POINT:
      case GAIA_POINTZ:
      case GAIA_POINTM:
      case GAIA_POINTZM:
	  *out_type = GAIA_POINT;
	  break;
      case GAIA_MULTIPOINT:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTIPOINTZM:
	  *out_type = GAIA_MULTIPOINT;
	  break;
      case GAIA_LINESTRING:
      case GAIA_LINESTRINGZ:
      case GAIA_LINESTRINGM:
      case GAIA_LINESTRINGZM:
      case GAIA_MULTILINESTRING:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTILINESTRINGZM:
	  *out_type = GAIA_MULTILINESTRING;
	  break;
      case GAIA_POLYGON:
      case GAIA_POLYGONZ:
      case GAIA_POLYGONM:
      case GAIA_POLYGONZM:
      case GAIA_MULTIPOLYGON:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_MULTIPOLYGONM:
      case GAIA_MULTIPOLYGONZM:
	  *out_type = GAIA_MULTIPOLYGON;
	  break;
      case GAIA_GEOMETRYCOLLECTION:
      case GAIA_GEOMETRYCOLLECTIONZ:
      case GAIA_GEOMETRYCOLLECTIONM:
      case GAIA_GEOMETRYCOLLECTIONZM:
	  *out_type = GAIA_GEOMETRYCOLLECTION;
	  break;
      default:
	  *out_type = GAIA_UNKNOWN;
	  break;
      };
    return 1;
}

static int
auxtopo_export_feature_sql (struct gaia_topology *topo,
			    const char *topolayer_name, const char *out_table,
			    char **xselect, char **xinsert,
			    sqlite3_int64 * topolayer_id, int *out_type)
{
/* composing the CREATE TABLE insert-feature statement */
    char *select = NULL;
    char *insert = NULL;
    char *prev;
    char *sql;
    char *table;
    char *xtable;
    char *xprefix;
    char dummy[64];
    int i;
    char **results;
    int rows;
    int columns;
    const char *name;
    int ret;
    int first_select = 1;
    int first_insert = 1;
    int ncols = 0;
    int icol;
    int ref_col = 0;
    char *geometry_name = NULL;
    int geom_alias = 0;

    *xselect = NULL;
    *xinsert = NULL;

/* checking the TopoLayer */
    if (!check_topolayer (topo, topolayer_name, topolayer_id))
	return 0;

/* checking the output table */
    if (!check_output_table (topo, out_table, out_type))
	return 0;

    xtable = gaiaDoubleQuotedSql (out_table);
    select = sqlite3_mprintf ("SELECT fid, ");
    insert = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" (fid, ", xtable);
    free (xtable);
    sprintf (dummy, "%lld", *topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("PRAGMA MAIN.table_info(\"%s\")", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	goto error;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		name = results[(i * columns) + 1];
		if (strcmp (name, "fid") == 0)
		    continue;
		/* SELECT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = select;
		if (first_select)
		    select = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    select = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_select = 0;
		free (xprefix);
		sqlite3_free (prev);
		ref_col++;
		/* INSERT: adding a column */
		xprefix = gaiaDoubleQuotedSql (name);
		prev = insert;
		if (first_insert)
		    insert = sqlite3_mprintf ("%s\"%s\"", prev, xprefix);
		else
		    insert = sqlite3_mprintf ("%s, \"%s\"", prev, xprefix);
		first_insert = 0;
		free (xprefix);
		sqlite3_free (prev);
		ncols++;
	    }
      }
    sqlite3_free_table (results);

    geometry_name = malloc (strlen ("geometry") + 1);
    strcpy (geometry_name, "geometry");
    sprintf (dummy, "%lld", *topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    while (1)
      {
	  /* searching an unique Geometry name */
	  if (is_unique_geom_name (topo->db_handle, table, geometry_name))
	      break;
	  sprintf (dummy, "geom_%d", ++geom_alias);
	  free (geometry_name);
	  geometry_name = malloc (strlen (dummy) + 1);
	  strcpy (geometry_name, dummy);
      }
    sqlite3_free (table);

/* completing the SQL statements */
    prev = select;
    sprintf (dummy, "%lld", *topolayer_id);
    table = sqlite3_mprintf ("%s_topofeatures_%s", topo->topology_name, dummy);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    select =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE fid = ?", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    prev = insert;
    insert = sqlite3_mprintf ("%s, \"%s\") VALUES (?, ", prev, geometry_name);
    sqlite3_free (prev);
    for (icol = 0; icol < ncols; icol++)
      {
	  prev = insert;
	  if (icol == 0)
	      insert = sqlite3_mprintf ("%s?", prev);
	  else
	      insert = sqlite3_mprintf ("%s, ?", prev);
	  sqlite3_free (prev);
      }
    prev = insert;
    insert = sqlite3_mprintf ("%s, ?)", prev);
    sqlite3_free (prev);

    free (geometry_name);
    *xselect = select;
    *xinsert = insert;
    return 1;

  error:
    if (geometry_name != NULL)
	free (geometry_name);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    return 0;
}

static int
do_eval_topogeo_single_feature (struct gaia_topology *topo,
				sqlite3_stmt * stmt_ref,
				sqlite3_stmt * stmt_ins,
				sqlite3_stmt * stmt_rels,
				sqlite3_stmt * stmt_node,
				sqlite3_stmt * stmt_edge,
				sqlite3_stmt * stmt_face,
				sqlite3_int64 topolayer_id, int out_type,
				sqlite3_int64 fid)
{
/* querying the ref-table */
    int ret;
    int count = 0;

    sqlite3_reset (stmt_ref);
    sqlite3_clear_bindings (stmt_ref);
    sqlite3_bind_int64 (stmt_ref, 1, fid);
    while (1)
      {
	  /* scrolling the result set rows */
	  gaiaGeomCollPtr geom = NULL;
	  ret = sqlite3_step (stmt_ref);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_ref);
		sqlite3_reset (stmt_ins);
		sqlite3_clear_bindings (stmt_ins);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_ref, icol);
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_ins, icol + 1,
						sqlite3_column_int64 (stmt_ref,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_ins, icol + 1,
						 sqlite3_column_double
						 (stmt_ref, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_ins, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_ins, icol + 1,
					       sqlite3_column_blob (stmt_ref,
								    icol),
					       sqlite3_column_bytes (stmt_ref,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_ins, icol + 1);
			    break;
			};
		  }
		/* the Geometry column */
		ncol = sqlite3_bind_parameter_count (stmt_ins);
		geom =
		    do_eval_topo_geometry (topo, stmt_rels, stmt_node,
					   stmt_edge, stmt_face, fid,
					   topolayer_id, out_type);
		if (geom != NULL)
		  {
		      unsigned char *p_blob;
		      int n_bytes;
		      gaiaToSpatiaLiteBlobWkb (geom, &p_blob, &n_bytes);
		      sqlite3_bind_blob (stmt_ins, ncol, p_blob, n_bytes,
					 SQLITE_TRANSIENT);
		      free (p_blob);
		      gaiaFreeGeomColl (geom);
		  }
		else
		    sqlite3_bind_null (stmt_ins, ncol);
		ret = sqlite3_step (stmt_ins);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("InsertFeatureFromTopoLayer() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
		count++;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("InsertFeatureFromTopoLayer() error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }

    if (count <= 0)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("InsertFeatureFromTopoLayer(): not existing TopoFeature");
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  return 0;
      }
    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_InsertFeatureFromTopoLayer (GaiaTopologyAccessorPtr accessor,
					const char *topolayer_name,
					const char *out_table,
					sqlite3_int64 fid)
{
/* attempting to insert a single TopoLayer's Feature into the output GeoTable */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_ref = NULL;
    sqlite3_stmt *stmt_ins = NULL;
    sqlite3_stmt *stmt_rels = NULL;
    sqlite3_stmt *stmt_node = NULL;
    sqlite3_stmt *stmt_edge = NULL;
    sqlite3_stmt *stmt_face = NULL;
    int ret;
    char *select;
    char *insert;
    char *sql;
    char *xprefix;
    char *table;
    char *xtable;
    int out_type;
    sqlite3_int64 topolayer_id;
    if (topo == NULL)
	return 0;

/* composing the SQL statements */
    if (!auxtopo_export_feature_sql
	(topo, topolayer_name, out_table, &select, &insert, &topolayer_id,
	 &out_type))
	goto error;

/* preparing the "SELECT * FROM topo-features-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, select, strlen (select), &stmt_ref,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("InsertFeatureFromTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO out-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, insert, strlen (insert), &stmt_ins,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("InsertFeatureFromTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  goto error;
      }

/* preparing the "SELECT * FROM topo-features" query */
    table = sqlite3_mprintf ("%s_topofeatures", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT node_id, edge_id, face_id FROM \"%s\" "
			   "WHERE topolayer_id = ? AND fid = ?", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_rels,
			    NULL);
    sqlite3_free (sql);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("InsertFeatureFromTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Nodes query */
    xprefix = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" WHERE node_id = ?",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_node,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("InsertFeatureFromTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Edges query */
    xprefix = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql = sqlite3_mprintf ("SELECT geom FROM MAIN.\"%s\" WHERE edge_id = ?",
			   xtable, xprefix);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_edge,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("InsertFeatureFromTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the Topo-Faces query */
    xprefix = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sql =
	sqlite3_mprintf
	("SELECT edge_id, left_face, right_face, geom FROM MAIN.\"%s\" "
	 "WHERE left_face = ? OR right_face = ?", xtable);
    free (xtable);
    sqlite3_free (xprefix);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_face,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("InsertFeatureFromTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* evaluating TopoLayer's Features */
    if (!do_eval_topogeo_single_feature
	(topo, stmt_ref, stmt_ins, stmt_rels, stmt_node, stmt_edge, stmt_face,
	 topolayer_id, out_type, fid))
	goto error;

    sqlite3_finalize (stmt_ref);
    sqlite3_finalize (stmt_ins);
    sqlite3_finalize (stmt_rels);
    sqlite3_finalize (stmt_node);
    sqlite3_finalize (stmt_edge);
    sqlite3_finalize (stmt_face);
    return 1;

  error:
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_ref != NULL)
	sqlite3_finalize (stmt_ref);
    if (stmt_ins != NULL)
	sqlite3_finalize (stmt_ins);
    if (stmt_rels != NULL)
	sqlite3_finalize (stmt_rels);
    if (stmt_node != NULL)
	sqlite3_finalize (stmt_node);
    if (stmt_edge != NULL)
	sqlite3_finalize (stmt_edge);
    if (stmt_face != NULL)
	sqlite3_finalize (stmt_face);
    return 0;
}

static int
do_topo_snap (struct gaia_topology *topo, int geom_col, int geo_type,
	      double tolerance_snap, double tolerance_removal, int iterate,
	      sqlite3_stmt * stmt_in, sqlite3_stmt * stmt_out)
{
/* snapping geometries againt Topology */
    int ret;

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int icol;
		int ncol = sqlite3_column_count (stmt_in);
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		for (icol = 0; icol < ncol; icol++)
		  {
		      int col_type = sqlite3_column_type (stmt_in, icol);
		      if (icol == geom_col)
			{
			    /* the geometry column */
			    const unsigned char *blob =
				sqlite3_column_blob (stmt_in, icol);
			    int blob_sz = sqlite3_column_bytes (stmt_in, icol);
			    gaiaGeomCollPtr geom =
				gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
			    if (geom != NULL)
			      {
				  gaiaGeomCollPtr result;
				  unsigned char *p_blob;
				  int n_bytes;
				  int gpkg_mode = 0;
				  int tiny_point = 0;
				  if (topo->cache != NULL)
				    {
					struct splite_internal_cache *cache =
					    (struct splite_internal_cache
					     *) (topo->cache);
					gpkg_mode = cache->gpkg_mode;
					tiny_point = cache->tinyPointEnabled;
				    }
				  result =
				      gaiaTopoSnap ((GaiaTopologyAccessorPtr)
						    topo, geom, tolerance_snap,
						    tolerance_removal, iterate);
				  gaiaFreeGeomColl (geom);
				  if (result != NULL)
				    {
					result->DeclaredType = geo_type;
					gaiaToSpatiaLiteBlobWkbEx2 (result,
								    &p_blob,
								    &n_bytes,
								    gpkg_mode,
								    tiny_point);
					gaiaFreeGeomColl (result);
					sqlite3_bind_blob (stmt_out, icol + 1,
							   p_blob, n_bytes,
							   free);
				    }
				  else
				      sqlite3_bind_null (stmt_out, icol + 1);
			      }
			    else
				sqlite3_bind_null (stmt_out, icol + 1);
			    continue;
			}
		      switch (col_type)
			{
			case SQLITE_INTEGER:
			    sqlite3_bind_int64 (stmt_out, icol + 1,
						sqlite3_column_int64 (stmt_in,
								      icol));
			    break;
			case SQLITE_FLOAT:
			    sqlite3_bind_double (stmt_out, icol + 1,
						 sqlite3_column_double
						 (stmt_in, icol));
			    break;
			case SQLITE_TEXT:
			    sqlite3_bind_text (stmt_out, icol + 1,
					       (const char *)
					       sqlite3_column_text (stmt_in,
								    icol),
					       sqlite3_column_bytes (stmt_in,
								     icol),
					       SQLITE_STATIC);
			    break;
			case SQLITE_BLOB:
			    sqlite3_bind_blob (stmt_out, icol + 1,
					       sqlite3_column_blob (stmt_in,
								    icol),
					       sqlite3_column_bytes (stmt_in,
								     icol),
					       SQLITE_STATIC);
			    break;
			default:
			    sqlite3_bind_null (stmt_out, icol + 1);
			    break;
			};
		  }
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      char *msg =
			  sqlite3_mprintf
			  ("TopoGeo_SnappedGeoTable() error: \"%s\"",
			   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr)
						   topo, msg);
		      sqlite3_free (msg);
		      return 0;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_SnappedGeoTable() error: \"%s\"",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		return 0;
	    }
      }
    return 1;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_SnappedGeoTable (GaiaTopologyAccessorPtr accessor,
			     const char *db_prefix, const char *table,
			     const char *column, const char *out_table,
			     double tolerance_snap, double tolerance_removal,
			     int iterate)
{
/* 
/ attempting to create and populate a new GeoTable by snapping all Geometries
/ contained into another GeoTable against a given Topology
*/
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;
    char *create;
    char *select;
    char *insert;
    char *sql;
    char *errMsg;
    int geo_type;
    const char *type;
    int geom_col;
    if (topo == NULL)
	return 0;

/* composing the CREATE TABLE output-table statement */
    if (!auxtopo_create_togeotable_sql
	(topo->db_handle, db_prefix, table, column, out_table, &create,
	 &select, &insert, &geom_col))
	goto error;

/* creating the output-table */
    ret = sqlite3_exec (topo->db_handle, create, NULL, NULL, &errMsg);
    sqlite3_free (create);
    create = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnappedGeoTable() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* checking the Geometry Type */
    if (!auxtopo_retrieve_geometry_type
	(topo->db_handle, db_prefix, table, column, &geo_type))
	goto error;
    switch (geo_type)
      {
      case GAIA_POINT:
      case GAIA_POINTZ:
      case GAIA_POINTM:
      case GAIA_POINTZM:
	  type = "POINT";
	  break;
      case GAIA_MULTIPOINT:
      case GAIA_MULTIPOINTZ:
      case GAIA_MULTIPOINTM:
      case GAIA_MULTIPOINTZM:
	  type = "MULTIPOINT";
	  break;
      case GAIA_LINESTRING:
      case GAIA_LINESTRINGZ:
      case GAIA_LINESTRINGM:
      case GAIA_LINESTRINGZM:
	  type = "LINESTRING";
	  break;
      case GAIA_MULTILINESTRING:
      case GAIA_MULTILINESTRINGZ:
      case GAIA_MULTILINESTRINGM:
      case GAIA_MULTILINESTRINGZM:
	  type = "MULTILINESTRING";
	  break;
      case GAIA_POLYGON:
      case GAIA_POLYGONZ:
      case GAIA_POLYGONM:
      case GAIA_POLYGONZM:
	  type = "POLYGON";
	  break;
      case GAIA_MULTIPOLYGON:
      case GAIA_MULTIPOLYGONZ:
      case GAIA_MULTIPOLYGONM:
      case GAIA_MULTIPOLYGONZM:
	  type = "MULTIPOLYGON";
	  break;
      case GAIA_GEOMETRYCOLLECTION:
      case GAIA_GEOMETRYCOLLECTIONZ:
      case GAIA_GEOMETRYCOLLECTIONM:
      case GAIA_GEOMETRYCOLLECTIONZM:
	  type = "GEOMETRYCOLLECTION";
	  break;
      default:
	  type = "GEOMETRY";
	  break;
      };

/* creating the output Geometry Column */
    sql =
	sqlite3_mprintf
	("SELECT AddGeometryColumn(Lower(%Q), Lower(%Q), %d, '%s', '%s')",
	 out_table, column, topo->srid, type,
	 (topo->has_z == 0) ? "XY" : "XYZ");
    ret = sqlite3_exec (topo->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnappedGeoTable() error: \"%s\"",
			       errMsg);
	  sqlite3_free (errMsg);
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "SELECT * FROM ref-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, select, strlen (select), &stmt_in,
			    NULL);
    sqlite3_free (select);
    select = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnappedGeoTable() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the "INSERT INTO out-table" query */
    ret =
	sqlite3_prepare_v2 (topo->db_handle, insert, strlen (insert), &stmt_out,
			    NULL);
    sqlite3_free (insert);
    insert = NULL;
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_SnappedGeoTable() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* snapping all Geometries against the Topology */
    if (!do_topo_snap
	(topo, geom_col, geo_type, tolerance_snap, tolerance_removal, iterate,
	 stmt_in, stmt_out))
	goto error;

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  error:
    if (create != NULL)
	sqlite3_free (create);
    if (select != NULL)
	sqlite3_free (select);
    if (insert != NULL)
	sqlite3_free (insert);
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

SPATIALITE_PRIVATE int
test_inconsistent_topology (const void *handle)
{
/* testing for a Topology presenting an inconsistent state */
    struct gaia_topology *topo = (struct gaia_topology *) handle;
    int ret;
    char *errMsg = NULL;
    int count = 0;
    int i;
    char **results;
    int rows;
    int columns;
    char *sql;
    char *table;
    char *xtable;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT Count(*) FROM \"%s\" WHERE left_face IS NULL "
			 "OR right_face IS NULL", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("test_inconsistent_topology error: %s\n", errMsg);
	  sqlite3_free (errMsg);
	  return -1;
      }
    for (i = 1; i <= rows; i++)
	count = atoi (results[(i * columns) + 0]);
    sqlite3_free_table (results);
    return count;
}

static int
topoGeo_EdgeHeal_common (GaiaTopologyAccessorPtr accessor, int mode_new)
{
/* common implementation of GeoTable EdgeHeal */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    int ret;
    char *sql;
    char *node;
    char *xnode;
    char *edge;
    char *xedge;
    int loop = 1;
    sqlite3_stmt *stmt1 = NULL;
    sqlite3_stmt *stmt2 = NULL;
    sqlite3_stmt *stmt3 = NULL;
    if (topo == NULL)
	return 0;

    ret = test_inconsistent_topology (accessor);
    if (ret != 0)
	return 0;

/* preparing the SQL query identifying all Nodes of cardinality = 2 */
    node = sqlite3_mprintf ("%s_node", topo->topology_name);
    xnode = gaiaDoubleQuotedSql (node);
    sqlite3_free (node);
    edge = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedge = gaiaDoubleQuotedSql (edge);
    sqlite3_free (edge);
    sql =
	sqlite3_mprintf ("SELECT n.node_id, Count(*) AS cnt FROM \"%s\" AS n "
			 "JOIN \"%s\" AS e ON (n.node_id = e.start_node OR n.node_id = e.end_node) "
			 "GROUP BY n.node_id HAVING cnt = 2", xnode, xedge);
    free (xnode);
    free (xedge);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt1, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_%sEdgeHeal error: \"%s\"",
				       mode_new ? "New" : "Mod",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SQL query identifying a couple of Edges to be Healed */
    node = sqlite3_mprintf ("%s_node", topo->topology_name);
    xnode = gaiaDoubleQuotedSql (node);
    sqlite3_free (node);
    edge = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedge = gaiaDoubleQuotedSql (edge);
    sqlite3_free (edge);
    sql =
	sqlite3_mprintf ("SELECT e1.edge_id, e2.edge_id FROM \"%s\" AS n "
			 "JOIN \"%s\" AS e1 ON (n.node_id = e1.end_node) "
			 "JOIN \"%s\" AS e2 ON (n.node_id = e2.start_node) "
			 "WHERE n.node_id = ? AND e1.start_node <> e1.end_node "
			 "AND e2.start_node <> e2.end_node",
			 xnode, xedge, xedge);
    free (xnode);
    free (xedge);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt2, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_%sEdgeHeal error: \"%s\"",
				       mode_new ? "New" : "Mod",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SQL query Healing a couple of Edges */
    sql =
	sqlite3_mprintf ("SELECT ST_%sEdgeHeal(%Q, ?, ?)",
			 mode_new ? "New" : "Mod", topo->topology_name);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt3, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_%sEdgeHeal error: \"%s\"",
				       mode_new ? "New" : "Mod",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (loop)
      {
	  /* looping until all possible Edges have been healed */
	  sqlite3_reset (stmt1);
	  sqlite3_clear_bindings (stmt1);
	  loop = 0;

	  while (1)
	    {
		/* scrolling the result set rows */
		sqlite3_int64 edge_1_id = -1;
		sqlite3_int64 edge_2_id = -1;
		ret = sqlite3_step (stmt1);
		if (ret == SQLITE_DONE)
		    break;	/* end of result set */
		if (ret == SQLITE_ROW)
		  {
		      sqlite3_reset (stmt2);
		      sqlite3_clear_bindings (stmt2);
		      sqlite3_bind_int64 (stmt2, 1,
					  sqlite3_column_int64 (stmt1, 0));

		      while (1)
			{
			    /* scrolling the result set rows */
			    ret = sqlite3_step (stmt2);
			    if (ret == SQLITE_DONE)
				break;	/* end of result set */
			    if (ret == SQLITE_ROW)
			      {
				  edge_1_id = sqlite3_column_int64 (stmt2, 0);
				  edge_2_id = sqlite3_column_int64 (stmt2, 1);
				  if (edge_1_id == edge_2_id)
				    {
					/* can't Heal - dog chasing its tail */
					edge_1_id = -1;
					edge_2_id = -1;
					continue;
				    }
				  break;
			      }
			    else
			      {
				  char *msg =
				      sqlite3_mprintf
				      ("TopoGeo_%sEdgeHeal error: \"%s\"",
				       mode_new ? "New" : "Mod",
				       sqlite3_errmsg (topo->db_handle));
				  gaiatopo_set_last_error_msg (accessor, msg);
				  sqlite3_free (msg);
				  goto error;
			      }
			}
		      if (edge_1_id < 0 && edge_2_id < 0)
			  break;

		      /* healing a couple of Edges */
		      sqlite3_reset (stmt3);
		      sqlite3_clear_bindings (stmt3);
		      sqlite3_bind_int64 (stmt3, 1, edge_1_id);
		      sqlite3_bind_int64 (stmt3, 2, edge_2_id);
		      ret = sqlite3_step (stmt3);
		      if (ret == SQLITE_DONE || ret == SQLITE_ROW)
			{
			    loop = 1;
			    continue;
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("TopoGeo_%sEdgeHeal error: \"%s\"",
				 mode_new ? "New" : "Mod",
				 sqlite3_errmsg (topo->db_handle));
			    gaiatopo_set_last_error_msg (accessor, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
	    }
      }

    sqlite3_finalize (stmt1);
    sqlite3_finalize (stmt2);
    sqlite3_finalize (stmt3);
    return 1;

  error:
    if (stmt1 != NULL)
	sqlite3_finalize (stmt1);
    if (stmt2 != NULL)
	sqlite3_finalize (stmt2);
    if (stmt3 != NULL)
	sqlite3_finalize (stmt3);
    return 0;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_NewEdgeHeal (GaiaTopologyAccessorPtr ptr)
{
    return topoGeo_EdgeHeal_common (ptr, 1);
}

GAIATOPO_DECLARE int
gaiaTopoGeo_ModEdgeHeal (GaiaTopologyAccessorPtr ptr)
{
    return topoGeo_EdgeHeal_common (ptr, 0);
}

static int
do_split_edge (GaiaTopologyAccessorPtr accessor, sqlite3 * sqlite,
	       sqlite3_stmt * stmt, sqlite3_int64 edge_id, gaiaGeomCollPtr geom,
	       int line_max_points, double max_length, int *count)
{
/* attempting to split an Edge in two halves */
    int nlns = 0;
    char *msg;
    double x;
    double y;
    double z;
    int last;
    unsigned char *blob = NULL;
    int blob_size = 0;
    int ret;
    gaiaLinestringPtr ln;
    gaiaGeomCollPtr point = NULL;
    gaiaGeomCollPtr split =
	gaiaTopoGeo_SubdivideLines (geom, line_max_points, max_length);

    ln = split->FirstLinestring;
    while (ln != NULL)
      {
	  nlns++;
	  ln = ln->Next;
      }
    if (nlns < 2)
	return 1;		/* Edge not requiring to be split */

    ln = split->FirstLinestring;
    last = ln->Points - 1;
    if (split->DimensionModel == GAIA_XY_Z)
      {
	  /* 3D topology */
	  point = gaiaAllocGeomCollXYZ ();
	  point->Srid = geom->Srid;
	  gaiaGetPointXYZ (ln->Coords, last, &x, &y, &z);
	  gaiaAddPointToGeomCollXYZ (point, x, y, z);
      }
    else
      {
	  /* 2D topology */
	  point = gaiaAllocGeomColl ();
	  point->Srid = geom->Srid;
	  gaiaGetPoint (ln->Coords, last, &x, &y);
	  gaiaAddPointToGeomColl (point, x, y);
      }

/* splitting the Edge */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, edge_id);
    gaiaToSpatiaLiteBlobWkb (point, &blob, &blob_size);
    sqlite3_bind_blob (stmt, 2, blob, blob_size, free);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
      {
	  *count += 1;
	  return 1;
      }

/* some unexpected error occurred */
    msg = sqlite3_mprintf ("Edge Split error: \"%s\"", sqlite3_errmsg (sqlite));
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_free (msg);
    return 0;
}

static int
topoGeo_EdgeSplit_common (GaiaTopologyAccessorPtr accessor, int mode_new,
			  int line_max_points, double max_length)
{
/* common implementation of GeoTable EdgeSplit */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    int ret;
    char *sql;
    char *edge;
    char *xedge;
    sqlite3_stmt *stmt1 = NULL;
    sqlite3_stmt *stmt2 = NULL;
    if (topo == NULL)
	return 0;

    ret = test_inconsistent_topology (accessor);
    if (ret != 0)
	return 0;

/* preparing the SQL query identifying all Edges */
    edge = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedge = gaiaDoubleQuotedSql (edge);
    sqlite3_free (edge);
    sql =
	sqlite3_mprintf ("SELECT edge_id, geom FROM \"%s\" ORDER BY edge_id",
			 xedge);
    free (xedge);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt1, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_%sSplit error: \"%s\"",
				       mode_new ? "NewEdges" : "ModEdge",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the SQL query splitting an Edge in two halves */
    sql =
	sqlite3_mprintf ("SELECT ST_%sSplit(%Q, ?, ?)",
			 mode_new ? "NewEdges" : "ModEdge",
			 topo->topology_name);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt2, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("TopoGeo_%sSplit error: \"%s\"",
				       mode_new ? "NewEdges" : "ModEdge",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* repeatedly looping on all Edges */
	  int count = 0;
	  sqlite3_reset (stmt1);
	  sqlite3_clear_bindings (stmt1);

	  while (1)
	    {
		/* scrolling the result set rows */
		ret = sqlite3_step (stmt1);
		if (ret == SQLITE_DONE)
		    break;	/* end of result set */
		if (ret == SQLITE_ROW)
		  {
		      sqlite3_int64 edge_id = sqlite3_column_int64 (stmt1, 0);
		      if (sqlite3_column_type (stmt1, 1) == SQLITE_BLOB)
			{
			    const unsigned char *blob =
				sqlite3_column_blob (stmt1, 1);
			    int blob_sz = sqlite3_column_bytes (stmt1, 1);
			    gaiaGeomCollPtr geom =
				gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
			    if (geom != NULL)
			      {
				  if (!do_split_edge
				      (accessor, topo->db_handle, stmt2,
				       edge_id, geom, line_max_points,
				       max_length, &count))
				    {
					gaiaFreeGeomColl (geom);
					goto error;
				    }
			      }
			    gaiaFreeGeomColl (geom);
			}
		  }
		else
		  {
		      char *msg =
			  sqlite3_mprintf ("TopoGeo_%sSplit error: \"%s\"",
					   mode_new ? "NewEdges" : "ModEdge",
					   sqlite3_errmsg (topo->db_handle));
		      gaiatopo_set_last_error_msg (accessor, msg);
		      sqlite3_free (msg);
		      goto error;
		  }
	    }
	  if (count == 0)
	      break;
      }

    sqlite3_finalize (stmt1);
    sqlite3_finalize (stmt2);
    return 1;

  error:
    if (stmt1 != NULL)
	sqlite3_finalize (stmt1);
    if (stmt2 != NULL)
	sqlite3_finalize (stmt2);
    return 0;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_NewEdgesSplit (GaiaTopologyAccessorPtr ptr, int line_max_points,
			   double max_length)
{
    return topoGeo_EdgeSplit_common (ptr, 1, line_max_points, max_length);
}

GAIATOPO_DECLARE int
gaiaTopoGeo_ModEdgeSplit (GaiaTopologyAccessorPtr ptr, int line_max_points,
			  double max_length)
{
    return topoGeo_EdgeSplit_common (ptr, 0, line_max_points, max_length);
}

static gaiaGeomCollPtr
do_interpolate_middlepoint (gaiaGeomCollPtr geom)
{
/* building a three-point segment */
    gaiaGeomCollPtr newg;
    gaiaLinestringPtr old_ln;
    gaiaLinestringPtr new_ln;
    double x0;
    double y0;
    double z0;
    double x1;
    double y1;
    double z1;
    double mx;
    double my;
    double mz;

    if (geom == NULL)
	return NULL;
    if (geom->FirstPoint != NULL || geom->FirstPolygon != NULL)
	return NULL;
    if (geom->FirstLinestring != geom->LastLinestring)
	return NULL;
    old_ln = geom->FirstLinestring;
    if (old_ln == NULL)
	return NULL;
    if (old_ln->Points != 2)
	return NULL;

    if (geom->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (old_ln->Coords, 0, &x0, &y0, &z0);
	  gaiaGetPointXYZ (old_ln->Coords, 1, &x1, &y1, &z1);
	  newg = gaiaAllocGeomCollXYZ ();
      }
    else
      {
	  gaiaGetPoint (old_ln->Coords, 0, &x0, &y0);
	  gaiaGetPoint (old_ln->Coords, 1, &x1, &y1);
	  newg = gaiaAllocGeomColl ();
      }
    newg->Srid = geom->Srid;

    if (x0 > x1)
	mx = x1 + ((x0 - x1) / 2.0);
    else
	mx = x0 + ((x1 - x0) / 2.0);
    if (y0 > y1)
	my = y1 + ((y0 - y1) / 2.0);
    else
	my = y0 + ((y1 - y0) / 2.0);
    if (geom->DimensionModel == GAIA_XY_Z)
      {
	  if (z0 > z1)
	      mz = z1 + ((z0 - z1) / 2.0);
	  else
	      mz = z0 + ((z1 - z0) / 2.0);
      }

    new_ln = gaiaAddLinestringToGeomColl (newg, 3);
    if (newg->DimensionModel == GAIA_XY_Z)
      {
	  gaiaSetPointXYZ (new_ln->Coords, 0, x0, y0, z0);
	  gaiaSetPointXYZ (new_ln->Coords, 1, mx, my, mz);
	  gaiaSetPointXYZ (new_ln->Coords, 2, x1, y1, z1);
      }
    else
      {
	  gaiaSetPoint (new_ln->Coords, 0, x0, y0);
	  gaiaSetPoint (new_ln->Coords, 1, mx, my);
	  gaiaSetPoint (new_ln->Coords, 2, x1, y1);
      }

    return newg;
}

GAIATOPO_DECLARE int
gaiaTopoGeo_DisambiguateSegmentEdges (GaiaTopologyAccessorPtr accessor)
{
/*
/ Ensures that all Edges on a Topology-Geometry will have not less
/ than three vertices; for all Edges found beign simple two-points 
/ segments a third intermediate point will be interpolated.
*/
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    int ret;
    char *sql;
    char *edge;
    char *xedge;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int count = 0;
    if (topo == NULL)
	return -1;

/* preparing the SQL query identifying all two-points Edges */
    edge = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xedge = gaiaDoubleQuotedSql (edge);
    sqlite3_free (edge);
    sql =
	sqlite3_mprintf
	("SELECT edge_id, geom FROM \"%s\" WHERE ST_NumPoints(geom) = 2 "
	 "ORDER BY edge_id", xedge);
    free (xedge);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_in, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_DisambiguateSegmentEdges error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

/* preparing the UPDATE SQL query */
    sql =
	sqlite3_mprintf ("SELECT ST_ChangeEdgeGeom(%Q, ?, ?)",
			 topo->topology_name);
    ret =
	sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_DisambiguateSegmentEdges error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt_in, 0);
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		  {
		      const unsigned char *blob =
			  sqlite3_column_blob (stmt_in, 1);
		      int blob_sz = sqlite3_column_bytes (stmt_in, 1);
		      gaiaGeomCollPtr geom =
			  gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      if (geom != NULL)
			{
			    gaiaGeomCollPtr newg =
				do_interpolate_middlepoint (geom);
			    gaiaFreeGeomColl (geom);
			    if (newg != NULL)
			      {
				  unsigned char *outblob = NULL;
				  int outblob_size = 0;
				  sqlite3_reset (stmt_out);
				  sqlite3_clear_bindings (stmt_out);
				  sqlite3_bind_int64 (stmt_out, 1, edge_id);
				  gaiaToSpatiaLiteBlobWkb (newg, &outblob,
							   &outblob_size);
				  gaiaFreeGeomColl (newg);
				  if (blob == NULL)
				      continue;
				  else
				      sqlite3_bind_blob (stmt_out, 2, outblob,
							 outblob_size, free);
				  /* updating the Edges table */
				  ret = sqlite3_step (stmt_out);
				  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
				      count++;
				  else
				    {
					char *msg =
					    sqlite3_mprintf
					    ("TopoGeo_DisambiguateSegmentEdges() error: \"%s\"",
					     sqlite3_errmsg (topo->db_handle));
					gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
					sqlite3_free (msg);
					goto error;
				    }
			      }
			}
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf
		    ("TopoGeo_DisambiguateSegmentEdges error: \"%s\"",
		     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return count;

  error:
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return -1;
}

#endif /* end ENABLE_RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_netstmts.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
/*

 gaia_netstmts.c -- implementation of Topology-Network prepared statements
    
 version 4.3, 2015 August 11

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaiaaux.h>
#include <spatialite/gaia_network.h>

#include <spatialite_private.h>

#include <librttopo.h>

#include <lwn_network.h>

#include "network_private.h"

#define GAIA_UNUSED() if (argc || argv) argc = argc;


NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_getNetNodeWithinDistance2D (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the getNetNodeWithinDistance2D prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT node_id FROM MAIN.\"%s\" "
			 "WHERE ST_Distance(geometry, MakePoint(?, ?)) <= ? AND ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geometry' AND search_frame = BuildCircleMBR(?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("Prepare_getNetNodeWithinDistance2D error: \"%s\"",
	       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_getLinkWithinDistance2D (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the getLinkWithinDistance2D prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT link_id FROM MAIN.\"%s\" "
			 "WHERE ST_Distance(geometry, MakePoint(?, ?)) <= ? AND ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geometry' AND search_frame = BuildCircleMBR(?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getLinkWithinDistance2D error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_insertNetNodes (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the insertNetNodes prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO \"%s\" (node_id, geometry) VALUES (?, ?)", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_insertNetNodes error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_insertLinks (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the insertLinks prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO \"%s\" (link_id, start_node, end_node, geometry) "
	 "VALUES (?, ?, ?, ?)", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_insertLinks error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_deleteNetNodesById (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the deleteNodesById prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE node_id = ?", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_deleteNetNodesById error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_getNetNodeWithinBox2D (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the getNetNodeWithinBox2D prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT node_id FROM MAIN.\"%s\" WHERE ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geometry' AND search_frame = BuildMBR(?, ?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getNetNodeWithinBox2D error: \"%s\"",
			       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }
    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_getNextLinkId (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the getNextLinkId prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    if (net == NULL)
	return NULL;

    sql =
	sqlite3_mprintf
	("SELECT next_link_id FROM MAIN.networks WHERE Lower(network_name) = Lower(%Q)",
	 net->network_name);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getNextLinkId error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_setNextLinkId (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the setNextLinkId prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    if (net == NULL)
	return NULL;

    sql =
	sqlite3_mprintf
	("UPDATE MAIN.networks SET next_link_id = next_link_id + 1 "
	 "WHERE Lower(network_name) = Lower(%Q)", net->network_name);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_setNextLinkId error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

NETWORK_PRIVATE sqlite3_stmt *
do_create_stmt_deleteLinksById (GaiaNetworkAccessorPtr accessor)
{
/* attempting to create the deleteNodesById prepared statement */
    struct gaia_network *net = (struct gaia_network *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (net == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE link_id = ?", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (net->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_deleteLinksById error: \"%s\"",
				       sqlite3_errmsg (net->db_handle));
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_network.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
/*

 gaia_network.c -- implementation of Topology-Network SQL functions
    
 version 4.3, 2015 August 11

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_network.h>
#include <spatialite/gaia_topology.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>
#include <lwn_network.h>

#include "network_private.h"
#include "topology_private.h"

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

#define GAIA_UNUSED() if (argc || argv) argc = argc;

static struct splite_savepoint *
push_net_savepoint (struct splite_internal_cache *cache)
{
/* adding a new SavePoint to the Network stack */
    struct splite_savepoint *p_svpt = malloc (sizeof (struct splite_savepoint));
    p_svpt->savepoint_name = NULL;
    p_svpt->prev = cache->last_net_svpt;
    p_svpt->next = NULL;
    if (cache->first_net_svpt == NULL)
	cache->first_net_svpt = p_svpt;
    if (cache->last_net_svpt != NULL)
	cache->last_net_svpt->next = p_svpt;
    cache->last_net_svpt = p_svpt;
    return p_svpt;
}

static void
pop_net_savepoint (struct splite_internal_cache *cache)
{
/* removing a SavePoint from the Network stack */
    struct splite_savepoint *p_svpt = cache->last_net_svpt;
    if (p_svpt->prev != NULL)
	p_svpt->prev->next = NULL;
    cache->last_net_svpt = p_svpt->prev;
    if (cache->first_net_svpt == p_svpt)
	cache->first_net_svpt = NULL;
    if (p_svpt->savepoint_name != NULL)
	sqlite3_free (p_svpt->savepoint_name);
    free (p_svpt);
}

SPATIALITE_PRIVATE void
start_net_savepoint (const void *handle, const void *data)
{
/* starting a new SAVEPOINT */
    char *sql;
    int ret;
    char *err_msg;
    struct splite_savepoint *p_svpt;
    sqlite3 *sqlite = (sqlite3 *) handle;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) data;
    if (sqlite == NULL || cache == NULL)
	return;

/* creating an unique SavePoint name */
    p_svpt = push_net_savepoint (cache);
    p_svpt->savepoint_name =
	sqlite3_mprintf ("netsvpt%04x", cache->next_network_savepoint);
    if (cache->next_network_savepoint >= 0xffffffffu)
	cache->next_network_savepoint = 0;
    else
	cache->next_network_savepoint += 1;

/* starting a SavePoint */
    sql = sqlite3_mprintf ("SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
}

SPATIALITE_PRIVATE void
release_net_savepoint (const void *handle, const void *data)
{
/* releasing the current SAVEPOINT (if any) */
    char *sql;
    int ret;
    char *err_msg;
    struct splite_savepoint *p_svpt;
    sqlite3 *sqlite = (sqlite3 *) handle;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) data;
    if (sqlite == NULL || cache == NULL)
	return;
    p_svpt = cache->last_net_svpt;
    if (p_svpt == NULL)
	return;
    if (p_svpt->savepoint_name == NULL)
	return;

/* releasing the current SavePoint */
    sql = sqlite3_mprintf ("RELEASE SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
    pop_net_savepoint (cache);
}

SPATIALITE_PRIVATE void
rollback_net_savepoint (const void *handle, const void *data)
{
/* rolling back the current SAVEPOINT (if any) */
    char *sql;
    int ret;
    char *err_msg;
    struct splite_savepoint *p_svpt;
    sqlite3 *sqlite = (sqlite3 *) handle;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) data;
    if (sqlite == NULL || cache == NULL)
	return;
    p_svpt = cache->last_net_svpt;
    if (p_svpt == NULL)
	return;
    if (p_svpt->savepoint_name == NULL)
	return;

/* rolling back the current SavePoint */
    sql = sqlite3_mprintf ("ROLLBACK TO SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
/* releasing the current SavePoint */
    sql = sqlite3_mprintf ("RELEASE SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
    pop_net_savepoint (cache);
}

SPATIALITE_PRIVATE void
fnctaux_GetLastNetworkException (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ GetLastNetworkException  ( text network-name )
/
/ returns: the more recent exception raised by given Topology-Network
/ NULL on invalid args (or when there is no pending exception)
*/
    const char *network_name;
    GaiaNetworkAccessorPtr accessor;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
      {
	  sqlite3_result_null (context);
	  return;
      }

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
      {
	  sqlite3_result_null (context);
	  return;
      }

    sqlite3_result_text (context, gaianet_get_last_exception (accessor), -1,
			 SQLITE_STATIC);
}

SPATIALITE_PRIVATE void
fnctaux_CreateNetwork (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_InitTopoNet ( text network-name )
/ CreateNetwork ( text network-name )
/ CreateNetwork ( text network-name, bool spatial )
/ CreateNetwork ( text network-name, bool spatial, int srid )
/ CreateNetwork ( text network-name, bool spatial, int srid, bool hasZ )
/ CreateNetwork ( text network-name, bool spatial, int srid, bool hasZ,
/                 bool allow_coincident )
/
/ returns: 1 on success, 0 on failure
/ -1 on invalid args
*/
    int ret;
    const char *network_name;
    int srid = -1;
    int has_z = 0;
    int spatial = 0;
    int allow_coincident = 1;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
      {
	  sqlite3_result_int (context, -1);
	  return;
      }
    if (argc >= 2)
      {
	  if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	      spatial = sqlite3_value_int (argv[1]);
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	      srid = sqlite3_value_int (argv[2]);
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }
    if (argc >= 4)
      {
	  if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[3]) == SQLITE_INTEGER)
	      has_z = sqlite3_value_int (argv[3]);
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }
    if (argc >= 5)
      {
	  if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[4]) == SQLITE_INTEGER)
	      allow_coincident = sqlite3_value_int (argv[4]);
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }

    start_net_savepoint (sqlite, cache);
    ret =
	gaiaNetworkCreate (sqlite, network_name, spatial, srid, has_z,
			   allow_coincident);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    sqlite3_result_int (context, ret);
}

SPATIALITE_PRIVATE void
fnctaux_DropNetwork (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ DropNetwork ( text network-name )
/
/ returns: 1 on success, 0 on failure
/ -1 on invalid args
*/
    int ret;
    const char *network_name;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GaiaNetworkAccessorPtr accessor;
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
      {
	  sqlite3_result_int (context, -1);
	  return;
      }

    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor != NULL)
	gaiaNetworkDestroy (accessor);

    start_net_savepoint (sqlite, cache);
    ret = gaiaNetworkDrop (sqlite, network_name);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    sqlite3_result_int (context, ret);
}

static int
check_matching_srid_dims (GaiaNetworkAccessorPtr accessor, int srid, int dims)
{
/* checking for matching SRID and DIMs */
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net->srid != srid)
	return 0;
    if (net->has_z)
      {
	  if (dims == GAIA_XY_Z || dims == GAIA_XY_Z_M)
	      ;
	  else
	      return 0;
      }
    else
      {
	  if (dims == GAIA_XY_Z || dims == GAIA_XY_Z_M)
	      return 0;
      }
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_AddIsoNetNode (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_AddIsoNetNode ( text network-name, Geometry point )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt = NULL;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;

    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
      {
	  if (net->spatial)
	      goto spatial_err;
      }
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  if (net->spatial == 0)
	      goto logical_err;
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);

	  /* attempting to get a Point Geometry */
	  point =
	      gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
					   gpkg_amphibious);
	  if (!point)
	      goto invalid_arg;
	  if (point->FirstLinestring != NULL)
	      invalid = 1;
	  if (point->FirstPolygon != NULL)
	      invalid = 1;
	  if (point->FirstPoint != point->LastPoint
	      || point->FirstPoint == NULL)
	      invalid = 1;
	  if (invalid)
	      goto invalid_arg;

	  if (!check_matching_srid_dims
	      (accessor, point->Srid, point->DimensionModel))
	      goto invalid_geom;
	  pt = point->FirstPoint;
      }
    else
	goto invalid_arg;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaAddIsoNetNode (accessor, pt);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (point != NULL)
      {
	  gaiaFreeGeomColl (point);
	  point = NULL;
      }
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).",
			  -1);
    return;

  spatial_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Spatial Network can't accept null geometry.",
			  -1);
    return;

  logical_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Logical Network can't accept not null geometry.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_MoveIsoNetNode (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_MoveIsoNetNode ( text network-name, int node_id, Geometry point )
/
/ returns: TEXT (description of new location)
/ raises an exception on failure
*/
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *net_name;
    sqlite3_int64 node_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt = NULL;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	net_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, net_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;

    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
      {
	  if (net->spatial)
	      goto spatial_err;
      }
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  if (net->spatial == 0)
	      goto logical_err;
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);

	  /* attempting to get a Point Geometry */
	  point =
	      gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
					   gpkg_amphibious);
	  if (!point)
	      goto invalid_arg;
	  if (point->FirstLinestring != NULL)
	      invalid = 1;
	  if (point->FirstPolygon != NULL)
	      invalid = 1;
	  if (point->FirstPoint != point->LastPoint
	      || point->FirstPoint == NULL)
	      invalid = 1;
	  if (invalid)
	      goto invalid_arg;
	  if (!check_matching_srid_dims
	      (accessor, point->Srid, point->DimensionModel))
	      goto invalid_geom;
	  pt = point->FirstPoint;
      }
    else
	goto invalid_arg;
    sprintf (xid, "%lld", node_id);
    if (pt == NULL)
	newpos =
	    sqlite3_mprintf ("Isolated Node %s moved to NULL location", xid);
    else
	newpos =
	    sqlite3_mprintf ("Isolated Node %s moved to location %f,%f", xid,
			     pt->X, pt->Y);

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaMoveIsoNetNode (accessor, node_id, pt);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    point = NULL;
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_net:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).",
			  -1);
    return;

  spatial_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Spatial Network can't accept null geometry.",
			  -1);
    return;

  logical_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Logical Network can't accept not null geometry.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_RemIsoNetNode (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_RemIsoNetNode ( text network-name, int node_id )
/
/ returns: TEXT (description of operation)
/ raises an exception on failure
*/
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *network_name;
    sqlite3_int64 node_id;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    sprintf (xid, "%lld", node_id);
    newpos = sqlite3_mprintf ("Isolated NetNode %s removed", xid);

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaRemIsoNetNode (accessor, node_id);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_net:
    if (newpos != NULL)
	sqlite3_free (newpos);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_AddLink (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_AddLink ( text network-name, int start_node_id, int end_node_id, Geometry linestring )
/
/ returns: the ID of the inserted Link on success, 0 on failure
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 start_node_id;
    sqlite3_int64 end_node_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr line = NULL;
    gaiaLinestringPtr ln = NULL;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	start_node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	end_node_id = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;

    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
      {
	  if (net->spatial)
	      goto spatial_err;
      }
    else if (sqlite3_value_type (argv[3]) == SQLITE_BLOB)
      {
	  if (net->spatial == 0)
	      goto logical_err;
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[3]);
	  n_bytes = sqlite3_value_bytes (argv[3]);

/* attempting to get a Linestring Geometry */
	  line =
	      gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
					   gpkg_amphibious);
	  if (!line)
	      goto invalid_arg;
	  if (line->FirstPoint != NULL)
	      invalid = 1;
	  if (line->FirstPolygon != NULL)
	      invalid = 1;
	  if (line->FirstLinestring != line->LastLinestring
	      || line->FirstLinestring == NULL)
	      invalid = 1;
	  if (invalid)
	      goto invalid_arg;
	  if (!check_matching_srid_dims
	      (accessor, line->Srid, line->DimensionModel))
	      goto invalid_geom;
	  ln = line->FirstLinestring;
      }
    else
	goto invalid_arg;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaAddLink (accessor, start_node_id, end_node_id, ln);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    line = NULL;
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  spatial_err:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Spatial Network can't accept null geometry.",
			  -1);
    return;

  logical_err:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Logical Network can't accept not null geometry.",
			  -1);
    return;

  invalid_geom:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ChangeLinkGeom (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ChangeLinkGeom ( text network-name, int link_id, Geometry linestring )
/
/ returns: TEXT (description of operation)
/ raises an exception on failure
*/
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *network_name;
    sqlite3_int64 link_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr line = NULL;
    gaiaLinestringPtr ln = NULL;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;

    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
      {
	  if (net->spatial)
	      goto spatial_err;
      }
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  if (net->spatial == 0)
	      goto logical_err;
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);

	  /* attempting to get a Linestring Geometry */
	  line =
	      gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
					   gpkg_amphibious);
	  if (!line)
	      goto invalid_arg;
	  if (line->FirstPoint != NULL)
	      invalid = 1;
	  if (line->FirstPolygon != NULL)
	      invalid = 1;
	  if (line->FirstLinestring != line->LastLinestring
	      || line->FirstLinestring == NULL)
	      invalid = 1;
	  if (invalid)
	      goto invalid_arg;

	  if (!check_matching_srid_dims
	      (accessor, line->Srid, line->DimensionModel))
	      goto invalid_geom;
	  ln = line->FirstLinestring;
      }
    else
	goto invalid_arg;
    sprintf (xid, "%lld", link_id);
    newpos = sqlite3_mprintf ("Link %s changed", xid);

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaChangeLinkGeom (accessor, link_id, ln);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    line = NULL;
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_net:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).",
			  -1);
    return;

  spatial_err:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Spatial Network can't accept null geometry.",
			  -1);
    return;

  logical_err:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Logical Network can't accept not null geometry.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_RemoveLink (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_RemoveLink ( text network-name, int link_id )
/
/ returns: TEXT (description of operation)
/ raises an exception on failure
*/
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *network_name;
    sqlite3_int64 link_id;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    sprintf (xid, "%lld", link_id);
    newpos = sqlite3_mprintf ("Link %s removed", xid);

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaRemoveLink (accessor, link_id);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_net:
    if (newpos != NULL)
	sqlite3_free (newpos);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_NewLogLinkSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_NewLogLinkSplit ( text network-name, int link_id )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 link_id;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial)
	goto spatial_err;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaNewLogLinkSplit (accessor, link_id);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  spatial_err:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - ST_NewLogLinkSplit can't support Spatial Network; try using ST_NewGeoLinkSplit.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ModLogLinkSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ModLogLinkSplit ( text network-name, int link_id )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 link_id;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial)
	goto spatial_err;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaModLogLinkSplit (accessor, link_id);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  spatial_err:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - ST_ModLogLinkSplit can't support Spatial Network; try using ST_ModGeoLinkSplit.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_NewGeoLinkSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_NewGeoLinkSplit ( text network-name, int link_id, Geometry point )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 link_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto spatial_err;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;
    pt = point->FirstPoint;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaNewGeoLinkSplit (accessor, link_id, pt);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).",
			  -1);
    return;

  spatial_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Spatial Network can't accept null geometry.",
			  -1);
    return;

  logical_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - ST_NewGeoLinkSplit can't support Logical Network; try using ST_NewLogLinkSplit.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ModGeoLinkSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ModGeoLinkSplit ( text network-name, int link_id, Geometry point )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 link_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto spatial_err;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;
    pt = point->FirstPoint;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaModGeoLinkSplit (accessor, link_id, pt);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).",
			  -1);
    return;

  spatial_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - Spatial Network can't accept null geometry.",
			  -1);
    return;

  logical_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - ST_ModGeoLinkSplit can't support Logical Network; try using ST_ModLogLinkSplit.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_NewLinkHeal (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_NewLinkHeal ( text network-name, int link_id, int anotherlink_id )
/
/ returns: the ID of the removed Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 link_id;
    sqlite3_int64 anotherlink_id;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	anotherlink_id = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaNewLinkHeal (accessor, link_id, anotherlink_id);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ModLinkHeal (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ModLinkHeal ( text network-name, int link_id )
/
/ returns: the ID of the removed Node on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    sqlite3_int64 link_id;
    sqlite3_int64 anotherlink_id;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	anotherlink_id = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaModLinkHeal (accessor, link_id, anotherlink_id);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;
}

static int
check_empty_network (struct gaia_network *net)
{
/* checking for an empty Network */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int already_populated = 0;

/* testing NODE */
    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (net->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      already_populated = 1;
      }
    sqlite3_free_table (results);
    if (already_populated)
	return 0;

/* testing LINK */
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (net->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      already_populated = 1;
      }
    sqlite3_free_table (results);
    if (already_populated)
	return 0;

    return 1;
}

static int
do_loginet_from_tgeo (struct gaia_network *net, struct gaia_topology *topo)
{
/* populating a Logical Network starting from an existing Topology */
    char *table;
    char *xtable1;
    char *xtable2;
    char *sql;
    char *errMsg;
    int ret;

/* preparing the SQL statement - NODE */
    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\" (node_id, geometry) "
			   "SELECT node_id, NULL FROM MAIN.\"%s\"", xtable1,
			   xtable2);
    free (xtable1);
    free (xtable2);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_LogiNetFromTGeo() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* preparing the SQL statement - LINK */
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (link_id, start_node, end_node, geometry) "
	 "SELECT edge_id, start_node, end_node, NULL FROM MAIN.\"%s\"", xtable1,
	 xtable2);
    free (xtable1);
    free (xtable2);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_LogiNetFromTGeo() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_LogiNetFromTGeo (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_LogiNetFromTGeo ( text network-name, text topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *network_name;
    const char *topo_name;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    GaiaTopologyAccessorPtr accessor2;
    struct gaia_topology *topo;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial)
	goto spatial_err;
    if (!check_empty_network (net))
	goto non_empty;

/* attempting to get a Topology Accessor */
    accessor2 = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor2 == NULL)
	goto no_topo;
    topo = (struct gaia_topology *) accessor2;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = do_loginet_from_tgeo (net, topo);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  spatial_err:
    sqlite3_result_error (context,
			  "ST_LogiNetFromTGeo() cannot be applied to Spatial Network.",
			  -1);
    return;

  non_empty:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - non-empty network.", -1);
    return;

  no_topo:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid topology name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;
}

static int
check_matching_topo_net (struct gaia_network *net, struct gaia_topology *topo)
{
/* checking for matching SRID and DIMs */
    if (net->srid != topo->srid)
	return 0;
    if (net->has_z != topo->has_z)
	return 0;
    return 1;
}

static int
do_spatnet_from_tgeo (struct gaia_network *net, struct gaia_topology *topo)
{
/* populating a Spatial Network starting from an existing Topology */
    char *table;
    char *xtable1;
    char *xtable2;
    char *sql;
    char *errMsg;
    int ret;

/* preparing the SQL statement - NODE */
    table = sqlite3_mprintf ("%s_node", net->network_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" (node_id, geometry) "
			   "SELECT node_id, geom FROM MAIN.\"%s\"", xtable1,
			   xtable2);
    free (xtable1);
    free (xtable2);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_SpatNetFromTGeo() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }

/* preparing the SQL statement - LINK */
    table = sqlite3_mprintf ("%s_link", net->network_name);
    xtable1 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable2 = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (link_id, start_node, end_node, geometry) "
	 "SELECT edge_id, start_node, end_node, geom FROM MAIN.\"%s\"", xtable1,
	 xtable2);
    free (xtable1);
    free (xtable2);
    ret = sqlite3_exec (net->db_handle, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("ST_SpatNetFromTGeo() error: \"%s\"", errMsg);
	  sqlite3_free (errMsg);
	  gaianet_set_last_error_msg ((GaiaNetworkAccessorPtr) net, msg);
	  sqlite3_free (msg);
	  return 0;
      }

    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_SpatNetFromTGeo (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_SpatNetFromTGeo ( text network-name, text topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *network_name;
    const char *topo_name;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    GaiaTopologyAccessorPtr accessor2;
    struct gaia_topology *topo;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;
    if (!check_empty_network (net))
	goto non_empty;

/* attempting to get a Topology Accessor */
    accessor2 = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor2 == NULL)
	goto no_topo;
    topo = (struct gaia_topology *) accessor2;
    if (!check_matching_topo_net (net, topo))
	goto mismatching;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = do_spatnet_from_tgeo (net, topo);
    if (ret <= 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (ret <= 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  logical_err:
    sqlite3_result_error (context,
			  "ST_SpatNetFromTGeo() cannot be applied to Logical Network.",
			  -1);
    return;

  non_empty:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - non-empty network.", -1);
    return;

  no_topo:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid topology name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  mismatching:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - mismatching SRID or dimensions.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ValidLogicalNet (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ValidLogicalNet ( text network-name )
/
/ create/update a table containing an validation report for a given
/ Logical Network
/
/ returns NULL on success
/ raises an exception on failure
*/
    const char *network_name;
    int ret;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial)
	goto spatial_err;
    if (check_empty_network (net))
	goto empty;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaValidLogicalNet (accessor);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  spatial_err:
    sqlite3_result_error (context,
			  "ST_ValidLogicalNet() cannot be applied to Spatial Network.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  empty:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - empty network.", -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ValidSpatialNet (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ValidSpatialNet ( text network-name )
/
/ create/update a table containing an validation report for a given
/ Spatial Network
/
/ returns NULL on success
/ raises an exception on failure
*/
    const char *network_name;
    int ret;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;
    if (check_empty_network (net))
	goto empty;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaValidSpatialNet (accessor);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  logical_err:
    sqlite3_result_error (context,
			  "ST_ValidSpatialNet() cannot be applied to Logical Network.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  empty:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - empty network.", -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_SpatNetFromGeom (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_SpatNetFromGeom ( text network-name , blob geom-collection )
/
/ creates and populates an empty Network by importing a Geometry-collection
/
/ returns NULL on success
/ raises an exception on failure
*/
    const char *network_name;
    int ret;
    const unsigned char *blob;
    int blob_sz;
    gaiaGeomCollPtr geom = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  blob = sqlite3_value_blob (argv[1]);
	  blob_sz = sqlite3_value_bytes (argv[1]);
	  geom =
	      gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz, gpkg_mode,
					   gpkg_amphibious);
      }
    else
	goto invalid_arg;
    if (geom == NULL)
	goto not_geom;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;
    if (!check_empty_network (net))
	goto not_empty;
    if (!check_matching_srid_dims (accessor, geom->Srid, geom->DimensionModel))
	goto invalid_geom;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = auxnet_insert_into_network (accessor, geom);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    gaiaFreeGeomColl (geom);
    return;

  no_net:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  logical_err:
    sqlite3_result_error (context,
			  "ST_ValidSpatialNet() cannot be applied to Logical Network.",
			  -1);
    return;

  null_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  not_empty:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - non-empty network.", -1);
    return;

  not_geom:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - not a Geometry.", -1);
    return;

  invalid_geom:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid Geometry (mismatching SRID or dimensions).",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetNetNodeByPoint (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ GetNetNodeByPoint ( text network-name, Geometry point )
/ GetNetNodeByPoint ( text network-name, Geometry point, double tolerance )
/
/ returns: the ID of some Node on success, 0 if no Node was found
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    double tolerance = 0.0;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;
    pt = point->FirstPoint;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaGetNetNodeByPoint (accessor, pt, tolerance);
    if (ret < 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret < 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  logical_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "GetNetNodekByPoint() cannot be applied to Logical Network.",
			  -1);
    return;

  negative_tolerance:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - illegal negative tolerance.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetLinkByPoint (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ GetLinkByPoint ( text network-name, Geometry point )
/ GetLinkByPoint ( text network-name, Geometry point, double tolerance )
/
/ returns: the ID of some Link on success
/ raises an exception on failure
*/
    sqlite3_int64 ret;
    const char *network_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    double tolerance = 0;
    int invalid = 0;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;
    pt = point->FirstPoint;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaGetLinkByPoint (accessor, pt, tolerance);
    if (ret < 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret < 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_net:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  logical_err:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "GetLinkByPoint() cannot be applied to Logical Network.",
			  -1);
    return;

  negative_tolerance:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - illegal negative tolerance.",
			  -1);
    return;
}

static int
check_matching_srid_dims_class (GaiaNetworkAccessorPtr accessor, int srid,
				int dims, int linear)
{
/* checking for matching SRID and DIMs */
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net->srid != srid)
	return 0;
    if (!linear)
	return 0;
    if (net->has_z)
      {
	  if (dims == GAIA_XY_Z || dims == GAIA_XY_Z_M)
	      ;
	  else
	      return 0;
      }
    else
      {
	  if (dims == GAIA_XY_Z || dims == GAIA_XY_Z_M)
	      return 0;
      }
    return 1;
}

static int
check_input_geonet_table (sqlite3 * sqlite, const char *db_prefix,
			  const char *table, const char *column, char **xtable,
			  char **xcolumn, int *srid, int *dims, int *linear)
{
/* checking if an input GeoTable do really exist */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    char *xprefix;
    int len;
    int count = 0;
    char *xx_table = NULL;
    char *xx_column = NULL;
    char *ztable;
    int xtype;
    int xdims;
    int xsrid;

    *xtable = NULL;
    *xcolumn = NULL;
    *srid = -1;
    *dims = GAIA_XY;
    *linear = 1;

/* querying GEOMETRY_COLUMNS */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    if (column == NULL)
	sql =
	    sqlite3_mprintf
	    ("SELECT f_table_name, f_geometry_column, geometry_type, srid "
	     "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q)",
	     xprefix, table);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT f_table_name, f_geometry_column, geometry_type, srid "
	     "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) AND "
	     "Lower(f_geometry_column) = Lower(%Q)", xprefix, table, column);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *table_name = results[(i * columns) + 0];
	  const char *column_name = results[(i * columns) + 1];
	  xtype = atoi (results[(i * columns) + 2]);
	  xsrid = atoi (results[(i * columns) + 3]);
	  len = strlen (table_name);
	  if (xx_table != NULL)
	      free (xx_table);
	  xx_table = malloc (len + 1);
	  strcpy (xx_table, table_name);
	  len = strlen (column_name);
	  if (xx_column != NULL)
	      free (xx_column);
	  xx_column = malloc (len + 1);
	  strcpy (xx_column, column_name);
	  count++;
      }
    sqlite3_free_table (results);

    if (count != 1)
      {
	  if (xx_table != NULL)
	      free (xx_table);
	  if (xx_column != NULL)
	      free (xx_column);
	  return 0;
      }

/* testing if the GeoTable do really exist */
    count = 0;
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    ztable = gaiaDoubleQuotedSql (xx_table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, ztable);
    free (xprefix);
    free (ztable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *column_name = results[(i * columns) + 1];
	  if (strcasecmp (column_name, xx_column) == 0)
	      count++;
      }
    sqlite3_free_table (results);

    if (count != 1)
      {
	  if (xx_table != NULL)
	      free (xx_table);
	  if (xx_column != NULL)
	      free (xx_column);
	  return 0;
      }

    switch (xtype)
      {
      case 2:
      case 5:
	  xdims = GAIA_XY;
	  break;
      case 1002:
      case 1005:
	  xdims = GAIA_XY_Z;
	  break;
      case 2002:
      case 2005:
	  xdims = GAIA_XY_M;
	  break;
      case 3002:
      case 3005:
	  xdims = GAIA_XY_Z_M;
	  break;
      default:
	  *linear = 0;
	  break;
      };
    *xtable = xx_table;
    *xcolumn = xx_column;
    *srid = xsrid;
    *dims = xdims;
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_FromGeoTable (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoNet_FromGeoTable ( text network-name, text db-prefix, text table,
/                        text column )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *network_name;
    const char *db_prefix;
    const char *table;
    const char *column;
    char *xtable = NULL;
    char *xcolumn = NULL;
    int srid;
    int dims;
    int linear;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

/* checking the input GeoTable */
    if (!check_input_geonet_table
	(sqlite, db_prefix, table, column, &xtable, &xcolumn, &srid, &dims,
	 &linear))
	goto no_input;
    if (!check_matching_srid_dims_class (accessor, srid, dims, linear))
	goto invalid_geom;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaTopoNet_FromGeoTable (accessor, db_prefix, xtable, xcolumn);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    free (xtable);
    free (xcolumn);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  no_input:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid input GeoTable.",
			  -1);
    return;

  null_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID, dimensions or class).",
			  -1);
    return;

  logical_err:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    sqlite3_result_error (context,
			  "FromGeoTable() cannot be applied to Logical Network.",
			  -1);
    return;
}

static int
check_reference_geonet_table (sqlite3 * sqlite, const char *db_prefix,
			      const char *table, const char *column,
			      char **xtable, char **xcolumn, int *srid,
			      int *linear)
{
    int dims;
    return check_input_geonet_table (sqlite, db_prefix, table, column, xtable,
				     xcolumn, srid, &dims, linear);
}

static int
check_matching_srid_class (GaiaNetworkAccessorPtr accessor, int srid,
			   int linear)
{
/* checking for matching SRID */
    struct gaia_network *net = (struct gaia_network *) accessor;
    if (net->srid != srid)
	return 0;
    if (!linear)
	return 0;
    return 1;
}

static int
check_output_geonet_table (sqlite3 * sqlite, const char *table)
{
/* checking if an output GeoTable do already exist */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    int count = 0;
    char *ztable;

/* querying GEOMETRY_COLUMNS */
    sql =
	sqlite3_mprintf
	("SELECT f_table_name, f_geometry_column "
	 "FROM MAIN.geometry_columns WHERE Lower(f_table_name) = Lower(%Q)",
	 table);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);

    if (count != 0)
	return 0;

/* testing if the Table already exist */
    count = 0;
    ztable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA MAIN.table_info(\"%s\")", ztable);
    free (ztable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);

    if (count != 0)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_ToGeoTable (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoNet_ToGeoTable ( text network-name, text db-prefix, text ref_table,
/                      text ref_column, text out_table )
/ TopoNet_ToGeoTable ( text network-name, text db-prefix, text ref_table,
/                      text ref_column, text out_table, int with_spatial_index )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *network_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    int with_spatial_index = 0;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int linear;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (argc >= 6)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
	      with_spatial_index = sqlite3_value_int (argv[5]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

/* checking the reference GeoTable */
    if (!check_reference_geonet_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &linear))
	goto no_reference;
    if (!check_matching_srid_class (accessor, srid, linear))
	goto invalid_geom;

/* checking the output GeoTable */
    if (!check_output_geonet_table (sqlite, out_table))
	goto err_output;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret =
	gaiaTopoNet_ToGeoTable (accessor, db_prefix, xreftable, xrefcolumn,
				out_table, with_spatial_index);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "TopoNet_ToGeoTable: invalid reference GeoTable.",
			  -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "TopoNet_ToGeoTable: output GeoTable already exists.",
			  -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID or class).",
			  -1);
    return;

  logical_err:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "TopoNet_ToGeoTable() cannot be applied to Logical Network.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_ToGeoTableGeneralize (const void *xcontext, int argc,
				      const void *xargv)
{
/* SQL function:
/ TopoNet_ToGeoTableGeneralize ( text network-name, text db-prefix, 
/                                text ref_table, text ref_column,
/                                text out_table, int tolerance, 
/                                int with_spatial_index )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *network_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    double tolerance = 0.0;
    int with_spatial_index = 0;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int linear;
    GaiaNetworkAccessorPtr accessor;
    struct gaia_network *net;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
      {
	  int val = sqlite3_value_int (argv[5]);
	  tolerance = val;
      }
    else if (sqlite3_value_type (argv[5]) == SQLITE_FLOAT)
	tolerance = sqlite3_value_double (argv[5]);
    else
	goto invalid_arg;
    if (argc >= 7)
      {
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	      with_spatial_index = sqlite3_value_int (argv[6]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

/* checking the reference GeoTable */
    if (!check_reference_geonet_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &linear))
	goto no_reference;
    if (!check_matching_srid_class (accessor, srid, linear))
	goto invalid_geom;

/* checking the output GeoTable */
    if (!check_output_geonet_table (sqlite, out_table))
	goto err_output;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret =
	gaiaTopoNet_ToGeoTableGeneralize (accessor, db_prefix, xreftable,
					  xrefcolumn, out_table, tolerance,
					  with_spatial_index);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "TopoNet_ToGeoTableGeneralize: invalid reference GeoTable.",
			  -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "TopoNet_ToGeoTableGeneralize: output GeoTable already exists.",
			  -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID or class).",
			  -1);
    return;

  logical_err:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    sqlite3_result_error (context,
			  "TopoNet_ToGeoTableGeneralize() cannot be applied to Logical Network.",
			  -1);
    return;
}

static int
do_clone_netnode (const char *db_prefix, const char *in_network,
		  struct gaia_network *net_out)
{
/* cloning NODE */
    char *sql;
    char *table;
    char *xprefix;
    char *xtable;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;

/* preparing the input SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    table = sqlite3_mprintf ("%s_node", in_network);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT node_id, geometry FROM \"%s\".\"%s\"", xprefix,
			 xtable);
    free (xprefix);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net_out->db_handle, sql, strlen (sql), &stmt_in,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM \"node\" error: \"%s\"",
			sqlite3_errmsg (net_out->db_handle));
	  goto error;
      }

/* preparing the output SQL statement */
    table = sqlite3_mprintf ("%s_node", net_out->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("INSERT INTO MAIN.\"%s\" (node_id, geometry) "
			   "VALUES (?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net_out->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO \"node\" error: \"%s\"",
			sqlite3_errmsg (net_out->db_handle));
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 1,
					sqlite3_column_int64 (stmt_in, 0));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_NULL)
		    sqlite3_bind_null (stmt_out, 2);
		else if (sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		    sqlite3_bind_blob (stmt_out, 2,
				       sqlite3_column_blob (stmt_in, 1),
				       sqlite3_column_bytes (stmt_in, 1),
				       SQLITE_STATIC);
		else
		    goto invalid_value;
		/* inserting into the output table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      spatialite_e ("INSERT INTO \"node\" step error: \"%s\"",
				    sqlite3_errmsg (net_out->db_handle));
		      goto error;
		  }
	    }
	  else
	    {
		spatialite_e ("SELECT FROM \"node\" step error: %s",
			      sqlite3_errmsg (net_out->db_handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  invalid_value:
    spatialite_e ("SELECT FROM \"node\": found an invalid value");

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static int
do_clone_link (const char *db_prefix, const char *in_network,
	       struct gaia_network *net_out)
{
/* cloning LINK */
    char *sql;
    char *table;
    char *xprefix;
    char *xtable;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;

/* preparing the input SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    table = sqlite3_mprintf ("%s_link", in_network);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT link_id, start_node, end_node, geometry FROM \"%s\".\"%s\"",
	 xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net_out->db_handle, sql, strlen (sql), &stmt_in,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM \"link\" error: \"%s\"",
			sqlite3_errmsg (net_out->db_handle));
	  goto error;
      }

/* preparing the output SQL statement */
    table = sqlite3_mprintf ("%s_link", net_out->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (link_id, start_node, end_node, "
	 "geometry) VALUES (?, ?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (net_out->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO \"link\" error: \"%s\"",
			sqlite3_errmsg (net_out->db_handle));
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 1,
					sqlite3_column_int64 (stmt_in, 0));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 2,
					sqlite3_column_int64 (stmt_in, 1));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 2) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 3,
					sqlite3_column_int64 (stmt_in, 2));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 3) == SQLITE_NULL)
		    sqlite3_bind_null (stmt_out, 4);
		else if (sqlite3_column_type (stmt_in, 3) == SQLITE_BLOB)
		    sqlite3_bind_blob (stmt_out, 4,
				       sqlite3_column_blob (stmt_in, 3),
				       sqlite3_column_bytes (stmt_in, 3),
				       SQLITE_STATIC);
		else
		    goto invalid_value;
		/* inserting into the output table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      spatialite_e ("INSERT INTO \"link\" step error: \"%s\"",
				    sqlite3_errmsg (net_out->db_handle));
		      goto error;
		  }
	    }
	  else
	    {
		spatialite_e ("SELECT FROM \"link\" step error: %s",
			      sqlite3_errmsg (net_out->db_handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  invalid_value:
    spatialite_e ("SELECT FROM \"link\": found an invalid value");

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static int
do_clone_network (const char *db_prefix, const char *in_network,
		  GaiaNetworkAccessorPtr accessor)
{
/* cloning a full Network */
    struct gaia_network *net_out = (struct gaia_network *) accessor;

/* cloning NODE */
    if (!do_clone_netnode (db_prefix, in_network, net_out))
	return 0;

/* cloning LINK */
    if (!do_clone_link (db_prefix, in_network, net_out))
	return 0;

    return 1;
}

static char *
gaiaGetAttachedNetwork (sqlite3 * handle, const char *db_prefix,
			const char *network_name, int *spatial, int *srid,
			int *has_z, int *allow_coincident)
{
/* attempting to retrieve the Input Network for TopoNet_Clone */
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int ok = 0;
    char *xprefix;
    char *xnetwork_name = NULL;
    int xspatial;
    int xsrid;
    int xhas_z;
    int xallow_coincident;

/* preparing the SQL query */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT network_name, spatial, srid, has_z, allow_coincident "
	 "FROM \"%s\".networks WHERE Lower(network_name) = Lower(%Q)", xprefix,
	 network_name);
    free (xprefix);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM networks error: \"%s\"\n",
			sqlite3_errmsg (handle));
	  return NULL;
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_name = 0;
		int ok_srid = 0;
		int ok_z = 0;
		int ok_spatial = 0;
		int ok_allow_coincident = 0;
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *str =
			  (const char *) sqlite3_column_text (stmt, 0);
		      if (xnetwork_name != NULL)
			  free (xnetwork_name);
		      xnetwork_name = malloc (strlen (str) + 1);
		      strcpy (xnetwork_name, str);
		      ok_name = 1;
		  }
		if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
		  {
		      xspatial = sqlite3_column_int (stmt, 1);
		      ok_spatial = 1;
		  }
		if (sqlite3_column_type (stmt, 2) == SQLITE_INTEGER)
		  {
		      xsrid = sqlite3_column_int (stmt, 2);
		      ok_srid = 1;
		  }
		if (sqlite3_column_type (stmt, 3) == SQLITE_INTEGER)
		  {
		      xhas_z = sqlite3_column_int (stmt, 3);
		      ok_z = 1;
		  }
		if (sqlite3_column_type (stmt, 4) == SQLITE_INTEGER)
		  {
		      xallow_coincident = sqlite3_column_int (stmt, 4);
		      ok_allow_coincident = 1;
		  }
		if (ok_name && ok_spatial && ok_srid && ok_z
		    && ok_allow_coincident)
		  {
		      ok = 1;
		      break;
		  }
	    }
	  else
	    {
		spatialite_e
		    ("step: SELECT FROM networks error: \"%s\"\n",
		     sqlite3_errmsg (handle));
		sqlite3_finalize (stmt);
		return NULL;
	    }
      }
    sqlite3_finalize (stmt);

    if (ok)
      {
	  *spatial = xspatial;
	  *srid = xsrid;
	  *has_z = xhas_z;
	  *allow_coincident = xallow_coincident;
	  return xnetwork_name;
      }

    if (xnetwork_name != NULL)
	free (xnetwork_name);
    return NULL;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_Clone (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoNet_Clone ( text db-prefix, text in-network-name, text out-network-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *db_prefix = "MAIN";
    const char *in_network_name;
    const char *out_network_name;
    char *input_network_name = NULL;
    int spatial;
    int srid;
    int has_z;
    int allow_coincident;
    GaiaNetworkAccessorPtr accessor;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	in_network_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	out_network_name = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;

/* checking the origin Network */
    input_network_name =
	gaiaGetAttachedNetwork (sqlite, db_prefix, in_network_name, &spatial,
				&srid, &has_z, &allow_coincident);
    if (input_network_name == NULL)
	goto no_net;

/* attempting to create the destination Network */
    start_net_savepoint (sqlite, cache);
    ret =
	gaiaNetworkCreate (sqlite, out_network_name, spatial, srid,
			   has_z, allow_coincident);
    if (!ret)
      {
	  rollback_net_savepoint (sqlite, cache);
	  goto no_net2;
      }

/* attempting to get a Network Accessor (destination) */
    accessor = gaiaGetNetwork (sqlite, cache, out_network_name);
    if (accessor == NULL)
      {
	  rollback_net_savepoint (sqlite, cache);
	  goto no_net2;
      }

/* cloning Network */
    ret = do_clone_network (db_prefix, input_network_name, accessor);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  sqlite3_result_error (context, "Clone Network failure", -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    free (input_network_name);
    return;

  no_net:
    if (input_network_name != NULL)
	free (input_network_name);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name (origin).",
			  -1);
    return;

  no_net2:
    if (input_network_name != NULL)
	free (input_network_name);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name (destination).",
			  -1);
    return;

  null_arg:
    if (input_network_name != NULL)
	free (input_network_name);
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    if (input_network_name != NULL)
	free (input_network_name);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_GetLinkSeed (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoNet_GetLinkSeed ( text network-name, int link_id )
/
/ returns: a Point (seed) identifying the Link
/ raises an exception on failure
*/
    const char *network_name;
    sqlite3_int64 link_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom;
    GaiaNetworkAccessorPtr accessor;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    struct gaia_network *net;
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	link_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

    gaianet_reset_last_error_msg (accessor);
    geom = gaiaGetLinkSeed (accessor, link_id);
    if (geom == NULL)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  if (msg != NULL)
	    {
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode, tiny_point);
    gaiaFreeGeomColl (geom);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  logical_err:
    sqlite3_result_error (context,
			  "TopoNet_GetLinkSeed() cannot be applied to Logical Network.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_UpdateSeeds (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoNet_UpdateSeeds ( text network-name )
/ TopoNet_UpdateSeeds ( text network-name, int incremental_mode )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *network_name;
    int incremental_mode = 1;
    int ret;
    GaiaNetworkAccessorPtr accessor;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    struct gaia_network *net;
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (argc >= 2)
      {
	  if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	      incremental_mode = sqlite3_value_int (argv[1]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    ret = gaiaTopoNetUpdateSeeds (accessor, incremental_mode);
    if (!ret)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  if (msg != NULL)
	    {
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  logical_err:
    sqlite3_result_error (context,
			  "TopoNet_UpdateSeeds() cannot be applied to Logical Network.",
			  -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_DisambiguateSegmentLinks (const void *xcontext, int argc,
					  const void *xargv)
{
/* SQL function:
/ TopoNet_DisambiguateSegmentLinks ( text network-name )
/
/ returns: the total number of changed Links.
/ raises an exception on failure
*/
    const char *network_name;
    int changed_links = 0;
    GaiaNetworkAccessorPtr accessor;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    struct gaia_network *net;
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    net = (struct gaia_network *) accessor;
    if (net->spatial == 0)
	goto logical_err;

    gaianet_reset_last_error_msg (accessor);
    start_net_savepoint (sqlite, cache);
    changed_links = gaiaTopoNet_DisambiguateSegmentLinks (accessor);
    if (changed_links < 0)
	rollback_net_savepoint (sqlite, cache);
    else
	release_net_savepoint (sqlite, cache);
    if (changed_links < 0)
      {
	  const char *msg = lwn_GetErrorMsg (net->lwn_iface);
	  if (msg != NULL)
	    {
		gaianet_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    sqlite3_result_int (context, changed_links);
    return;

  no_net:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid network name.",
			  -1);
    return;

  null_arg:
    sqlite3_result_error (context, "SQL/MM Spatial exception - null argument.",
			  -1);
    return;

  invalid_arg:
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid argument.", -1);
    return;

  logical_err:
    sqlite3_result_error (context,
			  "TopoNet_UpdateSeeds() cannot be applied to Logical Network.",
			  -1);
    return;
}

static int
check_matching_srid (GaiaNetworkAccessorPtr accessor, int srid)
{
/* checking for matching SRID */
    struct gaia_network *network = (struct gaia_network *) accessor;
    if (network->srid != srid)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoNet_LineLinksList (const void *xcontext, int argc,
			       const void *xargv)
{
/* SQL function:
/ TopoNet_LineLinksList ( text network-name, text db-prefix, text ref_table,
/                         text ref_column, text out_table )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *network_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int family;
    GaiaNetworkAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	network_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;

/* attempting to get a Network Accessor */
    accessor = gaiaGetNetwork (sqlite, cache, network_name);
    if (accessor == NULL)
	goto no_net;
    gaianet_reset_last_error_msg (accessor);

/* checking the reference GeoTable */
    if (!gaia_check_reference_geo_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &family))
	goto no_reference;
    if (!check_matching_srid (accessor, srid))
	goto invalid_geom;
    if (family != GAIA_TYPE_LINESTRING)
	goto not_linestring;

/* checking the output Table */
    if (!gaia_check_output_table (sqlite, out_table))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoNet_LineLinksList (accessor, db_prefix, xreftable, xrefcolumn,
				   out_table);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaianet_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_net:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid network name.";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_LineLinksList: invalid reference GeoTable.";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoNet_LineLinksList: output GeoTable already exists.";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  not_linestring:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (not of the [MULTI]LINESTRING type).";
    gaianet_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_topology.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
/*

 gaia_topology.c -- implementation of Topology SQL functions
    
 version 4.3, 2015 July 15

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(Topology support) 

CIG: 6038019AE5

UPDATE: supporting the new RTTOTPO 1.1 API was funded by Regione Toscana
CIG: 644544015A Linea A

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_topology.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>

#include "topology_private.h"

#ifdef _WIN32
#define strcasecmp	_stricmp
#endif /* not WIN32 */

#define GAIA_UNUSED() if (argc || argv) argc = argc;

struct pk_item
{
/* an helper struct for a primary key column */
    char *name;
    char *type;
    int notnull;
    int pk;
    struct pk_item *next;
};

struct pk_struct
{
/* an helper struct for cloning dustbin primary keys */
    struct pk_item *first;
    struct pk_item *last;
    int count;
};

static struct pk_struct *
create_pk_dictionary (void)
{
/* creating an empty PK dictionary */
    struct pk_struct *pk = malloc (sizeof (struct pk_struct));
    pk->first = NULL;
    pk->last = NULL;
    pk->count = 0;
    return pk;
}

static void
free_pk_dictionary (struct pk_struct *pk)
{
/* memory cleanup - freeing a PK dictionary */
    struct pk_item *pI;
    struct pk_item *pIn;
    if (pk == NULL)
	return;
    pI = pk->first;
    while (pI != NULL)
      {
	  pIn = pI->next;
	  if (pI->name != NULL)
	      free (pI->name);
	  if (pI->type != NULL)
	      free (pI->type);
	  free (pI);
	  pI = pIn;
      }
    free (pk);
}

static void
add_pk_column (struct pk_struct *pk, const char *name, const char *type,
	       int notnull, int pk_pos)
{
/* adding a PK column into a dictionary */
    int len;
    struct pk_item *pI;
    if (pk == NULL)
	return;
    if (name == NULL || type == NULL)
	return;
    pI = malloc (sizeof (struct pk_item));
    len = strlen (name);
    pI->name = malloc (len + 1);
    strcpy (pI->name, name);
    len = strlen (type);
    pI->type = malloc (len + 1);
    strcpy (pI->type, type);
    pI->notnull = notnull;
    pI->pk = pk_pos;
    pI->next = NULL;
/* inserting into the PK dictionary linked list */
    if (pk->first == NULL)
	pk->first = pI;
    if (pk->last != NULL)
	pk->last->next = pI;
    pk->last = pI;
    pk->count += 1;
}

static struct splite_savepoint *
push_topo_savepoint (struct splite_internal_cache *cache)
{
/* adding a new SavePoint to the Topology stack */
    struct splite_savepoint *p_svpt = malloc (sizeof (struct splite_savepoint));
    p_svpt->savepoint_name = NULL;
    p_svpt->prev = cache->last_topo_svpt;
    p_svpt->next = NULL;
    if (cache->first_topo_svpt == NULL)
	cache->first_topo_svpt = p_svpt;
    if (cache->last_topo_svpt != NULL)
	cache->last_topo_svpt->next = p_svpt;
    cache->last_topo_svpt = p_svpt;
    return p_svpt;
}

static void
pop_topo_savepoint (struct splite_internal_cache *cache)
{
/* removing a SavePoint from the Topology stack */
    struct splite_savepoint *p_svpt = cache->last_topo_svpt;
    if (p_svpt->prev != NULL)
	p_svpt->prev->next = NULL;
    cache->last_topo_svpt = p_svpt->prev;
    if (cache->first_topo_svpt == p_svpt)
	cache->first_topo_svpt = NULL;
    if (p_svpt->savepoint_name != NULL)
	sqlite3_free (p_svpt->savepoint_name);
    free (p_svpt);
}

SPATIALITE_PRIVATE void
start_topo_savepoint (const void *handle, const void *data)
{
/* starting a new SAVEPOINT */
    char *sql;
    int ret;
    char *err_msg;
    struct splite_savepoint *p_svpt;
    sqlite3 *sqlite = (sqlite3 *) handle;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) data;
    if (sqlite == NULL || cache == NULL)
	return;

/* creating an unique SavePoint name */
    p_svpt = push_topo_savepoint (cache);
    p_svpt->savepoint_name =
	sqlite3_mprintf ("toposvpt%04x", cache->next_topo_savepoint);
    if (cache->next_topo_savepoint >= 0xffffffffu)
	cache->next_topo_savepoint = 0;
    else
	cache->next_topo_savepoint += 1;

/* starting a SavePoint */
    sql = sqlite3_mprintf ("SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
}

SPATIALITE_PRIVATE void
release_topo_savepoint (const void *handle, const void *data)
{
/* releasing the current SAVEPOINT (if any) */
    char *sql;
    int ret;
    char *err_msg;
    struct splite_savepoint *p_svpt;
    sqlite3 *sqlite = (sqlite3 *) handle;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) data;
    if (sqlite == NULL || cache == NULL)
	return;
    p_svpt = cache->last_topo_svpt;
    if (p_svpt == NULL)
	return;
    if (p_svpt->savepoint_name == NULL)
	return;

/* releasing the current SavePoint */
    sql = sqlite3_mprintf ("RELEASE SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
    pop_topo_savepoint (cache);
}

SPATIALITE_PRIVATE void
rollback_topo_savepoint (const void *handle, const void *data)
{
/* rolling back the current SAVEPOINT (if any) */
    char *sql;
    int ret;
    char *err_msg;
    struct splite_savepoint *p_svpt;
    sqlite3 *sqlite = (sqlite3 *) handle;
    struct splite_internal_cache *cache = (struct splite_internal_cache *) data;
    if (sqlite == NULL || cache == NULL)
	return;
    p_svpt = cache->last_topo_svpt;
    if (p_svpt == NULL)
	return;
    if (p_svpt->savepoint_name == NULL)
	return;

/* rolling back the current SavePoint */
    sql = sqlite3_mprintf ("ROLLBACK TO SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
/* releasing the current SavePoint */
    sql = sqlite3_mprintf ("RELEASE SAVEPOINT %s", p_svpt->savepoint_name);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("%s - error: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
      }
    sqlite3_free (sql);
    pop_topo_savepoint (cache);
}

SPATIALITE_PRIVATE void
fnctaux_GetLastTopologyException (const void *xcontext, int argc,
				  const void *xargv)
{
/* SQL function:
/ GetLastTopologyException  ( text topology-name )
/
/ returns: the more recent exception raised by given Topology
/ NULL on invalid args (or when there is no pending exception)
*/
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
      {
	  sqlite3_result_null (context);
	  return;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
      {
	  sqlite3_result_null (context);
	  return;
      }

    sqlite3_result_text (context, gaiatopo_get_last_exception (accessor), -1,
			 SQLITE_STATIC);
}

SPATIALITE_PRIVATE void
fnctaux_CreateTopoTables (const void *xcontext, int argc, const void *argv)
{
/* SQL function:
/ CreateTopoTables()
/
/ creates both TOPOLOGIES and NETWORKS tables
/ returns 1 on success
/ 0 on failure, -1 on invalid arguments
*/
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    int topogeo;
    int toponet;
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */

    topogeo = do_create_topologies (sqlite);
    toponet = do_create_networks (sqlite);
    if (topogeo || toponet)
	sqlite3_result_int (context, 1);
    else
	sqlite3_result_int (context, 0);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_CreateTopology (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_InitTopoGeo ( text topology-name )
/ CreateTopology ( text topology-name )
/ CreateTopology ( text topology-name, int srid )
/ CreateTopology ( text topology-name, int srid, bool hasZ )
/ CreateTopology ( text topology-name, int srid, bool hasZ,
/                  double tolerance )
/
/ returns: 1 on success, 0 on failure
/ -1 on invalid args
/ excèption on NEGATIVE tolerance
*/
    const char *msg;
    int ret;
    const char *topo_name;
    int srid = -1;
    int has_z = 0;
    double tolerance = 0.0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
      {
	  sqlite3_result_int (context, -1);
	  return;
      }
    if (argc >= 2)
      {
	  if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	      srid = sqlite3_value_int (argv[1]);
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	      has_z = sqlite3_value_int (argv[2]);
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }
    if (argc >= 4)
      {
	  if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[3]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[3]);
	  else if (sqlite3_value_type (argv[3]) == SQLITE_INTEGER)
	    {
		int tol = sqlite3_value_int (argv[3]);
		tolerance = tol;
	    }
	  else
	    {
		sqlite3_result_int (context, -1);
		return;
	    }
      }

/* raising an exception on NEGATIVE tolerance */
    if (tolerance < 0.0)
	goto negative_tolerance;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopologyCreate (sqlite, topo_name, srid, tolerance, has_z);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    sqlite3_result_int (context, ret);
    return;

  negative_tolerance:
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_DropTopology (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ DropTopology ( text topology-name )
/
/ returns: 1 on success, 0 on failure
/ -1 on invalid args
*/
    int ret;
    const char *topo_name;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GaiaTopologyAccessorPtr accessor;
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
      {
	  sqlite3_result_int (context, -1);
	  return;
      }

    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor != NULL)
	gaiaTopologyDestroy (accessor);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopologyDrop (sqlite, topo_name);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    sqlite3_result_int (context, ret);
}

static int
check_matching_srid_dims (GaiaTopologyAccessorPtr accessor, int srid, int dims)
{
/* checking for matching SRID and DIMs */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo->srid != srid)
	return 0;
    if (topo->has_z)
      {
	  if (dims == GAIA_XY_Z || dims == GAIA_XY_Z_M)
	      ;
	  else
	      return 0;
      }
    else
      {
	  if (dims == GAIA_XY_Z || dims == GAIA_XY_Z_M)
	      return 0;
      }
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_AddIsoNode (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_AddIsoNode ( text topology-name, int face_id, Geometry point )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 face_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	face_id = -1;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
      {
	  face_id = sqlite3_value_int64 (argv[1]);
	  if (face_id <= 0)
	      face_id = -1;
      }
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;
    pt = point->FirstPoint;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaAddIsoNode (accessor, face_id, pt, 0);
    if (ret <= 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret <= 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_MoveIsoNode (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_MoveIsoNode ( text topology-name, int node_id, Geometry point )
/
/ returns: TEXT (description of new location)
/ raises an exception on failure
*/
    const char *msg;
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *topo_name;
    sqlite3_int64 node_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;
    pt = point->FirstPoint;
    sprintf (xid, "%lld", node_id);
    newpos =
	sqlite3_mprintf ("Isolated Node %s moved to location %f,%f", xid, pt->X,
			 pt->Y);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaMoveIsoNode (accessor, node_id, pt);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_topo:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_RemIsoNode (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_RemIsoNode ( text topology-name, int node_id )
/
/ returns: TEXT (description of operation)
/ raises an exception on failure
*/
    const char *msg;
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *topo_name;
    sqlite3_int64 node_id;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    sprintf (xid, "%lld", node_id);
    newpos = sqlite3_mprintf ("Isolated Node %s removed", xid);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaRemIsoNode (accessor, node_id);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_topo:
    if (newpos != NULL)
	sqlite3_free (newpos);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_AddIsoEdge (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_AddIsoEdge ( text topology-name, int start_node_id, int end_node_id, Geometry linestring )
/
/ returns: the ID of the inserted Edge on success, 0 on failure
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    sqlite3_int64 start_node_id;
    sqlite3_int64 end_node_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr line = NULL;
    gaiaLinestringPtr ln;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	start_node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	end_node_id = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[3]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[3]);
	  n_bytes = sqlite3_value_bytes (argv[3]);
      }
    else
	goto invalid_arg;

/* attempting to get a Linestring Geometry */
    line =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!line)
	goto invalid_arg;
    if (line->FirstPoint != NULL)
	invalid = 1;
    if (line->FirstPolygon != NULL)
	invalid = 1;
    if (line->FirstLinestring != line->LastLinestring
	|| line->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims (accessor, line->Srid, line->DimensionModel))
	goto invalid_geom;
    ln = line->FirstLinestring;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaAddIsoEdge (accessor, start_node_id, end_node_id, ln);
    if (ret <= 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (line);
    line = NULL;
    if (ret <= 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    sqlite3_result_error (context,
			  "SQL/MM Spatial exception - invalid topology name.",
			  -1);
    return;

  null_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_RemIsoEdge (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_RemIsoEdge ( text topology-name, int edfe_id )
/
/ returns: TEXT (description of operation)
/ raises an exception on failure
*/
    const char *msg;
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *topo_name;
    sqlite3_int64 edge_id;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    sprintf (xid, "%lld", edge_id);
    newpos = sqlite3_mprintf ("Isolated Edge %s removed", xid);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaRemIsoEdge (accessor, edge_id);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_topo:
    if (newpos != NULL)
	sqlite3_free (newpos);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_RemEdgeModFace (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_RemEdgeModFace ( text topology-name, int edge_id )
/
/ returns: ID of the Face that takes up the space previously occupied by the removed edge
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 edge_id;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaRemEdgeModFace (accessor, edge_id);
    if (ret < 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_RemEdgeNewFace (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_RemEdgeNewFace ( text topology-name, int edge_id )
/
/ returns: ID of the created Face 
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 edge_id;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaRemEdgeNewFace (accessor, edge_id);
    if (ret < 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ChangeEdgeGeom (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ChangeEdgeGeom ( text topology-name, int edge_id, Geometry linestring )
/
/ returns: TEXT (description of operation)
/ raises an exception on failure
*/
    const char *msg;
    char xid[80];
    char *newpos = NULL;
    int ret;
    const char *topo_name;
    sqlite3_int64 edge_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr line = NULL;
    gaiaLinestringPtr ln;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Linestring Geometry */
    line =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!line)
	goto invalid_arg;
    if (line->FirstPoint != NULL)
	invalid = 1;
    if (line->FirstPolygon != NULL)
	invalid = 1;
    if (line->FirstLinestring != line->LastLinestring
	|| line->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims (accessor, line->Srid, line->DimensionModel))
	goto invalid_geom;
    ln = line->FirstLinestring;
    sprintf (xid, "%lld", edge_id);
    newpos = sqlite3_mprintf ("Edge %s changed", xid);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaChangeEdgeGeom (accessor, edge_id, ln);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (line);
    line = NULL;
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  if (newpos != NULL)
	      sqlite3_free (newpos);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_text (context, newpos, strlen (newpos), sqlite3_free);
    return;

  no_topo:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (newpos != NULL)
	sqlite3_free (newpos);
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ModEdgeSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ModEdgeSplit ( text topology-name, int edge_id, Geometry point )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 edge_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;
    pt = point->FirstPoint;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaModEdgeSplit (accessor, edge_id, pt, 0);
    if (ret <= 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret <= 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_NewEdgesSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_NewEdgesSplit ( text topology-name, int edge_id, Geometry point )
/
/ returns: the ID of the inserted Node on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 edge_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[2]);
	  n_bytes = sqlite3_value_bytes (argv[2]);
      }
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
      {
	  goto invalid_arg;
	  return;
      }
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;
    pt = point->FirstPoint;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaNewEdgesSplit (accessor, edge_id, pt, 0);
    if (ret <= 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret <= 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_AddEdgeModFace (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_AddEdgeModFace ( text topology-name, int start_node_id, int end_node_id, Geometry linestring )
/
/ returns: the ID of the inserted Edge on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 start_node_id;
    sqlite3_int64 end_node_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr line = NULL;
    gaiaLinestringPtr ln;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	start_node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	end_node_id = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[3]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[3]);
	  n_bytes = sqlite3_value_bytes (argv[3]);
      }
    else
	goto invalid_arg;

/* attempting to get a Linestring Geometry */
    line =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!line)
	goto invalid_arg;
    if (line->FirstPoint != NULL)
	invalid = 1;
    if (line->FirstPolygon != NULL)
	invalid = 1;
    if (line->FirstLinestring != line->LastLinestring
	|| line->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims (accessor, line->Srid, line->DimensionModel))
	goto invalid_geom;
    ln = line->FirstLinestring;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaAddEdgeModFace (accessor, start_node_id, end_node_id, ln, 0);
    if (ret <= 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (line);
    line = NULL;
    if (ret <= 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_AddEdgeNewFaces (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_AddEdgeNewFaces ( text topology-name, int start_node_id, int end_node_id, Geometry linestring )
/
/ returns: the ID of the inserted Edge on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 start_node_id;
    sqlite3_int64 end_node_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr line = NULL;
    gaiaLinestringPtr ln;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	start_node_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	end_node_id = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[3]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[3]);
	  n_bytes = sqlite3_value_bytes (argv[3]);
      }
    else
	goto invalid_arg;

/* attempting to get a Linestring Geometry */
    line =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!line)
	goto invalid_arg;
    if (line->FirstPoint != NULL)
	invalid = 1;
    if (line->FirstPolygon != NULL)
	invalid = 1;
    if (line->FirstLinestring != line->LastLinestring
	|| line->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims (accessor, line->Srid, line->DimensionModel))
	goto invalid_geom;
    ln = line->FirstLinestring;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaAddEdgeNewFaces (accessor, start_node_id, end_node_id, ln, 0);
    if (ret <= 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (line);
    line = NULL;
    if (ret <= 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (line != NULL)
	gaiaFreeGeomColl (line);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_ModEdgeHeal (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ModEdgeHeal ( text topology-name, int edge_id1, int edge_id2 )
/
/ returns: ID of the removed Node
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 edge_id1;
    sqlite3_int64 edge_id2;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id1 = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	edge_id2 = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaModEdgeHeal (accessor, edge_id1, edge_id2);
    if (ret < 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_NewEdgeHeal (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_NewEdgeHeal ( text topology-name, int edge_id1, int edge_id2 )
/
/ returns: ID of the removed Node
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    sqlite3_int64 edge_id1;
    sqlite3_int64 edge_id2;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id1 = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	edge_id2 = sqlite3_value_int64 (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaNewEdgeHeal (accessor, edge_id1, edge_id2);
    if (ret < 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetFaceGeometry (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_GetFaceGeometry ( text topology-name, int face_id )
/
/ returns: the Face's geometry (Polygon)
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    sqlite3_int64 face_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	face_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    geom = gaiaGetFaceGeometry (accessor, face_id);
    if (geom == NULL)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  if (msg != NULL)
	    {
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode, tiny_point);
    gaiaFreeGeomColl (geom);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetFaceEdges (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_GetFaceEdges ( text topology-name, int face_id )
/
/ create/update a table containing an ordered list of EdgeIDs
/
/ returns NULL on success
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    sqlite3_int64 face_id;
    int ret;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	face_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    start_topo_savepoint (sqlite, cache);
    ret = gaiaGetFaceEdges (accessor, face_id);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
check_empty_topology (struct gaia_topology *topo)
{
/* checking for an empty Topology */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int already_populated = 0;

/* testing NODE */
    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      already_populated = 1;
      }
    sqlite3_free_table (results);
    if (already_populated)
	return 0;

/* testing EDGE */
    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      already_populated = 1;
      }
    sqlite3_free_table (results);
    if (already_populated)
	return 0;

/* testing FACE */
    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\" WHERE face_id <> 0",
			 xtable);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      already_populated = 1;
      }
    sqlite3_free_table (results);
    if (already_populated)
	return 0;

    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_ValidateTopoGeo (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_ValidateTopoGeo ( text topology-name )
/
/ create/update a table containing an validation report for a given TopoGeo
/
/ returns NULL on success
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    int ret;
    GaiaTopologyAccessorPtr accessor = NULL;
    struct gaia_topology *topo;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    topo = (struct gaia_topology *) accessor;
    if (check_empty_topology (topo))
	goto empty;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaValidateTopoGeo (accessor);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  empty:
    msg = "SQL/MM Spatial exception - empty topology.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_CreateTopoGeo (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ ST_CreateTopoGeo ( text topology-name , blob geom-collection )
/
/ creates and populates an empty Topology by importing a Geometry-collection
/
/ returns NULL on success
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    int ret;
    const unsigned char *blob;
    int blob_sz;
    gaiaGeomCollPtr geom = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    struct gaia_topology *topo;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  blob = sqlite3_value_blob (argv[1]);
	  blob_sz = sqlite3_value_bytes (argv[1]);
	  geom =
	      gaiaFromSpatiaLiteBlobWkbEx (blob, blob_sz, gpkg_mode,
					   gpkg_amphibious);
      }
    else
	goto invalid_arg;
    if (geom == NULL)
	goto not_geom;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    topo = (struct gaia_topology *) accessor;
    if (!check_empty_topology (topo))
	goto not_empty;
    if (!check_matching_srid_dims (accessor, geom->Srid, geom->DimensionModel))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);
    ret =
	auxtopo_insert_into_topology (accessor, geom, 0.0, -1, -1,
				      GAIA_MODE_TOPO_FACE, NULL);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    gaiaFreeGeomColl (geom);
    return;

  no_topo:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  not_empty:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - non-empty topology.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  not_geom:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - not a Geometry.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg =
	"SQL/MM Spatial exception - invalid Geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetNodeByPoint (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ GetNodeByPoint ( text topology-name, Geometry point )
/ GetNodeByPoint ( text topology-name, Geometry point, double tolerance )
/
/ returns: the ID of some Node on success, 0 if no Node was found
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    double tolerance = -1;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    pt = point->FirstPoint;

    ret = gaiaGetNodeByPoint (accessor, pt, tolerance);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetEdgeByPoint (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ GetEdgeByPoint ( text topology-name, Geometry point )
/ GetEdgeByPoint ( text topology-name, Geometry point, double tolerance )
/
/ returns: the ID of some Edge on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    double tolerance = -1;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    pt = point->FirstPoint;

    ret = gaiaGetEdgeByPoint (accessor, pt, tolerance);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_GetFaceByPoint (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ GetFaceByPoint ( text topology-name, Geometry point )
/ GetFaceByPoint ( text topology-name, Geometry point, double tolerance )
/
/ returns: the ID of some Face on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 ret;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    double tolerance = -1;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint != point->LastPoint || point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    pt = point->FirstPoint;

    ret = gaiaGetFaceByPoint (accessor, pt, tolerance);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (ret < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int64 (context, ret);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_AddPoint (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_AddPoint ( text topology-name, Geometry (multi)point )
/ TopoGeo_AddPoint ( text topology-name, Geometry (multi)point, double tolerance )
/
/ returns: a comma separated list of all IDs of corresponding Nodes on success
/ raises an exception on failure
*/
    const char *msg;
    sqlite3_int64 node_id;
    char xnode_id[64];
    char *retlist = NULL;
    char *savelist;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr point = NULL;
    gaiaPointPtr pt;
    double tolerance = -1;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Point Geometry */
    point =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!point)
	goto invalid_arg;
    if (point->FirstLinestring != NULL)
	invalid = 1;
    if (point->FirstPolygon != NULL)
	invalid = 1;
    if (point->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims
	(accessor, point->Srid, point->DimensionModel))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);
    pt = point->FirstPoint;
    while (pt != NULL)
      {
	  /* looping on elementary Points */
	  node_id = gaiaTopoGeo_AddPoint (accessor, pt, tolerance);
	  if (node_id < 0)
	      break;
	  sprintf (xnode_id, "%lld", node_id);
	  if (retlist == NULL)
	      retlist = sqlite3_mprintf ("%s", xnode_id);
	  else
	    {
		savelist = retlist;
		retlist = sqlite3_mprintf ("%s, %s", savelist, xnode_id);
		sqlite3_free (savelist);
	    }
	  pt = pt->Next;
      }

    if (node_id < 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (point);
    point = NULL;
    if (node_id < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  if (retlist != NULL)
	      sqlite3_free (retlist);
	  return;
      }
    sqlite3_result_text (context, retlist, strlen (retlist), sqlite3_free);
    return;

  no_topo:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (point != NULL)
	gaiaFreeGeomColl (point);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_AddLineString (const void *xcontext, int argc,
			       const void *xargv)
{
/* SQL function:
/ TopoGeo_AddLineString ( text topology-name, Geometry (multi)linestring )
/ TopoGeo_AddLineString ( text topology-name, Geometry (multi)linestring, double tolerance )
/
/ returns: a comma separated list of all IDs of corresponding Edges on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    char xedge_id[64];
    sqlite3_int64 *edge_ids = NULL;
    int ids_count = 0;
    char *retlist = NULL;
    char *savelist;
    int i;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr linestring = NULL;
    gaiaLinestringPtr ln;
    double tolerance = -1;
    int invalid = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Linestring Geometry */
    linestring =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!linestring)
	goto invalid_arg;
    if (linestring->FirstPoint != NULL)
	invalid = 1;
    if (linestring->FirstPolygon != NULL)
	invalid = 1;
    if (linestring->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims
	(accessor, linestring->Srid, linestring->DimensionModel))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);
    ln = linestring->FirstLinestring;
    while (ln != NULL)
      {
	  /* looping on individual Linestrings */
	  ret =
	      gaiaTopoGeo_AddLineString (accessor, ln, tolerance, &edge_ids,
					 &ids_count);
	  if (!ret)
	      break;
	  for (i = 0; i < ids_count; i++)
	    {
		sprintf (xedge_id, "%lld", edge_ids[i]);
		if (retlist == NULL)
		    retlist = sqlite3_mprintf ("%s", xedge_id);
		else
		  {
		      savelist = retlist;
		      retlist = sqlite3_mprintf ("%s, %s", savelist, xedge_id);
		      sqlite3_free (savelist);
		  }
	    }
	  free (edge_ids);
	  ln = ln->Next;
      }

    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (linestring);
    linestring = NULL;
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  sqlite3_free (retlist);
	  return;
      }
    sqlite3_result_text (context, retlist, strlen (retlist), sqlite3_free);
    return;

  no_topo:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
kill_all_existing_faces (sqlite3 * sqlite, char *toponame)
{
/* to be executed before invoking any NO FACE function */
    char *sql;
    char *table;
    char *xtable;
    int ret;
    char *errMsg = NULL;

/* invalidating all relationships between Edges and Faces */
    table = sqlite3_mprintf ("%s_edge", toponame);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("UPDATE \"%s\" SET left_face = NULL, right_face = NULL "
	 "WHERE left_face IS NOT NULL OR right_face IS NOT NULL", xtable);
    free (xtable);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("NoFace invalidate Edge/Face: %s\n", errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }

/* invalidating all relationships between Nodes and Faces */
    table = sqlite3_mprintf ("%s_node", toponame);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("UPDATE \"%s\" SET containing_face = NULL "
	 "WHERE containing_face IS NOT NULL", xtable);
    free (xtable);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("NoFace invalidate Node/Face: %s\n", errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }

/* removing all Faces except the Universe */
    table = sqlite3_mprintf ("%s_face", toponame);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM \"%s\" WHERE face_id <> 0", xtable);
    free (xtable);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("cazzo NoFace remove Faces: %s\n", errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_AddLineStringNoFace (const void *xcontext, int argc,
				     const void *xargv)
{
/* SQL function:
/ TopoGeo_AddLineStringNoFace ( text topology-name, Geometry (multi)linestring )
/ TopoGeo_AddLineStringNoFace ( text topology-name, Geometry (multi)linestring, 
/                               double tolerance )
/
/ returns: a comma separated list of all IDs of corresponding Edges on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    char xedge_id[64];
    sqlite3_int64 *edge_ids = NULL;
    int ids_count = 0;
    char *retlist = NULL;
    char *savelist;
    int i;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr linestring = NULL;
    gaiaLinestringPtr ln;
    double tolerance = -1;
    int invalid = 0;
    struct gaia_topology *topo;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Linestring Geometry */
    linestring =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!linestring)
	goto invalid_arg;
    if (linestring->FirstPoint != NULL)
	invalid = 1;
    if (linestring->FirstPolygon != NULL)
	invalid = 1;
    if (linestring->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    topo = (struct gaia_topology *) accessor;
    if (!check_matching_srid_dims
	(accessor, linestring->Srid, linestring->DimensionModel))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);

/* removing any existing Face except the Universal one */
    if (kill_all_existing_faces (sqlite, topo->topology_name) == 0)
      {
	  msg = "TopoGeo_AddLineStringNoFace: unable to remove existing Faces";
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }

    ln = linestring->FirstLinestring;
    while (ln != NULL)
      {
	  /* looping on individual Linestrings */
	  ret =
	      gaiaTopoGeo_AddLineStringNoFace (accessor, ln, tolerance,
					       &edge_ids, &ids_count);
	  if (!ret)
	      break;
	  for (i = 0; i < ids_count; i++)
	    {
		sprintf (xedge_id, "%lld", edge_ids[i]);
		if (retlist == NULL)
		    retlist = sqlite3_mprintf ("%s", xedge_id);
		else
		  {
		      savelist = retlist;
		      retlist = sqlite3_mprintf ("%s, %s", savelist, xedge_id);
		      sqlite3_free (savelist);
		  }
	    }
	  free (edge_ids);
	  ln = ln->Next;
      }

    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    gaiaFreeGeomColl (linestring);
    linestring = NULL;
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  sqlite3_free (retlist);
	  return;
      }
    sqlite3_result_text (context, retlist, strlen (retlist), sqlite3_free);
    return;

  no_topo:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg =
	"SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (linestring != NULL)
	gaiaFreeGeomColl (linestring);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_Polygonize (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_Polygonize ( text topology-name )
/
/ TopoGeo_Polygonize ( text topology-name , int force-rebuild )
*/
    int edgesCount = 0;
    const char *msg;
    int ret;
    const char *topo_name;
    int force_rebuild = 0;
    struct gaia_topology *topo;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (argc >= 2)
      {
	  if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	      force_rebuild = sqlite3_value_int (argv[1]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    topo = (struct gaia_topology *) accessor;

/* testing if there are unreferenced Edges */
    edgesCount = test_inconsistent_topology (accessor);
    if (edgesCount < 0)
      {
	  msg = "TopoGeo_Polygonize: unable to check Topology consistency";
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    if (!edgesCount)
      {
	  if (!force_rebuild)
	    {
		sqlite3_result_null (context);
		return;
	    }
      }

    start_topo_savepoint (sqlite, cache);

/* removing any existing Face except the Universal one */
    if (kill_all_existing_faces (sqlite, topo->topology_name) == 0)
      {
	  msg = "TopoGeo_Polygonize: unable to remove existing Faces";
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }

    ret = gaiaTopoGeo_Polygonize (accessor);

    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_null (context);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_TopoSnap (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_TopoSnap ( text topology-name, Geometry geom, int iterate )
/ TopoGeo_TopoSnap ( text topology-name, Geometry geom, double tolerance_snap,
/                    double tolerance_removal, int iterate )
/
/ returns: the snapped Geometry
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom = NULL;
    gaiaGeomCollPtr g2;
    int iterate;
    double tolerance_snap = -1;
    double tolerance_removal = -1;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[1]);
	  n_bytes = sqlite3_value_bytes (argv[1]);
      }
    else
	goto invalid_arg;
    if (argc == 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	      iterate = sqlite3_value_int (argv[2]);
	  else
	      goto invalid_arg;
      }
    if (argc >= 5)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[2]);
		tolerance_snap = t;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      tolerance_snap = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
	  if (tolerance_snap < 0.0)
	      goto negative_tolerance;
	  if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	      goto skip_negative;
	  else if (sqlite3_value_type (argv[3]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[3]);
		tolerance_removal = t;
	    }
	  else if (sqlite3_value_type (argv[3]) == SQLITE_FLOAT)
	      tolerance_removal = sqlite3_value_double (argv[3]);
	  else
	      goto invalid_arg;
	  if (tolerance_removal < 0.0)
	      goto negative_tolerance;
	skip_negative:
	  if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[4]) == SQLITE_INTEGER)
	      iterate = sqlite3_value_int (argv[4]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Geometry */
    geom =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!geom)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    g2 = gaiaTopoSnap (accessor, geom, tolerance_snap, tolerance_removal,
		       iterate);
    gaiaFreeGeomColl (geom);
    if (g2 == NULL)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  if (msg != NULL)
	    {
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (g2, &p_blob, &n_bytes, gpkg_mode, tiny_point);
    gaiaFreeGeomColl (g2);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_topo:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
check_input_geo_table (sqlite3 * sqlite, const char *db_prefix,
		       const char *table, const char *column, char **xtable,
		       char **xcolumn, int *srid, int *family, int *dims)
{
/* checking if an input GeoTable do really exist */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    char *xprefix;
    int len;
    int count = 0;
    char *xx_table = NULL;
    char *xx_column = NULL;
    char *ztable;
    int xtype;
    int xfamily;
    int xdims;
    int xsrid;

    *xtable = NULL;
    *xcolumn = NULL;
    *srid = -1;
    *dims = GAIA_XY;

/* querying GEOMETRY_COLUMNS */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    if (column == NULL)
	sql =
	    sqlite3_mprintf
	    ("SELECT f_table_name, f_geometry_column, geometry_type, srid "
	     "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q)",
	     xprefix, table);
    else
	sql =
	    sqlite3_mprintf
	    ("SELECT f_table_name, f_geometry_column, geometry_type, srid "
	     "FROM \"%s\".geometry_columns WHERE Lower(f_table_name) = Lower(%Q) AND "
	     "Lower(f_geometry_column) = Lower(%Q)", xprefix, table, column);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *table_name = results[(i * columns) + 0];
	  const char *column_name = results[(i * columns) + 1];
	  xtype = atoi (results[(i * columns) + 2]);
	  xsrid = atoi (results[(i * columns) + 3]);
	  len = strlen (table_name);
	  if (xx_table != NULL)
	      free (xx_table);
	  xx_table = malloc (len + 1);
	  strcpy (xx_table, table_name);
	  len = strlen (column_name);
	  if (xx_column != NULL)
	      free (xx_column);
	  xx_column = malloc (len + 1);
	  strcpy (xx_column, column_name);
	  count++;
      }
    sqlite3_free_table (results);

    if (count != 1)
      {
	  if (xx_table != NULL)
	      free (xx_table);
	  if (xx_column != NULL)
	      free (xx_column);
	  return 0;
      }

/* testing if the GeoTable do really exist */
    count = 0;
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    ztable = gaiaDoubleQuotedSql (xx_table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, ztable);
    free (xprefix);
    free (ztable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *column_name = results[(i * columns) + 1];
	  if (strcasecmp (column_name, xx_column) == 0)
	      count++;
      }
    sqlite3_free_table (results);

    if (count != 1)
      {
	  if (xx_table != NULL)
	      free (xx_table);
	  if (xx_column != NULL)
	      free (xx_column);
	  return 0;
      }

    switch (xtype)
      {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
	  xdims = GAIA_XY;
	  break;
      case 1000:
      case 1001:
      case 1002:
      case 1003:
      case 1004:
      case 1005:
      case 1006:
      case 1007:
	  xdims = GAIA_XY_Z;
	  break;
      case 2000:
      case 2001:
      case 2002:
      case 2003:
      case 2004:
      case 2005:
      case 2006:
      case 2007:
	  xdims = GAIA_XY_M;
	  break;
      case 3000:
      case 3001:
      case 3002:
      case 3003:
      case 3004:
      case 3005:
      case 3006:
      case 3007:
	  xdims = GAIA_XY_Z_M;
	  break;
      };
    switch (xtype)
      {
      case 1:
      case 1001:
      case 2001:
      case 3001:
      case 4:
      case 1004:
      case 2004:
      case 3004:
	  xfamily = GAIA_TYPE_POINT;
	  break;
      case 2:
      case 1002:
      case 2002:
      case 3002:
      case 5:
      case 1005:
      case 2005:
      case 3005:
	  xfamily = GAIA_TYPE_LINESTRING;
	  break;
      case 3:
      case 1003:
      case 2003:
      case 3003:
      case 6:
      case 1006:
      case 2006:
      case 3006:
	  xfamily = GAIA_TYPE_POLYGON;
	  break;
      default:
	  xfamily = GAIA_TYPE_NONE;
	  break;
      };
    *xtable = xx_table;
    *xcolumn = xx_column;
    *srid = xsrid;
    *family = xfamily;
    *dims = xdims;
    return 1;
}

static int
check_output_geo_table (sqlite3 * sqlite, const char *table)
{
/* checking if an output GeoTable do already exist */
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    int count = 0;
    char *ztable;

/* querying GEOMETRY_COLUMNS */
    sql =
	sqlite3_mprintf
	("SELECT f_table_name, f_geometry_column "
	 "FROM MAIN.geometry_columns WHERE Lower(f_table_name) = Lower(%Q)",
	 table);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);

    if (count != 0)
	return 0;

/* testing if the Table already exist */
    count = 0;
    ztable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA MAIN.table_info(\"%s\")", ztable);
    free (ztable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);

    if (count != 0)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE int
gaia_check_output_table (const void *handle, const char *table)
{
/* checking if an output Table do already exist */
    sqlite3 *sqlite = (sqlite3 *) handle;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    int count = 0;
    char *ztable;

/* testing if the Table already exist */
    ztable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA MAIN.table_info(\"%s\")", ztable);
    free (ztable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);

    if (count != 0)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_SnappedGeoTable (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ TopoGeo_SnappedGeoTable ( text topology-name, text db-prefix, text table,
/                           text column, text outtable, int iterate )
/ TopoGeo_SnappedGeoTable ( text topology-name, text db-prefix, text table,
/                           text column, text outtable, double tolerance_snap,
/                           double tolerance_removal, int iterate )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    int ret;
    const char *msg;
    const char *topo_name;
    const char *db_prefix;
    const char *table;
    const char *column;
    const char *outtable;
    char *xtable = NULL;
    char *xcolumn = NULL;
    int iterate;
    double tolerance_snap = -1;
    double tolerance_removal = -1;
    int srid;
    int family;
    int dims;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	outtable = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (argc == 6)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
	      iterate = sqlite3_value_int (argv[5]);
	  else
	      goto invalid_arg;
      }
    if (argc >= 8)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[5]);
		tolerance_snap = t;
	    }
	  else if (sqlite3_value_type (argv[5]) == SQLITE_FLOAT)
	      tolerance_snap = sqlite3_value_double (argv[5]);
	  else
	      goto invalid_arg;
	  if (tolerance_snap < 0.0)
	      goto negative_tolerance;
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      goto negative_skip;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[6]);
		tolerance_removal = t;
	    }
	  else if (sqlite3_value_type (argv[6]) == SQLITE_FLOAT)
	      tolerance_removal = sqlite3_value_double (argv[6]);
	  else
	      goto invalid_arg;
	  if (tolerance_removal < 0.0)
	      goto negative_tolerance;
	negative_skip:
	  if (sqlite3_value_type (argv[7]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[7]) == SQLITE_INTEGER)
	      iterate = sqlite3_value_int (argv[7]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input GeoTable */
    if (!check_input_geo_table
	(sqlite, db_prefix, table, column, &xtable, &xcolumn, &srid, &family,
	 &dims))
	goto no_input;
    if (!check_matching_srid_dims (accessor, srid, dims))
	goto invalid_geom;

/* checking the output GeoTable */
    if (!check_output_geo_table (sqlite, outtable))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_SnappedGeoTable (accessor, db_prefix, xtable, xcolumn,
				     outtable, tolerance_snap,
				     tolerance_removal, iterate);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xtable);
    free (xcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_input:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid input GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "TopoGeo_SnappedGeoTable: output GeoTable already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg =
	"SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_SubdivideLines (const void *xcontext, int argc,
				const void *xargv)
{
/* SQL function:
/ TopoGeo_SubdivideLines ( Geometry geom, int line_max_points )
/ TopoGeo_SubdivideLines ( Geometry geom, int line_max_points,
/                          double max_length )
/
/ returns: a MultiLinestring 
/ raises an exception on failure
*/
    const char *msg;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom;
    gaiaGeomCollPtr result;
    int line_max_points = -1;
    double max_length = -1.0;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[0]);
	  n_bytes = sqlite3_value_bytes (argv[0]);
      }
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
      {
	  line_max_points = sqlite3_value_int (argv[1]);
	  if (line_max_points < 2)
	      goto illegal_max_points;
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      ;
	  else
	    {
		if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[2]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_int (argv[2]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }

/* attempting to get a Geometry */
    geom =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!geom)
	goto invalid_geom;

/* splitting the geometry */
    result = gaiaTopoGeo_SubdivideLines (geom, line_max_points, max_length);
    gaiaFreeGeomColl (geom);
    if (result == NULL)
	goto invalid_geom;
    gaiaToSpatiaLiteBlobWkbEx2 (result, &p_blob, &n_bytes, gpkg_mode,
				tiny_point);
    gaiaFreeGeomColl (result);
    if (p_blob == NULL)
	goto invalid_geom;
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    msg = "SQL/MM Spatial exception - invalid Geometry.";
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_FromGeoTable (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_FromGeoTable ( text topology-name, text db-prefix, text table,
/                        text column )
/ TopoGeo_FromGeoTable ( text topology-name, text db-prefix, text table,
/                        text column, int line_max_points )
/ TopoGeo_FromGeoTable ( text topology-name, text db-prefix, text table,
/                        text column, int line_max_points, double max_length )
/ TopoGeo_FromGeoTable ( text topology-name, text db-prefix, text table,
/                        text column, int line_max_points, double max_length, 
/                        double tolerance )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *table;
    const char *column;
    char *xtable = NULL;
    char *xcolumn = NULL;
    int srid;
    int family;
    int dims;
    int line_max_points = -1;
    double max_length = -1.0;
    double tolerance = -1;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (argc >= 5)
      {
	  if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[4]) == SQLITE_INTEGER)
	    {
		line_max_points = sqlite3_value_int (argv[4]);
		if (line_max_points < 2)
		    goto illegal_max_points;
	    }
	  else
	      goto invalid_arg;
      }
    if (argc >= 6)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      ;
	  else
	    {
		if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[5]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[5]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_double (argv[5]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }
    if (argc >= 7)
      {
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[6]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[6]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[6]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input GeoTable */
    if (!check_input_geo_table
	(sqlite, db_prefix, table, column, &xtable, &xcolumn, &srid, &family,
	 &dims))
	goto no_input;
    if (!check_matching_srid_dims (accessor, srid, dims))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_FromGeoTable (accessor, db_prefix, xtable, xcolumn,
				  tolerance, line_max_points, max_length);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xtable);
    free (xcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_input:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid input GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg =
	"SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_FromGeoTableNoFace (const void *xcontext, int argc,
				    const void *xargv)
{
/* SQL function:
/ TopoGeo_FromGeoTableNoFace ( text topology-name, text db-prefix, text table,
/                        text column )
/ TopoGeo_FromGeoTableNoFace ( text topology-name, text db-prefix, text table,
/                        text column, int line_max_points )
/ TopoGeo_FromGeoTableNoFace ( text topology-name, text db-prefix, text table,
/                        text column, int line_max_points, double max_length )
/ TopoGeo_FromGeoTableNoFace ( text topology-name, text db-prefix, text table,
/                        text column, int line_max_points, double max_length, 
/                        double tolerance )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *table;
    const char *column;
    char *xtable = NULL;
    char *xcolumn = NULL;
    int srid;
    int family;
    int dims;
    int line_max_points = -1;
    double max_length = -1.0;
    double tolerance = -1;
    struct gaia_topology *topo;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (argc >= 5)
      {
	  if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[4]) == SQLITE_INTEGER)
	    {
		line_max_points = sqlite3_value_int (argv[4]);
		if (line_max_points < 2)
		    goto illegal_max_points;
	    }
	  else
	      goto invalid_arg;
      }
    if (argc >= 6)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      ;
	  else
	    {
		if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[5]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[5]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_double (argv[5]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }
    if (argc >= 7)
      {
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[6]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[6]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[6]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    topo = (struct gaia_topology *) accessor;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input GeoTable */
    if (!check_input_geo_table
	(sqlite, db_prefix, table, column, &xtable, &xcolumn, &srid, &family,
	 &dims))
	goto no_input;
    if (!check_matching_srid_dims (accessor, srid, dims))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);

/* removing any existing Face except the Universal one */
    if (kill_all_existing_faces (sqlite, topo->topology_name) == 0)
      {
	  msg = "TopoGeo_FromGeoTableNoFace: unable to remove existing Faces";
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }

    ret =
	gaiaTopoGeo_FromGeoTableNoFace (accessor, db_prefix, xtable, xcolumn,
					tolerance, line_max_points, max_length);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xtable);
    free (xcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_input:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid input GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg =
	"SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
create_dustbin_table (sqlite3 * sqlite, const char *db_prefix,
		      const char *table, const char *dustbin_table)
{
/* attempting to create a dustbin table */
    char *xprefix;
    char *xtable;
    char *sql;
    char *prev_sql;
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    const char *value;
    int error = 0;
    struct pk_struct *pk_dictionary = NULL;
    struct pk_item *pI;

/* checking if the target table already exists */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT Count(*) FROM \"%s\".sqlite_master WHERE Lower(name) = Lower(%Q)",
	 xprefix, dustbin_table);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
      {
	  spatialite_e
	      ("TopoGeo_FromGeoTableExt: dustbin-table \"%s\" already exists\n",
	       dustbin_table);
	  return 0;
      }

/* identifying all Primary Key columns */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    pk_dictionary = create_pk_dictionary ();
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		const char *name = results[(i * columns) + 1];
		const char *type = results[(i * columns) + 2];
		int notnull = atoi (results[(i * columns) + 3]);
		int pk = atoi (results[(i * columns) + 5]);
		if (pk > 0)
		    add_pk_column (pk_dictionary, name, type, notnull, pk);
	    }
      }
    sqlite3_free_table (results);
    if (pk_dictionary->count <= 0)
      {
	  free_pk_dictionary (pk_dictionary);
	  spatialite_e
	      ("TopoGeo_FromGeoTableExt: the input table \"%s\" has no Primary Key\n",
	       table);
	  return 0;
      }

/* going to create the dustbin table */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (dustbin_table);
    sql = sqlite3_mprintf ("CREATE TABLE \"%s\".\"%s\" (\n", xprefix, xtable);
    free (xprefix);
    free (xtable);
    prev_sql = sql;
    pI = pk_dictionary->first;
    while (pI != NULL)
      {
	  char *xcolumn = gaiaDoubleQuotedSql (pI->name);
	  if (pI->notnull)
	      sql =
		  sqlite3_mprintf ("%s\t\"%s\" %s NOT NULL,\n", prev_sql,
				   xcolumn, pI->type);
	  else
	      sql =
		  sqlite3_mprintf ("%s\t\"%s\" %s,\n", prev_sql, xcolumn,
				   pI->type);
	  free (xcolumn);
	  sqlite3_free (prev_sql);
	  prev_sql = sql;
	  pI = pI->next;
      }
    xprefix = sqlite3_mprintf ("pk_%s", dustbin_table);
    xtable = gaiaDoubleQuotedSql (xprefix);
    sqlite3_free (xprefix);
    sql =
	sqlite3_mprintf ("%s\tmessage TEXT,\n\ttolerance DOUBLE NOT NULL,\n"
			 "\tfailing_geometry BLOB\n,\tCONSTRAINT \"%s\" PRIMARY KEY (",
			 prev_sql, xtable);
    sqlite3_free (prev_sql);
    free (xtable);
    prev_sql = sql;
    for (i = 1; i <= pk_dictionary->count; i++)
      {
	  pI = pk_dictionary->first;
	  while (pI != NULL)
	    {
		if (pI->pk == i)
		  {
		      char *xcolumn = gaiaDoubleQuotedSql (pI->name);
		      if (i == 1)
			  sql = sqlite3_mprintf ("%s\"%s\"", prev_sql, xcolumn);
		      else
			  sql =
			      sqlite3_mprintf ("%s, \"%s\"", prev_sql, xcolumn);
		      sqlite3_free (prev_sql);
		      free (xcolumn);
		      prev_sql = sql;
		  }
		pI = pI->next;
	    }
      }
    sql = sqlite3_mprintf ("%s))", prev_sql);
    sqlite3_free (prev_sql);
    free_pk_dictionary (pk_dictionary);

    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("TopoGeo_FromGeoTableExt: unable to create dustbin-table \"%s\": %s\n",
	       dustbin_table, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    return 1;
}

static int
create_dustbin_view (sqlite3 * sqlite, const char *db_prefix, const char *table,
		     const char *column, const char *dustbin_table,
		     const char *dustbin_view, char **sql_in, char **sql_out,
		     char **sql_in2)
{
/* attempting to create a dustbin view */
    char *xprefix;
    char *xtable;
    char *xcolumn;
    char *sql;
    char *prev_sql;
    char *sql2;
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    const char *value;
    int error = 0;
    struct pk_struct *pk_dictionary = NULL;
    struct pk_item *pI;
    int first;

    *sql_in = NULL;
    *sql_out = NULL;
    *sql_in2 = NULL;
/* checking if the target view already exists */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT Count(*) FROM \"%s\".sqlite_master WHERE Lower(name) = Lower(%Q)",
	 xprefix, dustbin_view);
    free (xprefix);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		value = results[(i * columns) + 0];
		if (atoi (value) != 0)
		    error = 1;
	    }
      }
    sqlite3_free_table (results);
    if (error)
	return 0;

/* identifying all main table's columns */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
	return 0;
    pk_dictionary = create_pk_dictionary ();
    if (rows < 1)
	;
    else
      {
	  for (i = 1; i <= rows; i++)
	    {
		const char *name = results[(i * columns) + 1];
		const char *type = results[(i * columns) + 2];
		int notnull = atoi (results[(i * columns) + 3]);
		int pk = atoi (results[(i * columns) + 5]);
		add_pk_column (pk_dictionary, name, type, notnull, pk);
	    }
      }
    sqlite3_free_table (results);
    if (pk_dictionary->count <= 0)
      {
	  free_pk_dictionary (pk_dictionary);
	  spatialite_e
	      ("TopoGeo_FromGeoTableExt: unable to retrieve \"%s\" columns\n",
	       table);
	  return 0;
      }

/* going to create the dustbin view */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (dustbin_view);
    sql = sqlite3_mprintf ("CREATE VIEW \"%s\".\"%s\" AS\n"
			   "SELECT a.ROWID AS rowid", xprefix, xtable);
    free (xprefix);
    free (xtable);
    prev_sql = sql;
    pI = pk_dictionary->first;
    while (pI != NULL)
      {
	  char *xcolumn = gaiaDoubleQuotedSql (pI->name);
	  sql =
	      sqlite3_mprintf ("%s, a.\"%s\" AS \"%s\"", prev_sql, xcolumn,
			       xcolumn);
	  free (xcolumn);
	  sqlite3_free (prev_sql);
	  prev_sql = sql;
	  pI = pI->next;
      }
    xtable = gaiaDoubleQuotedSql (table);
    xprefix = gaiaDoubleQuotedSql (dustbin_table);
    sql =
	sqlite3_mprintf
	("%s, b.message AS message, b.tolerance AS tolerance, "
	 "b.failing_geometry AS failing_geometry "
	 "FROM \"%s\" AS a, \"%s\" AS b\nWHERE ", prev_sql, xtable, xprefix);
    sqlite3_free (prev_sql);
    free (xtable);
    free (xprefix);
    prev_sql = sql;
    pI = pk_dictionary->first;
    first = 1;
    while (pI != NULL)
      {
	  if (pI->pk > 0)
	    {
		char *xcolumn = gaiaDoubleQuotedSql (pI->name);
		if (first)
		    sql =
			sqlite3_mprintf ("%sa.\"%s\" = b.\"%s\"", prev_sql,
					 xcolumn, xcolumn);
		else
		    sql =
			sqlite3_mprintf ("%s AND a.\"%s\" = b.\"%s\"", prev_sql,
					 xcolumn, xcolumn);
		first = 0;
		sqlite3_free (prev_sql);
		free (xcolumn);
		prev_sql = sql;
	    }
	  pI = pI->next;
      }
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("TopoGeo_FromGeoTableExt: unable to create dustbin-view \"%s\": %s\n",
	       dustbin_table, err_msg);
	  sqlite3_free (err_msg);
	  free_pk_dictionary (pk_dictionary);
	  return 0;
      }

/* registering the Spatial View */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("INSERT INTO \"%s\".views_geometry_columns (view_name, "
	 "view_geometry, view_rowid, f_table_name, f_geometry_column, read_only) "
	 "VALUES (%Q, %Q, 'rowid',  %Q, %Q, 1)", xprefix, dustbin_view, column,
	 table, column);
    free (xprefix);
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e
	      ("TopoGeo_FromGeoTableExt: unable to register the dustbin-view \"%s\": %s\n",
	       dustbin_table, err_msg);
	  sqlite3_free (err_msg);
	  free_pk_dictionary (pk_dictionary);
	  return 0;
      }

/* constructing the input SQL statement */
    sql = sqlite3_mprintf ("SELECT ROWID");
    prev_sql = sql;
    pI = pk_dictionary->first;
    while (pI != NULL)
      {
	  if (pI->pk > 0)
	    {
		char *xcolumn = gaiaDoubleQuotedSql (pI->name);
		sql = sqlite3_mprintf ("%s, \"%s\"", prev_sql, xcolumn);
		sqlite3_free (prev_sql);
		free (xcolumn);
		prev_sql = sql;
	    }
	  pI = pI->next;
      }
    xcolumn = gaiaDoubleQuotedSql (column);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("%s, \"%s\" FROM \"%s\".\"%s\" "
			 "WHERE ROWID > ? ORDER BY ROWID", prev_sql, xcolumn,
			 xprefix, xtable);
    sql2 =
	sqlite3_mprintf ("%s, \"%s\" FROM \"%s\".\"%s\" WHERE ROWID = ?",
			 prev_sql, xcolumn, xprefix, xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    sqlite3_free (prev_sql);
    *sql_in = sql;
    *sql_in2 = sql2;

/* constructing the output SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (dustbin_table);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\".\"%s\" (", xprefix, xtable);
    prev_sql = sql;
    free (xprefix);
    free (xtable);
    pI = pk_dictionary->first;
    first = 1;
    while (pI != NULL)
      {
	  if (pI->pk > 0)
	    {
		char *xcolumn = gaiaDoubleQuotedSql (pI->name);
		if (first)
		    sql = sqlite3_mprintf ("%s\"%s\"", prev_sql, xcolumn);
		else
		    sql = sqlite3_mprintf ("%s, \"%s\"", prev_sql, xcolumn);
		first = 0;
		sqlite3_free (prev_sql);
		free (xcolumn);
		prev_sql = sql;
	    }
	  pI = pI->next;
      }
    sql =
	sqlite3_mprintf ("%s, message, tolerance, failing_geometry) VALUES (",
			 prev_sql);
    sqlite3_free (prev_sql);
    prev_sql = sql;
    pI = pk_dictionary->first;
    first = 1;
    while (pI != NULL)
      {
	  if (pI->pk > 0)
	    {
		if (first)
		    sql = sqlite3_mprintf ("%s?", prev_sql);
		else
		    sql = sqlite3_mprintf ("%s, ?", prev_sql);
		first = 0;
		sqlite3_free (prev_sql);
		prev_sql = sql;
	    }
	  pI = pI->next;
      }
    sql = sqlite3_mprintf ("%s, ?, ?, ?)", prev_sql);
    sqlite3_free (prev_sql);
    *sql_out = sql;

    free_pk_dictionary (pk_dictionary);
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_FromGeoTableExt (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ TopoGeo_FromGeoTableExt ( text topology-name, text db-prefix, text table,
/                           text column, text dustbin-table, text dustbin-view )
/ TopoGeo_FromGeoTableExt ( text topology-name, text db-prefix, text table,
/                           text column, text dustbin-table, text dustbin-view,
/                           int line_max_points )
/ TopoGeo_FromGeoTableExt ( text topology-name, text db-prefix, text table,
/                           text column, text dustbin-table, text dustbin-view,
/                           int line_max_points, double max_length )
/ TopoGeo_FromGeoTableExt ( text topology-name, text db-prefix, text table,
/                           text column, text dustbin-table, text dustbin-view,
/                           int line_max_points, double max_length , 
/                           double tolerance )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *table;
    const char *column;
    char *xtable = NULL;
    char *xcolumn = NULL;
    int srid;
    int family;
    int dims;
    const char *dustbin_table;
    const char *dustbin_view;
    int line_max_points = -1;
    double max_length = -1.0;
    double tolerance = -1;
    char *sql_in = NULL;
    char *sql_out = NULL;
    char *sql_in2 = NULL;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	dustbin_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[5]) == SQLITE_TEXT)
	dustbin_view = (const char *) sqlite3_value_text (argv[5]);
    else
	goto invalid_arg;
    if (argc >= 7)
      {
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	    {
		line_max_points = sqlite3_value_int (argv[6]);
		if (line_max_points < 2)
		    goto illegal_max_points;
	    }
	  else
	      goto invalid_arg;
      }
    if (argc >= 8)
      {
	  if (sqlite3_value_type (argv[7]) == SQLITE_NULL)
	      ;
	  else
	    {
		if (sqlite3_value_type (argv[7]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[7]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[7]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_double (argv[7]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }
    if (argc >= 9)
      {
	  if (sqlite3_value_type (argv[8]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[8]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[8]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[8]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[8]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input GeoTable */
    if (!check_input_geo_table
	(sqlite, db_prefix, table, column, &xtable, &xcolumn, &srid, &family,
	 &dims))
	goto no_input;
    if (!check_matching_srid_dims (accessor, srid, dims))
	goto invalid_geom;

/* attempting to create the dustbin table and view */
    start_topo_savepoint (sqlite, cache);
    if (!create_dustbin_table (sqlite, db_prefix, xtable, dustbin_table))
      {
	  rollback_topo_savepoint (sqlite, cache);
	  goto no_dustbin_table;
      }
    if (!create_dustbin_view
	(sqlite, db_prefix, xtable, xcolumn, dustbin_table, dustbin_view,
	 &sql_in, &sql_out, &sql_in2))
      {
	  rollback_topo_savepoint (sqlite, cache);
	  goto no_dustbin_view;
      }
    release_topo_savepoint (sqlite, cache);

    ret =
	gaiaTopoGeo_FromGeoTableExtended (accessor, sql_in, sql_out, sql_in2,
					  tolerance, line_max_points,
					  max_length);
    free (xtable);
    free (xcolumn);
    sqlite3_free (sql_in);
    sqlite3_free (sql_out);
    sqlite3_free (sql_in2);
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_input:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - invalid input GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg =
	"SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_dustbin_table:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    msg = "SQL/MM Spatial exception - unable to create the dustbin table.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_dustbin_view:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - unable to create the dustbin view.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_FromGeoTableNoFaceExt (const void *xcontext, int argc,
				       const void *xargv)
{
/* SQL function:
/ TopoGeo_FromGeoTableNoFaceExt ( text topology-name, text db-prefix, 
/                                 text table, text column, text dustbin-table,
/                                 text dustbin-view )
/ TopoGeo_FromGeoTableNoFaceExt ( text topology-name, text db-prefix, 
/                                 text table, text column, text dustbin-table, 
/                                 text dustbin-view, int line_max_points )
/ TopoGeo_FromGeoTableNoFaceExt ( text topology-name, text db-prefix, 
/                                 text table, text column, text dustbin-table, 
/                                 text dustbin-view, int line_max_points, 
/                                 double max_length )
/ TopoGeo_FromGeoTableNoFaceExt ( text topology-name, text db-prefix, 
/                                 text table, text column, text dustbin-table, 
/                                 text dustbin-view, int line_max_points, 
/                                 double max_length, double tolerance )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *table;
    const char *column;
    char *xtable = NULL;
    char *xcolumn = NULL;
    int srid;
    int family;
    int dims;
    const char *dustbin_table;
    const char *dustbin_view;
    int line_max_points = -1;
    double max_length = -1.0;
    double tolerance = -1;
    char *sql_in = NULL;
    char *sql_out = NULL;
    char *sql_in2 = NULL;
    struct gaia_topology *topo;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	dustbin_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[5]) == SQLITE_TEXT)
	dustbin_view = (const char *) sqlite3_value_text (argv[5]);
    else
	goto invalid_arg;
    if (argc >= 7)
      {
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      ;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	    {
		line_max_points = sqlite3_value_int (argv[6]);
		if (line_max_points < 2)
		    goto illegal_max_points;
	    }
	  else
	      goto invalid_arg;
      }
    if (argc >= 8)
      {
	  if (sqlite3_value_type (argv[7]) == SQLITE_NULL)
	      ;
	  else
	    {
		if (sqlite3_value_type (argv[7]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[7]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[7]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_double (argv[7]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }
    if (argc >= 9)
      {
	  if (sqlite3_value_type (argv[8]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[8]) == SQLITE_INTEGER)
	    {
		int t = sqlite3_value_int (argv[8]);
		tolerance = t;
	    }
	  else if (sqlite3_value_type (argv[8]) == SQLITE_FLOAT)
	      tolerance = sqlite3_value_double (argv[8]);
	  else
	      goto invalid_arg;
	  if (tolerance < 0.0)
	      goto negative_tolerance;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    topo = (struct gaia_topology *) accessor;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input GeoTable */
    if (!check_input_geo_table
	(sqlite, db_prefix, table, column, &xtable, &xcolumn, &srid, &family,
	 &dims))
	goto no_input;
    if (!check_matching_srid_dims (accessor, srid, dims))
	goto invalid_geom;

    start_topo_savepoint (sqlite, cache);

/* removing any existing Face except the Universal one */
    if (kill_all_existing_faces (sqlite, topo->topology_name) == 0)
      {
	  msg =
	      "TopoGeo_FromGeoTableNoFaceExt: unable to remove existing Faces";
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }

/* attempting to create the dustbin table and view */
    if (!create_dustbin_table (sqlite, db_prefix, xtable, dustbin_table))
      {
	  rollback_topo_savepoint (sqlite, cache);
	  goto no_dustbin_table;
      }
    if (!create_dustbin_view
	(sqlite, db_prefix, xtable, xcolumn, dustbin_table, dustbin_view,
	 &sql_in, &sql_out, &sql_in2))
      {
	  rollback_topo_savepoint (sqlite, cache);
	  goto no_dustbin_view;
      }
    release_topo_savepoint (sqlite, cache);

    ret =
	gaiaTopoGeo_FromGeoTableNoFaceExtended (accessor, sql_in, sql_out,
						sql_in2, tolerance,
						line_max_points, max_length);
    free (xtable);
    free (xcolumn);
    sqlite3_free (sql_in);
    sqlite3_free (sql_out);
    sqlite3_free (sql_in2);
    sqlite3_result_int (context, ret);
    return;

  no_topo:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_input:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - invalid input GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg =
	"SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_dustbin_table:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    msg = "SQL/MM Spatial exception - unable to create the dustbin table.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_dustbin_view:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - unable to create the dustbin view.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  negative_tolerance:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - illegal negative tolerance.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    if (xtable != NULL)
	free (xtable);
    if (xcolumn != NULL)
	free (xcolumn);
    if (sql_in != NULL)
	sqlite3_free (sql_in);
    if (sql_out != NULL)
	sqlite3_free (sql_out);
    if (sql_in2 != NULL)
	sqlite3_free (sql_in2);
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
check_matching_srid (GaiaTopologyAccessorPtr accessor, int srid)
{
/* checking for matching SRID */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo->srid != srid)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE int
gaia_check_reference_geo_table (const void *handle, const char *db_prefix,
				const char *table, const char *column,
				char **xtable, char **xcolumn, int *srid,
				int *family)
{
    sqlite3 *sqlite = (sqlite3 *) handle;
    int dims;
    return check_input_geo_table (sqlite, db_prefix, table, column, xtable,
				  xcolumn, srid, family, &dims);
}

static int
check_reference_table (sqlite3 * sqlite, const char *db_prefix,
		       const char *table)
{
/* checking if an input GeoTable do really exist */

    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    char *sql;
    char *xprefix;
    int count = 0;
    char *xtable;

/* testing if the Table do really exist */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql = sqlite3_mprintf ("PRAGMA \"%s\".table_info(\"%s\")", xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
	count++;
    sqlite3_free_table (results);

    if (count < 1)
	return 0;
    return 1;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_ToGeoTable (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_ToGeoTable ( text topology-name, text db-prefix, text ref_table,
/                      text ref_column, text out_table )
/ TopoGeo_ToGeoTable ( text topology-name, text db-prefix, text ref_table,
/                      text ref_column, text out_table, int with-spatial-index )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    int with_spatial_index = 0;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int family;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (argc >= 6)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
	      with_spatial_index = sqlite3_value_int (argv[5]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the reference GeoTable */
    if (!gaia_check_reference_geo_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &family))
	goto no_reference;
    if (!check_matching_srid (accessor, srid))
	goto invalid_geom;

/* checking the output GeoTable */
    if (!check_output_geo_table (sqlite, out_table))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_ToGeoTable (accessor, db_prefix, xreftable, xrefcolumn,
				out_table, with_spatial_index);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_ToGeoTable: invalid reference GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_ToGeoTable: output GeoTable already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_PolyFacesList (const void *xcontext, int argc,
			       const void *xargv)
{
/* SQL function:
/ TopoGeo_PolyFacesList ( text topology-name, text db-prefix, text ref_table,
/                         text ref_column, text out_table )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int family;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the reference GeoTable */
    if (!gaia_check_reference_geo_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &family))
	goto no_reference;
    if (!check_matching_srid (accessor, srid))
	goto invalid_geom;
    if (family != GAIA_TYPE_POLYGON)
	goto not_polygon;

/* checking the output Table */
    if (!gaia_check_output_table (sqlite, out_table))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_PolyFacesList (accessor, db_prefix, xreftable, xrefcolumn,
				   out_table);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_PolyFacesList: invalid reference GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_PolyFacesList: output GeoTable already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  not_polygon:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (not of the [MULTI]POLYGON type).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_LineEdgesList (const void *xcontext, int argc,
			       const void *xargv)
{
/* SQL function:
/ TopoGeo_LineEdgesList ( text topology-name, text db-prefix, text ref_table,
/                         text ref_column, text out_table )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int family;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the reference GeoTable */
    if (!gaia_check_reference_geo_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &family))
	goto no_reference;
    if (!check_matching_srid (accessor, srid))
	goto invalid_geom;
    if (family != GAIA_TYPE_LINESTRING)
	goto not_linestring;

/* checking the output Table */
    if (!gaia_check_output_table (sqlite, out_table))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_LineEdgesList (accessor, db_prefix, xreftable, xrefcolumn,
				   out_table);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_LineEdgesList: invalid reference GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_LineEdgesList: output GeoTable already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  not_linestring:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (not of the [MULTI]LINESTRING type).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_ToGeoTableGeneralize (const void *xcontext, int argc,
				      const void *xargv)
{
/* SQL function:
/ TopoGeo_ToGeoTableGeneralize ( text topology-name, text db-prefix,
/                                text ref_table, text ref_column,
/                                text out_table, double tolerance )
/ TopoGeo_ToGeoTableGeneralize ( text topology-name, text db-prefix,
/                                text ref_table, text ref_column,
/                                text out_table, double tolerance,
/                                int with-spatial-index )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *out_table;
    double tolerance = 0.0;
    int with_spatial_index = 0;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int family;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
      {
	  int val = sqlite3_value_int (argv[5]);
	  tolerance = val;
      }
    else if (sqlite3_value_type (argv[5]) == SQLITE_FLOAT)
	tolerance = sqlite3_value_double (argv[5]);
    else
	goto invalid_arg;
    if (argc >= 7)
      {
	  if (sqlite3_value_type (argv[6]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[6]) == SQLITE_INTEGER)
	      with_spatial_index = sqlite3_value_int (argv[6]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the reference GeoTable */
    if (!gaia_check_reference_geo_table
	(sqlite, db_prefix, ref_table, ref_column, &xreftable, &xrefcolumn,
	 &srid, &family))
	goto no_reference;
    if (!check_matching_srid (accessor, srid))
	goto invalid_geom;

/* checking the output GeoTable */
    if (!check_output_geo_table (sqlite, out_table))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_ToGeoTableGeneralize (accessor, db_prefix, xreftable,
					  xrefcolumn, out_table, tolerance,
					  with_spatial_index);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_ToGeoTableGeneralize: invalid reference GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_ToGeoTableGeneralize: output GeoTable already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_RemoveSmallFaces (const void *xcontext, int argc,
				  const void *xargv)
{
/* SQL function:
/ TopoGeo_RemoveSmallFaces ( text topology-name, double min-circularity )
/ TopoGeo_RemoveSmallFaces ( text topology-name, double min-circularity,
/                            double min-area )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    double min_circularity;
    double min_area = 0.0;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
      {
	  int val = sqlite3_value_int (argv[1]);
	  min_circularity = val;
      }
    else if (sqlite3_value_type (argv[1]) == SQLITE_FLOAT)
	min_circularity = sqlite3_value_double (argv[1]);
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
	    {
		int val = sqlite3_value_int (argv[2]);
		min_area = val;
	    }
	  else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	      min_area = sqlite3_value_double (argv[2]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_RemoveSmallFaces (accessor, min_circularity, min_area);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_RemoveDanglingEdges (const void *xcontext, int argc,
				     const void *xargv)
{
/* SQL function:
/ TopoGeo_RemoveDanglingEdges ( text topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_RemoveDanglingEdges (accessor);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_RemoveDanglingNodes (const void *xcontext, int argc,
				     const void *xargv)
{
/* SQL function:
/ TopoGeo_RemoveDanglingNodes ( text topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_RemoveDanglingNodes (accessor);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_NewEdgeHeal (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_NewEdgeHeal ( text topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    if (test_inconsistent_topology (accessor) != 0)
	goto inconsistent_topology;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_NewEdgeHeal (accessor);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  inconsistent_topology:
    msg =
	"TopoGeo_NewEdgeHeal exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_ModEdgeHeal (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_ModEdgeHeal ( text topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    if (test_inconsistent_topology (accessor) != 0)
	goto inconsistent_topology;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_ModEdgeHeal (accessor);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  inconsistent_topology:
    msg =
	"TopoGeo_ModEdgeHeal exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_NewEdgesSplit (const void *xcontext, int argc,
			       const void *xargv)
{
/* SQL function:
/ TopoGeo_NewEdgesSplit ( text topology-name, int line_max_points )
/ TopoGeo_NewEdgesSplit ( text topology-name, int line_max_points, 
/                         double max_length )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    int line_max_points = -1;
    double max_length = -1.0;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
      {
	  line_max_points = sqlite3_value_int (argv[1]);
	  if (line_max_points < 2)
	      goto illegal_max_points;
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else
	    {
		if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[2]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_double (argv[2]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    if (test_inconsistent_topology (accessor) != 0)
	goto inconsistent_topology;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_NewEdgesSplit (accessor, line_max_points, max_length);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  inconsistent_topology:
    msg =
	"TopoGeo_NewEdgesSplit exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_ModEdgeSplit (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_ModEdgeSplit ( text topology-name, int line_max_points )
/ TopoGeo_ModEdgeSplit ( text topology-name, int line_max_points, 
/                        double max_length )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    int line_max_points = -1;
    double max_length = -1.0;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
      {
	  line_max_points = sqlite3_value_int (argv[1]);
	  if (line_max_points < 2)
	      goto illegal_max_points;
      }
    else
	goto invalid_arg;
    if (argc >= 3)
      {
	  if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	      goto null_arg;
	  else
	    {
		if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
		  {
		      int max = sqlite3_value_int (argv[2]);
		      max_length = max;
		  }
		else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
		    max_length = sqlite3_value_double (argv[2]);
		else
		    goto invalid_arg;
		if (max_length <= 0.0)
		    goto nonpositive_max_length;
	    }
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    if (test_inconsistent_topology (accessor) != 0)
	goto inconsistent_topology;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_ModEdgeSplit (accessor, line_max_points, max_length);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  inconsistent_topology:
    msg =
	"TopoGeo_ModEdgeSplit exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  illegal_max_points:
    msg = "SQL/MM Spatial exception - max_points should be >= 2.";
    sqlite3_result_error (context, msg, -1);
    return;

  nonpositive_max_length:
    msg = "SQL/MM Spatial exception - max_length should be > 0.0.";
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
do_clone_face (const char *db_prefix, const char *in_topology_name,
	       struct gaia_topology *topo_out)
{
/* cloning FACE */
    char *sql;
    char *table;
    char *xprefix;
    char *xtable;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;

/* preparing the input SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    table = sqlite3_mprintf ("%s_face", in_topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT face_id, mbr FROM \"%s\".\"%s\" WHERE face_id <> 0",
	 xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo_out->db_handle, sql, strlen (sql), &stmt_in,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM \"face\" error: \"%s\"",
			sqlite3_errmsg (topo_out->db_handle));
	  goto error;
      }

/* preparing the output SQL statement */
    table = sqlite3_mprintf ("%s_face", topo_out->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (face_id, mbr) VALUES (?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo_out->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO \"face\" error: \"%s\"",
			sqlite3_errmsg (topo_out->db_handle));
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 1,
					sqlite3_column_int64 (stmt_in, 0));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_NULL)
		    sqlite3_bind_null (stmt_out, 2);
		else if (sqlite3_column_type (stmt_in, 1) == SQLITE_BLOB)
		    sqlite3_bind_blob (stmt_out, 2,
				       sqlite3_column_blob (stmt_in, 1),
				       sqlite3_column_bytes (stmt_in, 1),
				       SQLITE_STATIC);
		else
		    goto invalid_value;
		/* inserting into the output table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      spatialite_e ("INSERT INTO \"face\" step error: \"%s\"",
				    sqlite3_errmsg (topo_out->db_handle));
		      goto error;
		  }
	    }
	  else
	    {
		spatialite_e ("SELECT FROM \"face\" step error: %s",
			      sqlite3_errmsg (topo_out->db_handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  invalid_value:
    spatialite_e ("SELECT FROM \"face\": found an invalid value");

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static int
do_clone_node (const char *db_prefix, const char *in_topology_name,
	       struct gaia_topology *topo_out)
{
/* cloning NODE */
    char *sql;
    char *table;
    char *xprefix;
    char *xtable;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;

/* preparing the input SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    table = sqlite3_mprintf ("%s_node", in_topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT node_id, containing_face, geom FROM \"%s\".\"%s\"", xprefix,
	 xtable);
    free (xprefix);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo_out->db_handle, sql, strlen (sql), &stmt_in,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM \"node\" error: \"%s\"",
			sqlite3_errmsg (topo_out->db_handle));
	  goto error;
      }

/* preparing the output SQL statement */
    table = sqlite3_mprintf ("%s_node", topo_out->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (node_id, containing_face, geom) "
	 "VALUES (?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo_out->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO \"node\" error: \"%s\"",
			sqlite3_errmsg (topo_out->db_handle));
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 1,
					sqlite3_column_int64 (stmt_in, 0));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_NULL)
		    sqlite3_bind_null (stmt_out, 2);
		else if (sqlite3_column_type (stmt_in, 1) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 2,
					sqlite3_column_int64 (stmt_in, 1));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 2) == SQLITE_BLOB)
		    sqlite3_bind_blob (stmt_out, 3,
				       sqlite3_column_blob (stmt_in, 2),
				       sqlite3_column_bytes (stmt_in, 2),
				       SQLITE_STATIC);
		else
		    goto invalid_value;
		/* inserting into the output table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      spatialite_e ("INSERT INTO \"node\" step error: \"%s\"",
				    sqlite3_errmsg (topo_out->db_handle));
		      goto error;
		  }
	    }
	  else
	    {
		spatialite_e ("SELECT FROM \"node\" step error: %s",
			      sqlite3_errmsg (topo_out->db_handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  invalid_value:
    spatialite_e ("SELECT FROM \"node\": found an invalid value");

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static int
do_clone_edge (const char *db_prefix, const char *in_topology_name,
	       struct gaia_topology *topo_out)
{
/* cloning EDGE */
    char *sql;
    char *table;
    char *xprefix;
    char *xtable;
    sqlite3_stmt *stmt_in = NULL;
    sqlite3_stmt *stmt_out = NULL;
    int ret;

/* preparing the input SQL statement */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    table = sqlite3_mprintf ("%s_edge", in_topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT edge_id, start_node, end_node, next_left_edge, "
	 "next_right_edge, left_face, right_face, geom FROM \"%s\".\"%s\"",
	 xprefix, xtable);
    free (xprefix);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo_out->db_handle, sql, strlen (sql), &stmt_in,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM \"edge\" error: \"%s\"",
			sqlite3_errmsg (topo_out->db_handle));
	  goto error;
      }

/* preparing the output SQL statement */
    table = sqlite3_mprintf ("%s_edge", topo_out->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (edge_id, start_node, end_node, "
	 "next_left_edge, next_right_edge, left_face, right_face, geom) "
	 "VALUES (?, ?, ?, ?, ?, ?, ?, ?)", xtable);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (topo_out->db_handle, sql, strlen (sql), &stmt_out,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("INSERT INTO \"edge\" error: \"%s\"",
			sqlite3_errmsg (topo_out->db_handle));
	  goto error;
      }

    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_reset (stmt_out);
		sqlite3_clear_bindings (stmt_out);
		if (sqlite3_column_type (stmt_in, 0) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 1,
					sqlite3_column_int64 (stmt_in, 0));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 1) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 2,
					sqlite3_column_int64 (stmt_in, 1));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 2) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 3,
					sqlite3_column_int64 (stmt_in, 2));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 3) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 4,
					sqlite3_column_int64 (stmt_in, 3));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 4) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 5,
					sqlite3_column_int64 (stmt_in, 4));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 5) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 6,
					sqlite3_column_int64 (stmt_in, 5));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 6) == SQLITE_INTEGER)
		    sqlite3_bind_int64 (stmt_out, 7,
					sqlite3_column_int64 (stmt_in, 6));
		else
		    goto invalid_value;
		if (sqlite3_column_type (stmt_in, 7) == SQLITE_BLOB)
		    sqlite3_bind_blob (stmt_out, 8,
				       sqlite3_column_blob (stmt_in, 7),
				       sqlite3_column_bytes (stmt_in, 7),
				       SQLITE_STATIC);
		else
		    goto invalid_value;
		/* inserting into the output table */
		ret = sqlite3_step (stmt_out);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      spatialite_e ("INSERT INTO \"edge\" step error: \"%s\"",
				    sqlite3_errmsg (topo_out->db_handle));
		      goto error;
		  }
	    }
	  else
	    {
		spatialite_e ("SELECT FROM \"edge\" step error: %s",
			      sqlite3_errmsg (topo_out->db_handle));
		goto error;
	    }
      }

    sqlite3_finalize (stmt_in);
    sqlite3_finalize (stmt_out);
    return 1;

  invalid_value:
    spatialite_e ("SELECT FROM \"edge\": found an invalid value");

  error:
    if (stmt_in != NULL)
	sqlite3_finalize (stmt_in);
    if (stmt_out != NULL)
	sqlite3_finalize (stmt_out);
    return 0;
}

static int
do_clone_topology (const char *db_prefix, const char *in_topology,
		   GaiaTopologyAccessorPtr accessor)
{
/* cloning a full Topology */
    struct gaia_topology *topo_out = (struct gaia_topology *) accessor;

/* cloning FACE */
    if (!do_clone_face (db_prefix, in_topology, topo_out))
	return 0;

/* cloning NODE */
    if (!do_clone_node (db_prefix, in_topology, topo_out))
	return 0;

/* cloning EDGE */
    if (!do_clone_edge (db_prefix, in_topology, topo_out))
	return 0;

    return 1;
}

static char *
gaiaGetAttachedTopology (sqlite3 * handle, const char *db_prefix,
			 const char *topo_name, int *srid, double *tolerance,
			 int *has_z)
{
/* attempting to retrieve the Input Topology for TopoGeo_Clone */
    char *sql;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int ok = 0;
    char *xprefix;
    char *xtopology_name = NULL;
    int xsrid;
    double xtolerance;
    int xhas_z;

/* preparing the SQL query */
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    sql =
	sqlite3_mprintf
	("SELECT topology_name, srid, tolerance, has_z FROM \"%s\".topologies WHERE "
	 "Lower(topology_name) = Lower(%Q)", xprefix, topo_name);
    free (xprefix);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  spatialite_e ("SELECT FROM topologys error: \"%s\"\n",
			sqlite3_errmsg (handle));
	  return NULL;
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_name = 0;
		int ok_srid = 0;
		int ok_tolerance = 0;
		int ok_z = 0;
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *str =
			  (const char *) sqlite3_column_text (stmt, 0);
		      if (xtopology_name != NULL)
			  free (xtopology_name);
		      xtopology_name = malloc (strlen (str) + 1);
		      strcpy (xtopology_name, str);
		      ok_name = 1;
		  }
		if (sqlite3_column_type (stmt, 1) == SQLITE_INTEGER)
		  {
		      xsrid = sqlite3_column_int (stmt, 1);
		      ok_srid = 1;
		  }
		if (sqlite3_column_type (stmt, 2) == SQLITE_FLOAT)
		  {
		      xtolerance = sqlite3_column_double (stmt, 2);
		      ok_tolerance = 1;
		  }
		if (sqlite3_column_type (stmt, 3) == SQLITE_INTEGER)
		  {
		      xhas_z = sqlite3_column_int (stmt, 3);
		      ok_z = 1;
		  }
		if (ok_name && ok_srid && ok_tolerance && ok_z)
		  {
		      ok = 1;
		      break;
		  }
	    }
	  else
	    {
		spatialite_e
		    ("step: SELECT FROM topologies error: \"%s\"\n",
		     sqlite3_errmsg (handle));
		sqlite3_finalize (stmt);
		return NULL;
	    }
      }
    sqlite3_finalize (stmt);

    if (ok)
      {
	  *srid = xsrid;
	  *tolerance = xtolerance;
	  *has_z = xhas_z;
	  return xtopology_name;
      }

    if (xtopology_name != NULL)
	free (xtopology_name);
    return NULL;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_Clone (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_Clone ( text db-prefix, text in-topology-name, text out-topology-name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *db_prefix = "MAIN";
    const char *in_topo_name;
    const char *out_topo_name;
    char *input_topo_name = NULL;
    int srid;
    double tolerance;
    int has_z;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	in_topo_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	out_topo_name = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;

/* checking the origin Topology */
    input_topo_name =
	gaiaGetAttachedTopology (sqlite, db_prefix, in_topo_name, &srid,
				 &tolerance, &has_z);
    if (input_topo_name == NULL)
	goto no_topo;

/* attempting to create the destination Topology */
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopologyCreate (sqlite, out_topo_name, srid, tolerance, has_z);
    if (!ret)
      {
	  rollback_topo_savepoint (sqlite, cache);
	  goto no_topo2;
      }

/* attempting to get a Topology Accessor (destination) */
    accessor = gaiaGetTopology (sqlite, cache, out_topo_name);
    if (accessor == NULL)
	goto no_topo2;
    gaiatopo_reset_last_error_msg (accessor);

/* cloning Topology */
    ret = do_clone_topology (db_prefix, input_topo_name, accessor);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  sqlite3_result_error (context, "Clone Topology failure", -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    if (input_topo_name != NULL)
	free (input_topo_name);
    return;

  no_topo:
    if (input_topo_name != NULL)
	free (input_topo_name);
    msg = "SQL/MM Spatial exception - invalid topology name (origin).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_topo2:
    if (input_topo_name != NULL)
	free (input_topo_name);
    msg = "SQL/MM Spatial exception - invalid topology name (destination).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (input_topo_name != NULL)
	free (input_topo_name);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (input_topo_name != NULL)
	free (input_topo_name);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_GetEdgeSeed (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_GetEdgeSeed ( text topology-name, int edge_id )
/
/ returns: a Point (seed) identifying the Edge
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    sqlite3_int64 edge_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	edge_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    geom = gaiaGetEdgeSeed (accessor, edge_id);
    if (geom == NULL)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  if (msg != NULL)
	    {
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode, tiny_point);
    gaiaFreeGeomColl (geom);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_GetFaceSeed (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_GetFaceSeed ( text topology-name, int face_id )
/
/ returns: a Point (seed) identifying the Edge
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    sqlite3_int64 face_id;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom;
    GaiaTopologyAccessorPtr accessor = NULL;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (cache != NULL)
      {
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	face_id = sqlite3_value_int64 (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    geom = gaiaGetFaceSeed (accessor, face_id);
    if (geom == NULL)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  if (msg != NULL)
	    {
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode, tiny_point);
    gaiaFreeGeomColl (geom);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_DisambiguateSegmentEdges (const void *xcontext, int argc,
					  const void *xargv)
{
/* SQL function:
/ TopoGeo_DisambiguateSegmentEdges ( text topology-name )
/
/ returns: the total number of changed Edges.
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    int changed_edges = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    changed_edges = gaiaTopoGeo_DisambiguateSegmentEdges (accessor);
    if (changed_edges < 0)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (changed_edges < 0)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  if (msg != NULL)
	    {
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    sqlite3_result_int (context, changed_edges);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_UpdateSeeds (const void *xcontext, int argc, const void *xargv)
{
/* SQL function:
/ TopoGeo_UpdateSeeds ( text topology-name )
/ TopoGeo_UpdateSeeds ( text topology-name, int incremental_mode )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    int incremental_mode = 1;
    int ret;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (argc >= 2)
      {
	  if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[1]) == SQLITE_INTEGER)
	      incremental_mode = sqlite3_value_int (argv[1]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;

    gaiatopo_reset_last_error_msg (accessor);
    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeoUpdateSeeds (accessor, incremental_mode);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  if (msg != NULL)
	    {
		gaiatopo_set_last_error_msg (accessor, msg);
		sqlite3_result_error (context, msg, -1);
		return;
	    }
	  sqlite3_result_null (context);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_SnapPointToSeed (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ TopoGeo_SnapPointToSeed ( geometry point, text topology-name, double distance )
/
/ returns: a snapped point geometry
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    gaiaGeomCollPtr geom = NULL;
    gaiaGeomCollPtr result = NULL;
    double dist;
    unsigned char *p_blob;
    int n_bytes;
    int invalid = 0;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */

    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    if (sqlite3_value_type (argv[0]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[0]);
	  n_bytes = sqlite3_value_bytes (argv[0]);
      }
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
      {
	  int intval = sqlite3_value_int (argv[2]);
	  dist = intval;
      }
    else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	dist = sqlite3_value_double (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Point Geometry */
    geom =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!geom)
	goto invalid_arg;
    if (geom->FirstLinestring != NULL)
	invalid = 1;
    if (geom->FirstPolygon != NULL)
	invalid = 1;
    if (geom->FirstPoint != geom->LastPoint || geom->FirstPoint == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims (accessor, geom->Srid, geom->DimensionModel))
	goto invalid_geom;

    result = gaiaTopoGeoSnapPointToSeed (accessor, geom, dist);
    if (result == NULL)
      {
	  gaiaFreeGeomColl (geom);
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (result, &p_blob, &n_bytes, gpkg_mode,
				tiny_point);
    gaiaFreeGeomColl (geom);
    gaiaFreeGeomColl (result);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_topo:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg =
	"SQL/MM Spatial exception - invalid Point (mismatching SRID od dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_SnapLineToSeed (const void *xcontext, int argc,
				const void *xargv)
{
/* SQL function:
/ TopoGeo_SnapLineToSeed ( geometry line, text topology-name, double distance )
/
/ returns: a snapped linestring geometry
/ raises an exception on failure
*/
    const char *msg;
    const char *topo_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    gaiaGeomCollPtr geom = NULL;
    gaiaGeomCollPtr result = NULL;
    double dist;
    unsigned char *p_blob;
    int n_bytes;
    int invalid = 0;
    int gpkg_amphibious = 0;
    int gpkg_mode = 0;
    int tiny_point = 0;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */

    if (cache != NULL)
      {
	  gpkg_amphibious = cache->gpkg_amphibious_mode;
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    if (sqlite3_value_type (argv[0]) == SQLITE_BLOB)
      {
	  p_blob = (unsigned char *) sqlite3_value_blob (argv[0]);
	  n_bytes = sqlite3_value_bytes (argv[0]);
      }
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_INTEGER)
      {
	  int intval = sqlite3_value_int (argv[2]);
	  dist = intval;
      }
    else if (sqlite3_value_type (argv[2]) == SQLITE_FLOAT)
	dist = sqlite3_value_double (argv[2]);
    else
	goto invalid_arg;

/* attempting to get a Linestring Geometry */
    geom =
	gaiaFromSpatiaLiteBlobWkbEx (p_blob, n_bytes, gpkg_mode,
				     gpkg_amphibious);
    if (!geom)
	goto invalid_arg;
    if (geom->FirstPoint != NULL)
	invalid = 1;
    if (geom->FirstPolygon != NULL)
	invalid = 1;
    if (geom->FirstLinestring != geom->LastLinestring
	|| geom->FirstLinestring == NULL)
	invalid = 1;
    if (invalid)
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);
    if (!check_matching_srid_dims (accessor, geom->Srid, geom->DimensionModel))
	goto invalid_geom;

    result = gaiaTopoGeoSnapLinestringToSeed (accessor, geom, dist);
    if (result == NULL)
      {
	  gaiaFreeGeomColl (geom);
	  sqlite3_result_null (context);
	  return;
      }
    gaiaToSpatiaLiteBlobWkbEx2 (result, &p_blob, &n_bytes, gpkg_mode,
				tiny_point);
    gaiaFreeGeomColl (geom);
    gaiaFreeGeomColl (result);
    if (p_blob == NULL)
	sqlite3_result_null (context);
    else
	sqlite3_result_blob (context, p_blob, n_bytes, free);
    return;

  no_topo:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    if (result != NULL)
	gaiaFreeGeomColl (result);
    msg =
	"SQL/MM Spatial exception - invalid Line (mismatching SRID od dimensions).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

static int
topolayer_exists (GaiaTopologyAccessorPtr accessor, const char *topolayer_name)
{
/* checking if a TopoLayer is already defined */
    char *table;
    char *xtable;
    char *sql;
    int ret;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int count = 0;
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    if (topo == NULL)
	return 0;

    table = sqlite3_mprintf ("%s_topolayers", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT Count(*) FROM MAIN.\"%s\" WHERE topolayer_name = Lower(%Q)",
	 xtable, topolayer_name);
    free (xtable);
    ret =
	sqlite3_get_table (topo->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  count = atoi (results[(i * columns) + 0]);
      }
    sqlite3_free_table (results);

    if (count == 0)
	return 0;
    return 1;
}

static int
check_view (struct gaia_topology *topo, const char *db_prefix,
	    const char *table, const char *column)
{
/* checking a candidate View (or unregistered Table) for valid Geoms */
    char *sql;
    char *xcolumn;
    char *xprefix;
    char *xtable;
    int ret;
    sqlite3_stmt *stmt = NULL;
    int nulls = 0;
    int others = 0;
    int geoms = 0;
    int wrong_srids = 0;

    xcolumn = gaiaDoubleQuotedSql (column);
    xprefix = gaiaDoubleQuotedSql (db_prefix);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT \"%s\" FROM \"%s\".\"%s\"", xcolumn, xprefix,
			 xtable);
    free (xcolumn);
    free (xprefix);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("TopoGeo_CreateTopoLayer() error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		gaiaGeomCollPtr geom = NULL;
		const unsigned char *blob;
		int blob_sz;
		if (sqlite3_column_type (stmt, 0) == SQLITE_NULL)
		    nulls++;
		else if (sqlite3_column_type (stmt, 0) == SQLITE_BLOB)
		  {
		      blob = sqlite3_column_blob (stmt, 0);
		      blob_sz = sqlite3_column_bytes (stmt, 0);
		      geom = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		      if (geom)
			{
			    if (geom->Srid != topo->srid)
				wrong_srids++;
			    gaiaFreeGeomColl (geom);
			    geoms++;
			}
		      else
			  others++;
		  }
		else
		    others++;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("TopoGeo_CreateTopoLayer step error: %s",
				     sqlite3_errmsg (topo->db_handle));
		gaiatopo_set_last_error_msg ((GaiaTopologyAccessorPtr) topo,
					     msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_finalize (stmt);
    if (geoms == 0)
	return 0;
    if (others != 0)
	return 0;
    if (wrong_srids != 0)
	return 0;
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_CreateTopoLayer (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ TopoGeo_CreateTopoLayer ( text topology-name, text db-prefix, text ref_table,
/                           text ref_column, text topolayer_name )
/ TopoGeo_CreateTopoLayer ( text topology-name, text db-prefix, text ref_table,
/                           text ref_column, text topolayer_name, 
/                           boolean is_view )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *ref_table;
    const char *ref_column;
    const char *topolayer_name;
    int is_view = 0;
    char *xreftable = NULL;
    char *xrefcolumn = NULL;
    int srid;
    int family;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	ref_column = NULL;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	ref_column = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[4]) == SQLITE_TEXT)
	topolayer_name = (const char *) sqlite3_value_text (argv[4]);
    else
	goto invalid_arg;
    if (argc >= 6)
      {
	  if (sqlite3_value_type (argv[5]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[5]) == SQLITE_INTEGER)
	      is_view = sqlite3_value_int (argv[5]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

    if (is_view)
      {
	  /* checking a View (or an unregistered geo-table) */
	  struct gaia_topology *topo = (struct gaia_topology *) accessor;
	  if (ref_column == NULL)
	      goto null_view_geom;
	  if (!check_view (topo, db_prefix, ref_table, ref_column))
	      goto invalid_view;
	  xreftable = malloc (strlen (ref_table) + 1);
	  strcpy (xreftable, ref_table);
	  xrefcolumn = malloc (strlen (ref_column) + 1);
	  strcpy (xrefcolumn, ref_column);
      }
    else
      {
	  /* checking the reference GeoTable */
	  if (!gaia_check_reference_geo_table
	      (sqlite, db_prefix, ref_table, ref_column, &xreftable,
	       &xrefcolumn, &srid, &family))
	      goto no_reference;
	  if (!check_matching_srid (accessor, srid))
	      goto invalid_geom;
      }

/* checking the output TopoLayer */
    if (topolayer_exists (accessor, topolayer_name))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_CreateTopoLayer (accessor, db_prefix, xreftable, xrefcolumn,
				     topolayer_name);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    free (xreftable);
    free (xrefcolumn);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_CreateTopoLayer: invalid reference GeoTable.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_view_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"TopoGeo_CreateTopoLayer: IsView requires an explicit Geometry column-name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_view:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "TopoGeo_CreateTopoLayer: invalid reference View (invalid Geometry).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"TopoGeo_CreateTopoLayer: a TopoLayer of the same name already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_geom:
    if (xreftable != NULL)
	free (xreftable);
    if (xrefcolumn != NULL)
	free (xrefcolumn);
    msg =
	"SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_InitTopoLayer (const void *xcontext, int argc,
			       const void *xargv)
{
/* SQL function:
/ TopoGeo_InitTopoLayer ( text topology-name, text db-prefix, text ref_table,
/                         text topolayer_name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *db_prefix;
    const char *ref_table;
    const char *topolayer_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	db_prefix = "main";
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	db_prefix = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	ref_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[3]) == SQLITE_TEXT)
	topolayer_name = (const char *) sqlite3_value_text (argv[3]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the reference Table */
    if (!check_reference_table (sqlite, db_prefix, ref_table))
	goto no_reference;

/* checking the output TopoLayer */
    if (topolayer_exists (accessor, topolayer_name))
	goto err_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_InitTopoLayer (accessor, db_prefix, ref_table,
				   topolayer_name);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  no_reference:
    msg = "TopoGeo_InitTopoLayer: invalid reference Table.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_output:
    msg = "TopoGeo_InitTopoLayer: a TopoLayer of the same name already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_RemoveTopoLayer (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ TopoGeo_RemoveTopoLayer ( text topology-name, text topolayer_name )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *topolayer_name;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topolayer_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the TopoLayer */
    if (!topolayer_exists (accessor, topolayer_name))
	goto err_topolayer;

    start_topo_savepoint (sqlite, cache);
    ret = gaiaTopoGeo_RemoveTopoLayer (accessor, topolayer_name);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  const char *msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_topolayer:
    msg = "TopoGeo_RemoveTopoLayer: not existing TopoLayer.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_ExportTopoLayer (const void *xcontext, int argc,
				 const void *xargv)
{
/* SQL function:
/ TopoGeo_ExportTopoLayer ( text topology-name, text topolayer_name,
/                           text out_table )
/ TopoGeo_ExportTopoLayer ( text topology-name, text topolayer_name,
/                           text out_table, integer with-spatial-index )
/ TopoGeo_ExportTopoLayer ( text topology-name, text topolayer_name,
/                           text out_table, integer with-spatial-index,
/                           integer create-only )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *topolayer_name;
    const char *out_table;
    int with_spatial_index = 0;
    int create_only = 0;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topolayer_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (argc >= 4)
      {
	  if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[3]) == SQLITE_INTEGER)
	      with_spatial_index = sqlite3_value_int (argv[3]);
	  else
	      goto invalid_arg;
      }
    if (argc >= 5)
      {
	  if (sqlite3_value_type (argv[4]) == SQLITE_NULL)
	      goto null_arg;
	  else if (sqlite3_value_type (argv[4]) == SQLITE_INTEGER)
	      create_only = sqlite3_value_int (argv[4]);
	  else
	      goto invalid_arg;
      }

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input TopoLayer */
    if (!topolayer_exists (accessor, topolayer_name))
	goto err_topolayer;

/* checking the output GeoTable */
    if (!check_output_geo_table (sqlite, out_table))
	goto invalid_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_ExportTopoLayer (accessor, topolayer_name, out_table,
				     with_spatial_index, create_only);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_output:
    msg = "TopoGeo_ExportTopoLayer: the output GeoTable already exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_topolayer:
    sqlite3_result_error (context,
			  "TopoGeo_ExportTopoLayer: not existing TopoLayer.",
			  -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

SPATIALITE_PRIVATE void
fnctaux_TopoGeo_InsertFeatureFromTopoLayer (const void *xcontext, int argc,
					    const void *xargv)
{
/* SQL function:
/ TopoGeo_InsertFeatureFromTopoLayer ( text topology-name, 
/                                      text topolayer_name,
/                                      text out_table, integer fid )
/
/ returns: 1 on success
/ raises an exception on failure
*/
    const char *msg;
    int ret;
    const char *topo_name;
    const char *topolayer_name;
    const char *out_table;
    sqlite3_int64 fid;
    GaiaTopologyAccessorPtr accessor = NULL;
    sqlite3_context *context = (sqlite3_context *) xcontext;
    sqlite3_value **argv = (sqlite3_value **) xargv;
    sqlite3 *sqlite = sqlite3_context_db_handle (context);
    struct splite_internal_cache *cache = sqlite3_user_data (context);
    GAIA_UNUSED ();		/* LCOV_EXCL_LINE */
    if (sqlite3_value_type (argv[0]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[0]) == SQLITE_TEXT)
	topo_name = (const char *) sqlite3_value_text (argv[0]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[1]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[1]) == SQLITE_TEXT)
	topolayer_name = (const char *) sqlite3_value_text (argv[1]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[2]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[2]) == SQLITE_TEXT)
	out_table = (const char *) sqlite3_value_text (argv[2]);
    else
	goto invalid_arg;
    if (sqlite3_value_type (argv[3]) == SQLITE_NULL)
	goto null_arg;
    else if (sqlite3_value_type (argv[3]) == SQLITE_INTEGER)
	fid = sqlite3_value_int64 (argv[3]);
    else
	goto invalid_arg;

/* attempting to get a Topology Accessor */
    accessor = gaiaGetTopology (sqlite, cache, topo_name);
    if (accessor == NULL)
	goto no_topo;
    gaiatopo_reset_last_error_msg (accessor);

/* checking the input TopoLayer */
    if (!topolayer_exists (accessor, topolayer_name))
	goto err_topolayer;

/* checking the output GeoTable */
    if (check_output_geo_table (sqlite, out_table))
	goto invalid_output;

    start_topo_savepoint (sqlite, cache);
    ret =
	gaiaTopoGeo_InsertFeatureFromTopoLayer (accessor, topolayer_name,
						out_table, fid);
    if (!ret)
	rollback_topo_savepoint (sqlite, cache);
    else
	release_topo_savepoint (sqlite, cache);
    if (!ret)
      {
	  msg = gaiaGetRtTopoErrorMsg (cache);
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_result_error (context, msg, -1);
	  return;
      }
    sqlite3_result_int (context, 1);
    return;

  no_topo:
    msg = "SQL/MM Spatial exception - invalid topology name.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_output:
    msg =
	"TopoGeo_InsertFeatureFromTopoLayer: the output GeoTable does not exists.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  err_topolayer:
    msg = "TopoGeo_InsertFeatureFromTopoLayer: non-existing TopoLayer.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  null_arg:
    msg = "SQL/MM Spatial exception - null argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;

  invalid_arg:
    msg = "SQL/MM Spatial exception - invalid argument.";
    gaiatopo_set_last_error_msg (accessor, msg);
    sqlite3_result_error (context, msg, -1);
    return;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/gaia_topostmts.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
/*

 gaia_topostmts.c -- implementation of Topology prepared statements
    
 version 4.3, 2015 July 18

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(Topology support) 

CIG: 6038019AE5

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaiaaux.h>
#include <spatialite/gaia_topology.h>

#include <spatialite_private.h>

#include <librttopo.h>

#include "topology_private.h"

#define GAIA_UNUSED() if (argc || argv) argc = argc;


TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getNodeWithinDistance2D (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getNodeWithinDistance2D prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT node_id FROM MAIN.\"%s\" "
			 "WHERE ST_Distance(geom, MakePoint(?, ?)) <= ? AND ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = BuildCircleMBR(?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getNodeWithinDistance2D error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getNodeWithinBox2D (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getNodeWithinBox2D prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT node_id FROM MAIN.\"%s\" WHERE ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = BuildMBR(?, ?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getNodeWithinBox2D error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }
    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_insertNodes (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the insertNodes prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (node_id, containing_face, geom) "
	 "VALUES (?, ?, ?)", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_insertNodes error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getEdgeWithinDistance2D (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getEdgeWithinDistance2D prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT edge_id FROM MAIN.\"%s\" "
			 "WHERE ST_Distance(geom, MakePoint(?, ?)) <= ? AND ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = BuildCircleMBR(?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getEdgeWithinDistance2D error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getEdgeWithinBox2D (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getEdgeWithinBox2D prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf ("SELECT edge_id FROM MAIN.\"%s\" WHERE ROWID IN ("
			 "SELECT ROWID FROM SpatialIndex WHERE f_table_name = %Q AND "
			 "f_geometry_column = 'geom' AND search_frame = BuildMBR(?, ?, ?, ?))",
			 xtable, table);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getEdgeWithinBox2D error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getAllEdges (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getAllEdges prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("SELECT edge_id, start_node, end_node, left_face, right_face, "
	 "next_left_edge, next_right_edge, geom  FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getAllEdges error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }
    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getFaceContainingPoint_1 (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getFaceContainingPoint #1 prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *rtree;
    char *xrtree;
    if (topo == NULL)
	return NULL;

    rtree = sqlite3_mprintf ("idx_%s_face_mbr", topo->topology_name);
    xrtree = gaiaDoubleQuotedSql (rtree);
    sql =
	sqlite3_mprintf
	("SELECT pkid FROM MAIN.\"%s\" WHERE xmin <= ? AND xmax >= ? AND ymin <= ? AND ymax >= ?",
	 xrtree);
    free (xrtree);
    sqlite3_free (rtree);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("Prepare_getFaceContainingPoint #1 error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getFaceContainingPoint_2 (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getFaceContainingPoint #2 prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    if (topo == NULL)
	return NULL;

    sql =
	sqlite3_mprintf
	("SELECT ST_Contains(ST_GetFaceGeometry(%Q, ?), MakePoint(?, ?))",
	 topo->topology_name);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf
	      ("Prepare_getFaceContainingPoint #2 error: \"%s\"",
	       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_insertEdges (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the insertEdges prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (edge_id, start_node, end_node, left_face, "
	 "right_face, next_left_edge, next_right_edge, geom) "
	 "VALUES (?, ?, ?, ?, ?, ?, ?, ?)", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_insertEdges error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getNextEdgeId (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getNextEdgeId prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    if (topo == NULL)
	return NULL;

    sql =
	sqlite3_mprintf
	("SELECT next_edge_id FROM MAIN.topologies WHERE Lower(topology_name) = Lower(%Q)",
	 topo->topology_name);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getNextEdgeId error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_setNextEdgeId (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the setNextEdgeId prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    if (topo == NULL)
	return NULL;

    sql =
	sqlite3_mprintf
	("UPDATE MAIN.topologies SET next_edge_id = next_edge_id + 1 "
	 "WHERE Lower(topology_name) = Lower(%Q)", topo->topology_name);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_setNextEdgeId error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getRingEdges (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getRingEdges prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_edge", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("WITH RECURSIVE edgering AS ("
			 "SELECT ? as signed_edge_id, edge_id, next_left_edge, next_right_edge "
			 "FROM MAIN.\"%s\" WHERE edge_id = ABS(?) UNION SELECT CASE WHEN "
			 "p.signed_edge_id < 0 THEN p.next_right_edge ELSE p.next_left_edge END, "
			 "e.edge_id, e.next_left_edge, e.next_right_edge "
			 "FROM MAIN.\"%s\" AS e, edgering AS p WHERE "
			 "e.edge_id = CASE WHEN p.signed_edge_id < 0 THEN "
			 "ABS(p.next_right_edge) ELSE ABS(p.next_left_edge) END ) "
			 "SELECT * FROM edgering", xtable, xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getRingEdges error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_insertFaces (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the insertFaces prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("INSERT INTO MAIN.\"%s\" (face_id, mbr) VALUES (?, BuildMBR(?, ?, ?, ?, %d))",
	 xtable, topo->srid);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_insertFaces error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_updateFacesById (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the updateFacesById prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("UPDATE MAIN.\"%s\" SET mbr = BuildMBR(?, ?, ?, ?, %d) WHERE face_id = ?",
	 xtable, topo->srid);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_updateFacesById error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_deleteFacesById (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the deleteFacesById prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_face", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE face_id = ?", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_deleteFacesById error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_deleteNodesById (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the deleteNodesById prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("%s_node", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE node_id = ?", xtable);
    free (xtable);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_deleteNodesById error: \"%s\"",
				       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }

    return stmt;
}

TOPOLOGY_PRIVATE sqlite3_stmt *
do_create_stmt_getFaceWithinBox2D (GaiaTopologyAccessorPtr accessor)
{
/* attempting to create the getFaceWithinBox2D prepared statement */
    struct gaia_topology *topo = (struct gaia_topology *) accessor;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *table;
    char *xtable;
    if (topo == NULL)
	return NULL;

    table = sqlite3_mprintf ("idx_%s_face_mbr", topo->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sql =
	sqlite3_mprintf
	("SELECT pkid, xmin, ymin, xmax, ymax FROM MAIN.\"%s\" "
	 "WHERE xmin <= ? AND xmax >= ? AND ymin <= ? AND ymax >= ?", xtable);
    free (xtable);
    sqlite3_free (table);
    ret = sqlite3_prepare_v2 (topo->db_handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getFaceWithinBox2D error: \"%s\"",
			       sqlite3_errmsg (topo->db_handle));
	  gaiatopo_set_last_error_msg (accessor, msg);
	  sqlite3_free (msg);
	  return NULL;
      }
    return stmt;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/lwn_network.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
/*

 lwn_network.c -- Topology-Network abstract multi-backend interface
    
 version 4.3, 2015 August 13

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <librttopo_geom.h>

#include "lwn_network.h"
#include "lwn_network_private.h"

#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>

#include <librttopo_geom.h>

#include <spatialite_private.h>

/*********************************************************************
 *
 * Backend iface
 *
 ********************************************************************/

LWN_BE_IFACE *
lwn_CreateBackendIface (const RTCTX * ctx, const LWN_BE_DATA * data)
{
    LWN_BE_IFACE *iface = malloc (sizeof (LWN_BE_IFACE));
    iface->ctx = ctx;
    iface->data = data;
    iface->cb = NULL;
    iface->errorMsg = NULL;
    return iface;
}

void
lwn_BackendIfaceRegisterCallbacks (LWN_BE_IFACE * iface,
				   const LWN_BE_CALLBACKS * cb)
{
    iface->cb = cb;
}

void
lwn_FreeBackendIface (LWN_BE_IFACE * iface)
{
    if (iface == NULL)
	return;
    if (iface->errorMsg != NULL)
	free (iface->errorMsg);
    free (iface);
}

/*********************************************************************
 *
 * Backend wrappers
 *
 ********************************************************************/

#define CHECKCB(be, method) do { \
  if ( ! (be)->cb || ! (be)->cb->method ) \
  lwn_SetErrorMsg(be, "Callback " # method " not registered by backend"); \
} while (0)

#define NETCB0(be, method) \
  CHECKCB(be, method);\
  return (be)->cb->method((be)->data)

#define NETCB1(be, method, a1) \
  CHECKCB(be, method);\
  return (be)->cb->method((be)->data, a1)

#define NETCBT0(to, method) \
  CHECKCB((to)->be_iface, method);\
  return (to)->be_iface->cb->method((to)->be_net)

#define NETCBT1(to, method, a1) \
  CHECKCB((to)->be_iface, method);\
  return (to)->be_iface->cb->method((to)->be_net, a1)

#define NETCBT2(to, method, a1, a2) \
  CHECKCB((to)->be_iface, method);\
  return (to)->be_iface->cb->method((to)->be_net, a1, a2)

#define NETCBT3(to, method, a1, a2, a3) \
  CHECKCB((to)->be_iface, method);\
  return (to)->be_iface->cb->method((to)->be_net, a1, a2, a3)

#define NETCBT4(to, method, a1, a2, a3, a4) \
  CHECKCB((to)->be_iface, method);\
  return (to)->be_iface->cb->method((to)->be_net, a1, a2, a3, a4)

#define NETCBT5(to, method, a1, a2, a3, a4, a5) \
  CHECKCB((to)->be_iface, method);\
  return (to)->be_iface->cb->method((to)->be_net, a1, a2, a3, a4, a5)


static LWN_BE_NETWORK *
lwn_be_loadNetworkByName (LWN_BE_IFACE * be, const char *name)
{
    NETCB1 (be, loadNetworkByName, name);
}

static int
lwn_be_netGetSRID (LWN_NETWORK * net)
{
    NETCBT0 (net, netGetSRID);
}

static int
lwn_be_netHasZ (LWN_NETWORK * net)
{
    NETCBT0 (net, netHasZ);
}

static int
lwn_be_netIsSpatial (LWN_NETWORK * net)
{
    NETCBT0 (net, netIsSpatial);
}

static int
lwn_be_netAllowCoincident (LWN_NETWORK * net)
{
    NETCBT0 (net, netAllowCoincident);
}

static const void *
lwn_be_netGetGEOS (LWN_NETWORK * net)
{
    NETCBT0 (net, netGetGEOS);
}

static int
lwn_be_freeNetwork (LWN_NETWORK * net)
{
    NETCBT0 (net, freeNetwork);
}

static LWN_NET_NODE *
lwn_be_getNetNodeWithinDistance2D (const LWN_NETWORK * net,
				   const LWN_POINT * pt, double dist,
				   int *numelems, int fields, int limit)
{
    NETCBT5 (net, getNetNodeWithinDistance2D, pt, dist, numelems, fields,
	     limit);
}

static LWN_LINK *
lwn_be_getLinkWithinDistance2D (const LWN_NETWORK * net, const LWN_POINT * pt,
				double dist, int *numelems, int fields,
				int limit)
{
    NETCBT5 (net, getLinkWithinDistance2D, pt, dist, numelems, fields, limit);
}

static int
lwn_be_updateNetNodesById (const LWN_NETWORK * net,
			   const LWN_NET_NODE * nodes, int numnodes,
			   int upd_fields)
{
    NETCBT3 (net, updateNetNodesById, nodes, numnodes, upd_fields);
}

static int
lwn_be_insertNetNodes (const LWN_NETWORK * net, LWN_NET_NODE * node,
		       int numelems)
{
    NETCBT2 (net, insertNetNodes, node, numelems);
}

static LWN_NET_NODE *
lwn_be_getNetNodeById (const LWN_NETWORK * net, const LWN_ELEMID * ids,
		       int *numelems, int fields)
{
    NETCBT3 (net, getNetNodeById, ids, numelems, fields);
}

static LWN_LINK *
lwn_be_getLinkByNetNode (const LWN_NETWORK * net, const LWN_ELEMID * ids,
			 int *numelems, int fields)
{
    NETCBT3 (net, getLinkByNetNode, ids, numelems, fields);
}

static int
lwn_be_deleteNetNodesById (const LWN_NETWORK * net, const LWN_ELEMID * ids,
			   int numelems)
{
    NETCBT2 (net, deleteNetNodesById, ids, numelems);
}

static LWN_ELEMID
lwn_be_getNextLinkId (const LWN_NETWORK * net)
{
    NETCBT0 (net, getNextLinkId);
}

static LWN_NET_NODE *
lwn_be_getNetNodeWithinBox2D (const LWN_NETWORK * net,
			      const LWN_BBOX * box, int *numelems, int fields,
			      int limit)
{
    NETCBT4 (net, getNetNodeWithinBox2D, box, numelems, fields, limit);
}

static int
lwn_be_insertLinks (const LWN_NETWORK * net, LWN_LINK * link, int numelems)
{
    NETCBT2 (net, insertLinks, link, numelems);
}

static int
lwn_be_updateLinksById (const LWN_NETWORK * net, LWN_LINK * links, int numlinks,
			int upd_fields)
{
    NETCBT3 (net, updateLinksById, links, numlinks, upd_fields);
}

static LWN_LINK *
lwn_be_getLinkById (const LWN_NETWORK * net, const LWN_ELEMID * ids,
		    int *numelems, int fields)
{
    NETCBT3 (net, getLinkById, ids, numelems, fields);
}

static int
lwn_be_deleteLinksById (const LWN_NETWORK * net, const LWN_ELEMID * ids,
			int numelems)
{
    NETCBT2 (net, deleteLinksById, ids, numelems);
}


/************************************************************************
 *
 * API implementation
 *
 ************************************************************************/

LWN_NETWORK *
lwn_LoadNetwork (LWN_BE_IFACE * iface, const char *name)
{
    LWN_BE_NETWORK *be_net;
    LWN_NETWORK *net;

    be_net = lwn_be_loadNetworkByName (iface, name);
    if (!be_net)
      {
	  lwn_SetErrorMsg (iface, "Could not load network from backend");
	  return NULL;
      }
    net = malloc (sizeof (LWN_NETWORK));
    net->be_iface = iface;
    net->be_net = be_net;
    net->srid = lwn_be_netGetSRID (net);
    net->hasZ = lwn_be_netHasZ (net);
    net->spatial = lwn_be_netIsSpatial (net);
    net->allowCoincident = lwn_be_netAllowCoincident (net);
    net->geos_handle = lwn_be_netGetGEOS (net);
    return net;
}

void
lwn_FreeNetwork (LWN_NETWORK * net)
{
    if (!lwn_be_freeNetwork (net))
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "Could not release backend topology memory");
      }
    free (net);
}

LWN_POINT *
lwn_create_point2d (int srid, double x, double y)
{
    LWN_POINT *point = malloc (sizeof (LWN_POINT));
    point->srid = srid;
    point->has_z = 0;
    point->x = x;
    point->y = y;
    return point;
}

LWN_POINT *
lwn_create_point3d (int srid, double x, double y, double z)
{
    LWN_POINT *point = malloc (sizeof (LWN_POINT));
    point->srid = srid;
    point->has_z = 1;
    point->x = x;
    point->y = y;
    point->z = z;
    return point;
}

void
lwn_free_point (LWN_POINT * point)
{
    if (point == NULL)
	return;
    free (point);
}

LWN_LINE *
lwn_alloc_line (int points, int srid, int hasz)
{
    LWN_LINE *line = malloc (sizeof (LWN_LINE));
    line->points = points;
    line->srid = srid;
    line->has_z = hasz;
    line->x = malloc (sizeof (double) * points);
    line->y = malloc (sizeof (double) * points);
    if (hasz)
	line->z = malloc (sizeof (double) * points);
    else
	line->z = NULL;
    return line;
}

void
lwn_free_line (LWN_LINE * line)
{
    if (line == NULL)
	return;
    if (line->x != NULL)
	free (line->x);
    if (line->y != NULL)
	free (line->y);
    if (line->z != NULL && line->has_z)
	free (line->z);
    free (line);
}

void
lwn_ResetErrorMsg (LWN_BE_IFACE * iface)
{
    if (iface == NULL)
	return;
    if (iface->errorMsg != NULL)
	free (iface->errorMsg);
    iface->errorMsg = NULL;
}

void
lwn_SetErrorMsg (LWN_BE_IFACE * iface, const char *message)
{
    int len;
    if (iface == NULL)
	return;
    if (iface->errorMsg != NULL)
	free (iface->errorMsg);
    iface->errorMsg = NULL;
    if (message == NULL)
	return;
    len = strlen (message);
    iface->errorMsg = malloc (len + 1);
    strcpy (iface->errorMsg, message);
}

const char *
lwn_GetErrorMsg (LWN_BE_IFACE * iface)
{
    if (iface == NULL)
	return NULL;
    return iface->errorMsg;
}

static void
_lwn_release_nodes (LWN_NET_NODE * nodes, int num_nodes)
{
    int i;
    for (i = 0; i < num_nodes; ++i)
      {
	  if (nodes[i].geom != NULL)
	      lwn_free_point (nodes[i].geom);
      }
    free (nodes);
}

static void
_lwn_release_links (LWN_LINK * links, int num_links)
{
    int i;
    for (i = 0; i < num_links; ++i)
      {
	  if (links[i].geom != NULL)
	      lwn_free_line (links[i].geom);
      }
    free (links);
}

LWN_ELEMID
lwn_AddIsoNetNode (LWN_NETWORK * net, LWN_POINT * pt)
{
    LWN_NET_NODE node;

    if (net->spatial && net->allowCoincident == 0)
      {
	  if (lwn_be_existsCoincidentNode (net, pt))
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - coincident node.");
		return -1;
	    }
	  if (lwn_be_existsLinkIntersectingPoint (net, pt))
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - link crosses node.");
		return -1;
	    }
      }

    node.node_id = -1;
    node.geom = pt;
    if (!lwn_be_insertNetNodes (net, &node, 1))
	return -1;

    return node.node_id;
}

static LWN_NET_NODE *
_lwn_GetIsoNetNode (LWN_NETWORK * net, LWN_ELEMID nid)
{
    LWN_NET_NODE *node;
    int n = 1;
    LWN_LINK *links;
    int nlinks;

    node = lwn_be_getNetNodeById (net, &nid, &n, LWN_COL_NODE_NODE_ID);
    if (n < 0)
	return 0;
    if (n < 1)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - non-existent node.");
	  return 0;
      }

    nlinks = 1;
    links = lwn_be_getLinkByNetNode (net, &nid, &nlinks, LWN_COL_LINK_LINK_ID);
    if (nlinks < 0)
	return 0;
    if (nlinks != 0)
      {
	  free (node);
	  _lwn_release_links (links, nlinks);
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - not isolated node.");
	  return 0;
      }

    return node;
}

static LWN_LINK *
_lwn_GetLink (LWN_NETWORK * net, LWN_ELEMID link_id)
{
    LWN_LINK *link;
    int n = 1;

    link = lwn_be_getLinkById (net, &link_id, &n, LWN_COL_LINK_LINK_ID);
    if (n < 0)
	return 0;
    if (n < 1)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - non-existent link.");
	  return 0;
      }
    return link;
}

static int
line2bbox (const LWN_LINE * line, LWN_BBOX * bbox)
{
    int iv;
    if (line == NULL)
	return 0;

    bbox->min_x = DBL_MAX;
    bbox->min_y = DBL_MAX;
    bbox->max_x = -DBL_MAX;
    bbox->max_y = -DBL_MAX;

    for (iv = 0; iv < line->points; iv++)
      {
	  double x = line->x[iv];
	  double y = line->y[iv];
	  if (x < bbox->min_x)
	      bbox->min_x = x;
	  if (y < bbox->min_y)
	      bbox->min_y = y;
	  if (x > bbox->max_x)
	      bbox->max_x = x;
	  if (y > bbox->max_y)
	      bbox->max_y = y;
      }

    return 1;
}


static GEOSGeometry *
point2geos (GEOSContextHandle_t handle, const LWN_POINT * point)
{
    GEOSGeometry *geos = NULL;
    GEOSCoordSequence *cs;
    cs = GEOSCoordSeq_create_r (handle, 1, 2);
    GEOSCoordSeq_setX_r (handle, cs, 0, point->x);
    GEOSCoordSeq_setY_r (handle, cs, 0, point->y);
    geos = GEOSGeom_createPoint_r (handle, cs);
    return geos;
}

static GEOSGeometry *
line2geos (GEOSContextHandle_t handle, const LWN_LINE * line)
{
    int iv;
    GEOSGeometry *geos = NULL;
    GEOSCoordSequence *cs;
    cs = GEOSCoordSeq_create_r (handle, line->points, 2);
    for (iv = 0; iv < line->points; iv++)
      {
	  GEOSCoordSeq_setX_r (handle, cs, iv, line->x[iv]);
	  GEOSCoordSeq_setY_r (handle, cs, iv, line->y[iv]);
      }
    geos = GEOSGeom_createLineString_r (handle, cs);
    return geos;
}

/* Check that a link does not cross an existing node
 *
 * Return -1 on cross or error, 0 if everything is fine.
 * Note that before returning -1, lwerror is invoked...
 */
static int
_lwn_CheckLinkCrossing (LWN_NETWORK * net,
			LWN_ELEMID start_node, LWN_ELEMID end_node,
			const LWN_LINE * geom)
{
    int i, num_nodes;
    LWN_NET_NODE *nodes;
    LWN_BBOX linkbbox;
    GEOSContextHandle_t handle = (GEOSContextHandle_t) (net->geos_handle);
    GEOSGeometry *linkgg;
    const GEOSPreparedGeometry *prepared_link;

    linkgg = line2geos (handle, geom);
    if (!linkgg)
	return -1;
    prepared_link = GEOSPrepare_r (handle, linkgg);
    if (!prepared_link)
	return -1;
    if (!line2bbox (geom, &linkbbox))
      {
	  GEOSPreparedGeom_destroy_r (handle, prepared_link);
	  GEOSGeom_destroy_r (handle, linkgg);
	  return -1;
      }

    /* loop over each node within the edge's gbox */
    nodes = lwn_be_getNetNodeWithinBox2D (net, &linkbbox, &num_nodes,
					  LWN_COL_NODE_ALL, 0);
    if (num_nodes == -1)
      {
	  GEOSPreparedGeom_destroy_r (handle, prepared_link);
	  GEOSGeom_destroy_r (handle, linkgg);
	  return -1;
      }
    for (i = 0; i < num_nodes; ++i)
      {
	  LWN_NET_NODE *node = &(nodes[i]);
	  GEOSGeometry *nodegg;
	  int contains;
	  if (node->node_id == start_node)
	      continue;
	  if (node->node_id == end_node)
	      continue;
	  /* check if the link contains this node (not on boundary) */
	  nodegg = point2geos (handle, node->geom);
	  /* ST_RelateMatch(rec.relate, 'T********') */
	  contains = GEOSPreparedContains_r (handle, prepared_link, nodegg);
	  GEOSGeom_destroy_r (handle, nodegg);
	  if (contains == 2)
	    {
		GEOSPreparedGeom_destroy_r (handle, prepared_link);
		GEOSGeom_destroy_r (handle, linkgg);
		_lwn_release_nodes (nodes, num_nodes);
		lwn_SetErrorMsg (net->be_iface,
				 "GEOS exception on PreparedContains");
		return -1;
	    }
	  if (contains)
	    {
		GEOSPreparedGeom_destroy_r (handle, prepared_link);
		GEOSGeom_destroy_r (handle, linkgg);
		_lwn_release_nodes (nodes, num_nodes);
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - geometry crosses a node.");
		return -1;
	    }
      }
    if (nodes)
	_lwn_release_nodes (nodes, num_nodes);
    GEOSPreparedGeom_destroy_r (handle, prepared_link);
    GEOSGeom_destroy_r (handle, linkgg);

    return 0;
}

int
lwn_MoveIsoNetNode (LWN_NETWORK * net, LWN_ELEMID nid, const LWN_POINT * pt)
{
    LWN_NET_NODE *node;
    int ret;

    node = _lwn_GetIsoNetNode (net, nid);
    if (!node)
	return -1;

    if (net->spatial && net->allowCoincident == 0)
      {
	  if (lwn_be_existsCoincidentNode (net, pt))
	    {
		_lwn_release_nodes (node, 1);
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - coincident node.");
		return -1;
	    }

	  if (lwn_be_existsLinkIntersectingPoint (net, pt))
	    {
		_lwn_release_nodes (node, 1);
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - link crosses node.");
		return -1;
	    }
      }

    node->node_id = nid;
    if (node->geom)
	lwn_free_point (node->geom);
    node->geom = (LWN_POINT *) pt;
    ret = lwn_be_updateNetNodesById (net, node, 1, LWN_COL_NODE_GEOM);
    node->geom = NULL;
    _lwn_release_nodes (node, 1);
    if (ret == -1)
	return -1;

    return 0;
}

int
lwn_RemIsoNetNode (LWN_NETWORK * net, LWN_ELEMID nid)
{
    LWN_NET_NODE *node;
    int n = 1;

    node = _lwn_GetIsoNetNode (net, nid);
    if (!node)
	return -1;

    n = lwn_be_deleteNetNodesById (net, &nid, n);
    if (n == -1)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - not isolated node.");
	  return -1;
      }
    if (n != 1)
	return -1;

    free (node);
    return 0;
}

static int
getLineFirstPoint (const LWN_LINE * geom, LWN_POINT * pt)
{
    if (geom == NULL)
	return 0;
    pt->srid = geom->srid;
    pt->has_z = geom->has_z;
    pt->x = geom->x[0];
    pt->y = geom->y[0];
    if (geom->has_z)
	pt->z = geom->z[0];
    return 1;
}

static int
getLineLastPoint (const LWN_LINE * geom, LWN_POINT * pt)
{
    int iv;
    if (geom == NULL)
	return 0;
    iv = geom->points - 1;
    pt->srid = geom->srid;
    pt->has_z = geom->has_z;
    pt->x = geom->x[iv];
    pt->y = geom->y[iv];
    if (geom->has_z)
	pt->z = geom->z[iv];
    return 1;
}

static int
point_same_2d (LWN_POINT * pt1, LWN_POINT * pt2)
{
    if (pt1->x == pt2->x && pt1->y == pt2->y)
	return 1;
    return 0;
}

LWN_ELEMID
lwn_AddLink (LWN_NETWORK * net,
	     LWN_ELEMID startNode, LWN_ELEMID endNode, LWN_LINE * geom)
{
    int num_nodes;
    int i;
    LWN_LINK newlink;
    LWN_NET_NODE *endpoints;
    LWN_ELEMID *node_ids;
    LWN_POINT pt;

    /* NOT IN THE SPECS:
     * A closed link makes no sense and should always be forbidden
     */
    if (startNode == endNode)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - self-closed links are forbidden.");
	  return -1;
      }

    /*
     * Check for:
     *    existence of nodes
     * Extract:
     *    nodes geoms
     */
    num_nodes = 2;
    node_ids = malloc (sizeof (LWN_ELEMID) * num_nodes);
    node_ids[0] = startNode;
    node_ids[1] = endNode;
    endpoints = lwn_be_getNetNodeById (net, node_ids, &num_nodes,
				       LWN_COL_NODE_ALL);
    if (num_nodes < 0)
	return -1;
    else if (num_nodes < 2)
      {
	  if (num_nodes)
	      _lwn_release_nodes (endpoints, num_nodes);
	  free (node_ids);
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - non-existent node.");
	  return -1;
      }
    for (i = 0; i < num_nodes; ++i)
      {
	  const LWN_NET_NODE *n = &(endpoints[i]);
	  if (net->spatial)
	    {
		if (n->geom == NULL)
		    return -1;
		if (n->node_id == startNode)
		  {
		      /* l) Check that start point of acurve match start node geoms. */
		      if (!getLineFirstPoint (geom, &pt))
			  return -1;
		      if (!point_same_2d (&pt, n->geom))
			{
			    _lwn_release_nodes (endpoints, num_nodes);
			    free (node_ids);
			    lwn_SetErrorMsg (net->be_iface,
					     "SQL/MM Spatial exception - "
					     "start node not geometry start point.");
			    return -1;
			}
		  }
		else
		  {
		      /* m) Check that end point of acurve match end node geoms. */
		      if (!getLineLastPoint (geom, &pt))
			  return -1;
		      if (!point_same_2d (&pt, n->geom))
			{
			    _lwn_release_nodes (endpoints, num_nodes);
			    free (node_ids);
			    lwn_SetErrorMsg (net->be_iface,
					     "SQL/MM Spatial exception - "
					     "end node not geometry end point.");
			    return -1;
			}
		  }
	    }
      }
    _lwn_release_nodes (endpoints, num_nodes);
    free (node_ids);

    if (net->spatial && net->allowCoincident == 0)
      {
	  if (_lwn_CheckLinkCrossing (net, startNode, endNode, geom))
	      return -1;
      }

    /*
     * All checks passed, time to prepare the new link
     */

    newlink.link_id = lwn_be_getNextLinkId (net);
    if (newlink.link_id == -1)
	return -1;

    newlink.start_node = startNode;
    newlink.end_node = endNode;
    newlink.geom = geom;

    if (!lwn_be_insertLinks (net, &newlink, 1))
	return -1;

    return newlink.link_id;
}

int
lwn_ChangeLinkGeom (LWN_NETWORK * net, LWN_ELEMID link, const LWN_LINE * geom)
{
    int num_nodes;
    int i;
    LWN_LINK newlink;
    LWN_LINK *oldlink;
    LWN_NET_NODE *endpoints;
    LWN_ELEMID *node_ids;
    LWN_POINT pt;
    LWN_ELEMID startNode;
    LWN_ELEMID endNode;
    int ret;

    i = 1;
    oldlink =
	lwn_be_getLinkById (net, &link, &i,
			    LWN_COL_LINK_START_NODE | LWN_COL_LINK_END_NODE);
    if (!oldlink)
      {
	  if (i == -1)
	      return -1;
	  else if (i == 0)
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - non-existent link.");
		return -1;
	    }
      }
    startNode = oldlink->start_node;
    endNode = oldlink->end_node;
    _lwn_release_links (oldlink, 1);

    /*
     * Check for:
     *    existence of nodes
     * Extract:
     *    nodes geoms
     */
    num_nodes = 2;
    node_ids = malloc (sizeof (LWN_ELEMID) * num_nodes);
    node_ids[0] = startNode;
    node_ids[1] = endNode;
    endpoints = lwn_be_getNetNodeById (net, node_ids, &num_nodes,
				       LWN_COL_NODE_ALL);
    if (num_nodes < 0)
	return -1;
    else if (num_nodes < 2)
      {
	  if (num_nodes)
	      _lwn_release_nodes (endpoints, num_nodes);
	  free (node_ids);
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - non-existent node.");
	  return -1;
      }
    for (i = 0; i < num_nodes; ++i)
      {
	  const LWN_NET_NODE *n = &(endpoints[i]);
	  if (net->spatial)
	    {
		if (n->geom == NULL)
		    return -1;
		if (n->node_id == startNode)
		  {
		      /* l) Check that start point of acurve match start node geoms. */
		      if (!getLineFirstPoint (geom, &pt))
			  return -1;
		      if (!point_same_2d (&pt, n->geom))
			{
			    _lwn_release_nodes (endpoints, num_nodes);
			    free (node_ids);
			    lwn_SetErrorMsg (net->be_iface,
					     "SQL/MM Spatial exception - "
					     "start node not geometry start point.");
			    return -1;
			}
		  }
		else
		  {
		      /* m) Check that end point of acurve match end node geoms. */
		      if (!getLineLastPoint (geom, &pt))
			  return -1;
		      if (!point_same_2d (&pt, n->geom))
			{
			    _lwn_release_nodes (endpoints, num_nodes);
			    free (node_ids);
			    lwn_SetErrorMsg (net->be_iface,
					     "SQL/MM Spatial exception - "
					     "end node not geometry end point.");
			    return -1;
			}
		  }
	    }
      }
    _lwn_release_nodes (endpoints, num_nodes);
    free (node_ids);

    if (net->spatial && net->allowCoincident == 0)
      {
	  if (_lwn_CheckLinkCrossing (net, startNode, endNode, geom))
	      return -1;
      }

    /*
     * All checks passed, time to prepare the new link
     */

    newlink.link_id = link;
    newlink.start_node = startNode;
    newlink.end_node = endNode;
    newlink.geom = (LWN_LINE *) geom;

    ret = lwn_be_updateLinksById (net, &newlink, 1, LWN_COL_LINK_GEOM);
    if (ret == -1)
	return -1;
    else if (ret == 0)
	return -1;

    return 0;
}

int
lwn_RemoveLink (LWN_NETWORK * net, LWN_ELEMID link_id)
{
    LWN_LINK *link;
    int n = 1;

    link = _lwn_GetLink (net, link_id);
    if (!link)
	return -1;

    n = lwn_be_deleteLinksById (net, &link_id, n);
    if (n != 1)
	return -1;

    free (link);
    return 0;
}

LWN_INT64
lwn_NewLogLinkSplit (LWN_NETWORK * net, LWN_ELEMID link)
{
    int i;
    LWN_LINK *oldlink;
    LWN_LINK newlink[2];
    LWN_ELEMID startNode;
    LWN_ELEMID endNode;
    LWN_NET_NODE newnode;

    i = 1;
    oldlink =
	lwn_be_getLinkById (net, &link, &i,
			    LWN_COL_LINK_START_NODE | LWN_COL_LINK_END_NODE);
    if (!oldlink)
      {
	  if (i == -1)
	      return -1;
	  else if (i == 0)
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - non-existent link.");
		return -1;
	    }
      }
    startNode = oldlink->start_node;
    endNode = oldlink->end_node;
    _lwn_release_links (oldlink, 1);

/* inserting a new NetNode */
    newnode.node_id = -1;
    newnode.geom = NULL;
    if (!lwn_be_insertNetNodes (net, &newnode, 1))
	return -1;

/* deleting the original Link */
    i = lwn_be_deleteLinksById (net, &link, 1);
    if (i != 1)
	return -1;

/* inserting two new Links */
    newlink[0].link_id = lwn_be_getNextLinkId (net);
    if (newlink[0].link_id == -1)
	return -1;
    newlink[1].link_id = lwn_be_getNextLinkId (net);
    if (newlink[1].link_id == -1)
	return -1;

    newlink[0].start_node = startNode;
    newlink[0].end_node = newnode.node_id;
    newlink[0].geom = NULL;
    newlink[1].start_node = newnode.node_id;
    newlink[1].end_node = endNode;
    newlink[1].geom = NULL;

    if (!lwn_be_insertLinks (net, newlink, 2))
	return -1;

    return newnode.node_id;
}

LWN_INT64
lwn_ModLogLinkSplit (LWN_NETWORK * net, LWN_ELEMID link)
{
    int i;
    LWN_LINK *oldlink;
    LWN_LINK newlink;
    LWN_ELEMID startNode;
    LWN_ELEMID endNode;
    LWN_NET_NODE newnode;

    i = 1;
    oldlink =
	lwn_be_getLinkById (net, &link, &i,
			    LWN_COL_LINK_START_NODE | LWN_COL_LINK_END_NODE);
    if (!oldlink)
      {
	  if (i == -1)
	      return -1;
	  else if (i == 0)
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - non-existent link.");
		return -1;
	    }
      }
    startNode = oldlink->start_node;
    endNode = oldlink->end_node;
    _lwn_release_links (oldlink, 1);

/* inserting a new NetNode */
    newnode.node_id = -1;
    newnode.geom = NULL;
    if (!lwn_be_insertNetNodes (net, &newnode, 1))
	return -1;

/* update the original Link */
    newlink.link_id = link;
    newlink.start_node = startNode;
    newlink.end_node = newnode.node_id;
    newlink.geom = NULL;
    if (!lwn_be_updateLinksById (net, &newlink, 1, LWN_COL_LINK_END_NODE))
	return -1;

/* inserting a new Link */
    newlink.link_id = lwn_be_getNextLinkId (net);
    if (newlink.link_id == -1)
	return -1;
    newlink.start_node = newnode.node_id;
    newlink.end_node = endNode;
    newlink.geom = NULL;

    if (!lwn_be_insertLinks (net, &newlink, 1))
	return -1;

    return newnode.node_id;
}

static int
geo_link_split (LWN_NETWORK * net, const LWN_LINE * oldline,
		const LWN_POINT * pt, LWN_LINE * newline1, LWN_LINE * newline2)
{
    const RTCTX *ctx = NULL;
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    int iv;
    RTGEOM *rtg_ln;
    RTGEOM *rtg_pt;
    RTGEOM *split;
    RTCOLLECTION *split_col;
    RTGEOM *rtg = NULL;
    RTLINE *rtl = NULL;
    RTPOINT4D pt4d;
    int ret = 0;

    if (net == NULL)
	return 0;
    if (net->be_iface == NULL)
	return 0;
    ctx = net->be_iface->ctx;
    if (ctx == NULL)
	return 0;

/* creating an RTGEOM Linestring from oldline */
    pa = ptarray_construct (ctx, oldline->has_z, 0, oldline->points);
    for (iv = 0; iv < oldline->points; iv++)
      {
	  /* copying vertices */
	  point.x = oldline->x[iv];
	  point.y = oldline->y[iv];
	  if (oldline->has_z)
	      point.z = oldline->z[iv];
	  ptarray_set_point4d (ctx, pa, iv, &point);
      }
    rtg_ln = (RTGEOM *) rtline_construct (ctx, oldline->srid, NULL, pa);

/* creating an RTGEOM Point from pt */
    pa = ptarray_construct (ctx, pt->has_z, 0, 1);
    point.x = pt->x;
    point.y = pt->y;
    if (pt->has_z)
	point.z = pt->z;
    ptarray_set_point4d (ctx, pa, 0, &point);
    rtg_pt = (RTGEOM *) rtpoint_construct (ctx, oldline->srid, NULL, pa);

/* Split link */
    split = rtgeom_split (ctx, rtg_ln, rtg_pt);
    rtgeom_free (ctx, rtg_ln);
    rtgeom_free (ctx, rtg_pt);
    if (!split)
      {
	  lwn_SetErrorMsg (net->be_iface, "could not split link by point ?");
	  goto end;
      }
    split_col = rtgeom_as_rtcollection (ctx, split);
    if (!split_col)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "lwgeom_as_lwcollection returned NULL");
	  goto end;
      }
    if (split_col->ngeoms != 2)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - point not on link.");
	  goto end;
      }

/* retrieving the first half of the split link */
    rtg = split_col->geoms[0];
    if (rtg->type == RTLINETYPE)
      {
	  rtl = (RTLINE *) rtg;
	  pa = rtl->points;
	  newline1->points = pa->npoints;
	  newline1->x = malloc (sizeof (double) * newline1->points);
	  newline1->y = malloc (sizeof (double) * newline1->points);
	  if (newline1->has_z)
	      newline1->z = malloc (sizeof (double) * newline1->points);
	  for (iv = 0; iv < newline1->points; iv++)
	    {
		/* copying LINESTRING vertices */
		rt_getPoint4d_p (ctx, pa, iv, &pt4d);
		newline1->x[iv] = pt4d.x;
		newline1->y[iv] = pt4d.y;
		if (newline1->has_z)
		    newline1->z[iv] = pt4d.z;
	    }
      }
    else
	goto end;

/* retrieving the second half of the split link */
    rtg = split_col->geoms[1];
    if (rtg->type == RTLINETYPE)
      {
	  rtl = (RTLINE *) rtg;
	  pa = rtl->points;
	  newline2->points = pa->npoints;
	  newline2->x = malloc (sizeof (double) * newline2->points);
	  newline2->y = malloc (sizeof (double) * newline2->points);
	  if (newline2->has_z)
	      newline2->z = malloc (sizeof (double) * newline2->points);
	  for (iv = 0; iv < newline2->points; iv++)
	    {
		/* copying LINESTRING vertices */
		rt_getPoint4d_p (ctx, pa, iv, &pt4d);
		newline2->x[iv] = pt4d.x;
		newline2->y[iv] = pt4d.y;
		if (newline2->has_z)
		    newline2->z[iv] = pt4d.z;
	    }
      }
    else
	goto end;

    ret = 1;

  end:
    if (split != NULL)
	rtgeom_free (ctx, split);
    return ret;
}

static void
cleanup_line (LWN_LINE * line)
{
    if (line->x != NULL)
	free (line->x);
    if (line->y != NULL)
	free (line->y);
    if (line->z != NULL)
	free (line->z);
}

LWN_INT64
lwn_NewGeoLinkSplit (LWN_NETWORK * net, LWN_ELEMID link, const LWN_POINT * pt)
{
    int i;
    LWN_LINK *oldlink;
    LWN_LINK newlink[2];
    LWN_ELEMID startNode;
    LWN_ELEMID endNode;
    LWN_NET_NODE newnode;
    LWN_LINE newline1;
    LWN_LINE newline2;

    i = 1;
    oldlink = lwn_be_getLinkById (net, &link, &i, LWN_COL_LINK_ALL);
    if (!oldlink)
      {
	  if (i == -1)
	      return -1;
	  else if (i == 0)
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - non-existent link.");
		return -1;
	    }
      }
    startNode = oldlink->start_node;
    endNode = oldlink->end_node;

    newline1.srid = oldlink->geom->srid;
    newline1.has_z = oldlink->geom->has_z;
    newline1.points = 0;
    newline1.x = NULL;
    newline1.y = NULL;
    newline1.z = NULL;
    newline2.srid = oldlink->geom->srid;
    newline2.has_z = oldlink->geom->has_z;
    newline2.points = 0;
    newline2.x = NULL;
    newline2.y = NULL;
    newline2.z = NULL;
    if (!geo_link_split (net, oldlink->geom, pt, &newline1, &newline2))
      {
	  _lwn_release_links (oldlink, 1);
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }
    _lwn_release_links (oldlink, 1);

    if (net->spatial && net->allowCoincident == 0)
      {
	  /* check if a coincident node already exists */
	  if (lwn_be_existsCoincidentNode (net, pt))
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - coincident node");
		cleanup_line (&newline1);
		cleanup_line (&newline2);
		return -1;
	    }
      }

/* inserting a new NetNode */
    newnode.node_id = -1;
    newnode.geom = (LWN_POINT *) pt;
    if (!lwn_be_insertNetNodes (net, &newnode, 1))
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

/* deleting the original Link */
    i = lwn_be_deleteLinksById (net, &link, 1);
    if (i != 1)
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

/* inserting two new Links */
    newlink[0].link_id = lwn_be_getNextLinkId (net);
    if (newlink[0].link_id == -1)
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }
    newlink[1].link_id = lwn_be_getNextLinkId (net);
    if (newlink[1].link_id == -1)
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

    newlink[0].start_node = startNode;
    newlink[0].end_node = newnode.node_id;
    newlink[0].geom = &newline1;
    newlink[1].start_node = newnode.node_id;
    newlink[1].end_node = endNode;
    newlink[1].geom = &newline2;

    if (!lwn_be_insertLinks (net, newlink, 2))
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

    cleanup_line (&newline1);
    cleanup_line (&newline2);
    return newnode.node_id;
}

LWN_INT64
lwn_ModGeoLinkSplit (LWN_NETWORK * net, LWN_ELEMID link, const LWN_POINT * pt)
{
    int i;
    LWN_LINK *oldlink;
    LWN_LINK newlink;
    LWN_ELEMID startNode;
    LWN_ELEMID endNode;
    LWN_NET_NODE newnode;
    LWN_LINE newline1;
    LWN_LINE newline2;

    i = 1;
    oldlink = lwn_be_getLinkById (net, &link, &i, LWN_COL_LINK_ALL);
    if (!oldlink)
      {
	  if (i == -1)
	      return -1;
	  else if (i == 0)
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - non-existent link.");
		return -1;
	    }
      }
    startNode = oldlink->start_node;
    endNode = oldlink->end_node;

    newline1.srid = oldlink->geom->srid;
    newline1.has_z = oldlink->geom->has_z;
    newline1.points = 0;
    newline1.x = NULL;
    newline1.y = NULL;
    newline1.z = NULL;
    newline2.srid = oldlink->geom->srid;
    newline2.has_z = oldlink->geom->has_z;
    newline2.points = 0;
    newline2.x = NULL;
    newline2.y = NULL;
    newline2.z = NULL;
    if (!geo_link_split (net, oldlink->geom, pt, &newline1, &newline2))
      {
	  _lwn_release_links (oldlink, 1);
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }
    _lwn_release_links (oldlink, 1);

    if (net->spatial && net->allowCoincident == 0)
      {
	  /* check if a coincident node already exists */
	  if (lwn_be_existsCoincidentNode (net, pt))
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - coincident node");
		cleanup_line (&newline1);
		cleanup_line (&newline2);
		return -1;
	    }
      }

/* inserting a new NetNode */
    newnode.node_id = -1;
    newnode.geom = (LWN_POINT *) pt;
    if (!lwn_be_insertNetNodes (net, &newnode, 1))
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

/* update the original Link */
    newlink.link_id = link;
    newlink.start_node = startNode;
    newlink.end_node = newnode.node_id;
    newlink.geom = &newline1;
    if (!lwn_be_updateLinksById
	(net, &newlink, 1, LWN_COL_LINK_END_NODE | LWN_COL_LINK_GEOM))
	return -1;

/* inserting a new Link */
    newlink.link_id = lwn_be_getNextLinkId (net);
    if (newlink.link_id == -1)
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

    newlink.start_node = newnode.node_id;
    newlink.end_node = endNode;
    newlink.geom = &newline2;

    if (!lwn_be_insertLinks (net, &newlink, 1))
      {
	  cleanup_line (&newline1);
	  cleanup_line (&newline2);
	  return -1;
      }

    cleanup_line (&newline1);
    cleanup_line (&newline2);
    return newnode.node_id;
}

static int
_lwn_LinkHeal (LWN_NETWORK * net, LWN_ELEMID eid1, LWN_ELEMID eid2,
	       LWN_ELEMID * node_id, LWN_ELEMID * start_node,
	       LWN_ELEMID * end_node, LWN_LINE * newline)
{
    int caseno = 0;
    LWN_ELEMID ids[2];
    LWN_ELEMID commonnode = -1;
    LWN_LINK *node_links;
    int num_node_links;
    LWN_LINK *links;
    LWN_LINK *e1 = NULL;
    LWN_LINK *e2 = NULL;
    int nlinks, i;
    int otherlinks = 0;

    /* NOT IN THE SPECS: see if the same link is given twice.. */
    if (eid1 == eid2)
      {
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - Cannot heal link with itself.");
	  return 0;
      }
    ids[0] = eid1;
    ids[1] = eid2;
    nlinks = 2;
    links = lwn_be_getLinkById (net, ids, &nlinks, LWN_COL_LINK_ALL);
    if (nlinks == -1)
	return -0;
    for (i = 0; i < nlinks; ++i)
      {
	  if (links[i].link_id == eid1)
	      e1 = &(links[i]);
	  else if (links[i].link_id == eid2)
	      e2 = &(links[i]);
      }
    if (!e1)
      {
	  _lwn_release_links (links, nlinks);
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - non-existent first link.");
	  return 0;
      }
    if (!e2)
      {
	  _lwn_release_links (links, nlinks);
	  lwn_SetErrorMsg (net->be_iface,
			   "SQL/MM Spatial exception - non-existent second link.");
	  return 0;
      }

    /* Find common node */

    if (e1->end_node == e2->start_node)
      {
	  commonnode = e1->end_node;
	  *start_node = e1->start_node;
	  *end_node = e2->end_node;
	  caseno = 1;
      }
    else if (e1->end_node == e2->end_node)
      {
	  commonnode = e1->end_node;
	  *start_node = e1->start_node;
	  *end_node = e2->start_node;
	  caseno = 2;
      }
    else if (e1->start_node == e2->start_node)
      {
	  commonnode = e1->start_node;
	  *start_node = e2->end_node;
	  *end_node = e1->end_node;
	  caseno = 3;
      }
    else if (e1->start_node == e2->end_node)
      {
	  commonnode = e1->start_node;
	  *start_node = e2->start_node;
	  *end_node = e1->start_node;
	  caseno = 4;
      }

    if (e1->geom != NULL && e2->geom != NULL)
      {
	  /* reassembling the healed Link geometry */
	  int iv;
	  int iv2 = 0;
	  newline->srid = e1->geom->srid;
	  newline->has_z = e1->geom->has_z;
	  newline->points = e1->geom->points + e2->geom->points - 1;
	  newline->x = malloc (sizeof (double) * newline->points);
	  newline->y = malloc (sizeof (double) * newline->points);
	  if (newline->has_z)
	      newline->z = malloc (sizeof (double) * newline->points);
	  switch (caseno)
	    {
	    case 1:
		for (iv = 0; iv < e1->geom->points; iv++)
		  {
		      newline->x[iv2] = e1->geom->x[iv];
		      newline->y[iv2] = e1->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e1->geom->z[iv];
		      iv2++;
		  }
		for (iv = 1; iv < e2->geom->points; iv++)
		  {
		      newline->x[iv2] = e2->geom->x[iv];
		      newline->y[iv2] = e2->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e2->geom->z[iv];
		      iv2++;
		  }
		break;
	    case 2:
		for (iv = 0; iv < e1->geom->points - 1; iv++)
		  {
		      newline->x[iv2] = e1->geom->x[iv];
		      newline->y[iv2] = e1->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e1->geom->z[iv];
		      iv2++;
		  }
		for (iv = e2->geom->points - 1; iv >= 0; iv--)
		  {
		      newline->x[iv2] = e2->geom->x[iv];
		      newline->y[iv2] = e2->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e2->geom->z[iv];
		      iv2++;
		  }
		break;
	    case 3:
		for (iv = e2->geom->points - 1; iv >= 0; iv--)
		  {
		      newline->x[iv2] = e2->geom->x[iv];
		      newline->y[iv2] = e2->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e2->geom->z[iv];
		      iv2++;
		  }
		for (iv = 1; iv < e1->geom->points; iv++)
		  {
		      newline->x[iv2] = e1->geom->x[iv];
		      newline->y[iv2] = e1->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e1->geom->z[iv];
		      iv2++;
		  }
		break;
	    case 4:
		for (iv = 0; iv < e2->geom->points; iv++)
		  {
		      newline->x[iv2] = e2->geom->x[iv];
		      newline->y[iv2] = e2->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e2->geom->z[iv];
		      iv2++;
		  }
		for (iv = 1; iv < e1->geom->points; iv++)
		  {
		      newline->x[iv2] = e1->geom->x[iv];
		      newline->y[iv2] = e1->geom->y[iv];
		      if (newline->has_z)
			  newline->z[iv2] = e1->geom->z[iv];
		      iv2++;
		  }
		break;
	    };
      }


    /* Check if any other link is connected to the common node, if found */
    if (commonnode != -1)
      {
	  num_node_links = 1;
	  node_links = lwn_be_getLinkByNetNode (net, &commonnode,
						&num_node_links,
						LWN_COL_LINK_LINK_ID);
	  if (num_node_links == -1)
	    {
		_lwn_release_links (links, nlinks);
		return 0;
	    }
	  for (i = 0; i < num_node_links; ++i)
	    {
		if (node_links[i].link_id == eid1)
		    continue;
		if (node_links[i].link_id == eid2)
		    continue;
		commonnode = -1;
		otherlinks++;
	    }
	  free (node_links);
      }

    if (commonnode == -1)
      {
	  _lwn_release_links (links, nlinks);
	  if (otherlinks)
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - other links connected.");
	    }
	  else
	    {
		lwn_SetErrorMsg (net->be_iface,
				 "SQL/MM Spatial exception - non-connected links.");
	    }
	  return 0;
      }
    _lwn_release_links (links, nlinks);

    *node_id = commonnode;
    return 1;
}

LWN_INT64
lwn_NewLinkHeal (LWN_NETWORK * net, LWN_ELEMID link, LWN_ELEMID anotherlink)
{
    LWN_ELEMID node_id;
    LWN_ELEMID start_node;
    LWN_ELEMID end_node;
    LWN_ELEMID linkids[2];
    LWN_LINK newlink;
    LWN_LINE newline;
    int n;

    newline.points = 0;
    newline.x = NULL;
    newline.y = NULL;
    newline.z = NULL;
    if (!_lwn_LinkHeal
	(net, link, anotherlink, &node_id, &start_node, &end_node, &newline))
      {
	  cleanup_line (&newline);
	  return -1;
      }

/* removing both Links */
    linkids[0] = link;
    linkids[1] = anotherlink;
    n = lwn_be_deleteLinksById (net, linkids, 2);
    if (n != 2)
      {
	  cleanup_line (&newline);
	  return -1;
      }

/* removing the common NetNode */
    n = lwn_be_deleteNetNodesById (net, &node_id, 1);
    if (n == -1)
      {
	  cleanup_line (&newline);
	  return -1;
      }

/* inserting a new healed Link */
    newlink.link_id = -1;
    newlink.start_node = start_node;
    newlink.end_node = end_node;
    if (newline.points == 0)
	newlink.geom = NULL;
    else
	newlink.geom = &newline;

    if (!lwn_be_insertLinks (net, &newlink, 1))
      {
	  cleanup_line (&newline);
	  return -1;
      }

    cleanup_line (&newline);
    return node_id;
}

LWN_INT64
lwn_ModLinkHeal (LWN_NETWORK * net, LWN_ELEMID link, LWN_ELEMID anotherlink)
{
    LWN_ELEMID node_id;
    LWN_ELEMID start_node;
    LWN_ELEMID end_node;
    LWN_LINK newlink;
    LWN_LINE newline;
    int n;

    newline.points = 0;
    newline.x = NULL;
    newline.y = NULL;
    newline.z = NULL;
    if (!_lwn_LinkHeal
	(net, link, anotherlink, &node_id, &start_node, &end_node, &newline))
      {
	  cleanup_line (&newline);
	  return -1;
      }

/* removing the second Link */
    n = lwn_be_deleteLinksById (net, &anotherlink, 1);
    if (n != 1)
      {
	  cleanup_line (&newline);
	  return -1;
      }

/* updating the healed link */
    newlink.link_id = link;
    newlink.start_node = start_node;
    newlink.end_node = end_node;
    if (newline.points == 0)
	newlink.geom = NULL;
    else
	newlink.geom = &newline;
    if (!lwn_be_updateLinksById
	(net, &newlink, 1,
	 LWN_COL_LINK_START_NODE | LWN_COL_LINK_END_NODE | LWN_COL_LINK_GEOM))
      {
	  cleanup_line (&newline);
	  return -1;
      }

/* removing the common NetNode */
    n = lwn_be_deleteNetNodesById (net, &node_id, 1);
    if (n == -1)
      {
	  cleanup_line (&newline);
	  return -1;
      }

    cleanup_line (&newline);
    return node_id;
}

LWN_ELEMID
lwn_GetNetNodeByPoint (LWN_NETWORK * net, const LWN_POINT * pt, double tol)
{
    LWN_NET_NODE *elem;
    int num;
    int flds = LWN_COL_NODE_NODE_ID;
    LWN_ELEMID id = 0;

    elem = lwn_be_getNetNodeWithinDistance2D (net, pt, tol, &num, flds, 0);
    if (num <= 0)
	return -1;
    else if (num > 1)
      {
	  _lwn_release_nodes (elem, num);
	  lwn_SetErrorMsg (net->be_iface, "Two or more net-nodes found");
	  return -1;
      }
    id = elem[0].node_id;
    _lwn_release_nodes (elem, num);

    return id;
}

LWN_ELEMID
lwn_GetLinkByPoint (LWN_NETWORK * net, const LWN_POINT * pt, double tol)
{
    LWN_LINK *elem;
    int num, i;
    int flds = LWN_COL_LINK_LINK_ID;
    LWN_ELEMID id = 0;

    elem = lwn_be_getLinkWithinDistance2D (net, pt, tol, &num, flds, 0);
    if (num <= 0)
	return -1;
    for (i = 0; i < num; ++i)
      {
	  LWN_LINK *e = &(elem[i]);

	  if (id)
	    {
		_lwn_release_links (elem, num);
		lwn_SetErrorMsg (net->be_iface, "Two or more links found");
		return -1;
	    }
	  else
	      id = e->link_id;
      }
    _lwn_release_links (elem, num);

    return id;
}

/* wrappers of backend wrappers... */

int
lwn_be_existsCoincidentNode (const LWN_NETWORK * net, const LWN_POINT * pt)
{
    int exists = 0;
    lwn_be_getNetNodeWithinDistance2D (net, pt, 0, &exists, 0, -1);
    if (exists == -1)
	return 0;
    return exists;
}

int
lwn_be_existsLinkIntersectingPoint (const LWN_NETWORK * net,
				    const LWN_POINT * pt)
{
    int exists = 0;
    lwn_be_getLinkWithinDistance2D (net, pt, 0, &exists, 0, -1);
    if (exists == -1)
	return 0;
    return exists;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/lwn_network.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
/*
 lwn_network.h -- Topology-Network abstract multi-backend interface
  
 version 4.3, 2015 August 12

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#ifndef LWN_NETWORK_H
#define LWN_NETWORK_H 1

#include <stdint.h>

/* INT64 */
typedef int64_t LWN_INT64;

/** Identifier of network element */
typedef LWN_INT64 LWN_ELEMID;

/*
 * Geometry elements
 */

typedef struct
{
    int srid;
    double x;
    double y;
    double z;
    int has_z;
}
LWN_POINT;

typedef struct
{
    int srid;
    int points;
    double *x;
    double *y;
    double *z;
    int has_z;
}
LWN_LINE;

typedef struct
{
    double min_x;
    double min_y;
    double max_x;
    double max_y;
}
LWN_BBOX;

/*
 * ISO primitive elements
 */

/** NODE */
typedef struct
{
    LWN_ELEMID node_id;
    LWN_POINT *geom;
}
LWN_NET_NODE;

/** Node fields */
#define LWN_COL_NODE_NODE_ID         1<<0
#define LWN_COL_NODE_GEOM            1<<1
#define LWN_COL_NODE_ALL            (1<<2)-1

/** LINK */
typedef struct
{
    LWN_ELEMID link_id;
    LWN_ELEMID start_node;
    LWN_ELEMID end_node;
    LWN_LINE *geom;
}
LWN_LINK;

/** Link fields */
#define LWN_COL_LINK_LINK_ID         1<<0
#define LWN_COL_LINK_START_NODE      1<<1
#define LWN_COL_LINK_END_NODE        1<<2
#define LWN_COL_LINK_GEOM            1<<3
#define LWN_COL_LINK_ALL            (1<<4)-1

/*
 * Backend handling functions
 */

/* opaque pointers referencing native backend objects */

/**
 * Backend private data pointer
 *
 * Only the backend handler needs to know what it really is.
 * It will be passed to all registered callback functions.
 */
typedef struct LWN_BE_DATA_T LWN_BE_DATA;

/**
 * Backend interface handler
 *
 * Embeds all registered backend callbacks and private data pointer.
 * Will need to be passed (directly or indirectly) to al public facing
 * APIs of this library.
 */
typedef struct LWN_BE_IFACE_T LWN_BE_IFACE;

/**
 * Network handler.
 *
 * Embeds backend interface handler.
 * Will need to be passed to all network manipulation APIs
 * of this library.
 */
typedef struct LWN_BE_NETWORK_T LWN_BE_NETWORK;

/**
 * Structure containing base backend callbacks
 *
 * Used for registering into the backend iface
 */
typedef struct LWN_BE_CALLBACKS_T
{

  /**
   * Create a new network in the backend
   *
   * @param name the network name
   * @param srid the network SRID
   * @param hasZ non-zero if network primitives should have a Z ordinate
   * @param spatial determines if this is a Logical or SpatialNetwork
   * @param coincident_nodes determines if they should de tolerated or not.
   * @param geos_handle handle to GEOS context.
   * 
   * @return a network handler, which embeds the backend data/params
   *         or NULL on error (@see lastErrorMessage)
   */
    LWN_BE_NETWORK *(*createNetwork) (const LWN_BE_DATA * be,
				      const char *name, int srid, int hasZ,
				      int spatial, int coincident_nodes,
				      const void *geos_handle);

  /**
   * Load a network from the backend
   *
   * @param name the network name
   * @return a network handler, which embeds the backend data/params
   *         or NULL on error (@see lastErrorMessage)
   */
    LWN_BE_NETWORK *(*loadNetworkByName) (const LWN_BE_DATA * be,
					  const char *name);

  /**
   * Release memory associated to a backend network
   *
   * @param net the backend network handler
   * @return 1 on success, 0 on error (@see lastErrorMessage)
   */
    int (*freeNetwork) (LWN_BE_NETWORK * net);

  /**
   * Get nodes within distance by point
   *
   * @param net the network to act upon
   * @param pt the query point
   * @param dist the distance
   * @param numelems output parameter, gets number of elements found
   *                 if the return is not null, otherwise see @return
   *                 section for semantic.
   * @param fields fields to be filled in the returned structure, see
   *               LWN_COL_NODE_* macros
   * @param limit max number of nodes to return, 0 for no limit, -1
   *              to only check for existance if a matching row.
   *
   * @return an array of nodes or null in the following cases:
   *         - limit=-1 ("numelems" is set to 1 if found, 0 otherwise)
   *         - limit>0 and no records found ("numelems" is set to 0)
   *         - error ("numelems" is set to -1)
   *
   */
    LWN_NET_NODE *(*getNetNodeWithinDistance2D) (const LWN_BE_NETWORK * net,
						 const LWN_POINT * pt,
						 double dist, int *numelems,
						 int fields, int limit);

  /**
   * Get links that start or end on any of the given node identifiers
   *
   * @param net the network to act upon
   * @param ids an array of node identifiers
   * @param numelems input/output parameter, pass number of node identifiers
   *                 in the input array, gets number of edges in output array
   *                 if the return is not null, otherwise see @return
   *                 section for semantic.
   * @param fields fields to be filled in the returned structure, see
   *               LWN_COL_LINK_* macros
   *
   * @return an array of links that are incident to a node
   *         or NULL in the following cases:
   *         - no link found ("numelems" is set to 0)
   *         - error ("numelems" is set to -1)
   *           (@see lastErrorMessage)
   */
    LWN_LINK *(*getLinkByNetNode) (const LWN_BE_NETWORK * net,
				   const LWN_ELEMID * ids, int *numelems,
				   int fields);

  /**
   * Get links within distance by point
   *
   * @param net the network to act upon
   * @param pt the query point
   * @param dist the distance
   * @param numelems output parameter, gets number of elements found
   *                 if the return is not null, otherwise see @return
   *                 section for semantic.
   * @param fields fields to be filled in the returned structure, see
   *               LWN_COL_LINK_* macros
   * @param limit max number of links to return, 0 for no limit, -1
   *              to only check for existance if a matching row.
   *
   * @return an array of links or null in the following cases:
   *         - limit=-1 ("numelems" is set to 1 if found, 0 otherwise)
   *         - limit>0 and no records found ("numelems" is set to 0)
   *         - error ("numelems" is set to -1)
   *
   */
    LWN_LINK *(*getLinkWithinDistance2D) (const LWN_BE_NETWORK * net,
					  const LWN_POINT * pt, double dist,
					  int *numelems, int fields, int limit);

  /**
   * Insert nodes
   *
   * Insert node primitives in the network
   *
   * @param net the network to act upon
   * @param nodes the nodes to insert. Those with a node_id set to -1
   *              it will be replaced to an automatically assigned identifier
   * @param nelems number of elements in the nodes array
   *
   * @return 1 on success, 0 on error (@see lastErrorMessage)
   */
    int (*insertNetNodes) (const LWN_BE_NETWORK * net,
			   LWN_NET_NODE * nodes, int numelems);

  /**
   * Get nodes by id
   *
   * @param net the network to act upon
   * @param ids an array of element identifiers
   * @param numelems input/output parameter, pass number of node identifiers
   *                 in the input array, gets number of node in output array.
   * @param fields fields to be filled in the returned structure, see
   *               LWN_COL_NODE_* macros
   *
   * @return an array of nodes
   *         or NULL in the following cases:
   *         - no node found ("numelems" is set to 0)
   *         - error ("numelems" is set to -1)
   *           (@see lastErrorMessage)
   *
   */
    LWN_NET_NODE *(*getNetNodeById) (const LWN_BE_NETWORK * topo,
				     const LWN_ELEMID * ids, int *numelems,
				     int fields);

  /**
   * Update nodes by id
   *
   * @param net the network to act upon
   * @param nodes an array of LWN_NET_NODE objects with selecting id
   *              and updating fields.
   * @param numnodes number of nodes in the "nodes" array
   * @param upd_fields fields to be updated for the selected edges,
   *                   see LWN_COL_NODE_* macros
   *
   * @return number of nodes being updated or -1 on error
   *         (@see lastErroMessage)
   */
    int (*updateNetNodesById) (const LWN_BE_NETWORK * net,
			       const LWN_NET_NODE * nodes, int numnodes,
			       int upd_fields);

  /**
   * Delete nodes by id
   *
   * @param net the network to act upon
   * @param ids an array of node identifiers
   * @param numelems number of node identifiers in the ids array
   *
   * @return number of nodes being deleted or -1 on error
   *         (@see lastErroMessage)
   */
    int (*deleteNetNodesById) (const LWN_BE_NETWORK * net,
			       const LWN_ELEMID * ids, int numelems);

  /**
   * Get next available link identifier
   *
   * Identifiers returned by this function should not be considered
   * available anymore.
   *
   * @param net the network to act upon
   *
   * @return next available link identifier or -1 on error
   */
      LWN_ELEMID (*getNextLinkId) (const LWN_BE_NETWORK * net);

  /**
   * Get nodes within a 2D bounding box
   *
   * @param net the network to act upon
   * @param box the query box
   * @param numelems output parameter, gets number of elements found
   *                 if the return is not null, otherwise see @return
   *                 section for semantic.
   * @param fields fields to be filled in the returned structure, see
   *               LWN_COL_NODE_* macros
   * @param limit max number of nodes to return, 0 for no limit, -1
   *              to only check for existance if a matching row.
   *
   * @return an array of nodes or null in the following cases:
   *         - limit=-1 ("numelems" is set to 1 if found, 0 otherwise)
   *         - limit>0 and no records found ("numelems" is set to 0)
   *         - error ("numelems" is set to -1)
   *
   */
    LWN_NET_NODE *(*getNetNodeWithinBox2D) (const LWN_BE_NETWORK * net,
					    const LWN_BBOX * box,
					    int *numelems, int fields,
					    int limit);

  /**
   * Get next available link identifier
   *
   * Identifiers returned by this function should not be considered
   * available anymore.
   *
   * @param net the network to act upon
   *
   * @return next available link identifier or -1 on error
   */
      LWN_ELEMID (*getNexLinkId) (const LWN_BE_NETWORK * net);

  /**
   * Insert links
   *
   * Insert link primitives in the network
   *
   * @param net the network to act upon
   * @param links the links to insert. Those with a link_id set to -1
   *              it will be replaced to an automatically assigned identifier
   * @param nelems number of elements in the links array
   *
   * @return number of inserted links, or -1 (@see lastErrorMessage)
   */
    int (*insertLinks) (const LWN_BE_NETWORK * net,
			LWN_LINK * links, int numelems);

  /**
   * Update links by id
   *
   * @param net the network to act upon
   * @param links an array of LWN_LINK object with selecting id
   *              and updating fields.
   * @param numedges number of links in the "links" array
   * @param upd_fields fields to be updated for the selected links,
   *                   see LWN_COL_LINK_* macros
   *
   * @return number of links being updated or -1 on error
   *         (@see lastErroMessage)
   */
    int (*updateLinksById) (const LWN_BE_NETWORK * net,
			    const LWN_LINK * links, int numlinks,
			    int upd_fields);

  /**
   * Get link by id
   *
   * @param net the network to act upon
   * @param ids an array of element identifiers
   * @param numelems input/output parameter, pass number of link identifiers
   *                 in the input array, gets number of links in output array
   *                 if the return is not null, otherwise see @return
   *                 section for semantic.
   * @param fields fields to be filled in the returned structure, see
   *               LWN_COL_LINK_* macros
   *
   * @return an array of links or NULL in the following cases:
   *         - none found ("numelems" is set to 0)
   *         - error ("numelems" is set to -1)
   */
    LWN_LINK *(*getLinkById) (const LWN_BE_NETWORK * net,
			      const LWN_ELEMID * ids, int *numelems,
			      int fields);

  /**
   * Delete links by id
   *
   * @param net the network to act upon
   * @param ids an array of link identifiers
   * @param numelems number of link identifiers in the ids array
   *
   * @return number of links being deleted or -1 on error
   *         (@see lastErroMessage)
   */
    int (*deleteLinksById) (const LWN_BE_NETWORK * net,
			    const LWN_ELEMID * ids, int numelems);


  /**
   * Get network SRID
   * @return 0 for unknown
   */
    int (*netGetSRID) (const LWN_BE_NETWORK * net);

  /**
   * Get network Z flag
   * @return 1 if network elements do have Z value, 0 otherwise
   */
    int (*netHasZ) (const LWN_BE_NETWORK * net);

  /**
   * Get network type flag
   * @return 0 if network is of the Logical Type, 1 otherwise (Spatial)
   */
    int (*netIsSpatial) (const LWN_BE_NETWORK * net);

  /**
   * Get CoincidentNodes flag
   * @return 1 if newtwork tolerates Coincident Nodes, 0 otherwise (Spatial)
   */
    int (*netAllowCoincident) (const LWN_BE_NETWORK * net);

  /**
   * Get GEOS Handle
   * @return current GEOS Handle, NULL otherwise
   */
    const void *(*netGetGEOS) (const LWN_BE_NETWORK * net);


} LWN_BE_CALLBACKS;


/**
 * Create a new backend interface
 *
 * Ownership to caller delete with lwn_FreeBackendIface
 *
 * @param ctx librtgeom context, create with rtgeom_init
 * @param data Backend data, passed as first parameter to all callback functions
 */
LWN_BE_IFACE *lwn_CreateBackendIface (const RTCTX * ctx,
				      const LWN_BE_DATA * data);

/**
 * Register backend callbacks into the opaque iface handler
 *
 * @param iface the backend interface handler (see lwn_CreateBackendIface)
 * @param cb a pointer to the callbacks structure; ownership left to caller.
 */
void lwn_BackendIfaceRegisterCallbacks (LWN_BE_IFACE * iface,
					const LWN_BE_CALLBACKS * cb);

/** Release memory associated with an LWB_BE_IFACE */
void lwn_FreeBackendIface (LWN_BE_IFACE * iface);

/********************************************************************
 *
 * End of BE interface
 *
 *******************************************************************/


/*
 * Network functions
 */

/** Opaque network structure
 *
 * Embeds backend interface and network
 */
typedef struct LWN_NETWORK_T LWN_NETWORK;


/********************************************************************
 *
 * Error handling functions
 *
 *******************************************************************/

/**
 * Reset the last backend error message
 *
 * @oaram iface the backend interface handler (see lwn_CreateBackendIface)
 */
void lwn_ResetErrorMsg (LWN_BE_IFACE * iface);

/**
 * Set the last backend error message
 *
 * @oaram iface the backend interface handler (see lwn_CreateBackendIface)
 * 
 * @return NULL-terminated error string
 */
void lwn_SetErrorMsg (LWN_BE_IFACE * iface, const char *message);

/**
 * Read last error message from backend
 *
 * @oaram iface the backend interface handler (see lwn_CreateBackendIface)
 * 
 * @return NULL-terminated error string
 */
const char *lwn_GetErrorMsg (LWN_BE_IFACE * iface);


/*******************************************************************
 *
 * Backend independent Linestring auxiliary functions
 *
 *******************************************************************/

/**
 * Creates a backend independent 2D Point
 * 
 * @param srid the network SRID
 * @param x the X coordinate
 * @param y the Y coordinate
 * 
 * @return pointer to a new LWN_POINT
 */
LWN_POINT *lwn_create_point2d (int srid, double x, double y);

/**
 * Creates a backend independent 3D Point
 * 
 * @param srid the network SRID
 * @param x the X coordinate
 * @param y the Y coordinate
 * @param z the Z coordinate
 * 
 * @return pointer to a new LWN_POINT
 */
LWN_POINT *lwn_create_point3d (int srid, double x, double y, double z);

/**
 * Free a backend independent Point
 *
 * @param ptr pointer to the LWN_POINT to be freed
 */
void lwn_free_point (LWN_POINT * ptr);

/**
 * Initializes a backend independent Linestring
 *
 * @param points total number of points
 * @param srid the network SRID
 * @param hasz non-zero if network primitives should have a Z ordinate
 *
 * @return pointer to a new LWN_LINE
 */
LWN_LINE *lwn_alloc_line (int points, int srid, int hasz);

/**
 * Free a backend independent Linestring
 *
 * @param ptr pointer to the LWN_LINE to be freed
 */
void lwn_free_line (LWN_LINE * ptr);


/*******************************************************************
 *
 * Non-ISO signatures here
 *
 *******************************************************************/

/**
 * Initializes a new network
 *
 * @param iface the backend interface handler (see lwn_CreateBackendIface)
 * @param name name of the new network
 * @param srid the network SRID
 * @param hasz non-zero if network primitives should have a Z ordinate
 * @param spatial determines if this is a Logical or SpatialNetwork
 * @param coincident_nodes determines if they should de tolerated or not.
 *
 * @return the handler of the network, or NULL on error
 *         (lwn error handler will be invoked with error message)
 */
LWN_NETWORK *lwn_CreateNetwork (LWN_BE_IFACE * iface, const char *name,
				int srid, int hasz, int spatial,
				int coincident_nodes);

/**
 * Loads an existing network by name from the database
 *
 * @param iface the backend interface handler (see lwt_CreateBackendIface)
 * @param name name of the network to load
 *
 * @return the handler of the network, or NULL on error
 *         (lwn error handler will be invoked with error message)
 */
LWN_NETWORK *lwn_LoadNetwork (LWN_BE_IFACE * iface, const char *name);

/**
 * Drop a network and all its associated objects from the database
 *
 * @param net the network to drop
 */
void lwn_DropNetwork (LWN_NETWORK * net);

/** Release memory associated with an LWN_NETWORK
 *
 * @param net the network to release (it's not removed from db)
 */
void lwn_FreeNetwork (LWN_NETWORK * net);


/*******************************************************************
 *
 * ISO signatures here
 *
 *******************************************************************/

/**
 * Add an isolated node
 *
 * For ST_AddIsoNetNode
 *
 * @param net the network to operate on
 * @param pt the node position
 *
 * @return ID of the newly added node
 *
 */
LWN_ELEMID lwn_AddIsoNetNode (LWN_NETWORK * net, LWN_POINT * pt);

/**
 * Move an isolated node
 *
 * For ST_MoveIsoNetNode
 *
 * @param net the network to operate on
 * @param node the identifier of the nod to be moved
 * @param pt the new node position
 * @return 0 on success, -1 on error
 *         (lwn error handler will be invoked with error message)
 *
 */
int lwn_MoveIsoNetNode (LWN_NETWORK * net, LWN_ELEMID node,
			const LWN_POINT * pt);

/**
 * Remove an isolated node
 *
 * For ST_RemIsoNetNode
 *
 * @param net the network to operate on
 * @param node the identifier of the node to be moved
 * @return 0 on success, -1 on error
 *         (lwn error handler will be invoked with error message)
 *
 */
int lwn_RemIsoNetNode (LWN_NETWORK * net, LWN_ELEMID node);

/**
 * Add a link connecting two existing nodes
 *
 * For ST_AddLink
 *
 * @param net the network to operate on
 * @param start_node identifier of the starting node
 * @param end_node identifier of the ending node
 * @param geom the link geometry
 * @return ID of the newly added link, or -1 on error
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_ELEMID lwn_AddLink (LWN_NETWORK * net,
			LWN_ELEMID startNode, LWN_ELEMID endNode,
			LWN_LINE * geom);

/**
 * Changes the shape of a link without affecting the network structure.
 *
 * For ST_ChangeLinkGeom
 *
 * @param net the network to operate on
 * @param link the identifier of the link to be changed
 * @param curve the link geometry
 * @return 0 on success, -1 on error
 *         (lwn error handler will be invoked with error message)
 *
 */
int lwn_ChangeLinkGeom (LWN_NETWORK * net, LWN_ELEMID link,
			const LWN_LINE * curve);

/**
 * Remove a link.
 *
 * For ST_RemoveLink
 *
 * @param net the network to operate on
 * @param link the identifier of the link to be removed
 * @return 0 on success, -1 on error
 *         (lwn error handler will be invoked with error message)
 *
 */
int lwn_RemoveLink (LWN_NETWORK * net, LWN_ELEMID link);

/**
 * Split a logical link, replacing it with two new links.
 *
 * For ST_NewLogLinkSplit
 *
 * @param net the network to operate on
 * @param link the identifier of the link to be split.
 * @return the ID of the inserted Node; a negative number on failure.
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_INT64 lwn_NewLogLinkSplit (LWN_NETWORK * net, LWN_ELEMID link);

/**
 * Split a logical link, modifying the original link and adding a new one.
 * 
 * For ST:ModLogLinkSplit
 *
 * @param net the network to operate on
 * @param link the identifier of the link to be split.
 * @return the ID of the inserted Node; a negative number on failure.
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_INT64 lwn_ModLogLinkSplit (LWN_NETWORK * net, LWN_ELEMID link);

/**
 * Split a spatial link by a node, replacing it with two new links.
 *
 * For ST_NewGeoLinkSplit
 *
 * @param net the network to operate on
 * @param link the identifier of the link to be split.
 * @param pt the point geometry
 * @return the ID of the inserted Node; a negative number on failure.
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_INT64 lwn_NewGeoLinkSplit (LWN_NETWORK * net, LWN_ELEMID link,
			       const LWN_POINT * pt);

/**
 * Split a spatial link by a node, modifying the original link and adding
 * a new one.
 *
 * For ST_ModGeoLinkSplit
 *
 * @param net the network to operate on
 * @param link the identifier of the link to be split.
 * @param pt the point geometry
 * @return the ID of the inserted Node; a negative number on failure.
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_INT64 lwn_ModGeoLinkSplit (LWN_NETWORK * net, LWN_ELEMID link,
			       const LWN_POINT * pt);

/**
 * Heal two links by deleting the node connecting them, deleting both links,
 * and replacing them with a new link whose direction is the same as the
 * first link provided.
 *
 * For ST_NewLinkHeal
 *
 * @param net the network to operate on
 * @param link the identifier of a first link.
 * @param anotherlink the identifier of a second link.
 * @return the ID of the rmove Node; a negative number on failure.
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_INT64 lwn_NewLinkHeal (LWN_NETWORK * net, LWN_ELEMID link,
			   LWN_ELEMID anotherlink);

/**
 * Heal two links by deleting the node connecting them, modfying the first
 * link provided, and deleting the second link.
 *
 * For ST_ModLinkHeal
 *
 * @param net the network to operate on
 * @param link the identifier of a first link.
 * @param anotherlink the identifier of a second link.
 * @return the ID of the rmove Node; a negative number on failure.
 *         (lwn error handler will be invoked with error message)
 *
 */
LWN_INT64 lwn_ModLinkHeal (LWN_NETWORK * net, LWN_ELEMID link,
			   LWN_ELEMID anotherlink);

/**
 * Retrieve the id of a net-node at a point location
 *
 * For GetNetNodeByNode
 *
 * @param net the network to operate on
 * @param point the point to use for query
 * @param tol max distance around the given point to look for a net-node
 * @return a net-node identifier if one is found, 0 if none is found, -1
 *         on error (multiple net-nodes within distance).
 *         (lwn error handler will be invoked with error message)
 */
LWN_ELEMID lwn_GetNetNodeByPoint (LWN_NETWORK * net, const LWN_POINT * pt,
				  double tol);

/**
 * Find the edge-id of a link that intersects a given point
 *
 * For GetLinkByPoint
 *
 * @param net the network to operate on
 * @param point the point to use for query
 * @param tol max distance around the given point to look for an
 *            intersecting link
 * @return a link identifier if one is found, 0 if none is found, -1
 *         on error (multiple links within distance).
 *         (lwn error handler will be invoked with error message)
 */
LWN_ELEMID lwn_GetLinkByPoint (LWN_NETWORK * net, const LWN_POINT * pt,
			       double tol);

#endif /* LWN_NETWORK_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/lwn_network_private.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
 lwn_network_private.h -- private members and methods
 Topology-Network abstract multi-backend interface
  
 version 4.3, 2015 August 13

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#ifndef LWN_NETWORK_PRIVATE_H
#define LWN_NETWORK_PRIVATE_H 1


/************************************************************************
 *
 * Generic SQL handler
 *
 ************************************************************************/

struct LWN_BE_IFACE_T
{
    const RTCTX *ctx;
    const LWN_BE_DATA *data;
    const LWN_BE_CALLBACKS *cb;
    char *errorMsg;
};

/************************************************************************
 *
 * Internal objects
 *
 ************************************************************************/

struct LWN_NETWORK_T
{
    LWN_BE_IFACE *be_iface;
    LWN_BE_NETWORK *be_net;
    int srid;
    int hasZ;
    int spatial;
    int allowCoincident;
    const void *geos_handle;
};


int lwn_be_existsCoincidentNode (const LWN_NETWORK * net, const LWN_POINT * pt);

int lwn_be_existsLinkIntersectingPoint (const LWN_NETWORK * net,
					const LWN_POINT * pt);

#endif /* LWN_NETWORK_PRIVATE_H */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































Deleted src/topology/net_callbacks.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
/*

 net_callbacks.c -- implementation of Topology-Network callback functions
    
 version 4.3, 2015 August 11

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_network.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>
#include <lwn_network.h>

#include "network_private.h"

struct net_node
{
/* a struct wrapping a Network Node */
    sqlite3_int64 node_id;
    double x;
    double y;
    double z;
    int has_z;
    int is_null;
    struct net_node *next;
};

struct net_nodes_list
{
/* a struct wrapping a list of Network Nodes */
    struct net_node *first;
    struct net_node *last;
    int count;
};

struct net_link
{
/* a struct wrapping a Network Link */
    sqlite3_int64 link_id;
    sqlite3_int64 start_node;
    sqlite3_int64 end_node;
    gaiaLinestringPtr geom;
    struct net_link *next;
};

struct net_links_list
{
/* a struct wrapping a list of Network Links */
    struct net_link *first;
    struct net_link *last;
    int count;
};

static struct net_node *
create_net_node (sqlite3_int64 node_id, double x, double y, double z, int has_z)
{
/* creating a Network Node */
    struct net_node *ptr = malloc (sizeof (struct net_node));
    ptr->node_id = node_id;
    ptr->x = x;
    ptr->y = y;
    ptr->z = z;
    ptr->has_z = has_z;
    ptr->is_null = 0;
    ptr->next = NULL;
    return ptr;
}

static struct net_node *
create_net_node_null (sqlite3_int64 node_id)
{
/* creating a Network Node - NULL */
    struct net_node *ptr = malloc (sizeof (struct net_node));
    ptr->node_id = node_id;
    ptr->is_null = 1;
    ptr->next = NULL;
    return ptr;
}

static void
destroy_net_node (struct net_node *ptr)
{
/* destroying a Network Node */
    if (ptr == NULL)
	return;
    free (ptr);
}

static struct net_link *
create_net_link (sqlite3_int64 link_id, sqlite3_int64 start_node,
		 sqlite3_int64 end_node, gaiaLinestringPtr ln)
{
/* creating a Network Link */
    struct net_link *ptr = malloc (sizeof (struct net_link));
    ptr->link_id = link_id;
    ptr->start_node = start_node;
    ptr->end_node = end_node;
    ptr->geom = ln;
    ptr->next = NULL;
    return ptr;
}

static void
destroy_net_link (struct net_link *ptr)
{
/* destroying a Network Link */
    if (ptr == NULL)
	return;
    if (ptr->geom != NULL)
	gaiaFreeLinestring (ptr->geom);
    free (ptr);
}

static struct net_nodes_list *
create_nodes_list (void)
{
/* creating an empty list of Network Nodes */
    struct net_nodes_list *ptr = malloc (sizeof (struct net_nodes_list));
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->count = 0;
    return ptr;
}

static void
destroy_net_nodes_list (struct net_nodes_list *ptr)
{
/* destroying a list of Network Nodes */
    struct net_node *p;
    struct net_node *pn;
    if (ptr == NULL)
	return;

    p = ptr->first;
    while (p != NULL)
      {
	  pn = p->next;
	  destroy_net_node (p);
	  p = pn;
      }
    free (ptr);
}

static void
add_node_2D (struct net_nodes_list *list, sqlite3_int64 node_id,
	     double x, double y)
{
/* inserting a Network Node 2D into the list */
    struct net_node *ptr;
    if (list == NULL)
	return;

    ptr = create_net_node (node_id, x, y, 0.0, 0);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static void
add_node_3D (struct net_nodes_list *list, sqlite3_int64 node_id,
	     double x, double y, double z)
{
/* inserting a Network Node 3D into the list */
    struct net_node *ptr;
    if (list == NULL)
	return;

    ptr = create_net_node (node_id, x, y, z, 1);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static void
add_node_null (struct net_nodes_list *list, sqlite3_int64 node_id)
{
/* inserting a Network Node (NULL) into the list */
    struct net_node *ptr;
    if (list == NULL)
	return;

    ptr = create_net_node_null (node_id);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static struct net_links_list *
create_links_list (void)
{
/* creating an empty list of Network Links */
    struct net_links_list *ptr = malloc (sizeof (struct net_links_list));
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->count = 0;
    return ptr;
}

static void
destroy_links_list (struct net_links_list *ptr)
{
/* destroying a list of Network Links */
    struct net_link *p;
    struct net_link *pn;
    if (ptr == NULL)
	return;

    p = ptr->first;
    while (p != NULL)
      {
	  pn = p->next;
	  destroy_net_link (p);
	  p = pn;
      }
    free (ptr);
}

static void
add_link (struct net_links_list *list, sqlite3_int64 link_id,
	  sqlite3_int64 start_node, sqlite3_int64 end_node,
	  gaiaLinestringPtr ln)
{
/* inserting a Network Link into the list */
    struct net_link *ptr;
    if (list == NULL)
	return;

    ptr = create_net_link (link_id, start_node, end_node, ln);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static char *
do_prepare_read_net_node (const char *network_name, int fields, int spatial,
			  int has_z)
{
/* preparing the auxiliary "read_node" SQL statement */
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;

    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    if (fields & LWN_COL_NODE_NODE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, node_id", prev);
	  else
	      sql = sqlite3_mprintf ("%s node_id", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_NODE_GEOM && spatial)
      {
	  if (comma)
	      sql =
		  sqlite3_mprintf ("%s, ST_X(geometry), ST_Y(geometry)", prev);
	  else
	      sql = sqlite3_mprintf ("%s ST_X(geometry), ST_Y(geometry)", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
	  if (has_z)
	    {
		sql = sqlite3_mprintf ("%s, ST_Z(geometry)", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
      }
    table = sqlite3_mprintf ("%s_node", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE node_id = ?", prev, xtable);
    sqlite3_free (prev);
    free (xtable);
    return sql;
}

static int
do_read_net_node (sqlite3_stmt * stmt, struct net_nodes_list *list,
		  sqlite3_int64 id, int fields, int spatial, int has_z,
		  const char *callback_name, char **errmsg)
{
/* reading Nodes out from the DBMS */
    int icol = 0;
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_id = 0;
		int ok_x = 0;
		int ok_y = 0;
		int ok_z = 0;
		sqlite3_int64 node_id = -1;
		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
		if (fields & LWN_COL_NODE_NODE_ID)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
			{
			    node_id = sqlite3_column_int64 (stmt, icol);
			    ok_id = 1;
			}
		      icol++;
		  }
		else
		    ok_id = 1;
		if (fields & LWN_COL_NODE_GEOM && spatial)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_FLOAT)
			{
			    x = sqlite3_column_double (stmt, icol);
			    ok_x = 1;
			}
		      icol++;
		      if (sqlite3_column_type (stmt, icol) == SQLITE_FLOAT)
			{
			    y = sqlite3_column_double (stmt, icol);
			    ok_y = 1;
			}
		      icol++;
		      if (has_z)
			{
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  z = sqlite3_column_double (stmt, icol);
				  ok_z = 1;
			      }
			}
		  }
		else
		  {
		      ok_x = 1;
		      ok_y = 1;
		      ok_z = 1;
		  }
		if (!spatial)
		  {
		      add_node_null (list, node_id);
		      *errmsg = NULL;
		      sqlite3_reset (stmt);
		      return 1;
		  }
		else
		  {
		      if (has_z)
			{
			    if (ok_id && ok_x && ok_y && ok_z)
			      {
				  add_node_3D (list, node_id, x, y, z);
				  *errmsg = NULL;
				  sqlite3_reset (stmt);
				  return 1;
			      }
			}
		      else
			{
			    if (ok_id && ok_x && ok_y)
			      {
				  add_node_2D (list, node_id, x, y);
				  *errmsg = NULL;
				  sqlite3_reset (stmt);
				  return 1;
			      }
			}
		  }
		/* an invalid Node has been found */
		*errmsg =
		    sqlite3_mprintf
		    ("%s: found an invalid Node \"%lld\"", callback_name,
		     node_id);
		sqlite3_reset (stmt);
		return 0;
	    }
      }
    *errmsg = NULL;
    sqlite3_reset (stmt);
    return 1;
}

static char *
do_prepare_read_link (const char *network_name, int fields)
{
/* preparing the auxiliary "read_link" SQL statement */
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;

    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    if (fields & LWN_COL_LINK_LINK_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, link_id", prev);
	  else
	      sql = sqlite3_mprintf ("%s link_id", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_LINK_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_LINK_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_LINK_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geometry", prev);
	  else
	      sql = sqlite3_mprintf ("%s geometry", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    table = sqlite3_mprintf ("%s_link", network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE link_id = ?", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    return sql;
}

static int
do_read_link_row (sqlite3_stmt * stmt, struct net_links_list *list, int fields,
		  const char *callback_name, char **errmsg)
{
/* reading a Link Row out from the resultset */
    int icol = 0;

    int ok_id = 0;
    int ok_start = 0;
    int ok_end = 0;
    int ok_geom = 0;
    sqlite3_int64 link_id = -1;
    sqlite3_int64 start_node = -1;
    sqlite3_int64 end_node = -1;
    gaiaGeomCollPtr geom = NULL;
    gaiaLinestringPtr ln = NULL;
    if (fields & LWN_COL_LINK_LINK_ID)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		link_id = sqlite3_column_int64 (stmt, icol);
		ok_id = 1;
	    }
	  icol++;
      }
    else
	ok_id = 1;
    if (fields & LWN_COL_LINK_START_NODE)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		start_node = sqlite3_column_int64 (stmt, icol);
		ok_start = 1;
	    }
	  icol++;
      }
    else
	ok_start = 1;
    if (fields & LWN_COL_LINK_END_NODE)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		end_node = sqlite3_column_int64 (stmt, icol);
		ok_end = 1;
	    }
	  icol++;
      }
    else
	ok_end = 1;
    if (fields & LWN_COL_LINK_GEOM)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_NULL)
	    {
		ln = NULL;
		ok_geom = 1;
	    }
	  if (sqlite3_column_type (stmt, icol) == SQLITE_BLOB)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt, icol);
		int blob_sz = sqlite3_column_bytes (stmt, icol);
		geom = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      if (geom->FirstPoint == NULL
			  && geom->FirstPolygon == NULL
			  && geom->FirstLinestring ==
			  geom->LastLinestring && geom->FirstLinestring != NULL)
			{
			    ln = geom->FirstLinestring;
			    ok_geom = 1;
			    /* releasing ownership on Linestring */
			    geom->FirstLinestring = NULL;
			    geom->LastLinestring = NULL;
			}
		      gaiaFreeGeomColl (geom);
		  }
	    }
	  icol++;
      }
    else
	ok_geom = 1;
    if (ok_id && ok_start && ok_end && ok_geom)
      {
	  add_link (list, link_id, start_node, end_node, ln);
	  *errmsg = NULL;
	  return 1;
      }
/* an invalid Link has been found */
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    *errmsg =
	sqlite3_mprintf
	("%s: found an invalid Link \"%lld\"", callback_name, link_id);
    return 0;
}

static int
do_read_link (sqlite3_stmt * stmt, struct net_links_list *list,
	      sqlite3_int64 link_id, int fields, const char *callback_name,
	      char **errmsg)
{
/* reading a single Link out from the DBMS */
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, link_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (!do_read_link_row
		    (stmt, list, fields, callback_name, errmsg))
		  {
		      sqlite3_reset (stmt);
		      return 0;
		  }
	    }
      }
    sqlite3_reset (stmt);
    return 1;
}

static int
do_read_link_by_net_node (sqlite3_stmt * stmt, struct net_links_list *list,
			  sqlite3_int64 node_id, int fields,
			  const char *callback_name, char **errmsg)
{
/* reading a single Link out from the DBMS */
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, node_id);
    sqlite3_bind_int64 (stmt, 2, node_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (!do_read_link_row
		    (stmt, list, fields, callback_name, errmsg))
		  {
		      sqlite3_reset (stmt);
		      return 0;
		  }
	    }
      }
    sqlite3_reset (stmt);
    return 1;
}

const char *
netcallback_lastErrorMessage (const LWN_BE_DATA * be)
{
    return gaianet_get_last_exception ((GaiaNetworkAccessorPtr) be);
}

LWN_BE_NETWORK *
netcallback_loadNetworkByName (const LWN_BE_DATA * be, const char *name)
{
/* callback function: loadNetworkByName */
    struct gaia_network *ptr = (struct gaia_network *) be;
    char *network_name;
    int spatial;
    int srid;
    int has_z;
    int allow_coincident;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) ptr->cache;

    if (gaiaReadNetworkFromDBMS
	(ptr->db_handle, name, &network_name, &spatial, &srid, &has_z,
	 &allow_coincident))
      {
	  ptr->network_name = network_name;
	  ptr->srid = srid;
	  ptr->has_z = has_z;
	  ptr->spatial = spatial;
	  ptr->allow_coincident = allow_coincident;
	  /* registering into the Internal Cache double linked list */
	  if (cache->firstNetwork == NULL)
	      cache->firstNetwork = ptr;
	  if (cache->lastNetwork != NULL)
	    {
		struct gaia_network *p2 =
		    (struct gaia_network *) (cache->lastNetwork);
		p2->next = ptr;
	    }
	  cache->lastNetwork = ptr;
	  return (LWN_BE_NETWORK *) ptr;
      }
    else
	return NULL;
}

int
netcallback_freeNetwork (LWN_BE_NETWORK * lwn_net)
{
/* callback function: freeNetwork - does nothing */
    if (lwn_net != NULL)
	lwn_net = NULL;		/* silencing stupid compiler warnings on unuse args */
    return 1;
}

static gaiaGeomCollPtr
do_convert_lwnline_to_geom (LWN_LINE * line, int srid)
{
/* converting an LWN_LINE into a Linestring  */
    int iv;
    double ox;
    double oy;
    int normalized_points = 0;
    gaiaLinestringPtr ln;
    gaiaGeomCollPtr geom;
    if (line->has_z)
	geom = gaiaAllocGeomCollXYZ ();
    else
	geom = gaiaAllocGeomColl ();
    for (iv = 0; iv < line->points; iv++)
      {
	  /* counting how many duplicate points are there */
	  double x = line->x[iv];
	  double y = line->y[iv];
	  if (iv == 0)
	      normalized_points++;
	  else
	    {
		if (x == ox && y == oy)
		    ;
		else
		    normalized_points++;
	    }
	  ox = x;
	  oy = y;
      }
    ln = gaiaAddLinestringToGeomColl (geom, normalized_points);
    normalized_points = 0;
    for (iv = 0; iv < line->points; iv++)
      {
	  double x = line->x[iv];
	  double y = line->y[iv];
	  double z;
	  if (iv == 0)
	      ;
	  else
	    {
		if (x == ox && y == oy)
		    continue;	/* discarding duplicate points */
	    }
	  ox = x;
	  oy = y;
	  if (line->has_z)
	      z = line->z[iv];
	  if (line->has_z)
	    {
		gaiaSetPointXYZ (ln->Coords, normalized_points, x, y, z);
	    }
	  else
	    {
		gaiaSetPoint (ln->Coords, normalized_points, x, y);
	    }
	  normalized_points++;
      }
    geom->DeclaredType = GAIA_LINESTRING;
    geom->Srid = srid;

    return geom;
}

LWN_NET_NODE *
netcallback_getNetNodeWithinDistance2D (const LWN_BE_NETWORK * lwn_net,
					const LWN_POINT * pt, double dist,
					int *numelems, int fields, int limit)
{
/* callback function: getNodeWithinDistance2D */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt;
    int ret;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct net_nodes_list *list = NULL;
    LWN_NET_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }
    if (pt == NULL)
      {
	  *numelems = 0;
	  return NULL;
      }

    stmt = accessor->stmt_getNetNodeWithinDistance2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql =
	      do_prepare_read_net_node (accessor->network_name, fields,
					accessor->spatial, accessor->has_z);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Prepare_getNetNodeWithinDistance2D AUX error: \"%s\"",
		     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, pt->x);
    sqlite3_bind_double (stmt, 2, pt->y);
    sqlite3_bind_double (stmt, 3, dist);
    sqlite3_bind_double (stmt, 4, pt->x);
    sqlite3_bind_double (stmt, 5, pt->y);
    sqlite3_bind_double (stmt, 6, dist);
    list = create_nodes_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_net_node
			  (stmt_aux, list, node_id, fields, accessor->spatial,
			   accessor->has_z,
			   "netcallback_getNetNodeWithinDistance2D", &msg))
			{
			    gaianet_set_last_error_msg (net, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_getNodeWithinDistance2D: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct net_node *p_nd;
		result = malloc (sizeof (LWN_NET_NODE) * list->count);
		p_nd = list->first;
		while (p_nd != NULL)
		  {
		      LWN_NET_NODE *nd = result + i;
		      nd->geom = NULL;
		      if (fields & LWN_COL_NODE_NODE_ID)
			  nd->node_id = p_nd->node_id;
		      if (fields & LWN_COL_NODE_GEOM)
			{
			    if (p_nd->is_null)
				;
			    else
			      {
				  if (accessor->has_z)
				      nd->geom =
					  lwn_create_point3d (accessor->srid,
							      p_nd->x, p_nd->y,
							      p_nd->z);
				  else
				      nd->geom =
					  lwn_create_point2d (accessor->srid,
							      p_nd->x, p_nd->y);
			      }
			}
		      i++;
		      p_nd = p_nd->next;
		  }
		*numelems = list->count;
	    }
      }

    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_net_nodes_list (list);
    sqlite3_reset (stmt);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_net_nodes_list (list);
    *numelems = -1;
    sqlite3_reset (stmt);
    return NULL;
}

LWN_NET_NODE *
netcallback_getNetNodeById (const LWN_BE_NETWORK * lwn_net,
			    const LWN_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getNetNodeById */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt_aux = NULL;
    int ret;
    int i;
    char *sql;
    struct net_nodes_list *list = NULL;
    LWN_NET_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    /* preparing the SQL statement */
    sql =
	do_prepare_read_net_node (accessor->network_name, fields,
				  accessor->spatial, accessor->has_z);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt_aux,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getNetNodeById AUX error: \"%s\"",
			       sqlite3_errmsg (accessor->db_handle));
	  gaianet_set_last_error_msg (net, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_nodes_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_net_node
	      (stmt_aux, list, *(ids + i), fields, accessor->spatial,
	       accessor->has_z, "netcallback_getNetNodeById", &msg))
	    {
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no node was found */
	  *numelems = list->count;
      }
    else
      {
	  struct net_node *p_nd;
	  result = malloc (sizeof (LWN_NET_NODE) * list->count);
	  p_nd = list->first;
	  i = 0;
	  while (p_nd != NULL)
	    {
		LWN_NET_NODE *nd = result + i;
		nd->geom = NULL;
		if (fields & LWN_COL_NODE_NODE_ID)
		    nd->node_id = p_nd->node_id;
		if (fields & LWN_COL_NODE_GEOM)
		  {
		      if (p_nd->is_null)
			  ;
		      else
			{
			    if (accessor->has_z)
				nd->geom =
				    lwn_create_point3d (accessor->srid, p_nd->x,
							p_nd->y, p_nd->z);
			    else
				nd->geom =
				    lwn_create_point2d (accessor->srid, p_nd->x,
							p_nd->y);
			}
		  }
		i++;
		p_nd = p_nd->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_net_nodes_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_net_nodes_list (list);
    *numelems = -1;
    return NULL;
}

LWN_LINK *
netcallback_getLinkWithinDistance2D (const LWN_BE_NETWORK * lwn_net,
				     const LWN_POINT * pt, double dist,
				     int *numelems, int fields, int limit)
{
/* callback function: getLinkWithinDistance2D */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt;
    int ret;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct net_links_list *list = NULL;
    LWN_LINK *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }
    if (pt == NULL)
      {
	  *numelems = 0;
	  return NULL;
      }

    stmt = accessor->stmt_getLinkWithinDistance2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql = do_prepare_read_link (accessor->network_name, fields);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf ("Prepare_getLinkById AUX error: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, pt->x);
    sqlite3_bind_double (stmt, 2, pt->y);
    sqlite3_bind_double (stmt, 3, dist);
    sqlite3_bind_double (stmt, 4, pt->x);
    sqlite3_bind_double (stmt, 5, pt->y);
    sqlite3_bind_double (stmt, 6, dist);
    list = create_links_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 link_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_link
			  (stmt_aux, list, link_id, fields,
			   "netcallback_getLinkWithinDistance2D", &msg))
			{
			    gaianet_set_last_error_msg (net, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_getLinkWithinDistance2D: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct net_link *p_lnk;
		result = malloc (sizeof (LWN_LINK) * list->count);
		p_lnk = list->first;
		while (p_lnk != NULL)
		  {
		      LWN_LINK *lnk = result + i;
		      if (fields & LWN_COL_LINK_LINK_ID)
			  lnk->link_id = p_lnk->link_id;
		      if (fields & LWN_COL_LINK_START_NODE)
			  lnk->start_node = p_lnk->start_node;
		      if (fields & LWN_COL_LINK_END_NODE)
			  lnk->end_node = p_lnk->end_node;
		      if (fields & LWN_COL_LINK_GEOM)
			  lnk->geom =
			      gaianet_convert_linestring_to_lwnline
			      (p_lnk->geom, accessor->srid, accessor->has_z);
		      else
			  lnk->geom = NULL;
		      i++;
		      p_lnk = p_lnk->next;
		  }
		*numelems = list->count;
	    }
      }
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_links_list (list);
    sqlite3_reset (stmt);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_links_list (list);
    *numelems = -1;
    sqlite3_reset (stmt);
    return NULL;
}

int
netcallback_insertNetNodes (const LWN_BE_NETWORK * lwn_net,
			    LWN_NET_NODE * nodes, int numelems)
{
/* callback function: insertNetNodes */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt;
    int ret;
    int i;
    unsigned char *p_blob;
    int n_bytes;
    gaiaGeomCollPtr geom = NULL;
    int gpkg_mode = 0;
    int tiny_point = 0;
    if (accessor == NULL)
	return 0;

    stmt = accessor->stmt_insertNetNodes;
    if (stmt == NULL)
	return 0;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

    for (i = 0; i < numelems; i++)
      {
	  LWN_NET_NODE *nd = nodes + i;
	  /* setting up the prepared statement */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (nd->node_id <= 0)
	      sqlite3_bind_null (stmt, 1);
	  else
	      sqlite3_bind_int64 (stmt, 1, nd->node_id);
	  if (nd->geom == NULL)
	      sqlite3_bind_null (stmt, 2);
	  else
	    {
		if (accessor->has_z)
		    geom = gaiaAllocGeomCollXYZ ();
		else
		    geom = gaiaAllocGeomColl ();
		if (accessor->has_z)
		    gaiaAddPointToGeomCollXYZ (geom, nd->geom->x, nd->geom->y,
					       nd->geom->z);
		else
		    gaiaAddPointToGeomColl (geom, nd->geom->x, nd->geom->y);
		geom->Srid = accessor->srid;
		geom->DeclaredType = GAIA_POINT;
		gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode,
					    tiny_point);
		gaiaFreeGeomColl (geom);
		sqlite3_bind_blob (stmt, 2, p_blob, n_bytes, free);
	    }
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		/* retrieving the PK value */
		nd->node_id = sqlite3_last_insert_rowid (accessor->db_handle);
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_insertNetNodes: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return 1;

  error:
    sqlite3_reset (stmt);
    return 0;
}

int
netcallback_updateNetNodesById (const LWN_BE_NETWORK * lwn_net,
				const LWN_NET_NODE * nodes, int numnodes,
				int upd_fields)
{
/* callback function: updateNetNodesById */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int icol = 1;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_node", accessor->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET", xtable);
    free (xtable);
    prev = sql;
    if (upd_fields & LWN_COL_NODE_NODE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, node_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s node_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & LWN_COL_NODE_GEOM)
      {
	  if (accessor->has_z)
	    {
		if (comma)
		    sql =
			sqlite3_mprintf
			("%s, geometry = MakePointZ(?, ?. ?, %d)", prev,
			 accessor->srid);
		else
		    sql =
			sqlite3_mprintf
			("%s geometry = MakePointZ(?, ?, ?, %d)", prev,
			 accessor->srid);
	    }
	  else
	    {
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, geometry = MakePoint(?, ?, %d)",
					 prev, accessor->srid);
		else
		    sql =
			sqlite3_mprintf ("%s geometry = MakePoint(?, ?, %d)",
					 prev, accessor->srid);
	    }
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    sql = sqlite3_mprintf ("%s WHERE node_id = ?", prev);
    sqlite3_free (prev);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_updateNetNodesById error: \"%s\"",
			       sqlite3_errmsg (accessor->db_handle));
	  gaianet_set_last_error_msg (net, msg);
	  sqlite3_free (msg);
	  return -1;
      }

    for (i = 0; i < numnodes; i++)
      {
	  /* parameter binding */
	  const LWN_NET_NODE *nd = nodes + i;
	  icol = 1;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (upd_fields & LWN_COL_NODE_NODE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, nd->node_id);
		icol++;
	    }
	  if (upd_fields & LWN_COL_NODE_GEOM)
	    {
		if (accessor->spatial)
		  {
		      sqlite3_bind_double (stmt, icol, nd->geom->x);
		      icol++;
		      sqlite3_bind_double (stmt, icol, nd->geom->y);
		      icol++;
		      if (accessor->has_z)
			{
			    sqlite3_bind_double (stmt, icol, nd->geom->z);
			    icol++;
			}
		  }
		else
		  {
		      icol += 2;
		      if (accessor->has_z)
			  icol++;
		  }
	    }
	  sqlite3_bind_int64 (stmt, icol, nd->node_id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      changed += sqlite3_changes (accessor->db_handle);
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_updateNetNodesById: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

int
netcallback_insertLinks (const LWN_BE_NETWORK * lwn_net, LWN_LINK * links,
			 int numelems)
{
/* callback function: insertLinks */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt;
    int ret;
    int i;
    gaiaGeomCollPtr geom;
    unsigned char *p_blob;
    int n_bytes;
    int gpkg_mode = 0;
    int tiny_point = 0;
    if (accessor == NULL)
	return 0;

    stmt = accessor->stmt_insertLinks;
    if (stmt == NULL)
	return 0;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

    for (i = 0; i < numelems; i++)
      {
	  LWN_LINK *lnk = links + i;
	  /* setting up the prepared statement */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (lnk->link_id <= 0)
	      sqlite3_bind_null (stmt, 1);
	  else
	      sqlite3_bind_int64 (stmt, 1, lnk->link_id);
	  sqlite3_bind_int64 (stmt, 2, lnk->start_node);
	  sqlite3_bind_int64 (stmt, 3, lnk->end_node);
	  if (lnk->geom == NULL)
	      sqlite3_bind_null (stmt, 4);
	  else
	    {
		/* transforming the LWN_LINE into a Geometry-Linestring */
		geom = do_convert_lwnline_to_geom (lnk->geom, accessor->srid);
		gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode,
					    tiny_point);
		gaiaFreeGeomColl (geom);
		sqlite3_bind_blob (stmt, 4, p_blob, n_bytes, free);
	    }
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		/* retrieving the PK value */
		lnk->link_id = sqlite3_last_insert_rowid (accessor->db_handle);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("netcallback_inserLinks: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return 1;

  error:
    sqlite3_reset (stmt);
    return 0;
}

LWN_LINK *
netcallback_getLinkByNetNode (const LWN_BE_NETWORK * lwn_net,
			      const LWN_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getLinkByNetNode */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    int ret;
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;
    int i;
    sqlite3_stmt *stmt_aux = NULL;
    struct net_links_list *list = NULL;
    LWN_LINK *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    /* preparing the SQL statement */
    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    if (fields & LWN_COL_LINK_LINK_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, link_id", prev);
	  else
	      sql = sqlite3_mprintf ("%s link_id", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_LINK_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_LINK_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & LWN_COL_LINK_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geometry", prev);
	  else
	      sql = sqlite3_mprintf ("%s geometry", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    table = sqlite3_mprintf ("%s_link", accessor->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("%s FROM MAIN.\"%s\" WHERE start_node = ? OR end_node = ?", prev,
	 xtable);
    free (xtable);
    sqlite3_free (prev);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
			    &stmt_aux, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getLinkByNetNode AUX error: \"%s\"",
			       sqlite3_errmsg (accessor->db_handle));
	  gaianet_set_last_error_msg (net, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_links_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_link_by_net_node
	      (stmt_aux, list, *(ids + i), fields,
	       "netcallback_getLinkByNetNode", &msg))
	    {
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no link was found */
	  *numelems = list->count;
      }
    else
      {
	  struct net_link *p_lnk;
	  result = malloc (sizeof (LWN_LINK) * list->count);
	  p_lnk = list->first;
	  i = 0;
	  while (p_lnk != NULL)
	    {
		LWN_LINK *lnk = result + i;
		lnk->geom = NULL;
		if (fields & LWN_COL_LINK_LINK_ID)
		    lnk->link_id = p_lnk->link_id;
		if (fields & LWN_COL_LINK_START_NODE)
		    lnk->start_node = p_lnk->start_node;
		if (fields & LWN_COL_LINK_END_NODE)
		    lnk->end_node = p_lnk->end_node;
		if (fields & LWN_COL_LINK_GEOM)
		    lnk->geom =
			gaianet_convert_linestring_to_lwnline (p_lnk->geom,
							       accessor->srid,
							       accessor->has_z);
		i++;
		p_lnk = p_lnk->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_links_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_links_list (list);
    *numelems = -1;
    return NULL;
}

int
netcallback_deleteNetNodesById (const LWN_BE_NETWORK * lwn_net,
				const LWN_ELEMID * ids, int numelems)
{
/* callback function: deleteNetNodesById */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    stmt = accessor->stmt_deleteNetNodesById;
    if (stmt == NULL)
	return -1;

    for (i = 0; i < numelems; i++)
      {
	  /* parameter binding */
	  sqlite3_int64 id = *(ids + i);
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		changed += sqlite3_changes (accessor->db_handle);
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_deleteNetNodesById: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return changed;

  error:
    sqlite3_reset (stmt);
    return -1;
}

LWN_NET_NODE *
netcallback_getNetNodeWithinBox2D (const LWN_BE_NETWORK * lwn_net,
				   const LWN_BBOX * box, int *numelems,
				   int fields, int limit)
{
/* callback function: getNetNodeWithinBox2D */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt;
    int ret;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct net_nodes_list *list = NULL;
    LWN_NET_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getNetNodeWithinBox2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql =
	      do_prepare_read_net_node (accessor->network_name, fields,
					accessor->spatial, accessor->has_z);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Prepare_getNetNodeWithinBox2D AUX error: \"%s\"",
		     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, box->min_x);
    sqlite3_bind_double (stmt, 2, box->min_y);
    sqlite3_bind_double (stmt, 3, box->max_x);
    sqlite3_bind_double (stmt, 4, box->max_y);
    list = create_nodes_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_net_node
			  (stmt_aux, list, node_id, fields, accessor->spatial,
			   accessor->has_z, "netcallback_getNetNodeWithinBox2D",
			   &msg))
			{
			    gaianet_set_last_error_msg (net, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_getNetNodeWithinBox2D: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct net_node *p_nd;
		result = malloc (sizeof (LWN_NET_NODE) * list->count);
		p_nd = list->first;
		while (p_nd != NULL)
		  {
		      LWN_NET_NODE *nd = result + i;
		      nd->geom = NULL;
		      if (fields & LWN_COL_NODE_NODE_ID)
			  nd->node_id = p_nd->node_id;
		      if (fields & LWN_COL_NODE_GEOM)
			{
			    if (p_nd->is_null)
				;
			    else
			      {
				  if (accessor->has_z)
				      nd->geom =
					  lwn_create_point3d (accessor->srid,
							      p_nd->x, p_nd->y,
							      p_nd->z);
				  else
				      nd->geom =
					  lwn_create_point2d (accessor->srid,
							      p_nd->x, p_nd->y);
			      }
			}
		      i++;
		      p_nd = p_nd->next;
		  }
		*numelems = list->count;
	    }
      }

    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_net_nodes_list (list);
    sqlite3_reset (stmt);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_net_nodes_list (list);
    *numelems = 1;
    sqlite3_reset (stmt);
    return NULL;
}

LWN_ELEMID
netcallback_getNextLinkId (const LWN_BE_NETWORK * lwn_net)
{
/* callback function: getNextLinkId */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt_in;
    sqlite3_stmt *stmt_out;
    int ret;
    sqlite3_int64 link_id = -1;
    if (accessor == NULL)
	return -1;

    stmt_in = accessor->stmt_getNextLinkId;
    if (stmt_in == NULL)
	return -1;
    stmt_out = accessor->stmt_setNextLinkId;
    if (stmt_out == NULL)
	return -1;

/* setting up the prepared statement */
    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	      link_id = sqlite3_column_int64 (stmt_in, 0);
	  else
	    {
		char *msg = sqlite3_mprintf ("netcallback_getNextLinkId: %s",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto stop;
	    }
      }

/* updating next_link_id */
    sqlite3_reset (stmt_out);
    sqlite3_clear_bindings (stmt_out);
    ret = sqlite3_step (stmt_out);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
      {
	  sqlite3_reset (stmt_in);
	  sqlite3_reset (stmt_out);
	  return link_id;
      }
    else
      {
	  char *msg = sqlite3_mprintf ("netcallback_setNextLinkId: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaianet_set_last_error_msg (net, msg);
	  sqlite3_free (msg);
	  link_id = -1;
      }
  stop:
    sqlite3_reset (stmt_in);
    sqlite3_reset (stmt_out);
    if (link_id >= 0)
	link_id++;
    return link_id;
}

int
netcallback_updateLinksById (const LWN_BE_NETWORK * lwn_net,
			     const LWN_LINK * links, int numlinks,
			     int upd_fields)
{
/* callback function: updateLinksById */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt = NULL;
    gaiaGeomCollPtr geom;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int i;
    int changed = 0;
    unsigned char *p_blob;
    int n_bytes;
    int gpkg_mode = 0;
    int tiny_point = 0;
    if (accessor == NULL)
	return -1;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_link", accessor->network_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET", xtable);
    free (xtable);
    prev = sql;
    if (upd_fields & LWN_COL_LINK_LINK_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, link_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s link_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & LWN_COL_LINK_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & LWN_COL_LINK_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & LWN_COL_LINK_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geometry = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s geometry = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    sql = sqlite3_mprintf ("%s WHERE link_id = ?", prev);
    sqlite3_free (prev);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_updateLinksById error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaianet_set_last_error_msg (net, msg);
	  sqlite3_free (msg);
	  return -1;
      }

    for (i = 0; i < numlinks; i++)
      {
	  /* parameter binding */
	  int icol = 1;
	  const LWN_LINK *upd_link = links + i;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (upd_fields & LWN_COL_LINK_LINK_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_link->link_id);
		icol++;
	    }
	  if (upd_fields & LWN_COL_LINK_START_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_link->start_node);
		icol++;
	    }
	  if (upd_fields & LWN_COL_LINK_END_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_link->end_node);
		icol++;
	    }
	  if (upd_fields & LWN_COL_LINK_GEOM)
	    {
		if (upd_link->geom == NULL)
		    sqlite3_bind_null (stmt, icol);
		else
		  {
		      /* transforming the LWN_LINE into a Geometry-Linestring */
		      geom =
			  do_convert_lwnline_to_geom (upd_link->geom,
						      accessor->srid);
		      gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes,
						  gpkg_mode, tiny_point);
		      gaiaFreeGeomColl (geom);
		      sqlite3_bind_blob (stmt, icol, p_blob, n_bytes, free);
		  }
		icol++;
	    }
	  sqlite3_bind_int64 (stmt, icol, upd_link->link_id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      changed += sqlite3_changes (accessor->db_handle);
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_updateLinksById: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

LWN_LINK *
netcallback_getLinkById (const LWN_BE_NETWORK * lwn_net,
			 const LWN_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getLinkById */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt_aux = NULL;
    int ret;
    int i;
    char *sql;
    struct net_links_list *list = NULL;
    LWN_LINK *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    /* preparing the SQL statement */
    sql = do_prepare_read_link (accessor->network_name, fields);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt_aux,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getLinkById AUX error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaianet_set_last_error_msg (net, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_links_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_link
	      (stmt_aux, list, *(ids + i), fields, "netcallback_getLinkById",
	       &msg))
	    {
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no link was found */
	  *numelems = list->count;
      }
    else
      {
	  struct net_link *p_lnk;
	  result = malloc (sizeof (LWN_LINK) * list->count);
	  p_lnk = list->first;
	  i = 0;
	  while (p_lnk != NULL)
	    {
		LWN_LINK *lnk = result + i;
		lnk->geom = NULL;
		if (fields & LWN_COL_LINK_LINK_ID)
		    lnk->link_id = p_lnk->link_id;
		if (fields & LWN_COL_LINK_START_NODE)
		    lnk->start_node = p_lnk->start_node;
		if (fields & LWN_COL_LINK_END_NODE)
		    lnk->end_node = p_lnk->end_node;
		if (fields & LWN_COL_LINK_GEOM)
		  {
		      if (p_lnk->geom == NULL)
			  lnk->geom = NULL;
		      else
			  lnk->geom =
			      gaianet_convert_linestring_to_lwnline
			      (p_lnk->geom, accessor->srid, accessor->has_z);
		  }
		i++;
		p_lnk = p_lnk->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_links_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_links_list (list);
    *numelems = -1;
    return NULL;
}

int
netcallback_deleteLinksById (const LWN_BE_NETWORK * lwn_net,
			     const LWN_ELEMID * ids, int numelems)
{
/* callback function: deleteLinksById */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    stmt = accessor->stmt_deleteLinksById;
    if (stmt == NULL)
	return -1;

    for (i = 0; i < numelems; i++)
      {
	  /* parameter binding */
	  sqlite3_int64 id = *(ids + i);
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		changed += sqlite3_changes (accessor->db_handle);
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("netcallback_deleteLinksById: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaianet_set_last_error_msg (net, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return changed;

  error:
    sqlite3_reset (stmt);
    return -1;
}

int
netcallback_netGetSRID (const LWN_BE_NETWORK * lwn_net)
{
/* callback function: netGetSRID */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    if (accessor == NULL)
	return -1;

    return accessor->srid;
}

int
netcallback_netHasZ (const LWN_BE_NETWORK * lwn_net)
{
/* callback function: netHasZ */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    if (accessor == NULL)
	return 0;

    return accessor->has_z;
}

int
netcallback_netIsSpatial (const LWN_BE_NETWORK * lwn_net)
{
/* callback function: netIsSpatial */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    if (accessor == NULL)
	return 0;

    return accessor->spatial;
}

int
netcallback_netAllowCoincident (const LWN_BE_NETWORK * lwn_net)
{
/* callback function: netAllowCoincident */
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    if (accessor == NULL)
	return 0;

    return accessor->allow_coincident;
}

const void *
netcallback_netGetGEOS (const LWN_BE_NETWORK * lwn_net)
{
/* callback function: netGetGEOS */
    const struct splite_internal_cache *cache;
    GaiaNetworkAccessorPtr net = (GaiaNetworkAccessorPtr) lwn_net;
    struct gaia_network *accessor = (struct gaia_network *) net;
    if (accessor == NULL)
	return NULL;
    if (accessor->cache == NULL)
	return NULL;

    cache = (const struct splite_internal_cache *) (accessor->cache);
    return cache->GEOS_handle;
}

#endif /* end RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/network_private.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
/*
 network_private.h -- Topology-Network opaque definitions
  
 version 4.3, 2015 August 11

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/**
 \file network_private.h

 SpatiaLite Topology-Network private header file
 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
#ifdef DLL_EXPORT
#define NETWORK_PRIVATE
#else
#define NETWORK_PRIVATE
#endif
#else
#define NETWORK_PRIVATE __attribute__ ((visibility("hidden")))
#endif
#endif

struct gaia_network
{
/* a struct wrapping a Topology-Network Accessor Object */
    const void *cache;
    sqlite3 *db_handle;
    char *network_name;
    int spatial;
    int srid;
    int has_z;
    int allow_coincident;
    char *last_error_message;
    sqlite3_stmt *stmt_getNetNodeWithinDistance2D;
    sqlite3_stmt *stmt_getLinkWithinDistance2D;
    sqlite3_stmt *stmt_insertNetNodes;
    sqlite3_stmt *stmt_deleteNetNodesById;
    sqlite3_stmt *stmt_getNetNodeWithinBox2D;
    sqlite3_stmt *stmt_getNextLinkId;
    sqlite3_stmt *stmt_setNextLinkId;
    sqlite3_stmt *stmt_insertLinks;
    sqlite3_stmt *stmt_deleteLinksById;
    void *callbacks;
    void *lwn_iface;
    void *lwn_network;
    struct gaia_network *prev;
    struct gaia_network *next;
};

/* prototypes for functions handling Topology errors */
NETWORK_PRIVATE void gaianet_reset_last_error_msg (GaiaNetworkAccessorPtr
						   accessor);

NETWORK_PRIVATE void gaianet_set_last_error_msg (GaiaNetworkAccessorPtr
						 accessor, const char *msg);

NETWORK_PRIVATE const char
    *gaianet_get_last_exception (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE int auxnet_insert_into_network (GaiaNetworkAccessorPtr accessor,
						gaiaGeomCollPtr geom);


/* prototypes for functions creating some SQL prepared statement */
NETWORK_PRIVATE sqlite3_stmt
    *
do_create_stmt_getNetNodeWithinDistance2D (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_getLinkWithinDistance2D (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_insertNetNodes (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_deleteNetNodesById (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_getNetNodeWithinBox2D (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_getNextLinkId (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_setNextLinkId (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_insertLinks (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE sqlite3_stmt
    * do_create_stmt_deleteLinksById (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE void
finalize_toponet_prepared_stmts (GaiaNetworkAccessorPtr accessor);

NETWORK_PRIVATE void
create_toponet_prepared_stmts (GaiaNetworkAccessorPtr accessor);


/* common utility */
NETWORK_PRIVATE LWN_LINE
    * gaianet_convert_linestring_to_lwnline (gaiaLinestringPtr ln, int srid,
					     int has_z);


/* callback function prototypes */
const char *netcallback_lastErrorMessage (const LWN_BE_DATA * be);

int netcallback_freeNetwork (LWN_BE_NETWORK * net);

LWN_BE_NETWORK *netcallback_loadNetworkByName (const LWN_BE_DATA * be,
					       const char *name);

LWN_NET_NODE *netcallback_getNetNodeWithinDistance2D (const LWN_BE_NETWORK *
						      lwn_net,
						      const LWN_POINT * pt,
						      double dist,
						      int *numelems, int fields,
						      int limit);

LWN_LINK *netcallback_getLinkWithinDistance2D (const LWN_BE_NETWORK * net,
					       const LWN_POINT * pt,
					       double dist, int *numelems,
					       int fields, int limit);

int netcallback_updateNetNodesById (const LWN_BE_NETWORK * net,
				    const LWN_NET_NODE * nodes, int numnodes,
				    int upd_fields);

int netcallback_deleteNetNodesById (const LWN_BE_NETWORK * net,
				    const LWN_ELEMID * ids, int numnodes);

int netcallback_insertNetNodes (const LWN_BE_NETWORK * net, LWN_NET_NODE * node,
				int numelems);

LWN_NET_NODE *netcallback_getNetNodeById (const LWN_BE_NETWORK * net,
					  const LWN_ELEMID * ids, int *numelems,
					  int fields);

LWN_ELEMID netcallback_getNextLinkId (const LWN_BE_NETWORK * net);

LWN_NET_NODE *netcallback_getNetNodeWithinBox2D (const LWN_BE_NETWORK * net,
						 const LWN_BBOX * box,
						 int *numelems, int fields,
						 int limit);

LWN_ELEMID netcallback_getNextLinkId (const LWN_BE_NETWORK * lwn_net);

int netcallback_insertLinks (const LWN_BE_NETWORK * net,
			     LWN_LINK * links, int numelems);

int netcallback_updateLinksById (const LWN_BE_NETWORK * net,
				 const LWN_LINK * links, int numlinks,
				 int upd_fields);

LWN_LINK *netcallback_getLinkByNetNode (const LWN_BE_NETWORK * net,
					const LWN_ELEMID * ids, int *numelems,
					int fields);

LWN_LINK *netcallback_getLinkById (const LWN_BE_NETWORK * lwn_net,
				   const LWN_ELEMID * ids, int *numelems,
				   int fields);

int netcallback_deleteLinksById (const LWN_BE_NETWORK * net,
				 const LWN_ELEMID * ids, int numnodes);

int netcallback_netGetSRID (const LWN_BE_NETWORK * net);

int netcallback_netHasZ (const LWN_BE_NETWORK * net);

int netcallback_netIsSpatial (const LWN_BE_NETWORK * net);

int netcallback_netAllowCoincident (const LWN_BE_NETWORK * net);

const void *netcallback_netGetGEOS (const LWN_BE_NETWORK * net);
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































Deleted src/topology/topo_callbacks.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
/*

 topo_callbacks.c -- implementation of Topology callback functions 
    
 version 4.3, 2015 July 18

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/*
 
CREDITS:

this module has been completely funded by:
Regione Toscana - Settore Sistema Informativo Territoriale ed Ambientale
(Topology support) 

CIG: 6038019AE5

*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#if defined(_WIN32) && !defined(__MINGW32__)
#include "config-msvc.h"
#else
#include "config.h"
#endif

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

#include <spatialite/sqlite.h>
#include <spatialite/debug.h>
#include <spatialite/gaiageo.h>
#include <spatialite/gaia_topology.h>
#include <spatialite/gaiaaux.h>

#include <spatialite.h>
#include <spatialite_private.h>

#include <librttopo.h>

#include "topology_private.h"

struct topo_node
{
/* a struct wrapping a Topology Node */
    sqlite3_int64 node_id;
    sqlite3_int64 containing_face;
    double x;
    double y;
    double z;
    int has_z;
    struct topo_node *next;
};

struct topo_nodes_list
{
/* a struct wrapping a list of Topology Nodes */
    struct topo_node *first;
    struct topo_node *last;
    int count;
};

struct topo_edge
{
/* a struct wrapping a Topology Edge */
    sqlite3_int64 edge_id;
    sqlite3_int64 start_node;
    sqlite3_int64 end_node;
    sqlite3_int64 face_left;
    sqlite3_int64 face_right;
    sqlite3_int64 next_left;
    sqlite3_int64 next_right;
    gaiaLinestringPtr geom;
    struct topo_edge *next;
};

struct topo_edges_list
{
/* a struct wrapping a list of Topology Edegs */
    struct topo_edge *first;
    struct topo_edge *last;
    int count;
};

struct topo_face
{
/* a struct wrapping a Topology Face */
    sqlite3_int64 id;
    sqlite3_int64 face_id;
    double minx;
    double miny;
    double maxx;
    double maxy;
    struct topo_face *next;
};

struct topo_faces_list
{
/* a struct wrapping a list of Topology Edegs */
    struct topo_face *first;
    struct topo_face *last;
    int count;
};

static struct topo_node *
create_topo_node (sqlite3_int64 node_id, sqlite3_int64 containing_face,
		  double x, double y, double z, int has_z)
{
/* creating a Topology Node */
    struct topo_node *ptr = malloc (sizeof (struct topo_node));
    ptr->node_id = node_id;
    ptr->containing_face = containing_face;
    ptr->x = x;
    ptr->y = y;
    ptr->z = z;
    ptr->has_z = has_z;
    ptr->next = NULL;
    return ptr;
}

static void
destroy_topo_node (struct topo_node *ptr)
{
/* destroying a Topology Node */
    if (ptr == NULL)
	return;
    free (ptr);
}

static struct topo_edge *
create_topo_edge (sqlite3_int64 edge_id, sqlite3_int64 start_node,
		  sqlite3_int64 end_node, sqlite3_int64 face_left,
		  sqlite3_int64 face_right, sqlite3_int64 next_left,
		  sqlite3_int64 next_right, gaiaLinestringPtr ln)
{
/* creating a Topology Edge */
    struct topo_edge *ptr = malloc (sizeof (struct topo_edge));
    ptr->edge_id = edge_id;
    ptr->start_node = start_node;
    ptr->end_node = end_node;
    ptr->face_left = face_left;
    ptr->face_right = face_right;
    ptr->next_left = next_left;
    ptr->next_right = next_right;
    ptr->geom = ln;
    ptr->next = NULL;
    return ptr;
}

static void
destroy_topo_edge (struct topo_edge *ptr)
{
/* destroying a Topology Edge */
    if (ptr == NULL)
	return;
    if (ptr->geom != NULL)
	gaiaFreeLinestring (ptr->geom);
    free (ptr);
}

static struct topo_face *
create_topo_face (sqlite3_int64 id, sqlite3_int64 face_id, double minx,
		  double miny, double maxx, double maxy)
{
/* creating a Topology Face */
    struct topo_face *ptr = malloc (sizeof (struct topo_face));
    ptr->id = id;
    ptr->face_id = face_id;
    ptr->minx = minx;
    ptr->miny = miny;
    ptr->maxx = maxx;
    ptr->maxy = maxy;
    ptr->next = NULL;
    return ptr;
}

static void
destroy_topo_face (struct topo_face *ptr)
{
/* destroying a Topology Face */
    if (ptr == NULL)
	return;
    free (ptr);
}

static struct topo_nodes_list *
create_nodes_list (void)
{
/* creating an empty list of Topology Nodes */
    struct topo_nodes_list *ptr = malloc (sizeof (struct topo_nodes_list));
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->count = 0;
    return ptr;
}

static void
destroy_nodes_list (struct topo_nodes_list *ptr)
{
/* destroying a list of Topology Nodes */
    struct topo_node *p;
    struct topo_node *pn;
    if (ptr == NULL)
	return;

    p = ptr->first;
    while (p != NULL)
      {
	  pn = p->next;
	  destroy_topo_node (p);
	  p = pn;
      }
    free (ptr);
}

static void
add_node_2D (struct topo_nodes_list *list, sqlite3_int64 node_id,
	     sqlite3_int64 containing_face, double x, double y)
{
/* inserting a Topology Node 2D into the list */
    struct topo_node *ptr;
    if (list == NULL)
	return;

    ptr = create_topo_node (node_id, containing_face, x, y, 0.0, 0);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static void
add_node_3D (struct topo_nodes_list *list, sqlite3_int64 node_id,
	     sqlite3_int64 containing_face, double x, double y, double z)
{
/* inserting a Topology Node 3D into the list */
    struct topo_node *ptr;
    if (list == NULL)
	return;

    ptr = create_topo_node (node_id, containing_face, x, y, z, 1);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static struct topo_edges_list *
create_edges_list (void)
{
/* creating an empty list of Topology Edges */
    struct topo_edges_list *ptr = malloc (sizeof (struct topo_edges_list));
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->count = 0;
    return ptr;
}

static void
destroy_edges_list (struct topo_edges_list *ptr)
{
/* destroying a list of Topology Edges */
    struct topo_edge *p;
    struct topo_edge *pn;
    if (ptr == NULL)
	return;

    p = ptr->first;
    while (p != NULL)
      {
	  pn = p->next;
	  destroy_topo_edge (p);
	  p = pn;
      }
    free (ptr);
}

static void
add_edge (struct topo_edges_list *list, sqlite3_int64 edge_id,
	  sqlite3_int64 start_node, sqlite3_int64 end_node,
	  sqlite3_int64 face_left, sqlite3_int64 face_right,
	  sqlite3_int64 next_left, sqlite3_int64 next_right,
	  gaiaLinestringPtr ln)
{
/* inserting a Topology Edge into the list */
    struct topo_edge *ptr;
    if (list == NULL)
	return;

    ptr = list->first;
    while (ptr != NULL)
      {
	  /* avoiding to insert duplicate entries */
	  if (ptr->edge_id == edge_id)
	      return;
	  ptr = ptr->next;
      }

    ptr =
	create_topo_edge (edge_id, start_node, end_node, face_left, face_right,
			  next_left, next_right, ln);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

static struct topo_faces_list *
create_faces_list (void)
{
/* creating an empty list of Topology Faces */
    struct topo_faces_list *ptr = malloc (sizeof (struct topo_faces_list));
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->count = 0;
    return ptr;
}

static void
destroy_faces_list (struct topo_faces_list *ptr)
{
/* destroying a list of Topology Faces */
    struct topo_face *p;
    struct topo_face *pn;
    if (ptr == NULL)
	return;

    p = ptr->first;
    while (p != NULL)
      {
	  pn = p->next;
	  destroy_topo_face (p);
	  p = pn;
      }
    free (ptr);
}

static void
add_face (struct topo_faces_list *list, sqlite3_int64 id, sqlite3_int64 face_id,
	  double minx, double miny, double maxx, double maxy)
{
/* inserting a Topology Face into the list */
    struct topo_face *ptr;
    if (list == NULL)
	return;

    ptr = create_topo_face (id, face_id, minx, miny, maxx, maxy);
    if (list->first == NULL)
	list->first = ptr;
    if (list->last != NULL)
	list->last->next = ptr;
    list->last = ptr;
    list->count++;
}

TOPOLOGY_PRIVATE RTLINE *
gaia_convert_linestring_to_rtline (const RTCTX * ctx, gaiaLinestringPtr ln,
				   int srid, int has_z)
{
/* converting a Linestring into an RTLINE */
    RTPOINTARRAY *pa;
    RTPOINT4D point;
    int iv;
    double x;
    double y;
    double z;
    double m;

    pa = ptarray_construct (ctx, has_z, 0, ln->Points);
    for (iv = 0; iv < ln->Points; iv++)
      {
	  /* copying vertices */
	  if (ln->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (ln->Coords, iv, &x, &y, &z);
	    }
	  else if (ln->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (ln->Coords, iv, &x, &y, &m);
	    }
	  else if (ln->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (ln->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (ln->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  ptarray_set_point4d (ctx, pa, iv, &point);
      }
    return rtline_construct (ctx, srid, NULL, pa);
}

static int
check_unclosed_ring (gaiaRingPtr rng)
{
/* checks if a Ring is closed or not */
    double x0;
    double y0;
    double z0 = 0.0;
    double m0 = 0.0;
    double x1;
    double y1;
    double z1 = 0.0;
    double m1 = 0.0;
    int last = rng->Points - 1;
    if (rng->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (rng->Coords, 0, &x0, &y0, &z0);
      }
    else if (rng->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (rng->Coords, 0, &x0, &y0, &m0);
      }
    else if (rng->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (rng->Coords, 0, &x0, &y0, &z0, &m0);
      }
    else
      {
	  gaiaGetPoint (rng->Coords, 0, &x0, &y0);
      }
    if (rng->DimensionModel == GAIA_XY_Z)
      {
	  gaiaGetPointXYZ (rng->Coords, last, &x1, &y1, &z1);
      }
    else if (rng->DimensionModel == GAIA_XY_M)
      {
	  gaiaGetPointXYM (rng->Coords, last, &x1, &y1, &m1);
      }
    else if (rng->DimensionModel == GAIA_XY_Z_M)
      {
	  gaiaGetPointXYZM (rng->Coords, last, &x1, &y1, &z1, &m1);
      }
    else
      {
	  gaiaGetPoint (rng->Coords, last, &x1, &y1);
      }
    if (x0 == x1 && y0 == y1 && z0 == z1 && m0 == m1)
	return 0;
    return 1;
}

TOPOLOGY_PRIVATE RTPOLY *
gaia_convert_polygon_to_rtpoly (const RTCTX * ctx, gaiaPolygonPtr pg, int srid,
				int has_z)
{
/* converting a Polygon into an RTPOLY */
    int ngeoms;
    RTPOINTARRAY **ppaa;
    RTPOINT4D point;
    gaiaRingPtr rng;
    int close_ring;
    int ib;
    int iv;
    double x;
    double y;
    double z;
    double m;

    ngeoms = pg->NumInteriors;
    ppaa = rtalloc (ctx, sizeof (RTPOINTARRAY *) * (ngeoms + 1));
    rng = pg->Exterior;
    close_ring = check_unclosed_ring (rng);
    if (close_ring)
	ppaa[0] = ptarray_construct (ctx, has_z, 0, rng->Points + 1);
    else
	ppaa[0] = ptarray_construct (ctx, has_z, 0, rng->Points);
    for (iv = 0; iv < rng->Points; iv++)
      {
	  /* copying vertices */
	  if (rng->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
	    }
	  else if (rng->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
	    }
	  else if (rng->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, iv, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  ptarray_set_point4d (ctx, ppaa[0], iv, &point);
      }
    if (close_ring)
      {
	  /* making an unclosed ring to be closed */
	  if (rng->DimensionModel == GAIA_XY_Z)
	    {
		gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
	    }
	  else if (rng->DimensionModel == GAIA_XY_M)
	    {
		gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
	    }
	  else if (rng->DimensionModel == GAIA_XY_Z_M)
	    {
		gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
	    }
	  else
	    {
		gaiaGetPoint (rng->Coords, 0, &x, &y);
	    }
	  point.x = x;
	  point.y = y;
	  if (has_z)
	      point.z = z;
	  ptarray_set_point4d (ctx, ppaa[0], rng->Points, &point);
      }
    for (ib = 0; ib < pg->NumInteriors; ib++)
      {
	  /* copying vertices - Interior Rings */
	  rng = pg->Interiors + ib;
	  close_ring = check_unclosed_ring (rng);
	  if (close_ring)
	      ppaa[1 + ib] = ptarray_construct (ctx, has_z, 0, rng->Points + 1);
	  else
	      ppaa[1 + ib] = ptarray_construct (ctx, has_z, 0, rng->Points);
	  for (iv = 0; iv < rng->Points; iv++)
	    {
		/* copying vertices */
		if (rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, iv, &x, &y, &z);
		  }
		else if (rng->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, iv, &x, &y, &m);
		  }
		else if (rng->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, iv, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, iv, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		ptarray_set_point4d (ctx, ppaa[1 + ib], iv, &point);
	    }
	  if (close_ring)
	    {
		/* making an unclosed ring to be closed */
		if (rng->DimensionModel == GAIA_XY_Z)
		  {
		      gaiaGetPointXYZ (rng->Coords, 0, &x, &y, &z);
		  }
		else if (rng->DimensionModel == GAIA_XY_M)
		  {
		      gaiaGetPointXYM (rng->Coords, 0, &x, &y, &m);
		  }
		else if (rng->DimensionModel == GAIA_XY_Z_M)
		  {
		      gaiaGetPointXYZM (rng->Coords, 0, &x, &y, &z, &m);
		  }
		else
		  {
		      gaiaGetPoint (rng->Coords, 0, &x, &y);
		  }
		point.x = x;
		point.y = y;
		if (has_z)
		    point.z = z;
		ptarray_set_point4d (ctx, ppaa[1 + ib], rng->Points, &point);
	    }
      }
    return rtpoly_construct (ctx, srid, NULL, ngeoms + 1, ppaa);
}

static gaiaGeomCollPtr
do_rtline_to_geom (const RTCTX * ctx, RTLINE * rtline, int srid)
{
/* converting a RTLINE into a Geometry (Linestring) */
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int has_z = 0;
    double x;
    double y;
    double z;
    int iv;
    gaiaGeomCollPtr geom;
    gaiaLinestringPtr ln;

    pa = rtline->points;
    if (RTFLAGS_GET_Z (pa->flags))
	has_z = 1;
    if (has_z)
	geom = gaiaAllocGeomCollXYZ ();
    else
	geom = gaiaAllocGeomColl ();
    ln = gaiaAddLinestringToGeomColl (geom, pa->npoints);
    for (iv = 0; iv < pa->npoints; iv++)
      {
	  /* copying LINESTRING vertices */
	  rt_getPoint4d_p (ctx, pa, iv, &pt4d);
	  x = pt4d.x;
	  y = pt4d.y;
	  if (has_z)
	      z = pt4d.z;
	  if (has_z)
	    {
		gaiaSetPointXYZ (ln->Coords, iv, x, y, z);
	    }
	  else
	    {
		gaiaSetPoint (ln->Coords, iv, x, y);
	    }
      }
    geom->DeclaredType = GAIA_LINESTRING;
    geom->Srid = srid;

    return geom;
}

static char *
do_prepare_read_node (const char *topology_name, int fields, int has_z)
{
/* preparing the auxiliary "read_node" SQL statement */
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;

    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    if (fields & RTT_COL_NODE_NODE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, node_id", prev);
	  else
	      sql = sqlite3_mprintf ("%s node_id", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_NODE_CONTAINING_FACE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, containing_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s containing_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_NODE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, ST_X(geom), ST_Y(geom)", prev);
	  else
	      sql = sqlite3_mprintf ("%s ST_X(geom), ST_Y(geom)", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
	  if (has_z)
	    {
		sql = sqlite3_mprintf ("%s, ST_Z(geom)", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
      }
    table = sqlite3_mprintf ("%s_node", topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE node_id = ?", prev, xtable);
    sqlite3_free (prev);
    free (xtable);
    return sql;
}

static int
do_read_node (sqlite3_stmt * stmt, struct topo_nodes_list *list,
	      sqlite3_int64 id, int fields, int has_z,
	      const char *callback_name, char **errmsg)
{
/* reading Nodes out from the DBMS */
    int icol = 0;
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_id = 0;
		int ok_face = 0;
		int ok_x = 0;
		int ok_y = 0;
		int ok_z = 0;
		sqlite3_int64 node_id = -1;
		sqlite3_int64 containing_face = -1;
		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
		if (fields & RTT_COL_NODE_NODE_ID)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
			{
			    node_id = sqlite3_column_int64 (stmt, icol);
			    ok_id = 1;
			}
		      icol++;
		  }
		else
		    ok_id = 1;
		if (fields & RTT_COL_NODE_CONTAINING_FACE)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_NULL)
			{
			    containing_face = -1;
			    ok_face = 1;
			}
		      if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
			{
			    containing_face = sqlite3_column_int64 (stmt, icol);
			    ok_face = 1;
			}
		      icol++;
		  }
		else
		    ok_face = 1;
		if (fields & RTT_COL_NODE_GEOM)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_FLOAT)
			{
			    x = sqlite3_column_double (stmt, icol);
			    ok_x = 1;
			}
		      icol++;
		      if (sqlite3_column_type (stmt, icol) == SQLITE_FLOAT)
			{
			    y = sqlite3_column_double (stmt, icol);
			    ok_y = 1;
			}
		      icol++;
		      if (has_z)
			{
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  z = sqlite3_column_double (stmt, icol);
				  ok_z = 1;
			      }
			}
		  }
		else
		  {
		      ok_x = 1;
		      ok_y = 1;
		      ok_z = 1;
		  }
		if (has_z)
		  {
		      if (ok_id && ok_face && ok_x && ok_y && ok_z)
			{
			    add_node_3D (list, node_id, containing_face, x, y,
					 z);
			    *errmsg = NULL;
			    sqlite3_reset (stmt);
			    return 1;
			}
		  }
		else
		  {
		      if (ok_id && ok_face && ok_x && ok_y)
			{
			    add_node_2D (list, node_id, containing_face, x, y);
			    *errmsg = NULL;
			    sqlite3_reset (stmt);
			    return 1;
			}
		  }
		/* an invalid Node has been found */
		*errmsg =
		    sqlite3_mprintf
		    ("%s: found an invalid Node \"%lld\"", callback_name,
		     node_id);
		return 0;
	    }
      }
    *errmsg = NULL;
    sqlite3_reset (stmt);
    return 1;
}

static int
do_read_node_by_face (sqlite3_stmt * stmt, struct topo_nodes_list *list,
		      sqlite3_int64 id, int fields, const RTGBOX * box,
		      int has_z, const char *callback_name, char **errmsg)
{
/* reading Nodes out from the DBMS */
    int icol = 0;
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, id);
    if (box != NULL)
      {
	  sqlite3_bind_double (stmt, 2, box->xmin);
	  sqlite3_bind_double (stmt, 3, box->ymin);
	  sqlite3_bind_double (stmt, 4, box->xmax);
	  sqlite3_bind_double (stmt, 5, box->ymax);
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_id = 0;
		int ok_face = 0;
		int ok_x = 0;
		int ok_y = 0;
		int ok_z = 0;
		sqlite3_int64 node_id = -1;
		sqlite3_int64 containing_face = -1;
		double x = 0.0;
		double y = 0.0;
		double z = 0.0;
		if (fields & RTT_COL_NODE_NODE_ID)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
			{
			    node_id = sqlite3_column_int64 (stmt, icol);
			    ok_id = 1;
			}
		      icol++;
		  }
		else
		    ok_id = 1;
		if (fields & RTT_COL_NODE_CONTAINING_FACE)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_NULL)
			{
			    containing_face = -1;
			    ok_face = 1;
			}
		      if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
			{
			    containing_face = sqlite3_column_int64 (stmt, icol);
			    ok_face = 1;
			}
		      icol++;
		  }
		else
		    ok_face = 1;
		if (fields & RTT_COL_NODE_GEOM)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_FLOAT)
			{
			    x = sqlite3_column_double (stmt, icol);
			    ok_x = 1;
			}
		      icol++;
		      if (sqlite3_column_type (stmt, icol) == SQLITE_FLOAT)
			{
			    y = sqlite3_column_double (stmt, icol);
			    ok_y = 1;
			}
		      icol++;
		      if (has_z)
			{
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  z = sqlite3_column_double (stmt, icol);
				  ok_z = 1;
			      }
			}
		  }
		else
		  {
		      ok_x = 1;
		      ok_y = 1;
		      ok_z = 1;
		  }
		if (has_z)
		  {
		      if (ok_id && ok_face && ok_x && ok_y && ok_z)
			{
			    add_node_3D (list, node_id, containing_face, x, y,
					 z);
			    *errmsg = NULL;
			    sqlite3_reset (stmt);
			    return 1;
			}
		  }
		else
		  {
		      if (ok_id && ok_face && ok_x && ok_y)
			{
			    add_node_2D (list, node_id, containing_face, x, y);
			    *errmsg = NULL;
			    sqlite3_reset (stmt);
			    return 1;
			}
		  }
		/* an invalid Node has been found */
		*errmsg =
		    sqlite3_mprintf
		    ("%s: found an invalid Node \"%lld\"", callback_name,
		     node_id);
		return 0;
	    }
      }
    *errmsg = NULL;
    sqlite3_reset (stmt);
    return 1;
}

static char *
do_prepare_read_edge (const char *topology_name, int fields)
{
/* preparing the auxiliary "read_edge" SQL statement */
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;

    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    /* unconditionally querying the Edge ID */
    if (comma)
	sql = sqlite3_mprintf ("%s, edge_id", prev);
    else
	sql = sqlite3_mprintf ("%s edge_id", prev);
    comma = 1;
    sqlite3_free (prev);
    prev = sql;
    if (fields & RTT_COL_EDGE_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, left_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s left_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, right_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s right_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_left_edge", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_left_edge", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_right_edge", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_right_edge", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geom", prev);
	  else
	      sql = sqlite3_mprintf ("%s geom", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    table = sqlite3_mprintf ("%s_edge", topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE edge_id = ?", prev, xtable);
    free (xtable);
    sqlite3_free (prev);
    return sql;
}

static int
do_read_edge_row (sqlite3_stmt * stmt, struct topo_edges_list *list, int fields,
		  const char *callback_name, char **errmsg)
{
/* reading an Edge Row out from the resultset */
    int icol = 0;

    int ok_id = 0;
    int ok_start = 0;
    int ok_end = 0;
    int ok_left = 0;
    int ok_right = 0;
    int ok_next_left = 0;
    int ok_next_right = 0;
    int ok_geom = 0;
    sqlite3_int64 edge_id;
    sqlite3_int64 start_node;
    sqlite3_int64 end_node;
    sqlite3_int64 face_left;
    sqlite3_int64 face_right;
    sqlite3_int64 next_left_edge;
    sqlite3_int64 next_right_edge;
    gaiaGeomCollPtr geom = NULL;
    gaiaLinestringPtr ln = NULL;
    /* unconditionally querying the Edge ID */
    if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
      {
	  edge_id = sqlite3_column_int64 (stmt, icol);
	  ok_id = 1;
      }
    icol++;
    if (fields & RTT_COL_EDGE_START_NODE)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		start_node = sqlite3_column_int64 (stmt, icol);
		ok_start = 1;
	    }
	  icol++;
      }
    else
	ok_start = 1;
    if (fields & RTT_COL_EDGE_END_NODE)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		end_node = sqlite3_column_int64 (stmt, icol);
		ok_end = 1;
	    }
	  icol++;
      }
    else
	ok_end = 1;
    if (fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_NULL)
	    {
		face_left = -1;
		ok_left = 1;
	    }
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		face_left = sqlite3_column_int64 (stmt, icol);
		ok_left = 1;
	    }
	  icol++;
      }
    else
	ok_left = 1;
    if (fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_NULL)
	    {
		face_right = -1;
		ok_right = 1;
	    }
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		face_right = sqlite3_column_int64 (stmt, icol);
		ok_right = 1;
	    }
	  icol++;
      }
    else
	ok_right = 1;
    if (fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		next_left_edge = sqlite3_column_int64 (stmt, icol);
		ok_next_left = 1;
	    }
	  icol++;
      }
    else
	ok_next_left = 1;
    if (fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
	    {
		next_right_edge = sqlite3_column_int64 (stmt, icol);
		ok_next_right = 1;
	    }
	  icol++;
      }
    else
	ok_next_right = 1;
    if (fields & RTT_COL_EDGE_GEOM)
      {
	  if (sqlite3_column_type (stmt, icol) == SQLITE_BLOB)
	    {
		const unsigned char *blob = sqlite3_column_blob (stmt, icol);
		int blob_sz = sqlite3_column_bytes (stmt, icol);
		geom = gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
		if (geom != NULL)
		  {
		      if (geom->FirstPoint == NULL
			  && geom->FirstPolygon == NULL
			  && geom->FirstLinestring ==
			  geom->LastLinestring && geom->FirstLinestring != NULL)
			{
			    ok_geom = 1;
			    ln = geom->FirstLinestring;
			}
		  }
	    }
	  icol++;
      }
    else
	ok_geom = 1;
    if (ok_id && ok_start && ok_end && ok_left && ok_right
	&& ok_next_left && ok_next_right && ok_geom)
      {
	  add_edge (list, edge_id, start_node, end_node,
		    face_left, face_right, next_left_edge, next_right_edge, ln);
	  if (geom != NULL)
	    {
		/* releasing ownership on Linestring */
		geom->FirstLinestring = NULL;
		geom->LastLinestring = NULL;
		gaiaFreeGeomColl (geom);
	    }
	  *errmsg = NULL;
	  return 1;
      }
/* an invalid Edge has been found */
    if (geom != NULL)
	gaiaFreeGeomColl (geom);
    *errmsg =
	sqlite3_mprintf
	("%s: found an invalid Edge \"%lld\"", callback_name, edge_id);
    return 0;
}

static int
do_read_edge (sqlite3_stmt * stmt, struct topo_edges_list *list,
	      sqlite3_int64 edge_id, int fields, const char *callback_name,
	      char **errmsg)
{
/* reading a single Edge out from the DBMS */
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, edge_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (!do_read_edge_row
		    (stmt, list, fields, callback_name, errmsg))
		  {
		      sqlite3_reset (stmt);
		      return 0;
		  }
	    }
      }
    sqlite3_reset (stmt);
    return 1;
}

static int
do_read_edge_by_node (sqlite3_stmt * stmt, struct topo_edges_list *list,
		      sqlite3_int64 node_id, int fields,
		      const char *callback_name, char **errmsg)
{
/* reading a single Edge out from the DBMS */
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, node_id);
    sqlite3_bind_int64 (stmt, 2, node_id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (!do_read_edge_row
		    (stmt, list, fields, callback_name, errmsg))
		  {
		      sqlite3_reset (stmt);
		      return 0;
		  }
	    }
      }
    sqlite3_reset (stmt);
    return 1;
}

static int
do_read_edge_by_face (sqlite3_stmt * stmt, struct topo_edges_list *list,
		      sqlite3_int64 face_id, int fields, const RTGBOX * box,
		      const char *callback_name, char **errmsg)
{
/* reading a single Edge out from the DBMS */
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_int64 (stmt, 1, face_id);
    sqlite3_bind_int64 (stmt, 2, face_id);
    if (box != NULL)
      {
	  sqlite3_bind_double (stmt, 3, box->xmin);
	  sqlite3_bind_double (stmt, 4, box->ymin);
	  sqlite3_bind_double (stmt, 5, box->xmax);
	  sqlite3_bind_double (stmt, 6, box->ymax);
      }

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (!do_read_edge_row
		    (stmt, list, fields, callback_name, errmsg))
		  {
		      sqlite3_reset (stmt);
		      return 0;
		  }
	    }
      }
    sqlite3_reset (stmt);
    return 1;
}

static int
do_read_face (sqlite3_stmt * stmt, struct topo_faces_list *list,
	      sqlite3_int64 id, int fields, const char *callback_name,
	      char **errmsg)
{
/* reading Faces out from the DBMS */
    int icol = 0;
    int ret;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (id <= 0)
	sqlite3_bind_int64 (stmt, 1, 0);
    else
	sqlite3_bind_int64 (stmt, 1, id);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		int ok_id = 0;
		int ok_minx = 0;
		int ok_miny = 0;
		int ok_maxx = 0;
		int ok_maxy = 0;
		sqlite3_int64 face_id = -1;
		double minx = 0.0;
		double miny = 0.0;
		double maxx = 0.0;
		double maxy = 0.0;
		if (fields & RTT_COL_FACE_FACE_ID)
		  {
		      if (sqlite3_column_type (stmt, icol) == SQLITE_INTEGER)
			{
			    face_id = sqlite3_column_int64 (stmt, icol);
			    ok_id = 1;
			}
		      icol++;
		  }
		else
		    ok_id = 1;
		if (fields & RTT_COL_FACE_MBR)
		  {
		      if (id <= 0)
			{
			    ok_minx = 1;
			    ok_miny = 1;
			    ok_maxx = 1;
			    ok_maxy = 1;
			}
		      else
			{
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  minx = sqlite3_column_double (stmt, icol);
				  ok_minx = 1;
			      }
			    icol++;
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  miny = sqlite3_column_double (stmt, icol);
				  ok_miny = 1;
			      }
			    icol++;
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  maxx = sqlite3_column_double (stmt, icol);
				  ok_maxx = 1;
			      }
			    icol++;
			    if (sqlite3_column_type (stmt, icol) ==
				SQLITE_FLOAT)
			      {
				  maxy = sqlite3_column_double (stmt, icol);
				  ok_maxy = 1;
			      }
			    icol++;
			}
		  }
		else
		  {
		      ok_minx = 1;
		      ok_miny = 1;
		      ok_maxx = 1;
		      ok_maxy = 1;
		  }
		if (ok_id && ok_minx && ok_miny && ok_maxx && ok_maxy)
		  {
		      add_face (list, id, face_id, minx, miny, maxx, maxy);
		      *errmsg = NULL;
		      sqlite3_reset (stmt);
		      return 1;
		  }
		/* an invalid Face has been found */
		*errmsg =
		    sqlite3_mprintf
		    ("%s: found an invalid Face \"%lld\"", callback_name,
		     face_id);
		sqlite3_reset (stmt);
		return 0;
	    }
      }
    *errmsg = NULL;
    sqlite3_reset (stmt);
    return 1;
}

const char *
callback_lastErrorMessage (const RTT_BE_DATA * be)
{
    return gaiatopo_get_last_exception ((GaiaTopologyAccessorPtr) be);
}

RTT_BE_TOPOLOGY *
callback_loadTopologyByName (const RTT_BE_DATA * be, const char *name)
{
/* callback function: loadTopologyByName */
    struct gaia_topology *ptr = (struct gaia_topology *) be;
    char *topology_name;
    int srid;
    double tolerance;
    int has_z;
    struct splite_internal_cache *cache =
	(struct splite_internal_cache *) ptr->cache;
    if (gaiaReadTopologyFromDBMS
	(ptr->db_handle, name, &topology_name, &srid, &tolerance, &has_z))
      {
	  ptr->topology_name = topology_name;
	  ptr->srid = srid;
	  ptr->tolerance = tolerance;
	  ptr->has_z = has_z;
	  /* registering into the Internal Cache double linked list */
	  if (cache->firstTopology == NULL)
	      cache->firstTopology = ptr;
	  if (cache->lastTopology != NULL)
	    {
		struct gaia_topology *p2 =
		    (struct gaia_topology *) (cache->lastTopology);
		p2->next = ptr;
	    }
	  cache->lastTopology = ptr;
	  return (RTT_BE_TOPOLOGY *) ptr;
      }
    else
	return NULL;
}

int
callback_freeTopology (RTT_BE_TOPOLOGY * rtt_topo)
{
/* callback function: freeTopology - does nothing */
    if (rtt_topo != NULL)
	rtt_topo = NULL;	/* silencing stupid compiler warnings on unuse args */
    return 1;
}

RTT_ISO_NODE *
callback_getNodeById (const RTT_BE_TOPOLOGY * rtt_topo,
		      const RTT_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getNodeById */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt_aux = NULL;
    int ret;
    int i;
    char *sql;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    struct topo_nodes_list *list = NULL;
    RTT_ISO_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    /* preparing the SQL statement */
    sql =
	do_prepare_read_node (accessor->topology_name, fields, accessor->has_z);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt_aux,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getNodeById AUX error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_nodes_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_node
	      (stmt_aux, list, *(ids + i), fields, accessor->has_z,
	       "callback_getNodeById", &msg))
	    {
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no node was found */
	  *numelems = list->count;
      }
    else
      {
	  struct topo_node *p_nd;
	  result = rtalloc (ctx, sizeof (RTT_ISO_NODE) * list->count);
	  p_nd = list->first;
	  i = 0;
	  while (p_nd != NULL)
	    {
		RTT_ISO_NODE *nd = result + i;
		if (fields & RTT_COL_NODE_NODE_ID)
		    nd->node_id = p_nd->node_id;
		if (fields & RTT_COL_NODE_CONTAINING_FACE)
		    nd->containing_face = p_nd->containing_face;
		if (fields & RTT_COL_NODE_GEOM)
		  {
		      pa = ptarray_construct (ctx, accessor->has_z, 0, 1);
		      pt4d.x = p_nd->x;
		      pt4d.y = p_nd->y;
		      if (accessor->has_z)
			  pt4d.z = p_nd->z;
		      ptarray_set_point4d (ctx, pa, 0, &pt4d);
		      nd->geom =
			  rtpoint_construct (ctx, accessor->srid, NULL, pa);
		  }
		i++;
		p_nd = p_nd->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_nodes_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_nodes_list (list);
    *numelems = -1;
    return NULL;
}

RTT_ISO_NODE *
callback_getNodeWithinDistance2D (const RTT_BE_TOPOLOGY * rtt_topo,
				  const RTPOINT * pt, double dist,
				  int *numelems, int fields, int limit)
{
/* callback function: getNodeWithinDistance2D */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    double cx;
    double cy;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct topo_nodes_list *list = NULL;
    RTT_ISO_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getNodeWithinDistance2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql =
	      do_prepare_read_node (accessor->topology_name, fields,
				    accessor->has_z);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Prepare_getNodeWithinDistance2D AUX error: \"%s\"",
		     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* extracting X and Y from RTPOINT */
    pa = pt->point;
    rt_getPoint4d_p (ctx, pa, 0, &pt4d);
    cx = pt4d.x;
    cy = pt4d.y;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, cx);
    sqlite3_bind_double (stmt, 2, cy);
    sqlite3_bind_double (stmt, 3, dist);
    sqlite3_bind_double (stmt, 4, cx);
    sqlite3_bind_double (stmt, 5, cy);
    sqlite3_bind_double (stmt, 6, dist);
    list = create_nodes_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_node
			  (stmt_aux, list, node_id, fields, accessor->has_z,
			   "callback_getNodeWithinDistance2D", &msg))
			{
			    gaiatopo_set_last_error_msg (topo, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("callback_getNodeWithinDistance2D: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct topo_node *p_nd;
		result = rtalloc (ctx, sizeof (RTT_ISO_NODE) * list->count);
		p_nd = list->first;
		while (p_nd != NULL)
		  {
		      RTT_ISO_NODE *nd = result + i;
		      if (fields & RTT_COL_NODE_NODE_ID)
			  nd->node_id = p_nd->node_id;
		      if (fields & RTT_COL_NODE_CONTAINING_FACE)
			  nd->containing_face = p_nd->containing_face;
		      if (fields & RTT_COL_NODE_GEOM)
			{
			    pa = ptarray_construct (ctx, accessor->has_z, 0, 1);
			    pt4d.x = p_nd->x;
			    pt4d.y = p_nd->y;
			    if (accessor->has_z)
				pt4d.z = p_nd->z;
			    ptarray_set_point4d (ctx, pa, 0, &pt4d);
			    nd->geom =
				rtpoint_construct (ctx, accessor->srid, NULL,
						   pa);
			}
		      i++;
		      p_nd = p_nd->next;
		  }
		*numelems = list->count;
	    }
      }

    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_nodes_list (list);
    sqlite3_reset (stmt);
    return result;

  error:
    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_nodes_list (list);
    *numelems = -1;
    return NULL;
}

int
callback_insertNodes (const RTT_BE_TOPOLOGY * rtt_topo, RTT_ISO_NODE * nodes,
		      int numelems)
{
/* callback function: insertNodes */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    int i;
    double x;
    double y;
    double z;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    gaiaGeomCollPtr geom;
    unsigned char *p_blob;
    int n_bytes;
    int gpkg_mode = 0;
    int tiny_point = 0;
    if (accessor == NULL)
	return 0;

    stmt = accessor->stmt_insertNodes;
    if (stmt == NULL)
	return 0;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

    for (i = 0; i < numelems; i++)
      {
	  RTT_ISO_NODE *nd = nodes + i;
	  /* setting up the prepared statement */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (nd->node_id <= 0)
	      sqlite3_bind_null (stmt, 1);
	  else
	      sqlite3_bind_int64 (stmt, 1, nd->node_id);
	  if (nd->containing_face < 0)
	      sqlite3_bind_null (stmt, 2);
	  else
	      sqlite3_bind_int64 (stmt, 2, nd->containing_face);
	  if (accessor->has_z)
	      geom = gaiaAllocGeomCollXYZ ();
	  else
	      geom = gaiaAllocGeomColl ();
	  /* extracting X and Y from RTPOINT */
	  pa = nd->geom->point;
	  rt_getPoint4d_p (ctx, pa, 0, &pt4d);
	  x = pt4d.x;
	  y = pt4d.y;
	  if (accessor->has_z)
	    {
		z = pt4d.z;
		gaiaAddPointToGeomCollXYZ (geom, x, y, z);
	    }
	  else
	      gaiaAddPointToGeomColl (geom, x, y);
	  geom->Srid = accessor->srid;
	  geom->DeclaredType = GAIA_POINT;
	  gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode,
				      tiny_point);
	  gaiaFreeGeomColl (geom);
	  sqlite3_bind_blob (stmt, 3, p_blob, n_bytes, free);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		/* retrieving the PK value */
		nd->node_id = sqlite3_last_insert_rowid (accessor->db_handle);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_insertNodes: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return 1;

  error:
    sqlite3_reset (stmt);
    return 0;
}

RTT_ISO_EDGE *
callback_getEdgeById (const RTT_BE_TOPOLOGY * rtt_topo,
		      const RTT_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getEdgeById */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    int ret;
    int i;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct topo_edges_list *list = NULL;
    RTT_ISO_EDGE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    /* preparing the SQL statement */
    sql = do_prepare_read_edge (accessor->topology_name, fields);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
			    &stmt_aux, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getEdgeById AUX error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_edges_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_edge
	      (stmt_aux, list, *(ids + i), fields, "callback_getEdgeById",
	       &msg))
	    {
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no edge was found */
	  *numelems = list->count;
      }
    else
      {
	  struct topo_edge *p_ed;
	  result = rtalloc (ctx, sizeof (RTT_ISO_EDGE) * list->count);
	  p_ed = list->first;
	  i = 0;
	  while (p_ed != NULL)
	    {
		RTT_ISO_EDGE *ed = result + i;
		if (fields & RTT_COL_EDGE_EDGE_ID)
		    ed->edge_id = p_ed->edge_id;
		if (fields & RTT_COL_EDGE_START_NODE)
		    ed->start_node = p_ed->start_node;
		if (fields & RTT_COL_EDGE_END_NODE)
		    ed->end_node = p_ed->end_node;
		if (fields & RTT_COL_EDGE_FACE_LEFT)
		    ed->face_left = p_ed->face_left;
		if (fields & RTT_COL_EDGE_FACE_RIGHT)
		    ed->face_right = p_ed->face_right;
		if (fields & RTT_COL_EDGE_NEXT_LEFT)
		    ed->next_left = p_ed->next_left;
		if (fields & RTT_COL_EDGE_NEXT_RIGHT)
		    ed->next_right = p_ed->next_right;
		if (fields & RTT_COL_EDGE_GEOM)
		    ed->geom =
			gaia_convert_linestring_to_rtline (ctx, p_ed->geom,
							   accessor->srid,
							   accessor->has_z);
		i++;
		p_ed = p_ed->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_edges_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_edges_list (list);
    *numelems = -1;
    return NULL;
}

RTT_ISO_EDGE *
callback_getEdgeWithinDistance2D (const RTT_BE_TOPOLOGY * rtt_topo,
				  const RTPOINT * pt, double dist,
				  int *numelems, int fields, int limit)
{
/* callback function: getEdgeWithinDistance2D */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    double cx;
    double cy;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct topo_edges_list *list = NULL;
    RTT_ISO_EDGE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getEdgeWithinDistance2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql = do_prepare_read_edge (accessor->topology_name, fields);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf ("Prepare_getEdgeById AUX error: \"%s\"",
				     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* extracting X and Y from RTPOINT */
    pa = pt->point;
    rt_getPoint4d_p (ctx, pa, 0, &pt4d);
    cx = pt4d.x;
    cy = pt4d.y;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, cx);
    sqlite3_bind_double (stmt, 2, cy);
    sqlite3_bind_double (stmt, 3, dist);
    sqlite3_bind_double (stmt, 4, cx);
    sqlite3_bind_double (stmt, 5, cy);
    sqlite3_bind_double (stmt, 6, dist);
    list = create_edges_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_edge
			  (stmt_aux, list, edge_id, fields,
			   "callback_getEdgeWithinDistance2D", &msg))
			{
			    gaiatopo_set_last_error_msg (topo, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("callback_getEdgeWithinDistance2D: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct topo_edge *p_ed;
		result = rtalloc (ctx, sizeof (RTT_ISO_EDGE) * list->count);
		p_ed = list->first;
		while (p_ed != NULL)
		  {
		      RTT_ISO_EDGE *ed = result + i;
		      if (fields & RTT_COL_EDGE_EDGE_ID)
			  ed->edge_id = p_ed->edge_id;
		      if (fields & RTT_COL_EDGE_START_NODE)
			  ed->start_node = p_ed->start_node;
		      if (fields & RTT_COL_EDGE_END_NODE)
			  ed->end_node = p_ed->end_node;
		      if (fields & RTT_COL_EDGE_FACE_LEFT)
			  ed->face_left = p_ed->face_left;
		      if (fields & RTT_COL_EDGE_FACE_RIGHT)
			  ed->face_right = p_ed->face_right;
		      if (fields & RTT_COL_EDGE_NEXT_LEFT)
			  ed->next_left = p_ed->next_left;
		      if (fields & RTT_COL_EDGE_NEXT_RIGHT)
			  ed->next_right = p_ed->next_right;
		      if (fields & RTT_COL_EDGE_GEOM)
			  ed->geom =
			      gaia_convert_linestring_to_rtline (ctx,
								 p_ed->geom,
								 accessor->srid,
								 accessor->
								 has_z);
		      i++;
		      p_ed = p_ed->next;
		  }
		*numelems = list->count;
	    }
      }
    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_edges_list (list);
    return result;

  error:
    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_edges_list (list);
    *numelems = -1;
    return NULL;
}

RTT_ELEMID
callback_getNextEdgeId (const RTT_BE_TOPOLOGY * rtt_topo)
{
/* callback function: getNextEdgeId */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt_in;
    sqlite3_stmt *stmt_out;
    int ret;
    sqlite3_int64 edge_id = -1;
    if (accessor == NULL)
	return -1;

    stmt_in = accessor->stmt_getNextEdgeId;
    if (stmt_in == NULL)
	return -1;
    stmt_out = accessor->stmt_setNextEdgeId;
    if (stmt_out == NULL)
	return -1;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return -1;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return -1;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return -1;

/* setting up the prepared statement */
    sqlite3_reset (stmt_in);
    sqlite3_clear_bindings (stmt_in);

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt_in);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		edge_id = sqlite3_column_int64 (stmt_in, 0);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_getNextEdgeId: %s",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto stop;
	    }
      }

/* updating next_edge_id */
    sqlite3_reset (stmt_out);
    sqlite3_clear_bindings (stmt_out);
    ret = sqlite3_step (stmt_out);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
      {
	  sqlite3_reset (stmt_in);
	  sqlite3_reset (stmt_out);
	  return edge_id;
      }
    else
      {
	  char *msg = sqlite3_mprintf ("callback_setNextEdgeId: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  edge_id = -1;
      }
  stop:
    if (edge_id >= 0)
	edge_id++;
    sqlite3_reset (stmt_in);
    sqlite3_reset (stmt_out);
    return edge_id;
}

int
callback_insertEdges (const RTT_BE_TOPOLOGY * rtt_topo, RTT_ISO_EDGE * edges,
		      int numelems)
{
/* callback function: insertEdges */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    int i;
    gaiaGeomCollPtr geom;
    unsigned char *p_blob;
    int n_bytes;
    int gpkg_mode = 0;
    int tiny_point = 0;
    if (accessor == NULL)
	return 0;

    stmt = accessor->stmt_insertEdges;
    if (stmt == NULL)
	return 0;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

    for (i = 0; i < numelems; i++)
      {
	  RTT_ISO_EDGE *eg = edges + i;
	  /* setting up the prepared statement */
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (eg->edge_id <= 0)
	      sqlite3_bind_null (stmt, 1);
	  else
	      sqlite3_bind_int64 (stmt, 1, eg->edge_id);
	  sqlite3_bind_int64 (stmt, 2, eg->start_node);
	  sqlite3_bind_int64 (stmt, 3, eg->end_node);
	  if (eg->face_left < 0)
	      sqlite3_bind_null (stmt, 4);
	  else
	      sqlite3_bind_int64 (stmt, 4, eg->face_left);
	  if (eg->face_right < 0)
	      sqlite3_bind_null (stmt, 5);
	  else
	      sqlite3_bind_int64 (stmt, 5, eg->face_right);
	  sqlite3_bind_int64 (stmt, 6, eg->next_left);
	  sqlite3_bind_int64 (stmt, 7, eg->next_right);
	  /* transforming the RTLINE into a Geometry-Linestring */
	  geom = do_rtline_to_geom (ctx, eg->geom, accessor->srid);
	  gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode,
				      tiny_point);
	  gaiaFreeGeomColl (geom);
	  sqlite3_bind_blob (stmt, 8, p_blob, n_bytes, free);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		/* retrieving the PK value */
		eg->edge_id = sqlite3_last_insert_rowid (accessor->db_handle);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_insertEdges: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return 1;

  error:
    sqlite3_reset (stmt);
    return 0;
}

int
callback_updateEdges (const RTT_BE_TOPOLOGY * rtt_topo,
		      const RTT_ISO_EDGE * sel_edge, int sel_fields,
		      const RTT_ISO_EDGE * upd_edge, int upd_fields,
		      const RTT_ISO_EDGE * exc_edge, int exc_fields)
{
/* callback function: updateEdges */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int icol = 1;
    unsigned char *p_blob;
    int n_bytes;
    int gpkg_mode = 0;
    int tiny_point = 0;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET ", xtable);
    free (xtable);
    prev = sql;
    if (upd_fields & RTT_COL_EDGE_EDGE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, edge_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s edge_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, left_face = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s left_face = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, right_face = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s right_face = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_left_edge = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_left_edge = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_right_edge = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_right_edge = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geom = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s geom = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (exc_edge || sel_edge)
      {
	  sql = sqlite3_mprintf ("%s WHERE", prev);
	  sqlite3_free (prev);
	  prev = sql;
	  if (sel_edge)
	    {
		comma = 0;
		if (sel_fields & RTT_COL_EDGE_EDGE_ID)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND edge_id = ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s edge_id = ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_EDGE_START_NODE)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND start_node = ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s start_node = ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_EDGE_END_NODE)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND end_node = ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s end_node = ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_EDGE_FACE_LEFT)
		  {
		      if (sel_edge->face_left < 0)
			{
			    if (comma)
				sql =
				    sqlite3_mprintf ("%s AND left_face IS NULL",
						     prev);
			    else
				sql =
				    sqlite3_mprintf ("%s left_face IS NULL",
						     prev);
			}
		      else
			{
			    if (comma)
				sql =
				    sqlite3_mprintf ("%s AND left_face = ?",
						     prev);
			    else
				sql =
				    sqlite3_mprintf ("%s left_face = ?", prev);
			}
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_EDGE_FACE_RIGHT)
		  {
		      if (sel_edge->face_right < 0)
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND right_face IS NULL", prev);
			    else
				sql =
				    sqlite3_mprintf ("%s right_face IS NULL",
						     prev);
			}
		      else
			{
			    if (comma)
				sql =
				    sqlite3_mprintf ("%s AND right_face = ?",
						     prev);
			    else
				sql =
				    sqlite3_mprintf ("%s right_face = ?", prev);
			}
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_EDGE_NEXT_LEFT)
		  {
		      if (comma)
			  sql =
			      sqlite3_mprintf
			      ("%s AND next_left_edge = ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s next_left_edge = ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_EDGE_NEXT_RIGHT)
		  {
		      if (comma)
			  sql =
			      sqlite3_mprintf
			      ("%s AND next_right_edge = ?", prev);
		      else
			  sql =
			      sqlite3_mprintf ("%s next_right_edge = ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
	    }
	  if (exc_edge)
	    {
		if (sel_edge)
		  {
		      sql = sqlite3_mprintf ("%s AND", prev);
		      sqlite3_free (prev);
		      prev = sql;
		  }
		comma = 0;
		if (exc_fields & RTT_COL_EDGE_EDGE_ID)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND edge_id <> ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s edge_id <> ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_EDGE_START_NODE)
		  {
		      if (comma)
			  sql =
			      sqlite3_mprintf ("%s AND start_node <> ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s start_node <> ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_EDGE_END_NODE)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND end_node <> ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s end_node <> ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_EDGE_FACE_LEFT)
		  {
		      if (exc_edge->face_left < 0)
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND left_face IS NOT NULL", prev);
			    else
				sql =
				    sqlite3_mprintf ("%s left_face IS NOT NULL",
						     prev);
			}
		      else
			{
			    if (comma)
				sql =
				    sqlite3_mprintf ("%s AND left_face <> ?",
						     prev);
			    else
				sql =
				    sqlite3_mprintf ("%s left_face <> ?", prev);
			}
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_EDGE_FACE_RIGHT)
		  {
		      if (exc_edge->face_right < 0)
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND right_face IS NOT NULL", prev);
			    else
				sql =
				    sqlite3_mprintf
				    ("%s right_face IS NOT NULL", prev);
			}
		      else
			{
			    if (comma)
				sql =
				    sqlite3_mprintf ("%s AND right_face <> ?",
						     prev);
			    else
				sql =
				    sqlite3_mprintf ("%s right_face <> ?",
						     prev);
			}
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_EDGE_NEXT_LEFT)
		  {
		      if (comma)
			  sql =
			      sqlite3_mprintf
			      ("%s AND next_left_edge <> ?", prev);
		      else
			  sql =
			      sqlite3_mprintf ("%s next_left_edge <> ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_EDGE_NEXT_RIGHT)
		  {
		      if (comma)
			  sql =
			      sqlite3_mprintf
			      ("%s AND next_right_edge <> ?", prev);
		      else
			  sql =
			      sqlite3_mprintf ("%s next_right_edge <> ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
	    }
      }
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_updateEdges error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  return -1;
      }

/* parameter binding */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (upd_fields & RTT_COL_EDGE_EDGE_ID)
      {
	  sqlite3_bind_int64 (stmt, icol, upd_edge->edge_id);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_START_NODE)
      {
	  sqlite3_bind_int64 (stmt, icol, upd_edge->start_node);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_END_NODE)
      {
	  sqlite3_bind_int64 (stmt, icol, upd_edge->end_node);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (upd_edge->face_left < 0)
	      sqlite3_bind_null (stmt, icol);
	  else
	      sqlite3_bind_int64 (stmt, icol, upd_edge->face_left);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (upd_edge->face_right < 0)
	      sqlite3_bind_null (stmt, icol);
	  else
	      sqlite3_bind_int64 (stmt, icol, upd_edge->face_right);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  sqlite3_bind_int64 (stmt, icol, upd_edge->next_left);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  sqlite3_bind_int64 (stmt, icol, upd_edge->next_right);
	  icol++;
      }
    if (upd_fields & RTT_COL_EDGE_GEOM)
      {
	  /* transforming the RTLINE into a Geometry-Linestring */
	  gaiaGeomCollPtr geom =
	      do_rtline_to_geom (ctx, upd_edge->geom, accessor->srid);
	  gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode,
				      tiny_point);
	  gaiaFreeGeomColl (geom);
	  sqlite3_bind_blob (stmt, icol, p_blob, n_bytes, free);
	  icol++;
      }
    if (sel_edge)
      {
	  if (sel_fields & RTT_COL_EDGE_EDGE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, sel_edge->edge_id);
		icol++;
	    }
	  if (sel_fields & RTT_COL_EDGE_START_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, sel_edge->start_node);
		icol++;
	    }
	  if (sel_fields & RTT_COL_EDGE_END_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, sel_edge->end_node);
		icol++;
	    }
	  if (sel_fields & RTT_COL_EDGE_FACE_LEFT)
	    {
		if (sel_edge->face_left < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, sel_edge->face_left);
		icol++;
	    }
	  if (sel_fields & RTT_COL_EDGE_FACE_RIGHT)
	    {
		if (sel_edge->face_right < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, sel_edge->face_right);
		icol++;
	    }
	  if (sel_fields & RTT_COL_EDGE_NEXT_LEFT)
	    {
		sqlite3_bind_int64 (stmt, icol, sel_edge->next_left);
		icol++;
	    }
	  if (sel_fields & RTT_COL_EDGE_NEXT_RIGHT)
	    {
		sqlite3_bind_int64 (stmt, icol, sel_edge->next_right);
		icol++;
	    }
      }
    if (exc_edge)
      {
	  if (exc_fields & RTT_COL_EDGE_EDGE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, exc_edge->edge_id);
		icol++;
	    }
	  if (exc_fields & RTT_COL_EDGE_START_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, exc_edge->start_node);
		icol++;
	    }
	  if (exc_fields & RTT_COL_EDGE_END_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, exc_edge->end_node);
		icol++;
	    }
	  if (exc_fields & RTT_COL_EDGE_FACE_LEFT)
	    {
		if (exc_edge->face_left < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, exc_edge->face_left);
		icol++;
	    }
	  if (exc_fields & RTT_COL_EDGE_FACE_RIGHT)
	    {
		if (exc_edge->face_right < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, exc_edge->face_right);
		icol++;
	    }
	  if (exc_fields & RTT_COL_EDGE_NEXT_LEFT)
	    {
		sqlite3_bind_int64 (stmt, icol, exc_edge->next_left);
		icol++;
	    }
	  if (exc_fields & RTT_COL_EDGE_NEXT_RIGHT)
	    {
		sqlite3_bind_int64 (stmt, icol, exc_edge->next_right);
		icol++;
	    }
      }
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	changed = sqlite3_changes (accessor->db_handle);
    else
      {
	  char *msg = sqlite3_mprintf ("callback_updateEdges: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

RTT_ISO_FACE *
callback_getFaceById (const RTT_BE_TOPOLOGY * rtt_topo,
		      const RTT_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getFeceById */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt_aux = NULL;
    int ret;
    int i;
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;
    struct topo_faces_list *list = NULL;
    RTT_ISO_FACE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    /* preparing the SQL statement */
    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    if (fields & RTT_COL_FACE_FACE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, face_id", prev);
	  else
	      sql = sqlite3_mprintf ("%s face_id", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_FACE_MBR)
      {
	  if (comma)
	      sql =
		  sqlite3_mprintf
		  ("%s, MbrMinX(mbr), MbrMinY(mbr), MbrMaxX(mbr), MbrMaxY(mbr)",
		   prev);
	  else
	      sql =
		  sqlite3_mprintf
		  ("%s MbrMinX(mbr), MbrMinY(mbr), MbrMaxX(mbr), MbrMaxY(mbr)",
		   prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    table = sqlite3_mprintf ("%s_face", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE face_id = ?", prev, xtable);
    sqlite3_free (prev);
    free (xtable);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt_aux,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_getFaceById AUX error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_faces_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_face
	      (stmt_aux, list, *(ids + i), fields, "callback_getFaceById",
	       &msg))
	    {
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no face was found */
	  *numelems = list->count;
      }
    else
      {
	  struct topo_face *p_fc;
	  result = rtalloc (ctx, sizeof (RTT_ISO_FACE) * list->count);
	  p_fc = list->first;
	  i = 0;
	  while (p_fc != NULL)
	    {
		RTT_ISO_FACE *fc = result + i;
		if (fields & RTT_COL_FACE_FACE_ID)
		    fc->face_id = p_fc->face_id;
		if (fields & RTT_COL_FACE_MBR)
		  {
		      if (p_fc->id == 0)
			  fc->mbr = NULL;
		      else
			{
			    fc->mbr = gbox_new (ctx, 0);
			    fc->mbr->xmin = p_fc->minx;
			    fc->mbr->ymin = p_fc->miny;
			    fc->mbr->xmax = p_fc->maxx;
			    fc->mbr->ymax = p_fc->maxy;
			}
		  }
		i++;
		p_fc = p_fc->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_faces_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_faces_list (list);
    *numelems = -1;
    return NULL;
}

RTT_ELEMID
callback_getFaceContainingPoint (const RTT_BE_TOPOLOGY * rtt_topo,
				 const RTPOINT * pt)
{
/* callback function: getFaceContainingPoint */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_aux;
    int ret;
    double cx;
    double cy;
    float fx;
    float fy;
    double tic;
    double tic2;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int count = 0;
    sqlite3_int64 face_id;
    if (accessor == NULL)
	return -2;

    stmt = accessor->stmt_getFaceContainingPoint_1;
    if (stmt == NULL)
	return -2;
    stmt_aux = accessor->stmt_getFaceContainingPoint_2;
    if (stmt_aux == NULL)
	return -2;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return -1;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return -1;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return -1;

/* extracting X and Y from RTPOINT */
    pa = pt->point;
    rt_getPoint4d_p (ctx, pa, 0, &pt4d);
    cx = pt4d.x;
    cy = pt4d.y;

/* adjusting the MBR so to compensate for DOUBLE/FLOAT truncations */
    fx = (float) cx;
    fy = (float) cy;
    tic = fabs (cx - fx);
    tic2 = fabs (cy - fy);
    if (tic2 > tic)
	tic = tic2;
    tic2 = fabs (cx - fx);
    if (tic2 > tic)
	tic = tic2;
    tic2 = fabs (cy - fy);
    if (tic2 > tic)
	tic = tic2;
    tic *= 2.0;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, cx + tic);
    sqlite3_bind_double (stmt, 2, cx - tic);
    sqlite3_bind_double (stmt, 3, cy + tic);
    sqlite3_bind_double (stmt, 4, cy - tic);

    while (1)
      {
	  /* scrolling the result set rows [R*Tree] */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 id = sqlite3_column_int64 (stmt, 0);
		/* testing for real intersection */
		sqlite3_reset (stmt_aux);
		sqlite3_clear_bindings (stmt_aux);
		sqlite3_bind_int64 (stmt_aux, 1, id);
		sqlite3_bind_double (stmt_aux, 2, cx);
		sqlite3_bind_double (stmt_aux, 3, cy);
		while (1)
		  {
		      ret = sqlite3_step (stmt_aux);
		      if (ret == SQLITE_DONE)
			  break;	/* end of result set */
		      if (ret == SQLITE_ROW)
			{
			    if (sqlite3_column_type (stmt_aux, 0) ==
				SQLITE_INTEGER)
			      {
				  if (sqlite3_column_int (stmt_aux, 0) == 1)
				    {
					face_id = id;
					count++;
					break;
				    }
			      }
			}
		      else
			{
			    char *msg =
				sqlite3_mprintf
				("callback_getFaceContainingPoint #2: %s",
				 sqlite3_errmsg (accessor->db_handle));
			    gaiatopo_set_last_error_msg (topo, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		if (count > 0)
		    break;
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("callback_getFaceContainingPoint #1: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    sqlite3_reset (stmt);
    if (count == 0)
	return -1;		/* none found */
    return face_id;

  error:
    sqlite3_reset (stmt);
    return -2;
}

int
callback_deleteEdges (const RTT_BE_TOPOLOGY * rtt_topo,
		      const RTT_ISO_EDGE * sel_edge, int sel_fields)
{
/* callback function: deleteEdgest */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int icol = 1;
    int changed = 0;
    if (accessor == NULL)
	return -1;

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("DELETE FROM MAIN.\"%s\" WHERE", xtable);
    free (xtable);
    prev = sql;
    if (sel_fields & RTT_COL_EDGE_EDGE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s AND edge_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s edge_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s AND start_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s AND end_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (sel_edge->face_left < 0)
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s AND left_face IS NULL", prev);
		else
		    sql = sqlite3_mprintf ("%s left_face IS NULL", prev);
	    }
	  else
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s AND left_face = ?", prev);
		else
		    sql = sqlite3_mprintf ("%s left_face = ?", prev);
	    }
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (sel_edge->face_right < 0)
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s AND right_face IS NULL", prev);
		else
		    sql = sqlite3_mprintf ("%s right_face IS NULL", prev);
	    }
	  else
	    {
		if (comma)
		    sql = sqlite3_mprintf ("%s AND right_face = ?", prev);
		else
		    sql = sqlite3_mprintf ("%s right_face = ?", prev);
	    }
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s AND next_left_edge = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_left_edge = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s AND next_right_edge = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_right_edge = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (sel_fields & RTT_COL_EDGE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s AND geom = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s geom = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_deleteEdges error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  return -1;
      }

/* parameter binding */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (sel_fields & RTT_COL_EDGE_EDGE_ID)
      {
	  sqlite3_bind_int64 (stmt, icol, sel_edge->edge_id);
	  icol++;
      }
    if (sel_fields & RTT_COL_EDGE_START_NODE)
      {
	  sqlite3_bind_int64 (stmt, icol, sel_edge->start_node);
	  icol++;
      }
    if (sel_fields & RTT_COL_EDGE_END_NODE)
      {
	  sqlite3_bind_int64 (stmt, icol, sel_edge->end_node);
	  icol++;
      }
    if (sel_fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (sel_edge->face_left < 0)
	      sqlite3_bind_null (stmt, icol);
	  else
	      sqlite3_bind_int64 (stmt, icol, sel_edge->face_left);
	  icol++;
      }
    if (sel_fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (sel_edge->face_right < 0)
	      sqlite3_bind_null (stmt, icol);
	  else
	      sqlite3_bind_int64 (stmt, icol, sel_edge->face_right);
	  icol++;
      }
    if (sel_fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  sqlite3_bind_int64 (stmt, icol, sel_edge->next_left);
	  icol++;
      }
    if (sel_fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  sqlite3_bind_int64 (stmt, icol, sel_edge->next_right);
	  icol++;
      }
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	changed = sqlite3_changes (accessor->db_handle);
    else
      {
	  char *msg = sqlite3_mprintf ("callback_deleteEdges: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

RTT_ISO_NODE *
callback_getNodeWithinBox2D (const RTT_BE_TOPOLOGY * rtt_topo,
			     const RTGBOX * box, int *numelems,
			     int fields, int limit)
{
/* callback function: getNodeWithinBox2D */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct topo_nodes_list *list = NULL;
    RTT_ISO_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getNodeWithinBox2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql =
	      do_prepare_read_node (accessor->topology_name, fields,
				    accessor->has_z);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Prepare_getNodeWithinBox2D AUX error: \"%s\"",
		     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, box->xmin);
    sqlite3_bind_double (stmt, 2, box->ymin);
    sqlite3_bind_double (stmt, 3, box->xmax);
    sqlite3_bind_double (stmt, 4, box->ymax);
    list = create_nodes_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 node_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_node
			  (stmt_aux, list, node_id, fields, accessor->has_z,
			   "callback_getNodeWithinBox2D", &msg))
			{
			    gaiatopo_set_last_error_msg (topo, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_getNodeWithinBox2D: %s",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct topo_node *p_nd;
		result = rtalloc (ctx, sizeof (RTT_ISO_NODE) * list->count);
		p_nd = list->first;
		while (p_nd != NULL)
		  {
		      RTT_ISO_NODE *nd = result + i;
		      if (fields & RTT_COL_NODE_NODE_ID)
			  nd->node_id = p_nd->node_id;
		      if (fields & RTT_COL_NODE_CONTAINING_FACE)
			  nd->containing_face = p_nd->containing_face;
		      if (fields & RTT_COL_NODE_GEOM)
			{
			    pa = ptarray_construct (ctx, accessor->has_z, 0, 1);
			    pt4d.x = p_nd->x;
			    pt4d.y = p_nd->y;
			    if (accessor->has_z)
				pt4d.z = p_nd->z;
			    ptarray_set_point4d (ctx, pa, 0, &pt4d);
			    nd->geom =
				rtpoint_construct (ctx, accessor->srid, NULL,
						   pa);
			}
		      i++;
		      p_nd = p_nd->next;
		  }
		*numelems = list->count;
	    }
      }

    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_nodes_list (list);
    return result;

  error:
    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_nodes_list (list);
    *numelems = 1;
    return NULL;
}

RTT_ISO_EDGE *
callback_getEdgeWithinBox2D (const RTT_BE_TOPOLOGY * rtt_topo,
			     const RTGBOX * box, int *numelems,
			     int fields, int limit)
{
/* callback function: getEdgeWithinBox2D */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    int count = 0;
    sqlite3_stmt *stmt_aux = NULL;
    char *sql;
    struct topo_edges_list *list = NULL;
    RTT_ISO_EDGE *result = NULL;

    if (box == NULL)
      {
	  /* special case - ignoring the Spatial Index and returning ALL edges */
	  return callback_getAllEdges (rtt_topo, numelems, fields, limit);
      }

    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getEdgeWithinBox2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    if (limit >= 0)
      {
	  /* preparing the auxiliary SQL statement */
	  sql = do_prepare_read_edge (accessor->topology_name, fields);
	  ret =
	      sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
				  &stmt_aux, NULL);
	  sqlite3_free (sql);
	  if (ret != SQLITE_OK)
	    {
		char *msg =
		    sqlite3_mprintf
		    ("Prepare_getEdgeWithinBox2D AUX error: \"%s\"",
		     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		*numelems = -1;
		return NULL;
	    }
      }

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, box->xmin);
    sqlite3_bind_double (stmt, 2, box->ymin);
    sqlite3_bind_double (stmt, 3, box->xmax);
    sqlite3_bind_double (stmt, 4, box->ymax);
    list = create_edges_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt, 0);
		if (stmt_aux != NULL)
		  {
		      char *msg;
		      if (!do_read_edge
			  (stmt_aux, list, edge_id, fields,
			   "callback_getEdgeWithinBox2D", &msg))
			{
			    gaiatopo_set_last_error_msg (topo, msg);
			    sqlite3_free (msg);
			    goto error;
			}
		  }
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_getEdgeWithinBox2D: %s",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct topo_edge *p_ed;
		result = rtalloc (ctx, sizeof (RTT_ISO_EDGE) * list->count);
		p_ed = list->first;
		while (p_ed != NULL)
		  {
		      RTT_ISO_EDGE *ed = result + i;
		      if (fields & RTT_COL_EDGE_EDGE_ID)
			  ed->edge_id = p_ed->edge_id;
		      if (fields & RTT_COL_EDGE_START_NODE)
			  ed->start_node = p_ed->start_node;
		      if (fields & RTT_COL_EDGE_END_NODE)
			  ed->end_node = p_ed->end_node;
		      if (fields & RTT_COL_EDGE_FACE_LEFT)
			  ed->face_left = p_ed->face_left;
		      if (fields & RTT_COL_EDGE_FACE_RIGHT)
			  ed->face_right = p_ed->face_right;
		      if (fields & RTT_COL_EDGE_NEXT_LEFT)
			  ed->next_left = p_ed->next_left;
		      if (fields & RTT_COL_EDGE_NEXT_RIGHT)
			  ed->next_right = p_ed->next_right;
		      if (fields & RTT_COL_EDGE_GEOM)
			  ed->geom =
			      gaia_convert_linestring_to_rtline (ctx,
								 p_ed->geom,
								 accessor->srid,
								 accessor->
								 has_z);
		      i++;
		      p_ed = p_ed->next;
		  }
		*numelems = list->count;
	    }
      }
    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    destroy_edges_list (list);
    return result;

  error:
    sqlite3_reset (stmt);
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_edges_list (list);
    *numelems = -1;
    return NULL;
}

RTT_ISO_EDGE *
callback_getAllEdges (const RTT_BE_TOPOLOGY * rtt_topo, int *numelems,
		      int fields, int limit)
{
/* callback function: getAllEdges */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    char *table;
    char *xtable;
    char *sql;
    int i;
    char **results;
    int rows;
    int columns;
    char *errMsg = NULL;
    int count = 0;
    RTT_ISO_EDGE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getAllEdges;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

/* counting how many EDGEs are there */
    table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("SELECT Count(*) FROM MAIN.\"%s\"", xtable);
    free (xtable);
    ret =
	sqlite3_get_table (accessor->db_handle, sql, &results, &rows, &columns,
			   &errMsg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  sqlite3_free (errMsg);
	  return NULL;
      }
    for (i = 1; i <= rows; i++)
	count = atoi (results[(i * columns) + 0]);
    sqlite3_free_table (results);

    if (limit < 0)
      {
	  if (count <= 0)
	      *numelems = 0;
	  else
	      *numelems = 1;
	  return NULL;
      }
    if (count <= 0)
      {
	  *numelems = 0;
	  return NULL;
      }

/* allocating an Edge's array */
    if (limit > 0)
      {
	  if (limit > count)
	      *numelems = count;
	  else
	      *numelems = limit;
      }
    else
	*numelems = count;
    result = rtalloc (ctx, sizeof (RTT_ISO_EDGE) * *numelems);

    sqlite3_reset (stmt);
    i = 0;
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		RTT_ISO_EDGE *ed = result + i;
		if (fields & RTT_COL_EDGE_EDGE_ID)
		    ed->edge_id = sqlite3_column_int64 (stmt, 0);
		if (fields & RTT_COL_EDGE_START_NODE)
		    ed->start_node = sqlite3_column_int64 (stmt, 1);
		if (fields & RTT_COL_EDGE_END_NODE)
		    ed->end_node = sqlite3_column_int64 (stmt, 2);
		if (fields & RTT_COL_EDGE_FACE_LEFT)
		  {
		      if (sqlite3_column_type (stmt, 3) == SQLITE_NULL)
			  ed->face_left = -1;
		      else
			  ed->face_left = sqlite3_column_int64 (stmt, 3);
		  }
		if (fields & RTT_COL_EDGE_FACE_RIGHT)
		  {
		      if (sqlite3_column_type (stmt, 4) == SQLITE_NULL)
			  ed->face_right = -1;
		      else
			  ed->face_right = sqlite3_column_int64 (stmt, 4);
		  }
		if (fields & RTT_COL_EDGE_NEXT_LEFT)
		    ed->next_left = sqlite3_column_int64 (stmt, 5);
		if (fields & RTT_COL_EDGE_NEXT_RIGHT)
		    ed->next_right = sqlite3_column_int64 (stmt, 6);
		if (fields & RTT_COL_EDGE_GEOM)
		  {
		      if (sqlite3_column_type (stmt, 7) == SQLITE_BLOB)
			{
			    const unsigned char *blob =
				sqlite3_column_blob (stmt, 7);
			    int blob_sz = sqlite3_column_bytes (stmt, 7);
			    gaiaGeomCollPtr geom =
				gaiaFromSpatiaLiteBlobWkb (blob, blob_sz);
			    if (geom != NULL)
			      {
				  if (geom->FirstPoint == NULL
				      && geom->FirstPolygon == NULL
				      && geom->FirstLinestring ==
				      geom->LastLinestring
				      && geom->FirstLinestring != NULL)
				    {
					gaiaLinestringPtr ln =
					    geom->FirstLinestring;
					ed->geom =
					    gaia_convert_linestring_to_rtline
					    (ctx, ln, accessor->srid,
					     accessor->has_z);
				    }
				  gaiaFreeGeomColl (geom);
			      }
			}
		  }
		i++;
		if (limit > 0 && i >= limit)
		    break;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_getAllEdges: %s",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return result;

  error:
    sqlite3_reset (stmt);
    *numelems = -1;
    return NULL;
}

RTT_ISO_EDGE *
callback_getEdgeByNode (const RTT_BE_TOPOLOGY * rtt_topo,
			const RTT_ELEMID * ids, int *numelems, int fields)
{
/* callback function: getEdgeByNode */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    int ret;
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;
    int i;
    sqlite3_stmt *stmt_aux = NULL;
    struct topo_edges_list *list = NULL;
    RTT_ISO_EDGE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    /* preparing the SQL statement */
    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    /* unconditionally querying the Edge ID */
    if (comma)
	sql = sqlite3_mprintf ("%s, edge_id", prev);
    else
	sql = sqlite3_mprintf ("%s edge_id", prev);
    comma = 1;
    sqlite3_free (prev);
    prev = sql;
    if (fields & RTT_COL_EDGE_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, left_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s left_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, right_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s right_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_left_edge", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_left_edge", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_right_edge", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_right_edge", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geom", prev);
	  else
	      sql = sqlite3_mprintf ("%s geom", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("%s FROM MAIN.\"%s\" WHERE start_node = ? OR end_node = ?", prev,
	 xtable);
    free (xtable);
    sqlite3_free (prev);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
			    &stmt_aux, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getEdgeByNode AUX error: \"%s\"",
			       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_edges_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_edge_by_node
	      (stmt_aux, list, *(ids + i), fields, "callback_getEdgeByNode",
	       &msg))
	    {
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no edge was found */
	  *numelems = list->count;
      }
    else
      {
	  struct topo_edge *p_ed;
	  result = rtalloc (ctx, sizeof (RTT_ISO_EDGE) * list->count);
	  p_ed = list->first;
	  i = 0;
	  while (p_ed != NULL)
	    {
		RTT_ISO_EDGE *ed = result + i;
		if (fields & RTT_COL_EDGE_EDGE_ID)
		    ed->edge_id = p_ed->edge_id;
		if (fields & RTT_COL_EDGE_START_NODE)
		    ed->start_node = p_ed->start_node;
		if (fields & RTT_COL_EDGE_END_NODE)
		    ed->end_node = p_ed->end_node;
		if (fields & RTT_COL_EDGE_FACE_LEFT)
		    ed->face_left = p_ed->face_left;
		if (fields & RTT_COL_EDGE_FACE_RIGHT)
		    ed->face_right = p_ed->face_right;
		if (fields & RTT_COL_EDGE_NEXT_LEFT)
		    ed->next_left = p_ed->next_left;
		if (fields & RTT_COL_EDGE_NEXT_RIGHT)
		    ed->next_right = p_ed->next_right;
		if (fields & RTT_COL_EDGE_GEOM)
		    ed->geom =
			gaia_convert_linestring_to_rtline (ctx, p_ed->geom,
							   accessor->srid,
							   accessor->has_z);
		i++;
		p_ed = p_ed->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_edges_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_edges_list (list);
    *numelems = -1;
    return NULL;
}

int
callback_updateNodes (const RTT_BE_TOPOLOGY * rtt_topo,
		      const RTT_ISO_NODE * sel_node, int sel_fields,
		      const RTT_ISO_NODE * upd_node, int upd_fields,
		      const RTT_ISO_NODE * exc_node, int exc_fields)
{
/* callback function: updateNodes */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int icol = 1;
    int changed = 0;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    double x;
    double y;
    double z;
    if (accessor == NULL)
	return -1;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_node", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET ", xtable);
    free (xtable);
    prev = sql;
    if (upd_fields & RTT_COL_NODE_NODE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, node_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s node_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_NODE_CONTAINING_FACE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, containing_face = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s containing_face = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_NODE_GEOM)
      {
	  if (accessor->has_z)
	    {
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, geom = MakePointZ(?, ?, ?, %d)",
					 prev, accessor->srid);
		else
		    sql =
			sqlite3_mprintf ("%s geom = MakePointZ(?, ?, ?, %d)",
					 prev, accessor->srid);
	    }
	  else
	    {
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, geom = MakePoint(?, ?, %d)", prev,
					 accessor->srid);
		else
		    sql =
			sqlite3_mprintf ("%s geom = MakePoint(?, ?, %d)", prev,
					 accessor->srid);
	    }
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (exc_node || sel_node)
      {
	  sql = sqlite3_mprintf ("%s WHERE", prev);
	  sqlite3_free (prev);
	  prev = sql;
	  if (sel_node)
	    {
		comma = 0;
		if (sel_fields & RTT_COL_NODE_NODE_ID)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND node_id = ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s node_id = ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (sel_fields & RTT_COL_NODE_CONTAINING_FACE)
		  {
		      if (sel_node->containing_face < 0)
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND containing_face IS NULL", prev);
			    else
				sql =
				    sqlite3_mprintf
				    ("%s containing_face IS NULL", prev);
			}
		      else
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND containing_face = ?", prev);
			    else
				sql =
				    sqlite3_mprintf ("%s containing_face = ?",
						     prev);
			}
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
	    }
	  if (exc_node)
	    {
		if (sel_node)
		  {
		      sql = sqlite3_mprintf ("%s AND", prev);
		      sqlite3_free (prev);
		      prev = sql;
		  }
		comma = 0;
		if (exc_fields & RTT_COL_NODE_NODE_ID)
		  {
		      if (comma)
			  sql = sqlite3_mprintf ("%s AND node_id <> ?", prev);
		      else
			  sql = sqlite3_mprintf ("%s node_id <> ?", prev);
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
		if (exc_fields & RTT_COL_NODE_CONTAINING_FACE)
		  {
		      if (exc_node->containing_face < 0)
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND containing_face IS NOT NULL",
				     prev);
			    else
				sql =
				    sqlite3_mprintf
				    ("%s containing_face IS NOT NULL", prev);
			}
		      else
			{
			    if (comma)
				sql =
				    sqlite3_mprintf
				    ("%s AND containing_face <> ?", prev);
			    else
				sql =
				    sqlite3_mprintf ("%s containing_face <> ?",
						     prev);
			}
		      comma = 1;
		      sqlite3_free (prev);
		      prev = sql;
		  }
	    }
      }
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_updateNodes error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  return -1;
      }

/* parameter binding */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (upd_fields & RTT_COL_NODE_NODE_ID)
      {
	  sqlite3_bind_int64 (stmt, icol, upd_node->node_id);
	  icol++;
      }
    if (upd_fields & RTT_COL_NODE_CONTAINING_FACE)
      {
	  if (upd_node->containing_face < 0)
	      sqlite3_bind_null (stmt, icol);
	  else
	      sqlite3_bind_int64 (stmt, icol, upd_node->containing_face);
	  icol++;
      }
    if (upd_fields & RTT_COL_NODE_GEOM)
      {
	  /* extracting X and Y from RTTOPO */
	  pa = upd_node->geom->point;
	  rt_getPoint4d_p (ctx, pa, 0, &pt4d);
	  x = pt4d.x;
	  y = pt4d.y;
	  if (accessor->has_z)
	      z = pt4d.z;
	  sqlite3_bind_double (stmt, icol, x);
	  icol++;
	  sqlite3_bind_double (stmt, icol, y);
	  icol++;
	  if (accessor->has_z)
	    {
		sqlite3_bind_double (stmt, icol, z);
		icol++;
	    }
      }
    if (sel_node)
      {
	  if (sel_fields & RTT_COL_NODE_NODE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, sel_node->node_id);
		icol++;
	    }
	  if (sel_fields & RTT_COL_NODE_CONTAINING_FACE)
	    {
		if (sel_node->containing_face < 0)
		    ;
		else
		  {
		      sqlite3_bind_int64 (stmt, icol,
					  sel_node->containing_face);
		      icol++;
		  }
	    }
      }
    if (exc_node)
      {
	  if (exc_fields & RTT_COL_NODE_NODE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, exc_node->node_id);
		icol++;
	    }
	  if (exc_fields & RTT_COL_NODE_CONTAINING_FACE)
	    {
		if (exc_node->containing_face < 0)
		    ;
		else
		  {
		      sqlite3_bind_int64 (stmt, icol,
					  exc_node->containing_face);
		      icol++;
		  }
	    }
      }
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	changed = sqlite3_changes (accessor->db_handle);
    else
      {
	  char *msg = sqlite3_mprintf ("callback_updateNodes: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  goto error;
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

int
callback_insertFaces (const RTT_BE_TOPOLOGY * rtt_topo, RTT_ISO_FACE * faces,
		      int numelems)
{
/* callback function: insertFaces */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    int ret;
    int i;
    int count = 0;
    sqlite3_stmt *stmt;
    if (accessor == NULL)
	return -1;

    stmt = accessor->stmt_insertFaces;
    if (stmt == NULL)
	return -1;

    for (i = 0; i < numelems; i++)
      {
	  RTT_ISO_FACE *fc = faces + i;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (fc->face_id <= 0)
	      sqlite3_bind_null (stmt, 1);
	  else
	      sqlite3_bind_int64 (stmt, 1, fc->face_id);
	  sqlite3_bind_double (stmt, 2, fc->mbr->xmin);
	  sqlite3_bind_double (stmt, 3, fc->mbr->ymin);
	  sqlite3_bind_double (stmt, 4, fc->mbr->xmax);
	  sqlite3_bind_double (stmt, 5, fc->mbr->ymax);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		if (fc->face_id <= 0)
		    fc->face_id =
			sqlite3_last_insert_rowid (accessor->db_handle);
		count++;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_insertFaces: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return count;

  error:
    sqlite3_reset (stmt);
    return -1;
}

int
callback_updateFacesById (const RTT_BE_TOPOLOGY * rtt_topo,
			  const RTT_ISO_FACE * faces, int numfaces)
{
/* callback function: updateFacesById */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    stmt = accessor->stmt_updateFacesById;
    if (stmt == NULL)
	return -1;

    for (i = 0; i < numfaces; i++)
      {
	  /* parameter binding */
	  const RTT_ISO_FACE *fc = faces + i;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_double (stmt, 1, fc->mbr->xmin);
	  sqlite3_bind_double (stmt, 2, fc->mbr->ymin);
	  sqlite3_bind_double (stmt, 3, fc->mbr->xmax);
	  sqlite3_bind_double (stmt, 4, fc->mbr->ymax);
	  sqlite3_bind_int64 (stmt, 5, fc->face_id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      changed += sqlite3_changes (accessor->db_handle);
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_updateFacesById: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    return changed;

  error:
    return -1;
}

int
callback_deleteFacesById (const RTT_BE_TOPOLOGY * rtt_topo,
			  const RTT_ELEMID * ids, int numelems)
{
/* callback function: deleteFacesById */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    stmt = accessor->stmt_deleteFacesById;
    if (stmt == NULL)
	return -1;

    for (i = 0; i < numelems; i++)
      {
	  /* parameter binding */
	  sqlite3_int64 id = *(ids + i);
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		changed += sqlite3_changes (accessor->db_handle);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_deleteFacesById: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return changed;

  error:
    sqlite3_reset (stmt);
    return -1;
}

int
callback_deleteNodesById (const RTT_BE_TOPOLOGY * rtt_topo,
			  const RTT_ELEMID * ids, int numelems)
{
/* callback function: deleteNodesById */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    stmt = accessor->stmt_deleteNodesById;
    if (stmt == NULL)
	return -1;

    for (i = 0; i < numelems; i++)
      {
	  /* parameter binding */
	  sqlite3_int64 id = *(ids + i);
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  sqlite3_bind_int64 (stmt, 1, id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	    {
		changed += sqlite3_changes (accessor->db_handle);
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_deleteNodesById: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_reset (stmt);
    return changed;

  error:
    sqlite3_reset (stmt);
    return -1;
}

RTT_ELEMID *
callback_getRingEdges (const RTT_BE_TOPOLOGY * rtt_topo,
		       RTT_ELEMID edge, int *numedges, int limit)
{
/* callback function: getRingEdges */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    int ret;
    int i;
    int count = 0;
    sqlite3_stmt *stmt;

    struct topo_edges_list *list = NULL;
    RTT_ELEMID *result = NULL;
    if (accessor == NULL)
      {
	  *numedges = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getRingEdges;
    if (stmt == NULL)
      {
	  *numedges = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, edge);
    sqlite3_bind_double (stmt, 2, edge);
    list = create_edges_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 edge_id = sqlite3_column_int64 (stmt, 0);
		add_edge (list, edge_id, -1, -1, -1, -1, -1, -1, NULL);
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
	    }
	  else
	    {
		char *msg =
		    sqlite3_mprintf ("callback_getNodeWithinDistance2D: %s",
				     sqlite3_errmsg (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numedges = count;
      }
    else
      {
	  if (list->count == 0)
	    {
		/* no edge was found */
		*numedges = 0;
	    }
	  else
	    {
		struct topo_edge *p_ed;
		result = rtalloc (ctx, sizeof (RTT_ELEMID) * list->count);
		p_ed = list->first;
		i = 0;
		while (p_ed != NULL)
		  {
		      *(result + i) = p_ed->edge_id;
		      i++;
		      p_ed = p_ed->next;
		  }
		*numedges = list->count;
	    }
      }
    destroy_edges_list (list);
    sqlite3_reset (stmt);
    return result;

  error:
    if (list != NULL)
	destroy_edges_list (list);
    *numedges = -1;
    sqlite3_reset (stmt);
    return NULL;
}

int
callback_updateEdgesById (const RTT_BE_TOPOLOGY * rtt_topo,
			  const RTT_ISO_EDGE * edges, int numedges,
			  int upd_fields)
{
/* callback function: updateEdgesById */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int i;
    int changed = 0;
    unsigned char *p_blob;
    int n_bytes;
    int gpkg_mode = 0;
    int tiny_point = 0;
    if (accessor == NULL)
	return -1;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

    if (accessor->cache != NULL)
      {
	  struct splite_internal_cache *cache =
	      (struct splite_internal_cache *) (accessor->cache);
	  gpkg_mode = cache->gpkg_mode;
	  tiny_point = cache->tinyPointEnabled;
      }

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET", xtable);
    free (xtable);
    prev = sql;
    if (upd_fields & RTT_COL_EDGE_EDGE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, edge_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s edge_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, left_face = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s left_face = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, right_face = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s right_face = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_left_edge = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_left_edge = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_right_edge = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_right_edge = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_EDGE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geom = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s geom = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    sql = sqlite3_mprintf ("%s WHERE edge_id = ?", prev);
    sqlite3_free (prev);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_updateEdgesById error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  return -1;
      }

    for (i = 0; i < numedges; i++)
      {
	  /* parameter binding */
	  int icol = 1;
	  const RTT_ISO_EDGE *upd_edge = edges + i;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (upd_fields & RTT_COL_EDGE_EDGE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_edge->edge_id);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_START_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_edge->start_node);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_END_NODE)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_edge->end_node);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_FACE_LEFT)
	    {
		if (upd_edge->face_left < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, upd_edge->face_left);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_FACE_RIGHT)
	    {
		if (upd_edge->face_right < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, upd_edge->face_right);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_NEXT_LEFT)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_edge->next_left);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_NEXT_RIGHT)
	    {
		sqlite3_bind_int64 (stmt, icol, upd_edge->next_right);
		icol++;
	    }
	  if (upd_fields & RTT_COL_EDGE_GEOM)
	    {
		/* transforming the RTLINE into a Geometry-Linestring */
		gaiaGeomCollPtr geom =
		    do_rtline_to_geom (ctx, upd_edge->geom, accessor->srid);
		gaiaToSpatiaLiteBlobWkbEx2 (geom, &p_blob, &n_bytes, gpkg_mode,
					    tiny_point);
		gaiaFreeGeomColl (geom);
		sqlite3_bind_blob (stmt, icol, p_blob, n_bytes, free);
		icol++;
	    }
	  sqlite3_bind_int64 (stmt, icol, upd_edge->edge_id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      changed += sqlite3_changes (accessor->db_handle);
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_updateEdgesById: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

RTT_ISO_EDGE *
callback_getEdgeByFace (const RTT_BE_TOPOLOGY * rtt_topo,
			const RTT_ELEMID * ids, int *numelems, int fields,
			const RTGBOX * box)
{
/* callback function: getEdgeByFace */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    int ret;
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;
    int i;
    sqlite3_stmt *stmt_aux = NULL;
    struct topo_edges_list *list = NULL;
    RTT_ISO_EDGE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    /* preparing the SQL statement */
    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    /* unconditionally querying the Edge ID */
    if (comma)
	sql = sqlite3_mprintf ("%s, edge_id", prev);
    else
	sql = sqlite3_mprintf ("%s edge_id", prev);
    comma = 1;
    sqlite3_free (prev);
    prev = sql;
    if (fields & RTT_COL_EDGE_START_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, start_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s start_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_END_NODE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, end_node", prev);
	  else
	      sql = sqlite3_mprintf ("%s end_node", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_FACE_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, left_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s left_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_FACE_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, right_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s right_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_NEXT_LEFT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_left_edge", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_left_edge", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_NEXT_RIGHT)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, next_right_edge", prev);
	  else
	      sql = sqlite3_mprintf ("%s next_right_edge", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_EDGE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, geom", prev);
	  else
	      sql = sqlite3_mprintf ("%s geom", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf
	("%s FROM MAIN.\"%s\" WHERE (left_face = ? OR right_face = ?)", prev,
	 xtable);
    free (xtable);
    sqlite3_free (prev);
    if (box != NULL)
      {
	  table = sqlite3_mprintf ("%s_edge", accessor->topology_name);
	  prev = sql;
	  sql =
	      sqlite3_mprintf
	      ("%s AND ROWID IN (SELECT ROWID FROM SpatialIndex WHERE "
	       "f_table_name = %Q AND f_geometry_column = 'geom' AND search_frame = BuildMBR(?, ?, ?, ?))",
	       sql, table);
	  sqlite3_free (table);
	  sqlite3_free (prev);
      }
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql),
			    &stmt_aux, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getEdgeByFace AUX error: \"%s\"",
			       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_edges_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_edge_by_face
	      (stmt_aux, list, *(ids + i), fields, box,
	       "callback_getEdgeByFace", &msg))
	    {
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no edge was found */
	  *numelems = list->count;
      }
    else
      {
	  struct topo_edge *p_ed;
	  result = rtalloc (ctx, sizeof (RTT_ISO_EDGE) * list->count);
	  p_ed = list->first;
	  i = 0;
	  while (p_ed != NULL)
	    {
		RTT_ISO_EDGE *ed = result + i;
		if (fields & RTT_COL_EDGE_EDGE_ID)
		    ed->edge_id = p_ed->edge_id;
		if (fields & RTT_COL_EDGE_START_NODE)
		    ed->start_node = p_ed->start_node;
		if (fields & RTT_COL_EDGE_END_NODE)
		    ed->end_node = p_ed->end_node;
		if (fields & RTT_COL_EDGE_FACE_LEFT)
		    ed->face_left = p_ed->face_left;
		if (fields & RTT_COL_EDGE_FACE_RIGHT)
		    ed->face_right = p_ed->face_right;
		if (fields & RTT_COL_EDGE_NEXT_LEFT)
		    ed->next_left = p_ed->next_left;
		if (fields & RTT_COL_EDGE_NEXT_RIGHT)
		    ed->next_right = p_ed->next_right;
		if (fields & RTT_COL_EDGE_GEOM)
		    ed->geom =
			gaia_convert_linestring_to_rtline (ctx, p_ed->geom,
							   accessor->srid,
							   accessor->has_z);
		i++;
		p_ed = p_ed->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_edges_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_edges_list (list);
    *numelems = -1;
    return NULL;
}

RTT_ISO_NODE *
callback_getNodeByFace (const RTT_BE_TOPOLOGY * rtt_topo,
			const RTT_ELEMID * faces, int *numelems, int fields,
			const RTGBOX * box)
{
/* callback function: getNodeByFace */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt_aux = NULL;
    int ret;
    int i;
    char *sql;
    char *prev;
    char *table;
    char *xtable;
    int comma = 0;
    RTPOINTARRAY *pa;
    RTPOINT4D pt4d;
    struct topo_nodes_list *list = NULL;
    RTT_ISO_NODE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

    /* preparing the SQL statement */
    sql = sqlite3_mprintf ("SELECT ");
    prev = sql;
    if (fields & RTT_COL_NODE_NODE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, node_id", prev);
	  else
	      sql = sqlite3_mprintf ("%s node_id", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_NODE_CONTAINING_FACE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, containing_face", prev);
	  else
	      sql = sqlite3_mprintf ("%s containing_face", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (fields & RTT_COL_NODE_GEOM)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, ST_X(geom), ST_Y(geom)", prev);
	  else
	      sql = sqlite3_mprintf ("%s ST_X(geom), ST_Y(geom)", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
	  if (accessor->has_z)
	    {
		sql = sqlite3_mprintf ("%s, ST_Z(geom)", prev);
		sqlite3_free (prev);
		prev = sql;
	    }
      }
    table = sqlite3_mprintf ("%s_node", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql =
	sqlite3_mprintf ("%s FROM MAIN.\"%s\" WHERE containing_face = ?", prev,
			 xtable);
    free (xtable);
    sqlite3_free (prev);
    if (box != NULL)
      {
	  table = sqlite3_mprintf ("%s_node", accessor->topology_name);
	  prev = sql;
	  sql =
	      sqlite3_mprintf
	      ("%s AND ROWID IN (SELECT ROWID FROM SpatialIndex WHERE "
	       "f_table_name = %Q AND f_geometry_column = 'geom' AND search_frame = BuildMBR(?, ?, ?, ?))",
	       sql, table);
	  sqlite3_free (table);
	  sqlite3_free (prev);
      }
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt_aux,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg =
	      sqlite3_mprintf ("Prepare_getNodeByFace AUX error: \"%s\"",
			       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  *numelems = -1;
	  return NULL;
      }

    list = create_nodes_list ();
    for (i = 0; i < *numelems; i++)
      {
	  char *msg;
	  if (!do_read_node_by_face
	      (stmt_aux, list, *(faces + i), fields, box, accessor->has_z,
	       "callback_getNodeByFace", &msg))
	    {
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (list->count == 0)
      {
	  /* no node was found */
	  *numelems = list->count;
      }
    else
      {
	  struct topo_node *p_nd;
	  result = rtalloc (ctx, sizeof (RTT_ISO_NODE) * list->count);
	  p_nd = list->first;
	  i = 0;
	  while (p_nd != NULL)
	    {
		RTT_ISO_NODE *nd = result + i;
		if (fields & RTT_COL_NODE_NODE_ID)
		    nd->node_id = p_nd->node_id;
		if (fields & RTT_COL_NODE_CONTAINING_FACE)
		    nd->containing_face = p_nd->containing_face;
		if (fields & RTT_COL_NODE_GEOM)
		  {
		      pa = ptarray_construct (ctx, accessor->has_z, 0, 1);
		      pt4d.x = p_nd->x;
		      pt4d.y = p_nd->y;
		      if (accessor->has_z)
			  pt4d.z = p_nd->z;
		      ptarray_set_point4d (ctx, pa, 0, &pt4d);
		      nd->geom =
			  rtpoint_construct (ctx, accessor->srid, NULL, pa);
		  }
		i++;
		p_nd = p_nd->next;
	    }
	  *numelems = list->count;
      }
    sqlite3_finalize (stmt_aux);
    destroy_nodes_list (list);
    return result;

  error:
    if (stmt_aux != NULL)
	sqlite3_finalize (stmt_aux);
    if (list != NULL)
	destroy_nodes_list (list);
    *numelems = -1;
    return NULL;
}

int
callback_updateNodesById (const RTT_BE_TOPOLOGY * rtt_topo,
			  const RTT_ISO_NODE * nodes, int numnodes,
			  int upd_fields)
{
/* callback function: updateNodesById */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt = NULL;
    int ret;
    char *sql;
    char *prev;
    int comma = 0;
    char *table;
    char *xtable;
    int icol = 1;
    int i;
    int changed = 0;
    if (accessor == NULL)
	return -1;

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return 0;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return 0;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return 0;

/* composing the SQL prepared statement */
    table = sqlite3_mprintf ("%s_node", accessor->topology_name);
    xtable = gaiaDoubleQuotedSql (table);
    sqlite3_free (table);
    sql = sqlite3_mprintf ("UPDATE MAIN.\"%s\" SET", xtable);
    free (xtable);
    prev = sql;
    if (upd_fields & RTT_COL_NODE_NODE_ID)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, node_id = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s node_id = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_NODE_CONTAINING_FACE)
      {
	  if (comma)
	      sql = sqlite3_mprintf ("%s, containing_face = ?", prev);
	  else
	      sql = sqlite3_mprintf ("%s containing_face = ?", prev);
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    if (upd_fields & RTT_COL_NODE_GEOM)
      {
	  if (accessor->has_z)
	    {
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, geom = MakePointZ(?, ?. ?, %d)",
					 prev, accessor->srid);
		else
		    sql =
			sqlite3_mprintf ("%s geom = MakePointZ(?, ?, ?, %d)",
					 prev, accessor->srid);
	    }
	  else
	    {
		if (comma)
		    sql =
			sqlite3_mprintf ("%s, geom = MakePoint(?, ?, %d)", prev,
					 accessor->srid);
		else
		    sql =
			sqlite3_mprintf ("%s geom = MakePoint(?, ?, %d)", prev,
					 accessor->srid);
	    }
	  comma = 1;
	  sqlite3_free (prev);
	  prev = sql;
      }
    sql = sqlite3_mprintf ("%s WHERE node_id = ?", prev);
    sqlite3_free (prev);
    ret =
	sqlite3_prepare_v2 (accessor->db_handle, sql, strlen (sql), &stmt,
			    NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  char *msg = sqlite3_mprintf ("Prepare_updateNodesById error: \"%s\"",
				       sqlite3_errmsg (accessor->db_handle));
	  gaiatopo_set_last_error_msg (topo, msg);
	  sqlite3_free (msg);
	  return -1;
      }

    for (i = 0; i < numnodes; i++)
      {
	  /* parameter binding */
	  const RTT_ISO_NODE *nd = nodes + i;
	  icol = 1;
	  sqlite3_reset (stmt);
	  sqlite3_clear_bindings (stmt);
	  if (upd_fields & RTT_COL_NODE_NODE_ID)
	    {
		sqlite3_bind_int64 (stmt, icol, nd->node_id);
		icol++;
	    }
	  if (upd_fields & RTT_COL_NODE_CONTAINING_FACE)
	    {
		if (nd->containing_face < 0)
		    sqlite3_bind_null (stmt, icol);
		else
		    sqlite3_bind_int64 (stmt, icol, nd->containing_face);
		icol++;
	    }
	  if (upd_fields & RTT_COL_NODE_GEOM)
	    {
		RTPOINTARRAY *pa;
		RTPOINT4D pt4d;
		double x;
		double y;
		double z;
		/* extracting X and Y from RTPOINT */
		pa = nd->geom->point;
		rt_getPoint4d_p (ctx, pa, 0, &pt4d);
		x = pt4d.x;
		y = pt4d.y;
		if (accessor->has_z)
		    z = pt4d.z;
		sqlite3_bind_double (stmt, icol, x);
		icol++;
		sqlite3_bind_double (stmt, icol, y);
		icol++;
		if (accessor->has_z)
		  {
		      sqlite3_bind_double (stmt, icol, z);
		      icol++;
		  }
	    }
	  sqlite3_bind_int64 (stmt, icol, nd->node_id);
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	      changed += sqlite3_changes (accessor->db_handle);
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_updateNodesById: \"%s\"",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }
    sqlite3_finalize (stmt);
    return changed;

  error:
    sqlite3_finalize (stmt);
    return -1;
}

RTT_ISO_FACE *
callback_getFaceWithinBox2D (const RTT_BE_TOPOLOGY * rtt_topo,
			     const RTGBOX * box, int *numelems, int fields,
			     int limit)
{
/* callback function: getFaceWithinBox2D */
    const RTCTX *ctx = NULL;
    struct splite_internal_cache *cache = NULL;
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    sqlite3_stmt *stmt;
    int ret;
    int count = 0;
    struct topo_faces_list *list = NULL;
    RTT_ISO_FACE *result = NULL;
    if (accessor == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    stmt = accessor->stmt_getFaceWithinBox2D;
    if (stmt == NULL)
      {
	  *numelems = -1;
	  return NULL;
      }

    cache = (struct splite_internal_cache *) accessor->cache;
    if (cache == NULL)
	return NULL;
    if (cache->magic1 != SPATIALITE_CACHE_MAGIC1
	|| cache->magic2 != SPATIALITE_CACHE_MAGIC2)
	return NULL;
    ctx = cache->RTTOPO_handle;
    if (ctx == NULL)
	return NULL;

/* setting up the prepared statement */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_double (stmt, 1, box->xmax);
    sqlite3_bind_double (stmt, 2, box->xmin);
    sqlite3_bind_double (stmt, 3, box->ymax);
    sqlite3_bind_double (stmt, 4, box->ymin);
    list = create_faces_list ();

    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		sqlite3_int64 face_id = sqlite3_column_int64 (stmt, 0);
		double minx = sqlite3_column_double (stmt, 1);
		double miny = sqlite3_column_double (stmt, 2);
		double maxx = sqlite3_column_double (stmt, 3);
		double maxy = sqlite3_column_double (stmt, 4);
		add_face (list, face_id, face_id, minx, miny, maxx, maxy);
		count++;
		if (limit > 0)
		  {
		      if (count > limit)
			  break;
		  }
		if (limit < 0)
		    break;
	    }
	  else
	    {
		char *msg = sqlite3_mprintf ("callback_getFaceWithinBox2D: %s",
					     sqlite3_errmsg
					     (accessor->db_handle));
		gaiatopo_set_last_error_msg (topo, msg);
		sqlite3_free (msg);
		goto error;
	    }
      }

    if (limit < 0)
      {
	  result = NULL;
	  *numelems = count;
      }
    else
      {
	  if (list->count <= 0)
	    {
		result = NULL;
		*numelems = 0;
	    }
	  else
	    {
		int i = 0;
		struct topo_face *p_fc;
		result = rtalloc (ctx, sizeof (RTT_ISO_FACE) * list->count);
		p_fc = list->first;
		while (p_fc != NULL)
		  {
		      RTT_ISO_FACE *fc = result + i;
		      if (fields & RTT_COL_FACE_FACE_ID)
			  fc->face_id = p_fc->face_id;
		      if (fields & RTT_COL_FACE_MBR)
			{
			    fc->mbr = gbox_new (ctx, 0);
			    fc->mbr->xmin = p_fc->minx;
			    fc->mbr->ymin = p_fc->miny;
			    fc->mbr->xmax = p_fc->maxx;
			    fc->mbr->ymax = p_fc->maxy;
			}
		      i++;
		      p_fc = p_fc->next;
		  }
		*numelems = list->count;
	    }
      }
    destroy_faces_list (list);
    sqlite3_reset (stmt);
    return result;

  error:
    if (list != NULL)
	destroy_faces_list (list);
    *numelems = -1;
    sqlite3_reset (stmt);
    return NULL;
}

int
callback_updateTopoGeomEdgeSplit (const RTT_BE_TOPOLOGY * topo,
				  RTT_ELEMID split_edge, RTT_ELEMID new_edge1,
				  RTT_ELEMID new_edge2)
{
/* does nothing */
    if (topo != NULL && split_edge == 0 && new_edge1 == 0 && new_edge2 == 0)
	topo = NULL;		/* silencing stupid compiler warnings on unused args */
    return 1;
}

int
callback_updateTopoGeomFaceSplit (const RTT_BE_TOPOLOGY * topo,
				  RTT_ELEMID split_face,
				  RTT_ELEMID new_face1, RTT_ELEMID new_face2)
{
/* does nothing */
    if (topo != NULL && split_face == 0 && new_face1 == 0 && new_face2 == 0)
	topo = NULL;		/* silencing stupid compiler warnings on unused args */
    return 1;
}

int
callback_checkTopoGeomRemEdge (const RTT_BE_TOPOLOGY * topo,
			       RTT_ELEMID rem_edge, RTT_ELEMID face_left,
			       RTT_ELEMID face_right)
{
/* does nothing */
    if (topo != NULL && rem_edge == 0 && face_left == 0 && face_right == 0)
	topo = NULL;		/* silencing stupid compiler warnings on unused args */
    return 1;
}

int
callback_updateTopoGeomFaceHeal (const RTT_BE_TOPOLOGY * topo, RTT_ELEMID face1,
				 RTT_ELEMID face2, RTT_ELEMID newface)
{
/* does nothing */
    if (topo != NULL && face1 == 0 && face2 == 0 && newface == 0)
	topo = NULL;		/* silencing stupid compiler warnings on unused args */
    return 1;
}

int
callback_checkTopoGeomRemNode (const RTT_BE_TOPOLOGY * topo,
			       RTT_ELEMID rem_node, RTT_ELEMID e1,
			       RTT_ELEMID e2)
{
/* does nothing */
    if (topo != NULL && rem_node == 0 && e1 == 0 && e2 == 0)
	topo = NULL;		/* silencing stupid compiler warnings on unused args */
    return 1;
}

int
callback_updateTopoGeomEdgeHeal (const RTT_BE_TOPOLOGY * topo, RTT_ELEMID edge1,
				 RTT_ELEMID edge2, RTT_ELEMID newedge)
{
/* does nothing */
    if (topo != NULL && edge1 == 0 && edge2 == 0 && newedge == 0)
	topo = NULL;		/* silencing stupid compiler warnings on unused args */
    return 1;
}

int
callback_topoGetSRID (const RTT_BE_TOPOLOGY * rtt_topo)
{
/* callback function: topoGetSRID */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    if (accessor == NULL)
	return -1;

    return accessor->srid;
}

double
callback_topoGetPrecision (const RTT_BE_TOPOLOGY * rtt_topo)
{
/* callback function: topoGetPrecision */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    if (accessor == NULL)
	return 0.0;

    return accessor->tolerance;
}

int
callback_topoHasZ (const RTT_BE_TOPOLOGY * rtt_topo)
{
/* callback function: topoHasZ */
    GaiaTopologyAccessorPtr topo = (GaiaTopologyAccessorPtr) rtt_topo;
    struct gaia_topology *accessor = (struct gaia_topology *) topo;
    if (accessor == NULL)
	return 0;

    return accessor->has_z;
}

#endif /* end ENABLE_RTTOPO conditionals */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted src/topology/topology_private.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
/*
 topology_private.h -- Topology opaque definitions
  
 version 4.3, 2015 July 15

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

/**
 \file topology_private.h

 SpatiaLite Topology private header file
 */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#ifdef _WIN32
#ifdef DLL_EXPORT
#define TOPOLOGY_PRIVATE
#else
#define TOPOLOGY_PRIVATE
#endif
#else
#define TOPOLOGY_PRIVATE __attribute__ ((visibility("hidden")))
#endif
#endif

#define GAIA_MODE_TOPO_FACE		0x00
#define GAIA_MODE_TOPO_NO_FACE	0xbb

struct gaia_topology
{
/* a struct wrapping a Topology Accessor Object */
    const void *cache;
    sqlite3 *db_handle;
    char *topology_name;
    int srid;
    double tolerance;
    int has_z;
    char *last_error_message;
    sqlite3_stmt *stmt_getNodeWithinDistance2D;
    sqlite3_stmt *stmt_insertNodes;
    sqlite3_stmt *stmt_getEdgeWithinDistance2D;
    sqlite3_stmt *stmt_getNextEdgeId;
    sqlite3_stmt *stmt_setNextEdgeId;
    sqlite3_stmt *stmt_insertEdges;
    sqlite3_stmt *stmt_getFaceContainingPoint_1;
    sqlite3_stmt *stmt_getFaceContainingPoint_2;
    sqlite3_stmt *stmt_deleteEdges;
    sqlite3_stmt *stmt_getNodeWithinBox2D;
    sqlite3_stmt *stmt_getEdgeWithinBox2D;
    sqlite3_stmt *stmt_getFaceWithinBox2D;
    sqlite3_stmt *stmt_getAllEdges;
    sqlite3_stmt *stmt_updateNodes;
    sqlite3_stmt *stmt_insertFaces;
    sqlite3_stmt *stmt_updateFacesById;
    sqlite3_stmt *stmt_getRingEdges;
    sqlite3_stmt *stmt_deleteFacesById;
    sqlite3_stmt *stmt_deleteNodesById;
    void *callbacks;
    void *rtt_iface;
    void *rtt_topology;
    struct gaia_topology *prev;
    struct gaia_topology *next;
};

struct face_edge_item
{
/* a struct wrapping a Face-Edge item */
    sqlite3_int64 edge_id;
    sqlite3_int64 left_face;
    sqlite3_int64 right_face;
    gaiaGeomCollPtr geom;
    int count;
    struct face_edge_item *next;
};

struct face_item
{
/* a struct wrapping a Face item */
    sqlite3_int64 face_id;
    struct face_item *next;
};

struct face_edges
{
/* a struct containing Face-Edge items */
    int has_z;
    int srid;
    struct face_edge_item *first_edge;
    struct face_edge_item *last_edge;
    struct face_item *first_face;
    struct face_item *last_face;
};

/* common utilities */
TOPOLOGY_PRIVATE RTLINE *gaia_convert_linestring_to_rtline (const RTCTX * ctx,
							    gaiaLinestringPtr
							    ln, int srid,
							    int has_z);
TOPOLOGY_PRIVATE RTPOLY *gaia_convert_polygon_to_rtpoly (const RTCTX * ctx,
							 gaiaPolygonPtr pg,
							 int srid, int has_z);

/* prototypes for functions handling Topology errors */
TOPOLOGY_PRIVATE void gaiatopo_reset_last_error_msg (GaiaTopologyAccessorPtr
						     accessor);

TOPOLOGY_PRIVATE void gaiatopo_set_last_error_msg (GaiaTopologyAccessorPtr
						   accessor, const char *msg);

TOPOLOGY_PRIVATE const char
    *gaiatopo_get_last_exception (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE struct face_edges *auxtopo_create_face_edges (int has_z,
							       int srid);

TOPOLOGY_PRIVATE void auxtopo_free_face_edges (struct face_edges *list);

TOPOLOGY_PRIVATE void auxtopo_add_face_edge (struct face_edges *list,
					     sqlite3_int64 face_id,
					     sqlite3_int64 edge_id,
					     sqlite3_int64 left_face,
					     sqlite3_int64 right_face,
					     gaiaGeomCollPtr geom);

TOPOLOGY_PRIVATE void auxtopo_select_valid_face_edges (struct face_edges *list);

TOPOLOGY_PRIVATE gaiaGeomCollPtr auxtopo_polygonize_face_edges (struct
								face_edges
								*list,
								const void
								*cache);

TOPOLOGY_PRIVATE gaiaGeomCollPtr
auxtopo_polygonize_face_edges_generalize (struct face_edges *list,
					  const void *cache);

TOPOLOGY_PRIVATE int auxtopo_create_togeotable_sql (sqlite3 * db_handle,
						    const char *db_prefix,
						    const char *ref_table,
						    const char *ref_column,
						    const char *out_table,
						    char **xcreate,
						    char **xselect,
						    char **xinsert,
						    int *ref_geom_col);

TOPOLOGY_PRIVATE int auxtopo_retrieve_geometry_type (sqlite3 * handle,
						     const char *db_prefix,
						     const char *table,
						     const char *column,
						     int *ref_type);

TOPOLOGY_PRIVATE gaiaGeomCollPtr auxtopo_make_geom_from_point (int srid,
							       int has_z,
							       gaiaPointPtr pt);

TOPOLOGY_PRIVATE gaiaGeomCollPtr auxtopo_make_geom_from_line (int srid,
							      gaiaLinestringPtr
							      line);

TOPOLOGY_PRIVATE void auxtopo_destroy_geom_from (gaiaGeomCollPtr reference);

TOPOLOGY_PRIVATE void auxtopo_copy_linestring (gaiaLinestringPtr line,
					       gaiaGeomCollPtr geom);

TOPOLOGY_PRIVATE void auxtopo_copy_linestring3d (gaiaLinestringPtr line,
						 gaiaGeomCollPtr geom);

TOPOLOGY_PRIVATE int auxtopo_insert_into_topology (GaiaTopologyAccessorPtr
						   accessor,
						   gaiaGeomCollPtr geom,
						   double tolerance,
						   int line_max_points,
						   double max_length, int mode,
						   gaiaGeomCollPtr *
						   failing_geometry);


/* prototypes for functions creating some SQL prepared statement */
TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getNodeWithinDistance2D (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getNodeWithinBox2D (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getEdgeWithinDistance2D (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getEdgeWithinBox2D (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getFaceWithinBox2D (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getAllEdges (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    *
do_create_stmt_getFaceContainingPoint_1 (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    *
do_create_stmt_getFaceContainingPoint_2 (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_insertNodes (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_insertEdges (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_updateEdges (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getNextEdgeId (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_setNextEdgeId (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_getRingEdges (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_insertFaces (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_updateFacesById (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_deleteFacesById (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE sqlite3_stmt
    * do_create_stmt_deleteNodesById (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE void
finalize_topogeo_prepared_stmts (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE void
create_topogeo_prepared_stmts (GaiaTopologyAccessorPtr accessor);

TOPOLOGY_PRIVATE void finalize_all_topo_prepared_stmts (const void *cache);

TOPOLOGY_PRIVATE void create_all_topo_prepared_stmts (const void *cache);


/* callback function prototypes */
const char *callback_lastErrorMessage (const RTT_BE_DATA * be);

int callback_freeTopology (RTT_BE_TOPOLOGY * topo);

RTT_BE_TOPOLOGY *callback_loadTopologyByName (const RTT_BE_DATA * be,
					      const char *name);

RTT_ISO_NODE *callback_getNodeById (const RTT_BE_TOPOLOGY * topo,
				    const RTT_ELEMID * ids, int *numelems,
				    int fields);

RTT_ISO_NODE *callback_getNodeWithinDistance2D (const RTT_BE_TOPOLOGY *
						topo, const RTPOINT * pt,
						double dist, int *numelems,
						int fields, int limit);

int callback_insertNodes (const RTT_BE_TOPOLOGY * topo,
			  RTT_ISO_NODE * nodes, int numelems);

RTT_ISO_EDGE *callback_getEdgeById (const RTT_BE_TOPOLOGY * topo,
				    const RTT_ELEMID * ids, int *numelems,
				    int fields);

RTT_ISO_EDGE *callback_getEdgeWithinDistance2D (const RTT_BE_TOPOLOGY *
						topo, const RTPOINT * pt,
						double dist, int *numelems,
						int fields, int limit);

RTT_ELEMID callback_getNextEdgeId (const RTT_BE_TOPOLOGY * topo);

int callback_insertEdges (const RTT_BE_TOPOLOGY * topo,
			  RTT_ISO_EDGE * edges, int numelems);

int callback_updateEdges (const RTT_BE_TOPOLOGY * topo,
			  const RTT_ISO_EDGE * sel_edge, int sel_fields,
			  const RTT_ISO_EDGE * upd_edge, int upd_fields,
			  const RTT_ISO_EDGE * exc_edge, int exc_fields);

RTT_ISO_FACE *callback_getFaceById (const RTT_BE_TOPOLOGY * topo,
				    const RTT_ELEMID * ids, int *numelems,
				    int fields);

RTT_ELEMID callback_getFaceContainingPoint (const RTT_BE_TOPOLOGY * topo,
					    const RTPOINT * pt);

int callback_deleteEdges (const RTT_BE_TOPOLOGY * topo,
			  const RTT_ISO_EDGE * sel_edge, int sel_fields);

RTT_ISO_NODE *callback_getNodeWithinBox2D (const RTT_BE_TOPOLOGY * topo,
					   const RTGBOX * box, int *numelems,
					   int fields, int limit);

RTT_ISO_EDGE *callback_getEdgeWithinBox2D (const RTT_BE_TOPOLOGY * topo,
					   const RTGBOX * box, int *numelems,
					   int fields, int limit);

RTT_ISO_EDGE *callback_getAllEdges (const RTT_BE_TOPOLOGY * topo, int *numelems,
				    int fields, int limit);

RTT_ISO_EDGE *callback_getEdgeByNode (const RTT_BE_TOPOLOGY * topo,
				      const RTT_ELEMID * ids,
				      int *numelems, int fields);

int callback_updateNodes (const RTT_BE_TOPOLOGY * topo,
			  const RTT_ISO_NODE * sel_node, int sel_fields,
			  const RTT_ISO_NODE * upd_node, int upd_fields,
			  const RTT_ISO_NODE * exc_node, int exc_fields);

int callback_updateTopoGeomFaceSplit (const RTT_BE_TOPOLOGY * topo,
				      RTT_ELEMID split_face,
				      RTT_ELEMID new_face1,
				      RTT_ELEMID new_face2);

int callback_insertFaces (const RTT_BE_TOPOLOGY * topo,
			  RTT_ISO_FACE * faces, int numelems);

int callback_updateFacesById (const RTT_BE_TOPOLOGY * topo,
			      const RTT_ISO_FACE * faces, int numfaces);

int callback_deleteFacesById (const RTT_BE_TOPOLOGY * topo,
			      const RTT_ELEMID * ids, int numelems);

RTT_ELEMID *callback_getRingEdges (const RTT_BE_TOPOLOGY * topo,
				   RTT_ELEMID edge, int *numedges, int limit);

int callback_updateEdgesById (const RTT_BE_TOPOLOGY * topo,
			      const RTT_ISO_EDGE * edges, int numedges,
			      int upd_fields);

RTT_ISO_EDGE *callback_getEdgeByFace (const RTT_BE_TOPOLOGY * topo,
				      const RTT_ELEMID * ids,
				      int *numelems, int fields,
				      const RTGBOX * box);

RTT_ISO_NODE *callback_getNodeByFace (const RTT_BE_TOPOLOGY * topo,
				      const RTT_ELEMID * faces,
				      int *numelems, int fields,
				      const RTGBOX * box);

int callback_updateNodesById (const RTT_BE_TOPOLOGY * topo,
			      const RTT_ISO_NODE * nodes, int numnodes,
			      int upd_fields);

int callback_deleteNodesById (const RTT_BE_TOPOLOGY * topo,
			      const RTT_ELEMID * ids, int numelems);

int callback_updateTopoGeomEdgeSplit (const RTT_BE_TOPOLOGY * topo,
				      RTT_ELEMID split_edge,
				      RTT_ELEMID new_edge1,
				      RTT_ELEMID new_edge2);

int callback_checkTopoGeomRemEdge (const RTT_BE_TOPOLOGY * topo,
				   RTT_ELEMID rem_edge, RTT_ELEMID face_left,
				   RTT_ELEMID face_right);

int callback_updateTopoGeomFaceHeal (const RTT_BE_TOPOLOGY * topo,
				     RTT_ELEMID face1, RTT_ELEMID face2,
				     RTT_ELEMID newface);

int callback_checkTopoGeomRemNode (const RTT_BE_TOPOLOGY * topo,
				   RTT_ELEMID rem_node, RTT_ELEMID e1,
				   RTT_ELEMID e2);

int callback_updateTopoGeomEdgeHeal (const RTT_BE_TOPOLOGY * topo,
				     RTT_ELEMID edge1, RTT_ELEMID edge2,
				     RTT_ELEMID newedge);

RTT_ISO_FACE *callback_getFaceWithinBox2D (const RTT_BE_TOPOLOGY * topo,
					   const RTGBOX * box, int *numelems,
					   int fields, int limit);

int callback_topoGetSRID (const RTT_BE_TOPOLOGY * topo);

double callback_topoGetPrecision (const RTT_BE_TOPOLOGY * topo);

int callback_topoHasZ (const RTT_BE_TOPOLOGY * topo);
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to src/versioninfo/version.c.

1
2
3
4

5
6
7
8
9
10
11
..
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 version.c -- Gaia spatial support for SQLite

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),



|
>







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 version.c -- Gaia spatial support for SQLite

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),

Changes to src/virtualtext/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libvirtualtext.la virtualtext.la

libvirtualtext_la_SOURCES = virtualtext.c

virtualtext_la_SOURCES = virtualtext.c

virtualtext_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@
virtualtext_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
virtualtext_la_CPPFLAGS += -DLOADABLE_EXTENSION
virtualtext_la_LDFLAGS = -module
virtualtext_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|








|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS = @CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libvirtualtext.la virtualtext.la

libvirtualtext_la_SOURCES = virtualtext.c

virtualtext_la_SOURCES = virtualtext.c

virtualtext_la_CPPFLAGS = @CFLAGS@
virtualtext_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
virtualtext_la_CPPFLAGS += -DLOADABLE_EXTENSION
virtualtext_la_LDFLAGS = -module
virtualtext_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/virtualtext/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
328
329
330
331
332
333
334

335
336
337
338
339
340
341
...
610
611
612
613
614
615
616
617
618
619
620
621
622
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/virtualtext


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libvirtualtext_la_LIBADD =
am_libvirtualtext_la_OBJECTS = virtualtext.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libvirtualtext.la virtualtext.la
libvirtualtext_la_SOURCES = virtualtext.c
virtualtext_la_SOURCES = virtualtext.c
virtualtext_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
virtualtext_la_LDFLAGS = -module
virtualtext_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/virtualtext/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/virtualtext/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<







 







|



|
|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
163
164
165
166
167
168
169

170
171
172
173
174
175
176
...
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
...
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
...
601
602
603
604
605
606
607


608
609
610
611
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/virtualtext
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libvirtualtext_la_LIBADD =
am_libvirtualtext_la_OBJECTS = virtualtext.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libvirtualtext.la virtualtext.la
libvirtualtext_la_SOURCES = virtualtext.c
virtualtext_la_SOURCES = virtualtext.c
virtualtext_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
	-DLOADABLE_EXTENSION
virtualtext_la_LDFLAGS = -module
virtualtext_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/virtualtext/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/virtualtext/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/virtualtext/virtualtext.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
...
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
....
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
....
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
....
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
....
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
....
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
....
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
....
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
....
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
....
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
....
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
....
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
/*

 virtualtext.c -- SQLite3 extension [VIRTUAL TABLE accessing CSV/TXT]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
typedef VirtualTextCursor *VirtualTextCursorPtr;

static void
text_clean_integer (char *value)
{
/* cleaning an integer value */
    char last;
    char *buffer;
    int len = strlen (value);
    last = value[len - 1];
    if (last == '-' || last == '+')
      {
	  /* trailing sign; transforming into a leading sign */
	  buffer = malloc (len + 1);
	  *buffer = last;
	  strcpy (buffer + 1, value);
	  buffer[len - 1] = '\0';
	  strcpy (value, buffer);
	  free (buffer);
      }
}

static void
text_clean_double (char *value)
{
/* cleaning an integer value */
    char *p;
    char last;
    char *buffer;
    int len = strlen (value);
    last = value[len - 1];
    if (last == '-' || last == '+')
      {
	  /* trailing sign; transforming into a leading sign */
	  buffer = malloc (len + 1);
	  *buffer = last;
	  strcpy (buffer + 1, value);
	  buffer[len - 1] = '\0';
	  strcpy (value, buffer);
	  free (buffer);
      }
    p = value;
    while (*p != '\0')
      {
	  /* transforming COMMAs into POINTs */
	  if (*p == ',')
	      *p = '.';
................................................................................
{
/* evaluating Filter constraints */
    int nCol;
    int i;
    char buf[4096];
    int type;
    const char *value = NULL;
    sqlite3_int64 int_value = 0;
    double dbl_value = 0.0;
    char *txt_value = NULL;
    int is_int = 0;
    int is_dbl = 0;
    int is_txt = 0;
    gaiaTextReaderPtr text = cursor->pVtab->reader;
    VirtualTextConstraintPtr pC;
    if (text->current_line_ready == 0)
................................................................................
	  reader->columns[col].name = NULL;
	  reader->columns[col].type = VRTTXT_NULL;
      }
    return reader;
}

static void
vrttxt_line_init (struct vrttxt_line *line, gaia_off_t offset)
{
/* initializing a LINE struct */
    line->offset = offset;
    line->len = 0;
    line->num_fields = 0;
    line->error = 0;
}

static void
vrttxt_line_end (struct vrttxt_line *line, gaia_off_t offset)
{
/* completing a Line struct (EndOfLine encountered) */
    line->len = offset - line->offset;
}

static void
vrttxt_add_field (struct vrttxt_line *line, gaia_off_t offset)
{
/* adding a Field offset to the current Line */
    if (line->num_fields >= VRTTXT_FIELDS_MAX)
      {
	  line->error = 1;
	  return;
      }
................................................................................
	  else
	      return 0;		/* sign is not the first/last string char */
      }
    return 1;			/* ok, can be a valid INTEGER value */
}

static int
vrttxt_is_scientific_double (const char *value, char decimal_separator)
{
/* checking if this value can be a DOUBLE (scientific notation: -1.567E-16) */
    int points = 0;
    int exp = 0;
    int sign = 0;
    int invalid = 0;
    int digit2 = 0;
    int digit3 = 0;
    const char *p = value;
    if (*p == '-' || *p == '+')
	p++;			/* skipping the first sign */
    while (*p != '\0')
      {
	  if (*p == decimal_separator)
	    {
		if (digit2 == 0)
		    points++;
		else
		    invalid++;
	    }
	  else if (*p == 'E' || *p == 'e')
	      exp++;
	  else if (*p == '-' || *p == '+')
	    {
		if (exp && !digit3)
		    sign++;
		else
		    invalid++;
	    }
	  else if (*p >= '0' && *p <= '9')
	    {
		if (exp)
		    digit3++;
		else if (points)
		    digit2++;
	    }
	  p++;
      }
    if (digit2 >= 0 && exp == 1 && (sign == 0 || sign == 1) && digit3
	&& !invalid)
	return 1;
    return 0;
}

static int
vrttxt_is_plain_double (const char *value, char decimal_separator)
{
/* checking if this value can be a DOUBLE (normal case: -123.567 */
    int invalids = 0;
    int digits = 0;
    int signs = 0;
    int points = 0;
    char last = '\0';
    const char *p = value;
    while (*p != '\0')
................................................................................
	      ;
	  else
	      return 0;		/* sign is not the first/last string char */
      }
    return 1;			/* ok, can be a valid DOUBLE value */
}

static int
vrttxt_is_double (const char *value, char decimal_separator)
{
/* checking if this value can be a DOUBLE */
    if (vrttxt_is_plain_double (value, decimal_separator))
	return 1;
    if (vrttxt_is_scientific_double (value, decimal_separator))
	return 1;
    return 0;
}

static int
vrttxt_check_type (const char *value, char decimal_separator)
{
/* checking the Field type */
    if (*value == '\0')
	return VRTTXT_NULL;
    if (vrttxt_is_integer (value))
	return VRTTXT_INTEGER;
    if (vrttxt_is_double (value, decimal_separator))
	return VRTTXT_DOUBLE;
    return VRTTXT_TEXT;
}

static void
vrttxt_unmask (char *string, char separator)
{
/* unmasking double separators */
    int len = strlen (string);
    char *buffer = malloc (len + 1);
    char *in = buffer;
    char *out = string;
    char prevchar = '\0';
    strcpy (buffer, string);
    while (*in != '\0')
      {
	  if (*in == separator)
	    {
		if (prevchar == separator)
		    *out++ = separator;
		in++;
		prevchar = separator;
		continue;
	    }
	  prevchar = *in;
	  *out++ = *in++;
      }
    *out = '\0';
    free (buffer);
}

static int
vrttxt_set_column_title (gaiaTextReaderPtr txt, int col_no, const char *name)
{
/* setting a Column header name */
    int err;
    int ind;
    char *utf8text;
................................................................................
      {
	  /* cleaning the enclosing quotes */
	  str[len - 1] = '\0';
	  str = (char *) (name + 1);
	  len -= 2;
	  if (len <= 0)
	      return 0;
	  vrttxt_unmask (str, txt->text_separator);
      }
    utf8text = gaiaConvertToUTF8 (txt->toUtf8, str, len, &err);
    if (err)
      {
	  if (utf8text)
	      free (utf8text);
	  return 0;
................................................................................
		/* retrieving the current Field Value */
		memcpy (txt->field_buffer, txt->line_buffer + off, len);
		*(txt->field_buffer + len) = '\0';
	    }
	  if (txt->first_line_titles && first_line)
	    {
		/* first line: the current value is the Column Name */
		if (strlen (txt->field_buffer) == 0)
		    strcpy (txt->field_buffer, "empty");
		if (!vrttxt_set_column_title (txt, ind, txt->field_buffer))
		    txt->error = 1;
	    }
	  else
	    {
		/* plain Field Value */
		value_type =
................................................................................
/ - then feeding the Row offsets structs
/   to be used for any subsequent access
*/
    char name[64];
    int ind;
    int i2;
    int c;
    int prevchar = '\0';
    int masked = 0;
    int token_start = 1;
    int row_offset = 0;
    gaia_off_t offset = 0;
    struct vrttxt_line line;
    vrttxt_line_init (&line, 0);
    txt->current_buf_off = 0;

    while ((c = getc (txt->text_file)) != EOF)
      {
	  if (c == txt->text_separator)
................................................................................
	    {
		if (masked)
		    masked = 0;
		else
		  {
		      if (token_start)
			  masked = 1;
		      if (prevchar == txt->text_separator)
			  masked = 1;
		  }
		vrttxt_line_push (txt, (char) c);
		if (txt->error)
		    return 0;
		row_offset++;
		offset++;
		prevchar = c;
		continue;
	    }
	  prevchar = c;
	  token_start = 0;
	  if (c == '\r')
	    {
		if (masked)
		  {
		      vrttxt_line_push (txt, (char) c);
		      if (txt->error)
			  return 0;
		      row_offset++;
		  }
		offset++;
		continue;
	    }
	  if (c == '\n')
	    {
		if (masked)
		  {
		      vrttxt_line_push (txt, (char) c);
		      if (txt->error)
			  return 0;
		      row_offset++;
		      offset++;
		      continue;
		  }
		vrttxt_add_field (&line, offset);
................................................................................
		offset++;
		continue;
	    }
	  if (c == txt->field_separator)
	    {
		if (masked)
		  {
		      vrttxt_line_push (txt, (char) c);
		      if (txt->error)
			  return 0;
		      row_offset++;
		      offset++;
		      continue;
		  }
		vrttxt_line_push (txt, (char) c);
		if (txt->error)
		    return 0;
		row_offset++;
		vrttxt_add_field (&line, offset);
		token_start = 1;
		offset++;
		continue;
	    }
	  vrttxt_line_push (txt, (char) c);
	  if (txt->error)
	      return 0;
	  row_offset++;
	  offset++;
      }
    if (txt->error)
	return 0;
................................................................................
    if (txt->first_line_titles)
      {
	  /* checking for duplicate column names */
	  for (ind = 0; ind < txt->max_fields; ind++)
	    {
		for (i2 = 0; i2 < ind; i2++)
		  {
		      if (txt->columns[ind].name == NULL)
			{
			    if (!vrttxt_set_column_title (txt, ind, "empty"))
			      {
				  txt->error = 1;
				  return 0;
			      }
			}
		      if (strcasecmp
			  (txt->columns[i2].name, txt->columns[ind].name) == 0)
			{
			    sprintf (name, "COL%03d", ind + 1);
			    if (!vrttxt_set_column_title (txt, ind, name))
			      {
				  txt->error = 1;
................................................................................

GAIAGEO_DECLARE int
gaiaTextReaderGetRow (gaiaTextReaderPtr txt, int line_no)
{
/* reading a Line (identified by relative number */
    int i;
    char c;
    char prevchar = '\0';
    int masked = 0;
    int token_start = 1;
    int fld = 0;
    int offset = 0;
    struct vrttxt_row *p_row;
    if (txt == NULL)
	return 0;
    txt->current_line_ready = 0;
    txt->max_current_field = 0;
    if (line_no < 0 || line_no >= txt->num_rows || txt->rows == NULL)
	return 0;
    p_row = *(txt->rows + line_no);
    if (gaia_fseek (txt->text_file, p_row->offset, SEEK_SET) != 0)
	return 0;
    if (fread (txt->line_buffer, 1, p_row->len, txt->text_file) !=
	(unsigned int) (p_row->len))
	return 0;
    txt->field_offsets[0] = 0;

    for (i = 0; i < p_row->len; i++)
      {
	  /* parsing Fields */
	  c = *(txt->line_buffer + i);
	  if (c == txt->text_separator)
	    {
		if (masked)
		    masked = 0;
		else
		  {
		      if (token_start)
			  masked = 1;
		      if (prevchar == txt->text_separator)
			  masked = 1;
		  }
		offset++;
		prevchar = c;
		continue;
	    }
	  prevchar = c;
	  token_start = 0;
	  if (c == '\r')
	    {
		offset++;
		continue;
	    }
	  if (c == txt->field_separator)
................................................................................
		len -= 2;
		if (len <= 0)
		  {
		      *type = VRTTXT_NULL;
		      *value = NULL;
		      return 1;
		  }
		vrttxt_unmask (str, txt->text_separator);
	    }
	  utf8text = gaiaConvertToUTF8 (txt->toUtf8, str, len, &err);
	  if (err)
	    {
		/* memory cleanup: Kashif Rasul 14 Jan 2010 */
		if (utf8text)
		    free (utf8text);




|







 







|







 







|





<




<









|





<




<







 







|
|







 







|









|






|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|







 







<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<







 







<
<







 







<



|







 







<
<

|




<


<





|











|







 







|






|








|







 







<
<
<
<
<
<
<
<







 







<





<
<





|





<












<
<


<


<







 







<







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125

126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

141
142
143
144

145
146
147
148
149
150
151
...
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
....
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
....
1160
1161
1162
1163
1164
1165
1166














































1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
....
1211
1212
1213
1214
1215
1216
1217











1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230



























1231
1232
1233
1234
1235
1236
1237
....
1243
1244
1245
1246
1247
1248
1249

1250
1251
1252
1253
1254
1255
1256
....
1373
1374
1375
1376
1377
1378
1379


1380
1381
1382
1383
1384
1385
1386
....
1516
1517
1518
1519
1520
1521
1522

1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
....
1534
1535
1536
1537
1538
1539
1540


1541
1542
1543
1544
1545
1546

1547
1548

1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
....
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
....
1613
1614
1615
1616
1617
1618
1619








1620
1621
1622
1623
1624
1625
1626
....
1653
1654
1655
1656
1657
1658
1659

1660
1661
1662
1663
1664


1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675

1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687


1688
1689

1690
1691

1692
1693
1694
1695
1696
1697
1698
....
1783
1784
1785
1786
1787
1788
1789

1790
1791
1792
1793
1794
1795
1796
/*

 virtualtext.c -- SQLite3 extension [VIRTUAL TABLE accessing CSV/TXT]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
typedef VirtualTextCursor *VirtualTextCursorPtr;

static void
text_clean_integer (char *value)
{
/* cleaning an integer value */
    char last;
    char buffer[35536];
    int len = strlen (value);
    last = value[len - 1];
    if (last == '-' || last == '+')
      {
	  /* trailing sign; transforming into a leading sign */

	  *buffer = last;
	  strcpy (buffer + 1, value);
	  buffer[len - 1] = '\0';
	  strcpy (value, buffer);

      }
}

static void
text_clean_double (char *value)
{
/* cleaning an integer value */
    char *p;
    char last;
    char buffer[35536];
    int len = strlen (value);
    last = value[len - 1];
    if (last == '-' || last == '+')
      {
	  /* trailing sign; transforming into a leading sign */

	  *buffer = last;
	  strcpy (buffer + 1, value);
	  buffer[len - 1] = '\0';
	  strcpy (value, buffer);

      }
    p = value;
    while (*p != '\0')
      {
	  /* transforming COMMAs into POINTs */
	  if (*p == ',')
	      *p = '.';
................................................................................
{
/* evaluating Filter constraints */
    int nCol;
    int i;
    char buf[4096];
    int type;
    const char *value = NULL;
    sqlite3_int64 int_value;
    double dbl_value;
    char *txt_value = NULL;
    int is_int = 0;
    int is_dbl = 0;
    int is_txt = 0;
    gaiaTextReaderPtr text = cursor->pVtab->reader;
    VirtualTextConstraintPtr pC;
    if (text->current_line_ready == 0)
................................................................................
	  reader->columns[col].name = NULL;
	  reader->columns[col].type = VRTTXT_NULL;
      }
    return reader;
}

static void
vrttxt_line_init (struct vrttxt_line *line, off_t offset)
{
/* initializing a LINE struct */
    line->offset = offset;
    line->len = 0;
    line->num_fields = 0;
    line->error = 0;
}

static void
vrttxt_line_end (struct vrttxt_line *line, off_t offset)
{
/* completing a Line struct (EndOfLine encountered) */
    line->len = offset - line->offset;
}

static void
vrttxt_add_field (struct vrttxt_line *line, off_t offset)
{
/* adding a Field offset to the current Line */
    if (line->num_fields >= VRTTXT_FIELDS_MAX)
      {
	  line->error = 1;
	  return;
      }
................................................................................
	  else
	      return 0;		/* sign is not the first/last string char */
      }
    return 1;			/* ok, can be a valid INTEGER value */
}

static int














































vrttxt_is_double (const char *value, char decimal_separator)
{
/* checking if this value can be a DOUBLE */
    int invalids = 0;
    int digits = 0;
    int signs = 0;
    int points = 0;
    char last = '\0';
    const char *p = value;
    while (*p != '\0')
................................................................................
	      ;
	  else
	      return 0;		/* sign is not the first/last string char */
      }
    return 1;			/* ok, can be a valid DOUBLE value */
}












static int
vrttxt_check_type (const char *value, char decimal_separator)
{
/* checking the Field type */
    if (*value == '\0')
	return VRTTXT_NULL;
    if (vrttxt_is_integer (value))
	return VRTTXT_INTEGER;
    if (vrttxt_is_double (value, decimal_separator))
	return VRTTXT_DOUBLE;
    return VRTTXT_TEXT;
}




























static int
vrttxt_set_column_title (gaiaTextReaderPtr txt, int col_no, const char *name)
{
/* setting a Column header name */
    int err;
    int ind;
    char *utf8text;
................................................................................
      {
	  /* cleaning the enclosing quotes */
	  str[len - 1] = '\0';
	  str = (char *) (name + 1);
	  len -= 2;
	  if (len <= 0)
	      return 0;

      }
    utf8text = gaiaConvertToUTF8 (txt->toUtf8, str, len, &err);
    if (err)
      {
	  if (utf8text)
	      free (utf8text);
	  return 0;
................................................................................
		/* retrieving the current Field Value */
		memcpy (txt->field_buffer, txt->line_buffer + off, len);
		*(txt->field_buffer + len) = '\0';
	    }
	  if (txt->first_line_titles && first_line)
	    {
		/* first line: the current value is the Column Name */


		if (!vrttxt_set_column_title (txt, ind, txt->field_buffer))
		    txt->error = 1;
	    }
	  else
	    {
		/* plain Field Value */
		value_type =
................................................................................
/ - then feeding the Row offsets structs
/   to be used for any subsequent access
*/
    char name[64];
    int ind;
    int i2;
    int c;

    int masked = 0;
    int token_start = 1;
    int row_offset = 0;
    off_t offset = 0;
    struct vrttxt_line line;
    vrttxt_line_init (&line, 0);
    txt->current_buf_off = 0;

    while ((c = getc (txt->text_file)) != EOF)
      {
	  if (c == txt->text_separator)
................................................................................
	    {
		if (masked)
		    masked = 0;
		else
		  {
		      if (token_start)
			  masked = 1;


		  }
		vrttxt_line_push (txt, c);
		if (txt->error)
		    return 0;
		row_offset++;
		offset++;

		continue;
	    }

	  token_start = 0;
	  if (c == '\r')
	    {
		if (masked)
		  {
		      vrttxt_line_push (txt, c);
		      if (txt->error)
			  return 0;
		      row_offset++;
		  }
		offset++;
		continue;
	    }
	  if (c == '\n')
	    {
		if (masked)
		  {
		      vrttxt_line_push (txt, c);
		      if (txt->error)
			  return 0;
		      row_offset++;
		      offset++;
		      continue;
		  }
		vrttxt_add_field (&line, offset);
................................................................................
		offset++;
		continue;
	    }
	  if (c == txt->field_separator)
	    {
		if (masked)
		  {
		      vrttxt_line_push (txt, c);
		      if (txt->error)
			  return 0;
		      row_offset++;
		      offset++;
		      continue;
		  }
		vrttxt_line_push (txt, c);
		if (txt->error)
		    return 0;
		row_offset++;
		vrttxt_add_field (&line, offset);
		token_start = 1;
		offset++;
		continue;
	    }
	  vrttxt_line_push (txt, c);
	  if (txt->error)
	      return 0;
	  row_offset++;
	  offset++;
      }
    if (txt->error)
	return 0;
................................................................................
    if (txt->first_line_titles)
      {
	  /* checking for duplicate column names */
	  for (ind = 0; ind < txt->max_fields; ind++)
	    {
		for (i2 = 0; i2 < ind; i2++)
		  {








		      if (strcasecmp
			  (txt->columns[i2].name, txt->columns[ind].name) == 0)
			{
			    sprintf (name, "COL%03d", ind + 1);
			    if (!vrttxt_set_column_title (txt, ind, name))
			      {
				  txt->error = 1;
................................................................................

GAIAGEO_DECLARE int
gaiaTextReaderGetRow (gaiaTextReaderPtr txt, int line_no)
{
/* reading a Line (identified by relative number */
    int i;
    char c;

    int masked = 0;
    int token_start = 1;
    int fld = 0;
    int offset = 0;
    struct vrttxt_row *p_row;


    txt->current_line_ready = 0;
    txt->max_current_field = 0;
    if (line_no < 0 || line_no >= txt->num_rows || txt->rows == NULL)
	return 0;
    p_row = *(txt->rows + line_no);
    if (fseek (txt->text_file, p_row->offset, SEEK_SET) != 0)
	return 0;
    if (fread (txt->line_buffer, 1, p_row->len, txt->text_file) !=
	(unsigned int) (p_row->len))
	return 0;
    txt->field_offsets[0] = 0;

    for (i = 0; i < p_row->len; i++)
      {
	  /* parsing Fields */
	  c = *(txt->line_buffer + i);
	  if (c == txt->text_separator)
	    {
		if (masked)
		    masked = 0;
		else
		  {
		      if (token_start)
			  masked = 1;


		  }
		offset++;

		continue;
	    }

	  token_start = 0;
	  if (c == '\r')
	    {
		offset++;
		continue;
	    }
	  if (c == txt->field_separator)
................................................................................
		len -= 2;
		if (len <= 0)
		  {
		      *type = VRTTXT_NULL;
		      *value = NULL;
		      return 1;
		  }

	    }
	  utf8text = gaiaConvertToUTF8 (txt->toUtf8, str, len, &err);
	  if (err)
	    {
		/* memory cleanup: Kashif Rasul 14 Jan 2010 */
		if (utf8text)
		    free (utf8text);

Changes to src/wfs/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS= @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libwfs.la wfs.la

libwfs_la_SOURCES = wfs_in.c

wfs_la_SOURCES = wfs_in.c

wfs_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@
wfs_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
wfs_la_CPPFLAGS += -DLOADABLE_EXTENSION
wfs_la_LDFLAGS = -module
wfs_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

|








|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

AM_CPPFLAGS= @CFLAGS@ @LIBXML2_CFLAGS@
AM_CPPFLAGS += -I$(top_srcdir)/src/headers

noinst_LTLIBRARIES = libwfs.la wfs.la

libwfs_la_SOURCES = wfs_in.c

wfs_la_SOURCES = wfs_in.c

wfs_la_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@
wfs_la_CPPFLAGS += -I$(top_srcdir)/src/headers -I.
wfs_la_CPPFLAGS += -DLOADABLE_EXTENSION
wfs_la_LDFLAGS = -module
wfs_la_LIBTOOLFLAGS = --tag=disable-static

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

Changes to src/wfs/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
85
86
87
88
89
90
91


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
...
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
...
328
329
330
331
332
333
334

335
336
337
338
339
340
341
...
610
611
612
613
614
615
616
617
618
619
620
621
622
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/wfs


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libwfs_la_LIBADD =
am_libwfs_la_OBJECTS = wfs_in.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libwfs.la wfs.la
libwfs_la_SOURCES = wfs_in.c
wfs_la_SOURCES = wfs_in.c
wfs_la_CPPFLAGS = @CFLAGS@ @CPPFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
wfs_la_LDFLAGS = -module
wfs_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/wfs/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/wfs/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|













|
<
<
<
<
<
<
<
<
<
<







 







>
>







<







 







<







 







<
|



|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18










19
20
21
22
23
24
25
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
162
163
164
165
166
167
168

169
170
171
172
173
174
175
...
292
293
294
295
296
297
298

299
300
301
302
303
304
305
306
307
308
309
310
...
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
...
600
601
602
603
604
605
606


607
608
609
610
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/wfs
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libwfs_la_LIBADD =
am_libwfs_la_OBJECTS = wfs_in.lo
................................................................................
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@

AM_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@ -I$(top_srcdir)/src/headers
noinst_LTLIBRARIES = libwfs.la wfs.la
libwfs_la_SOURCES = wfs_in.c
wfs_la_SOURCES = wfs_in.c
wfs_la_CPPFLAGS = @CFLAGS@ @LIBXML2_CFLAGS@ \
	-I$(top_srcdir)/src/headers -I. -DLOADABLE_EXTENSION
wfs_la_LDFLAGS = -module
wfs_la_LIBTOOLFLAGS = --tag=disable-static
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
all: all-am

.SUFFIXES:
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/wfs/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign src/wfs/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-info-am install-man install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-compile \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to src/wfs/wfs_in.c.

1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167




168

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
...
218
219
220
221
222
223
224
225
226
227
228
229
230


231
232



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
...
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446

447
448
449
450
451
452
453
...
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
...
711
712
713
714
715
716
717















718
719
720
721
722
723
724
725
726
727
728
729
730
...
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
....
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
....
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
....
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
....
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493



1494

1495
1496
1497
1498
1499
1500
1501
....
1505
1506
1507
1508
1509
1510
1511
1512




1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
....
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
....
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
....
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
....
1852
1853
1854
1855
1856
1857
1858

1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
....
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
....
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002

2003
2004





2005
2006
2007
2008
2009
2010
2011
....
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081




2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
....
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198

2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211


2212

2213
2214
2215
2216
2217
2218
2219
....
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
....
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
....
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
....
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
....
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
....
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
....
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
....
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
....
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
....
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
....
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
....
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
....
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
....
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
....
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
....
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
....
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608


4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
....
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
/*

 wfs_in.c -- implements WFS support [import]

 version 4.3, 2015 June 29

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
struct wfs_geom_type
{
/* Geometry Type statistics */
    int type;
    int count;
};

struct wfs_geometry_def
{
/* a WFS geometry / column */
    char *geometry_name;
    int geometry_type;
    int srid;
    int dims;
    int is_nullable;
    struct wfs_geom_type *types;
    char *geometry_value;
    struct wfs_geometry_def *next;
};

struct wfs_layer_schema
{
/* a WFS table / layer schema */
    int error;
    int swap_axes;
    char *layer_name;
    struct wfs_column_def *first;
    struct wfs_column_def *last;
    struct wfs_geometry_def *first_geo;




    struct wfs_geometry_def *last_geo;

    sqlite3_stmt *stmt;
    sqlite3 *sqlite;
};

struct wfs_attribute
{
/* a WFS attribute value */
    struct wfs_column_def *column;
    char *value;
    struct wfs_attribute *next;
};

struct wfs_geometry
{
/* a WFS geometry value */
    struct wfs_geometry_def *geometry;
    char *geometry_value;
    struct wfs_geometry *next;
};

struct wfs_feature
{
/* a WFS feature */
    struct wfs_attribute *first;
    struct wfs_attribute *last;
    struct wfs_geometry *first_geo;
    struct wfs_geometry *last_geo;
};

static struct wfs_column_def *
alloc_wfs_column (const char *name, int type, int is_nullable)
{
/* allocating a WFS attribute / column definition */
    int len;
................................................................................
    if (col == NULL)
	return;
    if (col->name != NULL)
	free (col->name);
    free (col);
}

static struct wfs_geometry_def *
alloc_wfs_geometry (const char *name, int type, int is_nullable)
{
/* allocating a WFS geometry / column definition */
    int len;
    struct wfs_geometry_def *geo = malloc (sizeof (struct wfs_geometry_def));


    len = strlen (name);
    geo->geometry_name = malloc (len + 1);



    strcpy (geo->geometry_name, name);
    geo->geometry_type = type;
    geo->is_nullable = is_nullable;
    geo->srid = -1;
    geo->dims = 2;
    geo->types = malloc (sizeof (struct wfs_geom_type) * MAX_GTYPES);
    geo->types[0].type = GAIA_POINT;
    geo->types[0].count = 0;
    geo->types[1].type = GAIA_LINESTRING;
    geo->types[1].count = 0;
    geo->types[2].type = GAIA_POLYGON;
    geo->types[2].count = 0;
    geo->types[3].type = GAIA_MULTIPOINT;
    geo->types[3].count = 0;
    geo->types[4].type = GAIA_MULTILINESTRING;
    geo->types[4].count = 0;
    geo->types[5].type = GAIA_MULTIPOLYGON;
    geo->types[5].count = 0;
    geo->types[6].type = GAIA_GEOMETRYCOLLECTION;
    geo->types[6].count = 0;
    geo->types[7].type = GAIA_POINTZ;
    geo->types[7].count = 0;
    geo->types[8].type = GAIA_LINESTRINGZ;
    geo->types[8].count = 0;
    geo->types[9].type = GAIA_POLYGONZ;
    geo->types[9].count = 0;
    geo->types[10].type = GAIA_MULTIPOINTZ;
    geo->types[10].count = 0;
    geo->types[11].type = GAIA_MULTILINESTRINGZ;
    geo->types[11].count = 0;
    geo->types[12].type = GAIA_MULTIPOLYGONZ;
    geo->types[12].count = 0;
    geo->types[13].type = GAIA_GEOMETRYCOLLECTIONZ;
    geo->types[13].count = 0;
    geo->types[14].type = GAIA_POINTM;
    geo->types[14].count = 0;
    geo->types[15].type = GAIA_LINESTRINGM;
    geo->types[15].count = 0;
    geo->types[16].type = GAIA_POLYGONM;
    geo->types[16].count = 0;
    geo->types[17].type = GAIA_MULTIPOINTM;
    geo->types[17].count = 0;
    geo->types[18].type = GAIA_MULTILINESTRINGM;
    geo->types[18].count = 0;
    geo->types[19].type = GAIA_MULTIPOLYGONM;
    geo->types[19].count = 0;
    geo->types[20].type = GAIA_GEOMETRYCOLLECTIONM;
    geo->types[20].count = 0;
    geo->types[21].type = GAIA_POINTZM;
    geo->types[21].count = 0;
    geo->types[22].type = GAIA_LINESTRINGZM;
    geo->types[22].count = 0;
    geo->types[23].type = GAIA_POLYGONZM;
    geo->types[23].count = 0;
    geo->types[24].type = GAIA_MULTIPOINTZM;
    geo->types[24].count = 0;
    geo->types[25].type = GAIA_MULTILINESTRINGZM;
    geo->types[25].count = 0;
    geo->types[26].type = GAIA_MULTIPOLYGONZM;
    geo->types[26].count = 0;
    geo->types[27].type = GAIA_GEOMETRYCOLLECTIONZM;
    geo->types[27].count = 0;
    geo->geometry_value = NULL;
    geo->next = NULL;
    return geo;
}

static void
free_wfs_geometry (struct wfs_geometry_def *geo)
{
/* memory cleanup: destroying a WFS geometry definition */
    if (geo == NULL)
	return;
    if (geo->geometry_name != NULL)
	free (geo->geometry_name);
    if (geo->types != NULL)
	free (geo->types);
    if (geo->geometry_value != NULL)
	free (geo->geometry_value);
    free (geo);
}

static struct wfs_layer_schema *
alloc_wfs_layer_schema (const char *layer_name, int swap_axes)
{
/* allocating an empty WFS schema descriptor */
    int len;
    struct wfs_layer_schema *ptr = malloc (sizeof (struct wfs_layer_schema));
    ptr->error = 0;
    ptr->swap_axes = swap_axes;
    len = strlen (layer_name);
    ptr->layer_name = malloc (len + 1);
    strcpy (ptr->layer_name, layer_name);
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->first_geo = NULL;
    ptr->last_geo = NULL;
    ptr->stmt = NULL;
    return ptr;
}

static void
free_wfs_layer_schema (struct wfs_layer_schema *ptr)
{
/* memory cleanup: destroying a WFS schema */
    struct wfs_column_def *col;
    struct wfs_column_def *n_col;
    struct wfs_geometry_def *geo;
    struct wfs_geometry_def *n_geo;
    if (ptr == NULL)
	return;
    if (ptr->layer_name != NULL)
	free (ptr->layer_name);
    col = ptr->first;
    while (col != NULL)
      {
	  n_col = col->next;
	  free_wfs_column (col);
	  col = n_col;
      }
    geo = ptr->first_geo;

    while (geo != NULL)
      {
	  n_geo = geo->next;
	  free_wfs_geometry (geo);
	  geo = n_geo;
      }
    if (ptr->stmt != NULL)
	sqlite3_finalize (ptr->stmt);
    free (ptr);
}

static void
reset_wfs_values (struct wfs_layer_schema *ptr)
{
/* memory cleanup: resetting attribute values */
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;
    if (ptr == NULL)
	return;
    col = ptr->first;
    while (col != NULL)
      {
	  col->pValue = NULL;
	  col = col->next;
      }
    geo = ptr->first_geo;
    while (geo != NULL)
      {
	  if (geo->geometry_value != NULL)
	    {
		free (geo->geometry_value);
		geo->geometry_value = NULL;
	    }
	  geo = geo->next;
      }
}

static int
count_wfs_values (struct wfs_layer_schema *ptr)
{
/* counting how many valid values  */
    int count = 0;
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;
    if (ptr == NULL)
	return 0;
    col = ptr->first;
    while (col != NULL)
      {
	  if (col->pValue != NULL)
	      count++;
	  col = col->next;
      }
    geo = ptr->first_geo;
    while (geo != NULL)
      {
	  if (geo->geometry_value != NULL)
	      count++;
	  geo = geo->next;
      }
    return count;
}

static void
add_wfs_column_to_schema (struct wfs_layer_schema *ptr, const char *name,
			  int type, int is_nullable)
{
................................................................................
	ptr->first = col;
    if (ptr->last != NULL)
	ptr->last->next = col;
    ptr->last = col;
}

static void
add_wfs_geometry (struct wfs_layer_schema *ptr, const char *name, int type,
		  int is_nullable)
{
/* adding a Geometry / column into a WFS schema */
    struct wfs_geometry_def *geo;
    if (ptr == NULL)
	return;
    geo = alloc_wfs_geometry (name, type, is_nullable);
    if (ptr->first_geo == NULL)
	ptr->first_geo = geo;
    if (ptr->last_geo != NULL)
	ptr->last_geo->next = geo;
    ptr->last_geo = geo;

}

static struct wfs_srid_def *
alloc_wfs_srid (int srid, const char *srs_name)
{
/* allocating a WFS SRID definition */
    int len;
................................................................................
}

static struct wfs_feature *
create_feature (struct wfs_layer_schema *schema)
{
/* creating an empty WFS feature object */
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;
    struct wfs_feature *feature = malloc (sizeof (struct wfs_feature));
    feature->first = NULL;
    feature->last = NULL;
    feature->first_geo = NULL;
    feature->last_geo = NULL;
    col = schema->first;
    while (col != NULL)
      {
	  struct wfs_attribute *attr = malloc (sizeof (struct wfs_attribute));
	  attr->column = col;
	  attr->value = NULL;
	  attr->next = NULL;
................................................................................
	  if (feature->first == NULL)
	      feature->first = attr;
	  if (feature->last != NULL)
	      feature->last->next = attr;
	  feature->last = attr;
	  col = col->next;
      }
    geo = schema->first_geo;
    while (geo != NULL)
      {
	  struct wfs_geometry *geometry = malloc (sizeof (struct wfs_geometry));
	  geometry->geometry = geo;
	  geometry->geometry_value = NULL;
	  geometry->next = NULL;
	  if (feature->first_geo == NULL)
	      feature->first_geo = geometry;
	  if (feature->last_geo != NULL)
	      feature->last_geo->next = geometry;
	  feature->last_geo = geometry;
	  geo = geo->next;
      }
    return feature;
}

static void
reset_feature (struct wfs_feature *feature)
{
/* resetting a WFS feature object to its initial empty state */
    struct wfs_geometry *geometry;
    struct wfs_attribute *attr = feature->first;
    while (attr != NULL)
      {
	  if (attr->value != NULL)
	      free (attr->value);
	  attr->value = NULL;
	  attr = attr->next;
      }
    geometry = feature->first_geo;
    while (geometry != NULL)
      {
	  if (geometry->geometry_value != NULL)
	      free (geometry->geometry_value);
	  geometry->geometry_value = NULL;
	  geometry = geometry->next;
      }
}

static void
free_feature (struct wfs_feature *feature)
{
/* memory cleanup - freeing a WFS feature object */
    struct wfs_attribute *attr;
    struct wfs_attribute *n_attr;
    struct wfs_geometry *geometry;
    struct wfs_geometry *n_geometry;
    reset_feature (feature);
    attr = feature->first;
    while (attr != NULL)
      {
	  n_attr = attr->next;
	  free (attr);
	  attr = n_attr;
      }
    geometry = feature->first_geo;
    while (geometry != NULL)
      {
	  n_geometry = geometry->next;
	  free (geometry);
	  geometry = n_geometry;
      }
    free (feature);
}

static int
compare_features (struct wfs_feature *f1, struct wfs_feature *f2)
{
/* testing if two WFS features are identical */
    struct wfs_attribute *attr1;
    struct wfs_attribute *attr2;
    int cnt1 = 0;
    int cnt2 = 0;
    struct wfs_geometry *geom1;
    struct wfs_geometry *geom2;
    int cntgeo1 = 0;
    int cntgeo2 = 0;
/* counting how many attributes for each feature */
    attr1 = f1->first;
    while (attr1 != NULL)
      {
	  cnt1++;
	  attr1 = attr1->next;
      }
................................................................................
	  cnt2++;
	  attr2 = attr2->next;
      }
    if (cnt1 != cnt2)
      {
	  /* surely different - mismatching attributes count */
	  return 0;















      }
    attr1 = f1->first;
    attr2 = f2->first;
    while (attr1 != NULL && attr2 != NULL)
      {
	  if (strcmp (attr1->column->name, attr2->column->name) != 0)
	    {
		/* mismatching attribute name */
		return 0;
	    }
	  if (attr1->value == NULL && attr2->value == NULL)
	      ;
	  else if (attr1->value != NULL && attr2->value != NULL)
................................................................................
		      /* mismatching values */
		      return 0;
		  }
	    }
	  else
	    {
		/* mismatching values */
		return 0;
	    }
	  attr1 = attr1->next;
	  attr2 = attr2->next;
      }
/* counting how many geometries for each feature */
    geom1 = f1->first_geo;
    while (geom1 != NULL)
      {
	  cntgeo1++;
	  geom1 = geom1->next;
      }
    geom2 = f2->first_geo;
    while (geom2 != NULL)
      {
	  cntgeo2++;
	  geom2 = geom2->next;
      }
    if (cntgeo1 != cntgeo2)
      {
	  /* surely different - mismatching geometries count */
	  return 0;
      }
    geom1 = f1->first_geo;
    geom2 = f2->first_geo;
    while (geom1 != NULL && geom2 != NULL)
      {
	  if (strcmp
	      (geom1->geometry->geometry_name,
	       geom2->geometry->geometry_name) != 0)
	    {
		/* mismatching geometry name */
		return 0;
	    }
	  if (geom1->geometry_value == NULL && geom2->geometry_value == NULL)
	      ;
	  else if (geom1->geometry_value != NULL
		   && geom2->geometry_value != NULL)
	    {
		if (strcmp (geom1->geometry_value, geom2->geometry_value) != 0)
		  {
		      /* surely different - mismatching geometry values */
		      return 0;
		  }
	    }
	  else
	    {
		/* surely different - mismatching geometries */
		return 0;
	    }
	  geom1 = geom1->next;
	  geom2 = geom2->next;
      }
    return 1;
}

static void
clean_copy (char *dest, const char *orig)
{
/* copying an URI fragment attempting to clean invalid sequences */
................................................................................
	parse_attribute_inner_type (node->children, &type, &is_geom);

    if (name == NULL || (is_geom == 0 && type == SQLITE_NULL)
	|| (is_geom != 0 && type == GAIA_UNKNOWN))
	return;

    if (is_geom)
	add_wfs_geometry (schema, name, type, is_nullable);
    else
	add_wfs_column_to_schema (schema, name, type, is_nullable);
}

static void
parse_wfs_schema (xmlNodePtr node, struct wfs_layer_schema *schema,
		  int *sequence)
................................................................................
	    }
	  goto end;
      }

    schema = alloc_wfs_layer_schema (layer_name, swap_axes);
    root = xmlDocGetRootElement (xml_doc);
    parse_wfs_schema (root, schema, &sequence);
    if (schema->first == NULL && schema->first_geo == NULL)
      {
	  if (err_msg != NULL)
	    {
		const char *msg = "Unable to identify a valid WFS layer schema";
		len = strlen (msg);
		*err_msg = malloc (len + 1);
		strcpy (*err_msg, msg);
................................................................................
  end:
    gaiaOutBufferReset (&errBuf);
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    if (xml_doc != NULL)
	xmlFreeDoc (xml_doc);
    if (schema != NULL)
      {
	  if (schema->first == NULL && schema->first_geo == NULL)
	    {
		/* empty schema */
		free_wfs_layer_schema (schema);
		schema = NULL;
	    }
      }
    return schema;
................................................................................
		  }
	    }
	  node = node->next;
      }
}

static void
set_feature_geom (xmlNodePtr node, struct wfs_geometry_def *geo)
{
/* saving a geometry value */
    gaiaOutBuffer gml;
    gaiaOutBufferInitialize (&gml);

    /* reassembling the GML expression */
    reassemble_gml (node, &gml);
    if (gml.Buffer != NULL)



	geo->geometry_value = gml.Buffer;

}

static void
set_feature_value (xmlNodePtr node, struct wfs_column_def *col)
{
/* saving an attribute value */
    if (node == NULL)
................................................................................
}

static void
check_feature_value (xmlNodePtr node, struct wfs_layer_schema *schema)
{
/* attempting to extract an attribute value */
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;




    col = schema->first;
    while (col != NULL)
      {
	  if (strcmp ((const char *) (node->name), col->name) == 0)
	    {
		set_feature_value (node->children, col);
		return;
	    }
	  col = col->next;
      }
    geo = schema->first_geo;
    while (geo != NULL)
      {
	  if (strcmp ((const char *) (node->name), geo->geometry_name) == 0)
	    {
		set_feature_geom (node->children, geo);
		return;
	    }
	  geo = geo->next;
      }
}

static int
test_effective_geom (struct wfs_geometry_def *geo, int *type, int *cast_type,
		     int *cast_dims)
{
/* testing the effective GeometryType and dims */
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    int mpts = 0;
................................................................................
    int dims_xyz = 0;
    int dims_xym = 0;
    int dims_xyzm = 0;
    int dims = GAIA_XY;
    int i;
    for (i = 0; i < MAX_GTYPES; i++)
      {
	  struct wfs_geom_type *p = geo->types + i;
	  switch (p->type)
	    {
	    case GAIA_POINT:
	    case GAIA_POINTZ:
	    case GAIA_POINTM:
	    case GAIA_POINTZM:
		pts += p->count;
................................................................................
	      check_feature_value (cur_node, schema);
      }
    cnt = count_wfs_values (schema);
    return cnt;
}

static int
check_real_type (struct wfs_geometry_def *geo, int *type, int *cast_type,
		 int *cast_dims)
{
/* attempting to assign a more precise GeometryType */
    int xtype;
    if (test_effective_geom (geo, &xtype, cast_type, cast_dims))
      {
	  *type = xtype;
	  return 1;
      }
    return 0;
}

static void
update_geom_stats (struct wfs_geometry_def *geo, int type)
{
/* updating the type statistics */
    int i;
    if (geo->geometry_type != GAIA_GEOMETRYCOLLECTION)
	return;
    for (i = 0; i < MAX_GTYPES; i++)
      {
	  struct wfs_geom_type *p = geo->types + i;
	  if (p->type == type)
	    {
		p->count += 1;
		return;
	    }
      }
}
................................................................................
do_insert (struct wfs_layer_schema *schema, char **err_msg)
{
/* inserting a row into the target table */
    int ret;
    int ind = 1;
    sqlite3_stmt *stmt = schema->stmt;
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;

    if (stmt == NULL || schema->error)
      {
	  schema->error = 1;
	  return 0;
      }

................................................................................
		else
		    sqlite3_bind_text (stmt, ind, col->pValue,
				       strlen (col->pValue), SQLITE_STATIC);
	    }
	  ind++;
	  col = col->next;
      }


    geo = schema->first_geo;
    while (geo != NULL)
      {
	  /* we have a Geometry column */
	  if (geo->geometry_value != NULL)
	    {
		/* preparing the Geometry value */
		gaiaGeomCollPtr geom =
		    gaiaParseGml ((unsigned char *) (geo->geometry_value),
				  schema->sqlite);
		if (geom == NULL)
		    sqlite3_bind_null (stmt, ind);
		else
		  {
		      unsigned char *blob;
		      int blob_size;
		      int type = gaiaGeometryType (geom);
		      if (type == GAIA_POINT
			  && geo->geometry_type == GAIA_MULTIPOINT)
			{
			    /* promoting to MultiPoint */
			    geom->DeclaredType = GAIA_MULTIPOINT;
			}
		      if (type == GAIA_LINESTRING
			  && geo->geometry_type == GAIA_MULTILINESTRING)
			{
			    /* promoting to MultiLinestring */
			    geom->DeclaredType = GAIA_MULTILINESTRING;
			}
		      if (type == GAIA_POLYGON
			  && geo->geometry_type == GAIA_MULTIPOLYGON)
			{
			    /* promoting to MultiPolygon */
			    geom->DeclaredType = GAIA_MULTIPOLYGON;
			}
		      geom->Srid = geo->srid;
		      if (schema->swap_axes != 0)
			  gaiaSwapCoords (geom);
		      gaiaToSpatiaLiteBlobWkb (geom, &blob, &blob_size);
		      sqlite3_bind_blob (stmt, ind, blob, blob_size, free);
		      gaiaFreeGeomColl (geom);
		      update_geom_stats (geo, type);
		  }
	    }
	  else
	      sqlite3_bind_null (stmt, ind);
	  ind++;
	  geo = geo->next;
      }

/* inserting */
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;
    spatialite_e ("loadwfs INSERT error: <%s>\n",
................................................................................
		  }
		return;
	    }
	  attr = attr->next;
      }
}

static void
save_geometry (struct wfs_feature *feature, struct wfs_geometry_def *geo)
{
/* saving a geometry value */
    struct wfs_geometry *geometry = feature->first_geo;
    while (geometry != NULL)
      {
	  if (geometry->geometry == geo)
	    {
		if (geometry->geometry_value != NULL)
		    free (geometry->geometry_value);
		geometry->geometry_value = NULL;
		if (geo->geometry_value != NULL)
		  {
		      int len = strlen (geo->geometry_value);
		      geometry->geometry_value = malloc (len + 1);
		      strcpy (geometry->geometry_value, geo->geometry_value);
		  }
		return;
	    }
	  geometry = geometry->next;
      }
}

static int
do_save_feature (struct wfs_layer_schema *schema, struct wfs_feature *feature)
{
/* saving the current feature data */
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;

    if (schema->error)
      {
	  schema->error = 1;
	  return 0;
      }

................................................................................
    reset_feature (feature);
    col = schema->first;
    while (col != NULL)
      {
	  save_attribute (feature, col);
	  col = col->next;
      }
    geo = schema->first_geo;
    while (geo != NULL)
      {

	  save_geometry (feature, geo);
	  geo = geo->next;





      }
    return 1;
}

static void
parse_wfs_features (xmlNodePtr node, struct wfs_layer_schema *schema, int *rows,
		    char **err_msg)
................................................................................
					    rows);
	    }
      }
}

static int
sniff_feature_value (xmlNodePtr node, struct wfs_layer_schema *schema,
		     xmlNodePtr * geom, char **geometry_name)
{
/* sniffing attribute values */
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;




    col = schema->first;
    while (col != NULL)
      {
	  if (strcmp ((const char *) (node->name), col->name) == 0)
	      return 1;
	  col = col->next;
      }
    geo = schema->first_geo;
    while (geo != NULL)
      {
	  if (strcmp ((const char *) (node->name), geo->geometry_name) == 0)
	    {
		*geom = node->children;
		*geometry_name = geo->geometry_name;
		return 1;
	    }
	  geo = geo->next;
      }
    return 0;
}

static int
parse_srsname (xmlNodePtr node)
{
/* parsing the srsName string */
................................................................................
	  if (node->type == XML_TEXT_NODE)
	      return atoi ((const char *) (node->content));
      }
    return 2;
}

static void
sniff_gml_geometry (const char *geometry_name, xmlNodePtr node,
		    struct wfs_layer_schema *schema)
{
/* attempting to identify the Srid and dimension from a GML geometry */
    struct wfs_geometry_def *p_geo = NULL;
    struct wfs_geometry_def *geo;
    xmlNodePtr cur_node = NULL;
    if (node == NULL)
	return;
    geo = schema->first_geo;
    while (geo != NULL)
      {
	  if (strcmp (geometry_name, geo->geometry_name) == 0)
	    {
		p_geo = geo;
		break;
	    }
	  geo = geo->next;
      }
    if (p_geo == NULL)
	return;
    for (cur_node = node; cur_node; cur_node = cur_node->next)
      {
	  if (cur_node->type == XML_ELEMENT_NODE)
	    {
		struct _xmlAttr *attr;
		attr = cur_node->properties;
		while (attr != NULL)
		  {
		      if (attr->name != NULL)
			{
			    if (strcmp ((const char *) (attr->name), "srsName")
				== 0)
				p_geo->srid = parse_srsname (attr->children);
			    if (strcmp
				((const char *) (attr->name), "dimension") == 0
				|| strcmp ((const char *) (attr->name),
					   "srsDimension") == 0)
				p_geo->dims = parse_dimension (attr->children);
			}
		      attr = attr->next;
		  }
		sniff_gml_geometry (geometry_name, cur_node->children, schema);
	    }
      }
}

static int
sniff_wfs_single_feature (xmlNodePtr node, struct wfs_layer_schema *schema)
{
/* attempting to sniff data corresponding to a single feature */
    xmlNodePtr cur_node = NULL;
    int cnt = 0;


    reset_wfs_values (schema);
    for (cur_node = node; cur_node; cur_node = cur_node->next)
      {
	  xmlNodePtr geom = NULL;
	  char *geometry_name = NULL;
	  if (cur_node->type == XML_ELEMENT_NODE)
	      cnt +=
		  sniff_feature_value (cur_node, schema, &geom, &geometry_name);
	  if (geom != NULL && geometry_name != NULL)
	      sniff_gml_geometry (geometry_name, geom, schema);
      }
    if (cnt > 0)


	return 1;

    return 0;
}

static void
sniff_geometries (xmlNodePtr node, struct wfs_layer_schema *schema,
		  int *sniffed)
{
................................................................................
    int len;
    int ret;
    char *errMsg = NULL;
    gaiaOutBuffer sql;
    char *sql2;
    char *quoted;
    struct wfs_column_def *col;
    struct wfs_geometry_def *geo;
    char auto_pk_name[1024];
    int is_auto_pk = 0;
    int comma = 0;
    sqlite3_stmt *stmt = NULL;

/* attempting to create the SQL Table */
    gaiaOutBufferInitialize (&sql);
................................................................................
	  len = strlen (errMsg);
	  *err_msg = malloc (len + 1);
	  strcpy (*err_msg, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    geo = schema->first_geo;
    while (geo != NULL)
      {
	  /* creating a Geometry column */
	  const char *gType = "GEOMETRY";
	  const char *gDims = "XY";
	  switch (geo->geometry_type)
	    {
	    case GAIA_POINT:
		gType = "POINT";
		break;
	    case GAIA_LINESTRING:
		gType = "LINESTRING";
		break;
................................................................................
	    case GAIA_MULTILINESTRING:
		gType = "MULTILINESTRING";
		break;
	    case GAIA_MULTIPOLYGON:
		gType = "MULTIPOLYGON";
		break;
	    };
	  if (geo->dims == 3)
	      gDims = "XYZ";
	  sql2 =
	      sqlite3_mprintf ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)",
			       table, geo->geometry_name, geo->srid,
			       gType, gDims);
	  gaiaAppendToOutBuffer (&sql, sql2);
	  sqlite3_free (sql2);
	  ret = sqlite3_exec (sqlite, sql.Buffer, NULL, NULL, &errMsg);
	  gaiaOutBufferReset (&sql);
	  if (ret != SQLITE_OK)
	    {
................................................................................
		strcpy (*err_msg, errMsg);
		return 0;
	    }
	  if (spatial_index)
	    {
		/* creating the Spatial Index */
		sql2 = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, %Q)",
					table, geo->geometry_name);
		gaiaAppendToOutBuffer (&sql, sql2);
		sqlite3_free (sql2);
		ret = sqlite3_exec (sqlite, sql.Buffer, NULL, NULL, &errMsg);
		gaiaOutBufferReset (&sql);
		if (ret != SQLITE_OK)
		  {
		      spatialite_e ("loadwfs: CreateSpatialIndex error: %s\n",
................................................................................
			}
		      len = strlen (errMsg);
		      *err_msg = malloc (len + 1);
		      strcpy (*err_msg, errMsg);
		      return 0;
		  }
	    }
	  geo = geo->next;
      }

/* creating the INSERT statement */
    quoted = gaiaDoubleQuotedSql (table);
    sql2 = sqlite3_mprintf ("INSERT INTO \"%s\" (\n", quoted);
    free (quoted);
    gaiaAppendToOutBuffer (&sql, sql2);
................................................................................
	  sqlite3_free (sql2);
      }
    col = schema->first;
    while (col != NULL)
      {
	  /* column names */
	  quoted = gaiaDoubleQuotedSql (col->name);
	  if (col == schema->last && schema->first_geo == NULL)
	      sql2 = sqlite3_mprintf ("\"%s\") VALUES (", quoted);
	  else
	      sql2 = sqlite3_mprintf ("\"%s\", ", quoted);
	  free (quoted);
	  gaiaAppendToOutBuffer (&sql, sql2);
	  sqlite3_free (sql2);
	  col = col->next;
      }
    geo = schema->first_geo;
    while (geo != NULL)
      {
	  /* geometry column names */
	  quoted = gaiaDoubleQuotedSql (geo->geometry_name);
	  if (geo == schema->last_geo)
	      sql2 = sqlite3_mprintf ("\"%s\") VALUES (", quoted);
	  else
	      sql2 = sqlite3_mprintf ("\"%s\", ", quoted);
	  free (quoted);
	  gaiaAppendToOutBuffer (&sql, sql2);
	  sqlite3_free (sql2);
	  geo = geo->next;
      }
    if (is_auto_pk)
      {
	  /* there is an AUTOINCREMENT PK */
	  gaiaAppendToOutBuffer (&sql, "NULL, ");
      }
    col = schema->first;
    while (col != NULL)
      {
	  if (col == schema->last && schema->first_geo == NULL)
	      gaiaAppendToOutBuffer (&sql, "?)");
	  else
	      gaiaAppendToOutBuffer (&sql, "?, ");
	  col = col->next;
      }
    geo = schema->first_geo;
    while (geo != NULL)
      {
	  if (geo == schema->last_geo)
	      gaiaAppendToOutBuffer (&sql, "?)");
	  else
	      gaiaAppendToOutBuffer (&sql, "?, ");
	  geo = geo->next;
      }
    ret =
	sqlite3_prepare_v2 (sqlite, sql.Buffer, strlen (sql.Buffer), &stmt,
			    NULL);
    gaiaOutBufferReset (&sql);
    if (ret != SQLITE_OK)
      {
	  errMsg = (char *) sqlite3_errmsg (sqlite);
................................................................................
				progress_callback, callback_ptr);
}

static int
test_wfs_paging (const char *path_or_url, int page_size, xmlNodePtr node,
		 struct wfs_layer_schema *schema, int *shift_index)
{
/* 
 * testing if the server does actually support STARTINDEX
 * 
 * startIndex/count is a standard capability introduced by WFS 2.0 
 * anyway MapServer and Geoserver WFS 1.x supported a non-standard
 * startIndex/maxFeature; unhappily the two implementations
 * differed in a very critical aspect:
 * - the first feature has index=0 on GeoSever
 * - but has index=1 on MapServer
 * 
 * so we must now guess if and how this capability could
 * be effectively supported by the current WFS server
 * 
 */
    xmlDocPtr xml_doc = NULL;
    xmlNodePtr root;
    char *page_url;
    int nRows = 0;
    struct wfs_feature *feature_1 = create_feature (schema);
    struct wfs_feature *feature_2 = create_feature (schema);
    *shift_index = 0;
................................................................................
do_adjust_geoms (sqlite3 * sqlite, const char *table, const char *geometry,
		 int type, int cast_type, int cast_dims)
{
/* final adjustement for GeometryType and dims */
    char *errMsg = NULL;
    char *xtable;
    char *xgeom;
    char *xopen = "";
    char *xclose = "";
    char *sql;
    int ret;
    int dims = -1;
    int metadata_version = checkSpatialMetaData (sqlite);

/* starting a transaction */
    if (sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg) != SQLITE_OK)
      {
	  spatialite_e ("loadwfs: BEGIN error:\"%s\"\n", errMsg);
	  sqlite3_free (errMsg);
................................................................................
	    }
      }

/* adjusting GeometryColumns */
    if (metadata_version == 1)
      {
	  /* legacy metadata style <= v.3.1.0 */
	  const char *pType = "";
	  const char *pDims = "";
	  switch (type)
	    {
	    case GAIA_POINT:
	    case GAIA_POINTZ:
	    case GAIA_POINTM:
	    case GAIA_POINTZM:
		pType = "POINT";
................................................................................
		nType = 4;
		break;
	    case GAIA_MULTIPOINTZ:
		nType = 1004;
		break;
	    case GAIA_MULTIPOINTM:
		nType = 2004;
		break;
	    case GAIA_MULTIPOINTZM:
		nType = 3004;
		break;
	    case GAIA_MULTILINESTRING:
		nType = 5;
		break;
	    case GAIA_MULTILINESTRINGZ:
		nType = 1005;
		break;
	    case GAIA_MULTILINESTRINGM:
		nType = 2005;
		break;
	    case GAIA_MULTILINESTRINGZM:
		nType = 3005;
		break;
	    case GAIA_MULTIPOLYGON:
		nType = 6;
		break;
	    case GAIA_MULTIPOLYGONZ:
................................................................................
		     const char *alt_describe_uri, const char *layer_name,
		     int swap_axes, const char *table,
		     const char *pk_column_name, int spatial_index,
		     int page_size, int *rows, char **err_msg,
		     void (*progress_callback) (int, void *),
		     void *callback_ptr)
{
/* attempting to load data from some WFS source [paged]*/
    return load_from_wfs_paged_ex (sqlite, "1.1.0", path_or_url,
				   alt_describe_uri, layer_name, swap_axes,
				   table, pk_column_name, spatial_index,
				   page_size, rows, err_msg, progress_callback,
				   callback_ptr);
}

SPATIALITE_DECLARE int
load_from_wfs_paged_ex (sqlite3 * sqlite, const char *wfs_version,
			const char *path_or_url, const char *alt_describe_uri,
			const char *layer_name, int swap_axes,
			const char *table, const char *pk_column_name,
			int spatial_index, int page_size, int *rows,
			char **err_msg, void (*progress_callback) (int, void *),
			void *callback_ptr)
{
/* attempting to load data from some WFS source [paged]*/
    xmlDocPtr xml_doc = NULL;
    xmlNodePtr root;
    struct wfs_layer_schema *schema = NULL;
    struct wfs_geometry_def *geo;
    int len;
    int ret;
    char *describe_uri = NULL;
    gaiaOutBuffer errBuf;
    int ok = 0;
    int sniffed = 0;
    int pageNo = 0;
    int startIdx = 0;
    int nRows;
    char *page_url = NULL;
    const char *p_page_url;
    int shift_index = 0;
    int retry;
    xmlGenericErrorFunc parsingError = (xmlGenericErrorFunc) wfsParsingError;
    *rows = 0;
    if (err_msg != NULL)
	*err_msg = NULL;
    if (path_or_url == NULL)
	return 0;

    while (1)
      {
	  if (page_size <= 0)
	      p_page_url = path_or_url;
	  else
	    {
		const char *max;
		if (strcmp (wfs_version, "1.0.0") == 0
		    || strcmp (wfs_version, "1.1.0") == 0)
		    max = "maxFeatures";
		else
		    max = "count";
		page_url =
		    sqlite3_mprintf ("%s&%s=%d&startIndex=%d",
				     path_or_url, max, page_size, startIdx);
		p_page_url = page_url;
	    }

	  /* loading the WFS payload from URL (or file) */
	  gaiaOutBufferInitialize (&errBuf);
	  xmlSetGenericErrorFunc (&errBuf, parsingError);

	  retry = 0;
	  while (1)
	    {
		/* retry loop */
		xml_doc = xmlReadFile (p_page_url, NULL, 0);
		if (xml_doc != NULL)
		    break;
		retry++;
		if (retry > 5)
		    break;
		sqlite3_sleep (10000 * retry);
	    }

	  if (page_url != NULL)
	      sqlite3_free (page_url);
	  if (xml_doc == NULL)
	    {
		/* parsing error; not a well-formed XML */
		if (errBuf.Buffer != NULL && err_msg != NULL)
		  {
................................................................................
		goto end;
	    }

	  if (pageNo == 0)
	    {
		if (alt_describe_uri != NULL)
		  {
		      /* using the DescribeFeatureType URI from GetCapabilities */
		      len = strlen (alt_describe_uri);
		      describe_uri = malloc (len + 1);
		      strcpy (describe_uri, alt_describe_uri);
		      ret = 1;
		  }
		else
		  {
................................................................................
		/* creating the output table */
		root = xmlDocGetRootElement (xml_doc);
		sniffed = 0;
		sniff_geometries (root, schema, &sniffed);

		if (page_size > 0)
		  {
		      if (strcmp (wfs_version, "1.0.0") == 0
			  || strcmp (wfs_version, "1.1.0") == 0)
			{
			    /* 
			     * testing if the server does actually support STARTINDEX
			     * 
			     * startIndex/count is a standard capability introduced by WFS 2.0 
			     * anyway MapServer and Geoserver WFS 1.x supported a non-standard
			     * startIndex/maxFeature; unhappily the two implementations
			     * differed in a very critical aspect:
			     * - the first feature has index=0 on GeoSever
			     * - but has index=1 on MapServer
			     * 
			     * so we must now guess if and how this capability could
			     * be effectively supported by the current WFS server
			     * 
			     */
			    root = xmlDocGetRootElement (xml_doc);
			    if (!test_wfs_paging
				(path_or_url, page_size, root, schema,
				 &shift_index))
			      {
				  const char *err =
				      "loawfs: the WFS server doesn't seem to support STARTINDEX\n"
				      "and consequently WFS paging is not available";
				  if (err_msg != NULL)
				    {
					len = strlen (err);
					*err_msg = malloc (len + 1);
					strcpy (*err_msg, err);
				    }
				  goto end;
			      }
			}
		      startIdx += shift_index;
		  }

		if (!prepare_sql
		    (sqlite, schema, table, pk_column_name, spatial_index,
		     err_msg))
................................................................................
	  if (xml_doc != NULL)
	      xmlFreeDoc (xml_doc);
	  xml_doc = NULL;
	  pageNo++;
	  startIdx += nRows;
      }

    geo = schema->first_geo;
    while (geo != NULL)
      {
	  if (geo->geometry_type == GAIA_GEOMETRYCOLLECTION)
	    {
		/* attempting to set a more precise GeometryType */
		int type;
		int cast_type;
		int cast_dims;
		if (check_real_type (geo, &type, &cast_type, &cast_dims))
		  {
		      do_adjust_geoms (sqlite, table, geo->geometry_name, type,
				       cast_type, cast_dims);
		  }
	    }
	  geo = geo->next;
      }
    ok = 1;
  end:
    if (schema != NULL)
	free_wfs_layer_schema (schema);
    if (describe_uri != NULL)
	free (describe_uri);
................................................................................
{
/* creating the request URL */
    char *url;
    char *url2;
    const char *srs_name = NULL;
    int len;
    const char *ver = "1.1.0";
    const char *type = NULL;
    const char *max = NULL;
    if (ptr->request_url == NULL)
	return NULL;
    if (version != NULL)
      {
	  if (strcmp (version, "1.0.0") == 0)
	      ver = "1.0.0";
	  if (strcmp (version, "2.0.0") == 0)
	      ver = "2.0.0";
	  if (strcmp (version, "2.0.2") == 0)
	      ver = "2.0.2";
      }
    if (strcmp (ver, "1.0.0") == 0 || strcmp (ver, "1.1.0") == 0)
      {
	  type = "typeName";
	  max = "maxFeatures";	/* non-stadard: only on GeoServer and MapServer */
      }
    else
      {
	  type = "typeNames";	/* name has changed since 2.0.0 */
	  max = "count";	/* standard since 2.0.0 */
      }
    if (srid > 0)
      {
	  struct wfs_srid_def *srs = lyr->first_srid;
	  while (srs != NULL)
	    {
		if (srs->srid == srid)
		  {
................................................................................
	    }
      }
    if (max_features <= 0)
      {
	  if (srs_name == NULL)
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&%s=%s",
		   ptr->request_url, ver, type, lyr->name);
	  else
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&%s=%s&srsName=%s",
		   ptr->request_url, ver, type, lyr->name, srs_name);
      }
    else
      {
	  if (srs_name == NULL)
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&%s=%s&%s=%d",
		   ptr->request_url, ver, type, lyr->name, max, max_features);
	  else
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&%s=%s&srsName=%s&%s=%d",
		   ptr->request_url, ver, type, lyr->name, srs_name, max,
		   max_features);
      }
    len = strlen (url);
    url2 = malloc (len + 1);
    strcpy (url2, url);
    sqlite3_free (url);
    return url2;
}
................................................................................
}

SPATIALITE_DECLARE int
get_wfs_schema_geometry_info (gaiaWFSschemaPtr handle, const char **name,
			      int *type, int *srid, int *dims, int *nullable)
{
/* Return the infos describing a WFS-GeometryColumn object */
    int ok = 0;
    struct wfs_geometry_def *geo;
    struct wfs_layer_schema *ptr = (struct wfs_layer_schema *) handle;
    if (ptr == NULL)
	return 0;
    geo = ptr->first_geo;
    while (geo != NULL)
      {


	  *name = geo->geometry_name;
	  *type = geo->geometry_type;
	  *srid = geo->srid;
	  *dims = geo->dims;
	  *nullable = geo->is_nullable;
	  ok = 1;
	  geo = geo->next;
      }
    if (ok)
	return 1;
    return 0;
}

SPATIALITE_DECLARE int
get_wfs_schema_column_info (gaiaWFScolumnPtr handle, const char **name,
			    int *type, int *nullable)
{
/* Return the infos describing a WFS-Column object */
................................................................................
		     const char *alt_describe_uri, const char *layer_name,
		     int swap_axes, const char *table,
		     const char *pk_column_name, int spatial_index,
		     int page_size, int *rows, char **err_msg,
		     void (*progress_callback) (int, void *),
		     void *callback_ptr)
{
/* LIBXML2 isn't enabled: always returning an error */
    return load_from_wfs_paged_ex (sqlite, "1.1.0", path_or_url,
				   alt_describe_uri, layer_name, swap_axes,
				   table, pk_column_name, spatial_index,
				   page_size, rows, err_msg, progress_callback,
				   callback_ptr);
}

SPATIALITE_DECLARE int
load_from_wfs_paged_ex (sqlite3 * sqlite, const char *wfs_version,
			const char *path_or_url, const char *alt_describe_uri,
			const char *layer_name, int swap_axes,
			const char *table, const char *pk_column_name,
			int spatial_index, int page_size, int *rows,
			char **err_msg, void (*progress_callback) (int, void *),
			void *callback_ptr)
{
/* LIBXML2 isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LIBXML2\n"
	"and is thus unable to support LOADWFS";

/* silencing stupid compiler warnings */
    if (sqlite == NULL || wfs_version == NULL || path_or_url == NULL
	|| layer_name == NULL || alt_describe_uri == NULL || swap_axes == 0
	|| table == NULL || pk_column_name == NULL || spatial_index == 0
	|| page_size == 0 || rows == NULL || progress_callback == NULL
	|| progress_callback == NULL || callback_ptr == NULL)
	path_or_url = NULL;

    if (err_msg == NULL)
	return 0;
    len = strlen (msg);
    *err_msg = malloc (len + 1);




|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<








|
>
>
>
>
|
>












<
<
<
<
<
<
<
<





|
<







 







|
|

|

|
>
>
|
|
>
>
>
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










<
<











|
>
|
<
|
|
|
<










<








<
<
<
|
|
|
|
<
<









<









<
<
<
|
|
<
<







 







|


|
|


|
|
|
|
|
|
>







 







<



|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<







<








<
<
<
|
|
|
<
<








<
<








<
<
<
<
<
<
<











<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





|







 







<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







|







 







|

|






>
>
>
|
>







 







|
>
>
>
>










<
<
<
<
<
<
<
<
<
<



|







 







|







 







|




|








|



|



|







 







<







 







>
|
<
<
<

|



|









|





|





|




|





|




<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<







 







|
<

>
|
<
>
>
>
>
>







 







|



|
>
>
>
>







<
<
<
<
<
<
<
<
<
<
<







 







<
|


<
<



<
<
<
<
<
<
<
<
<
<
<
<












|

|
<
<
|



|










>




<
<

<
|
<
<

|
>
>
|
>







 







<







 







|
<

|


|







 







|



|







 







|







 







<







 







|








|
<

|
|
<
|
<
<



<









|





|
<
<
<
|
<
<
<
<







 







<
|
<
<
<
<
<
<
<
<
<
<
<
<







 







|
|


|







 







|
|







 







<











<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




<











|
<













<
<
<
<
<
<

|
|






<
<
<
<
<
|
<
<
<
<
<
<
<
<







 







|







 







<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
<







 







<
<
<
|
|
|
|
|
|
|
|
|
|
|
<
<







 







<
<











<
<
<
<
<
<
<
<
<
<







 







|
|



|
|






|
|



|
|
<







 







<
<



<
<
<
>
>
|
|
|
|
|
<
<
<
<
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|
|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
..
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
139
140
141
142
143
144
145













146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172








173
174
175
176
177
178

179
180
181
182
183
184
185
...
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222

223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282


































283
284
285
286
287
288
289
290
291
292


293
294
295
296
297
298
299
300
301
302
303
304
305
306

307
308
309

310
311
312
313
314
315
316
317
318
319

320
321
322
323
324
325
326
327



328
329
330
331


332
333
334
335
336
337
338
339
340

341
342
343
344
345
346
347
348
349



350
351


352
353
354
355
356
357
358
...
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
...
535
536
537
538
539
540
541

542
543
544
545

546
547
548
549
550
551
552
...
553
554
555
556
557
558
559














560
561
562
563
564
565
566

567
568
569
570
571
572
573
574



575
576
577


578
579
580
581
582
583
584
585


586
587
588
589
590
591
592
593







594
595
596
597
598
599
600
601
602
603
604




605
606
607
608
609
610
611
...
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
...
653
654
655
656
657
658
659

660
661
662
663
















































664
665
666
667
668
669
670
....
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
....
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
....
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
....
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
....
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400










1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
....
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
....
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
....
1685
1686
1687
1688
1689
1690
1691

1692
1693
1694
1695
1696
1697
1698
....
1719
1720
1721
1722
1723
1724
1725
1726
1727



1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770


1771
1772
1773
1774
1775
1776
1777
....
1812
1813
1814
1815
1816
1817
1818
























1819
1820
1821
1822
1823

1824
1825
1826
1827
1828
1829
1830
....
1831
1832
1833
1834
1835
1836
1837
1838

1839
1840
1841

1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
....
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934











1935
1936
1937
1938
1939
1940
1941
....
1974
1975
1976
1977
1978
1979
1980

1981
1982
1983


1984
1985
1986












1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001


2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021


2022

2023


2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
....
2108
2109
2110
2111
2112
2113
2114

2115
2116
2117
2118
2119
2120
2121
....
2220
2221
2222
2223
2224
2225
2226
2227

2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
....
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
....
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
....
2295
2296
2297
2298
2299
2300
2301

2302
2303
2304
2305
2306
2307
2308
....
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333

2334
2335
2336

2337


2338
2339
2340

2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356



2357




2358
2359
2360
2361
2362
2363
2364
....
2456
2457
2458
2459
2460
2461
2462

2463












2464
2465
2466
2467
2468
2469
2470
....
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
....
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
....
3107
3108
3109
3110
3111
3112
3113

3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124

3125
3126
3127
3128
3129
3130
3131
....
3191
3192
3193
3194
3195
3196
3197

















3198
3199
3200
3201

3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213

3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226






3227
3228
3229
3230
3231
3232
3233
3234
3235





3236








3237
3238
3239
3240
3241
3242
3243
....
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
....
3287
3288
3289
3290
3291
3292
3293




3294












3295
3296
3297

3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308

3309
3310
3311
3312
3313
3314
3315
....
3353
3354
3355
3356
3357
3358
3359



3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370


3371
3372
3373
3374
3375
3376
3377
....
4110
4111
4112
4113
4114
4115
4116


4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127










4128
4129
4130
4131
4132
4133
4134
....
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166

4167
4168
4169
4170
4171
4172
4173
....
4307
4308
4309
4310
4311
4312
4313


4314
4315
4316



4317
4318
4319
4320
4321
4322
4323




4324

4325
4326
4327
4328
4329
4330
4331
....
4366
4367
4368
4369
4370
4371
4372

















4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
/*

 wfs_in.c -- implements WFS support [import]

 version 4.2, 2014 July 25

 Author: Sandro Furieri a.furieri@lqt.it

 -----------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
................................................................................
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2008-2013
the Initial Developer. All Rights Reserved.

Contributor(s): 

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
................................................................................
struct wfs_geom_type
{
/* Geometry Type statistics */
    int type;
    int count;
};














struct wfs_layer_schema
{
/* a WFS table / layer schema */
    int error;
    int swap_axes;
    char *layer_name;
    struct wfs_column_def *first;
    struct wfs_column_def *last;
    char *geometry_name;
    int geometry_type;
    int srid;
    int dims;
    int is_nullable;
    struct wfs_geom_type *types;
    char *geometry_value;
    sqlite3_stmt *stmt;
    sqlite3 *sqlite;
};

struct wfs_attribute
{
/* a WFS attribute value */
    struct wfs_column_def *column;
    char *value;
    struct wfs_attribute *next;
};









struct wfs_feature
{
/* a WFS feature */
    struct wfs_attribute *first;
    struct wfs_attribute *last;
    char *geometry_value;

};

static struct wfs_column_def *
alloc_wfs_column (const char *name, int type, int is_nullable)
{
/* allocating a WFS attribute / column definition */
    int len;
................................................................................
    if (col == NULL)
	return;
    if (col->name != NULL)
	free (col->name);
    free (col);
}

static struct wfs_layer_schema *
alloc_wfs_layer_schema (const char *layer_name, int swap_axes)
{
/* allocating an empty WFS schema descriptor */
    int len;
    struct wfs_layer_schema *ptr = malloc (sizeof (struct wfs_layer_schema));
    ptr->error = 0;
    ptr->swap_axes = swap_axes;
    len = strlen (layer_name);
    ptr->layer_name = malloc (len + 1);
    strcpy (ptr->layer_name, layer_name);
    ptr->first = NULL;
    ptr->last = NULL;
    ptr->geometry_name = NULL;
    ptr->geometry_type = GAIA_UNKNOWN;

    ptr->srid = -1;
    ptr->dims = 2;
    ptr->types = malloc (sizeof (struct wfs_geom_type) * MAX_GTYPES);
    ptr->types[0].type = GAIA_POINT;
    ptr->types[0].count = 0;
    ptr->types[1].type = GAIA_LINESTRING;
    ptr->types[1].count = 0;
    ptr->types[2].type = GAIA_POLYGON;
    ptr->types[2].count = 0;
    ptr->types[3].type = GAIA_MULTIPOINT;
    ptr->types[3].count = 0;
    ptr->types[4].type = GAIA_MULTILINESTRING;
    ptr->types[4].count = 0;
    ptr->types[5].type = GAIA_MULTIPOLYGON;
    ptr->types[5].count = 0;
    ptr->types[6].type = GAIA_GEOMETRYCOLLECTION;
    ptr->types[6].count = 0;
    ptr->types[7].type = GAIA_POINTZ;
    ptr->types[7].count = 0;
    ptr->types[8].type = GAIA_LINESTRINGZ;
    ptr->types[8].count = 0;
    ptr->types[9].type = GAIA_POLYGONZ;
    ptr->types[9].count = 0;
    ptr->types[10].type = GAIA_MULTIPOINTZ;
    ptr->types[10].count = 0;
    ptr->types[11].type = GAIA_MULTILINESTRINGZ;
    ptr->types[11].count = 0;
    ptr->types[12].type = GAIA_MULTIPOLYGONZ;
    ptr->types[12].count = 0;
    ptr->types[13].type = GAIA_GEOMETRYCOLLECTIONZ;
    ptr->types[13].count = 0;
    ptr->types[14].type = GAIA_POINTM;
    ptr->types[14].count = 0;
    ptr->types[15].type = GAIA_LINESTRINGM;
    ptr->types[15].count = 0;
    ptr->types[16].type = GAIA_POLYGONM;
    ptr->types[16].count = 0;
    ptr->types[17].type = GAIA_MULTIPOINTM;
    ptr->types[17].count = 0;
    ptr->types[18].type = GAIA_MULTILINESTRINGM;
    ptr->types[18].count = 0;
    ptr->types[19].type = GAIA_MULTIPOLYGONM;
    ptr->types[19].count = 0;
    ptr->types[20].type = GAIA_GEOMETRYCOLLECTIONM;
    ptr->types[20].count = 0;
    ptr->types[21].type = GAIA_POINTZM;
    ptr->types[21].count = 0;
    ptr->types[22].type = GAIA_LINESTRINGZM;
    ptr->types[22].count = 0;
    ptr->types[23].type = GAIA_POLYGONZM;
    ptr->types[23].count = 0;
    ptr->types[24].type = GAIA_MULTIPOINTZM;
    ptr->types[24].count = 0;
    ptr->types[25].type = GAIA_MULTILINESTRINGZM;
    ptr->types[25].count = 0;
    ptr->types[26].type = GAIA_MULTIPOLYGONZM;
    ptr->types[26].count = 0;
    ptr->types[27].type = GAIA_GEOMETRYCOLLECTIONZM;
    ptr->types[27].count = 0;
    ptr->geometry_value = NULL;


































    ptr->stmt = NULL;
    return ptr;
}

static void
free_wfs_layer_schema (struct wfs_layer_schema *ptr)
{
/* memory cleanup: destroying a WFS schema */
    struct wfs_column_def *col;
    struct wfs_column_def *n_col;


    if (ptr == NULL)
	return;
    if (ptr->layer_name != NULL)
	free (ptr->layer_name);
    col = ptr->first;
    while (col != NULL)
      {
	  n_col = col->next;
	  free_wfs_column (col);
	  col = n_col;
      }
    if (ptr->geometry_name != NULL)
	free (ptr->geometry_name);
    if (ptr->types != NULL)

	free (ptr->types);
    if (ptr->geometry_value != NULL)
	free (ptr->geometry_value);

    if (ptr->stmt != NULL)
	sqlite3_finalize (ptr->stmt);
    free (ptr);
}

static void
reset_wfs_values (struct wfs_layer_schema *ptr)
{
/* memory cleanup: resetting attribute values */
    struct wfs_column_def *col;

    if (ptr == NULL)
	return;
    col = ptr->first;
    while (col != NULL)
      {
	  col->pValue = NULL;
	  col = col->next;
      }



    if (ptr->geometry_value != NULL)
      {
	  free (ptr->geometry_value);
	  ptr->geometry_value = NULL;


      }
}

static int
count_wfs_values (struct wfs_layer_schema *ptr)
{
/* counting how many valid values  */
    int count = 0;
    struct wfs_column_def *col;

    if (ptr == NULL)
	return 0;
    col = ptr->first;
    while (col != NULL)
      {
	  if (col->pValue != NULL)
	      count++;
	  col = col->next;
      }



    if (ptr->geometry_value != NULL)
	count++;


    return count;
}

static void
add_wfs_column_to_schema (struct wfs_layer_schema *ptr, const char *name,
			  int type, int is_nullable)
{
................................................................................
	ptr->first = col;
    if (ptr->last != NULL)
	ptr->last->next = col;
    ptr->last = col;
}

static void
set_wfs_geometry (struct wfs_layer_schema *ptr, const char *name, int type,
		  int is_nullable)
{
/* setting the Geometry for a WFS schema */
    int len;
    if (ptr == NULL)
	return;
    if (ptr->geometry_name != NULL)
	free (ptr->geometry_name);
    len = strlen (name);
    ptr->geometry_name = malloc (len + 1);
    strcpy (ptr->geometry_name, name);
    ptr->geometry_type = type;
    ptr->is_nullable = is_nullable;
}

static struct wfs_srid_def *
alloc_wfs_srid (int srid, const char *srs_name)
{
/* allocating a WFS SRID definition */
    int len;
................................................................................
}

static struct wfs_feature *
create_feature (struct wfs_layer_schema *schema)
{
/* creating an empty WFS feature object */
    struct wfs_column_def *col;

    struct wfs_feature *feature = malloc (sizeof (struct wfs_feature));
    feature->first = NULL;
    feature->last = NULL;
    feature->geometry_value = NULL;

    col = schema->first;
    while (col != NULL)
      {
	  struct wfs_attribute *attr = malloc (sizeof (struct wfs_attribute));
	  attr->column = col;
	  attr->value = NULL;
	  attr->next = NULL;
................................................................................
	  if (feature->first == NULL)
	      feature->first = attr;
	  if (feature->last != NULL)
	      feature->last->next = attr;
	  feature->last = attr;
	  col = col->next;
      }














    return feature;
}

static void
reset_feature (struct wfs_feature *feature)
{
/* resetting a WFS feature object to its initial empty state */

    struct wfs_attribute *attr = feature->first;
    while (attr != NULL)
      {
	  if (attr->value != NULL)
	      free (attr->value);
	  attr->value = NULL;
	  attr = attr->next;
      }



    if (feature->geometry_value != NULL)
	free (feature->geometry_value);
    feature->geometry_value = NULL;


}

static void
free_feature (struct wfs_feature *feature)
{
/* memory cleanup - freeing a WFS feature object */
    struct wfs_attribute *attr;
    struct wfs_attribute *n_attr;


    reset_feature (feature);
    attr = feature->first;
    while (attr != NULL)
      {
	  n_attr = attr->next;
	  free (attr);
	  attr = n_attr;
      }







    free (feature);
}

static int
compare_features (struct wfs_feature *f1, struct wfs_feature *f2)
{
/* testing if two WFS features are identical */
    struct wfs_attribute *attr1;
    struct wfs_attribute *attr2;
    int cnt1 = 0;
    int cnt2 = 0;




/* counting how many attributes for each feature */
    attr1 = f1->first;
    while (attr1 != NULL)
      {
	  cnt1++;
	  attr1 = attr1->next;
      }
................................................................................
	  cnt2++;
	  attr2 = attr2->next;
      }
    if (cnt1 != cnt2)
      {
	  /* surely different - mismatching attributes count */
	  return 0;
      }
    if (f1->geometry_value == NULL && f2->geometry_value == NULL)
	;
    else if (f1->geometry_value != NULL && f2->geometry_value != NULL)
      {
	  if (strcmp (f1->geometry_value, f2->geometry_value) != 0)
	    {
		/* surely different - mismatching geometry values */
		return 0;
	    }
      }
    else
      {
	  /* surely different - mismatching geometries */
	  return 0;
      }
    attr1 = f1->first;
    attr2 = f2->first;
    while (attr1 != NULL && attr2 != NULL)
      {
	  if (strcmp (attr1->column->name, attr1->column->name) != 0)
	    {
		/* mismatching attribute name */
		return 0;
	    }
	  if (attr1->value == NULL && attr2->value == NULL)
	      ;
	  else if (attr1->value != NULL && attr2->value != NULL)
................................................................................
		      /* mismatching values */
		      return 0;
		  }
	    }
	  else
	    {
		/* mismatching values */

	    }
	  attr1 = attr1->next;
	  attr2 = attr2->next;
      }
















































    return 1;
}

static void
clean_copy (char *dest, const char *orig)
{
/* copying an URI fragment attempting to clean invalid sequences */
................................................................................
	parse_attribute_inner_type (node->children, &type, &is_geom);

    if (name == NULL || (is_geom == 0 && type == SQLITE_NULL)
	|| (is_geom != 0 && type == GAIA_UNKNOWN))
	return;

    if (is_geom)
	set_wfs_geometry (schema, name, type, is_nullable);
    else
	add_wfs_column_to_schema (schema, name, type, is_nullable);
}

static void
parse_wfs_schema (xmlNodePtr node, struct wfs_layer_schema *schema,
		  int *sequence)
................................................................................
	    }
	  goto end;
      }

    schema = alloc_wfs_layer_schema (layer_name, swap_axes);
    root = xmlDocGetRootElement (xml_doc);
    parse_wfs_schema (root, schema, &sequence);
    if (schema->first == NULL && schema->geometry_name == NULL)
      {
	  if (err_msg != NULL)
	    {
		const char *msg = "Unable to identify a valid WFS layer schema";
		len = strlen (msg);
		*err_msg = malloc (len + 1);
		strcpy (*err_msg, msg);
................................................................................
  end:
    gaiaOutBufferReset (&errBuf);
    xmlSetGenericErrorFunc ((void *) stderr, NULL);
    if (xml_doc != NULL)
	xmlFreeDoc (xml_doc);
    if (schema != NULL)
      {
	  if (schema->first == NULL && schema->geometry_name == NULL)
	    {
		/* empty schema */
		free_wfs_layer_schema (schema);
		schema = NULL;
	    }
      }
    return schema;
................................................................................
		  }
	    }
	  node = node->next;
      }
}

static void
set_feature_geom (xmlNodePtr node, struct wfs_layer_schema *schema)
{
/* saving the feature's geometry value */
    gaiaOutBuffer gml;
    gaiaOutBufferInitialize (&gml);

    /* reassembling the GML expression */
    reassemble_gml (node, &gml);
    if (gml.Buffer != NULL)
      {
	  if (schema->geometry_value != NULL)
	      free (schema->geometry_value);
	  schema->geometry_value = gml.Buffer;
      }
}

static void
set_feature_value (xmlNodePtr node, struct wfs_column_def *col)
{
/* saving an attribute value */
    if (node == NULL)
................................................................................
}

static void
check_feature_value (xmlNodePtr node, struct wfs_layer_schema *schema)
{
/* attempting to extract an attribute value */
    struct wfs_column_def *col;
    if (strcmp ((const char *) (node->name), schema->geometry_name) == 0)
      {
	  set_feature_geom (node->children, schema);
	  return;
      }
    col = schema->first;
    while (col != NULL)
      {
	  if (strcmp ((const char *) (node->name), col->name) == 0)
	    {
		set_feature_value (node->children, col);
		return;
	    }
	  col = col->next;
      }










}

static int
test_effective_geom (struct wfs_layer_schema *schema, int *type, int *cast_type,
		     int *cast_dims)
{
/* testing the effective GeometryType and dims */
    int pts = 0;
    int lns = 0;
    int pgs = 0;
    int mpts = 0;
................................................................................
    int dims_xyz = 0;
    int dims_xym = 0;
    int dims_xyzm = 0;
    int dims = GAIA_XY;
    int i;
    for (i = 0; i < MAX_GTYPES; i++)
      {
	  struct wfs_geom_type *p = schema->types + i;
	  switch (p->type)
	    {
	    case GAIA_POINT:
	    case GAIA_POINTZ:
	    case GAIA_POINTM:
	    case GAIA_POINTZM:
		pts += p->count;
................................................................................
	      check_feature_value (cur_node, schema);
      }
    cnt = count_wfs_values (schema);
    return cnt;
}

static int
check_real_type (struct wfs_layer_schema *schema, int *type, int *cast_type,
		 int *cast_dims)
{
/* attempting to assign a more precise GeometryType */
    int xtype;
    if (test_effective_geom (schema, &xtype, cast_type, cast_dims))
      {
	  *type = xtype;
	  return 1;
      }
    return 0;
}

static void
update_geom_stats (struct wfs_layer_schema *schema, int type)
{
/* updating the type statistics */
    int i;
    if (schema->geometry_type != GAIA_GEOMETRYCOLLECTION)
	return;
    for (i = 0; i < MAX_GTYPES; i++)
      {
	  struct wfs_geom_type *p = schema->types + i;
	  if (p->type == type)
	    {
		p->count += 1;
		return;
	    }
      }
}
................................................................................
do_insert (struct wfs_layer_schema *schema, char **err_msg)
{
/* inserting a row into the target table */
    int ret;
    int ind = 1;
    sqlite3_stmt *stmt = schema->stmt;
    struct wfs_column_def *col;


    if (stmt == NULL || schema->error)
      {
	  schema->error = 1;
	  return 0;
      }

................................................................................
		else
		    sqlite3_bind_text (stmt, ind, col->pValue,
				       strlen (col->pValue), SQLITE_STATIC);
	    }
	  ind++;
	  col = col->next;
      }
    if (schema->geometry_name != NULL)
      {



	  /* we have a Geometry column */
	  if (schema->geometry_value != NULL)
	    {
		/* preparing the Geometry value */
		gaiaGeomCollPtr geom =
		    gaiaParseGml ((unsigned char *) (schema->geometry_value),
				  schema->sqlite);
		if (geom == NULL)
		    sqlite3_bind_null (stmt, ind);
		else
		  {
		      unsigned char *blob;
		      int blob_size;
		      int type = gaiaGeometryType (geom);
		      if (type == GAIA_POINT
			  && schema->geometry_type == GAIA_MULTIPOINT)
			{
			    /* promoting to MultiPoint */
			    geom->DeclaredType = GAIA_MULTIPOINT;
			}
		      if (type == GAIA_LINESTRING
			  && schema->geometry_type == GAIA_MULTILINESTRING)
			{
			    /* promoting to MultiLinestring */
			    geom->DeclaredType = GAIA_MULTILINESTRING;
			}
		      if (type == GAIA_POLYGON
			  && schema->geometry_type == GAIA_MULTIPOLYGON)
			{
			    /* promoting to MultiPolygon */
			    geom->DeclaredType = GAIA_MULTIPOLYGON;
			}
		      geom->Srid = schema->srid;
		      if (schema->swap_axes != 0)
			  gaiaSwapCoords (geom);
		      gaiaToSpatiaLiteBlobWkb (geom, &blob, &blob_size);
		      sqlite3_bind_blob (stmt, ind, blob, blob_size, free);
		      gaiaFreeGeomColl (geom);
		      update_geom_stats (schema, type);
		  }
	    }
	  else
	      sqlite3_bind_null (stmt, ind);


      }

/* inserting */
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;
    spatialite_e ("loadwfs INSERT error: <%s>\n",
................................................................................
		  }
		return;
	    }
	  attr = attr->next;
      }
}

























static int
do_save_feature (struct wfs_layer_schema *schema, struct wfs_feature *feature)
{
/* saving the current feature data */
    struct wfs_column_def *col;


    if (schema->error)
      {
	  schema->error = 1;
	  return 0;
      }

................................................................................
    reset_feature (feature);
    col = schema->first;
    while (col != NULL)
      {
	  save_attribute (feature, col);
	  col = col->next;
      }
    if (schema->geometry_name != NULL)

      {
	  /* we have a Geometry column */
	  if (schema->geometry_value != NULL)

	    {
		int len = strlen (schema->geometry_value);
		feature->geometry_value = malloc (len + 1);
		strcpy (feature->geometry_value, schema->geometry_value);
	    }
      }
    return 1;
}

static void
parse_wfs_features (xmlNodePtr node, struct wfs_layer_schema *schema, int *rows,
		    char **err_msg)
................................................................................
					    rows);
	    }
      }
}

static int
sniff_feature_value (xmlNodePtr node, struct wfs_layer_schema *schema,
		     xmlNodePtr * geom)
{
/* sniffing attribute values */
    struct wfs_column_def *col;
    if (strcmp ((const char *) (node->name), schema->geometry_name) == 0)
      {
	  *geom = node->children;
	  return 1;
      }
    col = schema->first;
    while (col != NULL)
      {
	  if (strcmp ((const char *) (node->name), col->name) == 0)
	      return 1;
	  col = col->next;
      }











    return 0;
}

static int
parse_srsname (xmlNodePtr node)
{
/* parsing the srsName string */
................................................................................
	  if (node->type == XML_TEXT_NODE)
	      return atoi ((const char *) (node->content));
      }
    return 2;
}

static void

sniff_gml_geometry (xmlNodePtr node, struct wfs_layer_schema *schema)
{
/* attempting to identify the Srid and dimension from a GML geometry */


    xmlNodePtr cur_node = NULL;
    if (node == NULL)
	return;












    for (cur_node = node; cur_node; cur_node = cur_node->next)
      {
	  if (cur_node->type == XML_ELEMENT_NODE)
	    {
		struct _xmlAttr *attr;
		attr = cur_node->properties;
		while (attr != NULL)
		  {
		      if (attr->name != NULL)
			{
			    if (strcmp ((const char *) (attr->name), "srsName")
				== 0)
				schema->srid = parse_srsname (attr->children);
			    if (strcmp
				((const char *) (attr->name), "dimension") == 0)


				schema->dims = parse_dimension (attr->children);
			}
		      attr = attr->next;
		  }
		sniff_gml_geometry (cur_node->children, schema);
	    }
      }
}

static int
sniff_wfs_single_feature (xmlNodePtr node, struct wfs_layer_schema *schema)
{
/* attempting to sniff data corresponding to a single feature */
    xmlNodePtr cur_node = NULL;
    int cnt = 0;
    xmlNodePtr geom = NULL;

    reset_wfs_values (schema);
    for (cur_node = node; cur_node; cur_node = cur_node->next)
      {


	  if (cur_node->type == XML_ELEMENT_NODE)

	      cnt += sniff_feature_value (cur_node, schema, &geom);


      }
    if (cnt > 0 && geom != NULL)
      {
	  sniff_gml_geometry (geom, schema);
	  return 1;
      }
    return 0;
}

static void
sniff_geometries (xmlNodePtr node, struct wfs_layer_schema *schema,
		  int *sniffed)
{
................................................................................
    int len;
    int ret;
    char *errMsg = NULL;
    gaiaOutBuffer sql;
    char *sql2;
    char *quoted;
    struct wfs_column_def *col;

    char auto_pk_name[1024];
    int is_auto_pk = 0;
    int comma = 0;
    sqlite3_stmt *stmt = NULL;

/* attempting to create the SQL Table */
    gaiaOutBufferInitialize (&sql);
................................................................................
	  len = strlen (errMsg);
	  *err_msg = malloc (len + 1);
	  strcpy (*err_msg, errMsg);
	  sqlite3_free (errMsg);
	  return 0;
      }

    if (schema->geometry_name != NULL)

      {
	  /* creating the Geometry column */
	  const char *gType = "GEOMETRY";
	  const char *gDims = "XY";
	  switch (schema->geometry_type)
	    {
	    case GAIA_POINT:
		gType = "POINT";
		break;
	    case GAIA_LINESTRING:
		gType = "LINESTRING";
		break;
................................................................................
	    case GAIA_MULTILINESTRING:
		gType = "MULTILINESTRING";
		break;
	    case GAIA_MULTIPOLYGON:
		gType = "MULTIPOLYGON";
		break;
	    };
	  if (schema->dims == 3)
	      gDims = "XYZ";
	  sql2 =
	      sqlite3_mprintf ("SELECT AddGeometryColumn(%Q, %Q, %d, %Q, %Q)",
			       table, schema->geometry_name, schema->srid,
			       gType, gDims);
	  gaiaAppendToOutBuffer (&sql, sql2);
	  sqlite3_free (sql2);
	  ret = sqlite3_exec (sqlite, sql.Buffer, NULL, NULL, &errMsg);
	  gaiaOutBufferReset (&sql);
	  if (ret != SQLITE_OK)
	    {
................................................................................
		strcpy (*err_msg, errMsg);
		return 0;
	    }
	  if (spatial_index)
	    {
		/* creating the Spatial Index */
		sql2 = sqlite3_mprintf ("SELECT CreateSpatialIndex(%Q, %Q)",
					table, schema->geometry_name);
		gaiaAppendToOutBuffer (&sql, sql2);
		sqlite3_free (sql2);
		ret = sqlite3_exec (sqlite, sql.Buffer, NULL, NULL, &errMsg);
		gaiaOutBufferReset (&sql);
		if (ret != SQLITE_OK)
		  {
		      spatialite_e ("loadwfs: CreateSpatialIndex error: %s\n",
................................................................................
			}
		      len = strlen (errMsg);
		      *err_msg = malloc (len + 1);
		      strcpy (*err_msg, errMsg);
		      return 0;
		  }
	    }

      }

/* creating the INSERT statement */
    quoted = gaiaDoubleQuotedSql (table);
    sql2 = sqlite3_mprintf ("INSERT INTO \"%s\" (\n", quoted);
    free (quoted);
    gaiaAppendToOutBuffer (&sql, sql2);
................................................................................
	  sqlite3_free (sql2);
      }
    col = schema->first;
    while (col != NULL)
      {
	  /* column names */
	  quoted = gaiaDoubleQuotedSql (col->name);
	  if (col == schema->last && schema->geometry_name == NULL)
	      sql2 = sqlite3_mprintf ("\"%s\") VALUES (", quoted);
	  else
	      sql2 = sqlite3_mprintf ("\"%s\", ", quoted);
	  free (quoted);
	  gaiaAppendToOutBuffer (&sql, sql2);
	  sqlite3_free (sql2);
	  col = col->next;
      }
    if (schema->geometry_name != NULL)

      {
	  /* the geometry column name */
	  quoted = gaiaDoubleQuotedSql (schema->geometry_name);

	  sql2 = sqlite3_mprintf ("\"%s\") VALUES (", quoted);


	  free (quoted);
	  gaiaAppendToOutBuffer (&sql, sql2);
	  sqlite3_free (sql2);

      }
    if (is_auto_pk)
      {
	  /* there is an AUTOINCREMENT PK */
	  gaiaAppendToOutBuffer (&sql, "NULL, ");
      }
    col = schema->first;
    while (col != NULL)
      {
	  if (col == schema->last && schema->geometry_name == NULL)
	      gaiaAppendToOutBuffer (&sql, "?)");
	  else
	      gaiaAppendToOutBuffer (&sql, "?, ");
	  col = col->next;
      }
    if (schema->geometry_name != NULL)



	gaiaAppendToOutBuffer (&sql, "?)");




    ret =
	sqlite3_prepare_v2 (sqlite, sql.Buffer, strlen (sql.Buffer), &stmt,
			    NULL);
    gaiaOutBufferReset (&sql);
    if (ret != SQLITE_OK)
      {
	  errMsg = (char *) sqlite3_errmsg (sqlite);
................................................................................
				progress_callback, callback_ptr);
}

static int
test_wfs_paging (const char *path_or_url, int page_size, xmlNodePtr node,
		 struct wfs_layer_schema *schema, int *shift_index)
{

/* testing if the server does actually supports STARTINDEX */












    xmlDocPtr xml_doc = NULL;
    xmlNodePtr root;
    char *page_url;
    int nRows = 0;
    struct wfs_feature *feature_1 = create_feature (schema);
    struct wfs_feature *feature_2 = create_feature (schema);
    *shift_index = 0;
................................................................................
do_adjust_geoms (sqlite3 * sqlite, const char *table, const char *geometry,
		 int type, int cast_type, int cast_dims)
{
/* final adjustement for GeometryType and dims */
    char *errMsg = NULL;
    char *xtable;
    char *xgeom;
    char *xopen;
    char *xclose;
    char *sql;
    int ret;
    int dims;
    int metadata_version = checkSpatialMetaData (sqlite);

/* starting a transaction */
    if (sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &errMsg) != SQLITE_OK)
      {
	  spatialite_e ("loadwfs: BEGIN error:\"%s\"\n", errMsg);
	  sqlite3_free (errMsg);
................................................................................
	    }
      }

/* adjusting GeometryColumns */
    if (metadata_version == 1)
      {
	  /* legacy metadata style <= v.3.1.0 */
	  const char *pType;
	  const char *pDims;
	  switch (type)
	    {
	    case GAIA_POINT:
	    case GAIA_POINTZ:
	    case GAIA_POINTM:
	    case GAIA_POINTZM:
		pType = "POINT";
................................................................................
		nType = 4;
		break;
	    case GAIA_MULTIPOINTZ:
		nType = 1004;
		break;
	    case GAIA_MULTIPOINTM:
		nType = 2004;

	    case GAIA_MULTIPOINTZM:
		nType = 3004;
		break;
	    case GAIA_MULTILINESTRING:
		nType = 5;
		break;
	    case GAIA_MULTILINESTRINGZ:
		nType = 1005;
		break;
	    case GAIA_MULTILINESTRINGM:
		nType = 2005;

	    case GAIA_MULTILINESTRINGZM:
		nType = 3005;
		break;
	    case GAIA_MULTIPOLYGON:
		nType = 6;
		break;
	    case GAIA_MULTIPOLYGONZ:
................................................................................
		     const char *alt_describe_uri, const char *layer_name,
		     int swap_axes, const char *table,
		     const char *pk_column_name, int spatial_index,
		     int page_size, int *rows, char **err_msg,
		     void (*progress_callback) (int, void *),
		     void *callback_ptr)
{

















/* attempting to load data from some WFS source [paged]*/
    xmlDocPtr xml_doc = NULL;
    xmlNodePtr root;
    struct wfs_layer_schema *schema = NULL;

    int len;
    int ret;
    char *describe_uri = NULL;
    gaiaOutBuffer errBuf;
    int ok = 0;
    int sniffed = 0;
    int pageNo = 0;
    int startIdx = 0;
    int nRows;
    char *page_url = NULL;
    const char *p_page_url;
    int shift_index;

    xmlGenericErrorFunc parsingError = (xmlGenericErrorFunc) wfsParsingError;
    *rows = 0;
    if (err_msg != NULL)
	*err_msg = NULL;
    if (path_or_url == NULL)
	return 0;

    while (1)
      {
	  if (page_size <= 0)
	      p_page_url = path_or_url;
	  else
	    {






		page_url =
		    sqlite3_mprintf ("%s&maxFeatures=%d&startIndex=%d",
				     path_or_url, page_size, startIdx);
		p_page_url = page_url;
	    }

	  /* loading the WFS payload from URL (or file) */
	  gaiaOutBufferInitialize (&errBuf);
	  xmlSetGenericErrorFunc (&errBuf, parsingError);





	  xml_doc = xmlReadFile (p_page_url, NULL, 0);








	  if (page_url != NULL)
	      sqlite3_free (page_url);
	  if (xml_doc == NULL)
	    {
		/* parsing error; not a well-formed XML */
		if (errBuf.Buffer != NULL && err_msg != NULL)
		  {
................................................................................
		goto end;
	    }

	  if (pageNo == 0)
	    {
		if (alt_describe_uri != NULL)
		  {
		      /* using the DescribetFeatureType URI from GetCapabilities */
		      len = strlen (alt_describe_uri);
		      describe_uri = malloc (len + 1);
		      strcpy (describe_uri, alt_describe_uri);
		      ret = 1;
		  }
		else
		  {
................................................................................
		/* creating the output table */
		root = xmlDocGetRootElement (xml_doc);
		sniffed = 0;
		sniff_geometries (root, schema, &sniffed);

		if (page_size > 0)
		  {




		      /* testing if the server does actually support STARTINDEX */












		      root = xmlDocGetRootElement (xml_doc);
		      if (!test_wfs_paging
			  (path_or_url, page_size, root, schema, &shift_index))

			{
			    const char *err =
				"loawfs: the WFS server doesn't seem to support STARTINDEX\n"
				"and consequently WFS paging is not available";
			    if (err_msg != NULL)
			      {
				  len = strlen (err);
				  *err_msg = malloc (len + 1);
				  strcpy (*err_msg, err);
			      }
			    goto end;

			}
		      startIdx += shift_index;
		  }

		if (!prepare_sql
		    (sqlite, schema, table, pk_column_name, spatial_index,
		     err_msg))
................................................................................
	  if (xml_doc != NULL)
	      xmlFreeDoc (xml_doc);
	  xml_doc = NULL;
	  pageNo++;
	  startIdx += nRows;
      }




    if (schema->geometry_type == GAIA_GEOMETRYCOLLECTION)
      {
	  /* attempting to set a more precise GeometryType */
	  int type;
	  int cast_type;
	  int cast_dims;
	  if (check_real_type (schema, &type, &cast_type, &cast_dims))
	    {
		do_adjust_geoms (sqlite, table, schema->geometry_name, type,
				 cast_type, cast_dims);
	    }


      }
    ok = 1;
  end:
    if (schema != NULL)
	free_wfs_layer_schema (schema);
    if (describe_uri != NULL)
	free (describe_uri);
................................................................................
{
/* creating the request URL */
    char *url;
    char *url2;
    const char *srs_name = NULL;
    int len;
    const char *ver = "1.1.0";


    if (ptr->request_url == NULL)
	return NULL;
    if (version != NULL)
      {
	  if (strcmp (version, "1.0.0") == 0)
	      ver = "1.0.0";
	  if (strcmp (version, "2.0.0") == 0)
	      ver = "2.0.0";
	  if (strcmp (version, "2.0.2") == 0)
	      ver = "2.0.2";
      }










    if (srid > 0)
      {
	  struct wfs_srid_def *srs = lyr->first_srid;
	  while (srs != NULL)
	    {
		if (srs->srid == srid)
		  {
................................................................................
	    }
      }
    if (max_features <= 0)
      {
	  if (srs_name == NULL)
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&typeName=%s",
		   ptr->request_url, ver, lyr->name);
	  else
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&typeName=%s&srsName=%s",
		   ptr->request_url, ver, lyr->name, srs_name);
      }
    else
      {
	  if (srs_name == NULL)
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&typeName=%s&maxFeatures=%d",
		   ptr->request_url, ver, lyr->name, max_features);
	  else
	      url =
		  sqlite3_mprintf
		  ("%sservice=WFS&version=%s&request=GetFeature&typeName=%s&srsName=%s&maxFeatures=%d",
		   ptr->request_url, ver, lyr->name, srs_name, max_features);

      }
    len = strlen (url);
    url2 = malloc (len + 1);
    strcpy (url2, url);
    sqlite3_free (url);
    return url2;
}
................................................................................
}

SPATIALITE_DECLARE int
get_wfs_schema_geometry_info (gaiaWFSschemaPtr handle, const char **name,
			      int *type, int *srid, int *dims, int *nullable)
{
/* Return the infos describing a WFS-GeometryColumn object */


    struct wfs_layer_schema *ptr = (struct wfs_layer_schema *) handle;
    if (ptr == NULL)
	return 0;



    if (ptr->geometry_name == NULL)
	return 0;
    *name = ptr->geometry_name;
    *type = ptr->geometry_type;
    *srid = ptr->srid;
    *dims = ptr->dims;
    *nullable = ptr->is_nullable;




    return 1;

}

SPATIALITE_DECLARE int
get_wfs_schema_column_info (gaiaWFScolumnPtr handle, const char **name,
			    int *type, int *nullable)
{
/* Return the infos describing a WFS-Column object */
................................................................................
		     const char *alt_describe_uri, const char *layer_name,
		     int swap_axes, const char *table,
		     const char *pk_column_name, int spatial_index,
		     int page_size, int *rows, char **err_msg,
		     void (*progress_callback) (int, void *),
		     void *callback_ptr)
{

















/* LIBXML2 isn't enabled: always returning an error */
    int len;
    const char *msg = "Sorry ... libspatialite was built disabling LIBXML2\n"
	"and is thus unable to support LOADWFS";

/* silencing stupid compiler warnings */
    if (sqlite == NULL || path_or_url == NULL || layer_name == NULL
	|| alt_describe_uri == NULL || swap_axes == 0 || table == NULL
	|| pk_column_name == NULL || spatial_index == 0 || page_size == 0
	|| rows == NULL || progress_callback == NULL
	|| progress_callback == NULL || callback_ptr == NULL)
	path_or_url = NULL;

    if (err_msg == NULL)
	return 0;
    len = strlen (msg);
    *err_msg = malloc (len + 1);

Deleted test/000323485.gpx.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version='1.0' encoding='utf-8'?>
<gpx xmlns="http://www.topografix.com/GPX/1/0" version="1.0" creator="OSM gpx_dump.py">
  <trk>
    <name>Track 0</name>
    <number>0</number>
    <trkseg>
      <trkpt lat="37.7709000" lon="-25.2021000" />
      <trkpt lat="37.7710000" lon="-25.2002500" />
      <trkpt lat="37.7696900" lon="-25.1987500" />
      <trkpt lat="37.7699700" lon="-25.1971200" />
      <trkpt lat="37.7710900" lon="-25.1959200" />
      <trkpt lat="37.7724100" lon="-25.1965000" />
      <trkpt lat="37.7732400" lon="-25.1979200" />
      <trkpt lat="37.7742300" lon="-25.1977000" />
      <trkpt lat="37.7753400" lon="-25.1970600" />
      <trkpt lat="37.7767900" lon="-25.1965200" />
      <trkpt lat="37.7764900" lon="-25.1947400" />
      <trkpt lat="37.7780300" lon="-25.1951500" />
      <trkpt lat="37.7788000" lon="-25.1962200" />
      <trkpt lat="37.7796000" lon="-25.1974000" />
      <trkpt lat="37.7803200" lon="-25.1982400" />
      <trkpt lat="37.7815300" lon="-25.1986400" />
      <trkpt lat="37.7816400" lon="-25.2000000" />
      <trkpt lat="37.7833400" lon="-25.2002500" />
      <trkpt lat="37.7845300" lon="-25.2007000" />
      <trkpt lat="37.7860900" lon="-25.2016900" />
      <trkpt lat="37.7867600" lon="-25.2007300" />
      <trkpt lat="37.7858800" lon="-25.1993300" />
      <trkpt lat="37.7859400" lon="-25.1976400" />
      <trkpt lat="37.7854200" lon="-25.1959000" />
      <trkpt lat="37.7856300" lon="-25.1953800" />
      <trkpt lat="37.7863600" lon="-25.1947600" />
      <trkpt lat="37.7868000" lon="-25.1937500" />
      <trkpt lat="37.7874600" lon="-25.1929800" />
      <trkpt lat="37.7877000" lon="-25.1914100" />
      <trkpt lat="37.7887000" lon="-25.1899300" />
      <trkpt lat="37.7897800" lon="-25.1885600" />
      <trkpt lat="37.7913100" lon="-25.1864100" />
      <trkpt lat="37.7936600" lon="-25.1853600" />
      <trkpt lat="37.7961200" lon="-25.1847800" />
    </trkseg>
  </trk>
</gpx>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































Deleted test/Gpx-sample.gpx.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<?xml version="1.0"?>
<gpx version="1.0" creator="maemo-mapper" xmlns="http://www.topografix.com/GPX/1/0">
  <trk>
    <trkseg>
      <trkpt lat="55.753572" lon="37.808250">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:30Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753622" lon="37.808255">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:31Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753593" lon="37.808158">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:32Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753597" lon="37.808158">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:33Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753587" lon="37.808177">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:34Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753565" lon="37.808157">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:35Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753552" lon="37.808140">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:36Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753513" lon="37.808103">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:37Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753493" lon="37.808077">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:38Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753460" lon="37.808065">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:39Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753457" lon="37.808053">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:40Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753390" lon="37.808072">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:41Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.61</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753365" lon="37.808068">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:42Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753332" lon="37.808057">
        <ele>135.00</ele>
        <time>2009-05-19T04:00:43Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753290" lon="37.808067">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:44Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753275" lon="37.808043">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:45Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753243" lon="37.808033">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:46Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753228" lon="37.808028">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:47Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753200" lon="37.808005">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:48Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753193" lon="37.807987">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:49Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753193" lon="37.807950">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:50Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753185" lon="37.807892">
        <ele>133.00</ele>
        <time>2009-05-19T04:00:51Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753175" lon="37.807818">
        <ele>133.00</ele>
        <time>2009-05-19T04:00:52Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753180" lon="37.807740">
        <ele>133.00</ele>
        <time>2009-05-19T04:00:53Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753183" lon="37.807653">
        <ele>133.00</ele>
        <time>2009-05-19T04:00:54Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753185" lon="37.807547">
        <ele>133.00</ele>
        <time>2009-05-19T04:00:55Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753192" lon="37.807437">
        <ele>133.00</ele>
        <time>2009-05-19T04:00:56Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753203" lon="37.807312">
        <ele>132.00</ele>
        <time>2009-05-19T04:00:57Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753208" lon="37.807168">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:58Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753220" lon="37.807020">
        <ele>134.00</ele>
        <time>2009-05-19T04:00:59Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753238" lon="37.806860">
        <ele>134.00</ele>
        <time>2009-05-19T04:01:00Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.753267" lon="37.806703">
        <ele>134.00</ele>
        <time>2009-05-19T04:01:01Z</time>
        <fix>2d</fix>
        <sat>3</sat>
        <hdop>2.60</hdop>
        <vdop>1.00</vdop>
        <pdop>2.79</pdop>
      </trkpt>
      <trkpt lat="55.758175" lon="37.677798">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:14Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758175" lon="37.677798">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:15Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758175" lon="37.677800">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:16Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677800">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:17Z</time>
        <fix>3d</fix>
        <sat>7</sat>
        <hdop>1.17</hdop>
        <vdop>0.94</vdop>
        <pdop>1.50</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677800">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:18Z</time>
        <fix>3d</fix>
        <sat>7</sat>
        <hdop>1.17</hdop>
        <vdop>0.94</vdop>
        <pdop>1.50</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677802">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:19Z</time>
        <fix>3d</fix>
        <sat>7</sat>
        <hdop>1.17</hdop>
        <vdop>0.94</vdop>
        <pdop>1.50</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677802">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:20Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677800">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:21Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677802">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:22Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677802">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:23Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677803">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:24Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758178" lon="37.677803">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:25Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677803">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:26Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
      <trkpt lat="55.758177" lon="37.677802">
        <ele>152.00</ele>
        <time>2009-05-19T04:46:27Z</time>
        <fix>3d</fix>
        <sat>8</sat>
        <hdop>1.09</hdop>
        <vdop>0.92</vdop>
        <pdop>1.43</pdop>
      </trkpt>
    </trkseg>
  </trk>
</gpx>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

118
119
120
121
122
123
124
125
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
...
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@

check_PROGRAMS = check_endian \
		check_version \
		check_init \
		check_init2 \
		check_init_full \
		check_geom_aux \
		check_geometry_cols \
		check_create \
		check_bufovflw \
		check_fdo1 \
		check_fdo2 \
		check_fdo3 \
................................................................................
		check_styling \
		check_virtualxpath \
		check_virtualbbox \
		check_wfsin \
		check_dxf \
		check_metacatalog \
		check_virtualelem \
		check_srid_fncts \
		check_control_points \
		check_cutter \
		check_topology2d \
		check_topology3d \
		check_toponoface2d \
		check_topoplus \
		check_toposnap \
		check_network2d \
		check_network3d \
		check_network_log \
		check_virtualknn \
		check_sequence \
		check_stored_proc \
		check_wms \
		routing_test
		
if ENABLE_GEOPACKAGE
check_PROGRAMS += \
		check_createBaseTables \
		check_gpkgCreateTilesTable \
		check_gpkgCreateTilesTableMissingSRID \
		check_gpkgCreateTilesZoomLevel \
		check_gpkgInsertEpsgSRID check_gpkgMode \
		check_gpkgCreateFeaturesTable \
		check_gpkg_base_core_container_data_file_format_application_id \
		check_gpkg_base_core_spatial_ref_sys_data_table_def \
		check_gpkg_base_core_spatial_ref_sys_data_values_default \
		check_gpkg_base_core_contents_data_table_def \
		check_gpkg_opt_extension_mechanism_extensions_data_table_def \
		check_add_tile_triggers \
................................................................................
		check_gpkgGetImageFormat_tiff \
		check_gpkgGetImageFormat_webp \
		check_gpkgConvert \
		check_gpkgVirtual
endif

AM_CFLAGS = -I@srcdir@/../src/headers -I@srcdir@

if MINGW
AM_LDFLAGS = -L../src -lspatialite -lm -lxml2 $(GCOV_FLAGS)
else 
AM_LDFLAGS = -L../src -lpthread -lspatialite -lm -lxml2 $(GCOV_FLAGS)
endif

TESTS = $(check_PROGRAMS)

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda


EXTRA_DIST = fnmatch_impl4win.h \
	fnmatch4win.h \
	scandir4win.h \
	test_helpers.h \
	shapetest1.dbf \
	shapetest1.prj \
	shapetest1.qpj \
	shapetest1.shp \
................................................................................
	shapetest1.shx \
	test_under_valgrind.sh \
	WritingSQLTestCase.txt \
	test-legacy-2.3.1.sqlite \
	test-legacy-3.0.1.sqlite \
	test-invalid.sqlite \
	test_geos.sqlite \
	elba-sezcen.sqlite \
	shp/new-caledonia/buildings.dbf \
	shp/new-caledonia/buildings.prj \
	shp/new-caledonia/buildings.shp \
	shp/new-caledonia/buildings.shx \
	shp/new-caledonia/points.dbf \
	shp/new-caledonia/points.prj \
	shp/new-caledonia/points.shp \
................................................................................
	Apple-iPhone-4.jpg empty.png  empty.tif \
	test.wfs testDescribeFeatureType.wfs \
	getcapabilities-1.0.0.wfs \
	getcapabilities-1.1.0.wfs \
	describefeaturetype.wfs	\
	22.dxf f06.dxf l02.dxf p05.dxf \
	archaic.dxf linked.dxf hatch.dxf \
	symbol.dxf gpkg_test.sqlite gpkg_test.gpkg \
	gpkg_test_broken.gpkg gpkg_test_extrasrid.gpkg \
	elba-pg.shp elba-pg.shx elba-pg.dbf \
	elba-ln.shp elba-ln.shx elba-ln.dbf \
	Gpx-sample.gpx 000323485.gpx \
	sqlproc_sample.txt sqlproc_logfile.txt \
	sqlproc_error.txt orbetello.sqlite

SUBDIRS = sql_stmt_geosadvanced_tests sql_stmt_geos_tests \
	sql_stmt_libxml2_tests sql_stmt_rtgeom_tests \
	sql_stmt_mathsql_tests sql_stmt_proj_tests \
	sql_stmt_proj492_tests sql_stmt_proj493_tests \
	sql_stmt_security_tests sql_stmt_tests \
	sql_stmt_xmlsec_tests sql_stmt_geopackage_tests \
	sql_stmt_freexl_tests sql_stmt_cache_tests \
	sql_stmt_nocache_tests sql_stmt_voronoj1_tests \
	sql_stmt_voronoj2_tests \
	sql_stmt_gpkg_epsg492_tests sql_stmt_gpkg_epsg493_tests \
	sql_stmt_rttopo_tests sql_stmt_gpkgcache_tests \
	sql_stmt_gpkgnocache_tests sql_stmt_sequence_tests \
	sql_stmt_routing_tests sql_stmt_logfile_tests \
	sql_stmt_iconv_tests sql_stmt_point_geom \
	sql_stmt_tiny_point






<







 







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|







 







<
<
|
<
<
<





>
|







 







<







 







|
<
<
<
<
<
<


|

<


|
<
<
<
<
<
<
<
<
1
2
3
4
5
6

7
8
9
10
11
12
13
..
49
50
51
52
53
54
55
56















57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
..
84
85
86
87
88
89
90


91



92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
173
174
175
176
177
178
179
180






181
182
183
184

185
186
187








AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@

check_PROGRAMS = check_endian \
		check_version \
		check_init \
		check_init2 \

		check_geom_aux \
		check_geometry_cols \
		check_create \
		check_bufovflw \
		check_fdo1 \
		check_fdo2 \
		check_fdo3 \
................................................................................
		check_styling \
		check_virtualxpath \
		check_virtualbbox \
		check_wfsin \
		check_dxf \
		check_metacatalog \
		check_virtualelem \
		check_srid_fncts















		
if ENABLE_GEOPACKAGE
check_PROGRAMS += \
		check_createBaseTables \
		check_gpkgCreateTilesTable \
		check_gpkgCreateTilesTableMissingSRID \
		check_gpkgCreateTilesZoomLevel \
		check_gpkgInsertEpsgSRID \
		check_gpkgCreateFeaturesTable \
		check_gpkg_base_core_container_data_file_format_application_id \
		check_gpkg_base_core_spatial_ref_sys_data_table_def \
		check_gpkg_base_core_spatial_ref_sys_data_values_default \
		check_gpkg_base_core_contents_data_table_def \
		check_gpkg_opt_extension_mechanism_extensions_data_table_def \
		check_add_tile_triggers \
................................................................................
		check_gpkgGetImageFormat_tiff \
		check_gpkgGetImageFormat_webp \
		check_gpkgConvert \
		check_gpkgVirtual
endif

AM_CFLAGS = -I@srcdir@/../src/headers -I@srcdir@


AM_LDFLAGS = -L../src -lspatialite -lm $(GCOV_FLAGS)




TESTS = $(check_PROGRAMS)

MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = asprintf4win.h \
	fnmatch_impl4win.h \
	fnmatch4win.h \
	scandir4win.h \
	test_helpers.h \
	shapetest1.dbf \
	shapetest1.prj \
	shapetest1.qpj \
	shapetest1.shp \
................................................................................
	shapetest1.shx \
	test_under_valgrind.sh \
	WritingSQLTestCase.txt \
	test-legacy-2.3.1.sqlite \
	test-legacy-3.0.1.sqlite \
	test-invalid.sqlite \
	test_geos.sqlite \

	shp/new-caledonia/buildings.dbf \
	shp/new-caledonia/buildings.prj \
	shp/new-caledonia/buildings.shp \
	shp/new-caledonia/buildings.shx \
	shp/new-caledonia/points.dbf \
	shp/new-caledonia/points.prj \
	shp/new-caledonia/points.shp \
................................................................................
	Apple-iPhone-4.jpg empty.png  empty.tif \
	test.wfs testDescribeFeatureType.wfs \
	getcapabilities-1.0.0.wfs \
	getcapabilities-1.1.0.wfs \
	describefeaturetype.wfs	\
	22.dxf f06.dxf l02.dxf p05.dxf \
	archaic.dxf linked.dxf hatch.dxf \
	symbol.dxf gpkg_test.sqlite gpkg_test.gpkg







SUBDIRS = sql_stmt_geosadvanced_tests sql_stmt_geos_tests \
	sql_stmt_libxml2_tests sql_stmt_lwgeom_tests \
	sql_stmt_mathsql_tests sql_stmt_proj_tests \

	sql_stmt_security_tests sql_stmt_tests \
	sql_stmt_xmlsec_tests sql_stmt_geopackage_tests \
	sql_stmt_freexl_tests








Changes to test/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
...
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
...
150
151
152
153
154
155
156


157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
...
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
...
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
...
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
...
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
...
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
...
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
...
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
...
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606

607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
...
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650

651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
...
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
....
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065

1066
1067
1068
1069
1070
1071
1072
1073
....
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
....
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
....
1182
1183
1184
1185
1186
1187
1188

1189
1190
1191
1192
1193
1194
1195
....
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
....
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
....
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
....
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
....
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
....
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
....
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
....
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
....
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
....
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
....
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
....
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
....
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
....
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
	check_init$(EXEEXT) check_init2$(EXEEXT) \
	check_init_full$(EXEEXT) check_geom_aux$(EXEEXT) \
	check_geometry_cols$(EXEEXT) check_create$(EXEEXT) \
	check_bufovflw$(EXEEXT) check_fdo1$(EXEEXT) \
	check_fdo2$(EXEEXT) check_fdo3$(EXEEXT) \
	check_fdo_bufovflw$(EXEEXT) check_md5$(EXEEXT) \
	check_dbf_load$(EXEEXT) check_shp_load$(EXEEXT) \
	check_shp_load_3d$(EXEEXT) shape_cp1252$(EXEEXT) \
	shape_primitives$(EXEEXT) shape_utf8_1$(EXEEXT) \
	shape_utf8_1ex$(EXEEXT) shape_utf8_2$(EXEEXT) \
	shape_3d$(EXEEXT) check_clone_table$(EXEEXT) \
	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
................................................................................
	check_exif2$(EXEEXT) check_relations_fncts$(EXEEXT) \
	check_extra_relations_fncts$(EXEEXT) \
	check_geoscvt_fncts$(EXEEXT) check_libxml2$(EXEEXT) \
	check_styling$(EXEEXT) check_virtualxpath$(EXEEXT) \
	check_virtualbbox$(EXEEXT) check_wfsin$(EXEEXT) \
	check_dxf$(EXEEXT) check_metacatalog$(EXEEXT) \
	check_virtualelem$(EXEEXT) check_srid_fncts$(EXEEXT) \
	check_control_points$(EXEEXT) check_cutter$(EXEEXT) \
	check_topology2d$(EXEEXT) check_topology3d$(EXEEXT) \
	check_toponoface2d$(EXEEXT) check_topoplus$(EXEEXT) \
	check_toposnap$(EXEEXT) check_network2d$(EXEEXT) \
	check_network3d$(EXEEXT) check_network_log$(EXEEXT) \
	check_virtualknn$(EXEEXT) check_sequence$(EXEEXT) \
	check_stored_proc$(EXEEXT) check_wms$(EXEEXT) \
	routing_test$(EXEEXT) $(am__EXEEXT_1)
@ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
@ENABLE_GEOPACKAGE_TRUE@		check_createBaseTables \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateTilesTable \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateTilesTableMissingSRID \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateTilesZoomLevel \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgInsertEpsgSRID check_gpkgMode \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateFeaturesTable \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_container_data_file_format_application_id \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_spatial_ref_sys_data_table_def \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_spatial_ref_sys_data_values_default \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_contents_data_table_def \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_opt_extension_mechanism_extensions_data_table_def \
@ENABLE_GEOPACKAGE_TRUE@		check_add_tile_triggers \
................................................................................
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgGetImageFormat_png \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgGetImageFormat_tiff \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgGetImageFormat_webp \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgConvert \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgVirtual

subdir = test


ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@ENABLE_GEOPACKAGE_TRUE@am__EXEEXT_1 =  \
@ENABLE_GEOPACKAGE_TRUE@	check_createBaseTables$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateTilesTable$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateTilesTableMissingSRID$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateTilesZoomLevel$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgInsertEpsgSRID$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgMode$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateFeaturesTable$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_container_data_file_format_application_id$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_spatial_ref_sys_data_table_def$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_spatial_ref_sys_data_values_default$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_contents_data_table_def$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_opt_extension_mechanism_extensions_data_table_def$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_add_tile_triggers$(EXEEXT) \
................................................................................
check_add_tile_triggers_bad_table_name_LDADD = $(LDADD)
check_bufovflw_SOURCES = check_bufovflw.c
check_bufovflw_OBJECTS = check_bufovflw.$(OBJEXT)
check_bufovflw_LDADD = $(LDADD)
check_clone_table_SOURCES = check_clone_table.c
check_clone_table_OBJECTS = check_clone_table.$(OBJEXT)
check_clone_table_LDADD = $(LDADD)
check_control_points_SOURCES = check_control_points.c
check_control_points_OBJECTS = check_control_points.$(OBJEXT)
check_control_points_LDADD = $(LDADD)
check_create_SOURCES = check_create.c
check_create_OBJECTS = check_create.$(OBJEXT)
check_create_LDADD = $(LDADD)
check_createBaseTables_SOURCES = check_createBaseTables.c
check_createBaseTables_OBJECTS = check_createBaseTables.$(OBJEXT)
check_createBaseTables_LDADD = $(LDADD)
check_cutter_SOURCES = check_cutter.c
check_cutter_OBJECTS = check_cutter.$(OBJEXT)
check_cutter_LDADD = $(LDADD)
check_dbf_load_SOURCES = check_dbf_load.c
check_dbf_load_OBJECTS = check_dbf_load.$(OBJEXT)
check_dbf_load_LDADD = $(LDADD)
check_dxf_SOURCES = check_dxf.c
check_dxf_OBJECTS = check_dxf.$(OBJEXT)
check_dxf_LDADD = $(LDADD)
check_endian_SOURCES = check_endian.c
................................................................................
	check_gpkgGetImageFormat_webp.c
check_gpkgGetImageFormat_webp_OBJECTS =  \
	check_gpkgGetImageFormat_webp.$(OBJEXT)
check_gpkgGetImageFormat_webp_LDADD = $(LDADD)
check_gpkgInsertEpsgSRID_SOURCES = check_gpkgInsertEpsgSRID.c
check_gpkgInsertEpsgSRID_OBJECTS = check_gpkgInsertEpsgSRID.$(OBJEXT)
check_gpkgInsertEpsgSRID_LDADD = $(LDADD)
check_gpkgMode_SOURCES = check_gpkgMode.c
check_gpkgMode_OBJECTS = check_gpkgMode.$(OBJEXT)
check_gpkgMode_LDADD = $(LDADD)
check_gpkgVirtual_SOURCES = check_gpkgVirtual.c
check_gpkgVirtual_OBJECTS = check_gpkgVirtual.$(OBJEXT)
check_gpkgVirtual_LDADD = $(LDADD)
check_gpkg_base_core_container_data_file_format_application_id_SOURCES = check_gpkg_base_core_container_data_file_format_application_id.c
check_gpkg_base_core_container_data_file_format_application_id_OBJECTS = check_gpkg_base_core_container_data_file_format_application_id.$(OBJEXT)
check_gpkg_base_core_container_data_file_format_application_id_LDADD =  \
	$(LDADD)
................................................................................
	$(LDADD)
check_init_SOURCES = check_init.c
check_init_OBJECTS = check_init.$(OBJEXT)
check_init_LDADD = $(LDADD)
check_init2_SOURCES = check_init2.c
check_init2_OBJECTS = check_init2.$(OBJEXT)
check_init2_LDADD = $(LDADD)
check_init_full_SOURCES = check_init_full.c
check_init_full_OBJECTS = check_init_full.$(OBJEXT)
check_init_full_LDADD = $(LDADD)
check_libxml2_SOURCES = check_libxml2.c
check_libxml2_OBJECTS = check_libxml2.$(OBJEXT)
check_libxml2_LDADD = $(LDADD)
check_math_funcs_SOURCES = check_math_funcs.c
check_math_funcs_OBJECTS = check_math_funcs.$(OBJEXT)
check_math_funcs_LDADD = $(LDADD)
check_mbrcache_SOURCES = check_mbrcache.c
................................................................................
check_md5_LDADD = $(LDADD)
check_metacatalog_SOURCES = check_metacatalog.c
check_metacatalog_OBJECTS = check_metacatalog.$(OBJEXT)
check_metacatalog_LDADD = $(LDADD)
check_multithread_SOURCES = check_multithread.c
check_multithread_OBJECTS = check_multithread.$(OBJEXT)
check_multithread_LDADD = $(LDADD)
check_network2d_SOURCES = check_network2d.c
check_network2d_OBJECTS = check_network2d.$(OBJEXT)
check_network2d_LDADD = $(LDADD)
check_network3d_SOURCES = check_network3d.c
check_network3d_OBJECTS = check_network3d.$(OBJEXT)
check_network3d_LDADD = $(LDADD)
check_network_log_SOURCES = check_network_log.c
check_network_log_OBJECTS = check_network_log.$(OBJEXT)
check_network_log_LDADD = $(LDADD)
check_recover_geom_SOURCES = check_recover_geom.c
check_recover_geom_OBJECTS = check_recover_geom.$(OBJEXT)
check_recover_geom_LDADD = $(LDADD)
check_relations_fncts_SOURCES = check_relations_fncts.c
check_relations_fncts_OBJECTS = check_relations_fncts.$(OBJEXT)
check_relations_fncts_LDADD = $(LDADD)
check_sequence_SOURCES = check_sequence.c
check_sequence_OBJECTS = check_sequence.$(OBJEXT)
check_sequence_LDADD = $(LDADD)
check_shp_load_SOURCES = check_shp_load.c
check_shp_load_OBJECTS = check_shp_load.$(OBJEXT)
check_shp_load_LDADD = $(LDADD)
check_shp_load_3d_SOURCES = check_shp_load_3d.c
check_shp_load_3d_OBJECTS = check_shp_load_3d.$(OBJEXT)
check_shp_load_3d_LDADD = $(LDADD)
check_spatialindex_SOURCES = check_spatialindex.c
................................................................................
check_spatialindex_LDADD = $(LDADD)
check_sql_stmt_SOURCES = check_sql_stmt.c
check_sql_stmt_OBJECTS = check_sql_stmt.$(OBJEXT)
check_sql_stmt_LDADD = $(LDADD)
check_srid_fncts_SOURCES = check_srid_fncts.c
check_srid_fncts_OBJECTS = check_srid_fncts.$(OBJEXT)
check_srid_fncts_LDADD = $(LDADD)
check_stored_proc_SOURCES = check_stored_proc.c
check_stored_proc_OBJECTS = check_stored_proc.$(OBJEXT)
check_stored_proc_LDADD = $(LDADD)
check_styling_SOURCES = check_styling.c
check_styling_OBJECTS = check_styling.$(OBJEXT)
check_styling_LDADD = $(LDADD)
check_topology2d_SOURCES = check_topology2d.c
check_topology2d_OBJECTS = check_topology2d.$(OBJEXT)
check_topology2d_LDADD = $(LDADD)
check_topology3d_SOURCES = check_topology3d.c
check_topology3d_OBJECTS = check_topology3d.$(OBJEXT)
check_topology3d_LDADD = $(LDADD)
check_toponoface2d_SOURCES = check_toponoface2d.c
check_toponoface2d_OBJECTS = check_toponoface2d.$(OBJEXT)
check_toponoface2d_LDADD = $(LDADD)
check_topoplus_SOURCES = check_topoplus.c
check_topoplus_OBJECTS = check_topoplus.$(OBJEXT)
check_topoplus_LDADD = $(LDADD)
check_toposnap_SOURCES = check_toposnap.c
check_toposnap_OBJECTS = check_toposnap.$(OBJEXT)
check_toposnap_LDADD = $(LDADD)
check_version_SOURCES = check_version.c
check_version_OBJECTS = check_version.$(OBJEXT)
check_version_LDADD = $(LDADD)
check_virtual_ovflw_SOURCES = check_virtual_ovflw.c
check_virtual_ovflw_OBJECTS = check_virtual_ovflw.$(OBJEXT)
check_virtual_ovflw_LDADD = $(LDADD)
check_virtualbbox_SOURCES = check_virtualbbox.c
check_virtualbbox_OBJECTS = check_virtualbbox.$(OBJEXT)
check_virtualbbox_LDADD = $(LDADD)
check_virtualelem_SOURCES = check_virtualelem.c
check_virtualelem_OBJECTS = check_virtualelem.$(OBJEXT)
check_virtualelem_LDADD = $(LDADD)
check_virtualknn_SOURCES = check_virtualknn.c
check_virtualknn_OBJECTS = check_virtualknn.$(OBJEXT)
check_virtualknn_LDADD = $(LDADD)
check_virtualtable1_SOURCES = check_virtualtable1.c
check_virtualtable1_OBJECTS = check_virtualtable1.$(OBJEXT)
check_virtualtable1_LDADD = $(LDADD)
check_virtualtable2_SOURCES = check_virtualtable2.c
check_virtualtable2_OBJECTS = check_virtualtable2.$(OBJEXT)
check_virtualtable2_LDADD = $(LDADD)
check_virtualtable3_SOURCES = check_virtualtable3.c
................................................................................
check_virtualtable6_LDADD = $(LDADD)
check_virtualxpath_SOURCES = check_virtualxpath.c
check_virtualxpath_OBJECTS = check_virtualxpath.$(OBJEXT)
check_virtualxpath_LDADD = $(LDADD)
check_wfsin_SOURCES = check_wfsin.c
check_wfsin_OBJECTS = check_wfsin.$(OBJEXT)
check_wfsin_LDADD = $(LDADD)
check_wms_SOURCES = check_wms.c
check_wms_OBJECTS = check_wms.$(OBJEXT)
check_wms_LDADD = $(LDADD)
check_xls_load_SOURCES = check_xls_load.c
check_xls_load_OBJECTS = check_xls_load.$(OBJEXT)
check_xls_load_LDADD = $(LDADD)
routing_test_SOURCES = routing_test.c
routing_test_OBJECTS = routing_test.$(OBJEXT)
routing_test_LDADD = $(LDADD)
shape_3d_SOURCES = shape_3d.c
shape_3d_OBJECTS = shape_3d.$(OBJEXT)
shape_3d_LDADD = $(LDADD)
shape_cp1252_SOURCES = shape_cp1252.c
shape_cp1252_OBJECTS = shape_cp1252.$(OBJEXT)
shape_cp1252_LDADD = $(LDADD)
shape_primitives_SOURCES = shape_primitives.c
................................................................................
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = check_add_tile_triggers.c \
	check_add_tile_triggers_bad_table_name.c check_bufovflw.c \
	check_clone_table.c check_control_points.c check_create.c \
	check_createBaseTables.c check_cutter.c check_dbf_load.c \
	check_dxf.c check_endian.c check_exif.c check_exif2.c \
	check_extension.c check_extra_relations_fncts.c check_fdo1.c \
	check_fdo2.c check_fdo3.c check_fdo_bufovflw.c \
	check_gaia_utf8.c check_gaia_util.c check_geom_aux.c \
	check_geometry_cols.c check_geoscvt_fncts.c \
	check_get_normal_row.c check_get_normal_row_bad_geopackage.c \
	check_get_normal_row_bad_geopackage2.c check_get_normal_zoom.c \
	check_get_normal_zoom_bad_geopackage.c \
	check_get_normal_zoom_bad_geopackage2.c \
	check_get_normal_zoom_extension_load.c check_gpkgConvert.c \
................................................................................
	check_gpkgCreateFeaturesTable.c check_gpkgCreateTilesTable.c \
	check_gpkgCreateTilesTableMissingSRID.c \
	check_gpkgCreateTilesZoomLevel.c check_gpkgGetImageFormat.c \
	check_gpkgGetImageFormat_nonblob.c \
	check_gpkgGetImageFormat_nonimage.c \
	check_gpkgGetImageFormat_png.c check_gpkgGetImageFormat_tiff.c \
	check_gpkgGetImageFormat_webp.c check_gpkgInsertEpsgSRID.c \
	check_gpkgMode.c check_gpkgVirtual.c \
	check_gpkg_base_core_container_data_file_format_application_id.c \
	check_gpkg_base_core_contents_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_values_default.c \
	check_gpkg_opt_extension_mechanism_extensions_data_table_def.c \
	check_init.c check_init2.c check_init_full.c check_libxml2.c \
	check_math_funcs.c check_mbrcache.c check_md5.c \
	check_metacatalog.c check_multithread.c check_network2d.c \
	check_network3d.c check_network_log.c check_recover_geom.c \
	check_relations_fncts.c check_sequence.c check_shp_load.c \
	check_shp_load_3d.c check_spatialindex.c check_sql_stmt.c \
	check_srid_fncts.c check_stored_proc.c check_styling.c \
	check_topology2d.c check_topology3d.c check_toponoface2d.c \
	check_topoplus.c check_toposnap.c check_version.c \

	check_virtual_ovflw.c check_virtualbbox.c check_virtualelem.c \
	check_virtualknn.c check_virtualtable1.c check_virtualtable2.c \
	check_virtualtable3.c check_virtualtable4.c \
	check_virtualtable5.c check_virtualtable6.c \
	check_virtualxpath.c check_wfsin.c check_wms.c \
	check_xls_load.c routing_test.c shape_3d.c shape_cp1252.c \
	shape_primitives.c shape_utf8_1.c shape_utf8_1ex.c \
	shape_utf8_2.c
DIST_SOURCES = check_add_tile_triggers.c \
	check_add_tile_triggers_bad_table_name.c check_bufovflw.c \
	check_clone_table.c check_control_points.c check_create.c \
	check_createBaseTables.c check_cutter.c check_dbf_load.c \
	check_dxf.c check_endian.c check_exif.c check_exif2.c \
	check_extension.c check_extra_relations_fncts.c check_fdo1.c \
	check_fdo2.c check_fdo3.c check_fdo_bufovflw.c \
	check_gaia_utf8.c check_gaia_util.c check_geom_aux.c \
	check_geometry_cols.c check_geoscvt_fncts.c \
	check_get_normal_row.c check_get_normal_row_bad_geopackage.c \
	check_get_normal_row_bad_geopackage2.c check_get_normal_zoom.c \
	check_get_normal_zoom_bad_geopackage.c \
	check_get_normal_zoom_bad_geopackage2.c \
	check_get_normal_zoom_extension_load.c check_gpkgConvert.c \
................................................................................
	check_gpkgCreateFeaturesTable.c check_gpkgCreateTilesTable.c \
	check_gpkgCreateTilesTableMissingSRID.c \
	check_gpkgCreateTilesZoomLevel.c check_gpkgGetImageFormat.c \
	check_gpkgGetImageFormat_nonblob.c \
	check_gpkgGetImageFormat_nonimage.c \
	check_gpkgGetImageFormat_png.c check_gpkgGetImageFormat_tiff.c \
	check_gpkgGetImageFormat_webp.c check_gpkgInsertEpsgSRID.c \
	check_gpkgMode.c check_gpkgVirtual.c \
	check_gpkg_base_core_container_data_file_format_application_id.c \
	check_gpkg_base_core_contents_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_values_default.c \
	check_gpkg_opt_extension_mechanism_extensions_data_table_def.c \
	check_init.c check_init2.c check_init_full.c check_libxml2.c \
	check_math_funcs.c check_mbrcache.c check_md5.c \
	check_metacatalog.c check_multithread.c check_network2d.c \
	check_network3d.c check_network_log.c check_recover_geom.c \
	check_relations_fncts.c check_sequence.c check_shp_load.c \
	check_shp_load_3d.c check_spatialindex.c check_sql_stmt.c \
	check_srid_fncts.c check_stored_proc.c check_styling.c \
	check_topology2d.c check_topology3d.c check_toponoface2d.c \
	check_topoplus.c check_toposnap.c check_version.c \

	check_virtual_ovflw.c check_virtualbbox.c check_virtualelem.c \
	check_virtualknn.c check_virtualtable1.c check_virtualtable2.c \
	check_virtualtable3.c check_virtualtable4.c \
	check_virtualtable5.c check_virtualtable6.c \
	check_virtualxpath.c check_wfsin.c check_wms.c \
	check_xls_load.c routing_test.c shape_3d.c shape_cp1252.c \
	shape_primitives.c shape_utf8_1.c shape_utf8_1ex.c \
	shape_utf8_2.c
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-recursive dvi-recursive html-recursive info-recursive \
	install-data-recursive install-dvi-recursive \
	install-exec-recursive install-html-recursive \
	install-info-recursive install-pdf-recursive \
	install-ps-recursive install-recursive installcheck-recursive \
	installdirs-recursive pdf-recursive ps-recursive \
................................................................................
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
	$(TEST_LOG_FLAGS)
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
	$(top_srcdir)/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
AM_CFLAGS = -I@srcdir@/../src/headers -I@srcdir@
@MINGW_FALSE@AM_LDFLAGS = -L../src -lpthread -lspatialite -lm -lxml2 $(GCOV_FLAGS)
@MINGW_TRUE@AM_LDFLAGS = -L../src -lspatialite -lm -lxml2 $(GCOV_FLAGS)
TESTS = $(check_PROGRAMS)
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda

EXTRA_DIST = fnmatch_impl4win.h \
	fnmatch4win.h \
	scandir4win.h \
	test_helpers.h \
	shapetest1.dbf \
	shapetest1.prj \
	shapetest1.qpj \
	shapetest1.shp \
................................................................................
	shapetest1.shx \
	test_under_valgrind.sh \
	WritingSQLTestCase.txt \
	test-legacy-2.3.1.sqlite \
	test-legacy-3.0.1.sqlite \
	test-invalid.sqlite \
	test_geos.sqlite \
	elba-sezcen.sqlite \
	shp/new-caledonia/buildings.dbf \
	shp/new-caledonia/buildings.prj \
	shp/new-caledonia/buildings.shp \
	shp/new-caledonia/buildings.shx \
	shp/new-caledonia/points.dbf \
	shp/new-caledonia/points.prj \
	shp/new-caledonia/points.shp \
................................................................................
	Apple-iPhone-4.jpg empty.png  empty.tif \
	test.wfs testDescribeFeatureType.wfs \
	getcapabilities-1.0.0.wfs \
	getcapabilities-1.1.0.wfs \
	describefeaturetype.wfs	\
	22.dxf f06.dxf l02.dxf p05.dxf \
	archaic.dxf linked.dxf hatch.dxf \
	symbol.dxf gpkg_test.sqlite gpkg_test.gpkg \
	gpkg_test_broken.gpkg gpkg_test_extrasrid.gpkg \
	elba-pg.shp elba-pg.shx elba-pg.dbf \
	elba-ln.shp elba-ln.shx elba-ln.dbf \
	Gpx-sample.gpx 000323485.gpx \
	sqlproc_sample.txt sqlproc_logfile.txt \
	sqlproc_error.txt orbetello.sqlite

SUBDIRS = sql_stmt_geosadvanced_tests sql_stmt_geos_tests \
	sql_stmt_libxml2_tests sql_stmt_rtgeom_tests \
	sql_stmt_mathsql_tests sql_stmt_proj_tests \
	sql_stmt_proj492_tests sql_stmt_proj493_tests \
	sql_stmt_security_tests sql_stmt_tests \
	sql_stmt_xmlsec_tests sql_stmt_geopackage_tests \
	sql_stmt_freexl_tests sql_stmt_cache_tests \
	sql_stmt_nocache_tests sql_stmt_voronoj1_tests \
	sql_stmt_voronoj2_tests \
	sql_stmt_gpkg_epsg492_tests sql_stmt_gpkg_epsg493_tests \
	sql_stmt_rttopo_tests sql_stmt_gpkgcache_tests \
	sql_stmt_gpkgnocache_tests sql_stmt_sequence_tests \
	sql_stmt_routing_tests sql_stmt_logfile_tests \
	sql_stmt_iconv_tests sql_stmt_point_geom \
	sql_stmt_tiny_point

all: all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	@rm -f check_bufovflw$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_bufovflw_OBJECTS) $(check_bufovflw_LDADD) $(LIBS)

check_clone_table$(EXEEXT): $(check_clone_table_OBJECTS) $(check_clone_table_DEPENDENCIES) $(EXTRA_check_clone_table_DEPENDENCIES) 
	@rm -f check_clone_table$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_clone_table_OBJECTS) $(check_clone_table_LDADD) $(LIBS)

check_control_points$(EXEEXT): $(check_control_points_OBJECTS) $(check_control_points_DEPENDENCIES) $(EXTRA_check_control_points_DEPENDENCIES) 
	@rm -f check_control_points$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_control_points_OBJECTS) $(check_control_points_LDADD) $(LIBS)

check_create$(EXEEXT): $(check_create_OBJECTS) $(check_create_DEPENDENCIES) $(EXTRA_check_create_DEPENDENCIES) 
	@rm -f check_create$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_create_OBJECTS) $(check_create_LDADD) $(LIBS)

check_createBaseTables$(EXEEXT): $(check_createBaseTables_OBJECTS) $(check_createBaseTables_DEPENDENCIES) $(EXTRA_check_createBaseTables_DEPENDENCIES) 
	@rm -f check_createBaseTables$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_createBaseTables_OBJECTS) $(check_createBaseTables_LDADD) $(LIBS)

check_cutter$(EXEEXT): $(check_cutter_OBJECTS) $(check_cutter_DEPENDENCIES) $(EXTRA_check_cutter_DEPENDENCIES) 
	@rm -f check_cutter$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_cutter_OBJECTS) $(check_cutter_LDADD) $(LIBS)

check_dbf_load$(EXEEXT): $(check_dbf_load_OBJECTS) $(check_dbf_load_DEPENDENCIES) $(EXTRA_check_dbf_load_DEPENDENCIES) 
	@rm -f check_dbf_load$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_dbf_load_OBJECTS) $(check_dbf_load_LDADD) $(LIBS)

check_dxf$(EXEEXT): $(check_dxf_OBJECTS) $(check_dxf_DEPENDENCIES) $(EXTRA_check_dxf_DEPENDENCIES) 
	@rm -f check_dxf$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_dxf_OBJECTS) $(check_dxf_LDADD) $(LIBS)
................................................................................
	@rm -f check_gpkgGetImageFormat_webp$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgGetImageFormat_webp_OBJECTS) $(check_gpkgGetImageFormat_webp_LDADD) $(LIBS)

check_gpkgInsertEpsgSRID$(EXEEXT): $(check_gpkgInsertEpsgSRID_OBJECTS) $(check_gpkgInsertEpsgSRID_DEPENDENCIES) $(EXTRA_check_gpkgInsertEpsgSRID_DEPENDENCIES) 
	@rm -f check_gpkgInsertEpsgSRID$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgInsertEpsgSRID_OBJECTS) $(check_gpkgInsertEpsgSRID_LDADD) $(LIBS)

check_gpkgMode$(EXEEXT): $(check_gpkgMode_OBJECTS) $(check_gpkgMode_DEPENDENCIES) $(EXTRA_check_gpkgMode_DEPENDENCIES) 
	@rm -f check_gpkgMode$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgMode_OBJECTS) $(check_gpkgMode_LDADD) $(LIBS)

check_gpkgVirtual$(EXEEXT): $(check_gpkgVirtual_OBJECTS) $(check_gpkgVirtual_DEPENDENCIES) $(EXTRA_check_gpkgVirtual_DEPENDENCIES) 
	@rm -f check_gpkgVirtual$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgVirtual_OBJECTS) $(check_gpkgVirtual_LDADD) $(LIBS)

check_gpkg_base_core_container_data_file_format_application_id$(EXEEXT): $(check_gpkg_base_core_container_data_file_format_application_id_OBJECTS) $(check_gpkg_base_core_container_data_file_format_application_id_DEPENDENCIES) $(EXTRA_check_gpkg_base_core_container_data_file_format_application_id_DEPENDENCIES) 
	@rm -f check_gpkg_base_core_container_data_file_format_application_id$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkg_base_core_container_data_file_format_application_id_OBJECTS) $(check_gpkg_base_core_container_data_file_format_application_id_LDADD) $(LIBS)
................................................................................
	@rm -f check_init$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_init_OBJECTS) $(check_init_LDADD) $(LIBS)

check_init2$(EXEEXT): $(check_init2_OBJECTS) $(check_init2_DEPENDENCIES) $(EXTRA_check_init2_DEPENDENCIES) 
	@rm -f check_init2$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_init2_OBJECTS) $(check_init2_LDADD) $(LIBS)

check_init_full$(EXEEXT): $(check_init_full_OBJECTS) $(check_init_full_DEPENDENCIES) $(EXTRA_check_init_full_DEPENDENCIES) 
	@rm -f check_init_full$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_init_full_OBJECTS) $(check_init_full_LDADD) $(LIBS)

check_libxml2$(EXEEXT): $(check_libxml2_OBJECTS) $(check_libxml2_DEPENDENCIES) $(EXTRA_check_libxml2_DEPENDENCIES) 
	@rm -f check_libxml2$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_libxml2_OBJECTS) $(check_libxml2_LDADD) $(LIBS)

check_math_funcs$(EXEEXT): $(check_math_funcs_OBJECTS) $(check_math_funcs_DEPENDENCIES) $(EXTRA_check_math_funcs_DEPENDENCIES) 
	@rm -f check_math_funcs$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_math_funcs_OBJECTS) $(check_math_funcs_LDADD) $(LIBS)
................................................................................
	@rm -f check_metacatalog$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_metacatalog_OBJECTS) $(check_metacatalog_LDADD) $(LIBS)

check_multithread$(EXEEXT): $(check_multithread_OBJECTS) $(check_multithread_DEPENDENCIES) $(EXTRA_check_multithread_DEPENDENCIES) 
	@rm -f check_multithread$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_multithread_OBJECTS) $(check_multithread_LDADD) $(LIBS)

check_network2d$(EXEEXT): $(check_network2d_OBJECTS) $(check_network2d_DEPENDENCIES) $(EXTRA_check_network2d_DEPENDENCIES) 
	@rm -f check_network2d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_network2d_OBJECTS) $(check_network2d_LDADD) $(LIBS)

check_network3d$(EXEEXT): $(check_network3d_OBJECTS) $(check_network3d_DEPENDENCIES) $(EXTRA_check_network3d_DEPENDENCIES) 
	@rm -f check_network3d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_network3d_OBJECTS) $(check_network3d_LDADD) $(LIBS)

check_network_log$(EXEEXT): $(check_network_log_OBJECTS) $(check_network_log_DEPENDENCIES) $(EXTRA_check_network_log_DEPENDENCIES) 
	@rm -f check_network_log$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_network_log_OBJECTS) $(check_network_log_LDADD) $(LIBS)

check_recover_geom$(EXEEXT): $(check_recover_geom_OBJECTS) $(check_recover_geom_DEPENDENCIES) $(EXTRA_check_recover_geom_DEPENDENCIES) 
	@rm -f check_recover_geom$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_recover_geom_OBJECTS) $(check_recover_geom_LDADD) $(LIBS)

check_relations_fncts$(EXEEXT): $(check_relations_fncts_OBJECTS) $(check_relations_fncts_DEPENDENCIES) $(EXTRA_check_relations_fncts_DEPENDENCIES) 
	@rm -f check_relations_fncts$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_relations_fncts_OBJECTS) $(check_relations_fncts_LDADD) $(LIBS)

check_sequence$(EXEEXT): $(check_sequence_OBJECTS) $(check_sequence_DEPENDENCIES) $(EXTRA_check_sequence_DEPENDENCIES) 
	@rm -f check_sequence$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_sequence_OBJECTS) $(check_sequence_LDADD) $(LIBS)

check_shp_load$(EXEEXT): $(check_shp_load_OBJECTS) $(check_shp_load_DEPENDENCIES) $(EXTRA_check_shp_load_DEPENDENCIES) 
	@rm -f check_shp_load$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_shp_load_OBJECTS) $(check_shp_load_LDADD) $(LIBS)

check_shp_load_3d$(EXEEXT): $(check_shp_load_3d_OBJECTS) $(check_shp_load_3d_DEPENDENCIES) $(EXTRA_check_shp_load_3d_DEPENDENCIES) 
	@rm -f check_shp_load_3d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_shp_load_3d_OBJECTS) $(check_shp_load_3d_LDADD) $(LIBS)
................................................................................
	@rm -f check_sql_stmt$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_sql_stmt_OBJECTS) $(check_sql_stmt_LDADD) $(LIBS)

check_srid_fncts$(EXEEXT): $(check_srid_fncts_OBJECTS) $(check_srid_fncts_DEPENDENCIES) $(EXTRA_check_srid_fncts_DEPENDENCIES) 
	@rm -f check_srid_fncts$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_srid_fncts_OBJECTS) $(check_srid_fncts_LDADD) $(LIBS)

check_stored_proc$(EXEEXT): $(check_stored_proc_OBJECTS) $(check_stored_proc_DEPENDENCIES) $(EXTRA_check_stored_proc_DEPENDENCIES) 
	@rm -f check_stored_proc$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_stored_proc_OBJECTS) $(check_stored_proc_LDADD) $(LIBS)

check_styling$(EXEEXT): $(check_styling_OBJECTS) $(check_styling_DEPENDENCIES) $(EXTRA_check_styling_DEPENDENCIES) 
	@rm -f check_styling$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_styling_OBJECTS) $(check_styling_LDADD) $(LIBS)

check_topology2d$(EXEEXT): $(check_topology2d_OBJECTS) $(check_topology2d_DEPENDENCIES) $(EXTRA_check_topology2d_DEPENDENCIES) 
	@rm -f check_topology2d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_topology2d_OBJECTS) $(check_topology2d_LDADD) $(LIBS)

check_topology3d$(EXEEXT): $(check_topology3d_OBJECTS) $(check_topology3d_DEPENDENCIES) $(EXTRA_check_topology3d_DEPENDENCIES) 
	@rm -f check_topology3d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_topology3d_OBJECTS) $(check_topology3d_LDADD) $(LIBS)

check_toponoface2d$(EXEEXT): $(check_toponoface2d_OBJECTS) $(check_toponoface2d_DEPENDENCIES) $(EXTRA_check_toponoface2d_DEPENDENCIES) 
	@rm -f check_toponoface2d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_toponoface2d_OBJECTS) $(check_toponoface2d_LDADD) $(LIBS)

check_topoplus$(EXEEXT): $(check_topoplus_OBJECTS) $(check_topoplus_DEPENDENCIES) $(EXTRA_check_topoplus_DEPENDENCIES) 
	@rm -f check_topoplus$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_topoplus_OBJECTS) $(check_topoplus_LDADD) $(LIBS)

check_toposnap$(EXEEXT): $(check_toposnap_OBJECTS) $(check_toposnap_DEPENDENCIES) $(EXTRA_check_toposnap_DEPENDENCIES) 
	@rm -f check_toposnap$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_toposnap_OBJECTS) $(check_toposnap_LDADD) $(LIBS)

check_version$(EXEEXT): $(check_version_OBJECTS) $(check_version_DEPENDENCIES) $(EXTRA_check_version_DEPENDENCIES) 
	@rm -f check_version$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_version_OBJECTS) $(check_version_LDADD) $(LIBS)

check_virtual_ovflw$(EXEEXT): $(check_virtual_ovflw_OBJECTS) $(check_virtual_ovflw_DEPENDENCIES) $(EXTRA_check_virtual_ovflw_DEPENDENCIES) 
	@rm -f check_virtual_ovflw$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtual_ovflw_OBJECTS) $(check_virtual_ovflw_LDADD) $(LIBS)
................................................................................
	@rm -f check_virtualbbox$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualbbox_OBJECTS) $(check_virtualbbox_LDADD) $(LIBS)

check_virtualelem$(EXEEXT): $(check_virtualelem_OBJECTS) $(check_virtualelem_DEPENDENCIES) $(EXTRA_check_virtualelem_DEPENDENCIES) 
	@rm -f check_virtualelem$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualelem_OBJECTS) $(check_virtualelem_LDADD) $(LIBS)

check_virtualknn$(EXEEXT): $(check_virtualknn_OBJECTS) $(check_virtualknn_DEPENDENCIES) $(EXTRA_check_virtualknn_DEPENDENCIES) 
	@rm -f check_virtualknn$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualknn_OBJECTS) $(check_virtualknn_LDADD) $(LIBS)

check_virtualtable1$(EXEEXT): $(check_virtualtable1_OBJECTS) $(check_virtualtable1_DEPENDENCIES) $(EXTRA_check_virtualtable1_DEPENDENCIES) 
	@rm -f check_virtualtable1$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualtable1_OBJECTS) $(check_virtualtable1_LDADD) $(LIBS)

check_virtualtable2$(EXEEXT): $(check_virtualtable2_OBJECTS) $(check_virtualtable2_DEPENDENCIES) $(EXTRA_check_virtualtable2_DEPENDENCIES) 
	@rm -f check_virtualtable2$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualtable2_OBJECTS) $(check_virtualtable2_LDADD) $(LIBS)
................................................................................
	@rm -f check_virtualxpath$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualxpath_OBJECTS) $(check_virtualxpath_LDADD) $(LIBS)

check_wfsin$(EXEEXT): $(check_wfsin_OBJECTS) $(check_wfsin_DEPENDENCIES) $(EXTRA_check_wfsin_DEPENDENCIES) 
	@rm -f check_wfsin$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_wfsin_OBJECTS) $(check_wfsin_LDADD) $(LIBS)

check_wms$(EXEEXT): $(check_wms_OBJECTS) $(check_wms_DEPENDENCIES) $(EXTRA_check_wms_DEPENDENCIES) 
	@rm -f check_wms$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_wms_OBJECTS) $(check_wms_LDADD) $(LIBS)

check_xls_load$(EXEEXT): $(check_xls_load_OBJECTS) $(check_xls_load_DEPENDENCIES) $(EXTRA_check_xls_load_DEPENDENCIES) 
	@rm -f check_xls_load$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_xls_load_OBJECTS) $(check_xls_load_LDADD) $(LIBS)

routing_test$(EXEEXT): $(routing_test_OBJECTS) $(routing_test_DEPENDENCIES) $(EXTRA_routing_test_DEPENDENCIES) 
	@rm -f routing_test$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(routing_test_OBJECTS) $(routing_test_LDADD) $(LIBS)

shape_3d$(EXEEXT): $(shape_3d_OBJECTS) $(shape_3d_DEPENDENCIES) $(EXTRA_shape_3d_DEPENDENCIES) 
	@rm -f shape_3d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(shape_3d_OBJECTS) $(shape_3d_LDADD) $(LIBS)

shape_cp1252$(EXEEXT): $(shape_cp1252_OBJECTS) $(shape_cp1252_DEPENDENCIES) $(EXTRA_shape_cp1252_DEPENDENCIES) 
	@rm -f shape_cp1252$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(shape_cp1252_OBJECTS) $(shape_cp1252_LDADD) $(LIBS)
................................................................................
distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_add_tile_triggers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_add_tile_triggers_bad_table_name.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_bufovflw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_clone_table.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_control_points.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_create.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_createBaseTables.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cutter.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dbf_load.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dxf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_endian.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_exif.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_exif2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_extension.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_extra_relations_fncts.Po@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_nonblob.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_nonimage.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_png.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_tiff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_webp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgInsertEpsgSRID.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgMode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgVirtual.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_container_data_file_format_application_id.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_contents_data_table_def.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_spatial_ref_sys_data_table_def.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_spatial_ref_sys_data_values_default.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_opt_extension_mechanism_extensions_data_table_def.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_init.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_init2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_init_full.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_libxml2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_math_funcs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mbrcache.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_metacatalog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_multithread.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_network2d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_network3d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_network_log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_recover_geom.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_relations_fncts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_sequence.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_shp_load.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_shp_load_3d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_spatialindex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_sql_stmt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_srid_fncts.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_stored_proc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_styling.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_topology2d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_topology3d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_toponoface2d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_topoplus.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_toposnap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_version.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtual_ovflw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualbbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualelem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualknn.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualxpath.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_wfsin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_wms.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_xls_load.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/routing_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_3d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_cp1252.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_primitives.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_utf8_1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_utf8_1ex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_utf8_2.Po@am__quote@

................................................................................
	  if $(am__make_dryrun); then :; else \
	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
	  fi; \
	fi; \
	if test -n "$$am__remaking_logs"; then \
	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
	       "recursion detected" >&2; \
	elif test -n "$$redo_logs"; then \
	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
	fi; \
	if $(am__make_dryrun); then :; else \
	  st=0;  \
	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
	  for i in $$redo_bases; do \
	    test -f $$i.trs && test -r $$i.trs \
................................................................................
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_init2.log: check_init2$(EXEEXT)
	@p='check_init2$(EXEEXT)'; \
	b='check_init2'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_init_full.log: check_init_full$(EXEEXT)
	@p='check_init_full$(EXEEXT)'; \
	b='check_init_full'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_geom_aux.log: check_geom_aux$(EXEEXT)
	@p='check_geom_aux$(EXEEXT)'; \
	b='check_geom_aux'; \
................................................................................
check_srid_fncts.log: check_srid_fncts$(EXEEXT)
	@p='check_srid_fncts$(EXEEXT)'; \
	b='check_srid_fncts'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_control_points.log: check_control_points$(EXEEXT)
	@p='check_control_points$(EXEEXT)'; \
	b='check_control_points'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_cutter.log: check_cutter$(EXEEXT)
	@p='check_cutter$(EXEEXT)'; \
	b='check_cutter'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_topology2d.log: check_topology2d$(EXEEXT)
	@p='check_topology2d$(EXEEXT)'; \
	b='check_topology2d'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_topology3d.log: check_topology3d$(EXEEXT)
	@p='check_topology3d$(EXEEXT)'; \
	b='check_topology3d'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_toponoface2d.log: check_toponoface2d$(EXEEXT)
	@p='check_toponoface2d$(EXEEXT)'; \
	b='check_toponoface2d'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_topoplus.log: check_topoplus$(EXEEXT)
	@p='check_topoplus$(EXEEXT)'; \
	b='check_topoplus'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_toposnap.log: check_toposnap$(EXEEXT)
	@p='check_toposnap$(EXEEXT)'; \
	b='check_toposnap'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_network2d.log: check_network2d$(EXEEXT)
	@p='check_network2d$(EXEEXT)'; \
	b='check_network2d'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_network3d.log: check_network3d$(EXEEXT)
	@p='check_network3d$(EXEEXT)'; \
	b='check_network3d'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_network_log.log: check_network_log$(EXEEXT)
	@p='check_network_log$(EXEEXT)'; \
	b='check_network_log'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_virtualknn.log: check_virtualknn$(EXEEXT)
	@p='check_virtualknn$(EXEEXT)'; \
	b='check_virtualknn'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_sequence.log: check_sequence$(EXEEXT)
	@p='check_sequence$(EXEEXT)'; \
	b='check_sequence'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_stored_proc.log: check_stored_proc$(EXEEXT)
	@p='check_stored_proc$(EXEEXT)'; \
	b='check_stored_proc'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_wms.log: check_wms$(EXEEXT)
	@p='check_wms$(EXEEXT)'; \
	b='check_wms'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
routing_test.log: routing_test$(EXEEXT)
	@p='routing_test$(EXEEXT)'; \
	b='routing_test'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_createBaseTables.log: check_createBaseTables$(EXEEXT)
	@p='check_createBaseTables$(EXEEXT)'; \
	b='check_createBaseTables'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
................................................................................
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_gpkgInsertEpsgSRID.log: check_gpkgInsertEpsgSRID$(EXEEXT)
	@p='check_gpkgInsertEpsgSRID$(EXEEXT)'; \
	b='check_gpkgInsertEpsgSRID'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_gpkgMode.log: check_gpkgMode$(EXEEXT)
	@p='check_gpkgMode$(EXEEXT)'; \
	b='check_gpkgMode'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_gpkgCreateFeaturesTable.log: check_gpkgCreateFeaturesTable$(EXEEXT)
	@p='check_gpkgCreateFeaturesTable$(EXEEXT)'; \
	b='check_gpkgCreateFeaturesTable'; \
................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
	uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







|
|
<
|







 







<
<
<
<
<
<
<
|





|







 







>
>







<










<







 







<
<
<






<
<
<







 







<
<
<







 







<
<
<







 







<
<
<
<
<
<
<
<
<






<
<
<







 







<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












<
<
<







 







<
<
<



<
<
<







 







|
<
|
|
|







 







|





|
|
|
<
|
|
<
<
<
>
|
<
|
|
|
|
|
<


|
<
|
|
|







 







|





|
|
|
<
|
|
<
<
<
>
|
<
|
|
|
|
|
<







 







<
<







 







<
|


>
|







 







<







 







|
<
<
<
<
<
<


|

<


|
<
<
<
<
<
<
<
<







 







>







 







<
<
<
<








<
<
<
<







 







<
<
<
<







 







<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<







 







<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<







 







<
<
<
<




<
<
<
<







 







<


<







 







<








<






<
<
<


<





<

<
<
<
<
<




<








<

<







 







|







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
75
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
91
...
100
101
102
103
104
105
106







107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147

148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
...
192
193
194
195
196
197
198



199
200
201
202
203
204



205
206
207
208
209
210
211
...
330
331
332
333
334
335
336



337
338
339
340
341
342
343
...
362
363
364
365
366
367
368



369
370
371
372
373
374
375
...
380
381
382
383
384
385
386









387
388
389
390
391
392



393
394
395
396
397
398
399
...
401
402
403
404
405
406
407



408
409
410















411
412
413
414
415
416
417
418
419
420
421
422



423
424
425
426
427
428
429
...
440
441
442
443
444
445
446



447
448
449



450
451
452
453
454
455
456
...
497
498
499
500
501
502
503
504

505
506
507
508
509
510
511
512
513
514
...
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

531
532



533
534

535
536
537
538
539

540
541
542

543
544
545
546
547
548
549
550
551
552
...
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568

569
570



571
572

573
574
575
576
577

578
579
580
581
582
583
584
...
815
816
817
818
819
820
821


822
823
824
825
826
827
828
...
972
973
974
975
976
977
978

979
980
981
982
983
984
985
986
987
988
989
990
...
991
992
993
994
995
996
997

998
999
1000
1001
1002
1003
1004
....
1058
1059
1060
1061
1062
1063
1064
1065






1066
1067
1068
1069

1070
1071
1072








1073
1074
1075
1076
1077
1078
1079
....
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
....
1127
1128
1129
1130
1131
1132
1133




1134
1135
1136
1137
1138
1139
1140
1141




1142
1143
1144
1145
1146
1147
1148
....
1275
1276
1277
1278
1279
1280
1281




1282
1283
1284
1285
1286
1287
1288
....
1307
1308
1309
1310
1311
1312
1313




1314
1315
1316
1317
1318
1319
1320
....
1331
1332
1333
1334
1335
1336
1337












1338
1339
1340
1341
1342
1343
1344
1345




1346
1347
1348
1349
1350
1351
1352
....
1359
1360
1361
1362
1363
1364
1365




1366
1367
1368
1369




















1370
1371
1372
1373
1374
1375
1376
....
1379
1380
1381
1382
1383
1384
1385




1386
1387
1388
1389
1390
1391
1392
....
1411
1412
1413
1414
1415
1416
1417




1418
1419
1420
1421




1422
1423
1424
1425
1426
1427
1428
....
1449
1450
1451
1452
1453
1454
1455

1456
1457

1458
1459
1460
1461
1462
1463
1464
....
1486
1487
1488
1489
1490
1491
1492

1493
1494
1495
1496
1497
1498
1499
1500

1501
1502
1503
1504
1505
1506



1507
1508

1509
1510
1511
1512
1513

1514





1515
1516
1517
1518

1519
1520
1521
1522
1523
1524
1525
1526

1527

1528
1529
1530
1531
1532
1533
1534
....
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
....
1819
1820
1821
1822
1823
1824
1825







1826
1827
1828
1829
1830
1831
1832
....
2173
2174
2175
2176
2177
2178
2179









































































































2180
2181
2182
2183
2184
2185
2186
....
2204
2205
2206
2207
2208
2209
2210







2211
2212
2213
2214
2215
2216
2217
....
2568
2569
2570
2571
2572
2573
2574


2575
2576
2577
2578
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
check_PROGRAMS = check_endian$(EXEEXT) check_version$(EXEEXT) \
	check_init$(EXEEXT) check_init2$(EXEEXT) \
	check_geom_aux$(EXEEXT) check_geometry_cols$(EXEEXT) \
	check_create$(EXEEXT) check_bufovflw$(EXEEXT) \

	check_fdo1$(EXEEXT) check_fdo2$(EXEEXT) check_fdo3$(EXEEXT) \
	check_fdo_bufovflw$(EXEEXT) check_md5$(EXEEXT) \
	check_dbf_load$(EXEEXT) check_shp_load$(EXEEXT) \
	check_shp_load_3d$(EXEEXT) shape_cp1252$(EXEEXT) \
	shape_primitives$(EXEEXT) shape_utf8_1$(EXEEXT) \
	shape_utf8_1ex$(EXEEXT) shape_utf8_2$(EXEEXT) \
	shape_3d$(EXEEXT) check_clone_table$(EXEEXT) \
	check_xls_load$(EXEEXT) check_math_funcs$(EXEEXT) \
................................................................................
	check_exif2$(EXEEXT) check_relations_fncts$(EXEEXT) \
	check_extra_relations_fncts$(EXEEXT) \
	check_geoscvt_fncts$(EXEEXT) check_libxml2$(EXEEXT) \
	check_styling$(EXEEXT) check_virtualxpath$(EXEEXT) \
	check_virtualbbox$(EXEEXT) check_wfsin$(EXEEXT) \
	check_dxf$(EXEEXT) check_metacatalog$(EXEEXT) \
	check_virtualelem$(EXEEXT) check_srid_fncts$(EXEEXT) \







	$(am__EXEEXT_1)
@ENABLE_GEOPACKAGE_TRUE@am__append_1 = \
@ENABLE_GEOPACKAGE_TRUE@		check_createBaseTables \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateTilesTable \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateTilesTableMissingSRID \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateTilesZoomLevel \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgInsertEpsgSRID \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgCreateFeaturesTable \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_container_data_file_format_application_id \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_spatial_ref_sys_data_table_def \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_spatial_ref_sys_data_values_default \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_base_core_contents_data_table_def \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkg_opt_extension_mechanism_extensions_data_table_def \
@ENABLE_GEOPACKAGE_TRUE@		check_add_tile_triggers \
................................................................................
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgGetImageFormat_png \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgGetImageFormat_tiff \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgGetImageFormat_webp \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgConvert \
@ENABLE_GEOPACKAGE_TRUE@		check_gpkgVirtual

subdir = test
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/depcomp $(top_srcdir)/test-driver
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@ENABLE_GEOPACKAGE_TRUE@am__EXEEXT_1 =  \
@ENABLE_GEOPACKAGE_TRUE@	check_createBaseTables$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateTilesTable$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateTilesTableMissingSRID$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateTilesZoomLevel$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkgInsertEpsgSRID$(EXEEXT) \

@ENABLE_GEOPACKAGE_TRUE@	check_gpkgCreateFeaturesTable$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_container_data_file_format_application_id$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_spatial_ref_sys_data_table_def$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_spatial_ref_sys_data_values_default$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_base_core_contents_data_table_def$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_gpkg_opt_extension_mechanism_extensions_data_table_def$(EXEEXT) \
@ENABLE_GEOPACKAGE_TRUE@	check_add_tile_triggers$(EXEEXT) \
................................................................................
check_add_tile_triggers_bad_table_name_LDADD = $(LDADD)
check_bufovflw_SOURCES = check_bufovflw.c
check_bufovflw_OBJECTS = check_bufovflw.$(OBJEXT)
check_bufovflw_LDADD = $(LDADD)
check_clone_table_SOURCES = check_clone_table.c
check_clone_table_OBJECTS = check_clone_table.$(OBJEXT)
check_clone_table_LDADD = $(LDADD)



check_create_SOURCES = check_create.c
check_create_OBJECTS = check_create.$(OBJEXT)
check_create_LDADD = $(LDADD)
check_createBaseTables_SOURCES = check_createBaseTables.c
check_createBaseTables_OBJECTS = check_createBaseTables.$(OBJEXT)
check_createBaseTables_LDADD = $(LDADD)



check_dbf_load_SOURCES = check_dbf_load.c
check_dbf_load_OBJECTS = check_dbf_load.$(OBJEXT)
check_dbf_load_LDADD = $(LDADD)
check_dxf_SOURCES = check_dxf.c
check_dxf_OBJECTS = check_dxf.$(OBJEXT)
check_dxf_LDADD = $(LDADD)
check_endian_SOURCES = check_endian.c
................................................................................
	check_gpkgGetImageFormat_webp.c
check_gpkgGetImageFormat_webp_OBJECTS =  \
	check_gpkgGetImageFormat_webp.$(OBJEXT)
check_gpkgGetImageFormat_webp_LDADD = $(LDADD)
check_gpkgInsertEpsgSRID_SOURCES = check_gpkgInsertEpsgSRID.c
check_gpkgInsertEpsgSRID_OBJECTS = check_gpkgInsertEpsgSRID.$(OBJEXT)
check_gpkgInsertEpsgSRID_LDADD = $(LDADD)



check_gpkgVirtual_SOURCES = check_gpkgVirtual.c
check_gpkgVirtual_OBJECTS = check_gpkgVirtual.$(OBJEXT)
check_gpkgVirtual_LDADD = $(LDADD)
check_gpkg_base_core_container_data_file_format_application_id_SOURCES = check_gpkg_base_core_container_data_file_format_application_id.c
check_gpkg_base_core_container_data_file_format_application_id_OBJECTS = check_gpkg_base_core_container_data_file_format_application_id.$(OBJEXT)
check_gpkg_base_core_container_data_file_format_application_id_LDADD =  \
	$(LDADD)
................................................................................
	$(LDADD)
check_init_SOURCES = check_init.c
check_init_OBJECTS = check_init.$(OBJEXT)
check_init_LDADD = $(LDADD)
check_init2_SOURCES = check_init2.c
check_init2_OBJECTS = check_init2.$(OBJEXT)
check_init2_LDADD = $(LDADD)



check_libxml2_SOURCES = check_libxml2.c
check_libxml2_OBJECTS = check_libxml2.$(OBJEXT)
check_libxml2_LDADD = $(LDADD)
check_math_funcs_SOURCES = check_math_funcs.c
check_math_funcs_OBJECTS = check_math_funcs.$(OBJEXT)
check_math_funcs_LDADD = $(LDADD)
check_mbrcache_SOURCES = check_mbrcache.c
................................................................................
check_md5_LDADD = $(LDADD)
check_metacatalog_SOURCES = check_metacatalog.c
check_metacatalog_OBJECTS = check_metacatalog.$(OBJEXT)
check_metacatalog_LDADD = $(LDADD)
check_multithread_SOURCES = check_multithread.c
check_multithread_OBJECTS = check_multithread.$(OBJEXT)
check_multithread_LDADD = $(LDADD)









check_recover_geom_SOURCES = check_recover_geom.c
check_recover_geom_OBJECTS = check_recover_geom.$(OBJEXT)
check_recover_geom_LDADD = $(LDADD)
check_relations_fncts_SOURCES = check_relations_fncts.c
check_relations_fncts_OBJECTS = check_relations_fncts.$(OBJEXT)
check_relations_fncts_LDADD = $(LDADD)



check_shp_load_SOURCES = check_shp_load.c
check_shp_load_OBJECTS = check_shp_load.$(OBJEXT)
check_shp_load_LDADD = $(LDADD)
check_shp_load_3d_SOURCES = check_shp_load_3d.c
check_shp_load_3d_OBJECTS = check_shp_load_3d.$(OBJEXT)
check_shp_load_3d_LDADD = $(LDADD)
check_spatialindex_SOURCES = check_spatialindex.c
................................................................................
check_spatialindex_LDADD = $(LDADD)
check_sql_stmt_SOURCES = check_sql_stmt.c
check_sql_stmt_OBJECTS = check_sql_stmt.$(OBJEXT)
check_sql_stmt_LDADD = $(LDADD)
check_srid_fncts_SOURCES = check_srid_fncts.c
check_srid_fncts_OBJECTS = check_srid_fncts.$(OBJEXT)
check_srid_fncts_LDADD = $(LDADD)



check_styling_SOURCES = check_styling.c
check_styling_OBJECTS = check_styling.$(OBJEXT)
check_styling_LDADD = $(LDADD)















check_version_SOURCES = check_version.c
check_version_OBJECTS = check_version.$(OBJEXT)
check_version_LDADD = $(LDADD)
check_virtual_ovflw_SOURCES = check_virtual_ovflw.c
check_virtual_ovflw_OBJECTS = check_virtual_ovflw.$(OBJEXT)
check_virtual_ovflw_LDADD = $(LDADD)
check_virtualbbox_SOURCES = check_virtualbbox.c
check_virtualbbox_OBJECTS = check_virtualbbox.$(OBJEXT)
check_virtualbbox_LDADD = $(LDADD)
check_virtualelem_SOURCES = check_virtualelem.c
check_virtualelem_OBJECTS = check_virtualelem.$(OBJEXT)
check_virtualelem_LDADD = $(LDADD)



check_virtualtable1_SOURCES = check_virtualtable1.c
check_virtualtable1_OBJECTS = check_virtualtable1.$(OBJEXT)
check_virtualtable1_LDADD = $(LDADD)
check_virtualtable2_SOURCES = check_virtualtable2.c
check_virtualtable2_OBJECTS = check_virtualtable2.$(OBJEXT)
check_virtualtable2_LDADD = $(LDADD)
check_virtualtable3_SOURCES = check_virtualtable3.c
................................................................................
check_virtualtable6_LDADD = $(LDADD)
check_virtualxpath_SOURCES = check_virtualxpath.c
check_virtualxpath_OBJECTS = check_virtualxpath.$(OBJEXT)
check_virtualxpath_LDADD = $(LDADD)
check_wfsin_SOURCES = check_wfsin.c
check_wfsin_OBJECTS = check_wfsin.$(OBJEXT)
check_wfsin_LDADD = $(LDADD)



check_xls_load_SOURCES = check_xls_load.c
check_xls_load_OBJECTS = check_xls_load.$(OBJEXT)
check_xls_load_LDADD = $(LDADD)



shape_3d_SOURCES = shape_3d.c
shape_3d_OBJECTS = shape_3d.$(OBJEXT)
shape_3d_LDADD = $(LDADD)
shape_cp1252_SOURCES = shape_cp1252.c
shape_cp1252_OBJECTS = shape_cp1252.$(OBJEXT)
shape_cp1252_LDADD = $(LDADD)
shape_primitives_SOURCES = shape_primitives.c
................................................................................
	$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo "  CCLD    " $@;
am__v_CCLD_1 = 
SOURCES = check_add_tile_triggers.c \
	check_add_tile_triggers_bad_table_name.c check_bufovflw.c \
	check_clone_table.c check_create.c check_createBaseTables.c \

	check_dbf_load.c check_dxf.c check_endian.c check_exif.c \
	check_exif2.c check_extension.c check_extra_relations_fncts.c \
	check_fdo1.c check_fdo2.c check_fdo3.c check_fdo_bufovflw.c \
	check_gaia_utf8.c check_gaia_util.c check_geom_aux.c \
	check_geometry_cols.c check_geoscvt_fncts.c \
	check_get_normal_row.c check_get_normal_row_bad_geopackage.c \
	check_get_normal_row_bad_geopackage2.c check_get_normal_zoom.c \
	check_get_normal_zoom_bad_geopackage.c \
	check_get_normal_zoom_bad_geopackage2.c \
	check_get_normal_zoom_extension_load.c check_gpkgConvert.c \
................................................................................
	check_gpkgCreateFeaturesTable.c check_gpkgCreateTilesTable.c \
	check_gpkgCreateTilesTableMissingSRID.c \
	check_gpkgCreateTilesZoomLevel.c check_gpkgGetImageFormat.c \
	check_gpkgGetImageFormat_nonblob.c \
	check_gpkgGetImageFormat_nonimage.c \
	check_gpkgGetImageFormat_png.c check_gpkgGetImageFormat_tiff.c \
	check_gpkgGetImageFormat_webp.c check_gpkgInsertEpsgSRID.c \
	check_gpkgVirtual.c \
	check_gpkg_base_core_container_data_file_format_application_id.c \
	check_gpkg_base_core_contents_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_values_default.c \
	check_gpkg_opt_extension_mechanism_extensions_data_table_def.c \
	check_init.c check_init2.c check_libxml2.c check_math_funcs.c \
	check_mbrcache.c check_md5.c check_metacatalog.c \
	check_multithread.c check_recover_geom.c \

	check_relations_fncts.c check_shp_load.c check_shp_load_3d.c \
	check_spatialindex.c check_sql_stmt.c check_srid_fncts.c \



	check_styling.c check_version.c check_virtual_ovflw.c \
	check_virtualbbox.c check_virtualelem.c check_virtualtable1.c \

	check_virtualtable2.c check_virtualtable3.c \
	check_virtualtable4.c check_virtualtable5.c \
	check_virtualtable6.c check_virtualxpath.c check_wfsin.c \
	check_xls_load.c shape_3d.c shape_cp1252.c shape_primitives.c \
	shape_utf8_1.c shape_utf8_1ex.c shape_utf8_2.c

DIST_SOURCES = check_add_tile_triggers.c \
	check_add_tile_triggers_bad_table_name.c check_bufovflw.c \
	check_clone_table.c check_create.c check_createBaseTables.c \

	check_dbf_load.c check_dxf.c check_endian.c check_exif.c \
	check_exif2.c check_extension.c check_extra_relations_fncts.c \
	check_fdo1.c check_fdo2.c check_fdo3.c check_fdo_bufovflw.c \
	check_gaia_utf8.c check_gaia_util.c check_geom_aux.c \
	check_geometry_cols.c check_geoscvt_fncts.c \
	check_get_normal_row.c check_get_normal_row_bad_geopackage.c \
	check_get_normal_row_bad_geopackage2.c check_get_normal_zoom.c \
	check_get_normal_zoom_bad_geopackage.c \
	check_get_normal_zoom_bad_geopackage2.c \
	check_get_normal_zoom_extension_load.c check_gpkgConvert.c \
................................................................................
	check_gpkgCreateFeaturesTable.c check_gpkgCreateTilesTable.c \
	check_gpkgCreateTilesTableMissingSRID.c \
	check_gpkgCreateTilesZoomLevel.c check_gpkgGetImageFormat.c \
	check_gpkgGetImageFormat_nonblob.c \
	check_gpkgGetImageFormat_nonimage.c \
	check_gpkgGetImageFormat_png.c check_gpkgGetImageFormat_tiff.c \
	check_gpkgGetImageFormat_webp.c check_gpkgInsertEpsgSRID.c \
	check_gpkgVirtual.c \
	check_gpkg_base_core_container_data_file_format_application_id.c \
	check_gpkg_base_core_contents_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_table_def.c \
	check_gpkg_base_core_spatial_ref_sys_data_values_default.c \
	check_gpkg_opt_extension_mechanism_extensions_data_table_def.c \
	check_init.c check_init2.c check_libxml2.c check_math_funcs.c \
	check_mbrcache.c check_md5.c check_metacatalog.c \
	check_multithread.c check_recover_geom.c \

	check_relations_fncts.c check_shp_load.c check_shp_load_3d.c \
	check_spatialindex.c check_sql_stmt.c check_srid_fncts.c \



	check_styling.c check_version.c check_virtual_ovflw.c \
	check_virtualbbox.c check_virtualelem.c check_virtualtable1.c \

	check_virtualtable2.c check_virtualtable3.c \
	check_virtualtable4.c check_virtualtable5.c \
	check_virtualtable6.c check_virtualxpath.c check_wfsin.c \
	check_xls_load.c shape_3d.c shape_cp1252.c shape_primitives.c \
	shape_utf8_1.c shape_utf8_1ex.c shape_utf8_2.c

RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-recursive dvi-recursive html-recursive info-recursive \
	install-data-recursive install-dvi-recursive \
	install-exec-recursive install-html-recursive \
	install-info-recursive install-pdf-recursive \
	install-ps-recursive install-recursive installcheck-recursive \
	installdirs-recursive pdf-recursive ps-recursive \
................................................................................
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
	$(TEST_LOG_FLAGS)
DIST_SUBDIRS = $(SUBDIRS)


DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
................................................................................
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
AM_CFLAGS = -I@srcdir@/../src/headers -I@srcdir@

AM_LDFLAGS = -L../src -lspatialite -lm $(GCOV_FLAGS)
TESTS = $(check_PROGRAMS)
MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
EXTRA_DIST = asprintf4win.h \
	fnmatch_impl4win.h \
	fnmatch4win.h \
	scandir4win.h \
	test_helpers.h \
	shapetest1.dbf \
	shapetest1.prj \
	shapetest1.qpj \
	shapetest1.shp \
................................................................................
	shapetest1.shx \
	test_under_valgrind.sh \
	WritingSQLTestCase.txt \
	test-legacy-2.3.1.sqlite \
	test-legacy-3.0.1.sqlite \
	test-invalid.sqlite \
	test_geos.sqlite \

	shp/new-caledonia/buildings.dbf \
	shp/new-caledonia/buildings.prj \
	shp/new-caledonia/buildings.shp \
	shp/new-caledonia/buildings.shx \
	shp/new-caledonia/points.dbf \
	shp/new-caledonia/points.prj \
	shp/new-caledonia/points.shp \
................................................................................
	Apple-iPhone-4.jpg empty.png  empty.tif \
	test.wfs testDescribeFeatureType.wfs \
	getcapabilities-1.0.0.wfs \
	getcapabilities-1.1.0.wfs \
	describefeaturetype.wfs	\
	22.dxf f06.dxf l02.dxf p05.dxf \
	archaic.dxf linked.dxf hatch.dxf \
	symbol.dxf gpkg_test.sqlite gpkg_test.gpkg







SUBDIRS = sql_stmt_geosadvanced_tests sql_stmt_geos_tests \
	sql_stmt_libxml2_tests sql_stmt_lwgeom_tests \
	sql_stmt_mathsql_tests sql_stmt_proj_tests \

	sql_stmt_security_tests sql_stmt_tests \
	sql_stmt_xmlsec_tests sql_stmt_geopackage_tests \
	sql_stmt_freexl_tests









all: all-recursive

.SUFFIXES:
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	@rm -f check_bufovflw$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_bufovflw_OBJECTS) $(check_bufovflw_LDADD) $(LIBS)

check_clone_table$(EXEEXT): $(check_clone_table_OBJECTS) $(check_clone_table_DEPENDENCIES) $(EXTRA_check_clone_table_DEPENDENCIES) 
	@rm -f check_clone_table$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_clone_table_OBJECTS) $(check_clone_table_LDADD) $(LIBS)





check_create$(EXEEXT): $(check_create_OBJECTS) $(check_create_DEPENDENCIES) $(EXTRA_check_create_DEPENDENCIES) 
	@rm -f check_create$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_create_OBJECTS) $(check_create_LDADD) $(LIBS)

check_createBaseTables$(EXEEXT): $(check_createBaseTables_OBJECTS) $(check_createBaseTables_DEPENDENCIES) $(EXTRA_check_createBaseTables_DEPENDENCIES) 
	@rm -f check_createBaseTables$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_createBaseTables_OBJECTS) $(check_createBaseTables_LDADD) $(LIBS)





check_dbf_load$(EXEEXT): $(check_dbf_load_OBJECTS) $(check_dbf_load_DEPENDENCIES) $(EXTRA_check_dbf_load_DEPENDENCIES) 
	@rm -f check_dbf_load$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_dbf_load_OBJECTS) $(check_dbf_load_LDADD) $(LIBS)

check_dxf$(EXEEXT): $(check_dxf_OBJECTS) $(check_dxf_DEPENDENCIES) $(EXTRA_check_dxf_DEPENDENCIES) 
	@rm -f check_dxf$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_dxf_OBJECTS) $(check_dxf_LDADD) $(LIBS)
................................................................................
	@rm -f check_gpkgGetImageFormat_webp$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgGetImageFormat_webp_OBJECTS) $(check_gpkgGetImageFormat_webp_LDADD) $(LIBS)

check_gpkgInsertEpsgSRID$(EXEEXT): $(check_gpkgInsertEpsgSRID_OBJECTS) $(check_gpkgInsertEpsgSRID_DEPENDENCIES) $(EXTRA_check_gpkgInsertEpsgSRID_DEPENDENCIES) 
	@rm -f check_gpkgInsertEpsgSRID$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgInsertEpsgSRID_OBJECTS) $(check_gpkgInsertEpsgSRID_LDADD) $(LIBS)





check_gpkgVirtual$(EXEEXT): $(check_gpkgVirtual_OBJECTS) $(check_gpkgVirtual_DEPENDENCIES) $(EXTRA_check_gpkgVirtual_DEPENDENCIES) 
	@rm -f check_gpkgVirtual$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkgVirtual_OBJECTS) $(check_gpkgVirtual_LDADD) $(LIBS)

check_gpkg_base_core_container_data_file_format_application_id$(EXEEXT): $(check_gpkg_base_core_container_data_file_format_application_id_OBJECTS) $(check_gpkg_base_core_container_data_file_format_application_id_DEPENDENCIES) $(EXTRA_check_gpkg_base_core_container_data_file_format_application_id_DEPENDENCIES) 
	@rm -f check_gpkg_base_core_container_data_file_format_application_id$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_gpkg_base_core_container_data_file_format_application_id_OBJECTS) $(check_gpkg_base_core_container_data_file_format_application_id_LDADD) $(LIBS)
................................................................................
	@rm -f check_init$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_init_OBJECTS) $(check_init_LDADD) $(LIBS)

check_init2$(EXEEXT): $(check_init2_OBJECTS) $(check_init2_DEPENDENCIES) $(EXTRA_check_init2_DEPENDENCIES) 
	@rm -f check_init2$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_init2_OBJECTS) $(check_init2_LDADD) $(LIBS)





check_libxml2$(EXEEXT): $(check_libxml2_OBJECTS) $(check_libxml2_DEPENDENCIES) $(EXTRA_check_libxml2_DEPENDENCIES) 
	@rm -f check_libxml2$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_libxml2_OBJECTS) $(check_libxml2_LDADD) $(LIBS)

check_math_funcs$(EXEEXT): $(check_math_funcs_OBJECTS) $(check_math_funcs_DEPENDENCIES) $(EXTRA_check_math_funcs_DEPENDENCIES) 
	@rm -f check_math_funcs$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_math_funcs_OBJECTS) $(check_math_funcs_LDADD) $(LIBS)
................................................................................
	@rm -f check_metacatalog$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_metacatalog_OBJECTS) $(check_metacatalog_LDADD) $(LIBS)

check_multithread$(EXEEXT): $(check_multithread_OBJECTS) $(check_multithread_DEPENDENCIES) $(EXTRA_check_multithread_DEPENDENCIES) 
	@rm -f check_multithread$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_multithread_OBJECTS) $(check_multithread_LDADD) $(LIBS)













check_recover_geom$(EXEEXT): $(check_recover_geom_OBJECTS) $(check_recover_geom_DEPENDENCIES) $(EXTRA_check_recover_geom_DEPENDENCIES) 
	@rm -f check_recover_geom$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_recover_geom_OBJECTS) $(check_recover_geom_LDADD) $(LIBS)

check_relations_fncts$(EXEEXT): $(check_relations_fncts_OBJECTS) $(check_relations_fncts_DEPENDENCIES) $(EXTRA_check_relations_fncts_DEPENDENCIES) 
	@rm -f check_relations_fncts$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_relations_fncts_OBJECTS) $(check_relations_fncts_LDADD) $(LIBS)





check_shp_load$(EXEEXT): $(check_shp_load_OBJECTS) $(check_shp_load_DEPENDENCIES) $(EXTRA_check_shp_load_DEPENDENCIES) 
	@rm -f check_shp_load$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_shp_load_OBJECTS) $(check_shp_load_LDADD) $(LIBS)

check_shp_load_3d$(EXEEXT): $(check_shp_load_3d_OBJECTS) $(check_shp_load_3d_DEPENDENCIES) $(EXTRA_check_shp_load_3d_DEPENDENCIES) 
	@rm -f check_shp_load_3d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_shp_load_3d_OBJECTS) $(check_shp_load_3d_LDADD) $(LIBS)
................................................................................
	@rm -f check_sql_stmt$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_sql_stmt_OBJECTS) $(check_sql_stmt_LDADD) $(LIBS)

check_srid_fncts$(EXEEXT): $(check_srid_fncts_OBJECTS) $(check_srid_fncts_DEPENDENCIES) $(EXTRA_check_srid_fncts_DEPENDENCIES) 
	@rm -f check_srid_fncts$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_srid_fncts_OBJECTS) $(check_srid_fncts_LDADD) $(LIBS)





check_styling$(EXEEXT): $(check_styling_OBJECTS) $(check_styling_DEPENDENCIES) $(EXTRA_check_styling_DEPENDENCIES) 
	@rm -f check_styling$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_styling_OBJECTS) $(check_styling_LDADD) $(LIBS)





















check_version$(EXEEXT): $(check_version_OBJECTS) $(check_version_DEPENDENCIES) $(EXTRA_check_version_DEPENDENCIES) 
	@rm -f check_version$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_version_OBJECTS) $(check_version_LDADD) $(LIBS)

check_virtual_ovflw$(EXEEXT): $(check_virtual_ovflw_OBJECTS) $(check_virtual_ovflw_DEPENDENCIES) $(EXTRA_check_virtual_ovflw_DEPENDENCIES) 
	@rm -f check_virtual_ovflw$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtual_ovflw_OBJECTS) $(check_virtual_ovflw_LDADD) $(LIBS)
................................................................................
	@rm -f check_virtualbbox$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualbbox_OBJECTS) $(check_virtualbbox_LDADD) $(LIBS)

check_virtualelem$(EXEEXT): $(check_virtualelem_OBJECTS) $(check_virtualelem_DEPENDENCIES) $(EXTRA_check_virtualelem_DEPENDENCIES) 
	@rm -f check_virtualelem$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualelem_OBJECTS) $(check_virtualelem_LDADD) $(LIBS)





check_virtualtable1$(EXEEXT): $(check_virtualtable1_OBJECTS) $(check_virtualtable1_DEPENDENCIES) $(EXTRA_check_virtualtable1_DEPENDENCIES) 
	@rm -f check_virtualtable1$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualtable1_OBJECTS) $(check_virtualtable1_LDADD) $(LIBS)

check_virtualtable2$(EXEEXT): $(check_virtualtable2_OBJECTS) $(check_virtualtable2_DEPENDENCIES) $(EXTRA_check_virtualtable2_DEPENDENCIES) 
	@rm -f check_virtualtable2$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualtable2_OBJECTS) $(check_virtualtable2_LDADD) $(LIBS)
................................................................................
	@rm -f check_virtualxpath$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_virtualxpath_OBJECTS) $(check_virtualxpath_LDADD) $(LIBS)

check_wfsin$(EXEEXT): $(check_wfsin_OBJECTS) $(check_wfsin_DEPENDENCIES) $(EXTRA_check_wfsin_DEPENDENCIES) 
	@rm -f check_wfsin$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_wfsin_OBJECTS) $(check_wfsin_LDADD) $(LIBS)





check_xls_load$(EXEEXT): $(check_xls_load_OBJECTS) $(check_xls_load_DEPENDENCIES) $(EXTRA_check_xls_load_DEPENDENCIES) 
	@rm -f check_xls_load$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(check_xls_load_OBJECTS) $(check_xls_load_LDADD) $(LIBS)





shape_3d$(EXEEXT): $(shape_3d_OBJECTS) $(shape_3d_DEPENDENCIES) $(EXTRA_shape_3d_DEPENDENCIES) 
	@rm -f shape_3d$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(shape_3d_OBJECTS) $(shape_3d_LDADD) $(LIBS)

shape_cp1252$(EXEEXT): $(shape_cp1252_OBJECTS) $(shape_cp1252_DEPENDENCIES) $(EXTRA_shape_cp1252_DEPENDENCIES) 
	@rm -f shape_cp1252$(EXEEXT)
	$(AM_V_CCLD)$(LINK) $(shape_cp1252_OBJECTS) $(shape_cp1252_LDADD) $(LIBS)
................................................................................
distclean-compile:
	-rm -f *.tab.c

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_add_tile_triggers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_add_tile_triggers_bad_table_name.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_bufovflw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_clone_table.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_create.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_createBaseTables.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dbf_load.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dxf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_endian.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_exif.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_exif2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_extension.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_extra_relations_fncts.Po@am__quote@
................................................................................
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_nonblob.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_nonimage.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_png.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_tiff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgGetImageFormat_webp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgInsertEpsgSRID.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkgVirtual.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_container_data_file_format_application_id.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_contents_data_table_def.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_spatial_ref_sys_data_table_def.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_base_core_spatial_ref_sys_data_values_default.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_gpkg_opt_extension_mechanism_extensions_data_table_def.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_init.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_init2.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_libxml2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_math_funcs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_mbrcache.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_md5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_metacatalog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_multithread.Po@am__quote@



@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_recover_geom.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_relations_fncts.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_shp_load.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_shp_load_3d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_spatialindex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_sql_stmt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_srid_fncts.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_styling.Po@am__quote@





@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_version.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtual_ovflw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualbbox.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualelem.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualtable6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_virtualxpath.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_wfsin.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_xls_load.Po@am__quote@

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_3d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_cp1252.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_primitives.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_utf8_1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_utf8_1ex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape_utf8_2.Po@am__quote@

................................................................................
	  if $(am__make_dryrun); then :; else \
	    rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
	  fi; \
	fi; \
	if test -n "$$am__remaking_logs"; then \
	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
	       "recursion detected" >&2; \
	else \
	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
	fi; \
	if $(am__make_dryrun); then :; else \
	  st=0;  \
	  errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
	  for i in $$redo_bases; do \
	    test -f $$i.trs && test -r $$i.trs \
................................................................................
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_init2.log: check_init2$(EXEEXT)
	@p='check_init2$(EXEEXT)'; \
	b='check_init2'; \







	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_geom_aux.log: check_geom_aux$(EXEEXT)
	@p='check_geom_aux$(EXEEXT)'; \
	b='check_geom_aux'; \
................................................................................
check_srid_fncts.log: check_srid_fncts$(EXEEXT)
	@p='check_srid_fncts$(EXEEXT)'; \
	b='check_srid_fncts'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)









































































































check_createBaseTables.log: check_createBaseTables$(EXEEXT)
	@p='check_createBaseTables$(EXEEXT)'; \
	b='check_createBaseTables'; \
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
................................................................................
	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_gpkgInsertEpsgSRID.log: check_gpkgInsertEpsgSRID$(EXEEXT)
	@p='check_gpkgInsertEpsgSRID$(EXEEXT)'; \
	b='check_gpkgInsertEpsgSRID'; \







	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
	--log-file $$b.log --trs-file $$b.trs \
	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
	"$$tst" $(AM_TESTS_FD_REDIRECT)
check_gpkgCreateFeaturesTable.log: check_gpkgCreateFeaturesTable$(EXEEXT)
	@p='check_gpkgCreateFeaturesTable$(EXEEXT)'; \
	b='check_gpkgCreateFeaturesTable'; \
................................................................................
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-compile mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
	uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to test/WritingSQLTestCase.txt.

1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Building a SQL statement test case

This probably requires that you're using the "autoconf" build system at the
moment. This is the case if you're running on Linux or some other Unix variant,
including Mac OS X. It is the case for some kinds of Windows builds too (using
MinGW / MSYS).

I assume that you're mostly OK with building from fossil. If not, start
at http://www.gaia-gis.it/gaia-sins/about-fossil.html. There are detailed
build instructions linked off http://www.gaia-gis.it/gaia-sins/ for each
major platform.


Make sure you have all the dependencies. It is a bit of work but it will pay off
in the long run.

Once you've got that far, its time to start with the testing.

Step 1. Just get the tests building. 
If you're in the build directory (i.e. where you ran the "./configure" and
"make" steps), you should be able to run "make check" and have the tests
build and run. Towards the end, it should report something like:
============================================================================
Testsuite summary for libspatialite 4.3.0-devel
============================================================================
# TOTAL: 83
# PASS:  83
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

If any of them fail, please let us know ASAP.

Step 2. After that works, its time to set up the coverage testing. Obviously we
want to understand which code isn't being tested, then write a test to check
that code, and finally make sure that the code is being tested. Fortunately,
there are nice tools to check which code is being run. On Unix / Linux, you 







|
|
|
|
>










|
|
|
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25








26
27
28
29
30
31
32
Building a SQL statement test case

This probably requires that you're using the "autoconf" build system at the
moment. This is the case if you're running on Linux or some other Unix variant,
including Mac OS X. It is the case for some kinds of Windows builds too (using
MinGW / MSYS).

I assume that you're mostly OK with building from subversion. If not, start
at http://www.gaia-gis.it/spatialite/sources.html. Make sure you read
Sandro's "short note" - it is at
http://www.gaia-gis.it/spatialite/how_to_build_libspatialite.html
if you missed it.

Make sure you have all the dependencies. It is a bit of work but it will pay off
in the long run.

Once you've got that far, its time to start with the testing.

Step 1. Just get the tests building. 
If you're in the build directory (i.e. where you ran the "./configure" and
"make" steps), you should be able to run "make check" and have the tests
build and run. Towards the end, it should report something like:
===================
All 15 tests passed
===================









If any of them fail, please let us know ASAP.

Step 2. After that works, its time to set up the coverage testing. Obviously we
want to understand which code isn't being tested, then write a test to check
that code, and finally make sure that the code is being tested. Fortunately,
there are nice tools to check which code is being run. On Unix / Linux, you 

Added test/asprintf4win.h.







































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
 * Copyright (C) 2001 Federico Di Gregorio <fog@debian.org> 
 * Copyright (C) 1991, 1994-1999, 2000, 2001 Free Software Foundation, Inc.
 *
 * This code has been derived from an example in the glibc2 documentation.
 * This file is part of the psycopg module.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2,
 * or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

/*
 * asprintf.c -- asprintf() implementation for braindamaged operating systems
 * $Id: asprintf.c 554 2004-10-30 00:19:27Z fog $
 */

#ifndef _WIN32
#include <unistd.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#ifndef _WIN32
#include <sys/time.h>
#endif
#include <stdlib.h>

#ifdef _WIN32
#define vsnprintf _vsnprintf
#endif

int
asprintf (char **buffer, char *fmt, ...)
{
    /* Guess we need no more than 200 chars of space. */
    int size = 200;
    int nchars;
    va_list ap;

    *buffer = (char *) malloc (size);
    if (*buffer == NULL)
	return -1;

    /* Try to print in the allocated space. */
    va_start (ap, fmt);
    nchars = vsnprintf (*buffer, size, fmt, ap);
    va_end (ap);

    if (nchars >= size)
      {
	  char *tmpbuff;
	  /* Reallocate buffer now that we know how much space is needed. */
	  size = nchars + 1;
	  tmpbuff = (char *) realloc (*buffer, size);


	  if (tmpbuff == NULL)
	    {			/* we need to free it */
		free (*buffer);
		return -1;
	    }

	  *buffer = tmpbuff;
	  /* Try again. */
	  va_start (ap, fmt);
	  nchars = vsnprintf (*buffer, size, fmt, ap);
	  va_end (ap);
      }

    if (nchars < 0)
	return nchars;
    return size;
}

Changes to test/check_bufovflw.c.

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

92
93

94
95
96
97
98
99
100
...
104
105
106
107
108
109
110

111
112
113
114
115
116
117
...
144
145
146
147
148
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
...
834
835
836
837
838
839
840





























841
842
843
844
845

846
847
848
849
850
851
852
...
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
....
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
....
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
....
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
....
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
....
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
{
    int ret;
    sqlite3 *handle;
    sqlite3_stmt *stmt;
    char *err_msg = NULL;
    int suffix_len = 16 * 1024;	/* 16 KB suffix */
    char *suffix;
#ifndef OMIT_ICONV
    char *xtable;
    char *dbf;
    int row_count;
#endif
    char *shape;
    char *shape2;
    char *shape2geom;

    char *table_a;
    char *table_b;

    char *auth;
#ifndef OMIT_PROJ		/* including PROJ.4 */
    char *kml1;
    char *kml2;
#endif /* end including PROJ.4 */
    char *resvalue;
    char *pk;
................................................................................
    char **results;
    const char *value;
    int rows;
    int columns;
    char *string;
    int len;
    char frmt[2048];

    char *dumpname = __FILE__ "dump";
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
................................................................................
    suffix[suffix_len - 1] = '\0';

    table_a = sqlite3_mprintf ("table_a_%s", suffix);
    table_b = sqlite3_mprintf ("table_b_%s", suffix);
    shape2 = sqlite3_mprintf ("shape_table_2_%s", suffix);
    shape2geom = sqlite3_mprintf ("shape_table_2_geom_%s", suffix);
    shape = sqlite3_mprintf ("shape_table_%s", suffix);
#ifndef OMIT_ICONV
    dbf = sqlite3_mprintf ("dbf_table_%s", suffix);
#endif
    pk = sqlite3_mprintf ("id_%s", suffix);
    name = sqlite3_mprintf ("name_%s", suffix);
    geom = sqlite3_mprintf ("geom_%s", suffix);


/* creating table "A" */
    sql = sqlite3_mprintf ("CREATE TABLE %s (\n"
			   "%s INTEGER NOT NULL PRIMARY KEY,\n"
			   "%s TEXT NOT NULL)", table_a, pk, name);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
................................................................................
      {
	  fprintf (stderr, "Unexpected result (discard TABLE-B): %s\n",
		   results[1]);
	  return -60;
      }
    sqlite3_free_table (results);






























    sqlite3_free (table_a);
    sqlite3_free (table_b);
    sqlite3_free (pk);
    sqlite3_free (name);
    sqlite3_free (geom);


/* inserting a CRS (very long auth) */
    auth = sqlite3_mprintf ("authority_%s", suffix);
    sql =
	sqlite3_mprintf
	("INSERT INTO spatial_ref_sys (srid, auth_name, auth_srid, "
	 "ref_sys_name, proj4text, srtext) VALUES (NULL, %Q, 1122, "
................................................................................
      {
	  fprintf (stderr, "INSERT CRS error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -64;
      }

#ifndef OMIT_EPSG		/* only if full EPSG support is enabled */
/* checking for validity (SRID from Auth) */
    sql = sqlite3_mprintf ("SELECT SridFromAuthCrs(%Q, %d)", auth, 1122);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Test TABLE-A error: %s\n", err_msg);
................................................................................
    resvalue = gaiaDequotedSql ("'a''b''c''d''e''f''ghiklmnopqrst''u'vwy''z'");
    if (resvalue != NULL)
      {
	  fprintf (stderr, "Unexpected result (Dequote 4): %s\n", resvalue);
	  return -117;
      }

#ifndef OMIT_ICONV		/* only if ICONV is enabled */
/* checking load_shapefile */
    ret = load_shapefile (handle, "./shp/gaza/route", shape, "UTF-8", 4326,
			  NULL, 1, 0, 1, 1, &row_count, err_msg);
    if (!ret)
      {
	  fprintf (stderr, "load_shapefile() error: %s\n", err_msg);
	  sqlite3_close (handle);
................................................................................
    ret = dump_geojson (handle, shape, "col1", dumpname, 10, 5);
    if (!ret)
      {
	  fprintf (stderr, "dump_geojson() error: %s\n", err_msg);
	  sqlite3_close (handle);
	  return -123;
      }
#endif /* end ICONV */

    unlink (dumpname);
/* dropping virtual geometry */
    sql = sqlite3_mprintf ("SELECT DropVirtualGeometry(%Q)", shape);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
................................................................................
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -124;
      }
    sqlite3_free (shape);

#ifndef OMIT_ICONV		/* only if ICONV is enabled */
/* checking load_dbf */
    ret =
	load_dbf (handle, "./shapetest1.dbf", dbf, "UTF-8", 1, &row_count,
		  err_msg);
    if (!ret)
      {
	  fprintf (stderr, "load_dbf() error: %s\n", err_msg);
................................................................................
    if (row_count != 10)
      {
	  fprintf (stderr, "unexpected row count for load_shapefile #2: %i\n",
		   row_count);
	  sqlite3_close (handle);
	  return -129;
      }

    xtable = gaiaDoubleQuotedSql (shape2);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\" (FEATURE_ID, DATUM, HAUSNR) "
			   "VALUES (1250000, 0.1, 'alpha')", xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT polygons (1) error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -132;
      }
#endif /* end ICONV */

    remove_duplicated_rows (handle, shape2);
    elementary_geometries (handle, shape2, shape2geom, "elem_poly", "pk_elem",
			   "mul_id");
    sqlite3_free (shape2);
    sqlite3_free (shape2geom);








<

<
<
<



>


>







 







>







 







<
|
<



>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





>







 







|







 







<







 







<
<







 







<







 







<







 







<







77
78
79
80
81
82
83

84



85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
143
144
145
146
147
148
149

150

151
152
153
154
155
156
157
158
159
160
161
...
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
...
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
....
1772
1773
1774
1775
1776
1777
1778

1779
1780
1781
1782
1783
1784
1785
....
1828
1829
1830
1831
1832
1833
1834


1835
1836
1837
1838
1839
1840
1841
....
1844
1845
1846
1847
1848
1849
1850

1851
1852
1853
1854
1855
1856
1857
....
1889
1890
1891
1892
1893
1894
1895

1896
1897
1898
1899
1900
1901
1902
....
1924
1925
1926
1927
1928
1929
1930

1931
1932
1933
1934
1935
1936
1937
{
    int ret;
    sqlite3 *handle;
    sqlite3_stmt *stmt;
    char *err_msg = NULL;
    int suffix_len = 16 * 1024;	/* 16 KB suffix */
    char *suffix;

    char *xtable;



    char *shape;
    char *shape2;
    char *shape2geom;
    char *dbf;
    char *table_a;
    char *table_b;
    char *topology;
    char *auth;
#ifndef OMIT_PROJ		/* including PROJ.4 */
    char *kml1;
    char *kml2;
#endif /* end including PROJ.4 */
    char *resvalue;
    char *pk;
................................................................................
    char **results;
    const char *value;
    int rows;
    int columns;
    char *string;
    int len;
    char frmt[2048];
    int row_count;
    char *dumpname = __FILE__ "dump";
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
................................................................................
    suffix[suffix_len - 1] = '\0';

    table_a = sqlite3_mprintf ("table_a_%s", suffix);
    table_b = sqlite3_mprintf ("table_b_%s", suffix);
    shape2 = sqlite3_mprintf ("shape_table_2_%s", suffix);
    shape2geom = sqlite3_mprintf ("shape_table_2_geom_%s", suffix);
    shape = sqlite3_mprintf ("shape_table_%s", suffix);

    dbf = sqlite3_mprintf ("dbf_tbale_%s", suffix);

    pk = sqlite3_mprintf ("id_%s", suffix);
    name = sqlite3_mprintf ("name_%s", suffix);
    geom = sqlite3_mprintf ("geom_%s", suffix);
    topology = sqlite3_mprintf ("topology_%s_", suffix);

/* creating table "A" */
    sql = sqlite3_mprintf ("CREATE TABLE %s (\n"
			   "%s INTEGER NOT NULL PRIMARY KEY,\n"
			   "%s TEXT NOT NULL)", table_a, pk, name);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
................................................................................
      {
	  fprintf (stderr, "Unexpected result (discard TABLE-B): %s\n",
		   results[1]);
	  return -60;
      }
    sqlite3_free_table (results);

/* creating a topology */
    sql =
	sqlite3_mprintf ("SELECT CreateTopologyTables(%Q, 4326, 'XY')",
			 topology);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopologyTables error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -61;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "Unexpected rows/columns (CreateTopologyTables): r=%d c=%d\n",
		   rows, columns);
	  return -62;
      }
    value = results[1];
    if (strcmp ("1", value) != 0)
      {
	  fprintf (stderr, "Unexpected result (CreateTopologyTables): %s\n",
		   results[1]);
	  return -63;
      }
    sqlite3_free_table (results);

    sqlite3_free (table_a);
    sqlite3_free (table_b);
    sqlite3_free (pk);
    sqlite3_free (name);
    sqlite3_free (geom);
    sqlite3_free (topology);

/* inserting a CRS (very long auth) */
    auth = sqlite3_mprintf ("authority_%s", suffix);
    sql =
	sqlite3_mprintf
	("INSERT INTO spatial_ref_sys (srid, auth_name, auth_srid, "
	 "ref_sys_name, proj4text, srtext) VALUES (NULL, %Q, 1122, "
................................................................................
      {
	  fprintf (stderr, "INSERT CRS error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -64;
      }

#ifndef OMIT_EPSG /* only if full EPSG support is enabled */
/* checking for validity (SRID from Auth) */
    sql = sqlite3_mprintf ("SELECT SridFromAuthCrs(%Q, %d)", auth, 1122);
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Test TABLE-A error: %s\n", err_msg);
................................................................................
    resvalue = gaiaDequotedSql ("'a''b''c''d''e''f''ghiklmnopqrst''u'vwy''z'");
    if (resvalue != NULL)
      {
	  fprintf (stderr, "Unexpected result (Dequote 4): %s\n", resvalue);
	  return -117;
      }


/* checking load_shapefile */
    ret = load_shapefile (handle, "./shp/gaza/route", shape, "UTF-8", 4326,
			  NULL, 1, 0, 1, 1, &row_count, err_msg);
    if (!ret)
      {
	  fprintf (stderr, "load_shapefile() error: %s\n", err_msg);
	  sqlite3_close (handle);
................................................................................
    ret = dump_geojson (handle, shape, "col1", dumpname, 10, 5);
    if (!ret)
      {
	  fprintf (stderr, "dump_geojson() error: %s\n", err_msg);
	  sqlite3_close (handle);
	  return -123;
      }


    unlink (dumpname);
/* dropping virtual geometry */
    sql = sqlite3_mprintf ("SELECT DropVirtualGeometry(%Q)", shape);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
................................................................................
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -124;
      }
    sqlite3_free (shape);


/* checking load_dbf */
    ret =
	load_dbf (handle, "./shapetest1.dbf", dbf, "UTF-8", 1, &row_count,
		  err_msg);
    if (!ret)
      {
	  fprintf (stderr, "load_dbf() error: %s\n", err_msg);
................................................................................
    if (row_count != 10)
      {
	  fprintf (stderr, "unexpected row count for load_shapefile #2: %i\n",
		   row_count);
	  sqlite3_close (handle);
	  return -129;
      }

    xtable = gaiaDoubleQuotedSql (shape2);
    sql = sqlite3_mprintf ("INSERT INTO \"%s\" (FEATURE_ID, DATUM, HAUSNR) "
			   "VALUES (1250000, 0.1, 'alpha')", xtable);
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT polygons (1) error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -132;
      }


    remove_duplicated_rows (handle, shape2);
    elementary_geometries (handle, shape2, shape2geom, "elem_poly", "pk_elem",
			   "mul_id");
    sqlite3_free (shape2);
    sqlite3_free (shape2geom);

Changes to test/check_clone_table.c.

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
....
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396



1397
1398
1399
1400
1401
1402
1403
....
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
  
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiageo.h"

#ifndef OMIT_GEOS		/* only if GEOS is enabled */

int
execute_check (sqlite3 * sqlite, const char *sql, char **error)
{
/* executing an SQL statement returning True/False */
    sqlite3_stmt *stmt;
    int ret;
    int retcode = 0;
................................................................................

  end:
    if (retcode < 0)
	return base + retcode;
    return 0;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;
#ifndef OMIT_GEOS		/* only if GEOS is enabled */
    int ret;




    if (create_origin () < 0)
      {
	  retcode = -66;
	  goto end;
      }

................................................................................
	  retcode = ret;
	  goto end;
      }

  end:
/* removing the origin DB */
    unlink ("clone_origin.sqlite");
#endif

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}







<
<




<
<







 







<




|
<
|
>
>
>







 







<
<
<
<
<



44
45
46
47
48
49
50


51
52
53
54


55
56
57
58
59
60
61
....
1378
1379
1380
1381
1382
1383
1384

1385
1386
1387
1388
1389

1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
....
1433
1434
1435
1436
1437
1438
1439





1440
1441
1442
  
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>



#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiageo.h"



int
execute_check (sqlite3 * sqlite, const char *sql, char **error)
{
/* executing an SQL statement returning True/False */
    sqlite3_stmt *stmt;
    int ret;
    int retcode = 0;
................................................................................

  end:
    if (retcode < 0)
	return base + retcode;
    return 0;
}



int
main (int argc, char *argv[])
{
    int ret;

    int retcode = 0;

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    if (create_origin () < 0)
      {
	  retcode = -66;
	  goto end;
      }

................................................................................
	  retcode = ret;
	  goto end;
      }

  end:
/* removing the origin DB */
    unlink ("clone_origin.sqlite");





    spatialite_shutdown ();
    return retcode;
}

Deleted test/check_control_points.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
/*

 check_contro_points.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):
Brad Hards <bradh@frogmouth.net>

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_GCP		/* only if Control Points (Grass) is enabled */

static int
test_query (sqlite3 * sqlite, const char *sql, const char *expected)
{
/* testing some SQL query */
    int ret;
    sqlite3_stmt *stmt = NULL;

    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "%s\n: \"%s\"\n", sql, sqlite3_errmsg (sqlite));
	  return 0;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		const char *value;
		if (sqlite3_column_type (stmt, 0) == SQLITE_NULL)
		  {
		      if (expected == NULL)
			  continue;
		      else
			{
			    fprintf (stderr,
				     "Unexpected NULL result\nExpected: %s\n",
				     expected);
			    goto error;
			}
		  }
		value = (const char *) sqlite3_column_text (stmt, 0);
		if (expected == NULL)
		  {
		      fprintf (stderr, "Unexpected result %s\nExpected: NULL\n",
			       value);
		      goto error;
		  }
		if (strcasecmp (value, expected) != 0)
		  {
		      fprintf (stderr, "Unexpected result %s\nExpected: %s\n",
			       value, expected);
		      goto error;
		  }
	    }
	  else
	      goto error;
      }
    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
test_transform (sqlite3 * handle, int order)
{
/* testing GCP_Transform */
    char *sql;
    int ret;

/* resolving Control Points 2D - CGP_Transform XY */
    sql = sqlite3_mprintf ("SELECT AsText(GCP_Transform(g.geometry, b.gcp)) "
			   "FROM test_xy AS g, "
			   "(SELECT GCP_Compute(a.geometry, b.geometry, %d) AS gcp "
			   "FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id) AS b",
			   order);
    ret =
	test_query (handle, sql,
		    "GEOMETRYCOLLECTION(POINT(-161 -64), LINESTRING(-160 -63, -159 -62), "
		    "POLYGON((-151 -54, -141 -54, -141 -44, -151 -44, -151 -54), "
		    "(-147 -50, -145 -50, -145 -48, -147 -48, -147 -50)))");
    sqlite3_free (sql);
    if (!ret)
	return 0;

/* resolving Control Points 2D - CGP_Transform XYM */
    sql = sqlite3_mprintf ("SELECT AsText(GCP_Transform(g.geometry, b.gcp)) "
			   "FROM test_xym AS g, "
			   "(SELECT GCP_Compute(a.geometry, b.geometry, %d) AS gcp "
			   "FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id) AS b",
			   order);
    ret =
	test_query (handle, sql,
		    "GEOMETRYCOLLECTION M(POINT M(-161 -64 1), "
		    "LINESTRING M(-160 -63 1, -159 -62 3), "
		    "POLYGON M((-151 -54 1, -141 -54 2, -141 -44 3, -151 -44 2, -151 -54 1), "
		    "(-147 -50 1, -145 -50 2, -145 -48 2, -147 -48 2, -147 -50 1)))");
    sqlite3_free (sql);
    if (!ret)
	return 0;

/* resolving Control Points 3D - CGP_Transform XYZ */
    sql =
	sqlite3_mprintf
	("SELECT IsValid(GCP_Transform(g.geometry, b.gcp)) "
	 "FROM test_xyz AS g, "
	 "(SELECT GCP_Compute(a.geometry, b.geometry, %d) AS gcp "
	 "FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id) AS b",
	 order);
    ret = test_query (handle, sql, "1");
    sqlite3_free (sql);
    if (!ret)
	return 0;

/* resolving Control Points 3D - CGP_Transform XYZM */
    sql =
	sqlite3_mprintf
	("SELECT IsValid(GCP_Transform(g.geometry, b.gcp)) "
	 "FROM test_xyzm AS g, "
	 "(SELECT GCP_Compute(a.geometry, b.geometry, %d) AS gcp "
	 "FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id) AS b",
	 order);
    ret = test_query (handle, sql, "1");
    sqlite3_free (sql);
    if (!ret)
	return 0;

    return 1;
}

static int
test_invalid (sqlite3 * handle)
{
/* testing invalid calls */
    const char *sql;

    sql = "SELECT GCP_Compute(NULL, GeomFromText('POINT(1 1)'))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Compute(GeomFromText('POINT(1 1)'), NULL)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('POINT(1 1)'), GeomFromText('POINT(2 2)'), NULL)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('POINT(1 1)'), GeomFromText('POINT(2 2)'), -1)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('POINT(1 1)'), GeomFromText('POINT(2 2)'), 4)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('POINT(1 1)'), GeomFromText('POINTZ(2 2 2)'))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('POINT(1 1)'), GeomFromText('POINT(2 2)'))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('POINT(1 1)'), GeomFromText('LINESTRING(2 2, 3 2)'))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql =
	"SELECT GCP_Compute(GeomFromText('LINESTRING(2 2, 3 2)'), GeomFromText('POINT(1 1)'))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Compute(GeomFromText('POINT(1 1)'), NULL)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Compute(GeomFromText('POINT(1 1)'), zeroblob(10))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Transform(NULL, b.gcp) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry) AS gcp "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Transform(zeroblob(10), b.gcp) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry) AS gcp "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Transform(GeomFromText('POINT(1 1)'), zeroblob(4))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_IsValid(NULL)";
    if (!test_query (handle, sql, "-1"))
	return 0;
    sql = "SELECT GCP_IsValid(zeroblob(0))";
    if (!test_query (handle, sql, "0"))
	return 0;
    sql = "SELECT GCP_AsText(NULL)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_AsText(zeroblob(0))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Transform(GeomFromText('POINT(1 1)'), b.gcp, 1.0) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry) AS gcp "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Transform(zeroblob(4), b.gcp, 32632) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry) AS gcp "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP_Transform(GeomFromText('POINT(1 1)'), NULL)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP2ATM(NULL)";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP2ATM(zeroblob(100))";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP2ATM(b.gcp) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry, 2) AS gcp "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP2ATM(b.gcp) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry, 3) AS gcp "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;
    sql = "SELECT GCP2ATM(b.gcp) "
	"FROM (SELECT GCP_Compute(a.geometry, b.geometry, 0) AS gcp "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id) AS b";
    if (!test_query (handle, sql, NULL))
	return 0;

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
#ifdef ENABLE_GCP		/* only if Control Points (Grass) is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    const char *sql;
    int order;
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory databse: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

/* creating and populating a test table - XY */
    ret = sqlite3_exec (handle, "CREATE TABLE test_xy ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'test_xy', 'geometry', 4326, 'GEOMETRYCOLLECTION', 'XY')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }
    ret = sqlite3_exec (handle, "INSERT INTO test_xy VALUES (NULL, "
			"GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 2 2), "
			"POLYGON((10 10, 20 10, 20 20, 10 20, 10 10), "
			"(14 14, 16 14, 16 16, 14 16, 14 14)))', 4326))", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

/* creating and populating a test table - XYZ */
    ret = sqlite3_exec (handle, "CREATE TABLE test_xyz ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -6;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'test_xyz', 'geometry', 4326, 'GEOMETRYCOLLECTION', 'XYz')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xyz Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }
    ret = sqlite3_exec (handle, "INSERT INTO test_xyz VALUES (NULL, "
			"GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(0 0 1), "
			"LINESTRINGZ(1 1 1, 2 2 3), "
			"POLYGONZ((10 10 1, 20 10 2, 20 20 3, 10 20 2, 10 10 1), "
			"(14 14 1, 16 14 2, 16 16 2, 14 16 2, 14 14 1)))', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -8;
      }

/* creating and populating a test table - XYM */
    ret = sqlite3_exec (handle, "CREATE TABLE test_xym ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xym error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -9;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'test_xym', 'geometry', 4326, 'GEOMETRYCOLLECTION', 'XYM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xym Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -10;
      }
    ret = sqlite3_exec (handle, "INSERT INTO test_xym VALUES (NULL, "
			"GeomFromText('GEOMETRYCOLLECTIONM(POINTM(0 0 1), "
			"LINESTRINGM(1 1 1, 2 2 3), "
			"POLYGONM((10 10 1, 20 10 2, 20 20 3, 10 20 2, 10 10 1), "
			"(14 14 1, 16 14 2, 16 16 2, 14 16 2, 14 14 1)))', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_xym Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -11;
      }

/* creating and populating a test table - XYZM */
    ret = sqlite3_exec (handle, "CREATE TABLE test_xyzm ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xyzm error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -12;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'test_xyzm', 'geometry', 4326, 'GEOMETRYCOLLECTION', 'XYZM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE test_xyzm Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -13;
      }
    ret = sqlite3_exec (handle, "INSERT INTO test_xyzm VALUES (NULL, "
			"GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(0 0 1 1), "
			"LINESTRINGZM(1 1 1 1, 2 2 3 3), "
			"POLYGONZM((10 10 1 1, 20 10 2 2, 20 20 3 3, 10 20 2 2, 10 10 1 1), "
			"(14 14 1 1, 16 14 2 2, 16 16 2 2, 14 16 2 2, 14 14 1 1)))', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -14;
      }

/* creating and populating Point table #1 - XY */
    ret = sqlite3_exec (handle, "CREATE TABLE point_a_xy ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_a_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -15;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'point_a_xy', 'geometry', 4326, 'POINT', 'XY')", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_a_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -16;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_a_xy VALUES "
			"(NULL, MakePoint(0, 0, 4326)), (NULL, MakePoint(1, 1, 4326)), "
			"(NULL, MakePoint(10, 10, 4326)), (NULL, MakePoint(11, 11, 4326)), "
			"(NULL, MakePoint(10, 0, 4326)), (NULL, MakePoint(11, 1, 4326)), "
			"(NULL, MakePoint(0, 10, 4326)), (NULL, MakePoint(1, 11, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_a_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -17;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_a_xy VALUES "
			"(NULL, MakePoint(5, 4, 4326)), (NULL, MakePoint(4, 5, 4326)), "
			"(NULL, MakePoint(8, 2, 4326)), (NULL, MakePoint(2, 8, 4326)), "
			"(NULL, MakePoint(20, 20, 4326)), (NULL, MakePoint(21, 21, 4326)), "
			"(NULL, MakePoint(30, 30, 4326)), (NULL, MakePoint(31, 31, 4326)), "
			"(NULL, MakePoint(30, 20, 4326)), (NULL, MakePoint(31, 21, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_a_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -18;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_a_xy VALUES "
			"(NULL, MakePoint(20, 30, 4326)), (NULL, MakePoint(21, 31, 4326)), "
			"(NULL, MakePoint(25, 24, 4326)), (NULL, MakePoint(24, 25, 4326)), "
			"(NULL, MakePoint(28, 22, 4326)), (NULL, MakePoint(22, 28, 4326)), "
			"(NULL, MakePoint(30, 0, 4326)), (NULL, MakePoint(0, 30, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_a_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -19;
      }

/* creating and populating Point table #2 - XY */
    ret = sqlite3_exec (handle, "CREATE TABLE point_b_xy ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_b_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -20;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'point_b_xy', 'geometry', 4326, 'POINT', 'XY')", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_b_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -21;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xy VALUES "
			"(NULL, MakePoint(-161 + 0, -64 + 0, 4326)), "
			"(NULL, MakePoint(-161 + 1, -64 + 1, 4326)), "
			"(NULL, MakePoint(-161 + 10, -64 + 10, 4326)), "
			"(NULL, MakePoint(-161 + 11, -64 + 11, 4326)), "
			"(NULL, MakePoint(-161 + 10, -64 + 0, 4326)), "
			"(NULL, MakePoint(-161 + 11, -64 + 1, 4326)) ", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -22;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xy VALUES "
			"(NULL, MakePoint(-161 + 0, -64 + 10, 4326)), "
			"(NULL, MakePoint(-161 + 1, -64 + 11, 4326)), "
			"(NULL, MakePoint(-161 + 5, -64 + 4, 4326)), "
			"(NULL, MakePoint(-161 + 4, -64 + 5, 4326)), "
			"(NULL, MakePoint(-161 + 8, -64 + 2, 4326)), "
			"(NULL, MakePoint(-161 + 2, -64 + 8, 4326)) ", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -23;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xy VALUES "
			"(NULL, MakePoint(-161 + 20, -64 + 20, 4326)), "
			"(NULL, MakePoint(-161 + 21, -64 + 21, 4326)), "
			"(NULL, MakePoint(-161 + 30, -64 + 30, 4326)), "
			"(NULL, MakePoint(-161 + 31, -64 + 31, 4326)), "
			"(NULL, MakePoint(-161 + 30, -64 + 20, 4326)), "
			"(NULL, MakePoint(-161 + 31, -64 + 21, 4326)) ", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -24;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xy VALUES "
			"(NULL, MakePoint(-161 + 20, -64 + 30, 4326)), "
			"(NULL, MakePoint(-161 + 21, -64 + 31, 4326)), "
			"(NULL, MakePoint(-161 + 25, -64 + 24, 4326)), "
			"(NULL, MakePoint(-161 + 24, -64 + 25, 4326)), "
			"(NULL, MakePoint(-161 + 28, -64 + 22, 4326)), "
			"(NULL, MakePoint(-161 + 22, -64 + 28, 4326)), "
			"(NULL, MakePoint(-161 + 30, -64 + 0, 4326)), "
			"(NULL, MakePoint(-161 + 0, -64 + 30, 4326)) ", NULL,
			NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -25;
      }

/* creating and populating Point table #1 - XYZ */
    ret = sqlite3_exec (handle, "CREATE TABLE point_a_xyz ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_a_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -26;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'point_a_xyz', 'geometry', 4326, 'POINT', 'XYZ')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_a_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -27;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_a_xyz VALUES "
			"(NULL, MakePointZ(0, 0, 1, 4326)), (NULL, MakePointZ(1, 1, 2, 4326)), "
			"(NULL, MakePointZ(10, 10, 1, 4326)), (NULL, MakePointZ(11, 11, 2, 4326)), "
			"(NULL, MakePointZ(10, 0, 1, 4326)), (NULL, MakePointZ(11, 1, 2, 4326)), "
			"(NULL, MakePointZ(0, 10, 1, 4326)), (NULL, MakePointZ(1, 11, 2, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_a_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -28;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_a_xyz VALUES "
			"(NULL, MakePointZ(5, 4, 1, 4326)), (NULL, MakePointZ(4, 5, 2, 4326)), "
			"(NULL, MakePointZ(8, 2, 1, 4326)), (NULL, MakePointZ(2, 8, 2, 4326)), "
			"(NULL, MakePointZ(20, 20, 1, 4326)), (NULL, MakePointZ(21, 21, 2, 4326)), "
			"(NULL, MakePointZ(70, 70, 1, 4326)), (NULL, MakePointZ(51, 51, 2, 4326)), "
			"(NULL, MakePointZ(30, 20, 1, 4326)), (NULL, MakePointZ(31, 21, 2, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_a_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -29;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_a_xyz VALUES "
			"(NULL, MakePointZ(20, 30, 1, 4326)), (NULL, MakePointZ(21, 31, 2, 4326)), "
			"(NULL, MakePointZ(25, 24, 1, 4326)), (NULL, MakePointZ(24, 25, 2, 4326)), "
			"(NULL, MakePointZ(28, 22, 1, 4326)), (NULL, MakePointZ(22, 28, 2, 4326)), "
			"(NULL, MakePointZ(30, 0, 1, 4326)), (NULL, MakePointZ(0, 30, 2, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_a_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -30;
      }

/* creating and populating Point table #2 - XYZ */
    ret = sqlite3_exec (handle, "CREATE TABLE point_b_xyz ("
			"id INTEGER PRIMARY KEY AUTOINCREMENT)", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_b_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -31;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'point_b_xyz', 'geometry', 4326, 'POINT', 'XYZ')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE point_b_xyz Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -32;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xyz VALUES "
			"(NULL, MakePointZ(-161 + 0, -64 + 0, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 1, -64 + 1, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 10, -64 + 10, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 11, -64 + 11, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 10, -64 + 0, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 11, -64 + 1, 12, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -33;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xyz VALUES "
			"(NULL, MakePointZ(-161 + 0, -64 + 10, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 1, -64 + 11, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 5, -64 + 4, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 4, -64 + 5, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 8, -64 + 2, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 2, -64 + 8, 12, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -34;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xyz VALUES "
			"(NULL, MakePointZ(-161 + 20, -64 + 20, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 21, -64 + 21, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 70, -64 + 70, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 51, -64 + 51, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 30, -64 + 20, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 31, -64 + 21, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 20, -64 + 30, 11, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -35;
      }
    ret = sqlite3_exec (handle, "INSERT INTO point_b_xyz VALUES "
			"(NULL, MakePointZ(-161 + 21, -64 + 31, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 25, -64 + 24, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 24, -64 + 25, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 28, -64 + 22, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 22, -64 + 28, 12, 4326)), "
			"(NULL, MakePointZ(-161 + 30, -64 + 0, 11, 4326)), "
			"(NULL, MakePointZ(-161 + 0, -64 + 30, 12, 4326)) ",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO point_b_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -36;
      }

/* resolving Control Points 2D - 1st order - IsValid */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 1)) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -37;
/* resolving Control Points 2D  - 1st order- AsText */
    sql = "SELECT GCP_AsText(GCP_Compute(a.geometry, b.geometry)) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query
	(handle, sql,
	 "E{-161.0000000000,1.0000000000,-0.0000000000}, "
	 "N{-64.0000000000,-0.0000000000,1.0000000000}"))
	return -38;

/* resolving Control Points 2D - 1st order - GCP2ATM */
    sql = "SELECT ATM_IsValid(GCP2ATM(GCP_Compute(a.geometry, b.geometry))) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -39;

/* resolving Control Points 3D - 1st order - IsValid */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 1)) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -40;

/* resolving Control Points 3D - 1st order - AsText */
    sql = "SELECT GCP_AsText(GCP_Compute(a.geometry, b.geometry)) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql,
		     "E{-161.0000000000,1.0000000000,-0.0000000000,0.0000000000}, "
		     "N{-64.0000000000,0.0000000000,1.0000000000,0.0000000000}, "
		     "Z{10.0000000000,-0.0000000000,0.0000000000,1.0000000000}"))
	return -41;

/* resolving Control Points 3D - 1st order - GCP2ATM */
    sql = "SELECT ATM_IsValid(GCP2ATM(GCP_Compute(a.geometry, b.geometry))) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -42;

/* resolving Control Points 2D - 2nd order - IsValid */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 2)) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -43;

/* resolving Control Points 2D  - 2nd order- AsText */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 2)) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -44;

/* resolving Control Points 2D - 2nd order - GCP2ATM */
    sql = "SELECT ATM_IsValid(GCP2ATM(GCP_Compute(a.geometry, b.geometry, 2))) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "-1"))
	return -45;

/* resolving Control Points 3D - 2nd order - IsValid */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 2)) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -46;

/* resolving Control Points 3D - 2nd order - AsText */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 2)) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -47;

/* resolving Control Points 3D - 2nd order - GCP2ATM */
    sql = "SELECT ATM_IsValid(GCP2ATM(GCP_Compute(a.geometry, b.geometry, 2))) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "-1"))
	return -48;

/* resolving Control Points 2D - 3nd order - IsValid */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 3)) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -49;

/* resolving Control Points 2D  - 3nd order- AsText */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 3)) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -50;

/* resolving Control Points 2D - 3nd order - GCP2ATM */
    sql = "SELECT ATM_IsValid(GCP2ATM(GCP_Compute(a.geometry, b.geometry, 3))) "
	"FROM point_a_xy AS a, point_b_xy AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "-1"))
	return -51;

/* resolving Control Points 3D - 3nd order - IsValid */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 3)) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -52;

/* resolving Control Points 3D - 3nd order - AsText */
    sql = "SELECT GCP_IsValid(GCP_Compute(a.geometry, b.geometry, 3)) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "1"))
	return -53;

/* resolving Control Points 3D - 3nd order - GCP2ATM */
    sql = "SELECT ATM_IsValid(GCP2ATM(GCP_Compute(a.geometry, b.geometry, 3))) "
	"FROM point_a_xyz AS a, point_b_xyz AS b WHERE a.id = b.id";
    if (!test_query (handle, sql, "-1"))
	return -54;

    for (order = 0; order <= 3; order++)
      {
	  /* GCP_Trasform */
	  if (!test_transform (handle, order))
	      return -55;
      }

    if (!test_invalid (handle))
	return -56;

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -57;
      }

    spatialite_cleanup_ex (cache);

#endif /* end CGP conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_create.c.

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeosAdvanced() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }
    ret =
	sqlite3_exec (handle, "SELECT HasGeosReentrant()", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeosReentrant() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -6;
      }
    ret =
	sqlite3_exec (handle, "SELECT HasGeosOnlyReentrant()", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeosOnlyReentrant() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }
    ret = sqlite3_exec (handle, "SELECT HasIconv()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasIconv() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -8;
      }
    ret = sqlite3_exec (handle, "SELECT HasMathSql()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasMathSql() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -9;
      }
    ret =
	sqlite3_exec (handle, "SELECT HasGeoCallbacks()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeoCallbacks() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -10;
      }
    ret = sqlite3_exec (handle, "SELECT HasFreeXL()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasFreeXL() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -11;
      }
    ret = sqlite3_exec (handle, "SELECT HasEpsg()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasEpsg() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -12;
      }
    ret = sqlite3_exec (handle, "SELECT HasGeosTrunk()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeoTrunk() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -13;
      }
    ret = sqlite3_exec (handle, "SELECT HasRtTopo()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasRtTopo() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -14;
      }
    ret = sqlite3_exec (handle, "SELECT HasLibXml2()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasLibXml2() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -15;
      }

    gaiaInsertIntoSqlLog (handle, "test", "sql_statement_ok", &log_pk);
    gaiaUpdateSqlLog (handle, log_pk, 1, NULL);
    gaiaInsertIntoSqlLog (handle, "test", "sql_statement_no", &log_pk);
    gaiaUpdateSqlLog (handle, log_pk, 0, "some error message");

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -16;
      }

    spatialite_cleanup_ex (cache);

    ret = checkCache ();
    if (ret != 0)
	return ret;
    spatialite_shutdown ();

    return 0;
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|







|








|







|







|







|

|


|


|







|












|











189
190
191
192
193
194
195




















196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeosAdvanced() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }




















    ret = sqlite3_exec (handle, "SELECT HasIconv()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasIconv() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -6;
      }
    ret = sqlite3_exec (handle, "SELECT HasMathSql()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasMathSql() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }
    ret =
	sqlite3_exec (handle, "SELECT HasGeoCallbacks()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeoCallbacks() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -8;
      }
    ret = sqlite3_exec (handle, "SELECT HasFreeXL()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasFreeXL() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -9;
      }
    ret = sqlite3_exec (handle, "SELECT HasEpsg()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasEpsg() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -10;
      }
    ret = sqlite3_exec (handle, "SELECT HasGeosTrunk()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasGeoTrunk() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -11;
      }
    ret = sqlite3_exec (handle, "SELECT HasLwGeom()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasLwGeom() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -12;
      }
    ret = sqlite3_exec (handle, "SELECT HasLibXml2()", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "HasLibXml2() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -13;
      }

    gaiaInsertIntoSqlLog (handle, "test", "sql_statement_ok", &log_pk);
    gaiaUpdateSqlLog (handle, log_pk, 1, NULL);
    gaiaInsertIntoSqlLog (handle, "test", "sql_statement_no", &log_pk);
    gaiaUpdateSqlLog (handle, log_pk, 0, "some error message");

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -11;
      }

    spatialite_cleanup_ex (cache);

    ret = checkCache ();
    if (ret != 0)
	return ret;
    spatialite_shutdown ();

    return 0;
}

Deleted test/check_cutter.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
/*

 check_cutter.c -- SpatiaLite Test Case

 uthor: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_GEOS		/* only if GEOS is enabled */

static void
do_get_cutter_message (sqlite3 * sqlite, const char *test_sql)
{
/* reporting the last Cutter Message */
    int ret;
    const char *sql = "SELECT GetCutterMessage()";
    sqlite3_stmt *stmt = NULL;

    fprintf (stderr,
	     "Failed ST_Cutter() test: %s\nGetCutterMessage() reports: ",
	     test_sql);

    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "\n");
	  return;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT)
		  {
		      const char *msg =
			  (const char *) sqlite3_column_text (stmt, 0);
		      fprintf (stderr, "%s", msg);
		  }
	    }
      }
    sqlite3_finalize (stmt);
    fprintf (stderr, "\n");
}

static int
test_query (sqlite3 * sqlite, const char *sql)
{
/* testing some SQL query returning an INT value */
    int ret;
    int ok = 0;
    sqlite3_stmt *stmt = NULL;
    fprintf (stderr, "\n\n%s\n", sql);

    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "%s\n: \"%s\"\n", sql, sqlite3_errmsg (sqlite));
	  return 0;
      }
    while (1)
      {
	  /* scrolling the result set rows */
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;		/* end of result set */
	  if (ret == SQLITE_ROW)
	    {
		if (sqlite3_column_type (stmt, 0) == SQLITE_INTEGER)
		  {
		      if (sqlite3_column_int (stmt, 0) >= 1)
			  ok = 1;
		  }
	    }
	  else
	      goto error;
      }
    sqlite3_finalize (stmt);
    if (ok != 1)
	do_get_cutter_message (sqlite, sql);
    return ok;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

static int
check_cutter_main (sqlite3 * handle, int *retcode)
{
/* testing ST_Cutter - MAIN DB */
    const char *sql;
    int ret;

/* cutting Points XY - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xy', NULL, NULL, 'blades_xyzm', NULL, 'out_points_xy_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 1;
	  return 0;
      }

/* cutting Points XY - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xy', NULL, NULL, 'blades_xyz', NULL, 'out_points_xy_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 2;
	  return 0;
      }

/* cutting Points XY - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xy', NULL, NULL, 'blades_xym', NULL, 'out_points_xy_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 3;
	  return 0;
      }

/* cutting Points XY - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'points_xy', 'geometry', 'main', 'blades_xy', 'geometry', 'out_points_xy_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 4;
	  return 0;
      }

/* cutting Linestrings XY - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xy', NULL, NULL, 'blades_xyzm', NULL, 'out_lines_xy_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 5;
	  return 0;
      }

/* cutting Linestrings XY - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xy', NULL, NULL, 'blades_xyz', NULL, 'out_lines_xy_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 6;
	  return 0;
      }

/* cutting Linestrings XY - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xy', NULL, NULL, 'blades_xym', NULL, 'out_lines_xy_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 7;
	  return 0;
      }

/* cutting Linestrings XY - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'lines_xy', 'geometry', 'main', 'blades_xy', 'geometry', 'out_lines_xy_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 8;
	  return 0;
      }

/* cutting Polygons XY - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xy', NULL, NULL, 'blades_xyzm', NULL, 'out_polygs_xy_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 9;
	  return 0;
      }

/* cutting Polygons XY - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xy', NULL, NULL, 'blades_xyz', NULL, 'out_polygs_xy_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 10;
	  return 0;
      }

/* cutting Polygons XY - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xy', NULL, NULL, 'blades_xym', NULL, 'out_polygs_xy_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 11;
	  return 0;
      }

/* cutting Polygons XY - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'polygs_xy', 'geometry', 'main', 'blades_xy', 'geometry', 'out_polygs_xy_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 12;
	  return 0;
      }

/* cutting Points XYZ - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xyz', NULL, NULL, 'blades_xyzm', NULL, 'out_points_xyz_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 13;
	  return 0;
      }

/* cutting Points XYZ - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xyz', NULL, NULL, 'blades_xyz', NULL, 'out_points_xyz_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 14;
	  return 0;
      }

/* cutting Points XYZ - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xyz', NULL, NULL, 'blades_xym', NULL, 'out_points_xyz_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 15;
	  return 0;
      }

/* cutting Points XYZ - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'points_xyz', 'geometry', 'main', 'blades_xy', 'geometry', 'out_points_xyz_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 16;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xyz', NULL, NULL, 'blades_xyzm', NULL, 'out_lines_xyz_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 17;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xyz', NULL, NULL, 'blades_xyz', NULL, 'out_lines_xyz_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 18;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xyz', NULL, NULL, 'blades_xym', NULL, 'out_lines_xyz_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 19;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'lines_xyz', 'geometry', 'main', 'blades_xy', 'geometry', 'out_lines_xyz_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 20;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xyz', NULL, NULL, 'blades_xyzm', NULL, 'out_polygs_xyz_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 21;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xyz', NULL, NULL, 'blades_xyz', NULL, 'out_polygs_xyz_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 22;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xyz', NULL, NULL, 'blades_xym', NULL, 'out_polygs_xyz_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 23;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'polygs_xyz', 'geometry', 'main', 'blades_xy', 'geometry', 'out_polygs_xyz_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 24;
	  return 0;
      }

/* cutting Points XYM - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xym', NULL, NULL, 'blades_xyzm', NULL, 'out_points_xym_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 25;
	  return 0;
      }

/* cutting Points XYM - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xym', NULL, NULL, 'blades_xyz', NULL, 'out_points_xym_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 26;
	  return 0;
      }

/* cutting Points XYM - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xym', NULL, NULL, 'blades_xym', NULL, 'out_points_xym_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 27;
	  return 0;
      }

/* cutting Points XYM - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'points_xym', 'geometry', 'main', 'blades_xy', 'geometry', 'out_points_xym_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 28;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xym', NULL, NULL, 'blades_xyzm', NULL, 'out_lines_xym_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 29;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xym', NULL, NULL, 'blades_xyz', NULL, 'out_lines_xym_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 30;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xym', NULL, NULL, 'blades_xym', NULL, 'out_lines_xym_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 31;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'lines_xym', 'geometry', 'main', 'blades_xy', 'geometry', 'out_lines_xym_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 32;
	  return 0;
      }

/* cutting Polygons XYM - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xym', NULL, NULL, 'blades_xyzm', NULL, 'out_polygs_xym_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 33;
	  return 0;
      }

/* cutting Polygons XYM - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xym', NULL, NULL, 'blades_xyz', NULL, 'out_polygs_xym_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 34;
	  return 0;
      }

/* cutting Polygons XYM - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xym', NULL, NULL, 'blades_xym', NULL, 'out_polygs_xym_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 35;
	  return 0;
      }

/* cutting Polygons XYM - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'polygs_xym', 'geometry', 'main', 'blades_xy', 'geometry', 'out_polygs_xym_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 36;
	  return 0;
      }

/* cutting Points XYZM - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xyzm', NULL, NULL, 'blades_xyzm', NULL, 'out_points_xyzm_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 37;
	  return 0;
      }

/* cutting Points XYZM - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xyzm', NULL, NULL, 'blades_xyz', NULL, 'out_points_xyzm_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 38;
	  return 0;
      }

/* cutting Points XYZM - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'points_xyzm', NULL, NULL, 'blades_xym', NULL, 'out_points_xyzm_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 39;
	  return 0;
      }

/* cutting Points XYZM - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'points_xyzm', 'geometry', 'main', 'blades_xy', 'geometry', 'out_points_xyzm_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 40;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xyzm', NULL, NULL, 'blades_xyzm', NULL, 'out_lines_xyzm_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 41;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xyzm', NULL, NULL, 'blades_xyz', NULL, 'out_lines_xyzm_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 42;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'lines_xyzm', NULL, NULL, 'blades_xym', NULL, 'out_lines_xyzm_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 43;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'lines_xyzm', 'geometry', 'main', 'blades_xy', 'geometry', 'out_lines_xyzm_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 44;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XYZM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xyzm', 'geometry', NULL, 'blades_xyzm', NULL, 'out_polygs_xyzm_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 45;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XYZ */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xyzm', 'geometry', NULL, 'blades_xyz', NULL, 'out_polygs_xyzm_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 46;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XYM */
    sql =
	"SELECT ST_Cutter(NULL, 'polygs_xyzm', 'geometry', NULL, 'blades_xym', NULL, 'out_polygs_xyzm_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 47;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XY */
    sql =
	"SELECT ST_Cutter('MAIN', 'polygs_xyzm', 'geometry', 'main', 'blades_xy', 'geometry', 'out_polygs_xyzm_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 48;
	  return 0;
      }

    return 1;
}

static int
check_cutter_attach (sqlite3 * handle, int *retcode)
{
/* testing ST_Cutter - ATTACHed DB */
    const char *sql;
    int ret;

/* cutting Points XY - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'points_xy', NULL, 'blade', 'blades_xyzm', NULL, 'out_points_xy_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 1;
	  return 0;
      }

/* cutting Points XY - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'points_xy', NULL, 'blade', 'blades_xyz', NULL, 'out_points_xy_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 2;
	  return 0;
      }

/* cutting Points XY - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'points_xy', NULL, 'blade', 'blades_xym', NULL, 'out_points_xy_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 3;
	  return 0;
      }

/* cutting Points XY - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'points_xy', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_points_xy_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 4;
	  return 0;
      }

/* cutting Linestrings XY - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xy', NULL, 'blade', 'blades_xyzm', NULL, 'out_lines_xy_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 5;
	  return 0;
      }

/* cutting Linestrings XY - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'lines_xy', NULL, 'blade', 'blades_xyz', NULL, 'out_lines_xy_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 6;
	  return 0;
      }

/* cutting Linestrings XY - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xy', NULL, 'blade', 'blades_xym', NULL, 'out_lines_xy_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 7;
	  return 0;
      }

/* cutting Linestrings XY - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'lines_xy', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_lines_xy_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 8;
	  return 0;
      }

/* cutting Polygons XY - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xy', NULL, 'blade', 'blades_xyzm', NULL, 'out_polygs_xy_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 9;
	  return 0;
      }

/* cutting Polygons XY - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xy', NULL, 'blade', 'blades_xyz', NULL, 'out_polygs_xy_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 10;
	  return 0;
      }

/* cutting Polygons XY - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xy', NULL, 'blade', 'blades_xym', NULL, 'out_polygs_xy_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 11;
	  return 0;
      }

/* cutting Polygons XY - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xy', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_polygs_xy_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 12;
	  return 0;
      }

/* cutting Points XYZ - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'points_xyz', NULL, 'blade', 'blades_xyzm', NULL, 'out_points_xyz_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 13;
	  return 0;
      }

/* cutting Points XYZ - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'points_xyz', NULL, 'blade', 'blades_xyz', NULL, 'out_points_xyz_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 14;
	  return 0;
      }

/* cutting Points XYZ - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'points_xyz', NULL, 'blade', 'blades_xym', NULL, 'out_points_xyz_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 15;
	  return 0;
      }

/* cutting Points XYZ - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'points_xyz', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_points_xyz_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 16;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyz', NULL, 'blade', 'blades_xyzm', NULL, 'out_lines_xyz_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 17;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyz', NULL, 'blade', 'blades_xyz', NULL, 'out_lines_xyz_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 18;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyz', NULL, 'blade', 'blades_xym', NULL, 'out_lines_xyz_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 19;
	  return 0;
      }

/* cutting Linestrings XYZ - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyz', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_lines_xyz_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 20;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyz', NULL, 'blade', 'blades_xyzm', NULL, 'out_polygs_xyz_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 21;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyz', NULL, 'blade', 'blades_xyz', NULL, 'out_polygs_xyz_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 22;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyz', NULL, 'blade', 'blades_xym', NULL, 'out_polygs_xyz_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 23;
	  return 0;
      }

/* cutting Polygons XYZ - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyz', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_polygs_xyz_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 24;
	  return 0;
      }

/* cutting Points XYM - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'points_xym', NULL, 'blade', 'blades_xyzm', NULL, 'out_points_xym_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 25;
	  return 0;
      }

/* cutting Points XYM - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'points_xym', NULL, 'blade', 'blades_xyz', NULL, 'out_points_xym_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 26;
	  return 0;
      }

/* cutting Points XYM - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'points_xym', NULL, 'blade', 'blades_xym', NULL, 'out_points_xym_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 27;
	  return 0;
      }

/* cutting Points XYM - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'points_xym', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_points_xym_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 28;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xym', NULL, 'blade', 'blades_xyzm', NULL, 'out_lines_xym_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 29;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'lines_xym', NULL, 'blade', 'blades_xyz', NULL, 'out_lines_xym_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 30;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xym', NULL, 'blade', 'blades_xym', NULL, 'out_lines_xym_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 31;
	  return 0;
      }

/* cutting Linestrings XYM - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'lines_xym', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_lines_xym_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 32;
	  return 0;
      }

/* cutting Polygons XYM - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xym', NULL, 'blade', 'blades_xyzm', NULL, 'out_polygs_xym_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 33;
	  return 0;
      }

/* cutting Polygons XYM - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xym', NULL, 'blade', 'blades_xyz', NULL, 'out_polygs_xym_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 34;
	  return 0;
      }

/* cutting Polygons XYM - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xym', NULL, 'blade', 'blades_xym', NULL, 'out_polygs_xym_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 35;
	  return 0;
      }

/* cutting Polygons XYM - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xym', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_polygs_xym_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 36;
	  return 0;
      }

/* cutting Points XYZM - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'points_xyzm', NULL, 'blade', 'blades_xyzm', NULL, 'out_points_xyzm_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 37;
	  return 0;
      }

/* cutting Points XYZM - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'points_xyzm', NULL, 'blade', 'blades_xyz', NULL, 'out_points_xyzm_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 38;
	  return 0;
      }

/* cutting Points XYZM - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'points_xyzm', NULL, 'blade', 'blades_xym', NULL, 'out_points_xyzm_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 39;
	  return 0;
      }

/* cutting Points XYZM - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'points_xyzm', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_points_xyzm_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 40;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyzm', NULL, 'blade', 'blades_xyzm', NULL, 'out_lines_xyzm_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 41;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyzm', NULL, 'blade', 'blades_xyz', NULL, 'out_lines_xyzm_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 42;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyzm', NULL, 'blade', 'blades_xym', NULL, 'out_lines_xyzm_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 43;
	  return 0;
      }

/* cutting Linestrings XYZM - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'lines_xyzm', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_lines_xyzm_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 44;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XYZM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyzm', 'geometry', 'blade', 'blades_xyzm', NULL, 'out_polygs_xyzm_xyzm', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 45;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XYZ */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyzm', 'geometry', 'blade', 'blades_xyz', NULL, 'out_polygs_xyzm_xyz', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 46;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XYM */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyzm', 'geometry', 'blade', 'blades_xym', NULL, 'out_polygs_xyzm_xym', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 47;
	  return 0;
      }

/* cutting Polygons XYZM - Blade XY */
    sql =
	"SELECT ST_Cutter('input', 'polygs_xyzm', 'geometry', 'blade', 'blades_xy', 'geometry', 'out_polygs_xyzm_xy', 1, 1)";
    ret = test_query (handle, sql);
    if (!ret)
      {
	  *retcode -= 48;
	  return 0;
      }

    return 1;
}

static int
create_points_xyzm (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POINT XYZM */
    int ret;
    char *err_msg = NULL;

    ret = sqlite3_exec (handle, "CREATE TABLE points_xyzm ("
			"pk_2 DOUBLE NOT NULL, pk_1 TEXT NOT NULL, pk_3 TEXT NOT NULL,"
			"CONSTRAINT points_xyzm_pk PRIMARY KEY (pk_1, pk_2, pk_3))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xyzm error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'points_xyzm', 'geometry', 4326, 'POINT', 'XYZM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xyzm Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'a', 'a', "
		      "GeomFromText('POINT ZM(-10 10 1 2)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'a', 'b', "
		      "GeomFromText('POINT ZM(16 3 2 22)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 4;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'a', 'c', "
		      "GeomFromText('POINT ZM(34 9 3 12)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 5;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'a', 'd', "
		      "GeomFromText('POINT ZM(14 15 4 15)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 6;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'a', 'e', "
		      "GeomFromText('POINT ZM(10 10 4.5 11)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 7;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'a', 'f', "
		      "GeomFromText('POINT ZM(7 10 14.5 17)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 8;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'b', 'a', "
		      "GeomFromText('POINT ZM(10 8 12.5 7)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 9;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'b', 'b', "
		      "GeomFromText('POINT ZM(10 8 2.5 7.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 10;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'b', 'c', "
		      "GeomFromText('POINT ZM(20 2 23.5 72.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 11;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'b', 'd', "
		      "GeomFromText('POINT ZM(24 4.25 23 74)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 12;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'b', 'e', "
		      "GeomFromText('POINT ZM(23 0 25 41)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 13;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'b', 'f', "
		      "GeomFromText('POINT ZM(5.1 5.1 22 51)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 14;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'c', 'a', "
		      "GeomFromText('POINT ZM(25.1 5.1 22 51)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 15;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'c', 'b', "
		      "GeomFromText('POINT ZM(8 2 32 71)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 16;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'c', 'c', "
		      "GeomFromText('POINT ZM(28 2 36 75)', 4326))", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 17;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'c', 'd', "
		      "GeomFromText('POINT ZM(11 111 3.6 7.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 18;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'c', 'e', "
		      "GeomFromText('POINT ZM(12 112 4.6 76.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 19;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (1.0, 'c', 'f', "
		      "GeomFromText('POINT ZM(17 117 46 75)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 20;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (2.0, 'a', 'a', "
		      "GeomFromText('POINT ZM(25 85 47 76)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 21;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (2.0, 'a', 'b', "
		      "GeomFromText('POINT ZM(15 95 74 67)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 22;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (2.0, 'a', 'c', "
		      "GeomFromText('POINT ZM(25 95 78 68)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 23;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (2.0, 'a', 'd', "
		      "GeomFromText('POINT ZM(55 85 79 58)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 24;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (2.0, 'a', 'e', "
		      "GeomFromText('POINT ZM(40 120 79.5 58.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 25;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (2.0, 'a', 'f', "
		      "GeomFromText('POINT ZM(42 120 79.5 58.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 26;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyzm VALUES (6.0, 'e', 'd', "
		      "GeomFromText('POINT ZM(45 120 9.5 8.5)', 4326))", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 27;
	  return 0;
      }
    return 1;
}

static int
create_points_xyz (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POINT XYZ */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE points_xyz (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'points_xyz', 'geometry', 4326, 'POINT', 'XYZ')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xyz Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xyz SELECT NULL, CastToXYZ(geometry) FROM points_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_points_xym (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POINT XYM */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE points_xym (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xym error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'points_xym', 'geometry', 4326, 'POINT', 'XYM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xym Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xym SELECT NULL, CastToXYM(geometry) FROM points_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xym Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_points_xy (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POINT XY */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE points_xy (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'points_xy', 'geometry', 4326, 'POINT', 'XY')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE points_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO points_xy SELECT NULL, CastToXY(geometry) FROM points_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO points_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_lines_xyzm (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - LINESTRING XYZM */
    int ret;
    char *err_msg = NULL;

    ret = sqlite3_exec (handle, "CREATE TABLE lines_xyzm ("
			"pk_1 DOUBLE NOT NULL, pk_2 TEXT NOT NULL, pk_3 TEXT NOT NULL,"
			"CONSTRAINT lines_xyzm_pk PRIMARY KEY (pk_1, pk_2, pk_3))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xyzm error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'lines_xyzm', 'geometry', 4326, 'LINESTRING', 'XYZM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xyzm Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (1.0, 'a', 'a', "
			"GeomFromText('LINESTRING ZM(-10 5.5 1 2, 35 5.5 3 4)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (1.0, 'a', 'b', "
			"GeomFromText('LINESTRING ZM(2 9 4 4, 7 9 5 5)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 4;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (1.0, 'a', 'c', "
			"GeomFromText('LINESTRING ZM(6 4 3 2, 10 4 2 3)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 5;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (1.0, 'a', 'd', "
			"GeomFromText('LINESTRING ZM(3 4.5 1 2, 7 4.5 4 3)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 6;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (1.0, 'a', 'e', "
			"GeomFromText('LINESTRING ZM(2 2 5 5, 8 8 5 5)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 7;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (1.0, 'a', 'f', "
			"GeomFromText('LINESTRING ZM(-1 2 2 3, 0 2 3 2, 0 0 2 3, 5 0 3 2, 5 -1 2 3)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 8;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'a', 'a', "
			"GeomFromText('LINESTRING ZM(30 11 1 2, 30 6 2 1, 31 5 1 2, 30 4 1 2, 30 0 2 1, "
			"24 0 2 1, 24 4 2 3, 26 4 3 2, 27 5 3 2, 26 6 2 3, 24 6 1 3, 24 10 3 1, 20 10 2 3, 20 3 2 1)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 9;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'b', 'a', "
			"GeomFromText('LINESTRING ZM(-2 52 3 4, 20 52 4 3, 20 45 3 2)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 10;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'c', 'a', "
			"GeomFromText('LINESTRING ZM(0 100 4 5, 100 100 5 4)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 11;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'd', 'a', "
			"GeomFromText('LINESTRING ZM(20 80 2 4, 70 80 4 2)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 12;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'e', 'a', "
			"GeomFromText('LINESTRING ZM(20 90 1 4, 70 90 2 3)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 13;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'f', 'a', "
			"GeomFromText('LINESTRING ZM(20 70 6 2, 70 70 6 4)', 4326))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 14;
	  return 0;
      }
    ret = sqlite3_exec (handle, "INSERT INTO lines_xyzm VALUES (2.0, 'f', 'f', "
			"GeomFromText('LINESTRING ZM(40 140 2 3, 60 140 3 4, 100 100 5 6, "
			"60 60 7 1, 50 60 4 2)', 4326))", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 15;
	  return 0;
      }
    return 1;
}

static int
create_lines_xyz (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - LINESTRING XYZ */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE lines_xyz (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'lines_xyz', 'geometry', 4326, 'LINESTRING', 'XYZ')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xyz Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO lines_xyz SELECT NULL, CastToXYZ(geometry) FROM lines_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_lines_xym (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - LINESTRING XYM */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE lines_xym (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xym error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'lines_xym', 'geometry', 4326, 'LINESTRING', 'XYM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xym Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO lines_xym SELECT NULL, CastToXYM(geometry) FROM lines_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xym Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_lines_xy (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - LINESTRING XY */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE lines_xy (pk_id INTEGER PRIMARY KEY)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'lines_xy', 'geometry', 4326, 'LINESTRING', 'XY')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE lines_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO lines_xy SELECT NULL, CastToXY(geometry) FROM lines_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO lines_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_polygs_xyzm (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POLYGON XYZM */
    int ret;
    char *err_msg = NULL;

    ret = sqlite3_exec (handle, "CREATE TABLE polygs_xyzm ("
			"pk_3 DOUBLE NOT NULL, pk_1 TEXT NOT NULL, pk_2 TEXT NOT NULL,"
			"CONSTRAINT polygs_xyzm_pk PRIMARY KEY (pk_1, pk_2, pk_3))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polygs_xyzm error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'polygs_xyzm', 'geometry', 4326, 'POLYGON', 'XYZM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polygs_xyzm Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (1.5, 'a', 'a', "
		      "GeomFromText('POLYGON ZM((-2 15 1 2, 35 15 2 3, 35 5 3 2, -2 5 2 2, -2 15 1 2))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (1.0, 'a', 'a', "
		      "GeomFromText('POLYGON ZM((-2 5 1 1, 10 5 2 2, 10 -5 1 2, -2 -5 2 1, -2 5 1 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 4;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (1.1, 'a', 'a', "
		      "GeomFromText('POLYGON ZM((10 5 3 4, 20 5 3 4, 20 -5 4 3, 10 -5 4 3, 10 5 3 4))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 5;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (2.0, 'a', 'a', "
		      "GeomFromText('POLYGON ZM((20 5 2 5, 35 5 3 5, 35 -5 2 3, 20 -5 3 3, 20 5 2 5))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 6;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (3.5, 'a', 'a', "
		      "GeomFromText('POLYGON ZM((0 100 1 1, 100 100 2 2, 100 150 2 1, 0 150 2 3, 0 100 1 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 7;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (0.5, 'a', 'a', "
		      "GeomFromText('POLYGON ZM((0 100 2 3, 100 100 3 1, 100 50 1 3, 0 50 2 1, 0 100 2 3))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 8;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES (2.4, 'b', 'a', "
		      "GeomFromText('POLYGON ZM((70 10 1 2, 100 10 2 1, 100 40 2 3, 70 40 3 2, 70 10 1 2), "
		      "(80 20 2 2, 90 20 3 3, 90 30 2 3, 80 30 3 2, 80 20 2 2))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 9;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyzm VALUES ('a', 'b', 'c', "
		      "GeomFromText('POLYGON ZM((80 20 1 2, 90 20 2 3, 90 30 3 4, 80 30 3 2, 80 20 1 2))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 10;
	  return 0;
      }

    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'polygs_xyzm', 'centroid', 4326, 'POINT', 'XY')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polygs_xyzm Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 11;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE polygs_xyzm SET centroid = CastToXY(ST_Centroid(geometry))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE polygs_xyzm SET Centroid error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 12;
	  return 0;
      }
    return 1;
}

static int
create_polygs_xyz (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POLYGON XYZ */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE polygs_xyz (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polys_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'polygs_xyz', 'geometry', 4326, 'POLYGON', 'XYZ')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polys_xyz Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xyz SELECT NULL, CastToXYZ(geometry) FROM polygs_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_polygs_xym (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POLYGON XYM */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE polygs_xym (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polys_xym error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'polygs_xym', 'geometry', 4326, 'POLYGON', 'XYM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polys_xym Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xym SELECT NULL, CastToXYM(geometry) FROM polygs_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xym Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_polygs_xy (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - POLYGON XY */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE polygs_xy (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polys_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'polygs_xy', 'geometry', 4326, 'POLYGON', 'XY')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE polys_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO polygs_xy SELECT NULL, CastToXY(geometry) FROM polygs_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO polygs_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_blades_xyzm (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - BLADES XYZM */
    int ret;
    char *err_msg = NULL;

    ret = sqlite3_exec (handle, "CREATE TABLE blades_xyzm ("
			"pk_1 TEXT NOT NULL, pk_2 TEXT NOT NULL, pk_3 TEXT NOT NULL,"
			"CONSTRAINT blades_xyzm_pk PRIMARY KEY (pk_1, pk_2, pk_3))",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xyzm error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'blades_xyzm', 'geometry', 4326, 'POLYGON', 'XYZM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xyzm Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO blades_xyzm VALUES ('a', 'a', 'a', "
		      "GeomFromText('POLYGON ZM((0 0 0 0, 10 0 0 1, 10 10 1 1, 0 10 1 2, 0 0 0 0), "
		      "(4 4 1 2, 6 4 2 1, 6 6 3 2, 4 6 2 1, 4 4 1 2))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO blades_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO blades_xyzm VALUES ('b', 'c', 'd', "
		      "GeomFromText('POLYGON ZM((20 0 1 2, 30 0 2 3, 30 4 3 2, 31 5 2 3, 30 6 2 1, 30 10 2 0, 20 10 0 2, 20 0 1 2), "
		      "(24 4 1 1, 26 4 2 2, 27 5 2 1, 26 6 1 2, 24 6 2 1, 24 4 1 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO blades_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 4;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO blades_xyzm VALUES ('d', 'c', 'e', "
		      "GeomFromText('POLYGON ZM((50 50 1 2, 100 100 2 3, 50 150 3 2, 0 100 2 1, 0 50 1 0, 50 50 1 2), "
		      "(40 80 1 2, 60 80 2 3, 60 100 3 4, 40 80 1 2), "
		      "(10 100 1 3, 30 80 3 2, 30 100 2 3, 10 100 1 3))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO blades_xyzm Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 5;
	  return 0;
      }
    return 1;
}

static int
create_blades_xyz (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - BLADES XYZ */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE blades_xyz (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xyz error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'blades_xyz', 'geometry', 4326, 'POLYGON', 'XYZ')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xyz Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO blades_xyz SELECT NULL, CastToXYZ(geometry) FROM blades_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO blades_xyz Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
create_blades_xym (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - BLADES XYM */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE blades_xym (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xym error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'blades_xym', 'geometry', 4326, 'POLYGON', 'XYM')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xym Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateSpatialIndex('blades_xym', 'geometry')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xym Spatial Index error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO blades_xym SELECT NULL, CastToXYM(geometry) FROM blades_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO blades_xym Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 4;
	  return 0;
      }
    return 1;
}

static int
create_blades_xy (sqlite3 * handle, int *retcode)
{
/* creating and populating a test table - BLADES XY */
    int ret;
    char *err_msg = NULL;

    ret =
	sqlite3_exec (handle,
		      "CREATE TABLE blades_xy (pk_id INTEGER PRIMARY KEY)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xy error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }
    ret = sqlite3_exec (handle, "SELECT AddGeometryColumn("
			"'blades_xy', 'geometry', 4326, 'POLYGON', 'XY')",
			NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE blades_xy Geometry error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO blades_xy SELECT NULL, CastToXY(geometry) FROM blades_xyzm",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO blades_xy Geometry error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }
    return 1;
}

static int
check_cutter_attached (int *retcode)
{
/* testing ST_Cutter on ATTACHed DBs */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" databse: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  *retcode -= 1;
	  return 0;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 2;
	  return 0;
      }

    ret =
	sqlite3_exec (handle,
		      "ATTACH DATABASE \"./test_cutter.sqlite\" AS input", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ATTACH DATABASE Input: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 3;
	  return 0;
      }

    ret =
	sqlite3_exec (handle,
		      "ATTACH DATABASE \"./test_cutter.sqlite\" AS blade", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ATTACH DATABASE Blade: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 4;
	  return 0;
      }

    if (!check_cutter_attach (handle, retcode))
      {
	  *retcode -= 5;
	  sqlite3_close (handle);
	  return 0;
      }

    ret = sqlite3_exec (handle, "DETACH DATABASE input", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DETACH DATABASE Input: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 6;
	  return 0;
      }

    ret = sqlite3_exec (handle, "DETACH DATABASE blade", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DETACH DATABASE Blade: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode -= 7;
	  return 0;
      }

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  *retcode -= 8;
	  return 0;
      }

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
#ifndef OMIT_GEOS		/* only if GEOS is enabled */
    int ret;
    int retcode;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    unlink ("./test_cutter.sqlite");

    ret =
	sqlite3_open_v2 ("./test_cutter.sqlite", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \"test_cutter.sqlite\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret = sqlite3_exec (handle, "BEGIN", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "BEGIN TRANSACTION error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating and populating a test table - POINT XYZM */
    retcode = -10;
    if (!create_points_xyzm (handle, &retcode))
	return retcode;

/* creating and populating a test table - POINT XYZ */
    retcode = -10;
    if (!create_points_xyz (handle, &retcode))
	return retcode;

/* creating and populating a test table - POINT XYM */
    retcode = -50;
    if (!create_points_xym (handle, &retcode))
	return retcode;

/* creating and populating a test table - POINT XY */
    retcode = -100;
    if (!create_points_xy (handle, &retcode))
	return retcode;

/* creating and populating a test table - LINESTRING XYZM */
    retcode = -150;
    if (!create_lines_xyzm (handle, &retcode))
	return retcode;

/* creating and populating a test table - LINESTRING XYZ */
    retcode = -200;
    if (!create_lines_xyz (handle, &retcode))
	return retcode;

/* creating and populating a test table - LINESTRING XYM */
    retcode = -250;
    if (!create_lines_xym (handle, &retcode))
	return retcode;

/* creating and populating a test table - LINESTRING XY */
    retcode = -300;
    if (!create_lines_xy (handle, &retcode))
	return retcode;

/* creating and populating a test table - POLYGON XYZM */
    retcode = -350;
    if (!create_polygs_xyzm (handle, &retcode))
	return retcode;

/* creating and populating a test table - POLYGON XYZ */
    retcode = -400;
    if (!create_polygs_xyz (handle, &retcode))
	return retcode;

/* creating and populating a test table - POLYGON XYM */
    retcode = -450;
    if (!create_polygs_xym (handle, &retcode))
	return retcode;

/* creating and populating a test table - POLYGON XY */
    retcode = -500;
    if (!create_polygs_xy (handle, &retcode))
	return retcode;

/* creating and populating a test table - BLADES XYZM */
    retcode = -550;
    if (!create_blades_xyzm (handle, &retcode))
	return retcode;

/* creating and populating a test table - BLADES XYZ */
    retcode = -600;
    if (!create_blades_xyz (handle, &retcode))
	return retcode;

/* creating and populating a test table - BLADES XYM */
    retcode = -650;
    if (!create_blades_xym (handle, &retcode))
	return retcode;

/* creating and populating a test table - BLADES XY */
    retcode = -700;
    if (!create_blades_xy (handle, &retcode))
	return retcode;

    ret = sqlite3_exec (handle, "COMMIT", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "COMMIT TRANSACTION error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* testing ST_Cutter - MAIN DB */
    retcode = -750;
    if (!check_cutter_main (handle, &retcode))
	return retcode;

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -5;
      }

    spatialite_cleanup_ex (cache);

/* testing ST_Cutter - ATTACHED DB */
    retcode = -800;
    if (!check_cutter_attached (&retcode))
	return retcode;

#endif /* end GEOS conditional */
    unlink ("./test_cutter.sqlite");

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_dbf_load.c.

56
57
58
59
60
61
62



63
64
65
66
67
68
69
...
109
110
111
112
113
114
115
116
117
118
119
120
121
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory databse: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
	  return -5;
      }

    spatialite_cleanup_ex (cache);

#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
...
112
113
114
115
116
117
118



119
120
121
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory databse: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
	  return -5;
      }

    spatialite_cleanup_ex (cache);

#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_dxf.c.

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
....
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gg_dxf.h"

#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif

#ifndef OMIT_GEOS		/* only if GEOS is enabled */

static int
check_22_auto (int cache_mode)
{
/* testing 22.dxf - pass #1 autoDims */
    int ret;
................................................................................
    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

#ifndef OMIT_GEOS		/* only if GEOS is enabled */

    for (cache_mode = 0; cache_mode <= 1; cache_mode++)
      {
#ifdef GEOS_USE_ONLY_R_API	/* skipping legacy test */
	  if (!cache_mode)
	      continue;
#endif

	  fprintf (stderr, "\n******* Testing DXF in %s cache-mode\n\n",
		   cache_mode ? "current" : "legacy");

	  if (check_22_auto (cache_mode) != 0)
	      return -1;

	  if (check_22_2d (cache_mode) != 0)







<
<
<
<
<
<







 







<
<
<
<
<







47
48
49
50
51
52
53






54
55
56
57
58
59
60
....
1398
1399
1400
1401
1402
1403
1404





1405
1406
1407
1408
1409
1410
1411

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gg_dxf.h"







#ifndef OMIT_GEOS		/* only if GEOS is enabled */

static int
check_22_auto (int cache_mode)
{
/* testing 22.dxf - pass #1 autoDims */
    int ret;
................................................................................
    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

#ifndef OMIT_GEOS		/* only if GEOS is enabled */

    for (cache_mode = 0; cache_mode <= 1; cache_mode++)
      {





	  fprintf (stderr, "\n******* Testing DXF in %s cache-mode\n\n",
		   cache_mode ? "current" : "legacy");

	  if (check_22_auto (cache_mode) != 0)
	      return -1;

	  if (check_22_2d (cache_mode) != 0)

Changes to test/check_exif.c.

508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534

    if (!gaiaGetGpsLatLong (blob, sz, human, 8192))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords from JPEG image: DSCN0042.JPG\n");
	  return -32;
      }
    if (strcmp (human, "43°27′52″N 011°52′53″E") != 0)
      {
	  fprintf (stderr, "DSCN0042.JPG: GPS coords unexpected value: %s|\n",
		   human);
	  return -33;
      };
    if (!gaiaGetGpsLatLong (blob, sz, human, 15))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords(20) from JPEG image: DSCN0042.JPG\n");
	  return -34;
      }
    if (strcmp (human, "43°27′52″N") != 0)
      {
	  fprintf (stderr,
		   "DSCN0042.JPG: GPS coords(20) unexpected value: %s|\n",
		   human);
	  return -35;
      };
    if (!gaiaGetGpsCoords (blob, sz, &longitude, &latitude))







|





|





|







508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534

    if (!gaiaGetGpsLatLong (blob, sz, human, 8192))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords from JPEG image: DSCN0042.JPG\n");
	  return -32;
      }
    if (strcmp (human, "N 43.00 27.00 52.04 / E 11.00 52.00 53.32") != 0)
      {
	  fprintf (stderr, "DSCN0042.JPG: GPS coords unexpected value: %s|\n",
		   human);
	  return -33;
      };
    if (!gaiaGetGpsLatLong (blob, sz, human, 20))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords(20) from JPEG image: DSCN0042.JPG\n");
	  return -34;
      }
    if (strcmp (human, "N 43.00 27.00 52.04 ") != 0)
      {
	  fprintf (stderr,
		   "DSCN0042.JPG: GPS coords(20) unexpected value: %s|\n",
		   human);
	  return -35;
      };
    if (!gaiaGetGpsCoords (blob, sz, &longitude, &latitude))

Changes to test/check_exif2.c.

352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379

    if (!gaiaGetGpsLatLong (blob, sz, human, 8192))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords from JPEG image: Apple-iPhone-4.jpg\n");
	  return -32;
      }
    if (strcmp (human, "41°51′00″N 012°29′00″E") != 0)
      {
	  fprintf (stderr,
		   "Apple-iPhone-4.jpg: GPS coords unexpected value: %s|\n",
		   human);
	  return -33;
      };
    if (!gaiaGetGpsLatLong (blob, sz, human, 18))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords(18) from JPEG image: Apple-iPhone-4.jpg\n");
	  return -34;
      }
    if (strcmp (human, "41°51′00″N 01") != 0)
      {
	  fprintf (stderr,
		   "Apple-iPhone-4.jpg: GPS coords(18) unexpected value: %s|\n",
		   human);
	  return -35;
      };
    if (!gaiaGetGpsCoords (blob, sz, &longitude, &latitude))







|












|







352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379

    if (!gaiaGetGpsLatLong (blob, sz, human, 8192))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords from JPEG image: Apple-iPhone-4.jpg\n");
	  return -32;
      }
    if (strcmp (human, "N 41.00 51.18 0.00 / E 12.00 29.33 0.00") != 0)
      {
	  fprintf (stderr,
		   "Apple-iPhone-4.jpg: GPS coords unexpected value: %s|\n",
		   human);
	  return -33;
      };
    if (!gaiaGetGpsLatLong (blob, sz, human, 18))
      {
	  fprintf (stderr,
		   "cannot extract GPS coords(18) from JPEG image: Apple-iPhone-4.jpg\n");
	  return -34;
      }
    if (strcmp (human, "N 41.00 51.18 0.00") != 0)
      {
	  fprintf (stderr,
		   "Apple-iPhone-4.jpg: GPS coords(18) unexpected value: %s|\n",
		   human);
	  return -35;
      };
    if (!gaiaGetGpsCoords (blob, sz, &longitude, &latitude))

Changes to test/check_extension.c.

47
48
49
50
51
52
53




54
55
56
57
58
59
60
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
...
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"





int
main (int argc, char *argv[])
{
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
................................................................................
	  sqlite3_close (db_handle);
	  db_handle = NULL;
	  return -1;
      }

    sqlite3_enable_load_extension (db_handle, 1);

    sql_statement = sqlite3_mprintf ("SELECT load_extension('mod_spatialite')");

    ret = sqlite3_exec (db_handle, sql_statement, NULL, NULL, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "load_extension() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    sql_statement = sqlite3_mprintf ("SELECT spatialite_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
	  fprintf (stderr,
		   "Unexpected error: spatialite_version() bad result: %s.\n",
		   results[1]);
	  return -12;
      }
    sqlite3_free_table (results);

    sql_statement = sqlite3_mprintf ("SELECT geos_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error2: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -13;
      }

................................................................................
      {
	  fprintf (stderr, "Unexpected error: geos_version() bad result.\n");
	  return -15;
      }
#endif /* end GEOS conditional */
    sqlite3_free_table (results);

    sql_statement = sqlite3_mprintf ("SELECT proj4_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error3: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -16;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: proj4_version() bad result.\n");
	  return -19;
      }
#endif /* end PROJ conditional */
    sqlite3_free_table (results);

    sql_statement = sqlite3_mprintf ("SELECT spatialite_target_cpu()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error4: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -20;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
	  fprintf (stderr,
		   "Unexpected error: spatialite_target_cpu() bad result: %i/%i.\n",
		   rows, columns);
	  return -21;
      }
    sqlite3_free_table (results);

    sql_statement = sqlite3_mprintf ("SELECT rttopo_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error5: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -22;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected error: rttopo_version() bad result: %i/%i.\n",
		   rows, columns);
	  return -23;
      }

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */
    /* we tolerate any string here, because versions always change */
    if (strlen (results[1]) == 0)
      {
	  fprintf (stderr, "Unexpected error: rttopo_version() bad result.\n");
	  return -24;
      }
#else /* RTTOPO is not supported */
    /* in this case we expect a NULL */
    if (results[1] != NULL)
      {
	  fprintf (stderr, "Unexpected error: rttopo_version() bad result.\n");
	  return -25;
      }
#endif /* end RTTOPO conditional */
    sqlite3_free_table (results);

    sql_statement = sqlite3_mprintf ("SELECT libxml2_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error6: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -26;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: libxml2_version() bad result.\n");
	  return -29;
      }
#endif /* end LIBXML2 conditional */
    sqlite3_free_table (results);

    sql_statement = sqlite3_mprintf ("SELECT freexl_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows,
			   &columns, &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error2: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }








>
>
>
>







 







|


|







|

|
|
|







 







|

|
|
|







 







|

|
|
|







 







|

|
|
|







 







|

|
|
|









|




|



|


|



|


|


|

|
|
|







 







|

|
|
|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
..
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
...
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
...
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

int
main (int argc, char *argv[])
{
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
................................................................................
	  sqlite3_close (db_handle);
	  db_handle = NULL;
	  return -1;
      }

    sqlite3_enable_load_extension (db_handle, 1);

    asprintf (&sql_statement, "SELECT load_extension('mod_spatialite')");

    ret = sqlite3_exec (db_handle, sql_statement, NULL, NULL, &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "load_extension() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    asprintf (&sql_statement, "SELECT spatialite_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
	  fprintf (stderr,
		   "Unexpected error: spatialite_version() bad result: %s.\n",
		   results[1]);
	  return -12;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement, "SELECT geos_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error2: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -13;
      }

................................................................................
      {
	  fprintf (stderr, "Unexpected error: geos_version() bad result.\n");
	  return -15;
      }
#endif /* end GEOS conditional */
    sqlite3_free_table (results);

    asprintf (&sql_statement, "SELECT proj4_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error3: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -16;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: proj4_version() bad result.\n");
	  return -19;
      }
#endif /* end PROJ conditional */
    sqlite3_free_table (results);

    asprintf (&sql_statement, "SELECT spatialite_target_cpu()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error4: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -20;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
	  fprintf (stderr,
		   "Unexpected error: spatialite_target_cpu() bad result: %i/%i.\n",
		   rows, columns);
	  return -21;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement, "SELECT lwgeom_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error5: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -22;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected error: lwgeom_version() bad result: %i/%i.\n",
		   rows, columns);
	  return -23;
      }

#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */
    /* we tolerate any string here, because versions always change */
    if (strlen (results[1]) == 0)
      {
	  fprintf (stderr, "Unexpected error: lwgeom_version() bad result.\n");
	  return -24;
      }
#else /* LWGEOM is not supported */
    /* in this case we expect a NULL */
    if (results[1] != NULL)
      {
	  fprintf (stderr, "Unexpected error: lwgeom_version() bad result.\n");
	  return -25;
      }
#endif /* end LWGEOM conditional */
    sqlite3_free_table (results);

    asprintf (&sql_statement, "SELECT libxml2_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error6: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -26;
      }
    if ((rows != 1) || (columns != 1))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: libxml2_version() bad result.\n");
	  return -29;
      }
#endif /* end LIBXML2 conditional */
    sqlite3_free_table (results);

    asprintf (&sql_statement, "SELECT freexl_version()");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error2: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }

Changes to test/check_extra_relations_fncts.c.

47
48
49
50
51
52
53


54
55
56
57
58
59
60
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiageo.h"



int
main (int argc, char *argv[])
{
    int result;
    int returnValue = 0;
    gaiaRingPtr interior;







>
>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiageo.h"

static const double double_eps = 0.00000001;

int
main (int argc, char *argv[])
{
    int result;
    int returnValue = 0;
    gaiaRingPtr interior;

Changes to test/check_fdo1.c.

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
...
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
...
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598

#include "sqlite3.h"
#include "spatialite.h"

#include "spatialite/gaiageo.h"

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

static int
do_test (int legacy_mode)
{
#ifndef OMIT_GEOS		/* only if GEOS is supported */
................................................................................
    spatialite_cleanup_ex (cache);
    ret = unlink ("testFDO.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove testFDO database\n");
	  return -57;
      }

#else
    if (legacy_mode == 0)
	legacy_mode = 1;	/* suppressing stupid compiler warnings */
#endif /* end GEOS conditional */

    return 0;
}

int
main (int argc, char *argv[])
................................................................................
	argc = 1;		/* silencing stupid compiler warnings */

    fprintf (stderr, "********* testing in current mode\n");
    ret = do_test (0);
    if (ret != 0)
	return ret;

#ifndef GEOS_ONLY_REENTRANT	/* skipping legacy mode test (non-thread-safe GEOS API) */
    fprintf (stderr, "********* testing in legacy mode\n");
    ret = do_test (1);
    if (ret != 0)
	return ret;
#endif

    spatialite_shutdown ();
    return 0;
}







<
<
<
<
<







 







<
<
<
<







 







<




<




50
51
52
53
54
55
56





57
58
59
60
61
62
63
...
555
556
557
558
559
560
561




562
563
564
565
566
567
568
...
573
574
575
576
577
578
579

580
581
582
583

584
585
586
587

#include "sqlite3.h"
#include "spatialite.h"

#include "spatialite/gaiageo.h"

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif

static int
do_test (int legacy_mode)
{
#ifndef OMIT_GEOS		/* only if GEOS is supported */
................................................................................
    spatialite_cleanup_ex (cache);
    ret = unlink ("testFDO.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove testFDO database\n");
	  return -57;
      }




#endif /* end GEOS conditional */

    return 0;
}

int
main (int argc, char *argv[])
................................................................................
	argc = 1;		/* silencing stupid compiler warnings */

    fprintf (stderr, "********* testing in current mode\n");
    ret = do_test (0);
    if (ret != 0)
	return ret;


    fprintf (stderr, "********* testing in legacy mode\n");
    ret = do_test (1);
    if (ret != 0)
	return ret;


    spatialite_shutdown ();
    return 0;
}

Changes to test/check_fdo3.c.

66
67
68
69
70
71
72



73
74
75
76
77
78
79
...
206
207
208
209
210
211
212
213
214
215
216
217
218
    char *err_msg = NULL;
    const char *sql;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret = system ("cp sql_stmt_tests/testFGF.sqlite testFGF.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot copy testFGF.sqlite database\n");
	  return -1001;
      }
    ret =
................................................................................
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove testFGF database\n");
	  return -16;
      }
#endif /* end GEOS conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
...
209
210
211
212
213
214
215



216
217
218
    char *err_msg = NULL;
    const char *sql;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret = system ("cp sql_stmt_tests/testFGF.sqlite testFGF.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot copy testFGF.sqlite database\n");
	  return -1001;
      }
    ret =
................................................................................
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove testFGF database\n");
	  return -16;
      }
#endif /* end GEOS conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_gaia_utf8.c.

48
49
50
51
52
53
54




55
56
57
58
59
60
61
62



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
116
117
118
119
120
121
122
123
124
125
126
127
128

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiaaux.h"





int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    void *converter;
    char *test_str1;
    int err;




    test_str1 = sqlite3_mprintf ("Hello World");
    gaiaConvertCharset (&test_str1, "ASCII", "UTF-8");
    if (strcmp (test_str1, "Hello World") != 0)
      {
	  fprintf (stderr, "bad ASCII to UTF-8 conversion: %s\n", test_str1);
	  sqlite3_free (test_str1);
	  return -1;
      }
    sqlite3_free (test_str1);

#if 0
    /* TODO: this will cause a buffer overflow */
    test_str1 = sqlite_mprintf ("Hello World");
    gaiaConvertCharset (&test_str1, "ASCII", "UTF-16LE");
    if (memcmp (test_str1, "H\0e\0l\0l\0o\0 \0W\0o\0r\0l\0d\0\0\0", 24) != 0)
      {
	  fprintf (stderr, "bad ASCII to UTF-16LE conversion\n");
	  sqlite3_free (test_str1);
	  return -2;
      }
    sqlite3_free (test_str1);
#endif

    converter = gaiaCreateUTF8Converter ("CP1252");
    if (!converter)
      {
	  fprintf (stderr, "null UTF8 converter\n");
	  return -3;
................................................................................
	  return -5;
      }

    /* there is no sane way to test this automatically */
    printf ("Local codeset: %s\n", gaiaGetLocaleCharset ());
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>
>








>
>
>
|




|


|



|




|


|







 







<
<
<



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
...
123
124
125
126
127
128
129



130
131
132

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiaaux.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    void *converter;
    char *test_str1;
    int err;

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    asprintf (&test_str1, "Hello World");
    gaiaConvertCharset (&test_str1, "ASCII", "UTF-8");
    if (strcmp (test_str1, "Hello World") != 0)
      {
	  fprintf (stderr, "bad ASCII to UTF-8 conversion: %s\n", test_str1);
	  free (test_str1);
	  return -1;
      }
    free (test_str1);

#if 0
    /* TODO: this will cause a buffer overflow */
    asprintf (&test_str1, "Hello World");
    gaiaConvertCharset (&test_str1, "ASCII", "UTF-16LE");
    if (memcmp (test_str1, "H\0e\0l\0l\0o\0 \0W\0o\0r\0l\0d\0\0\0", 24) != 0)
      {
	  fprintf (stderr, "bad ASCII to UTF-16LE conversion\n");
	  free (test_str1);
	  return -2;
      }
    free (test_str1);
#endif

    converter = gaiaCreateUTF8Converter ("CP1252");
    if (!converter)
      {
	  fprintf (stderr, "null UTF8 converter\n");
	  return -3;
................................................................................
	  return -5;
      }

    /* there is no sane way to test this automatically */
    printf ("Local codeset: %s\n", gaiaGetLocaleCharset ());
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_gaia_util.c.

46
47
48
49
50
51
52




53
54
55
56
57
58
59
...
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
...
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
#include <stdio.h>
#include <string.h>

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiaaux.h"





int
main (int argc, char *argv[])
{
    int result;
    char *test_str1;
    char *quoted_str;

................................................................................
    if (!result)
      {
	  fprintf (stderr, "gaiaIllegalSqlName() fail for (empty): %i\n",
		   result);
	  return -21;
      }

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;", "Foo", "Bar");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  sqlite3_free (test_str1);
	  return -22;
      }
    sqlite3_free (test_str1);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;           ", "Foo", "Bar");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  sqlite3_free (test_str1);
	  return -23;
      }
    sqlite3_free (test_str1);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;           ", "Foo", "'");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from '';") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  sqlite3_free (test_str1);
	  return -24;
      }
    sqlite3_free (test_str1);

#if 0
    /* TODO: This will cause a buffer overflow */
    test_str1 = sqlite3_mprintf ("SELECT %s from %s;", "Foo", "'");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from '';") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  sqlite3_free (test_str1);
	  return -25;
      }
    sqlite3_free (test_str1);
#endif

    test_str1 = sqlite3_mprintf ("           ");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  sqlite3_free (test_str1);
	  return -26;
      }
    sqlite3_free (test_str1);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;", "Foo", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -27;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;           ", "Foo", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -28;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;", "Foo", "'");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from '';") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -29;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s   ;    ", "Foo", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from Bar   ;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -30;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("SELECT %s from %s;", "'", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT '' from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -31;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("My Name");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "My Name") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -32;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    quoted_str = gaiaDoubleQuotedSql (NULL);
    if (quoted_str != NULL)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql NULL failure: %s\n",
		   quoted_str);
................................................................................
    if (quoted_str != NULL)
      {
	  fprintf (stderr, "gaiaQuotedSql failure 1000: %s\n", quoted_str);
	  free (quoted_str);
	  return -37;
      }

    test_str1 = sqlite3_mprintf ("My \"Name");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "My \"\"Name") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -38;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("My \"Name                   ");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "My \"\"Name") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -39;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("%s", "");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -40;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("          ");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: |%s|\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -41;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("'          ");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "'") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -42;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("'");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "'") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -43;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    test_str1 = sqlite3_mprintf ("\"");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "\"") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  sqlite3_free (test_str1);
	  free (quoted_str);
	  return -44;
      }
    sqlite3_free (test_str1);
    free (quoted_str);

    spatialite_shutdown ();
    return 0;
}







>
>
>
>







 







|




|


|

|




|


|

|




|


|



|




|


|


|




|


|

|




|



|


|




|



|


|




|



|


|




|



|


|




|



|


|




|



|







 







|




|



|


|




|



|


|




|



|


|




|



|


|




|



|


|




|



|


|




|



|





46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
...
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
...
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
#include <stdio.h>
#include <string.h>

#include "sqlite3.h"
#include "spatialite.h"
#include "spatialite/gaiaaux.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

int
main (int argc, char *argv[])
{
    int result;
    char *test_str1;
    char *quoted_str;

................................................................................
    if (!result)
      {
	  fprintf (stderr, "gaiaIllegalSqlName() fail for (empty): %i\n",
		   result);
	  return -21;
      }

    asprintf (&test_str1, "SELECT %s from %s;", "Foo", "Bar");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  free (test_str1);
	  return -22;
      }
    free (test_str1);

    asprintf (&test_str1, "SELECT %s from %s;           ", "Foo", "Bar");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  free (test_str1);
	  return -23;
      }
    free (test_str1);

    asprintf (&test_str1, "SELECT %s from %s;           ", "Foo", "'");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from '';") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  free (test_str1);
	  return -24;
      }
    free (test_str1);

#if 0
    /* TODO: This will cause a buffer overflow */
    asprintf (&test_str1, "SELECT %s from %s;", "Foo", "'");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "SELECT Foo from '';") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  free (test_str1);
	  return -25;
      }
    free (test_str1);
#endif

    asprintf (&test_str1, "           ");
    gaiaCleanSqlString (test_str1);
    if (strcmp (test_str1, "") != 0)
      {
	  fprintf (stderr, "gaiaCleanSqlString failure: %s\n", test_str1);
	  free (test_str1);
	  return -26;
      }
    free (test_str1);

    asprintf (&test_str1, "SELECT %s from %s;", "Foo", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -27;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "SELECT %s from %s;           ", "Foo", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -28;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "SELECT %s from %s;", "Foo", "'");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from '';") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -29;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "SELECT %s from %s   ;    ", "Foo", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT Foo from Bar   ;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -30;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "SELECT %s from %s;", "'", "Bar");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "SELECT '' from Bar;") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -31;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "My Name");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "My Name") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -32;
      }
    free (test_str1);
    free (quoted_str);

    quoted_str = gaiaDoubleQuotedSql (NULL);
    if (quoted_str != NULL)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql NULL failure: %s\n",
		   quoted_str);
................................................................................
    if (quoted_str != NULL)
      {
	  fprintf (stderr, "gaiaQuotedSql failure 1000: %s\n", quoted_str);
	  free (quoted_str);
	  return -37;
      }

    asprintf (&test_str1, "My \"Name");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "My \"\"Name") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -38;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "My \"Name                   ");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "My \"\"Name") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -39;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "%s", "");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -40;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "          ");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: |%s|\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -41;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "'          ");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "'") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -42;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "'");
    quoted_str = gaiaDoubleQuotedSql (test_str1);
    if (strcmp (quoted_str, "'") != 0)
      {
	  fprintf (stderr, "gaiaDoubleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -43;
      }
    free (test_str1);
    free (quoted_str);

    asprintf (&test_str1, "\"");
    quoted_str = gaiaSingleQuotedSql (test_str1);
    if (strcmp (quoted_str, "\"") != 0)
      {
	  fprintf (stderr, "gaiaSingleQuotedSql failure: %s\n", quoted_str);
	  free (test_str1);
	  free (quoted_str);
	  return -44;
      }
    free (test_str1);
    free (quoted_str);

    spatialite_shutdown ();
    return 0;
}

Changes to test/check_geom_aux.c.

888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
...
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
...
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
...
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
...
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
...
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
....
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
....
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XY (2) */
    polyg1 = gaiaAllocPolygon (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZ (1) */
    polyg1 = gaiaAllocPolygonXYZ (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZ (2) */
    polyg1 = gaiaAllocPolygonXYZ (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYM (1) */
    polyg1 = gaiaAllocPolygonXYM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYM (2) */
    polyg1 = gaiaAllocPolygonXYM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZM (1) */
    polyg1 = gaiaAllocPolygonXYZM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZM (2) */
    polyg1 = gaiaAllocPolygonXYZM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_CW_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
...
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
...
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
...
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
...
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
...
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
....
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
....
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XY (2) */
    polyg1 = gaiaAllocPolygon (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZ (1) */
    polyg1 = gaiaAllocPolygonXYZ (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZ (2) */
    polyg1 = gaiaAllocPolygonXYZ (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYM (1) */
    polyg1 = gaiaAllocPolygonXYM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYM (2) */
    polyg1 = gaiaAllocPolygonXYM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZM (1) */
    polyg1 = gaiaAllocPolygonXYZM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.1, 1.2, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

/* cloning a Polygon XYZM (2) */
    polyg1 = gaiaAllocPolygonXYZM (5, 1);
    ring1 = polyg1->Exterior;
    gaiaRingSetPoint (ring1, 0, 1.0, 1.0, 100.1, 10.1);
................................................................................
    gaiaRingSetPoint (ring1, 2, 1.2, 1.2, 100.3, 10.3);
    gaiaRingSetPoint (ring1, 3, 1.2, 1.1, 100.4, 10.4);
    gaiaRingSetPoint (ring1, 4, 1.1, 1.1, 100.1, 10.1);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_SAME_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_REVERSE_ORDER);
    gaiaFreePolygon (polyg2);
    polyg2 = gaiaClonePolygonSpecial (polyg1, GAIA_LHR_ORDER);
    gaiaFreePolygon (polyg2);
    gaiaFreePolygon (polyg1);

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",

Changes to test/check_geoscvt_fncts.c.

61
62
63
64
65
66
67



68
69
70
71
72
73
74
..
97
98
99
100
101
102
103
104
105
106
107
108
109
    gaiaGeomCollPtr result;
    void *resultVoid;
    int returnValue = 0;

    /* Common setup */
    gaiaGeomCollPtr emptyGeometry = gaiaAllocGeomColl ();




    /* Tests start here */

    /* null input test */
    result = gaiaFromGeos_XY ((const void *) NULL);
    if (result != NULL)
      {
	  fprintf (stderr, "bad result at %s:%i\n", __FILE__, __LINE__);
................................................................................
  exit:
    gaiaFreeGeomColl (emptyGeometry);
    spatialite_shutdown ();
    return returnValue;

#endif /* end GEOS conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
100
101
102
103
104
105
106



107
108
109
    gaiaGeomCollPtr result;
    void *resultVoid;
    int returnValue = 0;

    /* Common setup */
    gaiaGeomCollPtr emptyGeometry = gaiaAllocGeomColl ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    /* Tests start here */

    /* null input test */
    result = gaiaFromGeos_XY ((const void *) NULL);
    if (result != NULL)
      {
	  fprintf (stderr, "bad result at %s:%i\n", __FILE__, __LINE__);
................................................................................
  exit:
    gaiaFreeGeomColl (emptyGeometry);
    spatialite_shutdown ();
    return returnValue;

#endif /* end GEOS conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_gpkgInsertEpsgSRID.c.

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
..
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

int
main (int argc UNUSED, char *argv[]UNUSED)
{
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
#ifndef OMIT_EPSG		/* only if full EPSG support is enabled */
    char *sql_statement;
    sqlite3_stmt *stmt;
#endif
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
................................................................................
	  fprintf (stderr,
		   "Unexpected gpkgCreateBaseTables() result: %i, (%s)\n", ret,
		   err_msg);
	  sqlite3_free (err_msg);
	  return -100;
      }

#ifndef OMIT_EPSG		/* only if full EPSG support is enabled */
    ret =
	sqlite3_exec (db_handle, "SELECT gpkgInsertEpsgSRID(3857)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Unexpected gpkgInsertEpsgSRID() result: %i, (%s)\n",
		   ret, err_msg);
................................................................................
	  fprintf (stderr, "unexpected return value for second step: %i\n",
		   ret);
	  return -129;
      }
    ret = sqlite3_finalize (stmt);

    sqlite3_free (err_msg);

    /* try no WKT, something of a hack here */
    ret =
	sqlite3_exec (db_handle, "SELECT gpkgInsertEpsgSRID(40001)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr,







|







 







|







 







|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
..
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

int
main (int argc UNUSED, char *argv[]UNUSED)
{
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
#ifndef OMIT_EPSG /* only if full EPSG support is enabled */
    char *sql_statement;
    sqlite3_stmt *stmt;
#endif
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
................................................................................
	  fprintf (stderr,
		   "Unexpected gpkgCreateBaseTables() result: %i, (%s)\n", ret,
		   err_msg);
	  sqlite3_free (err_msg);
	  return -100;
      }

#ifndef OMIT_EPSG /* only if full EPSG support is enabled */
    ret =
	sqlite3_exec (db_handle, "SELECT gpkgInsertEpsgSRID(3857)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Unexpected gpkgInsertEpsgSRID() result: %i, (%s)\n",
		   ret, err_msg);
................................................................................
	  fprintf (stderr, "unexpected return value for second step: %i\n",
		   ret);
	  return -129;
      }
    ret = sqlite3_finalize (stmt);

    sqlite3_free (err_msg);
    
    /* try no WKT, something of a hack here */
    ret =
	sqlite3_exec (db_handle, "SELECT gpkgInsertEpsgSRID(40001)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr,

Deleted test/check_gpkgMode.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
/*

 check_gpkgMode.c - Test case for GeoPackage Extensions

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is GeoPackage extensions

The Initial Developer of the Original Code is Sandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2014
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#ifdef ENABLE_GEOPACKAGE	/* only if GEOPACKAGE is enabled */

#include "sqlite3.h"
#include "spatialite.h"

static int
test_sql_query (sqlite3 * db_handle, const char *sql)
{
/* testing an SQL query in GeoPackage mode */
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    ret =
	sqlite3_get_table (db_handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Test: %s\nError: %s\n", sql, err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Test: %s\nUnexpected error: select columns bad result: %i/%i.\n",
		   sql, rows, columns);
	  return 0;
      }
    if (strcmp (results[1], "1") != 0)
      {
	  fprintf (stderr,
		   "Test: %s\nUnexpected error: bad result: %s.\n",
		   sql, results[1]);
	  return 0;
      }
    sqlite3_free_table (results);
    return 1;
}

int
main (int argc, char *argv[])
{
    sqlite3 *db_handle;
    const char *sql;
    void *cache = NULL;
    int ret = 0;
    char *err_msg = NULL;
    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

/* directly testing GPKG */
    cache = spatialite_alloc_connection ();
    ret =
	sqlite3_open_v2 ("./gpkg_test.gpkg", &db_handle,
			 SQLITE_OPEN_READWRITE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open '%s': %s\n", "copy-gpkg_test.gpkg",
		   sqlite3_errmsg (db_handle));
	  sqlite3_close (db_handle);
	  spatialite_cleanup_ex (cache);
	  spatialite_shutdown ();
	  return -1;
      }
    spatialite_init_ex (db_handle, cache, 0);

/* enabling GeoPackage Mode */
    ret =
	sqlite3_exec (db_handle, "SELECT EnableGpkgMode()", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "EnableGpkgMode error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  ret = -2;
	  goto end;
      }
    sql = "SELECT GetGpkgMode()";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -3;
	  goto end;
      }
    ret = 0;

/* testing POINTs */
    sql =
	"SELECT IsValidGPB( ShiftCoords(geom, 1.5, 2.5) ) FROM pt2d WHERE id = 3";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -3;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_Translate(geom, 1.5, 2.5, 3.5) ) FROM pt3dz WHERE id = 3";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -4;
	  goto end;
      }
    sql = "SELECT IsValidGPB( RotateCoords(geom, 30) ) FROM pt2dm WHERE id = 3";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -5;
	  goto end;
      }
    sql = "SELECT IsValidGPB( SwapCoords(geom) ) FROM pt3dzm WHERE id = 3";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -6;
	  goto end;
      }

/* testing LINESTRINGs */
    sql = "SELECT IsValidGPB( ST_Collect(geom) ) FROM ln2d";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -7;
	  goto end;
      }
      
#ifndef OMIT_GEOS	/* only if GEOS is enabled */
    sql = "SELECT IsValidGPB( ST_Union(geom) ) FROM ln2dm";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -8;
	  goto end;
      }
    sql = "SELECT IsValidGPB( ST_Buffer(geom, 0.01) ) FROM ln3dz WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -9;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_OffsetCurve(geom, -0.1) ) FROM ln3dzm WHERE id = 1";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -10;
	  goto end;
      }

/* testing POLYGONs */
    sql = "SELECT IsValidGPB( ST_Collect(geom) ) FROM pg2d";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -11;
	  goto end;
      }
    sql = "SELECT IsValidGPB( ST_Union(geom) ) FROM pg2dm";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -12;
	  goto end;
      }
    sql = "SELECT IsValidGPB( ST_Buffer(geom, 0.01) ) FROM pg3dz WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -13;
	  goto end;
      }
    sql = "SELECT IsValidGPB( ST_Envelope(geom) ) FROM pg3dzm WHERE id = 1";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -14;
	  goto end;
      }

/* testing MULTIPOINTs */
    sql = "SELECT IsValidGPB( ST_ConvexHull(geom) ) FROM mpt2d WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -15;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_UnaryUnion( ST_Buffer(geom, 1.5) ) ) FROM mpt3dz WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -16;
	  goto end;
      }
    sql = "SELECT IsValidGPB( ST_Difference( "
	"ST_GeomFromText('POLYGON((0 0, 0 30, 30 30, 30 0, 0 0))'), "
	"ST_Buffer(geom, 15) ) ) FROM mpt2dm WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -17;
	  goto end;
      }
    sql = "SELECT IsValidGPB( ST_SymDifference( "
	"ST_GeomFromText('POLYGON((0 0, 0 30, 30 30, 30 0, 0 0))'), "
	"ST_Buffer(geom, 15) ) ) FROM mpt3dzm WHERE id = 1";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -18;
	  goto end;
      }
#endif	/* end GEOS conditionals */

/* testing MULTILINESTRINGs */
    sql =
	"SELECT IsValidGPB( ST_StartPoint( ST_GeometryN(geom, 1) ) ) FROM mln2d WHERE id = 1";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -19;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_EndPoint( ST_GeometryN(geom, 1) ) ) FROM mln2dm WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -20;
	  goto end;
      }
      
#ifndef OMIT_GEOS	/* only if GEOS is enabled */
    sql =
	"SELECT IsValidGPB( ST_Line_Interpolate_Point( ST_GeometryN(geom, 1), 0.66) ) FROM mln3dz WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -21;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB(ST_Line_Substring( ST_GeometryN(geom, 1), 0.33, 0.66) ) FROM mln3dzm WHERE id = 1";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -22;
	  goto end;
      }
#endif	/* end GEOS conditionals */

/* testing MULTIPOLYGONs */
    sql =
	"SELECT IsValidGPB( ST_EndPoint( ST_ExteriorRing( ST_GeometryN(geom, 1) )  ) ) FROM mpg2d WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -23;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_DissolvePoints( geom ) ) FROM mpg2dm WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -24;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_DissolveSegments( geom ) ) FROM mpg3dz WHERE id = 2";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -25;
	  goto end;
      }
    sql =
	"SELECT IsValidGPB( ST_LinesFromRings(geom) ) FROM mpg3dzm WHERE id = 1";
    if (!test_sql_query (db_handle, sql))
      {
	  ret = -26;
	  goto end;
      }

  end:
    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
    spatialite_shutdown ();
    return ret;
}

#endif /* endif GEOPACKAGE enabled */
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































Changes to test/check_gpkgVirtual.c.

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
    sql = sqlite3_mprintf ("SELECT geom, IsValidGPB(geom), ST_Srid(geom), "
			   "ST_MinX(geom), ST_MaxX(geom), ST_MinY(geom), ST_MaxY(geom), "
			   "ST_Is3D(geom), ST_IsMeasured(geom), ST_MinZ(geom), ST_MaxZ(geom), "
			   "ST_MinM(geom), ST_MaxM(geom), ST_GeometryType(geom) FROM %s",
			   table);

    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SELECT FROM \"%s\" error: %s\n", table,
		   sqlite3_errmsg (handle));
	  goto stop;
      }
    while (1)







|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
    sql = sqlite3_mprintf ("SELECT geom, IsValidGPB(geom), ST_Srid(geom), "
			   "ST_MinX(geom), ST_MaxX(geom), ST_MinY(geom), ST_MaxY(geom), "
			   "ST_Is3D(geom), ST_IsMeasured(geom), ST_MinZ(geom), ST_MaxZ(geom), "
			   "ST_MinM(geom), ST_MaxM(geom), ST_GeometryType(geom) FROM %s",
			   table);

    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free(sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SELECT FROM \"%s\" error: %s\n", table,
		   sqlite3_errmsg (handle));
	  goto stop;
      }
    while (1)

Deleted test/check_init_full.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
/*

 check_init_full.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadataFull(\"NONE\")", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadataFull(\"NONE\") error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InsertEpsgSrid(4326)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Insert SRID 4326 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

#ifndef OMIT_EPSG
/* only if full EPSG support is enabled */
    ret =
	sqlite3_exec (handle, "SELECT InsertEpsgSrid(2998)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Insert SRID 2998 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }
#endif

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -5;
      }

    spatialite_cleanup_ex (cache);

    cache = spatialite_alloc_connection ();
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -6;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_get_table (handle, "SELECT InitSpatialMetadataFull(3.4)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -7;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InitSpatialMetadataFull() bad result: %i/%i.\n",
		   rows, columns);
	  return -8;
      }
    if (strcmp (results[1], "0") != 0)
      {
	  fprintf (stderr,
		   "Unexpected result: InitSpatialMetadataFull() with non-text passed: %s.\n",
		   results[1]);
	  return -9;
      }
    sqlite3_free_table (results);

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -10;
      }

    spatialite_cleanup_ex (cache);

    cache = spatialite_alloc_connection ();
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -11;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_get_table (handle, "SELECT InitSpatialMetadataFull(\"EMPTY\")",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -12;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InitSpatialMetadataFull(\"EMPTY\") bad result: %i/%i.\n",
		   rows, columns);
	  return -13;
      }
#ifdef ENABLE_RTTOPO
    if (strcmp (results[1], "1") != 0)
#else
    if (strcmp (results[1], "0") != 0)
#endif
      {
	  fprintf (stderr,
		   "Unexpected error: InitSpatialMetadataFull(\"EMPTY\"): %s.\n",
		   results[1]);
	  return -14;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle, "SELECT InsertEpsgSrid(4326)", &results,
			   &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -15;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InsertEpsgSrid(4326) bad result: %i/%i.\n",
		   rows, columns);
	  return -16;
      }
    if (strcmp (results[1], "1") != 0)
      {
	  fprintf (stderr, "Unexpected error: InsertEpsgSrid(4326): %s.\n",
		   results[1]);
	  return -17;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle, "SELECT InsertEpsgSrid(\"Non-integer\")",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -18;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InsertEpsgSrid(\"Non-integer\") bad result: %i/%i.\n",
		   rows, columns);
	  return -19;
      }
    if (strcmp (results[1], "0") != 0)
      {
	  fprintf (stderr,
		   "Unexpected result: InsertEpsgSrid() with non-integer passed: %s.\n",
		   results[1]);
	  return -20;
      }
    sqlite3_free_table (results);

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -21;
      }

    spatialite_cleanup_ex (cache);

    cache = spatialite_alloc_connection ();
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -22;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_get_table (handle, "SELECT InitSpatialMetadataFull(\"WGS84\")",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -23;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InitSpatialMetadataFull(\"WGS84\") bad result: %i/%i.\n",
		   rows, columns);
	  return -24;
      }
#ifdef ENABLE_RTTOPO
    if (strcmp (results[1], "1") != 0)
#else
    if (strcmp (results[1], "0") != 0)
#endif
      {
	  fprintf (stderr,
		   "Unexpected error: InitSpatialMetadataFull(\"WGS84\"): %s.\n",
		   results[1]);
	  return -25;
      }
    sqlite3_free_table (results);

#ifndef OMIT_EPSG
/* only if full EPSG support is enabled */
    ret =
	sqlite3_get_table (handle, "SELECT InsertEpsgSrid(3003)", &results,
			   &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -26;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InsertEpsgSrid(3003) bad result: %i/%i.\n",
		   rows, columns);
	  return -27;
      }
    if (strcmp (results[1], "1") != 0)
      {
	  fprintf (stderr, "Unexpected error: InsertEpsgSrid(3003): %s.\n",
		   results[1]);
	  return -28;
      }
    sqlite3_free_table (results);
#endif

    ret =
	sqlite3_get_table (handle, "SELECT InsertEpsgSrid(4326)", &results,
			   &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -29;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InsertEpsgSrid(4326) (dupe) bad result: %i/%i.\n",
		   rows, columns);
	  return -30;
      }
    if (strcmp (results[1], "0") != 0)
      {
	  fprintf (stderr,
		   "Unexpected result: InsertEpsgSrid(4326) duplicate passed: %s.\n",
		   results[1]);
	  return -31;
      }
    sqlite3_free_table (results);

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -32;
      }

    spatialite_cleanup_ex (cache);

    cache = spatialite_alloc_connection ();
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -33;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_get_table (handle,
			   "SELECT InitSpatialMetadataFull(\"WGS84_only\")",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -34;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr,
		   "Unexpected result InitSpatialMetadataFull(\"WGS84_ONLY\") bad result: %i/%i.\n",
		   rows, columns);
	  return -35;
      }
#ifdef ENABLE_RTTOPO
    if (strcmp (results[1], "1") != 0)
#else
    if (strcmp (results[1], "0") != 0)
#endif
      {
	  fprintf (stderr,
		   "Unexpected error: InitSpatialMetadataFull(\"WGS84_ONLY\"): %s.\n",
		   results[1]);
	  return -36;
      }
    sqlite3_free_table (results);

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -32;
      }

    spatialite_cleanup_ex (cache);

    return 0;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_libxml2.c.

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
...
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
...
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
...
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
...
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
...
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
#ifndef OMIT_ICONV		/* only if ICONV is supported */

#define ISO_METADATA	1
#define SLD_SE_STYLE	2
#define SVG		3

static int
check_bad_xml (void *cache)
................................................................................
	  if (doc_sz != 741)
	    {
		fprintf (stderr,
			 "books.xml: unexpected document size %d (expected 741)\n",
			 doc_sz);
		return 0;
	    }
	  if (formatted_sz != 863)
	    {
		fprintf (stderr,
			 "books.xml: unexpected formatted size %d (expected 863)\n",
			 formatted_sz);
		return 0;
	    }
	  if (formatted_txt_sz != 803)
	    {
		fprintf (stderr,
			 "books.xml: unexpected formatted-text size %d (expected 803)\n",
................................................................................
	  if (doc_sz != 912)
	    {
		fprintf (stderr,
			 "opera.xml: unexpected document size %d (expected 912)\n",
			 doc_sz);
		return 0;
	    }
	  if (formatted_sz != 969)
	    {
		fprintf (stderr,
			 "opera.xml: unexpected formatted size %d (expected 969)\n",
			 formatted_sz);
		return 0;
	    }
	  if (formatted_txt_sz != 909)
	    {
		fprintf (stderr,
			 "opera.xml: unexpected formatted-text size %d (expected 909)\n",
................................................................................
	  if (doc_sz != 1770)
	    {
		fprintf (stderr,
			 "movies.xml: unexpected document size %d (expected 1770)\n",
			 doc_sz);
		return 0;
	    }
	  if (formatted_sz != 944)
	    {
		fprintf (stderr,
			 "movies.xml: unexpected formatted size %d (expected 944)\n",
			 formatted_sz);
		return 0;
	    }
	  if (formatted_txt_sz != 884)
	    {
		fprintf (stderr,
			 "movies.xml: unexpected formatted-text size %d (expected 884)\n",
................................................................................
	    }
      }
    free (xml);

    return 1;
}

static int
check_mline_gpx (sqlite3 * handle, void *cache, const char *path)
{
/* parsing an XML Sample */
    FILE *fl;
    int sz = 0;
    int rd;
    unsigned char *xml = NULL;
    int uncompressed_sz;
    unsigned char *p_result = NULL;
    gaiaGeomCollPtr geom;
    gaiaLinestringPtr ln;
    double x;
    double y;
    double z;
    double m;

/* loading the XMLDocument */
    fl = fopen (path, "rb");
    if (!fl)
      {
	  fprintf (stderr, "cannot open \"%s\"\n", path);
	  return 0;
      }
    if (fseek (fl, 0, SEEK_END) == 0)
	sz = ftell (fl);
    xml = malloc (sz);
    rewind (fl);
    rd = fread (xml, 1, sz, fl);
    if (rd != sz)
      {
	  fprintf (stderr, "read error \"%s\"\n", path);
	  return 0;
      }
    fclose (fl);

/* parsing the GPX document (no validation / not compressed) */
    gaiaXmlToBlob (cache, xml, rd, 0, NULL, &p_result, &uncompressed_sz, NULL,
		   NULL);
    if (p_result == NULL)
      {
	  fprintf (stderr, "unable to parse(gpx)\"%s\"\n", path);
	  return 0;
      }

    geom = gaiaXmlBlobMLineFromGPX (p_result, uncompressed_sz, handle);
    if (geom == NULL)
      {
	  fprintf (stderr, "XB_MLineFromGPX: unexpected failure \"%s\"\n",
		   path);
	  return 0;
      }

    if (geom->Srid != 4326)
      {
	  fprintf (stderr, "XB_MLineFromGPX: invalid SRID (%d) \"%s\"\n",
		   geom->Srid, path);
	  return 0;
      }
    ln = geom->FirstLinestring;
    if (ln == NULL)
      {
	  fprintf (stderr, "XB_MLineFromGPX: not a Linestring \"%s\"\n", path);
	  return 0;
      }
    if (ln->Points < 5)
      {
	  fprintf (stderr, "XB_MLineFromGPX: too few points \"%s\"\n", path);
	  return 0;
      }
    gaiaGetPointXYZM (ln->Coords, 4, &x, &y, &z, &m);
    if (strcmp (path, "Gpx-sample.gpx") == 0)
      {
	  if (x != 37.808177)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected X=%f \"%s\"\n", x,
			 path);
		return 0;
	    }
	  if (y != 55.753587)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected Y=%f \"%s\"\n", y,
			 path);
		return 0;
	    }
	  if (z != 135.0)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected Z=%f \"%s\"\n", z,
			 path);
		return 0;
	    }
	  if (m < 2454970.667060 || m > 2454970.667061)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected M=%f \"%s\"\n", m,
			 path);
		return 0;
	    }
      }
    else
      {
	  if (x != -25.1959200)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected X=%f \"%s\"\n", x,
			 path);
		return 0;
	    }
	  if (y != 37.7710900)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected Y=%f \"%s\"\n", y,
			 path);
		return 0;
	    }
	  if (z != 0.0)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected Z=%f \"%s\"\n", z,
			 path);
		return 0;
	    }
	  if (m != 1721059.50)
	    {
		fprintf (stderr, "XB_MLineFromGPX: unexpected M=%f \"%s\"\n", m,
			 path);
		return 0;
	    }
      }

    gaiaFreeGeomColl (geom);
    free (p_result);
    free (xml);
    return 1;
}

#endif
#endif

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
................................................................................
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
#ifndef OMIT_ICONV		/* only if ICONV is supported */

    if (!check_parse (cache, "books.xml"))
      {
	  fprintf (stderr, "unable to parse \"books.xml\"\n");
	  return -2;
      }
    if (!check_parse (cache, "opera.xml"))
................................................................................
      }
    if (!check_bad_schema (cache))
      {
	  fprintf (stderr, "unable to test invalid Schema\n");
	  return -12;
      }

    if (!check_mline_gpx (handle, cache, "000323485.gpx"))
      {
	  fprintf (stderr, "unable to test \"000323485.gpx\"\n");
	  return -13;
      }
    if (!check_mline_gpx (handle, cache, "Gpx-sample.gpx"))
      {
	  fprintf (stderr, "unable to test \"Gpx-sample.gpx\"\n");
	  return -14;
      }

#endif
#endif

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));







<







 







|


|







 







|


|







 







|


|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<







48
49
50
51
52
53
54

55
56
57
58
59
60
61
...
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
...
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
...
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
...
636
637
638
639
640
641
642





































































































































643
644
645
646
647
648
649
...
662
663
664
665
666
667
668

669
670
671
672
673
674
675
...
721
722
723
724
725
726
727












728
729
730
731
732
733
734

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */


#define ISO_METADATA	1
#define SLD_SE_STYLE	2
#define SVG		3

static int
check_bad_xml (void *cache)
................................................................................
	  if (doc_sz != 741)
	    {
		fprintf (stderr,
			 "books.xml: unexpected document size %d (expected 741)\n",
			 doc_sz);
		return 0;
	    }
	  if (formatted_sz != 864)
	    {
		fprintf (stderr,
			 "books.xml: unexpected formatted size %d (expected 864)\n",
			 formatted_sz);
		return 0;
	    }
	  if (formatted_txt_sz != 803)
	    {
		fprintf (stderr,
			 "books.xml: unexpected formatted-text size %d (expected 803)\n",
................................................................................
	  if (doc_sz != 912)
	    {
		fprintf (stderr,
			 "opera.xml: unexpected document size %d (expected 912)\n",
			 doc_sz);
		return 0;
	    }
	  if (formatted_sz != 970)
	    {
		fprintf (stderr,
			 "opera.xml: unexpected formatted size %d (expected 970)\n",
			 formatted_sz);
		return 0;
	    }
	  if (formatted_txt_sz != 909)
	    {
		fprintf (stderr,
			 "opera.xml: unexpected formatted-text size %d (expected 909)\n",
................................................................................
	  if (doc_sz != 1770)
	    {
		fprintf (stderr,
			 "movies.xml: unexpected document size %d (expected 1770)\n",
			 doc_sz);
		return 0;
	    }
	  if (formatted_sz != 945)
	    {
		fprintf (stderr,
			 "movies.xml: unexpected formatted size %d (expected 945)\n",
			 formatted_sz);
		return 0;
	    }
	  if (formatted_txt_sz != 884)
	    {
		fprintf (stderr,
			 "movies.xml: unexpected formatted-text size %d (expected 884)\n",
................................................................................
	    }
      }
    free (xml);

    return 1;
}






































































































































#endif

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
................................................................................
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */


    if (!check_parse (cache, "books.xml"))
      {
	  fprintf (stderr, "unable to parse \"books.xml\"\n");
	  return -2;
      }
    if (!check_parse (cache, "opera.xml"))
................................................................................
      }
    if (!check_bad_schema (cache))
      {
	  fprintf (stderr, "unable to test invalid Schema\n");
	  return -12;
      }













#endif

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));

Changes to test/check_mbrcache.c.

60
61
62
63
64
65
66



67
68
69
70
71
72
73
...
613
614
615
616
617
618
619
620
621
622
623
624
    int row_count;
    char **results;
    int rows;
    int columns;
    int pt;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -62;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    return 0;
}







>
>
>







 







<
<
<


60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
616
617
618
619
620
621
622



623
624
    int row_count;
    char **results;
    int rows;
    int columns;
    int pt;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -62;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    return 0;
}

Changes to test/check_multithread.c.

69
70
71
72
73
74
75

76
77
78
79
80
81
82
...
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
...
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
...
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908

#include <sqlite3.h>
#include <spatialite.h>

#ifdef _WIN32
#include "fnmatch4win.h"
#include "scandir4win.h"

#include "fnmatch_impl4win.h"
#endif

struct test_data
{
    char *test_case_name;
    char *database_name;
................................................................................
    int count;
    int errors;
#ifndef _WIN32
    int started;
    pthread_t thread_id;
    pthread_attr_t attr;
#endif
} mt_params[128];

static struct db_conn *
alloc_connection (void)
{
    struct db_conn *conn = malloc (sizeof (struct db_conn));
    conn->db_handle = NULL;
    conn->cache = spatialite_alloc_connection ();
................................................................................
	      cleanup_test_data (data);
	  sqlite3_free (path);
	  free (namelist[i]);
      }
    free (namelist);
#endif /* end GEOS_ADVANCED conditional */

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */
/* RTTOPO SQL testcases */
    current_dir = "sql_stmt_rtgeom_tests";
    path = sqlite3_mprintf ("%s", current_dir);
    n = scandir (path, &namelist, test_case_filter, alphasort);
    if (n < 0)
      {
	  perror ("scandir");
	  return 0;
      }
................................................................................
	      add_test (list, data);
	  else
	      cleanup_test_data (data);
	  sqlite3_free (path);
	  free (namelist[i]);
      }
    free (namelist);
#endif /* end RTTOPO conditional */

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
/* LIBXML2 SQL testcases */
    current_dir = "sql_stmt_libxml2_tests";
    path = sqlite3_mprintf ("%s", current_dir);
    n = scandir (path, &namelist, test_case_filter, alphasort);
    if (n < 0)
................................................................................
    if (env_var == NULL)
	;
    else
      {
	  num_threads = atoi (env_var);
	  if (num_threads < 1)
	      num_threads = 1;
	  if (num_threads > 128)
	      num_threads = 128;
      }
    printf ("Testing %d concurrent threads\n", num_threads);

/* seeding the pseudo-random generator */
#ifdef _WIN32
    srand (getpid ());
#else







>







 







|







 







|
|
|







 







|







 







|
|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
...
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909

#include <sqlite3.h>
#include <spatialite.h>

#ifdef _WIN32
#include "fnmatch4win.h"
#include "scandir4win.h"
#include "asprintf4win.h"
#include "fnmatch_impl4win.h"
#endif

struct test_data
{
    char *test_case_name;
    char *database_name;
................................................................................
    int count;
    int errors;
#ifndef _WIN32
    int started;
    pthread_t thread_id;
    pthread_attr_t attr;
#endif
} mt_params[64];

static struct db_conn *
alloc_connection (void)
{
    struct db_conn *conn = malloc (sizeof (struct db_conn));
    conn->db_handle = NULL;
    conn->cache = spatialite_alloc_connection ();
................................................................................
	      cleanup_test_data (data);
	  sqlite3_free (path);
	  free (namelist[i]);
      }
    free (namelist);
#endif /* end GEOS_ADVANCED conditional */

#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */
/* LWGEOM SQL testcases */
    current_dir = "sql_stmt_lwgeom_tests";
    path = sqlite3_mprintf ("%s", current_dir);
    n = scandir (path, &namelist, test_case_filter, alphasort);
    if (n < 0)
      {
	  perror ("scandir");
	  return 0;
      }
................................................................................
	      add_test (list, data);
	  else
	      cleanup_test_data (data);
	  sqlite3_free (path);
	  free (namelist[i]);
      }
    free (namelist);
#endif /* end LWGEOM conditional */

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
/* LIBXML2 SQL testcases */
    current_dir = "sql_stmt_libxml2_tests";
    path = sqlite3_mprintf ("%s", current_dir);
    n = scandir (path, &namelist, test_case_filter, alphasort);
    if (n < 0)
................................................................................
    if (env_var == NULL)
	;
    else
      {
	  num_threads = atoi (env_var);
	  if (num_threads < 1)
	      num_threads = 1;
	  if (num_threads > 64)
	      num_threads = 64;
      }
    printf ("Testing %d concurrent threads\n", num_threads);

/* seeding the pseudo-random generator */
#ifdef _WIN32
    srand (getpid ());
#else

Deleted test/check_network2d.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
/*

 check_network2d.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: level 3 */
    int ret;
    char *err_msg = NULL;

/* testing RegisterTopoNetCoverage */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateStylingTables(1)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateStylingTables() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -240;
	  return 0;
      }

/* testing RegisterTopoNetCoverage - short form */
    ret =
	sqlite3_exec (handle,
		      "SELECT SE_RegisterTopoNetCoverage('net', 'roads')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SE_RegisterTopoNetCoverage() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -241;
	  return 0;
      }

/* testing UnRegisterVectorCoverage */
    ret =
	sqlite3_exec (handle,
		      "SELECT SE_UnRegisterVectorCoverage('net')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SE_RegisterVectorCoverage() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -342;
	  return 0;
      }

/* testing RegisterTopoNetCoverage - long form */
    ret =
	sqlite3_exec (handle,
		      "SELECT SE_RegisterTopoNetCoverage('net', 'roads', 'title', 'abstract', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SE_RegisterTopoNetCoverage() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -241;
	  return 0;
      }

    return 1;
}

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 2 */
    int ret;
    char *err_msg = NULL;

/* inserting three Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(-100, -100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -160;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(-100, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -161;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(-10, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -162;
	  return 0;
      }

/* inserting two Links */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 4, GeomFromText('LINESTRING(-100 -10, -100 -100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -163;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 6, GeomFromText('LINESTRING(-100 -10, -10 -10)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -164;
	  return 0;
      }

/* splitting a Link (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 3, MakePoint(-100, -50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -165;
	  return 0;
      }

/* splitting a Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 4, MakePoint(-30, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -166;
	  return 0;
      }

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 333, MakePoint(0, 0, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #2: expected failure\n");
	  *retcode = -167;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -168;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 333, MakePoint(0, 0, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #2: expected failure\n");
	  *retcode = -169;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -170;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (point not on link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 6, MakePoint(-101, -60, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #3: expected failure\n");
	  *retcode = -171;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on link.") != 0)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -172;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 6, MakePoint(-101, -60, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #3: expected failure\n");
	  *retcode = -173;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on link.") != 0)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -174;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (same link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 4, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #1: expected failure\n");
	  *retcode = -175;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Cannot heal link with itself.") != 0)
      {
	  fprintf (stderr, "ST_NewLinkSplit() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -176;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (same link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #1: expected failure\n");
	  *retcode = -177;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Cannot heal link with itself.") != 0)
      {
	  fprintf (stderr, "ST_ModLinkSplit() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -178;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent first link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 333, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #2: expected failure\n");
	  *retcode = -179;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent first link.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -180;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent first link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 333, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #2: expected failure\n");
	  *retcode = -181;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent first link.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -182;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent second link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 4, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #3: expected failure\n");
	  *retcode = -183;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent second link.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -184;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent second link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #3: expected failure\n");
	  *retcode = -185;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent second link.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -186;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-connected links) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 7, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #4: expected failure\n");
	  *retcode = -187;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected links.") !=
	0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -188;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-connected links) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #4: expected failure\n");
	  *retcode = -189;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected links.") !=
	0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -190;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting one more Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 2, GeomFromText('LINESTRING(-100 -10, 0 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -191;
	  return 0;
      }

/* attempting to heal links (other links connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 5, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #5: expected failure\n");
	  *retcode = -192;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - other links connected.") !=
	0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -193;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (other links connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 5)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #5: expected failure\n");
	  *retcode = -194;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - other links connected.") !=
	0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -195;
	  return 0;
      }
    sqlite3_free (err_msg);

/* deleting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 8)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -196;
	  return 0;
      }

/* healing a Link (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 5, 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -197;
	  return 0;
      }

/* healing another Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 9)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -198;
	  return 0;
      }

/* healing a third Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -199;
	  return 0;
      }

/* deleting another Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 7)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -200;
	  return 0;
      }

/* deleting two Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -201;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -202;
	  return 0;
      }

/* inserting two Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(2, 100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -203;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(2, 90, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -204;
	  return 0;
      }

/* inserting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 9, 10, GeometryFromText('LINESTRING(2 100, 2 90)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -205;
	  return 0;
      }

/* retrieving a NetNode by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(0, 100), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -206;
	  return 0;
      }

/* attempting to retrieve a NetNode by Point (two NetNodes found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(1, 100), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #2: expected failure\n");
	  *retcode = -207;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more net-nodes found") != 0)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -208;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a NetNode by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(1, 1), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #3: expected failure\n");
	  sqlite3_free (err_msg);
	  *retcode = -209;
	  return 0;
      }

/* retrieving a Link by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(0, 50), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -210;
	  return 0;
      }

/* attempting to retrieve a Link by Point (two Links found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(1, 95), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #2: expected failure\n");
	  *retcode = -211;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more links found") != 0)
      {
	  fprintf (stderr, "GetLinkByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -212;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Link by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(1, 1), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #3expected failure\n");
	  sqlite3_free (err_msg);
	  *retcode = -213;
	  return 0;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 1 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(0, 0, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -110;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(0, 100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -111;
	  return 0;
      }

/* inserting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeometryFromText('LINESTRING(0 0, 0 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -112;
	  return 0;
      }

/* attempting to insert a Node (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(0, 100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #3: expected failure\n");
	  *retcode = -113;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -114;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (coincident link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(0, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4: expected failure\n");
	  *retcode = -115;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - link crosses node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -116;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting a third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(99, 99, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -117;
	  return 0;
      }

/* moving the third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePoint(100, 100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -118;
	  return 0;
      }

/* attempting to move a Node (non-existing node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 333, MakePoint(50, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #2: expected failure\n");
	  *retcode = -119;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -120;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePoint(0, 100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #3: expected failure\n");
	  *retcode = -121;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -122;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (coincident link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePoint(0, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #4: expected failure\n");
	  *retcode = -123;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - link crosses node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -124;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (bad StartNode) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRING(1 1, 100 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #2: expected failure\n");
	  *retcode = -125;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddLink() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (bad EndNode) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRING(0 0, 99 99)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #3: expected failure\n");
	  *retcode = -127;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -128;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (coincident Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRING(0 0, 0 100, 100 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #4: expected failure\n");
	  *retcode = -129;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node.")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -130;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (self-closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 1, GeometryFromText('LINESTRING(0 0, 0 100, 100 100, 0 0)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5: expected failure\n");
	  *retcode = -131;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - self-closed links are forbidden.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -132;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting a second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRING(0 0, 100 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -133;
	  return 0;
      }

/* attempting to move a Link (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRING(0 0, 0 100, 100 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #1: expected failure\n");
	  *retcode = -134;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node.")
	!= 0)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -135;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (bad start node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRING(1 1, 100 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #2: expected failure\n");
	  *retcode = -136;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -138;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (bad end node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRING(0 0, 101 101)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #3: expected failure\n");
	  *retcode = -139;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -140;
	  return 0;
      }
    sqlite3_free (err_msg);

/* moving the second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRING(0 0, 0 50, 100 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -141;
	  return 0;
      }

/* attempting to move a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePoint(0, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #5: expected failure\n");
	  *retcode = -142;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -143;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #5: expected failure\n");
	  *retcode = -144;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node.") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -145;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Link (not existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 33)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #1: expected failure\n");
	  *retcode = -146;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_RemoveLink() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -147;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing the second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 2)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -148;
	  return 0;
      }

/* removing the third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -149;
	  return 0;
      }

    return 1;
}

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 0 */
    int ret;
    char *err_msg = NULL;

/* attempting to insert a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -10;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -11;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -12;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -13;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -14;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -15;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -16;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -17;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: expected failure\n");
	  *retcode = -18;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -19;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: expected failure\n");
	  *retcode = -20;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -21;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: expected failure\n");
	  *retcode = -22;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -23;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: expected failure\n");
	  *retcode = -24;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -25;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -26;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -27;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -28;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -29;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -30;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -31;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -32;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -33;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() INTEGER Geometry: expected failure\n");
	  *retcode = -34;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -35;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() NULL Geometry: expected failure\n");
	  *retcode = -36;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -37;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() LINESTRING Geometry: expected failure\n");
	  *retcode = -38;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -39;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', GeomFromText('POLYGON((-40 -40, -40 -50, -50 -50, -50 -40, -40 -40))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() POLYGON Geometry: expected failure\n");
	  *retcode = -40;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -41;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', GeomFromText('MULTIPOINT(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -42;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -43;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() INTEGER Geometry: expected failure\n");
	  *retcode = -44;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -45;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() NULL Geometry: expected failure\n");
	  *retcode = -46;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -47;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() LINESTRING Geometry: expected failure\n");
	  *retcode = -48;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -49;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, GeomFromText('POLYGON((-40 -40, -40 -50, -50 -50, -50 -40, -40 -40))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() POLYGON Geometry: expected failure\n");
	  *retcode = -50;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, GeomFromText('MULTIPOINT(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -52;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -53;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() INTEGER Geometry: expected failure\n");
	  *retcode = -54;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -55;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() NULL Geometry: expected failure\n");
	  *retcode = -56;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (Point geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, MakePoint(1, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() POINT Geometry: expected failure\n");
	  *retcode = -58;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() POINT Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('POLYGON((-40 -40, -40 -50, -50 -50, -50 -40, -40 -40))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() POLYGON Geometry: expected failure\n");
	  *retcode = -60;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (MultiLinestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('MULTILINESTRING((-40 -50,  -50 -40), (-20 -20, -30 -30))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddLink() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -62;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddLink() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() INTEGER Geometry: expected failure\n");
	  *retcode = -64;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -65;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() NULL Geometry: expected failure\n");
	  *retcode = -66;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -67;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (Point geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, MakePoint(1, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POINT Geometry: expected failure\n");
	  *retcode = -68;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POINT Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -69;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('POLYGON((-40 -40, -40 -50, -50 -50, -50 -40, -40 -40))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POLYGON Geometry: expected failure\n");
	  *retcode = -70;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (MultiLinestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('MULTILINESTRING((-40 -50,  -50 -40), (-20 -20, -30 -30))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -72;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() INTEGER Geometry: expected failure\n");
	  *retcode = -74;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -75;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() NULL Geometry: expected failure\n");
	  *retcode = -76;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -77;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() LINESTRING Geometry: expected failure\n");
	  *retcode = -78;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -79;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, GeomFromText('POLYGON((-40 -40, -40 -50, -50 -50, -50 -40, -40 -40))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() POLYGON Geometry: expected failure\n");
	  *retcode = -80;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, GeomFromText('MULTIPOINT(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -82;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -83;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() INTEGER Geometry: expected failure\n");
	  *retcode = -84;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -85;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() NULL Geometry: expected failure\n");
	  *retcode = -86;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -87;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() LINESTRING Geometry: expected failure\n");
	  *retcode = -88;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -89;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, GeomFromText('POLYGON((-40 -40, -40 -50, -50 -50, -50 -40, -40 -40))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() POLYGON Geometry: expected failure\n");
	  *retcode = -90;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, GeomFromText('MULTIPOINT(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -92;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLogLinkSplit('roads', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit(): expected failure\n");
	  *retcode = -94;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - ST_NewLogLinkSplit can't support Spatial Network; try using ST_NewGeoLinkSplit.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit(): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -95;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLogLinkSplit('roads', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit(): expected failure\n");
	  *retcode = -96;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - ST_ModLogLinkSplit can't support Spatial Network; try using ST_ModGeoLinkSplit.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit(): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -97;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating a Network 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('roads', 1, 4326, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* basic tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/* basic tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/* basic tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */

/* testing RegisterTopoGeoCoverage */
    if (!do_level3_tests (handle, &retcode))
	goto end;

#endif

/* dropping the Network 2D */
    ret =
	sqlite3_exec (handle, "SELECT DropNetwork('roads')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DropNetwork() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/check_network3d.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
/*

 check_network3d.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 2 */
    int ret;
    char *err_msg = NULL;

/* inserting three Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(-100, -100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -160;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(-100, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -161;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(-10, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -162;
	  return 0;
      }

/* inserting two Links */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 4, GeomFromText('LINESTRINGZ(-100 -10 1, -100 -100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -163;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 6, GeomFromText('LINESTRINGZ(-100 -10 1, -10 -10 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -164;
	  return 0;
      }

/* splitting a Link (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 3, MakePointZ(-100, -50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -165;
	  return 0;
      }

/* splitting a Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 4, MakePointZ(-30, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -166;
	  return 0;
      }

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 333, MakePointZ(0, 0, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #2: expected failure\n");
	  *retcode = -167;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -168;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 333, MakePointZ(0, 0, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #2: expected failure\n");
	  *retcode = -169;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -170;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (point not on link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 6, MakePointZ(-101, -60, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #3: expected failure\n");
	  *retcode = -171;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on link.") != 0)
      {
	  fprintf (stderr, "ST_NewGeoLinkSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -172;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 6, MakePointZ(-101, -60, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #3: expected failure\n");
	  *retcode = -173;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on link.") != 0)
      {
	  fprintf (stderr, "ST_ModGeoLinkSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -174;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (same link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 4, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #1: expected failure\n");
	  *retcode = -175;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Cannot heal link with itself.") != 0)
      {
	  fprintf (stderr, "ST_NewLinkSplit() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -176;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (same link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #1: expected failure\n");
	  *retcode = -177;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Cannot heal link with itself.") != 0)
      {
	  fprintf (stderr, "ST_ModLinkSplit() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -178;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent first link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 333, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #2: expected failure\n");
	  *retcode = -179;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent first link.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -180;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent first link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 333, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #2: expected failure\n");
	  *retcode = -181;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent first link.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -182;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent second link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 4, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #3: expected failure\n");
	  *retcode = -183;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent second link.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -184;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent second link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #3: expected failure\n");
	  *retcode = -185;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent second link.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -186;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-connected links) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 7, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #4: expected failure\n");
	  *retcode = -187;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected links.") !=
	0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -188;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-connected links) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #4: expected failure\n");
	  *retcode = -189;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected links.") !=
	0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -190;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting one more Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 2, GeomFromText('LINESTRINGZ(-100 -10 1, 0 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -191;
	  return 0;
      }

/* attempting to heal links (other links connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 5, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #5: expected failure\n");
	  *retcode = -192;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - other links connected.") !=
	0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -193;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (other links connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 5)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #5: expected failure\n");
	  *retcode = -194;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - other links connected.") !=
	0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -195;
	  return 0;
      }
    sqlite3_free (err_msg);

/* deleting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 8)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -196;
	  return 0;
      }

/* healing a Link (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 5, 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -197;
	  return 0;
      }

/* healing another Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 9)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -198;
	  return 0;
      }

/* healing a third Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -199;
	  return 0;
      }

/* deleting another Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 7)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -200;
	  return 0;
      }

/* deleting two Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -201;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -202;
	  return 0;
      }

/* inserting two Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(2, 100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -203;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(2, 90, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -204;
	  return 0;
      }

/* inserting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 9, 10, GeometryFromText('LINESTRINGZ(2 100 1, 2 90 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -205;
	  return 0;
      }

/* retrieving a NetNode by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(0, 100), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -206;
	  return 0;
      }

/* attempting to retrieve a NetNode by Point (two NetNodes found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(1, 100), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #2: expected failure\n");
	  *retcode = -207;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more net-nodes found") != 0)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -208;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a NetNode by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(1, 1), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #3: expected failure\n");
	  sqlite3_free (err_msg);
	  *retcode = -209;
	  return 0;
      }

/* retrieving a Link by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(0, 50), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -210;
	  return 0;
      }

/* attempting to retrieve a Link by Point (two Links found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(1, 95), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #2: expected failure\n");
	  *retcode = -211;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more links found") != 0)
      {
	  fprintf (stderr, "GetLinkByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -212;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Link by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(1, 1), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #3: expected failure\n");
	  sqlite3_free (err_msg);
	  *retcode = -213;
	  return 0;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 1 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 0, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -10;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -11;
	  return 0;
      }

/* inserting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeometryFromText('LINESTRINGZ(0 0 1, 0 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -112;
	  return 0;
      }

/* attempting to insert a Node (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #3: expected failure\n");
	  *retcode = -113;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -114;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (coincident link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4: expected failure\n");
	  *retcode = -115;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - link crosses node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -116;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting a third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(99, 99, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -117;
	  return 0;
      }

/* moving the third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePointZ(100, 100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -118;
	  return 0;
      }

/* attempting to move a Node (non-existing node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 333, MakePointZ(50, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #2: expected failure\n");
	  *retcode = -119;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -120;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePointZ(0, 100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #3: expected failure\n");
	  *retcode = -121;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -122;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (coincident link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePointZ(0, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #4: expected failure\n");
	  *retcode = -123;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - link crosses node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -124;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (bad StartNode) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRINGZ(1 1 1, 100 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #2: expected failure\n");
	  *retcode = -125;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddLink() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (bad EndNode) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRINGZ(0 0 1, 99 99 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #3: expected failure\n");
	  *retcode = -127;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -128;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (coincident Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRINGZ(0 0 1, 0 100 1, 100 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #4: expected failure\n");
	  *retcode = -129;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node.")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -130;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (self-closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 1, GeometryFromText('LINESTRINGZ(0 0 1, 0 100 1, 100 100 1, 0 0 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5: expected failure\n");
	  *retcode = -131;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - self-closed links are forbidden.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -132;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting a second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, GeometryFromText('LINESTRINGZ(0 0 1, 100 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -133;
	  return 0;
      }

/* attempting to move a Link (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRINGZ(0 0 1, 0 100 1, 100 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #1: expected failure\n");
	  *retcode = -134;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node.")
	!= 0)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -135;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (bad start node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRINGZ(1 1 1, 100 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #2: expected failure\n");
	  *retcode = -136;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -138;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (bad end node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRINGZ(0 0 1, 101 101 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #3: expected failure\n");
	  *retcode = -139;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -140;
	  return 0;
      }
    sqlite3_free (err_msg);

/* moving the second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, GeometryFromText('LINESTRINGZ(0 0 1, 0 50 1, 100 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -141;
	  return 0;
      }

/* attempting to move a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, MakePointZ(0, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #5: expected failure\n");
	  *retcode = -142;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -143;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #5: expected failure\n");
	  *retcode = -144;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node.") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -145;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Link (not existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 33)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #1: expected failure\n");
	  *retcode = -146;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_RemoveLink() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -147;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing the second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 2)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -148;
	  return 0;
      }

/* removing the third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -149;
	  return 0;
      }

    return 1;
}

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 0 */
    int ret;
    char *err_msg = NULL;

/* attempting to insert a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -10;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -11;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -12;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -13;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -14;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -15;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: expected failure\n");
	  *retcode = -16;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -17;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: expected failure\n");
	  *retcode = -18;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -19;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: expected failure\n");
	  *retcode = -20;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -21;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: expected failure\n");
	  *retcode = -22;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -23;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: expected failure\n");
	  *retcode = -24;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -25;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -26;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -27;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -28;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -29;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -30;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -31;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -32;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -33;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() INTEGER Geometry: expected failure\n");
	  *retcode = -34;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -35;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() NULL Geometry: expected failure\n");
	  *retcode = -36;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -37;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() LINESTRING Geometry: expected failure\n");
	  *retcode = -38;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -39;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', GeomFromText('POLYGONZ((-40 -40 1, -40 -50 1, -50 -50 1, -50 -40 1, -40 -40 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() POLYGON Geometry: expected failure\n");
	  *retcode = -40;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -41;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', GeomFromText('MULTIPOINTZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -42;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -43;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() INTEGER Geometry: expected failure\n");
	  *retcode = -44;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -45;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() NULL Geometry: expected failure\n");
	  *retcode = -46;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -47;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() LINESTRING Geometry: expected failure\n");
	  *retcode = -48;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -49;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, GeomFromText('POLYGONZ((-40 -40 1, -40 -50 1, -50 -50 1, -50 -40 1, -40 -40 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() POLYGON Geometry: expected failure\n");
	  *retcode = -50;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, GeomFromText('MULTIPOINTZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -52;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -53;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() INTEGER Geometry: expected failure\n");
	  *retcode = -54;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -55;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() NULL Geometry: expected failure\n");
	  *retcode = -56;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (Point geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, MakePointZ(1, 1, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() POINT Geometry: expected failure\n");
	  *retcode = -58;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() POINT Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('POLYGONZ((-40 -40 1, -40 -50 1, -50 -50 1, -50 -40 1, -40 -40 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() POLYGON Geometry: expected failure\n");
	  *retcode = -60;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (MultiLinestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('MULTILINESTRINGZ((-40 -50 1,  -50 -40 1), (-20 -20 1, -30 -30 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddLink() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -62;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_AddLink() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() INTEGER Geometry: expected failure\n");
	  *retcode = -64;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -65;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() NULL Geometry: expected failure\n");
	  *retcode = -66;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -67;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (Point geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, MakePointZ(1, 1, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POINT Geometry: expected failure\n");
	  *retcode = -68;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POINT Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -69;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('POLYGONZ((-40 -40 1, -40 -50 1, -50 -50 1, -50 -40 1, -40 -40 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POLYGON Geometry: expected failure\n");
	  *retcode = -70;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change a Link (MultiLinestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('MULTILINESTRINGZ((-40 -50 1,  -50 -40 1), (-20 -20 1, -30 -30 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -72;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() INTEGER Geometry: expected failure\n");
	  *retcode = -74;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -75;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() NULL Geometry: expected failure\n");
	  *retcode = -76;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -77;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() LINESTRING Geometry: expected failure\n");
	  *retcode = -78;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -79;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, GeomFromText('POLYGONZ((-40 -40 1, -40 -50 1, -50 -50 1, -50 -40 1, -40 -40 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() POLYGON Geometry: expected failure\n");
	  *retcode = -80;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, GeomFromText('MULTIPOINTZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -82;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -83;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (int geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() INTEGER Geometry: expected failure\n");
	  *retcode = -84;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() INTEGER Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -85;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (NULL geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() NULL Geometry: expected failure\n");
	  *retcode = -86;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Spatial Network can't accept null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() NULL Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -87;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Linestring geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() LINESTRING Geometry: expected failure\n");
	  *retcode = -88;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() LINESTRING Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -89;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Polygon geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, GeomFromText('POLYGONZ((-40 -40 1, -40 -50 1, -50 -50 1, -50 -40 1, -40 -40 1))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() POLYGON Geometry: expected failure\n");
	  *retcode = -90;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() POLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (MultiPoint geometry) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModGeoLinkSplit('roads', 1, GeomFromText('MULTIPOINTZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() MULTIPOLYGON Geometry: expected failure\n");
	  *retcode = -92;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() MULTIPOLYGON Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLogLinkSplit('roads', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit(): expected failure\n");
	  *retcode = -94;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - ST_NewLogLinkSplit can't support Spatial Network; try using ST_NewGeoLinkSplit.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit(): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -95;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLogLinkSplit('roads', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit(): expected failure\n");
	  *retcode = -96;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - ST_ModLogLinkSplit can't support Spatial Network; try using ST_ModGeoLinkSplit.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit(): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -97;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating a Network 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('roads', 1, 4326, 1, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* basic tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/* basic tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/* basic tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/* dropping the Network 2D */
    ret =
	sqlite3_exec (handle, "SELECT DropNetwork('roads')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DropNetwork() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/check_network_log.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
/*

 check_network3d.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 2 */
    int ret;
    char *err_msg = NULL;

/* inserting three Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -150;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -151;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -152;
	  return 0;
      }

/* inserting two Links */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 4, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -153;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 6, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -154;
	  return 0;
      }

/* splitting a Link (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLogLinkSplit('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -155;
	  return 0;
      }

/* splitting a Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLogLinkSplit('roads', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -156;
	  return 0;
      }

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLogLinkSplit('roads', 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit() #2: expected failure\n");
	  *retcode = -157;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_NewLogLinkSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -158;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a link (non-existing link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLogLinkSplit('roads', 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit() #2: expected failure\n");
	  *retcode = -159;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_ModLogLinkSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -160;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (same link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 4, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #1: expected failure\n");
	  *retcode = -161;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Cannot heal link with itself.") != 0)
      {
	  fprintf (stderr, "ST_NewLinkSplit() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -162;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (same link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #1: expected failure\n");
	  *retcode = -163;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Cannot heal link with itself.") != 0)
      {
	  fprintf (stderr, "ST_ModLinkSplit() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -164;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent first link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 333, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #2: expected failure\n");
	  *retcode = -165;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent first link.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -166;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent first link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 333, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #2: expected failure\n");
	  *retcode = -167;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent first link.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -168;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent second link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 4, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #3: expected failure\n");
	  *retcode = -169;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent second link.")
	!= 0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -170;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-existent second link) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #3: expected failure\n");
	  *retcode = -171;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent second link.")
	!= 0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -172;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-connected links) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 7, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #4: expected failure\n");
	  *retcode = -173;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected links.") !=
	0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -174;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (non-connected links) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #4: expected failure\n");
	  *retcode = -175;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected links.") !=
	0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -176;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting one more Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 5, 2, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -177;
	  return 0;
      }

/* attempting to heal links (other links connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 5, 4)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #5: expected failure\n");
	  *retcode = -178;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - other links connected.") !=
	0)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -179;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal links (other links connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 4, 5)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #5: expected failure\n");
	  *retcode = -180;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - other links connected.") !=
	0)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -181;
	  return 0;
      }
    sqlite3_free (err_msg);

/* deleting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 8)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -182;
	  return 0;
      }

/* healing a Link (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewLinkHeal('roads', 5, 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewLinkHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -183;
	  return 0;
      }

/* healing another Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 9)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -184;
	  return 0;
      }

/* healing a third Link (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModLinkHeal('roads', 7, 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModLinkHeal() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -185;
	  return 0;
      }

/* deleting another Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 7)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -186;
	  return 0;
      }

/* deleting two Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -187;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -188;
	  return 0;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 1 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -110;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -111;
	  return 0;
      }

/* inserting a Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -112;
	  return 0;
      }

/* inserting a third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -113;
	  return 0;
      }

/* moving the third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -114;
	  return 0;
      }

/* attempting to move a Node (non-existing node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 333, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #2: expected failure\n");
	  *retcode = -115;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -116;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (self-closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 1, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #2: expected failure\n");
	  *retcode = -117;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - self-closed links are forbidden.") != 0)
      {
	  fprintf (stderr, "ST_AddLink() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -118;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting a second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 3, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -119;
	  return 0;
      }

/* moving the second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 2, NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeLinkGeom() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -120;
	  return 0;
      }

/* attempting to move a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 3, NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #3: expected failure\n");
	  *retcode = -121;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNetNode() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -122;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #1: expected failure\n");
	  *retcode = -123;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node.") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -124;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Link (not existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 33)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #1: expected failure\n");
	  *retcode = -125;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent link.") != 0)
      {
	  fprintf (stderr, "ST_RemoveLink() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing the second Link */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemoveLink('roads', 2)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemoveLink() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -127;
	  return 0;
      }

/* removing the third Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNetNode('roads', 3)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNetNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -128;
	  return 0;
      }

    return 1;
}

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 0 */
    int ret;
    char *err_msg = NULL;

/* attempting to insert a Node (not null geom) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('roads', MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() NotNULL Geom: expected failure\n");
	  *retcode = -10;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Logical Network can't accept not null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddIsoNetNode() NotNULL Geom: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -11;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (not null geom) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNetNode('roads', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() NotNULL Geom: expected failure\n");
	  *retcode = -12;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Logical Network can't accept not null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_MoveIsoNetNode() NotNULL Geom: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -13;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Link (not null geom) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('roads', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() NotNULL Geom: expected failure\n");
	  *retcode = -14;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Logical Network can't accept not null geometry.")
	!= 0)
      {
	  fprintf (stderr, "ST_AddLink() NotNULL Geom: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -15;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Link (not null geom) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeLinkGeom('roads', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() NotNULL Geom: expected failure\n");
	  *retcode = -16;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - Logical Network can't accept not null geometry.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeLinkGeom() NotNULL Geom: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -17;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (not null geom) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() NotNULL Geom: expected failure\n");
	  *retcode = -18;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - ST_NewGeoLinkSplit can't support Logical Network; try using ST_NewLogLinkSplit.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewGeoLinkSplit() NotNULL Geom: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -19;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split a Link (Geom) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewGeoLinkSplit('roads', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: expected failure\n");
	  *retcode = -20;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - ST_NewGeoLinkSplit can't support Logical Network; try using ST_NewLogLinkSplit.")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModGeoLinkSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -21;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a NetNode by Point (Logical Network) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNetNodeByPoint('roads', MakePoint(1, 100), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #1: expected failure\n");
	  *retcode = -22;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "GetNetNodekByPoint() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr, "GetNetNodeByPoint() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -23;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Link by Point (Logical Network) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetLinkByPoint('roads', MakePoint(1, 95), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetLinkByPoint() #1: expected failure\n");
	  *retcode = -24;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "GetLinkByPoint() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr, "GetLinkByPoint() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -25;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

/* creating a Logical Network */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('roads', 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* basic tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/* basic tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/* basic tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/* dropping the Logical Network */
    ret =
	sqlite3_exec (handle, "SELECT DropNetwork('roads')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DropNetwork() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

  end:
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_relations_fncts.c.

2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
....
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
    rng = pg->Exterior;
    gaiaSetPoint (rng->Coords, 0, 4.5, 4.5);
    gaiaSetPoint (rng->Coords, 1, 30.5, 4.5);
    gaiaSetPoint (rng->Coords, 2, 30.5, 30.5);
    gaiaSetPoint (rng->Coords, 3, 4.5, 30.5);
    gaiaSetPoint (rng->Coords, 4, 4.5, 4.5);


#ifndef GEOS_ONLY_REENTRANT	/* skipping legacy mode test (non-thread-safe GEOS API) */
    /* Tests Polygons UnaryUnion [as in aggregate ST_Union] */
    g = gaiaUnaryUnion (geom);
    if (g == NULL)
      {
	  fprintf (stderr, "bad result at %s:%i\n", __FILE__, __LINE__);
	  returnValue = -89;
	  goto exit;
................................................................................
      {
	  fprintf (stderr, "bad result at %s:%i: %i %f\n", __FILE__, __LINE__,
		   result, dummyResultArg);
	  returnValue = -92;
	  goto exit;
      }
    gaiaFreeGeomColl (g);
#endif
    gaiaFreeGeomColl (geom);

    /* Cleanup and exit */
  exit:
    gaiaFreeGeomColl (validGeometry);

    ret = sqlite3_close (handle);







<
<







 







<







2096
2097
2098
2099
2100
2101
2102


2103
2104
2105
2106
2107
2108
2109
....
2137
2138
2139
2140
2141
2142
2143

2144
2145
2146
2147
2148
2149
2150
    rng = pg->Exterior;
    gaiaSetPoint (rng->Coords, 0, 4.5, 4.5);
    gaiaSetPoint (rng->Coords, 1, 30.5, 4.5);
    gaiaSetPoint (rng->Coords, 2, 30.5, 30.5);
    gaiaSetPoint (rng->Coords, 3, 4.5, 30.5);
    gaiaSetPoint (rng->Coords, 4, 4.5, 4.5);



    /* Tests Polygons UnaryUnion [as in aggregate ST_Union] */
    g = gaiaUnaryUnion (geom);
    if (g == NULL)
      {
	  fprintf (stderr, "bad result at %s:%i\n", __FILE__, __LINE__);
	  returnValue = -89;
	  goto exit;
................................................................................
      {
	  fprintf (stderr, "bad result at %s:%i: %i %f\n", __FILE__, __LINE__,
		   result, dummyResultArg);
	  returnValue = -92;
	  goto exit;
      }
    gaiaFreeGeomColl (g);

    gaiaFreeGeomColl (geom);

    /* Cleanup and exit */
  exit:
    gaiaFreeGeomColl (validGeometry);

    ret = sqlite3_close (handle);

Deleted test/check_sequence.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416

/*

 check_sequence.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "sqlite3.h"
#include "spatialite.h"

#include "spatialite/gg_sequence.h"

static int
test_sequence (sqlite3 * sqlite, const char *seq_name)
{
/* testing a single sequence */
    char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    int cnt;

    for (cnt = 1; cnt <= 10; cnt++)
      {
	  if (seq_name == NULL)
	      sql = sqlite3_mprintf ("SELECT sequence_nextval(NULL)");
	  else
	      sql = sqlite3_mprintf ("SELECT sequence_nextval(%Q)", seq_name);
	  ret = sqlite3_get_table (sqlite, sql, &results, &rows,
				   &columns, &err_msg);
	  sqlite3_free (sql);

	  if (ret != SQLITE_OK)
	    {
		fprintf (stderr, "nextval - Error: %s\n", err_msg);
		sqlite3_free (err_msg);
		return 0;
	    }
	  if ((rows != 1) || (columns != 1))
	    {
		fprintf (stderr,
			 "nextval - Unexpected error: bad result: %i/%i.\n",
			 rows, columns);
		return 0;
	    }

	  if (atoi (results[1]) != cnt)
	    {
		fprintf (stderr, "nextval - Unexpected value \"%s\" (%d)\n",
			 results[1], cnt);
		return 0;
	    }
	  sqlite3_free_table (results);

	  if (seq_name == NULL)
	      sql = sqlite3_mprintf ("SELECT sequence_currval(NULL)");
	  else
	      sql = sqlite3_mprintf ("SELECT sequence_currval(%Q)", seq_name);
	  ret = sqlite3_get_table (sqlite, sql, &results, &rows,
				   &columns, &err_msg);
	  sqlite3_free (sql);

	  if (ret != SQLITE_OK)
	    {
		fprintf (stderr, "currval - Error: %s\n", err_msg);
		sqlite3_free (err_msg);
		return 0;
	    }
	  if ((rows != 1) || (columns != 1))
	    {
		fprintf (stderr,
			 "currval - Unexpected error: bad result: %i/%i.\n",
			 rows, columns);
		return 0;
	    }

	  if (atoi (results[1]) != cnt)
	    {
		fprintf (stderr, "currval - Unexpected value \"%s\" (%d)\n",
			 results[1], cnt);
		return 0;
	    }
	  sqlite3_free_table (results);
      }

    return 1;
}

static int
reset_sequence (sqlite3 * sqlite, const char *seq_name, int value)
{
/* resetting some sequence */
    char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

    if (seq_name == NULL)
	sql = sqlite3_mprintf ("SELECT sequence_setval(NULL, %d)", value);
    else
	sql =
	    sqlite3_mprintf ("SELECT sequence_setval(%Q, %d)", seq_name, value);
    ret = sqlite3_get_table (sqlite, sql, &results, &rows, &columns, &err_msg);
    sqlite3_free (sql);

    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "setval - Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }
    if ((rows != 1) || (columns != 1))
      {
	  fprintf (stderr, "setval - Unexpected error: bad result: %i/%i.\n",
		   rows, columns);
	  return 0;
      }

    if (atoi (results[1]) != abs (value))
      {
	  fprintf (stderr, "setval - Unexpected value \"%s\" (%d)\n",
		   results[1], value);
	  return 0;
      }
    sqlite3_free_table (results);

    return 1;
}

static int
test_all_sequences (sqlite3 * sqlite)
{
/* testing all sequences */
    const char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    int cnt;

    for (cnt = 1; cnt <= 10; cnt++)
      {
	  sql =
	      "SELECT sequence_nextval(NULL), sequence_nextval('Sequence_B'), "
	      "sequence_currval(NULL), sequence_lastval(), sequence_nextval('SeqA'), "
	      "sequence_lastval(), sequence_nextval('Sequence_C'), "
	      "sequence_currval('z'), sequence_nextval('z')";
	  ret =
	      sqlite3_get_table (sqlite, sql, &results, &rows, &columns,
				 &err_msg);

	  if (ret != SQLITE_OK)
	    {
		fprintf (stderr, "multitest - Error: %s\n", err_msg);
		sqlite3_free (err_msg);
		return 0;
	    }
	  if ((rows != 1) || (columns != 9))
	    {
		fprintf (stderr,
			 "multitest - Unexpected error: bad result: %i/%i.\n",
			 rows, columns);
		return 0;
	    }

	  if (atoi (results[9]) != cnt)
	    {
		fprintf (stderr, "nextval #1 - Unexpected value \"%s\" (%d)\n",
			 results[9], cnt);
		return 0;
	    }
	  if (atoi (results[10]) != cnt + 1000)
	    {
		fprintf (stderr, "nextval #2 - Unexpected value \"%s\" (%d)\n",
			 results[10], cnt + 1000);
		return 0;
	    }
	  if (atoi (results[11]) != cnt)
	    {
		fprintf (stderr, "currval #1 - Unexpected value \"%s\" (%d)\n",
			 results[11], cnt);
		return 0;
	    }
	  if (atoi (results[12]) != cnt + 1000)
	    {
		fprintf (stderr, "lasttval #1 - Unexpected value \"%s\" (%d)\n",
			 results[12], cnt + 1000);
		return 0;
	    }
	  if (atoi (results[13]) != cnt + 100)
	    {
		fprintf (stderr, "nextval #3 - Unexpected value \"%s\" (%d)\n",
			 results[13], cnt + 100);
		return 0;
	    }
	  if (atoi (results[14]) != cnt + 100)
	    {
		fprintf (stderr, "lastval #1 - Unexpected value \"%s\" (%d)\n",
			 results[14], cnt + 100);
		return 0;
	    }
	  if (atoi (results[15]) != cnt + 10000)
	    {
		fprintf (stderr, "nextval #4 - Unexpected value \"%s\" (%d)\n",
			 results[15], cnt + 10000);
		return 0;
	    }
	  if (cnt == 1)
	    {
		if (results[16] != NULL)
		  {
		      fprintf (stderr,
			       "currval #2 - Unexpected value \"%s\" (NULL)\n",
			       results[16]);
		      return 0;
		  }
	    }
	  else
	    {
		if (atoi (results[16]) != cnt - 1)
		  {
		      fprintf (stderr,
			       "currval #2 - Unexpected value \"%s\" (%d)\n",
			       results[16], cnt);
		      return 0;
		  }
	    }
	  if (atoi (results[17]) != cnt)
	    {
		fprintf (stderr,
			 "nextval #5 - Unexpected value \"%s\" (%d)\n",
			 results[17], cnt);
		return 0;
	    }
	  sqlite3_free_table (results);
      }

    return 1;
}

static int
test_capi (void *cache)
{
/* testing the C API */
    int value;
    if (gaiaCreateSequence (NULL, "xx") != NULL)
      {
	  fprintf (stderr, "CAPI create #1 - unexpected result\n");
	  return 0;
      }
    if (gaiaFindSequence (NULL, "xx") != NULL)
      {
	  fprintf (stderr, "CAPI find #1 - unexpected result\n");
	  return 0;
      }
    if (gaiaLastUsedSequence (NULL, &value) != 0)
      {
	  fprintf (stderr, "CAPI last #1 - unexpected result\n");
	  return 0;
      }
    if (gaiaSequenceNext (NULL, NULL) != 0)
      {
	  fprintf (stderr, "CAPI next #1 - unexpected result\n");
	  return 0;
      }
    if (gaiaSequenceNext (cache, NULL) != 0)
      {
	  fprintf (stderr, "CAPI next #2 - unexpected result\n");
	  return 0;
      }
    if (gaiaResetSequence (NULL, 1) != 0)
      {
	  fprintf (stderr, "CAPI reset #1 - unexpected result\n");
	  return 0;
      }
    if (gaiaCreateSequence (cache, NULL) == NULL)
      {
	  fprintf (stderr, "CAPI create #2 - unexpected result\n");
	  return 0;
      }
    if (gaiaCreateSequence (cache, NULL) == NULL)
      {
	  fprintf (stderr, "CAPI create #3 - unexpected result\n");
	  return 0;
      }
    if (gaiaCreateSequence (cache, "abc") == NULL)
      {
	  fprintf (stderr, "CAPI create #4 - unexpected result\n");
	  return 0;
      }
    if (gaiaCreateSequence (cache, "abc") == NULL)
      {
	  fprintf (stderr, "CAPI create #5 - unexpected result\n");
	  return 0;
      }

    return 1;
}

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -100;
      }

    spatialite_init_ex (handle, cache, 0);

/* testing the Unnamed Sequence */
    if (!test_sequence (handle, NULL))
	return -1;

/* testing SeqA */
    if (!test_sequence (handle, "SeqA"))
	return -2;

/* testing Sequence_B */
    if (!test_sequence (handle, "Sequence_B"))
	return -3;

/* resetting the Unnamed Sequence */
    if (!reset_sequence (handle, NULL, 0))
	return -4;

/* resetting SeqA */
    if (!reset_sequence (handle, "SeqA", 100))
	return -5;

/* resetting Sequence_B */
    if (!reset_sequence (handle, "Sequence_B", 1000))
	return -6;

/* resetting Sequence_C */
    if (!reset_sequence (handle, "Sequence_C", -10000))
	return -6;

/* testing all sequences */
    if (!test_all_sequences (handle))
	return -7;

/* testing the C API */
    if (!test_capi (cache))
	return -8;

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));
	  return -133;
      }

    spatialite_cleanup_ex (cache);
    spatialite_shutdown ();

    return 0;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_shp_load.c.

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162



163
164
165
166
167
168
169
...
211
212
213
214
215
216
217
218
219
220
221
222
223
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_ICONV		/* only if ICONV is supported */

static int
do_test (sqlite3 * handle, const void *p_cache)
{
    int ret;
    char *err_msg = NULL;
    int row_count;

................................................................................
    if (!ret)
      {
	  fprintf (stderr, "load_shapefile() error: %s\n", err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */

    if (p_cache == NULL)
	ret =
	    check_geometry_column (handle, "test1", "geometry", "./report.html",
				   NULL, NULL, NULL);
    else
	ret =
................................................................................
    if (!ret)
      {
	  fprintf (stderr, "sanitize_geometry_column() error\n");
	  sqlite3_close (handle);
	  return -7;
      }

#endif /* end RTTOPO conditionals */
    return 0;
}

#endif

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -10;
      }

    spatialite_cleanup ();
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







<
<







 







|







 







|



<
<








>
>
>







 







<
<
<



47
48
49
50
51
52
53


54
55
56
57
58
59
60
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
...
140
141
142
143
144
145
146
147
148
149
150


151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
210
211
212
213
214
215
216



217
218
219
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"



static int
do_test (sqlite3 * handle, const void *p_cache)
{
    int ret;
    char *err_msg = NULL;
    int row_count;

................................................................................
    if (!ret)
      {
	  fprintf (stderr, "load_shapefile() error: %s\n", err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */

    if (p_cache == NULL)
	ret =
	    check_geometry_column (handle, "test1", "geometry", "./report.html",
				   NULL, NULL, NULL);
    else
	ret =
................................................................................
    if (!ret)
      {
	  fprintf (stderr, "sanitize_geometry_column() error\n");
	  sqlite3_close (handle);
	  return -7;
      }

#endif /* end LWGEOM conditionals */
    return 0;
}



int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -10;
      }

    spatialite_cleanup ();
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_shp_load_3d.c.

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
...
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
...
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
...
786
787
788
789
790
791
792
793
794
795
796
797
798
#include <math.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_ICONV		/* only if ICONV is supported */

static int
do_test (sqlite3 * handle, const void *p_cache)
{
    int ret;
    char *err_msg = NULL;
    int row_count;
    const char *sql;
................................................................................

/* checking gaiaGetVectorLayersList() - ALL */
    list =
	gaiaGetVectorLayersList (handle, NULL, NULL,
				 GAIA_VECTORS_LIST_OPTIMISTIC);
    gaiaFreeVectorLayersList (list);

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */

    if (p_cache == NULL)
	ret = check_all_geometry_columns (handle, "./report", NULL, NULL);
    else
	ret =
	    check_all_geometry_columns_r (p_cache, handle, "./report", NULL,
					  NULL);
................................................................................
    if (!ret)
      {
	  fprintf (stderr, "sanitize_all_geometry_columns() error\n");
	  sqlite3_close (handle);
	  return -62;
      }

#endif /* end RTTOPO conditionals */

/* checking gaiaGetVectorLayersList() - Table */
    list =
	gaiaGetVectorLayersList (handle, "elem_points_xyz", NULL,
				 GAIA_VECTORS_LIST_OPTIMISTIC);
    gaiaFreeVectorLayersList (list);

................................................................................
	gaiaGetVectorLayersList (handle, "elem_roads_xy", "geom",
				 GAIA_VECTORS_LIST_OPTIMISTIC);
    gaiaFreeVectorLayersList (list);

    return 0;
}

#endif

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    void *cache = spatialite_alloc_connection ();
................................................................................
		   sqlite3_errmsg (handle));
	  return -63;

	  spatialite_cleanup ();
      }
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







<
<







 







|







 







|







 







<
<







 







<
<
<



47
48
49
50
51
52
53


54
55
56
57
58
59
60
...
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
...
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
...
715
716
717
718
719
720
721


722
723
724
725
726
727
728
...
782
783
784
785
786
787
788



789
790
791
#include <math.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"



static int
do_test (sqlite3 * handle, const void *p_cache)
{
    int ret;
    char *err_msg = NULL;
    int row_count;
    const char *sql;
................................................................................

/* checking gaiaGetVectorLayersList() - ALL */
    list =
	gaiaGetVectorLayersList (handle, NULL, NULL,
				 GAIA_VECTORS_LIST_OPTIMISTIC);
    gaiaFreeVectorLayersList (list);

#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */

    if (p_cache == NULL)
	ret = check_all_geometry_columns (handle, "./report", NULL, NULL);
    else
	ret =
	    check_all_geometry_columns_r (p_cache, handle, "./report", NULL,
					  NULL);
................................................................................
    if (!ret)
      {
	  fprintf (stderr, "sanitize_all_geometry_columns() error\n");
	  sqlite3_close (handle);
	  return -62;
      }

#endif /* end LWGEOM conditionals */

/* checking gaiaGetVectorLayersList() - Table */
    list =
	gaiaGetVectorLayersList (handle, "elem_points_xyz", NULL,
				 GAIA_VECTORS_LIST_OPTIMISTIC);
    gaiaFreeVectorLayersList (list);

................................................................................
	gaiaGetVectorLayersList (handle, "elem_roads_xy", "geom",
				 GAIA_VECTORS_LIST_OPTIMISTIC);
    gaiaFreeVectorLayersList (list);

    return 0;
}



int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    void *cache = spatialite_alloc_connection ();
................................................................................
		   sqlite3_errmsg (handle));
	  return -63;

	  spatialite_cleanup ();
      }
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_spatialindex.c.

457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
....
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
....
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
....
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
....
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
....
1639
1640
1641
1642
1643
1644
1645



1646
1647
1648
1649
1650
1651
1652
....
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
....
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
      {
	  fprintf (stderr, "CreateSpatialIndex error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -9;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT UpgradeGeometryTriggers(1);", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UpgradeGeometryTriggers (1) error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -101;
      }

................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VACUUM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -100;
      }
#else
    if (handle != NULL && legacy == 0)
	handle = NULL;		/* silencing stupid compiler warnings */
#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;
}

int
................................................................................
      }
    sqlite3_free_table (results);

    rows = 0;
    columns = 0;
    ret =
	sqlite3_get_table (handle,
			   "SELECT RecoverSpatialIndex('Councils', 'geom');",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RecoverSpatialIndex(rowid-1): %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -210;
      }
................................................................................
      }
    sqlite3_free_table (results);

    rows = 0;
    columns = 0;
    ret =
	sqlite3_get_table (handle,
			   "SELECT RecoverSpatialIndex('Councils', 'geom');",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RecoverSpatialIndex(rowid-2): %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -219;
      }
................................................................................
		   results[1]);
	  sqlite3_free_table (results);
	  sqlite3_close (handle);
	  return -239;
      }
    sqlite3_free_table (results);

#else
    if (handle != NULL)
	handle = NULL;		/* silencing stupid compiler warnings */
#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;
}

int
................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();




/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

/* expected failures */
    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata('a', 1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata('a', 1) error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -113;
      }
    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1, 2)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata(1, 2) error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -114;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata()", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -112;
      }

#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







|
|







 







|
<
<







 







|







 







|







 







<
<
<







 







>
>
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<



457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
....
1248
1249
1250
1251
1252
1253
1254
1255


1256
1257
1258
1259
1260
1261
1262
....
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
....
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
....
1619
1620
1621
1622
1623
1624
1625



1626
1627
1628
1629
1630
1631
1632
....
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
....
1651
1652
1653
1654
1655
1656
1657






















1658
1659
1660
1661
1662
1663
1664
....
1857
1858
1859
1860
1861
1862
1863



1864
1865
1866
      {
	  fprintf (stderr, "CreateSpatialIndex error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -9;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT UpgradeGeometryTriggers(1);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UpgradeGeometryTriggers (1) error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -101;
      }

................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VACUUM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -100;
      }



#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;
}

int
................................................................................
      }
    sqlite3_free_table (results);

    rows = 0;
    columns = 0;
    ret =
	sqlite3_get_table (handle,
			   "SELECT CheckSpatialIndex('Councils', 'geom');",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RecoverSpatialIndex(rowid-1): %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -210;
      }
................................................................................
      }
    sqlite3_free_table (results);

    rows = 0;
    columns = 0;
    ret =
	sqlite3_get_table (handle,
			   "SELECT CheckSpatialIndex('Councils', 'geom');",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RecoverSpatialIndex(rowid-2): %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -219;
      }
................................................................................
		   results[1]);
	  sqlite3_free_table (results);
	  sqlite3_close (handle);
	  return -239;
      }
    sqlite3_free_table (results);




#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;
}

int
................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);























    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata()", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -112;
      }

#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_sql_stmt.c.

54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

76
77
78
79
80
81
82
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
...
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
...
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
...
503
504
505
506
507
508
509
510
511



512
513
514
515
516
517
518
519
520


521
522
523
524
525
526

527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
...
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
...
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746

747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
...
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
...
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
...
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
...
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_GEOS		/* including GEOS */
#ifdef GEOS_REENTRANT
#ifdef GEOS_ONLY_REENTRANT
#define GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
#endif
#endif
#include <geos_c.h>
#endif

#ifndef OMIT_PROJ		/* only if PROJ is supported */
#include <proj_api.h>
#endif

#ifdef _WIN32
#include "fnmatch4win.h"
#include "scandir4win.h"

#include "fnmatch_impl4win.h"
#endif

struct test_data
{
    char *test_case_name;
    char *database_name;
................................................................................
	  return 0;
      }
    return 1;
}

int
do_one_case (struct db_conn *conn, const struct test_data *data,
	     int load_extension, int gpkg_amphibious_mode)
{
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
................................................................................
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }
  skip_init:

    if (gpkg_amphibious_mode)
      {
	  sqlite3_exec (db_handle, "SELECT EnableGpkgAmphibiousMode()",
			NULL, NULL, NULL);
      }
    ret =
	sqlite3_get_table (db_handle, data->sql_statement, &results, &rows,
			   &columns, &err_msg);
    if (gpkg_amphibious_mode)
      {
	  sqlite3_exec (db_handle, "SELECT DisableGpkgAmphibiousMode()",
			NULL, NULL, NULL);
      }
    if (ret != SQLITE_OK)
      {
	  if (data->expected_rows == 1 && data->expected_columns == 1)
	    {
		/* checking for an expected exception */
		if (strcmp (err_msg, data->expected_results[1]) == 0)
		  {
		      /* we expected this */
		      sqlite3_free (err_msg);
		      sqlite3_free_table (results);
		      return 0;
		  }
	    }
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != data->expected_rows) || (columns != data->expected_columns))
      {
	  fprintf (stderr, "Unexpected error: bad result: %i/%i.\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  return -11;
      }
    for (i = 0; i < (data->expected_rows + 1) * data->expected_columns; ++i)
      {
	  if (results[i] != NULL && data->expected_precision[i] == 0)
	    {
		data->expected_precision[i] = strlen (results[i]);
................................................................................
		      continue;
		  }
		else
		  {
		      fprintf (stderr, "Null value at %i.\n", i);
		      fprintf (stderr, "Expected value was: %s\n",
			       data->expected_results[i]);
		      sqlite3_free_table (results);
		      return -12;
		  }
	    }
	  else if (strlen (results[i]) == 0)
	    {
		fprintf (stderr, "zero length result at %i\n", i);
		fprintf (stderr, "Expected value was    : %s|\n",
			 data->expected_results[i]);
		sqlite3_free_table (results);
		return -13;
	    }
	  else if (strncmp
		   (results[i], data->expected_results[i],
		    data->expected_precision[i]) != 0)
	    {
		fprintf (stderr, "Unexpected value at %i: %s|\n", i,
			 results[i]);
		fprintf (stderr, "Expected value was   : %s|\n",
			 data->expected_results[i]);
		sqlite3_free_table (results);
		return -14;
	    }
      }
    sqlite3_free_table (results);

    return 0;
}
................................................................................
test_case_filter (const struct dirent *entry)
{
    return (fnmatch ("*.testcase", entry->d_name, FNM_PERIOD) == 0);
}

int
run_subdir_test (const char *subdirname, struct db_conn *conn,
		 int load_extension, int gpkg_amphibious_mode)
{
    struct dirent **namelist;
    int n;
    int i;
    int result = 0;

    n = scandir (subdirname, &namelist, test_case_filter, alphasort);
................................................................................
	  perror ("scandir");
	  return -1;
      }

    for (i = 0; i < n; ++i)
      {
	  struct test_data *data;
	  char *path =
	      sqlite3_mprintf ("%s/%s", subdirname, namelist[i]->d_name);



	  data = read_one_case (path);
	  sqlite3_free (path);

	  result =
	      do_one_case (conn, data, load_extension, gpkg_amphibious_mode);

	  cleanup_test_data (data);
	  if (result != 0)
	      break;


      }
/* cleaning up */
    for (i = 0; i < n; ++i)
	free (namelist[i]);
    free (namelist);


    return result;
}

int
run_all_testcases (struct db_conn *conn, int load_extension, int legacy)
{
    int ret;
    int result = 0;
    const char *security_level;
    int tiny_point = is_tiny_point_enabled (conn->cache);

    result = run_subdir_test ("sql_stmt_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }

    if (tiny_point)
      {
	  result =
	      run_subdir_test ("sql_stmt_tiny_point", conn, load_extension, 0);
	  if (result != 0)
	    {
		return result;
	    }
      }
    else
      {
	  result =
	      run_subdir_test ("sql_stmt_point_geom", conn, load_extension, 0);
	  if (result != 0)
	    {
		return result;
	    }
      }

    security_level = getenv ("SPATIALITE_SECURITY");
    if (security_level == NULL)
	;
    else if (strcasecmp (security_level, "relaxed") == 0)
      {
	  result =
	      run_subdir_test ("sql_stmt_security_tests", conn, load_extension,
			       0);
	  if (result != 0)
	    {
		return result;
	    }
	  if (!legacy)
	    {
		result =
		    run_subdir_test ("sql_stmt_logfile_tests", conn,
				     load_extension, 0);
		if (result != 0)
		  {
		      return result;
		  }
	    }
      }

    if (legacy)
      {
	  /* skipping Sequence tests in legacy mode */
	  fprintf (stderr,
		   "WARNING: skipping Sequence testcases in legacy mode !!!\n");
	  goto skip_sequence;
      }

    result =
	run_subdir_test ("sql_stmt_sequence_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
  skip_sequence:

    if (legacy)
      {
	  /* skipping Routing tests in legacy mode */
	  fprintf (stderr,
		   "WARNING: skipping CreateRouting testcases in legacy mode !!!\n");
	  goto skip_routing;
      }

    result =
	run_subdir_test ("sql_stmt_routing_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
  skip_routing:

#ifndef OMIT_MATHSQL		/* only if MATHSQL is supported */
    result =
	run_subdir_test ("sql_stmt_mathsql_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
#endif /* end MATHSQL conditional */

#ifndef OMIT_EPSG		/* only if full EPSG is supported */
#ifndef OMIT_PROJ		/* only if PROJ is supported */
    result = run_subdir_test ("sql_stmt_proj_tests", conn, load_extension, 0);
    if (PJ_VERSION >= 493)
	result =
	    run_subdir_test ("sql_stmt_proj493_tests", conn, load_extension, 0);
    else
	result =
	    run_subdir_test ("sql_stmt_proj492_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
#endif /* end PROJ conditional */
#endif /* end EPSG conditional */

................................................................................
	     rationale: obsolete versions may return substantially
	     different results, thus causing many testcases to fail
	   */
	  fprintf (stderr,
		   "WARNING: skipping GEOS testcases; obsolete version found !!!\n");
	  goto skip_geos;
      }
#ifdef GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
    if (legacy)
      {
	  /* skipping GEOS tests in legacy mode */
	  fprintf (stderr,
		   "WARNING: skipping GEOS testcases in legacy mode:  GEOS_USE_ONLY_R_API defined !!!\n");
	  goto skip_geos;
      }
#endif
    ret = system ("cp test_geos.sqlite test_geos_x.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot copy test_geos database\n");
	  return -1;
      }

    result = run_subdir_test ("sql_stmt_geos_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }

    ret = unlink ("test_geos_x.sqlite");
    if (ret != 0)
................................................................................
	     rationale: obsolete versions may return substantially
	     different results, thus causing many testcases to fail
	   */
	  fprintf (stderr,
		   "WARNING: skipping GEOS_ADVANCED testcases; obsolete version found !!!\n");
	  goto skip_geos_advanced;
      }
#ifdef GEOS_USE_ONLY_R_API	/* only fully thread-safe GEOS API */
    if (legacy)
      {
	  /* skipping GEOS_ADVANCED tests in legacy mode */
	  fprintf (stderr,
		   "WARNING: skipping GEOS_ADVANCED testcases in legacy mode:  GEOS_USE_ONLY_R_API defined !!!\n");
	  goto skip_geos_advanced;
      }
#endif

    result =
	run_subdir_test ("sql_stmt_geosadvanced_tests", conn, load_extension,
			 0);
    if (result != 0)
      {
	  return result;
      }

#ifdef GEOS_REENTRANT
    result =
	run_subdir_test ("sql_stmt_voronoj2_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
#else
    result =
	run_subdir_test ("sql_stmt_voronoj1_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
#endif

  skip_geos_advanced:
#endif /* end GEOS_ADVANCED conditional */

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */
    if (legacy)
      {
	  /* skipping RTTOPO tests in legacy mode */
	  fprintf (stderr,
		   "WARNING: skipping RTTOPO testcases in legacy mode !!!\n");
	  goto skip_rttopo;
      }


    result = run_subdir_test ("sql_stmt_rtgeom_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }

    result = run_subdir_test ("sql_stmt_rttopo_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }

  skip_rttopo:

#endif /* end RTTOPO conditional */

#ifndef OMIT_ICONV		/* only if ICONV is supported */
    result = run_subdir_test ("sql_stmt_iconv_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }
#endif /* end ICONV */

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    result =
	run_subdir_test ("sql_stmt_libxml2_tests", conn, load_extension, 0);
    if (result != 0)
      {
	  return result;
      }

    security_level = getenv ("SPATIALITE_SECURITY");
    if (security_level == NULL)
	;
    else if (strcasecmp (security_level, "relaxed") == 0)
      {
	  result =
	      run_subdir_test ("sql_stmt_xmlsec_tests", conn, load_extension,
			       0);
	  if (result != 0)
	    {
		return result;
	    }
      }

#endif
#endif /* end LIBXML2 conditional */

#ifdef ENABLE_GEOPACKAGE	/* only if GeoPackage support is enabled */
    if (!legacy)
      {
	  result =
	      run_subdir_test ("sql_stmt_geopackage_tests", conn,
			       load_extension, 1);
	  if (result != 0)
	    {
		return result;
	    }
#ifndef OMIT_EPSG		/* EPSG is supported */
	  if (PJ_VERSION >= 493)
	      result =
		  run_subdir_test ("sql_stmt_gpkg_epsg493_tests", conn,
				   load_extension, 1);
	  else
	      result =
		  run_subdir_test ("sql_stmt_gpkg_epsg492_tests", conn,
				   load_extension, 1);
	  if (result != 0)
	    {
		return result;
	    }
#endif /* end EPSG conditional */
      }

#endif /* end GEOPACKAGE conditional */

#ifndef OMIT_FREEXL		/* FREEXL is enabled */
    security_level = getenv ("SPATIALITE_SECURITY");
    if (security_level == NULL)
	;
    else if (strcasecmp (security_level, "relaxed") == 0)
      {
	  result =
	      run_subdir_test ("sql_stmt_freexl_tests", conn, load_extension,
			       0);
	  if (result != 0)
	    {
		return result;
	    }
      }
#endif /* end FREEXL support */

/* testing global settings SQL functions */
    if (legacy)
      {
	  result =
	      run_subdir_test ("sql_stmt_nocache_tests", conn, load_extension,
			       0);
	  if (result != 0)
	    {
		return result;
	    }
      }
    else
      {
	  result =
	      run_subdir_test ("sql_stmt_cache_tests", conn, load_extension, 0);
	  if (result != 0)
	    {
		return result;
	    }
      }

#ifdef ENABLE_GEOPACKAGE	/* only if GeoPackage support is enabled */
    if (legacy)
      {
	  result =
	      run_subdir_test ("sql_stmt_gpkgnocache_tests", conn,
			       load_extension, 0);
	  if (result != 0)
	    {
		return result;
	    }
      }
    else
      {
	  result =
	      run_subdir_test ("sql_stmt_gpkgcache_tests", conn, load_extension,
			       0);
	  if (result != 0)
	    {
		return result;
	    }
      }
#endif /* end GEOPACKAGE conditional */

    return result;
}

int
run_specified_testcases (int argc, char *argv[], struct db_conn *conn,
			 int load_extension)
{
................................................................................
    int result = 0;
    int i = 0;

    for (i = 1; i < argc; ++i)
      {
	  struct test_data *data;
	  data = read_one_case (argv[i]);
	  result = do_one_case (conn, data, load_extension, 0);
	  cleanup_test_data (data);
	  if (result != 0)
	    {
		break;
	    }
      }
    return result;
................................................................................
    conn.db_path = NULL;
    conn.db_handle = NULL;
    conn.cache = cache;

/* testing in current mode */
    if (argc == 1)
      {
	  result = run_all_testcases (&conn, 0, 0);
      }
    else
      {
	  result = run_specified_testcases (argc, argv, &conn, 0);
      }
    if (result != 0)
      {
................................................................................
	  result = -1;
      }

    close_connection (&conn);
    spatialite_cleanup_ex (conn.cache);
    conn.cache = NULL;

    if (result == 0)
      {
	  /* testing again by enabling the TinyPoint encoding */
	  fprintf (stderr,
		   "\n****************** testing again by enabling the TinyPoint encoding\n\n");
	  cache = spatialite_alloc_connection ();
	  conn.cache = cache;
	  /* enabling TinyPoint */
	  enable_tiny_point (cache);
	  if (argc == 1)
	    {
		result = run_all_testcases (&conn, 0, 0);
	    }
	  else
	    {
		result = run_specified_testcases (argc, argv, &conn, 0);
	    }
	  close_connection (&conn);
	  spatialite_cleanup_ex (conn.cache);
	  conn.cache = NULL;
      }

    if (result == 0)
      {
	  /* testing again in legacy mode */
	  fprintf (stderr,
		   "\n****************** testing again in legacy mode\n\n");
	  if (argc == 1)
	    {
		result = run_all_testcases (&conn, 0, 1);
	    }
	  else
	    {
		result = run_specified_testcases (argc, argv, &conn, 0);
	    }
	  close_connection (&conn);
      }
................................................................................
    if (result == 0)
      {
	  /* testing again in load_extension mode */
	  fprintf (stderr,
		   "\n****************** testing again in load_extension mode\n\n");
	  if (argc == 1)
	    {
		result = run_all_testcases (&conn, 1, 0);
	    }
	  else
	    {
		result = run_specified_testcases (argc, argv, &conn, 1);
	    }
	  close_connection (&conn);
      }

    spatialite_shutdown ();
    return result;
}







<
<
<
<
<



<
<
<
<



>







 







|







 







<
<
<
<
<



<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<








<







 







<








<










<







 







|







 







|
|
>
>
>

|

<
|



<
>
>
|
<
<
|
<
|
>




|




<

|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








|
<




<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
|








|
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







|







 







<
<
|
<
<
<
<
<
<
<

|
<





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



<
<
<
<
<
<
<
<
<
>
|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|


<
<
|











|
<






<



<
<
|
|
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











|
<







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|







 







|











54
55
56
57
58
59
60





61
62
63




64
65
66
67
68
69
70
71
72
73
74
...
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
...
258
259
260
261
262
263
264





265
266
267





268
269











270
271
272
273
274
275
276
277

278
279
280
281
282
283
284
...
291
292
293
294
295
296
297

298
299
300
301
302
303
304
305

306
307
308
309
310
311
312
313
314
315

316
317
318
319
320
321
322
...
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
...
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484

485
486
487
488

489
490
491


492

493
494
495
496
497
498
499
500
501
502
503

504
505
506
507
508



















509
510
511
512
513
514
515
516
517

518
519
520
521








522
523


































524

525
526
527
528
529
530
531
532
533
534






535
536
537
538
539
540
541
...
548
549
550
551
552
553
554









555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
...
583
584
585
586
587
588
589


590







591
592

593
594
595
596
597
















598
599
600









601
602
603
604
605
606
607
















608
609
610


611
612
613
614
615
616
617
618
619
620
621
622
623

624
625
626
627
628
629

630
631
632


633
634

635
636
637















638
639
640
641
642
643
644
645
646
647
648
649

650
651
652
653
654
655
656












































657
658
659
660
661
662
663
...
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
...
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
...
705
706
707
708
709
710
711






















712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
...
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_GEOS		/* including GEOS */





#include <geos_c.h>
#endif





#ifdef _WIN32
#include "fnmatch4win.h"
#include "scandir4win.h"
#include "asprintf4win.h"
#include "fnmatch_impl4win.h"
#endif

struct test_data
{
    char *test_case_name;
    char *database_name;
................................................................................
	  return 0;
      }
    return 1;
}

int
do_one_case (struct db_conn *conn, const struct test_data *data,
	     int load_extension)
{
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
................................................................................
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }
  skip_init:






    ret =
	sqlite3_get_table (db_handle, data->sql_statement, &results, &rows,
			   &columns, &err_msg);





    if (ret != SQLITE_OK)
      {











	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != data->expected_rows) || (columns != data->expected_columns))
      {
	  fprintf (stderr, "Unexpected error: bad result: %i/%i.\n", rows,
		   columns);

	  return -11;
      }
    for (i = 0; i < (data->expected_rows + 1) * data->expected_columns; ++i)
      {
	  if (results[i] != NULL && data->expected_precision[i] == 0)
	    {
		data->expected_precision[i] = strlen (results[i]);
................................................................................
		      continue;
		  }
		else
		  {
		      fprintf (stderr, "Null value at %i.\n", i);
		      fprintf (stderr, "Expected value was: %s\n",
			       data->expected_results[i]);

		      return -12;
		  }
	    }
	  else if (strlen (results[i]) == 0)
	    {
		fprintf (stderr, "zero length result at %i\n", i);
		fprintf (stderr, "Expected value was    : %s|\n",
			 data->expected_results[i]);

		return -13;
	    }
	  else if (strncmp
		   (results[i], data->expected_results[i],
		    data->expected_precision[i]) != 0)
	    {
		fprintf (stderr, "Unexpected value at %i: %s|\n", i,
			 results[i]);
		fprintf (stderr, "Expected value was   : %s|\n",
			 data->expected_results[i]);

		return -14;
	    }
      }
    sqlite3_free_table (results);

    return 0;
}
................................................................................
test_case_filter (const struct dirent *entry)
{
    return (fnmatch ("*.testcase", entry->d_name, FNM_PERIOD) == 0);
}

int
run_subdir_test (const char *subdirname, struct db_conn *conn,
		 int load_extension)
{
    struct dirent **namelist;
    int n;
    int i;
    int result = 0;

    n = scandir (subdirname, &namelist, test_case_filter, alphasort);
................................................................................
	  perror ("scandir");
	  return -1;
      }

    for (i = 0; i < n; ++i)
      {
	  struct test_data *data;
	  char *path;
	  if (asprintf (&path, "%s/%s", subdirname, namelist[i]->d_name) < 0)
	    {
		return -1;
	    }
	  data = read_one_case (path);
	  free (path);


	  result = do_one_case (conn, data, load_extension);

	  cleanup_test_data (data);
	  if (result != 0)

	    {
		return result;
	    }


	  free (namelist[i]);

      }
    free (namelist);
    return result;
}

int
run_all_testcases (struct db_conn *conn, int load_extension)
{
    int ret;
    int result = 0;
    const char *security_level;


    result = run_subdir_test ("sql_stmt_tests", conn, load_extension);
    if (result != 0)
      {
	  return result;



















      }

    security_level = getenv ("SPATIALITE_SECURITY");
    if (security_level == NULL)
	;
    else if (strcasecmp (security_level, "relaxed") == 0)
      {
	  result =
	      run_subdir_test ("sql_stmt_security_tests", conn, load_extension);

	  if (result != 0)
	    {
		return result;
	    }








      }



































#ifndef OMIT_MATHSQL		/* only if MATHSQL is supported */

    result = run_subdir_test ("sql_stmt_mathsql_tests", conn, load_extension);
    if (result != 0)
      {
	  return result;
      }
#endif /* end MATHSQL conditional */

#ifndef OMIT_EPSG		/* only if full EPSG is supported */
#ifndef OMIT_PROJ		/* only if PROJ is supported */
    result = run_subdir_test ("sql_stmt_proj_tests", conn, load_extension);






    if (result != 0)
      {
	  return result;
      }
#endif /* end PROJ conditional */
#endif /* end EPSG conditional */

................................................................................
	     rationale: obsolete versions may return substantially
	     different results, thus causing many testcases to fail
	   */
	  fprintf (stderr,
		   "WARNING: skipping GEOS testcases; obsolete version found !!!\n");
	  goto skip_geos;
      }









    ret = system ("cp test_geos.sqlite test_geos_x.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot copy test_geos database\n");
	  return -1;
      }

    result = run_subdir_test ("sql_stmt_geos_tests", conn, load_extension);
    if (result != 0)
      {
	  return result;
      }

    ret = unlink ("test_geos_x.sqlite");
    if (ret != 0)
................................................................................
	     rationale: obsolete versions may return substantially
	     different results, thus causing many testcases to fail
	   */
	  fprintf (stderr,
		   "WARNING: skipping GEOS_ADVANCED testcases; obsolete version found !!!\n");
	  goto skip_geos_advanced;
      }










    result =
	run_subdir_test ("sql_stmt_geosadvanced_tests", conn, load_extension);

    if (result != 0)
      {
	  return result;
      }

















  skip_geos_advanced:
#endif /* end GEOS_ADVANCED conditional */










#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */
    result = run_subdir_test ("sql_stmt_lwgeom_tests", conn, load_extension);
    if (result != 0)
      {
	  return result;
      }

















#endif /* end LWGEOM conditional */

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */


    result = run_subdir_test ("sql_stmt_libxml2_tests", conn, load_extension);
    if (result != 0)
      {
	  return result;
      }

    security_level = getenv ("SPATIALITE_SECURITY");
    if (security_level == NULL)
	;
    else if (strcasecmp (security_level, "relaxed") == 0)
      {
	  result =
	      run_subdir_test ("sql_stmt_xmlsec_tests", conn, load_extension);

	  if (result != 0)
	    {
		return result;
	    }
      }


#endif /* end LIBXML2 conditional */

#ifdef ENABLE_GEOPACKAGE	/* only if GeoPackage support is enabled */


    result =
	run_subdir_test ("sql_stmt_geopackage_tests", conn, load_extension);

    if (result != 0)
      {
	  return result;















      }

#endif /* end GEOPACKAGE conditional */

#ifndef OMIT_FREEXL		/* FREEXL is enabled */
    security_level = getenv ("SPATIALITE_SECURITY");
    if (security_level == NULL)
	;
    else if (strcasecmp (security_level, "relaxed") == 0)
      {
	  result =
	      run_subdir_test ("sql_stmt_freexl_tests", conn, load_extension);

	  if (result != 0)
	    {
		return result;
	    }
      }
#endif /* end FREEXL support */













































    return result;
}

int
run_specified_testcases (int argc, char *argv[], struct db_conn *conn,
			 int load_extension)
{
................................................................................
    int result = 0;
    int i = 0;

    for (i = 1; i < argc; ++i)
      {
	  struct test_data *data;
	  data = read_one_case (argv[i]);
	  result = do_one_case (conn, data, load_extension);
	  cleanup_test_data (data);
	  if (result != 0)
	    {
		break;
	    }
      }
    return result;
................................................................................
    conn.db_path = NULL;
    conn.db_handle = NULL;
    conn.cache = cache;

/* testing in current mode */
    if (argc == 1)
      {
	  result = run_all_testcases (&conn, 0);
      }
    else
      {
	  result = run_specified_testcases (argc, argv, &conn, 0);
      }
    if (result != 0)
      {
................................................................................
	  result = -1;
      }

    close_connection (&conn);
    spatialite_cleanup_ex (conn.cache);
    conn.cache = NULL;























    if (result == 0)
      {
	  /* testing again in legacy mode */
	  fprintf (stderr,
		   "\n****************** testing again in legacy mode\n\n");
	  if (argc == 1)
	    {
		result = run_all_testcases (&conn, 0);
	    }
	  else
	    {
		result = run_specified_testcases (argc, argv, &conn, 0);
	    }
	  close_connection (&conn);
      }
................................................................................
    if (result == 0)
      {
	  /* testing again in load_extension mode */
	  fprintf (stderr,
		   "\n****************** testing again in load_extension mode\n\n");
	  if (argc == 1)
	    {
		result = run_all_testcases (&conn, 1);
	    }
	  else
	    {
		result = run_specified_testcases (argc, argv, &conn, 1);
	    }
	  close_connection (&conn);
      }

    spatialite_shutdown ();
    return result;
}

Deleted test/check_stored_proc.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
/*

 check_stored_proc.c -- SpatiaLite Test Case
 
 Testing Stored Procedures

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2017
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
  
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_ICONV		/* only if ICONV is supported */

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 0 tests - DB initialization */
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

/* creating Stored Procedures tables */
    ret =
	sqlite3_get_table (handle, "SELECT StoredProc_CreateTables()", &results,
			   &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_CreateTables() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -1;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_CreateTables() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -2;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_CreateTables() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -3;
	  return 0;
      }
    sqlite3_free_table (results);

/* creating the first test table */
    ret = sqlite3_exec (handle, "CREATE TABLE test_1 ("
			"id INTEGER NOT NULL PRIMARY KEY,\n"
			"name TEXT NOT NULL,\n"
			"value DOUBLE NOT NULL)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE TABLE test_1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* creating the second test table */
    ret = sqlite3_exec (handle, "CREATE TABLE test_2 ("
			"pk_uid INTEGER NOT NULL PRIMARY KEY,\n"
			"code TEXT NOT NULL,\n"
			"description TEXT NOT NULL,\n"
			"measure DOUBLE NOT NULL)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE TABLE test_2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

/* populating the first test table */
    ret = sqlite3_exec (handle, "INSERT INTO test_1 (id, name, value) "
			"VALUES (NULL, 'alpha', 1.5)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_1 #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -6;
      }
    ret = sqlite3_exec (handle, "INSERT INTO test_1 (id, name, value) "
			"VALUES (NULL, 'beta', 2.5)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_1 #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }
    ret = sqlite3_exec (handle, "INSERT INTO test_1 (id, name, value) "
			"VALUES (NULL, 'gamma', 3.5)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_1 #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -8;
      }

/* populating the second test table */
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO test_2 (pk_uid, code, description, measure) "
		      "VALUES (NULL, 'alpha', 'first', 1000.5)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_2 #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -9;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO test_2 (pk_uid, code, description, measure) "
		      "VALUES (NULL, 'beta', 'second', 2000.5)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_2 #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -10;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO test_2 (pk_uid, code, description, measure) "
		      "VALUES (NULL, 'gamma', 'third', 3000.5)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO test_2 #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -11;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 1 tests - Stored Procedures basics */
    const char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

/* registering a first Stored Procedure */
    sql = "SELECT StoredProc_Register('proc_1', 'this is title one', "
	"SqlProc_FromText('--\n-- comment\n--\n"
	"CREATE TABLE @output_1@ AS\n"
	"SELECT @col_1@, @col_2@ FROM @table_1@ WHERE @col_3@ = @value_1@;\n\n"
	".echo on\n\n"
	"--\n-- another comment\n--\n"
	"CREATE TABLE @output_2@ AS\n"
	"SELECT @col_4@, @col_5@ FROM @table_2@ WHERE @col_6@ = @value_2@;\n\n"
	".echo off\n\n" "--\n-- end comment\n--\n\n'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Register() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -12;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_Register() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -13;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_Register() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -14;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a second Stored Procedure */
    sql = "SELECT StoredProc_Register('proc_2', 'this is title two', "
	"SqlProc_FromText('SELECT @col_1@, @col_2@ FROM @table_1@ WHERE @col_3@ = @value_1@;'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Register() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -15;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_Register() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -16;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_Register() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -17;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Procedure title - expected failure */
    sql =
	"SELECT StoredProc_UpdateTitle('no_proc', 'this is an updated title two')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_UpdateTitle() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -18;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_UpdateTitle() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -19;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr, "StoredProc_UpdateTitle() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -20;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Procedure title - expected success */
    sql =
	"SELECT StoredProc_UpdateTitle('proc_2', 'this is an updated title two')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_UpdateTitle() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -21;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_UpdateTitle() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -22;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_UpdateTitle() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -23;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Procedure SQL Body - expected failure */
    sql = "SELECT StoredProc_UpdateSqlBody('no_proc', "
	"SqlProc_FromText('SELECT @fld1@, @fld2@ FROM @tbl@ WHERE @fld3@ = @val1@;'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_UpdateSqlBody() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -24;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_UpdateSqlBody() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -25;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr,
		   "StoredProc_UpdateSqlBody() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -26;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Procedure SQL Body - expected success */
    sql = "SELECT StoredProc_UpdateSqlBody('proc_2', "
	"SqlProc_FromText('SELECT @fld1@, @fld2@ FROM @tbl@ WHERE @fld3@ = @val1@;'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_UpdateSqlBody() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -27;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_UpdateSqlBody() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -28;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr,
		   "StoredProc_UpdateSqlBody() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -29;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing a Stored Procedure - expected failure */
    sql = "SELECT SqlProc_AllVariables(StoredProc_Get('no_proc'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Get() #1 unexpected success\n");
	  *retcode = -30;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing a Stored Procedure - expected success */
    sql = "SELECT SqlProc_AllVariables(StoredProc_Get('proc_2'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Get() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -31;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredProc_Get() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -32;
	  return 0;
      }
    if (*(results + 1) == NULL)
      {
	  fprintf (stderr, "StoredProc_Get() #2 unexpected NULL\n");
	  sqlite3_free_table (results);
	  *retcode = -33;
	  return 0;
      }
    if (strcmp (*(results + 1), "@fld1@ @fld2@ @tbl@ @fld3@ @val1@") != 0)
      {
	  fprintf (stderr, "StoredProc_Get() #2 unexpected value \"%s\"\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -33;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a Stored Procedure - expected failure */
    sql = "SELECT StoredProc_Delete('no_proc')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Delete() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -34;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredProc_Delete() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -35;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr, "StoredProc_Delete() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -36;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a Stored Procedure - expected success */
    sql = "SELECT StoredProc_Delete('proc_2')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Delete() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -37;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredProc_Delete() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -38;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_Delete() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -39;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a Stored Procedure from filepath */
    sql = "SELECT StoredProc_Register('proc_file', 'this is title three', "
	"SqlProc_FromFile('./sqlproc_sample.txt'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Register() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -40;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_Register() #3 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -41;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_Register() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -42;
	  return 0;
      }
    sqlite3_free_table (results);

    return 1;
}

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 2 tests - Stored Variables basics */
    const char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

/* registering a first Stored Variable */
    sql = "SELECT StoredVar_Register('var_1', 'this is title one', 1234)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Register() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -45;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_Register() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -46;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_Register() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -47;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a second Stored Variable */
    sql = "SELECT StoredVar_Register('var_2', 'this is title two', 'abcdef')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Register() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -48;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_Register() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -49;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_Register() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -50;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Variable title - expected failure */
    sql =
	"SELECT StoredVar_UpdateTitle('no_var', 'this is an updated title two')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_UpdateTitle() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_UpdateTitle() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -52;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr, "StoredVar_UpdateTitle() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -53;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Variable title - expected success */
    sql =
	"SELECT StoredVar_UpdateTitle('var_2', 'this is an updated title two')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_UpdateTitle() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -54;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_UpdateTitle() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -55;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_UpdateTitle() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -56;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Variable with Value - expected failure */
    sql = "SELECT StoredVar_UpdateValue('no_var', 1956)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_UpdateValue() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_UpdateValue() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -58;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr, "StoredVar_UpdateValue() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating Stored Variable with Value - expected success */
    sql = "SELECT StoredVar_UpdateValue('var_2', 1956)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_UpdateValue() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -60;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_UpdateValue() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -61;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_UpdateValue() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -62;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing a Stored Variable - expected failure */
    sql = "SELECT StoredVar_Get('no_var')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Get() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredVar_Get() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -64;
	  return 0;
      }
    if (*(results + 1) != NULL)
      {
	  fprintf (stderr, "StoredVar_Get() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -65;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing a Stored Variable - expected success */
    sql = "SELECT StoredVar_Get('var_2')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Get() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -66;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredVar_Get() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -67;
	  return 0;
      }
    if (*(results + 1) == NULL)
      {
	  fprintf (stderr, "StoredVar_Get() #2 unexpected NULL\n");
	  sqlite3_free_table (results);
	  *retcode = -68;
	  return 0;
      }
    if (strcmp (*(results + 1), "@var_2@=1956") != 0)
      {
	  fprintf (stderr, "StoredVar_Get() #2 unexpected value \"%s\"\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -69;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing a Stored Variable - expected failure */
    sql = "SELECT StoredVar_GetValue('no_var')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_GetValue() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_GetValue() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -64;
	  return 0;
      }
    if (*(results + 1) != NULL)
      {
	  fprintf (stderr, "StoredVar_GetValue() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -65;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing a Stored Variable - expected success */
    sql = "SELECT StoredVar_GetValue('var_2')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_GetValue() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -66;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_GetValue() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -67;
	  return 0;
      }
    if (*(results + 1) == NULL)
      {
	  fprintf (stderr, "StoredVar_GetValue() #2 unexpected NULL\n");
	  sqlite3_free_table (results);
	  *retcode = -68;
	  return 0;
      }
    if (strcmp (*(results + 1), "1956") != 0)
      {
	  fprintf (stderr, "StoredVar_GetValue() #2 unexpected value \"%s\"\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -69;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a Stored Variable - expected failure */
    sql = "SELECT StoredVar_Delete('no_var')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Delete() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -70;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredVar_Delete() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -71;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr, "StoredVar_Delete() #1 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -72;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a Stored Procedure - expected success */
    sql = "SELECT StoredVar_Delete('var_2')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Delete() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "StoredVar_Delete() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -74;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_Delete() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -75;
	  return 0;
      }
    sqlite3_free_table (results);

    return 1;
}

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 3 tests - Stored Procedure Execute */
    const char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

/* executing a Stored Procedure */
    sql = "SELECT StoredProc_Execute('proc_1', '@output_1@=out_test_1', "
	"'@col_1@=name', '@col_2@=value', '@table_1@=test_1', "
	"'@col_3@=id', '@value_1@=2', '@output_2@=out_test_2', "
	"'@col_4@=description', '@col_5@=measure', '@table_2@=test_2', "
	"'@col_6@=pk_uid', '@value_2@=3')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Execute() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -76;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_Execute() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -77;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_Execute() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -78;
	  return 0;
      }
    sqlite3_free_table (results);

/* executing another Stored Procedure */
    sql = "SELECT StoredProc_Execute('proc_file', '@col1@=description', "
	"'@col2@=measure', '@table@=test_2')";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredProc_Execute() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -79;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredProc_Execute() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -80;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredProc_Execute() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -81;
	  return 0;
      }
    sqlite3_free_table (results);

    return 1;
}

static int
do_level4_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 4 tests - SQL Logfile */
    const char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

/* enabling a SQL Logfile */
    sql = "SELECT SqlProc_SetLogfile('./sql_logfile', 0)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_SetLogfile() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -82;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_SetLogfile() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -83;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_SetLogfile() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -84;
	  return 0;
      }
    sqlite3_free_table (results);

/* checking the SQL Logfile */
    sql = "SELECT SqlProc_GetLogfile()";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_GetLogfile() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -85;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_GetLogfile() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -86;
	  return 0;
      }
    if (strcmp (*(results + 1), "./sql_logfile") != 0)
      {
	  fprintf (stderr, "SqlProc_GetLogfile() #1 unexpected failure (%s)\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -87;
	  return 0;
      }
    sqlite3_free_table (results);

/* executing a Stored Procedure - valid SQL */
    sql = "SELECT SqlProc_Execute(SqlProc_FromFile('./sqlproc_logfile.txt'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_Execute() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -87;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_Execute() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -88;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_Execute() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -89;
	  return 0;
      }
    sqlite3_free_table (results);

/* executing a Stored Procedure - invalid SQL */
    sql = "SELECT SqlProc_Execute(SqlProc_FromFile('./sqlproc_error.txt'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_Execute() #2 unexpected success\n");
	  *retcode = -90;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level5_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 5 tests - SQL Logfile */
    const char *sql;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;

/* enabling a SQL Logfile - append mode */
    sql = "SELECT SqlProc_SetLogfile('./sql_logfile', 1)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_SetLogfile() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_SetLogfile() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -92;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_SetLogfile() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -93;
	  return 0;
      }
    sqlite3_free_table (results);

/* executing a SQL Procedure - with no arguments */
    sql = "SELECT SqlProc_Execute(SqlProc_FromText('SELECT @num1@ * @num2@;'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_Execute() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -94;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_Execute() #3 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -95;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_Execute() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -96;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a first Stored Variable */
    sql = "SELECT StoredVar_Register('num1', 'variable @num1@', 2)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Register() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -97;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_Register() #3 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -98;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_Register() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -99;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a second Stored Variable */
    sql = "SELECT StoredVar_Register('num2', 'variable @num1@', 3.14)";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "StoredVar_Register() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -100;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "StoredVar_Register() #4 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -101;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "StoredVar_Register() #4 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -102;
	  return 0;
      }
    sqlite3_free_table (results);

/* executing a SQL Procedure - with stored variables */
    sql = "SELECT SqlProc_Execute(SqlProc_FromText('SELECT @num1@ * @num2@;'))";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_Execute() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -103;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_Execute() #4 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -104;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_Execute() #4 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -105;
	  return 0;
      }
    sqlite3_free_table (results);

/* executing a SQL Procedure - with explicitly set variables */
    sql = "SELECT SqlProc_Execute(SqlProc_FromText('SELECT @num1@ * @num2@;'), "
	"'@num1@=2.55', '@num2@=3.05');";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_Execute() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -106;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_Execute() #5 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -107;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_Execute() #5 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -108;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing SqlProc_Exit */
    sql = "SELECT SqlProc_Exit();";
    ret = sqlite3_get_table (handle, sql, &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SqlProc_Exit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -109;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "SqlProc_Exit() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -110;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "SqlProc_Exit() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -111;
	  return 0;
      }
    sqlite3_free_table (results);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();
    char *old_SPATIALITE_SECURITY_ENV = NULL;
#ifdef _WIN32
    char *env;
#endif /* not WIN32 */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    old_SPATIALITE_SECURITY_ENV = getenv ("SPATIALITE_SECURITY");
#ifdef _WIN32
    putenv ("SPATIALITE_SECURITY=relaxed");
#else /* not WIN32 */
    setenv ("SPATIALITE_SECURITY", "relaxed", 1);
#endif

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

#ifndef OMIT_ICONV		/* only if ICONV is enabled */

/*tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/*tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

    if (old_SPATIALITE_SECURITY_ENV)
      {
#ifdef _WIN32
	  env =
	      sqlite3_mprintf ("SPATIALITE_SECURITY=%s",
			       old_SPATIALITE_SECURITY_ENV);
	  putenv (env);
	  sqlite3_free (env);
#else /* not WIN32 */
	  setenv ("SPATIALITE_SECURITY", old_SPATIALITE_SECURITY_ENV, 1);
#endif
      }
    else
      {
#ifdef _WIN32
	  putenv ("SPATIALITE_SECURITY=");
#else /* not WIN32 */
	  unsetenv ("SPATIALITE_SECURITY");
#endif
      }

/*tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/*tests: level 3 */
    if (!do_level3_tests (handle, &retcode))
	goto end;

/*tests: level 4 */
    if (!do_level4_tests (handle, &retcode))
	goto end;

/*tests: level 5 */
    if (!do_level5_tests (handle, &retcode))
	goto end;

  end:

#else
    if (old_SPATIALITE_SECURITY_ENV != NULL)
	old_SPATIALITE_SECURITY_ENV = NULL;	/* silencing stupid compiler warnings */
#endif /* end ICONV */

    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);
    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_styling.c.

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
....
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
....
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
....
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
....
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
      }
    sqlite3_finalize (stmt);
    if (retcode == 1)
	return SQLITE_OK;
    return SQLITE_ERROR;
}

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
#ifndef OMIT_ICONV		/* only if ICONV is supported */

static unsigned char *
load_blob (const char *path, int *blob_len)
{
/* loading an external image */
    unsigned char *blob;
    int sz = 0;
    int rd;
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error AddGeometryColumn table2: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -15;
      }

/* creating a SpatialView */
    sql =
	"CREATE VIEW spatialview1 AS SELECT id AS pkid, geom AS geometry FROM table1";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error Create SpatialView spatialview1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -16;
      }
    sql = "INSERT INTO views_geometry_columns (view_name, view_geometry, "
	"view_rowid, f_table_name, f_geometry_column, read_only) "
	"VALUES ('spatialview1', 'geometry', 'pkid', 'table1', 'geom', 1)";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error Register SpatialView spatialview1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -17;
      }

/* creating a VirtualShape */
    sql =
	"CREATE VIRTUAL TABLE shapetest USING VirtualShape('shp/merano-3d/roads', CP1252, 25832)";
    ret = sqlite3_exec (handle, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error Create VirtualShape shapetest: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -18;
      }

/* registering two Vector Coverages */
    sql = "SELECT SE_RegisterVectorCoverage('table1', 'table1', 'geom')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr, "Error RegisterVectorCoverage table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -19;
      }
    sql =
	"SELECT SE_RegisterVectorCoverage('table2', 'table2', 'geom', 'title-2', 'abstract-2')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr, "Error RegisterVectorCoverage table2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -20;
      }
    sql = "SELECT SE_SetVectorCoverageInfos('table1', 'title-1', 'abstract-1')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr, "Error RegisterVectorCoverageInfos table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -21;
      }
    sql = "SELECT SE_SetVectorCoverageCopyright('table1', 'somebody')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterVectorCoverageCopyright #1 table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -22;
      }
    sql =
	"SELECT SE_SetVectorCoverageCopyright('table1', 'someone else', 'CC BY 3.0')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterVectorCoverageCopyright #2 table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -23;
      }
    sql =
	"SELECT SE_SetVectorCoverageCopyright('table1', NULL, 'CC BY-SA 4.0')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterVectorCoverageCopyright #3 table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -24;
      }

/* registering two SpatialView Coverages */
    sql =
	"SELECT SE_RegisterSpatialViewCoverage('spatialview1', 'spatialview1', 'geometry')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterSpatialViewCoverage spatialview1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -25;
      }
    sql =
	"SELECT SE_RegisterSpatialViewCoverage('spatialview2', 'spatialview1', 'geometry', 'title', 'abstract')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterSpatialViewCoverage spatialview2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -26;
      }

/* registering two VirtualShape Coverages */
    sql =
	"SELECT SE_RegisterVirtualShapeCoverage('shapetest1', 'shapetest', 'geometry')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterVirtualShapeCoverage shapetest1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -27;
      }
    sql =
	"SELECT SE_RegisterVirtualShapeCoverage('shapetest2', 'shapetest', 'geometry', 'title', 'abstract')";
    ret = execute_check (handle, sql, &err_msg);
#ifdef ENABLE_RTTOPO
    if (ret != SQLITE_OK)
#else
    if (ret != SQLITE_ERROR)
#endif
      {
	  fprintf (stderr,
		   "Error RegisterVirtualShapeCoverage spatialview2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -28;
      }

/* testing Vector Styles */
    xml = load_xml ("stazioni_se.xml", &len);
    if (xml == NULL)
	return -19;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -29;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -30;

/* Register Vector Styled Layer */
    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #1: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -31;
      }

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyledLayer('table1',  1)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -32;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_RegisterVectorStyledLayer('table2', 'Railway Stations')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -33;
      }
    free (hexBlob);

    xml = load_xml ("stazioni2_se.xml", &len);
    if (xml == NULL)
	return -31;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -35;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -36;

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #2: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -37;
      }

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyledLayer('table2', 2)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #3: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -38;
      }

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #3: %s\n\n",
		   "expected failure");
	  return -39;
      }

/* Reload Vector Style */
    sql = sqlite3_mprintf ("SELECT SE_ReloadVectorStyle(12, x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #1: %s\n\n",
		   "expected failure");
	  return -40;
      }

    sql = sqlite3_mprintf ("SELECT SE_ReloadVectorStyle(1, x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #2: %s\n\n",
		   "expected failure");
	  return -41;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_ReloadVectorStyle('Railway Stations', x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #4: %s\n\n",
		   "expected failure");
	  return -42;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_ReloadVectorStyle('Railway Stations', x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #5: %s\n\n",
		   "expected failure");
	  return -43;
      }
    free (hexBlob);

    xml = load_xml ("stazioni_se.xml", &len);
    if (xml == NULL)
	return -44;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -45;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -46;
    sql = sqlite3_mprintf ("SELECT SE_ReloadVectorStyle(1, x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #7: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -47;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_ReloadVectorStyle('Railway Stations 2', x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #8: %s\n\n",
		   "expected failure");
	  return -48;
      }
    free (hexBlob);

/* Unregister Vector Style */
    sql = sqlite3_mprintf ("SELECT SE_UnRegisterVectorStyle(5)");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #1: %s\n\n",
		   "expected failure");
	  return -49;
      }

    sql = sqlite3_mprintf ("SELECT SE_UnRegisterVectorStyle('alpha')");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #2: %s\n\n",
		   "expected failure");
	  return -50;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_UnRegisterVectorStyle('Railway Stations 2')");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #3: %s\n\n",
		   "expected failure");
	  return -51;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_UnRegisterVectorStyle('Railway Stations 2', 1)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #5: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -52;
      }

/* Register Vector Styled Layer: again */
    xml = load_xml ("stazioni2_se.xml", &len);
    if (xml == NULL)
	return -53;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -54;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -55;

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #3: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -56;
      }
    free (hexBlob);

    sql =
	sqlite3_mprintf
	("SELECT SE_RegisterVectorStyledLayer('table1', 'Railway Stations 2')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #5: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -57;
      }

/* Unregister Vector Style Layer */
    sql =
	sqlite3_mprintf
	("SELECT SE_UnRegisterVectorStyledLayer('table1', 'Railway Stations 2')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnregisterVectorStyledLayer #1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -58;
      }

    sql =
	sqlite3_mprintf ("SELECT SE_UnRegisterVectorStyledLayer('table1', 1)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnregisterVectorStyledLayer #2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -59;
      }

/* unregister External Graphic */
    sql = sqlite3_mprintf ("SELECT SE_UnRegisterExternalGraphic('url-A')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterExternalGraphic #1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -60;
      }
    sql = sqlite3_mprintf ("SELECT SE_UnRegisterExternalGraphic('jeroboam')");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterExternalGraphic #2: %s\n\n",
		   "expected failure");
	  return -61;
      }

    return 0;
}

static int
check_raster (sqlite3 * handle, void *cache)
................................................................................
		   "expected failure");
	  return -58;
      }

    return 0;
}

#endif
#endif

#ifdef ENABLE_RTTOPO		/* only is RTTOPO is supported */

static int
check_extent (sqlite3 * handle)
{
/* testing Vector Coverage Extents */
    int ret;
    char *err_msg = NULL;
    char *sql;
................................................................................
	  sqlite3_free (err_msg);
	  return -25;
      }

    return 0;
}

#endif

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    char *sql;
................................................................................
		   "Unexpected InitSpatialMetadata result: %i, (%s)\n", ret,
		   err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
#ifndef OMIT_ICONV		/* only if ICONV is supported */

/* creating the Styling Tables */
    sql = "SELECT CreateStylingTables(1)";
    ret = execute_check (handle, sql, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error CreateStylingTables %s\n\n", err_msg);
................................................................................
    if (ret != 0)
	return -200 - ret;

    ret = check_group (handle, cache);
    if (ret != 0)
	return -300 - ret;

#ifdef ENABLE_RTTOPO		/* only is RTTOPO is supported */
    ret = check_extent (handle);
    if (ret != 0)
	return -400 - ret;
#endif

#endif
#endif

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));







<
<
<







 







|
|
|
<


|




|
|
|
<


|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


<

<
<
<

|


|

<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|




|









|










|












|





|





|




|








|










|









|










|









|











|











|





|





|




|







|











|











|









|











|











|





|





|




|








|













|













|











|











|








|







 







<
<
<
<
<







 







<
<







 







<







 







<



<

<







76
77
78
79
80
81
82



83
84
85
86
87
88
89
...
266
267
268
269
270
271
272
273
274
275

276
277
278
279
280
281
282
283
284
285

286
287
288
289
290
291
292









































293
294

295



296
297
298
299
300
301







302





































































































303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
....
1451
1452
1453
1454
1455
1456
1457





1458
1459
1460
1461
1462
1463
1464
....
1749
1750
1751
1752
1753
1754
1755


1756
1757
1758
1759
1760
1761
1762
....
1786
1787
1788
1789
1790
1791
1792

1793
1794
1795
1796
1797
1798
1799
....
1809
1810
1811
1812
1813
1814
1815

1816
1817
1818

1819

1820
1821
1822
1823
1824
1825
1826
      }
    sqlite3_finalize (stmt);
    if (retcode == 1)
	return SQLITE_OK;
    return SQLITE_ERROR;
}




static unsigned char *
load_blob (const char *path, int *blob_len)
{
/* loading an external image */
    unsigned char *blob;
    int sz = 0;
    int rd;
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error AddGeometryColumn table2: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -15;
      }

/* registering two Vector Coverages */
    sql = "SELECT SE_RegisterVectorCoverage('table1', 'table1', 'geom')";
    ret = execute_check (handle, sql, &err_msg);

    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorCoverage table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -16;
      }
    sql =
	"SELECT SE_RegisterVectorCoverage('table2', 'table2', 'geom', 'title-2', 'abstract-2')";
    ret = execute_check (handle, sql, &err_msg);

    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorCoverage table2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -17;
      }









































    sql = "SELECT SE_SetVectorCoverageInfos('table1', 'title-1', 'abstract-1')";
    ret = execute_check (handle, sql, &err_msg);

    if (ret != SQLITE_OK)



      {
	  fprintf (stderr, "Error RegisterVectorCoverage table1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -18;
      }













































































































/* testing Vector Styles */
    xml = load_xml ("stazioni_se.xml", &len);
    if (xml == NULL)
	return -19;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -20;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -21;

/* Register Vector Styled Layer */
    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #1: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -22;
      }

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyledLayer('table1',  1)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -23;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_RegisterVectorStyledLayer('table2', 'Railway Stations')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -24;
      }
    free (hexBlob);

    xml = load_xml ("stazioni2_se.xml", &len);
    if (xml == NULL)
	return -25;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -26;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -27;

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #2: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -29;
      }

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyledLayer('table2', 2)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #3: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #3: %s\n\n",
		   "expected failure");
	  return -31;
      }

/* Reload Vector Style */
    sql = sqlite3_mprintf ("SELECT SE_ReloadVectorStyle(12, x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #1: %s\n\n",
		   "expected failure");
	  return -33;
      }

    sql = sqlite3_mprintf ("SELECT SE_ReloadVectorStyle(1, x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #2: %s\n\n",
		   "expected failure");
	  return -34;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_ReloadVectorStyle('Railway Stations', x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #4: %s\n\n",
		   "expected failure");
	  return -36;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_ReloadVectorStyle('Railway Stations', x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #5: %s\n\n",
		   "expected failure");
	  return -37;
      }
    free (hexBlob);

    xml = load_xml ("stazioni_se.xml", &len);
    if (xml == NULL)
	return -35;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -39;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -40;
    sql = sqlite3_mprintf ("SELECT SE_ReloadVectorStyle(1, x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #7: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -41;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_ReloadVectorStyle('Railway Stations 2', x%Q)", hexBlob);
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error ReloadVectorStyle #8: %s\n\n",
		   "expected failure");
	  return -42;
      }
    free (hexBlob);

/* Unregister Vector Style */
    sql = sqlite3_mprintf ("SELECT SE_UnRegisterVectorStyle(5)");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #1: %s\n\n",
		   "expected failure");
	  return -43;
      }

    sql = sqlite3_mprintf ("SELECT SE_UnRegisterVectorStyle('alpha')");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #2: %s\n\n",
		   "expected failure");
	  return -44;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_UnRegisterVectorStyle('Railway Stations 2')");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #3: %s\n\n",
		   "expected failure");
	  return -45;
      }

    sql =
	sqlite3_mprintf
	("SELECT SE_UnRegisterVectorStyle('Railway Stations 2', 1)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterVectorStyle #5: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -47;
      }

/* Register Vector Styled Layer: again */
    xml = load_xml ("stazioni2_se.xml", &len);
    if (xml == NULL)
	return -48;
    gaiaXmlToBlob (cache, xml, len, 1, NULL, &blob, &blob_len, NULL, NULL);
    free (xml);
    if (blob == NULL)
      {
	  fprintf (stderr, "this is not a well-formed XML !!!\n");
	  return -49;
      }
    hexBlob = build_hex_blob (blob, blob_len);
    free (blob);
    if (hexBlob == NULL)
	return -50;

    sql = sqlite3_mprintf ("SELECT SE_RegisterVectorStyle(x%Q)", hexBlob);
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyle #3: %s\n\n", err_msg);
	  sqlite3_free (err_msg);
	  return -51;
      }
    free (hexBlob);

    sql =
	sqlite3_mprintf
	("SELECT SE_RegisterVectorStyledLayer('table1', 'Railway Stations 2')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error RegisterVectorStyledLayer #5: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -53;
      }

/* Unregister Vector Style Layer */
    sql =
	sqlite3_mprintf
	("SELECT SE_UnRegisterVectorStyledLayer('table1', 'Railway Stations 2')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnregisterVectorStyledLayer #1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -54;
      }

    sql =
	sqlite3_mprintf ("SELECT SE_UnRegisterVectorStyledLayer('table1', 1)");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnregisterVectorStyledLayer #2: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -55;
      }

/* unregister External Graphic */
    sql = sqlite3_mprintf ("SELECT SE_UnRegisterExternalGraphic('url-A')");
    ret = execute_check (handle, sql, &err_msg);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterExternalGraphic #1: %s\n\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return -56;
      }
    sql = sqlite3_mprintf ("SELECT SE_UnRegisterExternalGraphic('jeroboam')");
    ret = execute_check (handle, sql, NULL);
    sqlite3_free (sql);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "Error UnRegisterExternalGraphic #2: %s\n\n",
		   "expected failure");
	  return -57;
      }

    return 0;
}

static int
check_raster (sqlite3 * handle, void *cache)
................................................................................
		   "expected failure");
	  return -58;
      }

    return 0;
}






static int
check_extent (sqlite3 * handle)
{
/* testing Vector Coverage Extents */
    int ret;
    char *err_msg = NULL;
    char *sql;
................................................................................
	  sqlite3_free (err_msg);
	  return -25;
      }

    return 0;
}



int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    char *sql;
................................................................................
		   "Unexpected InitSpatialMetadata result: %i, (%s)\n", ret,
		   err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */


/* creating the Styling Tables */
    sql = "SELECT CreateStylingTables(1)";
    ret = execute_check (handle, sql, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error CreateStylingTables %s\n\n", err_msg);
................................................................................
    if (ret != 0)
	return -200 - ret;

    ret = check_group (handle, cache);
    if (ret != 0)
	return -300 - ret;


    ret = check_extent (handle);
    if (ret != 0)
	return -400 - ret;



#endif

    ret = sqlite3_close (handle);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "sqlite3_close() error: %s\n",
		   sqlite3_errmsg (handle));

Deleted test/check_topology2d.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
/*

 check_topology2d.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

static int
do_level7_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: level 7 */
    int ret;
    char *err_msg = NULL;

/* testing RegisterTopoGeoCoverage */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateStylingTables(1)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateStylingTables() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -340;
	  return 0;
      }

/* testing RegisterTopoGeoCoverage - short form */
    ret =
	sqlite3_exec (handle,
		      "SELECT SE_RegisterTopoGeoCoverage('topo', 'topo')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SE_RegisterTopoGeoCoverage() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -341;
	  return 0;
      }

/* testing UnRegisterVectorCoverage */
    ret =
	sqlite3_exec (handle,
		      "SELECT SE_UnRegisterVectorCoverage('topo')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SE_RegisterVectorCoverage() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -342;
	  return 0;
      }

/* testing RegisterTopoGeoCoverage - long form */
    ret =
	sqlite3_exec (handle,
		      "SELECT SE_RegisterTopoGeoCoverage('topo', 'topo', 'title', 'abstract', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SE_RegisterTopoGeoCoverage() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -343;
	  return 0;
      }

    return 1;
}

static int
do_level6_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 6 */
    int ret;
    char *err_msg = NULL;

/* retrieving a Node by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNodeByPoint('topo', MakePoint(152, 160))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetNodeByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -300;
	  return 0;
      }

/* attempting to retrieve a Node by Point (two Nodes found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNodeByPoint('topo', MakePoint(152, 160), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNodeByPoint() #2: expected failure\n");
	  *retcode = -301;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more nodes found") != 0)
      {
	  fprintf (stderr, "GetNodeByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -302;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Node by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNodeByPoint('topo', MakePoint(1, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetNodeByPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -303;
	  return 0;
      }

/* retrieving an Edge by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetEdgeByPoint('topo', MakePoint(154, 167))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetEdgeByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -304;
	  return 0;
      }

/* attempting to retrieve an Edge by Point (two Edges found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetEdgeByPoint('topo', MakePoint(151, 159), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetEdgeByPoint() #2: expected failure\n");
	  *retcode = -305;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more edges found") != 0)
      {
	  fprintf (stderr, "GetEdgeByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -306;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve an Edge by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetEdgeByPoint('topo', MakePoint(1, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetEdgeByPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -307;
	  return 0;
      }

/* retrieving a Face by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetFaceByPoint('topo', MakePoint(153, 161))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetFaceByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -308;
	  return 0;
      }

/* attempting to retrieve a Face by Point (two Faces found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetFaceByPoint('topo', MakePoint(149, 149), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetFaceByPoint() #2: expected failure\n");
	  *retcode = -309;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more faces found") != 0)
      {
	  fprintf (stderr, "GetFaceByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -310;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Face by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetFaceByPoint('topo', MakePoint(1, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetFaceByPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -311;
	  return 0;
      }

/* adding four Points */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(10, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -312;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(25, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -313;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(50, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -314;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(100, -10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -315;
	  return 0;
      }

/* adding four Linestrings */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(10 -10, 100 -10)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -316;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(10 -25, 100 -25)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -317;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(10 -50, 100 -50)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -318;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(10 -100, 100 -100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -319;
	  return 0;
      }

/* adding four more Points */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(10, -100, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -320;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(25, -100, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -321;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(50, -100, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -322;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(100, -100, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -323;
	  return 0;
      }

/* adding five more Linestrings */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(10 -10, 10 -100)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -324;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(25 -10, 25 -100)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -325;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(50 -10, 50 -100)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -326;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(100 -10, 100 -100)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -327;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRING(10 -10, 100 -100)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #9 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -328;
	  return 0;
      }

/* adding two more Points (MultiPoint) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', GeomFromText('MULTIPOINT(130 -30, 90 -30)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -329;
	  return 0;
      }

/* adding five more Linestrings (MultiLinestring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('MULTILINESTRING((90 -30, 130 -30), "
		      "(90 -70, 130 -70), (90 -83, 130 -83), (90 -30, 90 -83), (130 -83, 130 -30))', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -330;
	  return 0;
      }

    return 1;
}

static int
do_level5_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 5 */
    int ret;
    char *err_msg = NULL;

/* inserting four Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-50, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #20 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -250;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-50, 20, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #21 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -251;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-50, 40, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #22 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -252;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-50, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #23 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -253;
	  return 0;
      }

/* inserting Edges */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 18, 19, GeomFromText('LINESTRING(-50 10,  -50 20)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #13 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -254;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 21, 20, GeomFromText('LINESTRING(-50 50,  -50 40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #14 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -255;
	  return 0;
      }

/* adding more Edges (ModFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 20, 19, GeomFromText('LINESTRING(-50 40, -50 20)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -256;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 18, 21, GeomFromText('LINESTRING(-50 10, -100 10, -100 50, -50 50)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -257;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 19, 20, GeomFromText('LINESTRING(-50 20, -80 20, -80 40, -50 40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #13 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -258;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 19, 20, GeomFromText('LINESTRING(-50 20, -30 20, -30 40, -50 40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #14 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -259;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 21, 18, GeomFromText('LINESTRING(-50 50, -10 50, -10 10, -50 10)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #15 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -260;
	  return 0;
      }

/* attempting to remove an Edge (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeModFace('topo', 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeModFace() #1: expected failure\n");
	  *retcode = -261;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_RemEdgeModFace() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -262;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove an Edge (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #1: expected failure\n");
	  *retcode = -263;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -264;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing an Edge (NewFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 17)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -265;
	  return 0;
      }

/* removing an Edge (NewFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 18)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -266;
	  return 0;
      }

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 14, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #1: expected failure\n");
	  *retcode = -267;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -268;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 333, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #2: expected failure\n");
	  *retcode = -269;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -270;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 14, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #1: expected failure\n");
	  *retcode = -271;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -272;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 333, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #2: expected failure\n");
	  *retcode = -273;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -274;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (no common Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 14, 13)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #3: expected failure\n");
	  *retcode = -275;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected edges") != 0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -276;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (no common Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 13, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #3: expected failure\n");
	  *retcode = -277;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected edges") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -278;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (other Edges connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 14, 16)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #4: expected failure\n");
	  *retcode = -280;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - other edges connected (19)") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -281;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (other Edges connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NeWEdgeHeal('topo', 16, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #4: expected failure\n");
	  *retcode = -282;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - other edges connected (19)") != 0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -283;
	  return 0;
      }
    sqlite3_free (err_msg);

/* healing Edges (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 14, 15)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -284;
	  return 0;
      }

/* healing Edges (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 13, 14)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -285;
	  return 0;
      }

/* removing an Edge (NewFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 20)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -286;
	  return 0;
      }

/* healing Edges (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 16, 19)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -287;
	  return 0;
      }

/* removing an Edge (ModFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeModFace('topo', 21)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeModFace() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -288;
	  return 0;
      }

/* removing a Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 18)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -289;
	  return 0;
      }

/* inserting two Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(99, 98, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #24 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -290;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(98, 99, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #25 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -291;
	  return 0;
      }

/* inserting an Isolated Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 22, 23, GeomFromText('LINESTRING(99 98, 98 99)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #15 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -292;
	  return 0;
      }

/* removing an Isolated Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoEdge('topo', 22)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoEdge() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -293;
	  return 0;
      }

    return 1;
}

static int
do_level4_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 4 */
    int ret;
    char *err_msg = NULL;

/* inserting three Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-40, -50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #16 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -150;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-49, -49, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #17 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -151;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-50, -40, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #18 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -152;
	  return 0;
      }

/* inserting an Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 14, 16, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -153;
	  return 0;
      }

/* moving a Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 15, MakePoint(-50, -50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -154;
	  return 0;
      }

/* attempting to move a Node (non-existing node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 333, MakePoint(-51, -51, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #2: expected failure\n");
	  *retcode = -155;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -156;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 15, MakePoint(-40, -50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #3: expected failure\n");
	  *retcode = -157;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -158;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (edge crosses node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 15, MakePoint(-45, -45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #4: expected failure\n");
	  *retcode = -159;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - edge crosses node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -160;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (non-isolated node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 14, MakePoint(-45, -45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #5: expected failure\n");
	  *retcode = -161;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -162;
	  return 0;
      }
    sqlite3_free (err_msg);

/* changing an Edge Geom */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRING(-40 -50, -40 -40, -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -163;
	  return 0;
      }

/* attempting to change en Edge Geom (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRING(-40 -50, -50 -30, -40 -30, -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #2: expected failure\n");
	  *retcode = -164;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -165;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (start geometry not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRING(-40 -51, -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #3: expected failure\n");
	  *retcode = -166;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -167;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (end geometry not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRING(-40 -50, -51 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #4: expected failure\n");
	  *retcode = -168;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -169;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (geometry crosses a node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRING(-40 -50, -50 -50, -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #5: expected failure\n");
	  *retcode = -170;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -171;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (non existing edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 111, GeomFromText('LINESTRING(-40 -50, -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #6: expected failure\n");
	  *retcode = -172;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 111") !=
	0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #6: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -173;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting yet another Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-44, -44, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #19 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -174;
	  return 0;
      }

/* inserting yet another Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 15, 17, GeomFromText('LINESTRING(-50 -50, -44 -44)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -175;
	  return 0;
      }

/* attempting to change en Edge Geom (geometry intersects an edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRING(-40 -50, -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #7: expected failure\n");
	  *retcode = -170;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 12")
	!= 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #7: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -171;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 15)", NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #1: expected failure\n");
	  *retcode = -172;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNode() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -173;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (not existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 155)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #2: expected failure\n");
	  *retcode = -174;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNode() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -175;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing a Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 5)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -176;
	  return 0;
      }

    return 1;
}

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 3 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(150, 150, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #9 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -70;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(180, 180, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }

/* inserting an Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 8, 9, GeomFromText('LINESTRING(150 150,  180 150, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -72;
	  return 0;
      }

/* adding an Edge (ModFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRING(150 150, 150 180, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }

/* testing Face Geometry */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -74;
	  return 0;
      }

/* attempting to test Face Geometry (non-existing face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 111)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #2: expected failure\n");
	  *retcode = -75;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent face.") != 0)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -76;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to test Face Geometry (universe face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #3: expected failure\n");
	  *retcode = -77;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - universal face has no geometry") != 0)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -78;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing Face Edges */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -79;
	  return 0;
      }

/* attempting to test Face Edges (non-existing face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 111)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -80;
	  return 0;
      }

/* attempting to test Face Edges (universe face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -80;
	  return 0;
      }

/* attempting to add an invalid Edge (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRING(150 150, 170 150, 160 150, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #2: expected failure\n");
	  *retcode = -84;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent start node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 18, 9, GeomFromText('LINESTRING(150 150, 150 180, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #3: expected failure\n");
	  *retcode = -85;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -86;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent end node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 19, GeomFromText('LINESTRING(150 150, 150 180, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #4: expected failure\n");
	  *retcode = -87;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -88;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (start node not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRING(151 150, 150 180, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #5: expected failure\n");
	  *retcode = -89;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (end node not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRING(150 150, 150 180, 181 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #6: expected failure\n");
	  *retcode = -91;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #6: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -92;
	  return 0;
      }
    sqlite3_free (err_msg);

/* adding an Edge (NewFaces) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 8, 9, GeomFromText('LINESTRING(150 150, 180 180)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }

/* inserting three Nodes within a Face */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(152, 160, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -94;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(154, 160, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -95;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', 3, MakePoint(152, 170, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -96;
	  return 0;
      }

/* inserting a Node within the other Face */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(178, 170, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #13 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -97;
	  return 0;
      }

/* attempting to add an invalid Node (node crosses edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(178, 178, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #14: expected failure\n");
	  *retcode = -98;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - edge crosses node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #14: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -99;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Node (not within face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', 3, MakePoint(179, 160, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #15: expected failure\n");
	  *retcode = -100;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not within face") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #15: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -101;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting an Edge within a Face */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 10, 11, GeomFromText('LINESTRING(152 160, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -102;
	  return 0;
      }

/* attempting to add an invalid Edge (nodes in different faces) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 12, 13, GeomFromText('LINESTRING(152 170, 178 170)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #9: expected failure\n");
	  *retcode = -103;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - nodes in different faces") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #9: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -104;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses a Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 10, 11, GeomFromText('LINESTRING(152 160, 152 170, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #7: expected failure\n");
	  *retcode = -105;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #7: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -106;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses an Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 10, 11, GeomFromText('LINESTRING(152 160, 153 161, 153 159, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #8: expected failure\n");
	  *retcode = -107;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 8")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #8: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -108;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (coincident Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 11, 10, GeomFromText('LINESTRING(154 160, 152 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #9: expected failure\n");
	  *retcode = -109;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident edge 8") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #9: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -110;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRING(152 160, 154 162, 152 162, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #2: expected failure\n");
	  *retcode = -111;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -112;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent start node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 18, 11, GeomFromText('LINESTRING(152 160, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #3: expected failure\n");
	  *retcode = -113;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -114;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent end node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 19, GeomFromText('LINESTRING(152 160, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #4: expected failure\n");
	  *retcode = -115;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -116;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (start node not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRING(52 160, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #5: expected failure\n");
	  *retcode = -117;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -118;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (end node not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRING(152 160, 54 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #6: expected failure\n");
	  *retcode = -119;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #6: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -120;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses a Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRING(152 160, 152 170, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #7: expected failure\n");
	  *retcode = -121;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #7: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -122;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses an Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRING(152 160, 153 161, 153 159, 154 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #8: expected failure\n");
	  *retcode = -123;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 8")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #8: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -124;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (coincident Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 11, 10, GeomFromText('LINESTRING(154 160, 152 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #9: expected failure\n");
	  *retcode = -125;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident edge 8") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #9: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }
    sqlite3_free (err_msg);

/* creating new Faces (hole) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 11, 10, GeomFromText('LINESTRING(154 160, 154 167, 152 167, 152 160)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -127;
	  return 0;
      }

/* attempting to add an invalid Edge (closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 13, 13, GeomFromText('LINESTRING(178 170, 178 161, 170 161, 178 170)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #10: expected failure\n");
	  *retcode = -128;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "Closed edges would not be isolated, try rtt_AddEdgeNewFaces") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #10: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -129;
	  return 0;
      }
    sqlite3_free (err_msg);

/* adding an Edge/Face (closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 13, 13, GeomFromText('LINESTRING(178 170, 178 161, 170 161, 178 170)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -130;
	  return 0;
      }

/* testing Face Geometry (Faces with internal hole) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -131;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -132;
	  return 0;
      }

/* testing Face Edges (Faces with internal hole) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -133;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -134;
	  return 0;
      }

    return 1;
}

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 2 */
    int ret;
    char *err_msg = NULL;

/* splitting an Edge (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePoint(0, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -50;
	  return 0;
      }

/* attempting to split an Edge (non-existent edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 100, MakePoint(0, 25, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #2: expected failure\n");
	  *retcode = -51;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -52;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (point not on edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 2, MakePoint(0, 25, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #3: expected failure\n");
	  *retcode = -53;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on edge") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -54;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePoint(0, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #4: expected failure\n");
	  *retcode = -55;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -56;
	  return 0;
      }
    sqlite3_free (err_msg);

/* splitting an Edge (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 2, MakePoint(0, 75, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }

/* attempting to split an Edge (non-existent edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 100, MakePoint(0, 25, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #2: expected failure\n");
	  *retcode = -58;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge") != 0)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (point not on edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 3, MakePoint(0, 25, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #3: expected failure\n");
	  *retcode = -60;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on edge") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 1, MakePoint(0, 50, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #4: expected failure\n");
	  *retcode = -62;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 1 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(0, 0, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -10;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(0, 100, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -11;
	  return 0;
      }

/* attempting to insert an invalid Edge (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRING(0 0, 0 90, 10 90, 10 80, 0 80, 0 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #1: expected failure\n");
	  *retcode = -12;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -13;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Edge (start node not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRING(1 0, 0 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #2: expected failure\n");
	  *retcode = -14;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -15;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Edge (end node not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRING(0 0, 1 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #3: expected failure\n");
	  *retcode = -16;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -17;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting an Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRING(0 0, 0 100)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -18;
	  return 0;
      }

/* attempting to insert an invalid Node (coincident) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(0, 0, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #3: expected failure\n");
	  *retcode = -19;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -20;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Node (edge crosses node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #4: expected failure\n");
	  *retcode = -21;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - edge crosses node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -22;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Node (not within face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', 1, MakePoint(10, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #5: expected failure\n");
	  *retcode = -23;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not within face") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -24;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting more Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(-1, 99, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -25;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(1, 101, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -26;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(1, 98, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -26;
	  return 0;
      }

/* attempting to insert an invalid Edge (geometry crosses a node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 3, 4, GeomFromText('LINESTRING(-1 99, 1 101)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #5: expected failure\n");
	  *retcode = -27;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -28;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Edge (geometry intersects an edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 3, 5, GeomFromText('LINESTRING(-1 99, 1 98)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #6: expected failure\n");
	  *retcode = -29;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 1")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #6: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -30;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 0 */
    int ret;
    char *err_msg = NULL;

/* attempting to insert a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: expected failure\n");
	  *retcode = -190;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -191;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: expected failure\n");
	  *retcode = -192;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -193;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 1, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -194;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -195;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 1, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -196;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -197;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 14, 16, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: expected failure\n");
	  *retcode = -198;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -199;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 14, 16, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: expected failure\n");
	  *retcode = -200;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -201;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: expected failure\n");
	  *retcode = -202;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -203;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: expected failure\n");
	  *retcode = -204;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -205;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -206;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModEdgeSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -207;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -208;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModEdgeSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -209;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 1, MakePoint(0, 10, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: expected failure\n");
	  *retcode = -210;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -211;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 1, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: expected failure\n");
	  *retcode = -212;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -213;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 1, 2, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: expected failure\n");
	  *retcode = -214;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -215;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: expected failure\n");
	  *retcode = -216;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -217;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 1, 2, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: expected failure\n");
	  *retcode = -218;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -221;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: expected failure\n");
	  *retcode = -220;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -221;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Point (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(1, 1, 3003), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: expected failure\n");
	  *retcode = -222;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -223;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Point (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(1, 1, 1, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: expected failure\n");
	  *retcode = -224;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -225;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Linestring (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLinestring('topo', GeomFromText('LINESTRING(-40 -50, -50 -40)', 3003), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: expected failure\n");
	  *retcode = -226;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -227;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Linestring (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLinestring('topo', GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: expected failure\n");
	  *retcode = -228;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -229;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    if (sqlite3_libversion_number () < 3008003)
      {
	  fprintf (stderr,
		   "*** check_topology2d skipped: libsqlite < 3.8.3 !!!\n");
	  goto end;
      }

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('topo', 4326, 0, 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* basic tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/* basic tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/* basic tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/* basic tests: level 3 */
    if (!do_level3_tests (handle, &retcode))
	goto end;

/* basic tests: level 4 */
    if (!do_level4_tests (handle, &retcode))
	goto end;

/* basic tests: level 5 */
    if (!do_level5_tests (handle, &retcode))
	goto end;

/* basic tests: level 6 */
    if (!do_level6_tests (handle, &retcode))
	goto end;

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */

/* testing RegisterTopoGeoCoverage */
    if (!do_level7_tests (handle, &retcode))
	goto end;

#endif

/* dropping the Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT DropTopology('topo')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DropTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/check_topology3d.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
/*

 check_topology3d.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

static int
do_level6_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 6 */
    int ret;
    char *err_msg = NULL;

/* retrieving a Node by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNodeByPoint('topo', MakePointZ(152, 160, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetNodeByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -300;
	  return 0;
      }

/* attempting to retrieve a Node by Point (two Nodes found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNodeByPoint('topo', MakePoint(152, 160), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetNodeByPoint() #2: expected failure\n");
	  *retcode = -301;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more nodes found") != 0)
      {
	  fprintf (stderr, "GetNodeByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -302;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Node by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetNodeByPoint('topo', MakePoint(1, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetNodeByPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -303;
	  return 0;
      }

/* retrieving an Edge by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetEdgeByPoint('topo', MakePointZ(154, 167, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetEdgeByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -304;
	  return 0;
      }

/* attempting to retrieve an Edge by Point (two Edges found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetEdgeByPoint('topo', MakePoint(151, 159), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetEdgeByPoint() #2: expected failure\n");
	  *retcode = -305;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more edges found") != 0)
      {
	  fprintf (stderr, "GetEdgeByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -306;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve an Edge by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetEdgeByPoint('topo', MakePoint(1, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetEdgeByPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -307;
	  return 0;
      }

/* retrieving a Face by Point */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetFaceByPoint('topo', MakePoint(153, 161))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetFaceByPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -308;
	  return 0;
      }

/* attempting to retrieve a Face by Point (two Faces found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetFaceByPoint('topo', MakePoint(149, 149), 3.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "GetFaceByPoint() #2: expected failure\n");
	  *retcode = -309;
	  return 0;
      }
    if (strcmp (err_msg, "Two or more faces found") != 0)
      {
	  fprintf (stderr, "GetFaceByPoint() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -310;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to retrieve a Face by Point (not found) */
    ret =
	sqlite3_exec (handle,
		      "SELECT GetFaceByPoint('topo', MakePointZ(1, 1, 1))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetFaceByPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -311;
	  return 0;
      }

/* adding four Points */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(10, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -312;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(25, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -313;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(50, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -314;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(100, -10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -315;
	  return 0;
      }

/* adding four Linestrings */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(10 -10 1, 100 -10 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -316;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(10 -25 1, 100 -25 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -317;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(10 -50 1, 100 -50 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -318;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(10 -100 1, 100 -100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -319;
	  return 0;
      }

/* adding four more Points */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(10, -100, 1, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -320;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(25, -100, 1, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -321;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(50, -100, 1, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -322;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(100, -100, 1, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -323;
	  return 0;
      }

/* adding five more Linestrings */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(10 -10 1, 10 -100 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -324;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(25 -10 1, 25 -100 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -325;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(50 -10 1, 50 -100 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -326;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(100 -10 1, 100 -100 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -327;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('LINESTRINGZ(10 -10 1, 100 -100 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #9 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -328;
	  return 0;
      }

/* adding two more Points (MultiPoint) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', GeomFromText('MULTIPOINTZ(130 -30 1, 90 -30 1)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddPoint() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -329;
	  return 0;
      }

/* adding five more Linestrings (MultiLinestring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineString('topo', GeomFromText('MULTILINESTRINGZ((90 -30 1, 130 -30 1), "
		      "(90 -70 1, 130 -70 1), (90 -83 1, 130 -83 1), (90 -30 1, 90 -83 1), (130 -83 1, 130 -30 1))', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineString() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -330;
	  return 0;
      }

    return 1;
}

static int
do_level5_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 5 */
    int ret;
    char *err_msg = NULL;

/* inserting four Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-50, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #20 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -250;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-50, 20, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #21 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -251;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-50, 40, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #22 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -252;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-50, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #23 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -253;
	  return 0;
      }

/* inserting Edges */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 18, 19, GeomFromText('LINESTRINGZ(-50 10 1,  -50 20 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #13 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -254;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 21, 20, GeomFromText('LINESTRINGZ(-50 50 1,  -50 40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #14 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -255;
	  return 0;
      }

/* adding more Edges (ModFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 20, 19, GeomFromText('LINESTRINGZ(-50 40 1, -50 20 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -256;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 18, 21, GeomFromText('LINESTRINGZ(-50 10 1, -100 10 1, -100 50 1, -50 50 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -257;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 19, 20, GeomFromText('LINESTRINGZ(-50 20 1, -80 20 1, -80 40 1, -50 40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #13 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -258;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 19, 20, GeomFromText('LINESTRINGZ(-50 20 1, -30 20 1, -30 40 1, -50 40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #14 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -259;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 21, 18, GeomFromText('LINESTRINGZ(-50 50 1, -10 50 1, -10 10 1, -50 10 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #15 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -260;
	  return 0;
      }

/* attempting to remove an Edge (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeModFace('topo', 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeModFace() #1: expected failure\n");
	  *retcode = -261;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_RemEdgeModFace() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -262;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove an Edge (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #1: expected failure\n");
	  *retcode = -263;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #1: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -264;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing an Edge (NewFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 17)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -265;
	  return 0;
      }

/* removing an Edge (NewFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 18)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -266;
	  return 0;
      }

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 14, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #1: expected failure\n");
	  *retcode = -267;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -268;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 333, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #2: expected failure\n");
	  *retcode = -269;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -270;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 14, 333)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #1: expected failure\n");
	  *retcode = -271;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -272;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (non-existing Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 333, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #2: expected failure\n");
	  *retcode = -273;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 333") !=
	0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -274;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (no common Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 14, 13)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #3: expected failure\n");
	  *retcode = -275;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected edges") != 0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -276;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (no common Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 13, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #3: expected failure\n");
	  *retcode = -277;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-connected edges") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -278;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (other Edges connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 14, 16)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #4: expected failure\n");
	  *retcode = -280;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - other edges connected (19)") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -281;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to heal Edges (other Edges connected) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NeWEdgeHeal('topo', 16, 14)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #4: expected failure\n");
	  *retcode = -282;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - other edges connected (19)") != 0)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -283;
	  return 0;
      }
    sqlite3_free (err_msg);

/* healing Edges (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeHeal('topo', 14, 15)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeHeal() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -284;
	  return 0;
      }

/* healing Edges (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 13, 14)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -285;
	  return 0;
      }

/* removing an Edge (NewFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeNewFace('topo', 20)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeNewFace() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -286;
	  return 0;
      }

/* healing Edges (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgeHeal('topo', 16, 19)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeHeal() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -287;
	  return 0;
      }

/* removing an Edge (ModFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemEdgeModFace('topo', 21)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemEdgeModFace() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -288;
	  return 0;
      }

/* removing a Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 18)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -289;
	  return 0;
      }

    return 1;
}

static int
do_level4_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 4 */
    int ret;
    char *err_msg = NULL;

/* inserting three Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-40, -50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #16 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -150;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-49, -49, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #17 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -151;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-50, -40, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #18 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -152;
	  return 0;
      }

/* inserting an Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 14, 16, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -153;
	  return 0;
      }

/* moving a Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 15, MakePointZ(-50, -50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -154;
	  return 0;
      }

/* attempting to move a Node (non-existing node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 333, MakePointZ(-51, -51, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #2: expected failure\n");
	  *retcode = -155;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -156;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 15, MakePointZ(-40, -50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #3: expected failure\n");
	  *retcode = -157;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -158;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (edge crosses node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 15, MakePointZ(-45, -45, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #4: expected failure\n");
	  *retcode = -159;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - edge crosses node.") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -160;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (non-isolated node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 14, MakePointZ(-45, -45, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #5: expected failure\n");
	  *retcode = -161;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node") != 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -162;
	  return 0;
      }
    sqlite3_free (err_msg);

/* changing an Edge Geom */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRINGZ(-40 -50 1, -40 -40 1, -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -163;
	  return 0;
      }

/* attempting to change en Edge Geom (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRINGZ(-40 -50 1, -50 -30 1, -40 -30 1, -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #2: expected failure\n");
	  *retcode = -164;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -165;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (start geometry not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRINGZ(-40 -51 1, -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #3: expected failure\n");
	  *retcode = -166;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -167;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (end geometry not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRINGZ(-40 -50 1, -51 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #4: expected failure\n");
	  *retcode = -168;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -169;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (geometry crosses a node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRINGZ(-40 -50 1, -50 -50 1, -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #5: expected failure\n");
	  *retcode = -170;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -171;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change en Edge Geom (non existing edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 111, GeomFromText('LINESTRINGZ(-40 -50 1, -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #6: expected failure\n");
	  *retcode = -172;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge 111") !=
	0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #6: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -173;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting yet another Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-44, -44, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #19 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -174;
	  return 0;
      }

/* inserting yet another Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 15, 17, GeomFromText('LINESTRINGZ(-50 -50 1, -44 -44 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -175;
	  return 0;
      }

/* attempting to change en Edge Geom (geometry intersects an edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 11, GeomFromText('LINESTRINGZ(-40 -50 1, -50 -40 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #7: expected failure\n");
	  *retcode = -170;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 12")
	!= 0)
      {
	  fprintf (stderr, "ST_ChangeEdgeGeom() #7: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -171;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (non-isolated) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 15)", NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #1: expected failure\n");
	  *retcode = -172;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not isolated node") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNode() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -173;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a Node (not existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 155)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #2: expected failure\n");
	  *retcode = -174;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_RemIsoNode() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -175;
	  return 0;
      }
    sqlite3_free (err_msg);

/* removing a Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_RemIsoNode('topo', 5)", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_RemIsoNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -176;
	  return 0;
      }

    return 1;
}

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 3 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(150, 150, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #9 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -70;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(180, 180, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }

/* inserting an Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 8, 9, GeomFromText('LINESTRINGZ(150 150 1,  180 150 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -72;
	  return 0;
      }

/* adding an Edge (ModFace) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRINGZ(150 150 1, 150 180 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }

/* testing Face Geometry */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -74;
	  return 0;
      }

/* attempting to test Face Geometry (non-existing face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 111)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #2: expected failure\n");
	  *retcode = -75;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent face.") != 0)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -76;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to test Face Geometry (universe face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #3: expected failure\n");
	  *retcode = -77;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - universal face has no geometry") != 0)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -78;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing Face Edges */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -79;
	  return 0;
      }

/* attempting to add an invalid Edge (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRINGZ(150 150 1, 170 150 1, 160 150 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #2: expected failure\n");
	  *retcode = -80;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent start node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 18, 9, GeomFromText('LINESTRINGZ(150 150 1, 150 180 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #3: expected failure\n");
	  *retcode = -82;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -83;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent end node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 19, GeomFromText('LINESTRINGZ(150 150 1, 150 180 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #4: expected failure\n");
	  *retcode = -84;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -85;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (start node not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRINGZ(151 150 1, 150 180 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #5: expected failure\n");
	  *retcode = -86;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -87;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (end node not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 8, 9, GeomFromText('LINESTRINGZ(150 150 1, 150 180 1, 181 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #6: expected failure\n");
	  *retcode = -88;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #6: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -89;
	  return 0;
      }
    sqlite3_free (err_msg);

/* adding an Edge (NewFaces) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 8, 9, GeomFromText('LINESTRINGZ(150 150 1, 180 180 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }

/* inserting three Nodes within a Face */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(152, 160, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #11 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(154, 160, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -92;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', 3, MakePointZ(152, 170, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #12 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }

/* inserting a Node within the other Face */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(178, 170, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #13 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -94;
	  return 0;
      }

/* attempting to add an invalid Node (node crosses edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(178, 178, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #14: expected failure\n");
	  *retcode = -95;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - edge crosses node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #14: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -96;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Node (not within face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', 3, MakePointZ(179, 160, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #15: expected failure\n");
	  *retcode = -97;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not within face") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #15: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -98;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting an Edge within a Face */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -99;
	  return 0;
      }

/* attempting to add an invalid Edge (nodes in different faces) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 12, 13, GeomFromText('LINESTRINGZ(152 170 1, 178 170 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #9: expected failure\n");
	  *retcode = -100;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - nodes in different faces") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #9: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -101;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses a Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 152 170 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #7: expected failure\n");
	  *retcode = -102;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #7: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -103;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses an Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 153 161 1, 153 159 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #8: expected failure\n");
	  *retcode = -104;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 8")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #8: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -105;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (coincident Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 11, 10, GeomFromText('LINESTRINGZ(154 160 1, 152 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #9: expected failure\n");
	  *retcode = -106;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident edge 8") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #9: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -107;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 154 162 1, 152 162 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #2: expected failure\n");
	  *retcode = -108;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -109;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent start node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 18, 11, GeomFromText('LINESTRINGZ(152 160 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #3: expected failure\n");
	  *retcode = -110;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -111;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (non-existent end node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 19, GeomFromText('LINESTRINGZ(152 160 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #4: expected failure\n");
	  *retcode = -112;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent node") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -113;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (start node not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRINGZ(52 160 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #5: expected failure\n");
	  *retcode = -114;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #5: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -115;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (end node not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 54 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #6: expected failure\n");
	  *retcode = -116;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #6: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -117;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses a Node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 152 170 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #7: expected failure\n");
	  *retcode = -118;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #7: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -119;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (geometry crosses an Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 10, 11, GeomFromText('LINESTRINGZ(152 160 1, 153 161 1, 153 159 1, 154 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #8: expected failure\n");
	  *retcode = -120;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 8")
	!= 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #8: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -121;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an invalid Edge (coincident Edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 11, 10, GeomFromText('LINESTRINGZ(154 160 1, 152 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #9: expected failure\n");
	  *retcode = -122;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident edge 8") != 0)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #9: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -123;
	  return 0;
      }
    sqlite3_free (err_msg);

/* creating new Faces (hole) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 11, 10, GeomFromText('LINESTRINGZ(154 160 1, 154 167 1, 152 167 1, 152 160 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -124;
	  return 0;
      }

/* attempting to add an invalid Edge (closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 13, 13, GeomFromText('LINESTRINGZ(178 170 1, 178 161 1, 170 161 1, 178 170 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #10: expected failure\n");
	  *retcode = -125;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "Closed edges would not be isolated, try rtt_AddEdgeNewFaces") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #10: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }
    sqlite3_free (err_msg);

/* adding an Edge/Face (closed ring) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 13, 13, GeomFromText('LINESTRINGZ(178 170 1, 178 161 1, 170 161 1, 178 170 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeModFace() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -127;
	  return 0;
      }

/* testing Face Geometry (Faces with internal hole) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -128;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceGeometry('topo', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceGeometry() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -129;
	  return 0;
      }

/* testing Face Edges (Faces with internal hole) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 4)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -130;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_GetFaceEdges('topo', 6)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_GetFaceEdges() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -131;
	  return 0;
      }

    return 1;
}

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 2 */
    int ret;
    char *err_msg = NULL;

/* splitting an Edge (Mod) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePointZ(0, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -50;
	  return 0;
      }

/* attempting to split an Edge (non-existent edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 100, MakePointZ(0, 25, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #2: expected failure\n");
	  *retcode = -51;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -52;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (point not on edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 2, MakePointZ(0, 25, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #3: expected failure\n");
	  *retcode = -53;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on edge") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -54;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePointZ(0, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #4: expected failure\n");
	  *retcode = -55;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -56;
	  return 0;
      }
    sqlite3_free (err_msg);

/* splitting an Edge (New) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 2, MakePointZ(0, 75, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgeSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }

/* attempting to split an Edge (non-existent edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 100, MakePointZ(0, 25, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #2: expected failure\n");
	  *retcode = -58;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-existent edge") != 0)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #2: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (point not on edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 3, MakePointZ(0, 25, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #3: expected failure\n");
	  *retcode = -60;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - point not on edge") != 0)
      {
	  fprintf (stderr, "ST_ModEdgeSplit() #3: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (coincident node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 1, MakePointZ(0, 50, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #4: expected failure\n");
	  *retcode = -62;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_NewEdgesSplit() #4: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 1 */
    int ret;
    char *err_msg = NULL;

/* inserting a first Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(0, 0, 2, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -10;
	  return 0;
      }

/* inserting a second Node */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(0, 100, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -11;
	  return 0;
      }

/* attempting to insert an invalid Edge (curve not simple) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRINGZ(0 0 1, 0 90 1, 10 90 1, 10 80 1, 0 80 1, 0 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #1: expected failure\n");
	  *retcode = -12;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - curve not simple") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #1: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -13;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Edge (start node not geometry start point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRINGZ(1 0 1, 0 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #2: expected failure\n");
	  *retcode = -14;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - start node not geometry start point.") !=
	0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -15;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Edge (end node not geometry end point) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRINGZ(0 0 1, 1 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #3: expected failure\n");
	  *retcode = -16;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - end node not geometry end point.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -17;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting an Edge */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 1, 2, GeomFromText('LINESTRINGZ(0 0 1, 0 100 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -18;
	  return 0;
      }

/* attempting to insert an invalid Node (coincident) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(0, 0, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #3: expected failure\n");
	  *retcode = -19;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - coincident node") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #3: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -20;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Node (edge crosses node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(0, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #4: expected failure\n");
	  *retcode = -21;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - edge crosses node.") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #4: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -22;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Node (not within face) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', 1, MakePointZ(10, 10, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #5: expected failure\n");
	  *retcode = -23;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - not within face") != 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -24;
	  return 0;
      }
    sqlite3_free (err_msg);

/* inserting more Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(-1, 99, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -25;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(1, 101, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -26;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(1, 98, 1, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -26;
	  return 0;
      }

/* attempting to insert an invalid Edge (geometry crosses a node) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 3, 4, GeomFromText('LINESTRINGZ(-1 99 1, 1 101 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #5: expected failure\n");
	  *retcode = -27;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses a node")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #5: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -28;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert an invalid Edge (geometry intersects an edge) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 3, 5, GeomFromText('LINESTRINGZ(-1 99 1, 1 98 1)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #6: expected failure\n");
	  *retcode = -29;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - geometry crosses edge 1")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #6: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -30;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 0 */
    int ret;
    char *err_msg = NULL;

/* attempting to insert a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: expected failure\n");
	  *retcode = -190;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -191;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to insert a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('topo', NULL, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: expected failure\n");
	  *retcode = -192;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -193;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -194;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -195;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to move a Node (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_MoveIsoNode('topo', 1, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -196;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -197;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 14, 16, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: expected failure\n");
	  *retcode = -198;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -199;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('topo', 14, 16, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: expected failure\n");
	  *retcode = -200;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "ST_AddIsoEdge() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -201;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 1, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: expected failure\n");
	  *retcode = -202;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -203;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to change an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ChangeEdgeGeom('topo', 1, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: expected failure\n");
	  *retcode = -204;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ChangeEdgeGeom() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -205;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -206;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModEdgeSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -207;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ModEdgeSplit('topo', 1, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_MoveIsoNode() invalid SRID: expected failure\n");
	  *retcode = -208;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_ModEdgeSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -209;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 1, MakePointZ(0, 10, 1, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: expected failure\n");
	  *retcode = -210;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -211;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to split an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_NewEdgesSplit('topo', 1, MakePoint(0, 10, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: expected failure\n");
	  *retcode = -212;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_NewEdgesSplit() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -213;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: expected failure\n");
	  *retcode = -214;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -215;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeModFace('topo', 1, 2, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: expected failure\n");
	  *retcode = -216;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeModFace() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -217;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 1, 2, GeomFromText('LINESTRINGZ(-40 -50 1,  -50 -40 2)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: expected failure\n");
	  *retcode = -218;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -221;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add an Edge (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('topo', 1, 2, GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: expected failure\n");
	  *retcode = -220;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_AddEdgeNewFaces() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -221;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Point (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePointZ(1, 1, 1, 3003), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: expected failure\n");
	  *retcode = -222;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -223;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Point (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddPoint('topo', MakePoint(1, 1, 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: expected failure\n");
	  *retcode = -224;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddPoint() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -225;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Linestring (invalid SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLinestring('topo', GeomFromText('LINESTRINGZ(-40 -50 1, -50 -40 1)', 3003), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: expected failure\n");
	  *retcode = -226;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -227;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to add a Linestring (invalid DIMs) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLinestring('topo', GeomFromText('LINESTRING(-40 -50,  -50 -40)', 4326), 0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: expected failure\n");
	  *retcode = -228;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLinestring() invalid SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -229;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    if (sqlite3_libversion_number () < 3008003)
      {
	  fprintf (stderr,
		   "*** check_topology3d skipped: libsqlite < 3.8.3 !!!\n");
	  goto end;
      }

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating a Topology 3D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('topo', 4326, 1, 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* basic tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/* basic tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/* basic tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/* basic tests: level 3 */
    if (!do_level3_tests (handle, &retcode))
	goto end;

/* basic tests: level 4 */
    if (!do_level4_tests (handle, &retcode))
	goto end;

/* basic tests: level 5 */
    if (!do_level5_tests (handle, &retcode))
	goto end;

/* basic tests: level 6 */
    if (!do_level6_tests (handle, &retcode))
	goto end;

/* dropping the Topology 3D */
    ret =
	sqlite3_exec (handle, "SELECT DropTopology('topo')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DropTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/check_toponoface2d.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
/*

 check_toponoface2d.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2016
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
#ifndef OMIT_ICONV		/* only if ICONV is enabled */

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 0 tests */
    int ret;
    char *err_msg = NULL;

/* building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('topo')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -50;
	  return 0;
      }

/* adding four Linestrings forming a Rectangle */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-150 80, 150 80)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-150 -80, 150 -80)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -52;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-150 80, -150 -80)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #3 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -53;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(150 80, 150 -80)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNpFace() #4 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -54;
	  return 0;
      }

/* adding a closed Linestring */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-10 10, 10 10, 10 -10, -10 -10, -10 10)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #4 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -55;
	  return 0;
      }

/* adding a self-intersecting and closed Linestring */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-120 -70, 120 70, -120 70, 120 -70, -120 -70)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #5 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -56;
	  return 0;
      }

/* adding a first MultiLinestring */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('MULTILINESTRING("
		      "(-180 90, 180 90), (-180 80, 180 80), (-180 70, 180 70), (-180 60, 180 60), "
		      "(-180 50, 180 50), (-180 40, 180 40), (-180 30, 180 30), (-180 20, 180 20), "
		      "(-180 10, 180 10), (-180 0, 180 0), (-180 -10, 180 -10), (-180 -20, 180 -20), "
		      "(-180 -30, 180 -30), (-180 -40, 180 -40), (-180 -50, 180 -50), "
		      "(-180 -60, 180 -60), (-180 -70, 180 -70), (-180 -80, 180 -80), "
		      "(-180 -90, 180 -90))', 4326))", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #6 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }

/* adding a second MultiLinestring */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('MULTILINESTRING("
		      "(-180 90, -180 -90), (-170 90, -170 -90), (-160 90, -160 -90), "
		      "(-150 90, -150 -90), (-140 90, -140 -90), (-130 90, -130 -90), "
		      "(-120 90, -120 -90), (-110 90, -110 -90), (-100 90, -100 -90), "
		      "(-90 90, -90 -90), (-80 90, -80 -90), (-70 90, -70 -90), (-60 90, -60 -90), "
		      "(-50 90, -50 -90), (-40 90, -40 -90), (-30 90, -30 -90), (-20 90, -20 -90), "
		      "(-10 90, -10 -90), (0 90, 0 -90), (10 90, 10 -90), (20 90, 20 -90), "
		      "(30 90, 30 -90), (40 90, 40 -90), (50 90, 50 -90), (60 90, 60 -90), "
		      "(70 90, 70 -90), (80 90, 80 -90), (90 90, 90 -90), (100 90, 100 -90), "
		      "(110 90, 110  -90), (120 90, 120 -90), (130 90, 130 -90), "
		      "(140 90, 140 -90), (150 90, 150 -90), (160 90, 160 -90), "
		      "(170 90, 170 -90), (180 90, 180 -90))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #7 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -58;
	  return 0;
      }

/* building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('topo')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -59;
	  return 0;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 1 tests */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int invalid = 0;

/* adding more  closed Linestrings */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-175 85, -165 85, -165 75, -175 75, -175 85)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #8 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -60;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-175 -85, -165 -85, -165 -75, -175 -75, -175 -85)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #9 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(175 85, 165 85, 165 75, 175 75, 175 85)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #10 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(175 -85, 165 -85, 165 -75, 175 -75, 175 -85)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLineStringNoFace() #11 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }

/* re-building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('topo')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -64;
	  return 0;
      }

/* re-building Faces - conditional mode */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('topo')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -65;
	  return 0;
      }

/* unconditionally re-building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('topo', 1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -65;
	  return 0;
      }

/* validating this TopoGeo */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('topo')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() #1: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -66;
	  return 0;
      }

/* testing for a valid TopoGeo */
    ret =
	sqlite3_get_table (handle, "SELECT Count(*) FROM topo_validate_topogeo",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "test ValidateTopoGeo() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -67;
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      invalid = 1;
      }
    sqlite3_free_table (results);
    if (invalid)
      {
	  fprintf (stderr, "Topology 'topo' is invalid !!!");
	  *retcode = -68;
	  return 0;
      }

    return 1;
}

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 2 tests */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int invalid = 0;

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('elba', 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode = -70;
	  return 0;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFace('elba', NULL, 'elba_pg', NULL, 512)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFace() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }

/* loading a Linestring GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFace('elba', NULL, 'elba_ln', NULL, 512)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFace() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -72;
	  return 0;
      }

/* building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('elba')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }

/* validating this TopoGeo */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('elba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() #2: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -74;
	  return 0;
      }

/* testing for a valid TopoGeo */
    ret =
	sqlite3_get_table (handle, "SELECT Count(*) FROM elba_validate_topogeo",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "test ValidateTopoGeo() #2: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -75;
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      invalid = 1;
      }
    sqlite3_free_table (results);
    if (invalid)
      {
	  fprintf (stderr, "Topology 'elba' is invalid !!!");
	  *retcode = -76;
	  return 0;
      }

    return 1;
}

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 3 tests */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int invalid = 0;

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('elbaext', 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  *retcode = -80;
	  return 0;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFaceExt('elbaext', NULL, 'elba_pg', NULL, 'dustbin', 'dustbinview', 512)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFaceExt() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }

/* loading a Linestring GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFaceExt('elbaext', NULL, 'elba_ln', NULL, 'dustbin2', 'dustbinview2', 512)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFaceExt() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -92;
	  return 0;
      }

/* building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('elbaext')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -83;
	  return 0;
      }

/* validating this TopoGeo */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('elbaext')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() #3: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -84;
	  return 0;
      }

/* testing for a valid TopoGeo */
    ret =
	sqlite3_get_table (handle,
			   "SELECT Count(*) FROM elbaext_validate_topogeo",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "test ValidateTopoGeo() #3: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -85;
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      invalid = 1;
      }
    sqlite3_free_table (results);
    if (invalid)
      {
	  fprintf (stderr, "Topology 'elbaext' is invalid !!!");
	  *retcode = -86;
	  return 0;
      }

    return 1;
}

static int
do_level4_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 4 tests - INVALID CASES */
    int ret;
    char *err_msg = NULL;

/* adding a Linestring - wrong SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRING(-150 80, 150 80)', 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLineStringNoFace() #12 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLineStringNoFace() #12 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }
    sqlite3_free (err_msg);

/* adding a Linestring - wrong dimensions */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('LINESTRINGZ(-150 80 10, 150 80 20)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLineStringNoFace() #13 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -92;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLineStringNoFace() #13 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }
    sqlite3_free (err_msg);

/* adding a Point - wrong type */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_AddLineStringNoFace('topo', GeomFromText('POINT(-150 80)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLineStringNoFace() #13 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -94;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid argument.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_AddLineStringNoFace() #13 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -95;
	  return 0;
      }
    sqlite3_free (err_msg);

/* loading a Polygon GeoTable - not existing */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFace('elba', NULL, 'elba_wannabe', NULL, 512)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFace() #3 - unexpected success\n");
	  *retcode = -96;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid input GeoTable.")
	!= 0)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFace() #3 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -96;
	  return 0;
      }
    sqlite3_free (err_msg);

/* loading a Polygon GeoTable - invalid dimensions */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFace('elba', NULL, 'merano', NULL, 512)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFace() #4 - unexpected success\n");
	  *retcode = -97;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFace() #4 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -99;
	  return 0;
      }
    sqlite3_free (err_msg);

/* loading a Polygon GeoTable Extended - not existing */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFaceExt('elbaext', NULL, 'elba_wannabe', NULL, 'dustbin5', 'dustbinview5', 512)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFaceExt() #3 - unexpected success\n");
	  *retcode = -100;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid input GeoTable.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFaceExt() #3 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -101;
	  return 0;
      }
    sqlite3_free (err_msg);

/* loading a Polygon GeoTable Extended - invalid dimensions */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFaceExt('elbaext', NULL, 'merano', NULL, 'dustbin6', 'dustbinview6', 512)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFaceExt() #4 - unexpected success\n");
	  *retcode = -102;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFaceExt() #4 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -103;
	  return 0;
      }
    sqlite3_free (err_msg);

/* loading a Linestring GeoTable Extended - already existing dustbin view */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFaceExt('elbaext', NULL, 'elba_ln', NULL, 'dustbin7', 'dustbinview', 512)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFaceExt() #4 unexpected success\n");
	  *retcode = -104;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - unable to create the dustbin view.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableNoFaceExt() #4 - unexpected: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -105;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif
#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
#ifndef OMIT_ICONV		/* only if ICONV is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();
    char *old_SPATIALITE_SECURITY_ENV = NULL;
#ifdef _WIN32
    char *env;
#endif /* not WIN32 */

    old_SPATIALITE_SECURITY_ENV = getenv ("SPATIALITE_SECURITY");
#ifdef _WIN32
    putenv ("SPATIALITE_SECURITY=relaxed");
#else /* not WIN32 */
    setenv ("SPATIALITE_SECURITY", "relaxed", 1);
#endif

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    if (sqlite3_libversion_number () < 3008003)
      {
	  fprintf (stderr,
		   "*** check_toponoface2d skipped: libsqlite < 3.8.3 !!!\n");
	  goto end;
      }

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateTopology('topo', 4326, 0, 0.000001)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* importing Elba (polygons) from SHP */
    ret =
	sqlite3_exec (handle,
		      "SELECT ImportSHP('./elba-pg', 'elba_pg', 'CP1252', 32632)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ImportSHP() elba-pg error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

/* importing Elba (linestrings) from SHP */
    ret =
	sqlite3_exec (handle,
		      "SELECT ImportSHP('./elba-ln', 'elba_ln', 'CP1252', 32632)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ImportSHP() elba-ln error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -6;
      }

/* importing Merano Roads (linestrings) from SHP */
    ret =
	sqlite3_exec (handle,
		      "SELECT ImportSHP('./shp/merano-3d/polygons', 'merano', 'UTF-8', 32632)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ImportSHP() roads error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }

    if (old_SPATIALITE_SECURITY_ENV)
      {
#ifdef _WIN32
	  env =
	      sqlite3_mprintf ("SPATIALITE_SECURITY=%s",
			       old_SPATIALITE_SECURITY_ENV);
	  putenv (env);
	  sqlite3_free (env);
#else /* not WIN32 */
	  setenv ("SPATIALITE_SECURITY", old_SPATIALITE_SECURITY_ENV, 1);
#endif
      }
    else
      {
#ifdef _WIN32
	  putenv ("SPATIALITE_SECURITY=");
#else /* not WIN32 */
	  unsetenv ("SPATIALITE_SECURITY");
#endif
      }

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('elba', 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -8;
      }

/*tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/*tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/*tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/*tests: level 3 */
    if (!do_level3_tests (handle, &retcode))
	goto end;

/*tests: level 4 */
    if (!do_level4_tests (handle, &retcode))
	goto end;

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif
#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/check_topoplus.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
/*

 check_topoplus.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
#ifndef OMIT_ICONV		/* only if ICONV is enabled */

static int
do_level11_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 11 */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int changed_links = 0;

/* creating a Network 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateNetwork('netsegments', 1, 4326, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -300;
	  return 0;
      }

/* inserting four Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('netsegments', MakePoint(-45, -45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -301;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('netsegments', MakePoint(-45, 45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -302;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('netsegments', MakePoint(45, -45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -303;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNetNode('netsegments', MakePoint(45, 45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNetNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -304;
	  return 0;
      }

/* inserting Links */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('netsegments', 1, 2, GeomFromText('LINESTRING(-45 -45,  -45 45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -305;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('netsegments', 3, 4, GeomFromText('LINESTRING(45 -45,  45 45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -306;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('netsegments', 1, 3, GeomFromText('LINESTRING(-45 -45,  45 -45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -307;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddLink('netsegments', 2, 4, GeomFromText('LINESTRING(-45 45,  0 45, 45 45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddLink() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -308;
	  return 0;
      }

/* disambiguating segment Links */
    ret = sqlite3_get_table
	(handle,
	 "SELECT TopoNet_DisambiguateSegmentLinks('netsegments')",
	 &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_DisambiguateSegmentLinks() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -309;
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns)];
	  changed_links = atoi (value);
      }
    sqlite3_free_table (results);
    if (changed_links != 3)
      {
	  fprintf (stderr,
		   "TopoNet_DisambiguateSegmentLinks() #1 invalid count: %d\n",
		   changed_links);
	  *retcode = -310;
	  return 0;
      }

    return 1;
}

static int
do_level10_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 10 */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int changed_edges = 0;

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateTopology('segments', 4326, 0, 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #10 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -300;
	  return 0;
      }

/* inserting four Nodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('segments', NULL, MakePoint(-45, -45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -301;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('segments', NULL, MakePoint(-45, 45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -302;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('segments', NULL, MakePoint(45, -45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -303;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoNode('segments', NULL, MakePoint(45, 45, 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoNode() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -304;
	  return 0;
      }

/* inserting Edges */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('segments', 1, 2, GeomFromText('LINESTRING(-45 -45,  -45 45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -305;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddIsoEdge('segments', 3, 4, GeomFromText('LINESTRING(45 -45,  45 45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddIsoEdge() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -306;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('segments', 1, 3, GeomFromText('LINESTRING(-45 -45,  45 -45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -307;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AddEdgeNewFaces('segments', 2, 4, GeomFromText('LINESTRING(-45 45,  0 45, 45 45)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_AddEdgeNewFaces() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -308;
	  return 0;
      }

/* disambiguating segment Edges */
    ret = sqlite3_get_table
	(handle,
	 "SELECT TopoGeo_DisambiguateSegmentEdges('segments')",
	 &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_DisambiguateSegmentEdges() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -309;
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns)];
	  changed_edges = atoi (value);
      }
    sqlite3_free_table (results);
    if (changed_edges != 3)
      {
	  fprintf (stderr,
		   "TopoGeo_DisambiguateSegmentEdges() #1 invalid count: %d\n",
		   changed_edges);
	  *retcode = -310;
	  return 0;
      }

    return 1;
}

static int
do_level9_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 9 */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int valid;

/* updating TopoSeeds */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_UpdateSeeds('elba_clone')", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_UpdateSeeds() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -300;
	  return 0;
      }

/* testing TopoGeo_SnapPointToSeed - ok */
    if (sqlite3_get_table
	(handle,
	 "SELECT ST_AsText(TopoGeo_SnapPointToSeed(MakePoint(612452.7, 4730202.4, 32632), 'elba_clone', 1.0))",
	 &results, &rows, &columns, &err_msg) != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnapPointToSeed() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -301;
	  return 0;
      }
    valid = 1;
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns)];
	  if (strcmp (value, "POINT(612452.924936 4730202.975964)") != 0)
	    {
		fprintf (stderr, "TopoGeo_SnapPointToSeed() #2 error: %s\n",
			 value);
		valid = 0;
	    }
      }
    sqlite3_free_table (results);
    if (!valid)
      {
	  *retcode = -302;
	  return 0;
      }

/* testing TopoGeo_SnapPointToSeed - no Seed within distance */
    if (sqlite3_get_table
	(handle,
	 "SELECT ST_AsText(TopoGeo_SnapPointToSeed(MakePoint(2.7, 4.9, 32632), 'elba_clone', 1.0))",
	 &results, &rows, &columns, &err_msg) != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnapPointToSeed() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -303;
	  return 0;
      }
    valid = 1;
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns)];
	  if (value != NULL)
	    {
		fprintf (stderr, "TopoGeo_SnapPointToSeed() #4 error: %s\n",
			 value);
		valid = 0;
	    }
      }
    sqlite3_free_table (results);
    if (!valid)
      {
	  *retcode = -304;
	  return 0;
      }

/* testing TopoGeo_SnapPointToSeed - invalid SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AsText(TopoGeo_SnapPointToSeed(MakePoint(2.7, 4.9, 4326), 'elba_clone', 1.0))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapPointToSeed() wrong SRID: expected failure\n");
	  *retcode = -305;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Point (mismatching SRID od dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapPointToSeed() wrong SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -306;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing TopoGeo_SnapPointToSeed - invalid dims */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AsText(TopoGeo_SnapPointToSeed(MakePointZ(2.7, 4.9, 10, 32632), 'elba_clone', 1.0))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapPointToSeed() wrong dims: expected failure\n");
	  *retcode = -305;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Point (mismatching SRID od dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapPointToSeed() wrong dims: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -306;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing TopoGeo_SnapLineToSeed - ok */
    if (sqlite3_get_table
	(handle,
	 "SELECT ST_AsText(TopoGeo_SnapLineToSeed(ST_GeomFromText("
	 "'LINESTRING(612385 4730247.99, 612389 4730247.95)', 32632), 'elba_clone', 1.0))",
	 &results, &rows, &columns, &err_msg) != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnapLineToSeed() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -309;
	  return 0;
      }
    valid = 1;
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns)];
	  if (strcmp
	      (value,
	       "LINESTRING(612385 4730247.99, 612387.425489 4730247.975612, 612389 4730247.95)")
	      != 0)
	    {
		fprintf (stderr, "TopoGeo_SnapLineToSeed() #2 error: %s\n",
			 value);
		valid = 0;
	    }
      }
    sqlite3_free_table (results);
    if (!valid)
      {
	  *retcode = -310;
	  return 0;
      }

/* testing TopoGeo_SnapLineToSeed - no Seed within distance */
    if (sqlite3_get_table
	(handle,
	 "SELECT ST_AsText(TopoGeo_SnapLineToSeed(ST_GeomFromText("
	 "'LINESTRING(5 7.99, 9 7.95)', 32632), 'elba_clone', 1.0))", &results,
	 &rows, &columns, &err_msg) != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnapLineToSeed() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -311;
	  return 0;
      }
    valid = 1;
    for (i = 1; i <= rows; i++)
      {
	  const char *value = results[(i * columns)];
	  if (value != NULL)
	    {
		fprintf (stderr, "TopoGeo_SnapLineToSeed() #4 error: %s\n",
			 value);
		valid = 0;
	    }
      }
    sqlite3_free_table (results);
    if (!valid)
      {
	  *retcode = -312;
	  return 0;
      }

/* testing TopoGeo_SnapLineToSeed - invalid SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AsText(TopoGeo_SnapLineToSeed(ST_GeomFromText("
		      "'LINESTRING(5 7.99, 9 7.95)', 4325), 'elba_clone', 1.0))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapLineToSeed() wrong SRID: expected failure\n");
	  *retcode = -313;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Line (mismatching SRID od dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapLineToSeed() wrong SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -314;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing TopoGeo_SnapLineToSeed - invalid dims */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_AsText(TopoGeo_SnapLineToSeed(ST_GeomFromText("
		      "'LINESTRINGZ(5 7.99 1, 9 7.95 2)', 32632), 'elba_clone', 1.0))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapLineToSeed() wrong dims: expected failure\n");
	  *retcode = -315;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Line (mismatching SRID od dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnapLineToSeed() wrong dims: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -316;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing RemoveSmallFaces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_RemoveSmallFaces('elba_clone', 0.7, 1000)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_RemoveSmallFaces() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -317;
	  return 0;
      }

/* testing RemoveDanglingEdges */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_RemoveDanglingEdges('elba_clone')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_RemoveDanglingEdges() error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -318;
	  return 0;
      }

/* testing RemoveDanglingNodes */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_RemoveDanglingNodes('elba_clone')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_RemoveDanglingNodes() error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -319;
	  return 0;
      }

    return 1;
}


static int
do_level8_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 8 */
    int ret;
    char *err_msg = NULL;

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateTopology('diagnostic', 23032, 0, 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #8 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -300;
	  return 0;
      }

/* attaching an external DB */
    ret =
	sqlite3_exec (handle,
		      "ATTACH DATABASE \"./test_geos.sqlite\" AS inputDB", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ATTACH DATABASE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -301;
	  return 0;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('diagnostic', 'inputDB', 'comuni', NULL, 'dustbin', 'dustbinview', 650)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() no PK: expected failure\n");
	  *retcode = -302;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - unable to create the dustbin table.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -302;
	  return 0;
      }

/* detaching the external DB */
    ret =
	sqlite3_exec (handle, "DETACH DATABASE inputDB", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DETACH DATABASE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -303;
	  return 0;
      }

/* attempting to load a Topology - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('wannebe', NULL, 'elba_ln', NULL, 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing Topology: expected failure\n");
	  *retcode = -304;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -305;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - non-existing GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('diagnostic', NULL, 'wannabe', NULL, 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing GeoTable: expected failure\n");
	  *retcode = -306;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -307;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('diagnostic', 'lollypop', 'elba_ln', NULL, 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() wrong DB-prefix: expected failure\n");
	  *retcode = -308;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -309;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('diagnostic', NULL, 'elba_ln', 'none', 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing Geometry: expected failure\n");
	  *retcode = -310;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -311;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('badelba1', NULL, 'elba_ln', 'geometry', 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() mismatching SRID: expected failure\n");
	  *retcode = -312;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -313;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - mismatching dims */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('badelba2', NULL, 'elba_ln', 'GEOMETRY', 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() mismatching dims: expected failure\n");
	  *retcode = -314;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() mismatching dims: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -315;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('diagnostic', NULL, 'elba_pg', NULL, 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() ambiguous Geometry: expected failure\n");
	  *retcode = -316;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -317;
	  return 0;
      }
    sqlite3_free (err_msg);

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateTopology('ext', 32632, 0, 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #9 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -316;
      }

/* attempting to load a Topology  */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('ext', NULL, 'export_elba1', NULL, 'dustbin', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableExt() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -317;
	  return 0;
      }

/* attempting to load a Topology - already existing dustbin-table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('ext', NULL, 'export_elba1', NULL, 'dustbin', 'dustbinview2')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() existing dustbin-table: expected failure\n");
	  *retcode = -318;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - unable to create the dustbin table.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() existing dustbin-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -319;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - already existing dustbin-view */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableExt('ext', NULL, 'export_elba1', NULL, 'dustbin2', 'dustbinview')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() existing dustbin-view: expected failure\n");
	  *retcode = -320;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - unable to create the dustbin view.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTableExt() existing dustbin-view: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -321;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level7_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 7 */
    int ret;
    char *err_msg = NULL;

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('topocom', 23032, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -200;
      }

/* attaching an external DB */
    ret =
	sqlite3_exec (handle,
		      "ATTACH DATABASE \"./test_geos.sqlite\" AS inputDB", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ATTACH DATABASE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -201;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('topocom', 'inputDB', 'comuni', NULL, 650)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -202;
	  return 0;
      }

/* detaching the external DB */
    ret =
	sqlite3_exec (handle, "DETACH DATABASE inputDB", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DETACH DATABASE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -203;
	  return 0;
      }

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('elbasplit', 32632, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -204;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elbasplit', 'main', 'elba_pg', 'geometry', 256, 1000)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -205;
	  return 0;
      }

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateTopology('elbalnsplit', 32632, 0, 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -206;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elbalnsplit', 'main', 'elba_ln', 'geometry', 256, 500)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #7 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -207;
	  return 0;
      }

/* loading a GeoTable into a TopoNet */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'roads', 'geometry')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_FromGeoTable() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -208;
	  return 0;
      }

/* testing TopNet_LineLinksList - ok */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_LineLinksList('roads', NULL, 'roads', 'geometry', 'line_links_list')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_LineLinksList() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -209;
	  return 0;
      }

/* testing TopoGeo_GetEdgeSeed */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_GetEdgeSeed('elbasplit', edge_id) FROM MAIN.elbasplit_edge",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_GetEdgeSeed() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -210;
	  return 0;
      }

/* testing TopoGeo_GetFaceSeed */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_GetFaceSeed('elbasplit', face_id) FROM MAIN.elbasplit_face WHERE face_id <> 0",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_GetFaceSeed() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -211;
	  return 0;
      }

/* testing TopoNet_GetLinkSeed */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_GetLinkSeed('roads', link_id) FROM MAIN.roads_link",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_GetLinkSeed() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -212;
	  return 0;
      }

/* testing TopoGeo_UpdateSeeds */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_UpdateSeeds('elbasplit')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_UpdateSeeds() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -213;
	  return 0;
      }

/* testing TopoNet_UpdateSeeds */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_UpdateSeeds('roads')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_UpdateSeeds() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -214;
	  return 0;
      }

/* sleeping for 2 secs, so to be sure that 'now' really changes */
    sqlite3_sleep (2000);

/* Edge's fake update */
    ret =
	sqlite3_exec (handle,
		      "UPDATE MAIN.elbasplit_edge SET left_face = left_face",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE elbasplit error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -215;
	  return 0;
      }

/* testing TopoGeo_UpdateSeeds */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_UpdateSeeds('elbasplit', 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_UpdateSeeds() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -216;
	  return 0;
      }

/* Link's fake update */
    ret =
	sqlite3_exec (handle,
		      "UPDATE MAIN.roads_link SET start_node = start_node",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE roads error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -217;
	  return 0;
      }

/* testing TopoNet_UpdateSeeds */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_UpdateSeeds('roads', 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_UpdateSeeds() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -218;
	  return 0;
      }

/* testing TopoGeo_ToGeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elbasplit', NULL, 'elba_ln', NULL, 'export_elba1')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ToGeoTable() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -219;
	  return 0;
      }

/* testing TopoGeo_ToGeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elbasplit', NULL, 'elba_pg', 'geometry', 'export_elba2', 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ToGeoTable() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -220;
	  return 0;
      }

/* testing TopoNet_ToGeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'roads', 'geometry', 'export_roads')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_ToGeoTable() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -221;
	  return 0;
      }

/* testing TopoGeo_ToGeoTableGeneralize */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elbasplit', NULL, 'elba_ln', NULL, 'export_elba1gen', 10)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ToGeoTableGeneralize() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -222;
	  return 0;
      }

/* testing TopoGeo_ToGeoTableGeneralize */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elbasplit', NULL, 'elba_pg', 'geometry', 'export_elba2gen', 10, 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ToGeoTableGeneralize() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -223;
	  return 0;
      }

/* testing TopoNet_ToGeoTableGeneralize */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', 'geometry', 'export_roads1gen', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_ToGeoTableGeneralize() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -224;
	  return 0;
      }

/* testing TopoNet_ToGeoTableGeneralize */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', 'geometry', 'export_roads2gen', 10, 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_ToGeoTableGeneralize() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -225;
	  return 0;
      }

/* testing TopoGeo_CreateTopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elbasplit', NULL, 'elba_pg', 'geometry', 'myelba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_CreateTopoLayer() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -226;
	  return 0;
      }

/* testing TopoGeo_ExportTopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ExportTopoLayer('elbasplit', 'myelba', 'out_myelba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ExportTopoLayer() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -227;
	  return 0;
      }

/* testing TopoGeo_RemoveTopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_RemoveTopoLayer('elbasplit', 'myelba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_RemoveTopoLayer() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -228;
	  return 0;
      }

/* testing TopoGeo_CreateTopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elbasplit', NULL, 'elba_pg', 'geometry', 'yourelba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_CreateTopoLayer() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -229;
	  return 0;
      }

/* testing TopoGeo_ExportTopoLayer - create only */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ExportTopoLayer('elbasplit', 'yourelba', 'out_yourelba', 0, 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ExportTopoLayer() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -230;
	  return 0;
      }

/* testing TopoGeo_InsertFeatureFromTopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InsertFeatureFromTopoLayer('elbasplit', 'yourelba', 'out_yourelba', 5)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InsertFeatureFromTopoLayer() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -231;
	  return 0;
      }

/* testing CreateTopoGeo - ok */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_CreateTopoGeo('badelba1', GeomFromText('GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 3, 4 4), POLYGON((10 10, 11 10, 11 11, 10 11, 10 10)))', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_CreateTopoGeo() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -232;
	  return 0;
      }

/* testing CreateTopoGeo - already populated Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_CreateTopoGeo('badelba1', MakePoint(1, 2, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_CreateTopoGeo() #2: expected failure\n");
	  *retcode = -233;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-empty topology.") != 0)
      {
	  fprintf (stderr,
		   "ST_CreateTopoGeo() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -234;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing SpatNetFromGeom - ok */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromGeom('badnet1', GeomFromText('GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 3, 4 4), POLYGON((10 10, 11 10, 11 11, 10 11, 10 10)))', 3003))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ST_SpatNetFromGeom() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -235;
	  return 0;
      }

/* testing SpatNetFromGeom - already populated Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromGeom('badnet1', MakePoint(1, 2, 3003))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ST_SpatNetFromGeom() #2: expected failure\n");
	  *retcode = -236;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-empty network.") != 0)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() #2: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -237;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing TopoGeo_PolyFacesList - ok */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_PolyFacesList('elbasplit', NULL, 'elba_pg', 'geometry', 'poly_faces_list')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_PolyFacesList() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -238;
	  return 0;
      }

/* testing TopoGeo_LineEdgesList - ok */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_LineEdgesList('elbasplit', NULL, 'elba_ln', 'geometry', 'line_edges_list')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_LineEdgesList() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -239;
	  return 0;
      }

    return 1;
}


static int
do_level6_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 6 */
    int ret;
    char *err_msg = NULL;

/* Validating a Topology - valid */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('elba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -180;
	  return 0;
      }

/* dirtying the Topology */
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_node (node_id, containing_face, geom) "
		      "SELECT NULL, NULL, ST_PointN(geom, 33) FROM elba_edge WHERE edge_id = 13",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Node #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -182;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE elba_edge SET geom = GeomFromText('LINESTRING(604477 4736752, 604483 4736751, 604480 4736755, 604483 4736751, 604840 4736648)', 32632) WHERE edge_id = 26",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Edge error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -183;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_face (face_id, mbr) VALUES (NULL, BuildMBR(610000, 4700000, 610001, 4700001, 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Face #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -184;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE elba_edge SET left_face = NULL WHERE left_face = 0",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Edge #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -185;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE elba_edge SET right_face = NULL WHERE right_face = 0",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Edge #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -186;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE elba_node SET containing_face = NULL WHERE containing_face = 0",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Edge #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -187;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "DELETE FROM elba_face WHERE face_id = 0",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DELETE FROM Face #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -188;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_node (node_id, containing_face, geom) "
		      "VALUES (NULL, NULL, MakePoint(612771, 4737829, 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Node #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -189;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_face (face_id, mbr) VALUES (NULL, BuildMBR(612771, 4737329, 613771, 4737829, 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Face #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -190;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_edge (edge_id, start_node, end_node, next_left_edge, next_right_edge, left_face, right_face, geom) "
		      "VALUES (NULL, 49, 49, 46, -46, 28, 33, GeomFromText('LINESTRING(612771 4737829, 613771 4737829, 613771 4737329, 612771 4737329, 612771 4737829)', 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Edge #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -191;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_node (node_id, containing_face, geom) "
		      "VALUES (NULL, NULL, MakePoint(613200, 4737700, 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Node #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -192;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_face (face_id, mbr) VALUES (NULL, BuildMbr(611771, 4738329, 612771, 4738829, 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Face #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -193;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "INSERT INTO elba_edge (edge_id, start_node, end_node, next_left_edge, next_right_edge, left_face, right_face, geom) "
		      "VALUES (NULL, 50, 50, 47, -47, 29, 33, GeomFromText('LINESTRING(613200 4737700, 613400 4737700, 613400 4737400, 613200 4737400, 613200 4737700)', 32632))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT INTO Edge #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -194;
	  return 0;
      }

/* Validating yet again the dirtied Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('elba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -195;
	  return 0;
      }

    return 1;
}

static int
do_level5_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 5 */
    int ret;
    char *err_msg = NULL;

/* Validating a Spatial Network - valid */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidSpatialNet('spatnet')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidSpatialNet() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -160;
	  return 0;
      }

/* dirtying the Spatial Network */
    ret =
	sqlite3_exec (handle,
		      "UPDATE spatnet_link SET geometry = NULL WHERE link_id = 1",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Spatial Link error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -162;
	  return 0;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE spatnet_link SET geometry = GeomFromText('LINESTRING(604477 4736752, 604840 4736648)', 32632) WHERE link_id = 26",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Spatial Link error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -163;
	  return 0;
      }

/* Validating yet again the dirtied Spatial Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidSpatialNet('spatnet')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidSpatialNet() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -164;
	  return 0;
      }

    return 1;
}

static int
do_level4_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 4 */
    int ret;
    char *err_msg = NULL;

/* Validating a Logical Network - valid */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidLogicalNet('loginet')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidLogicalNet() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -150;
	  return 0;
      }

/* dirtying the Logical Network */
    ret =
	sqlite3_exec (handle,
		      "UPDATE loginet_link SET geometry = GeomFromText('LINESTRING(0 0, 1 1)', -1) WHERE link_id = 1",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE Logical Link error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -152;
	  return 0;
      }

/* Validating yet again the dirtied Logical Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidLogicalNet('loginet')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidLogicalNet() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -153;
	  return 0;
      }

    return 1;
}

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 3 */
    int ret;
    char *err_msg = NULL;

/* cloning a Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Clone(NULL, 'elba', 'elba_clone')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Clone() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -120;
	  return 0;
      }

/* attempting to clone a Topology - already existing destination Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Clone('MAIN', 'elba', 'elba_clone')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_Clone() already existing destination Topology: expected failure\n");
	  *retcode = -121;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid topology name (destination).") !=
	0)
      {
	  fprintf (stderr,
		   "TopoGeo_Clone() already existing destination Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -122;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to transform a Topology into a Logical Network (non-existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_LogiNetFromTGeo('loginet', 'lollypop')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "LogiNetFromTGeo() non-existing Topology: expected failure\n");
	  *retcode = -124;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid topology name.") !=
	0)
      {
	  fprintf (stderr,
		   "LogiNetFromTGeo() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -125;
	  return 0;
      }
    sqlite3_free (err_msg);

/* transforming a Topology into a Logical Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_LogiNetFromTGeo('loginet', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "LogiNetFromTGeo() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }

/* attempting to transform a Topology into a Spatial Network (non-existing) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromTGeo('spatnet', 'lollypop')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() non-existing Topology: expected failure\n");
	  *retcode = -127;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - invalid topology name.") !=
	0)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -128;
	  return 0;
      }
    sqlite3_free (err_msg);

/* transforming a Topology into a Spatial Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromTGeo('spatnet', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SpatNetFromTGeo() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -129;
	  return 0;
      }

/* attempting to transform a Topology into a Logical Network (non-empty) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_LogiNetFromTGeo('loginet', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "LogiNetFromTGeo() already populated Network: expected failure\n");
	  *retcode = -130;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-empty network.") != 0)
      {
	  fprintf (stderr,
		   "LogiNetFromTGeo() already populated Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -131;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to transform a Topology into a Spatial Network (non-empty) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromTGeo('spatnet', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() already populated Network: expected failure\n");
	  *retcode = -132;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - non-empty network.") != 0)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() already populated Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -133;
	  return 0;
      }
    sqlite3_free (err_msg);

/* cloning a Logical Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_Clone(NULL, 'loginet', 'loginet_clone')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_Clone() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -137;
	  return 0;
      }

/* attempting to clone a Logical Network - already existing destination Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_Clone('MAIN', 'loginet', 'loginet_clone')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_Clone() already existing destination Logical Network: expected failure\n");
	  *retcode = -138;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid network name (destination).") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_Clone() already existing destination Logical Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -139;
	  return 0;
      }
    sqlite3_free (err_msg);

/* cloning a Spatial Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_Clone('MAIN', 'spatnet', 'spatnet_clone')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoNet_Clone() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -140;
	  return 0;
      }

/* attempting to clone a Spatial Network - already existing destination Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_Clone(NULL, 'spatnet', 'spatnet_clone')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_Clone() already existing destination Spatial Network: expected failure\n");
	  *retcode = -141;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid network name (destination).") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_Clone() already existing destination Spatial Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -142;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}


static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 2 */
    int ret;
    char *err_msg = NULL;

/* loading a Point GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'elba_pg', 'centroid')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -100;
	  return 0;
      }

/* loading a Polygon GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'elba_pg', 'geometry')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -101;
	  return 0;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 1 */
    int ret;
    char *err_msg = NULL;

/* loading a Linestring GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'elba_ln', NULL)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }

/* loading a Point GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'elba_pg', 'centroid')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTable() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }

    return 1;
}

static int
do_level00_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 00 */
    int ret;
    char *err_msg = NULL;

/* attempting to load a Network - non-existing Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('wannebe', NULL, 'roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() non-existing Network: expected failure\n");
	  *retcode = -220;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid network name.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() non-existing Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -221;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Network - non-existing GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'wannabe', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() non-existing GeoTable: expected failure\n");
	  *retcode = -222;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() non-existing GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -223;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Network - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', 'lollypop', 'roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() wrong DB-prefix: expected failure\n");
	  *retcode = -224;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -225;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Network - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'roads', 'none')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() non-existing Geometry: expected failure\n");
	  *retcode = -226;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -227;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Network - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'roads', 'wgs')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() mismatching SRID: expected failure\n");
	  *retcode = -228;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID, dimensions or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -229;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - mismatching dims */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'roads', 'g3d')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() mismatching dims: expected failure\n");
	  *retcode = -230;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID, dimensions or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() mismatching dims: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -231;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Network - mismatching class */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'elba_pg', 'geometry')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() mismatching class: expected failure\n");
	  *retcode = -232;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID, dimensions or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() mismatching class: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -233;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Network - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('roads', NULL, 'roads', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() ambiguous Geometry: expected failure\n");
	  *retcode = -235;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -235;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Logical Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_FromGeoTable('loginet', NULL, 'roads', 'geometry')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() Logical Network: expected failure\n");
	  *retcode = -236;
	  return 0;
      }
    if (strcmp
	(err_msg, "FromGeoTable() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_FromGeoTable() Logical Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -237;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - non-existing Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('wannebe', NULL, 'roads', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing Network: expected failure\n");
	  *retcode = -238;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid network name.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -239;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - non-existing GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'wannabe', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing ref-GeoTable: expected failure\n");
	  *retcode = -240;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoNet_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing ref-GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -241;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', 'lollypop', 'roads', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() wrong DB-prefix: expected failure\n");
	  *retcode = -242;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoNet_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -243;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'roads', 'none', 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing Geometry: expected failure\n");
	  *retcode = -244;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoNet_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -245;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'roads', 'wgs', 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() mismatching SRID: expected failure\n");
	  *retcode = -246;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -247;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - mismatching class */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'elba_pg', 'geometry', 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() mismatching class: expected failure\n");
	  *retcode = -248;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() mismatching class: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -249;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'roads', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() ambiguous Geometry: expected failure\n");
	  *retcode = -250;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoNet_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -251;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Logical Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('loginet', NULL, 'roads', 'geometry', 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() Logical Network: expected failure\n");
	  *retcode = -252;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTable() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() Logical Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -253;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - already existing out-table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'roads', 'geometry', 'elba_pg')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() already existing out-table: expected failure\n");
	  *retcode = -254;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoNet_ToGeoTable: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() already existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -255;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Network - already existing out-table (non-geo) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTable('roads', NULL, 'roads', 'geometry', 'geometry_columns')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() already existing out-table (non-geo): expected failure\n");
	  *retcode = -256;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoNet_ToGeoTable: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() already existing out-table (non-geo): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -257;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - non-existing Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('wannebe', NULL, 'roads', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() non-existing Network: expected failure\n");
	  *retcode = -258;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid network name.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() non-existing Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -259;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - non-existing GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'wannabe', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() non-existing ref-GeoTable: expected failure\n");
	  *retcode = -260;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() non-existing ref-GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -261;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', 'lollypop', 'roads', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() wrong DB-prefix: expected failure\n");
	  *retcode = -262;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -263;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', 'none', 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() non-existing Geometry: expected failure\n");
	  *retcode = -264;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTable() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -265;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', 'wgs', 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() mismatching SRID: expected failure\n");
	  *retcode = -266;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -267;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - mismatching class */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'elba_pg', 'geometry', 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() mismatching class: expected failure\n");
	  *retcode = -268;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID or class).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() mismatching class: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -269;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() ambiguous Geometry: expected failure\n");
	  *retcode = -270;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -271;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Logical Network */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('loginet', NULL, 'roads', 'geometry', 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() Logical Network: expected failure\n");
	  *retcode = -272;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize() cannot be applied to Logical Network.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() Logical Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -273;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - already existing out-table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', 'geometry', 'elba_pg', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() already existing out-table: expected failure\n");
	  *retcode = -274;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() already existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -275;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Network - already existing out-table (non-geo) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoNet_ToGeoTableGeneralize('roads', NULL, 'roads', 'geometry', 'geometry_columns', 10)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() already existing out-table (non-geo): expected failure\n");
	  *retcode = -276;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoNet_ToGeoTableGeneralize: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoNet_ToGeoTableGeneralize() already existing out-table (non-geo): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -277;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing basic tests: Level 0 */
    int ret;
    char *err_msg = NULL;

/* attempting to load a Topology - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('wannebe', NULL, 'elba_ln', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() non-existing Topology: expected failure\n");
	  *retcode = -50;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - non-existing GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'wannabe', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() non-existing GeoTable: expected failure\n");
	  *retcode = -52;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() non-existing GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -53;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', 'lollypop', 'elba_ln', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() wrong DB-prefix: expected failure\n");
	  *retcode = -54;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -55;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'elba_ln', 'none')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() non-existing Geometry: expected failure\n");
	  *retcode = -56;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('badelba1', NULL, 'elba_ln', 'geometry')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() mismatching SRID: expected failure\n");
	  *retcode = -58;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - mismatching dims */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('badelba2', NULL, 'elba_ln', 'GEOMETRY')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() mismatching dims: expected failure\n");
	  *retcode = -60;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() mismatching dims: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to load a Topology - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTable('elba', NULL, 'elba_pg', NULL)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() ambiguous Geometry: expected failure\n");
	  *retcode = -62;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_FromGeoTable() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to transform a Topology into a Logical Network (Spatial Network indeed) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_LogiNetFromTGeo('spatnet', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "LogiNetFromTGeo() Spatial Network: expected failure\n");
	  *retcode = -64;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "ST_LogiNetFromTGeo() cannot be applied to Spatial Network.") != 0)
      {
	  fprintf (stderr,
		   "LogiNetFromTGeo() Spatial Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -65;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to transform a Topology into a Spatial Network (Logical Network indeed) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromTGeo('loginet', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() Logical Network: expected failure\n");
	  *retcode = -66;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "ST_SpatNetFromTGeo() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() Logical Network: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -67;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to transform a Topology into a Spatial Network (mismatching SRID) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromTGeo('badnet1', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() mismatching SRID: expected failure\n");
	  *retcode = -68;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - mismatching SRID or dimensions.") != 0)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -69;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to transform a Topology into a Spatial Network (mismatching dims) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromTGeo('badnet2', 'elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() mismatching dims: expected failure\n");
	  *retcode = -70;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - mismatching SRID or dimensions.") != 0)
      {
	  fprintf (stderr,
		   "SpatNetFromTGeo() mismatching dims: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to validate a Logical Network (Spatial indeed) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidLogicalNet('spatnet')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ValidLogicalNet() mismatching type: expected failure\n");
	  *retcode = -72;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "ST_ValidLogicalNet() cannot be applied to Spatial Network.") != 0)
      {
	  fprintf (stderr,
		   "ValidLogicalNet() mismatching type: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to validate a Logical Network (empty) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidLogicalNet('loginet')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ValidLogicalNet() empty: expected failure\n");
	  *retcode = -74;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - empty network.") != 0)
      {
	  fprintf (stderr,
		   "ValidLogicalNet() empty: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -75;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to validate a Spatial Network (Logical indeed) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidSpatialNet('loginet')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ValidSpatialNet() mismatching type: expected failure\n");
	  *retcode = -76;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "ST_ValidSpatialNet() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr,
		   "ValidSpatialNet() mismatching type: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -77;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to validate a Spatial Network (empty) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidSpatialNet('spatnet')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ValidSpatialNet() empty: expected failure\n");
	  *retcode = -78;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - empty network.") != 0)
      {
	  fprintf (stderr,
		   "ValidSpatialNet() empty: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -79;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to validate a TopoGeo (empty) */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() empty: expected failure\n");
	  *retcode = -80;
	  return 0;
      }
    if (strcmp (err_msg, "SQL/MM Spatial exception - empty topology.") != 0)
      {
	  fprintf (stderr,
		   "ValidateTopoGeo() empty: unexpected \"%s\"\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('wannebe', NULL, 'elba_ln', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing Topology: expected failure\n");
	  *retcode = -82;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -83;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - non-existing ref-GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elba', NULL, 'wannabe', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing ref-GeoTable: expected failure\n");
	  *retcode = -84;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -85;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elba', 'lollypop', 'elba_ln', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() wrong DB-prefix: expected failure\n");
	  *retcode = -86;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -87;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elba', NULL, 'elba_ln', 'none', 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing Geometry: expected failure\n");
	  *retcode = -88;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -89;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('badelba1', NULL, 'elba_ln', 'geometry', 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() mismatching SRID: expected failure\n");
	  *retcode = -90;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -91;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elba', NULL, 'elba_pg', NULL, 'out-table')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() ambiguous Geometry: expected failure\n");
	  *retcode = -92;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ToGeoTable: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - already existing out-table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elba', NULL, 'elba_ln', NULL, 'elba_pg')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() already existing out-table: expected failure\n");
	  *retcode = -94;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ToGeoTable: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() already existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -95;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Topology - already existing out-table (non-geo) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTable('elba', NULL, 'elba_ln', NULL, 'geometry_columns')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() already existing out-table (non-geo): expected failure\n");
	  *retcode = -96;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ToGeoTable: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() already existing out-table (non-geo): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -97;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('wannebe', NULL, 'elba_ln', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() non-existing Topology: expected failure\n");
	  *retcode = -82;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -98;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - non-existing ref-GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elba', NULL, 'wannabe', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() non-existing ref-GeoTable: expected failure\n");
	  *retcode = -99;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() non-existing GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -100;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elba', 'lollypop', 'elba_ln', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() wrong DB-prefix: expected failure\n");
	  *retcode = -101;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -102;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elba', NULL, 'elba_ln', 'none', 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() non-existing Geometry: expected failure\n");
	  *retcode = -103;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -104;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('badelba1', NULL, 'elba_ln', 'geometry', 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() mismatching SRID: expected failure\n");
	  *retcode = -105;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -106;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elba', NULL, 'elba_pg', NULL, 'out-table', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTable() ambiguous Geometry: expected failure\n");
	  *retcode = -107;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ToGeoTableGeneralize: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -108;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - already existing out-table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elba', NULL, 'elba_ln', NULL, 'elba_pg', 10.0)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() already existing out-table: expected failure\n");
	  *retcode = -109;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ToGeoTableGeneralize: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() already existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -110;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a Generalized Topology - already existing out-table (non-geo) */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ToGeoTableGeneralize('elba', NULL, 'elba_ln', NULL, 'geometry_columns', 10)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() already existing out-table (non-geo): expected failure\n");
	  *retcode = -111;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ToGeoTableGeneralize: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ToGeoTableGeneralize() already existing out-table (non-geo): unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -112;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('wannebe', NULL, 'elba_ln', NULL, 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() non-existing Topology: expected failure\n");
	  *retcode = -113;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -114;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - non-existing ref-GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elba', NULL, 'wannabe', NULL, 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() non-existing ref-GeoTable: expected failure\n");
	  *retcode = -115;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_CreateTopoLayer: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() non-existing GeoTable: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -116;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elba', 'lollypop', 'elba_ln', NULL, 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() wrong DB-prefix: expected failure\n");
	  *retcode = -117;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_CreateTopoLayer: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -118;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - wrong geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elba', NULL, 'elba_ln', 'none', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() non-existing Geometry: expected failure\n");
	  *retcode = -119;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_CreateTopoLayer: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() non-existing Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -120;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('badelba1', NULL, 'elba_ln', 'geometry', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() mismatching SRID: expected failure\n");
	  *retcode = -121;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid reference GeoTable (mismatching SRID).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -122;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - mismatching View SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('badelba1', NULL, 'elba_ln', 'geometry', 'topolyr', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() mismatching SRID: expected failure\n");
	  *retcode = -123;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_CreateTopoLayer: invalid reference View (invalid Geometry).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -124;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to create a TopoLayer - ambiguous geometry column */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elba', NULL, 'elba_pg', NULL, 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() ambiguous Geometry: expected failure\n");
	  *retcode = -125;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_CreateTopoLayer: invalid reference GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() ambiguos Geometry: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -126;
	  return 0;
      }
    sqlite3_free (err_msg);

/* creating a TopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elba', NULL, 'elba_ln', NULL, 'elba_ln')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_CreateTopoLayer error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -127;
      }

/* attempting to create a TopoLayer - already existing  */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_CreateTopoLayer('elba', NULL, 'elba_ln', NULL, 'elba_ln')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() already existing out-table: expected failure\n");
	  *retcode = -128;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_CreateTopoLayer: a TopoLayer of the same name already exists.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_CreateTopoLayer() already existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -129;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a TopoLayer - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_RemoveTopoLayer('wannebe', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_RemoveTopoLayer() non-existing Topology: expected failure\n");
	  *retcode = -130;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_RemoveTopoLayer() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -131;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to remove a TopoLayer - non-existing Topolayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_RemoveTopoLayer('elba', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_RemoveTopoLayer() non-existing TopoLayer: expected failure\n");
	  *retcode = -132;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_RemoveTopoLayer: not existing TopoLayer.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_RemoveTopoLayer() non-existing TopoLayer: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -133;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a TopoLayer - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ExportTopoLayer('wannebe', 'topolyr', 'outtable')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() non-existing Topology: expected failure\n");
	  *retcode = -134;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -135;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a TopoLayer - non-existing Topolayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ExportTopoLayer('elba', 'topolyr', 'outtable')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() non-existing TopoLayer: expected failure\n");
	  *retcode = -136;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_ExportTopoLayer: not existing TopoLayer.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() non-existing TopoLayer: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -137;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export a TopoLayer - already existing output table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ExportTopoLayer('elba', 'elba_ln', 'elba_pg')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() already-existing out-table: expected failure\n");
	  *retcode = -138;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ExportTopoLayer: the output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() already-existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -139;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export TopoFeatures - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InsertFeatureFromTopoLayer('wannebe', 'topolyr', 'outtable', 100)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InsertFeatureFromTopoLayer() non-existing Topology: expected failure\n");
	  *retcode = -140;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_InsertFeatureFromTopoLayer() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -141;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export TopoFeatures - non-existing Topolayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InsertFeatureFromTopoLayer('elba', 'topolyr', 'outtable', 100)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InsertFeatureFromTopoLayer() non-existing TopoLayer: expected failure\n");
	  *retcode = -142;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_InsertFeatureFromTopoLayer: non-existing TopoLayer.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_InsertFeatureFromTopoLayer() non-existing TopoLayer: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -143;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to export TopoFeatures - already existing output table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InsertFeatureFromTopoLayer('elba', 'elba_ln', 'outtable', 100)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InsertFeatureFromTopoLayer() non-existing out-table: expected failure\n");
	  *retcode = -144;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_InsertFeatureFromTopoLayer: the output GeoTable does not exists.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ExportTopoLayer() non-existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -145;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing CreateTopoGeo - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_CreateTopoGeo('elba', MakePoint(1, 2, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_CreateTopoGeo() mismatching SRID: expected failure\n");
	  *retcode = -146;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_CreateTopoGeo() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -147;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing CreateTopoGeo - mismatching DIMs */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_CreateTopoGeo('elba', MakePointZ(1, 2, 3, 32632))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_CreateTopoGeo() mismatching DIMs: expected failure\n");
	  *retcode = -148;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_CreateTopoGeo() mismatching DIMs: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -149;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing SpatNetFromGeom - mismatching SRID */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromGeom('roads', MakePoint(1, 2, 4326))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() mismatching SRID: expected failure\n");
	  *retcode = -150;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() mismatching SRID: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -151;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing SpatNetFromGeom - mismatching DIMs */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromGeom('roads', MakePointZ(1, 2, 3, 32632))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() mismatching DIMs: expected failure\n");
	  *retcode = -152;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid Geometry (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() mismatching DIMs: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -153;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing SpatNetFromGeom - logical network */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_SpatNetFromGeom('loginet', MakePointZ(1, 2, 3, 32632))",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() mismatching DIMs: expected failure\n");
	  *retcode = -154;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "ST_ValidSpatialNet() cannot be applied to Logical Network.") != 0)
      {
	  fprintf (stderr,
		   "ST_SpatNetFromGeom() mismatching DIMs: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -155;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to initialize a TopoLayer - non-existing Topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InitTopoLayer('wannebe', NULL, 'elba_vw', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() non-existing Topology: expected failure\n");
	  *retcode = -156;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid topology name.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() non-existing Topology: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -157;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to initialize a TopoLayer - non-existing ref-ìTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InitTopoLayer('elba', NULL, 'wannabe', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() non-existing ref-Table: expected failure\n");
	  *retcode = -158;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_InitTopoLayer: invalid reference Table.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() non-existing Table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -159;
	  return 0;
      }
    sqlite3_free (err_msg);

/* attempting to initialize a TopoLayer - wrong DB-prefix */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InitTopoLayer('elba', 'lollypop', 'elba_vw', 'topolyr')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() wrong DB-prefix: expected failure\n");
	  *retcode = -160;
	  return 0;
      }
    if (strcmp
	(err_msg, "TopoGeo_InitTopoLayer: invalid reference Table.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() wrong DB-prefix: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -161;
	  return 0;
      }
    sqlite3_free (err_msg);

/* initializing a TopoLayer */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InitTopoLayer('elba', NULL, 'elba_vw', 'elba_vw')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_InitTopoLayer error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -162;
      }

/* attempting to initialize a TopoLayer - already existing  */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_InitTopoLayer('elba', NULL, 'elba_vw', 'elba_vw')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() already existing out-table: expected failure\n");
	  *retcode = -163;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_InitTopoLayer: a TopoLayer of the same name already exists.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_InitTopoLayer() already existing out-table: unexpected \"%s\"\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -164;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif
#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
#ifndef	OMIT_ICONV		/* only if ICONV is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();
    char *old_SPATIALITE_SECURITY_ENV = NULL;
#ifdef _WIN32
    char *env;
#endif /* not WIN32 */

    old_SPATIALITE_SECURITY_ENV = getenv ("SPATIALITE_SECURITY");
#ifdef _WIN32
    putenv ("SPATIALITE_SECURITY=relaxed");
#else /* not WIN32 */
    setenv ("SPATIALITE_SECURITY", "relaxed", 1);
#endif

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    if (sqlite3_libversion_number () < 3008003)
      {
	  fprintf (stderr,
		   "*** check_topoplus skipped: libsqlite < 3.8.3 !!!\n");
	  goto end;
      }

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* importing Elba (polygons) from SHP */
    ret =
	sqlite3_exec (handle,
		      "SELECT ImportSHP('./elba-pg', 'elba_pg', 'CP1252', 32632)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ImportSHP() elba-pg error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* importing Elba (linestrings) from SHP */
    ret =
	sqlite3_exec (handle,
		      "SELECT ImportSHP('./elba-ln', 'elba_ln', 'CP1252', 32632)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ImportSHP() elba-ln error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -5;
      }

/* importing Merano Roads (linestrings) from SHP */
    ret =
	sqlite3_exec (handle,
		      "SELECT ImportSHP('./shp/merano-3d/roads', 'roads', 'UTF-8', 32632)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ImportSHP() roads error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -6;
      }

    if (old_SPATIALITE_SECURITY_ENV)
      {
#ifdef _WIN32
	  env =
	      sqlite3_mprintf ("SPATIALITE_SECURITY=%s",
			       old_SPATIALITE_SECURITY_ENV);
	  putenv (env);
	  sqlite3_free (env);
#else /* not WIN32 */
	  setenv ("SPATIALITE_SECURITY", old_SPATIALITE_SECURITY_ENV, 1);
#endif
      }
    else
      {
#ifdef _WIN32
	  putenv ("SPATIALITE_SECURITY=");
#else /* not WIN32 */
	  unsetenv ("SPATIALITE_SECURITY");
#endif
      }

/* adding a second Geometry to Elba-polygons */
    ret =
	sqlite3_exec (handle,
		      "SELECT AddGeometryColumn('elba_pg', 'centroid', 32632, 'POINT', 'XY')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "AddGeometryColumn elba-pg error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE elba_pg SET centroid = ST_Centroid(geometry)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Update elba-pg centroids error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -7;
      }

/* adding a second Geometry to Roads */
    ret =
	sqlite3_exec (handle,
		      "SELECT AddGeometryColumn('roads', 'wgs', 4326, 'LINESTRING', 'XY')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "AddGeometryColumn roads error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -8;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE roads SET wgs = ST_Transform(geometry, 4326)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Update Roads WGS84 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -9;
      }

/* adding a thirdd Geometry to Roads */
    ret =
	sqlite3_exec (handle,
		      "SELECT AddGeometryColumn('roads', 'g3d', 32632, 'LINESTRING', 'XYZ')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "AddGeometryColumn roads error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -10;
      }
    ret =
	sqlite3_exec (handle,
		      "UPDATE roads SET g3d = CastToXYZ(geometry)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Update Roads 3D error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -11;
      }

/* creating a Topology 2D (wrong SRID) */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('badelba1', 4326, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -12;
      }

/* creating a Topology 3D (wrong dims) */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('badelba2', 32632, 1, 01)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -13;
      }

/* creating a Topology 2D (ok) */
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('elba', 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -14;
      }

/* creating a Logical Network */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('loginet', 0)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -15;
      }

/* creating a Network 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('spatnet', 1, 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -16;
      }

/* creating a Network 2D - wrong SRID */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('badnet1', 1, 3003, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -17;
      }

/* creating a Network 3D */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('badnet2', 1, 32632, 1, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -18;
      }

/* creating a Network 2D */
    ret =
	sqlite3_exec (handle, "SELECT CreateNetwork('roads', 1, 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateNetwork() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -19;
      }

/* creating a View */
    ret =
	sqlite3_exec (handle,
		      "CREATE VIEW elba_vw AS SELECT pk_uid, cod_istat, nome FROM elba_ln",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Create View error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -20;
      }

/* basic tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/* basic tests: level 00 */
    if (!do_level00_tests (handle, &retcode))
	goto end;

/* basic tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/* dropping and recreating again a Topology 2D (ok) */
    ret =
	sqlite3_exec (handle, "SELECT DropTopology('elba')", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DropTopology() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -15;
      }
    ret =
	sqlite3_exec (handle, "SELECT CreateTopology('elba', 32632, 0, 0)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -16;
      }

/* basic tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/* basic tests: level 3 */
    if (!do_level3_tests (handle, &retcode))
	goto end;

/* basic tests: level 4 */
    if (!do_level4_tests (handle, &retcode))
	goto end;

/* basic tests: level 5 */
    if (!do_level5_tests (handle, &retcode))
	goto end;

/* basic tests: level 6 */
    if (!do_level6_tests (handle, &retcode))
	goto end;

/* basic tests: level 7 */
    if (!do_level7_tests (handle, &retcode))
	goto end;

/* basic tests: level 8 */
    if (!do_level8_tests (handle, &retcode))
	goto end;

/* basic tests: level 9 */
    if (!do_level9_tests (handle, &retcode))
	goto end;

/* basic tests: level 10 */
    if (!do_level10_tests (handle, &retcode))
	goto end;

/* basic tests: level 11 */
    if (!do_level11_tests (handle, &retcode))
	goto end;

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif
#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/check_toposnap.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
/*

 check_toposnap.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2016
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 0 tests */
    int ret;
    char *err_msg = NULL;

/* loading the sezcen_2011 GeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_FromGeoTableNoFace('elba', 'ext', 'sezcen_2011', NULL, 512)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_FromGeoTableNoFace() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -21;
	  return 0;
      }

/* building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('elba')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -22;
	  return 0;
      }

/* removing useless Nodes - mode Mod */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ModEdgeHeal('elba')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ModEdgeHeal() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -23;
	  return 0;
      }

    return 1;
}

static int
do_level1_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 1 tests */
    int ret;
    char *err_msg = NULL;

/* importing the sezcen_2001 GeoTable */
    ret = sqlite3_exec (handle,
			"SELECT TopoGeo_AddLinestringNoFace('elba', LinesFromRings(TopoGeo_TopoSnap('elba', geometry, 1, 1, 0))) "
			"FROM ext.sezcen_2001 WHERE rowid < 5", NULL, NULL,
			&err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_AddLinestringNoFace() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -31;
	  return 0;
      }

    return 1;
}

static int
do_level2_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 2 tests */
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    int invalid = 0;

/* building Faces */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_Polygonize('elba')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_Polygonize() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }

/* validating this TopoGeo */
    ret =
	sqlite3_exec (handle,
		      "SELECT ST_ValidateTopoGeo('elba')",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ValidateTopoGeo() #1: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -52;
	  return 0;
      }

/* testing for a valid TopoGeo */
    ret =
	sqlite3_get_table (handle, "SELECT Count(*) FROM elba_validate_topogeo",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "test ValidateTopoGeo() #2: error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -53;
	  return 0;
      }
    for (i = 1; i <= rows; i++)
      {
	  if (atoi (results[(i * columns) + 0]) > 0)
	      invalid = 1;
      }
    sqlite3_free_table (results);
    if (invalid)
      {
	  fprintf (stderr, "Topology 'elba' #2 is invalid !!!");
	  *retcode = -54;
	  return 0;
      }

    return 1;
}

static int
do_level3_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 3 tests */
    int ret;
    char *err_msg = NULL;

/* removing useless Nodes - mode Mod */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ModEdgeHeal('elba')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ModEdgeHeal() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }

/* splitting Edges - mode Mod */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ModEdgeSplit('elba', 128)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ModEdgeSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }

/* removing useless Nodes - mode New */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_NewEdgeHeal('elba')", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_NewEdgeHeal() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }

/* splitting Edges - mode New */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_NewEdgesSplit('elba', 256)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_NewEdgesSplit() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }

    return 1;
}

static int
do_level4_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 4 tests */
    int ret;
    char *err_msg = NULL;

/* disabled: indecently slow !!! */
    return 1;

/* testing TopoGeo_SnappedGeoTable */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_SnappedGeoTable('elba', 'ext', 'sezcen_2001', NULL, 'snapped_2001', 1, 1)",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnappedGeoTable() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }

    return 1;
}

static int
do_level5_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 5 tests  - INVALID CASES */
    int ret;
    char *err_msg = NULL;

/* testing TopoGeo_SnappedGeoTable - invalid input table */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_SnappedGeoTable('elba', 'ext', 'sezcen_1234', NULL, 'snapped', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnappedGeoTable() #2 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -60;
	  return 0;
      }
    if (strcmp
	(err_msg, "SQL/MM Spatial exception - invalid input GeoTable.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnappedGeoTable() #3 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -61;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing TopoGeo_SnappedGeoTable -already existing output table
 * disabled - indecently slow !!!
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_SnappedGeoTable('elba', 'ext', 'sezcen_2001', NULL, 'snapped_2001', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnappedGeoTable() #4 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_SnappedGeoTable: output GeoTable already exists.") != 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnappedGeoTable() #5 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    sqlite3_free (err_msg); 
*/

/* testing TopoGeo_SnappedGeoTable -invalid input SRID or dimensions */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_SnappedGeoTable('elba', 'ext', 'points', NULL, 'snapped', 1)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_SnappedGeoTable() #6 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -62;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "SQL/MM Spatial exception - invalid GeoTable (mismatching SRID or dimensions).")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_SnappedGeoTable() #7 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    sqlite3_free (err_msg);

/* invalidating all Edges */
    ret =
	sqlite3_exec (handle,
		      "UPDATE elba_edge SET left_face = NULL, right_face = NULL",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "invalidating Edges error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -64;
	  return 0;
      }

/* removing all Faces except the Universal Face */
    ret =
	sqlite3_exec (handle,
		      "DELETE FROM elba_face WHERE face_id <> 0", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "removing Faces error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -65;
	  return 0;
      }

/* testing TopoGeo_NewEdgeHeal - inconsistent topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_NewEdgeHeal('elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_NewEdgeHeal() #2 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -66;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_NewEdgeHeal exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_NewEdgeHeal() #2 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -67;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing ModEdgeHeal - inconsistent topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ModEdgeHeal('elba')",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ModEdgeHeal() #2 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -68;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ModEdgeHeal exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ModEdgeHeal() #2 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -69;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing TopoGeo_NewEdgesSplit - inconsistent topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_NewEdgesSplit('elba', 256)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_NewEdgesSplit() #2 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -70;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_NewEdgesSplit exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_NewEdgesSplit() #2 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -71;
	  return 0;
      }
    sqlite3_free (err_msg);

/* testing ModEdgeSplit - inconsistent topology */
    ret =
	sqlite3_exec (handle,
		      "SELECT TopoGeo_ModEdgeSplit('elba', 256)",
		      NULL, NULL, &err_msg);
    if (ret == SQLITE_OK)
      {
	  fprintf (stderr, "TopoGeo_ModEdgeSplit() #2 unexpected succes\n");
	  sqlite3_free (err_msg);
	  *retcode = -72;
	  return 0;
      }
    if (strcmp
	(err_msg,
	 "TopoGeo_ModEdgeSplit exception - inconsisten Topology; try executing TopoGeo_Polygonize to recover.")
	!= 0)
      {
	  fprintf (stderr,
		   "TopoGeo_ModEdgeSplit() #2 - unexpected: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -73;
	  return 0;
      }
    sqlite3_free (err_msg);

    return 1;
}

#endif

int
main (int argc, char *argv[])
{
    int retcode = 0;

#ifdef ENABLE_RTTOPO		/* only if RTTOPO is enabled */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    if (sqlite3_libversion_number () < 3008003)
      {
	  fprintf (stderr,
		   "*** check_toposnap skipped: libsqlite < 3.8.3 !!!\n");
	  goto end;
      }

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/* creating a Topology 2D */
    ret =
	sqlite3_exec (handle,
		      "SELECT CreateTopology('elba', 32632, 0, 0.000001)", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateTopology() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -4;
      }

/* attaching an external DB */
    ret =
	sqlite3_exec (handle,
		      "ATTACH DATABASE \"./elba-sezcen.sqlite\" AS ext", NULL,
		      NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ATTACH DATABASE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -5;
      }

/*tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

/*tests: level 1 */
    if (!do_level1_tests (handle, &retcode))
	goto end;

/*tests: level 2 */
    if (!do_level2_tests (handle, &retcode))
	goto end;

/*tests: level 3 */
    if (!do_level3_tests (handle, &retcode))
	goto end;

/*tests: level 4 */
    if (!do_level4_tests (handle, &retcode))
	goto end;

/*tests: level 5 */
    if (!do_level5_tests (handle, &retcode))
	goto end;

/* detaching the external DB */
    ret = sqlite3_exec (handle, "DETACH DATABASE ext", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "DETACH DATABASE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -6;
      }

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);

#endif /* end RTTOPO conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_virtual_ovflw.c.

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69



70
71
72
73
74
75
76
...
161
162
163
164
165
166
167

168
169
170
171
172
173
174
...
336
337
338
339
340
341
342

343
344
345
346
347
348
349
...
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
#include "config.h"
#include "sqlite3.h"
#include "spatialite.h"

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is enabled */
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    int suffix_len = 16 * 1024;	/* 16 KB suffix */
    char *suffix;
    char *table;
    char *sql;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
	  return -10;
      }
    sqlite3_free_table (results);

    sqlite3_free (table);
#endif /* end FreeXL conditional */


    table = sqlite3_mprintf ("shapetest_%s", suffix);

    sql =
	sqlite3_mprintf
	("create VIRTUAL TABLE %s USING VirtualShape(\"shapetest1\", UTF-8, 4326);",
	 table);
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, &err_msg);
................................................................................
      {
	  fprintf (stderr, "DROP TABLE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }

    sqlite3_free (table);


    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);

    ret = system ("cp sql_stmt_tests/testdb1.sqlite testdb1.sqlite");
    if (ret != 0)
      {
................................................................................
      {
	  fprintf (stderr, "cannot remove testdb1 database\n");
	  return -39;
      }

    free (suffix);

#endif /* end ICONV */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







<












>
>
>







 







>







 







>







 







<
<
<
<
<



50
51
52
53
54
55
56

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
...
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
...
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
...
443
444
445
446
447
448
449





450
451
452
#include "config.h"
#include "sqlite3.h"
#include "spatialite.h"

int
main (int argc, char *argv[])
{

    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    int suffix_len = 16 * 1024;	/* 16 KB suffix */
    char *suffix;
    char *table;
    char *sql;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
	  return -10;
      }
    sqlite3_free_table (results);

    sqlite3_free (table);
#endif /* end FreeXL conditional */

#ifndef OMIT_ICONV		/* only if ICONV is supported */
    table = sqlite3_mprintf ("shapetest_%s", suffix);

    sql =
	sqlite3_mprintf
	("create VIRTUAL TABLE %s USING VirtualShape(\"shapetest1\", UTF-8, 4326);",
	 table);
    ret = sqlite3_exec (db_handle, sql, NULL, NULL, &err_msg);
................................................................................
      {
	  fprintf (stderr, "DROP TABLE error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }

    sqlite3_free (table);
#endif /* end ICONV conditional */

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);

    ret = system ("cp sql_stmt_tests/testdb1.sqlite testdb1.sqlite");
    if (ret != 0)
      {
................................................................................
      {
	  fprintf (stderr, "cannot remove testdb1 database\n");
	  return -39;
      }

    free (suffix);






    spatialite_shutdown ();
    return 0;
}

Deleted test/check_virtualknn.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
/*

 check_virtualknn.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2015
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_GEOS		/* GEOS is supported */
#ifndef OMIT_KNN		/* only if KNN is enabled */

static int
create_table (sqlite3 * sqlite)
{
/* creating a test table */
    int ret;
    char *err_msg = NULL;
    const char *sql;

    sql = "CREATE TABLE points (id INTEGER PRIMARY KEY AUTOINCREMENT)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE TABLE \"points\" error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql = "SELECT AddGeometryColumn('points', 'geom', 32632, 'POINT', 'XY')";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "AddGeometryColumn \"points.geom\" error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql = "SELECT CreateSpatialIndex('points', 'geom')";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateSpatialIndex \"points.geom\" error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
populate_table (sqlite3 * sqlite)
{
/* creating a test table */
    int ret;
    char *err_msg = NULL;
    const char *sql;
    sqlite3_stmt *stmt;
    double x;
    double y;

    sql = "INSERT INTO points VALUES (NULL, MakePoint(?, ?, 32632))";
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
	return 0;

    ret = sqlite3_exec (sqlite, "BEGIN", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "BEGIN TRANSACTION error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    for (y = 4000000.0; y < 4001000.0; y += 20.0)
      {
	  for (x = 100000.0; x < 101000.0; x += 20.0)
	    {
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_double (stmt, 1, x);
		sqlite3_bind_double (stmt, 2, y);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      fprintf (stderr, "INSERT error: %s\n",
			       sqlite3_errmsg (sqlite));
		      goto end;
		  }
	    }
      }
    for (y = 4000501.0; y < 4001000.0; y += 10.0)
      {
	  for (x = 100501.0; x < 101000.0; x += 10.0)
	    {
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_double (stmt, 1, x);
		sqlite3_bind_double (stmt, 2, y);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      fprintf (stderr, "INSERT error: %s\n",
			       sqlite3_errmsg (sqlite));
		      goto end;
		  }
	    }
      }
    for (y = 4000750.5; y < 4001000.0; y += 5.0)
      {
	  for (x = 100750.5; x < 101000.0; x += 5.0)
	    {
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_double (stmt, 1, x);
		sqlite3_bind_double (stmt, 2, y);
		ret = sqlite3_step (stmt);
		if (ret == SQLITE_DONE || ret == SQLITE_ROW)
		    ;
		else
		  {
		      fprintf (stderr, "INSERT error: %s\n",
			       sqlite3_errmsg (sqlite));
		      goto end;
		  }
	    }
      }

    ret = sqlite3_exec (sqlite, "COMMIT", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "COMMIT TRANSACTION error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

  end:
    sqlite3_finalize (stmt);
    return 1;
}

static int
add_second_geom (sqlite3 * sqlite)
{
/* adding a second geometry column */
    int ret;
    char *err_msg = NULL;
    const char *sql;

    sql = "SELECT AddGeometryColumn('points', 'geometry', 4326, 'POINT', 'XY')";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "AddGeometryColumn \"points.geometry\" error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql = "UPDATE points SET geometry = ST_Transform(geom, 4326)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "UPDATE \"knn\" error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
add_second_rtree (sqlite3 * sqlite)
{
/* adding a second geometry Spatial Index */
    int ret;
    char *err_msg = NULL;
    const char *sql;

    sql = "SELECT CreateSpatialIndex('points', 'geometry')";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateSpatialIndex \"points.geometry\" error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
create_knn (sqlite3 * sqlite)
{
/* creating a test table */
    int ret;
    char *err_msg = NULL;
    const char *sql;

    sql = "CREATE VIRTUAL TABLE knn USING VirtualKNN ()";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE VIRTUAL TABLE \"knn\" error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
create_spatial_view_1 (sqlite3 * sqlite)
{
/* creating the first Spatial View */
    int ret;
    char *err_msg = NULL;
    const char *sql;

    sql = "CREATE VIEW view_1 AS SELECT id AS rowid, geom AS geom FROM points";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE VIEW \"view_1\" error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql =
	"INSERT INTO views_geometry_columns VALUES('view_1', 'geom', 'rowid', 'points', 'geom', 1)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Register SpatialView \"view_1\" error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
create_spatial_view_2 (sqlite3 * sqlite)
{
/* creating the second Spatial View */
    int ret;
    char *err_msg = NULL;
    const char *sql;

    sql =
	"CREATE VIEW view_2 AS SELECT id AS rowid, geometry AS geom FROM points";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CREATE VIEW \"view_2\" error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    sql =
	"INSERT INTO views_geometry_columns VALUES('view_2', 'geom', 'rowid', 'points', 'geometry', 1)";
    ret = sqlite3_exec (sqlite, sql, NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Register SpatialView \"view_2\" error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  return 0;
      }

    return 1;
}

static int
test_knn (sqlite3 * sqlite, int mode)
{
/* testing a resultset */
    int ret;
    const char *sql;
    sqlite3_stmt *stmt = NULL;
    double x;
    double y;
    int rows = 0;

    switch (mode)
      {
      case 0:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'DB=main.points' AND ref_geometry = MakePoint(?, ?)";
	  break;
      case 1:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'points' AND f_geometry_column = 'geom' "
	      "AND ref_geometry = MakePoint(?, ?) AND max_items = 32632";
	  break;
      case 2:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'points' AND f_geometry_column = 'geomx' "
	      "AND ref_geometry = MakePoint(?, ?)";
	  break;
      case 3:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'pointsx' AND ref_geometry = MakePoint(?, ?)";
	  break;
      case 4:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'points' AND f_geometry_column = 'geometry' "
	      "AND ref_geometry = ST_Transform(MakePoint(?, ?, 32632), 4326) AND max_items = -10";
	  break;
      case 5:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'view_1' AND ref_geometry = MakePoint(?, ?)";
	  break;
      case 6:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'view_2' AND f_geometry_column = 'geom' "
	      "AND ref_geometry = ST_Transform(MakePoint(?, ?, 32632), 4326)";
	  break;
      case 7:
	  sql =
	      "SELECT * FROM knn WHERE f_table_name = 'points' AND ref_geometry = MakePoint(?, ?) "
	      "AND max_items = 10";
	  break;
      };
    ret = sqlite3_prepare_v2 (sqlite, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "SELECT FROM \"knn\": \"%s\"\n",
		   sqlite3_errmsg (sqlite));
	  return 0;
      }

    for (y = 3800000.25; y < 4002000.0; y += 12345.12345)
      {
	  for (x = 80000.25; x < 102000.0; x += 12345.12345)
	    {
		sqlite3_reset (stmt);
		sqlite3_clear_bindings (stmt);
		sqlite3_bind_double (stmt, 1, x);
		sqlite3_bind_double (stmt, 2, y);
		while (1)
		  {
		      /* scrolling the result set rows */
		      ret = sqlite3_step (stmt);
		      if (ret == SQLITE_DONE)
			  break;	/* end of result set */
		      if (ret == SQLITE_ROW)
			{
			    if (sqlite3_column_type (stmt, 0) == SQLITE_TEXT
				&& sqlite3_column_type (stmt, 1) == SQLITE_TEXT
				&& sqlite3_column_type (stmt, 2) == SQLITE_BLOB
				&& sqlite3_column_type (stmt,
							3) == SQLITE_INTEGER
				&& sqlite3_column_type (stmt,
							4) == SQLITE_INTEGER
				&& sqlite3_column_type (stmt,
							5) == SQLITE_INTEGER
				&& sqlite3_column_type (stmt,
							6) == SQLITE_FLOAT)
				;
			    else
				goto error;
			    rows++;
			}
		      else
			  goto error;
		  }
	    }
      }
    if (!rows)
	goto error;
    sqlite3_finalize (stmt);
    return 1;

  error:
    if (stmt != NULL)
	sqlite3_finalize (stmt);
    return 0;
}

#endif
#endif

int
main (int argc, char *argv[])
{
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
	  sqlite3_close (db_handle);
	  db_handle = NULL;
	  return -1;
      }

    spatialite_init_ex (db_handle, cache, 0);

#ifndef OMIT_GEOS		/* GEOS is supported */
#ifndef OMIT_KNN		/* only if KNN is enabled */

    ret =
	sqlite3_exec (db_handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (db_handle);
	  return -2;
      }

/* Creating and populating the test table */
    ret = create_table (db_handle);
    if (!ret)
      {
	  sqlite3_close (db_handle);
	  return -3;
      }
    ret = populate_table (db_handle);
    if (!ret)
      {
	  sqlite3_close (db_handle);
	  return -4;
      }

/* Creating the VirtualKNN table */
    ret = create_knn (db_handle);
    if (ret)
      {
	  fprintf (stderr, "CREATE VIRTUAL TABLE knn: expected failure !!!\n");
	  sqlite3_close (db_handle);
	  return -5;
      }

/* Testing KNN - #1 */
    ret = test_knn (db_handle, 0);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #1: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -6;
      }

/* Testing KNN - #2 */
    ret = test_knn (db_handle, 1);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #2: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -7;
      }

/* Testing KNN - #3 */
    ret = test_knn (db_handle, 2);
    if (ret)
      {
	  fprintf (stderr, "Check KNN #3: unexpected success\n");
	  sqlite3_close (db_handle);
	  return -8;
      }

/* creating a first SpatialView */
    ret = create_spatial_view_1 (db_handle);
    if (!ret)
      {
	  fprintf (stderr, "Create Spatial View #1: unexpected failure !!!\n");
	  sqlite3_close (db_handle);
	  return -9;
      }

/* Testing KNN - #4 */
    ret = test_knn (db_handle, 5);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #4: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -10;
      }

/* Testing KNN - #5 */
    ret = test_knn (db_handle, 7);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #5: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -11;
      }

/* adding a second geometry column */
    ret = add_second_geom (db_handle);
    if (!ret)
      {
	  fprintf (stderr, "Add Second Geometry: unexpected failure !!!\n");
	  sqlite3_close (db_handle);
	  return -12;
      }

/* Testing KNN - #6 */
    ret = test_knn (db_handle, 3);
    if (ret)
      {
	  fprintf (stderr, "Check KNN #6: unexpected success\n");
	  sqlite3_close (db_handle);
	  return -13;
      }

/* Testing KNN - #7 */
    ret = test_knn (db_handle, 1);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #7: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -14;
      }

/* Testing KNN - #8 */
    ret = test_knn (db_handle, 4);
    if (ret)
      {
	  fprintf (stderr, "Check KNN #8: unexpected success\n");
	  sqlite3_close (db_handle);
	  return -15;
      }

/* creating a second SpatialIndex */
    ret = add_second_rtree (db_handle);
    if (!ret)
      {
	  fprintf (stderr,
		   "Add Second Spatial Index: unexpected failure !!!\n");
	  sqlite3_close (db_handle);
	  return -16;
      }

/* Testing KNN - #9 */
    ret = test_knn (db_handle, 4);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #9: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -17;
      }

/* creating a second SpatialView */
    ret = create_spatial_view_2 (db_handle);
    if (!ret)
      {
	  fprintf (stderr, "Create Spatial View #2: unexpected failure !!!\n");
	  sqlite3_close (db_handle);
	  return -18;
      }

/* Testing KNN - #10 */
    ret = test_knn (db_handle, 6);
    if (!ret)
      {
	  fprintf (stderr, "Check KNN #10: unexpected failure\n");
	  sqlite3_close (db_handle);
	  return -19;
      }

#endif /* end KNN conditional */
#endif /* end GEOS conditional */

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
    spatialite_shutdown ();

    return 0;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_virtualtable1.c.

48
49
50
51
52
53
54




55
56
57
58
59
60
61
62
63
64
65
66
67



68
69
70
71
72
73
74
..
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
480
481
482
483
484
485
486
487
488
489
490
491
492
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"





int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualText error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    sql_statement =
	sqlite3_mprintf
	("select col003, col005, col006, col008 from places WHERE col003 = \"Canal Creek\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 2) || (columns != 4))
................................................................................
	  return -47;
      }

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>
>













>
>
>







 







|
<
|



|







 







<
<
<



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
..
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110
111
112
...
486
487
488
489
490
491
492



493
494
495
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualText error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    asprintf (&sql_statement,

	      "select col003, col005, col006, col008 from places WHERE col003 = \"Canal Creek\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 2) || (columns != 4))
................................................................................
	  return -47;
      }

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_virtualtable2.c.

49
50
51
52
53
54
55




56
57
58
59
60
61
62
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
...
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
...
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
...
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
...
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
...
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
...
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
...
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
...
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
...
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
...
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
...
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
...
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
...
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
....
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
....
1146
1147
1148
1149
1150
1151
1152



1153
1154
1155
1156
1157
1158
1159
....
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"





int
do_test (sqlite3 * db_handle)
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
................................................................................
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualShape error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    ret =
	sqlite3_exec (db_handle, "SELECT GetShapefileExtent('shapetest');",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "GetShapefileExtent() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -222;
      }

    ret =
	sqlite3_get_table (db_handle,
			   "SELECT RegisterVirtualGeometry('shapetest')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "RegisterVirtualGeometry error: %s\n", err_msg);
................................................................................
		   "RegisterVirtualGeometry Unexpected error: header() bad result: %s.\n",
		   results[0]);
	  return -5;
      }
    sqlite3_free_table (results);


    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 < 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -6;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -11;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 <= 19;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -12;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -17;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 = 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -18;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -23;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 > 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -24;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -29;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 >= 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -34;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 < \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -35;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -40;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 <= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -41;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "BEGIN error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -47;
      }

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 > \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -48;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ROLLBACK error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -55;
      }

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 >= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -56;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -61;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 = \"windward\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -62;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -67;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID = 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -68;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -73;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID < 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -74;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -79;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID <= 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -80;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -85;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID > 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -86;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -91;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID >= 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -92;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -97;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select PKUID, testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 LIKE \"wind%%\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -98;
      }
    if ((rows != 1) || (columns != 4))
      {
	  fprintf (stderr,
		   "Unexpected error: select columns bad result: %i/%i.\n",
		   rows, columns);
	  return -99;
      }
    if (strcmp (results[0], "pkuid") != 0)
      {
	  fprintf (stderr, "Unexpected error: header uid bad result: %s.\n",
		   results[0]);
	  return -100;
      }
    if (strcmp (results[1], "testcase1") != 0)
      {
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VACUUM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (db_handle);
	  return -132;
      }
#else
    if (db_handle != NULL)
	db_handle = NULL;	/* silencing stupid compiler warnings */
#endif /* end ICONV conditional */

    return 0;
}

int
main (int argc, char *argv[])
................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();




/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -20;
      }

#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>
>







 







<
<
<
<
<
<
<
<
<
<
<







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|













|







 







<
<
<







 







>
>
>







 







<
<
<



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
..
74
75
76
77
78
79
80











81
82
83
84
85
86
87
...
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118
119
120
...
146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164
165
...
191
192
193
194
195
196
197
198

199
200
201
202
203
204
205
206
207
208
209
210
...
236
237
238
239
240
241
242
243

244
245
246
247
248
249
250
251
252
253
254
255
...
281
282
283
284
285
286
287
288

289
290
291
292
293
294
295
296
297
298
299
300
...
326
327
328
329
330
331
332
333

334
335
336
337
338
339
340
341
342
343
344
345
...
371
372
373
374
375
376
377
378

379
380
381
382
383
384
385
386
387
388
389
390
...
425
426
427
428
429
430
431
432

433
434
435
436
437
438
439
440
441
442
443
444
...
489
490
491
492
493
494
495
496

497
498
499
500
501
502
503
504
505
506
507
508
...
534
535
536
537
538
539
540
541

542
543
544
545
546
547
548
549
550
551
552
553
...
579
580
581
582
583
584
585
586

587
588
589
590
591
592
593
594
595
596
597
598
...
624
625
626
627
628
629
630
631

632
633
634
635
636
637
638
639
640
641
642
643
...
669
670
671
672
673
674
675
676

677
678
679
680
681
682
683
684
685
686
687
688
...
714
715
716
717
718
719
720
721

722
723
724
725
726
727
728
729
730
731
732
733
...
759
760
761
762
763
764
765
766

767
768
769
770
771
772
773
774
775
776
777
778
...
804
805
806
807
808
809
810
811

812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
....
1106
1107
1108
1109
1110
1111
1112



1113
1114
1115
1116
1117
1118
1119
....
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
....
1201
1202
1203
1204
1205
1206
1207



1208
1209
1210
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

int
do_test (sqlite3 * db_handle)
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
................................................................................
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualShape error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }











    ret =
	sqlite3_get_table (db_handle,
			   "SELECT RegisterVirtualGeometry('shapetest')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "RegisterVirtualGeometry error: %s\n", err_msg);
................................................................................
		   "RegisterVirtualGeometry Unexpected error: header() bad result: %s.\n",
		   results[0]);
	  return -5;
      }
    sqlite3_free_table (results);


    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 < 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -6;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -11;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 <= 19;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -12;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -17;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 = 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -18;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -23;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 > 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -24;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -29;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase2 >= 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -34;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 < \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -35;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -40;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 <= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -41;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "BEGIN error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -47;
      }

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 > \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -48;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ROLLBACK error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -55;
      }

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 >= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -56;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -61;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 = \"windward\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -62;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -67;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID = 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -68;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -73;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID < 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -74;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -79;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID <= 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -80;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -85;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID > 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -86;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -91;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2, AsText(Geometry) from shapetest where PKUID >= 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -92;
      }
    if ((rows != 1) || (columns != 3))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: geometry() bad result: %s.\n",
		   results[5]);
	  return -97;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select PKUID, testcase1, testcase2, AsText(Geometry) from shapetest where testcase1 LIKE \"wind%%\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -98;
      }
    if ((rows != 1) || (columns != 4))
      {
	  fprintf (stderr,
		   "Unexpected error: select columns bad result: %i/%i.\n",
		   rows, columns);
	  return -99;
      }
    if (strcmp (results[0], "PKUID") != 0)
      {
	  fprintf (stderr, "Unexpected error: header uid bad result: %s.\n",
		   results[0]);
	  return -100;
      }
    if (strcmp (results[1], "testcase1") != 0)
      {
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VACUUM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (db_handle);
	  return -132;
      }



#endif /* end ICONV conditional */

    return 0;
}

int
main (int argc, char *argv[])
................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    int ret;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -20;
      }

#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_virtualtable3.c.

48
49
50
51
52
53
54




55
56
57
58
59
60
61
62
63
64
65
66
67



68
69
70
71
72
73
74
..
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
...
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
...
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
...
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
...
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
...
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
...
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
...
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
...
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
...
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
...
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
...
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
...
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
...
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
...
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
...
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"





int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualDBF error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase2 < 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -3;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -7;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase2 <= 19;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -14;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase2 = 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -16;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer2() bad result: %s.\n",
		   results[3]);
	  return -20;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase2 > 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -22;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer4() bad result: %s.\n",
		   results[3]);
	  return -26;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase2 >= 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -28;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer5() bad result: %s.\n",
		   results[3]);
	  return -32;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase1 < \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -34;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -38;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase1 <= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -40;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "BEGIN error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -46;
      }

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase1 > \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -48;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ROLLBACK error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -47;
      }

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase1 >= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -54;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -58;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where testcase1 = \"windward\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -54;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -58;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where PKUID = 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -60;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -64;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where PKUID < 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -66;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -70;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where PKUID <= 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -72;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -76;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where PKUID > 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -78;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -82;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select testcase1, testcase2 from dbftest where PKUID >= 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -84;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -88;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select PKUID, testcase1, testcase2 from dbftest where testcase1 LIKE \"wind%%\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -90;
      }
    if ((rows != 1) || (columns != 3))
      {
	  fprintf (stderr,
		   "Unexpected error: select columns bad result: %i/%i.\n",
		   rows, columns);
	  return -91;
      }
    if (strcmp (results[0], "pkuid") != 0)
      {
	  fprintf (stderr, "Unexpected error: header uid bad result: %s.\n",
		   results[0]);
	  return -92;
      }
    if (strcmp (results[1], "testcase1") != 0)
      {
................................................................................
	  fprintf (stderr, "VirtualDBF unexpected result: %i\n", ret);
	  return -95;
      }
    sqlite3_free (err_msg);

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE toomanyargs USING VirtualDBF(\"shapetest1.dbf\", UTF-8, 1, UPPER, 1);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_ERROR)
      {
	  fprintf (stderr, "2 VirtualDBF unexpected result: %i\n", ret);
	  return -96;
      }
    sqlite3_free (err_msg);

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE nosuchfile USING VirtualDBF(\"not_a_file.dbf\", UTF-8);",
................................................................................

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE onesidedquote USING VirtualDBF('shapetest1.dbf, UTF-8);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_ERROR)
      {
	  fprintf (stderr, "3 VirtualDBF unexpected result: %i\n", ret);
	  return -101;
      }
    sqlite3_free (err_msg);

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>
>













>
>
>







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|













|







 







|



|







 







|








<
<
<



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
..
93
94
95
96
97
98
99
100

101
102
103
104
105
106
107
108
109
110
111
112
...
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
148
149
150
151
...
171
172
173
174
175
176
177
178

179
180
181
182
183
184
185
186
187
188
189
190
...
210
211
212
213
214
215
216
217

218
219
220
221
222
223
224
225
226
227
228
229
...
249
250
251
252
253
254
255
256

257
258
259
260
261
262
263
264
265
266
267
268
...
288
289
290
291
292
293
294
295

296
297
298
299
300
301
302
303
304
305
306
307
...
327
328
329
330
331
332
333
334

335
336
337
338
339
340
341
342
343
344
345
346
...
374
375
376
377
378
379
380
381

382
383
384
385
386
387
388
389
390
391
392
393
...
432
433
434
435
436
437
438
439

440
441
442
443
444
445
446
447
448
449
450
451
...
471
472
473
474
475
476
477
478

479
480
481
482
483
484
485
486
487
488
489
490
...
510
511
512
513
514
515
516
517

518
519
520
521
522
523
524
525
526
527
528
529
...
549
550
551
552
553
554
555
556

557
558
559
560
561
562
563
564
565
566
567
568
...
588
589
590
591
592
593
594
595

596
597
598
599
600
601
602
603
604
605
606
607
...
627
628
629
630
631
632
633
634

635
636
637
638
639
640
641
642
643
644
645
646
...
666
667
668
669
670
671
672
673

674
675
676
677
678
679
680
681
682
683
684
685
...
705
706
707
708
709
710
711
712

713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
...
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
...
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839



840
841
842
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualDBF error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase2 < 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -3;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -7;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase2 <= 19;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -14;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase2 = 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -16;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer2() bad result: %s.\n",
		   results[3]);
	  return -20;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase2 > 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -22;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer4() bad result: %s.\n",
		   results[3]);
	  return -26;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase2 >= 20;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -28;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer5() bad result: %s.\n",
		   results[3]);
	  return -32;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase1 < \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -34;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -38;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase1 <= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -40;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "BEGIN error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -46;
      }

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase1 > \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -48;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "ROLLBACK error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -47;
      }

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase1 >= \"p\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -54;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -58;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where testcase1 = \"windward\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -54;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -58;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where PKUID = 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -60;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -64;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where PKUID < 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -66;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -70;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where PKUID <= 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -72;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -76;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where PKUID > 1;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -78;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -82;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select testcase1, testcase2 from dbftest where PKUID >= 2;");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -84;
      }
    if ((rows != 1) || (columns != 2))
................................................................................
      {
	  fprintf (stderr, "Unexpected error: integer() bad result: %s.\n",
		   results[3]);
	  return -88;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select PKUID, testcase1, testcase2 from dbftest where testcase1 LIKE \"wind%%\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -90;
      }
    if ((rows != 1) || (columns != 3))
      {
	  fprintf (stderr,
		   "Unexpected error: select columns bad result: %i/%i.\n",
		   rows, columns);
	  return -91;
      }
    if (strcmp (results[0], "PKUID") != 0)
      {
	  fprintf (stderr, "Unexpected error: header uid bad result: %s.\n",
		   results[0]);
	  return -92;
      }
    if (strcmp (results[1], "testcase1") != 0)
      {
................................................................................
	  fprintf (stderr, "VirtualDBF unexpected result: %i\n", ret);
	  return -95;
      }
    sqlite3_free (err_msg);

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE toomanyargs USING VirtualDBF(\"shapetest1.dbf\", UTF-8, 1, 1);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_ERROR)
      {
	  fprintf (stderr, "VirtualDBF unexpected result: %i\n", ret);
	  return -96;
      }
    sqlite3_free (err_msg);

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE nosuchfile USING VirtualDBF(\"not_a_file.dbf\", UTF-8);",
................................................................................

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE onesidedquote USING VirtualDBF('shapetest1.dbf, UTF-8);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_ERROR)
      {
	  fprintf (stderr, "VirtualDBF unexpected result: %i\n", ret);
	  return -101;
      }
    sqlite3_free (err_msg);

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_virtualtable4.c.

46
47
48
49
50
51
52




53
54
55
56
57
58
59
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116



117
118
119
120
121
122
123
...
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
...
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
...
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
...
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"





struct test_step
{
    const char *sql;
    const int num_rows;
};

................................................................................
    {"select rowid, col_4, col_5 from xltest where col_4 = -26;", 1},
};

int
main (int argc, char *argv[])
{
#ifndef OMIT_FREEXL		/* only if FreeXL is supported */
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualXL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    sql_statement =
	sqlite3_mprintf
	("select col_2, col_4, col_5, col_7, rowid from xltest WHERE col_2 = \"Canal Creek\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 2) || (columns != 5))
................................................................................
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualXL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }
    sql_statement =
	sqlite3_mprintf
	("select row_no, place, lat, lon, rowid from sheet2 WHERE place = \"Canal Creek\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -31;
      }
    if ((rows != 4) || (columns != 5))
................................................................................
	  fprintf (stderr,
		   "Unexpected error: sheet2() bad result place2: %s.\n",
		   results[11]);
	  return -37;
      }
    sqlite3_free_table (results);

    sql_statement =
	sqlite3_mprintf
	("select row_no, place, lat, lon, rowid from sheet2 WHERE row_no = 16");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    sqlite3_free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -38;
      }
    if ((rows != 1) || (columns != 5))
................................................................................
	  fprintf (stderr, "VirtualXL unexpected result: %i\n", ret);
	  return -49;
      }
    sqlite3_free (err_msg);

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */
#endif /* end FreeXL conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>
>







 







<










>
>
>







 







|
<
|



|







 







|
<
|



|







 







|
<
|



|







 







<


<
<
<



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
...
103
104
105
106
107
108
109

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
141
142
143
144
145
146
147
148

149
150
151
152
153
154
155
156
157
158
159
160
...
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311
312
313
314
315
316
...
349
350
351
352
353
354
355
356

357
358
359
360
361
362
363
364
365
366
367
368
...
450
451
452
453
454
455
456

457
458



459
460
461
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef _WIN32
#include "asprintf4win.h"
#endif

struct test_step
{
    const char *sql;
    const int num_rows;
};

................................................................................
    {"select rowid, col_4, col_5 from xltest where col_4 = -26;", 1},
};

int
main (int argc, char *argv[])
{
#ifndef OMIT_FREEXL		/* only if FreeXL is supported */

    sqlite3 *db_handle = NULL;
    char *sql_statement;
    int ret;
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualXL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -2;
      }

    asprintf (&sql_statement,

	      "select col_2, col_4, col_5, col_7, rowid from xltest WHERE col_2 = \"Canal Creek\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -10;
      }
    if ((rows != 2) || (columns != 5))
................................................................................
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VirtualXL error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -30;
      }
    asprintf (&sql_statement,

	      "select row_no, place, lat, lon, rowid from sheet2 WHERE place = \"Canal Creek\";");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -31;
      }
    if ((rows != 4) || (columns != 5))
................................................................................
	  fprintf (stderr,
		   "Unexpected error: sheet2() bad result place2: %s.\n",
		   results[11]);
	  return -37;
      }
    sqlite3_free_table (results);

    asprintf (&sql_statement,

	      "select row_no, place, lat, lon, rowid from sheet2 WHERE row_no = 16");
    ret =
	sqlite3_get_table (db_handle, sql_statement, &results, &rows, &columns,
			   &err_msg);
    free (sql_statement);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  return -38;
      }
    if ((rows != 1) || (columns != 5))
................................................................................
	  fprintf (stderr, "VirtualXL unexpected result: %i\n", ret);
	  return -49;
      }
    sqlite3_free (err_msg);

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);

#endif /* end FreeXL conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_virtualtable5.c.

98
99
100
101
102
103
104



105
106
107
108
109
110
111
...
193
194
195
196
197
198
199
200
201
202
203
204
205
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
	  return -9;
      }

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
...
196
197
198
199
200
201
202



203
204
205
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
	  return -9;
      }

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_virtualtable6.c.

99
100
101
102
103
104
105



106
107
108
109
110
111
112
...
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
	  fprintf (stderr, "VirtualShape unexpected result: %i\n", ret);
	  return -14;
      }
    sqlite3_free (err_msg);

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE toomanyargs USING VirtualShape(\"shapetest1\", UTF8, 4386, 1, UPPER, 1);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_ERROR)
      {
	  fprintf (stderr, "VirtualShape unexpected result: %i\n", ret);
	  return -15;
      }
    sqlite3_free (err_msg);

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







|












<
<
<



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
...
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269



270
271
272
    char *err_msg = NULL;
    int i;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
	  fprintf (stderr, "VirtualShape unexpected result: %i\n", ret);
	  return -14;
      }
    sqlite3_free (err_msg);

    ret =
	sqlite3_exec (db_handle,
		      "create VIRTUAL TABLE toomanyargs USING VirtualShape(\"shapetest1\", UTF8, 4386, 1, 1);",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_ERROR)
      {
	  fprintf (stderr, "VirtualShape unexpected result: %i\n", ret);
	  return -15;
      }
    sqlite3_free (err_msg);

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_virtualxpath.c.

47
48
49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
...
100
101
102
103
104
105
106
107
108


109

110
111
112
113
114
115
116
...
118
119
120
121
122
123
124



125
126
127
128
129
130
131
...
621
622
623
624
625
626
627
628
629
630
631
632
633
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */

static int
load_xml (void *cache, sqlite3 * db_handle, sqlite3_stmt * stmt,
	  const char *path)
{

/* loading an XMLDocument into the DB */
    FILE *fl;
    int sz = 0;
    int rd;
    unsigned char *xml = NULL;
    unsigned char *p_result = NULL;
    int len;
................................................................................
    sqlite3_bind_blob (stmt, 1, p_result, len, free);
    sqlite3_bind_text (stmt, 2, path, strlen (path), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;
    fprintf (stderr, "INSERT error: %s\n", sqlite3_errmsg (db_handle));
    return 0;
}



#endif


int
main (int argc, char *argv[])
{
#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    sqlite3 *db_handle = NULL;
    sqlite3_stmt *stmt;
................................................................................
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
      }

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);

#endif /* end LIBXML2 conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







<
<




>







 







<
<
>
>

>







 







>
>
>







 







<
<
<



47
48
49
50
51
52
53


54
55
56
57
58
59
60
61
62
63
64
65
..
99
100
101
102
103
104
105


106
107
108
109
110
111
112
113
114
115
116
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
624
625
626
627
628
629
630



631
632
633
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"



static int
load_xml (void *cache, sqlite3 * db_handle, sqlite3_stmt * stmt,
	  const char *path)
{
#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
/* loading an XMLDocument into the DB */
    FILE *fl;
    int sz = 0;
    int rd;
    unsigned char *xml = NULL;
    unsigned char *p_result = NULL;
    int len;
................................................................................
    sqlite3_bind_blob (stmt, 1, p_result, len, free);
    sqlite3_bind_text (stmt, 2, path, strlen (path), SQLITE_STATIC);
    ret = sqlite3_step (stmt);
    if (ret == SQLITE_DONE || ret == SQLITE_ROW)
	return 1;
    fprintf (stderr, "INSERT error: %s\n", sqlite3_errmsg (db_handle));
    return 0;


#else
    return -1;			/* no support */
#endif
}

int
main (int argc, char *argv[])
{
#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    sqlite3 *db_handle = NULL;
    sqlite3_stmt *stmt;
................................................................................
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &db_handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (db_handle));
................................................................................
      }

    sqlite3_close (db_handle);
    spatialite_cleanup_ex (cache);

#endif /* end LIBXML2 conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/check_wfsin.c.

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
#ifdef ENABLE_LIBXML2		/* only if LIBXML2 is supported */
    int row_count;
    int count;
    int srid;
    gaiaWFScatalogPtr catalog = NULL;
    gaiaWFSitemPtr lyr;
    gaiaWFSschemaPtr schema;
    gaiaWFScolumnPtr column;
    char *str;
    const char *name;
    int type;
    int dims;
    int nillable;
#endif
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,







<












<







53
54
55
56
57
58
59

60
61
62
63
64
65
66
67
68
69
70
71

72
73
74
75
76
77
78

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;

    int row_count;
    int count;
    int srid;
    gaiaWFScatalogPtr catalog = NULL;
    gaiaWFSitemPtr lyr;
    gaiaWFSschemaPtr schema;
    gaiaWFScolumnPtr column;
    char *str;
    const char *name;
    int type;
    int dims;
    int nillable;

    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,

Deleted test/check_wms.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
/*

 check_wms.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2016
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

static int
do_level0_tests (sqlite3 * handle, int *retcode)
{
/* performing Level 0 tests */
    int ret;
    char *err_msg = NULL;
    char **results;
    int rows;
    int columns;
    const char *url;

/* creating WMS support tables */
    ret =
	sqlite3_get_table (handle, "SELECT WMS_CreateTables()", &results, &rows,
			   &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_CreateTables() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -21;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "WMS_CreateTables() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -22;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_CreateTables() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -23;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a first WMS GetCapabilities */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetCapabilities('urlcapab_alpha')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetCapability() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -24;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetCapability() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -25;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetCapability() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -26;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a second WMS GetCapabilities */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetCapabilities('urlcapab_beta')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetCapability() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -27;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetCapability() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -28;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetCapability() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -29;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a third WMS GetCapabilities */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetCapabilities('urlcapab_gamma', 'title', 'abstract')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetCapability() #3 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -30;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetCapability() #3 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -31;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetCapability() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -32;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering few WMS GetMap related to the first WMS GetCapabilities */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetMap('urlcapab_alpha', 'urlmap_alpha_zero', 'layer', '1.3.0', 'EPSG:3003', 'image/jpeg', 'default', 2, 2)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -33;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetMap() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -34;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -35;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetMap('urlcapab_alpha', 'urlmap_alpha_one', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -36;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetMap() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -37;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -38;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetMap('urlcapab_alpha', 'urlmap_alpha_two', 'layer', '1.3.0', 'EPSG:3003', 'image/jpeg', 'rgb', 0, 0)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -39;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetMap() #3 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -40;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -41;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering a WMS GetMap related to the second WMS GetCapabilities */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetMap('urlcapab_beta', 'urlmap_beta', 'layer', 'title', 'abstract', '1.1.1', 'EPSG:4326', 'image/jpeg', 'default', -1, -1, 1, 1, 64, 64, 'ffffff', 1, 'getfeatureinfo')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -42;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetMap() #4 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -43;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #4 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -44;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering few WMS GetMap related to the third WMS GetCapabilities */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetMap('urlcapab_gamma', 'urlmap_gamma_zero', 'layer', '1.3.0', 'EPSG:3003', 'image/jpeg', 'default', 0, 0)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -45;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetMap() #5 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -46;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #5 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -47;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterGetMap('urlcapab_gamma', 'urlmap_gamma_one', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, -1, 6000, 6000)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #6 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -48;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterGetMap() #6 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -49;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterGetMap() #6 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -50;
	  return 0;
      }
    sqlite3_free_table (results);

/* registering few WMS GetMap Settings */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterSetting('urlmap_gamma_zero', 'layer', 'VERSION', '1.1.0');"
			   "SELECT WMS_RegisterSetting('urlmap_gamma_zero', 'layer', 'FORMAT', 'image/jpeg')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterSetting() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -51;
	  return 0;
      }
    if (rows != 2 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterSetting() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -52;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1 || atoi (*(results + 2)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterSetting() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -53;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterSetting('urlmap_gamma_zero', 'layer', 'FORMAT', 'image/png')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterSetting() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -54;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterSetting() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -55;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterSetting() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -56;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterRefSys('urlmap_gamma_zero', 'layer', 'EPSG:3004', 1000.5, 1001.5, 2000.5, 2001.5);"
			   "SELECT WMS_RegisterRefSys('urlmap_gamma_zero', 'layer', 'EPSG:3003', 2000.5, 2001.5, 3000.5, 3001.5)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterRefSys() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -57;
	  return 0;
      }
    if (rows != 2 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterRefSys() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -58;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1 || atoi (*(results + 2)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterRefSys() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -59;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterRefSys('urlmap_gamma_zero', 'layer', 'EPSG:4326', 30, 60, 35, 65, 1)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterRefSys() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -60;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterRefSys() #2 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -61;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterRefSys() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -62;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_RegisterSetting('urlmap_gamma_zero', 'layer', 'STYLE', 'gray', 3)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_RegisterSetting() #5 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -63;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_RegisterSetting() #5 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -64;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_RegisterSetting() #5 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -65;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing WMS GetCapabilities Info */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetCapabilitiesInfos('urlcapab_alpha', 'new title', 'new abstract')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetCapabilitiesInfos() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -66;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetCapabilitiesInfos() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -67;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetCapabilitiesInfos() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -68;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing WMS GetMap Info */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapInfos('urlmap_alpha_zero', 'layer', 'new title', 'new abstract')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapInfos() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -69;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapInfos() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -70;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapInfos() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -71;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating a WMS GetMap Default Setting */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_DefaultSetting('urlmap_gamma_zero', 'layer', 'FORMAT', 'image/jpeg')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_DefaultSetting() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -72;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_DefaultSetting() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -73;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_DefaultSetting() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -74;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating a WMS GetMap Default Setting */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_DefaultRefSys('urlmap_gamma_zero', 'layer', 'EPSG:3004')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_DefaultRefSys() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -75;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_DefaultRefSys() #1 error: rows=%d columns=%d\n", rows,
		   columns);
	  sqlite3_free_table (results);
	  *retcode = -76;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_DefaultRefSys() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -77;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a WMS GetMap Setting */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_UnRegisterSetting('urlmap_gamma_zero', 'layer', 'FORMAT', 'image/png')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_UnRegisterSetting() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -78;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_UnRegisterSetting() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -79;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_UnRegisterSetting() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -80;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a WMS GetMap SRS */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_UnRegisterRefSys('urlmap_gamma_zero', 'layer', 'EPSG:3003')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_UnRegisterRefSys() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -81;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_UnRegisterRefSys() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -82;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_UnRegisterRefSys() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -83;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a WMS GetMap */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_UnRegisterGetMap('urlmap_alpha_one', 'layer')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_UnRegisterGetMap() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -84;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_UnRegisterGetMap() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -85;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_UnRegisterGetMap() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -86;
	  return 0;
      }
    sqlite3_free_table (results);

/* deleting a WMS GetMap */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_UnRegisterGetCapabilities('urlcapab_beta')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_UnRegisterGetCapabilities() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -87;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_UnRegisterGetCapabilities() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -88;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr,
		   "WMS_UnRegisterGetCapabilities() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -89;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating WMS GetMap Options - BgColor*/
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapOptions('urlmap_alpha_two', 'layer', 'ffffd0')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapOptions() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -91;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -92;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating WMS GetMap Options - Flags*/
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapOptions('urlmap_alpha_two', 'layer', 2, 2)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapOptions() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -91;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -92;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating WMS GetMap Options - Queryable */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapOptions('urlmap_alpha_two', 'layer', 2, 'getfeatureinfo')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapOptions() #3 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -91;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -92;
	  return 0;
      }
    sqlite3_free_table (results);

/* updating WMS GetMap Options - Tiled */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapOptions('urlmap_alpha_two', 'layer', 2, 2, 64, 64)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #4 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -90;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapOptions() #4 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -91;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapOptions() #4 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -92;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing WMS GetMap request URL */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_GetMapRequestURL('urlmap_alpha_two', 'layer', 1024, 1024, 30, 40, 50, 60)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_GetMapRequestURL() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -93;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_GetMapRequestURL() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -94;
	  return 0;
      }
    url = *(results + 1);
    if (url == NULL)
      {
	  fprintf (stderr,
		   "WMS_GetMapRequestURL() #1 error: unexpected NULL\n");
	  *retcode = -95;
	  return 0;
      }
    if (strcmp
	(url,
	 "urlmap_alpha_two?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=layer&CRS=EPSG:3003&BBOX=40.000000,30.000000,60.000000,50.000000&WIDTH=1024&HEIGHT=1024&STYLES=rgb&FORMAT=image/jpeg&TRANSPARENT=TRUE&BGCOLOR=0xffffd0")
	!= 0)
      {
	  fprintf (stderr, "WMS_GetMapRequestURL() #1 unexpected result: %s\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -96;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_GetMapRequestURL('urlmap_gamma_one', 'layer', 1024, 1024, 30.5, 40.5, 50.5, 60.5)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_GetMapRequestURL() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -97;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_GetMapRequestURL() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -98;
	  return 0;
      }
    url = *(results + 1);
    if (url == NULL)
      {
	  fprintf (stderr,
		   "WMS_GetMapRequestURL() #2 error: unexpected NULL\n");
	  *retcode = -99;
	  return 0;
      }
    if (strcmp
	(url,
	 "urlmap_gamma_one?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=layer&CRS=EPSG:3003&BBOX=30.500000,40.500000,50.500000,60.500000&WIDTH=1024&HEIGHT=1024&STYLES=default&FORMAT=image/png&TRANSPARENT=TRUE")
	!= 0)
      {
	  fprintf (stderr, "WMS_GetMapRequestURL() #2 unexpected result: %s\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -100;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing WMS GetFeatureInfo request URL */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_GetFeatureInfoRequestURL('urlmap_alpha_two', 'layer', 1024, 1024, 100, 200, 30, 40, 50, 60, 33)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_GetFeatureInfoRequestURL() #1 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -101;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_GetFeatureInfoRequestURL() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -102;
	  return 0;
      }
    url = *(results + 1);
    if (url == NULL)
      {
	  fprintf (stderr,
		   "WMS_GetFeatureInfoRequestURL() #1 error: unexpected NULL\n");
	  *retcode = -103;
	  return 0;
      }
    if (strcmp
	(url,
	 "getfeatureinfo?SERVICE=WMS&REQUEST=GetFeatureInfo&VERSION=1.3.0&QUERY_LAYERS=layer&CRS=EPSG:3003&BBOX=40.000000,30.000000,60.000000,50.000000&WIDTH=1024&HEIGHT=1024&X=100&Y=200&FEATURE_COUNT=33")
	!= 0)
      {
	  fprintf (stderr,
		   "WMS_GetFeatureInfoRequestURL() #1 unexpected result: %s\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -104;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_GetFeatureInfoRequestURL('urlmap_gamma_one', 'layer', 1024, 1024, 100, 200, 30.5, 40.5, 50.5, 60.5)",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_GetFeatureInfoRequestURL() #2 error: %s\n",
		   err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -105;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_GetFeatureInfoRequestURL() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -106;
	  return 0;
      }
    url = *(results + 1);
    if (url != NULL)
      {
	  fprintf (stderr,
		   "WMS_GetFeatureInfoRequestURL() #2 unexpected result: %s\n",
		   *(results + 1));
	  sqlite3_free_table (results);
	  *retcode = -107;
	  return 0;
      }
    sqlite3_free_table (results);

/* re-creating WMS support tables */
    ret =
	sqlite3_get_table (handle, "SELECT WMS_CreateTables()", &results, &rows,
			   &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_CreateTables() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -108;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr, "WMS_CreateTables() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -109;
	  return 0;
      }
    if (atoi (*(results + 1)) != 0)
      {
	  fprintf (stderr, "WMS_CreateTables() #2 unexpected success\n");
	  sqlite3_free_table (results);
	  *retcode = -110;
	  return 0;
      }
    sqlite3_free_table (results);

/* testing WMS GetMap Copyright and License */
    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapCopyright('urlmap_alpha_zero', 'layer', 'somebody')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapCopyright() #1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -111;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapCopyright() #1 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -112;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapCopyright() #1 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -113;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapCopyright('urlmap_alpha_zero', 'layer', 'someone else', 'CC BY-SA 3.0')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapCopyright() #2 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -114;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapCopyright() #2 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -115;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapCopyright() #2 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -116;
	  return 0;
      }
    sqlite3_free_table (results);

    ret =
	sqlite3_get_table (handle,
			   "SELECT WMS_SetGetMapCopyright('urlmap_alpha_zero', 'layer', NULL, 'CC BY-SA 4.0')",
			   &results, &rows, &columns, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "WMS_SetGetMapCopyright() #3 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  *retcode = -117;
	  return 0;
      }
    if (rows != 1 || columns != 1)
      {
	  fprintf (stderr,
		   "WMS_SetGetMapCopyright() #3 error: rows=%d columns=%d\n",
		   rows, columns);
	  sqlite3_free_table (results);
	  *retcode = -118;
	  return 0;
      }
    if (atoi (*(results + 1)) != 1)
      {
	  fprintf (stderr, "WMS_SetGetMapCopyright() #3 unexpected failure\n");
	  sqlite3_free_table (results);
	  *retcode = -119;
	  return 0;
      }
    sqlite3_free_table (results);

    return 1;
}

int
main (int argc, char *argv[])
{
    int retcode = 0;
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open \":memory:\" database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

    ret = sqlite3_exec (handle, "PRAGMA foreign_keys=1", NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "PRAGMA foreign_keys=1 error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

/*tests: level 0 */
    if (!do_level0_tests (handle, &retcode))
	goto end;

  end:
    spatialite_finalize_topologies (cache);
    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);
    spatialite_shutdown ();
    return retcode;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/check_xls_load.c.

57
58
59
60
61
62
63



64
65
66
67
68
69
70
...
147
148
149
150
151
152
153
154
155
156
157
158
159
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    unsigned int row_count;
    int rcnt;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -11;
      }

    spatialite_cleanup_ex (cache);
#endif /* end FreeXL conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
150
151
152
153
154
155
156



157
158
159
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    unsigned int row_count;
    int rcnt;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory db: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -11;
      }

    spatialite_cleanup_ex (cache);
#endif /* end FreeXL conditional */




    spatialite_shutdown ();
    return 0;
}

Deleted test/elba-ln.dbf.

cannot compute difference between binary files

Deleted test/elba-ln.shp.

cannot compute difference between binary files

Deleted test/elba-ln.shx.

cannot compute difference between binary files

Deleted test/elba-pg.dbf.

cannot compute difference between binary files

Deleted test/elba-pg.shp.

cannot compute difference between binary files

Deleted test/elba-pg.shx.

cannot compute difference between binary files

Deleted test/elba-sezcen.sqlite.

cannot compute difference between binary files

Changes to test/gpkg_test.gpkg.

cannot compute difference between binary files

Changes to test/gpkg_test.sqlite.

cannot compute difference between binary files

Deleted test/gpkg_test_broken.gpkg.

cannot compute difference between binary files

Deleted test/gpkg_test_extrasrid.gpkg.

cannot compute difference between binary files

Deleted test/orbetello.sqlite.

cannot compute difference between binary files

Deleted test/routing_test.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
/*

 routing_test.c -- SpatiaLite Test Case

 Author: Sandro Furieri <a.furieri@lqt.it>

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (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.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2011
the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "sqlite3.h"
#include "spatialite.h"

#ifndef OMIT_GEOS		/* GEOS is supported */

static int
perform_bad_test (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing a generic invalid test */
    int ret;
    int result = 1;

    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		result = sqlite3_column_int (stmt, 0);
	    }
	  else
	    {
		fprintf (stderr, "CreateRouting Invalid: %s\n",
			 sqlite3_errmsg (handle));
		result = 0;
		break;
	    }
      }
    if (result)
	return -2;

    return 0;
}

static int
do_test_invalid_table (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong table-name */
    sqlite3_bind_text (stmt, 1, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_from_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_from (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong node-from */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_from_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_to (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong node-to */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_from_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_geom (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong node-to */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_from_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_cost (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong road-name */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_from_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_name (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong road-name */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_from_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_oneway_from (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong oneway-from */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "invalid", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_to_from", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid_oneway_to (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - wrong oneway-to */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "roads", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "invalid", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_1 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #1 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_1", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_2 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #2 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_2", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_3 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #3 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_3", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_4 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #4 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_4", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_5 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #5 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_5", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_6 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #6 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_6", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_7 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #7 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_7", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_8 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #8 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_8", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_9 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #9 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_9", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_10 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #10 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_10", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_11 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #11 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_11", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_12 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #12 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_12", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_13 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #13 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_13", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_14 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #14 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_14", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_15 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #15 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_15", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 1);
    sqlite3_bind_text (stmt, 8, "oneway_to_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
    return perform_bad_test (handle, stmt);
}

static int
do_test_bad_16 (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* performing an invalid testcase - bad input table #16 */
    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    sqlite3_bind_text (stmt, 1, "bad_roads_16", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 2, "node_from", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 3, "node_to", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 4, "geom", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 5, "cost", -1, SQLITE_TRANSIENT);
    sqlite3_bind_text (stmt, 6, "road_name", -1, SQLITE_TRANSIENT);
    sqlite3_bind_int (stmt, 7, 0);
    sqlite3_bind_null (stmt, 8);
    sqlite3_bind_null (stmt, 9);
    return perform_bad_test (handle, stmt);
}

static int
do_test_invalid (sqlite3 * handle)
{
/* performing invalid testcases */
    const char *sql;
    sqlite3_stmt *stmt = NULL;
    int ret;

    sql =
	"SELECT CreateRouting('invalid_data', 'invalid', ?, ?, ?, ?, ?, ?, 0, ?, ?, ?)";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateRouting #3: %s\n", sqlite3_errmsg (handle));
	  return -1;
      }

    if (do_test_invalid_table (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_from (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_to (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_geom (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_cost (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_name (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_oneway_from (handle, stmt) != 0)
	return -1;
    if (do_test_invalid_oneway_to (handle, stmt) != 0)
	return -1;

    if (do_test_bad_1 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_2 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_3 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_4 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_5 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_6 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_7 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_8 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_9 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_10 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_11 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_12 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_13 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_14 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_15 (handle, stmt) != 0)
	return -1;
    if (do_test_bad_16 (handle, stmt) != 0)
	return -1;

    sqlite3_finalize (stmt);
    return 0;
}

static int
do_create_spatial_index (sqlite3 * handle, const char *geom)
{
/* creating a Spatial Index */
    int ok = 0;
    sqlite3_stmt *stmt = NULL;
    char *sql =
	sqlite3_mprintf ("SELECT CreateSpatialIndex('roads', %Q)", geom);
    int ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateSpatialIndex: roads.%s #1: %s\n", geom,
		   sqlite3_errmsg (handle));
	  return 0;
      }
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	      ok = sqlite3_column_int (stmt, 0);
	  else
	    {
		fprintf (stderr, "CreateSpatialIndex: roads.%s #2: %s\n", geom,
			 sqlite3_errmsg (handle));
		ok = 0;
		break;
	    }
      }
    sqlite3_finalize (stmt);
    return ok;
}

static void
set_algorithm (sqlite3_stmt * stmt, int algorithm)
{
/* setting a routing algorithm */

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (algorithm == 1)
	sqlite3_bind_text (stmt, 1, "A*", -1, SQLITE_STATIC);
    else
	sqlite3_bind_text (stmt, 1, "DIJKSTRA", -1, SQLITE_STATIC);
    sqlite3_step (stmt);
}

static void
set_request (sqlite3_stmt * stmt, int request)
{
/* setting a routing request */

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (request == 1)
	sqlite3_bind_text (stmt, 1, "TSP NN", -1, SQLITE_STATIC);
    else if (request == 2)
	sqlite3_bind_text (stmt, 1, "TSP GA", -1, SQLITE_STATIC);
    else
	sqlite3_bind_text (stmt, 1, "SHORTEST PATH", -1, SQLITE_STATIC);
    sqlite3_step (stmt);
}

static void
set_option (sqlite3_stmt * stmt, int option)
{
/* setting a routing option */

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (option == 1)
	sqlite3_bind_text (stmt, 1, "NO LINKS", -1, SQLITE_STATIC);
    else if (option == 2)
	sqlite3_bind_text (stmt, 1, "NO GEOMETRIES", -1, SQLITE_STATIC);
    else if (option == 3)
	sqlite3_bind_text (stmt, 1, "SIMPLE", -1, SQLITE_STATIC);
    else
	sqlite3_bind_text (stmt, 1, "FULL", -1, SQLITE_STATIC);
    sqlite3_step (stmt);
}

static int
do_routing (sqlite3 * handle, sqlite3_stmt * stmt, const char *base_name,
	    int which, int multi)
{
/* testing a routing solution */
    int ret;
    int ind = strlen (base_name) - 4;
    int has_ids = 0;
    const char *list_codes =
	"RT05301806761GZ,RT05301806955GZ,RT05301806819GZ,RT05301806691GZ,RT05301806772GZ,RT05301806760GZ,RT05301806624GZ";
    const char *list_ids = "58,133,295,352,203,235,342";
    int count = 0;

    if (base_name[ind] == 'i')
	has_ids = 1;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (has_ids)
      {
	  if (which == 0)
	    {
		sqlite3_bind_int (stmt, 1, 273);
		if (multi == 0)
		    sqlite3_bind_int (stmt, 2, 352);
		else
		    sqlite3_bind_text (stmt, 2, list_ids, strlen (list_ids),
				       SQLITE_STATIC);
	    }
	  else
	    {
		if (multi == 0)
		    sqlite3_bind_int (stmt, 1, 352);
		else
		    sqlite3_bind_text (stmt, 1, list_ids, strlen (list_ids),
				       SQLITE_STATIC);
		sqlite3_bind_int (stmt, 2, 317);
	    }
      }
    else
      {
	  if (which == 0)
	    {
		sqlite3_bind_text (stmt, 1, "RT05301806875GZ", -1,
				   SQLITE_STATIC);
		if (multi == 0)
		    sqlite3_bind_text (stmt, 2, "RT05301806761GZ", -1,
				       SQLITE_STATIC);
		else
		    sqlite3_bind_text (stmt, 2, list_codes, strlen (list_codes),
				       SQLITE_STATIC);
	    }
	  else
	    {
		if (multi == 0)
		    sqlite3_bind_text (stmt, 1, "RT05301806761GZ", -1,
				       SQLITE_STATIC);
		else
		    sqlite3_bind_text (stmt, 1, list_codes, strlen (list_codes),
				       SQLITE_STATIC);
		sqlite3_bind_text (stmt, 2, "RT05301806875GZ", -1,
				   SQLITE_STATIC);
	    }
      }

    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	      count++;
	  else
	    {
		fprintf (stderr, "CreateRouting #2: %s\n",
			 sqlite3_errmsg (handle));
		break;
	    }
      }
    return count;
}

static int
do_range (sqlite3 * handle, sqlite3_stmt * stmt, const char *base_name,
	  int which, int cost)
{
/* testing a range solution */
    int ret;
    int ind = strlen (base_name) - 4;
    int has_ids = 0;
    int count = 0;

    if (base_name[ind] == 'i')
	has_ids = 1;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);
    if (which == 0)
      {
	  if (has_ids)
	    {
		sqlite3_bind_int (stmt, 1, 154);
	    }
	  else
	    {
		sqlite3_bind_text (stmt, 1, "RT05301806955GZ", -1,
				   SQLITE_STATIC);
	    }
	  if (cost == 0)
	      sqlite3_bind_double (stmt, 2, 50.0);
	  else
	      sqlite3_bind_int (stmt, 2, 50);
      }
    else
      {
	  if (cost == 0)
	      sqlite3_bind_double (stmt, 1, 50.0);
	  else
	      sqlite3_bind_int (stmt, 1, 50);
	  if (has_ids)
	    {
		sqlite3_bind_int (stmt, 2, 154);
	    }
	  else
	    {
		sqlite3_bind_text (stmt, 2, "RT05301806955GZ", -1,
				   SQLITE_STATIC);
	    }
      }

    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	      count++;
	  else
	    {
		fprintf (stderr, "CreateRouting #2: %s\n",
			 sqlite3_errmsg (handle));
		break;
	    }
      }
    return count;
}

static int
do_point2point (sqlite3 * handle, sqlite3_stmt * stmt)
{
/* testing a poin2point solution */
    int ret;
    int count = 0;

    sqlite3_reset (stmt);
    sqlite3_clear_bindings (stmt);

    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	      count++;
	  else
	    {
		fprintf (stderr, "CreateRouting #2: %s\n",
			 sqlite3_errmsg (handle));
		break;
	    }
      }
    return count;
}

static int
do_create_routing_nodes (sqlite3 * handle)
{
/* adding "id_node_from" and "id_node_to" columns */
    int result = 0;
    int ret;
    sqlite3_stmt *stmt;
    const char *sql =
	"SELECT CreateRoutingNodes(NULL, 'roads', 'geom', 'id_node_from', 'id_node_to')";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateRoutingNodes #1: %s\n",
		   sqlite3_errmsg (handle));
	  return -1;
      }
    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		result = sqlite3_column_int (stmt, 0);
	    }
	  else
	    {
		fprintf (stderr, "CreateRoutingNodes #2: %s\n",
			 sqlite3_errmsg (handle));
		break;
	    }
      }
    sqlite3_finalize (stmt);
    if (!result)
	return -2;
    return 1;
}

static int
do_test (sqlite3 * handle, const char *base_name, int srid, int has_z,
	 int with_codes, int name, int cost, int oneways)
{
/* performing one routing test */
    char *sql;
    char *data_name;
    sqlite3_stmt *stmt;
    sqlite3_stmt *stmt_tsp_1 = NULL;
    sqlite3_stmt *stmt_tsp_2 = NULL;
    sqlite3_stmt *stmt_rng_1 = NULL;
    sqlite3_stmt *stmt_rng_2 = NULL;
    sqlite3_stmt *stmt_p2p_1 = NULL;
    sqlite3_stmt *stmt_p2p_2 = NULL;
    sqlite3_stmt *stmt_alg = NULL;
    sqlite3_stmt *stmt_req = NULL;
    sqlite3_stmt *stmt_opt = NULL;
    int ret;
    int result = 0;
    int with_astar;
    int alg;
    int req;
    int opt;
    int count = 0;

    sql = "SELECT CreateRouting(?, ?, 'roads', ?, ?, ?, ?, ?, ?, 1, ?, ?)";
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "CreateRouting #1: %s\n", sqlite3_errmsg (handle));
	  return -1;
      }

    data_name = sqlite3_mprintf ("%s_data", base_name);
    sqlite3_bind_text (stmt, 1, data_name, strlen (data_name),
		       SQLITE_TRANSIENT);
    sqlite3_free (data_name);
    sqlite3_bind_text (stmt, 2, base_name, strlen (base_name), SQLITE_STATIC);
    if (with_codes)
      {
	  sqlite3_bind_text (stmt, 3, "node_from", -1, SQLITE_TRANSIENT);
	  sqlite3_bind_text (stmt, 4, "node_to", -1, SQLITE_TRANSIENT);
      }
    else
      {
	  sqlite3_bind_text (stmt, 3, "id_node_from", -1, SQLITE_TRANSIENT);
	  sqlite3_bind_text (stmt, 4, "id_node_to", -1, SQLITE_TRANSIENT);
      }
    if (srid == 3003)
      {
	  if (has_z)
	      sqlite3_bind_text (stmt, 5, "geom_z", -1, SQLITE_TRANSIENT);
	  else
	      sqlite3_bind_text (stmt, 5, "geom", -1, SQLITE_TRANSIENT);
      }
    else if (srid == 4326)
      {
	  if (has_z)
	      sqlite3_bind_text (stmt, 5, "geom_wgs84_z", -1, SQLITE_TRANSIENT);
	  else
	      sqlite3_bind_text (stmt, 5, "geom_wgs84", -1, SQLITE_TRANSIENT);
      }
    else
	sqlite3_bind_null (stmt, 5);
    if (cost)
	sqlite3_bind_text (stmt, 6, "cost", -1, SQLITE_TRANSIENT);
    else
	sqlite3_bind_null (stmt, 6);
    if (name)
	sqlite3_bind_text (stmt, 7, "road_name", -1, SQLITE_TRANSIENT);
    else
	sqlite3_bind_null (stmt, 7);
    if (srid == 3003 || srid == 4326)
	with_astar = 1;
    else
	with_astar = 0;
    sqlite3_bind_int (stmt, 8, with_astar);
    if (oneways)
      {
	  sqlite3_bind_text (stmt, 9, "oneway_from_to", -1, SQLITE_TRANSIENT);
	  sqlite3_bind_text (stmt, 10, "oneway_to_from", -1, SQLITE_TRANSIENT);
      }
    else
      {
	  sqlite3_bind_null (stmt, 9);
	  sqlite3_bind_null (stmt, 10);
      }

    while (1)
      {
	  ret = sqlite3_step (stmt);
	  if (ret == SQLITE_DONE)
	      break;
	  if (ret == SQLITE_ROW)
	    {
		result = sqlite3_column_int (stmt, 0);
	    }
	  else
	    {
		fprintf (stderr, "CreateRouting #2: %s\n",
			 sqlite3_errmsg (handle));
		break;
	    }
      }
    sqlite3_finalize (stmt);
    if (!result)
	return -2;

/* creating aux UPDATE queries */
    sql = sqlite3_mprintf ("UPDATE %s SET algorithm = ?", base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_alg, NULL);
    sqlite3_free (sql);
    sql = sqlite3_mprintf ("UPDATE %s SET request = ?", base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_req, NULL);
    sqlite3_free (sql);
    sql = sqlite3_mprintf ("UPDATE %s SET options = ?", base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_opt, NULL);
    sqlite3_free (sql);

/* creating the ShortestPath / TSP queries */
    sql =
	sqlite3_mprintf ("SELECT * FROM %s WHERE NodeFrom = ? AND NodeTo = ?",
			 base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_tsp_1, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Testing Routing #1a-0: %s\n",
		   sqlite3_errmsg (handle));
	  return -1;
      }
    sql =
	sqlite3_mprintf ("SELECT * FROM %s WHERE NodeTo = ? AND NodeFrom = ?",
			 base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_tsp_2, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Testing Routing #1a-1: %s\n",
		   sqlite3_errmsg (handle));
	  return -2;
      }

/* creating the Range queries */
    sql =
	sqlite3_mprintf ("SELECT * FROM %s WHERE NodeFrom = ? AND Cost <= ?",
			 base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_rng_1, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Testing Routing #1b-0: %s\n",
		   sqlite3_errmsg (handle));
	  return -3;
      }
    sql =
	sqlite3_mprintf ("SELECT * FROM %s WHERE Cost <= ? AND NodeFrom = ?",
			 base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_rng_2, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Testing Routing #1b-1: %s\n",
		   sqlite3_errmsg (handle));
	  return -4;
      }

/* creating the Point2Point queries */
    sql =
	sqlite3_mprintf ("SELECT * FROM %s WHERE "
			 "PointFrom = (SELECT geom FROM house_nr WHERE code_hnr = 'RT053018003491CV') AND "
			 "PointTo = (SELECT geom FROM house_nr WHERE code_hnr = 'RT053018004313CV')",
			 base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_p2p_1, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Testing Routing #1c-0: %s\n",
		   sqlite3_errmsg (handle));
	  return -5;
      }
    sql =
	sqlite3_mprintf ("SELECT * FROM %s WHERE "
			 "PointTo = (SELECT geom FROM house_nr WHERE code_hnr = 'RT053018004313CV') AND "
			 "PointFrom = (SELECT geom FROM house_nr WHERE code_hnr = 'RT053018003491CV')",
			 base_name);
    ret = sqlite3_prepare_v2 (handle, sql, strlen (sql), &stmt_p2p_2, NULL);
    sqlite3_free (sql);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "Testing Routing #1c-1: %s\n",
		   sqlite3_errmsg (handle));
	  return -6;
      }

    for (alg = 0; alg < 2; alg++)
      {
	  if (!with_astar && alg != 0)
	      continue;		/* skipping A* test */
	  set_algorithm (stmt_alg, alg);
	  for (req = 0; req < 3; req++)
	    {
		set_request (stmt_req, req);
		for (opt = 0; opt < 4; opt++)
		  {
		      int multi = 1;
		      set_option (stmt_opt, opt);
		      if (req == 0)
			  multi = count % 3;
		      if (count % 2 == 0)
			{
			    if (do_routing
				(handle, stmt_tsp_1, base_name, 0, multi) <= 0)
				return -7;
			}
		      else
			{
			    if (do_routing
				(handle, stmt_tsp_2, base_name, 1, multi) <= 0)
				return -8;
			}
		      if (count % 2 == 0)
			{
			    if (do_range
				(handle, stmt_rng_1, base_name, 0,
				 count % 3) <= 0)
				return -9;
			}
		      else
			{
			    if (do_range
				(handle, stmt_rng_2, base_name, 1,
				 count % 3) <= 0)
				return -10;
			}
		      if (count % 2 == 0)
			{
			    if (do_point2point (handle, stmt_p2p_1) <= 0)
				return -11;
			}
		      else
			{
			    if (do_point2point (handle, stmt_p2p_2) <= 0)
				return -12;
			}
		      count++;
		  }
	    }
      }

    sqlite3_finalize (stmt_tsp_1);
    sqlite3_finalize (stmt_tsp_2);
    sqlite3_finalize (stmt_rng_1);
    sqlite3_finalize (stmt_rng_2);
    sqlite3_finalize (stmt_p2p_1);
    sqlite3_finalize (stmt_p2p_2);
    sqlite3_finalize (stmt_alg);
    sqlite3_finalize (stmt_req);
    sqlite3_finalize (stmt_opt);

    return 0;
}

#endif

int
main (int argc, char *argv[])
{
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret = system ("cp orbetello.sqlite copy-orbetello.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot copy orbetello.sqlite database\n");
	  return -1;
      }

    ret =
	sqlite3_open_v2 ("copy-orbetello.sqlite", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open copy-orbetello.sqlite database: %s\n",
		   sqlite3_errmsg (handle));
	  sqlite3_close (handle);
	  return -1;
      }

    spatialite_init_ex (handle, cache, 0);

#ifndef OMIT_GEOS		/* GEOS is supported */

    ret =
	sqlite3_exec (handle, "SELECT InitSpatialMetadata(1)", NULL, NULL,
		      &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

/* building all Spatial Index */
    if (!do_create_spatial_index (handle, "geom"))
	return -3;
    if (!do_create_spatial_index (handle, "geom_z"))
	return -4;
    if (!do_create_spatial_index (handle, "geom_wgs84"))
	return -5;
    if (!do_create_spatial_index (handle, "geom_wgs84_z"))
	return -6;

/* adding "id_node_from" and "id_node_to" columns */
    if (!do_create_routing_nodes (handle))
	return -7;

/* testing 2D projected - node-codes, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_2d_cnnn", 3003, 0, 1, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #1 error\n");
	  return -8;
      }

/* testing 2D projected - node-codes, name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_2d_cynn", 3003, 0, 1, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #2 error\n");
	  return -9;
      }

/* testing 2D projected - node-codes, name, cost, no-oneways */
    ret = do_test (handle, "test_3003_2d_cyyn", 3003, 0, 1, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #3 error\n");
	  return -10;
      }

/* testing 2D projected - node-codes, name, cost, oneways */
    ret = do_test (handle, "test_3003_2d_cyyy", 3003, 0, 1, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #4 error\n");
	  return -11;
      }

/* testing 3D projected - node-codes, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_3d_cnnn", 3003, 1, 1, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #1 error\n");
	  return -12;
      }

/* testing 3D projected - node-codes, name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_3d_cynn", 3003, 1, 1, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #2 error\n");
	  return -13;
      }

/* testing 3D projected - node-codes, name, cost, no-oneways */
    ret = do_test (handle, "test_3003_3d_cyyn", 3003, 1, 1, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #3 error\n");
	  return -14;
      }

/* testing 3D projected - node-codes, name, cost, oneways */
    ret = do_test (handle, "test_3003_3d_cyyy", 3003, 1, 1, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #4 error\n");
	  return -15;
      }

/* testing 2D long/lat - node-codes, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_2d_cnnn", 4326, 0, 1, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #5 error\n");
	  return -16;
      }

/* testing 2D long/lat - node-codes, name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_2d_cynn", 4326, 0, 1, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #6 error\n");
	  return -17;
      }

/* testing 2D long/lat - node-codes, name, cost, no-oneways */
    ret = do_test (handle, "test_4326_2d_cyyn", 4326, 0, 1, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #7 error\n");
	  return -18;
      }

/* testing 2D long/lat - node-codes, name, cost, oneways */
    ret = do_test (handle, "test_4326_2d_cyyy", 4326, 0, 1, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #8 error\n");
	  return -19;
      }

/* testing 3D long/lat - node-codes, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_3d_cnnn", 4326, 1, 1, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #9 error\n");
	  return -20;
      }

/* testing 3D long/lat - node-codes, name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_3d_cynn", 4326, 1, 1, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #10 error\n");
	  return -21;
      }

/* testing 3D long/lat - node-codes, name, cost, no-oneways */
    ret = do_test (handle, "test_4326_3d_cyyn", 4326, 1, 1, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #11 error\n");
	  return -22;
      }

/* testing 3D long/lat - node-codes, name, cost, oneways */
    ret = do_test (handle, "test_4326_3d_cyyy", 4326, 1, 1, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #12 error\n");
	  return -23;
      }

/* testing no-geometry - node-codes, no-name, cost, no-oneways */
    ret = do_test (handle, "test_none_cnyn", 0, 0, 1, 0, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #13 error\n");
	  return -24;
      }

/* testing no-geometry - node-codes, name, cost, no-oneways */
    ret = do_test (handle, "test_none_cyyn", 0, 0, 1, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #14 error\n");
	  return -25;
      }

/* testing no-geometry - node-codes, name, cost, oneways */
    ret = do_test (handle, "test_none_cyyy", 0, 0, 1, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #15 error\n");
	  return -26;
      }

/* testing 2D projected - node-ids, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_2d_innn", 3003, 0, 0, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #1 error\n");
	  return -27;
      }

/* testing 2D projected - node-ids, name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_2d_iynn", 3003, 0, 0, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #2 error\n");
	  return -28;
      }

/* testing 2D projected - node-ids, name, cost, no-oneways */
    ret = do_test (handle, "test_3003_2d_iyyn", 3003, 0, 0, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #3 error\n");
	  return -29;
      }

/* testing 2D projected - node-ids, name, cost, oneways */
    ret = do_test (handle, "test_3003_2d_iyyy", 3003, 0, 0, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #4 error\n");
	  return -30;
      }

/* testing 3D projected - node-ids, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_3d_innn", 3003, 1, 0, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #1 error\n");
	  return -31;
      }

/* testing 3D projected - node-ids, name, no-cost, no-oneways */
    ret = do_test (handle, "test_3003_3d_iynn", 3003, 1, 0, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #2 error\n");
	  return -32;
      }

/* testing 3D projected - node-ids, name, cost, no-oneways */
    ret = do_test (handle, "test_3003_3d_iyyn", 3003, 1, 0, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #3 error\n");
	  return -33;
      }

/* testing 3D projected - node-ids, name, cost, oneways */
    ret = do_test (handle, "test_3003_3d_iyyy", 3003, 1, 0, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #4 error\n");
	  return -34;
      }

/* testing 2D long/lat - node-ids, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_2d_innn", 4326, 0, 0, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #5 error\n");
	  return -35;
      }

/* testing 2D long/lat - node-ids, name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_2d_iynn", 4326, 0, 0, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #6 error\n");
	  return -36;
      }

/* testing 2D long/lat - node-ids, name, cost, no-oneways */
    ret = do_test (handle, "test_4326_2d_iyyn", 4326, 0, 0, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #7 error\n");
	  return -37;
      }

/* testing 2D long/lat - node-ids, name, cost, oneways */
    ret = do_test (handle, "test_4326_2d_iyyy", 4326, 0, 0, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #8 error\n");
	  return -38;
      }

/* testing 3D long/lat - node-ids, no-name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_3d_innn", 4326, 1, 0, 0, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #9 error\n");
	  return -39;
      }

/* testing 3D long/lat - node-ids, name, no-cost, no-oneways */
    ret = do_test (handle, "test_4326_3d_iynn", 4326, 1, 0, 1, 0, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #10 error\n");
	  return -40;
      }

/* testing 3D long/lat - node-ids, name, cost, no-oneways */
    ret = do_test (handle, "test_4326_3d_iyyn", 4326, 1, 0, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #11 error\n");
	  return -41;
      }

/* testing 3D long/lat - node-ids, name, cost, oneways */
    ret = do_test (handle, "test_4326_3d_iyyy", 4326, 1, 0, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #12 error\n");
	  return -42;
      }

/* testing no-geometry - node-ids, no-name, cost, no-oneways */
    ret = do_test (handle, "test_none_inyn", 0, 0, 0, 0, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #13 error\n");
	  return -43;
      }

/* testing no-geometry - node-ids, name, cost, no-oneways */
    ret = do_test (handle, "test_none_iyyn", 0, 0, 0, 1, 1, 0);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #14 error\n");
	  return -44;
      }

/* testing no-geometry - node-ids, name, cost, oneways */
    ret = do_test (handle, "test_none_iyyy", 0, 0, 0, 1, 1, 1);
    if (ret != 0)
      {
	  fprintf (stderr, "Test #15 error\n");
	  return -45;
      }

/* testing invalid cases */
    ret = do_test_invalid (handle);
    if (ret != 0)
      {
	  fprintf (stderr, "Test Invalid cases error\n");
	  return -4;
      }
      
#endif /* end GEOS conditional */

    sqlite3_close (handle);
    spatialite_cleanup_ex (cache);
    ret = unlink ("copy-orbetello.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove copy-orbetello.sqlite\n");
	  return -47;
      }

    spatialite_shutdown ();
    return 0;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/shape_3d.c.

78
79
80
81
82
83
84



85
86
87
88
89
90
91
...
230
231
232
233
234
235
236
237
238
239
240
241
242
    int ret;
    sqlite3 *handle;
    char *dumpname = __FILE__ "dump";
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -15;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
...
233
234
235
236
237
238
239



240
241
242
    int ret;
    sqlite3 *handle;
    char *dumpname = __FILE__ "dump";
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -15;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/shape_cp1252.c.

58
59
60
61
62
63
64



65
66
67
68
69
70
71
...
165
166
167
168
169
170
171
172
173
174
175
176
177
    int ret;
    sqlite3 *handle;
    char *dbfname = __FILE__ "test.dbf";
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -9;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
168
169
170
171
172
173
174



175
176
177
    int ret;
    sqlite3 *handle;
    char *dbfname = __FILE__ "test.dbf";
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -9;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/shape_primitives.c.

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
...
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891

892
893
894
895
896
897
898
899
900
901
902
903
904
905
906


907
908
909
910
911



912
913
914
915
916
917
918
...
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
....
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -14;
      }

    ret =
	sqlite3_exec (handle,
		      "INSERT INTO Point_Test (Name, Description, geomXYZM) VALUES ('Point 4', 'Some pointXYZM', GeomFromText('POINTZM(136 -33 424 233.2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT POINT XYZM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -15;
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VACUUM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -66;
      }
#else
    if (handle != NULL)
	handle = NULL;		/* silencing stupid compiler warnings */
#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;
}

static int
do_check_tiny_point_enabled (sqlite3 * handle, int tiny_point)
{
/* testing IsTinyPointEnabed */
    int i;
    char **results;
    int rows;
    int columns;
    int value = -1;
    int ret =
	sqlite3_get_table (handle, "SELECT IsTinyPointEnabled()", &results,
			   &rows, &columns, NULL);
    if (ret != SQLITE_OK)
	return -1;
    if (rows < 1)
	;
    else

      {
	  for (i = 1; i <= rows; i++)
	    {
		value = atoi (results[(i * columns) + 0]);
	    }
      }
    sqlite3_free_table (results);
    if (value == tiny_point)
	return 0;
    return -1;
}

static int
do_test_400 (int tiny_point)
{


    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();




/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }

/* enabling/disabling TinyPoint */
    if (tiny_point)
	ret =
	    sqlite3_exec (handle, "SELECT EnableTinyPoint()", NULL, NULL,
			  &err_msg);
    else
	ret =
	    sqlite3_exec (handle, "SELECT DisableTinyPoint()", NULL, NULL,
			  &err_msg);
    if (ret != SQLITE_OK)
      {
	  if (tiny_point)
	      fprintf (stderr, "EnableTinyPoint() error: %s\n", err_msg);
	  else
	      fprintf (stderr, "DisableTinyPoint() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -3;
      }

    if (do_check_tiny_point_enabled (handle, tiny_point) != 0)
      {
	  fprintf (stderr, "IsTinyBlobEnabled() error\n");
	  return -4;
      }

    ret = do_test (handle);
    if (ret != 0)
      {
	  fprintf (stderr,
		   "error while testing current style metadata layout\n");
	  return ret;
      }

    spatialite_cleanup_ex (cache);
    sqlite3_close (handle);

    return 0;
}

int
main (int argc, char *argv[])
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
#ifdef ENABLE_RTTOPO		/* only if RTTOPO is supported */
    int ret;
    sqlite3 *handle;
    void *cache = NULL;

/* testing current style metadata layout >= v.4.0.0 */
    if (do_test_400 (0) != 0)
	return -1;
    if (do_test_400 (1) != 0)
	return -2;

/* testing legacy style metadata layout <= v.3.1.0 */
    cache = spatialite_alloc_connection ();
    ret =
	system
	("cp test-legacy-3.0.1.sqlite copy-primitives-legacy-3.0.1.sqlite");
    if (ret != 0)
      {
................................................................................
    ret = unlink ("copy-legacy-2.3.1.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove legacy v.2.3.1 database\n");
	  return -1;
      }

#endif /* end RTTOPO conditionals */
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







|







 







<
<
<






<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>





>
>
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|


<
<
<



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
...
859
860
861
862
863
864
865



866
867
868
869
870
871




872












873
874














875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
...
903
904
905
906
907
908
909


























910
911
912
913
914
915
916
917
918
919
920


















921
922
923
924
925
926
927
....
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094



1095
1096
1097
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -14;
      }

    ret =
	sqlite3_exec (handle,
		      "INSERT INTO Point_Test (Name, Description, geomXYZM) VALUES ('Point 4', 'Some pointXYZM', GeomFromText('POINT(136 -33 424 233.2)', 4326))",
		      NULL, NULL, &err_msg);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "INSERT POINT XYZM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -15;
................................................................................
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "VACUUM error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -66;
      }



#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;
}





int












main (int argc, char *argv[])
{














#ifndef OMIT_ICONV		/* only if ICONV is supported */
#ifdef ENABLE_LWGEOM		/* only if LWGEOM is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
      {
	  fprintf (stderr, "InitSpatialMetadata() error: %s\n", err_msg);
	  sqlite3_free (err_msg);
	  sqlite3_close (handle);
	  return -2;
      }



























    ret = do_test (handle);
    if (ret != 0)
      {
	  fprintf (stderr,
		   "error while testing current style metadata layout\n");
	  return ret;
      }

    spatialite_cleanup_ex (cache);
    sqlite3_close (handle);



















/* testing legacy style metadata layout <= v.3.1.0 */
    cache = spatialite_alloc_connection ();
    ret =
	system
	("cp test-legacy-3.0.1.sqlite copy-primitives-legacy-3.0.1.sqlite");
    if (ret != 0)
      {
................................................................................
    ret = unlink ("copy-legacy-2.3.1.sqlite");
    if (ret != 0)
      {
	  fprintf (stderr, "cannot remove legacy v.2.3.1 database\n");
	  return -1;
      }

#endif /* end LWGEOM conditionals */
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/shape_utf8_1.c.

355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
...
374
375
376
377
378
379
380



381
382
383
384
385
386
387
...
463
464
465
466
467
468
469
470
471
472
473
474
475
	    {
		fprintf (stderr, "VACUUM error: %s\n", err_msg);
		sqlite3_free (err_msg);
		sqlite3_close (handle);
		return -27;
	    }
      }
#else
    if (handle != NULL && legacy == 0)
	handle = NULL;		/* silencing stupid compiler warnings */
#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;

}

................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();




/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -20;
      }

#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







<
<
<







 







>
>
>







 







<
<
<



355
356
357
358
359
360
361



362
363
364
365
366
367
368
...
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
...
463
464
465
466
467
468
469



470
471
472
	    {
		fprintf (stderr, "VACUUM error: %s\n", err_msg);
		sqlite3_free (err_msg);
		sqlite3_close (handle);
		return -27;
	    }
      }



#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;

}

................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -20;
      }

#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/shape_utf8_1ex.c.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
...
379
380
381
382
383
384
385



386
387
388
389
390
391
392
...
469
470
471
472
473
474
475
476
477
478
479
480
481
	    {
		fprintf (stderr, "VACUUM error: %s\n", err_msg);
		sqlite3_free (err_msg);
		sqlite3_close (handle);
		return -27;
	    }
      }
#else
    if (handle != NULL && legacy == 0)
	handle = NULL;		/* silencing stupid compiler warnings */
#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;

}

................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();




/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -20;
      }

#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







<
<
<







 







>
>
>







 







<
<
<



360
361
362
363
364
365
366



367
368
369
370
371
372
373
...
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
...
469
470
471
472
473
474
475



476
477
478
	    {
		fprintf (stderr, "VACUUM error: %s\n", err_msg);
		sqlite3_free (err_msg);
		sqlite3_close (handle);
		return -27;
	    }
      }



#endif /* end ICONV conditional */

/* ok, succesfull termination */
    return 0;

}

................................................................................
{
#ifndef OMIT_ICONV		/* only if ICONV is supported */
    int ret;
    sqlite3 *handle;
    char *err_msg = NULL;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

/* testing current style metadata layout >= v.4.0.0 */
    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
................................................................................
      {
	  fprintf (stderr, "cannot remove legacy v.3.0.1 database\n");
	  return -20;
      }

#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Changes to test/shape_utf8_2.c.

60
61
62
63
64
65
66



67
68
69
70
71
72
73
...
223
224
225
226
227
228
229
230
231
232
233
234
235
    sqlite3 *handle;
    char *kmlname = __FILE__ "test.kml";
    char *geojsonname = __FILE__ "test.geojson";
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();




    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -17;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    spatialite_shutdown ();
    return 0;
}







>
>
>







 







<
<
<



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
226
227
228
229
230
231
232



233
234
235
    sqlite3 *handle;
    char *kmlname = __FILE__ "test.kml";
    char *geojsonname = __FILE__ "test.geojson";
    char *err_msg = NULL;
    int row_count;
    void *cache = spatialite_alloc_connection ();

    if (argc > 1 || argv[0] == NULL)
	argc = 1;		/* silencing stupid compiler warnings */

    ret =
	sqlite3_open_v2 (":memory:", &handle,
			 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
    if (ret != SQLITE_OK)
      {
	  fprintf (stderr, "cannot open in-memory database: %s\n",
		   sqlite3_errmsg (handle));
................................................................................
		   sqlite3_errmsg (handle));
	  return -17;
      }

    spatialite_cleanup_ex (cache);
#endif /* end ICONV conditional */




    spatialite_shutdown ();
    return 0;
}

Deleted test/sql_stmt_cache_tests/Makefile.am.

1
2
3
4
5
6
7
8
9

EXTRA_DIST = precision1.testcase \
	precision2.testcase \
	precision3.testcase \
	precision4.testcase \
	precision5.testcase \
	precision6.testcase \
	precision7.testcase 
	
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_cache_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_cache_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = precision1.testcase \
	precision2.testcase \
	precision3.testcase \
	precision4.testcase \
	precision5.testcase \
	precision6.testcase \
	precision7.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_cache_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_cache_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_cache_tests/precision1.testcase.

1
2
3
4
5
6
7
8
9
decimal precision - 10
:memory:
SELECT SetDecimalPrecision(10), GetDecimalPrecision();
1 # rows
2 # column
SetDecimalPrecision(10)
GetDecimalPrecision()
(NULL)
10
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_cache_tests/precision2.testcase.

1
2
3
4
5
6
7
8
9
decimal precision - 100
:memory:
SELECT SetDecimalPrecision(100), GetDecimalPrecision();
1 # rows
2 # column
SetDecimalPrecision(100)
GetDecimalPrecision()
(NULL)
18
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_cache_tests/precision3.testcase.

1
2
3
4
5
6
7
8
9
decimal precision - -100
:memory:
SELECT SetDecimalPrecision(-100), GetDecimalPrecision();
1 # rows
2 # column
SetDecimalPrecision(-100)
GetDecimalPrecision()
(NULL)
-1
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_cache_tests/precision4.testcase.

1
2
3
4
5
6
7
decimal precision - NULL
:memory:
SELECT SetDecimalPrecision(NULL);
1 # rows
1 # column
SetDecimalPrecision(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_cache_tests/precision5.testcase.

1
2
3
4
5
6
7
decimal precision - TEXT
:memory:
SELECT SetDecimalPrecision('aleph');
1 # rows
1 # column
SetDecimalPrecision('aleph')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_cache_tests/precision6.testcase.

1
2
3
4
5
6
7
decimal precision - DOUBLE
:memory:
SELECT SetDecimalPrecision(1.5);
1 # rows
1 # column
SetDecimalPrecision(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_cache_tests/precision7.testcase.

1
2
3
4
5
6
7
decimal precision - BLOB
:memory:
SELECT SetDecimalPrecision(zeroblob(10));
1 # rows
1 # column
SetDecimalPrecision(zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Added test/sql_stmt_freexl_tests/Makefile.

























































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# test/sql_stmt_freexl_tests/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.



am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/libspatialite
pkgincludedir = $(includedir)/libspatialite
pkglibdir = $(libdir)/libspatialite
pkglibexecdir = $(libexecdir)/libspatialite
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
subdir = test/sql_stmt_freexl_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
AS = as
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.14
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -Wall -Wextra -Wunused -pedantic -g -O0 -fprofile-arcs -ftest-coverage -g
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = dlltool
DSYMUTIL = 
DUMPBIN = 
ECHO_C = 
ECHO_N = -n
ECHO_T = 
EGREP = /usr/bin/grep -E
EXEEXT = 
FGREP = /usr/bin/grep -F
GEOSCONFIG = /usr/bin/geos-config
GEOS_CFLAGS = -I/usr/include
GEOS_LDFLAGS = -L/usr/lib64
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /usr/bin/ld -m elf_x86_64
LDFLAGS = 
LIBOBJS = 
LIBS = -lfreexl -lproj -lz -lsqlite3  -L/usr/lib64 -lgeos_c -llwgeom -lgeos_c
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBXML2_CFLAGS = -I/usr/include/libxml2 
LIBXML2_LIBS = -lxml2 
LIPO = 
LN_S = ln -s
LTLIBOBJS = 
MAINT = #
MAKEINFO = makeinfo
MANIFEST_TOOL = :
MKDIR_P = /usr/bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT = 
OBJDUMP = objdump
OBJEXT = o
OTOOL = 
OTOOL64 = 
PACKAGE = libspatialite
PACKAGE_BUGREPORT = a.furieri@lqt.it
PACKAGE_NAME = libspatialite
PACKAGE_STRING = libspatialite 4.3.0-devel
PACKAGE_TARNAME = libspatialite
PACKAGE_URL = 
PACKAGE_VERSION = 4.3.0-devel
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR = 
PKG_CONFIG_PATH = /usr/local/lib/pkgconfig
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE = 
SHELL = /bin/sh
STRIP = strip
VERSION = 4.3.0-devel
abs_builddir = /home/sandro/fossil/libspatialite/test/sql_stmt_freexl_tests
abs_srcdir = /home/sandro/fossil/libspatialite/test/sql_stmt_freexl_tests
abs_top_builddir = /home/sandro/fossil/libspatialite
abs_top_srcdir = /home/sandro/fossil/libspatialite
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_DUMPBIN = 
am__include = include
am__leading_dot = .
am__quote = 
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias = 
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias = 
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/sandro/fossil/libspatialite/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias = 
top_build_prefix = ../../
top_builddir = ../..
top_srcdir = ../..
EXTRA_DIST = loadxls1.testcase \
	loadxls2.testcase \
	loadxls3.testcase \
	loadxls4.testcase \
	loadxls5.testcase \
	loadxls6.testcase \
	loadxls7.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_freexl_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_freexl_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: # $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to test/sql_stmt_freexl_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
270
271
272
273
274
275
276

277
278
279
280
281
282
283
...
444
445
446
447
448
449
450
451
452
453
454
455
456
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_freexl_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_freexl_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_freexl_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
...
434
435
436
437
438
439
440


441
442
443
444
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_freexl_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_freexl_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_freexl_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to test/sql_stmt_geopackage_tests/Makefile.am.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
..
75
76
77
78
79
80
81
82
	geomfromgpb3.testcase \
	geomfromgpb4.testcase \
	geomfromgpb5.testcase \
	geomfromgpb6.testcase \
	geomfromgpb7.testcase \
	geomfromgpb8.testcase \
	geomfromgpb9.testcase \
	gpkg1.testcase \
	gpkg2.testcase \
	gpkg3.testcase \
	gpkg4.testcase \
	gpkg5.testcase \
	gpkg6.testcase \
	gpkg7.testcase \
	gpkg8.testcase \
	implicitgeopackagebinary1.testcase \
	implicitgeopackagebinary2.testcase \
	makepoint1.testcase \
	makepoint2.testcase \
	makepoint3.testcase \
	makepoint4.testcase \
	makepoint5.testcase \
................................................................................
	makepointzm2.testcase \
	makepointzm3.testcase \
	makepointzm4.testcase \
	makepointzm5.testcase \
	makepointzm6.testcase \
	makepointzm7.testcase \
	makepointzm8.testcase \
	makepointzm9.testcase	







<
<
<
<
<
<
<
<







 







|
20
21
22
23
24
25
26








27
28
29
30
31
32
33
..
67
68
69
70
71
72
73
74
	geomfromgpb3.testcase \
	geomfromgpb4.testcase \
	geomfromgpb5.testcase \
	geomfromgpb6.testcase \
	geomfromgpb7.testcase \
	geomfromgpb8.testcase \
	geomfromgpb9.testcase \








	implicitgeopackagebinary1.testcase \
	implicitgeopackagebinary2.testcase \
	makepoint1.testcase \
	makepoint2.testcase \
	makepoint3.testcase \
	makepoint4.testcase \
	makepoint5.testcase \
................................................................................
	makepointzm2.testcase \
	makepointzm3.testcase \
	makepointzm4.testcase \
	makepointzm5.testcase \
	makepointzm6.testcase \
	makepointzm7.testcase \
	makepointzm8.testcase \
	makepointzm9.testcase 

Changes to test/sql_stmt_geopackage_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
...
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
...
344
345
346
347
348
349
350

351
352
353
354
355
356
357
...
518
519
520
521
522
523
524
525
526
527
528
529
530
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_geopackage_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	geomfromgpb3.testcase \
	geomfromgpb4.testcase \
	geomfromgpb5.testcase \
	geomfromgpb6.testcase \
	geomfromgpb7.testcase \
	geomfromgpb8.testcase \
	geomfromgpb9.testcase \
	gpkg1.testcase \
	gpkg2.testcase \
	gpkg3.testcase \
	gpkg4.testcase \
	gpkg5.testcase \
	gpkg6.testcase \
	gpkg7.testcase \
	gpkg8.testcase \
	implicitgeopackagebinary1.testcase \
	implicitgeopackagebinary2.testcase \
	makepoint1.testcase \
	makepoint2.testcase \
	makepoint3.testcase \
	makepoint4.testcase \
	makepoint5.testcase \
................................................................................
	makepointzm2.testcase \
	makepointzm3.testcase \
	makepointzm4.testcase \
	makepointzm5.testcase \
	makepointzm6.testcase \
	makepointzm7.testcase \
	makepointzm8.testcase \
	makepointzm9.testcase	

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geopackage_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geopackage_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







<
<
<
<
<
<
<
<







 







|







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
261
262
263
264
265
266
267








268
269
270
271
272
273
274
...
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
...
500
501
502
503
504
505
506


507
508
509
510
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_geopackage_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	geomfromgpb3.testcase \
	geomfromgpb4.testcase \
	geomfromgpb5.testcase \
	geomfromgpb6.testcase \
	geomfromgpb7.testcase \
	geomfromgpb8.testcase \
	geomfromgpb9.testcase \








	implicitgeopackagebinary1.testcase \
	implicitgeopackagebinary2.testcase \
	makepoint1.testcase \
	makepoint2.testcase \
	makepoint3.testcase \
	makepoint4.testcase \
	makepoint5.testcase \
................................................................................
	makepointzm2.testcase \
	makepointzm3.testcase \
	makepointzm4.testcase \
	makepointzm5.testcase \
	makepointzm6.testcase \
	makepointzm7.testcase \
	makepointzm8.testcase \
	makepointzm9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geopackage_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geopackage_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sql_stmt_geopackage_tests/gpkg1.testcase.

1
2
3
4
5
6
7
GPKG1
:memory: #use in-memory database
SELECT AutoGpkgStart()
1 # rows (not including the header row)
1 # columns
AutoGpkgStart()
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg2.testcase.

1
2
3
4
5
6
7
GPKG2
:memory: #use in-memory database
SELECT AutoGpkgStop()
1 # rows (not including the header row)
1 # columns
AutoGpkgStop()
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg3.testcase.

1
2
3
4
5
6
7
GPKG3
:memory: #use in-memory database
SELECT AutoGpkgStart('a')
1 # rows (not including the header row)
1 # columns
AutoGpkgStart('a')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg4.testcase.

1
2
3
4
5
6
7
GPKG4
:memory: #use in-memory database
SELECT AutoGpkgStart(1)
1 # rows (not including the header row)
1 # columns
AutoGpkgStart(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg5.testcase.

1
2
3
4
5
6
7
GPKG5
:memory: #use in-memory database
SELECT AutoGpkgStop('a')
1 # rows (not including the header row)
1 # columns
AutoGpkgStop('a')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg6.testcase.

1
2
3
4
5
6
7
GPKG6
:memory: #use in-memory database
SELECT AutoGpkgStop(1)
1 # rows (not including the header row)
1 # columns
AutoGpkgStop(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg7.testcase.

1
2
3
4
5
6
7
GPKG7
:memory: #use in-memory database
SELECT AutoGpkgStart(NULL)
1 # rows (not including the header row)
1 # columns
AutoGpkgStart(NULL)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geopackage_tests/gpkg8.testcase.

1
2
3
4
5
6
7
GPKG8
:memory: #use in-memory database
SELECT AutoGpkgStop(NULL)
1 # rows (not including the header row)
1 # columns
AutoGpkgStop(NULL)
0
<
<
<
<
<
<
<














Changes to test/sql_stmt_geos_tests/Makefile.am.

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
...
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
...
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
...
544
545
546
547
548
549
550


















551
552
553
554
555
556
557
...
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
...
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
...
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
...
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
	centroid2.testcase \
	centroid3.testcase \
	centroid4.testcase \
	centroid5.testcase \
	centroid6.testcase \
	centroid7.testcase \
	centroid8.testcase \
	circularity1.testcase \
	circularity2.testcase \
	circularity3.testcase \
	circularity4.testcase \
	circularity5.testcase \
	circularity6.testcase \
	circularity7.testcase \
	circularity8.testcase \
	circularity9.testcase \
	convexhull10.testcase \
	convexhull1.testcase \
	convexhull2.testcase \
	convexhull3.testcase \
	convexhull4.testcase \
	convexhull5.testcase \
	convexhull6.testcase \
	convexhull7.testcase \
	convexhull8.testcase \
	convexhull9.testcase \
	acuttermessage.testcase \
	cutter1.testcase \
	cutter2.testcase \
	cutter3.testcase \
	cutter4.testcase \
	cutter5.testcase \
	cutter6.testcase \
	cutter7.testcase \
	cutter8.testcase \
	cutter9.testcase \
	cutter10.testcase \
	cutter11.testcase \
	cutter12.testcase \
	cutter13.testcase \
	cutter14.testcase \
	cutter15.testcase \
	difference10.testcase \
	difference11.testcase \
	difference12.testcase \
	difference1.testcase \
	difference2.testcase \
	difference3.testcase \
	difference4.testcase \
................................................................................
	distance3.testcase \
	distance4.testcase \
	distance5.testcase \
	distance6.testcase \
	distance7.testcase \
	distance8.testcase \
	distance9.testcase \
	drapeline1.testcase \
	drapeline2.testcase \
	drapeline3.testcase \
	drapeline4.testcase \
	drapeline5.testcase \
	drapeline6.testcase \
	drapeline7.testcase \
	drapeline8.testcase \
	drapeline9.testcase \
	drapeline10.testcase \
	drapeline11.testcase \
	drapeline12.testcase \
	drapeline13.testcase \
	drapeline14.testcase \
	drapeline15.testcase \
	drapeline16.testcase \
	drapeline17.testcase \
	drapeline18.testcase \
	drapeline19.testcase \
	drapeline20.testcase \
	drapeline21.testcase \
	drapeline22.testcase \
	drapelineex1.testcase \
	drapelineex2.testcase \
	drapelineex3.testcase \
	drapelineex4.testcase \
	drapelineex5.testcase \
	drapelineex6.testcase \
	drapelineex7.testcase \
	drapelineex8.testcase \
	drapelineex9.testcase \
	drapelineex10.testcase \
	drapelineex11.testcase \
	drapelineex12.testcase \
	drapelineex13.testcase \
	drapelineex14.testcase \
	drapelineex15.testcase \
	drapelineex16.testcase \
	drapelineex17.testcase \
	drapelineex18.testcase \
	drapelineex19.testcase \
	drapelineex20.testcase \
	drapelineex21.testcase \
	drapelineex22.testcase \
	drapelineex23.testcase \
	drapelineex24.testcase \
	drapelineex25.testcase \
	drapelineex26.testcase \
	drapelineex27.testcase \
	drapelineex28.testcase \
	intersection10.testcase \
	intersection11.testcase \
	intersection12.testcase \
	intersection1.testcase \
	intersection2.testcase \
	intersection3.testcase \
	intersection4.testcase \
................................................................................
	relate3.testcase \
	relate4.testcase \
	relate5.testcase \
	relate6.testcase \
	relate7.testcase \
	relate8.testcase \
	relate9.testcase \
	relate10.testcase \
	relate11.testcase \
	relate12.testcase \
	relate13.testcase \
	relate14.testcase \
	relate15.testcase \
	relate16.testcase \
	relate17.testcase \
	relate18.testcase \
	relate19.testcase \
	relate20.testcase \
	relate21.testcase \
	relate22.testcase \
	relate23.testcase \
	relate24.testcase \
	relatematch1.testcase \
	relatematch2.testcase \
	relatematch3.testcase \
	relatematch4.testcase \
	relatematch5.testcase \
	relatematch6.testcase \
	relatematch7.testcase \
	relatematch8.testcase \
	relatematch9.testcase \
	relatematch10.testcase \
	relations1.testcase \
	relations2.testcase \
	relations3.testcase \
	relations4.testcase \
	relations5.testcase \
	relations6.testcase \
	relations7.testcase \
................................................................................
	covers_covered1.testcase \
	covers_covered2.testcase \
	covers_covered3.testcase \
	covers_covered4.testcase \
	covers_covered5.testcase \
	covers_covered6.testcase \
	covers_covered7.testcase \


















	distance_geogr10.testcase \
	distance_geogr11.testcase \
	distance_geogr12.testcase \
	distance_geogr1.testcase \
	distance_geogr2.testcase \
	distance_geogr3.testcase \
	distance_geogr4.testcase \
................................................................................
	hexgrid18.testcase \
	hexgrid19.testcase \
	hexgrid1.testcase \
	hexgrid20.testcase \
	hexgrid21.testcase \
	hexgrid22.testcase \
	hexgrid23.testcase \
	hexgrid24.testcase \
	hexgrid25.testcase \
	hexgrid2.testcase \
	hexgrid3.testcase \
	hexgrid4.testcase \
	hexgrid5.testcase \
	hexgrid6.testcase \
	hexgrid7.testcase \
	hexgrid8.testcase \
................................................................................
	locatepoint3.testcase \
	locatepoint4.testcase \
	locatepoint5.testcase \
	locatepoint6.testcase \
	locatepoint7.testcase \
	locatepoint8.testcase \
	locatepoint9.testcase \
	m_interpolatepoint10.testcase \
	m_interpolatepoint11.testcase \
	m_interpolatepoint12.testcase \
	m_interpolatepoint13.testcase \
	m_interpolatepoint14.testcase \
	m_interpolatepoint15.testcase \
	m_interpolatepoint16.testcase \
	m_interpolatepoint17.testcase \
	m_interpolatepoint18.testcase \
	m_interpolatepoint1.testcase \
	m_interpolatepoint2.testcase \
	m_interpolatepoint3.testcase \
	m_interpolatepoint4.testcase \
	m_interpolatepoint5.testcase \
	m_interpolatepoint6.testcase \
	m_interpolatepoint7.testcase \
	m_interpolatepoint8.testcase \
	m_interpolatepoint9.testcase \
	offsetcurve10.testcase \
	offsetcurve11.testcase \
	offsetcurve12.testcase \
	offsetcurve13.testcase \
	offsetcurve14.testcase \
	offsetcurve1.testcase \
	offsetcurve2.testcase \
................................................................................
	squaregrid18.testcase \
	squaregrid19.testcase \
	squaregrid1.testcase \
	squaregrid20.testcase \
	squaregrid21.testcase \
	squaregrid22.testcase \
	squaregrid23.testcase \
	squaregrid24.testcase \
	squaregrid25.testcase \
	squaregrid2.testcase \
	squaregrid3.testcase \
	squaregrid4.testcase \
	squaregrid5.testcase \
	squaregrid6.testcase \
	squaregrid7.testcase \
	squaregrid8.testcase \
................................................................................
	trianggrid18.testcase \
	trianggrid19.testcase \
	trianggrid1.testcase \
	trianggrid20.testcase \
	trianggrid21.testcase \
	trianggrid22.testcase \
	trianggrid23.testcase \
	trianggrid24.testcase \
	trianggrid25.testcase \
	trianggrid2.testcase \
	trianggrid3.testcase \
	trianggrid4.testcase \
	trianggrid5.testcase \
	trianggrid6.testcase \
	trianggrid7.testcase \
	trianggrid8.testcase \







<
<
<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







 







<
<







94
95
96
97
98
99
100









101
102
103
104
105
106
107
108
109
110
















111
112
113
114
115
116
117
...
125
126
127
128
129
130
131


















































132
133
134
135
136
137
138
...
256
257
258
259
260
261
262

























263
264
265
266
267
268
269
...
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
...
496
497
498
499
500
501
502


503
504
505
506
507
508
509
...
599
600
601
602
603
604
605


















606
607
608
609
610
611
612
...
699
700
701
702
703
704
705


706
707
708
709
710
711
712
...
722
723
724
725
726
727
728


729
730
731
732
733
734
735
	centroid2.testcase \
	centroid3.testcase \
	centroid4.testcase \
	centroid5.testcase \
	centroid6.testcase \
	centroid7.testcase \
	centroid8.testcase \









	convexhull10.testcase \
	convexhull1.testcase \
	convexhull2.testcase \
	convexhull3.testcase \
	convexhull4.testcase \
	convexhull5.testcase \
	convexhull6.testcase \
	convexhull7.testcase \
	convexhull8.testcase \
	convexhull9.testcase \
















	difference10.testcase \
	difference11.testcase \
	difference12.testcase \
	difference1.testcase \
	difference2.testcase \
	difference3.testcase \
	difference4.testcase \
................................................................................
	distance3.testcase \
	distance4.testcase \
	distance5.testcase \
	distance6.testcase \
	distance7.testcase \
	distance8.testcase \
	distance9.testcase \


















































	intersection10.testcase \
	intersection11.testcase \
	intersection12.testcase \
	intersection1.testcase \
	intersection2.testcase \
	intersection3.testcase \
	intersection4.testcase \
................................................................................
	relate3.testcase \
	relate4.testcase \
	relate5.testcase \
	relate6.testcase \
	relate7.testcase \
	relate8.testcase \
	relate9.testcase \

























	relations1.testcase \
	relations2.testcase \
	relations3.testcase \
	relations4.testcase \
	relations5.testcase \
	relations6.testcase \
	relations7.testcase \
................................................................................
	covers_covered1.testcase \
	covers_covered2.testcase \
	covers_covered3.testcase \
	covers_covered4.testcase \
	covers_covered5.testcase \
	covers_covered6.testcase \
	covers_covered7.testcase \
	createtopo10.testcase \
	createtopo11.testcase \
	createtopo12.testcase \
	createtopo13.testcase \
	createtopo14.testcase \
	createtopo15.testcase \
	createtopo16.testcase \
	createtopo17.testcase \
	createtopo18.testcase \
	createtopo1.testcase \
	createtopo2.testcase \
	createtopo3.testcase \
	createtopo4.testcase \
	createtopo5.testcase \
	createtopo6.testcase \
	createtopo7.testcase \
	createtopo8.testcase \
	createtopo9.testcase \
	distance_geogr10.testcase \
	distance_geogr11.testcase \
	distance_geogr12.testcase \
	distance_geogr1.testcase \
	distance_geogr2.testcase \
	distance_geogr3.testcase \
	distance_geogr4.testcase \
................................................................................
	hexgrid18.testcase \
	hexgrid19.testcase \
	hexgrid1.testcase \
	hexgrid20.testcase \
	hexgrid21.testcase \
	hexgrid22.testcase \
	hexgrid23.testcase \


	hexgrid2.testcase \
	hexgrid3.testcase \
	hexgrid4.testcase \
	hexgrid5.testcase \
	hexgrid6.testcase \
	hexgrid7.testcase \
	hexgrid8.testcase \
................................................................................
	locatepoint3.testcase \
	locatepoint4.testcase \
	locatepoint5.testcase \
	locatepoint6.testcase \
	locatepoint7.testcase \
	locatepoint8.testcase \
	locatepoint9.testcase \


















	offsetcurve10.testcase \
	offsetcurve11.testcase \
	offsetcurve12.testcase \
	offsetcurve13.testcase \
	offsetcurve14.testcase \
	offsetcurve1.testcase \
	offsetcurve2.testcase \
................................................................................
	squaregrid18.testcase \
	squaregrid19.testcase \
	squaregrid1.testcase \
	squaregrid20.testcase \
	squaregrid21.testcase \
	squaregrid22.testcase \
	squaregrid23.testcase \


	squaregrid2.testcase \
	squaregrid3.testcase \
	squaregrid4.testcase \
	squaregrid5.testcase \
	squaregrid6.testcase \
	squaregrid7.testcase \
	squaregrid8.testcase \
................................................................................
	trianggrid18.testcase \
	trianggrid19.testcase \
	trianggrid1.testcase \
	trianggrid20.testcase \
	trianggrid21.testcase \
	trianggrid22.testcase \
	trianggrid23.testcase \


	trianggrid2.testcase \
	trianggrid3.testcase \
	trianggrid4.testcase \
	trianggrid5.testcase \
	trianggrid6.testcase \
	trianggrid7.testcase \
	trianggrid8.testcase \

Changes to test/sql_stmt_geos_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
...
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
...
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
...
797
798
799
800
801
802
803


















804
805
806
807
808
809
810
...
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
...
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
....
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
....
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
....
1113
1114
1115
1116
1117
1118
1119

1120
1121
1122
1123
1124
1125
1126
....
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_geos_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	centroid2.testcase \
	centroid3.testcase \
	centroid4.testcase \
	centroid5.testcase \
	centroid6.testcase \
	centroid7.testcase \
	centroid8.testcase \
	circularity1.testcase \
	circularity2.testcase \
	circularity3.testcase \
	circularity4.testcase \
	circularity5.testcase \
	circularity6.testcase \
	circularity7.testcase \
	circularity8.testcase \
	circularity9.testcase \
	convexhull10.testcase \
	convexhull1.testcase \
	convexhull2.testcase \
	convexhull3.testcase \
	convexhull4.testcase \
	convexhull5.testcase \
	convexhull6.testcase \
	convexhull7.testcase \
	convexhull8.testcase \
	convexhull9.testcase \
	acuttermessage.testcase \
	cutter1.testcase \
	cutter2.testcase \
	cutter3.testcase \
	cutter4.testcase \
	cutter5.testcase \
	cutter6.testcase \
	cutter7.testcase \
	cutter8.testcase \
	cutter9.testcase \
	cutter10.testcase \
	cutter11.testcase \
	cutter12.testcase \
	cutter13.testcase \
	cutter14.testcase \
	cutter15.testcase \
	difference10.testcase \
	difference11.testcase \
	difference12.testcase \
	difference1.testcase \
	difference2.testcase \
	difference3.testcase \
	difference4.testcase \
................................................................................
	distance3.testcase \
	distance4.testcase \
	distance5.testcase \
	distance6.testcase \
	distance7.testcase \
	distance8.testcase \
	distance9.testcase \
	drapeline1.testcase \
	drapeline2.testcase \
	drapeline3.testcase \
	drapeline4.testcase \
	drapeline5.testcase \
	drapeline6.testcase \
	drapeline7.testcase \
	drapeline8.testcase \
	drapeline9.testcase \
	drapeline10.testcase \
	drapeline11.testcase \
	drapeline12.testcase \
	drapeline13.testcase \
	drapeline14.testcase \
	drapeline15.testcase \
	drapeline16.testcase \
	drapeline17.testcase \
	drapeline18.testcase \
	drapeline19.testcase \
	drapeline20.testcase \
	drapeline21.testcase \
	drapeline22.testcase \
	drapelineex1.testcase \
	drapelineex2.testcase \
	drapelineex3.testcase \
	drapelineex4.testcase \
	drapelineex5.testcase \
	drapelineex6.testcase \
	drapelineex7.testcase \
	drapelineex8.testcase \
	drapelineex9.testcase \
	drapelineex10.testcase \
	drapelineex11.testcase \
	drapelineex12.testcase \
	drapelineex13.testcase \
	drapelineex14.testcase \
	drapelineex15.testcase \
	drapelineex16.testcase \
	drapelineex17.testcase \
	drapelineex18.testcase \
	drapelineex19.testcase \
	drapelineex20.testcase \
	drapelineex21.testcase \
	drapelineex22.testcase \
	drapelineex23.testcase \
	drapelineex24.testcase \
	drapelineex25.testcase \
	drapelineex26.testcase \
	drapelineex27.testcase \
	drapelineex28.testcase \
	intersection10.testcase \
	intersection11.testcase \
	intersection12.testcase \
	intersection1.testcase \
	intersection2.testcase \
	intersection3.testcase \
	intersection4.testcase \
................................................................................
	relate3.testcase \
	relate4.testcase \
	relate5.testcase \
	relate6.testcase \
	relate7.testcase \
	relate8.testcase \
	relate9.testcase \
	relate10.testcase \
	relate11.testcase \
	relate12.testcase \
	relate13.testcase \
	relate14.testcase \
	relate15.testcase \
	relate16.testcase \
	relate17.testcase \
	relate18.testcase \
	relate19.testcase \
	relate20.testcase \
	relate21.testcase \
	relate22.testcase \
	relate23.testcase \
	relate24.testcase \
	relatematch1.testcase \
	relatematch2.testcase \
	relatematch3.testcase \
	relatematch4.testcase \
	relatematch5.testcase \
	relatematch6.testcase \
	relatematch7.testcase \
	relatematch8.testcase \
	relatematch9.testcase \
	relatematch10.testcase \
	relations1.testcase \
	relations2.testcase \
	relations3.testcase \
	relations4.testcase \
	relations5.testcase \
	relations6.testcase \
	relations7.testcase \
................................................................................
	covers_covered1.testcase \
	covers_covered2.testcase \
	covers_covered3.testcase \
	covers_covered4.testcase \
	covers_covered5.testcase \
	covers_covered6.testcase \
	covers_covered7.testcase \


















	distance_geogr10.testcase \
	distance_geogr11.testcase \
	distance_geogr12.testcase \
	distance_geogr1.testcase \
	distance_geogr2.testcase \
	distance_geogr3.testcase \
	distance_geogr4.testcase \
................................................................................
	hexgrid18.testcase \
	hexgrid19.testcase \
	hexgrid1.testcase \
	hexgrid20.testcase \
	hexgrid21.testcase \
	hexgrid22.testcase \
	hexgrid23.testcase \
	hexgrid24.testcase \
	hexgrid25.testcase \
	hexgrid2.testcase \
	hexgrid3.testcase \
	hexgrid4.testcase \
	hexgrid5.testcase \
	hexgrid6.testcase \
	hexgrid7.testcase \
	hexgrid8.testcase \
................................................................................
	locatepoint3.testcase \
	locatepoint4.testcase \
	locatepoint5.testcase \
	locatepoint6.testcase \
	locatepoint7.testcase \
	locatepoint8.testcase \
	locatepoint9.testcase \
	m_interpolatepoint10.testcase \
	m_interpolatepoint11.testcase \
	m_interpolatepoint12.testcase \
	m_interpolatepoint13.testcase \
	m_interpolatepoint14.testcase \
	m_interpolatepoint15.testcase \
	m_interpolatepoint16.testcase \
	m_interpolatepoint17.testcase \
	m_interpolatepoint18.testcase \
	m_interpolatepoint1.testcase \
	m_interpolatepoint2.testcase \
	m_interpolatepoint3.testcase \
	m_interpolatepoint4.testcase \
	m_interpolatepoint5.testcase \
	m_interpolatepoint6.testcase \
	m_interpolatepoint7.testcase \
	m_interpolatepoint8.testcase \
	m_interpolatepoint9.testcase \
	offsetcurve10.testcase \
	offsetcurve11.testcase \
	offsetcurve12.testcase \
	offsetcurve13.testcase \
	offsetcurve14.testcase \
	offsetcurve1.testcase \
	offsetcurve2.testcase \
................................................................................
	squaregrid18.testcase \
	squaregrid19.testcase \
	squaregrid1.testcase \
	squaregrid20.testcase \
	squaregrid21.testcase \
	squaregrid22.testcase \
	squaregrid23.testcase \
	squaregrid24.testcase \
	squaregrid25.testcase \
	squaregrid2.testcase \
	squaregrid3.testcase \
	squaregrid4.testcase \
	squaregrid5.testcase \
	squaregrid6.testcase \
	squaregrid7.testcase \
	squaregrid8.testcase \
................................................................................
	trianggrid18.testcase \
	trianggrid19.testcase \
	trianggrid1.testcase \
	trianggrid20.testcase \
	trianggrid21.testcase \
	trianggrid22.testcase \
	trianggrid23.testcase \
	trianggrid24.testcase \
	trianggrid25.testcase \
	trianggrid2.testcase \
	trianggrid3.testcase \
	trianggrid4.testcase \
	trianggrid5.testcase \
	trianggrid6.testcase \
	trianggrid7.testcase \
	trianggrid8.testcase \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geos_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geos_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







<
<
<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







 







<
<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
336
337
338
339
340
341
342









343
344
345
346
347
348
349
350
351
352
















353
354
355
356
357
358
359
...
367
368
369
370
371
372
373


















































374
375
376
377
378
379
380
...
498
499
500
501
502
503
504

























505
506
507
508
509
510
511
...
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
...
738
739
740
741
742
743
744


745
746
747
748
749
750
751
...
841
842
843
844
845
846
847


















848
849
850
851
852
853
854
...
941
942
943
944
945
946
947


948
949
950
951
952
953
954
...
964
965
966
967
968
969
970


971
972
973
974
975
976
977
...
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
....
1171
1172
1173
1174
1175
1176
1177


1178
1179
1180
1181
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_geos_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	centroid2.testcase \
	centroid3.testcase \
	centroid4.testcase \
	centroid5.testcase \
	centroid6.testcase \
	centroid7.testcase \
	centroid8.testcase \









	convexhull10.testcase \
	convexhull1.testcase \
	convexhull2.testcase \
	convexhull3.testcase \
	convexhull4.testcase \
	convexhull5.testcase \
	convexhull6.testcase \
	convexhull7.testcase \
	convexhull8.testcase \
	convexhull9.testcase \
















	difference10.testcase \
	difference11.testcase \
	difference12.testcase \
	difference1.testcase \
	difference2.testcase \
	difference3.testcase \
	difference4.testcase \
................................................................................
	distance3.testcase \
	distance4.testcase \
	distance5.testcase \
	distance6.testcase \
	distance7.testcase \
	distance8.testcase \
	distance9.testcase \


















































	intersection10.testcase \
	intersection11.testcase \
	intersection12.testcase \
	intersection1.testcase \
	intersection2.testcase \
	intersection3.testcase \
	intersection4.testcase \
................................................................................
	relate3.testcase \
	relate4.testcase \
	relate5.testcase \
	relate6.testcase \
	relate7.testcase \
	relate8.testcase \
	relate9.testcase \

























	relations1.testcase \
	relations2.testcase \
	relations3.testcase \
	relations4.testcase \
	relations5.testcase \
	relations6.testcase \
	relations7.testcase \
................................................................................
	covers_covered1.testcase \
	covers_covered2.testcase \
	covers_covered3.testcase \
	covers_covered4.testcase \
	covers_covered5.testcase \
	covers_covered6.testcase \
	covers_covered7.testcase \
	createtopo10.testcase \
	createtopo11.testcase \
	createtopo12.testcase \
	createtopo13.testcase \
	createtopo14.testcase \
	createtopo15.testcase \
	createtopo16.testcase \
	createtopo17.testcase \
	createtopo18.testcase \
	createtopo1.testcase \
	createtopo2.testcase \
	createtopo3.testcase \
	createtopo4.testcase \
	createtopo5.testcase \
	createtopo6.testcase \
	createtopo7.testcase \
	createtopo8.testcase \
	createtopo9.testcase \
	distance_geogr10.testcase \
	distance_geogr11.testcase \
	distance_geogr12.testcase \
	distance_geogr1.testcase \
	distance_geogr2.testcase \
	distance_geogr3.testcase \
	distance_geogr4.testcase \
................................................................................
	hexgrid18.testcase \
	hexgrid19.testcase \
	hexgrid1.testcase \
	hexgrid20.testcase \
	hexgrid21.testcase \
	hexgrid22.testcase \
	hexgrid23.testcase \


	hexgrid2.testcase \
	hexgrid3.testcase \
	hexgrid4.testcase \
	hexgrid5.testcase \
	hexgrid6.testcase \
	hexgrid7.testcase \
	hexgrid8.testcase \
................................................................................
	locatepoint3.testcase \
	locatepoint4.testcase \
	locatepoint5.testcase \
	locatepoint6.testcase \
	locatepoint7.testcase \
	locatepoint8.testcase \
	locatepoint9.testcase \


















	offsetcurve10.testcase \
	offsetcurve11.testcase \
	offsetcurve12.testcase \
	offsetcurve13.testcase \
	offsetcurve14.testcase \
	offsetcurve1.testcase \
	offsetcurve2.testcase \
................................................................................
	squaregrid18.testcase \
	squaregrid19.testcase \
	squaregrid1.testcase \
	squaregrid20.testcase \
	squaregrid21.testcase \
	squaregrid22.testcase \
	squaregrid23.testcase \


	squaregrid2.testcase \
	squaregrid3.testcase \
	squaregrid4.testcase \
	squaregrid5.testcase \
	squaregrid6.testcase \
	squaregrid7.testcase \
	squaregrid8.testcase \
................................................................................
	trianggrid18.testcase \
	trianggrid19.testcase \
	trianggrid1.testcase \
	trianggrid20.testcase \
	trianggrid21.testcase \
	trianggrid22.testcase \
	trianggrid23.testcase \


	trianggrid2.testcase \
	trianggrid3.testcase \
	trianggrid4.testcase \
	trianggrid5.testcase \
	trianggrid6.testcase \
	trianggrid7.testcase \
	trianggrid8.testcase \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geos_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geos_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sql_stmt_geos_tests/acuttermessage.testcase.

1
2
3
4
5
6
7
GetCutterMessage
NEW:memory: #use in-memory database
SELECT GetCutterMessage();
1 # rows (not including the header row)
1 # columns
GetCutterMessage()
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity1.testcase.

1
2
3
4
5
6
7
Circularity - Polygon with 1 interior
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((0 0, 0 4, 4 4, 4 0, 0 0),(1 1, 1 3, 3 3, 3 1, 1 1))"));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((0 0, 0 4, 4 4, 4 0, 0 0),(1 1, 1 3, 3 3, 3 1, 1 1))"))
0.78:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity2.testcase.

1
2
3
4
5
6
7
Circularity - Simple Polygon
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((0 0, 0 4, 4 4, 4 0, 0 0))"));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((0 0, 0 4, 4 4, 4 0, 0 0))"))
0.78:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity3.testcase.

1
2
3
4
5
6
7
Circularity - Linestring
:memory: #use in-memory database
SELECT Circularity(GeomFromText("LINESTRING(0 0, 0 4, 4 4, 4 0, 0 0)"));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("LINESTRING(0 0, 0 4, 4 4, 4 0, 0 0)"))
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity4.testcase.

1
2
3
4
5
6
7
Circularity - Linestring not closed
:memory: #use in-memory database
SELECT Circularity(GeomFromText("LINESTRING(0 0, 0 4, 4 4, 4 0)"));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("LINESTRING(0 0, 0 4, 4 4, 4 0)"))
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity5.testcase.

1
2
3
4
5
6
7
Circularity - Point
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POINT(0 0)"));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POINT(0 0)"))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity6.testcase.

1
2
3
4
5
6
7
Circularity - bad blob (error)
:memory: #use in-memory database
SELECT Circularity(zeroblob(4));
1 # rows (not including the header row)
1 # columns
Circularity(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity7.testcase.

1
2
3
4
5
6
7
Circularity - Empty linestring
:memory: #use in-memory database
SELECT Circularity(GeomFromText("LINESTRING()"));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("LINESTRING()"))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity8.testcase.

1
2
3
4
5
6
7
Circularity - text (error)
:memory: #use in-memory database
SELECT Circularity("hello");
1 # rows (not including the header row)
1 # columns
Circularity("hello")
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/circularity9.testcase.

1
2
3
4
5
6
7
Circularity - Toxic Polygon
:memory: #use in-memory database
SELECT Circularity(GeomFromText('POLYGON((0 0, 0 0, 0 4, 4 0, 0 0))'));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText('POLYGON((0 0, 0 0, 0 4, 4 0, 0 0))'))
0.53:2
<
<
<
<
<
<
<














Added test/sql_stmt_geos_tests/createtopo1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, 2D
NEW:memory: #use in-memory database (empty)
SELECT CreateTopologyTables(4326, "XY");
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(4326, "XY")
1

Added test/sql_stmt_geos_tests/createtopo10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, integer prefix (error)
:memory: #use in-memory database
SELECT CreateTopologyTables(3, 4326, 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(3, 4326, 3)
0

Added test/sql_stmt_geos_tests/createtopo11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, float dim (error)
:memory: #use in-memory database
SELECT CreateTopologyTables("hello_world", 4326, 3.3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("hello_world", 4326, 3.3)
0

Added test/sql_stmt_geos_tests/createtopo12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, spaces in prefix
NEW:memory: #use in-memory database
SELECT CreateTopologyTables("hello world", 4326, 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("hello world", 4326, 3)
1

Added test/sql_stmt_geos_tests/createtopo13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, quote in prefix
NEW:memory: #use in-memory database
SELECT CreateTopologyTables("hello'_world", 4326, 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("hello'_world", 4326, 3)
1

Added test/sql_stmt_geos_tests/createtopo14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, 2D int
NEW:memory: #use in-memory database
SELECT CreateTopologyTables(4326, 2);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(4326, 2)
1

Added test/sql_stmt_geos_tests/createtopo15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, 3D int
NEW:memory: #use in-memory database
SELECT CreateTopologyTables(4326, 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(4326, 3)
1

Added test/sql_stmt_geos_tests/createtopo16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, 4D int (error)
:memory: #use in-memory database
SELECT CreateTopologyTables(4326, 4);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(4326, 4)
0

Added test/sql_stmt_geos_tests/createtopo17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, text SRID (error)
:memory: #use in-memory database
SELECT CreateTopologyTables("4326", 2);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("4326", 2)
0

Added test/sql_stmt_geos_tests/createtopo18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, float dims (error)
:memory: #use in-memory database
SELECT CreateTopologyTables(4326, 2.0);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(4326, 2.0)
0

Added test/sql_stmt_geos_tests/createtopo2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 2 arguments, 3D
NEW:memory: #use in-memory database
SELECT CreateTopologyTables(4326, "XYZ");
1 # rows (not including the header row)
1 # columns
CreateTopologyTables(4326, "XYZ")
1

Added test/sql_stmt_geos_tests/createtopo3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, 2D
NEW:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", 4326, "XY");
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", 4326, "XY")
1

Added test/sql_stmt_geos_tests/createtopo4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, 3D
NEW:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", 4326, "XYZ");
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", 4326, "XYZ")
1

Added test/sql_stmt_geos_tests/createtopo5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, 3D int
NEW:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", 4326, 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", 4326, 3)
1

Added test/sql_stmt_geos_tests/createtopo6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, 2D int
NEW:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", 4326, 2);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", 4326, 2)
1

Added test/sql_stmt_geos_tests/createtopo7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, 4D (error)
:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", 4326, 4);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", 4326, 4)
0

Added test/sql_stmt_geos_tests/createtopo8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, text SRID (error)
:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", "WGS-84", 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", "WGS-84", 3)
0

Added test/sql_stmt_geos_tests/createtopo9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
CreateTopology - 3 arguments, 0 SRID (error)
:memory: #use in-memory database
SELECT CreateTopologyTables("my_prefix", 0, 3);
1 # rows (not including the header row)
1 # columns
CreateTopologyTables("my_prefix", 0, 3)
0

Deleted test/sql_stmt_geos_tests/cutter1.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL input-DB-prefix
:memory: #use in-memory database
SELECT ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter10.testcase.

1
2
3
4
5
6
7
ST_Cutter - INT blade-geom
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', 'input_g', NULL, 'blade', 1, 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', 'input_g', NULL, 'blade', 1, 'output')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter11.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL output
:memory: #use in-memory database
SELECT ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', NULL);
1 # rows (not including the header row)
1 # columns
ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter12.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL transaction
:memory: #use in-memory database
SELECT ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', NULL);
1 # rows (not including the header row)
1 # columns
ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter13.testcase.

1
2
3
4
5
6
7
ST_Cutter - INT transaction
:memory: #use in-memory database
SELECT ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', 1);
1 # rows (not including the header row)
1 # columns
ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter14.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL ram-temp-storage
:memory: #use in-memory database
SELECT ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', 1, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter15.testcase.

1
2
3
4
5
6
7
ST_Cutter - INT ram-temp-storage
:memory: #use in-memory database
SELECT ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', 1, 1);
1 # rows (not including the header row)
1 # columns
ST_Cutter(NULL, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output', 1, 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter2.testcase.

1
2
3
4
5
6
7
ST_Cutter - INT input-DB-prefix
:memory: #use in-memory database
SELECT ST_Cutter(1, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter(1, 'input', 'input_g', 'db-prefix', 'blade', 'blade_g', 'output')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter3.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL input-table
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', NULL, 'input_g', 'db-prefix', 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', NULL, 'input_g', 'db-prefix', 'blade', 'blade_g', 'output')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter4.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL input-geom
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', NULL, 'db-prefix', 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', NULL, 'db-prefix', 'blade', 'blade_g', 'output')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter5.testcase.

1
2
3
4
5
6
7
ST_Cutter - INT input-geom
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', 1, 'db-prefix', 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', 1, 'db-prefix', 'blade', 'blade_g', 'output')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter6.testcase.

1
2
3
4
5
6
7
ST_Cutter - INT blade-db-prefix
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', NULL, 1, 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', NULL, 1, 'blade', 'blade_g', 'output')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter7.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL blade-db-prefix
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', 'input_g', NULL, 'blade', 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', 'input_g', NULL, 'blade', 'blade_g', 'output')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter8.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL blade-table
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', 'input_g', NULL, NULL, 'blade_g', 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', 'input_g', NULL, NULL, 'blade_g', 'output')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/cutter9.testcase.

1
2
3
4
5
6
7
ST_Cutter - NULL blade-geom
:memory: #use in-memory database
SELECT ST_Cutter('db-prefix', 'input', 'input_g', NULL, 'blade', NULL, 'output');
1 # rows (not including the header row)
1 # columns
ST_Cutter('db-prefix', 'input', 'input_g', NULL, 'blade', NULL, 'output')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline1.testcase.

1
2
3
4
5
6
7
DrapeLine - NULL geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(NULL, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(NULL, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline10.testcase.

1
2
3
4
5
6
7
DrapeLine - int geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline11.testcase.

1
2
3
4
5
6
7
DrapeLine - double geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1.2));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1.2))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline12.testcase.

1
2
3
4
5
6
7
DrapeLine - invalid BLOB geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), zeroblob(12)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), zeroblob(12)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline13.testcase.

1
2
3
4
5
6
7
DrapeLine - Point BLOB geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), MakePointZ(0, 0, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), MakePointZ(0, 0, 0)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline14.testcase.

1
2
3
4
5
6
7
DrapeLine - 2D Linestring geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), GeomFromText('LINESTRING(0 0, 1 1, 5 1)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), GeomFromText('LINESTRING(0 0, 1 1, 5 1)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline15.testcase.

1
2
3
4
5
6
7
DrapeLine - mismatching SRIDs
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4325)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4325)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline16.testcase.

1
2
3
4
5
6
7
DrapeLine - valid test (no tolerance)
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326)))
LINESTRING Z(0 0 0, 1 1 1, 3 1 1.5, 5 1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline17.testcase.

1
2
3
4
5
6
7
DrapeLine - valid test (with tolerance)
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0.1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0.1))
LINESTRING Z(0 0 0, 1 1 1, 3 1 1.5, 5 1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline18.testcase.

1
2
3
4
5
6
7
DrapeLine - NULL tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), NULL));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline19.testcase.

1
2
3
4
5
6
7
DrapeLine - text tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 'tolerance'));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 'tolerance'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline2.testcase.

1
2
3
4
5
6
7
DrapeLine - text geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine('geom1', GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine('geom1', GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline20.testcase.

1
2
3
4
5
6
7
DrapeLine - negative tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), -0.1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), -0.1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline21.testcase.

1
2
3
4
5
6
7
DrapeLine - int tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0))
LINESTRING Z(0 0 0, 1 1 1, 3 1 1.5, 5 1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline22.testcase.

1
2
3
4
5
6
7
DrapeLine - BLOB tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), zeroblob(4)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), zeroblob(4)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline3.testcase.

1
2
3
4
5
6
7
DrapeLine - int geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(1, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(1, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline4.testcase.

1
2
3
4
5
6
7
DrapeLine - double geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(1.2, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(1.2, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline5.testcase.

1
2
3
4
5
6
7
DrapeLine - invalid BLOB geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(zeroblob(10), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(zeroblob(10), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline6.testcase.

1
2
3
4
5
6
7
DrapeLine - Point geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(MakePoint(0, 0), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(MakePoint(0, 0), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline7.testcase.

1
2
3
4
5
6
7
DrapeLine - 3D Linestring geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)'), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)'), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline8.testcase.

1
2
3
4
5
6
7
DrapeLine - NULL geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), NULL));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapeline9.testcase.

1
2
3
4
5
6
7
DrapeLine - text geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 'geom2'));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLine(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 'geom2'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex1.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - NULL geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(NULL, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(NULL, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex10.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - int geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex11.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - double geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1.2));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 1.2))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex12.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - invalid BLOB geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), zeroblob(12)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), zeroblob(12)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex13.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - Point BLOB geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), MakePointZ(0, 0, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), MakePointZ(0, 0, 0)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex14.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - 2D Linestring geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), GeomFromText('LINESTRING(0 0, 1 1, 5 1)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), GeomFromText('LINESTRING(0 0, 1 1, 5 1)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex15.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - mismatching SRIDs
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4325)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4325)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex16.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - valid test (no tolerance)
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex17.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - valid test (with tolerance)
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0.1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0.1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex18.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - NULL tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), NULL));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex19.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - text tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 'tolerance'));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 'tolerance'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex2.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - text geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions('geom1', GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions('geom1', GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex20.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - negative tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), -0.1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), -0.1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex21.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - int tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex22.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - NULL interpolated
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, NULL));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex23.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - text interpolated
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 'interpolated'));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 'interpolated'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex24.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - BLOB interpolated
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, zeroblob(4)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, zeroblob(4)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex25.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - Double interpolated
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 1.2));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 1.2))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex26.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - BLOB tolerance
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), zeroblob(4)));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 3 1, 5 1)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), zeroblob(4)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex27.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - interpolated=TRUE
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(1 0, 0 0, 1 1, 3 1, 5 1, 5 2)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 1));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(1 0, 0 0, 1 1, 3 1, 5 1, 5 2)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 1))
MULTIPOINT Z(1 0 0, 5 2 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex28.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - interpolated=FALSE
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(1 0, 0 0, 1 1, 3 1, 5 1, 5 2)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 0));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(1 0, 0 0, 1 1, 3 1, 5 1, 5 2)', 4326), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)', 4326), 0, 0))
MULTIPOINT Z(1 0 0, 3 1 1.5, 5 2 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex3.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - int geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(1, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(1, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex4.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - double geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(1.2, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(1.2, GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex5.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - invalid BLOB geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(zeroblob(10), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(zeroblob(10), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex6.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - Point geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(MakePoint(0, 0), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(MakePoint(0, 0), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex7.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - 3D Linestring geom1
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)'), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)'), GeomFromText('LINESTRING Z(0 0 0, 1 1 1, 5 1 2)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex8.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - NULL geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), NULL));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/drapelineex9.testcase.

1
2
3
4
5
6
7
DrapeLineExceptions - text geom2
:memory: #use in-memory database
SELECT AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 'geom2'));
1 # rows (not including the header row)
1 # columns
AsText(ST_DrapeLineExceptions(GeomFromText('LINESTRING(0 0, 1 1, 5 1)'), 'geom2'))
(NULL)
<
<
<
<
<
<
<














Changes to test/sql_stmt_geos_tests/hexgrid20.testcase.

1
2
3
4
5
6
7
HexagonalGrid - valid - with Origin
:memory: #use in-memory database
SELECT AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')))
MULTIPOLYGON(((0.1 0.1, 0.6 -0.766025, 1.6 -0.766025, 2.1 0.1, 1.6 0.966025, 0.6 0.966025, 0.1 0.1)), ((-1.4 0.966025, -0.9 0.1, 0.1 0.1, 0.6 0.966025, 0.1 1.832051, -0.9 1.832051, -1.4 0.966025)), ((1.6 0.966025, 2.1 0.1, 3.1 0.1, 3.6 0.966025, 3.1 1.832051, 2.1 1.832051, 1.6 0.966025)), ((0.1 1.832051, 0.6 0.966025, 1.6 0.966025, 2.1 1.832051, 1.6 2.698076, 0.6 2.698076, 0.1 1.832051)))






|
1
2
3
4
5
6
7
HexagonalGrid - valid - with Origin
:memory: #use in-memory database
SELECT AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')))
MULTIPOLYGON(((0.1 0.966025, 0.6 0.1, 1.6 0.1, 2.1 0.966025, 1.6 1.832051, 0.6 1.832051, 0.1 0.966025)), ((1.6 1.832051, 2.1 0.966025, 3.1 0.966025, 3.6 1.832051, 3.1 2.698076, 2.1 2.698076, 1.6 1.832051)))

Changes to test/sql_stmt_geos_tests/hexgrid21.testcase.

1
2
3
4
5
6
7



HexagonalGrid - valid - no Origin
:memory: #use in-memory database
SELECT AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0));
1 # rows (not including the header row)
1 # columns
AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0))
MULTIPOLYGON(((0 0, 0.5 -0.866025, 1.5 -0.866025, 2 0, 1.5 0.866025, 0.5 0.866025, 0 0)), ((-1.5 0.866025, -1 0, 0 0, 0.5 0.866025, 0 1.732051, -1 1.732051, -1.5 0.866025)), ((1.5 0.866025, 2 0, 3 0, 3.5 0.866025, 3 1.732051, 2 1.732051, 1.5 0.866025)), ((0 1.732051, 0.5 0.866025, 1.5 0.866025, 2 1.732051, 1.5 2.598076, 0.5 2.598076, 0 1.732051)))









|
>
>
>
1
2
3
4
5
6
7
8
9
10
HexagonalGrid - valid - no Origin
:memory: #use in-memory database
SELECT AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0));
1 # rows (not including the header row)
1 # columns
AsText(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0))
MULTIPOLYGON(((0 0.866025, 0.5 0, 1.5 0, 2 0.866025, 1.5 1.732051, 0.5 1.732051, 0 0.866025)), ((1.5 1.732051, 2 0.866025, 3 0.866025, 3.5 1.732051, 3 2.598076, 2 2.598076, 1.5 1.732051)))



Changes to test/sql_stmt_geos_tests/hexgrid22.testcase.

1
2
3
4
5
6
7
HexagonalGrid - valid - with Origin, MultiLinestring
:memory: #use in-memory database
SELECT ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.5 0.5)')));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.5 0.5)')))
20
|

|


|
|
1
2
3
4
5
6
7
HexagonalGrid - valid - with Origin, edges_only
:memory: #use in-memory database
SELECT ST_Length(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_Length(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')))
12.0

Changes to test/sql_stmt_geos_tests/hexgrid23.testcase.

1
2
3
4
5
6
7
HexagonalGrid - valid - no Origin, MultiLinestring
:memory: #use in-memory database
SELECT ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1))
19
|

|


|
|
1
2
3
4
5
6
7
HexagonalGrid - valid - no Origin, edges_only
:memory: #use in-memory database
SELECT ST_Length(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1));
1 # rows (not including the header row)
1 # columns
ST_Length(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1))
11.0

Deleted test/sql_stmt_geos_tests/hexgrid24.testcase.

1
2
3
4
5
6
7
HexagonalGrid - valid - with Origin, MultiPoint
:memory: #use in-memory database
SELECT ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1, GeomFromText('POINT(0.1 0.1)')))
18
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/hexgrid25.testcase.

1
2
3
4
5
6
7
HexagonalGrid - valid - no Origin, MultiPoint
:memory: #use in-memory database
SELECT ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(HexagonalGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1))
16
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint1.testcase.

1
2
3
4
5
6
7
interpolate point - NULL first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(NULL, MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(NULL, MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint10.testcase.

1
2
3
4
5
6
7
interpolate point - NULL second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint11.testcase.

1
2
3
4
5
6
7
interpolate point - Int second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), 1);
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint12.testcase.

1
2
3
4
5
6
7
interpolate point - Double second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), 1.5);
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), 1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint13.testcase.

1
2
3
4
5
6
7
interpolate point - Text second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), 'geom');
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), 'geom')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint14.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid BLOB second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), zeroblob(10));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint15.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid Linestring second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('LINESTRING(5 5, 6 6)'));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('LINESTRING(5 5, 6 6)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint16.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid Polygon second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint17.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid MultiPoint second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('MULTIPOINT(0 0, 1 0)'));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('MULTIPOINT(0 0, 1 0)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint18.testcase.

1
2
3
4
5
6
7
interpolate point - valid Point second geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('POINT(5 5)'));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING M(0 0 0, 10 0 20)'), GeomFromText('POINT(5 5)'))
10.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint2.testcase.

1
2
3
4
5
6
7
interpolate point - Int first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(1, MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(1, MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint3.testcase.

1
2
3
4
5
6
7
interpolate point - Double first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(1.5, MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(1.5, MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint4.testcase.

1
2
3
4
5
6
7
interpolate point - Text first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint('geom', MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint('geom', MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint5.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid BLOB first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(zeroblob(10), MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(zeroblob(10), MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint6.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid Point first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(MakePoint(0, 0), MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(MakePoint(0, 0), MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint7.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid Polygon first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'), MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'), MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint8.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid non M Linestring first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/m_interpolatepoint9.testcase.

1
2
3
4
5
6
7
interpolate point - Invalid MultiLinestring first geometry
:memory: #use in-memory database
SELECT ST_InterpolatePoint(GeomFromText('MULTILINESTRING M((0 0 0, 10 0 20), (100 0 0, 110 0 20))'), MakePoint(5, 5));
1 # rows (not including the header row)
1 # columns
ST_InterpolatePoint(GeomFromText('MULTILINESTRING M((0 0 0, 10 0 20), (100 0 0, 110 0 20))'), MakePoint(5, 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate10.testcase.

1
2
3
4
5
6
7
Relate - NULL geom1
:memory: #use in-memory database
SELECT ST_Relate(NULL, MakePoint(0, 0, 4326));
1 # rows (not including the header row)
1 # columns
ST_Relate(NULL, MakePoint(0, 0, 4326));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate11.testcase.

1
2
3
4
5
6
7
Relate - invalid BLOB geom1
:memory: #use in-memory database
SELECT ST_Relate(zeroblob(10), MakePoint(0, 0, 4326));
1 # rows (not including the header row)
1 # columns
ST_Relate(zeroblob(10), MakePoint(0, 0, 4326));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate12.testcase.

1
2
3
4
5
6
7
Relate - text geom1
:memory: #use in-memory database
SELECT ST_Relate('alpha', MakePoint(0, 0, 4326));
1 # rows (not including the header row)
1 # columns
ST_Relate('alpha', MakePoint(0, 0, 4326));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate13.testcase.

1
2
3
4
5
6
7
Relate - int geom1
:memory: #use in-memory database
SELECT ST_Relate(1, MakePoint(0, 0, 4326));
1 # rows (not including the header row)
1 # columns
ST_Relate(1, MakePoint(0, 0, 4326));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate14.testcase.

1
2
3
4
5
6
7
Relate - geom1, geom2
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326));
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326));
0FFFFFFF2
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate15.testcase.

1
2
3
4
5
6
7
Relate - NULL geom2
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate16.testcase.

1
2
3
4
5
6
7
Relate - invalid BLOB geom2
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), zeroblob(10));
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), zeroblob(10));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate17.testcase.

1
2
3
4
5
6
7
Relate - text BLOB geom2
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), 'beta');
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), 'beta');
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate18.testcase.

1
2
3
4
5
6
7
Relate - int BLOB geom2
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), 1);
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), 1);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate19.testcase.

1
2
3
4
5
6
7
Relate - double BLOB geom2
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), 1.1);
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), 1.1);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate20.testcase.

1
2
3
4
5
6
7
Relate - NULL bnr
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate21.testcase.

1
2
3
4
5
6
7
Relate - text bnr
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), 'bnr');
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), 'bnr');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate22.testcase.

1
2
3
4
5
6
7
Relate - BLOB bnr
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), zeroblob(4));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate23.testcase.

1
2
3
4
5
6
7
Relate - Double bnr
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), 1.1);
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), MakePoint(0, 0, 4326), 1.1);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relate24.testcase.

1
2
3
4
5
6
7
Relate - Int bnr
:memory: #use in-memory database
SELECT ST_Relate(MakePoint(0, 0, 4326), MakePoint(10, 10, 4326), 3);
1 # rows (not including the header row)
1 # columns
ST_Relate(MakePoint(0, 0, 4326), MakePoint(10, 10, 4326), 3);
FF0FFF0F2
<
<
<
<
<
<
<














Changes to test/sql_stmt_geos_tests/relate6.testcase.

1
2
3
4
5
6
7
Relate - non text third arg
:memory: #use in-memory database
SELECT Relate(geom1, geom2, 26.7) FROM (SELECT GeomFromText("POINT(1 2)") as geom1, GeomFromText("POINT(1 2)") as geom2) dummy;
1 # rows (not including the header row)
1 # columns
Relate(geom1, geom2, 26.7) 
(NULL)






|
1
2
3
4
5
6
7
Relate - non text third arg
:memory: #use in-memory database
SELECT Relate(geom1, geom2, 26.7) FROM (SELECT GeomFromText("POINT(1 2)") as geom1, GeomFromText("POINT(1 2)") as geom2) dummy;
1 # rows (not including the header row)
1 # columns
Relate(geom1, geom2, 26.7) 
-1

Deleted test/sql_stmt_geos_tests/relatematch1.testcase.

1
2
3
4
5
6
7
RelateMatch - NULL matrix
:memory: #use in-memory database
SELECT ST_RelateMatch(NULL, "T*T***T**");
1 # rows (not including the header row)
1 # columns
ST_RelateMatch(NULL, "T*T***T**")
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch10.testcase.

1
2
3
4
5
6
7
RelateMatch - not matching
:memory: #use in-memory database
SELECT ST_RelateMatch('FF0FFF0F2', "T*T***T**");
1 # rows (not including the header row)
1 # columns
ST_RelateMatch('FF0FFF0F2', "T*T***T**")
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch2.testcase.

1
2
3
4
5
6
7
RelateMatch - Int matrix
:memory: #use in-memory database
SELECT ST_RelateMatch(1, "T*T***T**");
1 # rows (not including the header row)
1 # columns
ST_RelateMatch(1, "T*T***T**")
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch3.testcase.

1
2
3
4
5
6
7
RelateMatch - Double matrix
:memory: #use in-memory database
SELECT ST_RelateMatch(1.2, "T*T***T**");
1 # rows (not including the header row)
1 # columns
ST_RelateMatch(1.2, "T*T***T**")
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch4.testcase.

1
2
3
4
5
6
7
RelateMatch - BLOB matrix
:memory: #use in-memory database
SELECT ST_RelateMatch(zeroblob(10), "T*T***T**");
1 # rows (not including the header row)
1 # columns
ST_RelateMatch(zeroblob(10), "T*T***T**")
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch5.testcase.

1
2
3
4
5
6
7
RelateMatch - NULL pattern
:memory: #use in-memory database
SELECT ST_RelateMatch('FF0FFF0F2', NULL);
1 # rows (not including the header row)
1 # columns
ST_RelateMatch('FF0FFF0F2', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch6.testcase.

1
2
3
4
5
6
7
RelateMatch - BLOB pattern
:memory: #use in-memory database
SELECT ST_RelateMatch('FF0FFF0F2', zeroblob(10));
1 # rows (not including the header row)
1 # columns
ST_RelateMatch('FF0FFF0F2', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch7.testcase.

1
2
3
4
5
6
7
RelateMatch - int pattern
:memory: #use in-memory database
SELECT ST_RelateMatch('FF0FFF0F2', 1);
1 # rows (not including the header row)
1 # columns
ST_RelateMatch('FF0FFF0F2', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch8.testcase.

1
2
3
4
5
6
7
RelateMatch - double pattern
:memory: #use in-memory database
SELECT ST_RelateMatch('FF0FFF0F2', 1.4);
1 # rows (not including the header row)
1 # columns
ST_RelateMatch('FF0FFF0F2', 1.4)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/relatematch9.testcase.

1
2
3
4
5
6
7
RelateMatch - matching
:memory: #use in-memory database
SELECT ST_RelateMatch('FF0FFF0F2', "**T***T*T");
1 # rows (not including the header row)
1 # columns
ST_RelateMatch('FF0FFF0F2', "**T***T*T")
1
<
<
<
<
<
<
<














Changes to test/sql_stmt_geos_tests/squaregrid22.testcase.

1
2
3
4
5
6
7

SquareGrid - valid - no Origin, MultiLinestring
:memory: #use in-memory database
SELECT ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1))
17

|

|


|
|
>
1
2
3
4
5
6
7
8
SquareGrid - valid - no Origin, only_edges
:memory: #use in-memory database
SELECT ST_Length(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1));
1 # rows (not including the header row)
1 # columns
ST_Length(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1))
17.0

Changes to test/sql_stmt_geos_tests/squaregrid23.testcase.

1
2
3
4
5
6
7
SquareGrid - valid - with Origin, MultiLinestring
:memory: #use in-memory database
SELECT ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')))
17
|

|


|
|
1
2
3
4
5
6
7
SquareGrid - valid - with Origin, only_edges
:memory: #use in-memory database
SELECT ST_Length(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_Length(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')))
17.0

Deleted test/sql_stmt_geos_tests/squaregrid24.testcase.

1
2
3
4
5
6
7
SquareGrid - valid - no Origin, MultiPoint
:memory: #use in-memory database
SELECT ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1))
12
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/squaregrid25.testcase.

1
2
3
4
5
6
7
SquareGrid - valid - with Origin, MultiPoint
:memory: #use in-memory database
SELECT ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(SquareGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1, GeomFromText('POINT(0.1 0.1)')))
12
<
<
<
<
<
<
<














Changes to test/sql_stmt_geos_tests/trianggrid20.testcase.

1
2
3
4
5
6
7



TriangularGrid - valid - no Origin
:memory: #use in-memory database
SELECT AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0));
1 # rows (not including the header row)
1 # columns
AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0))
MULTIPOLYGON(((-0.5 0, 0.5 0, 0 0.866025, -0.5 0)), ((0 0.866025, 0.5 0, 1 0.866025, 0 0.866025)), ((0.5 0, 1.5 0, 1 0.866025, 0.5 0)), ((1 0.866025, 1.5 0, 2 0.866025, 1 0.866025)), ((1.5 0, 2.5 0, 2 0.866025, 1.5 0)), ((2 0.866025, 2.5 0, 3 0.866025, 2 0.866025)), ((0 0.866025, 1 0.866025, 0.5 1.732051, 0 0.866025)), ((0.5 1.732051, 1 0.866025, 1.5 1.732051, 0.5 1.732051)), ((1 0.866025, 2 0.866025, 1.5 1.732051, 1 0.866025)), ((1.5 1.732051, 2 0.866025, 2.5 1.732051, 1.5 1.732051)), ((2 0.866025, 3 0.866025, 2.5 1.732051, 2 0.866025)))









|
>
>
>
1
2
3
4
5
6
7
8
9
10
TriangularGrid - valid - no Origin
:memory: #use in-memory database
SELECT AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0));
1 # rows (not including the header row)
1 # columns
AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0))
MULTIPOLYGON(((0 0.866025, 1 0.866025, 0.5 1.732051, 0 0.866025)), ((0.5 1.732051, 1 0.866025, 1.5 1.732051, 0.5 1.732051)), ((1 0.866025, 2 0.866025, 1.5 1.732051, 1 0.866025)), ((1.5 1.732051, 2 0.866025, 2.5 1.732051, 1.5 1.732051)), ((2 0.866025, 3 0.866025, 2.5 1.732051, 2 0.866025)))



Changes to test/sql_stmt_geos_tests/trianggrid21.testcase.

1
2
3
4
5
6
7
TriangularGrid - valid - with Origin
:memory: #use in-memory database
SELECT AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')))
MULTIPOLYGON(((-0.5 0.1, 0.5 0.1, 0 0.966025, -0.5 0.1)), ((0 0.966025, 0.5 0.1, 1 0.966025, 0 0.966025)), ((0.5 0.1, 1.5 0.1, 1 0.966025, 0.5 0.1)), ((1 0.966025, 1.5 0.1, 2 0.966025, 1 0.966025)), ((1.5 0.1, 2.5 0.1, 2 0.966025, 1.5 0.1)), ((2 0.966025, 2.5 0.1, 3 0.966025, 2 0.966025)), ((0 0.966025, 1 0.966025, 0.5 1.832051, 0 0.966025)), ((0.5 1.832051, 1 0.966025, 1.5 1.832051, 0.5 1.832051)), ((1 0.966025, 2 0.966025, 1.5 1.832051, 1 0.966025)), ((1.5 1.832051, 2 0.966025, 2.5 1.832051, 1.5 1.832051)), ((2 0.966025, 3 0.966025, 2.5 1.832051, 2 0.966025)))






|
1
2
3
4
5
6
7
TriangularGrid - valid - with Origin
:memory: #use in-memory database
SELECT AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
AsText(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 0, GeomFromText('POINT(0.1 0.1)')))
MULTIPOLYGON(((-0.4 1.832051, 0.1 0.966025, 0.6 1.832051, -0.4 1.832051)), ((0.1 0.966025, 1.1 0.966025, 0.6 1.832051, 0.1 0.966025)), ((0.6 1.832051, 1.1 0.966025, 1.6 1.832051, 0.6 1.832051)), ((1.1 0.966025, 2.1 0.966025, 1.6 1.832051, 1.1 0.966025)), ((1.6 1.832051, 2.1 0.966025, 2.6 1.832051, 1.6 1.832051)), ((2.1 0.966025, 3.1 0.966025, 2.6 1.832051, 2.1 0.966025)))

Changes to test/sql_stmt_geos_tests/trianggrid22.testcase.

1
2
3
4
5
6
7




TriangularGrid - valid - no Origin, MultiLinestring
:memory: #use in-memory database
SELECT ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1))
18




|

|


|
<
>
>
>
>
1
2
3
4
5
6

7
8
9
10
TriangularGrid - valid - no Origin, edges_only
:memory: #use in-memory database
SELECT ST_Length(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1));
1 # rows (not including the header row)
1 # columns
ST_Length(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1))

9.0



Changes to test/sql_stmt_geos_tests/trianggrid23.testcase.

1
2
3
4
5
6
7
TriangularGrid - valid - with Origin, MultiLinestring
:memory: #use in-memory database
SELECT ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')))
18
|

|


|
|
1
2
3
4
5
6
7
TriangularGrid - valid - with Origin, edges_only
:memory: #use in-memory database
SELECT ST_Length(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_Length(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, 1, GeomFromText('POINT(0.1 0.1)')))
12.0

Deleted test/sql_stmt_geos_tests/trianggrid24.testcase.

1
2
3
4
5
6
7
TriangularGrid - valid - no Origin, MultiPoint
:memory: #use in-memory database
SELECT ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1))
11
<
<
<
<
<
<
<














Deleted test/sql_stmt_geos_tests/trianggrid25.testcase.

1
2
3
4
5
6
7
TriangularGrid - valid - with Origin, MultiPoint
:memory: #use in-memory database
SELECT ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1, GeomFromText('POINT(0.1 0.1)')));
1 # rows (not including the header row)
1 # columns
ST_NumGeometries(TriangularGrid(GeomFromText('POLYGON((0.2 0.2, 2.2 0.2, 2.2 1.2, 0.2 1.2, 0.2 0.2))', 4326), 1.0, -1, GeomFromText('POINT(0.1 0.1)')))
11
<
<
<
<
<
<
<














Added test/sql_stmt_geosadvanced_tests/Makefile.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# test/sql_stmt_geosadvanced_tests/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.



am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/libspatialite
pkgincludedir = $(includedir)/libspatialite
pkglibdir = $(libdir)/libspatialite
pkglibexecdir = $(libexecdir)/libspatialite
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
subdir = test/sql_stmt_geosadvanced_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
AS = as
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.14
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -Wall -Wextra -Wunused -pedantic -g -O0 -fprofile-arcs -ftest-coverage -g
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = dlltool
DSYMUTIL = 
DUMPBIN = 
ECHO_C = 
ECHO_N = -n
ECHO_T = 
EGREP = /usr/bin/grep -E
EXEEXT = 
FGREP = /usr/bin/grep -F
GEOSCONFIG = /usr/bin/geos-config
GEOS_CFLAGS = -I/usr/include
GEOS_LDFLAGS = -L/usr/lib64
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /usr/bin/ld -m elf_x86_64
LDFLAGS = 
LIBOBJS = 
LIBS = -lfreexl -lproj -lz -lsqlite3  -L/usr/lib64 -lgeos_c -llwgeom -lgeos_c
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBXML2_CFLAGS = -I/usr/include/libxml2 
LIBXML2_LIBS = -lxml2 
LIPO = 
LN_S = ln -s
LTLIBOBJS = 
MAINT = #
MAKEINFO = makeinfo
MANIFEST_TOOL = :
MKDIR_P = /usr/bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT = 
OBJDUMP = objdump
OBJEXT = o
OTOOL = 
OTOOL64 = 
PACKAGE = libspatialite
PACKAGE_BUGREPORT = a.furieri@lqt.it
PACKAGE_NAME = libspatialite
PACKAGE_STRING = libspatialite 4.3.0-devel
PACKAGE_TARNAME = libspatialite
PACKAGE_URL = 
PACKAGE_VERSION = 4.3.0-devel
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR = 
PKG_CONFIG_PATH = /usr/local/lib/pkgconfig
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE = 
SHELL = /bin/sh
STRIP = strip
VERSION = 4.3.0-devel
abs_builddir = /home/sandro/fossil/libspatialite/test/sql_stmt_geosadvanced_tests
abs_srcdir = /home/sandro/fossil/libspatialite/test/sql_stmt_geosadvanced_tests
abs_top_builddir = /home/sandro/fossil/libspatialite
abs_top_srcdir = /home/sandro/fossil/libspatialite
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_DUMPBIN = 
am__include = include
am__leading_dot = .
am__quote = 
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias = 
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias = 
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/sandro/fossil/libspatialite/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias = 
top_build_prefix = ../../
top_builddir = ../..
top_srcdir = ../..
EXTRA_DIST = concave_hull10.testcase \
	concave_hull11.testcase \
	concave_hull12.testcase \
	concave_hull13.testcase \
	concave_hull14.testcase \
	concave_hull15.testcase \
	concave_hull16.testcase \
	concave_hull17.testcase \
	concave_hull18.testcase \
	concave_hull19.testcase \
	concave_hull1.testcase \
	concave_hull2.testcase \
	concave_hull3.testcase \
	concave_hull4.testcase \
	concave_hull5.testcase \
	concave_hull6.testcase \
	concave_hull7.testcase \
	concave_hull8.testcase \
	concave_hull9.testcase \
	delaunay10.testcase \
	delaunay11.testcase \
	delaunay12.testcase \
	delaunay13.testcase \
	delaunay14.testcase \
	delaunay15.testcase \
	delaunay16.testcase \
	delaunay17.testcase \
	delaunay18.testcase \
	delaunay19.testcase \
	delaunay1.testcase \
	delaunay2.testcase \
	delaunay3.testcase \
	delaunay4.testcase \
	delaunay5.testcase \
	delaunay6.testcase \
	delaunay7.testcase \
	delaunay8.testcase \
	delaunay9.testcase \
	voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geosadvanced_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geosadvanced_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: # $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Changes to test/sql_stmt_geosadvanced_tests/Makefile.am.

32
33
34
35
36
37
38
39



















	delaunay2.testcase \
	delaunay3.testcase \
	delaunay4.testcase \
	delaunay5.testcase \
	delaunay6.testcase \
	delaunay7.testcase \
	delaunay8.testcase \
	delaunay9.testcase


























|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
	delaunay2.testcase \
	delaunay3.testcase \
	delaunay4.testcase \
	delaunay5.testcase \
	delaunay6.testcase \
	delaunay7.testcase \
	delaunay8.testcase \
	delaunay9.testcase \
	voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 

Changes to test/sql_stmt_geosadvanced_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
284
285
286
287
288
289
290
291



















292
293
294
295
296
297
298
...
301
302
303
304
305
306
307

308
309
310
311
312
313
314
...
475
476
477
478
479
480
481
482
483
484
485
486
487
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_geosadvanced_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	delaunay2.testcase \
	delaunay3.testcase \
	delaunay4.testcase \
	delaunay5.testcase \
	delaunay6.testcase \
	delaunay7.testcase \
	delaunay8.testcase \
	delaunay9.testcase




















all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geosadvanced_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geosadvanced_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
...
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
...
484
485
486
487
488
489
490


491
492
493
494
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_geosadvanced_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	delaunay2.testcase \
	delaunay3.testcase \
	delaunay4.testcase \
	delaunay5.testcase \
	delaunay6.testcase \
	delaunay7.testcase \
	delaunay8.testcase \
	delaunay9.testcase \
	voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_geosadvanced_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_geosadvanced_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Added test/sql_stmt_geosadvanced_tests/voronoj1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(zeroblob(4))
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - text extra_frame_size (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 'alpha')
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - NULL extra_frame_size (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, NULL)
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - BLOB tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, zeroblob(4))
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - text tolerancey (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, 'alpha')
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - NULL tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, NULL)
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 0)))
MULTIPOLYGON(((12.5 5.5, 14.5 2.5, 14.5 1.5, 9.5 1.5, 9.5 2.5, 12.5 5.5)), ((14.5 2.5, 12.5 5.5, 12.5 8.5, 16.9 4.1, 14.5 2.5)), ((12.5 8.5, 12.5 5.5, 9.5 2.5, 9.5 9, 12.416667 9, 12.5 8.5)), ((16.9 4.1, 12.5 8.5, 12.416667 9, 20 9, 17.642857 4.285714, 16.9 4.1)), ((14.5 2.5, 16.9 4.1, 17.642857 4.285714, 19.5 1.5, 14.5 1.5, 14.5 2.5)), ((19.5 1.5, 17.642857 4.285714, 20 9, 20.5 9, 20.5 1.5, 19.5 1.5)))

Added test/sql_stmt_geosadvanced_tests/voronoj16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=yes)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 1)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 1)))
MULTILINESTRING((12.5 5.5, 14.5 2.5), (12.5 5.5, 12.5 8.5), (12.5 5.5, 9.5 2.5), (12.5 8.5, 16.9 4.1), (12.5 8.5, 12.416667 9), (16.9 4.1, 14.5 2.5), (16.9 4.1, 17.642857 4.285714), (17.642857 4.285714, 19.5 1.5), (17.642857 4.285714, 20 9), (14.5 2.5, 14.5 1.5))

Added test/sql_stmt_geosadvanced_tests/voronoj17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZ(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZ(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)))
MULTIPOLYGON Z(((12.5 5.5 0, 14.5 2.5 0, 14.5 1.5 0, 9.5 1.5 0, 9.5 2.5 0, 12.5 5.5 0)), ((14.5 2.5 0, 12.5 5.5 0, 12.5 8.5 0, 16.9 4.1 0, 14.5 2.5 0)), ((12.5 8.5 0, 12.5 5.5 0, 9.5 2.5 0, 9.5 9 0, 12.416667 9 0, 12.5 8.5 0)), ((16.9 4.1 0, 12.5 8.5 0, 12.416667 9 0, 20 9 0, 17.642857 4.285714 0, 16.9 4.1 0)), ((14.5 2.5 0, 16.9 4.1 0, 17.642857 4.285714 0, 19.5 1.5 0, 14.5 1.5 0, 14.5 2.5 0)), ((19.5 1.5 0, 17.642857 4.285714 0, 20 9 0, 20.5 9 0, 20.5 1.5 0, 19.5 1.5 0)))

Added test/sql_stmt_geosadvanced_tests/voronoj18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - XYM (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTM(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTM(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)))
MULTIPOLYGON M(((12.5 5.5 0, 14.5 2.5 0, 14.5 1.5 0, 9.5 1.5 0, 9.5 2.5 0, 12.5 5.5 0)), ((14.5 2.5 0, 12.5 5.5 0, 12.5 8.5 0, 16.9 4.1 0, 14.5 2.5 0)), ((12.5 8.5 0, 12.5 5.5 0, 9.5 2.5 0, 9.5 9 0, 12.416667 9 0, 12.5 8.5 0)), ((16.9 4.1 0, 12.5 8.5 0, 12.416667 9 0, 20 9 0, 17.642857 4.285714 0, 16.9 4.1 0)), ((14.5 2.5 0, 16.9 4.1 0, 17.642857 4.285714 0, 19.5 1.5 0, 14.5 1.5 0, 14.5 2.5 0)), ((19.5 1.5 0, 17.642857 4.285714 0, 20 9 0, 20.5 9 0, 20.5 1.5 0, 19.5 1.5 0)))

Added test/sql_stmt_geosadvanced_tests/voronoj19.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - XYZM (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZM(10 5 10 1, 15 5 11 2, 20 4 12 3, 12 3 13 4, 17 2 14 5, 16 6 15 6)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZM(10 5 10 1, 15 5 11 2, 20 4 12 3, 12 3 13 4, 17 2 14 5, 16 6 15 6)'), 0)))
MULTIPOLYGON ZM(((12.5 5.5 0 0, 14.5 2.5 0 0, 14.5 1.5 0 0, 9.5 1.5 0 0, 9.5 2.5 0 0, 12.5 5.5 0 0)), ((14.5 2.5 0 0, 12.5 5.5 0 0, 12.5 8.5 0 0, 16.9 4.1 0 0, 14.5 2.5 0 0)), ((12.5 8.5 0 0, 12.5 5.5 0 0, 9.5 2.5 0 0, 9.5 9 0 0, 12.416667 9 0 0, 12.5 8.5 0 0)), ((16.9 4.1 0 0, 12.5 8.5 0 0, 12.416667 9 0 0, 20 9 0 0, 17.642857 4.285714 0 0, 16.9 4.1 0 0)), ((14.5 2.5 0 0, 16.9 4.1 0 0, 17.642857 4.285714 0 0, 19.5 1.5 0 0, 14.5 1.5 0 0, 14.5 2.5 0 0)), ((19.5 1.5 0 0, 17.642857 4.285714 0 0, 20 9 0 0, 20.5 9 0 0, 20.5 1.5 0 0, 19.5 1.5 0 0)))

Added test/sql_stmt_geosadvanced_tests/voronoj2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - text input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram('alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram('alpha')
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj20.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(5 10, 2 15, 4 20, 3 12, 2 17, 6 16)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(5 10, 2 15, 4 20, 3 12, 2 17, 6 16)'), 0)))
MULTIPOLYGON(((3.875 16, 4.346154 14.115385, 1.5 13.166667, 1.5 16, 3.875 16)), ((4.346154 14.115385, 3.875 16, 4.285714 17.642857, 6.5 18.75, 6.5 12.833333, 5.928571 12.928571, 4.346154 14.115385)), ((4.285714 17.642857, 3.875 16, 1.5 16, 1.5 19.5, 4.285714 17.642857)), ((6.5 18.75, 4.285714 17.642857, 1.5 19.5, 1.5 20.5, 6.5 20.5, 6.5 18.75)), ((4.346154 14.115385, 5.928571 12.928571, 2.5 9.5, 1.5 9.5, 1.5 13.166667, 4.346154 14.115385)), ((2.5 9.5, 5.928571 12.928571, 6.5 12.833333, 6.5 9.5, 2.5 9.5)))

Added test/sql_stmt_geosadvanced_tests/voronoj3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - integer input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(1);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(1)
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - NULL input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(NULL)
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - NULL edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), NULL)
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - text edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 'alpha')
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - double edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0.0);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0.0)
(NULL)

Added test/sql_stmt_geosadvanced_tests/voronoj9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_VoronojDiagram - BLOB tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, zeroblob(4))
(NULL)

Deleted test/sql_stmt_gpkg_epsg492_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10

EXTRA_DIST = transform_geopackage1.testcase \
	transform_geopackage2.testcase \
	transform_geopackage3.testcase \
	transform_geopackage4.testcase \
	transform_geopackage5.testcase \
	transform_geopackage6.testcase \
	transform_geopackage7.testcase \
	transform_geopackage8.testcase 
	
<
<
<
<
<
<
<
<
<
<




















Deleted test/sql_stmt_gpkg_epsg492_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_gpkg_epsg492_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = transform_geopackage1.testcase \
	transform_geopackage2.testcase \
	transform_geopackage3.testcase \
	transform_geopackage4.testcase \
	transform_geopackage5.testcase \
	transform_geopackage6.testcase \
	transform_geopackage7.testcase \
	transform_geopackage8.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_gpkg_epsg492_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_gpkg_epsg492_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage1.testcase.

1
2
3
4
5
6
7
transform - null args
gpkg_test.gpkg
SELECT Transform(NULL, NULL)
1 # rows (not including the header row)
1 # columns
Transform(NULL, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage2.testcase.

1
2
3
4
5
6
7
transform - Point
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 27700))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 27700))
POINT(669088.702263 -761460.136215)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage3.testcase.

1
2
3
4
5
6
7
transform - Unknown SRID
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 3))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 3))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage4.testcase.

1
2
3
4
5
6
7
transform - Linestring Z
gpkg_test.gpkg
SELECT AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
LINESTRING Z(663019.070082 4762755.64169 100, 744533.019451 4765182.932802 101, 748464.920716 4654130.891324 102)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage5.testcase.

1
2
3
4
5
6
7
transform - Bogus SRID
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888888))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888888))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage6.testcase.

1
2
3
4
5
6
7
transform - bad format organization_coordsys_id
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888889))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888889))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage7.testcase.

1
2
3
4
5
6
7
transform - bad format organization_coordsys_id
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg492_tests/transform_geopackage8.testcase.

1
2
3
4
5
6
7
transform - broken geopackage - no gpkg_spatial_ref_sys table
gpkg_test_broken.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10

EXTRA_DIST = transform_geopackage1.testcase \
	transform_geopackage2.testcase \
	transform_geopackage3.testcase \
	transform_geopackage4.testcase \
	transform_geopackage5.testcase \
	transform_geopackage6.testcase \
	transform_geopackage7.testcase \
	transform_geopackage8.testcase 
	
<
<
<
<
<
<
<
<
<
<




















Deleted test/sql_stmt_gpkg_epsg493_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_gpkg_epsg493_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = transform_geopackage1.testcase \
	transform_geopackage2.testcase \
	transform_geopackage3.testcase \
	transform_geopackage4.testcase \
	transform_geopackage5.testcase \
	transform_geopackage6.testcase \
	transform_geopackage7.testcase \
	transform_geopackage8.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_gpkg_epsg493_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_gpkg_epsg493_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage1.testcase.

1
2
3
4
5
6
7
transform - null args
gpkg_test.gpkg
SELECT Transform(NULL, NULL)
1 # rows (not including the header row)
1 # columns
Transform(NULL, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage2.testcase.

1
2
3
4
5
6
7
transform - Point
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 27700))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 27700))
POINT(669088.702263 -761460.136215)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage3.testcase.

1
2
3
4
5
6
7
transform - Unknown SRID
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 3))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 3))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage4.testcase.

1
2
3
4
5
6
7
transform - Linestring Z
gpkg_test.gpkg
SELECT AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
LINESTRING Z(663019.070081 4762755.641689 100, 744533.019447 4765182.932801 101, 748464.920712 4654130.891323 102)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage5.testcase.

1
2
3
4
5
6
7
transform - Bogus SRID
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888888))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888888))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage6.testcase.

1
2
3
4
5
6
7
transform - bad format organization_coordsys_id
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888889))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888889))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage7.testcase.

1
2
3
4
5
6
7
transform - bad format organization_coordsys_id
gpkg_test_extrasrid.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkg_epsg493_tests/transform_geopackage8.testcase.

1
2
3
4
5
6
7
transform - broken geopackage - no gpkg_spatial_ref_sys table
gpkg_test_broken.gpkg
SELECT AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(1.3 43)', 4326), 888887))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_gpkgcache_tests/Makefile.am.

1
2
3
4
5
6

EXTRA_DIST = amphibious1.testcase \
	amphibious2.testcase \
	gpkg1.testcase \
	gpkg2.testcase 
	
<
<
<
<
<
<












Deleted test/sql_stmt_gpkgcache_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_gpkgcache_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = amphibious1.testcase \
	amphibious2.testcase \
	gpkg1.testcase \
	gpkg2.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_gpkgcache_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_gpkgcache_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_gpkgcache_tests/amphibious1.testcase.

1
2
3
4
5
6
7
8
9
GPKG amphibious mode - enable
:memory:
SELECT EnableGpkgAmphibiousMode(), GetGpkgAmphibiousMode();
1 # rows
2 # column
EnableGpkgAmphibiousMode()
GetGpkgAmphibiousMode()
(NULL)
1
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgcache_tests/amphibious2.testcase.

1
2
3
4
5
6
7
8
9
GPKG amphibious mode - disable
:memory:
SELECT DisableGpkgAmphibiousMode(), GetGpkgAmphibiousMode();
1 # rows
2 # column
DisableGpkgAmphibiousMode()
GetGpkgAmphibiousMode();
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgcache_tests/gpkg1.testcase.

1
2
3
4
5
6
7
8
9
GPKG mode - enable
:memory:
SELECT EnableGpkgMode(), GetGpkgMode();
1 # rows
2 # column
EnableGpkgMode()
GetGpkgMode()
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgcache_tests/gpkg2.testcase.

1
2
3
4
5
6
7
8
9
GPKG mode - disable
:memory:
SELECT DisableGpkgMode(), GetGpkgMode();
1 # rows
2 # column
DisableGpkgMode()
GetGpkgMode();
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgnocache_tests/Makefile.am.

1
2
3
4
5

EXTRA_DIST = amphibious1.testcase \
	amphibious2.testcase \
	gpkg1.testcase \
	gpkg2.testcase 
<
<
<
<
<










Deleted test/sql_stmt_gpkgnocache_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_gpkgnocache_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = amphibious1.testcase \
	amphibious2.testcase \
	gpkg1.testcase \
	gpkg2.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_gpkgnocache_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_gpkgnocache_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_gpkgnocache_tests/amphibious1.testcase.

1
2
3
4
5
6
7
8
9
GPKG amphibious mode - enable
:memory:
SELECT EnableGpkgAmphibiousMode(), GetGpkgAmphibiousMode();
1 # rows
2 # column
EnableGpkgAmphibiousMode()
GetGpkgAmphibiousMode()
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgnocache_tests/amphibious2.testcase.

1
2
3
4
5
6
7
8
9
GPKG amphibious mode - disable
:memory:
SELECT DisableGpkgAmphibiousMode(), GetGpkgAmphibiousMode();
1 # rows
2 # column
DisableGpkgAmphibiousMode()
GetGpkgAmphibiousMode();
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgnocache_tests/gpkg1.testcase.

1
2
3
4
5
6
7
8
9
GPKG mode - enable
:memory:
SELECT EnableGpkgMode(), GetGpkgMode();
1 # rows
2 # column
EnableGpkgMode()
GetGpkgMode()
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_gpkgnocache_tests/gpkg2.testcase.

1
2
3
4
5
6
7
8
9
GPKG mode - disable
:memory:
SELECT DisableGpkgMode(), GetGpkgMode();
1 # rows
2 # column
DisableGpkgMode()
GetGpkgMode();
(NULL)
0
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_iconv_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

EXTRA_DIST = decodeurl1.testcase \
	decodeurl2.testcase \
	decodeurl3.testcase \
	decodeurl4.testcase \
	decodeurl5.testcase \
	decodeurl6.testcase \
	decodeurl7.testcase \
	decodeurl8.testcase \
	decodeurl9.testcase \
	decodeurl10.testcase \
	decodeurl11.testcase \
	encodeurl1.testcase \
	encodeurl2.testcase \
	encodeurl3.testcase \
	encodeurl4.testcase \
	encodeurl5.testcase \
	encodeurl6.testcase \
	encodeurl7.testcase \
	encodeurl8.testcase \
	encodeurl9.testcase \
	encodeurl10.testcase \
	encodeurl11.testcase \
	sp_allvars1.testcase \
	sp_allvars2.testcase \
	sp_allvars3.testcase \
	sp_allvars4.testcase \
	sp_allvars5.testcase \
	sp_allvars6.testcase \
	sp_cookedsql1.testcase \
	sp_cookedsql2.testcase \
	sp_cookedsql3.testcase \
	sp_cookedsql4.testcase \
	sp_cookedsql5.testcase \
	sp_cookedsql6.testcase \
	sp_cookedsql7.testcase \
	sp_cookedsql8.testcase \
	sp_cookedsql9.testcase \
	sp_cookedsql10.testcase \
	sp_cookedsql11.testcase \
	sp_cookedsql12.testcase \
	sp_cookedsql13.testcase \
	sp_createtables.testcase \
	sp_delete1.testcase \
	sp_delete2.testcase \
	sp_delete3.testcase \
	sp_delete4.testcase \
	sp_delete5.testcase \
	sp_deletevar1.testcase \
	sp_deletevar2.testcase \
	sp_deletevar3.testcase \
	sp_deletevar4.testcase \
	sp_deletevar5.testcase \
	sp_execute1.testcase \
	sp_execute2.testcase \
	sp_execute3.testcase \
	sp_execute4.testcase \
	sp_execute5.testcase \
	sp_execute6.testcase \
	sp_execute7.testcase \
	sp_execute8.testcase \
	sp_execute9.testcase \
	sp_execute10.testcase \
	sp_execute11.testcase \
	sp_execute12.testcase \
	sp_execute13.testcase \
	sp_executestored1.testcase \
	sp_executestored2.testcase \
	sp_executestored3.testcase \
	sp_executestored4.testcase \
	sp_executestored5.testcase \
	sp_fetch1.testcase \
	sp_fetch2.testcase \
	sp_fetch3.testcase \
	sp_fetch4.testcase \
	sp_fetch5.testcase \
	sp_fetchval1.testcase \
	sp_fetchval2.testcase \
	sp_fetchval3.testcase \
	sp_fetchval4.testcase \
	sp_fetchval5.testcase \
	sp_fetchvar1.testcase \
	sp_fetchvar2.testcase \
	sp_fetchvar3.testcase \
	sp_fetchvar4.testcase \
	sp_fetchvar5.testcase \
	sp_fromtext1.testcase \
	sp_fromtext2.testcase \
	sp_fromtext3.testcase \
	sp_fromtext4.testcase \
	sp_fromtext5.testcase \
	sp_fromtext6.testcase \
	sp_fromtext7.testcase \
	sp_fromtext8.testcase \
	sp_fromtext9.testcase \
	sp_fromtext10.testcase \
	sp_fromtext11.testcase \
	sp_fromtext12.testcase \
	sp_isvalid1.testcase \
	sp_isvalid2.testcase \
	sp_isvalid3.testcase \
	sp_isvalid4.testcase \
	sp_isvalid5.testcase \
	sp_isvalid6.testcase \
	sp_isvalidvar1.testcase \
	sp_isvalidvar2.testcase \
	sp_isvalidvar3.testcase \
	sp_isvalidvar4.testcase \
	sp_isvalidvar5.testcase \
	sp_isvalidvar6.testcase \
	sp_lasterror.testcase \
	sp_numvars1.testcase \
	sp_numvars2.testcase \
	sp_numvars3.testcase \
	sp_numvars4.testcase \
	sp_numvars5.testcase \
	sp_numvars6.testcase \
	sp_rawsql1.testcase \
	sp_rawsql2.testcase \
	sp_rawsql3.testcase \
	sp_rawsql4.testcase \
	sp_rawsql5.testcase \
	sp_rawsql6.testcase \
	sp_register1.testcase \
	sp_register2.testcase \
	sp_register3.testcase \
	sp_register4.testcase \
	sp_register5.testcase \
	sp_register6.testcase \
	sp_register7.testcase \
	sp_register8.testcase \
	sp_register9.testcase \
	sp_register10.testcase \
	sp_register11.testcase \
	sp_register12.testcase \
	sp_register13.testcase \
	sp_register14.testcase \
	sp_registervar1.testcase \
	sp_registervar2.testcase \
	sp_registervar3.testcase \
	sp_registervar4.testcase \
	sp_registervar5.testcase \
	sp_registervar6.testcase \
	sp_registervar7.testcase \
	sp_registervar8.testcase \
	sp_registervar9.testcase \
	sp_registervar10.testcase \
	sp_registervar11.testcase \
	sp_registervar12.testcase \
	sp_registervar13.testcase \
	sp_updatesql1.testcase \
	sp_updatesql2.testcase \
	sp_updatesql3.testcase \
	sp_updatesql4.testcase \
	sp_updatesql5.testcase \
	sp_updatesql6.testcase \
	sp_updatesql7.testcase \
	sp_updatesql8.testcase \
	sp_updatesql9.testcase \
	sp_updatetitle1.testcase \
	sp_updatetitle2.testcase \
	sp_updatetitle3.testcase \
	sp_updatetitle4.testcase \
	sp_updatetitle5.testcase \
	sp_updatetitle6.testcase \
	sp_updatetitle7.testcase \
	sp_updatetitle8.testcase \
	sp_updatetitle9.testcase \
	sp_updatevartitle1.testcase \
	sp_updatevartitle2.testcase \
	sp_updatevartitle3.testcase \
	sp_updatevartitle4.testcase \
	sp_updatevartitle5.testcase \
	sp_updatevartitle6.testcase \
	sp_updatevartitle7.testcase \
	sp_updatevartitle8.testcase \
	sp_updatevartitle9.testcase \
	sp_updatevarval1.testcase \
	sp_updatevarval2.testcase \
	sp_updatevarval3.testcase \
	sp_updatevarval4.testcase \
	sp_updatevarval5.testcase \
	sp_updatevarval6.testcase \
	sp_updatevarval7.testcase \
	sp_updatevarval8.testcase \
	sp_updatevarval9.testcase \
	sp_var_n1.testcase \
	sp_var_n2.testcase \
	sp_var_n3.testcase \
	sp_var_n4.testcase \
	sp_var_n5.testcase \
	sp_var_n6.testcase \
	sp_var_n7.testcase \
	sp_var_n8.testcase \
	sp_var_n9.testcase \
	sp_var_n10.testcase \
	sp_var_n11.testcase \
	sp_var_n12.testcase \
	sp_vararg1.testcase \
	sp_vararg2.testcase \
	sp_vararg3.testcase \
	sp_vararg4.testcase \
	sp_vararg5.testcase \
	sp_vararg6.testcase \
	sp_vararg7.testcase \
	sp_vararg8.testcase \
	sp_vararg9.testcase
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted test/sql_stmt_iconv_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_iconv_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = decodeurl1.testcase \
	decodeurl2.testcase \
	decodeurl3.testcase \
	decodeurl4.testcase \
	decodeurl5.testcase \
	decodeurl6.testcase \
	decodeurl7.testcase \
	decodeurl8.testcase \
	decodeurl9.testcase \
	decodeurl10.testcase \
	decodeurl11.testcase \
	encodeurl1.testcase \
	encodeurl2.testcase \
	encodeurl3.testcase \
	encodeurl4.testcase \
	encodeurl5.testcase \
	encodeurl6.testcase \
	encodeurl7.testcase \
	encodeurl8.testcase \
	encodeurl9.testcase \
	encodeurl10.testcase \
	encodeurl11.testcase \
	sp_allvars1.testcase \
	sp_allvars2.testcase \
	sp_allvars3.testcase \
	sp_allvars4.testcase \
	sp_allvars5.testcase \
	sp_allvars6.testcase \
	sp_cookedsql1.testcase \
	sp_cookedsql2.testcase \
	sp_cookedsql3.testcase \
	sp_cookedsql4.testcase \
	sp_cookedsql5.testcase \
	sp_cookedsql6.testcase \
	sp_cookedsql7.testcase \
	sp_cookedsql8.testcase \
	sp_cookedsql9.testcase \
	sp_cookedsql10.testcase \
	sp_cookedsql11.testcase \
	sp_cookedsql12.testcase \
	sp_cookedsql13.testcase \
	sp_createtables.testcase \
	sp_delete1.testcase \
	sp_delete2.testcase \
	sp_delete3.testcase \
	sp_delete4.testcase \
	sp_delete5.testcase \
	sp_deletevar1.testcase \
	sp_deletevar2.testcase \
	sp_deletevar3.testcase \
	sp_deletevar4.testcase \
	sp_deletevar5.testcase \
	sp_execute1.testcase \
	sp_execute2.testcase \
	sp_execute3.testcase \
	sp_execute4.testcase \
	sp_execute5.testcase \
	sp_execute6.testcase \
	sp_execute7.testcase \
	sp_execute8.testcase \
	sp_execute9.testcase \
	sp_execute10.testcase \
	sp_execute11.testcase \
	sp_execute12.testcase \
	sp_execute13.testcase \
	sp_executestored1.testcase \
	sp_executestored2.testcase \
	sp_executestored3.testcase \
	sp_executestored4.testcase \
	sp_executestored5.testcase \
	sp_fetch1.testcase \
	sp_fetch2.testcase \
	sp_fetch3.testcase \
	sp_fetch4.testcase \
	sp_fetch5.testcase \
	sp_fetchval1.testcase \
	sp_fetchval2.testcase \
	sp_fetchval3.testcase \
	sp_fetchval4.testcase \
	sp_fetchval5.testcase \
	sp_fetchvar1.testcase \
	sp_fetchvar2.testcase \
	sp_fetchvar3.testcase \
	sp_fetchvar4.testcase \
	sp_fetchvar5.testcase \
	sp_fromtext1.testcase \
	sp_fromtext2.testcase \
	sp_fromtext3.testcase \
	sp_fromtext4.testcase \
	sp_fromtext5.testcase \
	sp_fromtext6.testcase \
	sp_fromtext7.testcase \
	sp_fromtext8.testcase \
	sp_fromtext9.testcase \
	sp_fromtext10.testcase \
	sp_fromtext11.testcase \
	sp_fromtext12.testcase \
	sp_isvalid1.testcase \
	sp_isvalid2.testcase \
	sp_isvalid3.testcase \
	sp_isvalid4.testcase \
	sp_isvalid5.testcase \
	sp_isvalid6.testcase \
	sp_isvalidvar1.testcase \
	sp_isvalidvar2.testcase \
	sp_isvalidvar3.testcase \
	sp_isvalidvar4.testcase \
	sp_isvalidvar5.testcase \
	sp_isvalidvar6.testcase \
	sp_lasterror.testcase \
	sp_numvars1.testcase \
	sp_numvars2.testcase \
	sp_numvars3.testcase \
	sp_numvars4.testcase \
	sp_numvars5.testcase \
	sp_numvars6.testcase \
	sp_rawsql1.testcase \
	sp_rawsql2.testcase \
	sp_rawsql3.testcase \
	sp_rawsql4.testcase \
	sp_rawsql5.testcase \
	sp_rawsql6.testcase \
	sp_register1.testcase \
	sp_register2.testcase \
	sp_register3.testcase \
	sp_register4.testcase \
	sp_register5.testcase \
	sp_register6.testcase \
	sp_register7.testcase \
	sp_register8.testcase \
	sp_register9.testcase \
	sp_register10.testcase \
	sp_register11.testcase \
	sp_register12.testcase \
	sp_register13.testcase \
	sp_register14.testcase \
	sp_registervar1.testcase \
	sp_registervar2.testcase \
	sp_registervar3.testcase \
	sp_registervar4.testcase \
	sp_registervar5.testcase \
	sp_registervar6.testcase \
	sp_registervar7.testcase \
	sp_registervar8.testcase \
	sp_registervar9.testcase \
	sp_registervar10.testcase \
	sp_registervar11.testcase \
	sp_registervar12.testcase \
	sp_registervar13.testcase \
	sp_updatesql1.testcase \
	sp_updatesql2.testcase \
	sp_updatesql3.testcase \
	sp_updatesql4.testcase \
	sp_updatesql5.testcase \
	sp_updatesql6.testcase \
	sp_updatesql7.testcase \
	sp_updatesql8.testcase \
	sp_updatesql9.testcase \
	sp_updatetitle1.testcase \
	sp_updatetitle2.testcase \
	sp_updatetitle3.testcase \
	sp_updatetitle4.testcase \
	sp_updatetitle5.testcase \
	sp_updatetitle6.testcase \
	sp_updatetitle7.testcase \
	sp_updatetitle8.testcase \
	sp_updatetitle9.testcase \
	sp_updatevartitle1.testcase \
	sp_updatevartitle2.testcase \
	sp_updatevartitle3.testcase \
	sp_updatevartitle4.testcase \
	sp_updatevartitle5.testcase \
	sp_updatevartitle6.testcase \
	sp_updatevartitle7.testcase \
	sp_updatevartitle8.testcase \
	sp_updatevartitle9.testcase \
	sp_updatevarval1.testcase \
	sp_updatevarval2.testcase \
	sp_updatevarval3.testcase \
	sp_updatevarval4.testcase \
	sp_updatevarval5.testcase \
	sp_updatevarval6.testcase \
	sp_updatevarval7.testcase \
	sp_updatevarval8.testcase \
	sp_updatevarval9.testcase \
	sp_var_n1.testcase \
	sp_var_n2.testcase \
	sp_var_n3.testcase \
	sp_var_n4.testcase \
	sp_var_n5.testcase \
	sp_var_n6.testcase \
	sp_var_n7.testcase \
	sp_var_n8.testcase \
	sp_var_n9.testcase \
	sp_var_n10.testcase \
	sp_var_n11.testcase \
	sp_var_n12.testcase \
	sp_vararg1.testcase \
	sp_vararg2.testcase \
	sp_vararg3.testcase \
	sp_vararg4.testcase \
	sp_vararg5.testcase \
	sp_vararg6.testcase \
	sp_vararg7.testcase \
	sp_vararg8.testcase \
	sp_vararg9.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_iconv_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_iconv_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_iconv_tests/decodeurl1.testcase.

1
2
3
4
5
6
7
DecodeURL - NULL
:memory: #use in-memory database
SELECT DecodeURL(NULL);
1 # rows (not including the header row)
1 # columns
DecodeURL(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl10.testcase.

1
2
3
4
5
6
7
DecodeURL - invalid charset
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 'invalid');
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 'invalid')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl11.testcase.

1
2
3
4
5
6
7
DecodeURL - valid charset
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 'CP1252');
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 'CP1252')
http://www.acme.it/search?q1=però più perché
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl2.testcase.

1
2
3
4
5
6
7
DecodeURL - INT
:memory: #use in-memory database
SELECT DecodeURL(1);
1 # rows (not including the header row)
1 # columns
DecodeURL(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl3.testcase.

1
2
3
4
5
6
7
DecodeURL - DOUBLE
:memory: #use in-memory database
SELECT DecodeURL(1.5);
1 # rows (not including the header row)
1 # columns
DecodeURL(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl4.testcase.

1
2
3
4
5
6
7
DecodeURL - BLOB
:memory: #use in-memory database
SELECT DecodeURL(zeroblob(4));
1 # rows (not including the header row)
1 # columns
DecodeURL(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl5.testcase.

1
2
3
4
5
6
7
DecodeURL - valid
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=C+%26+opeator&q2=C%2b%2b+%2a+operator');
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=C+%26+opeator&q2=C%2b%2b+%2a+operator')
http://www.acme.it/search?q1=C & opeator&q2=C++ * operator
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl6.testcase.

1
2
3
4
5
6
7
DecodeURL - NULL charset
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', NULL);
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl7.testcase.

1
2
3
4
5
6
7
DecodeURL - INT charset
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 1);
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl8.testcase.

1
2
3
4
5
6
7
DecodeURL - DOUBLE charset
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 1.5);
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', 1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/decodeurl9.testcase.

1
2
3
4
5
6
7
DecodeURL - BLOB charset
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', zeroblob(4));
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=per%f2%20pi%f9%20perch%e9', zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl1.testcase.

1
2
3
4
5
6
7
EncodeURL - NULL
:memory: #use in-memory database
SELECT EncodeURL(NULL);
1 # rows (not including the header row)
1 # columns
EncodeURL(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl10.testcase.

1
2
3
4
5
6
7
EncodeURL - invalid charset
:memory: #use in-memory database
SELECT EncodeURL('però più perché', 'invalid');
1 # rows (not including the header row)
1 # columns
EncodeURL('però più perché', 'invalid')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl11.testcase.

1
2
3
4
5
6
7
EncodeURL - valid charset
:memory: #use in-memory database
SELECT EncodeURL('però più perché', 'CP1252');
1 # rows (not including the header row)
1 # columns
EncodeURL('però più perché', 'CP1252')
per%f2%20pi%f9%20perch%e9
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl2.testcase.

1
2
3
4
5
6
7
EncodeURL - INT
:memory: #use in-memory database
SELECT EncodeURL(1);
1 # rows (not including the header row)
1 # columns
EncodeURL(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl3.testcase.

1
2
3
4
5
6
7
EncodeURL - DOUBLE
:memory: #use in-memory database
SELECT EncodeURL(1.5);
1 # rows (not including the header row)
1 # columns
EncodeURL(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl4.testcase.

1
2
3
4
5
6
7
EncodeURL - BLOB
:memory: #use in-memory database
SELECT EncodeURL(zeroblob(4));
1 # rows (not including the header row)
1 # columns
EncodeURL(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl5.testcase.

1
2
3
4
5
6
7
EncodeURL - valid
:memory: #use in-memory database
SELECT EncodeURL('C++ * operator');
1 # rows (not including the header row)
1 # columns
EncodeURL('C++ * operator')
C%2b%2b%20%2a%20operator
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl6.testcase.

1
2
3
4
5
6
7
EncodeURL - NULL charset
:memory: #use in-memory database
SELECT EncodeURL('però più perché', NULL);
1 # rows (not including the header row)
1 # columns
EncodeURL('però più perché', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl7.testcase.

1
2
3
4
5
6
7
EncodeURL - INT charset
:memory: #use in-memory database
SELECT EncodeURL('però più perché', 1);
1 # rows (not including the header row)
1 # columns
EncodeURL('però più perché', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl8.testcase.

1
2
3
4
5
6
7
EncodeURL - DOUBLE charset
:memory: #use in-memory database
SELECT EncodeURL('però più perché', 1.5);
1 # rows (not including the header row)
1 # columns
EncodeURL('però più perché', 1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/encodeurl9.testcase.

1
2
3
4
5
6
7
EncodeURL - BLOB charset
:memory: #use in-memory database
SELECT EncodeURL('però più perché', zeroblob(4));
1 # rows (not including the header row)
1 # columns
EncodeURL('però più perché', zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_allvars1.testcase.

1
2
3
4
5
6
7
SqlProc_AllVariables - NULL 
:memory: #use in-memory database
SELECT SqlProc_AllVariables(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_AllVariables(NULL)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_allvars2.testcase.

1
2
3
4
5
6
7
SqlProc_AllVariables - INT
:memory: #use in-memory database
SELECT SqlProc_AllVariables(1);
1 # rows (not including the header row)
1 # columns
SqlProc_AllVariables(1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_allvars3.testcase.

1
2
3
4
5
6
7
SqlProc_AllVariables - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_AllVariables(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_AllVariables(1.2)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_allvars4.testcase.

1
2
3
4
5
6
7
SqlProc_AllVariables - TEXT
:memory: #use in-memory database
SELECT SqlProc_AllVariables('text');
1 # rows (not including the header row)
1 # columns
SqlProc_AllVariables('text')
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_allvars5.testcase.

1
2
3
4
5
6
7
SqlProc_AllVariables - valid BLOB
:memory: #use in-memory database
SELECT SqlProc_AllVariables(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'));
1 # rows (not including the header row)
1 # columns
SqlProc_AllVariables(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'))
@col1@ @col2@ @table@
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_allvars6.testcase.

1
2
3
4
5
6
7
SqlProc_AllVariables - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_AllVariables(zeroblob(100));
1 # rows (not including the header row)
1 # columns
SqlProc_AllVariables(zeroblob(100))
SqlProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql1.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - NULL 
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(NULL)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql10.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - BLOB vararg
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), zeroblob(10))
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql11.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - invalid TEXT vararg
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 'abcdefgh');
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 'abcdefgh')
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql12.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - just one vararg
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), '@TABLE@=some_table');
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), '@TABLE@=some_table')
SELECT NULL, NULL FROM some_table
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql13.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - all varargs
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), '@TABLE@=some_table', '$col1$=first_col', '@col2@=second_col');
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), '@TABLE@=some_table', '$col1$=first_col', '@col2@=second_col')
SELECT first_col, second_col FROM some_table
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql2.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - INT
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(1);
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql3.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(1.2)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql4.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - TEXT
:memory: #use in-memory database
SELECT SqlProc_CookedSQL('text');
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL('text')
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql5.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(zeroblob(100));
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(zeroblob(100))
SqlProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql6.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - valid BLOB
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'));
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'))
SELECT NULL, NULL FROM NULL
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql7.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - NULL vararg
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), NULL)
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql8.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - INT vararg
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1);
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1)
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_cookedsql9.testcase.

1
2
3
4
5
6
7
SqlProc_CookedSQL - Double vararg
:memory: #use in-memory database
SELECT SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1.1);
1 # rows (not including the header row)
1 # columns
SqlProc_CookedSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1.1)
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_createtables.testcase.

1
2
3
4
5
6
7
StoredProc_CreateTables
:memory: #use in-memory database
SELECT StoredProc_CreateTables();
1 # rows (not including the header row)
1 # columns
StoredProc_CreateTables()
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_delete1.testcase.

1
2
3
4
5
6
7
StoredProc_Delete - NULL name
:memory: #use in-memory database
SELECT StoredProc_Delete(NULL);
1 # rows (not including the header row)
1 # columns
StoredProc_Delete(NULL)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_delete2.testcase.

1
2
3
4
5
6
7
StoredProc_Delete - Int name
:memory: #use in-memory database
SELECT StoredProc_Delete(1);
1 # rows (not including the header row)
1 # columns
StoredProc_Delete(1)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_delete3.testcase.

1
2
3
4
5
6
7
StoredProc_Delete - Double name
:memory: #use in-memory database
SELECT StoredProc_Delete(1.5);
1 # rows (not including the header row)
1 # columns
StoredProc_Delete(1.5)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_delete4.testcase.

1
2
3
4
5
6
7
StoredProc_Delete - BLOB name
:memory: #use in-memory database
SELECT StoredProc_Delete(zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredProc_Delete(zeroblob(10))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_delete5.testcase.

1
2
3
4
5
6
7
StoredProc_Delete - Text name
:memory: #use in-memory database
SELECT StoredProc_Delete('name');
1 # rows (not including the header row)
1 # columns
StoredProc_Delete('name')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_deletevar1.testcase.

1
2
3
4
5
6
7
StoredVar_Delete - NULL name
:memory: #use in-memory database
SELECT StoredVar_Delete(NULL);
1 # rows (not including the header row)
1 # columns
StoredVar_Delete(NULL)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_deletevar2.testcase.

1
2
3
4
5
6
7
StoredVar_Delete - Int name
:memory: #use in-memory database
SELECT StoredVar_Delete(1);
1 # rows (not including the header row)
1 # columns
StoredVar_Delete(1)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_deletevar3.testcase.

1
2
3
4
5
6
7
StoredVar_Delete - Double name
:memory: #use in-memory database
SELECT StoredVar_Delete(1.5);
1 # rows (not including the header row)
1 # columns
StoredVar_Delete(1.5)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_deletevar4.testcase.

1
2
3
4
5
6
7
StoredVar_Delete - BLOB name
:memory: #use in-memory database
SELECT StoredVar_Delete(zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredVar_Delete(zeroblob(10))
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_deletevar5.testcase.

1
2
3
4
5
6
7
StoredVar_Delete - Text name
:memory: #use in-memory database
SELECT StoredVar_Delete('xname');
1 # rows (not including the header row)
1 # columns
StoredVar_Delete('xname')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute1.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - NULL 
:memory: #use in-memory database
SELECT SqlProc_Execute(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(NULL)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute10.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - BLOB vararg
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), zeroblob(10))
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute11.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - invalid TEXT vararg
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), 'abcdefgh');
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), 'abcdefgh')
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute12.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - just one vararg
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), '@col2@=ref_sys_name');
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), '@col2@=ref_sys_name')
SqlProc exception - a fatal SQL error was encountered.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute13.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - all varargs
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), '$col1$=srid', '@col2@=ref_sys_name', '@table@=spatial_ref_sys', '@filter@=%deprecated%');
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'), '$col1$=srid', '@col2@=ref_sys_name', '@table@=spatial_ref_sys', '@filter@=%deprecated%')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute2.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - INT
:memory: #use in-memory database
SELECT SqlProc_Execute(1);
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute3.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_Execute(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(1.2)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute4.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - TEXT
:memory: #use in-memory database
SELECT SqlProc_Execute('text');
1 # rows (not including the header row)
1 # columns
SqlProc_Execute('text')
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute5.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_Execute(zeroblob(100));
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(zeroblob(100))
SqlProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute6.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - valid BLOB, no Variables
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'));
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@ WHERE @col2@ LIKE ''@filter@''; SELECT Count(*) FROM @table@;'))
SqlProc exception - a fatal SQL error was encountered.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute7.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - NULL vararg
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), NULL)
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute8.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - INT vararg
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1);
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1)
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_execute9.testcase.

1
2
3
4
5
6
7
SqlProc_Execute - Double vararg
:memory: #use in-memory database
SELECT SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1.1);
1 # rows (not including the header row)
1 # columns
SqlProc_Execute(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1.1)
SqlProc exception - the List of Variables with Values contains illegal items.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_executestored1.testcase.

1
2
3
4
5
6
7
StoredProc_Execute - NULL 
:memory: #use in-memory database
SELECT StoredProc_Execute(NULL);
1 # rows (not including the header row)
1 # columns
StoredProc_Execute(NULL)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_executestored2.testcase.

1
2
3
4
5
6
7
StoredProc_Execute - INT
:memory: #use in-memory database
SELECT StoredProc_Execute(1);
1 # rows (not including the header row)
1 # columns
StoredProc_Execute(1)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_executestored3.testcase.

1
2
3
4
5
6
7
StoredProc_Execute - DOUBLE
:memory: #use in-memory database
SELECT StoredProc_Execute(1.2);
1 # rows (not including the header row)
1 # columns
StoredProc_Execute(1.2)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_executestored4.testcase.

1
2
3
4
5
6
7
StoredProc_Execute - BLOB
:memory: #use in-memory database
SELECT StoredProc_Execute(zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredProc_Execute(zeroblob(10))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_executestored5.testcase.

1
2
3
4
5
6
7
StoredProc_Execute - not existing
:memory: #use in-memory database
SELECT StoredProc_Execute('not existing');
1 # rows (not including the header row)
1 # columns
StoredProc_Execute('not existing')
StoredProc exception - unable to retrive a Stored Procedure named "not existing".
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetch1.testcase.

1
2
3
4
5
6
7
StoredProc_Get - NULL name
:memory: #use in-memory database
SELECT StoredProc_Get(NULL);
1 # rows (not including the header row)
1 # columns
StoredProc_Get(NULL)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetch2.testcase.

1
2
3
4
5
6
7
StoredProc_Get - Int name
:memory: #use in-memory database
SELECT StoredProc_Get(1);
1 # rows (not including the header row)
1 # columns
StoredProc_Get(1)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetch3.testcase.

1
2
3
4
5
6
7
StoredProc_Get - Double name
:memory: #use in-memory database
SELECT StoredProc_Get(1.5);
1 # rows (not including the header row)
1 # columns
StoredProc_Get(1.5)
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetch4.testcase.

1
2
3
4
5
6
7
StoredProc_Get - BLOB name
:memory: #use in-memory database
SELECT StoredProc_Get(zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredProc_Get(zeroblob(10))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetch5.testcase.

1
2
3
4
5
6
7
StoredProc_Get - Text name
:memory: #use in-memory database
SELECT StoredProc_Get('name');
1 # rows (not including the header row)
1 # columns
StoredProc_Get('name')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchval1.testcase.

1
2
3
4
5
6
7
StoredVar_GetValue - NULL name
:memory: #use in-memory database
SELECT StoredVar_GetValue(NULL);
1 # rows (not including the header row)
1 # columns
StoredVar_GetValue(NULL)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchval2.testcase.

1
2
3
4
5
6
7
StoredVar_GetValue - Int name
:memory: #use in-memory database
SELECT StoredVar_GetValue(1);
1 # rows (not including the header row)
1 # columns
StoredVar_GetValue(1)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchval3.testcase.

1
2
3
4
5
6
7
StoredVar_GetValue - Double name
:memory: #use in-memory database
SELECT StoredVar_GetValue(1.5);
1 # rows (not including the header row)
1 # columns
StoredVar_GetValue(1.5)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchval4.testcase.

1
2
3
4
5
6
7
StoredVar_GetValue - BLOB name
:memory: #use in-memory database
SELECT StoredVar_GetValue(zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredVar_GetValue(zeroblob(10))
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchval5.testcase.

1
2
3
4
5
6
7
StoredVar_GetValue - Text name
:memory: #use in-memory database
SELECT StoredVar_GetValue('xname');
1 # rows (not including the header row)
1 # columns
StoredVar_GetValue('xname')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchvar1.testcase.

1
2
3
4
5
6
7
StoredVar_Get - NULL name
:memory: #use in-memory database
SELECT StoredVar_Get(NULL);
1 # rows (not including the header row)
1 # columns
StoredVar_Get(NULL)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchvar2.testcase.

1
2
3
4
5
6
7
StoredVar_Get - Int name
:memory: #use in-memory database
SELECT StoredVar_Get(1);
1 # rows (not including the header row)
1 # columns
StoredVar_Get(1)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchvar3.testcase.

1
2
3
4
5
6
7
StoredVar_Get - Double name
:memory: #use in-memory database
SELECT StoredVar_Get(1.5);
1 # rows (not including the header row)
1 # columns
StoredVar_Get(1.5)
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchvar4.testcase.

1
2
3
4
5
6
7
StoredVar_Get - BLOB name
:memory: #use in-memory database
SELECT StoredVar_Get(zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredVar_Get(zeroblob(10))
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fetchvar5.testcase.

1
2
3
4
5
6
7
StoredVar_Get - Text name
:memory: #use in-memory database
SELECT StoredVar_Get('xname');
1 # rows (not including the header row)
1 # columns
StoredVar_Get('xname')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext1.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - NULL SQL body
:memory: #use in-memory database
SELECT SqlProc_FromText(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_FromText(NULL)
SqlProc exception - illegal SQL Body argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext10.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - DOUBLE charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', zeroblob(10)));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', zeroblob(10)))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext11.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - valid charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 'ASCII'));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 'ASCII'))
00CD0187030087040087636F6C3187010087040087636F6C32870100870500877461626C6587010087220000008753454C4543542040636F6C31402C2040636F6C32402046524F4D20407461626C6540DC
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext12.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - undefined charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 'abcdefghi'));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 'abcdefghi'))
SqlProc exception - invalid SQL Body.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext2.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - INT SQL body
:memory: #use in-memory database
SELECT SqlProc_FromText(2);
1 # rows (not including the header row)
1 # columns
SqlProc_FromText(2)
SqlProc exception - illegal SQL Body argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext3.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - DOUBLE SQL body
:memory: #use in-memory database
SELECT SqlProc_FromText(2.5);
1 # rows (not including the header row)
1 # columns
SqlProc_FromText(2.5)
SqlProc exception - illegal SQL Body argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext4.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - BLOB SQL body
:memory: #use in-memory database
SELECT SqlProc_FromText(zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_FromText(zeroblob(10))
SqlProc exception - illegal SQL Body argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext5.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - Empty SQL body
:memory: #use in-memory database
SELECT SqlProc_FromText('');
1 # rows (not including the header row)
1 # columns
SqlProc_FromText('')
SqlProc exception - invalid SQL Body.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext6.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - Valid SQL body
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@'));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@'))
00CD0187030087040087636F6C3187010087040087636F6C32870100870500877461626C6587010087220000008753454C4543542040636F6C31402C2040636F6C32402046524F4D20407461626C6540DC
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext7.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - NULL charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', NULL));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', NULL))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext8.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - INT charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 1));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 1))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_fromtext9.testcase.

1
2
3
4
5
6
7
SqlProc_FromText - DOUBLE charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 1.5));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromText('SELECT @col1@, @col2@ FROM @table@', 1.5))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalid1.testcase.

1
2
3
4
5
6
7
SqlProc_IsValid - NULL 
:memory: #use in-memory database
SELECT SqlProc_isValid(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_isValid(NULL)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalid2.testcase.

1
2
3
4
5
6
7
SqlProc_IsValid - INT
:memory: #use in-memory database
SELECT SqlProc_isValid(1);
1 # rows (not including the header row)
1 # columns
SqlProc_isValid(1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalid3.testcase.

1
2
3
4
5
6
7
SqlProc_IsValid - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_isValid(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_isValid(1.2)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalid4.testcase.

1
2
3
4
5
6
7
SqlProc_IsValid - TEXT
:memory: #use in-memory database
SELECT SqlProc_isValid('text');
1 # rows (not including the header row)
1 # columns
SqlProc_isValid('text')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalid5.testcase.

1
2
3
4
5
6
7
SqlProc_IsValid - valid BLOB
:memory: #use in-memory database
SELECT SqlProc_isValid(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'));
1 # rows (not including the header row)
1 # columns
SqlProc_isValid(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalid6.testcase.

1
2
3
4
5
6
7
SqlProc_IsValid - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_isValid(zeroblob(100));
1 # rows (not including the header row)
1 # columns
SqlProc_isValid(zeroblob(100))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalidvar1.testcase.

1
2
3
4
5
6
7
SqlProc_IsValidVarValueVarValue - NULL 
:memory: #use in-memory database
SELECT SqlProc_IsValidVarValue(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_IsValidVarValue(NULL)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalidvar2.testcase.

1
2
3
4
5
6
7
SqlProc_IsValidVarValue - INT
:memory: #use in-memory database
SELECT SqlProc_IsValidVarValue(1);
1 # rows (not including the header row)
1 # columns
SqlProc_IsValidVarValue(1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalidvar3.testcase.

1
2
3
4
5
6
7
SqlProc_IsValidVarValue - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_IsValidVarValue(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_IsValidVarValue(1.2)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalidvar4.testcase.

1
2
3
4
5
6
7
SqlProc_IsValidVarValue - BLOB
:memory: #use in-memory database
SELECT SqlProc_IsValidVarValue(zeroblob(4));
1 # rows (not including the header row)
1 # columns
SqlProc_IsValidVarValue(zeroblob(4))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalidvar5.testcase.

1
2
3
4
5
6
7
SqlProc_IsValidVarValue - valid TEXT
:memory: #use in-memory database
SELECT SqlProc_IsValidVarValue('@var@=value');
1 # rows (not including the header row)
1 # columns
SqlProc_IsValidVarValue('@var@=value')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_isvalidvar6.testcase.

1
2
3
4
5
6
7
SqlProc_IsValidVarValue - invalid TEXT
:memory: #use in-memory database
SELECT SqlProc_IsValidVarValue('invalid');
1 # rows (not including the header row)
1 # columns
SqlProc_IsValidVarValue('invalid')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_lasterror.testcase.

1
2
3
4
5
6
7
SqlProc_GetLastError
:memory: #use in-memory database
SELECT SqlProc_GetLastError();
1 # rows (not including the header row)
1 # columns
SqlProc_GetLastError()
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_numvars1.testcase.

1
2
3
4
5
6
7
SqlProc_NumVariables - NULL 
:memory: #use in-memory database
SELECT SqlProc_NumVariables(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_NumVariables(NULL)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_numvars2.testcase.

1
2
3
4
5
6
7
SqlProc_NumVariables - INT
:memory: #use in-memory database
SELECT SqlProc_NumVariables(1);
1 # rows (not including the header row)
1 # columns
SqlProc_NumVariables(1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_numvars3.testcase.

1
2
3
4
5
6
7
SqlProc_NumVariables - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_NumVariables(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_NumVariables(1.2)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_numvars4.testcase.

1
2
3
4
5
6
7
SqlProc_NumVariables - TEXT
:memory: #use in-memory database
SELECT SqlProc_NumVariables('text');
1 # rows (not including the header row)
1 # columns
SqlProc_NumVariables('text')
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_numvars5.testcase.

1
2
3
4
5
6
7
SqlProc_NumVariables - valid BLOB
:memory: #use in-memory database
SELECT SqlProc_NumVariables(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'));
1 # rows (not including the header row)
1 # columns
SqlProc_NumVariables(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'))
3
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_numvars6.testcase.

1
2
3
4
5
6
7
SqlProc_NumVariables - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_NumVariables(zeroblob(100));
1 # rows (not including the header row)
1 # columns
SqlProc_NumVariables(zeroblob(100))
SqlProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_rawsql1.testcase.

1
2
3
4
5
6
7
SqlProc_RawSQL - NULL 
:memory: #use in-memory database
SELECT SqlProc_RawSQL(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_RawSQL(NULL)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_rawsql2.testcase.

1
2
3
4
5
6
7
SqlProc_RawSQL - INT
:memory: #use in-memory database
SELECT SqlProc_RawSQL(1);
1 # rows (not including the header row)
1 # columns
SqlProc_RawSQL(1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_rawsql3.testcase.

1
2
3
4
5
6
7
SqlProc_RawSQL - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_RawSQL(1.2);
1 # rows (not including the header row)
1 # columns
SqlProc_RawSQL(1.2)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_rawsql4.testcase.

1
2
3
4
5
6
7
SqlProc_RawSQL - TEXT
:memory: #use in-memory database
SELECT SqlProc_RawSQL('text');
1 # rows (not including the header row)
1 # columns
SqlProc_RawSQL('text')
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_rawsql5.testcase.

1
2
3
4
5
6
7
SqlProc_RawSQL - valid BLOB
:memory: #use in-memory database
SELECT SqlProc_RawSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'));
1 # rows (not including the header row)
1 # columns
SqlProc_RawSQL(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'))
SELECT @col1@, $col2$ FROM @table@
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_rawsql6.testcase.

1
2
3
4
5
6
7
SqlProc_RawSQL - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_RawSQL(zeroblob(100));
1 # rows (not including the header row)
1 # columns
SqlProc_RawSQL(zeroblob(100))
SqlProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register1.testcase.

1
2
3
4
5
6
7
StoredProc_Register - NULL name
:memory: #use in-memory database
SELECT StoredProc_Register(NULL, 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register(NULL, 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register10.testcase.

1
2
3
4
5
6
7
StoredProc_Register - Int SQL body
:memory: #use in-memory database
SELECT StoredProc_Register('name', 'title', 1);
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 'title', 1))
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register11.testcase.

1
2
3
4
5
6
7
StoredProc_Register - Double SQL body
:memory: #use in-memory database
SELECT StoredProc_Register('name', 'title', 1.1);
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 'title', 1.1))
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register12.testcase.

1
2
3
4
5
6
7
StoredProc_Register - Text SQL body
:memory: #use in-memory database
SELECT StoredProc_Register('name', 'title', 'sql');
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 'title', 'sql')
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register13.testcase.

1
2
3
4
5
6
7
StoredProc_Register - invalid BLOB SQL body
:memory: #use in-memory database
SELECT StoredProc_Register('name', 'title', zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 'title', zeroblob(10))
StoredProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register14.testcase.

1
2
3
4
5
6
7
StoredProc_Register - valid SQL body
:memory: #use in-memory database
SELECT StoredProc_Register('name', 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register2.testcase.

1
2
3
4
5
6
7
StoredProc_Register - INT name
:memory: #use in-memory database
SELECT StoredProc_Register(1, 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register(1, 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register3.testcase.

1
2
3
4
5
6
7
StoredProc_Register - Double name
:memory: #use in-memory database
SELECT StoredProc_Register(1.6, 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register(1.6, 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register4.testcase.

1
2
3
4
5
6
7
StoredProc_Register - BLOB name
:memory: #use in-memory database
SELECT StoredProc_Register(zeroblob(4), 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register(zeroblob(4), 'title', SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register5.testcase.

1
2
3
4
5
6
7
StoredProc_Register - NULL title
:memory: #use in-memory database
SELECT StoredProc_Register('name', NULL, SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', NULL, SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register6.testcase.

1
2
3
4
5
6
7
StoredProc_Register - INT title
:memory: #use in-memory database
SELECT StoredProc_Register('name', 1, SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 1, SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register7.testcase.

1
2
3
4
5
6
7
StoredProc_Register - Double title
:memory: #use in-memory database
SELECT StoredProc_Register('name', 1.2, SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 1.2, SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register8.testcase.

1
2
3
4
5
6
7
StoredProc_Register - BLOB title
:memory: #use in-memory database
SELECT StoredProc_Register('name', zeroblob(6), SqlProc_FromText('SELECT @column1@ FROM @table1@'));
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', zeroblob(6), SqlProc_FromText('SELECT @column1@ FROM @table1@'))
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_register9.testcase.

1
2
3
4
5
6
7
StoredProc_Register - NULL SQL body
:memory: #use in-memory database
SELECT StoredProc_Register('name', 'title', NULL);
1 # rows (not including the header row)
1 # columns
StoredProc_Register('name', 'title', NULL))
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar1.testcase.

1
2
3
4
5
6
7
StoredVar_Register - NULL name
:memory: #use in-memory database
SELECT StoredVar_Register(NULL, 'title', 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register(NULL, 'title', 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar10.testcase.

1
2
3
4
5
6
7
StoredVar_Register - Int Value
:memory: #use in-memory database
SELECT StoredVar_Register('varint', 'title', 1);
1 # rows (not including the header row)
1 # columns
StoredVar_Register('varint', 'title', 1))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar11.testcase.

1
2
3
4
5
6
7
StoredVar_Register - Double Value
:memory: #use in-memory database
SELECT StoredVar_Register('varfloat', 'title', 1.1);
1 # rows (not including the header row)
1 # columns
StoredVar_Register('varfloat', 'title', 1.1))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar12.testcase.

1
2
3
4
5
6
7
StoredVar_Register - BLOB Value
:memory: #use in-memory database
SELECT StoredVar_Register('varblob', 'title', zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredVar_Register('varblob', 'title', zeroblob(10))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar13.testcase.

1
2
3
4
5
6
7
StoredVar_Register - TEXT Value
:memory: #use in-memory database
SELECT StoredVar_Register('vartext', 'title', 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register('vartext', 'title', 'value')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar2.testcase.

1
2
3
4
5
6
7
StoredVar_Register - INT name
:memory: #use in-memory database
SELECT StoredVar_Register(1, 'title', 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register(1, 'title', 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar3.testcase.

1
2
3
4
5
6
7
StoredVar_Register - Double name
:memory: #use in-memory database
SELECT StoredVar_Register(1.6, 'title', 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register(1.6, 'title', 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar4.testcase.

1
2
3
4
5
6
7
StoredVar_Register - BLOB name
:memory: #use in-memory database
SELECT StoredVar_Register(zeroblob(4), 'title', 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register(zeroblob(4), 'title', 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar5.testcase.

1
2
3
4
5
6
7
StoredVar_Register - NULL title
:memory: #use in-memory database
SELECT StoredVar_Register('name', NULL, 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register('name', NULL, 'value')
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar6.testcase.

1
2
3
4
5
6
7
StoredVar_Register - INT title
:memory: #use in-memory database
SELECT StoredVar_Register('name', 1, 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register('name', 1, 'value')
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar7.testcase.

1
2
3
4
5
6
7
StoredVar_Register - Double title
:memory: #use in-memory database
SELECT StoredVar_Register('name', 1.2, 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register('name', 1.2, 'value')
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar8.testcase.

1
2
3
4
5
6
7
StoredVar_Register - BLOB title
:memory: #use in-memory database
SELECT StoredVar_Register('name', zeroblob(6), 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_Register('name', zeroblob(6), 'value')
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_registervar9.testcase.

1
2
3
4
5
6
7
StoredVar_Register - NULL Value
:memory: #use in-memory database
SELECT StoredVar_Register('varnull', 'title', NULL);
1 # rows (not including the header row)
1 # columns
StoredVar_Register('varnull', 'title', NULL))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql1.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - NULL name
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody(NULL, SqlProc_FromText('SELECT @col1@ FROM @tbl@'));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody(NULL, SqlProc_FromText('SELECT @col1@ FROM @tbl@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql2.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - Int name
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody(1, SqlProc_FromText('SELECT @col1@ FROM @tbl@'));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody(1, SqlProc_FromText('SELECT @col1@ FROM @tbl@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql3.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - Double name
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody(1.5, SqlProc_FromText('SELECT @col1@ FROM @tbl@'));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody(1.5, SqlProc_FromText('SELECT @col1@ FROM @tbl@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql4.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - BLOB name
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody(zeroblob(10), SqlProc_FromText('SELECT @col1@ FROM @tbl@'));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody(zeroblob(10), SqlProc_FromText('SELECT @col1@ FROM @tbl@'))
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql5.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - NULL SQL body
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody('name', NULL);
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody('name', NULL)
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql6.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - Int SQL body
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody('name', 1);
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody('name', 1)
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql7.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - Double SQL body
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody('name', 1.4);
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody('name', 1.4)
StoredProc exception - illegal Stored Procedure Body [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql8.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - invalid BLOB SQL body
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody('myname', zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody('myname', zeroblob(10))
StoredProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatesql9.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateSqlBody - valid BLOB SQL body
:memory: #use in-memory database
SELECT StoredProc_UpdateSqlBody('myname', SqlProc_FromText('SELECT @col@ FROM @tbl@'));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateSqlBody('myname', SqlProc_FromText('SELECT @col@ FROM @tbl@'))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle1.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - NULL name
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle(NULL, 'title');
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle(NULL, 'title')
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle2.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - Int name
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle(1, 'title');
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle(1, 'title')
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle3.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - Double name
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle(1.5, 'title');
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle(1.5, 'title')
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle4.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - BLOB name
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle(zeroblob(10), 'title');
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle(zeroblob(10), 'title')
StoredProc exception - illegal Stored Procedure Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle5.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - NULL title
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle('name', NULL);
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle('name', NULL)
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle6.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - Int title
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle('name', 1);
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle('name', 1)
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle7.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - Double title
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle('name', 1.4);
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle('name', 1.4)
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle8.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - BLOB title
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle('name', zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle('name', zeroblob(10))
StoredProc exception - illegal Stored Procedure Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatetitle9.testcase.

1
2
3
4
5
6
7
StoredProc_UpdateTitle - Text title
:memory: #use in-memory database
SELECT StoredProc_UpdateTitle('procname', 'another title');
1 # rows (not including the header row)
1 # columns
StoredProc_UpdateTitle('procname', 'another title')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle1.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - NULL name
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle(NULL, 'title');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle(NULL, 'title')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle2.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - Int name
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle(1, 'title');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle(1, 'title')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle3.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - Double name
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle(1.5, 'title');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle(1.5, 'title')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle4.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - BLOB name
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle(zeroblob(10), 'title');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle(zeroblob(10), 'title')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle5.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - NULL title
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle('name', NULL);
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle('name', NULL)
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle6.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - Int title
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle('name', 1);
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle('name', 1)
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle7.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - Double title
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle('name', 1.4);
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle('name', 1.4)
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle8.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - BLOB title
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle('name', zeroblob(10));
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle('name', zeroblob(10))
StoredVar exception - illegal Stored Variable Title [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevartitle9.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateTitle - Text title
:memory: #use in-memory database
SELECT StoredVar_UpdateTitle('varname', 'another title');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateTitle('varname', 'another title')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval1.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - NULL name
:memory: #use in-memory database
SELECT StoredVar_UpdateValue(NULL, 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue(NULL, 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval2.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - Int name
:memory: #use in-memory database
SELECT StoredVar_UpdateValue(1, 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue(1, 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval3.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - Double name
:memory: #use in-memory database
SELECT StoredVar_UpdateValue(1.5, 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue(1.5, 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval4.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - BLOB name
:memory: #use in-memory database
SELECT StoredVar_UpdateValue(zeroblob(10), 'value');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue(zeroblob(10), 'value')
StoredVar exception - illegal Stored Variable Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval5.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - NULL value
:memory: #use in-memory database
SELECT StoredVar_UpdateValue('varnull', NULL);
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue('varnull', NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval6.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - Int value
:memory: #use in-memory database
SELECT StoredVar_UpdateValue('varint', 11);
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue('varint', 11)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval7.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - Double value
:memory: #use in-memory database
SELECT StoredVar_UpdateValue('varfloat', 11.4);
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue('varfloat', 11.4)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval8.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - BLOB value
:memory: #use in-memory database
SELECT StoredVar_UpdateValue('varblob', zeroblob(20));
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue('varblob', zeroblob(20))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_updatevarval9.testcase.

1
2
3
4
5
6
7
StoredVar_UpdateValue - Text value
:memory: #use in-memory database
SELECT StoredVar_UpdateValue('vartext', 'another value');
1 # rows (not including the header row)
1 # columns
StoredVar_UpdateValue('vartext', 'another value')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n1.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - NULL 
:memory: #use in-memory database
SELECT SqlProc_VariableN(NULL, 1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(NULL, 1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n10.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - BLOB index
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), zeroblob(10))
SqlProc exception - illegal Index arg [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n11.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - negative index
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), -1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), -1)
SqlProc exception - illegal Index (expected to be between 0 and 2).
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n12.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - invalid index
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 6);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 6)
SqlProc exception - illegal Index (expected to be between 0 and 2).
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n2.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - INT
:memory: #use in-memory database
SELECT SqlProc_VariableN(1, 1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(1, 1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n3.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - DOUBLE
:memory: #use in-memory database
SELECT SqlProc_VariableN(1.2, 1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(1.2, 1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n4.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - TEXT
:memory: #use in-memory database
SELECT SqlProc_VariableN('text', 1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN('text', 1)
SqlProc exception - illegal SQL Procedure arg [not a BLOB].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n5.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - valid BLOB
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1)
@col2@
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n6.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - invalid BLOB
:memory: #use in-memory database
SELECT SqlProc_VariableN(zeroblob(100), 1);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(zeroblob(100), 1)
SqlProc exception - invalid SQL Procedure BLOB.
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n7.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - NULL index
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), NULL)
SqlProc exception - illegal Index arg [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n8.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - Double index
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1.5);
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 1.5)
SqlProc exception - illegal Index arg [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_var_n9.testcase.

1
2
3
4
5
6
7
SqlProc_VariableN - Text index
:memory: #use in-memory database
SELECT SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 'first');
1 # rows (not including the header row)
1 # columns
SqlProc_VariableN(SqlProc_FromText('SELECT @col1@, $col2$ FROM @table@'), 'first')
SqlProc exception - illegal Index arg [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg1.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - NULL Name 
:memory: #use in-memory database
SELECT SqlProc_VarValue(NULL, 'value');
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue(NULL, 'value')
SqlProc exception - illegal Name arg [not TEXT].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg2.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - Int Name 
:memory: #use in-memory database
SELECT SqlProc_VarValue(1, 'value');
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue(1, 'value')
SqlProc exception - illegal Name arg [not TEXT].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg3.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - Double Name 
:memory: #use in-memory database
SELECT SqlProc_VarValue(1.5, 'value');
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue(1-5, 'value')
SqlProc exception - illegal Name arg [not TEXT].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg4.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - BLOB Name 
:memory: #use in-memory database
SELECT SqlProc_VarValue(zeroblob(4), 'value');
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue(zeroblob(4), 'value')
SqlProc exception - illegal Name arg [not TEXT].
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg5.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - NULL Value
:memory: #use in-memory database
SELECT SqlProc_VarValue('$name$', NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue('$name$', NULL)
$name$=NULL
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg6.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - Int Value
:memory: #use in-memory database
SELECT SqlProc_VarValue('@name@', 1024);
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue('@name@', 1024)
@name@=1024
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg7.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - Double Value
:memory: #use in-memory database
SELECT SqlProc_VarValue('name', 1.23456789);
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue('name', 1.23456789)
@name@=1.2345678900
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg8.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - Text Value
:memory: #use in-memory database
SELECT SqlProc_VarValue('name', 'value');
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue('name', 'value')
@name@=value
<
<
<
<
<
<
<














Deleted test/sql_stmt_iconv_tests/sp_vararg9.testcase.

1
2
3
4
5
6
7
SqlProc_VarValue - BLOB Value
:memory: #use in-memory database
SELECT SqlProc_VarValue('name', x'0123456789abcdef102132435465768798a9bacbdcedfe');
1 # rows (not including the header row)
1 # columns
SqlProc_VarValue('name', x'0123456789abcdef102132435465768798a9bacbdcedfe')
@name@=x'0123456789ABCDEF102132435465768798A9BACBDCEDFE'
<
<
<
<
<
<
<














Changes to test/sql_stmt_libxml2_tests/Makefile.am.

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
...
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
...
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
...
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
...
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
...
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
...
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
	issldsestyle1.testcase \
	issldsestyle2.testcase \
	issldsestyle3.testcase \
	issldsestyle4.testcase \
	issldsestyle5.testcase \
	issldsestyle6.testcase \
	issldsestyle7.testcase \
	isgpx1.testcase \
	isgpx2.testcase \
	isgpx3.testcase \
	isgpx4.testcase \
	isgpx5.testcase \
	isgpx6.testcase \
	isgpx7.testcase \
	issvg1.testcase \
	issvg2.testcase \
	issvg3.testcase \
	issvg4.testcase \
	issvg5.testcase \
	issvg6.testcase \
	issvg7.testcase \
................................................................................
	registerRaster3.testcase \
	registerRaster4.testcase \
	registerRaster5.testcase \
	registerRaster6.testcase \
	registerRaster7.testcase \
	registerRaster8.testcase \
	registerRaster9.testcase \
	registerrasterkeyword1.testcase \
	registerrasterkeyword2.testcase \
	registerrasterkeyword3.testcase \
	registerrasterkeyword4.testcase \
	registerrasterkeyword5.testcase \
	registerrasterkeyword6.testcase \
	registerrasterkeyword7.testcase \
	registerrasterkeyword8.testcase \
	registerrasterkeyword9.testcase \
	registerrastersrid1.testcase \
	registerrastersrid2.testcase \
	registerrastersrid3.testcase \
	registerrastersrid4.testcase \
	registerrastersrid5.testcase \
	registerrastersrid6.testcase \
	registerrastersrid7.testcase \
................................................................................
	registerVector11.testcase \
	registerVector12.testcase \
	registerVector13.testcase \
	registerVector2.testcase \
	registerVector3.testcase \
	registerVector4.testcase \
	registerVector9.testcase \
	registertopogeocvg1.testcase \
	registertopogeocvg2.testcase \
	registertopogeocvg3.testcase \
	registertopogeocvg4.testcase \
	registertopogeocvg5.testcase \
	registertopogeocvg6.testcase \
	registertopogeocvg7.testcase \
	registertopogeocvg8.testcase \
	registertopogeocvg9.testcase \
	registertopogeocvg10.testcase \
	registertopogeocvg11.testcase \
	registertopogeocvg12.testcase \
	registertopogeocvg13.testcase \
	registertopogeocvg14.testcase \
	registertopogeocvg15.testcase \
	registertopogeocvg16.testcase \
	registertopogeocvg17.testcase \
	registertopogeocvg18.testcase \
	registertopogeocvg19.testcase \
	registertopogeocvg20.testcase \
	registertopogeocvg21.testcase \
	registertopogeocvg22.testcase \
	registertopogeocvg23.testcase \
	registertopogeocvg24.testcase \
	registertopogeocvg25.testcase \
	registertopogeocvg26.testcase \
	registertopogeocvg27.testcase \
	registertoponetcvg1.testcase \
	registertoponetcvg2.testcase \
	registertoponetcvg3.testcase \
	registertoponetcvg4.testcase \
	registertoponetcvg5.testcase \
	registertoponetcvg6.testcase \
	registertoponetcvg7.testcase \
	registertoponetcvg8.testcase \
	registertoponetcvg9.testcase \
	registertoponetcvg10.testcase \
	registertoponetcvg11.testcase \
	registertoponetcvg12.testcase \
	registertoponetcvg13.testcase \
	registertoponetcvg14.testcase \
	registertoponetcvg15.testcase \
	registertoponetcvg16.testcase \
	registertoponetcvg17.testcase \
	registertoponetcvg18.testcase \
	registertoponetcvg19.testcase \
	registertoponetcvg20.testcase \
	registertoponetcvg21.testcase \
	registertoponetcvg22.testcase \
	registertoponetcvg23.testcase \
	registertoponetcvg24.testcase \
	registertoponetcvg25.testcase \
	registertoponetcvg26.testcase \
	registertoponetcvg27.testcase \
	registervectorcvg1.testcase \
	registervectorcvg2.testcase \
	registervectorcvg3.testcase \
	registervectorcvg4.testcase \
	registervectorcvg5.testcase \
	registervectorcvg6.testcase \
	registervectorcvg7.testcase \
................................................................................
	registervectorcvg16.testcase \
	registervectorcvg17.testcase \
	registervectorcvg18.testcase \
	registervectorcvg19.testcase \
	registervectorcvg20.testcase \
	registervectorcvg21.testcase \
	registervectorcvg22.testcase \
	registervectorcvg23.testcase \
	registervectorcvg24.testcase \
	registervectorcvg25.testcase \
	registervectorcvg26.testcase \
	registervectorcvg27.testcase \
	registervectorcvg28.testcase \
	registervectorcvg29.testcase \
	registervectorcvg30.testcase \
	registervectorcvg31.testcase \
	registerviewcvg1.testcase \
	registerviewcvg2.testcase \
	registerviewcvg3.testcase \
	registerviewcvg4.testcase \
	registerviewcvg5.testcase \
	registerviewcvg6.testcase \
	registerviewcvg7.testcase \
	registerviewcvg8.testcase \
	registerviewcvg9.testcase \
	registerviewcvg10.testcase \
	registerviewcvg11.testcase \
	registerviewcvg12.testcase \
	registerviewcvg13.testcase \
	registerviewcvg14.testcase \
	registerviewcvg15.testcase \
	registerviewcvg16.testcase \
	registerviewcvg17.testcase \
	registerviewcvg18.testcase \
	registerviewcvg19.testcase \
	registerviewcvg20.testcase \
	registerviewcvg21.testcase \
	registerviewcvg22.testcase \
	registerviewcvg23.testcase \
	registerviewcvg24.testcase \
	registerviewcvg25.testcase \
	registerviewcvg26.testcase \
	registerviewcvg27.testcase \
	registerviewcvg28.testcase \
	registerviewcvg29.testcase \
	registerviewcvg30.testcase \
	registerviewcvg31.testcase \
	registervirtualcvg1.testcase \
	registervirtualcvg2.testcase \
	registervirtualcvg3.testcase \
	registervirtualcvg4.testcase \
	registervirtualcvg5.testcase \
	registervirtualcvg6.testcase \
	registervirtualcvg7.testcase \
	registervirtualcvg8.testcase \
	registervirtualcvg9.testcase \
	registervirtualcvg10.testcase \
	registervirtualcvg11.testcase \
	registervirtualcvg12.testcase \
	registervirtualcvg13.testcase \
	registervirtualcvg14.testcase \
	registervirtualcvg15.testcase \
	registervirtualcvg16.testcase \
	registervirtualcvg17.testcase \
	registervirtualcvg18.testcase \
	registervirtualcvg19.testcase \
	registervirtualcvg20.testcase \
	registervirtualcvg21.testcase \
	registervirtualcvg22.testcase \
	registervirtualcvg23.testcase \
	registervirtualcvg24.testcase \
	registervirtualcvg25.testcase \
	registervirtualcvg26.testcase \
	registervirtualcvg27.testcase \
	registervectorkeyword1.testcase \
	registervectorkeyword2.testcase \
	registervectorkeyword3.testcase \
	registervectorkeyword4.testcase \
	registervectorkeyword5.testcase \
	registervectorkeyword6.testcase \
	registervectorkeyword7.testcase \
	registervectorkeyword8.testcase \
	registervectorkeyword9.testcase \
	registervectorsrid1.testcase \
	registervectorsrid2.testcase \
	registervectorsrid3.testcase \
	registervectorsrid4.testcase \
	registervectorsrid5.testcase \
	registervectorsrid6.testcase \
	registervectorsrid7.testcase \
................................................................................
	setVectorPaintOrder12.testcase \
	setVectorPaintOrder13.testcase \
	setparentid1.testcase \
	setparentid2.testcase \
	setparentid3.testcase \
	setparentid4.testcase \
	setparentid5.testcase \
	setvectorcopyright1.testcase \
	setvectorcopyright2.testcase \
	setvectorcopyright3.testcase \
	setvectorcopyright4.testcase \
	setvectorcopyright5.testcase \
	setvectorcopyright6.testcase \
	setvectorcopyright7.testcase \
	setvectorcopyright8.testcase \
	setvectorcopyright9.testcase \
	setvectorcopyright10.testcase \
	setvectorcopyright11.testcase \
	setvectorcopyright12.testcase \
	setvectorcopyright13.testcase \
	setvectorcopyright14.testcase \
	setvectorcopyright15.testcase \
	setvectorcopyright16.testcase \
	setvectorinfos1.testcase \
	setvectorinfos2.testcase \
	setvectorinfos3.testcase \
	setvectorinfos4.testcase \
	setvectorinfos5.testcase \
	setvectorinfos6.testcase \
	setvectorinfos7.testcase \
	setvectorinfos8.testcase \
	setvectorinfos9.testcase \
	setvectorinfos10.testcase \
	setvectorinfos11.testcase \
	setvectorinfos12.testcase \
	setvectorinfos13.testcase \
	setvectorinfos14.testcase \
	setvectorinfos15.testcase \
	setvectorinfos16.testcase \
	setvectorinfos17.testcase \
	setvectorinfos18.testcase \
	setvectorinfos19.testcase \
	setvectorinfos20.testcase \
	setvectorinfos21.testcase \
	setvectorinfos22.testcase \
	unregisterGraphic1.testcase \
	unregisterGraphic2.testcase \
	unregisterGraphic3.testcase \
	unregisterGraphic4.testcase \
	unregisterGraphic5.testcase \
	unregisterGroup1.testcase \
	unregisterGroup2.testcase \
................................................................................
	unregisterRaster3.testcase \
	unregisterRaster4.testcase \
	unregisterRaster5.testcase \
	unregisterRaster6.testcase \
	unregisterRaster7.testcase \
	unregisterRaster8.testcase \
	unregisterRaster9.testcase \
	unregisterrasterkeyword1.testcase \
	unregisterrasterkeyword2.testcase \
	unregisterrasterkeyword3.testcase \
	unregisterrasterkeyword4.testcase \
	unregisterrasterkeyword5.testcase \
	unregisterrasterkeyword6.testcase \
	unregisterrasterkeyword7.testcase \
	unregisterrasterkeyword8.testcase \
	unregisterrasterkeyword9.testcase \
	unregisterrastersrid1.testcase \
	unregisterrastersrid2.testcase \
	unregisterrastersrid3.testcase \
	unregisterrastersrid4.testcase \
	unregisterrastersrid5.testcase \
	unregisterrastersrid6.testcase \
	unregisterrastersrid7.testcase \
................................................................................
	unregisterVector12.testcase \
	unregisterVector13.testcase \
	unregistervectorcvg1.testcase \
	unregistervectorcvg2.testcase \
	unregistervectorcvg3.testcase \
	unregistervectorcvg4.testcase \
	unregistervectorcvg5.testcase \
	unregistervectorkeyword1.testcase \
	unregistervectorkeyword2.testcase \
	unregistervectorkeyword3.testcase \
	unregistervectorkeyword4.testcase \
	unregistervectorkeyword5.testcase \
	unregistervectorkeyword6.testcase \
	unregistervectorkeyword7.testcase \
	unregistervectorkeyword8.testcase \
	unregistervectorkeyword9.testcase \
	unregistervectorsrid1.testcase \
	unregistervectorsrid2.testcase \
	unregistervectorsrid3.testcase \
	unregistervectorsrid4.testcase \
	unregistervectorsrid5.testcase \
	unregistervectorsrid6.testcase \
	unregistervectorsrid7.testcase \
................................................................................
	xmlblobgetname8.testcase \
	xmlblobgettitle1.testcase \
	xmlblobgettitle2.testcase \
	xmlblobgettitle3.testcase \
	xmlblobgettitle4.testcase \
	xmlblobgettitle5.testcase \
	xmlblobgettitle6.testcase \
	xmlblobmlinegpx1.testcase \
	xmlblobmlinegpx2.testcase \
	xmlblobmlinegpx3.testcase \
	xmlblobmlinegpx4.testcase \
	xmlblobmlinegpx5.testcase \
	xmlblobmlinegpx6.testcase \
	xmlcompress1.testcase \
	xmlcompress2.testcase \
	xmlcompress3.testcase \
	xmlcompress4.testcase \
	xmlcompress5.testcase \
	xmlcompress6.testcase \
	xmlcompress7.testcase \







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<







65
66
67
68
69
70
71







72
73
74
75
76
77
78
...
146
147
148
149
150
151
152









153
154
155
156
157
158
159
...
178
179
180
181
182
183
184






















































185
186
187
188
189
190
191
...
200
201
202
203
204
205
206












































































207
208
209
210
211
212
213
...
299
300
301
302
303
304
305
















306
307
308
309
310
311
312
313
314
315
316
317
318









319
320
321
322
323
324
325
...
364
365
366
367
368
369
370









371
372
373
374
375
376
377
...
406
407
408
409
410
411
412









413
414
415
416
417
418
419
...
517
518
519
520
521
522
523






524
525
526
527
528
529
530
	issldsestyle1.testcase \
	issldsestyle2.testcase \
	issldsestyle3.testcase \
	issldsestyle4.testcase \
	issldsestyle5.testcase \
	issldsestyle6.testcase \
	issldsestyle7.testcase \







	issvg1.testcase \
	issvg2.testcase \
	issvg3.testcase \
	issvg4.testcase \
	issvg5.testcase \
	issvg6.testcase \
	issvg7.testcase \
................................................................................
	registerRaster3.testcase \
	registerRaster4.testcase \
	registerRaster5.testcase \
	registerRaster6.testcase \
	registerRaster7.testcase \
	registerRaster8.testcase \
	registerRaster9.testcase \









	registerrastersrid1.testcase \
	registerrastersrid2.testcase \
	registerrastersrid3.testcase \
	registerrastersrid4.testcase \
	registerrastersrid5.testcase \
	registerrastersrid6.testcase \
	registerrastersrid7.testcase \
................................................................................
	registerVector11.testcase \
	registerVector12.testcase \
	registerVector13.testcase \
	registerVector2.testcase \
	registerVector3.testcase \
	registerVector4.testcase \
	registerVector9.testcase \






















































	registervectorcvg1.testcase \
	registervectorcvg2.testcase \
	registervectorcvg3.testcase \
	registervectorcvg4.testcase \
	registervectorcvg5.testcase \
	registervectorcvg6.testcase \
	registervectorcvg7.testcase \
................................................................................
	registervectorcvg16.testcase \
	registervectorcvg17.testcase \
	registervectorcvg18.testcase \
	registervectorcvg19.testcase \
	registervectorcvg20.testcase \
	registervectorcvg21.testcase \
	registervectorcvg22.testcase \












































































	registervectorsrid1.testcase \
	registervectorsrid2.testcase \
	registervectorsrid3.testcase \
	registervectorsrid4.testcase \
	registervectorsrid5.testcase \
	registervectorsrid6.testcase \
	registervectorsrid7.testcase \
................................................................................
	setVectorPaintOrder12.testcase \
	setVectorPaintOrder13.testcase \
	setparentid1.testcase \
	setparentid2.testcase \
	setparentid3.testcase \
	setparentid4.testcase \
	setparentid5.testcase \
















	setvectorinfos1.testcase \
	setvectorinfos2.testcase \
	setvectorinfos3.testcase \
	setvectorinfos4.testcase \
	setvectorinfos5.testcase \
	setvectorinfos6.testcase \
	setvectorinfos7.testcase \
	setvectorinfos8.testcase \
	setvectorinfos9.testcase \
	setvectorinfos10.testcase \
	setvectorinfos11.testcase \
	setvectorinfos12.testcase \
	setvectorinfos13.testcase \









	unregisterGraphic1.testcase \
	unregisterGraphic2.testcase \
	unregisterGraphic3.testcase \
	unregisterGraphic4.testcase \
	unregisterGraphic5.testcase \
	unregisterGroup1.testcase \
	unregisterGroup2.testcase \
................................................................................
	unregisterRaster3.testcase \
	unregisterRaster4.testcase \
	unregisterRaster5.testcase \
	unregisterRaster6.testcase \
	unregisterRaster7.testcase \
	unregisterRaster8.testcase \
	unregisterRaster9.testcase \









	unregisterrastersrid1.testcase \
	unregisterrastersrid2.testcase \
	unregisterrastersrid3.testcase \
	unregisterrastersrid4.testcase \
	unregisterrastersrid5.testcase \
	unregisterrastersrid6.testcase \
	unregisterrastersrid7.testcase \
................................................................................
	unregisterVector12.testcase \
	unregisterVector13.testcase \
	unregistervectorcvg1.testcase \
	unregistervectorcvg2.testcase \
	unregistervectorcvg3.testcase \
	unregistervectorcvg4.testcase \
	unregistervectorcvg5.testcase \









	unregistervectorsrid1.testcase \
	unregistervectorsrid2.testcase \
	unregistervectorsrid3.testcase \
	unregistervectorsrid4.testcase \
	unregistervectorsrid5.testcase \
	unregistervectorsrid6.testcase \
	unregistervectorsrid7.testcase \
................................................................................
	xmlblobgetname8.testcase \
	xmlblobgettitle1.testcase \
	xmlblobgettitle2.testcase \
	xmlblobgettitle3.testcase \
	xmlblobgettitle4.testcase \
	xmlblobgettitle5.testcase \
	xmlblobgettitle6.testcase \






	xmlcompress1.testcase \
	xmlcompress2.testcase \
	xmlcompress3.testcase \
	xmlcompress4.testcase \
	xmlcompress5.testcase \
	xmlcompress6.testcase \
	xmlcompress7.testcase \

Changes to test/sql_stmt_libxml2_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
...
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
...
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
...
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
...
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
...
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
...
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
....
1040
1041
1042
1043
1044
1045
1046

1047
1048
1049
1050
1051
1052
1053
....
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_libxml2_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	issldsestyle1.testcase \
	issldsestyle2.testcase \
	issldsestyle3.testcase \
	issldsestyle4.testcase \
	issldsestyle5.testcase \
	issldsestyle6.testcase \
	issldsestyle7.testcase \
	isgpx1.testcase \
	isgpx2.testcase \
	isgpx3.testcase \
	isgpx4.testcase \
	isgpx5.testcase \
	isgpx6.testcase \
	isgpx7.testcase \
	issvg1.testcase \
	issvg2.testcase \
	issvg3.testcase \
	issvg4.testcase \
	issvg5.testcase \
	issvg6.testcase \
	issvg7.testcase \
................................................................................
	registerRaster3.testcase \
	registerRaster4.testcase \
	registerRaster5.testcase \
	registerRaster6.testcase \
	registerRaster7.testcase \
	registerRaster8.testcase \
	registerRaster9.testcase \
	registerrasterkeyword1.testcase \
	registerrasterkeyword2.testcase \
	registerrasterkeyword3.testcase \
	registerrasterkeyword4.testcase \
	registerrasterkeyword5.testcase \
	registerrasterkeyword6.testcase \
	registerrasterkeyword7.testcase \
	registerrasterkeyword8.testcase \
	registerrasterkeyword9.testcase \
	registerrastersrid1.testcase \
	registerrastersrid2.testcase \
	registerrastersrid3.testcase \
	registerrastersrid4.testcase \
	registerrastersrid5.testcase \
	registerrastersrid6.testcase \
	registerrastersrid7.testcase \
................................................................................
	registerVector11.testcase \
	registerVector12.testcase \
	registerVector13.testcase \
	registerVector2.testcase \
	registerVector3.testcase \
	registerVector4.testcase \
	registerVector9.testcase \
	registertopogeocvg1.testcase \
	registertopogeocvg2.testcase \
	registertopogeocvg3.testcase \
	registertopogeocvg4.testcase \
	registertopogeocvg5.testcase \
	registertopogeocvg6.testcase \
	registertopogeocvg7.testcase \
	registertopogeocvg8.testcase \
	registertopogeocvg9.testcase \
	registertopogeocvg10.testcase \
	registertopogeocvg11.testcase \
	registertopogeocvg12.testcase \
	registertopogeocvg13.testcase \
	registertopogeocvg14.testcase \
	registertopogeocvg15.testcase \
	registertopogeocvg16.testcase \
	registertopogeocvg17.testcase \
	registertopogeocvg18.testcase \
	registertopogeocvg19.testcase \
	registertopogeocvg20.testcase \
	registertopogeocvg21.testcase \
	registertopogeocvg22.testcase \
	registertopogeocvg23.testcase \
	registertopogeocvg24.testcase \
	registertopogeocvg25.testcase \
	registertopogeocvg26.testcase \
	registertopogeocvg27.testcase \
	registertoponetcvg1.testcase \
	registertoponetcvg2.testcase \
	registertoponetcvg3.testcase \
	registertoponetcvg4.testcase \
	registertoponetcvg5.testcase \
	registertoponetcvg6.testcase \
	registertoponetcvg7.testcase \
	registertoponetcvg8.testcase \
	registertoponetcvg9.testcase \
	registertoponetcvg10.testcase \
	registertoponetcvg11.testcase \
	registertoponetcvg12.testcase \
	registertoponetcvg13.testcase \
	registertoponetcvg14.testcase \
	registertoponetcvg15.testcase \
	registertoponetcvg16.testcase \
	registertoponetcvg17.testcase \
	registertoponetcvg18.testcase \
	registertoponetcvg19.testcase \
	registertoponetcvg20.testcase \
	registertoponetcvg21.testcase \
	registertoponetcvg22.testcase \
	registertoponetcvg23.testcase \
	registertoponetcvg24.testcase \
	registertoponetcvg25.testcase \
	registertoponetcvg26.testcase \
	registertoponetcvg27.testcase \
	registervectorcvg1.testcase \
	registervectorcvg2.testcase \
	registervectorcvg3.testcase \
	registervectorcvg4.testcase \
	registervectorcvg5.testcase \
	registervectorcvg6.testcase \
	registervectorcvg7.testcase \
................................................................................
	registervectorcvg16.testcase \
	registervectorcvg17.testcase \
	registervectorcvg18.testcase \
	registervectorcvg19.testcase \
	registervectorcvg20.testcase \
	registervectorcvg21.testcase \
	registervectorcvg22.testcase \
	registervectorcvg23.testcase \
	registervectorcvg24.testcase \
	registervectorcvg25.testcase \
	registervectorcvg26.testcase \
	registervectorcvg27.testcase \
	registervectorcvg28.testcase \
	registervectorcvg29.testcase \
	registervectorcvg30.testcase \
	registervectorcvg31.testcase \
	registerviewcvg1.testcase \
	registerviewcvg2.testcase \
	registerviewcvg3.testcase \
	registerviewcvg4.testcase \
	registerviewcvg5.testcase \
	registerviewcvg6.testcase \
	registerviewcvg7.testcase \
	registerviewcvg8.testcase \
	registerviewcvg9.testcase \
	registerviewcvg10.testcase \
	registerviewcvg11.testcase \
	registerviewcvg12.testcase \
	registerviewcvg13.testcase \
	registerviewcvg14.testcase \
	registerviewcvg15.testcase \
	registerviewcvg16.testcase \
	registerviewcvg17.testcase \
	registerviewcvg18.testcase \
	registerviewcvg19.testcase \
	registerviewcvg20.testcase \
	registerviewcvg21.testcase \
	registerviewcvg22.testcase \
	registerviewcvg23.testcase \
	registerviewcvg24.testcase \
	registerviewcvg25.testcase \
	registerviewcvg26.testcase \
	registerviewcvg27.testcase \
	registerviewcvg28.testcase \
	registerviewcvg29.testcase \
	registerviewcvg30.testcase \
	registerviewcvg31.testcase \
	registervirtualcvg1.testcase \
	registervirtualcvg2.testcase \
	registervirtualcvg3.testcase \
	registervirtualcvg4.testcase \
	registervirtualcvg5.testcase \
	registervirtualcvg6.testcase \
	registervirtualcvg7.testcase \
	registervirtualcvg8.testcase \
	registervirtualcvg9.testcase \
	registervirtualcvg10.testcase \
	registervirtualcvg11.testcase \
	registervirtualcvg12.testcase \
	registervirtualcvg13.testcase \
	registervirtualcvg14.testcase \
	registervirtualcvg15.testcase \
	registervirtualcvg16.testcase \
	registervirtualcvg17.testcase \
	registervirtualcvg18.testcase \
	registervirtualcvg19.testcase \
	registervirtualcvg20.testcase \
	registervirtualcvg21.testcase \
	registervirtualcvg22.testcase \
	registervirtualcvg23.testcase \
	registervirtualcvg24.testcase \
	registervirtualcvg25.testcase \
	registervirtualcvg26.testcase \
	registervirtualcvg27.testcase \
	registervectorkeyword1.testcase \
	registervectorkeyword2.testcase \
	registervectorkeyword3.testcase \
	registervectorkeyword4.testcase \
	registervectorkeyword5.testcase \
	registervectorkeyword6.testcase \
	registervectorkeyword7.testcase \
	registervectorkeyword8.testcase \
	registervectorkeyword9.testcase \
	registervectorsrid1.testcase \
	registervectorsrid2.testcase \
	registervectorsrid3.testcase \
	registervectorsrid4.testcase \
	registervectorsrid5.testcase \
	registervectorsrid6.testcase \
	registervectorsrid7.testcase \
................................................................................
	setVectorPaintOrder12.testcase \
	setVectorPaintOrder13.testcase \
	setparentid1.testcase \
	setparentid2.testcase \
	setparentid3.testcase \
	setparentid4.testcase \
	setparentid5.testcase \
	setvectorcopyright1.testcase \
	setvectorcopyright2.testcase \
	setvectorcopyright3.testcase \
	setvectorcopyright4.testcase \
	setvectorcopyright5.testcase \
	setvectorcopyright6.testcase \
	setvectorcopyright7.testcase \
	setvectorcopyright8.testcase \
	setvectorcopyright9.testcase \
	setvectorcopyright10.testcase \
	setvectorcopyright11.testcase \
	setvectorcopyright12.testcase \
	setvectorcopyright13.testcase \
	setvectorcopyright14.testcase \
	setvectorcopyright15.testcase \
	setvectorcopyright16.testcase \
	setvectorinfos1.testcase \
	setvectorinfos2.testcase \
	setvectorinfos3.testcase \
	setvectorinfos4.testcase \
	setvectorinfos5.testcase \
	setvectorinfos6.testcase \
	setvectorinfos7.testcase \
	setvectorinfos8.testcase \
	setvectorinfos9.testcase \
	setvectorinfos10.testcase \
	setvectorinfos11.testcase \
	setvectorinfos12.testcase \
	setvectorinfos13.testcase \
	setvectorinfos14.testcase \
	setvectorinfos15.testcase \
	setvectorinfos16.testcase \
	setvectorinfos17.testcase \
	setvectorinfos18.testcase \
	setvectorinfos19.testcase \
	setvectorinfos20.testcase \
	setvectorinfos21.testcase \
	setvectorinfos22.testcase \
	unregisterGraphic1.testcase \
	unregisterGraphic2.testcase \
	unregisterGraphic3.testcase \
	unregisterGraphic4.testcase \
	unregisterGraphic5.testcase \
	unregisterGroup1.testcase \
	unregisterGroup2.testcase \
................................................................................
	unregisterRaster3.testcase \
	unregisterRaster4.testcase \
	unregisterRaster5.testcase \
	unregisterRaster6.testcase \
	unregisterRaster7.testcase \
	unregisterRaster8.testcase \
	unregisterRaster9.testcase \
	unregisterrasterkeyword1.testcase \
	unregisterrasterkeyword2.testcase \
	unregisterrasterkeyword3.testcase \
	unregisterrasterkeyword4.testcase \
	unregisterrasterkeyword5.testcase \
	unregisterrasterkeyword6.testcase \
	unregisterrasterkeyword7.testcase \
	unregisterrasterkeyword8.testcase \
	unregisterrasterkeyword9.testcase \
	unregisterrastersrid1.testcase \
	unregisterrastersrid2.testcase \
	unregisterrastersrid3.testcase \
	unregisterrastersrid4.testcase \
	unregisterrastersrid5.testcase \
	unregisterrastersrid6.testcase \
	unregisterrastersrid7.testcase \
................................................................................
	unregisterVector12.testcase \
	unregisterVector13.testcase \
	unregistervectorcvg1.testcase \
	unregistervectorcvg2.testcase \
	unregistervectorcvg3.testcase \
	unregistervectorcvg4.testcase \
	unregistervectorcvg5.testcase \
	unregistervectorkeyword1.testcase \
	unregistervectorkeyword2.testcase \
	unregistervectorkeyword3.testcase \
	unregistervectorkeyword4.testcase \
	unregistervectorkeyword5.testcase \
	unregistervectorkeyword6.testcase \
	unregistervectorkeyword7.testcase \
	unregistervectorkeyword8.testcase \
	unregistervectorkeyword9.testcase \
	unregistervectorsrid1.testcase \
	unregistervectorsrid2.testcase \
	unregistervectorsrid3.testcase \
	unregistervectorsrid4.testcase \
	unregistervectorsrid5.testcase \
	unregistervectorsrid6.testcase \
	unregistervectorsrid7.testcase \
................................................................................
	xmlblobgetname8.testcase \
	xmlblobgettitle1.testcase \
	xmlblobgettitle2.testcase \
	xmlblobgettitle3.testcase \
	xmlblobgettitle4.testcase \
	xmlblobgettitle5.testcase \
	xmlblobgettitle6.testcase \
	xmlblobmlinegpx1.testcase \
	xmlblobmlinegpx2.testcase \
	xmlblobmlinegpx3.testcase \
	xmlblobmlinegpx4.testcase \
	xmlblobmlinegpx5.testcase \
	xmlblobmlinegpx6.testcase \
	xmlcompress1.testcase \
	xmlcompress2.testcase \
	xmlcompress3.testcase \
	xmlcompress4.testcase \
	xmlcompress5.testcase \
	xmlcompress6.testcase \
	xmlcompress7.testcase \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_libxml2_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_libxml2_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
306
307
308
309
310
311
312







313
314
315
316
317
318
319
...
387
388
389
390
391
392
393









394
395
396
397
398
399
400
...
419
420
421
422
423
424
425






















































426
427
428
429
430
431
432
...
441
442
443
444
445
446
447












































































448
449
450
451
452
453
454
...
540
541
542
543
544
545
546
















547
548
549
550
551
552
553
554
555
556
557
558
559









560
561
562
563
564
565
566
...
605
606
607
608
609
610
611









612
613
614
615
616
617
618
...
647
648
649
650
651
652
653









654
655
656
657
658
659
660
...
758
759
760
761
762
763
764






765
766
767
768
769
770
771
...
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
....
1009
1010
1011
1012
1013
1014
1015


1016
1017
1018
1019
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_libxml2_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	issldsestyle1.testcase \
	issldsestyle2.testcase \
	issldsestyle3.testcase \
	issldsestyle4.testcase \
	issldsestyle5.testcase \
	issldsestyle6.testcase \
	issldsestyle7.testcase \







	issvg1.testcase \
	issvg2.testcase \
	issvg3.testcase \
	issvg4.testcase \
	issvg5.testcase \
	issvg6.testcase \
	issvg7.testcase \
................................................................................
	registerRaster3.testcase \
	registerRaster4.testcase \
	registerRaster5.testcase \
	registerRaster6.testcase \
	registerRaster7.testcase \
	registerRaster8.testcase \
	registerRaster9.testcase \









	registerrastersrid1.testcase \
	registerrastersrid2.testcase \
	registerrastersrid3.testcase \
	registerrastersrid4.testcase \
	registerrastersrid5.testcase \
	registerrastersrid6.testcase \
	registerrastersrid7.testcase \
................................................................................
	registerVector11.testcase \
	registerVector12.testcase \
	registerVector13.testcase \
	registerVector2.testcase \
	registerVector3.testcase \
	registerVector4.testcase \
	registerVector9.testcase \






















































	registervectorcvg1.testcase \
	registervectorcvg2.testcase \
	registervectorcvg3.testcase \
	registervectorcvg4.testcase \
	registervectorcvg5.testcase \
	registervectorcvg6.testcase \
	registervectorcvg7.testcase \
................................................................................
	registervectorcvg16.testcase \
	registervectorcvg17.testcase \
	registervectorcvg18.testcase \
	registervectorcvg19.testcase \
	registervectorcvg20.testcase \
	registervectorcvg21.testcase \
	registervectorcvg22.testcase \












































































	registervectorsrid1.testcase \
	registervectorsrid2.testcase \
	registervectorsrid3.testcase \
	registervectorsrid4.testcase \
	registervectorsrid5.testcase \
	registervectorsrid6.testcase \
	registervectorsrid7.testcase \
................................................................................
	setVectorPaintOrder12.testcase \
	setVectorPaintOrder13.testcase \
	setparentid1.testcase \
	setparentid2.testcase \
	setparentid3.testcase \
	setparentid4.testcase \
	setparentid5.testcase \
















	setvectorinfos1.testcase \
	setvectorinfos2.testcase \
	setvectorinfos3.testcase \
	setvectorinfos4.testcase \
	setvectorinfos5.testcase \
	setvectorinfos6.testcase \
	setvectorinfos7.testcase \
	setvectorinfos8.testcase \
	setvectorinfos9.testcase \
	setvectorinfos10.testcase \
	setvectorinfos11.testcase \
	setvectorinfos12.testcase \
	setvectorinfos13.testcase \









	unregisterGraphic1.testcase \
	unregisterGraphic2.testcase \
	unregisterGraphic3.testcase \
	unregisterGraphic4.testcase \
	unregisterGraphic5.testcase \
	unregisterGroup1.testcase \
	unregisterGroup2.testcase \
................................................................................
	unregisterRaster3.testcase \
	unregisterRaster4.testcase \
	unregisterRaster5.testcase \
	unregisterRaster6.testcase \
	unregisterRaster7.testcase \
	unregisterRaster8.testcase \
	unregisterRaster9.testcase \









	unregisterrastersrid1.testcase \
	unregisterrastersrid2.testcase \
	unregisterrastersrid3.testcase \
	unregisterrastersrid4.testcase \
	unregisterrastersrid5.testcase \
	unregisterrastersrid6.testcase \
	unregisterrastersrid7.testcase \
................................................................................
	unregisterVector12.testcase \
	unregisterVector13.testcase \
	unregistervectorcvg1.testcase \
	unregistervectorcvg2.testcase \
	unregistervectorcvg3.testcase \
	unregistervectorcvg4.testcase \
	unregistervectorcvg5.testcase \









	unregistervectorsrid1.testcase \
	unregistervectorsrid2.testcase \
	unregistervectorsrid3.testcase \
	unregistervectorsrid4.testcase \
	unregistervectorsrid5.testcase \
	unregistervectorsrid6.testcase \
	unregistervectorsrid7.testcase \
................................................................................
	xmlblobgetname8.testcase \
	xmlblobgettitle1.testcase \
	xmlblobgettitle2.testcase \
	xmlblobgettitle3.testcase \
	xmlblobgettitle4.testcase \
	xmlblobgettitle5.testcase \
	xmlblobgettitle6.testcase \






	xmlcompress1.testcase \
	xmlcompress2.testcase \
	xmlcompress3.testcase \
	xmlcompress4.testcase \
	xmlcompress5.testcase \
	xmlcompress6.testcase \
	xmlcompress7.testcase \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_libxml2_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_libxml2_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sql_stmt_libxml2_tests/isgpx1.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - NULL XmlBLOB
:memory: #use in-memory database
SELECT XB_IsGpx(NULL);
1 # rows (not including the header row)
1 # columns
XB_IsGpx(NULL)
-1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/isgpx2.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - INTEGER XmlBLOB
:memory: #use in-memory database
SELECT XB_IsGpx(1);
1 # rows (not including the header row)
1 # columns
XB_IsGpx(1)
-1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/isgpx3.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - DOUBLE XmlBLOB
:memory: #use in-memory database
SELECT XB_IsGpx(1.1);
1 # rows (not including the header row)
1 # columns
XB_IsGpx(1.1)
-1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/isgpx4.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - TEXT XmlBLOB
:memory: #use in-memory database
SELECT XB_IsGpx('alpha');
1 # rows (not including the header row)
1 # columns
XB_IsGpx('alpha')
-1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/isgpx5.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - invalid XmlBLOB
:memory: #use in-memory database
SELECT XB_IsGpx(zeroblob(100));
1 # rows (not including the header row)
1 # columns
XB_IsGpx(zeroblob(100))
-1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/isgpx6.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - valid XmlBLOB (TRUE)
:memory: #use in-memory database
SELECT XB_IsGpx(x'000BAC070000000F0000000000BA0000CA0000DA0000DE0000DB0000DC0000DDCB789CB3492FA850D0B7030009210219BC37382DE2DD');
1 # rows (not including the header row)
1 # columns
XB_IsGpx(x'000BAC070000000F0000000000BA0000CA0000DA0000DE0000DB0000DC0000DDCB789CB3492FA850D0B7030009210219BC37382DE2DD')
1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/isgpx7.testcase.

1
2
3
4
5
6
7
8
XB_IsGpx - valid XmlBLOB (FALSE)
:memory: #use in-memory database
SELECT XB_IsGpx(x'0001AB12000000120000000000BA0000CA0000DA0000DB0000DC0000DDCB3C613E3C623E746578743C2F623E3C2F613EBC49A10C93DD');
1 # rows (not including the header row)
1 # columns
XB_IsGpx(x'0001AB12000000120000000000BA0000CA0000DA0000DB0000DC0000DDCB3C613E3C623E746578743C2F623E3C2F613EBC49A10C93DD')
0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword1.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword(NULL, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword(NULL, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword2.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword(1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword(1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword3.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword(1.1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword(1.1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword4.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword(zeroblob(4), 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword(zeroblob(4), 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword5.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - NULL keyword
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword('alpha', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword('alpha', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword6.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - Double keyword
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword('alpha', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword('alpha', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword7.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - Text keyword
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword('alpha', 'beta');
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword('alpha', 'beta')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword8.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - BLOB keyword
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword('alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerrasterkeyword9.testcase.

1
2
3
4
5
6
7
RegisterRasterCoverageKeyword - Int keyword
:memory: #use in-memory database
SELECT SE_RegisterRasterCoverageKeyword('alpha', 4326);
1 # rows (not including the header row)
1 # columns
SE_RegisterRasterCoverageKeyword('alpha', 4326)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg1.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage(NULL, 'topo');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage(NULL, 'topo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg10.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - NULL Title
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', NULL, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', NULL, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg11.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Int Title
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg12.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Double Title
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 1.1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 1.1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg13.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - BLOB Title
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', zeroblob(10), 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', zeroblob(10), 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg14.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - NULL Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg15.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Int Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg16.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Double Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 1.5);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg17.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - BLOB Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', zeroblob(5));
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', zeroblob(5))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg18.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Text Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg19.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - NULL Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', NULL, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', NULL, 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg2.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage(1, 'topo');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage(1, 'topo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg20.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Double Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1.2, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1.2, 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg21.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Text Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 'yes', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 'yes', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg22.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - BLOB Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', zeroblob(4), 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg23.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - NULL Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg24.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Double Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, 1.3);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, 1.3)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg25.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Text Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg26.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - BLOB Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg27.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - valid
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo', 'title', 'abstract', 1, 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg3.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage(1.1, 'topo');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage(1.1, 'topo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg4.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage(zeroblob(4), 'topo');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage(zeroblob(4), 'topo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg5.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - NULL topology
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg6.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Int topology
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg7.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Double topology
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg8.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - BLOB topology
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertopogeocvg9.testcase.

1
2
3
4
5
6
7
RegisterTopoGeoCoverage - Text topology
:memory: #use in-memory database
SELECT SE_RegisterTopoGeoCoverage('alpha', 'topo');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoGeoCoverage('alpha', 'topo')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg1.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage(NULL, 'network');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage(NULL, 'network')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg10.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - NULL Title
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', NULL, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', NULL, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg11.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Int Title
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg12.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Double Title
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 1.1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 1.1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg13.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - BLOB Title
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', zeroblob(10), 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', zeroblob(10), 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg14.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - NULL Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg15.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Int Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg16.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Double Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 1.5);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg17.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - BLOB Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', zeroblob(5));
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', zeroblob(5))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg18.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Text Abstract
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg19.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - NULL Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', NULL, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', NULL, 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg2.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage(1, 'network');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage(1, 'network')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg20.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Double Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1.2, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1.2, 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg21.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Text Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 'yes', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 'yes', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg22.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - BLOB Queryable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', zeroblob(4), 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg23.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - NULL Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg24.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Double Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, 1.3);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, 1.3)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg25.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Text Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg26.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - BLOB Editable
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg27.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - valid
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network', 'title', 'abstract', 1, 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg3.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage(1.1, 'network');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage(1.1, 'network')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg4.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage(zeroblob(4), 'network');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage(zeroblob(4), 'network')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg5.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - NULL Network
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg6.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Int Network
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg7.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Double Network
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg8.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - BLOB Network
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registertoponetcvg9.testcase.

1
2
3
4
5
6
7
RegisterTopoNetCoverage - Text Network
:memory: #use in-memory database
SELECT SE_RegisterTopoNetCoverage('alpha', 'network');
1 # rows (not including the header row)
1 # columns
SE_RegisterTopoNetCoverage('alpha', 'network')
0
<
<
<
<
<
<
<














Changes to test/sql_stmt_libxml2_tests/registervectorcvg1.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(NULL, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(NULL, 'table', 'geom')
-1


|


|

1
2
3
4
5
6
7
RegisterVectorCoverage - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(NULL, 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(NULL, 'title', 'abstract')
-1

Changes to test/sql_stmt_libxml2_tests/registervectorcvg2.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(1, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(1, 'table', 'geom')
-1


|


|

1
2
3
4
5
6
7
RegisterVectorCoverage - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(1, 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(1, 'title', 'abstract')
-1

Deleted test/sql_stmt_libxml2_tests/registervectorcvg23.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - NULL is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 0);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg24.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - Text is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg25.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - BLOB is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg26.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - Double is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 1.0);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 1.0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg27.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - NULL is_editable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg28.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - Text is_editable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg29.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - BLOB is_editable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, zeroblob(10))
-1
<
<
<
<
<
<
<














Changes to test/sql_stmt_libxml2_tests/registervectorcvg3.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(1.1, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(1.1, 'table', 'geom')
-1


|


|

1
2
3
4
5
6
7
RegisterVectorCoverage - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(1.1, 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(1.1, 'title', 'abstract')
-1

Deleted test/sql_stmt_libxml2_tests/registervectorcvg30.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - Double is_editable
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1.0);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1.0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorcvg31.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - valid - ultralong form
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1)
0
<
<
<
<
<
<
<














Changes to test/sql_stmt_libxml2_tests/registervectorcvg4.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverage - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(zeroblob(4), 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(zeroblob(4), 'table', 'geom')
-1


|


|

1
2
3
4
5
6
7
RegisterVectorCoverage - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverage(zeroblob(4), 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverage(zeroblob(4), 'title', 'abstract')
-1

Deleted test/sql_stmt_libxml2_tests/registervectorkeyword1.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword(NULL, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword(NULL, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword2.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageSrid(1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageSrid(1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword3.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword(1.1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword(1.1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword4.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword(zeroblob(4), 'keyword');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword(zeroblob(4), 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword5.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - NULL keyword
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword('alpha', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword('alpha', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword6.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - Double keyword
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword('alpha', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword('alpha', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword7.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - Text keyword
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword('alpha', 'beta');
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword('alpha', 'beta')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword8.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - BLOB keyword
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword('alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervectorkeyword9.testcase.

1
2
3
4
5
6
7
RegisterVectorCoverageKeyword - Int keyword
:memory: #use in-memory database
SELECT SE_RegisterVectorCoverageKeyword('alpha', 4326);
1 # rows (not including the header row)
1 # columns
SE_RegisterVectorCoverageKeyword('alpha', 4326)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg1.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage(NULL, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage(NULL, 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg10.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Int f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg11.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg12.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg13.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - valid short form
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg14.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL title
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', NULL, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', NULL, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg15.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Int title
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg16.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double title
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 1.1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 1.1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg17.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB title
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', zeroblob(4), 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', zeroblob(4), 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg18.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL abstract
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg19.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Int abstract
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg2.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage(1, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage(1, 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg20.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double abstract
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg21.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB abstract
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg22.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - valid - long form
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg23.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL is_queryable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 0);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg24.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Text is_queryable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg25.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB is_queryable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg26.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double is_queryable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 1.0);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL, 1.0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg27.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL is_editable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg28.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Text is_editable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg29.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB is_editable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg3.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage(1.1, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage(1.1, 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg30.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double is_editable
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1.0);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1.0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg31.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - valid - ultralong form
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1, 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg4.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage(zeroblob(4), 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage(zeroblob(4), 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg5.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL f_table_name
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', NULL, 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', NULL, 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg6.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Int f_table_name
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 1, 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 1, 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg7.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - Double f_table_name
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 1.1, 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 1.1, 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg8.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - BLOB f_table_name
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', zeroblob(4), 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', zeroblob(4), 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registerviewcvg9.testcase.

1
2
3
4
5
6
7
RegisterSpatialViewCoverage - NULL f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterSpatialViewCoverage('alpha', 'table', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterSpatialViewCoverage('alpha', 'table', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg1.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - NULL coverage
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage(NULL, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage(NULL, 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg10.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Int f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg11.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Double f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg12.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - BLOB f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg13.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - valid short form
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg14.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - NULL title
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', NULL, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', NULL, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg15.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Int title
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg16.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Double title
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 1.1, 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 1.1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg17.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - BLOB title
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', zeroblob(4), 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', zeroblob(4), 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg18.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - NULL abstract
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg19.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Int abstract
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg2.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Int coverage
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage(1, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage(1, 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg20.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Double abstract
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 1.1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg21.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - BLOB abstract
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg22.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - valid - long form
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg23.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - NULL is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg24.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Text is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', 'no');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg25.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - BLOB is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg26.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Double is_queryable
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1.0);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1.0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg27.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - valid - ultralong form
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', 'geom', 'title', 'abstract', 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg3.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Double coverage
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage(1.1, 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage(1.1, 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg4.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - BLOB coverage
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage(zeroblob(4), 'table', 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage(zeroblob(4), 'table', 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg5.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - NULL f_table_name
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', NULL, 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', NULL, 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg6.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Int f_table_name
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 1, 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 1, 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg7.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - Double f_table_name
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 1.1, 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 1.1, 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg8.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - BLOB f_table_name
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', zeroblob(4), 'geom');
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', zeroblob(4), 'geom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/registervirtualcvg9.testcase.

1
2
3
4
5
6
7
RegisterVirtualShapeCoverage - NULL f_geometry_column
:memory: #use in-memory database
SELECT SE_RegisterVirtualShapeCoverage('alpha', 'table', NULL);
1 # rows (not including the header row)
1 # columns
SE_RegisterVirtualShapeCoverage('alpha', 'table', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright1.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - NULL coverage
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright(NULL, 'somebody');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright(NULL, 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright10.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - NULL License
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody', NULL);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright11.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Int License
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody', 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright12.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Double License
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody', 1.5);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright13.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - BLOB License
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody', zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright14.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Text License
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody', 'CC0 1.0');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody', 'CC0 1.0')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright15.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Text Copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright16.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Text License, NULL copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', NULL, 'CC0 1.0');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', NULL, 'CC0 1.0')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright2.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Int coverage
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright(1, 'somebody');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright(1, 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright3.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Double coverage
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright(1.5, 'somebody');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright(1.5, 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright4.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - BLOB coverage
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright(zeroblob(4), 'somebody');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright(zeroblob(4), 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright5.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - NULL Copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', NULL);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', NULL))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright6.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Int Copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright7.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Double Copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 1.5);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright8.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - Blob Copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorcopyright9.testcase.

1
2
3
4
5
6
7
SetVectorCoverageCopyright - valid Copyright
:memory: #use in-memory database
SELECT SE_SetVectorCoverageCopyright('coverage', 'somebody');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageCopyright('coverage', 'somebody')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos14.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - NULL is_queryable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', NULL, 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', NULL, 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos15.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - Text is_queryable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 'no', 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 'no', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos16.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - BLOB is_queryable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', zeroblob(10), 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', zeroblob(10), 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos17.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - Double is_queryable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1.0, 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1.0, 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos18.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - NULL is_editable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, NULL);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos19.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - Text is_editable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, 'no');
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, 'no')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos20.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - BLOB is_editable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, zeroblob(10));
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos21.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - Double is_editable
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, 1.0);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, 1.0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/setvectorinfos22.testcase.

1
2
3
4
5
6
7
SetVectorCoverageInfos - valid long format
:memory: #use in-memory database
SELECT SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, 1);
1 # rows (not including the header row)
1 # columns
SE_SetVectorCoverageInfos('alpha', 'title', 'abstract', 1, 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword1.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - NULL coverage
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword(NULL, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword(NULL, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword2.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - Int coverage
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword(1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword(1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword3.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - Double coverage
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword(1.1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword(1.1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword4.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - BLOB coverage
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword(zeroblob(4), 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword(zeroblob(4), 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword5.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - NULL keyword
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword('alpha', NULL);
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword('alpha', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword6.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - Double keyword
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword('alpha', 1.1);
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword('alpha', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword7.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - Text keyword
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword('alpha', 'beta');
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword('alpha', 'beta')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword8.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - BLOB keyword
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword('alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregisterrasterkeyword9.testcase.

1
2
3
4
5
6
7
UnregisterRasterCoverageKeyword - Int keyword
:memory: #use in-memory database
SELECT SE_UnregisterRasterCoverageKeyword('alpha', 4326);
1 # rows (not including the header row)
1 # columns
SE_UnregisterRasterCoverageKeyword('alpha', 4326)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword1.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - NULL coverage
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword(NULL, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword(NULL, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword2.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - Int coverage
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword(1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword(1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword3.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - Double coverage
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword(1.1, 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword(1.1, 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword4.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - BLOB coverage
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword(zeroblob(4), 'keyword');
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword(zeroblob(4), 'keyword')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword5.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - NULL keyword
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword('alpha', NULL);
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword('alpha', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword6.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - Double keyword
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword('alpha', 1.1);
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword('alpha', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword7.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - Text keyword
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword('alpha', 'beta');
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword('alpha', 'beta')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword8.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - BLOB keyword
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword('alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_libxml2_tests/unregistervectorkeyword9.testcase.

1
2
3
4
5
6
7
UnregisterVectorCoverageKeyword - Int keyword
:memory: #use in-memory database
SELECT SE_UnregisterVectorCoverageKeyword('alpha', 4326);
1 # rows (not including the header row)
1 # columns
SE_UnregisterVectorCoverageKeyword('alpha', 4326)
-1
<
<
<
<
<
<
<














Changes to test/sql_stmt_libxml2_tests/xmlblobgetgeometry4.testcase.

1
2
3
4
5
6
7
8
XB_GetGeometry - TEXT XmlDocument
:memory: #use in-memory database
SELECT XB_GetGeometry('alpha');
1 # rows (not including the header row)
1 # columns
XB_GetGeometry('alpha')
(NULL)

|

|


|


1
2
3
4
5
6
7
8
XB_GetGeometry - BLOB XmlDocument
:memory: #use in-memory database
SELECT XB_GetGeometry(zeroblob(100));
1 # rows (not including the header row)
1 # columns
XB_GetGeometry(zeroblob(100))
(NULL)

Changes to test/sql_stmt_libxml2_tests/xmlblobgetgeometry5.testcase.

1
2
3
4
5
6
7
8
XB_GetGeometry - invalid BLOB
:memory: #use in-memory database
SELECT XB_GetGeometry(zeroblob(100));
1 # rows (not including the header row)
1 # columns
XB_GetGeometry(zeroblob(100))
(NULL)

|







1
2
3
4
5
6
7
8
XB_GetGeometry - invalid XmlBLOB
:memory: #use in-memory database
SELECT XB_GetGeometry(zeroblob(100));
1 # rows (not including the header row)
1 # columns
XB_GetGeometry(zeroblob(100))
(NULL)

Deleted test/sql_stmt_libxml2_tests/xmlblobmlinegpx1.testcase.

1
2
3
4
5
6
7
8
XB_MLineFromGPX - NULL XmlDocument
:memory: #use in-memory database
SELECT XB_MLineFromGPX(NULL);
1 # rows (not including the header row)
1 # columns
XB_MLineFromGPX(NULL)
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/xmlblobmlinegpx2.testcase.

1
2
3
4
5
6
7
8
XB_MLineFromGPX - INTEGER XmlDocument
:memory: #use in-memory database
SELECT XB_MLineFromGPX(1);
1 # rows (not including the header row)
1 # columns
XB_MLineFromGPX(1)
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/xmlblobmlinegpx3.testcase.

1
2
3
4
5
6
7
8
XB_MLineFromGPX - DOUBLE XmlDocument
:memory: #use in-memory database
SELECT XB_MLineFromGPX(1.1);
1 # rows (not including the header row)
1 # columns
XB_MLineFromGPX(1.1)
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/xmlblobmlinegpx4.testcase.

1
2
3
4
5
6
7
8
XB_MLineFromGPX - invalid BLOB
:memory: #use in-memory database
SELECT XB_MLineFromGPX(zeroblob(100));
1 # rows (not including the header row)
1 # columns
XB_MLineFromGPX(zeroblob(100))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/xmlblobmlinegpx5.testcase.

1
2
3
4
5
6
7
8
XB_MLineFromGPX - valid XmlBLOB not a GPX
:memory: #use in-memory database
SELECT XB_MLineFromGPX(x'0001AB12000000120000000000BA0000CA0000DA0000DB0000DC0000DDCB3C613E3C623E746578743C2F623E3C2F613EBC49A10C93DD');
1 # rows (not including the header row)
1 # columns
XB_MLineFromGPX(x'0001AB12000000120000000000BA0000CA0000DA0000DB0000DC0000DDCB3C613E3C623E746578743C2F623E3C2F613EBC49A10C93DD')
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_libxml2_tests/xmlblobmlinegpx6.testcase.

1
2
3
4
5
6
7
8
XB_MLineFromGPX - TEXT XmlDocument
:memory: #use in-memory database
SELECT XB_MLineFromGPX('alpha');
1 # rows (not including the header row)
1 # columns
XB_MLineFromGPX('alpha')
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_logfile_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11

EXTRA_DIST = sp_setlogfile1.testcase \
	sp_setlogfile2.testcase \
	sp_setlogfile3.testcase \
	sp_setlogfile4.testcase \
	sp_setlogfile5.testcase \
	sp_setlogfile6.testcase \
	sp_setlogfile7.testcase \
	sp_setlogfile8.testcase \
	sp_setlogfile9.testcase \
	sp_setlogfile10.testcase
<
<
<
<
<
<
<
<
<
<
<






















Deleted test/sql_stmt_logfile_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_logfile_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = sp_setlogfile1.testcase \
	sp_setlogfile2.testcase \
	sp_setlogfile3.testcase \
	sp_setlogfile4.testcase \
	sp_setlogfile5.testcase \
	sp_setlogfile6.testcase \
	sp_setlogfile7.testcase \
	sp_setlogfile8.testcase \
	sp_setlogfile9.testcase \
	sp_setlogfile10.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_logfile_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_logfile_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_logfile_tests/sp_setlogfile1.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - Int filepath
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(1);
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(1)
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile10.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - Int append
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(NULL, 1);
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(NULL, 1)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile2.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - Double filepath
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(1.5);
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(1.5)
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile3.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - BLOB filepath
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(zeroblob(10))
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile4.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - Text filepath
:memory: #use in-memory database
SELECT SqlProc_SetLogfile('./sql_logfile');
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile('./sql_logfile')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile5.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - NULL filepath
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile6.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - NULL append
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(NULL, NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(NULL, NULL)
SqlProc exception - illegal Append Mode argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile7.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - Double append
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(NULL, 1.5);
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(NULL, 1.5)
SqlProc exception - illegal Append Mode argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile8.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - Text append
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(NULL, 'yes');
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(NULL, 'yes')
SqlProc exception - illegal Append Mode argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_logfile_tests/sp_setlogfile9.testcase.

1
2
3
4
5
6
7
SqlProc_SetLogfile - BLOB append
:memory: #use in-memory database
SELECT SqlProc_SetLogfile(NULL, zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_SetLogfile(NULL, zeroblob(10))
SqlProc exception - illegal Append Mode argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_20_tests/Makefile.am.

1
2
3
4
5

EXTRA_DIST = st_asx3d25.testcase \
	st_asx3d26.testcase \
	st_asx3d30.testcase \
	st_split8.testcase
<
<
<
<
<










Deleted test/sql_stmt_lwgeom_20_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_lwgeom_20_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = st_asx3d25.testcase \
	st_asx3d26.testcase \
	st_asx3d30.testcase \
	st_split8.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_lwgeom_20_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_lwgeom_20_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_lwgeom_20_tests/st_asx3d25.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 3D linestring, 6 digit precision, short SRS
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 0);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 0)
<Shape>15.123457 14.765432 7.654321<Shape><LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet>
# <MultiGeometry srsName="epsg:4326"><geometryMember>15.123457 14.765432 7.654321</geometryMember><geometryMember><LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet></geometryMember></MultiGeometry>:0
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_lwgeom_20_tests/st_asx3d26.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 3D linestring, 6 digit precision, long SRS
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1)
<Shape>14.765432 15.123457 7.654321<Shape><LineSet  vertexCount='3'><Coordinate point='10.987654 10.123457 101.123 10 11 102 11.12 11.321 103.645313' /></LineSet>
# <MultiGeometry srsName="urn:ogc:def:crs:epsg::4326"><geometryMember>15.123457 14.765432 7.654321</geometryMember><geometryMember><LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet></geometryMember></MultiGeometry>:0
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_lwgeom_20_tests/st_asx3d30.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 'test_');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 'test_')
<Shapetest_>14.765432 15.123457 7.654321<Shapetest_><LineSet test_ vertexCount='3'><Coordinate point='10.987654 10.123457 101.123 10 11 102 11.12 11.321 103.645313' /></LineSet>
# <test_MultiGeometry srsName="urn:ogc:def:crs:epsg::4326"><test_geometryMember>15.123457 14.765432 7.654321</test_geometryMember><test_geometryMember><LineSet test_ vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet></test_geometryMember></test_MultiGeometry>:0
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_lwgeom_20_tests/st_split8.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Multiline (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019

EXTRA_DIST = addedgemodface1.testcase \
	addedgemodface2.testcase \
	addedgemodface3.testcase \
	addedgemodface4.testcase \
	addedgemodface5.testcase \
	addedgemodface6.testcase \
	addedgemodface7.testcase \
	addedgemodface8.testcase \
	addedgemodface9.testcase \
	addedgemodface10.testcase \
	addedgemodface11.testcase \
	addedgemodface12.testcase \
	addedgemodface13.testcase \
	addedgemodface14.testcase \
	addedgemodface15.testcase \
	addedgemodface16.testcase \
	addedgemodface17.testcase \
	addedgemodface18.testcase \
	addedgemodface19.testcase \
	addedgemodface20.testcase \
	addedgenewfaces1.testcase \
	addedgenewfaces2.testcase \
	addedgenewfaces3.testcase \
	addedgenewfaces4.testcase \
	addedgenewfaces5.testcase \
	addedgenewfaces6.testcase \
	addedgenewfaces7.testcase \
	addedgenewfaces8.testcase \
	addedgenewfaces9.testcase \
	addedgenewfaces10.testcase \
	addedgenewfaces11.testcase \
	addedgenewfaces12.testcase \
	addedgenewfaces13.testcase \
	addedgenewfaces14.testcase \
	addedgenewfaces15.testcase \
	addedgenewfaces16.testcase \
	addedgenewfaces17.testcase \
	addedgenewfaces18.testcase \
	addedgenewfaces19.testcase \
	addedgenewfaces20.testcase \
	addisoedge1.testcase \
	addisoedge2.testcase \
	addisoedge3.testcase \
	addisoedge4.testcase \
	addisoedge5.testcase \
	addisoedge6.testcase \
	addisoedge7.testcase \
	addisoedge8.testcase \
	addisoedge9.testcase \
	addisoedge10.testcase \
	addisoedge11.testcase \
	addisoedge12.testcase \
	addisoedge13.testcase \
	addisoedge14.testcase \
	addisoedge15.testcase \
	addisoedge16.testcase \
	addisoedge17.testcase \
	addisoedge18.testcase \
	addisoedge19.testcase \
	addisoedge20.testcase \
	addisonetnode1.testcase \
	addisonetnode2.testcase \
	addisonetnode3.testcase \
	addisonetnode4.testcase \
	addisonetnode5.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addlink1.testcase \
	addlink2.testcase \
	addlink3.testcase \
	addlink4.testcase \
	addlink5.testcase \
	addlink6.testcase \
	addlink7.testcase \
	addlink8.testcase \
	addlink9.testcase \
	addlink10.testcase \
	addlink11.testcase \
	addlink12.testcase \
	addlink13.testcase \
	changeedgegeom1.testcase \
	changeedgegeom2.testcase \
	changeedgegeom3.testcase \
	changeedgegeom4.testcase \
	changeedgegeom5.testcase \
	changeedgegeom6.testcase \
	changeedgegeom7.testcase \
	changeedgegeom8.testcase \
	changeedgegeom9.testcase \
	changeedgegeom10.testcase \
	changeedgegeom11.testcase \
	changeedgegeom12.testcase \
	changeedgegeom13.testcase \
	changeedgegeom14.testcase \
	changeedgegeom15.testcase \
	changeedgegeom16.testcase \
	changeedgegeom17.testcase \
	changelinkgeom1.testcase \
	changelinkgeom2.testcase \
	changelinkgeom3.testcase \
	changelinkgeom4.testcase \
	changelinkgeom5.testcase \
	changelinkgeom6.testcase \
	changelinkgeom7.testcase \
	changelinkgeom8.testcase \
	createtopogeo1.testcase \
	createtopogeo2.testcase \
	createtopogeo3.testcase \
	createtopogeo4.testcase \
	createtopogeo5.testcase \
	createtopogeo6.testcase \
	createtopogeo7.testcase \
	createtopogeo8.testcase \
	createtopogeo9.testcase \
	createtopogeo10.testcase \
	createtopolayer1.testcase \
	createtopolayer2.testcase \
	createtopolayer3.testcase \
	createtopolayer4.testcase \
	createtopolayer5.testcase \
	createtopolayer6.testcase \
	createtopolayer7.testcase \
	createtopolayer8.testcase \
	createtopolayer9.testcase \
	createtopolayer10.testcase \
	createtopolayer11.testcase \
	createtopolayer12.testcase \
	createtopolayer13.testcase \
	createtopolayer14.testcase \
	createtopolayer15.testcase \
	createtopolayer16.testcase \
	createtopolayer17.testcase \
	createtopolayer18.testcase \
	createtopolayer19.testcase \
	createtopolayer20.testcase \
	createtopolayer21.testcase \
	createtopolayer22.testcase \
	createtopolayer23.testcase \
	createtopolayer24.testcase \
	createtopolayer25.testcase \
	createtopolayer26.testcase \
	createtopology1.testcase \
	createtopology2.testcase \
	createtopology3.testcase \
	createtopology4.testcase \
	createtopology5.testcase \
	createtopology6.testcase \
	createtopology7.testcase \
	createtopology8.testcase \
	createtopology9.testcase \
	createtopology10.testcase \
	createtopology11.testcase \
	createtopology12.testcase \
	createtopology13.testcase \
	createtopology14.testcase \
	createtopology15.testcase \
	createtopology16.testcase \
	createtopology17.testcase \
	createtopology18.testcase \
	createtopology19.testcase \
	createtopology20.testcase \
	createnetwork1.testcase \
	createnetwork2.testcase \
	createnetwork3.testcase \
	createnetwork4.testcase \
	createnetwork5.testcase \
	createnetwork6.testcase \
	createnetwork7.testcase \
	createnetwork8.testcase \
	createnetwork9.testcase \
	createnetwork10.testcase \
	createnetwork11.testcase \
	createnetwork12.testcase \
	createnetwork13.testcase \
	createnetwork14.testcase \
	createnetwork15.testcase \
	createnetwork16.testcase \
	createnetwork17.testcase \
	createnetwork18.testcase \
	createnetwork19.testcase \
	createnetwork20.testcase \
	createnetwork21.testcase \
	createnetwork22.testcase \
	createnetwork23.testcase \
	createnetwork24.testcase \
	createnetwork25.testcase \
	droptopology1.testcase \
	droptopology2.testcase \
	droptopology3.testcase \
	droptopology4.testcase \
	droptopology5.testcase \
	dropnetwork1.testcase \
	dropnetwork2.testcase \
	dropnetwork3.testcase \
	dropnetwork4.testcase \
	dropnetwork5.testcase \
	exporttopolayer1.testcase \
	exporttopolayer2.testcase \
	exporttopolayer3.testcase \
	exporttopolayer4.testcase \
	exporttopolayer5.testcase \
	exporttopolayer6.testcase \
	exporttopolayer7.testcase \
	exporttopolayer8.testcase \
	exporttopolayer9.testcase \
	exporttopolayer10.testcase \
	exporttopolayer11.testcase \
	exporttopolayer12.testcase \
	exporttopolayer13.testcase \
	exporttopolayer14.testcase \
	exporttopolayer15.testcase \
	exporttopolayer16.testcase \
	exporttopolayer17.testcase \
	exporttopolayer18.testcase \
	exporttopolayer19.testcase \
	exporttopolayer20.testcase \
	exporttopolayer21.testcase \
	exporttopolayer22.testcase \
	exporttopolayer23.testcase \
	featuretopolayer1.testcase \
	featuretopolayer2.testcase \
	featuretopolayer3.testcase \
	featuretopolayer4.testcase \
	featuretopolayer5.testcase \
	featuretopolayer6.testcase \
	featuretopolayer7.testcase \
	featuretopolayer8.testcase \
	featuretopolayer9.testcase \
	featuretopolayer10.testcase \
	featuretopolayer11.testcase \
	featuretopolayer12.testcase \
	featuretopolayer13.testcase \
	featuretopolayer14.testcase \
	featuretopolayer15.testcase \
	featuretopolayer16.testcase \
	featuretopolayer17.testcase \
	getedgeseed1.testcase \
	getedgeseed2.testcase \
	getedgeseed3.testcase \
	getedgeseed4.testcase \
	getedgeseed5.testcase \
	getedgeseed6.testcase \
	getedgeseed7.testcase \
	getedgeseed8.testcase \
	getedgeseed9.testcase \
	getlinkseed1.testcase \
	getlinkseed2.testcase \
	getlinkseed3.testcase \
	getlinkseed4.testcase \
	getlinkseed5.testcase \
	getlinkseed6.testcase \
	getlinkseed7.testcase \
	getlinkseed8.testcase \
	getlinkseed9.testcase \
	getfaceedges1.testcase \
	getfaceedges2.testcase \
	getfaceedges3.testcase \
	getfaceedges4.testcase \
	getfaceedges5.testcase \
	getfaceedges6.testcase \
	getfaceedges7.testcase \
	getfaceedges8.testcase \
	getfaceedges9.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getedgebypoint1.testcase \
	getedgebypoint2.testcase \
	getedgebypoint3.testcase \
	getedgebypoint4.testcase \
	getedgebypoint5.testcase \
	getedgebypoint6.testcase \
	getedgebypoint7.testcase \
	getedgebypoint8.testcase \
	getedgebypoint9.testcase \
	getedgebypoint10.testcase \
	getedgebypoint11.testcase \
	getedgebypoint12.testcase \
	getedgebypoint13.testcase \
	getedgebypoint14.testcase \
	getedgebypoint15.testcase \
	getedgebypoint16.testcase \
	getedgebypoint17.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getfacebypoint1.testcase \
	getfacebypoint2.testcase \
	getfacebypoint3.testcase \
	getfacebypoint4.testcase \
	getfacebypoint5.testcase \
	getfacebypoint6.testcase \
	getfacebypoint7.testcase \
	getfacebypoint8.testcase \
	getfacebypoint9.testcase \
	getfacebypoint10.testcase \
	getfacebypoint11.testcase \
	getfacebypoint12.testcase \
	getfacebypoint13.testcase \
	getfacebypoint14.testcase \
	getfacebypoint15.testcase \
	getfacebypoint16.testcase \
	getfacebypoint17.testcase \
	getfaceseed1.testcase \
	getfaceseed2.testcase \
	getfaceseed3.testcase \
	getfaceseed4.testcase \
	getfaceseed5.testcase \
	getfaceseed6.testcase \
	getfaceseed7.testcase \
	getfaceseed8.testcase \
	getfaceseed9.testcase \
	getlinkbypoint1.testcase \
	getlinkbypoint2.testcase \
	getlinkbypoint3.testcase \
	getlinkbypoint4.testcase \
	getlinkbypoint5.testcase \
	getlinkbypoint6.testcase \
	getlinkbypoint7.testcase \
	getlinkbypoint8.testcase \
	getlinkbypoint9.testcase \
	getlinkbypoint10.testcase \
	getlinkbypoint11.testcase \
	getlinkbypoint12.testcase \
	getlinkbypoint13.testcase \
	getlinkbypoint14.testcase \
	getlinkbypoint15.testcase \
	getlinkbypoint16.testcase \
	getlinkbypoint17.testcase \
	getnetnodebypoint1.testcase \
	getnetnodebypoint2.testcase \
	getnetnodebypoint3.testcase \
	getnetnodebypoint4.testcase \
	getnetnodebypoint5.testcase \
	getnetnodebypoint6.testcase \
	getnetnodebypoint7.testcase \
	getnetnodebypoint8.testcase \
	getnetnodebypoint9.testcase \
	getnetnodebypoint10.testcase \
	getnetnodebypoint11.testcase \
	getnetnodebypoint12.testcase \
	getnetnodebypoint13.testcase \
	getnetnodebypoint14.testcase \
	getnetnodebypoint15.testcase \
	getnetnodebypoint16.testcase \
	getnetnodebypoint17.testcase \
	getnodebypoint1.testcase \
	getnodebypoint2.testcase \
	getnodebypoint3.testcase \
	getnodebypoint4.testcase \
	getnodebypoint5.testcase \
	getnodebypoint6.testcase \
	getnodebypoint7.testcase \
	getnodebypoint8.testcase \
	getnodebypoint9.testcase \
	getnodebypoint10.testcase \
	getnodebypoint11.testcase \
	getnodebypoint12.testcase \
	getnodebypoint13.testcase \
	getnodebypoint14.testcase \
	getnodebypoint15.testcase \
	getnodebypoint16.testcase \
	getnodebypoint17.testcase \
	inittopolayer1.testcase \
	inittopolayer2.testcase \
	inittopolayer3.testcase \
	inittopolayer4.testcase \
	inittopolayer5.testcase \
	inittopolayer6.testcase \
	inittopolayer7.testcase \
	inittopolayer8.testcase \
	inittopolayer9.testcase \
	inittopolayer10.testcase \
	inittopolayer11.testcase \
	inittopolayer12.testcase \
	inittopolayer13.testcase \
	inittopolayer14.testcase \
	inittopolayer15.testcase \
	inittopolayer16.testcase \
	inittopolayer17.testcase \
	linesnapseed1.testcase \
	linesnapseed2.testcase \
	linesnapseed3.testcase \
	linesnapseed4.testcase \
	linesnapseed5.testcase \
	linesnapseed6.testcase \
	linesnapseed7.testcase \
	linesnapseed8.testcase \
	linesnapseed9.testcase \
	linesnapseed10.testcase \
	linesnapseed11.testcase \
	linesnapseed12.testcase \
	linesnapseed13.testcase \
	linesnapseed14.testcase \
	linesnapseed15.testcase \
	linesnapseed16.testcase \
	linesnapseed17.testcase \
	loginetfromtgeo1.testcase \
	loginetfromtgeo2.testcase \
	loginetfromtgeo3.testcase \
	loginetfromtgeo4.testcase \
	loginetfromtgeo5.testcase \
	loginetfromtgeo6.testcase \
	loginetfromtgeo7.testcase \
	loginetfromtgeo8.testcase \
	loginetfromtgeo9.testcase \
	modedgeheal1.testcase \
	modedgeheal2.testcase \
	modedgeheal3.testcase \
	modedgeheal4.testcase \
	modedgeheal5.testcase \
	modedgeheal6.testcase \
	modedgeheal7.testcase \
	modedgeheal8.testcase \
	modedgeheal9.testcase \
	modedgeheal10.testcase \
	modedgeheal11.testcase \
	modedgeheal12.testcase \
	modedgeheal13.testcase \
	modedgesplit1.testcase \
	modedgesplit2.testcase \
	modedgesplit3.testcase \
	modedgesplit4.testcase \
	modedgesplit5.testcase \
	modedgesplit6.testcase \
	modedgesplit7.testcase \
	modedgesplit8.testcase \
	modedgesplit9.testcase \
	modedgesplit10.testcase \
	modedgesplit11.testcase \
	modedgesplit12.testcase \
	modedgesplit13.testcase \
	modedgesplit14.testcase \
	modedgesplit15.testcase \
	modedgesplit16.testcase \
	modgeolinksplit1.testcase \
	modgeolinksplit2.testcase \
	modgeolinksplit3.testcase \
	modgeolinksplit4.testcase \
	modgeolinksplit5.testcase \
	modgeolinksplit6.testcase \
	modgeolinksplit7.testcase \
	modgeolinksplit8.testcase \
	modgeolinksplit9.testcase \
	modlinkheal1.testcase \
	modlinkheal2.testcase \
	modlinkheal3.testcase \
	modlinkheal4.testcase \
	modlinkheal5.testcase \
	modlinkheal6.testcase \
	modlinkheal7.testcase \
	modlinkheal8.testcase \
	modlinkheal9.testcase \
	modlinkheal10.testcase \
	modlinkheal11.testcase \
	modlinkheal12.testcase \
	modlinkheal13.testcase \
	modloglinksplit1.testcase \
	modloglinksplit2.testcase \
	modloglinksplit3.testcase \
	modloglinksplit4.testcase \
	modloglinksplit5.testcase \
	modloglinksplit6.testcase \
	modloglinksplit7.testcase \
	modloglinksplit8.testcase \
	modloglinksplit9.testcase \
	moveisonetnode1.testcase \
	moveisonetnode2.testcase \
	moveisonetnode3.testcase \
	moveisonetnode4.testcase \
	moveisonetnode5.testcase \
	moveisonetnode6.testcase \
	moveisonetnode7.testcase \
	moveisonetnode8.testcase \
	moveisonetnode9.testcase \
	moveisonode1.testcase \
	moveisonode2.testcase \
	moveisonode3.testcase \
	moveisonode4.testcase \
	moveisonode5.testcase \
	moveisonode6.testcase \
	moveisonode7.testcase \
	moveisonode8.testcase \
	moveisonode9.testcase \
	moveisonode10.testcase \
	moveisonode11.testcase \
	moveisonode12.testcase \
	moveisonode13.testcase \
	moveisonode14.testcase \
	moveisonode15.testcase \
	moveisonode16.testcase \
	moveisonode17.testcase \
	netexception1.testcase \
	netexception2.testcase \
	newedgeheal1.testcase \
	newedgeheal2.testcase \
	newedgeheal3.testcase \
	newedgeheal4.testcase \
	newedgeheal5.testcase \
	newedgeheal6.testcase \
	newedgeheal7.testcase \
	newedgeheal8.testcase \
	newedgeheal9.testcase \
	newedgeheal10.testcase \
	newedgeheal11.testcase \
	newedgeheal12.testcase \
	newedgeheal13.testcase \
	newedgessplit1.testcase \
	newedgessplit2.testcase \
	newedgessplit3.testcase \
	newedgessplit4.testcase \
	newedgessplit5.testcase \
	newedgessplit6.testcase \
	newedgessplit7.testcase \
	newedgessplit8.testcase \
	newedgessplit9.testcase \
	newedgessplit10.testcase \
	newedgessplit11.testcase \
	newedgessplit12.testcase \
	newedgessplit13.testcase \
	newedgessplit14.testcase \
	newedgessplit15.testcase \
	newedgessplit16.testcase \
	newgeolinksplit1.testcase \
	newgeolinksplit2.testcase \
	newgeolinksplit3.testcase \
	newgeolinksplit4.testcase \
	newgeolinksplit5.testcase \
	newgeolinksplit6.testcase \
	newgeolinksplit7.testcase \
	newgeolinksplit8.testcase \
	newgeolinksplit9.testcase \
	newlinkheal1.testcase \
	newlinkheal2.testcase \
	newlinkheal3.testcase \
	newlinkheal4.testcase \
	newlinkheal5.testcase \
	newlinkheal6.testcase \
	newlinkheal7.testcase \
	newlinkheal8.testcase \
	newlinkheal9.testcase \
	newlinkheal10.testcase \
	newlinkheal11.testcase \
	newlinkheal12.testcase \
	newlinkheal13.testcase \
	newloglinksplit1.testcase \
	newloglinksplit2.testcase \
	newloglinksplit3.testcase \
	newloglinksplit4.testcase \
	newloglinksplit5.testcase \
	newloglinksplit6.testcase \
	newloglinksplit7.testcase \
	newloglinksplit8.testcase \
	newloglinksplit9.testcase \
	pointsnapseed1.testcase \
	pointsnapseed2.testcase \
	pointsnapseed3.testcase \
	pointsnapseed4.testcase \
	pointsnapseed5.testcase \
	pointsnapseed6.testcase \
	pointsnapseed7.testcase \
	pointsnapseed8.testcase \
	pointsnapseed9.testcase \
	pointsnapseed10.testcase \
	pointsnapseed11.testcase \
	pointsnapseed12.testcase \
	pointsnapseed13.testcase \
	pointsnapseed14.testcase \
	pointsnapseed15.testcase \
	pointsnapseed16.testcase \
	pointsnapseed17.testcase \
	remedgemodface1.testcase \
	remedgemodface2.testcase \
	remedgemodface3.testcase \
	remedgemodface4.testcase \
	remedgemodface5.testcase \
	remedgemodface6.testcase \
	remedgemodface7.testcase \
	remedgemodface8.testcase \
	remedgemodface9.testcase \
	remedgenewface1.testcase \
	remedgenewface2.testcase \
	remedgenewface3.testcase \
	remedgenewface4.testcase \
	remedgenewface5.testcase \
	remedgenewface6.testcase \
	remedgenewface7.testcase \
	remedgenewface8.testcase \
	remedgenewface9.testcase \
	remisoedge1.testcase \
	remisoedge2.testcase \
	remisoedge3.testcase \
	remisoedge4.testcase \
	remisoedge5.testcase \
	remisoedge6.testcase \
	remisoedge7.testcase \
	remisoedge8.testcase \
	remisoedge9.testcase \
	remisonode1.testcase \
	remisonode2.testcase \
	remisonode3.testcase \
	remisonode4.testcase \
	remisonode5.testcase \
	remisonode6.testcase \
	remisonode7.testcase \
	remisonode8.testcase \
	remisonode9.testcase \
	remisonetnode1.testcase \
	remisonetnode2.testcase \
	remisonetnode3.testcase \
	remisonetnode4.testcase \
	remisonetnode5.testcase \
	remisonetnode6.testcase \
	remisonetnode7.testcase \
	remisonetnode8.testcase \
	remisonetnode9.testcase \
	remlink1.testcase \
	remlink2.testcase \
	remlink3.testcase \
	remlink4.testcase \
	remlink5.testcase \
	remlink6.testcase \
	remlink7.testcase \
	remlink8.testcase \
	remlink9.testcase \
	removetopolayer1.testcase \
	removetopolayer2.testcase \
	removetopolayer3.testcase \
	removetopolayer4.testcase \
	removetopolayer5.testcase \
	removetopolayer6.testcase \
	removetopolayer7.testcase \
	removetopolayer8.testcase \
	removetopolayer9.testcase \
	spatnetfromtgeo1.testcase \
	spatnetfromtgeo2.testcase \
	spatnetfromtgeo3.testcase \
	spatnetfromtgeo4.testcase \
	spatnetfromtgeo5.testcase \
	spatnetfromtgeo6.testcase \
	spatnetfromtgeo7.testcase \
	spatnetfromtgeo8.testcase \
	spatnetfromtgeo9.testcase \
	spatnetfromgeom1.testcase \
	spatnetfromgeom2.testcase \
	spatnetfromgeom3.testcase \
	spatnetfromgeom4.testcase \
	spatnetfromgeom5.testcase \
	spatnetfromgeom6.testcase \
	spatnetfromgeom7.testcase \
	spatnetfromgeom8.testcase \
	spatnetfromgeom9.testcase \
	spatnetfromgeom10.testcase \
	topoexception1.testcase \
	topoexception2.testcase \
	topogeoaddpoint1.testcase \
	topogeoaddpoint2.testcase \
	topogeoaddpoint3.testcase \
	topogeoaddpoint4.testcase \
	topogeoaddpoint5.testcase \
	topogeoaddpoint6.testcase \
	topogeoaddpoint7.testcase \
	topogeoaddpoint8.testcase \
	topogeoaddpoint9.testcase \
	topogeoaddpoint10.testcase \
	topogeoaddpoint11.testcase \
	topogeoaddpoint12.testcase \
	topogeoaddpoint13.testcase \
	topogeoaddpoint14.testcase \
	topogeoaddpoint15.testcase \
	topogeoaddpoint16.testcase \
	topogeoaddpoint17.testcase \
	topogeoaddline1.testcase \
	topogeoaddline2.testcase \
	topogeoaddline3.testcase \
	topogeoaddline4.testcase \
	topogeoaddline5.testcase \
	topogeoaddline6.testcase \
	topogeoaddline7.testcase \
	topogeoaddline8.testcase \
	topogeoaddline9.testcase \
	topogeoaddline10.testcase \
	topogeoaddline11.testcase \
	topogeoaddline12.testcase \
	topogeoaddline13.testcase \
	topogeoaddline14.testcase \
	topogeoaddline15.testcase \
	topogeoaddline16.testcase \
	topogeoaddline17.testcase \
	topogeoclone1.testcase \
	topogeoclone2.testcase \
	topogeoclone3.testcase \
	topogeoclone4.testcase \
	topogeoclone5.testcase \
	topogeoclone6.testcase \
	topogeoclone7.testcase \
	topogeoclone8.testcase \
	topogeoclone9.testcase \
	topogeoclone10.testcase \
	topogeoclone11.testcase \
	topogeoclone12.testcase \
	topogeofromext1.testcase \
	topogeofromext2.testcase \
	topogeofromext3.testcase \
	topogeofromext4.testcase \
	topogeofromext5.testcase \
	topogeofromext6.testcase \
	topogeofromext7.testcase \
	topogeofromext8.testcase \
	topogeofromext9.testcase \
	topogeofromext10.testcase \
	topogeofromext11.testcase \
	topogeofromext12.testcase \
	topogeofromext13.testcase \
	topogeofromext14.testcase \
	topogeofromext15.testcase \
	topogeofromext16.testcase \
	topogeofromext17.testcase \
	topogeofromext18.testcase \
	topogeofromext19.testcase \
	topogeofromext20.testcase \
	topogeofromext21.testcase \
	topogeofromext22.testcase \
	topogeofromext23.testcase \
	topogeofromext24.testcase \
	topogeofromext25.testcase \
	topogeofromext26.testcase \
	topogeofromext27.testcase \
	topogeofromext28.testcase \
	topogeofromext29.testcase \
	topogeofromext30.testcase \
	topogeofromext31.testcase \
	topogeofromext32.testcase \
	topogeofromext33.testcase \
	topogeofromext34.testcase \
	topogeofromext35.testcase \
	topogeofromext36.testcase \
	topogeofromext37.testcase \
	topogeofromext38.testcase \
	topogeofromext39.testcase \
	topogeofromtable1.testcase \
	topogeofromtable2.testcase \
	topogeofromtable3.testcase \
	topogeofromtable4.testcase \
	topogeofromtable5.testcase \
	topogeofromtable6.testcase \
	topogeofromtable7.testcase \
	topogeofromtable8.testcase \
	topogeofromtable9.testcase \
	topogeofromtable10.testcase \
	topogeofromtable11.testcase \
	topogeofromtable12.testcase \
	topogeofromtable13.testcase \
	topogeofromtable14.testcase \
	topogeofromtable15.testcase \
	topogeofromtable16.testcase \
	topogeofromtable17.testcase \
	topogeofromtable18.testcase \
	topogeofromtable19.testcase \
	topogeofromtable20.testcase \
	topogeofromtable21.testcase \
	topogeofromtable22.testcase \
	topogeofromtable23.testcase \
	topogeofromtable24.testcase \
	topogeofromtable25.testcase \
	topogeofromtable26.testcase \
	topogeofromtable27.testcase \
	topogeofromtable28.testcase \
	topogeofromtable29.testcase \
	topogeofromtable30.testcase \
	topogeosplitline1.testcase \
	topogeosplitline2.testcase \
	topogeosplitline3.testcase \
	topogeosplitline4.testcase \
	topogeosplitline5.testcase \
	topogeosplitline6.testcase \
	topogeosplitline7.testcase \
	topogeosplitline8.testcase \
	topogeosplitline9.testcase \
	topogeosplitline10.testcase \
	topogeosplitline11.testcase \
	topogeosplitline12.testcase \
	topogeosplitline13.testcase \
	topogeosplitline14.testcase \
	topogeosplitline15.testcase \
	topogeosplitline16.testcase \
	topogeoremovesmall1.testcase \
	topogeoremovesmall2.testcase \
	topogeoremovesmall3.testcase \
	topogeoremovesmall4.testcase \
	topogeoremovesmall5.testcase \
	topogeoremovesmall6.testcase \
	topogeoremovesmall7.testcase \
	topogeoremovesmall8.testcase \
	topogeoremovesmall9.testcase \
	topogeoremoveedges1.testcase \
	topogeoremoveedges2.testcase \
	topogeoremoveedges3.testcase \
	topogeoremoveedges4.testcase \
	topogeoremoveedges5.testcase \
	topogeoremovenodes1.testcase \
	topogeoremovenodes2.testcase \
	topogeoremovenodes3.testcase \
	topogeoremovenodes4.testcase \
	topogeoremovenodes5.testcase \
	topogeototable1.testcase \
	topogeototable2.testcase \
	topogeototable3.testcase \
	topogeototable4.testcase \
	topogeototable5.testcase \
	topogeototable6.testcase \
	topogeototable7.testcase \
	topogeototable8.testcase \
	topogeototable9.testcase \
	topogeototable10.testcase \
	topogeototable11.testcase \
	topogeototable12.testcase \
	topogeototable13.testcase \
	topogeototable14.testcase \
	topogeototable15.testcase \
	topogeototable16.testcase \
	topogeototable17.testcase \
	topogeototable18.testcase \
	topogeototable19.testcase \
	topogeototable20.testcase \
	topogeototable21.testcase \
	topogeototable22.testcase \
	topogeototable23.testcase \
	topogeototable24.testcase \
	topogeototable25.testcase \
	topogeototable26.testcase \
	topogeototablegen1.testcase \
	topogeototablegen2.testcase \
	topogeototablegen3.testcase \
	topogeototablegen4.testcase \
	topogeototablegen5.testcase \
	topogeototablegen6.testcase \
	topogeototablegen7.testcase \
	topogeototablegen8.testcase \
	topogeototablegen9.testcase \
	topogeototablegen10.testcase \
	topogeototablegen11.testcase \
	topogeototablegen12.testcase \
	topogeototablegen13.testcase \
	topogeototablegen14.testcase \
	topogeototablegen15.testcase \
	topogeototablegen16.testcase \
	topogeototablegen17.testcase \
	topogeototablegen18.testcase \
	topogeototablegen19.testcase \
	topogeototablegen20.testcase \
	topogeototablegen21.testcase \
	topogeototablegen22.testcase \
	topogeototablegen23.testcase \
	topogeototablegen24.testcase \
	topogeototablegen25.testcase \
	topogeototablegen26.testcase \
	topogeototablegen27.testcase \
	topogeototablegen28.testcase \
	topogeototablegen29.testcase \
	topogeototablegen30.testcase \
	topogeototablegen31.testcase \
	topogeoupdateseeds1.testcase \
	topogeoupdateseeds2.testcase \
	topogeoupdateseeds3.testcase \
	topogeoupdateseeds4.testcase \
	topogeoupdateseeds5.testcase \
	topogeoupdateseeds6.testcase \
	topogeoupdateseeds7.testcase \
	topogeoupdateseeds8.testcase \
	topogeoupdateseeds9.testcase \
	topogeoupdateseeds10.testcase \
	toponetclone1.testcase \
	toponetclone2.testcase \
	toponetclone3.testcase \
	toponetclone4.testcase \
	toponetclone5.testcase \
	toponetclone6.testcase \
	toponetclone7.testcase \
	toponetclone8.testcase \
	toponetclone9.testcase \
	toponetclone10.testcase \
	toponetclone11.testcase \
	toponetclone12.testcase \
	toponetfromtable1.testcase \
	toponetfromtable2.testcase \
	toponetfromtable3.testcase \
	toponetfromtable4.testcase \
	toponetfromtable5.testcase \
	toponetfromtable6.testcase \
	toponetfromtable7.testcase \
	toponetfromtable8.testcase \
	toponetfromtable9.testcase \
	toponetfromtable10.testcase \
	toponetfromtable11.testcase \
	toponetfromtable12.testcase \
	toponetfromtable13.testcase \
	toponetfromtable14.testcase \
	toponetfromtable15.testcase \
	toponetfromtable16.testcase \
	toponetfromtable17.testcase \
	toponettotable1.testcase \
	toponettotable2.testcase \
	toponettotable3.testcase \
	toponettotable4.testcase \
	toponettotable5.testcase \
	toponettotable6.testcase \
	toponettotable7.testcase \
	toponettotable8.testcase \
	toponettotable9.testcase \
	toponettotable10.testcase \
	toponettotable11.testcase \
	toponettotable12.testcase \
	toponettotable13.testcase \
	toponettotable14.testcase \
	toponettotable15.testcase \
	toponettotable16.testcase \
	toponettotable17.testcase \
	toponettotable18.testcase \
	toponettotable19.testcase \
	toponettotable20.testcase \
	toponettotable21.testcase \
	toponettotable22.testcase \
	toponettotable23.testcase \
	toponettotable24.testcase \
	toponettotable25.testcase \
	toponettotable26.testcase \
	toponettotablegen1.testcase \
	toponettotablegen2.testcase \
	toponettotablegen3.testcase \
	toponettotablegen4.testcase \
	toponettotablegen5.testcase \
	toponettotablegen6.testcase \
	toponettotablegen7.testcase \
	toponettotablegen8.testcase \
	toponettotablegen9.testcase \
	toponettotablegen10.testcase \
	toponettotablegen11.testcase \
	toponettotablegen12.testcase \
	toponettotablegen13.testcase \
	toponettotablegen14.testcase \
	toponettotablegen15.testcase \
	toponettotablegen16.testcase \
	toponettotablegen17.testcase \
	toponettotablegen18.testcase \
	toponettotablegen19.testcase \
	toponettotablegen20.testcase \
	toponettotablegen21.testcase \
	toponettotablegen22.testcase \
	toponettotablegen23.testcase \
	toponettotablegen24.testcase \
	toponettotablegen25.testcase \
	toponettotablegen26.testcase \
	toponettotablegen27.testcase \
	toponettotablegen28.testcase \
	toponettotablegen29.testcase \
	toponettotablegen30.testcase \
	toponettotablegen31.testcase \
	validatetopogeo1.testcase \
	validatetopogeo2.testcase \
	validatetopogeo3.testcase \
	validatetopogeo4.testcase \
	validatetopogeo5.testcase \
	validlogicalnet1.testcase \
	validlogicalnet2.testcase \
	validlogicalnet3.testcase \
	validlogicalnet4.testcase \
	validlogicalnet5.testcase \
	validspatialnet1.testcase \
	validspatialnet2.testcase \
	validspatialnet3.testcase \
	validspatialnet4.testcase \
	validspatialnet5.testcase
	
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_lwgeom_22_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_rttopo_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = addedgemodface1.testcase \
	addedgemodface2.testcase \
	addedgemodface3.testcase \
	addedgemodface4.testcase \
	addedgemodface5.testcase \
	addedgemodface6.testcase \
	addedgemodface7.testcase \
	addedgemodface8.testcase \
	addedgemodface9.testcase \
	addedgemodface10.testcase \
	addedgemodface11.testcase \
	addedgemodface12.testcase \
	addedgemodface13.testcase \
	addedgemodface14.testcase \
	addedgemodface15.testcase \
	addedgemodface16.testcase \
	addedgemodface17.testcase \
	addedgemodface18.testcase \
	addedgemodface19.testcase \
	addedgemodface20.testcase \
	addedgenewfaces1.testcase \
	addedgenewfaces2.testcase \
	addedgenewfaces3.testcase \
	addedgenewfaces4.testcase \
	addedgenewfaces5.testcase \
	addedgenewfaces6.testcase \
	addedgenewfaces7.testcase \
	addedgenewfaces8.testcase \
	addedgenewfaces9.testcase \
	addedgenewfaces10.testcase \
	addedgenewfaces11.testcase \
	addedgenewfaces12.testcase \
	addedgenewfaces13.testcase \
	addedgenewfaces14.testcase \
	addedgenewfaces15.testcase \
	addedgenewfaces16.testcase \
	addedgenewfaces17.testcase \
	addedgenewfaces18.testcase \
	addedgenewfaces19.testcase \
	addedgenewfaces20.testcase \
	addisoedge1.testcase \
	addisoedge2.testcase \
	addisoedge3.testcase \
	addisoedge4.testcase \
	addisoedge5.testcase \
	addisoedge6.testcase \
	addisoedge7.testcase \
	addisoedge8.testcase \
	addisoedge9.testcase \
	addisoedge10.testcase \
	addisoedge11.testcase \
	addisoedge12.testcase \
	addisoedge13.testcase \
	addisoedge14.testcase \
	addisoedge15.testcase \
	addisoedge16.testcase \
	addisoedge17.testcase \
	addisoedge18.testcase \
	addisoedge19.testcase \
	addisoedge20.testcase \
	addisonetnode1.testcase \
	addisonetnode2.testcase \
	addisonetnode3.testcase \
	addisonetnode4.testcase \
	addisonetnode5.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addlink1.testcase \
	addlink2.testcase \
	addlink3.testcase \
	addlink4.testcase \
	addlink5.testcase \
	addlink6.testcase \
	addlink7.testcase \
	addlink8.testcase \
	addlink9.testcase \
	addlink10.testcase \
	addlink11.testcase \
	addlink12.testcase \
	addlink13.testcase \
	changeedgegeom1.testcase \
	changeedgegeom2.testcase \
	changeedgegeom3.testcase \
	changeedgegeom4.testcase \
	changeedgegeom5.testcase \
	changeedgegeom6.testcase \
	changeedgegeom7.testcase \
	changeedgegeom8.testcase \
	changeedgegeom9.testcase \
	changeedgegeom10.testcase \
	changeedgegeom11.testcase \
	changeedgegeom12.testcase \
	changeedgegeom13.testcase \
	changeedgegeom14.testcase \
	changeedgegeom15.testcase \
	changeedgegeom16.testcase \
	changeedgegeom17.testcase \
	changelinkgeom1.testcase \
	changelinkgeom2.testcase \
	changelinkgeom3.testcase \
	changelinkgeom4.testcase \
	changelinkgeom5.testcase \
	changelinkgeom6.testcase \
	changelinkgeom7.testcase \
	changelinkgeom8.testcase \
	createtopogeo1.testcase \
	createtopogeo2.testcase \
	createtopogeo3.testcase \
	createtopogeo4.testcase \
	createtopogeo5.testcase \
	createtopogeo6.testcase \
	createtopogeo7.testcase \
	createtopogeo8.testcase \
	createtopogeo9.testcase \
	createtopogeo10.testcase \
	createtopolayer1.testcase \
	createtopolayer2.testcase \
	createtopolayer3.testcase \
	createtopolayer4.testcase \
	createtopolayer5.testcase \
	createtopolayer6.testcase \
	createtopolayer7.testcase \
	createtopolayer8.testcase \
	createtopolayer9.testcase \
	createtopolayer10.testcase \
	createtopolayer11.testcase \
	createtopolayer12.testcase \
	createtopolayer13.testcase \
	createtopolayer14.testcase \
	createtopolayer15.testcase \
	createtopolayer16.testcase \
	createtopolayer17.testcase \
	createtopolayer18.testcase \
	createtopolayer19.testcase \
	createtopolayer20.testcase \
	createtopolayer21.testcase \
	createtopolayer22.testcase \
	createtopolayer23.testcase \
	createtopolayer24.testcase \
	createtopolayer25.testcase \
	createtopolayer26.testcase \
	createtopology1.testcase \
	createtopology2.testcase \
	createtopology3.testcase \
	createtopology4.testcase \
	createtopology5.testcase \
	createtopology6.testcase \
	createtopology7.testcase \
	createtopology8.testcase \
	createtopology9.testcase \
	createtopology10.testcase \
	createtopology11.testcase \
	createtopology12.testcase \
	createtopology13.testcase \
	createtopology14.testcase \
	createtopology15.testcase \
	createtopology16.testcase \
	createtopology17.testcase \
	createtopology18.testcase \
	createtopology19.testcase \
	createtopology20.testcase \
	createnetwork1.testcase \
	createnetwork2.testcase \
	createnetwork3.testcase \
	createnetwork4.testcase \
	createnetwork5.testcase \
	createnetwork6.testcase \
	createnetwork7.testcase \
	createnetwork8.testcase \
	createnetwork9.testcase \
	createnetwork10.testcase \
	createnetwork11.testcase \
	createnetwork12.testcase \
	createnetwork13.testcase \
	createnetwork14.testcase \
	createnetwork15.testcase \
	createnetwork16.testcase \
	createnetwork17.testcase \
	createnetwork18.testcase \
	createnetwork19.testcase \
	createnetwork20.testcase \
	createnetwork21.testcase \
	createnetwork22.testcase \
	createnetwork23.testcase \
	createnetwork24.testcase \
	createnetwork25.testcase \
	droptopology1.testcase \
	droptopology2.testcase \
	droptopology3.testcase \
	droptopology4.testcase \
	droptopology5.testcase \
	dropnetwork1.testcase \
	dropnetwork2.testcase \
	dropnetwork3.testcase \
	dropnetwork4.testcase \
	dropnetwork5.testcase \
	exporttopolayer1.testcase \
	exporttopolayer2.testcase \
	exporttopolayer3.testcase \
	exporttopolayer4.testcase \
	exporttopolayer5.testcase \
	exporttopolayer6.testcase \
	exporttopolayer7.testcase \
	exporttopolayer8.testcase \
	exporttopolayer9.testcase \
	exporttopolayer10.testcase \
	exporttopolayer11.testcase \
	exporttopolayer12.testcase \
	exporttopolayer13.testcase \
	exporttopolayer14.testcase \
	exporttopolayer15.testcase \
	exporttopolayer16.testcase \
	exporttopolayer17.testcase \
	exporttopolayer18.testcase \
	exporttopolayer19.testcase \
	exporttopolayer20.testcase \
	exporttopolayer21.testcase \
	exporttopolayer22.testcase \
	exporttopolayer23.testcase \
	featuretopolayer1.testcase \
	featuretopolayer2.testcase \
	featuretopolayer3.testcase \
	featuretopolayer4.testcase \
	featuretopolayer5.testcase \
	featuretopolayer6.testcase \
	featuretopolayer7.testcase \
	featuretopolayer8.testcase \
	featuretopolayer9.testcase \
	featuretopolayer10.testcase \
	featuretopolayer11.testcase \
	featuretopolayer12.testcase \
	featuretopolayer13.testcase \
	featuretopolayer14.testcase \
	featuretopolayer15.testcase \
	featuretopolayer16.testcase \
	featuretopolayer17.testcase \
	getedgeseed1.testcase \
	getedgeseed2.testcase \
	getedgeseed3.testcase \
	getedgeseed4.testcase \
	getedgeseed5.testcase \
	getedgeseed6.testcase \
	getedgeseed7.testcase \
	getedgeseed8.testcase \
	getedgeseed9.testcase \
	getlinkseed1.testcase \
	getlinkseed2.testcase \
	getlinkseed3.testcase \
	getlinkseed4.testcase \
	getlinkseed5.testcase \
	getlinkseed6.testcase \
	getlinkseed7.testcase \
	getlinkseed8.testcase \
	getlinkseed9.testcase \
	getfaceedges1.testcase \
	getfaceedges2.testcase \
	getfaceedges3.testcase \
	getfaceedges4.testcase \
	getfaceedges5.testcase \
	getfaceedges6.testcase \
	getfaceedges7.testcase \
	getfaceedges8.testcase \
	getfaceedges9.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getedgebypoint1.testcase \
	getedgebypoint2.testcase \
	getedgebypoint3.testcase \
	getedgebypoint4.testcase \
	getedgebypoint5.testcase \
	getedgebypoint6.testcase \
	getedgebypoint7.testcase \
	getedgebypoint8.testcase \
	getedgebypoint9.testcase \
	getedgebypoint10.testcase \
	getedgebypoint11.testcase \
	getedgebypoint12.testcase \
	getedgebypoint13.testcase \
	getedgebypoint14.testcase \
	getedgebypoint15.testcase \
	getedgebypoint16.testcase \
	getedgebypoint17.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getfacebypoint1.testcase \
	getfacebypoint2.testcase \
	getfacebypoint3.testcase \
	getfacebypoint4.testcase \
	getfacebypoint5.testcase \
	getfacebypoint6.testcase \
	getfacebypoint7.testcase \
	getfacebypoint8.testcase \
	getfacebypoint9.testcase \
	getfacebypoint10.testcase \
	getfacebypoint11.testcase \
	getfacebypoint12.testcase \
	getfacebypoint13.testcase \
	getfacebypoint14.testcase \
	getfacebypoint15.testcase \
	getfacebypoint16.testcase \
	getfacebypoint17.testcase \
	getfaceseed1.testcase \
	getfaceseed2.testcase \
	getfaceseed3.testcase \
	getfaceseed4.testcase \
	getfaceseed5.testcase \
	getfaceseed6.testcase \
	getfaceseed7.testcase \
	getfaceseed8.testcase \
	getfaceseed9.testcase \
	getlinkbypoint1.testcase \
	getlinkbypoint2.testcase \
	getlinkbypoint3.testcase \
	getlinkbypoint4.testcase \
	getlinkbypoint5.testcase \
	getlinkbypoint6.testcase \
	getlinkbypoint7.testcase \
	getlinkbypoint8.testcase \
	getlinkbypoint9.testcase \
	getlinkbypoint10.testcase \
	getlinkbypoint11.testcase \
	getlinkbypoint12.testcase \
	getlinkbypoint13.testcase \
	getlinkbypoint14.testcase \
	getlinkbypoint15.testcase \
	getlinkbypoint16.testcase \
	getlinkbypoint17.testcase \
	getnetnodebypoint1.testcase \
	getnetnodebypoint2.testcase \
	getnetnodebypoint3.testcase \
	getnetnodebypoint4.testcase \
	getnetnodebypoint5.testcase \
	getnetnodebypoint6.testcase \
	getnetnodebypoint7.testcase \
	getnetnodebypoint8.testcase \
	getnetnodebypoint9.testcase \
	getnetnodebypoint10.testcase \
	getnetnodebypoint11.testcase \
	getnetnodebypoint12.testcase \
	getnetnodebypoint13.testcase \
	getnetnodebypoint14.testcase \
	getnetnodebypoint15.testcase \
	getnetnodebypoint16.testcase \
	getnetnodebypoint17.testcase \
	getnodebypoint1.testcase \
	getnodebypoint2.testcase \
	getnodebypoint3.testcase \
	getnodebypoint4.testcase \
	getnodebypoint5.testcase \
	getnodebypoint6.testcase \
	getnodebypoint7.testcase \
	getnodebypoint8.testcase \
	getnodebypoint9.testcase \
	getnodebypoint10.testcase \
	getnodebypoint11.testcase \
	getnodebypoint12.testcase \
	getnodebypoint13.testcase \
	getnodebypoint14.testcase \
	getnodebypoint15.testcase \
	getnodebypoint16.testcase \
	getnodebypoint17.testcase \
	inittopolayer1.testcase \
	inittopolayer2.testcase \
	inittopolayer3.testcase \
	inittopolayer4.testcase \
	inittopolayer5.testcase \
	inittopolayer6.testcase \
	inittopolayer7.testcase \
	inittopolayer8.testcase \
	inittopolayer9.testcase \
	inittopolayer10.testcase \
	inittopolayer11.testcase \
	inittopolayer12.testcase \
	inittopolayer13.testcase \
	inittopolayer14.testcase \
	inittopolayer15.testcase \
	inittopolayer16.testcase \
	inittopolayer17.testcase \
	linesnapseed1.testcase \
	linesnapseed2.testcase \
	linesnapseed3.testcase \
	linesnapseed4.testcase \
	linesnapseed5.testcase \
	linesnapseed6.testcase \
	linesnapseed7.testcase \
	linesnapseed8.testcase \
	linesnapseed9.testcase \
	linesnapseed10.testcase \
	linesnapseed11.testcase \
	linesnapseed12.testcase \
	linesnapseed13.testcase \
	linesnapseed14.testcase \
	linesnapseed15.testcase \
	linesnapseed16.testcase \
	linesnapseed17.testcase \
	loginetfromtgeo1.testcase \
	loginetfromtgeo2.testcase \
	loginetfromtgeo3.testcase \
	loginetfromtgeo4.testcase \
	loginetfromtgeo5.testcase \
	loginetfromtgeo6.testcase \
	loginetfromtgeo7.testcase \
	loginetfromtgeo8.testcase \
	loginetfromtgeo9.testcase \
	modedgeheal1.testcase \
	modedgeheal2.testcase \
	modedgeheal3.testcase \
	modedgeheal4.testcase \
	modedgeheal5.testcase \
	modedgeheal6.testcase \
	modedgeheal7.testcase \
	modedgeheal8.testcase \
	modedgeheal9.testcase \
	modedgeheal10.testcase \
	modedgeheal11.testcase \
	modedgeheal12.testcase \
	modedgeheal13.testcase \
	modedgesplit1.testcase \
	modedgesplit2.testcase \
	modedgesplit3.testcase \
	modedgesplit4.testcase \
	modedgesplit5.testcase \
	modedgesplit6.testcase \
	modedgesplit7.testcase \
	modedgesplit8.testcase \
	modedgesplit9.testcase \
	modedgesplit10.testcase \
	modedgesplit11.testcase \
	modedgesplit12.testcase \
	modedgesplit13.testcase \
	modedgesplit14.testcase \
	modedgesplit15.testcase \
	modedgesplit16.testcase \
	modgeolinksplit1.testcase \
	modgeolinksplit2.testcase \
	modgeolinksplit3.testcase \
	modgeolinksplit4.testcase \
	modgeolinksplit5.testcase \
	modgeolinksplit6.testcase \
	modgeolinksplit7.testcase \
	modgeolinksplit8.testcase \
	modgeolinksplit9.testcase \
	modlinkheal1.testcase \
	modlinkheal2.testcase \
	modlinkheal3.testcase \
	modlinkheal4.testcase \
	modlinkheal5.testcase \
	modlinkheal6.testcase \
	modlinkheal7.testcase \
	modlinkheal8.testcase \
	modlinkheal9.testcase \
	modlinkheal10.testcase \
	modlinkheal11.testcase \
	modlinkheal12.testcase \
	modlinkheal13.testcase \
	modloglinksplit1.testcase \
	modloglinksplit2.testcase \
	modloglinksplit3.testcase \
	modloglinksplit4.testcase \
	modloglinksplit5.testcase \
	modloglinksplit6.testcase \
	modloglinksplit7.testcase \
	modloglinksplit8.testcase \
	modloglinksplit9.testcase \
	moveisonetnode1.testcase \
	moveisonetnode2.testcase \
	moveisonetnode3.testcase \
	moveisonetnode4.testcase \
	moveisonetnode5.testcase \
	moveisonetnode6.testcase \
	moveisonetnode7.testcase \
	moveisonetnode8.testcase \
	moveisonetnode9.testcase \
	moveisonode1.testcase \
	moveisonode2.testcase \
	moveisonode3.testcase \
	moveisonode4.testcase \
	moveisonode5.testcase \
	moveisonode6.testcase \
	moveisonode7.testcase \
	moveisonode8.testcase \
	moveisonode9.testcase \
	moveisonode10.testcase \
	moveisonode11.testcase \
	moveisonode12.testcase \
	moveisonode13.testcase \
	moveisonode14.testcase \
	moveisonode15.testcase \
	moveisonode16.testcase \
	moveisonode17.testcase \
	netexception1.testcase \
	netexception2.testcase \
	newedgeheal1.testcase \
	newedgeheal2.testcase \
	newedgeheal3.testcase \
	newedgeheal4.testcase \
	newedgeheal5.testcase \
	newedgeheal6.testcase \
	newedgeheal7.testcase \
	newedgeheal8.testcase \
	newedgeheal9.testcase \
	newedgeheal10.testcase \
	newedgeheal11.testcase \
	newedgeheal12.testcase \
	newedgeheal13.testcase \
	newedgessplit1.testcase \
	newedgessplit2.testcase \
	newedgessplit3.testcase \
	newedgessplit4.testcase \
	newedgessplit5.testcase \
	newedgessplit6.testcase \
	newedgessplit7.testcase \
	newedgessplit8.testcase \
	newedgessplit9.testcase \
	newedgessplit10.testcase \
	newedgessplit11.testcase \
	newedgessplit12.testcase \
	newedgessplit13.testcase \
	newedgessplit14.testcase \
	newedgessplit15.testcase \
	newedgessplit16.testcase \
	newgeolinksplit1.testcase \
	newgeolinksplit2.testcase \
	newgeolinksplit3.testcase \
	newgeolinksplit4.testcase \
	newgeolinksplit5.testcase \
	newgeolinksplit6.testcase \
	newgeolinksplit7.testcase \
	newgeolinksplit8.testcase \
	newgeolinksplit9.testcase \
	newlinkheal1.testcase \
	newlinkheal2.testcase \
	newlinkheal3.testcase \
	newlinkheal4.testcase \
	newlinkheal5.testcase \
	newlinkheal6.testcase \
	newlinkheal7.testcase \
	newlinkheal8.testcase \
	newlinkheal9.testcase \
	newlinkheal10.testcase \
	newlinkheal11.testcase \
	newlinkheal12.testcase \
	newlinkheal13.testcase \
	newloglinksplit1.testcase \
	newloglinksplit2.testcase \
	newloglinksplit3.testcase \
	newloglinksplit4.testcase \
	newloglinksplit5.testcase \
	newloglinksplit6.testcase \
	newloglinksplit7.testcase \
	newloglinksplit8.testcase \
	newloglinksplit9.testcase \
	pointsnapseed1.testcase \
	pointsnapseed2.testcase \
	pointsnapseed3.testcase \
	pointsnapseed4.testcase \
	pointsnapseed5.testcase \
	pointsnapseed6.testcase \
	pointsnapseed7.testcase \
	pointsnapseed8.testcase \
	pointsnapseed9.testcase \
	pointsnapseed10.testcase \
	pointsnapseed11.testcase \
	pointsnapseed12.testcase \
	pointsnapseed13.testcase \
	pointsnapseed14.testcase \
	pointsnapseed15.testcase \
	pointsnapseed16.testcase \
	pointsnapseed17.testcase \
	remedgemodface1.testcase \
	remedgemodface2.testcase \
	remedgemodface3.testcase \
	remedgemodface4.testcase \
	remedgemodface5.testcase \
	remedgemodface6.testcase \
	remedgemodface7.testcase \
	remedgemodface8.testcase \
	remedgemodface9.testcase \
	remedgenewface1.testcase \
	remedgenewface2.testcase \
	remedgenewface3.testcase \
	remedgenewface4.testcase \
	remedgenewface5.testcase \
	remedgenewface6.testcase \
	remedgenewface7.testcase \
	remedgenewface8.testcase \
	remedgenewface9.testcase \
	remisoedge1.testcase \
	remisoedge2.testcase \
	remisoedge3.testcase \
	remisoedge4.testcase \
	remisoedge5.testcase \
	remisoedge6.testcase \
	remisoedge7.testcase \
	remisoedge8.testcase \
	remisoedge9.testcase \
	remisonode1.testcase \
	remisonode2.testcase \
	remisonode3.testcase \
	remisonode4.testcase \
	remisonode5.testcase \
	remisonode6.testcase \
	remisonode7.testcase \
	remisonode8.testcase \
	remisonode9.testcase \
	remisonetnode1.testcase \
	remisonetnode2.testcase \
	remisonetnode3.testcase \
	remisonetnode4.testcase \
	remisonetnode5.testcase \
	remisonetnode6.testcase \
	remisonetnode7.testcase \
	remisonetnode8.testcase \
	remisonetnode9.testcase \
	remlink1.testcase \
	remlink2.testcase \
	remlink3.testcase \
	remlink4.testcase \
	remlink5.testcase \
	remlink6.testcase \
	remlink7.testcase \
	remlink8.testcase \
	remlink9.testcase \
	removetopolayer1.testcase \
	removetopolayer2.testcase \
	removetopolayer3.testcase \
	removetopolayer4.testcase \
	removetopolayer5.testcase \
	removetopolayer6.testcase \
	removetopolayer7.testcase \
	removetopolayer8.testcase \
	removetopolayer9.testcase \
	spatnetfromtgeo1.testcase \
	spatnetfromtgeo2.testcase \
	spatnetfromtgeo3.testcase \
	spatnetfromtgeo4.testcase \
	spatnetfromtgeo5.testcase \
	spatnetfromtgeo6.testcase \
	spatnetfromtgeo7.testcase \
	spatnetfromtgeo8.testcase \
	spatnetfromtgeo9.testcase \
	spatnetfromgeom1.testcase \
	spatnetfromgeom2.testcase \
	spatnetfromgeom3.testcase \
	spatnetfromgeom4.testcase \
	spatnetfromgeom5.testcase \
	spatnetfromgeom6.testcase \
	spatnetfromgeom7.testcase \
	spatnetfromgeom8.testcase \
	spatnetfromgeom9.testcase \
	spatnetfromgeom10.testcase \
	topoexception1.testcase \
	topoexception2.testcase \
	topogeoaddpoint1.testcase \
	topogeoaddpoint2.testcase \
	topogeoaddpoint3.testcase \
	topogeoaddpoint4.testcase \
	topogeoaddpoint5.testcase \
	topogeoaddpoint6.testcase \
	topogeoaddpoint7.testcase \
	topogeoaddpoint8.testcase \
	topogeoaddpoint9.testcase \
	topogeoaddpoint10.testcase \
	topogeoaddpoint11.testcase \
	topogeoaddpoint12.testcase \
	topogeoaddpoint13.testcase \
	topogeoaddpoint14.testcase \
	topogeoaddpoint15.testcase \
	topogeoaddpoint16.testcase \
	topogeoaddpoint17.testcase \
	topogeoaddline1.testcase \
	topogeoaddline2.testcase \
	topogeoaddline3.testcase \
	topogeoaddline4.testcase \
	topogeoaddline5.testcase \
	topogeoaddline6.testcase \
	topogeoaddline7.testcase \
	topogeoaddline8.testcase \
	topogeoaddline9.testcase \
	topogeoaddline10.testcase \
	topogeoaddline11.testcase \
	topogeoaddline12.testcase \
	topogeoaddline13.testcase \
	topogeoaddline14.testcase \
	topogeoaddline15.testcase \
	topogeoaddline16.testcase \
	topogeoaddline17.testcase \
	topogeoclone1.testcase \
	topogeoclone2.testcase \
	topogeoclone3.testcase \
	topogeoclone4.testcase \
	topogeoclone5.testcase \
	topogeoclone6.testcase \
	topogeoclone7.testcase \
	topogeoclone8.testcase \
	topogeoclone9.testcase \
	topogeoclone10.testcase \
	topogeoclone11.testcase \
	topogeoclone12.testcase \
	topogeofromext1.testcase \
	topogeofromext2.testcase \
	topogeofromext3.testcase \
	topogeofromext4.testcase \
	topogeofromext5.testcase \
	topogeofromext6.testcase \
	topogeofromext7.testcase \
	topogeofromext8.testcase \
	topogeofromext9.testcase \
	topogeofromext10.testcase \
	topogeofromext11.testcase \
	topogeofromext12.testcase \
	topogeofromext13.testcase \
	topogeofromext14.testcase \
	topogeofromext15.testcase \
	topogeofromext16.testcase \
	topogeofromext17.testcase \
	topogeofromext18.testcase \
	topogeofromext19.testcase \
	topogeofromext20.testcase \
	topogeofromext21.testcase \
	topogeofromext22.testcase \
	topogeofromext23.testcase \
	topogeofromext24.testcase \
	topogeofromext25.testcase \
	topogeofromext26.testcase \
	topogeofromext27.testcase \
	topogeofromext28.testcase \
	topogeofromext29.testcase \
	topogeofromext30.testcase \
	topogeofromext31.testcase \
	topogeofromext32.testcase \
	topogeofromext33.testcase \
	topogeofromext34.testcase \
	topogeofromext35.testcase \
	topogeofromext36.testcase \
	topogeofromext37.testcase \
	topogeofromext38.testcase \
	topogeofromext39.testcase \
	topogeofromtable1.testcase \
	topogeofromtable2.testcase \
	topogeofromtable3.testcase \
	topogeofromtable4.testcase \
	topogeofromtable5.testcase \
	topogeofromtable6.testcase \
	topogeofromtable7.testcase \
	topogeofromtable8.testcase \
	topogeofromtable9.testcase \
	topogeofromtable10.testcase \
	topogeofromtable11.testcase \
	topogeofromtable12.testcase \
	topogeofromtable13.testcase \
	topogeofromtable14.testcase \
	topogeofromtable15.testcase \
	topogeofromtable16.testcase \
	topogeofromtable17.testcase \
	topogeofromtable18.testcase \
	topogeofromtable19.testcase \
	topogeofromtable20.testcase \
	topogeofromtable21.testcase \
	topogeofromtable22.testcase \
	topogeofromtable23.testcase \
	topogeofromtable24.testcase \
	topogeofromtable25.testcase \
	topogeofromtable26.testcase \
	topogeofromtable27.testcase \
	topogeofromtable28.testcase \
	topogeofromtable29.testcase \
	topogeofromtable30.testcase \
	topogeosplitline1.testcase \
	topogeosplitline2.testcase \
	topogeosplitline3.testcase \
	topogeosplitline4.testcase \
	topogeosplitline5.testcase \
	topogeosplitline6.testcase \
	topogeosplitline7.testcase \
	topogeosplitline8.testcase \
	topogeosplitline9.testcase \
	topogeosplitline10.testcase \
	topogeosplitline11.testcase \
	topogeosplitline12.testcase \
	topogeosplitline13.testcase \
	topogeosplitline14.testcase \
	topogeosplitline15.testcase \
	topogeosplitline16.testcase \
	topogeoremovesmall1.testcase \
	topogeoremovesmall2.testcase \
	topogeoremovesmall3.testcase \
	topogeoremovesmall4.testcase \
	topogeoremovesmall5.testcase \
	topogeoremovesmall6.testcase \
	topogeoremovesmall7.testcase \
	topogeoremovesmall8.testcase \
	topogeoremovesmall9.testcase \
	topogeoremoveedges1.testcase \
	topogeoremoveedges2.testcase \
	topogeoremoveedges3.testcase \
	topogeoremoveedges4.testcase \
	topogeoremoveedges5.testcase \
	topogeoremovenodes1.testcase \
	topogeoremovenodes2.testcase \
	topogeoremovenodes3.testcase \
	topogeoremovenodes4.testcase \
	topogeoremovenodes5.testcase \
	topogeototable1.testcase \
	topogeototable2.testcase \
	topogeototable3.testcase \
	topogeototable4.testcase \
	topogeototable5.testcase \
	topogeototable6.testcase \
	topogeototable7.testcase \
	topogeototable8.testcase \
	topogeototable9.testcase \
	topogeototable10.testcase \
	topogeototable11.testcase \
	topogeototable12.testcase \
	topogeototable13.testcase \
	topogeototable14.testcase \
	topogeototable15.testcase \
	topogeototable16.testcase \
	topogeototable17.testcase \
	topogeototable18.testcase \
	topogeototable19.testcase \
	topogeototable20.testcase \
	topogeototable21.testcase \
	topogeototable22.testcase \
	topogeototable23.testcase \
	topogeototable24.testcase \
	topogeototable25.testcase \
	topogeototable26.testcase \
	topogeototablegen1.testcase \
	topogeototablegen2.testcase \
	topogeototablegen3.testcase \
	topogeototablegen4.testcase \
	topogeototablegen5.testcase \
	topogeototablegen6.testcase \
	topogeototablegen7.testcase \
	topogeototablegen8.testcase \
	topogeototablegen9.testcase \
	topogeototablegen10.testcase \
	topogeototablegen11.testcase \
	topogeototablegen12.testcase \
	topogeototablegen13.testcase \
	topogeototablegen14.testcase \
	topogeototablegen15.testcase \
	topogeototablegen16.testcase \
	topogeototablegen17.testcase \
	topogeototablegen18.testcase \
	topogeototablegen19.testcase \
	topogeototablegen20.testcase \
	topogeototablegen21.testcase \
	topogeototablegen22.testcase \
	topogeototablegen23.testcase \
	topogeototablegen24.testcase \
	topogeototablegen25.testcase \
	topogeototablegen26.testcase \
	topogeototablegen27.testcase \
	topogeototablegen28.testcase \
	topogeototablegen29.testcase \
	topogeototablegen30.testcase \
	topogeototablegen31.testcase \
	topogeoupdateseeds1.testcase \
	topogeoupdateseeds2.testcase \
	topogeoupdateseeds3.testcase \
	topogeoupdateseeds4.testcase \
	topogeoupdateseeds5.testcase \
	topogeoupdateseeds6.testcase \
	topogeoupdateseeds7.testcase \
	topogeoupdateseeds8.testcase \
	topogeoupdateseeds9.testcase \
	topogeoupdateseeds10.testcase \
	toponetclone1.testcase \
	toponetclone2.testcase \
	toponetclone3.testcase \
	toponetclone4.testcase \
	toponetclone5.testcase \
	toponetclone6.testcase \
	toponetclone7.testcase \
	toponetclone8.testcase \
	toponetclone9.testcase \
	toponetclone10.testcase \
	toponetclone11.testcase \
	toponetclone12.testcase \
	toponetfromtable1.testcase \
	toponetfromtable2.testcase \
	toponetfromtable3.testcase \
	toponetfromtable4.testcase \
	toponetfromtable5.testcase \
	toponetfromtable6.testcase \
	toponetfromtable7.testcase \
	toponetfromtable8.testcase \
	toponetfromtable9.testcase \
	toponetfromtable10.testcase \
	toponetfromtable11.testcase \
	toponetfromtable12.testcase \
	toponetfromtable13.testcase \
	toponetfromtable14.testcase \
	toponetfromtable15.testcase \
	toponetfromtable16.testcase \
	toponetfromtable17.testcase \
	toponettotable1.testcase \
	toponettotable2.testcase \
	toponettotable3.testcase \
	toponettotable4.testcase \
	toponettotable5.testcase \
	toponettotable6.testcase \
	toponettotable7.testcase \
	toponettotable8.testcase \
	toponettotable9.testcase \
	toponettotable10.testcase \
	toponettotable11.testcase \
	toponettotable12.testcase \
	toponettotable13.testcase \
	toponettotable14.testcase \
	toponettotable15.testcase \
	toponettotable16.testcase \
	toponettotable17.testcase \
	toponettotable18.testcase \
	toponettotable19.testcase \
	toponettotable20.testcase \
	toponettotable21.testcase \
	toponettotable22.testcase \
	toponettotable23.testcase \
	toponettotable24.testcase \
	toponettotable25.testcase \
	toponettotable26.testcase \
	toponettotablegen1.testcase \
	toponettotablegen2.testcase \
	toponettotablegen3.testcase \
	toponettotablegen4.testcase \
	toponettotablegen5.testcase \
	toponettotablegen6.testcase \
	toponettotablegen7.testcase \
	toponettotablegen8.testcase \
	toponettotablegen9.testcase \
	toponettotablegen10.testcase \
	toponettotablegen11.testcase \
	toponettotablegen12.testcase \
	toponettotablegen13.testcase \
	toponettotablegen14.testcase \
	toponettotablegen15.testcase \
	toponettotablegen16.testcase \
	toponettotablegen17.testcase \
	toponettotablegen18.testcase \
	toponettotablegen19.testcase \
	toponettotablegen20.testcase \
	toponettotablegen21.testcase \
	toponettotablegen22.testcase \
	toponettotablegen23.testcase \
	toponettotablegen24.testcase \
	toponettotablegen25.testcase \
	toponettotablegen26.testcase \
	toponettotablegen27.testcase \
	toponettotablegen28.testcase \
	toponettotablegen29.testcase \
	toponettotablegen30.testcase \
	toponettotablegen31.testcase \
	validatetopogeo1.testcase \
	validatetopogeo2.testcase \
	validatetopogeo3.testcase \
	validatetopogeo4.testcase \
	validatetopogeo5.testcase \
	validlogicalnet1.testcase \
	validlogicalnet2.testcase \
	validlogicalnet3.testcase \
	validlogicalnet4.testcase \
	validlogicalnet5.testcase \
	validspatialnet1.testcase \
	validspatialnet2.testcase \
	validspatialnet3.testcase \
	validspatialnet4.testcase \
	validspatialnet5.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_rttopo_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_rttopo_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface1.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface10.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface11.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface12.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Text Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface13.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface14.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Int Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, 1);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface15.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, 1.3);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface16.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface17.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface18.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Point Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface19.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface2.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Int Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface20.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface3.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface4.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - BLOB Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface5.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Text Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface6.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface7.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface8.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Text Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgemodface9.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces1.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces10.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces11.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces12.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Text Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces13.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces14.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Int Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, 1);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces15.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, 1.3);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces16.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces17.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces18.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Point Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces19.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces2.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Int Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces20.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces3.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces4.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - BLOB Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces5.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Text Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces6.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces7.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces8.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Text Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addedgenewfaces9.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge1.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge10.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge11.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge12.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Text Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge13.testcase.

1
2
3
4
5
6
7
AddIsoEdge - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge14.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Int Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, 1);
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge15.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, 1.3);
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge16.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge17.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge18.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Point Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge19.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge2.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Int Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge20.testcase.

1
2
3
4
5
6
7
AddIsoEdge - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge3.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge4.testcase.

1
2
3
4
5
6
7
AddIsoEdge - BLOB Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge5.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Text Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge6.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge7.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge8.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Text Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisoedge9.testcase.

1
2
3
4
5
6
7
AddIsoEdge - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonetnode1.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - NULL Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonetnode2.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - Int Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonetnode3.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - Double Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonetnode4.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - BLOB Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(zeroblob(9), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(zeroblob(9), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonetnode5.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - NULL Point
:memory: #use in-memory database
SELECT ST_AddIsoNetNode('roads', NULL);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode('roads', NULL)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode1.testcase.

1
2
3
4
5
6
7
AddIsoNode - NULL Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode10.testcase.

1
2
3
4
5
6
7
AddIsoNode - Double Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode11.testcase.

1
2
3
4
5
6
7
AddIsoNode - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode12.testcase.

1
2
3
4
5
6
7
AddIsoNode - Text Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode13.testcase.

1
2
3
4
5
6
7
AddIsoNode - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode14.testcase.

1
2
3
4
5
6
7
AddIsoNode - Linestring Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode15.testcase.

1
2
3
4
5
6
7
AddIsoNode - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode16.testcase.

1
2
3
4
5
6
7
AddIsoNode - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode17.testcase.

1
2
3
4
5
6
7
AddIsoNode - NULL Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode2.testcase.

1
2
3
4
5
6
7
AddIsoNode - Int Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode3.testcase.

1
2
3
4
5
6
7
AddIsoNode - Double Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode4.testcase.

1
2
3
4
5
6
7
AddIsoNode - Blob Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode5.testcase.

1
2
3
4
5
6
7
AddIsoNode - Text Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode6.testcase.

1
2
3
4
5
6
7
AddIsoNode - Double Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode7.testcase.

1
2
3
4
5
6
7
AddIsoNode - BLOB Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode8.testcase.

1
2
3
4
5
6
7
AddIsoNode - Text Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 'face', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 'face', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addisonode9.testcase.

1
2
3
4
5
6
7
AddIsoNode - Int Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink1.testcase.

1
2
3
4
5
6
7
AddLink - NULL Network
:memory: #use in-memory database
SELECT ST_AddLink(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink10.testcase.

1
2
3
4
5
6
7
AddLink - NULL Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink11.testcase.

1
2
3
4
5
6
7
AddLink - Double Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink12.testcase.

1
2
3
4
5
6
7
AddLink - Text Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink13.testcase.

1
2
3
4
5
6
7
AddLink - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink2.testcase.

1
2
3
4
5
6
7
AddLink - Int Network
:memory: #use in-memory database
SELECT ST_AddLink(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink3.testcase.

1
2
3
4
5
6
7
AddLink - Double Network
:memory: #use in-memory database
SELECT ST_AddLink(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink4.testcase.

1
2
3
4
5
6
7
AddLink - BLOB Network
:memory: #use in-memory database
SELECT ST_AddLink(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink5.testcase.

1
2
3
4
5
6
7
AddLink - Text Network
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink6.testcase.

1
2
3
4
5
6
7
AddLink - NULL Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink7.testcase.

1
2
3
4
5
6
7
AddLink - Double Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink8.testcase.

1
2
3
4
5
6
7
AddLink - Text Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/addlink9.testcase.

1
2
3
4
5
6
7
AddLink - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom1.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - NULL Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom10.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Double Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom11.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - NULL Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom12.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Text Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 'edge', 'geom');
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 'edge', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom13.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 'edge', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 'edge', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom14.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Point Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom15.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Polygon Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom16.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom17.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - NULL Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom2.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Int Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom3.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Double Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom4.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Blob Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom5.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Text Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom6.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Double Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom7.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - BLOB Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom8.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Text Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 'edge', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 'Edge', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changeedgegeom9.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Int Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom1.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - NULL Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom2.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Int Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom3.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Double Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom4.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Blob Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom5.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Text Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom6.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Double Link
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom7.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - BLOB Link
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/changelinkgeom8.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Text Link
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', 'Link', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', 'Link', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork1.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL Network
:memory: #use in-memory database
SELECT CreateNetwork(NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork10.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads2', 1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads2', 1)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork11.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL Srid
:memory: #use in-memory database
SELECT CreateNetwork('roadsB', 1, NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsB', 1, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork12.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int Srid
:memory: #use in-memory database
SELECT CreateNetwork('roadsC', 1, 4326);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsC', 1, 4326);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork13.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double Srid
:memory: #use in-memory database
SELECT CreateNetwork('roadsD', 1, 1.5);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsD', 1, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork14.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text Srid
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork15.testcase.

1
2
3
4
5
6
7
CreateNetwork - Blob Srid
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork16.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roadsZ', 1, 4326, NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsZ', 1, 4326, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork17.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roadsX', 1, 4326, 1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsX', 1, 4326, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork18.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roadsD', 1, 4326, 1.5);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsD', 1, 4326, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork19.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork2.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int Network
:memory: #use in-memory database
SELECT CreateNetwork(1);
1 # rows (not including the header row)
1 # columns
CreateNetwork(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork20.testcase.

1
2
3
4
5
6
7
CreateNetwork - Blob hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork21.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roadsW', 1, 4326, 1, NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsW', 1, 4326, 1, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork22.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roadsY', 1, 4326, 1, 1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsY', 1, 4326, 1, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork23.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roadsE', 1, 4326, 1, 1.5);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsE', 1, 4326, 1, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork24.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, 1, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, 1, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork25.testcase.

1
2
3
4
5
6
7
CreateNetwork - Blob allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, 1, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork3.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double Network
:memory: #use in-memory database
SELECT CreateNetwork(1.1);
1 # rows (not including the header row)
1 # columns
CreateNetwork(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork4.testcase.

1
2
3
4
5
6
7
CreateNetwork - BLOB Network
:memory: #use in-memory database
SELECT CreateNetwork(zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork5.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text Network
:memory: #use in-memory database
SELECT CreateNetwork('roads');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork6.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roadsA', NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsA', NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork7.testcase.

1
2
3
4
5
6
7
CreateNetwork - BLOB Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads', zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork8.testcase.

1
2
3
4
5
6
7
CreateNetwork - TEXT Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads', 'beta');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 'beta')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createnetwork9.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads', 3.1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 3.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo1.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo10.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - non existing Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo2.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Int Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo3.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Double Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo4.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - BLOB Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo5.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - NULL GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo6.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Int GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', 1);
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo7.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Double GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', 1.4);
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', 1.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo8.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Text GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', 'geom');
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopogeo9.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Invalid BLOB GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', zeroblob(100));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', zeroblob(100))
SQL/MM Spatial exception - not a Geometry.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Text Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Int Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer18.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer19.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer20.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer21.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Text TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer22.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer23.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - TEXT is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer24.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer25.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer26.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Integer is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology1.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL Topology
:memory: #use in-memory database
SELECT CreateTopology(NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology10.testcase.

1
2
3
4
5
6
7
CreateTopology - Int Srid
:memory: #use in-memory database
SELECT CreateTopology('topo2', 4326);
1 # rows (not including the header row)
1 # columns
CreateTopology('topo2', 4326)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology11.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoB', 4326, NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoB', 4326, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology12.testcase.

1
2
3
4
5
6
7
CreateTopology - Int tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoC', 4326, 1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoC', 4326, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology13.testcase.

1
2
3
4
5
6
7
CreateTopology - Double tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoD', 4326, 1.5);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoD', 4326, 1.5);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology14.testcase.

1
2
3
4
5
6
7
CreateTopology - Text tolerance
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology15.testcase.

1
2
3
4
5
6
7
CreateTopology - Blob tolerance
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology16.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL hasZ
:memory: #use in-memory database
SELECT CreateTopology('topoZ', 4326, 1, NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoZ', 4326, 1, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology17.testcase.

1
2
3
4
5
6
7
CreateTopology - Int hasZ
:memory: #use in-memory database
SELECT CreateTopology('topoX', 4326, 1, 1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoX', 4326, 1, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology18.testcase.

1
2
3
4
5
6
7
CreateTopology - Double hasZ
:memory: #use in-memory database
SELECT CreateTopology('topoD', 4326, 1, 1.5);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoD', 4326, 1, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology19.testcase.

1
2
3
4
5
6
7
CreateTopology - Text hasZ
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, 1, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, 1, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology2.testcase.

1
2
3
4
5
6
7
CreateTopology - Int Topology
:memory: #use in-memory database
SELECT CreateTopology(1);
1 # rows (not including the header row)
1 # columns
CreateTopology(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology20.testcase.

1
2
3
4
5
6
7
CreateTopology - Blob hasZ
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, 1, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology3.testcase.

1
2
3
4
5
6
7
CreateTopology - Double Topology
:memory: #use in-memory database
SELECT CreateTopology(1.1);
1 # rows (not including the header row)
1 # columns
CreateTopology(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology4.testcase.

1
2
3
4
5
6
7
CreateTopology - BLOB Topology
:memory: #use in-memory database
SELECT CreateTopology(zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology5.testcase.

1
2
3
4
5
6
7
CreateTopology - Text Topology
:memory: #use in-memory database
SELECT CreateTopology('topo1');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo1')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology6.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL Srid
:memory: #use in-memory database
SELECT CreateTopology('topoA', NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoA', NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology7.testcase.

1
2
3
4
5
6
7
CreateTopology - BLOB Srid
:memory: #use in-memory database
SELECT CreateTopology('topo', zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology8.testcase.

1
2
3
4
5
6
7
CreateTopology - TEXT Srid
:memory: #use in-memory database
SELECT CreateTopology('topo', 'alpha');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 'alpha')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/createtopology9.testcase.

1
2
3
4
5
6
7
CreateTopology - Double Srid
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326.1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/dropnetwork1.testcase.

1
2
3
4
5
6
7
DropNetwork - NULL Network
:memory: #use in-memory database
SELECT DropNetwork(NULL);
1 # rows (not including the header row)
1 # columns
DropNetwork(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/dropnetwork2.testcase.

1
2
3
4
5
6
7
DropNetwork - Int Network
:memory: #use in-memory database
SELECT DropNetwork(1);
1 # rows (not including the header row)
1 # columns
DropNetwork(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/dropnetwork3.testcase.

1
2
3
4
5
6
7
DropNetwork - Double Network
:memory: #use in-memory database
SELECT DropNetwork(1.1);
1 # rows (not including the header row)
1 # columns
DropNetwork(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/dropnetwork4.testcase.

1
2
3
4
5
6
7
DropNetwork - BLOB Network
:memory: #use in-memory database
SELECT DropNetwork(zeroblob(4));
1 # rows (not including the header row)
1 # columns
DropNetwork(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/dropnetwork5.testcase.

1
2
3
4
5
6
7
DropNetwork - Text Network
:memory: #use in-memory database
SELECT DropNetwork('topoW');
1 # rows (not including the header row)
1 # columns
DropNetwork('topoW')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/droptopology1.testcase.

1
2
3
4
5
6
7
DropTopology - NULL Topology
:memory: #use in-memory database
SELECT DropTopology(NULL);
1 # rows (not including the header row)
1 # columns
DropTopology(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/droptopology2.testcase.

1
2
3
4
5
6
7
DropTopology - Int Topology
:memory: #use in-memory database
SELECT DropTopology(1);
1 # rows (not including the header row)
1 # columns
DropTopology(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/droptopology3.testcase.

1
2
3
4
5
6
7
DropTopology - Double Topology
:memory: #use in-memory database
SELECT DropTopology(1.1);
1 # rows (not including the header row)
1 # columns
DropTopology(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/droptopology4.testcase.

1
2
3
4
5
6
7
DropTopology - BLOB Topology
:memory: #use in-memory database
SELECT DropTopology(zeroblob(4));
1 # rows (not including the header row)
1 # columns
DropTopology(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/droptopology5.testcase.

1
2
3
4
5
6
7
DropTopology - Text Topology
:memory: #use in-memory database
SELECT DropTopology('topoW');
1 # rows (not including the header row)
1 # columns
DropTopology('topoW')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(NULL, 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(NULL, 'topolayer', 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer18.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer19.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(1, 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(1, 'topolayer', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer20.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer21.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer22.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer23.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(1.5, 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(1.5, 'topolayer', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(zeroblob(5), 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(zeroblob(5), 'topolayer', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 1.5, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 1.5, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/exporttopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(NULL, 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(NULL, 'topolayer', 'out', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Integer output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - BLOB output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Text output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double FID
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 'out', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 'out', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text FID
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 'fid');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 'fid')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - BLOB FID
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Integer Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(1, 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(1, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(1.5, 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(1.5, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(zeroblob(5), 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(zeroblob(5), 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, NULL, 'out', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Integer TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 1, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 1, 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 1.5, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 1.5, 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', zeroblob(4), 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, zeroblob(4), 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/featuretopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint1.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - NULL Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(NULL, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(NULL, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint10.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', 1.1, 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint11.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', NULL, 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint12.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', 'geom', 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint13.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint14.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint15.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint16.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint17.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint2.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Int Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(1, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(1, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint3.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(1.5, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(1.5, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint4.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Blob Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(zeroblob(4), MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(zeroblob(4),MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint5.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Text Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint6.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint7.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint8.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgebypoint9.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed1.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed2.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed3.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed4.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed5.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed6.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - NULL Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed7.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Double Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', 1.3);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed8.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Text Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', 'face');
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getedgeseed9.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - BLOB Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint1.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - NULL Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(NULL, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(NULL, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint10.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', 1.1, 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint11.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', NULL, 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint12.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', 'geom', 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint13.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint14.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint15.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint16.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint17.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint2.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Int Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(1, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(1, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint3.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(1.5, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(1.5, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint4.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Blob Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(zeroblob(4), MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(zeroblob(4),MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint5.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Text Topology
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint6.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint7.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint8.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacebypoint9.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges1.testcase.

1
2
3
4
5
6
7
GetFaceEdges - NULL Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges2.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Int Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(1, -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges3.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Double Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges4.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Blob Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges5.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Text Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges6.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Double Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges7.testcase.

1
2
3
4
5
6
7
GetFaceEdges - BLOB Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges8.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Text Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', 'node');
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceedges9.testcase.

1
2
3
4
5
6
7
GetFaceEdges - NULL Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry1.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - NULL Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(NULL, 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry2.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Int Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(1, 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry3.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Double Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(1.2, 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry4.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - BLOB Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry5.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Text Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry6.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - NULL Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry7.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Double Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', 1.3);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry8.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Text Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', 'face');
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfacegeometry9.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - BLOB Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed1.testcase.

1
2
3
4
5
6
7
GetFaceSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed2.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed3.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed4.testcase.

1
2
3
4
5
6
7
GetFaceSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed5.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed6.testcase.

1
2
3
4
5
6
7
GetFaceSeed - NULL Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed7.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Double Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', 1.3);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed8.testcase.

1
2
3
4
5
6
7
TopoGeo_GetFaceSeed - Text Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', 'face');
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getfaceseed9.testcase.

1
2
3
4
5
6
7
GetFaceSeed - BLOB Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint1.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - NULL Network
:memory: #use in-memory database
SELECT GetLinkByPoint(NULL, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(NULL, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint10.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', 1.1, 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint11.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', NULL, 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint12.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', 'geom', 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint13.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint14.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint15.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint16.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint17.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint2.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Int Network
:memory: #use in-memory database
SELECT GetLinkByPoint(1, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(1, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint3.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double Network
:memory: #use in-memory database
SELECT GetLinkByPoint(1.5, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(1.5, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint4.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Blob Network
:memory: #use in-memory database
SELECT GetLinkByPoint(zeroblob(4), MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(zeroblob(4),MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint5.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Text Network
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint6.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint7.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint8.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkbypoint9.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', -1, 1);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed1.testcase.

1
2
3
4
5
6
7
GetLinkSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed2.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Int Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(1, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed3.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Double Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed4.testcase.

1
2
3
4
5
6
7
GetLinkSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed5.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Text Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed6.testcase.

1
2
3
4
5
6
7
GetLinkSeed - NULL Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed7.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Double Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', 1.3);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed8.testcase.

1
2
3
4
5
6
7
TopoNet_GetLinkSeed - Text Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', 'face');
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getlinkseed9.testcase.

1
2
3
4
5
6
7
GetLinkSeed - BLOB Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint1.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - NULL Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(NULL, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(NULL, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint10.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', 1.1, 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint11.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', NULL, 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint12.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', 'geom', 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint13.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint14.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint15.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint16.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint17.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint2.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Int Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(1, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(1, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint3.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(1.5, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(1.5, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint4.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Blob Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(zeroblob(4), MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(zeroblob(4),MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint5.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Text Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint6.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint7.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint8.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnetnodebypoint9.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', -1, 1);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint1.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - NULL Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(NULL, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(NULL, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint10.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', 1.1, 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint11.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', NULL, 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint12.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', 'geom', 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint13.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint14.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint15.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint16.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint17.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint2.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Int Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(1, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(1, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint3.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(1.5, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(1.5, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint4.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Blob Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(zeroblob(4), MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(zeroblob(4),MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint5.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Text Topology
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint6.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint7.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint8.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/getnodebypoint9.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(NULL, NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(NULL, NULL, 'table', 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Text TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(1, NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(1, NULL, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(1.5, NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(1.5, NULL, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(zeroblob(4), NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(zeroblob(4), NULL, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', 'a', 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', 'a', 'table', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', 1, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', 1, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', 1.2, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', 1.2, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/inittopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', zeroblob(4), 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', zeroblob(4), 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed1.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed10.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - NULL distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed11.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - TEXT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 'dist');
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 'dist')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed12.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - BLOB distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', zeroblob(5));
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', zeroblob(5))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed13.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - INT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed14.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - DOUBLE distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed15.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - point instead of line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('POINT(1 1)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('POINT((1 1)'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed16.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - multilinestring instead of linestring
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('MULTILINESTRING((1 1, 1 2), (2 2, 3 3))'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('MULTILINESTRING((1 1, 1 2), (2 2, 3 3))'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed17.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - polygon instead of line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed2.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - INT Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed3.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - DOUBLE Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed4.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed5.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - NULL line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(NULL, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(NULL, 'topo', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed6.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - INT line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed7.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - DOUBLE line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(1.1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(1.1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed8.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - TEXT line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed('line', 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed('line', 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/linesnapseed9.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - invalid BLOB line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(zeroblob(100), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(zeroblob(100), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo1.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - NULL Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(NULL, 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(NULL, 'topology')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo2.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Int Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(1, 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(1, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo3.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Double Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(1.5, 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(1.5, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo4.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Blob Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(zeroblob(4), 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(zeroblob(4), 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo5.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Text Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', 'topology')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo6.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', NULL);
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo7.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - INT Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', 1);
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo8.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Double Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', 1.2);
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/loginetfromtgeo9.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - BLOB Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal1.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - NULL Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal10.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - NULL Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal11.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Double Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal12.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Text Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal13.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - BLOB Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal2.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Int Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal3.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Double Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal4.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - BLOB Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal5.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Text Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal6.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - NULL Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal7.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Double Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal8.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Text Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgeheal9.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - BLOB Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit1.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - NULL Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit10.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Double Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit11.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - NULL Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit12.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Text Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit13.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit14.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Linestring Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit15.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Polygon Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit16.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit2.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Int Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit3.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Double Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit4.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Blob Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit5.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Text Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit6.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Double Face
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit7.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - BLOB Face
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit8.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Text Face
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 'face', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 'face', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modedgesplit9.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit1.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit2.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit3.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit4.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit5.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit6.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit7.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit8.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modgeolinksplit9.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', -1, 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal1.testcase.

1
2
3
4
5
6
7
ModLinkHeal - NULL Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal10.testcase.

1
2
3
4
5
6
7
ModLinkHeal - NULL Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal11.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Double Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal12.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Text Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal13.testcase.

1
2
3
4
5
6
7
ModLinkHeal - BLOB Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal2.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Int Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal3.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Double Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal4.testcase.

1
2
3
4
5
6
7
ModLinkHeal - BLOB Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal5.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Text Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal6.testcase.

1
2
3
4
5
6
7
ModLinkHeal - NULL Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal7.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Double Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal8.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Text Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modlinkheal9.testcase.

1
2
3
4
5
6
7
ModLinkHeal - BLOB Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit1.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit2.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(1, -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit3.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit4.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit5.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit6.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit7.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit8.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/modloglinksplit9.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - NULL Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode1.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - NULL Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode2.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Int Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode3.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Double Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode4.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Blob Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode5.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Double Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode6.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - BLOB Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode7.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Text Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', 'node', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', 'node', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode8.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - NULL Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonetnode9.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - invalid network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', 1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNetNode('net', 1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode1.testcase.

1
2
3
4
5
6
7
MoveIsoNode - NULL Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode10.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Double Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode11.testcase.

1
2
3
4
5
6
7
MoveIsoNode - NULL Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode12.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Text Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode13.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode14.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Linestring Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode15.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Polygon Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode16.testcase.

1
2
3
4
5
6
7
MoveIsoNode - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode17.testcase.

1
2
3
4
5
6
7
MoveIsoNode - NULL Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode2.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Int Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode3.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Double Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode4.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Blob Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode5.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Text Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode6.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Double Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode7.testcase.

1
2
3
4
5
6
7
MoveIsoNode - BLOB Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode8.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Text Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 'node', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 'node', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/moveisonode9.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Int Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/netexception1.testcase.

1
2
3
4
5
6
7
GetLastNetworkException - NULL Network
:memory: #use in-memory database
SELECT GetLastNetworkException(NULL);
1 # rows (not including the header row)
1 # columns
GetLastNetworkException(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/netexception2.testcase.

1
2
3
4
5
6
7
GetLastNetworkException - Undefined Network
:memory: #use in-memory database
SELECT GetLastNetworkException('net');
1 # rows (not including the header row)
1 # columns
GetLastNetworkException('net')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal1.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - NULL Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal10.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - NULL Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal11.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Double Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal12.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Text Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal13.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - BLOB Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal2.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Int Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal3.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Double Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal4.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - BLOB Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal5.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Text Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal6.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - NULL Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal7.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Double Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal8.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Text Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgeheal9.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - BLOB Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit1.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - NULL Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit10.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Double Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit11.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - NULL Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit12.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Text Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit13.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit14.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Linestring Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit15.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Polygon Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit16.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit2.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Int Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit3.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Double Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit4.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Blob Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit5.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Text Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit6.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Double Face
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit7.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - BLOB Face
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit8.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Text Face
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 'face', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 'face', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newedgessplit9.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit1.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit2.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit3.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit4.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit5.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit6.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit7.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit8.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newgeolinksplit9.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', -1, 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal1.testcase.

1
2
3
4
5
6
7
NewLinkHeal - NULL Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal10.testcase.

1
2
3
4
5
6
7
NewLinkHeal - NULL Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal11.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Double Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal12.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Text Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal13.testcase.

1
2
3
4
5
6
7
NewLinkHeal - BLOB Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal2.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Int Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal3.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Double Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal4.testcase.

1
2
3
4
5
6
7
NewLinkHeal - BLOB Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal5.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Text Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal6.testcase.

1
2
3
4
5
6
7
NewLinkHeal - NULL Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal7.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Double Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal8.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Text Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newlinkheal9.testcase.

1
2
3
4
5
6
7
NewLinkHeal - BLOB Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit1.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit2.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(1, -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit3.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit4.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit5.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit6.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit7.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit8.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/newloglinksplit9.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - NULL Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed1.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed10.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - NULL distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed11.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - TEXT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 'dist');
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 'dist')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed12.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - BLOB distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', zeroblob(5));
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', zeroblob(5))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed13.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - INT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed14.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - DOUBLE distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed15.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - linestring instead of point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(ST_GeomFromText('LINESTRING(1 1, 2 2)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(ST_GeomFromText('LINESTRING(1 1, 2 2)'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed16.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - multipoint instead of point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(ST_GeomFromText('MULTIPOINT(1 1, 1 2)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(ST_GeomFromText('MULTIPOINT(1 1, 1 2)'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed17.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - polygon instead of point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed2.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - INT Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed3.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - DOUBLE Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed4.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed5.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - NULL point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(NULL, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(NULL, 'topo', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed6.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - INT point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed7.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - DOUBLE point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(1.1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(1.1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed8.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - TEXT point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed('point', 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed('point', 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/pointsnapseed9.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - invalid BLOB point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(zeroblob(100), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(zeroblob(100), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface1.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - NULL Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface2.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Int Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface3.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Double Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface4.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Blob Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface5.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Text Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface6.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Double Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface7.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - BLOB Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface8.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Text Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', 'edge');
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', 'edge')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgemodface9.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - NULL Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface1.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - NULL Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface2.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Int Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface3.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Double Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface4.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Blob Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface5.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Text Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface6.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Double Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface7.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - BLOB Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface8.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Text Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', 'edge');
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', 'edge')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remedgenewface9.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - NULL Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge1.testcase.

1
2
3
4
5
6
7
RemIsoEdge - NULL Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge2.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Int Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge3.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Double Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge4.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Blob Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge5.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Text Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge6.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Double Edge
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge7.testcase.

1
2
3
4
5
6
7
RemIsoNode - BLOB RemIsoEdge
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge8.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Text Edge
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisoedge9.testcase.

1
2
3
4
5
6
7
RemIsoEdge - NULL Edge
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode1.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - NULL Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode2.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Int Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode3.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Double Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode4.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Blob Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode5.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Text Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode6.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Double Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode7.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - BLOB Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode8.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Text Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonetnode9.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - NULL Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode1.testcase.

1
2
3
4
5
6
7
RemIsoNode - NULL Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode2.testcase.

1
2
3
4
5
6
7
RemIsoNode - Int Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode3.testcase.

1
2
3
4
5
6
7
RemIsoNode - Double Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode4.testcase.

1
2
3
4
5
6
7
RemIsoNode - Blob Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode5.testcase.

1
2
3
4
5
6
7
RemIsoNode - Text Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode6.testcase.

1
2
3
4
5
6
7
RemIsoNode - Double Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode7.testcase.

1
2
3
4
5
6
7
RemIsoNode - BLOB Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode8.testcase.

1
2
3
4
5
6
7
RemIsoNode - Text Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remisonode9.testcase.

1
2
3
4
5
6
7
RemIsoNode - NULL Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink1.testcase.

1
2
3
4
5
6
7
RemoveLink - NULL Network
:memory: #use in-memory database
SELECT ST_RemoveLink(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink2.testcase.

1
2
3
4
5
6
7
RemoveLink - Int Network
:memory: #use in-memory database
SELECT ST_RemoveLink(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink3.testcase.

1
2
3
4
5
6
7
RemoveLink - Double Network
:memory: #use in-memory database
SELECT ST_RemoveLink(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink4.testcase.

1
2
3
4
5
6
7
RemoveLink - Blob Network
:memory: #use in-memory database
SELECT ST_RemoveLink(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink5.testcase.

1
2
3
4
5
6
7
RemoveLink - Text Network
:memory: #use in-memory database
SELECT ST_RemoveLink('net', -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink6.testcase.

1
2
3
4
5
6
7
RemoveLink - Double Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink7.testcase.

1
2
3
4
5
6
7
RemoveLink - BLOB Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink8.testcase.

1
2
3
4
5
6
7
RemoveLink - Text Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', 'link')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/remlink9.testcase.

1
2
3
4
5
6
7
RemoveLink - NULL Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(1.5, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(1.5, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - TEXT TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - INT TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/removetopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom1.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - NULL Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom10.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - non existing Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom2.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Int Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom3.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Double Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom4.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - BLOB Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom5.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - NULL GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', NULL);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom6.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Int GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', 1);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom7.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Double GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', 1.4);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', 1.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom8.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Text GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', 'geom');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromgeom9.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Invalid BLOB GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', zeroblob(100));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', zeroblob(100))
SQL/MM Spatial exception - not a Geometry.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo1.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - NULL Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(NULL, 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(NULL, 'topology')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo2.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Int Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(1, 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(1, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo3.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Double Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(1.5, 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(1.5, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo4.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Blob Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(zeroblob(4), 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(zeroblob(4), 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo5.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Text Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', 'topology')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo6.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', NULL);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo7.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - INT Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', 1);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo8.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Double Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', 1.2);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/spatnetfromtgeo9.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - BLOB Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topoexception1.testcase.

1
2
3
4
5
6
7
GetLastTopologyException - NULL Topology
:memory: #use in-memory database
SELECT GetLastTopologyException(NULL);
1 # rows (not including the header row)
1 # columns
GetLastTopologyException(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topoexception2.testcase.

1
2
3
4
5
6
7
GetLastTopologyException - Undefined Topology
:memory: #use in-memory database
SELECT GetLastTopologyException('topo');
1 # rows (not including the header row)
1 # columns
GetLastTopologyException('topo')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline1.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline10.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', 1.1, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline11.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline12.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', 'geom', 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline13.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline14.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Point Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', MakePoint(0, 1, 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', MakePoint(0, 1, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline15.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Polygon Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline16.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - MULTILINESTRING Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))', 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline17.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - NULL Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline2.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(1, GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(1, GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline3.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(1.5, GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(1.5, GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline4.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline5.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline6.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline7.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - BLOB Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline8.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Text Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddline9.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint1.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(NULL, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(NULL, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint10.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', 1.1, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', 1.1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint11.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint12.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', 'geom', 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', 'geom', 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint13.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint14.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Linestring Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint15.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Polygon Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint16.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint17.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - NULL Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint2.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(1, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(1, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint3.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(1.5, MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(1.5, MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint4.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(zeroblob(4), MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(zeroblob(4),MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint5.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint6.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint7.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint8.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Text Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoaddpoint9.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone1.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - NULL Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone('a', NULL, 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone('a', NULL, 'destination')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone10.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Double db-prefix
:memory: #use in-memory database
SELECT TopoGeo_Clone(1.5, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone11.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - BLOB db-prefix
:memory: #use in-memory database
SELECT TopoGeo_Clone(zeroblob(4), 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(zeroblob(4), 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone12.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Integer db-prefix
:memory: #use in-memory database
SELECT TopoGeo_Clone(1, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(1, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone2.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Int Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone('a', 1, 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone('a', 1, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone3.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Double Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 1.5, 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 1.5, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone4.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Blob Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, zeroblob(4), 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, zeroblob(4), 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone5.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Text Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'topology', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'topology', 'destination')
SQL/MM Spatial exception - invalid topology name (origin).
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone6.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - NULL Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone7.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - INT Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone8.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Double Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoclone9.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - BLOB Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext1.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(NULL, NULL, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(NULL, NULL, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext10.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, NULL, NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, NULL, NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext11.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 1, NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 1, NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext12.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 1.2, NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 1.2, NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext13.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, zeroblob(4), NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, zeroblob(4), NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext14.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', 'column', 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', 'column', 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext15.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Int Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext16.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1.2, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1.2, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext17.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', zeroblob(4), 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', zeroblob(4), 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext18.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext19.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'zero', 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'zero', 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext2.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(1, NULL, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(1, NULL, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext20.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, zeroblob(4), 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, zeroblob(4), 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext21.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext22.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext23.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', 1.5, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', 1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext24.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', 'abc', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', 'abc', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext25.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext26.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Integer line-max-points / Integer max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext27.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext28.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext29.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext3.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(1.5, NULL, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(1.5, NULL, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext30.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, 5000.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview', -1, 5000.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext31.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, NULL, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, NULL, 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext32.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext33.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - DOUBLE dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1.2, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1.2, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext34.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - DOUBLE dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1.2, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1.2, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext35.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, zeroblob(5), 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, zeroblob(5), 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext36.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, NULL, 'dustbin')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext37.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1, 'dustbin')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext38.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - DOUBLE dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 1.2, 'dustbin')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext39.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0.001, 'dustbin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext4.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(zeroblob(4), NULL, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(zeroblob(4), NULL, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext5.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext6.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', 'a', 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', 'a', 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext7.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', 1, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', 1, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext8.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', 1.2, 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', 1.2, 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromext9.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', zeroblob(4), 'table', NULL, 0, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', zeroblob(4), 'table', NULL, 0, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable1.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(NULL, NULL, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(NULL, NULL, 'table', NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable10.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, NULL, NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, NULL, NULL, 0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable11.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - INT table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 1, NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 1, NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable12.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 1.2, NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 1.2, NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable13.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, zeroblob(4), NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, zeroblob(4), NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable14.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', 'column', 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', 'column', 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable15.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', 1, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', 1, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable16.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', 1.2, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', 1.2, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable17.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', zeroblob(4), 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', zeroblob(4), 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable18.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable19.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 'zero');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 'zero')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable2.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(1, NULL, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(1, NULL, 'table', NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable20.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable21.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0.001);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0.001)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable22.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, NULL, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable23.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, 1.5, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, 1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable24.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, 'abc', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, 'abc', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable25.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable26.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Integer line-max-points / Integer max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable27.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable28.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable29.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable3.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(1.5, NULL, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(1.5, NULL, 'table', NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable30.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, 5000.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0, -1, 5000.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable4.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(zeroblob(4), NULL, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(zeroblob(4), NULL, 'table', NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable5.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable6.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', 'a', 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', 'a', 'table', NULL, 0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable7.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', 1, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', 1, 'table', NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable8.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', 1.2, 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', 1.2, 'table', NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeofromtable9.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', zeroblob(4), 'table', NULL, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', zeroblob(4), 'table', NULL, 0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremoveedges1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges (NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges (NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremoveedges2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremoveedges3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremoveedges4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremoveedges5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovenodes1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes (NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes (NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovenodes2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovenodes3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovenodes4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovenodes5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces (NULL, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces (NULL, 0.1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces(1, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces(1, NULL, 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces(1.5, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces(1.5, 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces(zeroblob(4), 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces(zeroblob(4), 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall6.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - TEXT min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 'a');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 'a')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall7.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - INT min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall8.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - NULL min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoremovesmall9.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline1.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Ok #1
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 1, 2 3)', 4326), 512, -1));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 1, 2 3)', 4326), 512, -1))
MULTILINESTRING((0 1, 2 3))
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline10.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Text max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'alpha', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'alpha', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline11.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - BLOB max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4), -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline12.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), -1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), -1, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline13.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - TEXT max-length
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), -1, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), -1, 'abc')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline14.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), -1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), -1, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline15.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Int max-length
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGM(1 2 3, 4 5 6)', 4326), -1, 1000));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGM(1 2 3, 4 5 6)', 4326), -1, 1000))
MULTILINESTRING M((1 2 3, 4 5 6))
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline16.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Double max-length
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), -1, 1000.0));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), -1, 1000.0))
MULTILINESTRING ZM((1 2 3 4, 5 6 7 8))
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline2.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Ok #2
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZ(1 2 3, 4 5 6)', 4326), -1, -1));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZ(1 2 3, 4 5 6)', 4326), -1, -1))
MULTILINESTRING Z((1 2 3, 4 5 6))
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline3.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(NULL, -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(NULL, -1, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline4.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Integer Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(1, -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(1, -1, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline5.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(1.2, -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(1.2, -1, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline6.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines('alpha', -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines('alpha', -1, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline7.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(zeroblob(100), -1, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(zeroblob(100), -1, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline8.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NULL max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeosplitline9.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Double max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 1.5, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 1.5, -1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable1.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable10.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable11.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable12.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable13.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable14.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable15.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable16.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable17.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable18.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable19.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable2.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable20.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable21.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable22.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable23.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable24.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable25.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable26.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable3.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable4.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable5.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable6.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable7.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable8.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototable9.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen1.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen10.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, NULL, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, NULL, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen11.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 1, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 1, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen12.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 1.2, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 1.2, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen13.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, zeroblob(4), NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, zeroblob(4), NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen14.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 'column', 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 'column', 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen15.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Int Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen16.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1.2, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1.2, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen17.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', zeroblob(4), 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', zeroblob(4), 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen18.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen19.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen2.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen20.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen21.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen22.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 'no', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 'no', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen23.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB toleramce
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen24.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double toleramce
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen25.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL toleramce
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen26.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Integer tolerance
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen27.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen28.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen29.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen3.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen30.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen31.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen4.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen5.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen6.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', 'a', 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', 'a', 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen7.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', 1, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', 1, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen8.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', 1.2, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', 1.2, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeototablegen9.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', zeroblob(4), 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', zeroblob(4), 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds1.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - NULL Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds10.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Text mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', 'mode');
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', 'mode')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds2.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Int Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds3.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Double Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds4.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Blob Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds5.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Text Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds6.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - NULL mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds7.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Int mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds8.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Double mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topogeoupdateseeds9.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Blob mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/topomettotable25.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone1.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - NULL Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, NULL, 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, NULL, 'destination')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone10.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Double db-prefix
:memory: #use in-memory database
SELECT TopoNet_Clone(1.5, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(1.5, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone11.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Integer db-prefix
:memory: #use in-memory database
SELECT TopoNet_Clone(1, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(1, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone12.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - BLOB db-prefix
:memory: #use in-memory database
SELECT TopoNet_Clone(zeroblob(4), 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(zeroblob(4), 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone2.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Int Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone("a", 1, 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone("a", 1, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone3.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Double Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone("a", 1.5, 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone("a", 1.5, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone4.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Blob Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, zeroblob(4), 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, zeroblob(4), 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone5.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Text Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'topology', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'topology', 'destination')
SQL/MM Spatial exception - invalid network name (origin).
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone6.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - NULL Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone7.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - INT Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone8.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Double Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetclone9.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - BLOB Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable1.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - NULL Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(NULL, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(NULL, NULL, 'table', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable10.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - NULL table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, NULL, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable11.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - INT table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 1, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable12.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 1.2, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 1.2, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable13.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - BLOB table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, zeroblob(4), NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, zeroblob(4), NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable14.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', 'column');
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', 'column')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable15.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable16.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable17.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable2.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Int Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(1, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(1, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable3.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(1.5, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(1.5, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable4.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Blob Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(zeroblob(4), NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(zeroblob(4), NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable5.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Text Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', NULL)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable6.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', 'a', 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', 'a', 'table', NULL)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable7.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', 1, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', 1, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable8.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', 1.2, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', 1.2, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetfromtable9.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', zeroblob(4), 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', zeroblob(4), 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable1.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable10.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable11.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - INT ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable12.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable13.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable14.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable15.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable16.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable17.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable18.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable19.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable2.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Int Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable20.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable21.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable22.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 'no');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable23.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable24.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1.1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable25.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL with-spatial-index
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable26.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable3.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable4.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Blob Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable5.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable6.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable7.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable8.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotable9.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen1.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen10.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, NULL, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, NULL, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen11.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - INT ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 1, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 1, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen12.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 1.2, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 1.2, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen13.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, zeroblob(4), NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, zeroblob(4), NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen14.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 'column', 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 'column', 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen15.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Int Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen16.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1.2, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1.2, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen17.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', zeroblob(4), 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', zeroblob(4), 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen18.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen19.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen2.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Int Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen20.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen21.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen22.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 'tol');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen23.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen24.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1.1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1.1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen25.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen26.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Integer tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen27.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 'no');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen28.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen29.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1.1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen3.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen30.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen31.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen4.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Blob Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen5.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen6.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', 'a', 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', 'a', 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen7.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - INT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', 1, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', 1, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen8.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', 1.2, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', 1.2, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponettotablegen9.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', zeroblob(4), 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', zeroblob(4), 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds1.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - NULL Network
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds10.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Text mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', 'mode');
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', 'mode')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds2.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Int Network
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(1);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds3.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Double Network
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(1.5);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds4.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Blob Network 
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds5.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Text Network 
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network');
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds6.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - NULL mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds7.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Int mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds8.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Double mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', 1.5);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/toponetupdateseeds9.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Blob mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validatetopogeo1.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(NULL);
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validatetopogeo2.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Int Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(1);
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validatetopogeo3.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Double Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(1.5);
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validatetopogeo4.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Blob Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validatetopogeo5.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Text Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo('topology');
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validlogicalnet1.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - NULL Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(NULL);
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validlogicalnet2.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Int Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(1);
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validlogicalnet3.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Double Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(1.5);
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validlogicalnet4.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Blob Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validlogicalnet5.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Text Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet('network');
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validspatialnet1.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - NULL Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(NULL);
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validspatialnet2.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Int Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(1);
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validspatialnet3.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Double Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(1.5);
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validspatialnet4.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Blob Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_lwgeom_22_tests/validspatialnet5.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Text Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet('network');
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Added test/sql_stmt_lwgeom_tests/3ddistance1.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - two 2D points
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), MakePoint(4, 6))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), MakePoint(4, 6))
5.0

Added test/sql_stmt_lwgeom_tests/3ddistance10.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - two 3D linestring
:memory: #use in-memory database
SELECT ST_3DDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1 # rows (not including the header row)
1 # columns
ST_3DDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1.262388:6

Added test/sql_stmt_lwgeom_tests/3ddistance2.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - two 2D identical points
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), MakePoint(1, 2))
0.0

Added test/sql_stmt_lwgeom_tests/3ddistance3.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - bad blob first arg
:memory: #use in-memory database
SELECT ST_3DDistance(zeroblob(100), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(zeroblob(100), MakePoint(1, 2))
(NULL)

Added test/sql_stmt_lwgeom_tests/3ddistance4.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), zeroblob(100))
(NULL)

Added test/sql_stmt_lwgeom_tests/3ddistance5.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - non-blob first arg
:memory: #use in-memory database
SELECT ST_3DDistance(3, MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(3, MakePoint(1, 2))
(NULL)

Added test/sql_stmt_lwgeom_tests/3ddistance6.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), "hello")
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), "hello")
(NULL)

Added test/sql_stmt_lwgeom_tests/3ddistance7.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - parallel 2D lines
:memory: #use in-memory database
SELECT ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
2.0

Added test/sql_stmt_lwgeom_tests/3ddistance8.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - intersecting 2D lines
:memory: #use in-memory database
SELECT ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
0.0

Added test/sql_stmt_lwgeom_tests/3ddistance9.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DDistance - two 3D points
:memory: #use in-memory database
SELECT ST_3DDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5));
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5))
5.385164:6

Added test/sql_stmt_lwgeom_tests/3dmaxdistance1.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - two 2D points
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), MakePoint(4, 6))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), MakePoint(4, 6))
5.0

Added test/sql_stmt_lwgeom_tests/3dmaxdistance10.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - two 3D linestring
:memory: #use in-memory database
SELECT ST_3DMaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
10.862780:6

Added test/sql_stmt_lwgeom_tests/3dmaxdistance2.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - two 2D identical points
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), MakePoint(1, 2))
0.0

Added test/sql_stmt_lwgeom_tests/3dmaxdistance3.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - bad blob first arg
:memory: #use in-memory database
SELECT ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
(NULL)

Added test/sql_stmt_lwgeom_tests/3dmaxdistance4.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), zeroblob(100))
(NULL)

Added test/sql_stmt_lwgeom_tests/3dmaxdistance5.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - non-blob first arg
:memory: #use in-memory database
SELECT ST_3DMaxDistance(3, MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(3, MakePoint(1, 2))
(NULL)

Added test/sql_stmt_lwgeom_tests/3dmaxdistance6.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), "hello")
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), "hello")
(NULL)

Added test/sql_stmt_lwgeom_tests/3dmaxdistance7.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - parallel 2D lines
:memory: #use in-memory database
SELECT ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
10.198039:6

Added test/sql_stmt_lwgeom_tests/3dmaxdistance8.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - intersecting 2D lines
:memory: #use in-memory database
SELECT ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
11.180339:6

Added test/sql_stmt_lwgeom_tests/3dmaxdistance9.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
3DMaxDistance - two 3D points
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5));
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5))
5.385164:6

Added test/sql_stmt_lwgeom_tests/Makefile.am.





































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290

EXTRA_DIST = 3ddistance10.testcase \
	3ddistance1.testcase \
	3ddistance2.testcase \
	3ddistance3.testcase \
	3ddistance4.testcase \
	3ddistance5.testcase \
	3ddistance6.testcase \
	3ddistance7.testcase \
	3ddistance8.testcase \
	3ddistance9.testcase \
	3dmaxdistance10.testcase \
	3dmaxdistance1.testcase \
	3dmaxdistance2.testcase \
	3dmaxdistance3.testcase \
	3dmaxdistance4.testcase \
	3dmaxdistance5.testcase \
	3dmaxdistance6.testcase \
	3dmaxdistance7.testcase \
	3dmaxdistance8.testcase \
	3dmaxdistance9.testcase \
	maxdistance10.testcase \
	maxdistance1.testcase \
	maxdistance2.testcase \
	maxdistance3.testcase \
	maxdistance4.testcase \
	maxdistance5.testcase \
	maxdistance6.testcase \
	maxdistance7.testcase \
	maxdistance8.testcase \
	maxdistance9.testcase \
	st_asx3d10.testcase \
	st_asx3d11.testcase \
	st_asx3d12.testcase \
	st_asx3d13.testcase \
	st_asx3d14.testcase \
	st_asx3d15.testcase \
	st_asx3d16.testcase \
	st_asx3d17.testcase \
	st_asx3d18.testcase \
	st_asx3d19.testcase \
	st_asx3d1.testcase \
	st_asx3d20.testcase \
	st_asx3d21.testcase \
	st_asx3d22.testcase \
	st_asx3d23.testcase \
	st_asx3d24.testcase \
	st_asx3d25.testcase \
	st_asx3d26.testcase \
	st_asx3d27.testcase \
	st_asx3d28.testcase \
	st_asx3d29.testcase \
	st_asx3d2.testcase \
	st_asx3d30.testcase \
	st_asx3d3.testcase \
	st_asx3d4.testcase \
	st_asx3d5.testcase \
	st_asx3d6.testcase \
	st_asx3d7.testcase \
	st_asx3d8.testcase \
	st_asx3d9.testcase \
	st_area10.testcase \
	st_area11.testcase \
	st_area12.testcase \
	st_area13.testcase \
	st_area14.testcase \
	st_area15.testcase \
	st_area16.testcase \
	st_area17.testcase \
	st_area18.testcase \
	st_azimuth11.testcase \
	st_azimuth12.testcase \
	st_azimuth13.testcase \
	st_azimuth14.testcase \
	st_azimuth15.testcase \
	st_azimuth16.testcase \
	st_azimuth17.testcase \
	st_azimuth1.testcase \
	st_azimuth2.testcase \
	st_azimuth3.testcase \
	st_azimuth4.testcase \
	st_azimuth5.testcase \
	st_azimuth6.testcase \
	st_azimuth7.testcase \
	st_azimuth8.testcase \
	st_azimuth9.testcase \
	st_geohash10.testcase \
	st_geohash1.testcase \
	st_geohash2.testcase \
	st_geohash3.testcase \
	st_geohash4.testcase \
	st_geohash5.testcase \
	st_geohash6.testcase \
	st_geohash7.testcase \
	st_geohash8.testcase \
	st_geohash9.testcase \
	st_makevalid1.testcase \
	st_makevalid2.testcase \
	st_makevalid3.testcase \
	st_makevalid4.testcase \
	st_makevalid5.testcase \
	st_makevalid6.testcase \
	st_makevalid7.testcase \
	st_makevalid8.testcase \
	st_makevaliddiscarded1.testcase \
	st_makevaliddiscarded2.testcase \
	st_makevaliddiscarded3.testcase \
	st_makevaliddiscarded4.testcase \
	st_makevaliddiscarded5.testcase \
	st_makevaliddiscarded6.testcase \
	st_makevaliddiscarded7.testcase \
	st_makevaliddiscarded8.testcase \
	st_project1.testcase \
	st_project2.testcase \
	st_project3.testcase \
	st_project4.testcase \
	st_project5.testcase \
	st_project6.testcase \
	st_project7.testcase \
	st_project8.testcase \
	st_project9.testcase \
	st_project10.testcase \
	st_project11.testcase \
	st_project12.testcase \
	st_project13.testcase \
	st_project14.testcase \
	st_segmentize10.testcase \
	st_segmentize11.testcase \
	st_segmentize12.testcase \
	st_segmentize13.testcase \
	st_segmentize14.testcase \
	st_segmentize15.testcase \
	st_segmentize16.testcase \
	st_segmentize17.testcase \
	st_segmentize18.testcase \
	st_segmentize19.testcase \
	st_segmentize1.testcase \
	st_segmentize20.testcase \
	st_segmentize21.testcase \
	st_segmentize22.testcase \
	st_segmentize23.testcase \
	st_segmentize24.testcase \
	st_segmentize25.testcase \
	st_segmentize26.testcase \
	st_segmentize27.testcase \
	st_segmentize28.testcase \
	st_segmentize29.testcase \
	st_segmentize2.testcase \
	st_segmentize30.testcase \
	st_segmentize31.testcase \
	st_segmentize3.testcase \
	st_segmentize4.testcase \
	st_segmentize5.testcase \
	st_segmentize6.testcase \
	st_segmentize7.testcase \
	st_segmentize8.testcase \
	st_segmentize9.testcase \
	st_snaptogrid10.testcase \
	st_snaptogrid11.testcase \
	st_snaptogrid12.testcase \
	st_snaptogrid13.testcase \
	st_snaptogrid14.testcase \
	st_snaptogrid15.testcase \
	st_snaptogrid16.testcase \
	st_snaptogrid17.testcase \
	st_snaptogrid18.testcase \
	st_snaptogrid19.testcase \
	st_snaptogrid1.testcase \
	st_snaptogrid20.testcase \
	st_snaptogrid21.testcase \
	st_snaptogrid22.testcase \
	st_snaptogrid23.testcase \
	st_snaptogrid24.testcase \
	st_snaptogrid25.testcase \
	st_snaptogrid26.testcase \
	st_snaptogrid27.testcase \
	st_snaptogrid28.testcase \
	st_snaptogrid29.testcase \
	st_snaptogrid2.testcase \
	st_snaptogrid30.testcase \
	st_snaptogrid31.testcase \
	st_snaptogrid32.testcase \
	st_snaptogrid33.testcase \
	st_snaptogrid34.testcase \
	st_snaptogrid35.testcase \
	st_snaptogrid36.testcase \
	st_snaptogrid37.testcase \
	st_snaptogrid38.testcase \
	st_snaptogrid39.testcase \
	st_snaptogrid3.testcase \
	st_snaptogrid40.testcase \
	st_snaptogrid41.testcase \
	st_snaptogrid42.testcase \
	st_snaptogrid43.testcase \
	st_snaptogrid44.testcase \
	st_snaptogrid45.testcase \
	st_snaptogrid46.testcase \
	st_snaptogrid47.testcase \
	st_snaptogrid48.testcase \
	st_snaptogrid49.testcase \
	st_snaptogrid4.testcase \
	st_snaptogrid50.testcase \
	st_snaptogrid51.testcase \
	st_snaptogrid52.testcase \
	st_snaptogrid53.testcase \
	st_snaptogrid54.testcase \
	st_snaptogrid55.testcase \
	st_snaptogrid56.testcase \
	st_snaptogrid57.testcase \
	st_snaptogrid58.testcase \
	st_snaptogrid59.testcase \
	st_snaptogrid5.testcase \
	st_snaptogrid60.testcase \
	st_snaptogrid61.testcase \
	st_snaptogrid62.testcase \
	st_snaptogrid63.testcase \
	st_snaptogrid64.testcase \
	st_snaptogrid65.testcase \
	st_snaptogrid6.testcase \
	st_snaptogrid7.testcase \
	st_snaptogrid8.testcase \
	st_snaptogrid9.testcase \
	st_split10.testcase \
	st_split11.testcase \
	st_split12.testcase \
	st_split13.testcase \
	st_split14.testcase \
	st_split15.testcase \
	st_split16.testcase \
	st_split17.testcase \
	st_split18.testcase \
	st_split19.testcase \
	st_split1.testcase \
	st_split20.testcase \
	st_split21.testcase \
	st_split22.testcase \
	st_split23.testcase \
	st_split24.testcase \
	st_split25.testcase \
	st_split26.testcase \
	st_split27.testcase \
	st_split28.testcase \
	st_split29.testcase \
	st_split2.testcase \
	st_split30.testcase \
	st_split31.testcase \
	st_split32.testcase \
	st_split33.testcase \
	st_split34.testcase \
	st_split35.testcase \
	st_split36.testcase \
	st_split37.testcase \
	st_split38.testcase \
	st_split39.testcase \
	st_split3.testcase \
	st_split40.testcase \
	st_split41.testcase \
	st_split42.testcase \
	st_split43.testcase \
	st_split44.testcase \
	st_split45.testcase \
	st_split46.testcase \
	st_split47.testcase \
	st_split48.testcase \
	st_split49.testcase \
	st_split4.testcase \
	st_split5.testcase \
	st_split6.testcase \
	st_split7.testcase \
	st_split8.testcase \
	st_split9.testcase \
	st_node1.testcase \
	st_node2.testcase \
	st_node3.testcase \
	st_node4.testcase \
	st_node5.testcase \
	st_node6.testcase \
	st_node7.testcase \
	st_node8.testcase \
	st_node9.testcase \
	st_self1.testcase \
	st_self2.testcase \
	st_self3.testcase \
	st_self4.testcase \
	st_self5.testcase \
	st_self6.testcase \
	st_self7.testcase \
	st_self8.testcase \
	st_self9.testcase

Added test/sql_stmt_lwgeom_tests/Makefile.in.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_lwgeom_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = 3ddistance10.testcase \
	3ddistance1.testcase \
	3ddistance2.testcase \
	3ddistance3.testcase \
	3ddistance4.testcase \
	3ddistance5.testcase \
	3ddistance6.testcase \
	3ddistance7.testcase \
	3ddistance8.testcase \
	3ddistance9.testcase \
	3dmaxdistance10.testcase \
	3dmaxdistance1.testcase \
	3dmaxdistance2.testcase \
	3dmaxdistance3.testcase \
	3dmaxdistance4.testcase \
	3dmaxdistance5.testcase \
	3dmaxdistance6.testcase \
	3dmaxdistance7.testcase \
	3dmaxdistance8.testcase \
	3dmaxdistance9.testcase \
	maxdistance10.testcase \
	maxdistance1.testcase \
	maxdistance2.testcase \
	maxdistance3.testcase \
	maxdistance4.testcase \
	maxdistance5.testcase \
	maxdistance6.testcase \
	maxdistance7.testcase \
	maxdistance8.testcase \
	maxdistance9.testcase \
	st_asx3d10.testcase \
	st_asx3d11.testcase \
	st_asx3d12.testcase \
	st_asx3d13.testcase \
	st_asx3d14.testcase \
	st_asx3d15.testcase \
	st_asx3d16.testcase \
	st_asx3d17.testcase \
	st_asx3d18.testcase \
	st_asx3d19.testcase \
	st_asx3d1.testcase \
	st_asx3d20.testcase \
	st_asx3d21.testcase \
	st_asx3d22.testcase \
	st_asx3d23.testcase \
	st_asx3d24.testcase \
	st_asx3d25.testcase \
	st_asx3d26.testcase \
	st_asx3d27.testcase \
	st_asx3d28.testcase \
	st_asx3d29.testcase \
	st_asx3d2.testcase \
	st_asx3d30.testcase \
	st_asx3d3.testcase \
	st_asx3d4.testcase \
	st_asx3d5.testcase \
	st_asx3d6.testcase \
	st_asx3d7.testcase \
	st_asx3d8.testcase \
	st_asx3d9.testcase \
	st_area10.testcase \
	st_area11.testcase \
	st_area12.testcase \
	st_area13.testcase \
	st_area14.testcase \
	st_area15.testcase \
	st_area16.testcase \
	st_area17.testcase \
	st_area18.testcase \
	st_azimuth11.testcase \
	st_azimuth12.testcase \
	st_azimuth13.testcase \
	st_azimuth14.testcase \
	st_azimuth15.testcase \
	st_azimuth16.testcase \
	st_azimuth17.testcase \
	st_azimuth1.testcase \
	st_azimuth2.testcase \
	st_azimuth3.testcase \
	st_azimuth4.testcase \
	st_azimuth5.testcase \
	st_azimuth6.testcase \
	st_azimuth7.testcase \
	st_azimuth8.testcase \
	st_azimuth9.testcase \
	st_geohash10.testcase \
	st_geohash1.testcase \
	st_geohash2.testcase \
	st_geohash3.testcase \
	st_geohash4.testcase \
	st_geohash5.testcase \
	st_geohash6.testcase \
	st_geohash7.testcase \
	st_geohash8.testcase \
	st_geohash9.testcase \
	st_makevalid1.testcase \
	st_makevalid2.testcase \
	st_makevalid3.testcase \
	st_makevalid4.testcase \
	st_makevalid5.testcase \
	st_makevalid6.testcase \
	st_makevalid7.testcase \
	st_makevalid8.testcase \
	st_makevaliddiscarded1.testcase \
	st_makevaliddiscarded2.testcase \
	st_makevaliddiscarded3.testcase \
	st_makevaliddiscarded4.testcase \
	st_makevaliddiscarded5.testcase \
	st_makevaliddiscarded6.testcase \
	st_makevaliddiscarded7.testcase \
	st_makevaliddiscarded8.testcase \
	st_project1.testcase \
	st_project2.testcase \
	st_project3.testcase \
	st_project4.testcase \
	st_project5.testcase \
	st_project6.testcase \
	st_project7.testcase \
	st_project8.testcase \
	st_project9.testcase \
	st_project10.testcase \
	st_project11.testcase \
	st_project12.testcase \
	st_project13.testcase \
	st_project14.testcase \
	st_segmentize10.testcase \
	st_segmentize11.testcase \
	st_segmentize12.testcase \
	st_segmentize13.testcase \
	st_segmentize14.testcase \
	st_segmentize15.testcase \
	st_segmentize16.testcase \
	st_segmentize17.testcase \
	st_segmentize18.testcase \
	st_segmentize19.testcase \
	st_segmentize1.testcase \
	st_segmentize20.testcase \
	st_segmentize21.testcase \
	st_segmentize22.testcase \
	st_segmentize23.testcase \
	st_segmentize24.testcase \
	st_segmentize25.testcase \
	st_segmentize26.testcase \
	st_segmentize27.testcase \
	st_segmentize28.testcase \
	st_segmentize29.testcase \
	st_segmentize2.testcase \
	st_segmentize30.testcase \
	st_segmentize31.testcase \
	st_segmentize3.testcase \
	st_segmentize4.testcase \
	st_segmentize5.testcase \
	st_segmentize6.testcase \
	st_segmentize7.testcase \
	st_segmentize8.testcase \
	st_segmentize9.testcase \
	st_snaptogrid10.testcase \
	st_snaptogrid11.testcase \
	st_snaptogrid12.testcase \
	st_snaptogrid13.testcase \
	st_snaptogrid14.testcase \
	st_snaptogrid15.testcase \
	st_snaptogrid16.testcase \
	st_snaptogrid17.testcase \
	st_snaptogrid18.testcase \
	st_snaptogrid19.testcase \
	st_snaptogrid1.testcase \
	st_snaptogrid20.testcase \
	st_snaptogrid21.testcase \
	st_snaptogrid22.testcase \
	st_snaptogrid23.testcase \
	st_snaptogrid24.testcase \
	st_snaptogrid25.testcase \
	st_snaptogrid26.testcase \
	st_snaptogrid27.testcase \
	st_snaptogrid28.testcase \
	st_snaptogrid29.testcase \
	st_snaptogrid2.testcase \
	st_snaptogrid30.testcase \
	st_snaptogrid31.testcase \
	st_snaptogrid32.testcase \
	st_snaptogrid33.testcase \
	st_snaptogrid34.testcase \
	st_snaptogrid35.testcase \
	st_snaptogrid36.testcase \
	st_snaptogrid37.testcase \
	st_snaptogrid38.testcase \
	st_snaptogrid39.testcase \
	st_snaptogrid3.testcase \
	st_snaptogrid40.testcase \
	st_snaptogrid41.testcase \
	st_snaptogrid42.testcase \
	st_snaptogrid43.testcase \
	st_snaptogrid44.testcase \
	st_snaptogrid45.testcase \
	st_snaptogrid46.testcase \
	st_snaptogrid47.testcase \
	st_snaptogrid48.testcase \
	st_snaptogrid49.testcase \
	st_snaptogrid4.testcase \
	st_snaptogrid50.testcase \
	st_snaptogrid51.testcase \
	st_snaptogrid52.testcase \
	st_snaptogrid53.testcase \
	st_snaptogrid54.testcase \
	st_snaptogrid55.testcase \
	st_snaptogrid56.testcase \
	st_snaptogrid57.testcase \
	st_snaptogrid58.testcase \
	st_snaptogrid59.testcase \
	st_snaptogrid5.testcase \
	st_snaptogrid60.testcase \
	st_snaptogrid61.testcase \
	st_snaptogrid62.testcase \
	st_snaptogrid63.testcase \
	st_snaptogrid64.testcase \
	st_snaptogrid65.testcase \
	st_snaptogrid6.testcase \
	st_snaptogrid7.testcase \
	st_snaptogrid8.testcase \
	st_snaptogrid9.testcase \
	st_split10.testcase \
	st_split11.testcase \
	st_split12.testcase \
	st_split13.testcase \
	st_split14.testcase \
	st_split15.testcase \
	st_split16.testcase \
	st_split17.testcase \
	st_split18.testcase \
	st_split19.testcase \
	st_split1.testcase \
	st_split20.testcase \
	st_split21.testcase \
	st_split22.testcase \
	st_split23.testcase \
	st_split24.testcase \
	st_split25.testcase \
	st_split26.testcase \
	st_split27.testcase \
	st_split28.testcase \
	st_split29.testcase \
	st_split2.testcase \
	st_split30.testcase \
	st_split31.testcase \
	st_split32.testcase \
	st_split33.testcase \
	st_split34.testcase \
	st_split35.testcase \
	st_split36.testcase \
	st_split37.testcase \
	st_split38.testcase \
	st_split39.testcase \
	st_split3.testcase \
	st_split40.testcase \
	st_split41.testcase \
	st_split42.testcase \
	st_split43.testcase \
	st_split44.testcase \
	st_split45.testcase \
	st_split46.testcase \
	st_split47.testcase \
	st_split48.testcase \
	st_split49.testcase \
	st_split4.testcase \
	st_split5.testcase \
	st_split6.testcase \
	st_split7.testcase \
	st_split8.testcase \
	st_split9.testcase \
	st_node1.testcase \
	st_node2.testcase \
	st_node3.testcase \
	st_node4.testcase \
	st_node5.testcase \
	st_node6.testcase \
	st_node7.testcase \
	st_node8.testcase \
	st_node9.testcase \
	st_self1.testcase \
	st_self2.testcase \
	st_self3.testcase \
	st_self4.testcase \
	st_self5.testcase \
	st_self6.testcase \
	st_self7.testcase \
	st_self8.testcase \
	st_self9.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_lwgeom_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_lwgeom_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Added test/sql_stmt_lwgeom_tests/maxdistance1.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - two 2D points
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), MakePoint(4, 6))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), MakePoint(4, 6))
5.0

Added test/sql_stmt_lwgeom_tests/maxdistance10.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - two 3D linestring
:memory: #use in-memory database
SELECT ST_MaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
10.440306:6

Added test/sql_stmt_lwgeom_tests/maxdistance2.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - two 2D identical points
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), MakePoint(1, 2))
0.0

Added test/sql_stmt_lwgeom_tests/maxdistance3.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - bad blob first arg
:memory: #use in-memory database
SELECT ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
(NULL)

Added test/sql_stmt_lwgeom_tests/maxdistance4.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), zeroblob(100))
(NULL)

Added test/sql_stmt_lwgeom_tests/maxdistance5.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - non-blob first arg
:memory: #use in-memory database
SELECT ST_MaxDistance(3, MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(3, MakePoint(1, 2))
(NULL)

Added test/sql_stmt_lwgeom_tests/maxdistance6.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), "hello")
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), "hello")
(NULL)

Added test/sql_stmt_lwgeom_tests/maxdistance7.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - parallel 2D lines
:memory: #use in-memory database
SELECT ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
10.198039:6

Added test/sql_stmt_lwgeom_tests/maxdistance8.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - intersecting 2D lines
:memory: #use in-memory database
SELECT ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
11.180339:6

Added test/sql_stmt_lwgeom_tests/maxdistance9.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
MaxDistance - two 3D points
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5));
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5))
5.0

Added test/sql_stmt_lwgeom_tests/st_area10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Sphere/Equator
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0)
189884187084.89:2

Added test/sql_stmt_lwgeom_tests/st_area11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Ellipsoid/Equator
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 1);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 1)
189884187084.89:2

Added test/sql_stmt_lwgeom_tests/st_area12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Sphere
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 0);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 0)
67724290215.61:2

Added test/sql_stmt_lwgeom_tests/st_area13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 1);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 1)
67989516071.49:2

Added test/sql_stmt_lwgeom_tests/st_area14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - Point - Ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POINT(50.4 50.4)"), 1);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POINT(50.4 50.4)"), 1)
0.0

Added test/sql_stmt_lwgeom_tests/st_area15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - planar Polygon - Sphere
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))", 32632), 0);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))", 32632), 0)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_area16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - DOUBLE use_ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0.5);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_area17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - TEXT use_ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_area18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Area Geodesic - BLOB use_ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - NULL geometry
:memory: #use in-memory database
SELECT ST_AsX3D(NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 2D multipoint
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOINT(10 10, 11 10, 11 11)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOINT(10 10, 11 10, 11 11)'))
<Polypoint2D  point='10 10 11 10 11 11 ' />:0

Added test/sql_stmt_lwgeom_tests/st_asx3d11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D multipoint
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOINTZ(10 10 101, 11 10 102, 11 11 103)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOINTZ(10 10 101, 11 10 102, 11 11 103)'))
<PointSet ><Coordinate point='10 10 101 11 10 102 11 11 103 ' /></PointSet>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 2D multilinestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTILINESTRING((10 10, 11 10, 11 11), (20 20, 21 20, 21 21))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTILINESTRING((10 10, 11 10, 11 11), (20 20, 21 20, 21 21))'))
<IndexedLineSet  coordIndex='0 1 2 -1 3 4 5'>10 10 11 10 11 11 20 20 21 20 21 21 ' />:0

Added test/sql_stmt_lwgeom_tests/st_asx3d13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D multilinestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTILINESTRINGZ((10 10 1, 11 10 2, 11 11 2), (20 20 4, 21 20 5, 21 21 6))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTILINESTRINGZ((10 10 1, 11 10 2, 11 11 2), (20 20 4, 21 20 5, 21 21 6))'))
<IndexedLineSet  coordIndex='0 1 2 -1 3 4 5'><Coordinate point='10 10 1 11 10 2 11 11 2 20 20 4 21 20 5 21 21 6 ' /></IndexedLineSet>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 2D multipolygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOLYGON(((10 10, 11 10, 11 11, 10 11, 10 10)), ((20 20, 21 20, 21 21, 20 21, 20 20)))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOLYGON(((10 10, 11 10, 11 11, 10 11, 10 10)), ((20 20, 21 20, 21 21, 20 21, 20 20)))'))
<IndexedFaceSet  coordIndex='0 1 2 3 -1 4 5 6 7'>10 10 11 10 11 11 10 11 20 20 21 20 21 21 20 21 ' />:0

Added test/sql_stmt_lwgeom_tests/st_asx3d15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D multipolygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOLYGONZ(((10 10 1, 11 10 2, 11 11 3, 10 11 4, 10 10 1)), ((20 20 5, 21 20 6, 21 21 7, 20 21 8, 20 20 5)))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOLYGONZ(((10 10 1, 11 10 2, 11 11 3, 10 11 4, 10 10 1)), ((20 20 5, 21 20 6, 21 21 7, 20 21 8, 20 20 5)))'))
<IndexedFaceSet  coordIndex='0 1 2 3 -1 4 5 6 7'><Coordinate point='10 10 1 11 10 2 11 11 3 10 11 4 20 20 5 21 20 6 21 21 7 20 21 8 ' /></IndexedFaceSet>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring NULL precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring TEXT precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring BLOB precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d19.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring DOUBLE precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 0.5);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - text geometry
:memory: #use in-memory database
SELECT ST_AsX3D('alpha');
1 # rows (not including the header row)
1 # columns
ST_AsX3D('alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d20.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6)
<LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d21.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, NULL options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d22.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, text options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d23.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, blob options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d24.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, double options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 0.5);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d25.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, short SRS
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 0);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 0)
<MultiGeometry srsName="epsg:4326"><geometryMember>15.123457 14.765432 7.654321</geometryMember><geometryMember><LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet></geometryMember></MultiGeometry>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d26.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1)
<MultiGeometry srsName="urn:ogc:def:crs:epsg::4326"><geometryMember>15.123457 14.765432 7.654321</geometryMember><geometryMember><LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet></geometryMember></MultiGeometry>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d27.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, NULL refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d28.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, int refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d29.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, BLOB refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - int geometry
:memory: #use in-memory database
SELECT ST_AsX3D(1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_asx3d30.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 'test_');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 'test_')
<test_MultiGeometry srsName="urn:ogc:def:crs:epsg::4326"><test_geometryMember>15.123457 14.765432 7.654321</test_geometryMember><test_geometryMember><LineSet test_ vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet></test_geometryMember></test_MultiGeometry>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 2D point
:memory: #use in-memory database
SELECT ST_AsX3D(MakePoint(12, 21));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(MakePoint(12, 21))
12 21

Added test/sql_stmt_lwgeom_tests/st_asx3d5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D point
:memory: #use in-memory database
SELECT ST_AsX3D(MakePointZ(12, 21, 101));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(MakePointZ(12, 21, 101))
12 21 101

Added test/sql_stmt_lwgeom_tests/st_asx3d6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 2D linestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRING(10 10, 11 10, 11 11)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRING(10 10, 11 10, 11 11)'))
<LineSet  vertexCount='3'><Coordinate point='10 10 11 10 11 11' /></LineSet>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D linestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'))
<LineSet  vertexCount='3'><Coordinate point='10 10 101 11 10 102 11 11 103' /></LineSet>:0

Added test/sql_stmt_lwgeom_tests/st_asx3d8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 2D polygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('POLYGON((10 10, 11 10, 11 11, 10 11, 10 10))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('POLYGON((10 10, 11 10, 11 11, 10 11, 10 10))'))
<IndexedFaceSet  coordIndex='0 1 2 3'>10 10 11 10 11 11 10 11 ' />:0

Added test/sql_stmt_lwgeom_tests/st_asx3d9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_AsX3D - 3D polygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('POLYGONZ((10 10 101, 11 10 102, 11 11 103, 10 11 104, 10 10 101))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('POLYGONZ((10 10 101, 11 10 102, 11 11 103, 10 11 104, 10 10 101))'))
<IndexedFaceSet  coordIndex='0 1 2 3'><Coordinate point='10 10 101 11 10 102 11 11 103 10 11 104 ' /></IndexedFaceSet>:0

Added test/sql_stmt_lwgeom_tests/st_azimuth1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - WGS84 points
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10.5, 10, 4326), MakePoint(11.5, 11, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10.5, 10, 4326), MakePoint(11.5, 11, 4326))
0.778630:6 

Added test/sql_stmt_lwgeom_tests/st_azimuth10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - text PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth('alpha', MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth('alpha', MakePoint(10, 10, 4326))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - text PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), 'beta');
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), 'beta')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - NULL PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(NULL, MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(NULL, MakePoint(10, 10, 4326))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - NULL PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - MultiPoint (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('MULTIPOINT(0 0, 1 1)'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('MULTIPOINT(0 0, 1 1)'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - Linestring (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('LINESTRING(0 0, 1 1)'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('LINESTRING(0 0, 1 1)'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - Polygon (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - Collection (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(2 2))'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(2 2))'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - -1 SRID points
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(123456, 12345678.5, -1), MakePoint(123457, 12345679.5, -1));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(123456, 12345678.5, -1), MakePoint(123457, 12345679.5, -1));
0.785398:6 

Added test/sql_stmt_lwgeom_tests/st_azimuth3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - same Point
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10.5, 10.5, 4326), MakePoint(10.5, 10.5, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10.5, 10.5, 4326), MakePoint(10.5, 10.5, 4326))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - bad blob PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(zeroblob(4), MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(zeroblob(4), MakePoint(10, 10, 4326))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - bad blob PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - integer PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(1, MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(1, MakePoint(10, 10, 4326))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - integer PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), 1);
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), 1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - double PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(1.1, MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(1.1, MakePoint(10, 10, 4326))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_azimuth9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Azimuth - double PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), 1.1);
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), 1.1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_geohash1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - NULL geometry
:memory: #use in-memory database
SELECT ST_GeoHash(NULL);
1 # rows (not including the header row)
1 # columns
ST_GeoHash(NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_geohash10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - WGS84 Point, precision 6
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(10, -20, 4326), 6);
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(10, -20, 4326), 6)
khrn5x

Added test/sql_stmt_lwgeom_tests/st_geohash2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - text geometry
:memory: #use in-memory database
SELECT ST_GeoHash('alpha');
1 # rows (not including the header row)
1 # columns
ST_GeoHash('alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_geohash3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - int geometry
:memory: #use in-memory database
SELECT ST_GeoHash(1);
1 # rows (not including the header row)
1 # columns
ST_GeoHash(1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_geohash4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - not Long/Lat geometry
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(123456, 654321));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(123456, 654321))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_geohash5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - zeroblob geometry
:memory: #use in-memory database
SELECT ST_GeoHash(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_geohash6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - WGS84 Point
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(10, -20, 4326));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(10, -20, 4326))
khrn5x1g8cu2yhrn5x1g

Added test/sql_stmt_lwgeom_tests/st_geohash7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - WGS84 Linestring
:memory: #use in-memory database
SELECT ST_GeoHash(GeomFromText('LINESTRING(10 -20, 10.0001 -19.9899, 10.0002 -19.9899)', 4326));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(GeomFromText('LINESTRING(10 -20, 10.0001 -19.9899, 10.0002 -19.9899)', 4326))
khrn

Added test/sql_stmt_lwgeom_tests/st_geohash8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - WGS84 Polygon
:memory: #use in-memory database
SELECT ST_GeoHash(GeomFromText('POLYGON((7 10, 7.0001 10, 7.0001 10.0001, 7 10.0001, 7 10))', 4326));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(GeomFromText('POLYGON((7 10, 7.0001 10, 7.0001 10.0001, 7 10.0001, 7 10))', 4326))
s1ubzk3

Added test/sql_stmt_lwgeom_tests/st_geohash9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_GeoHash - WGS84 Point, invalid precision
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(10, -20, 4326), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(10, -20, 4326), 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevalid1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - Invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValid(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_MakeValid(zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevalid2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValid(NULL);
1 # rows (not including the header row)
1 # columns
ST_MakeValid(NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevalid3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - text (error)
:memory: #use in-memory database
SELECT ST_MakeValid('alpha');
1 # rows (not including the header row)
1 # columns
ST_MakeValid('alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevalid4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - already valid MultiPolygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')))
1

Added test/sql_stmt_lwgeom_tests/st_makevalid5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - already valid Polygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')))
1

Added test/sql_stmt_lwgeom_tests/st_makevalid6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - invalid MultiPolygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')))
1

Added test/sql_stmt_lwgeom_tests/st_makevalid7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - invalid Polygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')))
1

Added test/sql_stmt_lwgeom_tests/st_makevalid8.testcase.























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
ST_MakeValid - invalid MultiPolygon [discarded items]
:memory: #use in-memory database
SELECT IsValid(v.v), NumGeometries(v.v), GeometryType(v.v) FROM (SELECT MakeValid(g.g) AS v FROM (SELECT GeomFromText ('MULTIPOLYGON(((0 0, 1 0, 1 2, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 2.5, 2.5 2.5, 3 2.5, 3 3, 2 3, 2 2)))') AS g) AS g) AS v;
1 # rows (not including the header row)
3 # columns
IsValid(v.v)
NumGeometries(v.v)
GeometryType(v.v)
1
2
MULTIPOLYGON

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValidDiscarded - Invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValidDiscarded - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(NULL);
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValidDiscarded - text (error)
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded('alpha');
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded('alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - already valid MultiPolygon
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))'));
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValidDiscarded - already valid Polygon
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - invalid MultiPolygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')))
1

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_MakeValid - invalid Polygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')))
1

Added test/sql_stmt_lwgeom_tests/st_makevaliddiscarded8.testcase.























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
ST_MakeValidDiscarded - invalid MultiPolygon [discarded items]
:memory: #use in-memory database
SELECT IsValid(v.v), NumGeometries(v.v), GeometryType(v.v)  FROM (SELECT MakeValidDiscarded(g.g) AS v FROM (SELECT GeomFromText ('MULTIPOLYGON(((0 0, 1 0, 1 2, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 2.5, 2.5 2.5, 3 2.5, 3 3, 2 3, 2 2)))') AS g) AS g) AS v;
1 # rows (not including the header row)
3 # columns
IsValid(v.v)
NumGeometries(v.v)
GeometryType(v.v)
1
2
MULTILINESTRING

Added test/sql_stmt_lwgeom_tests/st_node1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_Node(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Node(zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_node2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Invalid INT input (error)
:memory: #use in-memory database
SELECT ST_Node(1);
1 # rows (not including the header row)
1 # columns
ST_Node(1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_node3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Invalid DOUBLE input (error)
:memory: #use in-memory database
SELECT ST_Node(1.1);
1 # rows (not including the header row)
1 # columns
ST_Node(1.1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_node4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Invalid TEXT input (error)
:memory: #use in-memory database
SELECT ST_Node('alpha');
1 # rows (not including the header row)
1 # columns
ST_Node('alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_node5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Valid 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')))
MULTILINESTRING((0 0, 5 5), (5 5, 10 10, 0 10, 5 5), (5 5, 10 0))

Added test/sql_stmt_lwgeom_tests/st_node6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Valid 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
MULTILINESTRING Z((0 0 0, 5 5 4.5), (5 5 4.5, 10 10 10, 0 10 5, 5 5 4.5), (5 5 4.5, 10 0 3))

Added test/sql_stmt_lwgeom_tests/st_node7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Valid MultiLinestring 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')))
MULTILINESTRING((0 0, 5 5), (5 5, 10 10), (10 10, 0 10, 5 5), (5 5, 10 0), (10 8, 10 10), (10 10, 10 12))

Added test/sql_stmt_lwgeom_tests/st_node8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Valid MultiLinestring 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')))
MULTILINESTRING Z((0 0 0, 5 5 4.5), (5 5 4.5, 10 10 10), (10 10 10, 0 10 5, 5 5 4.5), (5 5 4.5, 10 0 3), (10 8 4, 10 10 10), (10 10 10, 10 12 5))

Added test/sql_stmt_lwgeom_tests/st_node9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Node - Invalid MultiPoint 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - NULL start Point
:memory: #use in-memory database
SELECT ST_Project(NULL, 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(NULL, 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - BLOB distance
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), zeroblob(4), Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), zeroblob(4), Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - NULL bearing
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, NULL);
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - TEXT bearing
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - BLOB bearing
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - valid
:memory: #use in-memory database
SELECT AsText(ST_Project(GeomFromText('POINT(0 0)'), 100000, Radians(45)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Project(GeomFromText('POINT(0 0)'), 100000, Radians(45)))
POINT(0.635231 0.639472)

Added test/sql_stmt_lwgeom_tests/st_project2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - INTEGER start Point
:memory: #use in-memory database
SELECT ST_Project(1, 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(1, 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - DOUBLE start Point
:memory: #use in-memory database
SELECT ST_Project(1.1, 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(1.1, 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - TEXT start Point
:memory: #use in-memory database
SELECT ST_Project('alpha', 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project('alpha', 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - invalid BLOB start Point
:memory: #use in-memory database
SELECT ST_Project(zeroblob(4), 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(zeroblob(4), 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - start Point (not long/lat)
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 32632), 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 32632), 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - start Point (actually: Linestring)
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 100000, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - NULL distance
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), NULL, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), NULL, Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_project9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Project - TEXT distance
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 'alpha', Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 'alpha', Radians(45))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_segmentize1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 1 2), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 1 2), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 1 1.5, 1 2), POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))

Added test/sql_stmt_lwgeom_tests/st_segmentize10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(NULL, 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(NULL, 0.5))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_segmentize11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(0 0 10), LINESTRINGZ(1 1 10, 1 2 11), POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(0 0 10), LINESTRINGZ(1 1 10, 1 2 11), POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5))
GEOMETRYCOLLECTION Z(POINT Z(0 0 10), LINESTRING Z(1 1 10, 1 1.5 10.5, 1 2 11), POLYGON Z((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10)))

Added test/sql_stmt_lwgeom_tests/st_segmentize12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(0 0 10), LINESTRINGM(1 1 10, 1 2 11), POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(0 0 10), LINESTRINGM(1 1 10, 1 2 11), POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5))
GEOMETRYCOLLECTION M(POINT M(0 0 10), LINESTRING M(1 1 10, 1 1.5 10.5, 1 2 11), POLYGON M((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10)))

Added test/sql_stmt_lwgeom_tests/st_segmentize13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(0 0 10 11), LINESTRINGZM(1 1 10 11, 1 2 11 13), POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(0 0 10 11), LINESTRINGZM(1 1 10 11, 1 2 11 13), POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11)))'), 0.5))
GEOMETRYCOLLECTION ZM(POINT ZM(0 0 10 11), LINESTRING ZM(1 1 10 11, 1 1.5 10.5 12, 1 2 11 13), POLYGON ZM((3 3 10 11, 3.5 3 10.166667 11.166667, 4 3 10.333333 11.333333, 4.5 3 10.5 11.5, 5 3 10.666667 11.666667, 5.5 3 10.833333 11.833333, 6 3 11 12, 6 3.5 11.166667 12.166667, 6 4 11.333333 12.333333, 6 4.5 11.5 12.5, 6 5 11.666667 12.666667, 6 5.5 11.833333 12.833333, 6 6 12 13, 5.5 6 12.166667 13.166667, 5 6 12.333333 13.333333, 4.5 6 12.5 13.5, 4 6 12.666667 13.666667, 3.5 6 12.833333 13.833333, 3 6 13 14, 3 5.5 12.5 13.5, 3 5 12 13, 3 4.5 11.5 12.5, 3 4 11 12, 3 3.5 10.5 11.5, 3 3 10 11), (4 4 10 11, 4.5 4 10.5 11.5, 5 4 11 12, 5 4.5 11.5 12.5, 5 5 12 13, 5 4.5 12.5 13.5, 5 4 13 14, 4.5 4 11.5 12.5, 4 4 10 11)))

Added test/sql_stmt_lwgeom_tests/st_segmentize14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Point
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINT(0 0)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINT(0 0)'), 0.5))
POINT(0 0)

Added test/sql_stmt_lwgeom_tests/st_segmentize15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Point Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINTZ(0 0 10)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINTZ(0 0 10)'), 0.5))
POINT Z(0 0 10)

Added test/sql_stmt_lwgeom_tests/st_segmentize16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Point M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINTM(0 0 10)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINTM(0 0 10)'), 0.5))
POINT M(0 0 10)

Added test/sql_stmt_lwgeom_tests/st_segmentize17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Point ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINTZM(0 0 10 11)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINTZM(0 0 10 11)'), 0.5))
POINT ZM(0 0 10 11)

Added test/sql_stmt_lwgeom_tests/st_segmentize18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Linestring
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 1 2)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 1 2)'), 0.5))
LINESTRING(1 1, 1 1.5, 1 2)

Added test/sql_stmt_lwgeom_tests/st_segmentize19.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Linestring Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZ(1 1 10, 1 2 11)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZ(1 1 10, 1 2 11)'), 0.5))
LINESTRING Z(1 1 10, 1 1.5 10.5, 1 2 11)

Added test/sql_stmt_lwgeom_tests/st_segmentize2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - MultiPoint
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('MULTIPOINT(0 1, 2 3, 4 5)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('MULTIPOINT(0 1, 2 3, 4 5)'), 0.5))
MULTIPOINT(0 1, 2 3, 4 5) 

Added test/sql_stmt_lwgeom_tests/st_segmentize20.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Linestring M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGM(1 1 10, 1 2 11)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGM(1 1 10, 1 2 11)'), 0.5))
LINESTRING M(1 1 10, 1 1.5 10.5, 1 2 11)

Added test/sql_stmt_lwgeom_tests/st_segmentize21.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Linestring ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZM(1 1 10 11, 1 2 11 13)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZM(1 1 10 11, 1 2 11 13)'), 0.5))
LINESTRING ZM(1 1 10 11, 1 1.5 10.5 12, 1 2 11 13)

Added test/sql_stmt_lwgeom_tests/st_segmentize22.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Polygon
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4))'), 0.5))
POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4))

Added test/sql_stmt_lwgeom_tests/st_segmentize23.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Polygon Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5))
POLYGON Z((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10))

Added test/sql_stmt_lwgeom_tests/st_segmentize24.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Polygon M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5))
POLYGON M((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10))

Added test/sql_stmt_lwgeom_tests/st_segmentize25.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Polygon ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11))'), 0.5))
POLYGON ZM((3 3 10 11, 3.5 3 10.166667 11.166667, 4 3 10.333333 11.333333, 4.5 3 10.5 11.5, 5 3 10.666667 11.666667, 5.5 3 10.833333 11.833333, 6 3 11 12, 6 3.5 11.166667 12.166667, 6 4 11.333333 12.333333, 6 4.5 11.5 12.5, 6 5 11.666667 12.666667, 6 5.5 11.833333 12.833333, 6 6 12 13, 5.5 6 12.166667 13.166667, 5 6 12.333333 13.333333, 4.5 6 12.5 13.5, 4 6 12.666667 13.666667, 3.5 6 12.833333 13.833333, 3 6 13 14, 3 5.5 12.5 13.5, 3 5 12 13, 3 4.5 11.5 12.5, 3 4 11 12, 3 3.5 10.5 11.5, 3 3 10 11), (4 4 10 11, 4.5 4 10.5 11.5, 5 4 11 12, 5 4.5 11.5 12.5, 5 5 12 13, 5 4.5 12.5 13.5, 5 4 13 14, 4.5 4 11.5 12.5, 4 4 10 11))

Added test/sql_stmt_lwgeom_tests/st_segmentize26.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection - single Point
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0))'), 0.5))
GEOMETRYCOLLECTION(POINT(0 0))

Added test/sql_stmt_lwgeom_tests/st_segmentize27.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection - single Linestring
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2))'), 0.5))
GEOMETRYCOLLECTION(LINESTRING(1 1, 1 1.5, 1 2))

Added test/sql_stmt_lwgeom_tests/st_segmentize28.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection - single Polygon
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
GEOMETRYCOLLECTION(POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))

Added test/sql_stmt_lwgeom_tests/st_segmentize29.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection - three Points
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1), POINT(2 2))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1), POINT(2 2))'), 0.5))
GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1), POINT(2 2)) 

Added test/sql_stmt_lwgeom_tests/st_segmentize3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Multilinestring
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('MULTILINESTRING((1 1, 1 2), (3 3, 4 3))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('MULTILINESTRING((1 1, 1 2), (3 3, 4 3))'), 0.5))
MULTILINESTRING((1 1, 1 1.5, 1 2), (3 3, 3.5 3, 4 3))

Added test/sql_stmt_lwgeom_tests/st_segmentize30.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection - two Linestrings
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2), LINESTRING(3 3, 4 3))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2), LINESTRING(3 3, 4 3))'), 0.5))
GEOMETRYCOLLECTION(LINESTRING(1 1, 1 1.5, 1 2), LINESTRING(3 3, 3.5 3, 4 3))

Added test/sql_stmt_lwgeom_tests/st_segmentize31.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Collection - two Polygons
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
GEOMETRYCOLLECTION(POLYGON((0 0, 0.5 0, 1 0, 1 0.5, 1 1, 0.5 1, 0 1, 0 0.5, 0 0)), POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))

Added test/sql_stmt_lwgeom_tests/st_segmentize4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Multipolygon
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
MULTIPOLYGON(((0 0, 0.5 0, 1 0, 1 0.5, 1 1, 0.5 1, 0 1, 0 0.5, 0 0)), ((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))

Added test/sql_stmt_lwgeom_tests/st_segmentize5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - Invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(zeroblob(4), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(zeroblob(4), 0.5))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_segmentize6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(NULL, 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(NULL, 0.5))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_segmentize7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - NULL distance (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), NULL));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), NULL))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_segmentize8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - text distance (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), 'alpha'));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), 'alpha'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_segmentize9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Segmentize - text geometry (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize('alpha', 0));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize('alpha', 0))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_self1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections(zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_self2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Invalid INT input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections(1);
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections(1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_self3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Invalid DOUBLE input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections(1.1);
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections(1.1)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_self4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Invalid TEXT input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections('alpha');
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections('alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_self5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Valid 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')))
MULTIPOINT(5 5)

Added test/sql_stmt_lwgeom_tests/st_self6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Valid 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
MULTIPOINT Z(5 5 4.5)

Added test/sql_stmt_lwgeom_tests/st_self7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Valid MultiLinestring 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')))
MULTIPOINT(5 5, 10 10)

Added test/sql_stmt_lwgeom_tests/st_self8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Valid MultiLinestring 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')))
MULTIPOINT Z(5 5 4.5, 10 10 10)

Added test/sql_stmt_lwgeom_tests/st_self9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SelfIntersections - Invalid MultiPoint 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - two args - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(NULL, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(NULL, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - three args - NULL sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - three args - BLOB sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - three args - text sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL originX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 0.5, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB originX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(0), 1, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(0), 1, 0.5, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - text originX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 0.5, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL originY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, NULL, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, NULL, 0.5, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB originY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, zeroblob(0), 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, zeroblob(0), 0.5, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - text originY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 'alpha', 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 'alpha', 0.5, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid19.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, NULL, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, NULL, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - two args - invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(zeroblob(4), 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(zeroblob(4), 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid20.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, zeroblob(0), 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, zeroblob(0), 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid21.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - text sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 'alpha', 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 'alpha', 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid22.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid23.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, zeroblob(0));
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, zeroblob(0))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid24.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - five args - text sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid25.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid26.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - invalid BLOB grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 1, 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid27.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - text grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid28.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - num grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1.1, 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1.1, 1, 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid29.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - not-point grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), GeomFromText('LINESTRING(0 0, 1 1)'), 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), GeomFromText('LINESTRING(0 0, 1 1)'), 1, 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - two args - NULL size (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid30.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), NULL, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), NULL, 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid31.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), zeroblob(4), 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), zeroblob(4), 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid32.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 'alpha', 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 'alpha', 2, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid33.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeM (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid34.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeM (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid35.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeM (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid36.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, NULL, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, NULL, 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid37.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, zeroblob(4), 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, zeroblob(4), 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid38.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 'alpha', 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 'alpha', 3, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid39.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeZ (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, NULL, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, NULL, 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - two args - text size (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid40.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeZ (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, zeroblob(4), 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, zeroblob(4), 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid41.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeZ (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 'alpha', 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 'alpha', 4)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid42.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Point 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINT(1.2 2.3)'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINT(1.2 2.3)'), 0.25))
POINT(1.25 2.25)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid43.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Linestring 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRING(1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9)'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRING(1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9)'), 0.25))
LINESTRING(1.25 2.25, 2 4)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid44.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Polygon 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGON((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1))'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGON((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1))'), 0.25))
POLYGON((0 0, 0.25 0.25, 0.25 5, 5 5, 5 0.25, 0 0), (3 3, 3.25 3, 3.25 3.25, 3.25 3, 3 3), (1 1, 1 2, 2 2, 2 1, 1 1))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid45.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINT(1.2 2.3, 1.21 2.31, 2.2 3.3, 2.21 3.33)'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINT(1.2 2.3, 1.21 2.31, 2.2 3.3, 2.21 3.33)'), 0.25))
MULTIPOINT(1.25 2.25, 2.25 3.25)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid46.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRING((1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9), (2.11 3.11, 2.12 3.12), (3.2 4.2, 4.2 3.2))'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRING((1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9), (2.11 3.11, 2.12 3.12), (3.2 4.2, 4.2 3.2))'), 0.25))
MULTILINESTRING((1.25 2.25, 2 4), (3.25 4.25, 4.25 3.25))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid47.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGON(((5.11 5.11, 5.12 5.11, 4.11 5.11, 5.11 5.12, 5.11 5.11)), ((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1)), ((5.51 5.51, 6.51 5.51, 6.51 6.51, 5.51 6.51, 5.51 5.51)))'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGON(((5.11 5.11, 5.12 5.11, 4.11 5.11, 5.11 5.12, 5.11 5.11)), ((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1)), ((5.51 5.51, 6.51 5.51, 6.51 6.51, 5.51 6.51, 5.51 5.51)))'), 0.25))
MULTIPOLYGON(((0 0, 0.25 0.25, 0.25 5, 5 5, 5 0.25, 0 0), (3 3, 3.25 3, 3.25 3.25, 3.25 3, 3 3), (1 1, 1 2, 2 2, 2 1, 1 1)), ((5.5 5.5, 6.5 5.5, 6.5 6.5, 5.5 6.5, 5.5 5.5)))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid48.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Point ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINTZM(1.2 2.3 10.1 20.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINTZM(1.2 2.3 10.1 20.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POINT ZM(1.25 2.25 10 20)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid49.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Linestring ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.12 20.12, 2.1 3.9 11.4 21.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.12 20.12, 2.1 3.9 11.4 21.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
LINESTRING ZM(1.25 2.25 10 20, 2 4 11.5 21.5)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - two args - text geom (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid('alpha', NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid('alpha', NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid50.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Polygon ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGONZM((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.12, 0.2 5.1 10.12 20.13, 4.9 4.9 10.51 20.51, 5.1 5.1 10.49 20.49, 4.9 0.15 10.1 20.1, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.12 20.12, 3.2 3.1 10.13 20.13, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.2 20.2, 2.1 2.1 10.3 20.3, 2.1 1.1 10.4 20.4, 1.1 1.1 10.1 20.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGONZM((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.12, 0.2 5.1 10.12 20.13, 4.9 4.9 10.51 20.51, 5.1 5.1 10.49 20.49, 4.9 0.15 10.1 20.1, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.12 20.12, 3.2 3.1 10.13 20.13, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.2 20.2, 2.1 2.1 10.3 20.3, 2.1 1.1 10.4 20.4, 1.1 1.1 10.1 20.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POLYGON ZM((0 0 10 20, 0.25 0.25 10 20, 0.25 5 10 20.25, 5 5 10.5 20.5, 5 0.25 10 20, 0 0 10 20), (3 3 10 20, 3.25 3 10 20, 3.25 3.25 10 20, 3.25 3 10.25 20.25, 3 3 10 20), (1 1 10 20, 1 2 10.25 20.25, 2 2 10.25 20.25, 2 1 10.5 20.5, 1 1 10 20))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid51.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 2.2 3.3 21.1 31.1, 2.21 3.33 21.12 31.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 2.2 3.3 21.1 31.1, 2.21 3.33 21.12 31.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOINT ZM(1.25 2.25 10 20, 2.25 3.25 21 31)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid52.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZM((1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.1 20.1, 2.1 3.9 10.11 20.11), (2.11 3.11 10 20, 2.12 3.12 10.1 20.1), (3.2 4.2 10.1 20.1, 4.2 3.2 10.4 20.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZM((1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.1 20.1, 2.1 3.9 10.11 20.11), (2.11 3.11 10 20, 2.12 3.12 10.1 20.1), (3.2 4.2 10.1 20.1, 4.2 3.2 10.4 20.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTILINESTRING ZM((1.25 2.25 10 20, 2 4 10 20), (3.25 4.25 10 20, 4.25 3.25 10.5 20.5))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid53.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZM(((5.11 5.11 10.1 20.1, 5.12 5.11 10.11 20.11, 5.11 5.11 10.12 20.12, 5.11 5.12 10.13 20.13, 5.11 5.11 10.1 20.1)), ((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.11, 0.2 5.1 10.12 20.12, 4.9 4.9 10.13 20.13, 5.1 5.1 10.14 20.14, 4.9 0.15 10.15 20.15, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.11 20.11, 3.2 3.1 10.12 20.12, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.11 20.11, 2.1 2.1 10.12 20.12, 2.1 1.1 10.13 20.13, 1.1 1.1 10.1 20.1)), ((5.51 5.51 10.1 20.1, 6.51 5.51 10.11 20.11, 6.51 6.51 10.12 20.12, 5.51 6.51 10.13 20.13, 5.51 5.51 10.1 20.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZM(((5.11 5.11 10.1 20.1, 5.12 5.11 10.11 20.11, 5.11 5.11 10.12 20.12, 5.11 5.12 10.13 20.13, 5.11 5.11 10.1 20.1)), ((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.11, 0.2 5.1 10.12 20.12, 4.9 4.9 10.13 20.13, 5.1 5.1 10.14 20.14, 4.9 0.15 10.15 20.15, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.11 20.11, 3.2 3.1 10.12 20.12, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.11 20.11, 2.1 2.1 10.12 20.12, 2.1 1.1 10.13 20.13, 1.1 1.1 10.1 20.1)), ((5.51 5.51 10.1 20.1, 6.51 5.51 10.11 20.11, 6.51 6.51 10.12 20.12, 5.51 6.51 10.13 20.13, 5.51 5.51 10.1 20.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOLYGON ZM(((0 0 10 20, 0.25 0.25 10 20, 0.25 5 10 20, 5 5 10.25 20.25, 5 0.25 10.25 20.25, 0 0 10 20), (3 3 10 20, 3.25 3 10 20, 3.25 3.25 10 20, 3.25 3 10 20, 3 3 10 20), (1 1 10 20, 1 2 10 20, 2 2 10 20, 2 1 10.25 20.25, 1 1 10 20)), ((5.5 5.5 10 20, 6.5 5.5 10 20, 6.5 6.5 10 20, 5.5 6.5 10.25 20.25, 5.5 5.5 10 20)))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid54.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Point Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINTZ(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINTZ(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POINT Z(1.25 2.25 10)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid55.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Linestring Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZ(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZ(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
LINESTRING Z(1.25 2.25 10, 2 4 11.5)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid56.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Polygon Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGONZ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGONZ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POLYGON Z((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.5, 5 0.25 10, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10.25, 3 3 10), (1 1 10, 1 2 10.25, 2 2 10.25, 2 1 10.5, 1 1 10))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid57.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZ(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZ(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOINT Z(1.25 2.25 10, 2.25 3.25 21)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid58.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZ((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZ((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTILINESTRING Z((1.25 2.25 10, 2 4 10), (3.25 4.25 10, 4.25 3.25 10.5))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid59.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZ(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZ(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOLYGON Z(((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.25, 5 0.25 10.25, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10, 3 3 10), (1 1 10, 1 2 10, 2 2 10, 2 1 10.25, 1 1 10)), ((5.5 5.5 10, 6.5 5.5 10, 6.5 6.5 10, 5.5 6.5 10.25, 5.5 5.5 10)))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - two args - double geom (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(1.2, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(1.2, NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid60.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Point M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINTM(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINTM(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POINT M(1.25 2.25 10)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid61.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Linestring M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRINGM(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRINGM(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
LINESTRING M(1.25 2.25 10, 2 4 11.5)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid62.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - Polygon M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGONM((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGONM((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POLYGON M((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.5, 5 0.25 10, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10.25, 3 3 10), (1 1 10, 1 2 10.25, 2 2 10.25, 2 1 10.5, 1 1 10))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid63.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTM(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTM(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOINT M(1.25 2.25 10, 2.25 3.25 21)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid64.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGM((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGM((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTILINESTRING M((1.25 2.25 10, 2 4 10), (3.25 4.25 10, 4.25 3.25 10.5))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid65.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONM(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONM(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOLYGON M(((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.25, 5 0.25 10.25, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10, 3 3 10), (1 1 10, 1 2 10, 2 2 10, 2 1 10.25, 1 1 10)), ((5.5 5.5 10, 6.5 5.5 10, 6.5 6.5 10, 5.5 6.5 10.25, 5.5 5.5 10)))

Added test/sql_stmt_lwgeom_tests/st_snaptogrid7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - three args - NULL sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - three args - BLOB sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_snaptogrid9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SnapToGrid - three args - text sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 0.5)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_Split(zeroblob(4), MakePoint(5, 0));
1 # rows (not including the header row)
1 # columns
ST_Split(zeroblob(4), MakePoint(5, 0))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Polygon-Point (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), MakePoint(4, 1));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), MakePoint(4, 1))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Polygon (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Collection (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 2 2)'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 2 2)'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)))
MULTILINESTRING((0 0, 7 0), (7 0, 10 0))

Added test/sql_stmt_lwgeom_tests/st_split14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((0 1, 7 1), (7 1, 10 1))

Added test/sql_stmt_lwgeom_tests/st_split15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - MultiLine-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)))
MULTILINESTRING((0 2, 10 2), (0 0, 7 0), (7 0, 10 0))

Added test/sql_stmt_lwgeom_tests/st_split16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - MultiLine-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((0 2, 7 2), (7 2, 10 2), (0 1, 7 1), (7 1, 10 1))

Added test/sql_stmt_lwgeom_tests/st_split17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Polygon-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(7 0, 7 20)')))
MULTIPOLYGON(((7 1, 0 1, 0 10, 7 10, 7 1)), ((7 10, 10 10, 10 1, 7 1, 7 10)))

Added test/sql_stmt_lwgeom_tests/st_split18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Collection-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(7 0, 7 20)')))
GEOMETRYCOLLECTION(LINESTRING(0 11, 7 11), LINESTRING(7 11, 10 11), POLYGON((7 1, 0 1, 0 10, 7 10, 7 1)), POLYGON((7 10, 10 10, 10 1, 7 1, 7 10)))

Added test/sql_stmt_lwgeom_tests/st_split19.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
LINESTRING(0 0, 10 0)

Added test/sql_stmt_lwgeom_tests/st_split2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - NULL BLOB input (error)
:memory: #use in-memory database
SELECT ST_Split(NULL, MakePoint(5, 0));
1 # rows (not including the header row)
1 # columns
ST_Split(NULL, MakePoint(5, 0))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split20.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')))
LINESTRING(0 1, 10 1)

Added test/sql_stmt_lwgeom_tests/st_split21.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - MultiLine-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)))
MULTILINESTRING((0 2, 10 2), (0 0, 10 0))

Added test/sql_stmt_lwgeom_tests/st_split22.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - MultiLine-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')))
MULTILINESTRING((0 2, 10 2), (0 1, 10 1))

Added test/sql_stmt_lwgeom_tests/st_split23.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Polygon-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))))
POLYGON((0 1, 0 10, 10 10, 10 1, 0 1))

Added test/sql_stmt_lwgeom_tests/st_split24.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Collection-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))))
GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 0 10, 10 10, 10 1, 0 1)))

Added test/sql_stmt_lwgeom_tests/st_split25.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
LINESTRING(0 0, 10 0)

Added test/sql_stmt_lwgeom_tests/st_split26.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitlLeft - Line-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRINGZM(0 0 10 100, 10 0 11 101)'), MakePointZM(7, 0, 10, 100)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRINGZM(0 0 10 100, 10 0 11 101)'), MakePointZM(7, 0, 10, 100)))
LINESTRING ZM(0 0 10 100, 7 0 10.7 100.7)

Added test/sql_stmt_lwgeom_tests/st_split27.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Line-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRINGM(0 1 10, 10 1 10)'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRINGM(0 1 10, 10 1 10)'), GeomFromText('LINESTRING(7 0, 7 3)')))
LINESTRING M(0 1 0, 7 1 0)

Added test/sql_stmt_lwgeom_tests/st_split28.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRINGZ((0 2 10, 10 2 11), (0 0 10, 10 0 11))'), MakePointZ(7, 0, 10)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRINGZ((0 2 10, 10 2 11), (0 0 10, 10 0 11))'), MakePointZ(7, 0, 10)))
MULTILINESTRING Z((0 2 10, 10 2 11), (0 0 10, 7 0 10.7))

Added test/sql_stmt_lwgeom_tests/st_split29.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((0 2, 7 2), (0 1, 7 1))

Added test/sql_stmt_lwgeom_tests/st_split3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - text input (error)
:memory: #use in-memory database
SELECT ST_Split('alpha', MakePoint(5, 0));
1 # rows (not including the header row)
1 # columns
ST_Split('alpha', MakePoint(5, 0))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split30.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Polygon-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGONZ((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10))'), GeomFromText('LINESTRING(7 0, 7 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGONZ((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10))'), GeomFromText('LINESTRING(7 0, 7 20)'))))
POLYGON Z((7 1 10.7, 0 1 10, 0 10 13, 7 10 12.3, 7 9 12.5, 5 9 13, 5 5 10, 7 5 10.5, 7 1 10.7))

Added test/sql_stmt_lwgeom_tests/st_split31.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Collection-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTIONM(LINESTRINGM(0 11 10, 10 11 10), POLYGONM((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10)))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTIONM(LINESTRINGM(0 11 10, 10 11 10), POLYGONM((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10)))'), GeomFromText('LINESTRING(7 0, 7 20)')))
GEOMETRYCOLLECTION M(LINESTRING M(0 11 0, 7 11 0), POLYGON M((7 1 0, 0 1 0, 0 10 0, 7 10 0, 7 9 0, 5 9 0, 5 5 0, 7 5 0, 7 1 0)))

Added test/sql_stmt_lwgeom_tests/st_split32.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
LINESTRING(0 0, 10 0)

Added test/sql_stmt_lwgeom_tests/st_split33.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Line-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')))
LINESTRING(0 1, 10 1)

Added test/sql_stmt_lwgeom_tests/st_split34.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)))
MULTILINESTRING((0 2, 10 2), (0 0, 10 0))

Added test/sql_stmt_lwgeom_tests/st_split35.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')))
MULTILINESTRING((0 2, 10 2), (0 1, 10 1))

Added test/sql_stmt_lwgeom_tests/st_split36.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Polygon-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5))'), GeomFromText('LINESTRING(12 0, 12 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5))'), GeomFromText('LINESTRING(12 0, 12 20)'))))
POLYGON((0 1, 0 10, 10 10, 10 1, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5))

Added test/sql_stmt_lwgeom_tests/st_split37.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitLeft - Collection-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))))
GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 0 10, 10 10, 10 1, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))

Added test/sql_stmt_lwgeom_tests/st_split38.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitlRight - Line-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)))
LINESTRING(7 0, 10 0)

Added test/sql_stmt_lwgeom_tests/st_split39.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Line-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')))
LINESTRING(7 1, 10 1)

Added test/sql_stmt_lwgeom_tests/st_split4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Invalid BLOB blade (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), zeroblob(4))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split40.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - MultiLine-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)))
LINESTRING(7 0, 10 0)

Added test/sql_stmt_lwgeom_tests/st_split41.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - MultiLine-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((7 2, 10 2), (7 1, 10 1))

Added test/sql_stmt_lwgeom_tests/st_split42.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Polygon-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('POLYGONZM((0 1 10 100, 10 1 11 101, 10 10 12 102, 0 10 13 103, 0 1 10 100), (5 5 10 100, 9 5 11 101, 9 9 12 102, 5 9 13 103, 5 5 10 100))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('POLYGONZM((0 1 10 100, 10 1 11 101, 10 10 12 102, 0 10 13 103, 0 1 10 100), (5 5 10 100, 9 5 11 101, 9 9 12 102, 5 9 13 103, 5 5 10 100))'), GeomFromText('LINESTRING(7 0, 7 20)')))
POLYGON ZM((7 10 12.3 0, 10 10 12 0, 10 1 11 0, 7 1 10.7 0, 7 5 10.5 0, 9 5 11 0, 9 9 12 0, 7 9 12.5 0, 7 10 12.3 0))

Added test/sql_stmt_lwgeom_tests/st_split43.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Collection-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(7 0, 7 20)')))
GEOMETRYCOLLECTION(LINESTRING(7 11, 10 11), POLYGON((7 10, 10 10, 10 1, 7 1, 7 5, 9 5, 9 9, 7 9, 7 10)))

Added test/sql_stmt_lwgeom_tests/st_split44.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split45.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Line-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split46.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRigt - MultiLine-Point (not split)
:memory: #use in-memory database
SELECT ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0));
1 # rows (not including the header row)
1 # columns
ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split47.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - MultiLine-Line (not split)
:memory: #use in-memory database
SELECT ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)'));
1 # rows (not including the header row)
1 # columns
ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split48.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Polygon-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitRight(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitRight(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split49.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_SplitRight - Collection-Line (not split)
:memory: #use in-memory database
SELECT ST_ForceLHR(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)')));
1 # rows (not including the header row)
1 # columns
ST_ForceLHR(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)')))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - NULL BLOB blade (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), NULL)
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - text input blade (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), 'alpha')
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Point-Point (error)
:memory: #use in-memory database
SELECT ST_Split(MakePoint(0, 0), MakePoint(1, 1));
1 # rows (not including the header row)
1 # columns
ST_Split(MakePoint(0, 0), MakePoint(1, 1))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Line-Multiline (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))'))
(NULL)

Added test/sql_stmt_lwgeom_tests/st_split9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
ST_Split - Polygon-Multiline (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))'))
(NULL)

Changes to test/sql_stmt_mathsql_tests/Makefile.am.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
	asin1.testcase \
	asin20.testcase \
	asin2.testcase \
	asin-text.testcase \
	atan00.testcase \
	atan0.testcase \
	atan-text.testcase \
	atan21.testcase \
	atan22.testcase \
	atan23.testcase \
	atan24.testcase \
	atan25.testcase \
	atan26.testcase \
	atan27.testcase \
	atan28.testcase \
	ceilfloat2.testcase \
	ceilfloat.testcase \
	ceil-int.testcase \
	ceilnull.testcase \
	cos00.testcase \
	cos0.testcase \
	cos-text.testcase \







<
<
<
<
<
<
<
<







8
9
10
11
12
13
14








15
16
17
18
19
20
21
	asin1.testcase \
	asin20.testcase \
	asin2.testcase \
	asin-text.testcase \
	atan00.testcase \
	atan0.testcase \
	atan-text.testcase \








	ceilfloat2.testcase \
	ceilfloat.testcase \
	ceil-int.testcase \
	ceilnull.testcase \
	cos00.testcase \
	cos0.testcase \
	cos-text.testcase \

Changes to test/sql_stmt_mathsql_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
...
372
373
374
375
376
377
378

379
380
381
382
383
384
385
...
546
547
548
549
550
551
552
553
554
555
556
557
558
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_mathsql_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	asin1.testcase \
	asin20.testcase \
	asin2.testcase \
	asin-text.testcase \
	atan00.testcase \
	atan0.testcase \
	atan-text.testcase \
	atan21.testcase \
	atan22.testcase \
	atan23.testcase \
	atan24.testcase \
	atan25.testcase \
	atan26.testcase \
	atan27.testcase \
	atan28.testcase \
	ceilfloat2.testcase \
	ceilfloat.testcase \
	ceil-int.testcase \
	ceilnull.testcase \
	cos00.testcase \
	cos0.testcase \
	cos-text.testcase \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_mathsql_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_mathsql_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







<
<
<
<
<
<
<
<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
249
250
251
252
253
254
255








256
257
258
259
260
261
262
...
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
...
528
529
530
531
532
533
534


535
536
537
538
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_mathsql_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	asin1.testcase \
	asin20.testcase \
	asin2.testcase \
	asin-text.testcase \
	atan00.testcase \
	atan0.testcase \
	atan-text.testcase \








	ceilfloat2.testcase \
	ceilfloat.testcase \
	ceil-int.testcase \
	ceilnull.testcase \
	cos00.testcase \
	cos0.testcase \
	cos-text.testcase \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_mathsql_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_mathsql_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sql_stmt_mathsql_tests/atan21.testcase.

1
2
3
4
5
6
7
8
atan2 - first arg TEXT
:memory: # use in-memory database
SELECT atan2('test', 0.0);
1 # rows (not including the header row)
1 # columns
atan2('test', 0.0) # header
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_mathsql_tests/atan22.testcase.

1
2
3
4
5
6
7
8
atan2 - first arg BLOB
:memory: # use in-memory database
SELECT atan2(zeroblob(4), 0.0);
1 # rows (not including the header row)
1 # columns
atan2(zeroblob(4), 0.0) # header
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_mathsql_tests/atan23.testcase.

1
2
3
4
5
6
7
8
atan2 - first arg NULL
:memory: # use in-memory database
SELECT atan2(NULL, 0.0);
1 # rows (not including the header row)
1 # columns
atan2(NULL, 0.0) # header
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_mathsql_tests/atan24.testcase.

1
2
3
4
5
6
7
8
atan2 - second arg NULL
:memory: # use in-memory database
SELECT atan2(0.0, NULL);
1 # rows (not including the header row)
1 # columns
atan2(0.0, NULL) # header
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_mathsql_tests/atan25.testcase.

1
2
3
4
5
6
7
8
atan2 - second arg BLOB
:memory: # use in-memory database
SELECT atan2(0.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
atan2(0.0, zeroblob(4)) # header
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_mathsql_tests/atan26.testcase.

1
2
3
4
5
6
7
8
atan2 - second arg TEXT
:memory: # use in-memory database
SELECT atan2(0.0, 'test');
1 # rows (not including the header row)
1 # columns
atan2(0.0, 'test') # header
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_mathsql_tests/atan27.testcase.

1
2
3
4
5
6
7
atan2 - second arg DOUBLE - valid
:memory: # use in-memory database
SELECT atan2(0.0, 0.0);
1 # rows (not including the header row)
1 # columns
atan2(0.0, 0.0) # header
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_mathsql_tests/atan28.testcase.

1
2
3
4
5
6
7
atan2 - INT args - valid
:memory: # use in-memory database
SELECT atan2(0, 0);
1 # rows (not including the header row)
1 # columns
atan2(0, 0) # header
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_nocache_tests/Makefile.am.

1
2
3

EXTRA_DIST = precision1.testcase \
	precision2.testcase 
<
<
<






Deleted test/sql_stmt_nocache_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_nocache_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = precision1.testcase \
	precision2.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_nocache_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_nocache_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_nocache_tests/precision1.testcase.

1
2
3
4
5
6
7
8
9
decimal precision - 10
:memory:
SELECT SetDecimalPrecision(10), GetDecimalPrecision();
1 # rows
2 # column
SetDecimalPrecision(10)
GetDecimalPrecision()
(NULL)
-1
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_nocache_tests/precision2.testcase.

1
2
3
4
5
6
7
8
9
decimal precision - 100
:memory:
SELECT SetDecimalPrecision(100), GetDecimalPrecision();
1 # rows
2 # column
SetDecimalPrecision(100)
GetDecimalPrecision()
(NULL)
-1
<
<
<
<
<
<
<
<
<


















Deleted test/sql_stmt_point_geom/Makefile.am.

1
2

EXTRA_DIST = isXblob5.testcase 
<
<




Deleted test/sql_stmt_point_geom/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_point_geom
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = isXblob5.testcase 
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_point_geom/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_point_geom/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_point_geom/isXblob5.testcase.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
isXblob - geom - Point-Geometry
:memory: #use in-memory database
SELECT Hex(blob), IsPngBlob(blob), IsGifBlob(blob), IsGeometryBlob(blob), IsTinyPointBlob(blob), IsZipBlob(blob), IsPdfBlob(blob), IsTiffBlob(blob), IsJpegBlob(blob), IsExifBlob(blob), IsExifGpsBlob(blob), IsWebpBlob(blob) FROM (SELECT GeomFromText("POINT(1 3)") as blob) dummy 
1 # rows (not including the header row)
12 # columns
Hex(blob)
IsPngBlob(blob)
IsGifBlob(blob)
IsGeometryBlob(blob)
IsTinyPointBlob(blob)
IsZipBlob(blob)
IsPdfBlob(blob)
IsTiffBlob(blob)
IsJpegBlob(blob)
IsExifBlob(blob)
IsExifGpsBlob(blob)
IsWebpBlob(blob)
000100000000000000000000F03F0000000000000840000000000000F03F00000000000008407C01000000000000000000F03F0000000000000840FE
0
0
1
0
0
0
0
0
0
0
0
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted test/sql_stmt_proj492_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

EXTRA_DIST = transform10.testcase \
	transform11.testcase \
	transform12.testcase \
	transform13.testcase \
	transform14.testcase \
	transform15.testcase \
	transform16.testcase \
	transform17.testcase \
	transform18.testcase \
	transform19.testcase \
	transform1.testcase \
	transform20.testcase \
	transform21.testcase \
	transform2.testcase \
	transform3.testcase \
	transform4.testcase \
	transform5.testcase \
	transform6.testcase \
	transform7.testcase \
	transform8.testcase \
	transform9.testcase \
	transformxy10.testcase \
	transformxy11.testcase \
	transformxy1.testcase \
	transformxy2.testcase \
	transformxy3.testcase \
	transformxy4.testcase \
	transformxy5.testcase \
	transformxy6.testcase \
	transformxy7.testcase \
	transformxy8.testcase \
	transformxy9.testcase 
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted test/sql_stmt_proj492_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_proj492_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = transform10.testcase \
	transform11.testcase \
	transform12.testcase \
	transform13.testcase \
	transform14.testcase \
	transform15.testcase \
	transform16.testcase \
	transform17.testcase \
	transform18.testcase \
	transform19.testcase \
	transform1.testcase \
	transform20.testcase \
	transform21.testcase \
	transform2.testcase \
	transform3.testcase \
	transform4.testcase \
	transform5.testcase \
	transform6.testcase \
	transform7.testcase \
	transform8.testcase \
	transform9.testcase \
	transformxy10.testcase \
	transformxy11.testcase \
	transformxy1.testcase \
	transformxy2.testcase \
	transformxy3.testcase \
	transformxy4.testcase \
	transformxy5.testcase \
	transformxy6.testcase \
	transformxy7.testcase \
	transformxy8.testcase \
	transformxy9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_proj492_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_proj492_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_proj492_tests/transform1.testcase.

1
2
3
4
5
6
7
transform - null args
:memory: #use in-memory database
SELECT Transform(NULL, NULL)
1 # rows (not including the header row)
1 # columns
Transform(NULL, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform10.testcase.

1
2
3
4
5
6
7
transform - Linestring M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGM(11 43 1, 12 43 2, 12 42 3)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGM(11 43 1, 12 43 2, 12 42 3)', 4326), 32632))
LINESTRING M(663019.070082 4762755.64169 1, 744533.019451 4765182.932802 2, 748464.920716 4654130.891324 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform11.testcase.

1
2
3
4
5
6
7
transform - Linestring ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGZM(11 43 100 1, 12 43 101 2, 12 42 102 3)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZM(11 43 100 1, 12 43 101 2, 12 42 102 3)', 4326), 32632))
LINESTRING ZM(663019.070082 4762755.64169 100 1, 744533.019451 4765182.932802 101 2, 748464.920716 4654130.891324 102 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform12.testcase.

1
2
3
4
5
6
7
transform - Point Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZ(11 43 100)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZ(11 43 100)', 4326), 32632))
POINT Z(663019.070082 4762755.64169 100)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform13.testcase.

1
2
3
4
5
6
7
transform - Point M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTM(11 43 1)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTM(11 43 1)', 4326), 32632))
POINT M(663019.070082 4762755.64169 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform14.testcase.

1
2
3
4
5
6
7
transform - Point ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZM(11 43 100 1)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZM(11 43 100 1)', 4326), 32632))
POINT ZM(663019.070082 4762755.64169 100 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform15.testcase.

1
2
3
4
5
6
7
transform - Point ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZM(663019 4762755 100 1)', 32632), 4326))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZM(663019 4762755 100 1)', 32632), 4326))
POINT ZM(10.999999 42.999994 100 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform16.testcase.

1
2
3
4
5
6
7
transform - Polygon
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGON((11 43, 12 43, 12 44, 11 44, 11 43), (11.4 43.4, 11.6 43.4, 11.6 43.6, 11.4 43.6, 11.4 43.4))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGON((11 43, 12 43, 12 44, 11 44, 11 43), (11.4 43.4, 11.6 43.4, 11.6 43.6, 11.4 43.6, 11.4 43.4))', 4326), 32632))
POLYGON((663019.070082 4762755.64169, 744533.019451 4765182.932802, 740526.321055 4876249.126963, 660349.410579 4873817.333441, 663019.070082 4762755.64169), (694349.575562 4808033.274618, 710545.984354 4808519.151148, 709851.653212 4830731.987849, 693708.725206 4830245.931093, 694349.575562 4808033.274618))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform17.testcase.

1
2
3
4
5
6
7
transform - Polygon Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONZ((11 43 100, 12 43 101, 12 44 102, 11 44 103, 11 43 100), (11.4 43.4 100, 11.6 43.4 101, 11.6 43.6 102, 11.4 43.6 103, 11.4 43.4 100))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONZ((11 43 100, 12 43 101, 12 44 102, 11 44 103, 11 43 100), (11.4 43.4 100, 11.6 43.4 101, 11.6 43.6 102, 11.4 43.6 103, 11.4 43.4 100))', 4326), 32632))
POLYGON Z((663019.070082 4762755.64169 100, 744533.019451 4765182.932802 101, 740526.321055 4876249.126963 102, 660349.410579 4873817.333441 103, 663019.070082 4762755.64169 100), (694349.575562 4808033.274618 100, 710545.984354 4808519.151148 101, 709851.653212 4830731.987849 102, 693708.725206 4830245.931093 103, 694349.575562 4808033.274618 100))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform18.testcase.

1
2
3
4
5
6
7
transform - Polygon M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONM((11 43 1, 12 43 2, 12 44 3, 11 44 4, 11 43 1), (11.4 43.4 1, 11.6 43.4 2, 11.6 43.6 3, 11.4 43.6 4, 11.4 43.4 1))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONM((11 43 1, 12 43 2, 12 44 3, 11 44 4, 11 43 1), (11.4 43.4 1, 11.6 43.4 2, 11.6 43.6 3, 11.4 43.6 4, 11.4 43.4 1))', 4326), 32632))
POLYGON M((663019.070082 4762755.64169 1, 744533.019451 4765182.932802 2, 740526.321055 4876249.126963 3, 660349.410579 4873817.333441 4, 663019.070082 4762755.64169 1), (694349.575562 4808033.274618 1, 710545.984354 4808519.151148 2, 709851.653212 4830731.987849 3, 693708.725206 4830245.931093 4, 694349.575562 4808033.274618 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform19.testcase.

1
2
3
4
5
6
7
transform - Polygon ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONZM((11 43 100 1, 12 43 101 2, 12 44 102 3, 11 44 103 4, 11 43 100 1), (11.4 43.4 100 1, 11.6 43.4 101 2, 11.6 43.6 102 3, 11.4 43.6 103 4, 11.4 43.4 100 1))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONZM((11 43 100 1, 12 43 101 2, 12 44 102 3, 11 44 103 4, 11 43 100 1), (11.4 43.4 100 1, 11.6 43.4 101 2, 11.6 43.6 102 3, 11.4 43.6 103 4, 11.4 43.4 100 1))', 4326), 32632))
POLYGON ZM((663019.070082 4762755.64169 100 1, 744533.019451 4765182.932802 101 2, 740526.321055 4876249.126963 102 3, 660349.410579 4873817.333441 103 4, 663019.070082 4762755.64169 100 1), (694349.575562 4808033.274618 100 1, 710545.984354 4808519.151148 101 2, 709851.653212 4830731.987849 102 3, 693708.725206 4830245.931093 103 4, 694349.575562 4808033.274618 100 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform2.testcase.

1
2
3
4
5
6
7
transform - zeroblob arg 
:memory: #use in-memory database
SELECT Transform(zeroblob(48), NULL)
1 # rows (not including the header row)
1 # columns
Transform(zeroblob(48), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform20.testcase.

1
2
3
4
5
6
7
transform - Polygon
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGON((663000 4762000, 663100 4762000, 663100 4762100, 663000 4762100, 663000 4762000), (663010 4762010, 663020 4762010, 663020 4762020, 663010 4762020, 663010 4762010))', 32632), 4326))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGON((663000 4762000, 663100 4762000, 663100 4762100, 663000 4762100, 663000 4762000), (663010 4762010, 663020 4762010, 663020 4762020, 663010 4762020, 663010 4762010))', 32632), 4326))
POLYGON((10.999546 42.993204, 11.000772 42.993182, 11.000801 42.994082, 10.999575 42.994104, 10.999546 42.993204), (10.999671 42.993291, 10.999794 42.993289, 10.999797 42.993379, 10.999674 42.993381, 10.999671 42.993291))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform21.testcase.

1
2
3
4
5
6
7
transform - Point
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32656))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32656))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform3.testcase.

1
2
3
4
5
6
7
transform - Point
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32632))
POINT(663019.070082 4762755.64169)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform4.testcase.

1
2
3
4
5
6
7
transform - Point (unknown srid)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)'), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)'), 32632))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform5.testcase.

1
2
3
4
5
6
7
transform - Point (unknown destination SRID)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 326320))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 326320))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform6.testcase.

1
2
3
4
5
6
7
transform - Point (NULL srid)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), NULL))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform7.testcase.

1
2
3
4
5
6
7
transform - Linestring
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42)', 4326), 32632))
LINESTRING(663019.070082 4762755.64169, 744533.019451 4765182.932802, 748464.920716 4654130.891324)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform8.testcase.

1
2
3
4
5
6
7
transform - illegal Linestring
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42', 4326), 32632))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transform9.testcase.

1
2
3
4
5
6
7
transform - Linestring Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
LINESTRING Z(663019.070082 4762755.64169 100, 744533.019451 4765182.932802 101, 748464.920716 4654130.891324 102)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy1.testcase.

1
2
3
4
5
6
7
ST_TransformXY - null Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(NULL, 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(NULL, 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy10.testcase.

1
2
3
4
5
6
7
ST_TransformXY - 2D XY GeometryCollection
:memory: #use in-memory database
SELECT AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTION(POINT(11.1 41.1), LINESTRING(11.2 41.2, 11.3 41.3), POLYGON((11.3 41.3, 11.8 41.3, 11.8 41.8, 11.3 41.8, 11.3 41.3), (11.4 41.4, 11.7 41.4, 11.7 41.7, 11.4 41.7, 11.4 41.4)))', 4326), 3003));
1 # rows (not including the header row)
1 # columns
AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTION(POINT(11.1 41.1), LINESTRING(11.2 41.2, 11.3 41.3), POLYGON((11.3 41.3, 11.8 41.3, 11.8 41.8, 11.3 41.8, 11.3 41.3), (11.4 41.4, 11.7 41.4, 11.7 41.7, 11.4 41.7, 11.4 41.4)))', 4326), 3003))
GEOMETRYCOLLECTION(POINT(1676380.538791 4551993.304759), LINESTRING(1684498.324131 4563303.102442, 1692590.049453 4574622.920763), POLYGON((1692590.049453 4574622.920763, 1734455.803025 4575853.343594, 1732655.006872 4631372.543298, 1691111.320326 4630139.503574, 1692590.049453 4574622.920763), (1700655.635839 4585952.766718, 1725736.586456 4586691.348854, 1724694.769275 4620002.530275, 1699729.76246 4619263.006007, 1700655.635839 4585952.766718)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy11.testcase.

1
2
3
4
5
6
7
ST_TransformXY - 3D XYZ GeometryCollection
:memory: #use in-memory database
SELECT AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(11.1 41.1 1.0), LINESTRINGZ(11.2 41.2 1.1, 11.3 41.3 1.2), POLYGONZ((11.3 41.3 1.1, 11.8 41.3 1.2, 11.8 41.8 1.3, 11.3 41.8 1.2, 11.3 41.3 1.1), (11.4 41.4 1.2, 11.7 41.4 1.3, 11.7 41.7 1.4, 11.4 41.7 1.3, 11.4 41.4 1.2)))', 4326), 3003));
1 # rows (not including the header row)
1 # columns
AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(11.1 41.1 1.0), LINESTRINGZ(11.2 41.2 1.1, 11.3 41.3 1.2), POLYGONZ((11.3 41.3 1.1, 11.8 41.3 1.2, 11.8 41.8 1.3, 11.3 41.8 1.2, 11.3 41.3 1.1), (11.4 41.4 1.2, 11.7 41.4 1.3, 11.7 41.7 1.4, 11.4 41.7 1.3, 11.4 41.4 1.2)))', 4326), 3003))
GEOMETRYCOLLECTION Z(POINT Z(1676380.538791 4551993.304759 1), LINESTRING Z(1684498.324131 4563303.102442 1.1, 1692590.049453 4574622.920763 1.2), POLYGON Z((1692590.049453 4574622.920763 1.1, 1734455.803025 4575853.343594 1.2, 1732655.006872 4631372.543298 1.3, 1691111.320326 4630139.503574 1.2, 1692590.049453 4574622.920763 1.1), (1700655.635839 4585952.766718 1.2, 1725736.586456 4586691.348854 1.3, 1724694.769275 4620002.530275 1.4, 1699729.76246 4619263.006007 1.3, 1700655.635839 4585952.766718 1.2)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy2.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Text Geometry
:memory: #use in-memory database
SELECT ST_TransformXY('geom', 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY('geom', 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy3.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Int Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(1, 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(1, 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy4.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Double Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(1.5, 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(1.5, 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy5.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Invalid Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(zeroblob(10), 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(zeroblob(10), 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy6.testcase.

1
2
3
4
5
6
7
ST_TransformXY - NULL SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy7.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Text SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), 'srid');
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), 'srid')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy8.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Double SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), 3003.4);
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), 3003.4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj492_tests/transformxy9.testcase.

1
2
3
4
5
6
7
ST_TransformXY - BLOB SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

EXTRA_DIST = transform10.testcase \
	transform11.testcase \
	transform12.testcase \
	transform13.testcase \
	transform14.testcase \
	transform15.testcase \
	transform16.testcase \
	transform17.testcase \
	transform18.testcase \
	transform19.testcase \
	transform1.testcase \
	transform20.testcase \
	transform21.testcase \
	transform2.testcase \
	transform3.testcase \
	transform4.testcase \
	transform5.testcase \
	transform6.testcase \
	transform7.testcase \
	transform8.testcase \
	transform9.testcase \
	transformxy10.testcase \
	transformxy11.testcase \
	transformxy1.testcase \
	transformxy2.testcase \
	transformxy3.testcase \
	transformxy4.testcase \
	transformxy5.testcase \
	transformxy6.testcase \
	transformxy7.testcase \
	transformxy8.testcase \
	transformxy9.testcase 
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted test/sql_stmt_proj493_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_proj493_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = transform10.testcase \
	transform11.testcase \
	transform12.testcase \
	transform13.testcase \
	transform14.testcase \
	transform15.testcase \
	transform16.testcase \
	transform17.testcase \
	transform18.testcase \
	transform19.testcase \
	transform1.testcase \
	transform20.testcase \
	transform21.testcase \
	transform2.testcase \
	transform3.testcase \
	transform4.testcase \
	transform5.testcase \
	transform6.testcase \
	transform7.testcase \
	transform8.testcase \
	transform9.testcase \
	transformxy10.testcase \
	transformxy11.testcase \
	transformxy1.testcase \
	transformxy2.testcase \
	transformxy3.testcase \
	transformxy4.testcase \
	transformxy5.testcase \
	transformxy6.testcase \
	transformxy7.testcase \
	transformxy8.testcase \
	transformxy9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_proj493_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_proj493_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_proj493_tests/transform1.testcase.

1
2
3
4
5
6
7
transform - null args
:memory: #use in-memory database
SELECT Transform(NULL, NULL)
1 # rows (not including the header row)
1 # columns
Transform(NULL, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform10.testcase.

1
2
3
4
5
6
7
transform - Linestring M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGM(11 43 1, 12 43 2, 12 42 3)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGM(11 43 1, 12 43 2, 12 42 3)', 4326), 32632))
LINESTRING M(663019.070081 4762755.641689 1, 744533.019447 4765182.932801 2, 748464.920712 4654130.891323 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform11.testcase.

1
2
3
4
5
6
7
transform - Linestring ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGZM(11 43 100 1, 12 43 101 2, 12 42 102 3)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZM(11 43 100 1, 12 43 101 2, 12 42 102 3)', 4326), 32632))
LINESTRING ZM(663019.070081 4762755.641689 100 1, 744533.019447 4765182.932801 101 2, 748464.920712 4654130.891323 102 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform12.testcase.

1
2
3
4
5
6
7
transform - Point Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZ(11 43 100)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZ(11 43 100)', 4326), 32632))
POINT Z(663019.070081 4762755.641689 100)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform13.testcase.

1
2
3
4
5
6
7
transform - Point M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTM(11 43 1)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTM(11 43 1)', 4326), 32632))
POINT M(663019.070081 4762755.641689 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform14.testcase.

1
2
3
4
5
6
7
transform - Point ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZM(11 43 100 1)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZM(11 43 100 1)', 4326), 32632))
POINT ZM(663019.070081 4762755.641689 100 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform15.testcase.

1
2
3
4
5
6
7
transform - Point ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZM(663019 4762755 100 1)', 32632), 4326))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZM(663019 4762755 100 1)', 32632), 4326))
POINT ZM(10.999999 42.999994 100 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform16.testcase.

1
2
3
4
5
6
7
transform - Polygon
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGON((11 43, 12 43, 12 44, 11 44, 11 43), (11.4 43.4, 11.6 43.4, 11.6 43.6, 11.4 43.6, 11.4 43.4))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGON((11 43, 12 43, 12 44, 11 44, 11 43), (11.4 43.4, 11.6 43.4, 11.6 43.6, 11.4 43.6, 11.4 43.4))', 4326), 32632))
POLYGON((663019.070081 4762755.641689, 744533.019447 4765182.932801, 740526.321052 4876249.126962, 660349.410578 4873817.33344, 663019.070081 4762755.641689), (694349.575561 4808033.274617, 710545.984353 4808519.151148, 709851.653211 4830731.987848, 693708.725205 4830245.931092, 694349.575561 4808033.274617))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform17.testcase.

1
2
3
4
5
6
7
transform - Polygon Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONZ((11 43 100, 12 43 101, 12 44 102, 11 44 103, 11 43 100), (11.4 43.4 100, 11.6 43.4 101, 11.6 43.6 102, 11.4 43.6 103, 11.4 43.4 100))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONZ((11 43 100, 12 43 101, 12 44 102, 11 44 103, 11 43 100), (11.4 43.4 100, 11.6 43.4 101, 11.6 43.6 102, 11.4 43.6 103, 11.4 43.4 100))', 4326), 32632))
POLYGON Z((663019.070081 4762755.641689 100, 744533.019447 4765182.932801 101, 740526.321052 4876249.126962 102, 660349.410578 4873817.33344 103, 663019.070081 4762755.641689 100), (694349.575561 4808033.274617 100, 710545.984353 4808519.151148 101, 709851.653211 4830731.987848 102, 693708.725205 4830245.931092 103, 694349.575561 4808033.274617 100))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform18.testcase.

1
2
3
4
5
6
7
transform - Polygon M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONM((11 43 1, 12 43 2, 12 44 3, 11 44 4, 11 43 1), (11.4 43.4 1, 11.6 43.4 2, 11.6 43.6 3, 11.4 43.6 4, 11.4 43.4 1))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONM((11 43 1, 12 43 2, 12 44 3, 11 44 4, 11 43 1), (11.4 43.4 1, 11.6 43.4 2, 11.6 43.6 3, 11.4 43.6 4, 11.4 43.4 1))', 4326), 32632))
POLYGON M((663019.070081 4762755.641689 1, 744533.019447 4765182.932801 2, 740526.321052 4876249.126962 3, 660349.410578 4873817.33344 4, 663019.070081 4762755.641689 1), (694349.575561 4808033.274617 1, 710545.984353 4808519.151148 2, 709851.653211 4830731.987848 3, 693708.725205 4830245.931092 4, 694349.575561 4808033.274617 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform19.testcase.

1
2
3
4
5
6
7
transform - Polygon ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONZM((11 43 100 1, 12 43 101 2, 12 44 102 3, 11 44 103 4, 11 43 100 1), (11.4 43.4 100 1, 11.6 43.4 101 2, 11.6 43.6 102 3, 11.4 43.6 103 4, 11.4 43.4 100 1))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONZM((11 43 100 1, 12 43 101 2, 12 44 102 3, 11 44 103 4, 11 43 100 1), (11.4 43.4 100 1, 11.6 43.4 101 2, 11.6 43.6 102 3, 11.4 43.6 103 4, 11.4 43.4 100 1))', 4326), 32632))
POLYGON ZM((663019.070081 4762755.641689 100 1, 744533.019447 4765182.932801 101 2, 740526.321052 4876249.126962 102 3, 660349.410578 4873817.33344 103 4, 663019.070081 4762755.641689 100 1), (694349.575561 4808033.274617 100 1, 710545.984353 4808519.151148 101 2, 709851.653211 4830731.987848 102 3, 693708.725205 4830245.931092 103 4, 694349.575561 4808033.274617 100 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform2.testcase.

1
2
3
4
5
6
7
transform - zeroblob arg 
:memory: #use in-memory database
SELECT Transform(zeroblob(48), NULL)
1 # rows (not including the header row)
1 # columns
Transform(zeroblob(48), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform20.testcase.

1
2
3
4
5
6
7
transform - Polygon
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGON((663000 4762000, 663100 4762000, 663100 4762100, 663000 4762100, 663000 4762000), (663010 4762010, 663020 4762010, 663020 4762020, 663010 4762020, 663010 4762010))', 32632), 4326))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGON((663000 4762000, 663100 4762000, 663100 4762100, 663000 4762100, 663000 4762000), (663010 4762010, 663020 4762010, 663020 4762020, 663010 4762020, 663010 4762010))', 32632), 4326))
POLYGON((10.999546 42.993204, 11.000772 42.993182, 11.000801 42.994082, 10.999575 42.994104, 10.999546 42.993204), (10.999671 42.993291, 10.999794 42.993289, 10.999797 42.993379, 10.999674 42.993381, 10.999671 42.993291))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform21.testcase.

1
2
3
4
5
6
7
transform - Point
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32656))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32656))
POINT(-2597420.600731 14476742.727325)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform3.testcase.

1
2
3
4
5
6
7
transform - Point
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32632))
POINT(663019.070081 4762755.641689)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform4.testcase.

1
2
3
4
5
6
7
transform - Point (unknown srid)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)'), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)'), 32632))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform5.testcase.

1
2
3
4
5
6
7
transform - Point (unknown destination SRID)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 326320))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 326320))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform6.testcase.

1
2
3
4
5
6
7
transform - Point (NULL srid)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), NULL))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform7.testcase.

1
2
3
4
5
6
7
transform - Linestring
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42)', 4326), 32632))
LINESTRING(663019.070081 4762755.641689, 744533.019447 4765182.932801, 748464.920712 4654130.891323)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform8.testcase.

1
2
3
4
5
6
7
transform - illegal Linestring
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42', 4326), 32632))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transform9.testcase.

1
2
3
4
5
6
7
transform - Linestring Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
LINESTRING Z(663019.070081 4762755.641689 100, 744533.019447 4765182.932801 101, 748464.920712 4654130.891323 102)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy1.testcase.

1
2
3
4
5
6
7
ST_TransformXY - null Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(NULL, 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(NULL, 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy10.testcase.

1
2
3
4
5
6
7
ST_TransformXY - 2D XY GeometryCollection
:memory: #use in-memory database
SELECT AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTION(POINT(11.1 41.1), LINESTRING(11.2 41.2, 11.3 41.3), POLYGON((11.3 41.3, 11.8 41.3, 11.8 41.8, 11.3 41.8, 11.3 41.3), (11.4 41.4, 11.7 41.4, 11.7 41.7, 11.4 41.7, 11.4 41.4)))', 4326), 3003));
1 # rows (not including the header row)
1 # columns
AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTION(POINT(11.1 41.1), LINESTRING(11.2 41.2, 11.3 41.3), POLYGON((11.3 41.3, 11.8 41.3, 11.8 41.8, 11.3 41.8, 11.3 41.3), (11.4 41.4, 11.7 41.4, 11.7 41.7, 11.4 41.7, 11.4 41.4)))', 4326), 3003))
GEOMETRYCOLLECTION(POINT(1676380.538791 4551993.304759), LINESTRING(1684498.324131 4563303.102442, 1692590.049453 4574622.920763), POLYGON((1692590.049453 4574622.920763, 1734455.803025 4575853.343594, 1732655.006872 4631372.543298, 1691111.320326 4630139.503574, 1692590.049453 4574622.920763), (1700655.635839 4585952.766718, 1725736.586456 4586691.348854, 1724694.769275 4620002.530275, 1699729.76246 4619263.006007, 1700655.635839 4585952.766718)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy11.testcase.

1
2
3
4
5
6
7
ST_TransformXY - 3D XYZ GeometryCollection
:memory: #use in-memory database
SELECT AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(11.1 41.1 1.0), LINESTRINGZ(11.2 41.2 1.1, 11.3 41.3 1.2), POLYGONZ((11.3 41.3 1.1, 11.8 41.3 1.2, 11.8 41.8 1.3, 11.3 41.8 1.2, 11.3 41.3 1.1), (11.4 41.4 1.2, 11.7 41.4 1.3, 11.7 41.7 1.4, 11.4 41.7 1.3, 11.4 41.4 1.2)))', 4326), 3003));
1 # rows (not including the header row)
1 # columns
AsText(ST_TransformXY(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(11.1 41.1 1.0), LINESTRINGZ(11.2 41.2 1.1, 11.3 41.3 1.2), POLYGONZ((11.3 41.3 1.1, 11.8 41.3 1.2, 11.8 41.8 1.3, 11.3 41.8 1.2, 11.3 41.3 1.1), (11.4 41.4 1.2, 11.7 41.4 1.3, 11.7 41.7 1.4, 11.4 41.7 1.3, 11.4 41.4 1.2)))', 4326), 3003))
GEOMETRYCOLLECTION Z(POINT Z(1676380.538791 4551993.304759 1), LINESTRING Z(1684498.324131 4563303.102442 1.1, 1692590.049453 4574622.920763 1.2), POLYGON Z((1692590.049453 4574622.920763 1.1, 1734455.803025 4575853.343594 1.2, 1732655.006872 4631372.543298 1.3, 1691111.320326 4630139.503574 1.2, 1692590.049453 4574622.920763 1.1), (1700655.635839 4585952.766718 1.2, 1725736.586456 4586691.348854 1.3, 1724694.769275 4620002.530275 1.4, 1699729.76246 4619263.006007 1.3, 1700655.635839 4585952.766718 1.2)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy2.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Text Geometry
:memory: #use in-memory database
SELECT ST_TransformXY('geom', 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY('geom', 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy3.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Int Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(1, 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(1, 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy4.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Double Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(1.5, 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(1.5, 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy5.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Invalid Geometry
:memory: #use in-memory database
SELECT ST_TransformXY(zeroblob(10), 4326)
1 # rows (not including the header row)
1 # columns
ST_TransformXY(zeroblob(10), 4326)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy6.testcase.

1
2
3
4
5
6
7
ST_TransformXY - NULL SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy7.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Text SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), 'srid');
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), 'srid')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy8.testcase.

1
2
3
4
5
6
7
ST_TransformXY - Double SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), 3003.4);
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), 3003.4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_proj493_tests/transformxy9.testcase.

1
2
3
4
5
6
7
ST_TransformXY - BLOB SRID
:memory: #use in-memory database
SELECT ST_TransformXY(MakePoint(11, 42, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_TransformXY(MakePoint(11, 42, 4326), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Changes to test/sql_stmt_proj_tests/Makefile.am.

44
45
46
47
48
49
50
51





















	output38.testcase \
	output3.testcase \
	output4.testcase \
	output5.testcase \
	output6.testcase \
	output7.testcase \
	output8.testcase \
	output9.testcase




























|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	output38.testcase \
	output3.testcase \
	output4.testcase \
	output5.testcase \
	output6.testcase \
	output7.testcase \
	output8.testcase \
	output9.testcase \
	transform10.testcase \
	transform11.testcase \
	transform12.testcase \
	transform13.testcase \
	transform14.testcase \
	transform15.testcase \
	transform16.testcase \
	transform17.testcase \
	transform18.testcase \
	transform19.testcase \
	transform1.testcase \
	transform20.testcase \
	transform21.testcase \
	transform2.testcase \
	transform3.testcase \
	transform4.testcase \
	transform5.testcase \
	transform6.testcase \
	transform7.testcase \
	transform8.testcase \
	transform9.testcase 

Changes to test/sql_stmt_proj_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
296
297
298
299
300
301
302
303





















304
305
306
307
308
309
310
...
313
314
315
316
317
318
319

320
321
322
323
324
325
326
...
487
488
489
490
491
492
493
494
495
496
497
498
499
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_proj_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	output38.testcase \
	output3.testcase \
	output4.testcase \
	output5.testcase \
	output6.testcase \
	output7.testcase \
	output8.testcase \
	output9.testcase






















all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_proj_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_proj_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
498
499
500
501
502
503
504


505
506
507
508
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_proj_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	output38.testcase \
	output3.testcase \
	output4.testcase \
	output5.testcase \
	output6.testcase \
	output7.testcase \
	output8.testcase \
	output9.testcase \
	transform10.testcase \
	transform11.testcase \
	transform12.testcase \
	transform13.testcase \
	transform14.testcase \
	transform15.testcase \
	transform16.testcase \
	transform17.testcase \
	transform18.testcase \
	transform19.testcase \
	transform1.testcase \
	transform20.testcase \
	transform21.testcase \
	transform2.testcase \
	transform3.testcase \
	transform4.testcase \
	transform5.testcase \
	transform6.testcase \
	transform7.testcase \
	transform8.testcase \
	transform9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_proj_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_proj_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Added test/sql_stmt_proj_tests/transform1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - null args
:memory: #use in-memory database
SELECT Transform(NULL, NULL)
1 # rows (not including the header row)
1 # columns
Transform(NULL, NULL)
(NULL)

Added test/sql_stmt_proj_tests/transform10.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Linestring M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGM(11 43 1, 12 43 2, 12 42 3)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGM(11 43 1, 12 43 2, 12 42 3)', 4326), 32632))
LINESTRING M(663019.070082 4762755.64169 1, 744533.019451 4765182.932802 2, 748464.920716 4654130.891324 3)

Added test/sql_stmt_proj_tests/transform11.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Linestring ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGZM(11 43 100 1, 12 43 101 2, 12 42 102 3)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZM(11 43 100 1, 12 43 101 2, 12 42 102 3)', 4326), 32632))
LINESTRING ZM(663019.070082 4762755.64169 100 1, 744533.019451 4765182.932802 101 2, 748464.920716 4654130.891324 102 3)

Added test/sql_stmt_proj_tests/transform12.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZ(11 43 100)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZ(11 43 100)', 4326), 32632))
POINT Z(663019.070082 4762755.64169 100)

Added test/sql_stmt_proj_tests/transform13.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTM(11 43 1)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTM(11 43 1)', 4326), 32632))
POINT M(663019.070082 4762755.64169 1)

Added test/sql_stmt_proj_tests/transform14.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZM(11 43 100 1)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZM(11 43 100 1)', 4326), 32632))
POINT ZM(663019.070082 4762755.64169 100 1)

Added test/sql_stmt_proj_tests/transform15.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINTZM(663019 4762755 100 1)', 32632), 4326))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINTZM(663019 4762755 100 1)', 32632), 4326))
POINT ZM(10.999999 42.999994 100 1)

Added test/sql_stmt_proj_tests/transform16.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Polygon
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGON((11 43, 12 43, 12 44, 11 44, 11 43), (11.4 43.4, 11.6 43.4, 11.6 43.6, 11.4 43.6, 11.4 43.4))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGON((11 43, 12 43, 12 44, 11 44, 11 43), (11.4 43.4, 11.6 43.4, 11.6 43.6, 11.4 43.6, 11.4 43.4))', 4326), 32632))
POLYGON((663019.070082 4762755.64169, 744533.019451 4765182.932802, 740526.321055 4876249.126963, 660349.410579 4873817.333441, 663019.070082 4762755.64169), (694349.575562 4808033.274618, 710545.984354 4808519.151148, 709851.653212 4830731.987849, 693708.725206 4830245.931093, 694349.575562 4808033.274618))

Added test/sql_stmt_proj_tests/transform17.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Polygon Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONZ((11 43 100, 12 43 101, 12 44 102, 11 44 103, 11 43 100), (11.4 43.4 100, 11.6 43.4 101, 11.6 43.6 102, 11.4 43.6 103, 11.4 43.4 100))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONZ((11 43 100, 12 43 101, 12 44 102, 11 44 103, 11 43 100), (11.4 43.4 100, 11.6 43.4 101, 11.6 43.6 102, 11.4 43.6 103, 11.4 43.4 100))', 4326), 32632))
POLYGON Z((663019.070082 4762755.64169 100, 744533.019451 4765182.932802 101, 740526.321055 4876249.126963 102, 660349.410579 4873817.333441 103, 663019.070082 4762755.64169 100), (694349.575562 4808033.274618 100, 710545.984354 4808519.151148 101, 709851.653212 4830731.987849 102, 693708.725206 4830245.931093 103, 694349.575562 4808033.274618 100))

Added test/sql_stmt_proj_tests/transform18.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Polygon M
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONM((11 43 1, 12 43 2, 12 44 3, 11 44 4, 11 43 1), (11.4 43.4 1, 11.6 43.4 2, 11.6 43.6 3, 11.4 43.6 4, 11.4 43.4 1))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONM((11 43 1, 12 43 2, 12 44 3, 11 44 4, 11 43 1), (11.4 43.4 1, 11.6 43.4 2, 11.6 43.6 3, 11.4 43.6 4, 11.4 43.4 1))', 4326), 32632))
POLYGON M((663019.070082 4762755.64169 1, 744533.019451 4765182.932802 2, 740526.321055 4876249.126963 3, 660349.410579 4873817.333441 4, 663019.070082 4762755.64169 1), (694349.575562 4808033.274618 1, 710545.984354 4808519.151148 2, 709851.653212 4830731.987849 3, 693708.725206 4830245.931093 4, 694349.575562 4808033.274618 1))

Added test/sql_stmt_proj_tests/transform19.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Polygon ZM
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGONZM((11 43 100 1, 12 43 101 2, 12 44 102 3, 11 44 103 4, 11 43 100 1), (11.4 43.4 100 1, 11.6 43.4 101 2, 11.6 43.6 102 3, 11.4 43.6 103 4, 11.4 43.4 100 1))', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGONZM((11 43 100 1, 12 43 101 2, 12 44 102 3, 11 44 103 4, 11 43 100 1), (11.4 43.4 100 1, 11.6 43.4 101 2, 11.6 43.6 102 3, 11.4 43.6 103 4, 11.4 43.4 100 1))', 4326), 32632))
POLYGON ZM((663019.070082 4762755.64169 100 1, 744533.019451 4765182.932802 101 2, 740526.321055 4876249.126963 102 3, 660349.410579 4873817.333441 103 4, 663019.070082 4762755.64169 100 1), (694349.575562 4808033.274618 100 1, 710545.984354 4808519.151148 101 2, 709851.653212 4830731.987849 102 3, 693708.725206 4830245.931093 103 4, 694349.575562 4808033.274618 100 1))

Added test/sql_stmt_proj_tests/transform2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - zeroblob arg 
:memory: #use in-memory database
SELECT Transform(zeroblob(48), NULL)
1 # rows (not including the header row)
1 # columns
Transform(zeroblob(48), NULL)
(NULL)

Added test/sql_stmt_proj_tests/transform20.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Polygon
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POLYGON((663000 4762000, 663100 4762000, 663100 4762100, 663000 4762100, 663000 4762000), (663010 4762010, 663020 4762010, 663020 4762020, 663010 4762020, 663010 4762010))', 32632), 4326))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POLYGON((663000 4762000, 663100 4762000, 663100 4762100, 663000 4762100, 663000 4762000), (663010 4762010, 663020 4762010, 663020 4762020, 663010 4762020, 663010 4762010))', 32632), 4326))
POLYGON((10.999546 42.993204, 11.000772 42.993182, 11.000801 42.994082, 10.999575 42.994104, 10.999546 42.993204), (10.999671 42.993291, 10.999794 42.993289, 10.999797 42.993379, 10.999674 42.993381, 10.999671 42.993291))

Added test/sql_stmt_proj_tests/transform21.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32656))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32656))
(NULL)

Added test/sql_stmt_proj_tests/transform3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 32632))
POINT(663019.070082 4762755.64169)

Added test/sql_stmt_proj_tests/transform4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point (unknown srid)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)'), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)'), 32632))
(NULL)

Added test/sql_stmt_proj_tests/transform5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point (unknown destination SRID)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), 326320))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), 326320))
(NULL)

Added test/sql_stmt_proj_tests/transform6.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Point (NULL srid)
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('POINT(11 43)', 4326), NULL))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('POINT(11 43)', 4326), NULL))
(NULL)

Added test/sql_stmt_proj_tests/transform7.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Linestring
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42)', 4326), 32632))
LINESTRING(663019.070082 4762755.64169, 744533.019451 4765182.932802, 748464.920716 4654130.891324)

Added test/sql_stmt_proj_tests/transform8.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - illegal Linestring
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRING(11 43, 12 43, 12 42', 4326), 32632))
(NULL)

Added test/sql_stmt_proj_tests/transform9.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
transform - Linestring Z
:memory: #use in-memory database
SELECT AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
1 # rows (not including the header row)
1 # columns
AsText(Transform(GeomFromText('LINESTRINGZ(11 43 100, 12 43 101, 12 42 102)', 4326), 32632))
LINESTRING Z(663019.070082 4762755.64169 100, 744533.019451 4765182.932802 101, 748464.920716 4654130.891324 102)

Deleted test/sql_stmt_routing_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

EXTRA_DIST = createrouterr.testcase \
	createrouting1.testcase \
	createrouting2.testcase \
	createrouting3.testcase \
	createrouting4.testcase \
	createrouting5.testcase \
	createrouting6.testcase \
	createrouting7.testcase \
	createrouting8.testcase \
	createrouting9.testcase \
	createrouting10.testcase \
	createrouting11.testcase \
	createrouting12.testcase \
	createrouting13.testcase \
	createrouting14.testcase \
	createroutnodes1.testcase \
	createroutnodes2.testcase \
	createroutnodes3.testcase \
	createroutnodes4.testcase \
	createroutnodes5.testcase \
	createroutnodes6.testcase \
	createroutnodes7.testcase \
	createroutnodes8.testcase \
	createroutnodes9.testcase \
	createroutnodes10.testcase \
	createroutnodes11.testcase \
	createroutnodes12.testcase \
	createroutnodes13.testcase \
	createroutnodes14.testcase \
	createroutnodes15.testcase \
	createroutnodes16.testcase \
	createroutnodes17.testcase \
	createroutnodes18.testcase \
	createroutnodes19.testcase \
	createroutnodes20.testcase	
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































Deleted test/sql_stmt_routing_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_routing_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = createrouterr.testcase \
	createrouting1.testcase \
	createrouting2.testcase \
	createrouting3.testcase \
	createrouting4.testcase \
	createrouting5.testcase \
	createrouting6.testcase \
	createrouting7.testcase \
	createrouting8.testcase \
	createrouting9.testcase \
	createrouting10.testcase \
	createrouting11.testcase \
	createrouting12.testcase \
	createrouting13.testcase \
	createrouting14.testcase \
	createroutnodes1.testcase \
	createroutnodes2.testcase \
	createroutnodes3.testcase \
	createroutnodes4.testcase \
	createroutnodes5.testcase \
	createroutnodes6.testcase \
	createroutnodes7.testcase \
	createroutnodes8.testcase \
	createroutnodes9.testcase \
	createroutnodes10.testcase \
	createroutnodes11.testcase \
	createroutnodes12.testcase \
	createroutnodes13.testcase \
	createroutnodes14.testcase \
	createroutnodes15.testcase \
	createroutnodes16.testcase \
	createroutnodes17.testcase \
	createroutnodes18.testcase \
	createroutnodes19.testcase \
	createroutnodes20.testcase	

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_routing_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_routing_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_routing_tests/createrouterr.testcase.

1
2
3
4
5
6
7
CreateRouting_GetLastError()
:memory: #use in-memory database
SELECT CreateRouting_GetLastError();
1 # rows (not including the header row)
1 # columns
CreateRouting_GetLastError()
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting1.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL DataTable
:memory: #use in-memory database
SELECT CreateRouting(NULL, 'virt_route', 'input', 'from', 'to', 'geom', 'cost');
1 # rows (not including the header row)
1 # columns
CreateRouting(NULL, 'virt_route', 'input', 'from', 'to', 'geom', 'cost')
CreateRouting exception - illegal Routing-Data Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting10.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL bidirectional option
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, NULL);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, NULL)
CreateRouting exception - illegal Bidirectional option [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting11.testcase.

1
2
3
4
5
6
7
CreateRouting() - Int OnewWay FromTo
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 1, 'tofrom');
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 1, 'tofrom')
CreateRouting exception - illegal OnewayFromTo Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting12.testcase.

1
2
3
4
5
6
7
CreateRouting() - Int OnewWay ToFrom
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 'fromto', 1);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 'fromto', 1)
CreateRouting exception - illegal OnewayToFrom Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting13.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL Overwrite
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 'fromto', 'tofrom', NULL);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 'fromto', 'tofrom', NULL)
CreateRouting exception - illegal OverWrite option [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting14.testcase.

1
2
3
4
5
6
7
CreateRouting() - Ok Overwrite
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 'fromto', 'tofrom', 1);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', 1, 1, 'fromto', 'tofrom', 1)
CreateRouting exception - FromNode Column "from" is not defined in the Input Table
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting2.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL VirtualRouting Table
:memory: #use in-memory database
SELECT CreateRouting('data_route', NULL, 'input', 'from', 'to', 'geom', 'cost');
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', NULL, 'input', 'from', 'to', 'geom', 'cost')
CreateRouting exception - illegal VirtualRouting-Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting3.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL Input Table
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', NULL, 'from', 'to', 'geom', 'cost');
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', NULL, 'from', 'to', 'geom', 'cost')
CreateRouting exception - illegal Input-Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting4.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL FromNode Column
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', NULL, 'to', 'geom', 'cost');
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', NULL, 'to', 'geom', 'cost')
CreateRouting exception - illegal FromNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting5.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL ToNode Column
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', NULL, 'geom', 'cost');
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', NULL, 'geom', 'cost')
CreateRouting exception - illegal ToNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting6.testcase.

1
2
3
4
5
6
7
CreateRouting() - Int Geometry Column
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 1, 'cost');
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 1, 'cost')
CreateRouting exception - illegal Geometry Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting7.testcase.

1
2
3
4
5
6
7
CreateRouting() - Int Cost Column
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 1);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 1)
CreateRouting exception - illegal Cost Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting8.testcase.

1
2
3
4
5
6
7
CreateRouting() - Int RoadName Column
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 1, 1, 1);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 1, 1, 1)
CreateRouting exception - illegal RoadName Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createrouting9.testcase.

1
2
3
4
5
6
7
CreateRouting() - NULL AStar enabled
:memory: #use in-memory database
SELECT CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', NULL, 1);
1 # rows (not including the header row)
1 # columns
CreateRouting('data_route', 'virt_route', 'input', 'from', 'to', 'geom', 'cost', 'name', NULL, 1)
CreateRouting exception - illegal A* Enabled option [not an INTEGER].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes1.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - INT DB-prefix
:memory: #use in-memory database
SELECT CreateRoutingNodes(1, 'table', 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(1, 'table', 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal DB-prefix [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes10.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - BLOB geometry-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', zeroblob(4), 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', zeroblob(4), 'from', 'to')
CreateRoutingNodes exception - illegal Geometry Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes11.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - NULL from-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, NULL, 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, NULL, 'to')
CreateRoutingNodes exception - illegal FromNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes12.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - INT from-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 1, 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 1, 'to')
CreateRoutingNodes exception - illegal FromNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes13.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - DOUBLE from-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 1.8, 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 1.8, 'to')
CreateRoutingNodes exception - illegal FromNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes14.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - BLOB from-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, zeroblob(5), 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, zeroblob(5), 'to')
CreateRoutingNodes exception - illegal FromNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes15.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - NULL to-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 'from', NULL);
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 'from', NULL)
CreateRoutingNodes exception - illegal ToNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes16.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - INT to-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 'from', 1);
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 'from', 1)
CreateRoutingNodes exception - illegal ToNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes17.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - DOUBLE to-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 'from', 1.5);
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 'from', 1.5)
CreateRoutingNodes exception - illegal ToNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes18.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - BLOB to-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 'from', zeroblob(5));
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 'from', zeroblob(5))
CreateRoutingNodes exception - illegal ToNode Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes19.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - not existing spatial table #1
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', NULL, 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', NULL, 'from', 'to')
CreateRoutingNodes exception - 'table' is not a valid Spatial Table (LINESTRING)
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes2.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - DOUBLE DB-prefix
:memory: #use in-memory database
SELECT CreateRoutingNodes(1.5, 'table', 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(1.5, 'table', 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal DB-prefix [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes20.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - not existing spatial table #2
:memory: #use in-memory database
SELECT CreateRoutingNodes('main', 'table', 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes('main', 'table', 'geom', 'from', 'to')
CreateRoutingNodes exception - 'table'.'geom' is not a valid Spatial Table (LINESTRING)
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes3.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - BLOB DB-prefix
:memory: #use in-memory database
SELECT CreateRoutingNodes(zeroblob(4), 'table', 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(zeroblob(4), 'table', 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal DB-prefix [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes4.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - NULL table-name
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, NULL, 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, NULL, 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal Spatial-Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes5.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - INT table-name
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 1, 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 1, 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal Spatial-Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes6.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - DOUBLE table-name
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 1.5, 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 1.5, 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal Spatial-Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes7.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - BLOB table-name
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, zeroblob(4), 'geom', 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, zeroblob(4), 'geom', 'from', 'to')
CreateRoutingNodes exception - illegal Spatial-Table Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes8.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - INT geometry-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', 1, 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', 1, 'from', 'to')
CreateRoutingNodes exception - illegal Geometry Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_routing_tests/createroutnodes9.testcase.

1
2
3
4
5
6
7
CreateRoutingNodes() - DOUBLE geometry-column
:memory: #use in-memory database
SELECT CreateRoutingNodes(NULL, 'table', 1.4, 'from', 'to');
1 # rows (not including the header row)
1 # columns
CreateRoutingNodes(NULL, 'table', 1.4, 'from', 'to')
CreateRoutingNodes exception - illegal Geometry Column Name [not a TEXT string].
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3ddistance1.testcase.

1
2
3
4
5
6
7
8
3DDistance - two 2D points
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), MakePoint(4, 6))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), MakePoint(4, 6))
5.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance10.testcase.

1
2
3
4
5
6
7
8
3DDistance - two 3D linestring
:memory: #use in-memory database
SELECT ST_3DDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1 # rows (not including the header row)
1 # columns
ST_3DDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1.262388:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance2.testcase.

1
2
3
4
5
6
7
8
3DDistance - two 2D identical points
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), MakePoint(1, 2))
0.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance3.testcase.

1
2
3
4
5
6
7
8
3DDistance - bad blob first arg
:memory: #use in-memory database
SELECT ST_3DDistance(zeroblob(100), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(zeroblob(100), MakePoint(1, 2))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance4.testcase.

1
2
3
4
5
6
7
8
3DDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), zeroblob(100))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance5.testcase.

1
2
3
4
5
6
7
8
3DDistance - non-blob first arg
:memory: #use in-memory database
SELECT ST_3DDistance(3, MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(3, MakePoint(1, 2))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance6.testcase.

1
2
3
4
5
6
7
8
3DDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DDistance(MakePoint(1, 2), "hello")
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePoint(1, 2), "hello")
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance7.testcase.

1
2
3
4
5
6
7
8
3DDistance - parallel 2D lines
:memory: #use in-memory database
SELECT ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
2.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance8.testcase.

1
2
3
4
5
6
7
8
3DDistance - intersecting 2D lines
:memory: #use in-memory database
SELECT ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
1 # rows (not including the header row)
1 # columns
ST_3DDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
0.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3ddistance9.testcase.

1
2
3
4
5
6
7
8
3DDistance - two 3D points
:memory: #use in-memory database
SELECT ST_3DDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5));
1 # rows (not including the header row)
1 # columns
ST_3DDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5))
5.385164:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dlength1.testcase.

1
2
3
4
5
6
7
3dLength - NULL geometry
:memory: #use in-memory database
SELECT ST_3dLength(NULL)
1 # rows (not including the header row)
1 # columns
ST_3dLength(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength2.testcase.

1
2
3
4
5
6
7
3dLength - INT geometry
:memory: #use in-memory database
SELECT ST_3dLength(1)
1 # rows (not including the header row)
1 # columns
ST_3dLength(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength3.testcase.

1
2
3
4
5
6
7
3dLength - DOUBLE geometry
:memory: #use in-memory database
SELECT ST_3dLength(1.5)
1 # rows (not including the header row)
1 # columns
ST_3dLength(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength4.testcase.

1
2
3
4
5
6
7
3dLength - TEXT geometry
:memory: #use in-memory database
SELECT ST_3dLength('alpha')
1 # rows (not including the header row)
1 # columns
ST_3dLength('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength5.testcase.

1
2
3
4
5
6
7
3dLength - invalid BLOB geometry
:memory: #use in-memory database
SELECT ST_3dLength(zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_3dLength(zeroblob(100))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength6.testcase.

1
2
3
4
5
6
7
3dLength - Point geometry
:memory: #use in-memory database
SELECT ST_3dLength(ST_GeomFromText('POINT(1 2)'))
1 # rows (not including the header row)
1 # columns
ST_3dLength(ST_GeomFromText('POINT(1 2)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength7.testcase.

1
2
3
4
5
6
7
3dLength - 2D linestring
:memory: #use in-memory database
SELECT ST_3dLength(ST_GeomFromText('LINESTRING(0 0, 1 0, 1 1, 2 1, 2 2, 3 2, 3 3)'))
1 # rows (not including the header row)
1 # columns
ST_3dLength(ST_GeomFromText('LINESTRING(0 0, 1 0, 1 1, 2 1, 2 2, 3 2, 3 3)'))
6.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dlength8.testcase.

1
2
3
4
5
6
7
3dLength - 3D linestring
:memory: #use in-memory database
SELECT ST_3dLength(ST_GeomFromText('LINESTRING Z(0 0 0, 1 0 0, 1 0 1, 2 0 1, 2 0 2, 3 0 2, 3 0 3)'))
1 # rows (not including the header row)
1 # columns
ST_3dLength(ST_GeomFromText('LINESTRING Z(0 0 0, 1 0 0, 1 0 1, 2 0 1, 2 0 2, 3 0 2, 3 0 3)'))
6.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance1.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - two 2D points
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), MakePoint(4, 6))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), MakePoint(4, 6))
5.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance10.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - two 3D linestring
:memory: #use in-memory database
SELECT ST_3DMaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
10.862780:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance2.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - two 2D identical points
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), MakePoint(1, 2))
0.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance3.testcase.

1
2
3
4
5
6
7
8
MaxDistance - bad blob first arg
:memory: #use in-memory database
SELECT ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance4.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), zeroblob(100))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance5.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - non-blob first arg
:memory: #use in-memory database
SELECT ST_3DMaxDistance(3, MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(3, MakePoint(1, 2))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance6.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePoint(1, 2), "hello")
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePoint(1, 2), "hello")
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance7.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - parallel 2D lines
:memory: #use in-memory database
SELECT ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
10.198039:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance8.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - intersecting 2D lines
:memory: #use in-memory database
SELECT ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
11.180339:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/3dmaxdistance9.testcase.

1
2
3
4
5
6
7
8
3DMaxDistance - two 3D points
:memory: #use in-memory database
SELECT ST_3DMaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5));
1 # rows (not including the header row)
1 # columns
ST_3DMaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5))
5.385164:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374

EXTRA_DIST = 3ddistance10.testcase \
	3ddistance1.testcase \
	3ddistance2.testcase \
	3ddistance3.testcase \
	3ddistance4.testcase \
	3ddistance5.testcase \
	3ddistance6.testcase \
	3ddistance7.testcase \
	3ddistance8.testcase \
	3ddistance9.testcase \
	3dlength1.testcase \
	3dlength2.testcase \
	3dlength3.testcase \
	3dlength4.testcase \
	3dlength5.testcase \
	3dlength6.testcase \
	3dlength7.testcase \
	3dlength8.testcase \
	3dmaxdistance10.testcase \
	3dmaxdistance1.testcase \
	3dmaxdistance2.testcase \
	3dmaxdistance3.testcase \
	3dmaxdistance4.testcase \
	3dmaxdistance5.testcase \
	3dmaxdistance6.testcase \
	3dmaxdistance7.testcase \
	3dmaxdistance8.testcase \
	3dmaxdistance9.testcase \
	asencodedpolyline1.testcase \
	asencodedpolyline2.testcase \
	asencodedpolyline3.testcase \
	asencodedpolyline4.testcase \
	asencodedpolyline5.testcase \
	asencodedpolyline6.testcase \
	asencodedpolyline7.testcase \
	asencodedpolyline8.testcase \
	asencodedpolyline9.testcase \
	asencodedpolyline10.testcase \
	asencodedpolyline11.testcase \
	asencodedpolyline12.testcase \
	asencodedpolyline13.testcase \
	asencodedpolyline14.testcase \
	circularity10.testcase \
	circularity11.testcase \
	circularity12.testcase \
	circularity13.testcase \
	circularity14.testcase \
	circularity15.testcase \
	circularity16.testcase \
	circularity17.testcase \
	circularity18.testcase \
	fromencodedpolyline1.testcase \
	fromencodedpolyline2.testcase \
	fromencodedpolyline3.testcase \
	fromencodedpolyline4.testcase \
	fromencodedpolyline5.testcase \
	fromencodedpolyline6.testcase \
	fromencodedpolyline7.testcase \
	fromencodedpolyline8.testcase \
	fromencodedpolyline9.testcase \
	fromencodedpolyline10.testcase \
	fromtwkb1.testcase \
	fromtwkb2.testcase \
	fromtwkb3.testcase \
	fromtwkb4.testcase \
	fromtwkb5.testcase \
	fromtwkb6.testcase \
	fromtwkb7.testcase \
	fromtwkb8.testcase \
	fromtwkb9.testcase \
	fromtwkb10.testcase \
	fromtwkb11.testcase \
	fromtwkb12.testcase \
	fromtwkb13.testcase \
	fromtwkb14.testcase \
	maxdistance10.testcase \
	maxdistance1.testcase \
	maxdistance2.testcase \
	maxdistance3.testcase \
	maxdistance4.testcase \
	maxdistance5.testcase \
	maxdistance6.testcase \
	maxdistance7.testcase \
	maxdistance8.testcase \
	maxdistance9.testcase \
	st_asx3d10.testcase \
	st_asx3d11.testcase \
	st_asx3d12.testcase \
	st_asx3d13.testcase \
	st_asx3d14.testcase \
	st_asx3d15.testcase \
	st_asx3d16.testcase \
	st_asx3d17.testcase \
	st_asx3d18.testcase \
	st_asx3d19.testcase \
	st_asx3d1.testcase \
	st_asx3d20.testcase \
	st_asx3d21.testcase \
	st_asx3d22.testcase \
	st_asx3d23.testcase \
	st_asx3d24.testcase \
	st_asx3d25.testcase \
	st_asx3d26.testcase \
	st_asx3d27.testcase \
	st_asx3d28.testcase \
	st_asx3d29.testcase \
	st_asx3d30.testcase \
	st_asx3d2.testcase \
	st_asx3d3.testcase \
	st_asx3d4.testcase \
	st_asx3d5.testcase \
	st_asx3d6.testcase \
	st_asx3d7.testcase \
	st_asx3d8.testcase \
	st_asx3d9.testcase \
	st_area10.testcase \
	st_area11.testcase \
	st_area12.testcase \
	st_area13.testcase \
	st_area14.testcase \
	st_area15.testcase \
	st_area16.testcase \
	st_area17.testcase \
	st_area18.testcase \
	st_azimuth11.testcase \
	st_azimuth12.testcase \
	st_azimuth13.testcase \
	st_azimuth14.testcase \
	st_azimuth15.testcase \
	st_azimuth16.testcase \
	st_azimuth17.testcase \
	st_azimuth1.testcase \
	st_azimuth2.testcase \
	st_azimuth3.testcase \
	st_azimuth4.testcase \
	st_azimuth5.testcase \
	st_azimuth6.testcase \
	st_azimuth7.testcase \
	st_azimuth8.testcase \
	st_azimuth9.testcase \
	st_geohash10.testcase \
	st_geohash1.testcase \
	st_geohash2.testcase \
	st_geohash3.testcase \
	st_geohash4.testcase \
	st_geohash5.testcase \
	st_geohash6.testcase \
	st_geohash7.testcase \
	st_geohash8.testcase \
	st_geohash9.testcase \
	st_makevalid1.testcase \
	st_makevalid2.testcase \
	st_makevalid3.testcase \
	st_makevalid4.testcase \
	st_makevalid5.testcase \
	st_makevalid6.testcase \
	st_makevalid7.testcase \
	st_makevalid8.testcase \
	st_makevaliddiscarded1.testcase \
	st_makevaliddiscarded2.testcase \
	st_makevaliddiscarded3.testcase \
	st_makevaliddiscarded4.testcase \
	st_makevaliddiscarded5.testcase \
	st_makevaliddiscarded6.testcase \
	st_makevaliddiscarded7.testcase \
	st_makevaliddiscarded8.testcase \
	st_project1.testcase \
	st_project2.testcase \
	st_project3.testcase \
	st_project4.testcase \
	st_project5.testcase \
	st_project6.testcase \
	st_project7.testcase \
	st_project8.testcase \
	st_project9.testcase \
	st_project10.testcase \
	st_project11.testcase \
	st_project12.testcase \
	st_project13.testcase \
	st_project14.testcase \
	st_segmentize10.testcase \
	st_segmentize11.testcase \
	st_segmentize12.testcase \
	st_segmentize13.testcase \
	st_segmentize14.testcase \
	st_segmentize15.testcase \
	st_segmentize16.testcase \
	st_segmentize17.testcase \
	st_segmentize18.testcase \
	st_segmentize19.testcase \
	st_segmentize1.testcase \
	st_segmentize20.testcase \
	st_segmentize21.testcase \
	st_segmentize22.testcase \
	st_segmentize23.testcase \
	st_segmentize24.testcase \
	st_segmentize25.testcase \
	st_segmentize26.testcase \
	st_segmentize27.testcase \
	st_segmentize28.testcase \
	st_segmentize29.testcase \
	st_segmentize2.testcase \
	st_segmentize30.testcase \
	st_segmentize31.testcase \
	st_segmentize3.testcase \
	st_segmentize4.testcase \
	st_segmentize5.testcase \
	st_segmentize6.testcase \
	st_segmentize7.testcase \
	st_segmentize8.testcase \
	st_segmentize9.testcase \
	st_snaptogrid10.testcase \
	st_snaptogrid11.testcase \
	st_snaptogrid12.testcase \
	st_snaptogrid13.testcase \
	st_snaptogrid14.testcase \
	st_snaptogrid15.testcase \
	st_snaptogrid16.testcase \
	st_snaptogrid17.testcase \
	st_snaptogrid18.testcase \
	st_snaptogrid19.testcase \
	st_snaptogrid1.testcase \
	st_snaptogrid20.testcase \
	st_snaptogrid21.testcase \
	st_snaptogrid22.testcase \
	st_snaptogrid23.testcase \
	st_snaptogrid24.testcase \
	st_snaptogrid25.testcase \
	st_snaptogrid26.testcase \
	st_snaptogrid27.testcase \
	st_snaptogrid28.testcase \
	st_snaptogrid29.testcase \
	st_snaptogrid2.testcase \
	st_snaptogrid30.testcase \
	st_snaptogrid31.testcase \
	st_snaptogrid32.testcase \
	st_snaptogrid33.testcase \
	st_snaptogrid34.testcase \
	st_snaptogrid35.testcase \
	st_snaptogrid36.testcase \
	st_snaptogrid37.testcase \
	st_snaptogrid38.testcase \
	st_snaptogrid39.testcase \
	st_snaptogrid3.testcase \
	st_snaptogrid40.testcase \
	st_snaptogrid41.testcase \
	st_snaptogrid42.testcase \
	st_snaptogrid43.testcase \
	st_snaptogrid44.testcase \
	st_snaptogrid45.testcase \
	st_snaptogrid46.testcase \
	st_snaptogrid47.testcase \
	st_snaptogrid48.testcase \
	st_snaptogrid49.testcase \
	st_snaptogrid4.testcase \
	st_snaptogrid50.testcase \
	st_snaptogrid51.testcase \
	st_snaptogrid52.testcase \
	st_snaptogrid53.testcase \
	st_snaptogrid54.testcase \
	st_snaptogrid55.testcase \
	st_snaptogrid56.testcase \
	st_snaptogrid57.testcase \
	st_snaptogrid58.testcase \
	st_snaptogrid59.testcase \
	st_snaptogrid5.testcase \
	st_snaptogrid60.testcase \
	st_snaptogrid61.testcase \
	st_snaptogrid62.testcase \
	st_snaptogrid63.testcase \
	st_snaptogrid64.testcase \
	st_snaptogrid65.testcase \
	st_snaptogrid6.testcase \
	st_snaptogrid7.testcase \
	st_snaptogrid8.testcase \
	st_snaptogrid9.testcase \
	st_split10.testcase \
	st_split11.testcase \
	st_split12.testcase \
	st_split13.testcase \
	st_split14.testcase \
	st_split15.testcase \
	st_split16.testcase \
	st_split17.testcase \
	st_split18.testcase \
	st_split19.testcase \
	st_split1.testcase \
	st_split20.testcase \
	st_split21.testcase \
	st_split22.testcase \
	st_split23.testcase \
	st_split24.testcase \
	st_split25.testcase \
	st_split26.testcase \
	st_split27.testcase \
	st_split28.testcase \
	st_split29.testcase \
	st_split2.testcase \
	st_split30.testcase \
	st_split31.testcase \
	st_split32.testcase \
	st_split33.testcase \
	st_split34.testcase \
	st_split35.testcase \
	st_split36.testcase \
	st_split37.testcase \
	st_split38.testcase \
	st_split39.testcase \
	st_split3.testcase \
	st_split40.testcase \
	st_split41.testcase \
	st_split42.testcase \
	st_split43.testcase \
	st_split44.testcase \
	st_split45.testcase \
	st_split46.testcase \
	st_split47.testcase \
	st_split48.testcase \
	st_split49.testcase \
	st_split4.testcase \
	st_split5.testcase \
	st_split6.testcase \
	st_split7.testcase \
	st_split8.testcase \
	st_split9.testcase \
	st_node1.testcase \
	st_node2.testcase \
	st_node3.testcase \
	st_node4.testcase \
	st_node5.testcase \
	st_node6.testcase \
	st_node7.testcase \
	st_node8.testcase \
	st_node9.testcase \
	st_self1.testcase \
	st_self2.testcase \
	st_self3.testcase \
	st_self4.testcase \
	st_self5.testcase \
	st_self6.testcase \
	st_self7.testcase \
	st_self8.testcase \
	st_self9.testcase \
	totwkb1.testcase \
	totwkb2.testcase \
	totwkb3.testcase \
	totwkb4.testcase \
	totwkb5.testcase \
	totwkb6.testcase \
	totwkb7.testcase \
	totwkb8.testcase \
	totwkb9.testcase \
	totwkb10.testcase \
	totwkb11.testcase \
	totwkb12.testcase \
	totwkb13.testcase \
	totwkb14.testcase \
	totwkb15.testcase \
	totwkb16.testcase \
	totwkb17.testcase \
	totwkb18.testcase \
	totwkb19.testcase \
	totwkb20.testcase \
	totwkb21.testcase \
	totwkb22.testcase \
	totwkb23.testcase \
	totwkb24.testcase \
	totwkb25.testcase \
	totwkb26.testcase \
	totwkb27.testcase \
	totwkb28.testcase \
	totwkb29.testcase \
	totwkb30.testcase
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_rtgeom_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_rtgeom_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = 3ddistance10.testcase \
	3ddistance1.testcase \
	3ddistance2.testcase \
	3ddistance3.testcase \
	3ddistance4.testcase \
	3ddistance5.testcase \
	3ddistance6.testcase \
	3ddistance7.testcase \
	3ddistance8.testcase \
	3ddistance9.testcase \
	3dlength1.testcase \
	3dlength2.testcase \
	3dlength3.testcase \
	3dlength4.testcase \
	3dlength5.testcase \
	3dlength6.testcase \
	3dlength7.testcase \
	3dlength8.testcase \
	3dmaxdistance10.testcase \
	3dmaxdistance1.testcase \
	3dmaxdistance2.testcase \
	3dmaxdistance3.testcase \
	3dmaxdistance4.testcase \
	3dmaxdistance5.testcase \
	3dmaxdistance6.testcase \
	3dmaxdistance7.testcase \
	3dmaxdistance8.testcase \
	3dmaxdistance9.testcase \
	asencodedpolyline1.testcase \
	asencodedpolyline2.testcase \
	asencodedpolyline3.testcase \
	asencodedpolyline4.testcase \
	asencodedpolyline5.testcase \
	asencodedpolyline6.testcase \
	asencodedpolyline7.testcase \
	asencodedpolyline8.testcase \
	asencodedpolyline9.testcase \
	asencodedpolyline10.testcase \
	asencodedpolyline11.testcase \
	asencodedpolyline12.testcase \
	asencodedpolyline13.testcase \
	asencodedpolyline14.testcase \
	circularity10.testcase \
	circularity11.testcase \
	circularity12.testcase \
	circularity13.testcase \
	circularity14.testcase \
	circularity15.testcase \
	circularity16.testcase \
	circularity17.testcase \
	circularity18.testcase \
	fromencodedpolyline1.testcase \
	fromencodedpolyline2.testcase \
	fromencodedpolyline3.testcase \
	fromencodedpolyline4.testcase \
	fromencodedpolyline5.testcase \
	fromencodedpolyline6.testcase \
	fromencodedpolyline7.testcase \
	fromencodedpolyline8.testcase \
	fromencodedpolyline9.testcase \
	fromencodedpolyline10.testcase \
	fromtwkb1.testcase \
	fromtwkb2.testcase \
	fromtwkb3.testcase \
	fromtwkb4.testcase \
	fromtwkb5.testcase \
	fromtwkb6.testcase \
	fromtwkb7.testcase \
	fromtwkb8.testcase \
	fromtwkb9.testcase \
	fromtwkb10.testcase \
	fromtwkb11.testcase \
	fromtwkb12.testcase \
	fromtwkb13.testcase \
	fromtwkb14.testcase \
	maxdistance10.testcase \
	maxdistance1.testcase \
	maxdistance2.testcase \
	maxdistance3.testcase \
	maxdistance4.testcase \
	maxdistance5.testcase \
	maxdistance6.testcase \
	maxdistance7.testcase \
	maxdistance8.testcase \
	maxdistance9.testcase \
	st_asx3d10.testcase \
	st_asx3d11.testcase \
	st_asx3d12.testcase \
	st_asx3d13.testcase \
	st_asx3d14.testcase \
	st_asx3d15.testcase \
	st_asx3d16.testcase \
	st_asx3d17.testcase \
	st_asx3d18.testcase \
	st_asx3d19.testcase \
	st_asx3d1.testcase \
	st_asx3d20.testcase \
	st_asx3d21.testcase \
	st_asx3d22.testcase \
	st_asx3d23.testcase \
	st_asx3d24.testcase \
	st_asx3d25.testcase \
	st_asx3d26.testcase \
	st_asx3d27.testcase \
	st_asx3d28.testcase \
	st_asx3d29.testcase \
	st_asx3d30.testcase \
	st_asx3d2.testcase \
	st_asx3d3.testcase \
	st_asx3d4.testcase \
	st_asx3d5.testcase \
	st_asx3d6.testcase \
	st_asx3d7.testcase \
	st_asx3d8.testcase \
	st_asx3d9.testcase \
	st_area10.testcase \
	st_area11.testcase \
	st_area12.testcase \
	st_area13.testcase \
	st_area14.testcase \
	st_area15.testcase \
	st_area16.testcase \
	st_area17.testcase \
	st_area18.testcase \
	st_azimuth11.testcase \
	st_azimuth12.testcase \
	st_azimuth13.testcase \
	st_azimuth14.testcase \
	st_azimuth15.testcase \
	st_azimuth16.testcase \
	st_azimuth17.testcase \
	st_azimuth1.testcase \
	st_azimuth2.testcase \
	st_azimuth3.testcase \
	st_azimuth4.testcase \
	st_azimuth5.testcase \
	st_azimuth6.testcase \
	st_azimuth7.testcase \
	st_azimuth8.testcase \
	st_azimuth9.testcase \
	st_geohash10.testcase \
	st_geohash1.testcase \
	st_geohash2.testcase \
	st_geohash3.testcase \
	st_geohash4.testcase \
	st_geohash5.testcase \
	st_geohash6.testcase \
	st_geohash7.testcase \
	st_geohash8.testcase \
	st_geohash9.testcase \
	st_makevalid1.testcase \
	st_makevalid2.testcase \
	st_makevalid3.testcase \
	st_makevalid4.testcase \
	st_makevalid5.testcase \
	st_makevalid6.testcase \
	st_makevalid7.testcase \
	st_makevalid8.testcase \
	st_makevaliddiscarded1.testcase \
	st_makevaliddiscarded2.testcase \
	st_makevaliddiscarded3.testcase \
	st_makevaliddiscarded4.testcase \
	st_makevaliddiscarded5.testcase \
	st_makevaliddiscarded6.testcase \
	st_makevaliddiscarded7.testcase \
	st_makevaliddiscarded8.testcase \
	st_project1.testcase \
	st_project2.testcase \
	st_project3.testcase \
	st_project4.testcase \
	st_project5.testcase \
	st_project6.testcase \
	st_project7.testcase \
	st_project8.testcase \
	st_project9.testcase \
	st_project10.testcase \
	st_project11.testcase \
	st_project12.testcase \
	st_project13.testcase \
	st_project14.testcase \
	st_segmentize10.testcase \
	st_segmentize11.testcase \
	st_segmentize12.testcase \
	st_segmentize13.testcase \
	st_segmentize14.testcase \
	st_segmentize15.testcase \
	st_segmentize16.testcase \
	st_segmentize17.testcase \
	st_segmentize18.testcase \
	st_segmentize19.testcase \
	st_segmentize1.testcase \
	st_segmentize20.testcase \
	st_segmentize21.testcase \
	st_segmentize22.testcase \
	st_segmentize23.testcase \
	st_segmentize24.testcase \
	st_segmentize25.testcase \
	st_segmentize26.testcase \
	st_segmentize27.testcase \
	st_segmentize28.testcase \
	st_segmentize29.testcase \
	st_segmentize2.testcase \
	st_segmentize30.testcase \
	st_segmentize31.testcase \
	st_segmentize3.testcase \
	st_segmentize4.testcase \
	st_segmentize5.testcase \
	st_segmentize6.testcase \
	st_segmentize7.testcase \
	st_segmentize8.testcase \
	st_segmentize9.testcase \
	st_snaptogrid10.testcase \
	st_snaptogrid11.testcase \
	st_snaptogrid12.testcase \
	st_snaptogrid13.testcase \
	st_snaptogrid14.testcase \
	st_snaptogrid15.testcase \
	st_snaptogrid16.testcase \
	st_snaptogrid17.testcase \
	st_snaptogrid18.testcase \
	st_snaptogrid19.testcase \
	st_snaptogrid1.testcase \
	st_snaptogrid20.testcase \
	st_snaptogrid21.testcase \
	st_snaptogrid22.testcase \
	st_snaptogrid23.testcase \
	st_snaptogrid24.testcase \
	st_snaptogrid25.testcase \
	st_snaptogrid26.testcase \
	st_snaptogrid27.testcase \
	st_snaptogrid28.testcase \
	st_snaptogrid29.testcase \
	st_snaptogrid2.testcase \
	st_snaptogrid30.testcase \
	st_snaptogrid31.testcase \
	st_snaptogrid32.testcase \
	st_snaptogrid33.testcase \
	st_snaptogrid34.testcase \
	st_snaptogrid35.testcase \
	st_snaptogrid36.testcase \
	st_snaptogrid37.testcase \
	st_snaptogrid38.testcase \
	st_snaptogrid39.testcase \
	st_snaptogrid3.testcase \
	st_snaptogrid40.testcase \
	st_snaptogrid41.testcase \
	st_snaptogrid42.testcase \
	st_snaptogrid43.testcase \
	st_snaptogrid44.testcase \
	st_snaptogrid45.testcase \
	st_snaptogrid46.testcase \
	st_snaptogrid47.testcase \
	st_snaptogrid48.testcase \
	st_snaptogrid49.testcase \
	st_snaptogrid4.testcase \
	st_snaptogrid50.testcase \
	st_snaptogrid51.testcase \
	st_snaptogrid52.testcase \
	st_snaptogrid53.testcase \
	st_snaptogrid54.testcase \
	st_snaptogrid55.testcase \
	st_snaptogrid56.testcase \
	st_snaptogrid57.testcase \
	st_snaptogrid58.testcase \
	st_snaptogrid59.testcase \
	st_snaptogrid5.testcase \
	st_snaptogrid60.testcase \
	st_snaptogrid61.testcase \
	st_snaptogrid62.testcase \
	st_snaptogrid63.testcase \
	st_snaptogrid64.testcase \
	st_snaptogrid65.testcase \
	st_snaptogrid6.testcase \
	st_snaptogrid7.testcase \
	st_snaptogrid8.testcase \
	st_snaptogrid9.testcase \
	st_split10.testcase \
	st_split11.testcase \
	st_split12.testcase \
	st_split13.testcase \
	st_split14.testcase \
	st_split15.testcase \
	st_split16.testcase \
	st_split17.testcase \
	st_split18.testcase \
	st_split19.testcase \
	st_split1.testcase \
	st_split20.testcase \
	st_split21.testcase \
	st_split22.testcase \
	st_split23.testcase \
	st_split24.testcase \
	st_split25.testcase \
	st_split26.testcase \
	st_split27.testcase \
	st_split28.testcase \
	st_split29.testcase \
	st_split2.testcase \
	st_split30.testcase \
	st_split31.testcase \
	st_split32.testcase \
	st_split33.testcase \
	st_split34.testcase \
	st_split35.testcase \
	st_split36.testcase \
	st_split37.testcase \
	st_split38.testcase \
	st_split39.testcase \
	st_split3.testcase \
	st_split40.testcase \
	st_split41.testcase \
	st_split42.testcase \
	st_split43.testcase \
	st_split44.testcase \
	st_split45.testcase \
	st_split46.testcase \
	st_split47.testcase \
	st_split48.testcase \
	st_split49.testcase \
	st_split4.testcase \
	st_split5.testcase \
	st_split6.testcase \
	st_split7.testcase \
	st_split8.testcase \
	st_split9.testcase \
	st_node1.testcase \
	st_node2.testcase \
	st_node3.testcase \
	st_node4.testcase \
	st_node5.testcase \
	st_node6.testcase \
	st_node7.testcase \
	st_node8.testcase \
	st_node9.testcase \
	st_self1.testcase \
	st_self2.testcase \
	st_self3.testcase \
	st_self4.testcase \
	st_self5.testcase \
	st_self6.testcase \
	st_self7.testcase \
	st_self8.testcase \
	st_self9.testcase \
	totwkb1.testcase \
	totwkb2.testcase \
	totwkb3.testcase \
	totwkb4.testcase \
	totwkb5.testcase \
	totwkb6.testcase \
	totwkb7.testcase \
	totwkb8.testcase \
	totwkb9.testcase \
	totwkb10.testcase \
	totwkb11.testcase \
	totwkb12.testcase \
	totwkb13.testcase \
	totwkb14.testcase \
	totwkb15.testcase \
	totwkb16.testcase \
	totwkb17.testcase \
	totwkb18.testcase \
	totwkb19.testcase \
	totwkb20.testcase \
	totwkb21.testcase \
	totwkb22.testcase \
	totwkb23.testcase \
	totwkb24.testcase \
	totwkb25.testcase \
	totwkb26.testcase \
	totwkb27.testcase \
	totwkb28.testcase \
	totwkb29.testcase \
	totwkb30.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_rtgeom_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_rtgeom_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline1.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - NULL Geometry
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(NULL);
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline10.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - NULL precision
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline11.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - TEXT precision
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), 'five');
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), 'five');
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline12.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - DOUBLE precision
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), 5.0);
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), 5.0);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline13.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - BLOB precision
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), zeroblob(4));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline14.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - INT precision
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), 5);
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326), 5);
_gayB_c`|@_c`|@_c`|@
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline2.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - TEXT Geometry
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline('geometry');
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline('geometry')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline3.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - INT Geometry
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(1);
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline4.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - DOUBLE Geometry
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(1.5);
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline5.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - invalid BLOB
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(zeroblob(50));
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(zeroblob(50))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline6.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - POINT Geometry
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(MakePoint(11, 43, 4326));
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(MakePoint(11, 43, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline7.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - LINESTRING Geometry not 4326
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(0 0, 10 10)', 3003));
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(0 0, 10 10)', 3003))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline8.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - valid Geometry
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(10 20, 20 30)', 4326))
_gayB_c`|@_c`|@_c`|@
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/asencodedpolyline9.testcase.

1
2
3
4
5
6
7
AsEncodedPolyline - LINESTRING Geometry non existing SRID
:memory: #use in-memory database
SELECT ST_AsEncodedPolyline(GeomFromText('LINESTRING(0 0, 10 10)', 43210));
1 # rows (not including the header row)
1 # columns
ST_AsEncodedPolyline(GeomFromText('LINESTRING(0 0, 10 10)', 43210))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity10.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - valid Polygon - Sphere/Equator
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0)
0.78:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity11.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - valid Polygon - Ellipsoid/Equator
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 1);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 1)
0.79:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity12.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - valid Polygon - Sphere
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 0);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 0)
0.73:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity13.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - valid Polygon - Ellipsoid
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 1);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 1)
0.74:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity14.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - Point - Ellipsoid
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POINT(50.4 50.4)"), 1);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POINT(50.4 50.4)"), 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity15.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - planar Polygon - Sphere
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))", 32632), 0);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))", 32632), 0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity16.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - DOUBLE use_ellipsoid
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0.5);
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity17.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - TEXT use_ellipsoid
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 'alpha');
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/circularity18.testcase.

1
2
3
4
5
6
7
Circularity Geodesic - BLOB use_ellipsoid
:memory: #use in-memory database
SELECT Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), zeroblob(4));
1 # rows (not including the header row)
1 # columns
Circularity(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline1.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - NULL encoded string
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(NULL);
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline10.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - INT precision
:memory: #use in-memory database
SELECT AsEWKT(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@', 5));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@', 5))
SRID=4326;LINESTRING(10 20,20 30)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline2.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - INT encoded string
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(1);
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(1);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline3.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - DOUBLE encoded string
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(1.5);
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(1.5);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline4.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - BLOB encoded string
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(zeroblob(10));
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(zeroblob(10));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline5.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - TEXT encoded string
:memory: #use in-memory database
SELECT AsEWKT(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'))
SRID=4326;LINESTRING(10 20,20 30)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline6.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - NULL precision
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), NULL);
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline7.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - TEXT precision
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), 'precision');
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), 'precision')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline8.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - BLOB precision
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromencodedpolyline9.testcase.

1
2
3
4
5
6
7
LineFromEncodedPolyline - DOUBLE precision
:memory: #use in-memory database
SELECT ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), 1.5);
1 # rows (not including the header row)
1 # columns
ST_LineFromEncodedPolyline(ST_LineFromEncodedPolyline('_gayB_c`|@_c`|@_c`|@'), 1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb1.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - NULL TWKB
:memory: #use in-memory database
SELECT GeomFromTWKB(NULL);
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(NULL);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb10.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - POINT XY
:memory: #use in-memory database
SELECT AsEWKT(GeomFromTWKB(X'C10080897A8092F401', 4326));
1 # rows (not including the header row)
1 # columns
AsEWKT(GeomFromTWKB(X'C10080897A8092F401', 4326))
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb11.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Polygon Z
:memory: #use in-memory database
SELECT AsText(GeomFromTWKB(X'C308D90105000080897A80897A0080897A0080897A80897AFF887A00FF91F40100FF887A00'));
1 # rows (not including the header row)
1 # columns
AsText(GeomFromTWKB(X'C308D90105000080897A80897A0080897A0080897A80897AFF887A00FF91F40100FF887A00'))
POLYGON Z((0 0 1, 1 0 2, 1 1 3, 0 1 1, 0 0 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb12.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - MultiLinestring M
:memory: #use in-memory database
SELECT AsText(GeomFromTWKB(X'C508DA0202000080897A80897A0080897A020080897A80897AFF887A0080897A'));
1 # rows (not including the header row)
1 # columns
AsText(GeomFromTWKB(X'C508DA0202000080897A80897A0080897A020080897A80897AFF887A0080897A'))
MULTILINESTRING M((0 0 1, 1 0 2), (1 1 3, 0 1 4))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb13.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - MultiPoint ZM
:memory: #use in-memory database
SELECT AsText(GeomFromTWKB(X'C408DB04000080897A8092F40180897A008092F4018092F4010080897A8092F4018092F401FF887A008092F4018092F401'));
1 # rows (not including the header row)
1 # columns
AsText(GeomFromTWKB(X'C408DB04000080897A8092F40180897A008092F4018092F4010080897A8092F4018092F401FF887A008092F4018092F401'))
MULTIPOINT ZM(0 0 1 2, 1 0 3 4, 1 1 5 6, 0 1 7 8)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb14.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - GeometryCollection
:memory: #use in-memory database
SELECT AsText(GeomFromTWKB(X'C70003C10080897A8092F401C2000280DAC40980DAC40980DAC40980DAC409C30001058084AF5F8084AF5F0080897A80897A0000FF887AFF887A00'));
1 # rows (not including the header row)
1 # columns
AsText(GeomFromTWKB(X'C70003C10080897A8092F401C2000280DAC40980DAC40980DAC40980DAC409C30001058084AF5F8084AF5F0080897A80897A0000FF887AFF887A00'))
GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(10 10, 20 20), POLYGON((100 100, 100 101, 101 101, 101 100, 100 100)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb2.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Int TWKB
:memory: #use in-memory database
SELECT GeomFromTWKB(1);
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(1);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb3.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Double TWKB
:memory: #use in-memory database
SELECT GeomFromTWKB(1.7);
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(1.7);
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb4.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Text TWKB
:memory: #use in-memory database
SELECT GeomFromTWKB('twkb');
1 # rows (not including the header row)
1 # columns
GeomFromTWKB('twkb');
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb5.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Invalid BLOB TWKB
:memory: #use in-memory database
SELECT GeomFromTWKB(zeroblob(100));
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(zeroblob(100));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb6.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - NULL srid
:memory: #use in-memory database
SELECT GeomFromTWKB(X'C10080897A8092F401', NULL);
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(X'C10080897A8092F401', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb7.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Double srid
:memory: #use in-memory database
SELECT GeomFromTWKB(X'C10080897A8092F401', 1.5);
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(X'C10080897A8092F401', 1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb8.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - Text srid
:memory: #use in-memory database
SELECT GeomFromTWKB(X'C10080897A8092F401', 'srid');
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(X'C10080897A8092F401', 'srid')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/fromtwkb9.testcase.

1
2
3
4
5
6
7
GeomFromTWKB - BLOB srid
:memory: #use in-memory database
SELECT GeomFromTWKB(X'C10080897A8092F401', zeroblob(4));
1 # rows (not including the header row)
1 # columns
GeomFromTWKB(X'C10080897A8092F401', zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/maxdistance1.testcase.

1
2
3
4
5
6
7
8
MaxDistance - two 2D points
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), MakePoint(4, 6))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), MakePoint(4, 6))
5.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance10.testcase.

1
2
3
4
5
6
7
8
MaxDistance - two 3D linestring
:memory: #use in-memory database
SELECT ST_MaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(GeomFromText("LINESTRINGZ(0 0 1, 10 2 5)"), GeomFromText("LINESTRINGZ(0 2 3, 10 3 4)"));
10.440306:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance2.testcase.

1
2
3
4
5
6
7
8
MaxDistance - two 2D identical points
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), MakePoint(1, 2))
0.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance3.testcase.

1
2
3
4
5
6
7
8
MaxDistance - bad blob first arg
:memory: #use in-memory database
SELECT ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(zeroblob(100), MakePoint(1, 2))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance4.testcase.

1
2
3
4
5
6
7
8
MaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), zeroblob(100))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), zeroblob(100))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance5.testcase.

1
2
3
4
5
6
7
8
MaxDistance - non-blob first arg
:memory: #use in-memory database
SELECT ST_MaxDistance(3, MakePoint(1, 2))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(3, MakePoint(1, 2))
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance6.testcase.

1
2
3
4
5
6
7
8
MaxDistance - bad blob second arg
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePoint(1, 2), "hello")
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePoint(1, 2), "hello")
(NULL)

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance7.testcase.

1
2
3
4
5
6
7
8
MaxDistance - parallel 2D lines
:memory: #use in-memory database
SELECT ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 2, 10 2)"))
10.198039:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance8.testcase.

1
2
3
4
5
6
7
8
MaxDistance - intersecting 2D lines
:memory: #use in-memory database
SELECT ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(GeomFromText("LINESTRING(0 0, 10 0)"), GeomFromText("LINESTRING(0 0, 0 5)"))
11.180339:6

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/maxdistance9.testcase.

1
2
3
4
5
6
7
8
MaxDistance - two 3D points
:memory: #use in-memory database
SELECT ST_MaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5));
1 # rows (not including the header row)
1 # columns
ST_MaxDistance(MakePointZ(1, 2, 3), MakePointZ(4, 6, 5))
5.0

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/st_area10.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Sphere/Equator
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0)
189884187084.89:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area11.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Ellipsoid/Equator
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 1);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 1)
189884187084.89:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area12.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Sphere
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 0);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 0)
67724290215.61:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area13.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - valid Polygon - Ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 1);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))"), 1)
67989516071.49:2
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area14.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - Point - Ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POINT(50.4 50.4)"), 1);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POINT(50.4 50.4)"), 1)
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area15.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - planar Polygon - Sphere
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))", 32632), 0);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((50.4 50.4, 50.4 54, 54 54, 54 50.4, 50.4 50.4),(51 51, 51 53, 53 53, 53 51, 51 51))", 32632), 0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area16.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - DOUBLE use_ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0.5);
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area17.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - TEXT use_ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_area18.testcase.

1
2
3
4
5
6
7
ST_Area Geodesic - BLOB use_ellipsoid
:memory: #use in-memory database
SELECT ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Area(GeomFromText("POLYGON((-0.4 -0.4, -0.4 4, 4 4, 4 -0.4, -0.4 -0.4),(1 1, 1 3, 3 3, 3 1, 1 1))"), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d1.testcase.

1
2
3
4
5
6
7
ST_AsX3D - NULL geometry
:memory: #use in-memory database
SELECT ST_AsX3D(NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d10.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 2D multipoint
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOINT(10 10, 11 10, 11 11)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOINT(10 10, 11 10, 11 11)'))
<Polypoint2D  point='10 10 11 10 11 11 ' />:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d11.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D multipoint
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOINTZ(10 10 101, 11 10 102, 11 11 103)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOINTZ(10 10 101, 11 10 102, 11 11 103)'))
<PointSet ><Coordinate point='10 10 101 11 10 102 11 11 103 ' /></PointSet>:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d12.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 2D multilinestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTILINESTRING((10 10, 11 10, 11 11), (20 20, 21 20, 21 21))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTILINESTRING((10 10, 11 10, 11 11), (20 20, 21 20, 21 21))'))
<IndexedLineSet  coordIndex='0 1 2 -1 3 4 5'>10 10 11 10 11 11 20 20 21 20 21 21 ' />:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d13.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D multilinestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTILINESTRINGZ((10 10 1, 11 10 2, 11 11 2), (20 20 4, 21 20 5, 21 21 6))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTILINESTRINGZ((10 10 1, 11 10 2, 11 11 2), (20 20 4, 21 20 5, 21 21 6))'))
<IndexedLineSet  coordIndex='0 1 2 -1 3 4 5'><Coordinate point='10 10 1 11 10 2 11 11 2 20 20 4 21 20 5 21 21 6 ' /></IndexedLineSet>:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d14.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 2D multipolygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOLYGON(((10 10, 11 10, 11 11, 10 11, 10 10)), ((20 20, 21 20, 21 21, 20 21, 20 20)))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOLYGON(((10 10, 11 10, 11 11, 10 11, 10 10)), ((20 20, 21 20, 21 21, 20 21, 20 20)))'))
<IndexedFaceSet  coordIndex='0 1 2 3 -1 4 5 6 7'>10 10 11 10 11 11 10 11 20 20 21 20 21 21 20 21 ' />
# <IndexedFaceSet  convex='false' coordIndex='0 1 2 3 -1 4 5 6 7'>10 10 11 10 11 11 10 11 20 20 21 20 21 21 20 21 ' />
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/st_asx3d15.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 3D multipolygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('MULTIPOLYGONZ(((10 10 1, 11 10 2, 11 11 3, 10 11 4, 10 10 1)), ((20 20 5, 21 20 6, 21 21 7, 20 21 8, 20 20 5)))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('MULTIPOLYGONZ(((10 10 1, 11 10 2, 11 11 3, 10 11 4, 10 10 1)), ((20 20 5, 21 20 6, 21 21 7, 20 21 8, 20 20 5)))'))
<IndexedFaceSet  coordIndex='0 1 2 3 -1 4 5 6 7'><Coordinate point='10 10 1 11 10 2 11 11 3 10 11 4 20 20 5 21 20 6 21 21 7 20 21 8 ' /></IndexedFaceSet>
# <IndexedFaceSet  convex='false' coordIndex='0 1 2 3 -1 4 5 6 7'><Coordinate point='10 10 1 11 10 2 11 11 3 10 11 4 20 20 5 21 20 6 21 21 7 20 21 8 ' /></IndexedFaceSet>
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/st_asx3d16.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring NULL precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d17.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring TEXT precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d18.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring BLOB precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d19.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring DOUBLE precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 0.5);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'), 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d2.testcase.

1
2
3
4
5
6
7
ST_AsX3D - text geometry
:memory: #use in-memory database
SELECT ST_AsX3D('alpha');
1 # rows (not including the header row)
1 # columns
ST_AsX3D('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d20.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6)
<LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet>:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d21.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, NULL options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d22.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, text options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d23.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, blob options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d24.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, double options
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 0.5);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128)'), 6, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d25.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, short SRS
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 0);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 0)
<Shape>15.123457 14.765432 7.654321<Shape><LineSet  vertexCount='3'><Coordinate point='10.123457 10.987654 101.123 11 10 102 11.321 11.12 103.645313' /></LineSet>
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d26.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1)
<Shape>14.765432 15.123457 7.654321<Shape><LineSet  vertexCount='3'><Coordinate point='10.987654 10.123457 101.123 10 11 102 11.12 11.321 103.645313' /></LineSet>
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d27.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, NULL refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d28.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, int refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d29.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, BLOB refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d3.testcase.

1
2
3
4
5
6
7
ST_AsX3D - int geometry
:memory: #use in-memory database
SELECT ST_AsX3D(1);
1 # rows (not including the header row)
1 # columns
ST_AsX3D(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d30.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 3D linestring, 6 digit precision, long SRS, refid
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 'test_');
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('GEOMETRYCOLLECTIONZ(LINESTRINGZ(10.12345678 10.98765432 101.123, 11 10 102, 11.321 11.12 103.6453128), POINTZ(15.1234567 14.7654321 7.654321))', 4326), 6, 1, 'test_')
<Shapetest_>14.765432 15.123457 7.654321<Shapetest_><LineSet test_ vertexCount='3'><Coordinate point='10.987654 10.123457 101.123 10 11 102 11.12 11.321 103.645313' /></LineSet>
 
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/st_asx3d4.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 2D point
:memory: #use in-memory database
SELECT ST_AsX3D(MakePoint(12, 21));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(MakePoint(12, 21))
12 21
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d5.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D point
:memory: #use in-memory database
SELECT ST_AsX3D(MakePointZ(12, 21, 101));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(MakePointZ(12, 21, 101))
12 21 101
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d6.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 2D linestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRING(10 10, 11 10, 11 11)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRING(10 10, 11 10, 11 11)'))
<LineSet  vertexCount='3'><Coordinate point='10 10 11 10 11 11' /></LineSet>:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d7.testcase.

1
2
3
4
5
6
7
ST_AsX3D - 3D linestring
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('LINESTRINGZ(10 10 101, 11 10 102, 11 11 103)'))
<LineSet  vertexCount='3'><Coordinate point='10 10 101 11 10 102 11 11 103' /></LineSet>:0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_asx3d8.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 2D polygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('POLYGON((10 10, 11 10, 11 11, 10 11, 10 10))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('POLYGON((10 10, 11 10, 11 11, 10 11, 10 10))'))
<IndexedFaceSet  coordIndex='0 1 2 3'>10 10 11 10 11 11 10 11 ' />
# <IndexedFaceSet  convex='false' coordIndex='0 1 2 3'>10 10 11 10 11 11 10 11 ' />|
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/st_asx3d9.testcase.

1
2
3
4
5
6
7
8
ST_AsX3D - 3D polygon
:memory: #use in-memory database
SELECT ST_AsX3D(GeomFromText('POLYGONZ((10 10 101, 11 10 102, 11 11 103, 10 11 104, 10 10 101))'));
1 # rows (not including the header row)
1 # columns
ST_AsX3D(GeomFromText('POLYGONZ((10 10 101, 11 10 102, 11 11 103, 10 11 104, 10 10 101))'))
<IndexedFaceSet  coordIndex='0 1 2 3'><Coordinate point='10 10 101 11 10 102 11 11 103 10 11 104 ' /></IndexedFaceSet>
# <IndexedFaceSet  convex='false' coordIndex='0 1 2 3'><Coordinate point='10 10 101 11 10 102 11 11 103 10 11 104 ' /></IndexedFaceSet>
<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rtgeom_tests/st_azimuth1.testcase.

1
2
3
4
5
6
7
ST_Azimuth - WGS84 points
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10.5, 10, 4326), MakePoint(11.5, 11, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10.5, 10, 4326), MakePoint(11.5, 11, 4326))
0.778630:6 
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth10.testcase.

1
2
3
4
5
6
7
ST_Azimuth - text PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth('alpha', MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth('alpha', MakePoint(10, 10, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth11.testcase.

1
2
3
4
5
6
7
ST_Azimuth - text PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), 'beta');
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), 'beta')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth12.testcase.

1
2
3
4
5
6
7
ST_Azimuth - NULL PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(NULL, MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(NULL, MakePoint(10, 10, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth13.testcase.

1
2
3
4
5
6
7
ST_Azimuth - NULL PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), NULL);
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth14.testcase.

1
2
3
4
5
6
7
ST_Azimuth - MultiPoint (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('MULTIPOINT(0 0, 1 1)'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('MULTIPOINT(0 0, 1 1)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth15.testcase.

1
2
3
4
5
6
7
ST_Azimuth - Linestring (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('LINESTRING(0 0, 1 1)'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('LINESTRING(0 0, 1 1)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth16.testcase.

1
2
3
4
5
6
7
ST_Azimuth - Polygon (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth17.testcase.

1
2
3
4
5
6
7
ST_Azimuth - Collection (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(2 2))'));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(2 2))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth2.testcase.

1
2
3
4
5
6
7
ST_Azimuth - -1 SRID points
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(123456, 12345678.5, -1), MakePoint(123457, 12345679.5, -1));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(123456, 12345678.5, -1), MakePoint(123457, 12345679.5, -1));
0.785398:6 
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth3.testcase.

1
2
3
4
5
6
7
ST_Azimuth - same Point
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10.5, 10.5, 4326), MakePoint(10.5, 10.5, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10.5, 10.5, 4326), MakePoint(10.5, 10.5, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth4.testcase.

1
2
3
4
5
6
7
ST_Azimuth - bad blob PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(zeroblob(4), MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(zeroblob(4), MakePoint(10, 10, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth5.testcase.

1
2
3
4
5
6
7
ST_Azimuth - bad blob PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth6.testcase.

1
2
3
4
5
6
7
ST_Azimuth - integer PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(1, MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(1, MakePoint(10, 10, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth7.testcase.

1
2
3
4
5
6
7
ST_Azimuth - integer PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), 1);
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth8.testcase.

1
2
3
4
5
6
7
ST_Azimuth - double PointA (error)
:memory: #use in-memory database
SELECT ST_Azimuth(1.1, MakePoint(10, 10, 4326));
1 # rows (not including the header row)
1 # columns
ST_Azimuth(1.1, MakePoint(10, 10, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_azimuth9.testcase.

1
2
3
4
5
6
7
ST_Azimuth - double PointB (error)
:memory: #use in-memory database
SELECT ST_Azimuth(MakePoint(10, 10, 4326), 1.1);
1 # rows (not including the header row)
1 # columns
ST_Azimuth(MakePoint(10, 10, 4326), 1.1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash1.testcase.

1
2
3
4
5
6
7
ST_GeoHash - NULL geometry
:memory: #use in-memory database
SELECT ST_GeoHash(NULL);
1 # rows (not including the header row)
1 # columns
ST_GeoHash(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash10.testcase.

1
2
3
4
5
6
7
ST_GeoHash - WGS84 Point, precision 6
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(10, -20, 4326), 6);
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(10, -20, 4326), 6)
khrn5x
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash2.testcase.

1
2
3
4
5
6
7
ST_GeoHash - text geometry
:memory: #use in-memory database
SELECT ST_GeoHash('alpha');
1 # rows (not including the header row)
1 # columns
ST_GeoHash('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash3.testcase.

1
2
3
4
5
6
7
ST_GeoHash - int geometry
:memory: #use in-memory database
SELECT ST_GeoHash(1);
1 # rows (not including the header row)
1 # columns
ST_GeoHash(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash4.testcase.

1
2
3
4
5
6
7
ST_GeoHash - not Long/Lat geometry
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(123456, 654321));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(123456, 654321))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash5.testcase.

1
2
3
4
5
6
7
ST_GeoHash - zeroblob geometry
:memory: #use in-memory database
SELECT ST_GeoHash(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash6.testcase.

1
2
3
4
5
6
7
ST_GeoHash - WGS84 Point
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(10, -20, 4326));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(10, -20, 4326))
khrn5x1g8cu2yhrn5x1g
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash7.testcase.

1
2
3
4
5
6
7
ST_GeoHash - WGS84 Linestring
:memory: #use in-memory database
SELECT ST_GeoHash(GeomFromText('LINESTRING(10 -20, 10.0001 -19.9899, 10.0002 -19.9899)', 4326));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(GeomFromText('LINESTRING(10 -20, 10.0001 -19.9899, 10.0002 -19.9899)', 4326))
khrn
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash8.testcase.

1
2
3
4
5
6
7
ST_GeoHash - WGS84 Polygon
:memory: #use in-memory database
SELECT ST_GeoHash(GeomFromText('POLYGON((7 10, 7.0001 10, 7.0001 10.0001, 7 10.0001, 7 10))', 4326));
1 # rows (not including the header row)
1 # columns
ST_GeoHash(GeomFromText('POLYGON((7 10, 7.0001 10, 7.0001 10.0001, 7 10.0001, 7 10))', 4326))
s1ubzk3
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_geohash9.testcase.

1
2
3
4
5
6
7
ST_GeoHash - WGS84 Point, invalid precision
:memory: #use in-memory database
SELECT ST_GeoHash(MakePoint(10, -20, 4326), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_GeoHash(MakePoint(10, -20, 4326), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid1.testcase.

1
2
3
4
5
6
7
ST_MakeValid - Invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValid(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_MakeValid(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid2.testcase.

1
2
3
4
5
6
7
ST_MakeValid - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValid(NULL);
1 # rows (not including the header row)
1 # columns
ST_MakeValid(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid3.testcase.

1
2
3
4
5
6
7
ST_MakeValid - text (error)
:memory: #use in-memory database
SELECT ST_MakeValid('alpha');
1 # rows (not including the header row)
1 # columns
ST_MakeValid('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid4.testcase.

1
2
3
4
5
6
7
ST_MakeValid - already valid MultiPolygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid5.testcase.

1
2
3
4
5
6
7
ST_MakeValid - already valid Polygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid6.testcase.

1
2
3
4
5
6
7
ST_MakeValid - invalid MultiPolygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid7.testcase.

1
2
3
4
5
6
7
ST_MakeValid - invalid Polygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevalid8.testcase.

1
2
3
4
5
6
7
8
9
10
11
ST_MakeValid - invalid MultiPolygon [discarded items]
:memory: #use in-memory database
SELECT IsValid(v.v), NumGeometries(v.v), GeometryType(v.v) FROM (SELECT MakeValid(g.g) AS v FROM (SELECT GeomFromText ('MULTIPOLYGON(((0 0, 1 0, 1 2, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 2.5, 2.5 2.5, 3 2.5, 3 3, 2 3, 2 2)))') AS g) AS g) AS v;
1 # rows (not including the header row)
3 # columns
IsValid(v.v)
NumGeometries(v.v)
GeometryType(v.v)
1
2
MULTIPOLYGON
<
<
<
<
<
<
<
<
<
<
<






















Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded1.testcase.

1
2
3
4
5
6
7
ST_MakeValidDiscarded - Invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded2.testcase.

1
2
3
4
5
6
7
ST_MakeValidDiscarded - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(NULL);
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded3.testcase.

1
2
3
4
5
6
7
ST_MakeValidDiscarded - text (error)
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded('alpha');
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded4.testcase.

1
2
3
4
5
6
7
ST_MakeValid - already valid MultiPolygon
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))'));
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded5.testcase.

1
2
3
4
5
6
7
ST_MakeValidDiscarded - already valid Polygon
:memory: #use in-memory database
SELECT ST_MakeValidDiscarded(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_MakeValidDiscarded(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded6.testcase.

1
2
3
4
5
6
7
ST_MakeValid - invalid MultiPolygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 0 1, 1 1, 0 0)), ((2 2, 3 2, 3 3, 2 3, 2 2)))')))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded7.testcase.

1
2
3
4
5
6
7
ST_MakeValid - invalid Polygon
:memory: #use in-memory database
SELECT ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')));
1 # rows (not including the header row)
1 # columns
ST_IsValid(ST_MakeValid(GeomFromText('POLYGON((0 0, 1 0, 0 1, 1 1, 0 0))')))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_makevaliddiscarded8.testcase.

1
2
3
4
5
6
7
8
9
10
11
ST_MakeValidDiscarded - invalid MultiPolygon [discarded items]
:memory: #use in-memory database
SELECT IsValid(v.v), NumGeometries(v.v), GeometryType(v.v)  FROM (SELECT MakeValidDiscarded(g.g) AS v FROM (SELECT GeomFromText ('MULTIPOLYGON(((0 0, 1 0, 1 2, 1 1, 0 1, 0 0)), ((2 2, 3 2, 3 2.5, 2.5 2.5, 3 2.5, 3 3, 2 3, 2 2)))') AS g) AS g) AS v;
1 # rows (not including the header row)
3 # columns
IsValid(v.v)
NumGeometries(v.v)
GeometryType(v.v)
1
2
MULTILINESTRING
<
<
<
<
<
<
<
<
<
<
<






















Deleted test/sql_stmt_rtgeom_tests/st_node1.testcase.

1
2
3
4
5
6
7
ST_Node - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_Node(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Node(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node2.testcase.

1
2
3
4
5
6
7
ST_Node - Invalid INT input (error)
:memory: #use in-memory database
SELECT ST_Node(1);
1 # rows (not including the header row)
1 # columns
ST_Node(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node3.testcase.

1
2
3
4
5
6
7
ST_Node - Invalid DOUBLE input (error)
:memory: #use in-memory database
SELECT ST_Node(1.1);
1 # rows (not including the header row)
1 # columns
ST_Node(1.1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node4.testcase.

1
2
3
4
5
6
7
ST_Node - Invalid TEXT input (error)
:memory: #use in-memory database
SELECT ST_Node('alpha');
1 # rows (not including the header row)
1 # columns
ST_Node('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node5.testcase.

1
2
3
4
5
6
7
ST_Node - Valid 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')))
MULTILINESTRING((0 0, 5 5), (5 5, 10 10, 0 10, 5 5), (5 5, 10 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node6.testcase.

1
2
3
4
5
6
7
ST_Node - Valid 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
MULTILINESTRING Z((0 0 0, 5 5 4.5), (5 5 4.5, 10 10 10, 0 10 5, 5 5 4.5), (5 5 4.5, 10 0 3))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node7.testcase.

1
2
3
4
5
6
7
ST_Node - Valid MultiLinestring 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')))
MULTILINESTRING((0 0, 5 5), (5 5, 10 10), (10 10, 0 10, 5 5), (5 5, 10 0), (10 8, 10 10), (10 10, 10 12))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node8.testcase.

1
2
3
4
5
6
7
ST_Node - Valid MultiLinestring 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')))
MULTILINESTRING Z((0 0 0, 5 5 4.5), (5 5 4.5, 10 10 10), (10 10 10, 0 10 5, 5 5 4.5), (5 5 4.5, 10 0 3), (10 8 4, 10 10 10), (10 10 10, 10 12 5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_node9.testcase.

1
2
3
4
5
6
7
ST_Node - Invalid MultiPoint 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_Node(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Node(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project1.testcase.

1
2
3
4
5
6
7
ST_Project - NULL start Point
:memory: #use in-memory database
SELECT ST_Project(NULL, 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(NULL, 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project10.testcase.

1
2
3
4
5
6
7
ST_Project - BLOB distance
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), zeroblob(4), Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), zeroblob(4), Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project11.testcase.

1
2
3
4
5
6
7
ST_Project - NULL bearing
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, NULL);
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project12.testcase.

1
2
3
4
5
6
7
ST_Project - TEXT bearing
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project13.testcase.

1
2
3
4
5
6
7
ST_Project - BLOB bearing
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 100000, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project14.testcase.

1
2
3
4
5
6
7
ST_Project - valid
:memory: #use in-memory database
SELECT AsText(ST_Project(GeomFromText('POINT(0 0)'), 100000, Radians(45)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Project(GeomFromText('POINT(0 0)'), 100000, Radians(45)))
POINT(0.635231 0.639472)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project2.testcase.

1
2
3
4
5
6
7
ST_Project - INTEGER start Point
:memory: #use in-memory database
SELECT ST_Project(1, 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(1, 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project3.testcase.

1
2
3
4
5
6
7
ST_Project - DOUBLE start Point
:memory: #use in-memory database
SELECT ST_Project(1.1, 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(1.1, 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project4.testcase.

1
2
3
4
5
6
7
ST_Project - TEXT start Point
:memory: #use in-memory database
SELECT ST_Project('alpha', 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project('alpha', 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project5.testcase.

1
2
3
4
5
6
7
ST_Project - invalid BLOB start Point
:memory: #use in-memory database
SELECT ST_Project(zeroblob(4), 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(zeroblob(4), 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project6.testcase.

1
2
3
4
5
6
7
ST_Project - start Point (not long/lat)
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 32632), 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 32632), 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project7.testcase.

1
2
3
4
5
6
7
ST_Project - start Point (actually: Linestring)
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 100000, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 100000, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project8.testcase.

1
2
3
4
5
6
7
ST_Project - NULL distance
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), NULL, Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), NULL, Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_project9.testcase.

1
2
3
4
5
6
7
ST_Project - TEXT distance
:memory: #use in-memory database
SELECT ST_Project(GeomFromText('POINT(0 0)', 4326), 'alpha', Radians(45));
1 # rows (not including the header row)
1 # columns
ST_Project(GeomFromText('POINT(0 0)', 4326), 'alpha', Radians(45))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize1.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 1 2), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 1 2), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 1 1.5, 1 2), POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize10.testcase.

1
2
3
4
5
6
7
ST_Segmentize - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(NULL, 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(NULL, 0.5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize11.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(0 0 10), LINESTRINGZ(1 1 10, 1 2 11), POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(0 0 10), LINESTRINGZ(1 1 10, 1 2 11), POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5))
GEOMETRYCOLLECTION Z(POINT Z(0 0 10), LINESTRING Z(1 1 10, 1 1.5 10.5, 1 2 11), POLYGON Z((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize12.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(0 0 10), LINESTRINGM(1 1 10, 1 2 11), POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(0 0 10), LINESTRINGM(1 1 10, 1 2 11), POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10)))'), 0.5))
GEOMETRYCOLLECTION M(POINT M(0 0 10), LINESTRING M(1 1 10, 1 1.5 10.5, 1 2 11), POLYGON M((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize13.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(0 0 10 11), LINESTRINGZM(1 1 10 11, 1 2 11 13), POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(0 0 10 11), LINESTRINGZM(1 1 10 11, 1 2 11 13), POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11)))'), 0.5))
GEOMETRYCOLLECTION ZM(POINT ZM(0 0 10 11), LINESTRING ZM(1 1 10 11, 1 1.5 10.5 12, 1 2 11 13), POLYGON ZM((3 3 10 11, 3.5 3 10.166667 11.166667, 4 3 10.333333 11.333333, 4.5 3 10.5 11.5, 5 3 10.666667 11.666667, 5.5 3 10.833333 11.833333, 6 3 11 12, 6 3.5 11.166667 12.166667, 6 4 11.333333 12.333333, 6 4.5 11.5 12.5, 6 5 11.666667 12.666667, 6 5.5 11.833333 12.833333, 6 6 12 13, 5.5 6 12.166667 13.166667, 5 6 12.333333 13.333333, 4.5 6 12.5 13.5, 4 6 12.666667 13.666667, 3.5 6 12.833333 13.833333, 3 6 13 14, 3 5.5 12.5 13.5, 3 5 12 13, 3 4.5 11.5 12.5, 3 4 11 12, 3 3.5 10.5 11.5, 3 3 10 11), (4 4 10 11, 4.5 4 10.5 11.5, 5 4 11 12, 5 4.5 11.5 12.5, 5 5 12 13, 5 4.5 12.5 13.5, 5 4 13 14, 4.5 4 11.5 12.5, 4 4 10 11)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize14.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Point
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINT(0 0)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINT(0 0)'), 0.5))
POINT(0 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize15.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Point Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINTZ(0 0 10)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINTZ(0 0 10)'), 0.5))
POINT Z(0 0 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize16.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Point M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINTM(0 0 10)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINTM(0 0 10)'), 0.5))
POINT M(0 0 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize17.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Point ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POINTZM(0 0 10 11)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('POINTZM(0 0 10 11)'), 0.5))
POINT ZM(0 0 10 11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize18.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Linestring
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 1 2)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 1 2)'), 0.5))
LINESTRING(1 1, 1 1.5, 1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize19.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Linestring Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZ(1 1 10, 1 2 11)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZ(1 1 10, 1 2 11)'), 0.5))
LINESTRING Z(1 1 10, 1 1.5 10.5, 1 2 11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize2.testcase.

1
2
3
4
5
6
7
ST_Segmentize - MultiPoint
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('MULTIPOINT(0 1, 2 3, 4 5)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('MULTIPOINT(0 1, 2 3, 4 5)'), 0.5))
MULTIPOINT(0 1, 2 3, 4 5) 
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize20.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Linestring M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGM(1 1 10, 1 2 11)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGM(1 1 10, 1 2 11)'), 0.5))
LINESTRING M(1 1 10, 1 1.5 10.5, 1 2 11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize21.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Linestring ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZM(1 1 10 11, 1 2 11 13)'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRINGZM(1 1 10 11, 1 2 11 13)'), 0.5))
LINESTRING ZM(1 1 10 11, 1 1.5 10.5 12, 1 2 11 13)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize22.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Polygon
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4))'), 0.5))
POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize23.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Polygon Z
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGONZ((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5))
POLYGON Z((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize24.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Polygon M
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGONM((3 3 10, 6 3 11, 6 6 12, 3 6 13, 3 3 10), (4 4 10, 5 4 11, 5 5 12, 5 4 13, 4 4 10))'), 0.5))
POLYGON M((3 3 10, 3.5 3 10.166667, 4 3 10.333333, 4.5 3 10.5, 5 3 10.666667, 5.5 3 10.833333, 6 3 11, 6 3.5 11.166667, 6 4 11.333333, 6 4.5 11.5, 6 5 11.666667, 6 5.5 11.833333, 6 6 12, 5.5 6 12.166667, 5 6 12.333333, 4.5 6 12.5, 4 6 12.666667, 3.5 6 12.833333, 3 6 13, 3 5.5 12.5, 3 5 12, 3 4.5 11.5, 3 4 11, 3 3.5 10.5, 3 3 10), (4 4 10, 4.5 4 10.5, 5 4 11, 5 4.5 11.5, 5 5 12, 5 4.5 12.5, 5 4 13, 4.5 4 11.5, 4 4 10))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize25.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Polygon ZM
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11))'), 0.5));
1 # rows (not including the header row)
1 # column
ST_AsText(ST_Segmentize(GeomFromText('POLYGONZM((3 3 10 11, 6 3 11 12, 6 6 12 13, 3 6 13 14, 3 3 10 11), (4 4 10 11, 5 4 11 12, 5 5 12 13, 5 4 13 14, 4 4 10 11))'), 0.5))
POLYGON ZM((3 3 10 11, 3.5 3 10.166667 11.166667, 4 3 10.333333 11.333333, 4.5 3 10.5 11.5, 5 3 10.666667 11.666667, 5.5 3 10.833333 11.833333, 6 3 11 12, 6 3.5 11.166667 12.166667, 6 4 11.333333 12.333333, 6 4.5 11.5 12.5, 6 5 11.666667 12.666667, 6 5.5 11.833333 12.833333, 6 6 12 13, 5.5 6 12.166667 13.166667, 5 6 12.333333 13.333333, 4.5 6 12.5 13.5, 4 6 12.666667 13.666667, 3.5 6 12.833333 13.833333, 3 6 13 14, 3 5.5 12.5 13.5, 3 5 12 13, 3 4.5 11.5 12.5, 3 4 11 12, 3 3.5 10.5 11.5, 3 3 10 11), (4 4 10 11, 4.5 4 10.5 11.5, 5 4 11 12, 5 4.5 11.5 12.5, 5 5 12 13, 5 4.5 12.5 13.5, 5 4 13 14, 4.5 4 11.5 12.5, 4 4 10 11))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize26.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection - single Point
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0))'), 0.5))
GEOMETRYCOLLECTION(POINT(0 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize27.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection - single Linestring
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2))'), 0.5))
GEOMETRYCOLLECTION(LINESTRING(1 1, 1 1.5, 1 2))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize28.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection - single Polygon
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
GEOMETRYCOLLECTION(POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize29.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection - three Points
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1), POINT(2 2))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1), POINT(2 2))'), 0.5))
GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1), POINT(2 2)) 
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize3.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Multilinestring
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('MULTILINESTRING((1 1, 1 2), (3 3, 4 3))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('MULTILINESTRING((1 1, 1 2), (3 3, 4 3))'), 0.5))
MULTILINESTRING((1 1, 1 1.5, 1 2), (3 3, 3.5 3, 4 3))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize30.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection - two Linestrings
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2), LINESTRING(3 3, 4 3))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(1 1, 1 2), LINESTRING(3 3, 4 3))'), 0.5))
GEOMETRYCOLLECTION(LINESTRING(1 1, 1 1.5, 1 2), LINESTRING(3 3, 3.5 3, 4 3))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize31.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Collection - two Polygons
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('GEOMETRYCOLLECTION(POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)), POLYGON((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
GEOMETRYCOLLECTION(POLYGON((0 0, 0.5 0, 1 0, 1 0.5, 1 1, 0.5 1, 0 1, 0 0.5, 0 0)), POLYGON((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize4.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Multipolygon
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((3 3, 6 3, 6 6, 3 6, 3 3), (4 4, 5 4, 5 5, 5 4, 4 4)))'), 0.5))
MULTIPOLYGON(((0 0, 0.5 0, 1 0, 1 0.5, 1 1, 0.5 1, 0 1, 0 0.5, 0 0)), ((3 3, 3.5 3, 4 3, 4.5 3, 5 3, 5.5 3, 6 3, 6 3.5, 6 4, 6 4.5, 6 5, 6 5.5, 6 6, 5.5 6, 5 6, 4.5 6, 4 6, 3.5 6, 3 6, 3 5.5, 3 5, 3 4.5, 3 4, 3 3.5, 3 3), (4 4, 4.5 4, 5 4, 5 4.5, 5 5, 5 4.5, 5 4, 4.5 4, 4 4)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize5.testcase.

1
2
3
4
5
6
7
ST_Segmentize - Invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(zeroblob(4), 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(zeroblob(4), 0.5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize6.testcase.

1
2
3
4
5
6
7
ST_Segmentize - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(NULL, 0.5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(NULL, 0.5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize7.testcase.

1
2
3
4
5
6
7
ST_Segmentize - NULL distance (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), NULL));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize8.testcase.

1
2
3
4
5
6
7
ST_Segmentize - text distance (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), 'alpha'));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize(GeomFromText('LINESTRING(1 1, 2 2)'), 'alpha'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_segmentize9.testcase.

1
2
3
4
5
6
7
ST_Segmentize - text geometry (error)
:memory: #use in-memory database
SELECT ST_AsText(ST_Segmentize('alpha', 0));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_Segmentize('alpha', 0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self1.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self2.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Invalid INT input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections(1);
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self3.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Invalid DOUBLE input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections(1.1);
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections(1.1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self4.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Invalid TEXT input (error)
:memory: #use in-memory database
SELECT ST_SelfIntersections('alpha');
1 # rows (not including the header row)
1 # columns
ST_SelfIntersections('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self5.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Valid 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRING(0 0, 10 10, 0 10, 10 0)')))
MULTIPOINT(5 5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self6.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Valid 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('LINESTRINGZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
MULTIPOINT Z(5 5 4.5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self7.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Valid MultiLinestring 2D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRING((0 0, 10 10, 0 10, 10 0),(10 8, 10 12))')))
MULTIPOINT(5 5, 10 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self8.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Valid MultiLinestring 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTILINESTRINGZ((0 0 0, 10 10 10, 0 10 5, 10 0 3),(10 8 4, 10 12 5))')))
MULTIPOINT Z(5 5 4.5, 10 10 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_self9.testcase.

1
2
3
4
5
6
7
ST_SelfIntersections - Invalid MultiPoint 3D input 
:memory: #use in-memory database
SELECT ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_SelfIntersections(ST_GeomFromText('MULTIPOINTZ(0 0 0, 10 10 10, 0 10 5, 10 0 3)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid1.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - two args - NULL BLOB (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(NULL, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(NULL, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid10.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - three args - NULL sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid11.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - three args - BLOB sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid12.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - three args - text sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 0.5, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid13.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL originX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 0.5, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid14.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB originX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(0), 1, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(0), 1, 0.5, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid15.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - text originX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 0.5, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid16.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL originY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, NULL, 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, NULL, 0.5, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid17.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB originY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, zeroblob(0), 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, zeroblob(0), 0.5, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid18.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - text originY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 'alpha', 0.5, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 'alpha', 0.5, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid19.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, NULL, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, NULL, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid2.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - two args - invalid BLOB (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(zeroblob(4), 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(zeroblob(4), 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid20.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, zeroblob(0), 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, zeroblob(0), 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid21.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - text sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 'alpha', 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 'alpha', 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid22.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - NULL sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid23.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - BLOB sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, zeroblob(0));
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, zeroblob(0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid24.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - five args - text sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1, 1, 0.5, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid25.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 1, 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid26.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - invalid BLOB grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 1, 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid27.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - text grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 1, 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid28.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - num grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 1.1, 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 1.1, 1, 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid29.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - not-point grid origin (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), GeomFromText('LINESTRING(0 0, 1 1)'), 1, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), GeomFromText('LINESTRING(0 0, 1 1)'), 1, 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid3.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - two args - NULL size (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid30.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), NULL, 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), NULL, 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid31.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), zeroblob(4), 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), zeroblob(4), 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid32.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 'alpha', 2, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 'alpha', 2, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid33.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeM (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid34.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeM (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid35.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeM (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 3, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid36.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, NULL, 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, NULL, 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid37.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, zeroblob(4), 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, zeroblob(4), 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid38.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeY (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 'alpha', 3, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 'alpha', 3, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid39.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - NULL sizeZ (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, NULL, 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, NULL, 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid4.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - two args - text size (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid40.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - BLOB sizeZ (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, zeroblob(4), 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, zeroblob(4), 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid41.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - six args - text sizeZ (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 'alpha', 4);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), MakePoint(1, 1), 1, 2, 'alpha', 4)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid42.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Point 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINT(1.2 2.3)'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINT(1.2 2.3)'), 0.25))
POINT(1.25 2.25)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid43.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Linestring 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRING(1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9)'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRING(1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9)'), 0.25))
LINESTRING(1.25 2.25, 2 4)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid44.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Polygon 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGON((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1))'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGON((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1))'), 0.25))
POLYGON((0 0, 0.25 0.25, 0.25 5, 5 5, 5 0.25, 0 0), (3 3, 3.25 3, 3.25 3.25, 3.25 3, 3 3), (1 1, 1 2, 2 2, 2 1, 1 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid45.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINT(1.2 2.3, 1.21 2.31, 2.2 3.3, 2.21 3.33)'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINT(1.2 2.3, 1.21 2.31, 2.2 3.3, 2.21 3.33)'), 0.25))
MULTIPOINT(1.25 2.25, 2.25 3.25)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid46.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRING((1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9), (2.11 3.11, 2.12 3.12), (3.2 4.2, 4.2 3.2))'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRING((1.2 2.3, 1.21 2.31, 1.22 2.32, 2.1 3.9), (2.11 3.11, 2.12 3.12), (3.2 4.2, 4.2 3.2))'), 0.25))
MULTILINESTRING((1.25 2.25, 2 4), (3.25 4.25, 4.25 3.25))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid47.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon 2D
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGON(((5.11 5.11, 5.12 5.11, 4.11 5.11, 5.11 5.12, 5.11 5.11)), ((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1)), ((5.51 5.51, 6.51 5.51, 6.51 6.51, 5.51 6.51, 5.51 5.51)))'), 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGON(((5.11 5.11, 5.12 5.11, 4.11 5.11, 5.11 5.12, 5.11 5.11)), ((0.1 0.1, 0.2 0.2, 0.2 5.1, 4.9 4.9, 5.1 5.1, 4.9 0.15, 0.1 0.1), (3.1 3.1, 3.2 3.1, 3.2 3.2, 3.2 3.1, 3.1 3.1), (1.1 1.1, 1.1 2.1, 2.1 2.1, 2.1 1.1, 1.1 1.1)), ((5.51 5.51, 6.51 5.51, 6.51 6.51, 5.51 6.51, 5.51 5.51)))'), 0.25))
MULTIPOLYGON(((0 0, 0.25 0.25, 0.25 5, 5 5, 5 0.25, 0 0), (3 3, 3.25 3, 3.25 3.25, 3.25 3, 3 3), (1 1, 1 2, 2 2, 2 1, 1 1)), ((5.5 5.5, 6.5 5.5, 6.5 6.5, 5.5 6.5, 5.5 5.5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid48.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Point ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINTZM(1.2 2.3 10.1 20.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINTZM(1.2 2.3 10.1 20.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POINT ZM(1.25 2.25 10 20)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid49.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Linestring ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.12 20.12, 2.1 3.9 11.4 21.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.12 20.12, 2.1 3.9 11.4 21.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
LINESTRING ZM(1.25 2.25 10 20, 2 4 11.5 21.5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid5.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - two args - text geom (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid('alpha', NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid('alpha', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid50.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Polygon ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGONZM((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.12, 0.2 5.1 10.12 20.13, 4.9 4.9 10.51 20.51, 5.1 5.1 10.49 20.49, 4.9 0.15 10.1 20.1, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.12 20.12, 3.2 3.1 10.13 20.13, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.2 20.2, 2.1 2.1 10.3 20.3, 2.1 1.1 10.4 20.4, 1.1 1.1 10.1 20.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGONZM((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.12, 0.2 5.1 10.12 20.13, 4.9 4.9 10.51 20.51, 5.1 5.1 10.49 20.49, 4.9 0.15 10.1 20.1, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.12 20.12, 3.2 3.1 10.13 20.13, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.2 20.2, 2.1 2.1 10.3 20.3, 2.1 1.1 10.4 20.4, 1.1 1.1 10.1 20.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POLYGON ZM((0 0 10 20, 0.25 0.25 10 20, 0.25 5 10 20.25, 5 5 10.5 20.5, 5 0.25 10 20, 0 0 10 20), (3 3 10 20, 3.25 3 10 20, 3.25 3.25 10 20, 3.25 3 10.25 20.25, 3 3 10 20), (1 1 10 20, 1 2 10.25 20.25, 2 2 10.25 20.25, 2 1 10.5 20.5, 1 1 10 20))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid51.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 2.2 3.3 21.1 31.1, 2.21 3.33 21.12 31.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZM(1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 2.2 3.3 21.1 31.1, 2.21 3.33 21.12 31.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOINT ZM(1.25 2.25 10 20, 2.25 3.25 21 31)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid52.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZM((1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.1 20.1, 2.1 3.9 10.11 20.11), (2.11 3.11 10 20, 2.12 3.12 10.1 20.1), (3.2 4.2 10.1 20.1, 4.2 3.2 10.4 20.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZM((1.2 2.3 10.1 20.1, 1.21 2.31 10.11 20.11, 1.22 2.32 10.1 20.1, 2.1 3.9 10.11 20.11), (2.11 3.11 10 20, 2.12 3.12 10.1 20.1), (3.2 4.2 10.1 20.1, 4.2 3.2 10.4 20.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTILINESTRING ZM((1.25 2.25 10 20, 2 4 10 20), (3.25 4.25 10 20, 4.25 3.25 10.5 20.5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid53.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon ZM
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZM(((5.11 5.11 10.1 20.1, 5.12 5.11 10.11 20.11, 5.11 5.11 10.12 20.12, 5.11 5.12 10.13 20.13, 5.11 5.11 10.1 20.1)), ((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.11, 0.2 5.1 10.12 20.12, 4.9 4.9 10.13 20.13, 5.1 5.1 10.14 20.14, 4.9 0.15 10.15 20.15, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.11 20.11, 3.2 3.1 10.12 20.12, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.11 20.11, 2.1 2.1 10.12 20.12, 2.1 1.1 10.13 20.13, 1.1 1.1 10.1 20.1)), ((5.51 5.51 10.1 20.1, 6.51 5.51 10.11 20.11, 6.51 6.51 10.12 20.12, 5.51 6.51 10.13 20.13, 5.51 5.51 10.1 20.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZM(((5.11 5.11 10.1 20.1, 5.12 5.11 10.11 20.11, 5.11 5.11 10.12 20.12, 5.11 5.12 10.13 20.13, 5.11 5.11 10.1 20.1)), ((0.1 0.1 10.1 20.1, 0.2 0.2 10.11 20.11, 0.2 5.1 10.12 20.12, 4.9 4.9 10.13 20.13, 5.1 5.1 10.14 20.14, 4.9 0.15 10.15 20.15, 0.1 0.1 10.1 20.1), (3.1 3.1 10.1 20.1, 3.2 3.1 10.11 20.11, 3.2 3.2 10.11 20.11, 3.2 3.1 10.12 20.12, 3.1 3.1 10.1 20.1), (1.1 1.1 10.1 20.1, 1.1 2.1 10.11 20.11, 2.1 2.1 10.12 20.12, 2.1 1.1 10.13 20.13, 1.1 1.1 10.1 20.1)), ((5.51 5.51 10.1 20.1, 6.51 5.51 10.11 20.11, 6.51 6.51 10.12 20.12, 5.51 6.51 10.13 20.13, 5.51 5.51 10.1 20.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOLYGON ZM(((0 0 10 20, 0.25 0.25 10 20, 0.25 5 10 20, 5 5 10.25 20.25, 5 0.25 10.25 20.25, 0 0 10 20), (3 3 10 20, 3.25 3 10 20, 3.25 3.25 10 20, 3.25 3 10 20, 3 3 10 20), (1 1 10 20, 1 2 10 20, 2 2 10 20, 2 1 10.25 20.25, 1 1 10 20)), ((5.5 5.5 10 20, 6.5 5.5 10 20, 6.5 6.5 10 20, 5.5 6.5 10.25 20.25, 5.5 5.5 10 20)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid54.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Point Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINTZ(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINTZ(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POINT Z(1.25 2.25 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid55.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Linestring Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZ(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRINGZ(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
LINESTRING Z(1.25 2.25 10, 2 4 11.5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid56.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Polygon Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGONZ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGONZ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POLYGON Z((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.5, 5 0.25 10, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10.25, 3 3 10), (1 1 10, 1 2 10.25, 2 2 10.25, 2 1 10.5, 1 1 10))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid57.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZ(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTZ(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOINT Z(1.25 2.25 10, 2.25 3.25 21)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid58.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZ((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGZ((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTILINESTRING Z((1.25 2.25 10, 2 4 10), (3.25 4.25 10, 4.25 3.25 10.5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid59.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon Z
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZ(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONZ(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOLYGON Z(((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.25, 5 0.25 10.25, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10, 3 3 10), (1 1 10, 1 2 10, 2 2 10, 2 1 10.25, 1 1 10)), ((5.5 5.5 10, 6.5 5.5 10, 6.5 6.5 10, 5.5 6.5 10.25, 5.5 5.5 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid6.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - two args - double geom (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(1.2, NULL);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(1.2, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid60.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Point M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POINTM(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POINTM(1.2 2.3 10.1)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POINT M(1.25 2.25 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid61.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Linestring M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('LINESTRINGM(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('LINESTRINGM(1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.12, 2.1 3.9 11.4)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
LINESTRING M(1.25 2.25 10, 2 4 11.5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid62.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - Polygon M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('POLYGONM((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('POLYGONM((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.51, 5.1 5.1 10.49, 4.9 0.15 10.1, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.12, 3.2 3.1 10.13, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.2, 2.1 2.1 10.3, 2.1 1.1 10.4, 1.1 1.1 10.1))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
POLYGON M((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.5, 5 0.25 10, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10.25, 3 3 10), (1 1 10, 1 2 10.25, 2 2 10.25, 2 1 10.5, 1 1 10))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid63.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPoint M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTM(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOINTM(1.2 2.3 10.1, 1.21 2.31 10.11, 2.2 3.3 21.1, 2.21 3.33 21.12)'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOINT M(1.25 2.25 10, 2.25 3.25 21)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid64.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiLinestring M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGM((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTILINESTRINGM((1.2 2.3 10.1, 1.21 2.31 10.11, 1.22 2.32 10.1, 2.1 3.9 10.11), (2.11 3.11 10, 2.12 3.12 10.1), (3.2 4.2 10.1, 4.2 3.2 10.4))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTILINESTRING M((1.25 2.25 10, 2 4 10), (3.25 4.25 10, 4.25 3.25 10.5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid65.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - MultiPolygon M
:memory: #use in-memory database
SELECT AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONM(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25));
1 # rows (not including the header row)
1 # columns
AsText(ST_SnapToGrid(GeomFromText('MULTIPOLYGONM(((5.11 5.11 10.1, 5.12 5.11 10.11, 5.11 5.11 10.12, 5.11 5.12 10.13, 5.11 5.11 10.1)), ((0.1 0.1 10.1, 0.2 0.2 10.11, 0.2 5.1 10.12, 4.9 4.9 10.13, 5.1 5.1 10.14, 4.9 0.15 10.15, 0.1 0.1 10.1), (3.1 3.1 10.1, 3.2 3.1 10.11, 3.2 3.2 10.11, 3.2 3.1 10.12, 3.1 3.1 10.1), (1.1 1.1 10.1, 1.1 2.1 10.11, 2.1 2.1 10.12, 2.1 1.1 10.13, 1.1 1.1 10.1)), ((5.51 5.51 10.1, 6.51 5.51 10.11, 6.51 6.51 10.12, 5.51 6.51 10.13, 5.51 5.51 10.1)))'), MakePoint(0, 0), 0.25, 0.25, 0.25, 0.25))
MULTIPOLYGON M(((0 0 10, 0.25 0.25 10, 0.25 5 10, 5 5 10.25, 5 0.25 10.25, 0 0 10), (3 3 10, 3.25 3 10, 3.25 3.25 10, 3.25 3 10, 3 3 10), (1 1 10, 1 2 10, 2 2 10, 2 1 10.25, 1 1 10)), ((5.5 5.5 10, 6.5 5.5 10, 6.5 6.5 10, 5.5 6.5 10.25, 5.5 5.5 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid7.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - three args - NULL sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), NULL, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid8.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - three args - BLOB sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), zeroblob(4), 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_snaptogrid9.testcase.

1
2
3
4
5
6
7
ST_SnapToGrid - three args - text sizeX (error)
:memory: #use in-memory database
SELECT ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 0.5);
1 # rows (not including the header row)
1 # columns
ST_SnapToGrid(MakePoint(1.25, 2.35), 'alpha', 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split1.testcase.

1
2
3
4
5
6
7
ST_Split - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_Split(zeroblob(4), MakePoint(5, 0));
1 # rows (not including the header row)
1 # columns
ST_Split(zeroblob(4), MakePoint(5, 0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split10.testcase.

1
2
3
4
5
6
7
ST_Split - Polygon-Point (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), MakePoint(4, 1));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), MakePoint(4, 1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split11.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Polygon (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split12.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Collection (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 2 2)'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(1 1, 2 2)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split13.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)))
MULTILINESTRING((0 0, 7 0), (7 0, 10 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split14.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((0 1, 7 1), (7 1, 10 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split15.testcase.

1
2
3
4
5
6
7
ST_Split - MultiLine-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)))
MULTILINESTRING((0 2, 10 2), (0 0, 7 0), (7 0, 10 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split16.testcase.

1
2
3
4
5
6
7
ST_Split - MultiLine-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((0 2, 7 2), (7 2, 10 2), (0 1, 7 1), (7 1, 10 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split17.testcase.

1
2
3
4
5
6
7
ST_Split - Polygon-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(7 0, 7 20)')))
MULTIPOLYGON(((7 1, 0 1, 0 10, 7 10, 7 1)), ((7 10, 10 10, 10 1, 7 1, 7 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split18.testcase.

1
2
3
4
5
6
7
ST_Split - Collection-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(7 0, 7 20)')))
GEOMETRYCOLLECTION(LINESTRING(0 11, 7 11), LINESTRING(7 11, 10 11), POLYGON((7 1, 0 1, 0 10, 7 10, 7 1)), POLYGON((7 10, 10 10, 10 1, 7 1, 7 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split19.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
LINESTRING(0 0, 10 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split2.testcase.

1
2
3
4
5
6
7
ST_Split - NULL BLOB input (error)
:memory: #use in-memory database
SELECT ST_Split(NULL, MakePoint(5, 0));
1 # rows (not including the header row)
1 # columns
ST_Split(NULL, MakePoint(5, 0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split20.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')))
LINESTRING(0 1, 10 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split21.testcase.

1
2
3
4
5
6
7
ST_Split - MultiLine-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)))
MULTILINESTRING((0 2, 10 2), (0 0, 10 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split22.testcase.

1
2
3
4
5
6
7
ST_Split - MultiLine-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')))
MULTILINESTRING((0 2, 10 2), (0 1, 10 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split23.testcase.

1
2
3
4
5
6
7
ST_Split - Polygon-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))))
POLYGON((0 1, 0 10, 10 10, 10 1, 0 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split24.testcase.

1
2
3
4
5
6
7
ST_Split - Collection-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_Split(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))))
GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 0 10, 10 10, 10 1, 0 1)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split25.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
LINESTRING(0 0, 10 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split26.testcase.

1
2
3
4
5
6
7
ST_SplitlLeft - Line-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRINGZM(0 0 10 100, 10 0 11 101)'), MakePointZM(7, 0, 10, 100)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRINGZM(0 0 10 100, 10 0 11 101)'), MakePointZM(7, 0, 10, 100)))
LINESTRING ZM(0 0 10 100, 7 0 10.7 100.7)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split27.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Line-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRINGM(0 1 10, 10 1 10)'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRINGM(0 1 10, 10 1 10)'), GeomFromText('LINESTRING(7 0, 7 3)')))
LINESTRING M(0 1 0, 7 1 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split28.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRINGZ((0 2 10, 10 2 11), (0 0 10, 10 0 11))'), MakePointZ(7, 0, 10)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRINGZ((0 2 10, 10 2 11), (0 0 10, 10 0 11))'), MakePointZ(7, 0, 10)))
MULTILINESTRING Z((0 2 10, 10 2 11), (0 0 10, 7 0 10.7))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split29.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((0 2, 7 2), (0 1, 7 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split3.testcase.

1
2
3
4
5
6
7
ST_Split - text input (error)
:memory: #use in-memory database
SELECT ST_Split('alpha', MakePoint(5, 0));
1 # rows (not including the header row)
1 # columns
ST_Split('alpha', MakePoint(5, 0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split30.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Polygon-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGONZ((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10))'), GeomFromText('LINESTRING(7 0, 7 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGONZ((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10))'), GeomFromText('LINESTRING(7 0, 7 20)'))))
POLYGON Z((7 1 10.7, 0 1 10, 0 10 13, 7 10 12.3, 7 9 12.5, 5 9 13, 5 5 10, 7 5 10.5, 7 1 10.7))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split31.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Collection-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTIONM(LINESTRINGM(0 11 10, 10 11 10), POLYGONM((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10)))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTIONM(LINESTRINGM(0 11 10, 10 11 10), POLYGONM((0 1 10, 10 1 11, 10 10 12, 0 10 13, 0 1 10), (5 5 10, 9 5 11, 9 9 12, 5 9 13, 5 5 10)))'), GeomFromText('LINESTRING(7 0, 7 20)')))
GEOMETRYCOLLECTION M(LINESTRING M(0 11 0, 7 11 0), POLYGON M((7 1 0, 0 1 0, 0 10 0, 7 10 0, 7 9 0, 5 9 0, 5 5 0, 7 5 0, 7 1 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split32.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
LINESTRING(0 0, 10 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split33.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Line-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')))
LINESTRING(0 1, 10 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split34.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0)))
MULTILINESTRING((0 2, 10 2), (0 0, 10 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split35.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - MultiLine-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitLeft(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)')))
MULTILINESTRING((0 2, 10 2), (0 1, 10 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split36.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Polygon-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5))'), GeomFromText('LINESTRING(12 0, 12 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5))'), GeomFromText('LINESTRING(12 0, 12 20)'))))
POLYGON((0 1, 0 10, 10 10, 10 1, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split37.testcase.

1
2
3
4
5
6
7
ST_SplitLeft - Collection-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitLeft(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(-1 0, -1 20)'))))
GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 0 10, 10 10, 10 1, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split38.testcase.

1
2
3
4
5
6
7
ST_SplitlRight - Line-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(7, 0)))
LINESTRING(7 0, 10 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split39.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Line-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(7 0, 7 3)')))
LINESTRING(7 1, 10 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split4.testcase.

1
2
3
4
5
6
7
ST_Split - Invalid BLOB blade (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split40.testcase.

1
2
3
4
5
6
7
ST_SplitRight - MultiLine-Point (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(7, 0)))
LINESTRING(7 0, 10 0)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split41.testcase.

1
2
3
4
5
6
7
ST_SplitRight - MultiLine-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(7 0, 7 3)')))
MULTILINESTRING((7 2, 10 2), (7 1, 10 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split42.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Polygon-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('POLYGONZM((0 1 10 100, 10 1 11 101, 10 10 12 102, 0 10 13 103, 0 1 10 100), (5 5 10 100, 9 5 11 101, 9 9 12 102, 5 9 13 103, 5 5 10 100))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('POLYGONZM((0 1 10 100, 10 1 11 101, 10 10 12 102, 0 10 13 103, 0 1 10 100), (5 5 10 100, 9 5 11 101, 9 9 12 102, 5 9 13 103, 5 5 10 100))'), GeomFromText('LINESTRING(7 0, 7 20)')))
POLYGON ZM((7 10 12.3 0, 10 10 12 0, 10 1 11 0, 7 1 10.7 0, 7 5 10.5 0, 9 5 11 0, 9 9 12 0, 7 9 12.5 0, 7 10 12.3 0))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split43.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Collection-Line (split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(7 0, 7 20)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1), (5 5, 9 5, 9 9, 5 9, 5 5)))'), GeomFromText('LINESTRING(7 0, 7 20)')))
GEOMETRYCOLLECTION(LINESTRING(7 11, 10 11), POLYGON((7 10, 10 10, 10 1, 7 1, 7 5, 9 5, 9 9, 7 9, 7 10)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split44.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Line-Point (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 0, 10 0)'), MakePoint(11, 0)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split45.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Line-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')));
1 # rows (not including the header row)
1 # columns
AsText(ST_SplitRight(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('LINESTRING(11 0, 11 3)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split46.testcase.

1
2
3
4
5
6
7
ST_SplitRigt - MultiLine-Point (not split)
:memory: #use in-memory database
SELECT ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0));
1 # rows (not including the header row)
1 # columns
ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 0, 10 0))'), MakePoint(-1, 0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split47.testcase.

1
2
3
4
5
6
7
ST_SplitRight - MultiLine-Line (not split)
:memory: #use in-memory database
SELECT ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)'));
1 # rows (not including the header row)
1 # columns
ST_SplitRight(GeomFromText('MULTILINESTRING((0 2, 10 2), (0 1, 10 1))'), GeomFromText('LINESTRING(-1 0, -1 3)'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split48.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Polygon-Line (not split)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_SplitRight(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_SplitRight(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('LINESTRING(12 0, 12 20)'))))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split49.testcase.

1
2
3
4
5
6
7
ST_SplitRight - Collection-Line (not split)
:memory: #use in-memory database
SELECT ST_ForceLHR(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)')));
1 # rows (not including the header row)
1 # columns
ST_ForceLHR(ST_SplitRight(GeomFromText('GEOMETRYCOLLECTION(LINESTRING(0 11, 10 11), POLYGON((0 1, 10 1, 10 10, 0 10, 0 1)))'), GeomFromText('LINESTRING(-1 0, -1 20)')))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split5.testcase.

1
2
3
4
5
6
7
ST_Split - NULL BLOB blade (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split6.testcase.

1
2
3
4
5
6
7
ST_Split - text input blade (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('LINESTRING(0 0, 10 0)'), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split7.testcase.

1
2
3
4
5
6
7
ST_Split - Point-Point (error)
:memory: #use in-memory database
SELECT ST_Split(MakePoint(0, 0), MakePoint(1, 1));
1 # rows (not including the header row)
1 # columns
ST_Split(MakePoint(0, 0), MakePoint(1, 1))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split8.testcase.

1
2
3
4
5
6
7
ST_Split - Line-Multiline (error)
:memory: #use in-memory database
SELECT AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))')));
1 # rows (not including the header row)
1 # columns
AsText(ST_Split(GeomFromText('LINESTRING(0 1, 10 1)'), GeomFromText('MULTILINESTRING((3 0, 3 3), (5 0, 5 3))')))
MULTILINESTRING((0 1, 3 1), (3 1, 5 1), (5 1, 10 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/st_split9.testcase.

1
2
3
4
5
6
7
ST_Split - Polygon-Multiline (error)
:memory: #use in-memory database
SELECT ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('MULTILINESTRING((3 -1, 3 11), (5 -1, 5 11))'));
1 # rows (not including the header row)
1 # columns
ST_Split(GeomFromText('POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))'), GeomFromText('MULTILINESTRING((3 -1, 3 11), (5 -1, 5 11))'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb1.testcase.

1
2
3
4
5
6
7
AsTWKB - NULL Geometry
:memory: #use in-memory database
SELECT AsTWKB(NULL);
1 # rows (not including the header row)
1 # columns
AsTWKB(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb10.testcase.

1
2
3
4
5
6
7
AsTWKB - NULL precision Z
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, NULL);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb11.testcase.

1
2
3
4
5
6
7
AsTWKB - Double precision Z
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 1.2);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 1.2)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb12.testcase.

1
2
3
4
5
6
7
AsTWKB - Text precision Z
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 'six');
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 'six')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb13.testcase.

1
2
3
4
5
6
7
AsTWKB - BLOB precision Z
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, zeroblob(4));
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb14.testcase.

1
2
3
4
5
6
7
AsTWKB - NULL precision M
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, NULL);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb15.testcase.

1
2
3
4
5
6
7
AsTWKB - Double precision M
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 1.2);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 1.2)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb16.testcase.

1
2
3
4
5
6
7
AsTWKB - Text precision M
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 'six');
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 'six')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb17.testcase.

1
2
3
4
5
6
7
AsTWKB - BLOB precision M
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, zeroblob(3));
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, zeroblob(3))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb18.testcase.

1
2
3
4
5
6
7
AsTWKB - NULL with size
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, NULL);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb19.testcase.

1
2
3
4
5
6
7
AsTWKB - Double with size
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, 1.5);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, 1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb2.testcase.

1
2
3
4
5
6
7
AsTWKB - Int Geometry
:memory: #use in-memory database
SELECT AsTWKB(1);
1 # rows (not including the header row)
1 # columns
AsTWKB(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb20.testcase.

1
2
3
4
5
6
7
AsTWKB - Text with size
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, 'yes');
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, 'yes')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb21.testcase.

1
2
3
4
5
6
7
AsTWKB - BLOB with size
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, zeroblob(10));
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb22.testcase.

1
2
3
4
5
6
7
AsTWKB - NULL with bbox
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, NULL);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb23.testcase.

1
2
3
4
5
6
7
AsTWKB - Double with bbox
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, 1.2);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, 1.2)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb24.testcase.

1
2
3
4
5
6
7
AsTWKB - Text with bbox
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, 'yes');
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, 'yes')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb25.testcase.

1
2
3
4
5
6
7
AsTWKB - BLOB with bbox
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, zeroblob(2));
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, zeroblob(2))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb26.testcase.

1
2
3
4
5
6
7
AsTWKB - Point XY
:memory: #use in-memory database
SELECT Hex(AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, 0));
1 # rows (not including the header row)
1 # columns
Hex(AsTWKB(MakePoint(1, 2), 6, 6, 6, 0, 0))
C10080897A8092F401
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb27.testcase.

1
2
3
4
5
6
7
AsTWKB - Polygon Z
:memory: #use in-memory database
SELECT Hex(AsTWKB(GeomFromText('POLYGON Z((0 0 1, 1 0 2, 1 1 3, 0 1 1, 0 0 1))'), 6, 6, 6));
1 # rows (not including the header row)
1 # columns
Hex(AsTWKB(GeomFromText('POLYGON Z((0 0 1, 1 0 2, 1 1 3, 0 1 1, 0 0 1))'), 6, 6, 6));
C308D90105000080897A80897A0080897A0080897A80897AFF887A00FF91F40100FF887A00
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb28.testcase.

1
2
3
4
5
6
7
AsTWKB - MultiLinestring M
:memory: #use in-memory database
SELECT Hex(AsTWKB(GeomFromText('MULTILINESTRING M((0 0 1, 1 0 2), (1 1 3, 0 1 4))'), 6, 6, 6));
1 # rows (not including the header row)
1 # columns
Hex(AsTWKB(GeomFromText('MULTILINESTRING M((0 0 1, 1 0 2), (1 1 3, 0 1 4))'), 6, 6, 6))
C508DA0202000080897A80897A0080897A020080897A80897AFF887A0080897A
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb29.testcase.

1
2
3
4
5
6
7
AsTWKB - MultiPoint ZM
:memory: #use in-memory database
SELECT Hex(AsTWKB(GeomFromText('MULTIPOINT ZM(0 0 1 2, 1 0 3 4, 1 1 5 6, 0 1 7 8)'), 6, 6, 6));
1 # rows (not including the header row)
1 # columns
Hex(AsTWKB(GeomFromText('MULTIPOINT ZM(0 0 1 2, 1 0 3 4, 1 1 5 6, 0 1 7 8)'), 6, 6, 6))
C408DB04000080897A8092F40180897A008092F4018092F4010080897A8092F4018092F401FF887A008092F4018092F401
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb3.testcase.

1
2
3
4
5
6
7
AsTWKB - Double Geometry
:memory: #use in-memory database
SELECT AsTWKB(1.3);
1 # rows (not including the header row)
1 # columns
AsTWKB(1.3)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb30.testcase.

1
2
3
4
5
6
7
AsTWKB - GeometryCollection
:memory: #use in-memory database
SELECT Hex(AsTWKB(GeomFromText('GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(10 10, 20 20), POLYGON((100 100, 100 101, 101 101, 101 100, 100 100)))'), 6, 6, 6));
1 # rows (not including the header row)
1 # columns
Hex(AsTWKB(GeomFromText('GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(10 10, 20 20), POLYGON((100 100, 100 101, 101 101, 101 100, 100 100)))'), 6, 6, 6))
C70003C10080897A8092F401C2000280DAC40980DAC40980DAC40980DAC409C30001058084AF5F8084AF5F0080897A80897A0000FF887AFF887A00
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb4.testcase.

1
2
3
4
5
6
7
AsTWKB - Text Geometry
:memory: #use in-memory database
SELECT AsTWKB('geom');
1 # rows (not including the header row)
1 # columns
AsTWKB('geom')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb5.testcase.

1
2
3
4
5
6
7
AsTWKB - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT AsTWKB(zeroblob(10));
1 # rows (not including the header row)
1 # columns
AsTWKB(zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb6.testcase.

1
2
3
4
5
6
7
AsTWKB - NULL precision XY
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), NULL);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb7.testcase.

1
2
3
4
5
6
7
AsTWKB - Double precision XY
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 1.2);
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 1.2)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb8.testcase.

1
2
3
4
5
6
7
AsTWKB - Text precision XY
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), 'six');
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), 'six')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rtgeom_tests/totwkb9.testcase.

1
2
3
4
5
6
7
AsTWKB - BLOB precision XY
:memory: #use in-memory database
SELECT AsTWKB(MakePoint(1, 2), zeroblob(2));
1 # rows (not including the header row)
1 # columns
AsTWKB(MakePoint(1, 2), zeroblob(2))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337

EXTRA_DIST = addedgemodface1.testcase \
	addedgemodface2.testcase \
	addedgemodface3.testcase \
	addedgemodface4.testcase \
	addedgemodface5.testcase \
	addedgemodface6.testcase \
	addedgemodface7.testcase \
	addedgemodface8.testcase \
	addedgemodface9.testcase \
	addedgemodface10.testcase \
	addedgemodface11.testcase \
	addedgemodface12.testcase \
	addedgemodface13.testcase \
	addedgemodface14.testcase \
	addedgemodface15.testcase \
	addedgemodface16.testcase \
	addedgemodface17.testcase \
	addedgemodface18.testcase \
	addedgemodface19.testcase \
	addedgemodface20.testcase \
	addedgenewfaces1.testcase \
	addedgenewfaces2.testcase \
	addedgenewfaces3.testcase \
	addedgenewfaces4.testcase \
	addedgenewfaces5.testcase \
	addedgenewfaces6.testcase \
	addedgenewfaces7.testcase \
	addedgenewfaces8.testcase \
	addedgenewfaces9.testcase \
	addedgenewfaces10.testcase \
	addedgenewfaces11.testcase \
	addedgenewfaces12.testcase \
	addedgenewfaces13.testcase \
	addedgenewfaces14.testcase \
	addedgenewfaces15.testcase \
	addedgenewfaces16.testcase \
	addedgenewfaces17.testcase \
	addedgenewfaces18.testcase \
	addedgenewfaces19.testcase \
	addedgenewfaces20.testcase \
	addisoedge1.testcase \
	addisoedge2.testcase \
	addisoedge3.testcase \
	addisoedge4.testcase \
	addisoedge5.testcase \
	addisoedge6.testcase \
	addisoedge7.testcase \
	addisoedge8.testcase \
	addisoedge9.testcase \
	addisoedge10.testcase \
	addisoedge11.testcase \
	addisoedge12.testcase \
	addisoedge13.testcase \
	addisoedge14.testcase \
	addisoedge15.testcase \
	addisoedge16.testcase \
	addisoedge17.testcase \
	addisoedge18.testcase \
	addisoedge19.testcase \
	addisoedge20.testcase \
	addisonetnode1.testcase \
	addisonetnode2.testcase \
	addisonetnode3.testcase \
	addisonetnode4.testcase \
	addisonetnode5.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addlink1.testcase \
	addlink2.testcase \
	addlink3.testcase \
	addlink4.testcase \
	addlink5.testcase \
	addlink6.testcase \
	addlink7.testcase \
	addlink8.testcase \
	addlink9.testcase \
	addlink10.testcase \
	addlink11.testcase \
	addlink12.testcase \
	addlink13.testcase \
	changeedgegeom1.testcase \
	changeedgegeom2.testcase \
	changeedgegeom3.testcase \
	changeedgegeom4.testcase \
	changeedgegeom5.testcase \
	changeedgegeom6.testcase \
	changeedgegeom7.testcase \
	changeedgegeom8.testcase \
	changeedgegeom9.testcase \
	changeedgegeom10.testcase \
	changeedgegeom11.testcase \
	changeedgegeom12.testcase \
	changeedgegeom13.testcase \
	changeedgegeom14.testcase \
	changeedgegeom15.testcase \
	changeedgegeom16.testcase \
	changeedgegeom17.testcase \
	changelinkgeom1.testcase \
	changelinkgeom2.testcase \
	changelinkgeom3.testcase \
	changelinkgeom4.testcase \
	changelinkgeom5.testcase \
	changelinkgeom6.testcase \
	changelinkgeom7.testcase \
	changelinkgeom8.testcase \
	createtopotables.testcase \
	createtopogeo1.testcase \
	createtopogeo2.testcase \
	createtopogeo3.testcase \
	createtopogeo4.testcase \
	createtopogeo5.testcase \
	createtopogeo6.testcase \
	createtopogeo7.testcase \
	createtopogeo8.testcase \
	createtopogeo9.testcase \
	createtopogeo10.testcase \
	createtopolayer1.testcase \
	createtopolayer2.testcase \
	createtopolayer3.testcase \
	createtopolayer4.testcase \
	createtopolayer5.testcase \
	createtopolayer6.testcase \
	createtopolayer7.testcase \
	createtopolayer8.testcase \
	createtopolayer9.testcase \
	createtopolayer10.testcase \
	createtopolayer11.testcase \
	createtopolayer12.testcase \
	createtopolayer13.testcase \
	createtopolayer14.testcase \
	createtopolayer15.testcase \
	createtopolayer16.testcase \
	createtopolayer17.testcase \
	createtopolayer18.testcase \
	createtopolayer19.testcase \
	createtopolayer20.testcase \
	createtopolayer21.testcase \
	createtopolayer22.testcase \
	createtopolayer23.testcase \
	createtopolayer24.testcase \
	createtopolayer25.testcase \
	createtopolayer26.testcase \
	createtopology1.testcase \
	createtopology2.testcase \
	createtopology3.testcase \
	createtopology4.testcase \
	createtopology5.testcase \
	createtopology6.testcase \
	createtopology7.testcase \
	createtopology8.testcase \
	createtopology9.testcase \
	createtopology10.testcase \
	createtopology11.testcase \
	createtopology12.testcase \
	createtopology13.testcase \
	createtopology14.testcase \
	createtopology15.testcase \
	createtopology16.testcase \
	createtopology17.testcase \
	createtopology18.testcase \
	createtopology19.testcase \
	createtopology20.testcase \
	createtopology21.testcase \
	createtopology22.testcase \
	createvectorcoverages.testcase \
	createnetwork1.testcase \
	createnetwork2.testcase \
	createnetwork3.testcase \
	createnetwork4.testcase \
	createnetwork5.testcase \
	createnetwork6.testcase \
	createnetwork7.testcase \
	createnetwork8.testcase \
	createnetwork9.testcase \
	createnetwork10.testcase \
	createnetwork11.testcase \
	createnetwork12.testcase \
	createnetwork13.testcase \
	createnetwork14.testcase \
	createnetwork15.testcase \
	createnetwork16.testcase \
	createnetwork17.testcase \
	createnetwork18.testcase \
	createnetwork19.testcase \
	createnetwork20.testcase \
	createnetwork21.testcase \
	createnetwork22.testcase \
	createnetwork23.testcase \
	createnetwork24.testcase \
	createnetwork25.testcase \
	droptopology1.testcase \
	droptopology2.testcase \
	droptopology3.testcase \
	droptopology4.testcase \
	droptopology5.testcase \
	dropnetwork1.testcase \
	dropnetwork2.testcase \
	dropnetwork3.testcase \
	dropnetwork4.testcase \
	dropnetwork5.testcase \
	exporttopolayer1.testcase \
	exporttopolayer2.testcase \
	exporttopolayer3.testcase \
	exporttopolayer4.testcase \
	exporttopolayer5.testcase \
	exporttopolayer6.testcase \
	exporttopolayer7.testcase \
	exporttopolayer8.testcase \
	exporttopolayer9.testcase \
	exporttopolayer10.testcase \
	exporttopolayer11.testcase \
	exporttopolayer12.testcase \
	exporttopolayer13.testcase \
	exporttopolayer14.testcase \
	exporttopolayer15.testcase \
	exporttopolayer16.testcase \
	exporttopolayer17.testcase \
	exporttopolayer18.testcase \
	exporttopolayer19.testcase \
	exporttopolayer20.testcase \
	exporttopolayer21.testcase \
	exporttopolayer22.testcase \
	exporttopolayer23.testcase \
	featuretopolayer1.testcase \
	featuretopolayer2.testcase \
	featuretopolayer3.testcase \
	featuretopolayer4.testcase \
	featuretopolayer5.testcase \
	featuretopolayer6.testcase \
	featuretopolayer7.testcase \
	featuretopolayer8.testcase \
	featuretopolayer9.testcase \
	featuretopolayer10.testcase \
	featuretopolayer11.testcase \
	featuretopolayer12.testcase \
	featuretopolayer13.testcase \
	featuretopolayer14.testcase \
	featuretopolayer15.testcase \
	featuretopolayer16.testcase \
	featuretopolayer17.testcase \
	getedgeseed1.testcase \
	getedgeseed2.testcase \
	getedgeseed3.testcase \
	getedgeseed4.testcase \
	getedgeseed5.testcase \
	getedgeseed6.testcase \
	getedgeseed7.testcase \
	getedgeseed8.testcase \
	getedgeseed9.testcase \
	getlinkseed1.testcase \
	getlinkseed2.testcase \
	getlinkseed3.testcase \
	getlinkseed4.testcase \
	getlinkseed5.testcase \
	getlinkseed6.testcase \
	getlinkseed7.testcase \
	getlinkseed8.testcase \
	getlinkseed9.testcase \
	getfaceedges1.testcase \
	getfaceedges2.testcase \
	getfaceedges3.testcase \
	getfaceedges4.testcase \
	getfaceedges5.testcase \
	getfaceedges6.testcase \
	getfaceedges7.testcase \
	getfaceedges8.testcase \
	getfaceedges9.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getedgebypoint1.testcase \
	getedgebypoint2.testcase \
	getedgebypoint3.testcase \
	getedgebypoint4.testcase \
	getedgebypoint5.testcase \
	getedgebypoint6.testcase \
	getedgebypoint7.testcase \
	getedgebypoint8.testcase \
	getedgebypoint9.testcase \
	getedgebypoint10.testcase \
	getedgebypoint11.testcase \
	getedgebypoint12.testcase \
	getedgebypoint13.testcase \
	getedgebypoint14.testcase \
	getedgebypoint15.testcase \
	getedgebypoint16.testcase \
	getedgebypoint17.testcase \
	getedgebypoint18.testcase \
	getedgebypoint19.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getfacebypoint1.testcase \
	getfacebypoint2.testcase \
	getfacebypoint3.testcase \
	getfacebypoint4.testcase \
	getfacebypoint5.testcase \
	getfacebypoint6.testcase \
	getfacebypoint7.testcase \
	getfacebypoint8.testcase \
	getfacebypoint9.testcase \
	getfacebypoint10.testcase \
	getfacebypoint11.testcase \
	getfacebypoint12.testcase \
	getfacebypoint13.testcase \
	getfacebypoint14.testcase \
	getfacebypoint15.testcase \
	getfacebypoint16.testcase \
	getfacebypoint17.testcase \
	getfaceseed1.testcase \
	getfaceseed2.testcase \
	getfaceseed3.testcase \
	getfaceseed4.testcase \
	getfaceseed5.testcase \
	getfaceseed6.testcase \
	getfaceseed7.testcase \
	getfaceseed8.testcase \
	getfaceseed9.testcase \
	getlinkbypoint1.testcase \
	getlinkbypoint2.testcase \
	getlinkbypoint3.testcase \
	getlinkbypoint4.testcase \
	getlinkbypoint5.testcase \
	getlinkbypoint6.testcase \
	getlinkbypoint7.testcase \
	getlinkbypoint8.testcase \
	getlinkbypoint9.testcase \
	getlinkbypoint10.testcase \
	getlinkbypoint11.testcase \
	getlinkbypoint12.testcase \
	getlinkbypoint13.testcase \
	getlinkbypoint14.testcase \
	getlinkbypoint15.testcase \
	getlinkbypoint16.testcase \
	getlinkbypoint17.testcase \
	getlinkbypoint18.testcase \
	getlinkbypoint19.testcase \
	getlinkbypoint20.testcase \
	getnetnodebypoint1.testcase \
	getnetnodebypoint2.testcase \
	getnetnodebypoint3.testcase \
	getnetnodebypoint4.testcase \
	getnetnodebypoint5.testcase \
	getnetnodebypoint6.testcase \
	getnetnodebypoint7.testcase \
	getnetnodebypoint8.testcase \
	getnetnodebypoint9.testcase \
	getnetnodebypoint10.testcase \
	getnetnodebypoint11.testcase \
	getnetnodebypoint12.testcase \
	getnetnodebypoint13.testcase \
	getnetnodebypoint14.testcase \
	getnetnodebypoint15.testcase \
	getnetnodebypoint16.testcase \
	getnetnodebypoint17.testcase \
	getnetnodebypoint18.testcase \
	getnetnodebypoint19.testcase \
	getnetnodebypoint20.testcase \
	getnodebypoint1.testcase \
	getnodebypoint2.testcase \
	getnodebypoint3.testcase \
	getnodebypoint4.testcase \
	getnodebypoint5.testcase \
	getnodebypoint6.testcase \
	getnodebypoint7.testcase \
	getnodebypoint8.testcase \
	getnodebypoint9.testcase \
	getnodebypoint10.testcase \
	getnodebypoint11.testcase \
	getnodebypoint12.testcase \
	getnodebypoint13.testcase \
	getnodebypoint14.testcase \
	getnodebypoint15.testcase \
	getnodebypoint16.testcase \
	getnodebypoint17.testcase \
	getnodebypoint18.testcase \
	getnodebypoint19.testcase \
	inittopolayer1.testcase \
	inittopolayer2.testcase \
	inittopolayer3.testcase \
	inittopolayer4.testcase \
	inittopolayer5.testcase \
	inittopolayer6.testcase \
	inittopolayer7.testcase \
	inittopolayer8.testcase \
	inittopolayer9.testcase \
	inittopolayer10.testcase \
	inittopolayer11.testcase \
	inittopolayer12.testcase \
	inittopolayer13.testcase \
	inittopolayer14.testcase \
	inittopolayer15.testcase \
	inittopolayer16.testcase \
	inittopolayer17.testcase \
	lineedgeslist1.testcase \
	lineedgeslist2.testcase \
	lineedgeslist3.testcase \
	lineedgeslist4.testcase \
	lineedgeslist5.testcase \
	lineedgeslist6.testcase \
	lineedgeslist7.testcase \
	lineedgeslist8.testcase \
	lineedgeslist9.testcase \
	lineedgeslist10.testcase \
	lineedgeslist11.testcase \
	lineedgeslist12.testcase \
	lineedgeslist13.testcase \
	lineedgeslist14.testcase \
	lineedgeslist15.testcase \
	lineedgeslist16.testcase \
	lineedgeslist17.testcase \
	lineedgeslist18.testcase \
	lineedgeslist19.testcase \
	lineedgeslist20.testcase \
	lineedgeslist21.testcase \
	linelinkslist1.testcase \
	linelinkslist2.testcase \
	linelinkslist3.testcase \
	linelinkslist4.testcase \
	linelinkslist5.testcase \
	linelinkslist6.testcase \
	linelinkslist7.testcase \
	linelinkslist8.testcase \
	linelinkslist9.testcase \
	linelinkslist10.testcase \
	linelinkslist11.testcase \
	linelinkslist12.testcase \
	linelinkslist13.testcase \
	linelinkslist14.testcase \
	linelinkslist15.testcase \
	linelinkslist16.testcase \
	linelinkslist17.testcase \
	linelinkslist18.testcase \
	linelinkslist19.testcase \
	linelinkslist20.testcase \
	linelinkslist21.testcase \
	linesnapseed1.testcase \
	linesnapseed2.testcase \
	linesnapseed3.testcase \
	linesnapseed4.testcase \
	linesnapseed5.testcase \
	linesnapseed6.testcase \
	linesnapseed7.testcase \
	linesnapseed8.testcase \
	linesnapseed9.testcase \
	linesnapseed10.testcase \
	linesnapseed11.testcase \
	linesnapseed12.testcase \
	linesnapseed13.testcase \
	linesnapseed14.testcase \
	linesnapseed15.testcase \
	linesnapseed16.testcase \
	linesnapseed17.testcase \
	loginetfromtgeo1.testcase \
	loginetfromtgeo2.testcase \
	loginetfromtgeo3.testcase \
	loginetfromtgeo4.testcase \
	loginetfromtgeo5.testcase \
	loginetfromtgeo6.testcase \
	loginetfromtgeo7.testcase \
	loginetfromtgeo8.testcase \
	loginetfromtgeo9.testcase \
	modedgeheal1.testcase \
	modedgeheal2.testcase \
	modedgeheal3.testcase \
	modedgeheal4.testcase \
	modedgeheal5.testcase \
	modedgeheal6.testcase \
	modedgeheal7.testcase \
	modedgeheal8.testcase \
	modedgeheal9.testcase \
	modedgeheal10.testcase \
	modedgeheal11.testcase \
	modedgeheal12.testcase \
	modedgeheal13.testcase \
	modedgesplit1.testcase \
	modedgesplit2.testcase \
	modedgesplit3.testcase \
	modedgesplit4.testcase \
	modedgesplit5.testcase \
	modedgesplit6.testcase \
	modedgesplit7.testcase \
	modedgesplit8.testcase \
	modedgesplit9.testcase \
	modedgesplit10.testcase \
	modedgesplit11.testcase \
	modedgesplit12.testcase \
	modedgesplit13.testcase \
	modedgesplit14.testcase \
	modedgesplit15.testcase \
	modedgesplit16.testcase \
	modgeolinksplit1.testcase \
	modgeolinksplit2.testcase \
	modgeolinksplit3.testcase \
	modgeolinksplit4.testcase \
	modgeolinksplit5.testcase \
	modgeolinksplit6.testcase \
	modgeolinksplit7.testcase \
	modgeolinksplit8.testcase \
	modgeolinksplit9.testcase \
	modlinkheal1.testcase \
	modlinkheal2.testcase \
	modlinkheal3.testcase \
	modlinkheal4.testcase \
	modlinkheal5.testcase \
	modlinkheal6.testcase \
	modlinkheal7.testcase \
	modlinkheal8.testcase \
	modlinkheal9.testcase \
	modlinkheal10.testcase \
	modlinkheal11.testcase \
	modlinkheal12.testcase \
	modlinkheal13.testcase \
	modloglinksplit1.testcase \
	modloglinksplit2.testcase \
	modloglinksplit3.testcase \
	modloglinksplit4.testcase \
	modloglinksplit5.testcase \
	modloglinksplit6.testcase \
	modloglinksplit7.testcase \
	modloglinksplit8.testcase \
	modloglinksplit9.testcase \
	moveisonetnode1.testcase \
	moveisonetnode2.testcase \
	moveisonetnode3.testcase \
	moveisonetnode4.testcase \
	moveisonetnode5.testcase \
	moveisonetnode6.testcase \
	moveisonetnode7.testcase \
	moveisonetnode8.testcase \
	moveisonetnode9.testcase \
	moveisonode1.testcase \
	moveisonode2.testcase \
	moveisonode3.testcase \
	moveisonode4.testcase \
	moveisonode5.testcase \
	moveisonode6.testcase \
	moveisonode7.testcase \
	moveisonode8.testcase \
	moveisonode9.testcase \
	moveisonode10.testcase \
	moveisonode11.testcase \
	moveisonode12.testcase \
	moveisonode13.testcase \
	moveisonode14.testcase \
	moveisonode15.testcase \
	moveisonode16.testcase \
	moveisonode17.testcase \
	netexception1.testcase \
	netexception2.testcase \
	newedgeheal1.testcase \
	newedgeheal2.testcase \
	newedgeheal3.testcase \
	newedgeheal4.testcase \
	newedgeheal5.testcase \
	newedgeheal6.testcase \
	newedgeheal7.testcase \
	newedgeheal8.testcase \
	newedgeheal9.testcase \
	newedgeheal10.testcase \
	newedgeheal11.testcase \
	newedgeheal12.testcase \
	newedgeheal13.testcase \
	newedgessplit1.testcase \
	newedgessplit2.testcase \
	newedgessplit3.testcase \
	newedgessplit4.testcase \
	newedgessplit5.testcase \
	newedgessplit6.testcase \
	newedgessplit7.testcase \
	newedgessplit8.testcase \
	newedgessplit9.testcase \
	newedgessplit10.testcase \
	newedgessplit11.testcase \
	newedgessplit12.testcase \
	newedgessplit13.testcase \
	newedgessplit14.testcase \
	newedgessplit15.testcase \
	newedgessplit16.testcase \
	newgeolinksplit1.testcase \
	newgeolinksplit2.testcase \
	newgeolinksplit3.testcase \
	newgeolinksplit4.testcase \
	newgeolinksplit5.testcase \
	newgeolinksplit6.testcase \
	newgeolinksplit7.testcase \
	newgeolinksplit8.testcase \
	newgeolinksplit9.testcase \
	newlinkheal1.testcase \
	newlinkheal2.testcase \
	newlinkheal3.testcase \
	newlinkheal4.testcase \
	newlinkheal5.testcase \
	newlinkheal6.testcase \
	newlinkheal7.testcase \
	newlinkheal8.testcase \
	newlinkheal9.testcase \
	newlinkheal10.testcase \
	newlinkheal11.testcase \
	newlinkheal12.testcase \
	newlinkheal13.testcase \
	newloglinksplit1.testcase \
	newloglinksplit2.testcase \
	newloglinksplit3.testcase \
	newloglinksplit4.testcase \
	newloglinksplit5.testcase \
	newloglinksplit6.testcase \
	newloglinksplit7.testcase \
	newloglinksplit8.testcase \
	newloglinksplit9.testcase \
	pointsnapseed1.testcase \
	pointsnapseed2.testcase \
	pointsnapseed3.testcase \
	pointsnapseed4.testcase \
	pointsnapseed5.testcase \
	pointsnapseed6.testcase \
	pointsnapseed7.testcase \
	pointsnapseed8.testcase \
	pointsnapseed9.testcase \
	pointsnapseed10.testcase \
	pointsnapseed11.testcase \
	pointsnapseed12.testcase \
	pointsnapseed13.testcase \
	pointsnapseed14.testcase \
	pointsnapseed15.testcase \
	pointsnapseed16.testcase \
	pointsnapseed17.testcase \
	polygonize1.testcase \
	polygonize2.testcase \
	polygonize3.testcase \
	polygonize4.testcase \
	polygonize5.testcase \
	polygonize6.testcase \
	polygonize7.testcase \
	polygonize8.testcase \
	polygonize9.testcase \
	polygonize10.testcase \
	remedgemodface1.testcase \
	remedgemodface2.testcase \
	remedgemodface3.testcase \
	remedgemodface4.testcase \
	remedgemodface5.testcase \
	remedgemodface6.testcase \
	remedgemodface7.testcase \
	remedgemodface8.testcase \
	remedgemodface9.testcase \
	remedgenewface1.testcase \
	remedgenewface2.testcase \
	remedgenewface3.testcase \
	remedgenewface4.testcase \
	remedgenewface5.testcase \
	remedgenewface6.testcase \
	remedgenewface7.testcase \
	remedgenewface8.testcase \
	remedgenewface9.testcase \
	remisoedge1.testcase \
	remisoedge2.testcase \
	remisoedge3.testcase \
	remisoedge4.testcase \
	remisoedge5.testcase \
	remisoedge6.testcase \
	remisoedge7.testcase \
	remisoedge8.testcase \
	remisoedge9.testcase \
	remisonode1.testcase \
	remisonode2.testcase \
	remisonode3.testcase \
	remisonode4.testcase \
	remisonode5.testcase \
	remisonode6.testcase \
	remisonode7.testcase \
	remisonode8.testcase \
	remisonode9.testcase \
	remisonetnode1.testcase \
	remisonetnode2.testcase \
	remisonetnode3.testcase \
	remisonetnode4.testcase \
	remisonetnode5.testcase \
	remisonetnode6.testcase \
	remisonetnode7.testcase \
	remisonetnode8.testcase \
	remisonetnode9.testcase \
	remlink1.testcase \
	remlink2.testcase \
	remlink3.testcase \
	remlink4.testcase \
	remlink5.testcase \
	remlink6.testcase \
	remlink7.testcase \
	remlink8.testcase \
	remlink9.testcase \
	removetopolayer1.testcase \
	removetopolayer2.testcase \
	removetopolayer3.testcase \
	removetopolayer4.testcase \
	removetopolayer5.testcase \
	removetopolayer6.testcase \
	removetopolayer7.testcase \
	removetopolayer8.testcase \
	removetopolayer9.testcase \
	snappedgeotable1.testcase \
	snappedgeotable2.testcase \
	snappedgeotable3.testcase \
	snappedgeotable4.testcase \
	snappedgeotable5.testcase \
	snappedgeotable6.testcase \
	snappedgeotable7.testcase \
	snappedgeotable8.testcase \
	snappedgeotable9.testcase \
	snappedgeotable10.testcase \
	snappedgeotable11.testcase \
	snappedgeotable12.testcase \
	snappedgeotable13.testcase \
	snappedgeotable14.testcase \
	snappedgeotable15.testcase \
	snappedgeotable16.testcase \
	snappedgeotable17.testcase \
	snappedgeotable18.testcase \
	snappedgeotable19.testcase \
	snappedgeotable20.testcase \
	snappedgeotable21.testcase \
	snappedgeotable22.testcase \
	snappedgeotable23.testcase \
	snappedgeotable24.testcase \
	snappedgeotable25.testcase \
	snappedgeotable26.testcase \
	snappedgeotable27.testcase \
	snappedgeotable28.testcase \
	snappedgeotable29.testcase \
	snappedgeotable30.testcase \
	snappedgeotable31.testcase \
	snappedgeotable32.testcase \
	snappedgeotable33.testcase \
	snappedgeotable34.testcase \
	snappedgeotable35.testcase \
	snappedgeotable36.testcase \
	snappedgeotable37.testcase \
	snappedgeotable38.testcase \
	spatnetfromtgeo1.testcase \
	spatnetfromtgeo2.testcase \
	spatnetfromtgeo3.testcase \
	spatnetfromtgeo4.testcase \
	spatnetfromtgeo5.testcase \
	spatnetfromtgeo6.testcase \
	spatnetfromtgeo7.testcase \
	spatnetfromtgeo8.testcase \
	spatnetfromtgeo9.testcase \
	spatnetfromgeom1.testcase \
	spatnetfromgeom2.testcase \
	spatnetfromgeom3.testcase \
	spatnetfromgeom4.testcase \
	spatnetfromgeom5.testcase \
	spatnetfromgeom6.testcase \
	spatnetfromgeom7.testcase \
	spatnetfromgeom8.testcase \
	spatnetfromgeom9.testcase \
	spatnetfromgeom10.testcase \
	topoexception1.testcase \
	topoexception2.testcase \
	topogeoaddpoint1.testcase \
	topogeoaddpoint2.testcase \
	topogeoaddpoint3.testcase \
	topogeoaddpoint4.testcase \
	topogeoaddpoint5.testcase \
	topogeoaddpoint6.testcase \
	topogeoaddpoint7.testcase \
	topogeoaddpoint8.testcase \
	topogeoaddpoint9.testcase \
	topogeoaddpoint10.testcase \
	topogeoaddpoint11.testcase \
	topogeoaddpoint12.testcase \
	topogeoaddpoint13.testcase \
	topogeoaddpoint14.testcase \
	topogeoaddpoint15.testcase \
	topogeoaddpoint16.testcase \
	topogeoaddpoint17.testcase \
	topogeoaddline1.testcase \
	topogeoaddline2.testcase \
	topogeoaddline3.testcase \
	topogeoaddline4.testcase \
	topogeoaddline5.testcase \
	topogeoaddline6.testcase \
	topogeoaddline7.testcase \
	topogeoaddline8.testcase \
	topogeoaddline9.testcase \
	topogeoaddline10.testcase \
	topogeoaddline11.testcase \
	topogeoaddline12.testcase \
	topogeoaddline13.testcase \
	topogeoaddline14.testcase \
	topogeoaddline15.testcase \
	topogeoaddline16.testcase \
	topogeoaddline17.testcase \
	topogeoaddline18.testcase \
	topogeoaddline19.testcase \
	topogeoaddlinenf1.testcase \
	topogeoaddlinenf2.testcase \
	topogeoaddlinenf3.testcase \
	topogeoaddlinenf4.testcase \
	topogeoaddlinenf5.testcase \
	topogeoaddlinenf6.testcase \
	topogeoaddlinenf7.testcase \
	topogeoaddlinenf8.testcase \
	topogeoaddlinenf9.testcase \
	topogeoaddlinenf10.testcase \
	topogeoaddlinenf11.testcase \
	topogeoaddlinenf12.testcase \
	topogeoaddlinenf13.testcase \
	topogeoaddlinenf14.testcase \
	topogeoaddlinenf15.testcase \
	topogeoaddlinenf16.testcase \
	topogeoaddlinenf17.testcase \
	topogeoaddlinenf18.testcase \
	topogeoaddlinenf19.testcase \
	topogeoclone1.testcase \
	topogeoclone2.testcase \
	topogeoclone3.testcase \
	topogeoclone4.testcase \
	topogeoclone5.testcase \
	topogeoclone6.testcase \
	topogeoclone7.testcase \
	topogeoclone8.testcase \
	topogeoclone9.testcase \
	topogeoclone10.testcase \
	topogeoclone11.testcase \
	topogeoclone12.testcase \
	topogeodisambiguate1.testcase \
	topogeodisambiguate2.testcase \
	topogeodisambiguate3.testcase \
	topogeodisambiguate4.testcase \
	topogeodisambiguate5.testcase \
	topogeofromext1.testcase \
	topogeofromext2.testcase \
	topogeofromext3.testcase \
	topogeofromext4.testcase \
	topogeofromext5.testcase \
	topogeofromext6.testcase \
	topogeofromext7.testcase \
	topogeofromext8.testcase \
	topogeofromext9.testcase \
	topogeofromext10.testcase \
	topogeofromext11.testcase \
	topogeofromext12.testcase \
	topogeofromext13.testcase \
	topogeofromext14.testcase \
	topogeofromext15.testcase \
	topogeofromext16.testcase \
	topogeofromext17.testcase \
	topogeofromext18.testcase \
	topogeofromext19.testcase \
	topogeofromext20.testcase \
	topogeofromext21.testcase \
	topogeofromext22.testcase \
	topogeofromext23.testcase \
	topogeofromext24.testcase \
	topogeofromext25.testcase \
	topogeofromext26.testcase \
	topogeofromext27.testcase \
	topogeofromext28.testcase \
	topogeofromext29.testcase \
	topogeofromext30.testcase \
	topogeofromext31.testcase \
	topogeofromext32.testcase \
	topogeofromext33.testcase \
	topogeofromext34.testcase \
	topogeofromext35.testcase \
	topogeofromext36.testcase \
	topogeofromext37.testcase \
	topogeofromext38.testcase \
	topogeofromext39.testcase \
	topogeofromext40.testcase \
	topogeofromext41.testcase \
	topogeofromext42.testcase \
	topogeofromext43.testcase \
	topogeofromextnf1.testcase \
	topogeofromextnf2.testcase \
	topogeofromextnf3.testcase \
	topogeofromextnf4.testcase \
	topogeofromextnf5.testcase \
	topogeofromextnf6.testcase \
	topogeofromextnf7.testcase \
	topogeofromextnf8.testcase \
	topogeofromextnf9.testcase \
	topogeofromextnf10.testcase \
	topogeofromextnf11.testcase \
	topogeofromextnf12.testcase \
	topogeofromextnf13.testcase \
	topogeofromextnf14.testcase \
	topogeofromextnf15.testcase \
	topogeofromextnf16.testcase \
	topogeofromextnf17.testcase \
	topogeofromextnf18.testcase \
	topogeofromextnf19.testcase \
	topogeofromextnf20.testcase \
	topogeofromextnf21.testcase \
	topogeofromextnf22.testcase \
	topogeofromextnf23.testcase \
	topogeofromextnf24.testcase \
	topogeofromextnf25.testcase \
	topogeofromextnf26.testcase \
	topogeofromextnf27.testcase \
	topogeofromextnf28.testcase \
	topogeofromextnf29.testcase \
	topogeofromextnf30.testcase \
	topogeofromextnf31.testcase \
	topogeofromextnf32.testcase \
	topogeofromextnf33.testcase \
	topogeofromextnf34.testcase \
	topogeofromextnf35.testcase \
	topogeofromextnf36.testcase \
	topogeofromextnf37.testcase \
	topogeofromextnf38.testcase \
	topogeofromextnf39.testcase \
	topogeofromextnf40.testcase \
	topogeofromextnf41.testcase \
	topogeofromextnf42.testcase \
	topogeofromextnf43.testcase \
	topogeofromtable1.testcase \
	topogeofromtable2.testcase \
	topogeofromtable3.testcase \
	topogeofromtable4.testcase \
	topogeofromtable5.testcase \
	topogeofromtable6.testcase \
	topogeofromtable7.testcase \
	topogeofromtable8.testcase \
	topogeofromtable9.testcase \
	topogeofromtable10.testcase \
	topogeofromtable11.testcase \
	topogeofromtable12.testcase \
	topogeofromtable13.testcase \
	topogeofromtable14.testcase \
	topogeofromtable15.testcase \
	topogeofromtable16.testcase \
	topogeofromtable17.testcase \
	topogeofromtable18.testcase \
	topogeofromtable19.testcase \
	topogeofromtable20.testcase \
	topogeofromtable21.testcase \
	topogeofromtable22.testcase \
	topogeofromtable23.testcase \
	topogeofromtable24.testcase \
	topogeofromtable25.testcase \
	topogeofromtable26.testcase \
	topogeofromtable27.testcase \
	topogeofromtable28.testcase \
	topogeofromtable29.testcase \
	topogeofromtable30.testcase \
	topogeofromtable31.testcase \
	topogeofromtable32.testcase \
	topogeofromtable33.testcase \
	topogeofromtable34.testcase \
	topogeofromtablenf1.testcase \
	topogeofromtablenf2.testcase \
	topogeofromtablenf3.testcase \
	topogeofromtablenf4.testcase \
	topogeofromtablenf5.testcase \
	topogeofromtablenf6.testcase \
	topogeofromtablenf7.testcase \
	topogeofromtablenf8.testcase \
	topogeofromtablenf9.testcase \
	topogeofromtablenf10.testcase \
	topogeofromtablenf11.testcase \
	topogeofromtablenf12.testcase \
	topogeofromtablenf13.testcase \
	topogeofromtablenf14.testcase \
	topogeofromtablenf15.testcase \
	topogeofromtablenf16.testcase \
	topogeofromtablenf17.testcase \
	topogeofromtablenf18.testcase \
	topogeofromtablenf19.testcase \
	topogeofromtablenf20.testcase \
	topogeofromtablenf21.testcase \
	topogeofromtablenf22.testcase \
	topogeofromtablenf23.testcase \
	topogeofromtablenf24.testcase \
	topogeofromtablenf25.testcase \
	topogeofromtablenf26.testcase \
	topogeofromtablenf27.testcase \
	topogeofromtablenf28.testcase \
	topogeofromtablenf29.testcase \
	topogeofromtablenf30.testcase \
	topogeofromtablenf31.testcase \
	topogeofromtablenf32.testcase \
	topogeofromtablenf33.testcase \
	topogeofromtablenf34.testcase \
	topogeomodedgeheal1.testcase \
	topogeomodedgeheal2.testcase \
	topogeomodedgeheal3.testcase \
	topogeomodedgeheal4.testcase \
	topogeomodedgeheal5.testcase \
	topogeomodedgessplit1.testcase \
	topogeomodedgessplit2.testcase \
	topogeomodedgessplit3.testcase \
	topogeomodedgessplit4.testcase \
	topogeomodedgessplit5.testcase \
	topogeomodedgessplit6.testcase \
	topogeomodedgessplit7.testcase \
	topogeomodedgessplit8.testcase \
	topogeomodedgessplit9.testcase \
	topogeomodedgessplit10.testcase \
	topogeomodedgessplit11.testcase \
	topogeomodedgessplit12.testcase \
	topogeomodedgessplit13.testcase \
	topogeomodedgessplit14.testcase \
	topogeomodedgessplit15.testcase \
	topogeonewedgeheal1.testcase \
	topogeonewedgeheal2.testcase \
	topogeonewedgeheal3.testcase \
	topogeonewedgeheal4.testcase \
	topogeonewedgeheal5.testcase \
	topogeonewedgessplit1.testcase \
	topogeonewedgessplit2.testcase \
	topogeonewedgessplit3.testcase \
	topogeonewedgessplit4.testcase \
	topogeonewedgessplit5.testcase \
	topogeonewedgessplit6.testcase \
	topogeonewedgessplit7.testcase \
	topogeonewedgessplit8.testcase \
	topogeonewedgessplit9.testcase \
	topogeonewedgessplit10.testcase \
	topogeonewedgessplit11.testcase \
	topogeonewedgessplit12.testcase \
	topogeonewedgessplit13.testcase \
	topogeonewedgessplit14.testcase \
	topogeonewedgessplit15.testcase \
	polyfaceslist1.testcase \
	polyfaceslist2.testcase \
	polyfaceslist3.testcase \
	polyfaceslist4.testcase \
	polyfaceslist5.testcase \
	polyfaceslist6.testcase \
	polyfaceslist7.testcase \
	polyfaceslist8.testcase \
	polyfaceslist9.testcase \
	polyfaceslist10.testcase \
	polyfaceslist11.testcase \
	polyfaceslist12.testcase \
	polyfaceslist13.testcase \
	polyfaceslist14.testcase \
	polyfaceslist15.testcase \
	polyfaceslist16.testcase \
	polyfaceslist17.testcase \
	polyfaceslist18.testcase \
	polyfaceslist19.testcase \
	polyfaceslist20.testcase \
	polyfaceslist21.testcase \
	topogeosplitline1.testcase \
	topogeosplitline2.testcase \
	topogeosplitline3.testcase \
	topogeosplitline4.testcase \
	topogeosplitline5.testcase \
	topogeosplitline6.testcase \
	topogeosplitline7.testcase \
	topogeosplitline8.testcase \
	topogeosplitline9.testcase \
	topogeosplitline10.testcase \
	topogeosplitline11.testcase \
	topogeosplitline12.testcase \
	topogeosplitline13.testcase \
	topogeosplitline14.testcase \
	topogeosplitline15.testcase \
	topogeosplitline16.testcase \
	topogeosplitline17.testcase \
	topogeosplitline18.testcase \
	topogeosplitline19.testcase \
	topogeoremovesmall1.testcase \
	topogeoremovesmall2.testcase \
	topogeoremovesmall3.testcase \
	topogeoremovesmall4.testcase \
	topogeoremovesmall5.testcase \
	topogeoremovesmall6.testcase \
	topogeoremovesmall7.testcase \
	topogeoremovesmall8.testcase \
	topogeoremovesmall9.testcase \
	topogeoremovesmall10.testcase \
	topogeoremovesmall11.testcase \
	topogeoremovesmall12.testcase \
	topogeoremovesmall13.testcase \
	topogeoremovesmall14.testcase \
	topogeoremoveedges1.testcase \
	topogeoremoveedges2.testcase \
	topogeoremoveedges3.testcase \
	topogeoremoveedges4.testcase \
	topogeoremoveedges5.testcase \
	topogeoremovenodes1.testcase \
	topogeoremovenodes2.testcase \
	topogeoremovenodes3.testcase \
	topogeoremovenodes4.testcase \
	topogeoremovenodes5.testcase \
	topogeototable1.testcase \
	topogeototable2.testcase \
	topogeototable3.testcase \
	topogeototable4.testcase \
	topogeototable5.testcase \
	topogeototable6.testcase \
	topogeototable7.testcase \
	topogeototable8.testcase \
	topogeototable9.testcase \
	topogeototable10.testcase \
	topogeototable11.testcase \
	topogeototable12.testcase \
	topogeototable13.testcase \
	topogeototable14.testcase \
	topogeototable15.testcase \
	topogeototable16.testcase \
	topogeototable17.testcase \
	topogeototable18.testcase \
	topogeototable19.testcase \
	topogeototable20.testcase \
	topogeototable21.testcase \
	topogeototable22.testcase \
	topogeototable23.testcase \
	topogeototable24.testcase \
	topogeototable25.testcase \
	topogeototable26.testcase \
	topogeototablegen1.testcase \
	topogeototablegen2.testcase \
	topogeototablegen3.testcase \
	topogeototablegen4.testcase \
	topogeototablegen5.testcase \
	topogeototablegen6.testcase \
	topogeototablegen7.testcase \
	topogeototablegen8.testcase \
	topogeototablegen9.testcase \
	topogeototablegen10.testcase \
	topogeototablegen11.testcase \
	topogeototablegen12.testcase \
	topogeototablegen13.testcase \
	topogeototablegen14.testcase \
	topogeototablegen15.testcase \
	topogeototablegen16.testcase \
	topogeototablegen17.testcase \
	topogeototablegen18.testcase \
	topogeototablegen19.testcase \
	topogeototablegen20.testcase \
	topogeototablegen21.testcase \
	topogeototablegen22.testcase \
	topogeototablegen23.testcase \
	topogeototablegen24.testcase \
	topogeototablegen25.testcase \
	topogeototablegen26.testcase \
	topogeototablegen27.testcase \
	topogeototablegen28.testcase \
	topogeototablegen29.testcase \
	topogeototablegen30.testcase \
	topogeototablegen31.testcase \
	topogeoupdateseeds1.testcase \
	topogeoupdateseeds2.testcase \
	topogeoupdateseeds3.testcase \
	topogeoupdateseeds4.testcase \
	topogeoupdateseeds5.testcase \
	topogeoupdateseeds6.testcase \
	topogeoupdateseeds7.testcase \
	topogeoupdateseeds8.testcase \
	topogeoupdateseeds9.testcase \
	topogeoupdateseeds10.testcase \
	toponetclone1.testcase \
	toponetclone2.testcase \
	toponetclone3.testcase \
	toponetclone4.testcase \
	toponetclone5.testcase \
	toponetclone6.testcase \
	toponetclone7.testcase \
	toponetclone8.testcase \
	toponetclone9.testcase \
	toponetclone10.testcase \
	toponetclone11.testcase \
	toponetclone12.testcase \
	toponetdisambiguate1.testcase \
	toponetdisambiguate2.testcase \
	toponetdisambiguate3.testcase \
	toponetdisambiguate4.testcase \
	toponetdisambiguate5.testcase \
	toponetfromtable1.testcase \
	toponetfromtable2.testcase \
	toponetfromtable3.testcase \
	toponetfromtable4.testcase \
	toponetfromtable5.testcase \
	toponetfromtable6.testcase \
	toponetfromtable7.testcase \
	toponetfromtable8.testcase \
	toponetfromtable9.testcase \
	toponetfromtable10.testcase \
	toponetfromtable11.testcase \
	toponetfromtable12.testcase \
	toponetfromtable13.testcase \
	toponetfromtable14.testcase \
	toponetfromtable15.testcase \
	toponetfromtable16.testcase \
	toponetfromtable17.testcase \
	toponettotable1.testcase \
	toponettotable2.testcase \
	toponettotable3.testcase \
	toponettotable4.testcase \
	toponettotable5.testcase \
	toponettotable6.testcase \
	toponettotable7.testcase \
	toponettotable8.testcase \
	toponettotable9.testcase \
	toponettotable10.testcase \
	toponettotable11.testcase \
	toponettotable12.testcase \
	toponettotable13.testcase \
	toponettotable14.testcase \
	toponettotable15.testcase \
	toponettotable16.testcase \
	toponettotable17.testcase \
	toponettotable18.testcase \
	toponettotable19.testcase \
	toponettotable20.testcase \
	toponettotable21.testcase \
	toponettotable22.testcase \
	toponettotable23.testcase \
	toponettotable24.testcase \
	toponettotable25.testcase \
	toponettotable26.testcase \
	toponettotablegen1.testcase \
	toponettotablegen2.testcase \
	toponettotablegen3.testcase \
	toponettotablegen4.testcase \
	toponettotablegen5.testcase \
	toponettotablegen6.testcase \
	toponettotablegen7.testcase \
	toponettotablegen8.testcase \
	toponettotablegen9.testcase \
	toponettotablegen10.testcase \
	toponettotablegen11.testcase \
	toponettotablegen12.testcase \
	toponettotablegen13.testcase \
	toponettotablegen14.testcase \
	toponettotablegen15.testcase \
	toponettotablegen16.testcase \
	toponettotablegen17.testcase \
	toponettotablegen18.testcase \
	toponettotablegen19.testcase \
	toponettotablegen20.testcase \
	toponettotablegen21.testcase \
	toponettotablegen22.testcase \
	toponettotablegen23.testcase \
	toponettotablegen24.testcase \
	toponettotablegen25.testcase \
	toponettotablegen26.testcase \
	toponettotablegen27.testcase \
	toponettotablegen28.testcase \
	toponettotablegen29.testcase \
	toponettotablegen30.testcase \
	toponettotablegen31.testcase \
	toposnap1.testcase \
	toposnap2.testcase \
	toposnap3.testcase \
	toposnap4.testcase \
	toposnap5.testcase \
	toposnap6.testcase \
	toposnap7.testcase \
	toposnap8.testcase \
	toposnap9.testcase \
	toposnap10.testcase \
	toposnap11.testcase \
	toposnap12.testcase \
	toposnap13.testcase \
	toposnap14.testcase \
	toposnap15.testcase \
	toposnap16.testcase \
	toposnap17.testcase \
	toposnap18.testcase \
	toposnap19.testcase \
	toposnap20.testcase \
	toposnap21.testcase \
	toposnap22.testcase \
	toposnap23.testcase \
	toposnap24.testcase \
	toposnap25.testcase \
	toposnap26.testcase \
	toposnap27.testcase \
	toposnap28.testcase \
	toposnap29.testcase \
	validatetopogeo1.testcase \
	validatetopogeo2.testcase \
	validatetopogeo3.testcase \
	validatetopogeo4.testcase \
	validatetopogeo5.testcase \
	validlogicalnet1.testcase \
	validlogicalnet2.testcase \
	validlogicalnet3.testcase \
	validlogicalnet4.testcase \
	validlogicalnet5.testcase \
	validspatialnet1.testcase \
	validspatialnet2.testcase \
	validspatialnet3.testcase \
	validspatialnet4.testcase \
	validspatialnet5.testcase
	
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_rttopo_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_rttopo_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = addedgemodface1.testcase \
	addedgemodface2.testcase \
	addedgemodface3.testcase \
	addedgemodface4.testcase \
	addedgemodface5.testcase \
	addedgemodface6.testcase \
	addedgemodface7.testcase \
	addedgemodface8.testcase \
	addedgemodface9.testcase \
	addedgemodface10.testcase \
	addedgemodface11.testcase \
	addedgemodface12.testcase \
	addedgemodface13.testcase \
	addedgemodface14.testcase \
	addedgemodface15.testcase \
	addedgemodface16.testcase \
	addedgemodface17.testcase \
	addedgemodface18.testcase \
	addedgemodface19.testcase \
	addedgemodface20.testcase \
	addedgenewfaces1.testcase \
	addedgenewfaces2.testcase \
	addedgenewfaces3.testcase \
	addedgenewfaces4.testcase \
	addedgenewfaces5.testcase \
	addedgenewfaces6.testcase \
	addedgenewfaces7.testcase \
	addedgenewfaces8.testcase \
	addedgenewfaces9.testcase \
	addedgenewfaces10.testcase \
	addedgenewfaces11.testcase \
	addedgenewfaces12.testcase \
	addedgenewfaces13.testcase \
	addedgenewfaces14.testcase \
	addedgenewfaces15.testcase \
	addedgenewfaces16.testcase \
	addedgenewfaces17.testcase \
	addedgenewfaces18.testcase \
	addedgenewfaces19.testcase \
	addedgenewfaces20.testcase \
	addisoedge1.testcase \
	addisoedge2.testcase \
	addisoedge3.testcase \
	addisoedge4.testcase \
	addisoedge5.testcase \
	addisoedge6.testcase \
	addisoedge7.testcase \
	addisoedge8.testcase \
	addisoedge9.testcase \
	addisoedge10.testcase \
	addisoedge11.testcase \
	addisoedge12.testcase \
	addisoedge13.testcase \
	addisoedge14.testcase \
	addisoedge15.testcase \
	addisoedge16.testcase \
	addisoedge17.testcase \
	addisoedge18.testcase \
	addisoedge19.testcase \
	addisoedge20.testcase \
	addisonetnode1.testcase \
	addisonetnode2.testcase \
	addisonetnode3.testcase \
	addisonetnode4.testcase \
	addisonetnode5.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addisonode1.testcase \
	addisonode2.testcase \
	addisonode3.testcase \
	addisonode4.testcase \
	addisonode5.testcase \
	addisonode6.testcase \
	addisonode7.testcase \
	addisonode8.testcase \
	addisonode9.testcase \
	addisonode10.testcase \
	addisonode11.testcase \
	addisonode12.testcase \
	addisonode13.testcase \
	addisonode14.testcase \
	addisonode15.testcase \
	addisonode16.testcase \
	addisonode17.testcase \
	addlink1.testcase \
	addlink2.testcase \
	addlink3.testcase \
	addlink4.testcase \
	addlink5.testcase \
	addlink6.testcase \
	addlink7.testcase \
	addlink8.testcase \
	addlink9.testcase \
	addlink10.testcase \
	addlink11.testcase \
	addlink12.testcase \
	addlink13.testcase \
	changeedgegeom1.testcase \
	changeedgegeom2.testcase \
	changeedgegeom3.testcase \
	changeedgegeom4.testcase \
	changeedgegeom5.testcase \
	changeedgegeom6.testcase \
	changeedgegeom7.testcase \
	changeedgegeom8.testcase \
	changeedgegeom9.testcase \
	changeedgegeom10.testcase \
	changeedgegeom11.testcase \
	changeedgegeom12.testcase \
	changeedgegeom13.testcase \
	changeedgegeom14.testcase \
	changeedgegeom15.testcase \
	changeedgegeom16.testcase \
	changeedgegeom17.testcase \
	changelinkgeom1.testcase \
	changelinkgeom2.testcase \
	changelinkgeom3.testcase \
	changelinkgeom4.testcase \
	changelinkgeom5.testcase \
	changelinkgeom6.testcase \
	changelinkgeom7.testcase \
	changelinkgeom8.testcase \
	createtopotables.testcase \
	createtopogeo1.testcase \
	createtopogeo2.testcase \
	createtopogeo3.testcase \
	createtopogeo4.testcase \
	createtopogeo5.testcase \
	createtopogeo6.testcase \
	createtopogeo7.testcase \
	createtopogeo8.testcase \
	createtopogeo9.testcase \
	createtopogeo10.testcase \
	createtopolayer1.testcase \
	createtopolayer2.testcase \
	createtopolayer3.testcase \
	createtopolayer4.testcase \
	createtopolayer5.testcase \
	createtopolayer6.testcase \
	createtopolayer7.testcase \
	createtopolayer8.testcase \
	createtopolayer9.testcase \
	createtopolayer10.testcase \
	createtopolayer11.testcase \
	createtopolayer12.testcase \
	createtopolayer13.testcase \
	createtopolayer14.testcase \
	createtopolayer15.testcase \
	createtopolayer16.testcase \
	createtopolayer17.testcase \
	createtopolayer18.testcase \
	createtopolayer19.testcase \
	createtopolayer20.testcase \
	createtopolayer21.testcase \
	createtopolayer22.testcase \
	createtopolayer23.testcase \
	createtopolayer24.testcase \
	createtopolayer25.testcase \
	createtopolayer26.testcase \
	createtopology1.testcase \
	createtopology2.testcase \
	createtopology3.testcase \
	createtopology4.testcase \
	createtopology5.testcase \
	createtopology6.testcase \
	createtopology7.testcase \
	createtopology8.testcase \
	createtopology9.testcase \
	createtopology10.testcase \
	createtopology11.testcase \
	createtopology12.testcase \
	createtopology13.testcase \
	createtopology14.testcase \
	createtopology15.testcase \
	createtopology16.testcase \
	createtopology17.testcase \
	createtopology18.testcase \
	createtopology19.testcase \
	createtopology20.testcase \
	createtopology21.testcase \
	createtopology22.testcase \
	createvectorcoverages.testcase \
	createnetwork1.testcase \
	createnetwork2.testcase \
	createnetwork3.testcase \
	createnetwork4.testcase \
	createnetwork5.testcase \
	createnetwork6.testcase \
	createnetwork7.testcase \
	createnetwork8.testcase \
	createnetwork9.testcase \
	createnetwork10.testcase \
	createnetwork11.testcase \
	createnetwork12.testcase \
	createnetwork13.testcase \
	createnetwork14.testcase \
	createnetwork15.testcase \
	createnetwork16.testcase \
	createnetwork17.testcase \
	createnetwork18.testcase \
	createnetwork19.testcase \
	createnetwork20.testcase \
	createnetwork21.testcase \
	createnetwork22.testcase \
	createnetwork23.testcase \
	createnetwork24.testcase \
	createnetwork25.testcase \
	droptopology1.testcase \
	droptopology2.testcase \
	droptopology3.testcase \
	droptopology4.testcase \
	droptopology5.testcase \
	dropnetwork1.testcase \
	dropnetwork2.testcase \
	dropnetwork3.testcase \
	dropnetwork4.testcase \
	dropnetwork5.testcase \
	exporttopolayer1.testcase \
	exporttopolayer2.testcase \
	exporttopolayer3.testcase \
	exporttopolayer4.testcase \
	exporttopolayer5.testcase \
	exporttopolayer6.testcase \
	exporttopolayer7.testcase \
	exporttopolayer8.testcase \
	exporttopolayer9.testcase \
	exporttopolayer10.testcase \
	exporttopolayer11.testcase \
	exporttopolayer12.testcase \
	exporttopolayer13.testcase \
	exporttopolayer14.testcase \
	exporttopolayer15.testcase \
	exporttopolayer16.testcase \
	exporttopolayer17.testcase \
	exporttopolayer18.testcase \
	exporttopolayer19.testcase \
	exporttopolayer20.testcase \
	exporttopolayer21.testcase \
	exporttopolayer22.testcase \
	exporttopolayer23.testcase \
	featuretopolayer1.testcase \
	featuretopolayer2.testcase \
	featuretopolayer3.testcase \
	featuretopolayer4.testcase \
	featuretopolayer5.testcase \
	featuretopolayer6.testcase \
	featuretopolayer7.testcase \
	featuretopolayer8.testcase \
	featuretopolayer9.testcase \
	featuretopolayer10.testcase \
	featuretopolayer11.testcase \
	featuretopolayer12.testcase \
	featuretopolayer13.testcase \
	featuretopolayer14.testcase \
	featuretopolayer15.testcase \
	featuretopolayer16.testcase \
	featuretopolayer17.testcase \
	getedgeseed1.testcase \
	getedgeseed2.testcase \
	getedgeseed3.testcase \
	getedgeseed4.testcase \
	getedgeseed5.testcase \
	getedgeseed6.testcase \
	getedgeseed7.testcase \
	getedgeseed8.testcase \
	getedgeseed9.testcase \
	getlinkseed1.testcase \
	getlinkseed2.testcase \
	getlinkseed3.testcase \
	getlinkseed4.testcase \
	getlinkseed5.testcase \
	getlinkseed6.testcase \
	getlinkseed7.testcase \
	getlinkseed8.testcase \
	getlinkseed9.testcase \
	getfaceedges1.testcase \
	getfaceedges2.testcase \
	getfaceedges3.testcase \
	getfaceedges4.testcase \
	getfaceedges5.testcase \
	getfaceedges6.testcase \
	getfaceedges7.testcase \
	getfaceedges8.testcase \
	getfaceedges9.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getedgebypoint1.testcase \
	getedgebypoint2.testcase \
	getedgebypoint3.testcase \
	getedgebypoint4.testcase \
	getedgebypoint5.testcase \
	getedgebypoint6.testcase \
	getedgebypoint7.testcase \
	getedgebypoint8.testcase \
	getedgebypoint9.testcase \
	getedgebypoint10.testcase \
	getedgebypoint11.testcase \
	getedgebypoint12.testcase \
	getedgebypoint13.testcase \
	getedgebypoint14.testcase \
	getedgebypoint15.testcase \
	getedgebypoint16.testcase \
	getedgebypoint17.testcase \
	getedgebypoint18.testcase \
	getedgebypoint19.testcase \
	getfacegeometry1.testcase \
	getfacegeometry2.testcase \
	getfacegeometry3.testcase \
	getfacegeometry4.testcase \
	getfacegeometry5.testcase \
	getfacegeometry6.testcase \
	getfacegeometry7.testcase \
	getfacegeometry8.testcase \
	getfacegeometry9.testcase \
	getfacebypoint1.testcase \
	getfacebypoint2.testcase \
	getfacebypoint3.testcase \
	getfacebypoint4.testcase \
	getfacebypoint5.testcase \
	getfacebypoint6.testcase \
	getfacebypoint7.testcase \
	getfacebypoint8.testcase \
	getfacebypoint9.testcase \
	getfacebypoint10.testcase \
	getfacebypoint11.testcase \
	getfacebypoint12.testcase \
	getfacebypoint13.testcase \
	getfacebypoint14.testcase \
	getfacebypoint15.testcase \
	getfacebypoint16.testcase \
	getfacebypoint17.testcase \
	getfaceseed1.testcase \
	getfaceseed2.testcase \
	getfaceseed3.testcase \
	getfaceseed4.testcase \
	getfaceseed5.testcase \
	getfaceseed6.testcase \
	getfaceseed7.testcase \
	getfaceseed8.testcase \
	getfaceseed9.testcase \
	getlinkbypoint1.testcase \
	getlinkbypoint2.testcase \
	getlinkbypoint3.testcase \
	getlinkbypoint4.testcase \
	getlinkbypoint5.testcase \
	getlinkbypoint6.testcase \
	getlinkbypoint7.testcase \
	getlinkbypoint8.testcase \
	getlinkbypoint9.testcase \
	getlinkbypoint10.testcase \
	getlinkbypoint11.testcase \
	getlinkbypoint12.testcase \
	getlinkbypoint13.testcase \
	getlinkbypoint14.testcase \
	getlinkbypoint15.testcase \
	getlinkbypoint16.testcase \
	getlinkbypoint17.testcase \
	getlinkbypoint18.testcase \
	getlinkbypoint19.testcase \
	getlinkbypoint20.testcase \
	getnetnodebypoint1.testcase \
	getnetnodebypoint2.testcase \
	getnetnodebypoint3.testcase \
	getnetnodebypoint4.testcase \
	getnetnodebypoint5.testcase \
	getnetnodebypoint6.testcase \
	getnetnodebypoint7.testcase \
	getnetnodebypoint8.testcase \
	getnetnodebypoint9.testcase \
	getnetnodebypoint10.testcase \
	getnetnodebypoint11.testcase \
	getnetnodebypoint12.testcase \
	getnetnodebypoint13.testcase \
	getnetnodebypoint14.testcase \
	getnetnodebypoint15.testcase \
	getnetnodebypoint16.testcase \
	getnetnodebypoint17.testcase \
	getnetnodebypoint18.testcase \
	getnetnodebypoint19.testcase \
	getnetnodebypoint20.testcase \
	getnodebypoint1.testcase \
	getnodebypoint2.testcase \
	getnodebypoint3.testcase \
	getnodebypoint4.testcase \
	getnodebypoint5.testcase \
	getnodebypoint6.testcase \
	getnodebypoint7.testcase \
	getnodebypoint8.testcase \
	getnodebypoint9.testcase \
	getnodebypoint10.testcase \
	getnodebypoint11.testcase \
	getnodebypoint12.testcase \
	getnodebypoint13.testcase \
	getnodebypoint14.testcase \
	getnodebypoint15.testcase \
	getnodebypoint16.testcase \
	getnodebypoint17.testcase \
	getnodebypoint18.testcase \
	getnodebypoint19.testcase \
	inittopolayer1.testcase \
	inittopolayer2.testcase \
	inittopolayer3.testcase \
	inittopolayer4.testcase \
	inittopolayer5.testcase \
	inittopolayer6.testcase \
	inittopolayer7.testcase \
	inittopolayer8.testcase \
	inittopolayer9.testcase \
	inittopolayer10.testcase \
	inittopolayer11.testcase \
	inittopolayer12.testcase \
	inittopolayer13.testcase \
	inittopolayer14.testcase \
	inittopolayer15.testcase \
	inittopolayer16.testcase \
	inittopolayer17.testcase \
	lineedgeslist1.testcase \
	lineedgeslist2.testcase \
	lineedgeslist3.testcase \
	lineedgeslist4.testcase \
	lineedgeslist5.testcase \
	lineedgeslist6.testcase \
	lineedgeslist7.testcase \
	lineedgeslist8.testcase \
	lineedgeslist9.testcase \
	lineedgeslist10.testcase \
	lineedgeslist11.testcase \
	lineedgeslist12.testcase \
	lineedgeslist13.testcase \
	lineedgeslist14.testcase \
	lineedgeslist15.testcase \
	lineedgeslist16.testcase \
	lineedgeslist17.testcase \
	lineedgeslist18.testcase \
	lineedgeslist19.testcase \
	lineedgeslist20.testcase \
	lineedgeslist21.testcase \
	linelinkslist1.testcase \
	linelinkslist2.testcase \
	linelinkslist3.testcase \
	linelinkslist4.testcase \
	linelinkslist5.testcase \
	linelinkslist6.testcase \
	linelinkslist7.testcase \
	linelinkslist8.testcase \
	linelinkslist9.testcase \
	linelinkslist10.testcase \
	linelinkslist11.testcase \
	linelinkslist12.testcase \
	linelinkslist13.testcase \
	linelinkslist14.testcase \
	linelinkslist15.testcase \
	linelinkslist16.testcase \
	linelinkslist17.testcase \
	linelinkslist18.testcase \
	linelinkslist19.testcase \
	linelinkslist20.testcase \
	linelinkslist21.testcase \
	linesnapseed1.testcase \
	linesnapseed2.testcase \
	linesnapseed3.testcase \
	linesnapseed4.testcase \
	linesnapseed5.testcase \
	linesnapseed6.testcase \
	linesnapseed7.testcase \
	linesnapseed8.testcase \
	linesnapseed9.testcase \
	linesnapseed10.testcase \
	linesnapseed11.testcase \
	linesnapseed12.testcase \
	linesnapseed13.testcase \
	linesnapseed14.testcase \
	linesnapseed15.testcase \
	linesnapseed16.testcase \
	linesnapseed17.testcase \
	loginetfromtgeo1.testcase \
	loginetfromtgeo2.testcase \
	loginetfromtgeo3.testcase \
	loginetfromtgeo4.testcase \
	loginetfromtgeo5.testcase \
	loginetfromtgeo6.testcase \
	loginetfromtgeo7.testcase \
	loginetfromtgeo8.testcase \
	loginetfromtgeo9.testcase \
	modedgeheal1.testcase \
	modedgeheal2.testcase \
	modedgeheal3.testcase \
	modedgeheal4.testcase \
	modedgeheal5.testcase \
	modedgeheal6.testcase \
	modedgeheal7.testcase \
	modedgeheal8.testcase \
	modedgeheal9.testcase \
	modedgeheal10.testcase \
	modedgeheal11.testcase \
	modedgeheal12.testcase \
	modedgeheal13.testcase \
	modedgesplit1.testcase \
	modedgesplit2.testcase \
	modedgesplit3.testcase \
	modedgesplit4.testcase \
	modedgesplit5.testcase \
	modedgesplit6.testcase \
	modedgesplit7.testcase \
	modedgesplit8.testcase \
	modedgesplit9.testcase \
	modedgesplit10.testcase \
	modedgesplit11.testcase \
	modedgesplit12.testcase \
	modedgesplit13.testcase \
	modedgesplit14.testcase \
	modedgesplit15.testcase \
	modedgesplit16.testcase \
	modgeolinksplit1.testcase \
	modgeolinksplit2.testcase \
	modgeolinksplit3.testcase \
	modgeolinksplit4.testcase \
	modgeolinksplit5.testcase \
	modgeolinksplit6.testcase \
	modgeolinksplit7.testcase \
	modgeolinksplit8.testcase \
	modgeolinksplit9.testcase \
	modlinkheal1.testcase \
	modlinkheal2.testcase \
	modlinkheal3.testcase \
	modlinkheal4.testcase \
	modlinkheal5.testcase \
	modlinkheal6.testcase \
	modlinkheal7.testcase \
	modlinkheal8.testcase \
	modlinkheal9.testcase \
	modlinkheal10.testcase \
	modlinkheal11.testcase \
	modlinkheal12.testcase \
	modlinkheal13.testcase \
	modloglinksplit1.testcase \
	modloglinksplit2.testcase \
	modloglinksplit3.testcase \
	modloglinksplit4.testcase \
	modloglinksplit5.testcase \
	modloglinksplit6.testcase \
	modloglinksplit7.testcase \
	modloglinksplit8.testcase \
	modloglinksplit9.testcase \
	moveisonetnode1.testcase \
	moveisonetnode2.testcase \
	moveisonetnode3.testcase \
	moveisonetnode4.testcase \
	moveisonetnode5.testcase \
	moveisonetnode6.testcase \
	moveisonetnode7.testcase \
	moveisonetnode8.testcase \
	moveisonetnode9.testcase \
	moveisonode1.testcase \
	moveisonode2.testcase \
	moveisonode3.testcase \
	moveisonode4.testcase \
	moveisonode5.testcase \
	moveisonode6.testcase \
	moveisonode7.testcase \
	moveisonode8.testcase \
	moveisonode9.testcase \
	moveisonode10.testcase \
	moveisonode11.testcase \
	moveisonode12.testcase \
	moveisonode13.testcase \
	moveisonode14.testcase \
	moveisonode15.testcase \
	moveisonode16.testcase \
	moveisonode17.testcase \
	netexception1.testcase \
	netexception2.testcase \
	newedgeheal1.testcase \
	newedgeheal2.testcase \
	newedgeheal3.testcase \
	newedgeheal4.testcase \
	newedgeheal5.testcase \
	newedgeheal6.testcase \
	newedgeheal7.testcase \
	newedgeheal8.testcase \
	newedgeheal9.testcase \
	newedgeheal10.testcase \
	newedgeheal11.testcase \
	newedgeheal12.testcase \
	newedgeheal13.testcase \
	newedgessplit1.testcase \
	newedgessplit2.testcase \
	newedgessplit3.testcase \
	newedgessplit4.testcase \
	newedgessplit5.testcase \
	newedgessplit6.testcase \
	newedgessplit7.testcase \
	newedgessplit8.testcase \
	newedgessplit9.testcase \
	newedgessplit10.testcase \
	newedgessplit11.testcase \
	newedgessplit12.testcase \
	newedgessplit13.testcase \
	newedgessplit14.testcase \
	newedgessplit15.testcase \
	newedgessplit16.testcase \
	newgeolinksplit1.testcase \
	newgeolinksplit2.testcase \
	newgeolinksplit3.testcase \
	newgeolinksplit4.testcase \
	newgeolinksplit5.testcase \
	newgeolinksplit6.testcase \
	newgeolinksplit7.testcase \
	newgeolinksplit8.testcase \
	newgeolinksplit9.testcase \
	newlinkheal1.testcase \
	newlinkheal2.testcase \
	newlinkheal3.testcase \
	newlinkheal4.testcase \
	newlinkheal5.testcase \
	newlinkheal6.testcase \
	newlinkheal7.testcase \
	newlinkheal8.testcase \
	newlinkheal9.testcase \
	newlinkheal10.testcase \
	newlinkheal11.testcase \
	newlinkheal12.testcase \
	newlinkheal13.testcase \
	newloglinksplit1.testcase \
	newloglinksplit2.testcase \
	newloglinksplit3.testcase \
	newloglinksplit4.testcase \
	newloglinksplit5.testcase \
	newloglinksplit6.testcase \
	newloglinksplit7.testcase \
	newloglinksplit8.testcase \
	newloglinksplit9.testcase \
	pointsnapseed1.testcase \
	pointsnapseed2.testcase \
	pointsnapseed3.testcase \
	pointsnapseed4.testcase \
	pointsnapseed5.testcase \
	pointsnapseed6.testcase \
	pointsnapseed7.testcase \
	pointsnapseed8.testcase \
	pointsnapseed9.testcase \
	pointsnapseed10.testcase \
	pointsnapseed11.testcase \
	pointsnapseed12.testcase \
	pointsnapseed13.testcase \
	pointsnapseed14.testcase \
	pointsnapseed15.testcase \
	pointsnapseed16.testcase \
	pointsnapseed17.testcase \
	polygonize1.testcase \
	polygonize2.testcase \
	polygonize3.testcase \
	polygonize4.testcase \
	polygonize5.testcase \
	polygonize6.testcase \
	polygonize7.testcase \
	polygonize8.testcase \
	polygonize9.testcase \
	polygonize10.testcase \
	remedgemodface1.testcase \
	remedgemodface2.testcase \
	remedgemodface3.testcase \
	remedgemodface4.testcase \
	remedgemodface5.testcase \
	remedgemodface6.testcase \
	remedgemodface7.testcase \
	remedgemodface8.testcase \
	remedgemodface9.testcase \
	remedgenewface1.testcase \
	remedgenewface2.testcase \
	remedgenewface3.testcase \
	remedgenewface4.testcase \
	remedgenewface5.testcase \
	remedgenewface6.testcase \
	remedgenewface7.testcase \
	remedgenewface8.testcase \
	remedgenewface9.testcase \
	remisoedge1.testcase \
	remisoedge2.testcase \
	remisoedge3.testcase \
	remisoedge4.testcase \
	remisoedge5.testcase \
	remisoedge6.testcase \
	remisoedge7.testcase \
	remisoedge8.testcase \
	remisoedge9.testcase \
	remisonode1.testcase \
	remisonode2.testcase \
	remisonode3.testcase \
	remisonode4.testcase \
	remisonode5.testcase \
	remisonode6.testcase \
	remisonode7.testcase \
	remisonode8.testcase \
	remisonode9.testcase \
	remisonetnode1.testcase \
	remisonetnode2.testcase \
	remisonetnode3.testcase \
	remisonetnode4.testcase \
	remisonetnode5.testcase \
	remisonetnode6.testcase \
	remisonetnode7.testcase \
	remisonetnode8.testcase \
	remisonetnode9.testcase \
	remlink1.testcase \
	remlink2.testcase \
	remlink3.testcase \
	remlink4.testcase \
	remlink5.testcase \
	remlink6.testcase \
	remlink7.testcase \
	remlink8.testcase \
	remlink9.testcase \
	removetopolayer1.testcase \
	removetopolayer2.testcase \
	removetopolayer3.testcase \
	removetopolayer4.testcase \
	removetopolayer5.testcase \
	removetopolayer6.testcase \
	removetopolayer7.testcase \
	removetopolayer8.testcase \
	removetopolayer9.testcase \
	snappedgeotable1.testcase \
	snappedgeotable2.testcase \
	snappedgeotable3.testcase \
	snappedgeotable4.testcase \
	snappedgeotable5.testcase \
	snappedgeotable6.testcase \
	snappedgeotable7.testcase \
	snappedgeotable8.testcase \
	snappedgeotable9.testcase \
	snappedgeotable10.testcase \
	snappedgeotable11.testcase \
	snappedgeotable12.testcase \
	snappedgeotable13.testcase \
	snappedgeotable14.testcase \
	snappedgeotable15.testcase \
	snappedgeotable16.testcase \
	snappedgeotable17.testcase \
	snappedgeotable18.testcase \
	snappedgeotable19.testcase \
	snappedgeotable20.testcase \
	snappedgeotable21.testcase \
	snappedgeotable22.testcase \
	snappedgeotable23.testcase \
	snappedgeotable24.testcase \
	snappedgeotable25.testcase \
	snappedgeotable26.testcase \
	snappedgeotable27.testcase \
	snappedgeotable28.testcase \
	snappedgeotable29.testcase \
	snappedgeotable30.testcase \
	snappedgeotable31.testcase \
	snappedgeotable32.testcase \
	snappedgeotable33.testcase \
	snappedgeotable34.testcase \
	snappedgeotable35.testcase \
	snappedgeotable36.testcase \
	snappedgeotable37.testcase \
	snappedgeotable38.testcase \
	spatnetfromtgeo1.testcase \
	spatnetfromtgeo2.testcase \
	spatnetfromtgeo3.testcase \
	spatnetfromtgeo4.testcase \
	spatnetfromtgeo5.testcase \
	spatnetfromtgeo6.testcase \
	spatnetfromtgeo7.testcase \
	spatnetfromtgeo8.testcase \
	spatnetfromtgeo9.testcase \
	spatnetfromgeom1.testcase \
	spatnetfromgeom2.testcase \
	spatnetfromgeom3.testcase \
	spatnetfromgeom4.testcase \
	spatnetfromgeom5.testcase \
	spatnetfromgeom6.testcase \
	spatnetfromgeom7.testcase \
	spatnetfromgeom8.testcase \
	spatnetfromgeom9.testcase \
	spatnetfromgeom10.testcase \
	topoexception1.testcase \
	topoexception2.testcase \
	topogeoaddpoint1.testcase \
	topogeoaddpoint2.testcase \
	topogeoaddpoint3.testcase \
	topogeoaddpoint4.testcase \
	topogeoaddpoint5.testcase \
	topogeoaddpoint6.testcase \
	topogeoaddpoint7.testcase \
	topogeoaddpoint8.testcase \
	topogeoaddpoint9.testcase \
	topogeoaddpoint10.testcase \
	topogeoaddpoint11.testcase \
	topogeoaddpoint12.testcase \
	topogeoaddpoint13.testcase \
	topogeoaddpoint14.testcase \
	topogeoaddpoint15.testcase \
	topogeoaddpoint16.testcase \
	topogeoaddpoint17.testcase \
	topogeoaddline1.testcase \
	topogeoaddline2.testcase \
	topogeoaddline3.testcase \
	topogeoaddline4.testcase \
	topogeoaddline5.testcase \
	topogeoaddline6.testcase \
	topogeoaddline7.testcase \
	topogeoaddline8.testcase \
	topogeoaddline9.testcase \
	topogeoaddline10.testcase \
	topogeoaddline11.testcase \
	topogeoaddline12.testcase \
	topogeoaddline13.testcase \
	topogeoaddline14.testcase \
	topogeoaddline15.testcase \
	topogeoaddline16.testcase \
	topogeoaddline17.testcase \
	topogeoaddline18.testcase \
	topogeoaddline19.testcase \
	topogeoaddlinenf1.testcase \
	topogeoaddlinenf2.testcase \
	topogeoaddlinenf3.testcase \
	topogeoaddlinenf4.testcase \
	topogeoaddlinenf5.testcase \
	topogeoaddlinenf6.testcase \
	topogeoaddlinenf7.testcase \
	topogeoaddlinenf8.testcase \
	topogeoaddlinenf9.testcase \
	topogeoaddlinenf10.testcase \
	topogeoaddlinenf11.testcase \
	topogeoaddlinenf12.testcase \
	topogeoaddlinenf13.testcase \
	topogeoaddlinenf14.testcase \
	topogeoaddlinenf15.testcase \
	topogeoaddlinenf16.testcase \
	topogeoaddlinenf17.testcase \
	topogeoaddlinenf18.testcase \
	topogeoaddlinenf19.testcase \
	topogeoclone1.testcase \
	topogeoclone2.testcase \
	topogeoclone3.testcase \
	topogeoclone4.testcase \
	topogeoclone5.testcase \
	topogeoclone6.testcase \
	topogeoclone7.testcase \
	topogeoclone8.testcase \
	topogeoclone9.testcase \
	topogeoclone10.testcase \
	topogeoclone11.testcase \
	topogeoclone12.testcase \
	topogeodisambiguate1.testcase \
	topogeodisambiguate2.testcase \
	topogeodisambiguate3.testcase \
	topogeodisambiguate4.testcase \
	topogeodisambiguate5.testcase \
	topogeofromext1.testcase \
	topogeofromext2.testcase \
	topogeofromext3.testcase \
	topogeofromext4.testcase \
	topogeofromext5.testcase \
	topogeofromext6.testcase \
	topogeofromext7.testcase \
	topogeofromext8.testcase \
	topogeofromext9.testcase \
	topogeofromext10.testcase \
	topogeofromext11.testcase \
	topogeofromext12.testcase \
	topogeofromext13.testcase \
	topogeofromext14.testcase \
	topogeofromext15.testcase \
	topogeofromext16.testcase \
	topogeofromext17.testcase \
	topogeofromext18.testcase \
	topogeofromext19.testcase \
	topogeofromext20.testcase \
	topogeofromext21.testcase \
	topogeofromext22.testcase \
	topogeofromext23.testcase \
	topogeofromext24.testcase \
	topogeofromext25.testcase \
	topogeofromext26.testcase \
	topogeofromext27.testcase \
	topogeofromext28.testcase \
	topogeofromext29.testcase \
	topogeofromext30.testcase \
	topogeofromext31.testcase \
	topogeofromext32.testcase \
	topogeofromext33.testcase \
	topogeofromext34.testcase \
	topogeofromext35.testcase \
	topogeofromext36.testcase \
	topogeofromext37.testcase \
	topogeofromext38.testcase \
	topogeofromext39.testcase \
	topogeofromext40.testcase \
	topogeofromext41.testcase \
	topogeofromext42.testcase \
	topogeofromext43.testcase \
	topogeofromextnf1.testcase \
	topogeofromextnf2.testcase \
	topogeofromextnf3.testcase \
	topogeofromextnf4.testcase \
	topogeofromextnf5.testcase \
	topogeofromextnf6.testcase \
	topogeofromextnf7.testcase \
	topogeofromextnf8.testcase \
	topogeofromextnf9.testcase \
	topogeofromextnf10.testcase \
	topogeofromextnf11.testcase \
	topogeofromextnf12.testcase \
	topogeofromextnf13.testcase \
	topogeofromextnf14.testcase \
	topogeofromextnf15.testcase \
	topogeofromextnf16.testcase \
	topogeofromextnf17.testcase \
	topogeofromextnf18.testcase \
	topogeofromextnf19.testcase \
	topogeofromextnf20.testcase \
	topogeofromextnf21.testcase \
	topogeofromextnf22.testcase \
	topogeofromextnf23.testcase \
	topogeofromextnf24.testcase \
	topogeofromextnf25.testcase \
	topogeofromextnf26.testcase \
	topogeofromextnf27.testcase \
	topogeofromextnf28.testcase \
	topogeofromextnf29.testcase \
	topogeofromextnf30.testcase \
	topogeofromextnf31.testcase \
	topogeofromextnf32.testcase \
	topogeofromextnf33.testcase \
	topogeofromextnf34.testcase \
	topogeofromextnf35.testcase \
	topogeofromextnf36.testcase \
	topogeofromextnf37.testcase \
	topogeofromextnf38.testcase \
	topogeofromextnf39.testcase \
	topogeofromextnf40.testcase \
	topogeofromextnf41.testcase \
	topogeofromextnf42.testcase \
	topogeofromextnf43.testcase \
	topogeofromtable1.testcase \
	topogeofromtable2.testcase \
	topogeofromtable3.testcase \
	topogeofromtable4.testcase \
	topogeofromtable5.testcase \
	topogeofromtable6.testcase \
	topogeofromtable7.testcase \
	topogeofromtable8.testcase \
	topogeofromtable9.testcase \
	topogeofromtable10.testcase \
	topogeofromtable11.testcase \
	topogeofromtable12.testcase \
	topogeofromtable13.testcase \
	topogeofromtable14.testcase \
	topogeofromtable15.testcase \
	topogeofromtable16.testcase \
	topogeofromtable17.testcase \
	topogeofromtable18.testcase \
	topogeofromtable19.testcase \
	topogeofromtable20.testcase \
	topogeofromtable21.testcase \
	topogeofromtable22.testcase \
	topogeofromtable23.testcase \
	topogeofromtable24.testcase \
	topogeofromtable25.testcase \
	topogeofromtable26.testcase \
	topogeofromtable27.testcase \
	topogeofromtable28.testcase \
	topogeofromtable29.testcase \
	topogeofromtable30.testcase \
	topogeofromtable31.testcase \
	topogeofromtable32.testcase \
	topogeofromtable33.testcase \
	topogeofromtable34.testcase \
	topogeofromtablenf1.testcase \
	topogeofromtablenf2.testcase \
	topogeofromtablenf3.testcase \
	topogeofromtablenf4.testcase \
	topogeofromtablenf5.testcase \
	topogeofromtablenf6.testcase \
	topogeofromtablenf7.testcase \
	topogeofromtablenf8.testcase \
	topogeofromtablenf9.testcase \
	topogeofromtablenf10.testcase \
	topogeofromtablenf11.testcase \
	topogeofromtablenf12.testcase \
	topogeofromtablenf13.testcase \
	topogeofromtablenf14.testcase \
	topogeofromtablenf15.testcase \
	topogeofromtablenf16.testcase \
	topogeofromtablenf17.testcase \
	topogeofromtablenf18.testcase \
	topogeofromtablenf19.testcase \
	topogeofromtablenf20.testcase \
	topogeofromtablenf21.testcase \
	topogeofromtablenf22.testcase \
	topogeofromtablenf23.testcase \
	topogeofromtablenf24.testcase \
	topogeofromtablenf25.testcase \
	topogeofromtablenf26.testcase \
	topogeofromtablenf27.testcase \
	topogeofromtablenf28.testcase \
	topogeofromtablenf29.testcase \
	topogeofromtablenf30.testcase \
	topogeofromtablenf31.testcase \
	topogeofromtablenf32.testcase \
	topogeofromtablenf33.testcase \
	topogeofromtablenf34.testcase \
	topogeomodedgeheal1.testcase \
	topogeomodedgeheal2.testcase \
	topogeomodedgeheal3.testcase \
	topogeomodedgeheal4.testcase \
	topogeomodedgeheal5.testcase \
	topogeomodedgessplit1.testcase \
	topogeomodedgessplit2.testcase \
	topogeomodedgessplit3.testcase \
	topogeomodedgessplit4.testcase \
	topogeomodedgessplit5.testcase \
	topogeomodedgessplit6.testcase \
	topogeomodedgessplit7.testcase \
	topogeomodedgessplit8.testcase \
	topogeomodedgessplit9.testcase \
	topogeomodedgessplit10.testcase \
	topogeomodedgessplit11.testcase \
	topogeomodedgessplit12.testcase \
	topogeomodedgessplit13.testcase \
	topogeomodedgessplit14.testcase \
	topogeomodedgessplit15.testcase \
	topogeonewedgeheal1.testcase \
	topogeonewedgeheal2.testcase \
	topogeonewedgeheal3.testcase \
	topogeonewedgeheal4.testcase \
	topogeonewedgeheal5.testcase \
	topogeonewedgessplit1.testcase \
	topogeonewedgessplit2.testcase \
	topogeonewedgessplit3.testcase \
	topogeonewedgessplit4.testcase \
	topogeonewedgessplit5.testcase \
	topogeonewedgessplit6.testcase \
	topogeonewedgessplit7.testcase \
	topogeonewedgessplit8.testcase \
	topogeonewedgessplit9.testcase \
	topogeonewedgessplit10.testcase \
	topogeonewedgessplit11.testcase \
	topogeonewedgessplit12.testcase \
	topogeonewedgessplit13.testcase \
	topogeonewedgessplit14.testcase \
	topogeonewedgessplit15.testcase \
	polyfaceslist1.testcase \
	polyfaceslist2.testcase \
	polyfaceslist3.testcase \
	polyfaceslist4.testcase \
	polyfaceslist5.testcase \
	polyfaceslist6.testcase \
	polyfaceslist7.testcase \
	polyfaceslist8.testcase \
	polyfaceslist9.testcase \
	polyfaceslist10.testcase \
	polyfaceslist11.testcase \
	polyfaceslist12.testcase \
	polyfaceslist13.testcase \
	polyfaceslist14.testcase \
	polyfaceslist15.testcase \
	polyfaceslist16.testcase \
	polyfaceslist17.testcase \
	polyfaceslist18.testcase \
	polyfaceslist19.testcase \
	polyfaceslist20.testcase \
	polyfaceslist21.testcase \
	topogeosplitline1.testcase \
	topogeosplitline2.testcase \
	topogeosplitline3.testcase \
	topogeosplitline4.testcase \
	topogeosplitline5.testcase \
	topogeosplitline6.testcase \
	topogeosplitline7.testcase \
	topogeosplitline8.testcase \
	topogeosplitline9.testcase \
	topogeosplitline10.testcase \
	topogeosplitline11.testcase \
	topogeosplitline12.testcase \
	topogeosplitline13.testcase \
	topogeosplitline14.testcase \
	topogeosplitline15.testcase \
	topogeosplitline16.testcase \
	topogeosplitline17.testcase \
	topogeosplitline18.testcase \
	topogeosplitline19.testcase \
	topogeoremovesmall1.testcase \
	topogeoremovesmall2.testcase \
	topogeoremovesmall3.testcase \
	topogeoremovesmall4.testcase \
	topogeoremovesmall5.testcase \
	topogeoremovesmall6.testcase \
	topogeoremovesmall7.testcase \
	topogeoremovesmall8.testcase \
	topogeoremovesmall9.testcase \
	topogeoremovesmall10.testcase \
	topogeoremovesmall11.testcase \
	topogeoremovesmall12.testcase \
	topogeoremovesmall13.testcase \
	topogeoremovesmall14.testcase \
	topogeoremoveedges1.testcase \
	topogeoremoveedges2.testcase \
	topogeoremoveedges3.testcase \
	topogeoremoveedges4.testcase \
	topogeoremoveedges5.testcase \
	topogeoremovenodes1.testcase \
	topogeoremovenodes2.testcase \
	topogeoremovenodes3.testcase \
	topogeoremovenodes4.testcase \
	topogeoremovenodes5.testcase \
	topogeototable1.testcase \
	topogeototable2.testcase \
	topogeototable3.testcase \
	topogeototable4.testcase \
	topogeototable5.testcase \
	topogeototable6.testcase \
	topogeototable7.testcase \
	topogeototable8.testcase \
	topogeototable9.testcase \
	topogeototable10.testcase \
	topogeototable11.testcase \
	topogeototable12.testcase \
	topogeototable13.testcase \
	topogeototable14.testcase \
	topogeototable15.testcase \
	topogeototable16.testcase \
	topogeototable17.testcase \
	topogeototable18.testcase \
	topogeototable19.testcase \
	topogeototable20.testcase \
	topogeototable21.testcase \
	topogeototable22.testcase \
	topogeototable23.testcase \
	topogeototable24.testcase \
	topogeototable25.testcase \
	topogeototable26.testcase \
	topogeototablegen1.testcase \
	topogeototablegen2.testcase \
	topogeototablegen3.testcase \
	topogeototablegen4.testcase \
	topogeototablegen5.testcase \
	topogeototablegen6.testcase \
	topogeototablegen7.testcase \
	topogeototablegen8.testcase \
	topogeototablegen9.testcase \
	topogeototablegen10.testcase \
	topogeototablegen11.testcase \
	topogeototablegen12.testcase \
	topogeototablegen13.testcase \
	topogeototablegen14.testcase \
	topogeototablegen15.testcase \
	topogeototablegen16.testcase \
	topogeototablegen17.testcase \
	topogeototablegen18.testcase \
	topogeototablegen19.testcase \
	topogeototablegen20.testcase \
	topogeototablegen21.testcase \
	topogeototablegen22.testcase \
	topogeototablegen23.testcase \
	topogeototablegen24.testcase \
	topogeototablegen25.testcase \
	topogeototablegen26.testcase \
	topogeototablegen27.testcase \
	topogeototablegen28.testcase \
	topogeototablegen29.testcase \
	topogeototablegen30.testcase \
	topogeototablegen31.testcase \
	topogeoupdateseeds1.testcase \
	topogeoupdateseeds2.testcase \
	topogeoupdateseeds3.testcase \
	topogeoupdateseeds4.testcase \
	topogeoupdateseeds5.testcase \
	topogeoupdateseeds6.testcase \
	topogeoupdateseeds7.testcase \
	topogeoupdateseeds8.testcase \
	topogeoupdateseeds9.testcase \
	topogeoupdateseeds10.testcase \
	toponetclone1.testcase \
	toponetclone2.testcase \
	toponetclone3.testcase \
	toponetclone4.testcase \
	toponetclone5.testcase \
	toponetclone6.testcase \
	toponetclone7.testcase \
	toponetclone8.testcase \
	toponetclone9.testcase \
	toponetclone10.testcase \
	toponetclone11.testcase \
	toponetclone12.testcase \
	toponetdisambiguate1.testcase \
	toponetdisambiguate2.testcase \
	toponetdisambiguate3.testcase \
	toponetdisambiguate4.testcase \
	toponetdisambiguate5.testcase \
	toponetfromtable1.testcase \
	toponetfromtable2.testcase \
	toponetfromtable3.testcase \
	toponetfromtable4.testcase \
	toponetfromtable5.testcase \
	toponetfromtable6.testcase \
	toponetfromtable7.testcase \
	toponetfromtable8.testcase \
	toponetfromtable9.testcase \
	toponetfromtable10.testcase \
	toponetfromtable11.testcase \
	toponetfromtable12.testcase \
	toponetfromtable13.testcase \
	toponetfromtable14.testcase \
	toponetfromtable15.testcase \
	toponetfromtable16.testcase \
	toponetfromtable17.testcase \
	toponettotable1.testcase \
	toponettotable2.testcase \
	toponettotable3.testcase \
	toponettotable4.testcase \
	toponettotable5.testcase \
	toponettotable6.testcase \
	toponettotable7.testcase \
	toponettotable8.testcase \
	toponettotable9.testcase \
	toponettotable10.testcase \
	toponettotable11.testcase \
	toponettotable12.testcase \
	toponettotable13.testcase \
	toponettotable14.testcase \
	toponettotable15.testcase \
	toponettotable16.testcase \
	toponettotable17.testcase \
	toponettotable18.testcase \
	toponettotable19.testcase \
	toponettotable20.testcase \
	toponettotable21.testcase \
	toponettotable22.testcase \
	toponettotable23.testcase \
	toponettotable24.testcase \
	toponettotable25.testcase \
	toponettotable26.testcase \
	toponettotablegen1.testcase \
	toponettotablegen2.testcase \
	toponettotablegen3.testcase \
	toponettotablegen4.testcase \
	toponettotablegen5.testcase \
	toponettotablegen6.testcase \
	toponettotablegen7.testcase \
	toponettotablegen8.testcase \
	toponettotablegen9.testcase \
	toponettotablegen10.testcase \
	toponettotablegen11.testcase \
	toponettotablegen12.testcase \
	toponettotablegen13.testcase \
	toponettotablegen14.testcase \
	toponettotablegen15.testcase \
	toponettotablegen16.testcase \
	toponettotablegen17.testcase \
	toponettotablegen18.testcase \
	toponettotablegen19.testcase \
	toponettotablegen20.testcase \
	toponettotablegen21.testcase \
	toponettotablegen22.testcase \
	toponettotablegen23.testcase \
	toponettotablegen24.testcase \
	toponettotablegen25.testcase \
	toponettotablegen26.testcase \
	toponettotablegen27.testcase \
	toponettotablegen28.testcase \
	toponettotablegen29.testcase \
	toponettotablegen30.testcase \
	toponettotablegen31.testcase \
	toposnap1.testcase \
	toposnap2.testcase \
	toposnap3.testcase \
	toposnap4.testcase \
	toposnap5.testcase \
	toposnap6.testcase \
	toposnap7.testcase \
	toposnap8.testcase \
	toposnap9.testcase \
	toposnap10.testcase \
	toposnap11.testcase \
	toposnap12.testcase \
	toposnap13.testcase \
	toposnap14.testcase \
	toposnap15.testcase \
	toposnap16.testcase \
	toposnap17.testcase \
	toposnap18.testcase \
	toposnap19.testcase \
	toposnap20.testcase \
	toposnap21.testcase \
	toposnap22.testcase \
	toposnap23.testcase \
	toposnap24.testcase \
	toposnap25.testcase \
	toposnap26.testcase \
	toposnap27.testcase \
	toposnap28.testcase \
	toposnap29.testcase \
	validatetopogeo1.testcase \
	validatetopogeo2.testcase \
	validatetopogeo3.testcase \
	validatetopogeo4.testcase \
	validatetopogeo5.testcase \
	validlogicalnet1.testcase \
	validlogicalnet2.testcase \
	validlogicalnet3.testcase \
	validlogicalnet4.testcase \
	validlogicalnet5.testcase \
	validspatialnet1.testcase \
	validspatialnet2.testcase \
	validspatialnet3.testcase \
	validspatialnet4.testcase \
	validspatialnet5.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_rttopo_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_rttopo_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_rttopo_tests/addedgemodface1.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface10.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface11.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface12.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Text Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface13.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface14.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Int Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, 1);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface15.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, 1.3);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface16.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface17.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface18.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Point Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface19.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface2.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Int Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface20.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface3.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface4.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - BLOB Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface5.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Text Topology
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface6.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - NULL Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface7.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Double Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface8.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - Text Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgemodface9.testcase.

1
2
3
4
5
6
7
AddEdgeModFace - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddEdgeModFace('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeModFace('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces1.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces10.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces11.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces12.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Text Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces13.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces14.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Int Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, 1);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces15.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, 1.3);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces16.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces17.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces18.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Point Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces19.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces2.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Int Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces20.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces3.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces4.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - BLOB Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces5.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Text Topology
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces6.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - NULL Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces7.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Double Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces8.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - Text Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addedgenewfaces9.testcase.

1
2
3
4
5
6
7
AddEdgeNewFaces - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddEdgeNewFaces('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddEdgeNewFaces('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge1.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge10.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge11.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge12.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Text Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge13.testcase.

1
2
3
4
5
6
7
AddIsoEdge - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge14.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Int Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, 1);
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge15.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, 1.3);
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge16.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge17.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge18.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Point Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge19.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge2.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Int Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge20.testcase.

1
2
3
4
5
6
7
AddIsoEdge - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge3.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge4.testcase.

1
2
3
4
5
6
7
AddIsoEdge - BLOB Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge5.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Text Topology
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge6.testcase.

1
2
3
4
5
6
7
AddIsoEdge - NULL Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge7.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Double Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge8.testcase.

1
2
3
4
5
6
7
AddIsoEdge - Text Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisoedge9.testcase.

1
2
3
4
5
6
7
AddIsoEdge - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddIsoEdge('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoEdge('topology', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonetnode1.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - NULL Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonetnode2.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - Int Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonetnode3.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - Double Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonetnode4.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - BLOB Network
:memory: #use in-memory database
SELECT ST_AddIsoNetNode(zeroblob(9), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode(zeroblob(9), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonetnode5.testcase.

1
2
3
4
5
6
7
AddIsoNetNode - NULL Point
:memory: #use in-memory database
SELECT ST_AddIsoNetNode('roads', NULL);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNetNode('roads', NULL)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode1.testcase.

1
2
3
4
5
6
7
AddIsoNode - NULL Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode10.testcase.

1
2
3
4
5
6
7
AddIsoNode - Double Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode11.testcase.

1
2
3
4
5
6
7
AddIsoNode - NULL Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode12.testcase.

1
2
3
4
5
6
7
AddIsoNode - Text Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode13.testcase.

1
2
3
4
5
6
7
AddIsoNode - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode14.testcase.

1
2
3
4
5
6
7
AddIsoNode - Linestring Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode15.testcase.

1
2
3
4
5
6
7
AddIsoNode - Polygon Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode16.testcase.

1
2
3
4
5
6
7
AddIsoNode - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode17.testcase.

1
2
3
4
5
6
7
AddIsoNode - NULL Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode2.testcase.

1
2
3
4
5
6
7
AddIsoNode - Int Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode3.testcase.

1
2
3
4
5
6
7
AddIsoNode - Double Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode4.testcase.

1
2
3
4
5
6
7
AddIsoNode - Blob Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode5.testcase.

1
2
3
4
5
6
7
AddIsoNode - Text Topology
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode6.testcase.

1
2
3
4
5
6
7
AddIsoNode - Double Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode7.testcase.

1
2
3
4
5
6
7
AddIsoNode - BLOB Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode8.testcase.

1
2
3
4
5
6
7
AddIsoNode - Text Face
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', 'face', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', 'face', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addisonode9.testcase.

1
2
3
4
5
6
7
AddIsoNode - Int Geometry
:memory: #use in-memory database
SELECT ST_AddIsoNode('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_AddIsoNode('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink1.testcase.

1
2
3
4
5
6
7
AddLink - NULL Network
:memory: #use in-memory database
SELECT ST_AddLink(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(NULL, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink10.testcase.

1
2
3
4
5
6
7
AddLink - NULL Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink11.testcase.

1
2
3
4
5
6
7
AddLink - Double Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, 2.4, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink12.testcase.

1
2
3
4
5
6
7
AddLink - Text Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, 'to', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink13.testcase.

1
2
3
4
5
6
7
AddLink - BLOB Node To
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink2.testcase.

1
2
3
4
5
6
7
AddLink - Int Network
:memory: #use in-memory database
SELECT ST_AddLink(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(1, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink3.testcase.

1
2
3
4
5
6
7
AddLink - Double Network
:memory: #use in-memory database
SELECT ST_AddLink(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(1.2, 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink4.testcase.

1
2
3
4
5
6
7
AddLink - BLOB Network
:memory: #use in-memory database
SELECT ST_AddLink(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink(zeroblob(4), 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink5.testcase.

1
2
3
4
5
6
7
AddLink - Text Network
:memory: #use in-memory database
SELECT ST_AddLink('net', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink6.testcase.

1
2
3
4
5
6
7
AddLink - NULL Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', NULL, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink7.testcase.

1
2
3
4
5
6
7
AddLink - Double Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 1.3, 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink8.testcase.

1
2
3
4
5
6
7
AddLink - Text Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', 'from', 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/addlink9.testcase.

1
2
3
4
5
6
7
AddLink - BLOB Node From
:memory: #use in-memory database
SELECT ST_AddLink('net', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_AddLink('net', zeroblob(4), 2, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom1.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - NULL Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom10.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Double Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom11.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - NULL Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom12.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Text Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 'edge', 'geom');
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 'edge', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom13.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 'edge', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 'edge', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom14.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Point Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom15.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Polygon Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom16.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - MultiLinestring Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, GeomFromText('MULTILINESTRING((0 0, 1 1), (4 4, 5 5))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom17.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - NULL Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom2.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Int Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom3.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Double Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom4.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Blob Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom5.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Text Topology
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom6.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Double Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom7.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - BLOB Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom8.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Text Edge
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', 'edge', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', 'Edge', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changeedgegeom9.testcase.

1
2
3
4
5
6
7
ChangeEdgeGeom - Int Geometry
:memory: #use in-memory database
SELECT ST_ChangeEdgeGeom('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_ChangeEdgeGeom('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom1.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - NULL Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(NULL, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom2.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Int Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(1, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom3.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Double Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(1.5, -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom4.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Blob Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom(zeroblob(4), -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom5.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Text Network
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom6.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Double Link
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', 2.0, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom7.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - BLOB Link
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/changelinkgeom8.testcase.

1
2
3
4
5
6
7
ChangeLinkGeom - Text Link
:memory: #use in-memory database
SELECT ST_ChangeLinkGeom('topology', 'Link', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ChangeLinkGeom('topology', 'Link', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork1.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL Network
:memory: #use in-memory database
SELECT CreateNetwork(NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork10.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads2', 1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads2', 1)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork11.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL Srid
:memory: #use in-memory database
SELECT CreateNetwork('roadsB', 1, NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsB', 1, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork12.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int Srid
:memory: #use in-memory database
SELECT CreateNetwork('roadsC', 1, 4326);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsC', 1, 4326);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork13.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double Srid
:memory: #use in-memory database
SELECT CreateNetwork('roadsD', 1, 1.5);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsD', 1, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork14.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text Srid
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork15.testcase.

1
2
3
4
5
6
7
CreateNetwork - Blob Srid
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork16.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roadsZ', 1, 4326, NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsZ', 1, 4326, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork17.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roadsX', 1, 4326, 1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsX', 1, 4326, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork18.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roadsD', 1, 4326, 1.5);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsD', 1, 4326, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork19.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork2.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int Network
:memory: #use in-memory database
SELECT CreateNetwork(1);
1 # rows (not including the header row)
1 # columns
CreateNetwork(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork20.testcase.

1
2
3
4
5
6
7
CreateNetwork - Blob hasZ
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork21.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roadsW', 1, 4326, 1, NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsW', 1, 4326, 1, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork22.testcase.

1
2
3
4
5
6
7
CreateNetwork - Int allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roadsY', 1, 4326, 1, 1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsY', 1, 4326, 1, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork23.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roadsE', 1, 4326, 1, 1.5);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsE', 1, 4326, 1, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork24.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, 1, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, 1, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork25.testcase.

1
2
3
4
5
6
7
CreateNetwork - Blob allow-coincident
:memory: #use in-memory database
SELECT CreateNetwork('roads', 1, 4326, 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 1, 4326, 1, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork3.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double Network
:memory: #use in-memory database
SELECT CreateNetwork(1.1);
1 # rows (not including the header row)
1 # columns
CreateNetwork(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork4.testcase.

1
2
3
4
5
6
7
CreateNetwork - BLOB Network
:memory: #use in-memory database
SELECT CreateNetwork(zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork5.testcase.

1
2
3
4
5
6
7
CreateNetwork - Text Network
:memory: #use in-memory database
SELECT CreateNetwork('roads');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork6.testcase.

1
2
3
4
5
6
7
CreateNetwork - NULL Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roadsA', NULL);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roadsA', NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork7.testcase.

1
2
3
4
5
6
7
CreateNetwork - BLOB Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads', zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork8.testcase.

1
2
3
4
5
6
7
CreateNetwork - TEXT Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads', 'beta');
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 'beta')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createnetwork9.testcase.

1
2
3
4
5
6
7
CreateNetwork - Double Spatial
:memory: #use in-memory database
SELECT CreateNetwork('roads', 3.1);
1 # rows (not including the header row)
1 # columns
CreateNetwork('roads', 3.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo1.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo10.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - non existing Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo2.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Int Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo3.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Double Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo4.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - BLOB Topology
:memory: #use in-memory database
SELECT ST_CreateTopoGeo(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo(zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo5.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - NULL GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo6.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Int GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', 1);
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo7.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Double GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', 1.4);
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', 1.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo8.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Text GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', 'geom');
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopogeo9.testcase.

1
2
3
4
5
6
7
ST_CreateTopoGeo - Invalid BLOB GeomCollection
:memory: #use in-memory database
SELECT ST_CreateTopoGeo('topology', zeroblob(100));
1 # rows (not including the header row)
1 # columns
ST_CreateTopoGeo('topology', zeroblob(100))
SQL/MM Spatial exception - not a Geometry.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Text Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Int Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer18.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer19.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer20.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer21.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Text TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer22.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer23.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - TEXT is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer24.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer25.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - NULL is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer26.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Integer is-view
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', 'geometry', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', zeroblob(4), 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_CreateTopoLayer - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_CreateTopoLayer('topology', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_CreateTopoLayer('topology', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology1.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL Topology
:memory: #use in-memory database
SELECT CreateTopology(NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology10.testcase.

1
2
3
4
5
6
7
CreateTopology - Int Srid
:memory: #use in-memory database
SELECT CreateTopology('topo2', 4326);
1 # rows (not including the header row)
1 # columns
CreateTopology('topo2', 4326)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology11.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoB', 4326, 0, NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoB', 4326, 0, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology12.testcase.

1
2
3
4
5
6
7
CreateTopology - Int tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoC', 4326, 0, 1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoC', 4326, 0, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology13.testcase.

1
2
3
4
5
6
7
CreateTopology - Double tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoD', 4326, 1, 0.001);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoD', 4326, 1, 0.001);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology14.testcase.

1
2
3
4
5
6
7
CreateTopology - Text tolerance
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, 0, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, 0, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology15.testcase.

1
2
3
4
5
6
7
CreateTopology - Blob tolerance
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, 0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, 0, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology16.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL hasZ
:memory: #use in-memory database
SELECT CreateTopology('topoZ', 4326, NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoZ', 4326, NULL);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology17.testcase.

1
2
3
4
5
6
7
CreateTopology - Int hasZ
:memory: #use in-memory database
SELECT CreateTopology('topoX', 4326, 1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoX', 4326, 1);
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology18.testcase.

1
2
3
4
5
6
7
CreateTopology - Double hasZ
:memory: #use in-memory database
SELECT CreateTopology('topoD', 4326, 1.5);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoD', 4326, 1.5);
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology19.testcase.

1
2
3
4
5
6
7
CreateTopology - Text hasZ
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, 'alpha');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, 'alpha');
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology2.testcase.

1
2
3
4
5
6
7
CreateTopology - Int Topology
:memory: #use in-memory database
SELECT CreateTopology(1);
1 # rows (not including the header row)
1 # columns
CreateTopology(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology20.testcase.

1
2
3
4
5
6
7
CreateTopology - Blob hasZ
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326, zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326, zeroblob(4));
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology21.testcase.

1
2
3
4
5
6
7
CreateTopology - Int NEGATIVE tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoD', 4326, 1, -1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoD', 4326, 1, -1);
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology22.testcase.

1
2
3
4
5
6
7
CreateTopology - Double NEGATIVE tolerance
:memory: #use in-memory database
SELECT CreateTopology('topoD', 4326, 1, -0.1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoD', 4326, 1, -0.1);
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology3.testcase.

1
2
3
4
5
6
7
CreateTopology - Double Topology
:memory: #use in-memory database
SELECT CreateTopology(1.1);
1 # rows (not including the header row)
1 # columns
CreateTopology(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology4.testcase.

1
2
3
4
5
6
7
CreateTopology - BLOB Topology
:memory: #use in-memory database
SELECT CreateTopology(zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology5.testcase.

1
2
3
4
5
6
7
CreateTopology - Text Topology
:memory: #use in-memory database
SELECT CreateTopology('topo1');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo1')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology6.testcase.

1
2
3
4
5
6
7
CreateTopology - NULL Srid
:memory: #use in-memory database
SELECT CreateTopology('topoA', NULL);
1 # rows (not including the header row)
1 # columns
CreateTopology('topoA', NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology7.testcase.

1
2
3
4
5
6
7
CreateTopology - BLOB Srid
:memory: #use in-memory database
SELECT CreateTopology('topo', zeroblob(4));
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology8.testcase.

1
2
3
4
5
6
7
CreateTopology - TEXT Srid
:memory: #use in-memory database
SELECT CreateTopology('topo', 'alpha');
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 'alpha')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopology9.testcase.

1
2
3
4
5
6
7
CreateTopology - Double Srid
:memory: #use in-memory database
SELECT CreateTopology('topo', 4326.1);
1 # rows (not including the header row)
1 # columns
CreateTopology('topo', 4326.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createtopotables.testcase.

1
2
3
4
5
6
7
CreateTopoTables
:memory: #use in-memory database
SELECT CreateTopoTables();
1 # rows (not including the header row)
1 # columns
CreateTopoTables()
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/createvectorcoverages.testcase.

1
2
3
4
5
6
7
8
CreateVectorsCoveragesTables
NEW:memory: #use in-memory database
SELECT CreateVectorCoveragesTables();
1 # rows (not including the header row)
1 # columns
CreateVectorCoveragesTables()
1

<
<
<
<
<
<
<
<
















Deleted test/sql_stmt_rttopo_tests/dropnetwork1.testcase.

1
2
3
4
5
6
7
DropNetwork - NULL Network
:memory: #use in-memory database
SELECT DropNetwork(NULL);
1 # rows (not including the header row)
1 # columns
DropNetwork(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/dropnetwork2.testcase.

1
2
3
4
5
6
7
DropNetwork - Int Network
:memory: #use in-memory database
SELECT DropNetwork(1);
1 # rows (not including the header row)
1 # columns
DropNetwork(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/dropnetwork3.testcase.

1
2
3
4
5
6
7
DropNetwork - Double Network
:memory: #use in-memory database
SELECT DropNetwork(1.1);
1 # rows (not including the header row)
1 # columns
DropNetwork(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/dropnetwork4.testcase.

1
2
3
4
5
6
7
DropNetwork - BLOB Network
:memory: #use in-memory database
SELECT DropNetwork(zeroblob(4));
1 # rows (not including the header row)
1 # columns
DropNetwork(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/dropnetwork5.testcase.

1
2
3
4
5
6
7
DropNetwork - Text Network
:memory: #use in-memory database
SELECT DropNetwork('topoW');
1 # rows (not including the header row)
1 # columns
DropNetwork('topoW')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/droptopology1.testcase.

1
2
3
4
5
6
7
DropTopology - NULL Topology
:memory: #use in-memory database
SELECT DropTopology(NULL);
1 # rows (not including the header row)
1 # columns
DropTopology(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/droptopology2.testcase.

1
2
3
4
5
6
7
DropTopology - Int Topology
:memory: #use in-memory database
SELECT DropTopology(1);
1 # rows (not including the header row)
1 # columns
DropTopology(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/droptopology3.testcase.

1
2
3
4
5
6
7
DropTopology - Double Topology
:memory: #use in-memory database
SELECT DropTopology(1.1);
1 # rows (not including the header row)
1 # columns
DropTopology(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/droptopology4.testcase.

1
2
3
4
5
6
7
DropTopology - BLOB Topology
:memory: #use in-memory database
SELECT DropTopology(zeroblob(4));
1 # rows (not including the header row)
1 # columns
DropTopology(zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/droptopology5.testcase.

1
2
3
4
5
6
7
DropTopology - Text Topology
:memory: #use in-memory database
SELECT DropTopology('topoW');
1 # rows (not including the header row)
1 # columns
DropTopology('topoW')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(NULL, 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(NULL, 'topolayer', 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer18.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer create-only
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer19.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(1, 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(1, 'topolayer', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer20.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer21.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer22.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer23.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(1.5, 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(1.5, 'topolayer', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer(zeroblob(5), 'topolayer', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(zeroblob(5), 'topolayer', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Integer TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 1.5, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 1.5, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/exporttopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - NULL output
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(NULL, 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(NULL, 'topolayer', 'out', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Integer output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - BLOB output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Text output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double FID
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 'out', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 'out', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_ExportTopoLayer - Text FID
:memory: #use in-memory database
SELECT TopoGeo_ExportTopoLayer('topology', 'topolayer', 'out', 'fid');
1 # rows (not including the header row)
1 # columns
TopoGeo_ExportTopoLayer(topology, 'topolayer', 'out', 'fid')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - BLOB FID
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Integer Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(1, 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(1, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(1.5, 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(1.5, 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer(zeroblob(5), 'topolayer', 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(zeroblob(5), 'topolayer', 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, NULL, 'out', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Integer TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 1, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 1, 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 1.5, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 1.5, 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', zeroblob(4), 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, zeroblob(4), 'out', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/featuretopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_InsertFeatureFromTopoLayer - NULL output
:memory: #use in-memory database
SELECT TopoGeo_InsertFeatureFromTopoLayer('topology', 'topolayer', NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_InsertFeatureFromTopoLayer(topology, 'topolayer', NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint1.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - NULL Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint10.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', 1.1);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint11.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', NULL);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint12.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', 'geom');
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint13.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint14.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint15.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint16.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint17.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint18.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint19.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint2.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Int Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint3.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint4.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Blob Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint(zeroblob(4),MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint5.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Text Topology
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint6.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint7.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint8.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgebypoint9.testcase.

1
2
3
4
5
6
7
GetEdgeByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetEdgeByPoint('topology', -1);
1 # rows (not including the header row)
1 # columns
GetEdgeByPoint('topology', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed1.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed2.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed3.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed4.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed5.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed6.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - NULL Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed7.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Double Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', 1.3);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed8.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - Text Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', 'face');
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getedgeseed9.testcase.

1
2
3
4
5
6
7
GetEdgeSeed - BLOB Face
:memory: #use in-memory database
SELECT TopoGeo_GetEdgeSeed('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_GetEdgeSeed('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint1.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - NULL Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint10.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', 1.1);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint11.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', NULL);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint12.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', 'geom');
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint13.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint14.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint15.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint16.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint17.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint18.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint19.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint2.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Int Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint3.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint4.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Blob Topology
:memory: #use in-memory database
SELECT GetFaceByPoint(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint(zeroblob(4),MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint5.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Text Topology
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint6.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint7.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint8.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacebypoint9.testcase.

1
2
3
4
5
6
7
GetFaceByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetFaceByPoint('topology', -1);
1 # rows (not including the header row)
1 # columns
GetFaceByPoint('topology', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges1.testcase.

1
2
3
4
5
6
7
GetFaceEdges - NULL Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges2.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Int Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(1, -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges3.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Double Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges4.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Blob Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges5.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Text Topology
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges6.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Double Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges7.testcase.

1
2
3
4
5
6
7
GetFaceEdges - BLOB Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges8.testcase.

1
2
3
4
5
6
7
GetFaceEdges - Text Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', 'node');
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceedges9.testcase.

1
2
3
4
5
6
7
GetFaceEdges - NULL Face
:memory: #use in-memory database
SELECT ST_GetFaceEdges('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_GetFaceEdges('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry1.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - NULL Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(NULL, 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry2.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Int Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(1, 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry3.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Double Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(1.2, 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry4.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - BLOB Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry5.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Text Topology
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', 1);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry6.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - NULL Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry7.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Double Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', 1.3);
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry8.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - Text Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', 'face');
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfacegeometry9.testcase.

1
2
3
4
5
6
7
GetFaceGeometry - BLOB Face
:memory: #use in-memory database
SELECT ST_GetFaceGeometry('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_GetFaceGeometry('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed1.testcase.

1
2
3
4
5
6
7
GetFaceSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed2.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed3.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed4.testcase.

1
2
3
4
5
6
7
GetFaceSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed5.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed6.testcase.

1
2
3
4
5
6
7
GetFaceSeed - NULL Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed7.testcase.

1
2
3
4
5
6
7
GetFaceSeed - Double Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', 1.3);
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed8.testcase.

1
2
3
4
5
6
7
TopoGeo_GetFaceSeed - Text Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', 'face');
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getfaceseed9.testcase.

1
2
3
4
5
6
7
GetFaceSeed - BLOB Face
:memory: #use in-memory database
SELECT TopoGeo_GetFaceSeed('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_GetFaceSeed('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint1.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - NULL Network
:memory: #use in-memory database
SELECT GetLinkByPoint(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint10.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', 1.1);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint11.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', NULL);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint12.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', 'geom');
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint13.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint14.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint15.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint16.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint17.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint18.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Int Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint19.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint2.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Int Network
:memory: #use in-memory database
SELECT GetLinkByPoint(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint20.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint3.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double Network
:memory: #use in-memory database
SELECT GetLinkByPoint(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint4.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Blob Network
:memory: #use in-memory database
SELECT GetLinkByPoint(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint(zeroblob(4),MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint5.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Text Network
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint6.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), 0.01);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), 0.01)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint7.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint8.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetLinkByPoint('network', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkbypoint9.testcase.

1
2
3
4
5
6
7
GetLinkByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetLinkByPoint('network', -1);
1 # rows (not including the header row)
1 # columns
GetLinkByPoint('network', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed1.testcase.

1
2
3
4
5
6
7
GetLinkSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed2.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Int Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(1, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed3.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Double Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(1.2, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(1.2, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed4.testcase.

1
2
3
4
5
6
7
GetLinkSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed(zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed(zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed5.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Text Topology
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed6.testcase.

1
2
3
4
5
6
7
GetLinkSeed - NULL Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed7.testcase.

1
2
3
4
5
6
7
GetLinkSeed - Double Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', 1.3);
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', 1.3)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed8.testcase.

1
2
3
4
5
6
7
TopoNet_GetLinkSeed - Text Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', 'face');
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', 'face')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getlinkseed9.testcase.

1
2
3
4
5
6
7
GetLinkSeed - BLOB Face
:memory: #use in-memory database
SELECT TopoNet_GetLinkSeed('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_GetLinkSeed('network', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint1.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - NULL Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint10.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', 1.1);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint11.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', NULL);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint12.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', 'geom');
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint13.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint14.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint15.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint16.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint17.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint18.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Int Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint19.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint2.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Int Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint20.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint3.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint4.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Blob Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint(zeroblob(4),MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint5.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Text Network
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint6.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 0.01);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 0.01)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint7.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint8.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnetnodebypoint9.testcase.

1
2
3
4
5
6
7
GetNetNodeByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetNetNodeByPoint('network', -1);
1 # rows (not including the header row)
1 # columns
GetNetNodeByPoint('network', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint1.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - NULL Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint10.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', 1.1);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint11.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - NULL Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', NULL);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint12.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Text Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', 'geom');
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint13.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint14.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Linestring Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint15.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Polygon Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint16.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint17.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - NULL Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint18.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint19.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint2.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Int Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint3.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint4.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Blob Topology
:memory: #use in-memory database
SELECT GetNodeByPoint(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint(zeroblob(4),MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint5.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Text Topology
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint6.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Double Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint7.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint8.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Text Tolerance
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/getnodebypoint9.testcase.

1
2
3
4
5
6
7
GetNodeByPoint - Int Geometry
:memory: #use in-memory database
SELECT GetNodeByPoint('topology', -1);
1 # rows (not including the header row)
1 # columns
GetNodeByPoint('topology', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(NULL, NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(NULL, NULL, 'table', 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer10.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer11.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer12.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer13.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer14.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - NULL TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer15.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer16.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer17.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Text TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(1, NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(1, NULL, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(1.5, NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(1.5, NULL, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer(zeroblob(4), NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer(zeroblob(4), NULL, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', NULL, 'table', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', 'a', 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', 'a', 'table', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', 1, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', 1, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', 1.2, 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', 1.2, 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/inittopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_InitTopoLayer - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_InitTopoLayer('topology', zeroblob(4), 'table', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_InitTopoLayer('topology', zeroblob(4), 'table', 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist1.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist10.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist11.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist12.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist13.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist14.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Text Column
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist15.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Int Column
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist16.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Double Column
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist17.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist18.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - NULL out-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist19.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Double out-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist2.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist20.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - BLOB out-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist21.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Text out-table
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist3.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist4.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist5.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist6.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist7.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist8.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/lineedgeslist9.testcase.

1
2
3
4
5
6
7
TopoGeo_LineEdgesList - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_LineEdgesList('topology', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_LineEdgesList('topology', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist1.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - NULL Network
:memory: #use in-memory database
SELECT TopoNet_LineLinksList(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist10.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - NULL ref-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist11.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - INT ref-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist12.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Double ref-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist13.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - BLOB ref-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist14.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Text Column
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist15.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Int Column
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist16.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Double Column
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist17.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist18.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - NULL out-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist19.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Double out-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist2.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Int Network
:memory: #use in-memory database
SELECT TopoNet_LineLinksList(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist20.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - BLOB out-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist21.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Text out-table
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist3.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Double Network
:memory: #use in-memory database
SELECT TopoNet_LineLinksList(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist4.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Blob Network
:memory: #use in-memory database
SELECT TopoNet_LineLinksList(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist5.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Text Network
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist6.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist7.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - INT prefix
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist8.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - Double prefix
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linelinkslist9.testcase.

1
2
3
4
5
6
7
TopoNet_LineLinksList - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_LineLinksList('network', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_LineLinksList('network', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed1.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed10.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - NULL distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed11.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - TEXT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 'dist');
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 'dist')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed12.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - BLOB distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', zeroblob(5));
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', zeroblob(5))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed13.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - INT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed14.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - DOUBLE distance
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 'topo', 1.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed15.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - point instead of line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('POINT(1 1)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('POINT((1 1)'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed16.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - multilinestring instead of linestring
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('MULTILINESTRING((1 1, 1 2), (2 2, 3 3))'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('MULTILINESTRING((1 1, 1 2), (2 2, 3 3))'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed17.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - polygon instead of line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed2.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - INT Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed3.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - DOUBLE Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), 1.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed4.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(ST_GeomFromText('LINESTRING(1 1, 1 2)'), zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed5.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - NULL line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(NULL, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(NULL, 'topo', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed6.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - INT line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed7.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - DOUBLE line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(1.1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(1.1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed8.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - TEXT line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed('line', 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed('line', 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/linesnapseed9.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapLineToSeed - invalid BLOB line
:memory: #use in-memory database
SELECT TopoGeo_SnapLineToSeed(zeroblob(100), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapLineToSeed(zeroblob(100), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo1.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - NULL Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(NULL, 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(NULL, 'topology')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo2.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Int Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(1, 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(1, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo3.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Double Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(1.5, 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(1.5, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo4.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Blob Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo(zeroblob(4), 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo(zeroblob(4), 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo5.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Text Network
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', 'topology');
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', 'topology')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo6.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', NULL);
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo7.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - INT Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', 1);
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo8.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - Double Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', 1.2);
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/loginetfromtgeo9.testcase.

1
2
3
4
5
6
7
ST_LogiNetFromTGeo - BLOB Topology
:memory: #use in-memory database
SELECT ST_LogiNetFromTGeo('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_LogiNetFromTGeo('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal1.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - NULL Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal10.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - NULL Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal11.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Double Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal12.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Text Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal13.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - BLOB Edge #2
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal2.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Int Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal3.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Double Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal4.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - BLOB Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal5.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Text Topology
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal6.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - NULL Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal7.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Double Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal8.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - Text Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgeheal9.testcase.

1
2
3
4
5
6
7
ModEdgeHeal - BLOB Edge #1
:memory: #use in-memory database
SELECT ST_ModEdgeHeal('topology', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeHeal('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit1.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - NULL Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit10.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Double Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit11.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - NULL Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit12.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Text Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit13.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit14.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Linestring Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit15.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Polygon Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit16.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit2.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Int Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit3.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Double Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit4.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Blob Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit5.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Text Topology
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit6.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Double Face
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit7.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - BLOB Face
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit8.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Text Face
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', 'face', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', 'face', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modedgesplit9.testcase.

1
2
3
4
5
6
7
ModEdgeSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_ModEdgeSplit('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_ModEdgeSplit('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit1.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit2.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit3.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit4.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit5.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit6.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit7.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit8.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modgeolinksplit9.testcase.

1
2
3
4
5
6
7
ModGeoLinkSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_ModGeoLinkSplit('net', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_ModGeoLinkSplit('net', -1, 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal1.testcase.

1
2
3
4
5
6
7
ModLinkHeal - NULL Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal10.testcase.

1
2
3
4
5
6
7
ModLinkHeal - NULL Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal11.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Double Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal12.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Text Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal13.testcase.

1
2
3
4
5
6
7
ModLinkHeal - BLOB Link #2
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal2.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Int Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal3.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Double Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal4.testcase.

1
2
3
4
5
6
7
ModLinkHeal - BLOB Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal5.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Text Network
:memory: #use in-memory database
SELECT ST_ModLinkHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal6.testcase.

1
2
3
4
5
6
7
ModLinkHeal - NULL Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal7.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Double Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal8.testcase.

1
2
3
4
5
6
7
ModLinkHeal - Text Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modlinkheal9.testcase.

1
2
3
4
5
6
7
ModLinkHeal - BLOB Link #1
:memory: #use in-memory database
SELECT ST_ModLinkHeal('net', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_ModLinkHeal('net', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit1.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit2.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(1, -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit3.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit4.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit5.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', -1);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit6.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit7.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit8.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/modloglinksplit9.testcase.

1
2
3
4
5
6
7
ModLogLinkSplit - NULL Link
:memory: #use in-memory database
SELECT ST_ModLogLinkSplit('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_ModLogLinkSplit('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode1.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - NULL Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode2.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Int Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode3.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Double Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode4.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Blob Network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode5.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Double Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode6.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - BLOB Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode7.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - Text Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', 'node', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', 'node', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode8.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - NULL Node
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNode('net', NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonetnode9.testcase.

1
2
3
4
5
6
7
MoveIsoNetNode - invalid network
:memory: #use in-memory database
SELECT ST_MoveIsoNetNode('net', 1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNetNetNode('net', 1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode1.testcase.

1
2
3
4
5
6
7
MoveIsoNode - NULL Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode10.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Double Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode11.testcase.

1
2
3
4
5
6
7
MoveIsoNode - NULL Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode12.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Text Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode13.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode14.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Linestring Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode15.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Polygon Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode16.testcase.

1
2
3
4
5
6
7
MoveIsoNode - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode17.testcase.

1
2
3
4
5
6
7
MoveIsoNode - NULL Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode2.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Int Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode3.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Double Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode4.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Blob Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode5.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Text Topology
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode6.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Double Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode7.testcase.

1
2
3
4
5
6
7
MoveIsoNode - BLOB Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode8.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Text Node
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', 'node', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', 'node', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/moveisonode9.testcase.

1
2
3
4
5
6
7
MoveIsoNode - Int Geometry
:memory: #use in-memory database
SELECT ST_MoveIsoNode('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_MoveIsoNode('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/netexception1.testcase.

1
2
3
4
5
6
7
GetLastNetworkException - NULL Network
:memory: #use in-memory database
SELECT GetLastNetworkException(NULL);
1 # rows (not including the header row)
1 # columns
GetLastNetworkException(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/netexception2.testcase.

1
2
3
4
5
6
7
GetLastNetworkException - Undefined Network
:memory: #use in-memory database
SELECT GetLastNetworkException('net');
1 # rows (not including the header row)
1 # columns
GetLastNetworkException('net')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal1.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - NULL Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal10.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - NULL Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal11.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Double Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal12.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Text Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal13.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - BLOB Edge #2
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal2.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Int Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal3.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Double Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal4.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - BLOB Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal5.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Text Topology
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal6.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - NULL Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal7.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Double Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal8.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - Text Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgeheal9.testcase.

1
2
3
4
5
6
7
NewEdgeHeal - BLOB Edge #1
:memory: #use in-memory database
SELECT ST_NewEdgeHeal('topology', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_NewEdgeHeal('topology', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit1.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - NULL Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit10.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Double Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, 1.1);
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit11.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - NULL Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, NULL);
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit12.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Text Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 'face', 'geom');
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 'face', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit13.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 'face', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 'face', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit14.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Linestring Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit15.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Polygon Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit16.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit2.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Int Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit3.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Double Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit4.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Blob Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit5.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Text Topology
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit6.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Double Face
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit7.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - BLOB Face
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit8.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Text Face
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', 'face', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', 'face', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newedgessplit9.testcase.

1
2
3
4
5
6
7
NewEdgesSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_NewEdgesSplit('topology', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_NewEdgesSplit('topology', -1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit1.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(NULL, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit2.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(1, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(1, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit3.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(1.5, -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit4.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit(zeroblob(4), -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit5.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', -1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', -1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit6.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', 2.0, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit7.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit8.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', 'link', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newgeolinksplit9.testcase.

1
2
3
4
5
6
7
NewGeoLinkSplit - Int Geometry
:memory: #use in-memory database
SELECT ST_NewGeoLinkSplit('net', -1, 1);
1 # rows (not including the header row)
1 # columns
ST_NewGeoLinkSplit('net', -1, 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal1.testcase.

1
2
3
4
5
6
7
NewLinkHeal - NULL Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(NULL, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(NULL, 1, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal10.testcase.

1
2
3
4
5
6
7
NewLinkHeal - NULL Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, NULL);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal11.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Double Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, 2.4);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, 2.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal12.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Text Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, 'to');
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, 'to')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal13.testcase.

1
2
3
4
5
6
7
NewLinkHeal - BLOB Link #2
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal2.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Int Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(1, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(1, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal3.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Double Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(1.2, 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(1.2, 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal4.testcase.

1
2
3
4
5
6
7
NewLinkHeal - BLOB Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal(zeroblob(4), 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal(zeroblob(4), 1, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal5.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Text Network
:memory: #use in-memory database
SELECT ST_NewLinkHeal('topology', 1, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('topology', 1, 2)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal6.testcase.

1
2
3
4
5
6
7
NewLinkHeal - NULL Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', NULL, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', NULL, 2)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal7.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Double Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 1.3, 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 1.3, 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal8.testcase.

1
2
3
4
5
6
7
NewLinkHeal - Text Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', 'from', 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', 'from', 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newlinkheal9.testcase.

1
2
3
4
5
6
7
NewLinkHeal - BLOB Link #1
:memory: #use in-memory database
SELECT ST_NewLinkHeal('net', zeroblob(4), 2);
1 # rows (not including the header row)
1 # columns
ST_NewLinkHeal('net', zeroblob(4), 2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit1.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - NULL Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit2.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Int Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(1, -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit3.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Double Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit4.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Blob Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit5.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Text Network
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', -1);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit6.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Double Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit7.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - BLOB Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit8.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - Text Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/newloglinksplit9.testcase.

1
2
3
4
5
6
7
NewLogLinkSplit - NULL Link
:memory: #use in-memory database
SELECT ST_NewLogLinkSplit('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_NewLogLinkSplit('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed1.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed10.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - NULL distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed11.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - TEXT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 'dist');
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 'dist')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed12.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - BLOB distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', zeroblob(5));
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', zeroblob(5))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed13.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - INT distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed14.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - DOUBLE distance
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 'topo', 1.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed15.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - linestring instead of point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(ST_GeomFromText('LINESTRING(1 1, 2 2)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(ST_GeomFromText('LINESTRING(1 1, 2 2)'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed16.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - multipoint instead of point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(ST_GeomFromText('MULTIPOINT(1 1, 1 2)'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(ST_GeomFromText('MULTIPOINT(1 1, 1 2)'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed17.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - polygon instead of point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(ST_GeomFromText('POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))'), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed2.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - INT Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed3.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - DOUBLE Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), 1.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed4.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(MakePoint(1, 2), zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(MakePoint(1, 2), zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed5.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - NULL point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(NULL, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(NULL, 'topo', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed6.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - INT point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed7.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - DOUBLE point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(1.1, 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(1.1, 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed8.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - TEXT point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed('point', 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed('point', 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/pointsnapseed9.testcase.

1
2
3
4
5
6
7
TopoGeo_SnapPointToSeed - invalid BLOB point
:memory: #use in-memory database
SELECT TopoGeo_SnapPointToSeed(zeroblob(100), 'topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnapPointToSeed(zeroblob(100), 'topo', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist1.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist10.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist11.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist12.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist13.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist14.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Text Column
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist15.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Int Column
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist16.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Double Column
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist17.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist18.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - NULL out-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist19.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Double out-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist2.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist20.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - BLOB out-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist21.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Text out-table
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist3.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist4.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist5.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist6.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist7.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist8.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polyfaceslist9.testcase.

1
2
3
4
5
6
7
TopoGeo_PolyFacesList - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_PolyFacesList('topology', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_PolyFacesList('topology', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize1.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_Polygonize(NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize10.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - Int force-rebuild
:memory: #use in-memory database
SELECT TopoGeo_Polygonize('topo', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize('topo', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize2.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_Polygonize(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize3.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_Polygonize(1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize(1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize4.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_Polygonize(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize5.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_Polygonize('topoW');
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize('topoW')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize6.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - NULL force-rebuild
:memory: #use in-memory database
SELECT TopoGeo_Polygonize('topo', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize('topo', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize7.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - Double force-rebuild
:memory: #use in-memory database
SELECT TopoGeo_Polygonize('topo', 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize('topo', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize8.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - BLOB force-rebuild
:memory: #use in-memory database
SELECT TopoGeo_Polygonize('topo', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize('topo', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/polygonize9.testcase.

1
2
3
4
5
6
7
TopoGeo_Polygonize - Text force-rebuild
:memory: #use in-memory database
SELECT TopoGeo_Polygonize('topo', 'force');
1 # rows (not including the header row)
1 # columns
TopoGeo_Polygonize('topo', 'force')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface1.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - NULL Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface2.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Int Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface3.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Double Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface4.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Blob Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface5.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Text Topology
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface6.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Double Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface7.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - BLOB Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface8.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - Text Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', 'edge');
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', 'edge')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgemodface9.testcase.

1
2
3
4
5
6
7
RemEdgeModFace - NULL Edge
:memory: #use in-memory database
SELECT ST_RemEdgeModFace('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeModFace('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface1.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - NULL Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface2.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Int Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface3.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Double Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface4.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Blob Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface5.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Text Topology
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface6.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Double Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface7.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - BLOB Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface8.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - Text Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', 'edge');
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', 'edge')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remedgenewface9.testcase.

1
2
3
4
5
6
7
RemEdgeNewFace - NULL Edge
:memory: #use in-memory database
SELECT ST_RemEdgeNewFace('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemEdgeNewFace('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge1.testcase.

1
2
3
4
5
6
7
RemIsoEdge - NULL Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge2.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Int Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge3.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Double Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge4.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Blob Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge5.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Text Topology
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge6.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Double Edge
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge7.testcase.

1
2
3
4
5
6
7
RemIsoNode - BLOB RemIsoEdge
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge8.testcase.

1
2
3
4
5
6
7
RemIsoEdge - Text Edge
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisoedge9.testcase.

1
2
3
4
5
6
7
RemIsoEdge - NULL Edge
:memory: #use in-memory database
SELECT ST_RemIsoEdge('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemIsoEdge('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode1.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - NULL Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode2.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Int Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode3.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Double Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode4.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Blob Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode5.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Text Network
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode6.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Double Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode7.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - BLOB Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode8.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - Text Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonetnode9.testcase.

1
2
3
4
5
6
7
RemIsoNetNode - NULL Node
:memory: #use in-memory database
SELECT ST_RemIsoNetNode('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNetNode('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode1.testcase.

1
2
3
4
5
6
7
RemIsoNode - NULL Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode2.testcase.

1
2
3
4
5
6
7
RemIsoNode - Int Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode3.testcase.

1
2
3
4
5
6
7
RemIsoNode - Double Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode4.testcase.

1
2
3
4
5
6
7
RemIsoNode - Blob Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode5.testcase.

1
2
3
4
5
6
7
RemIsoNode - Text Topology
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', -1);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', -1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode6.testcase.

1
2
3
4
5
6
7
RemIsoNode - Double Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode7.testcase.

1
2
3
4
5
6
7
RemIsoNode - BLOB Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode8.testcase.

1
2
3
4
5
6
7
RemIsoNode - Text Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', 'node')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remisonode9.testcase.

1
2
3
4
5
6
7
RemIsoNode - NULL Node
:memory: #use in-memory database
SELECT ST_RemIsoNode('topology', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemIsoNode('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink1.testcase.

1
2
3
4
5
6
7
RemoveLink - NULL Network
:memory: #use in-memory database
SELECT ST_RemoveLink(NULL, -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(NULL, -1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink2.testcase.

1
2
3
4
5
6
7
RemoveLink - Int Network
:memory: #use in-memory database
SELECT ST_RemoveLink(1, -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(1, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink3.testcase.

1
2
3
4
5
6
7
RemoveLink - Double Network
:memory: #use in-memory database
SELECT ST_RemoveLink(1.5, -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(1.5, -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink4.testcase.

1
2
3
4
5
6
7
RemoveLink - Blob Network
:memory: #use in-memory database
SELECT ST_RemoveLink(zeroblob(4), -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink(zeroblob(4), -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink5.testcase.

1
2
3
4
5
6
7
RemoveLink - Text Network
:memory: #use in-memory database
SELECT ST_RemoveLink('net', -1);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', -1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink6.testcase.

1
2
3
4
5
6
7
RemoveLink - Double Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', 2.0);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', 2.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink7.testcase.

1
2
3
4
5
6
7
RemoveLink - BLOB Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink8.testcase.

1
2
3
4
5
6
7
RemoveLink - Text Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', 'node');
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', 'link')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/remlink9.testcase.

1
2
3
4
5
6
7
RemoveLink - NULL Link
:memory: #use in-memory database
SELECT ST_RemoveLink('net', NULL);
1 # rows (not including the header row)
1 # columns
ST_RemoveLink('net', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(1.5, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(1.5, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer(zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer(zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer6.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - TEXT TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer7.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - INT TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer8.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - Double TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/removetopolayer9.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveTopoLayer - BLOB TopoLayer
:memory: #use in-memory database
SELECT TopoGeo_RemoveTopoLayer('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveTopoLayer('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable1.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable(NULL, 'db', 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable(NULL, 'db', 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable10.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Int input table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 1, 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 1, 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable11.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double input table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 1.5, 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 1.5, 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable12.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB input table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', zeroblob(10), 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', zeroblob(10), 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable13.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL geometry column
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input', NULL, 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', NULL, 'output', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable14.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double geometry column
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input', 1.5, 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 1.5, 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable15.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB geometry column
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input', zeroblob(10), 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', zeroblob(10), 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable16.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL output table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable17.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Int output table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable18.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double output table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 1.5, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 1.5, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable19.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB output table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', zeroblob(10), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', zeroblob(10), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable2.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable(1, 'db', 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable(1, 'db', 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable20.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', NULL, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 1, NULL, 0.1, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable21.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - text tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 'tolerance', 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 'tolerance', 0.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable22.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', zeroblob(10), 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', zeroblob(10), 0.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable23.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.001, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.001, 0.1, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable24.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable25.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - text iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 'iterate');
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 'iterate')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable26.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', zeroblob(5));
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', zeroblob(5))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable27.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, NULL, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable28.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Text tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, 'remove', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, 'remove', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable29.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, zeroblob(10), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, zeroblob(10), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable3.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable(1.5, 'db', 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable(1.5, 'db', 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable30.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - long form NULL iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, 0.2, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, 0.2, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable31.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - long form Text iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, 0.1, 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, 0.1, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable32.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Int NEGATIVE tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', -1, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', -1, 0.1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable33.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double NEGATIVE tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', -0.001, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 1, 1, -0.001, 0.1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable34.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - long form Double iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, 0.1, 1.6);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, 0.1, 1.6)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable35.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - long form BLOB iterate
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.1, 0.1, zeroblob(3));
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 0.1, 0.1, zeroblob(3))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable36.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Int NEGATIVE tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 1, -1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 1, -1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable37.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double NEGATIVE tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.001, -0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 1, 1, 0.001, -0.1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable38.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - valid lon form
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', 'input','geom', 'output', 0.001, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', 'input', 'geom', 'output', 1, 1, 0.001, 0.1, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable4.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable(zeroblob(10), 'db', 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable(zeroblob(10), 'db', 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable5.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL DB-prefix
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', NULL, 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', NULL, 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable6.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Int DB-prefix
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 1, 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 1, 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable7.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - Double DB-prefix
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 1.5, 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 1.5, 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable8.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - BLOB DB-prefix
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', zeroblob(10), 'input', 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', zeroblob(10), 'input', 'geom', 'output', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/snappedgeotable9.testcase.

1
2
3
4
5
6
7
TopoGeo_SnappedGeoTable - NULL input table
:memory: #use in-memory database
SELECT TopoGeo_SnappedGeoTable('topo', 'db', NULL, 'geom', 'output', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SnappedGeoTable('topo', 'db', NULL, 'geom', 'output', 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom1.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - NULL Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom10.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - non existing Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom2.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Int Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom3.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Double Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom4.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - BLOB Network
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom(zeroblob(4), MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom5.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - NULL GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', NULL);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom6.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Int GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', 1);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom7.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Double GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', 1.4);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', 1.4)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom8.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Text GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', 'geom');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromgeom9.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromGeom - Invalid BLOB GeomCollection
:memory: #use in-memory database
SELECT ST_SpatNetFromGeom('network', zeroblob(100));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromGeom('network', zeroblob(100))
SQL/MM Spatial exception - not a Geometry.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo1.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - NULL Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(NULL, 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(NULL, 'topology')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo2.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Int Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(1, 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(1, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo3.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Double Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(1.5, 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(1.5, 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo4.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Blob Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo(zeroblob(4), 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo(zeroblob(4), 'topology')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo5.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Text Network
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', 'topology');
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', 'topology')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo6.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', NULL);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo7.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - INT Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', 1);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo8.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - Double Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', 1.2);
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/spatnetfromtgeo9.testcase.

1
2
3
4
5
6
7
ST_SpatNetFromTGeo - BLOB Topology
:memory: #use in-memory database
SELECT ST_SpatNetFromTGeo('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_SpatNetFromTGeo('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topoexception1.testcase.

1
2
3
4
5
6
7
GetLastTopologyException - NULL Topology
:memory: #use in-memory database
SELECT GetLastTopologyException(NULL);
1 # rows (not including the header row)
1 # columns
GetLastTopologyException(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topoexception2.testcase.

1
2
3
4
5
6
7
GetLastTopologyException - Undefined Topology
:memory: #use in-memory database
SELECT GetLastTopologyException('topo');
1 # rows (not including the header row)
1 # columns
GetLastTopologyException('topo')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline1.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline10.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline11.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline12.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', 'geom');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline13.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline14.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Point Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', MakePoint(0, 1, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', MakePoint(0, 1, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline15.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Polygon Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline16.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - MULTILINESTRING Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline17.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - NULL Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline18.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline19.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline2.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline3.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(1.5, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(1.5, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline4.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString(zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString(zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline5.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline6.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Double Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline7.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - BLOB Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline8.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Text Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddline9.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineString - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineString('topology', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineString('topology', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf1.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace(NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace(NULL, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf10.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf11.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf12.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', 'geom');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf13.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf14.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Point Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', MakePoint(0, 1, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', MakePoint(0, 1, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf15.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Polygon Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf16.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - MULTILINESTRING Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', GeomFromText('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', GeomFromText('MULTILINESTRING((0 0, 1 1), (2 2, 3 3))', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf17.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - NULL Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf18.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf19.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf2.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace(1, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace(1, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf3.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace(1.5, GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace(1.5, GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf4.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace(zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace(zeroblob(4), GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf5.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf6.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Double Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf7.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - BLOB Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf8.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Text Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddlinenf9.testcase.

1
2
3
4
5
6
7
TopoGeo_AddLineStringNoFace - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddLineStringNoFace('topology', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddLineStringNoFace('topology', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint1.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(NULL, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(NULL, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint10.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint11.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint12.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', 'geom');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', 'geom')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint13.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint14.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Linestring Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', GeomFromText('LINESTRING(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint15.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Polygon Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', GeomFromText('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint16.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - MULTIPOINT Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', GeomFromText('MULTIPOINT(0 0, 1 1)', 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint17.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - NULL Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint18.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Int NEGATIVE Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint19.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double NEGATIVE Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint2.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(1, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(1, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint3.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(1.5, MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(1.5, MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint4.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint(zeroblob(4), MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint(zeroblob(4),MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint5.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326))
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint6.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Double Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 0.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint7.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - BLOB Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint8.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Text Tolerance
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', MakePoint(1, 2, 4326), 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoaddpoint9.testcase.

1
2
3
4
5
6
7
TopoGeo_AddPoint - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_AddPoint('topology', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_AddPoint('topology', -1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone1.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - NULL Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone('a', NULL, 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone('a', NULL, 'destination')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone10.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Double db-prefix
:memory: #use in-memory database
SELECT TopoGeo_Clone(1.5, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone11.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - BLOB db-prefix
:memory: #use in-memory database
SELECT TopoGeo_Clone(zeroblob(4), 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(zeroblob(4), 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone12.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Integer db-prefix
:memory: #use in-memory database
SELECT TopoGeo_Clone(1, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(1, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone2.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Int Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone('a', 1, 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone('a', 1, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone3.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Double Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 1.5, 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 1.5, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone4.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Blob Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, zeroblob(4), 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, zeroblob(4), 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone5.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Text Topology (origin)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'topology', 'destination');
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'topology', 'destination')
SQL/MM Spatial exception - invalid topology name (origin).
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone6.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - NULL Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone7.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - INT Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone8.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - Double Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoclone9.testcase.

1
2
3
4
5
6
7
TopoGeo_Clone - BLOB Topology (destination)
:memory: #use in-memory database
SELECT TopoGeo_Clone(NULL, 'origin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_Clone(NULL, 'origin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeodisambiguate1.testcase.

1
2
3
4
5
6
7
TopoGeo_DisambiguateSegmentEdges - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_DisambiguateSegmentEdges(NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_DisambiguateSegmentEdges(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeodisambiguate2.testcase.

1
2
3
4
5
6
7
TopoGeo_DisambiguateSegmentEdges - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_DisambiguateSegmentEdges(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_DisambiguateSegmentEdges(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeodisambiguate3.testcase.

1
2
3
4
5
6
7
TopoGeo_DisambiguateSegmentEdges - Double Topology 
:memory: #use in-memory database
SELECT TopoGeo_DisambiguateSegmentEdges(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_DisambiguateSegmentEdges(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeodisambiguate4.testcase.

1
2
3
4
5
6
7
TopoGeo_DisambiguateSegmentEdges - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_DisambiguateSegmentEdges(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_DisambiguateSegmentEdges(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeodisambiguate5.testcase.

1
2
3
4
5
6
7
TopoGeo_DisambiguateSegmentEdges - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_DisambiguateSegmentEdges('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_DisambiguateSegmentEdges('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext1.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(NULL, NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(NULL, NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext10.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, NULL, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, NULL, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext11.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 1, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 1, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext12.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 1.2, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 1.2, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext13.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, zeroblob(4), NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, zeroblob(4), NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext14.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', 'column', 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', 'column', 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext15.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Int Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext16.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1.2, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', 1.2, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext17.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', zeroblob(4), 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', zeroblob(4), 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext18.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext19.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 'zero');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 'zero')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext2.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(1, NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(1, NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext20.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext21.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 0.001);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 0.001)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext22.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext23.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext24.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext25.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext26.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Integer line-max-points / Integer max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 512, 1000);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 512, 1000)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext27.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext28.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext29.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext3.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(1.5, NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(1.5, NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext30.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 5000.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 5000.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext31.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, NULL, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, NULL, 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext32.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 1, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 1, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext33.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - DOUBLE dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext34.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - DOUBLE dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext35.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, zeroblob(5), 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, zeroblob(5), 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext36.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NULL dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext37.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext38.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - DOUBLE dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext39.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext4.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt(zeroblob(4), NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt(zeroblob(4), NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext40.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Int NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext41.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext42.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NEGATIVE line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', -1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext43.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - NEGATIVE line-max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, -1)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext5.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext6.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', 'a', 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', 'a', 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext7.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', 1, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', 1, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext8.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', 1.2, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', 1.2, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromext9.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableExt - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableExt('topology', zeroblob(4), 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableExt('topology', zeroblob(4), 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf1.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt(NULL, NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt(NULL, NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf10.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, NULL, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, NULL, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf11.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - INT table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 1, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 1, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf12.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 1.2, NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 1.2, NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf13.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, zeroblob(4), NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, zeroblob(4), NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf14.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Text Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', 'column', 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', 'column', 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf15.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Int Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', 1,'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', 1, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf16.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', 1.2, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', 1.2, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf17.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', zeroblob(4), 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', zeroblob(4), 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf18.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf19.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 'zero');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 'zero')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf2.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt(1, NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt(1, NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf20.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf21.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 0.001);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, 0.001)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf22.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf23.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf24.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Text line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf25.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf26.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Integer line-max-points / Integer max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 512, 1000);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', 512, 1000)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf27.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf28.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf29.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf3.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt(1.5, NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt(1.5, NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf30.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 5000.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, 5000.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf31.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, NULL, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, NULL, 'dustbinview')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf32.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - INT dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 1, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 1, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf33.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - DOUBLE dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf34.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - DOUBLE dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 1.2, 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf35.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB dustbin-table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, zeroblob(5), 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbinview', zeroblob(5))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf36.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NULL dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf37.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - INT dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf38.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - DOUBLE dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf39.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB dustbin-view
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf4.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt(zeroblob(4), NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt(zeroblob(4), NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf40.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Int NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf41.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, NULL, -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf42.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NEGATIVE line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', -1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf43.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - NEGATIVE line-max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview', NULL, -1)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf5.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', NULL, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf6.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', 'a', 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', 'a', 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf7.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', 1, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', 1, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf8.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', 1.2, 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', 1.2, 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromextnf9.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFaceExt - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFaceExt('topology', zeroblob(4), 'table', NULL, 'dustbin', 'dustbinview');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFaceExt('topology', zeroblob(4), 'table', NULL, 'dustbin', 'dustbinview')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable1.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(NULL, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(NULL, NULL, 'table', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable10.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable11.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - INT table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 1, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable12.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 1.2, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 1.2, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable13.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, zeroblob(4), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, zeroblob(4), NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable14.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', 'column');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', 'column')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable15.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable16.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable17.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable18.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable19.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, 'zero');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, 'zero')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable2.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(1, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(1, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable20.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable21.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, 0.001);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, 0.001)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable22.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable23.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable24.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable25.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable26.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Integer line-max-points / Integer max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 512, 1000);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, 512, 1000)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable27.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable28.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable29.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable3.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(1.5, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(1.5, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable30.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, 5000.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, 5000.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable31.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Int NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable32.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, NULL, -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable33.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NEGATIVE max point
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, -1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable34.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - NEGATIVE max length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL, NULL, -1)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable4.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable(zeroblob(4), NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable(zeroblob(4), NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable5.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', NULL, 'table', NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable6.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', 'a', 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', 'a', 'table', NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable7.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', 1, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', 1, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable8.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', 1.2, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', 1.2, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtable9.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTable('topology', zeroblob(4), 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTable('topology', zeroblob(4), 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf1.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace(NULL, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace(NULL, NULL, 'table', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf10.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NULL table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf11.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - INT table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 1, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf12.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 1.2, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 1.2, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf13.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - BLOB table
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, zeroblob(4), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, zeroblob(4), NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf14.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Text Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', 'column');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', 'column')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf15.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Int Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf16.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf17.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf18.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NULL tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf19.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, 'zero');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, 'zero')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf2.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace(1, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace(1, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf20.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - BLOB tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf21.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, 0.001);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, 0.001)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf22.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NULL line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf23.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf24.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Text line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf25.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - BLOB line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf26.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Integer line-max-points / Integer max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, 512, 1000);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, 512, 1000)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf27.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf28.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf29.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf3.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace(1.5, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace(1.5, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf30.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, 5000.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, 5000.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf31.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Int NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, -1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf32.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double NEGATIVE tolerance
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, -0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, NULL, -0.1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf33.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NEGATIVE line-max-points
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, -1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf34.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - NEGATIVE line-max-length
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL, NULL, -1)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf4.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace(zeroblob(4), NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace(zeroblob(4), NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf5.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', NULL, 'table', NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf6.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', 'a', 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', 'a', 'table', NULL)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf7.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', 1, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', 1, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf8.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', 1.2, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', 1.2, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeofromtablenf9.testcase.

1
2
3
4
5
6
7
TopoGeo_FromGeoTableNoFace - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_FromGeoTableNoFace('topology', zeroblob(4), 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_FromGeoTableNoFace('topology', zeroblob(4), 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgeheal1.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeHeal - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeHeal(NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeHeal(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgeheal2.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeHeal - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeHeal(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeHeal(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgeheal3.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeHeal - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeHeal(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeHeal(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgeheal4.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeHeal - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeHeal(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeHeal(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgeheal5.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeHeal - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeHeal('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeHeal('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit1.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit(NULL, 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit(NULL, 512)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit10.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Illegal max-points
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit11.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 512, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 512, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit12.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 512, 'ten');
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 512, 'ten')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit13.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 512, zeroblob(10));
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 512, zeroblob(10))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit14.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Illegal max-length - int
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 512, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 512, 0)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit15.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Illegal max-length - double
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 512, 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 512, 0.0)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit2.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit(1, 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit(1, 512)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit3.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit(1.5, 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit(1.5, 512)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit4.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit(zeroblob(4), 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit(zeroblob(4), 512)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit5.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 512)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit6.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Text max-points
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 'fifty');
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 'fifty')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit7.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - BLOB max-points
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit8.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - Double max-points
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeomodedgessplit9.testcase.

1
2
3
4
5
6
7
TopoGeo_ModEdgeSplit - NULL max-points
:memory: #use in-memory database
SELECT TopoGeo_ModEdgeSplit('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ModEdgeSplit('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgeheal1.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgeHeal - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgeHeal(NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgeHeal(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgeheal2.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgeHeal - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgeHeal(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgeHeal(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgeheal3.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgeHeal - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgeHeal(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgeHeal(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgeheal4.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgeHeal - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgeHeal(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgeHeal(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgeheal5.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgeHeal - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgeHeal('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgeHeal('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit1.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit(NULL, 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit(NULL, 512)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit10.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Illegal max-points
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit11.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - NULL max-length
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 512, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 512, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit12.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Text max-length
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 512, 'ten');
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 512, 'ten')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit13.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 512, zeroblob(10));
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 512, zeroblob(10))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit14.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Illegal max-length - int
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 512, 0);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 512, 0)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit15.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Illegal max-length - double
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 512, 0.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 512, 0.0)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit2.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit(1, 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit(1, 512)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit3.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit(1.5, 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit(1.5, 512)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit4.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit(zeroblob(4), 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit(zeroblob(4), 512)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit5.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 512);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 512)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit6.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Text max-points
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 'fifty');
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 'fifty')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit7.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - BLOB max-points
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit8.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - Double max-points
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeonewedgessplit9.testcase.

1
2
3
4
5
6
7
TopoGeo_NewEdgesSplit - NULL max-points
:memory: #use in-memory database
SELECT TopoGeo_NewEdgesSplit('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_NewEdgesSplit('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremoveedges1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges (NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges (NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremoveedges2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremoveedges3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremoveedges4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremoveedges5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingEdges - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingEdges('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingEdges('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovenodes1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes (NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes (NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovenodes2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovenodes3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovenodes4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovenodes5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveDanglingNodes - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveDanglingNodes('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveDanglingNodes('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall1.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces (NULL, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces (NULL, 0.1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall10.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - TEXT min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.5, 'a');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.5, 'a')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall11.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - INT min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.5, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.5, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall12.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - NULL min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.5, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.5, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall13.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - BLOB min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.5, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.5, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall14.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - double min-area
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.5, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.5, 0.1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall2.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces(1, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces(1, NULL, 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall3.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces(1.5, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces(1.5, 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall4.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces(zeroblob(4), 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces(zeroblob(4), 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall5.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 0.1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall6.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - TEXT min-circularity
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 'a');
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 'a')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall7.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - INT min-circularity
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall8.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - NULL min-circularity
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoremovesmall9.testcase.

1
2
3
4
5
6
7
TopoGeo_RemoveSmallFaces - BLOB min-circularity
:memory: #use in-memory database
SELECT TopoGeo_RemoveSmallFaces('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_RemoveSmallFaces('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline1.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Ok #1
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 1, 2 3)', 4326), 512));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 1, 2 3)', 4326), 512))
MULTILINESTRING((0 1, 2 3))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline10.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Text max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'alpha');
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 'alpha')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline11.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - BLOB max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline12.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NULL max-length
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, NULL));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, NULL))
MULTILINESTRING((0 0, 1 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline13.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - TEXT max-length
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, 'abc');
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, 'abc')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline14.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - BLOB max-length
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline15.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Int max-length
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGM(1 2 3, 4 5 6)', 4326), NULL, 1000));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGM(1 2 3, 4 5 6)', 4326), NULL, 1000))
MULTILINESTRING M((1 2 3, 4 5 6))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline16.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Double max-length
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), NULL, 1000.0));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), NULL, 1000.0))
MULTILINESTRING ZM((1 2 3 4, 5 6 7 8))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline17.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Point Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(MakePoint(10, 20, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(MakePoint(10, 20, 4326), NULL)
SQL/MM Spatial exception - invalid Geometry.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline18.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NEGATIVE max-length
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), NULL, -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), NULL, -1)
SQL/MM Spatial exception - max_length should be > 0.0.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline19.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NEGATIVE max-points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), -1);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZM(1 2 3 4, 5 6 7 8)', 4326), -1)
SQL/MM Spatial exception - max_points should be >= 2.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline2.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Ok #2
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZ(1 2 3, 4 5 6)', 4326), NULL, NULL));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRINGZ(1 2 3, 4 5 6)', 4326), NULL, NULL))
MULTILINESTRING Z((1 2 3, 4 5 6))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline3.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline4.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Integer Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(1, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline5.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Double Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(1.2, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(1.2, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline6.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines('alpha', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines('alpha', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline7.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(zeroblob(100), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(zeroblob(100), NULL)
SQL/MM Spatial exception - invalid Geometry.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline8.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - NULL max points
:memory: #use in-memory database
SELECT AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL));
1 # rows (not including the header row)
1 # columns
AsText(TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), NULL))
MULTILINESTRING((0 0, 1 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeosplitline9.testcase.

1
2
3
4
5
6
7
TopoGeo_SubdivideLines - Double max points
:memory: #use in-memory database
SELECT TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_SubdivideLines(GeomFromText('LINESTRING(0 0, 1 1)', 4326), 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable1.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable10.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable11.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable12.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable13.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable14.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable15.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable16.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable17.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable18.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable19.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable2.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable20.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable21.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable22.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text with-spatial-index
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 'tol');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable23.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable24.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable25.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable26.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable3.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable4.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable5.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable6.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable7.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable8.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototable9.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTable('topology', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTable('topology', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen1.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen10.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, NULL, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, NULL, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen11.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - INT ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 1, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 1, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen12.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 1.2, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 1.2, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen13.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB ref-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, zeroblob(4), NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, zeroblob(4), NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen14.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 'column', 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 'column', 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen15.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Int Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen16.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1.2, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', 1.2, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen17.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB Column
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', zeroblob(4), 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', zeroblob(4), 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen18.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen19.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen2.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen20.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen21.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text out-table
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen22.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text tolerance
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 'no', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 'no', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen23.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB toleramce
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen24.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double toleramce
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen25.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL toleramce
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen26.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Integer tolerance
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen27.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen28.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen29.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen3.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen30.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen31.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen4.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Blob Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen5.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Text Topology
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen6.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - TEXT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', 'a', 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', 'a', 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen7.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - INT prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', 1, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', 1, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen8.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - Double prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', 1.2, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', 1.2, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeototablegen9.testcase.

1
2
3
4
5
6
7
TopoGeo_ToGeoTableGeneralize - BLOB prefix
:memory: #use in-memory database
SELECT TopoGeo_ToGeoTableGeneralize('topology', zeroblob(4), 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoGeo_ToGeoTableGeneralize('topology', zeroblob(4), 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds1.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - NULL Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds10.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Text mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', 'mode');
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', 'mode')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds2.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Int Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(1);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds3.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Double Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds4.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Blob Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds5.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Text Topology 
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology');
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds6.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - NULL mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds7.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Int mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds8.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Double mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topogeoupdateseeds9.testcase.

1
2
3
4
5
6
7
TopoGeo_UpdateSeeds - Blob mode
:memory: #use in-memory database
SELECT TopoGeo_UpdateSeeds('topology', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_UpdateSeeds('topology', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/topomettotable25.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone1.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - NULL Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, NULL, 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, NULL, 'destination')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone10.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Double db-prefix
:memory: #use in-memory database
SELECT TopoNet_Clone(1.5, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(1.5, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone11.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Integer db-prefix
:memory: #use in-memory database
SELECT TopoNet_Clone(1, 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(1, 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone12.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - BLOB db-prefix
:memory: #use in-memory database
SELECT TopoNet_Clone(zeroblob(4), 'origin', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(zeroblob(4), 'origin', 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone2.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Int Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone("a", 1, 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone("a", 1, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone3.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Double Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone("a", 1.5, 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone("a", 1.5, 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone4.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Blob Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, zeroblob(4), 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, zeroblob(4), 'destination')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone5.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Text Network (origin)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'topology', 'destination');
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'topology', 'destination')
SQL/MM Spatial exception - invalid network name (origin).
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone6.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - NULL Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone7.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - INT Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone8.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - Double Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetclone9.testcase.

1
2
3
4
5
6
7
TopoNet_Clone - BLOB Network (destination)
:memory: #use in-memory database
SELECT TopoNet_Clone(NULL, 'origin', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_Clone(NULL, 'origin', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetdisambiguate1.testcase.

1
2
3
4
5
6
7
TopoNet_DisambiguateSegmentLinks - NULL Network
:memory: #use in-memory database
SELECT TopoNet_DisambiguateSegmentLinks(NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_DisambiguateSegmentLinks(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetdisambiguate2.testcase.

1
2
3
4
5
6
7
TopoNet_DisambiguateSegmentLinks - Int Network
:memory: #use in-memory database
SELECT TopoNet_DisambiguateSegmentLinks(1);
1 # rows (not including the header row)
1 # columns
TopoNet_DisambiguateSegmentLinks(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetdisambiguate3.testcase.

1
2
3
4
5
6
7
TopoNet_DisambiguateSegmentLinks - Double Network
:memory: #use in-memory database
SELECT TopoNet_DisambiguateSegmentLinks(1.5);
1 # rows (not including the header row)
1 # columns
TopoNet_DisambiguateSegmentLinks(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetdisambiguate4.testcase.

1
2
3
4
5
6
7
TopoNet_DisambiguateSegmentLinks - Blob Network 
:memory: #use in-memory database
SELECT TopoNet_DisambiguateSegmentLinks(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_DisambiguateSegmentLinks(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetdisambiguate5.testcase.

1
2
3
4
5
6
7
TopoNet_DisambiguateSegmentLinks - Text Network 
:memory: #use in-memory database
SELECT TopoNet_DisambiguateSegmentLinks('network');
1 # rows (not including the header row)
1 # columns
TopoNet_DisambiguateSegmentLinks('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable1.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - NULL Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(NULL, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(NULL, NULL, 'table', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable10.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - NULL table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, NULL, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable11.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - INT table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 1, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 1, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable12.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 1.2, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 1.2, NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable13.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - BLOB table
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, zeroblob(4), NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, zeroblob(4), NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable14.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', 'column');
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', 'column')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable15.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable16.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable17.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable2.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Int Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(1, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(1, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable3.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(1.5, NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(1.5, NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable4.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Blob Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable(zeroblob(4), NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable(zeroblob(4), NULL, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable5.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Text Network
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', NULL, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', NULL, 'table', NULL)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable6.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', 'a', 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', 'a', 'table', NULL)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable7.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', 1, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', 1, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable8.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', 1.2, 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', 1.2, 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetfromtable9.testcase.

1
2
3
4
5
6
7
TopoNet_FromGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_FromGeoTable('network', zeroblob(4), 'table', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_FromGeoTable('network', zeroblob(4), 'table', NULL)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable1.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(NULL, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(NULL, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable10.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, NULL, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, NULL, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable11.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - INT ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 1, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 1, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable12.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 1.2, NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 1.2, NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable13.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, zeroblob(4), NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, zeroblob(4), NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable14.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', 'column', 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', 'column', 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable15.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Int Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', 1, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', 1, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable16.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', 1.2, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', 1.2, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable17.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', zeroblob(4), 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', zeroblob(4), 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable18.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - NULL out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('topology', NULL, 'table', NULL, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('topology', NULL, 'table', NULL, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable19.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('topology', NULL, 'table', NULL, 1.2);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('topology', NULL, 'table', NULL, 1.2)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable2.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Int Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(1, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(1, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable20.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('topology', NULL, 'table', NULL, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable21.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable22.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 'no');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable23.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable24.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1.1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable25.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL with-spatial-index
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable26.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable3.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(1.5, NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(1.5, NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable4.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Blob Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable(zeroblob(4), NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable5.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Text Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', NULL, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable6.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', 'a', 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', 'a', 'table', NULL, 'out')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable7.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - INT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', 1, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', 1, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable8.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - Double prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', 1.2, 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', 1.2, 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotable9.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTable - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTable('network', zeroblob(4), 'table', NULL, 'out');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTable('network', zeroblob(4), 'table', NULL, 'out')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen1.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(NULL, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen10.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, NULL, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, NULL, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen11.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - INT ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 1, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 1, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen12.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double ref-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 1.2, NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 1.2, NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen13.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, zeroblob(4), NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, zeroblob(4), NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen14.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 'column', 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 'column', 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen15.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Int Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen16.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1.2, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', 1.2, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen17.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB Column
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', zeroblob(4), 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', zeroblob(4), 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen18.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, NULL, 10.0)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen19.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, 1.2, 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen2.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Int Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(1, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen20.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('topology', NULL, 'table', NULL, zeroblob(4), 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen21.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text out-table
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen22.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 'tol');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 'tol')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen23.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen24.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1.1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1.1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen25.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen26.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Integer tolerance
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen27.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 'no');
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen28.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen29.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1.1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen3.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(1.5, NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen30.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Integer with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen31.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - NULL with-spatial-inxed
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen4.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Blob Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize(zeroblob(4), NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen5.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Text Network
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', NULL, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen6.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - TEXT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', 'a', 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', 'a', 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen7.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - INT prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', 1, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', 1, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen8.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - Double prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', 1.2, 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', 1.2, 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponettotablegen9.testcase.

1
2
3
4
5
6
7
TopoNet_ToGeoTableGeneralize - BLOB prefix
:memory: #use in-memory database
SELECT TopoNet_ToGeoTableGeneralize('network', zeroblob(4), 'table', NULL, 'out', 10.0);
1 # rows (not including the header row)
1 # columns
TopoNet_ToGeoTableGeneralize('network', zeroblob(4), 'table', NULL, 'out', 10.0)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds1.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - NULL Network
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds10.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Text mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', 'mode');
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', 'mode')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds2.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Int Network
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(1);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds3.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Double Network
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(1.5);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds4.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Blob Network 
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds(zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds5.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Text Network 
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network');
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds6.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - NULL mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', NULL);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds7.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Int mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', 1);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', 1)
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds8.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Double mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', 1.5);
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toponetupdateseeds9.testcase.

1
2
3
4
5
6
7
TopoNet_UpdateSeeds - Blob mode
:memory: #use in-memory database
SELECT TopoNet_UpdateSeeds('network', zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoNet_UpdateSeeds('network', zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap1.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - NULL Topology
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap(NULL, MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap(NULL, MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap10.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - NULL tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), NULL, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), NULL, 0.1, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap11.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Text tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 'snap', 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 'snap', 0.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap12.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - BLOB tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), zeroblob(12), 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), zeroblob(12), 0.1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap13.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - NULL iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap14.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Text iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 'iterate');
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 'iterate')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap15.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - DOUBLE iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 1.5);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap16.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - BLOB iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap17.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - NULL tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.1, NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.1, NULL, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap18.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Text tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.1, 'tolerance', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.1, 'tolerance', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap19.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - BLOB tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.1, zeroblob(4), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.1, zeroblob(4), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap2.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Int Topology
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap(1, MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap(1, MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap20.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - non-existing topology
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap21.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Int NEGATIVE tolerance_removal
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 1, -1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 1, -1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap22.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - double NEGATIVE tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, -0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, -0.1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap23.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Int NEGATIVE tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), -1, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), -1, 0.1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap24.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Double NEGATIVE tolerance_snap
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), -0.01, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), -0.01, 0.1, 1)
SQL/MM Spatial exception - illegal negative tolerance.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap25.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - long form NULL iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, NULL);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap26.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - long form Text iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, 'no');
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, 'no')
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap27.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - long form Double iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, 0.1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, 0.1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap28.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - long form BLOB iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap29.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - long form Int iterate
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', MakePoint(1, 2, 4326), 0.01, 0.1, 1)
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap3.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Double Topology
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap(1.5, MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap(1.5, MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap4.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - BLOB Topology
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap(zeroblob(10), MakePoint(1, 2, 4326), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap(zeroblob(10), MakePoint(1, 2, 4326), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap5.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - NULL Geometry
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', NULL, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', NULL, 1)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap6.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', 1, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', 1, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap7.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Int Geometry
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', 1-5, 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', 1.5, 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap8.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Text Geometry
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', 'geom', 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', 'geom', 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/toposnap9.testcase.

1
2
3
4
5
6
7
TopoGeo_TopoSnap - Invalid BLOB Geometry
:memory: #use in-memory database
SELECT TopoGeo_TopoSnap('topo', zeroblob(100), 1);
1 # rows (not including the header row)
1 # columns
TopoGeo_TopoSnap('topo', zeroblob(100), 1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validatetopogeo1.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - NULL Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(NULL);
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validatetopogeo2.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Int Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(1);
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validatetopogeo3.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Double Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(1.5);
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validatetopogeo4.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Blob Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validatetopogeo5.testcase.

1
2
3
4
5
6
7
ST_ValidateTopoGeo - Text Topology
:memory: #use in-memory database
SELECT ST_ValidateTopoGeo('topology');
1 # rows (not including the header row)
1 # columns
ST_ValidateTopoGeo('topology')
SQL/MM Spatial exception - invalid topology name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validlogicalnet1.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - NULL Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(NULL);
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validlogicalnet2.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Int Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(1);
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validlogicalnet3.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Double Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(1.5);
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validlogicalnet4.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Blob Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validlogicalnet5.testcase.

1
2
3
4
5
6
7
ST_ValidLogicalNet - Text Network
:memory: #use in-memory database
SELECT ST_ValidLogicalNet('network');
1 # rows (not including the header row)
1 # columns
ST_ValidLogicalNet('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validspatialnet1.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - NULL Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(NULL);
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(NULL)
SQL/MM Spatial exception - null argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validspatialnet2.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Int Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(1);
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(1)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validspatialnet3.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Double Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(1.5);
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(1.5)
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validspatialnet4.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Blob Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet(zeroblob(4))
SQL/MM Spatial exception - invalid argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_rttopo_tests/validspatialnet5.testcase.

1
2
3
4
5
6
7
ST_ValidSpatialNet - Text Network
:memory: #use in-memory database
SELECT ST_ValidSpatialNet('network');
1 # rows (not including the header row)
1 # columns
ST_ValidSpatialNet('network')
SQL/MM Spatial exception - invalid network name.
<
<
<
<
<
<
<














Changes to test/sql_stmt_security_tests/Makefile.am.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	eval2.testcase \
	eval3.testcase \
	eval4.testcase \
	exportdbf1.testcase \
	exportdbf2.testcase \
	exportdbf3.testcase \
	exportdbf4.testcase \
	exportdbf5.testcase \
	exportdbf6.testcase \
	exportdbf7.testcase \
	exportdbf8.testcase \
	exportdbf9.testcase \
	exportdbf10.testcase \
	exportdxf1.testcase \
	exportdxf2.testcase \
	exportdxf3.testcase \
	exportdxf4.testcase \
	exportdxf5.testcase \
	exportdxf6.testcase \
	exportdxf7.testcase \
................................................................................
	exportkml7.testcase \
	exportshp1.testcase \
	exportshp2.testcase \
	exportshp3.testcase \
	exportshp4.testcase \
	exportshp5.testcase \
	exportshp6.testcase \
	exportshp7.testcase \
	exportshp8.testcase \
	exportshp9.testcase \
	exportshp10.testcase \
	exportshp11.testcase \
	exportshp12.testcase \
	exportdxf11.testcase \
	importdbf1.testcase \
	importdbf2.testcase \
	importdbf3.testcase \
	importdbf4.testcase \
	importdbf5.testcase \
	importdbf6.testcase \
	importdbf7.testcase \
	importdbf8.testcase \
	importdbf9.testcase \
	importdbf10.testcase \
	importdbf11.testcase \
	importdbf12.testcase \
	importdbf13.testcase \
	importdxf1.testcase \
	importdxf2.testcase \
	importdxf3.testcase \
	importdxf4.testcase \
	importdxf5.testcase \
	importdxf6.testcase \
	importdxf7.testcase \
................................................................................
	importshp8.testcase \
	importshp9.testcase \
	importshp10.testcase \
	importshp11.testcase \
	importshp12.testcase \
	importshp13.testcase \
	importshp14.testcase \
	importshp15.testcase \
	importshp16.testcase \
	importshp17.testcase \
	importshp18.testcase \
	importshp19.testcase \
	importshp20.testcase \
	importshp21.testcase \
	importshp22.testcase \
	importxls1.testcase \
	importxls2.testcase \
	importxls3.testcase \
	importxls4.testcase \
	importxls5.testcase \
	importxls6.testcase \
	importxls7.testcase \
	importxls8.testcase \
	importxls9.testcase \
	importxls10.testcase \
	importxls11.testcase \
	importxls12.testcase \
	importxls13.testcase \
	importxls14.testcase \
	importxls15.testcase \
	importxls16.testcase \
	importxls17.testcase \
	isXblob1.testcase \
	isXblob2.testcase \
	isXblob3.testcase \
	isXblob4.testcase \
	isXblob8.testcase \
	isXblob9.testcase \
	sp_fromfile1.testcase \
	sp_fromfile2.testcase \
	sp_fromfile3.testcase \
	sp_fromfile4.testcase \
	sp_fromfile5.testcase \
	sp_fromfile6.testcase \
	sp_fromfile7.testcase \
	sp_fromfile8.testcase \
	sp_fromfile9.testcase \
	sp_fromfile10.testcase \
	sp_fromfile11.testcase \
	sp_fromfile12.testcase







<
<
<
<
<
<







 







<
<
<
<
<
<








<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|
<
<
<
<
<
<
<
<
<
<
<
<
11
12
13
14
15
16
17






18
19
20
21
22
23
24
..
46
47
48
49
50
51
52






53
54
55
56
57
58
59
60






61
62
63
64
65
66
67
...
100
101
102
103
104
105
106

























107
108
109
110
111
112












	eval2.testcase \
	eval3.testcase \
	eval4.testcase \
	exportdbf1.testcase \
	exportdbf2.testcase \
	exportdbf3.testcase \
	exportdbf4.testcase \






	exportdxf1.testcase \
	exportdxf2.testcase \
	exportdxf3.testcase \
	exportdxf4.testcase \
	exportdxf5.testcase \
	exportdxf6.testcase \
	exportdxf7.testcase \
................................................................................
	exportkml7.testcase \
	exportshp1.testcase \
	exportshp2.testcase \
	exportshp3.testcase \
	exportshp4.testcase \
	exportshp5.testcase \
	exportshp6.testcase \






	exportdxf11.testcase \
	importdbf1.testcase \
	importdbf2.testcase \
	importdbf3.testcase \
	importdbf4.testcase \
	importdbf5.testcase \
	importdbf6.testcase \
	importdbf7.testcase \






	importdxf1.testcase \
	importdxf2.testcase \
	importdxf3.testcase \
	importdxf4.testcase \
	importdxf5.testcase \
	importdxf6.testcase \
	importdxf7.testcase \
................................................................................
	importshp8.testcase \
	importshp9.testcase \
	importshp10.testcase \
	importshp11.testcase \
	importshp12.testcase \
	importshp13.testcase \
	importshp14.testcase \

























	isXblob1.testcase \
	isXblob2.testcase \
	isXblob3.testcase \
	isXblob4.testcase \
	isXblob8.testcase \
	isXblob9.testcase 












Changes to test/sql_stmt_security_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
...
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
...
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
...
429
430
431
432
433
434
435

436
437
438
439
440
441
442
...
603
604
605
606
607
608
609
610
611
612
613
614
615
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_security_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	eval2.testcase \
	eval3.testcase \
	eval4.testcase \
	exportdbf1.testcase \
	exportdbf2.testcase \
	exportdbf3.testcase \
	exportdbf4.testcase \
	exportdbf5.testcase \
	exportdbf6.testcase \
	exportdbf7.testcase \
	exportdbf8.testcase \
	exportdbf9.testcase \
	exportdbf10.testcase \
	exportdxf1.testcase \
	exportdxf2.testcase \
	exportdxf3.testcase \
	exportdxf4.testcase \
	exportdxf5.testcase \
	exportdxf6.testcase \
	exportdxf7.testcase \
................................................................................
	exportkml7.testcase \
	exportshp1.testcase \
	exportshp2.testcase \
	exportshp3.testcase \
	exportshp4.testcase \
	exportshp5.testcase \
	exportshp6.testcase \
	exportshp7.testcase \
	exportshp8.testcase \
	exportshp9.testcase \
	exportshp10.testcase \
	exportshp11.testcase \
	exportshp12.testcase \
	exportdxf11.testcase \
	importdbf1.testcase \
	importdbf2.testcase \
	importdbf3.testcase \
	importdbf4.testcase \
	importdbf5.testcase \
	importdbf6.testcase \
	importdbf7.testcase \
	importdbf8.testcase \
	importdbf9.testcase \
	importdbf10.testcase \
	importdbf11.testcase \
	importdbf12.testcase \
	importdbf13.testcase \
	importdxf1.testcase \
	importdxf2.testcase \
	importdxf3.testcase \
	importdxf4.testcase \
	importdxf5.testcase \
	importdxf6.testcase \
	importdxf7.testcase \
................................................................................
	importshp8.testcase \
	importshp9.testcase \
	importshp10.testcase \
	importshp11.testcase \
	importshp12.testcase \
	importshp13.testcase \
	importshp14.testcase \
	importshp15.testcase \
	importshp16.testcase \
	importshp17.testcase \
	importshp18.testcase \
	importshp19.testcase \
	importshp20.testcase \
	importshp21.testcase \
	importshp22.testcase \
	importxls1.testcase \
	importxls2.testcase \
	importxls3.testcase \
	importxls4.testcase \
	importxls5.testcase \
	importxls6.testcase \
	importxls7.testcase \
	importxls8.testcase \
	importxls9.testcase \
	importxls10.testcase \
	importxls11.testcase \
	importxls12.testcase \
	importxls13.testcase \
	importxls14.testcase \
	importxls15.testcase \
	importxls16.testcase \
	importxls17.testcase \
	isXblob1.testcase \
	isXblob2.testcase \
	isXblob3.testcase \
	isXblob4.testcase \
	isXblob8.testcase \
	isXblob9.testcase \
	sp_fromfile1.testcase \
	sp_fromfile2.testcase \
	sp_fromfile3.testcase \
	sp_fromfile4.testcase \
	sp_fromfile5.testcase \
	sp_fromfile6.testcase \
	sp_fromfile7.testcase \
	sp_fromfile8.testcase \
	sp_fromfile9.testcase \
	sp_fromfile10.testcase \
	sp_fromfile11.testcase \
	sp_fromfile12.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_security_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_security_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







<
<
<
<
<
<







 







<
<
<
<
<
<








<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|
<
<
<
<
<
<
<
<
<
<
<
<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
252
253
254
255
256
257
258






259
260
261
262
263
264
265
...
287
288
289
290
291
292
293






294
295
296
297
298
299
300
301






302
303
304
305
306
307
308
...
341
342
343
344
345
346
347

























348
349
350
351
352
353












354
355
356
357
358
359
360
...
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
...
538
539
540
541
542
543
544


545
546
547
548
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_security_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	eval2.testcase \
	eval3.testcase \
	eval4.testcase \
	exportdbf1.testcase \
	exportdbf2.testcase \
	exportdbf3.testcase \
	exportdbf4.testcase \






	exportdxf1.testcase \
	exportdxf2.testcase \
	exportdxf3.testcase \
	exportdxf4.testcase \
	exportdxf5.testcase \
	exportdxf6.testcase \
	exportdxf7.testcase \
................................................................................
	exportkml7.testcase \
	exportshp1.testcase \
	exportshp2.testcase \
	exportshp3.testcase \
	exportshp4.testcase \
	exportshp5.testcase \
	exportshp6.testcase \






	exportdxf11.testcase \
	importdbf1.testcase \
	importdbf2.testcase \
	importdbf3.testcase \
	importdbf4.testcase \
	importdbf5.testcase \
	importdbf6.testcase \
	importdbf7.testcase \






	importdxf1.testcase \
	importdxf2.testcase \
	importdxf3.testcase \
	importdxf4.testcase \
	importdxf5.testcase \
	importdxf6.testcase \
	importdxf7.testcase \
................................................................................
	importshp8.testcase \
	importshp9.testcase \
	importshp10.testcase \
	importshp11.testcase \
	importshp12.testcase \
	importshp13.testcase \
	importshp14.testcase \

























	isXblob1.testcase \
	isXblob2.testcase \
	isXblob3.testcase \
	isXblob4.testcase \
	isXblob8.testcase \
	isXblob9.testcase 













all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_security_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_security_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sql_stmt_security_tests/exportdbf10.testcase.

1
2
3
4
5
6
7
exportDBF - OK colname case
:memory: #use in-memory database
SELECT ExportDBF('table', 'test.dbf', 'UTF-8', 'LOWER');
1 # rows (not including the header row)
1 # columns
ExportDBF('table', 'test.dbf', 'UTF-8', 'LOWER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportdbf5.testcase.

1
2
3
4
5
6
7
exportDBF - NULL colname case
:memory: #use in-memory database
SELECT ExportDBF('table', 'test.dbf', 'UTF-8', NULL);
1 # rows (not including the header row)
1 # columns
ExportDBF('table', 'test.dbf', 'UTF-8', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportdbf6.testcase.

1
2
3
4
5
6
7
exportDBF - OK colname case
:memory: #use in-memory database
SELECT ExportDBF('table', 'test.dbf', 'UTF-8', 'UPPER');
1 # rows (not including the header row)
1 # columns
ExportDBF('table', 'test.dbf', 'UTF-8', 'UPPER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportdbf7.testcase.

1
2
3
4
5
6
7
exportDBF - OK colname case
:memory: #use in-memory database
SELECT ExportDBF('table', 'test.dbf', 'UTF-8', 'UPPERCASE');
1 # rows (not including the header row)
1 # columns
ExportDBF('table', 'test.dbf', 'UTF-8', 'UPPERCASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportdbf8.testcase.

1
2
3
4
5
6
7
exportDBF - OK colname case
:memory: #use in-memory database
SELECT ExportDBF('table', 'test.dbf', 'UTF-8', 'SAMECASE');
1 # rows (not including the header row)
1 # columns
ExportDBF('table', 'test.dbf', 'UTF-8', 'SAMECASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportdbf9.testcase.

1
2
3
4
5
6
7
exportDBF - OK colname case
:memory: #use in-memory database
SELECT ExportDBF('table', 'test.dbf', 'UTF-8', 'SAME');
1 # rows (not including the header row)
1 # columns
ExportDBF('table', 'test.dbf', 'UTF-8', 'SAME')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportshp10.testcase.

1
2
3
4
5
6
7
exportSHP - OK colname case
:memory: #use in-memory database
SELECT ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'SAMECASE');
1 # rows (not including the header row)
1 # columns
ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'SAMECASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportshp11.testcase.

1
2
3
4
5
6
7
exportSHP - OK colname case
:memory: #use in-memory database
SELECT ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'SAME');
1 # rows (not including the header row)
1 # columns
ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'SAME')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportshp12.testcase.

1
2
3
4
5
6
7
exportSHP - OK colname case
:memory: #use in-memory database
SELECT ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'LOWER');
1 # rows (not including the header row)
1 # columns
ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'LOWER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportshp7.testcase.

1
2
3
4
5
6
7
exportSHP - NULL colname case
:memory: #use in-memory database
SELECT ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', NULL);
1 # rows (not including the header row)
1 # columns
ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportshp8.testcase.

1
2
3
4
5
6
7
exportSHP - OK colname case
:memory: #use in-memory database
SELECT ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'UPPER');
1 # rows (not including the header row)
1 # columns
ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'UPPER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/exportshp9.testcase.

1
2
3
4
5
6
7
exportSHP - OK colname case
:memory: #use in-memory database
SELECT ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'UPPERCASE');
1 # rows (not including the header row)
1 # columns
ExportSHP('test', 'geom', 'shapefile', 'UTF-8', 'POINT', 'UPPERCASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importdbf10.testcase.

1
2
3
4
5
6
7
importDBF - OK colname case
:memory: #use in-memory database
SELECT ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'UPPERCASE');
1 # rows (not including the header row)
1 # columns
ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'UPPERCASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importdbf11.testcase.

1
2
3
4
5
6
7
importDBF - OK colname case
:memory: #use in-memory database
SELECT ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'SAMECASE');
1 # rows (not including the header row)
1 # columns
ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'SAMECASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importdbf12.testcase.

1
2
3
4
5
6
7
importDBF - OK colname case
:memory: #use in-memory database
SELECT ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'SAME');
1 # rows (not including the header row)
1 # columns
ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'SAME')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importdbf13.testcase.

1
2
3
4
5
6
7
importDBF - OK colname case
:memory: #use in-memory database
SELECT ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'LOWER');
1 # rows (not including the header row)
1 # columns
ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'LOWER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importdbf8.testcase.

1
2
3
4
5
6
7
importDBF - NULL colname case
:memory: #use in-memory database
SELECT ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, NULL);
1 # rows (not including the header row)
1 # columns
ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importdbf9.testcase.

1
2
3
4
5
6
7
importDBF - OK colname case
:memory: #use in-memory database
SELECT ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'UPPER');
1 # rows (not including the header row)
1 # columns
ImportDBF('test.dbf', 'table', 'UTF-8', 'id', 1, 'UPPER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp15.testcase.

1
2
3
4
5
6
7
importSHP - NULL colname case
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, NULL);
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp16.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'UPPER');
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'UPPER')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp17.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'UPPERCASE');
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'UPPERCASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp18.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'SAMECASE');
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'SAMECASE')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp19.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case - NULL statistics
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'SAME', NULL);
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'SAME', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp20.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case - OK statistics
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'LOWER', 1);
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'LOWER', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp21.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case - OK statistics, NULL verbose
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'SAME', 1, NULL);
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'SAME', 1, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importshp22.testcase.

1
2
3
4
5
6
7
importSHP - OK colname case - OK statistics, OL verbose
:memory: #use in-memory database
SELECT ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'LOWER', 1, 1);
1 # rows (not including the header row)
1 # columns
ImportSHP('shapefile', 'table', 'UTF-8', 4326, 'geom', 'id', 'POINT', 1, 1, 1, 0, 'LOWER', 1, 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls1.testcase.

1
2
3
4
5
6
7
importXLS - NULL filename
:memory: #use in-memory database
SELECT ImportXLS(NULL, 'table');
1 # rows (not including the header row)
1 # columns
ImportXLS(NULL, 'table')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls10.testcase.

1
2
3
4
5
6
7
importXLS - BLOB index
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', zeroblob(4));
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls11.testcase.

1
2
3
4
5
6
7
importXLS - TEXT index
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', '1');
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', '1')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls12.testcase.

1
2
3
4
5
6
7
importXLS - DOUBLE index
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', 1.1);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', 1.1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls13.testcase.

1
2
3
4
5
6
7
importXLS - NULL titles
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', 1, NULL);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', 1, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls14.testcase.

1
2
3
4
5
6
7
importXLS - BLOB titles
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', 1, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', 1, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls15.testcase.

1
2
3
4
5
6
7
importXLS - TEXT titles
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', 1, '0');
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', 1, '0')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls16.testcase.

1
2
3
4
5
6
7
importXLS - DOUBLE titles
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', 1, 0.5);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', 1, 0.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls17.testcase.

1
2
3
4
5
6
7
importXLS - INT titles
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', 1, 1);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', 1, 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls2.testcase.

1
2
3
4
5
6
7
importXLS - BLOB filename
:memory: #use in-memory database
SELECT ImportXLS(zeroblob(10), 'table');
1 # rows (not including the header row)
1 # columns
ImportXLS(zeroblob(10), 'table')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls3.testcase.

1
2
3
4
5
6
7
importXLS - INT filename
:memory: #use in-memory database
SELECT ImportXLS(1, 'table');
1 # rows (not including the header row)
1 # columns
ImportXLS(1, 'table')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls4.testcase.

1
2
3
4
5
6
7
importXLS - DOUBLE filename
:memory: #use in-memory database
SELECT ImportXLS(1.1, 'table');
1 # rows (not including the header row)
1 # columns
ImportXLS(1.1, 'table')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls5.testcase.

1
2
3
4
5
6
7
importXLS - NULL tablename
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', NULL);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls6.testcase.

1
2
3
4
5
6
7
importXLS - BLOB tablename
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', zeroblob(10));
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls7.testcase.

1
2
3
4
5
6
7
importXLS - INT tablename
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 1);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls8.testcase.

1
2
3
4
5
6
7
importXLS - DOUBLE tablename
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 1.1);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 1.1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/importxls9.testcase.

1
2
3
4
5
6
7
importXLS - NULL index
:memory: #use in-memory database
SELECT ImportXLS('datasheet.xls', 'tablename', NULL);
1 # rows (not including the header row)
1 # columns
ImportXLS('datasheet.xls', 'tablename', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile1.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - NULL filepath
:memory: #use in-memory database
SELECT SqlProc_FromFile(NULL);
1 # rows (not including the header row)
1 # columns
SqlProc_FromFile(NULL)
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile10.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - DOUBLE charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt', zeroblob(10)));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt', zeroblob(10)))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile11.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - valid charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt', 'ASCII'));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt', 'ASCII'))
00CD0187030087040087636F6C3187010087040087636F6C32870100870500877461626C658701008723008753454C4543542040636F6C31402C2040636F6C32402046524F4D20407461626C65400ADC
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile12.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - undefined charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt', 'abcdefghi'));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt', 'abcdefghi'))
SqlProc exception - unable to parse the external File.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile2.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - INT filepath
:memory: #use in-memory database
SELECT SqlProc_FromFile(2);
1 # rows (not including the header row)
1 # columns
SqlProc_FromFile(2)
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile3.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - DOUBLE filepath
:memory: #use in-memory database
SELECT SqlProc_FromFile(2.5);
1 # rows (not including the header row)
1 # columns
SqlProc_FromFile(2.5)
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile4.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - BLOB filepath
:memory: #use in-memory database
SELECT SqlProc_FromFile(zeroblob(10));
1 # rows (not including the header row)
1 # columns
SqlProc_FromFile(zeroblob(10))
SqlProc exception - illegal File Path argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile5.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - not existing filepath
:memory: #use in-memory database
SELECT SqlProc_FromFile('not_existing.file');
1 # rows (not including the header row)
1 # columns
SqlProc_FromFile('not_existing.file')
SqlProc exception - unable to parse the external File.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile6.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - valid filepath
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt'));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt'))
00CD0187030087040087636F6C3187010087040087636F6C32870100870500877461626C658701008723008753454C4543542040636F6C31402C2040636F6C32402046524F4D20407461626C65400ADC
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile7.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - NULL charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt', NULL));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt', NULL))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile8.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - INT charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt', 1));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt', 1))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_security_tests/sp_fromfile9.testcase.

1
2
3
4
5
6
7
SqlProc_FromFile - DOUBLE charset
:memory: #use in-memory database
SELECT Hex(SqlProc_FromFile('./sqlproc_sample.txt', 1.5));
1 # rows (not including the header row)
1 # columns
Hex(SqlProc_FromFile('./sqlproc_sample.txt', 1.5))
SqlProc exception - illegal Charset Encodind argument.
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12

EXTRA_DIST = sequence_currval1.testcase \
	sequence_currval2.testcase \
	sequence_lastval.testcase \
	sequence_nextval1.testcase \
	sequence_nextval2.testcase \
	sequence_setval1.testcase \
	sequence_setval2.testcase \
	sequence_setval3.testcase \
	sequence_setval4.testcase \
	sequence_setval5.testcase 
	
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted test/sql_stmt_sequence_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_sequence_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = sequence_currval1.testcase \
	sequence_currval2.testcase \
	sequence_lastval.testcase \
	sequence_nextval1.testcase \
	sequence_nextval2.testcase \
	sequence_setval1.testcase \
	sequence_setval2.testcase \
	sequence_setval3.testcase \
	sequence_setval4.testcase \
	sequence_setval5.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_sequence_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_sequence_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_sequence_tests/sequence_currval1.testcase.

1
2
3
4
5
6
7
sequence_currval(NULL) - NULL Sequence
:memory: #use in-memory database
SELECT sequence_currval(NULL)
1 # rows (not including the header row)
1 # columns
sequence_currval(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_currval2.testcase.

1
2
3
4
5
6
7
sequence_currval('name') - Named Sequence
:memory: #use in-memory database
SELECT sequence_currval('name')
1 # rows (not including the header row)
1 # columns
sequence_currval('name')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_lastval.testcase.

1
2
3
4
5
6
7
sequence_lastval()
:memory: #use in-memory database
SELECT sequence_lastval()
1 # rows (not including the header row)
1 # columns
sequence_lastval()
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_nextval1.testcase.

1
2
3
4
5
6
7
sequence_nextval(NULL) - NULL Sequence
:memory: #use in-memory database
SELECT sequence_nextval(NULL)
1 # rows (not including the header row)
1 # columns
sequence_nextval(NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_nextval2.testcase.

1
2
3
4
5
6
7
sequence_nextval('name') - Named Sequence
:memory: #use in-memory database
SELECT sequence_nextval('name')
1 # rows (not including the header row)
1 # columns
sequence_nextval('name')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_setval1.testcase.

1
2
3
4
5
6
7
sequence_setval(NULL, NULL) - NULL Sequence, NULL value
:memory: #use in-memory database
SELECT sequence_setval(NULL, NULL)
1 # rows (not including the header row)
1 # columns
sequence_setval(NULL, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_setval2.testcase.

1
2
3
4
5
6
7
sequence_setval('name', NULL) - Named Sequence, NULL value
:memory: #use in-memory database
SELECT sequence_setval('name', NULL)
1 # rows (not including the header row)
1 # columns
sequence_setval('name', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_setval3.testcase.

1
2
3
4
5
6
7
sequence_setval(NULL, 1000) - NULL Sequence, valid value
:memory: #use in-memory database
SELECT sequence_setval(NULL, 1000)
1 # rows (not including the header row)
1 # columns
sequence_setval(NULL, 1000)
1000
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_setval4.testcase.

1
2
3
4
5
6
7
sequence_setval('name', 'a') - Named Sequence, invalid value
:memory: #use in-memory database
SELECT sequence_setval('name', 'a')
1 # rows (not including the header row)
1 # columns
sequence_setval('name', 'a')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_sequence_tests/sequence_setval5.testcase.

1
2
3
4
5
6
7
sequence_setval('name', 100) - Named Sequence, valid value
:memory: #use in-memory database
SELECT sequence_setval('name', 100)
1 # rows (not including the header row)
1 # columns
sequence_setval('name', 100)
100
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/Makefile.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
# Makefile.in generated by automake 1.15 from Makefile.am.
# test/sql_stmt_tests/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.



am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/libspatialite
pkgincludedir = $(includedir)/libspatialite
pkglibdir = $(libdir)/libspatialite
pkglibexecdir = $(libexecdir)/libspatialite
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
subdir = test/sql_stmt_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = aclocal-1.15
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
AS = as
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.15
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -Wall -Wextra -Wunused -pedantic -g -O0 -fprofile-arcs -ftest-coverage -g
CPP = gcc -E
CPPFLAGS = 
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = dlltool
DSYMUTIL = 
DUMPBIN = 
ECHO_C = 
ECHO_N = -n
ECHO_T = 
EGREP = /usr/bin/grep -E
EXEEXT = 
FGREP = /usr/bin/grep -F
GEOSCONFIG = /usr/bin/geos-config
GEOS_CFLAGS = -I/usr/include
GEOS_LDFLAGS = -L/usr/lib64
GREP = /usr/bin/grep
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /usr/bin/ld -m elf_x86_64
LDFLAGS = 
LIBOBJS = 
LIBS = -lrttopo -lfreexl -lproj -lsqlite3 -lz -lsqlite3  -L/usr/lib64 -lgeos_c
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBXML2_CFLAGS = -I/usr/include/libxml2
LIBXML2_LIBS = -lxml2
LIPO = 
LN_S = ln -s
LTLIBOBJS = 
MAINT = #
MAKEINFO = makeinfo
MANIFEST_TOOL = :
MKDIR_P = /usr/bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT = 
OBJDUMP = objdump
OBJEXT = o
OTOOL = 
OTOOL64 = 
PACKAGE = libspatialite
PACKAGE_BUGREPORT = a.furieri@lqt.it
PACKAGE_NAME = libspatialite
PACKAGE_STRING = libspatialite 5.0.0-devel
PACKAGE_TARNAME = libspatialite
PACKAGE_URL = 
PACKAGE_VERSION = 5.0.0-devel
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR = 
PKG_CONFIG_PATH = 
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE = 
SHELL = /bin/sh
STRIP = strip
VERSION = 5.0.0-devel
abs_builddir = /home/sandro/fossil/libspatialite/test/sql_stmt_tests
abs_srcdir = /home/sandro/fossil/libspatialite/test/sql_stmt_tests
abs_top_builddir = /home/sandro/fossil/libspatialite
abs_top_srcdir = /home/sandro/fossil/libspatialite
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_DUMPBIN = 
am__include = include
am__leading_dot = .
am__quote = 
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias = 
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias = 
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/sandro/fossil/libspatialite/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias = 
top_build_prefix = ../../
top_builddir = ../..
top_srcdir = ../..
EXTRA_DIST = addpoint10.testcase \
	addpoint11.testcase \
	addpoint12.testcase \
	addpoint13.testcase \
	addpoint14.testcase \
	addpoint15.testcase \
	addpoint16.testcase \
	addpoint17.testcase \
	addpoint18.testcase \
	addpoint19.testcase \
	addpoint1.testcase \
	addpoint20.testcase \
	addpoint21.testcase \
	addpoint22.testcase \
	addpoint23.testcase \
	addpoint24.testcase \
	addpoint25.testcase \
	addpoint26.testcase \
	addpoint27.testcase \
	addpoint28.testcase \
	addpoint2.testcase \
	addpoint3.testcase \
	addpoint4.testcase \
	addpoint5.testcase \
	addpoint6.testcase \
	addpoint7.testcase \
	addpoint8.testcase \
	addpoint9.testcase \
	addmeasure1.testcase \
	addmeasure2.testcase \
	addmeasure3.testcase \
	addmeasure4.testcase \
	addmeasure5.testcase \
	addmeasure6.testcase \
	addmeasure7.testcase \
	addmeasure8.testcase \
	addmeasure9.testcase \
	addmeasure10.testcase \
	addmeasure11.testcase \
	addmeasure12.testcase \
	addmeasure13.testcase \
	addmeasure14.testcase \
	addmeasure15.testcase \
	asbinary10.testcase \
	asbinary11.testcase \
	asbinary12.testcase \
	asbinary13.testcase \
	asbinary14.testcase \
	asbinary15.testcase \
	asbinary16.testcase \
	asbinary17.testcase \
	asbinary1.testcase \
	asbinary2.testcase \
	asbinary3.testcase \
	asbinary4.testcase \
	asbinary5.testcase \
	asbinary6.testcase \
	asbinary7.testcase \
	asbinary8.testcase \
	asbinary9.testcase \
	asewkb10.testcase \
	asewkb11.testcase \
	asewkb12.testcase \
	asewkb13.testcase \
	asewkb14.testcase \
	asewkb15.testcase \
	asewkb16.testcase \
	asewkb17.testcase \
	asewkb1.testcase \
	asewkb2.testcase \
	asewkb3.testcase \
	asewkb4.testcase \
	asewkb5.testcase \
	asewkb6.testcase \
	asewkb7.testcase \
	asewkb8.testcase \
	asewkb9.testcase \
	asfgf1.testcase \
	asfgf2.testcase \
	asfgf3.testcase \
	asfgf4.testcase \
	asfgf5.testcase \
	asfgf6.testcase \
	asfgf7.testcase \
	asfgf8.testcase \
	asfgf9.testcase \
	asgeojson1.testcase \
	asgeojson2.testcase \
	asgeojson3.testcase \
	asgeojson4.testcase \
	asgeojson5.testcase \
	asgeojson6.testcase \
	asgeojson7.testcase \
	asgeojson8.testcase \
	asgml10.testcase \
	asgml11.testcase \
	asgml1.testcase \
	asgml2.testcase \
	asgml3.testcase \
	asgml4.testcase \
	asgml5.testcase \
	asgml6.testcase \
	asgml7.testcase \
	asgml8.testcase \
	asgml9.testcase \
	assvg17.testcase \
	assvg18.testcase \
	assvg19.testcase \
	assvg1.testcase \
	assvg20.testcase \
	assvg21.testcase \
	assvg22.testcase \
	assvg23.testcase \
	assvg24.testcase \
	assvg25.testcase \
	assvg26.testcase \
	assvg2.testcase \
	assvg3.testcase \
	assvg4.testcase \
	assvg5.testcase \
	assvg6.testcase \
	assvg7.testcase \
	assvg8.testcase \
	assvg9.testcase \
	aswkt-text.testcase \
	atmastext1.testcase \
	atmastext2.testcase \
	atmastext3.testcase \
	atmastext4.testcase \
	atmastext5.testcase \
	atmastext6.testcase \
	atmcreate1.testcase \
	atmcreate2.testcase \
	atmcreate3.testcase \
	atmcreate4.testcase \
	atmcreate5.testcase \
	atmcreate6.testcase \
	atmcreate7.testcase \
	atmcreate8.testcase \
	atmcreate9.testcase \
	atmcreate10.testcase \
	atmcreate11.testcase \
	atmcreate12.testcase \
	atmcreate13.testcase \
	atmcreate14.testcase \
	atmcreate15.testcase \
	atmcreate16.testcase \
	atmcreate17.testcase \
	atmcreate18.testcase \
	atmcreate19.testcase \
	atmcreate20.testcase \
	atmcreate21.testcase \
	atmcreate22.testcase \
	atmcreate23.testcase \
	atmcreatescale1.testcase \
	atmcreatescale2.testcase \
	atmcreatescale3.testcase \
	atmcreatescale4.testcase \
	atmcreatescale5.testcase \
	atmcreatescale6.testcase \
	atmcreatescale7.testcase \
	atmcreatescale8.testcase \
	atmcreatescale9.testcase \
	atmcreatetrans1.testcase \
	atmcreatetrans2.testcase \
	atmcreatetrans3.testcase \
	atmcreatetrans4.testcase \
	atmcreatetrans5.testcase \
	atmcreatetrans6.testcase \
	atmcreatetrans7.testcase \
	atmcreatetrans8.testcase \
	atmcreatetrans9.testcase \
	atmcreatexroll1.testcase \
	atmcreatexroll2.testcase \
	atmcreatexroll3.testcase \
	atmcreateyroll1.testcase \
	atmcreateyroll2.testcase \
	atmcreateyroll3.testcase \
	atmcreatezroll1.testcase \
	atmcreatezroll2.testcase \
	atmcreatezroll3.testcase \
	atmdeterminant1.testcase \
	atmdeterminant2.testcase \
	atmdeterminant3.testcase \
	atmdeterminant4.testcase \
	atminvert1.testcase \
	atminvert2.testcase \
	atminvert3.testcase \
	atminvert4.testcase \
	atmisinvert1.testcase \
	atmisinvert2.testcase \
	atmisinvert3.testcase \
	atmisinvert4.testcase \
	atmisvalid1.testcase \
	atmisvalid2.testcase \
	atmisvalid3.testcase \
	atmisvalid4.testcase \
	atmisvalid5.testcase \
	atmisvalid6.testcase \
	atmmultiply1.testcase \
	atmmultiply2.testcase \
	atmmultiply3.testcase \
	atmmultiply4.testcase \
	atmmultiply5.testcase \
	atmscale1.testcase \
	atmscale2.testcase \
	atmscale3.testcase \
	atmscale4.testcase \
	atmscale5.testcase \
	atmscale6.testcase \
	atmscale7.testcase \
	atmscale8.testcase \
	atmscale9.testcase \
	atmscale10.testcase \
	atmscale11.testcase \
	atmscale12.testcase \
	atmscale13.testcase \
	atmtrans1.testcase \
	atmtrans2.testcase \
	atmtrans3.testcase \
	atmtrans4.testcase \
	atmtrans5.testcase \
	atmtrans6.testcase \
	atmtrans7.testcase \
	atmtrans8.testcase \
	atmtrans9.testcase \
	atmtrans10.testcase \
	atmtrans11.testcase \
	atmtrans12.testcase \
	atmtrans13.testcase \
	atmtransform1.testcase \
	atmtransform2.testcase \
	atmtransform3.testcase \
	atmtransform4.testcase \
	atmtransform5.testcase \
	atmtransform6.testcase \
	atmtransform7.testcase \
	atmtransform8.testcase \
	atmxroll1.testcase \
	atmxroll2.testcase \
	atmxroll3.testcase \
	atmxroll4.testcase \
	atmxroll5.testcase \
	atmyroll1.testcase \
	atmyroll2.testcase \
	atmyroll3.testcase \
	atmyroll4.testcase \
	atmyroll5.testcase \
	atmzroll1.testcase \
	atmzroll2.testcase \
	atmzroll3.testcase \
	atmzroll4.testcase \
	atmzroll5.testcase \
	badEWKT1.testcase \
	badEWKT2.testcase \
	badEWKT3.testcase \
	badEWKT4.testcase \
	badEWKT5.testcase \
	badEWKT6.testcase \
	badEWKT7.testcase \
	badEWKT8.testcase \
	badGeoJSON1.testcase \
	badGeoJSON2.testcase \
	badGeoJSON3.testcase \
	badGeoJSON4.testcase \
	badGeoJSON5.testcase \
	badGeoJSON6.testcase \
	badGeoJSON7.testcase \
	badGML1.testcase \
	badGML2.testcase \
	badGML3.testcase \
	badGML4.testcase \
	badGML5.testcase \
	badGML6.testcase \
	badGML7.testcase \
	badKML1.testcase \
	badKML2.testcase \
	badKML3.testcase \
	badKML4.testcase \
	badKML5.testcase \
	badKML6.testcase \
	badKML7.testcase \
	badwkt1.testcase \
	badwkt2.testcase \
	badwkt3.testcase \
	badwkt4.testcase \
	badwkt5.testcase \
	badwkt6.testcase \
	badwkt7.testcase \
	badwkt8.testcase \
	badwkt9.testcase \
	buildcirclembr10.testcase \
	buildcirclembr11.testcase \
	buildcirclembr12.testcase \
	buildcirclembr1.testcase \
	buildcirclembr2.testcase \
	buildcirclembr3.testcase \
	buildcirclembr4.testcase \
	buildcirclembr5.testcase \
	buildcirclembr6.testcase \
	buildcirclembr7.testcase \
	buildcirclembr8.testcase \
	buildcirclembr9.testcase \
	buildmbr10.testcase \
	buildmbr11.testcase \
	buildmbr12.testcase \
	buildmbr13.testcase \
	buildmbr14.testcase \
	buildmbr1.testcase \
	buildmbr2.testcase \
	buildmbr3.testcase \
	buildmbr4.testcase \
	buildmbr5.testcase \
	buildmbr6.testcase \
	buildmbr7.testcase \
	buildmbr8.testcase \
	buildmbr9.testcase \
	casttoblob10.testcase \
	casttoblob12.testcase \
	casttoblob13.testcase \
	casttoblob14.testcase \
	casttoblob1.testcase \
	casttoblob2.testcase \
	casttoblob3.testcase \
	casttoblob4.testcase \
	casttoblob5.testcase \
	casttoblob6.testcase \
	casttoblob7.testcase \
	casttoblob8.testcase \
	casttoblob9.testcase \
	casttodouble1.testcase \
	casttodouble2.testcase \
	casttodouble3.testcase \
	casttodouble4.testcase \
	casttodouble5.testcase \
	casttodouble6.testcase \
	casttodouble7.testcase \
	casttogeometrycollection2.testcase \
	casttogeometrycollection3.testcase \
	casttogeometrycollection4.testcase \
	casttogeometrycollection5.testcase \
	casttogeometrycollection6.testcase \
	casttogeometrycollection.testcase \
	casttoint1.testcase \
	casttoint2.testcase \
	casttoint3.testcase \
	casttoint4.testcase \
	casttoint5.testcase \
	casttoint6.testcase \
	casttoint7.testcase \
	casttolinestring1.testcase \
	casttolinestring2.testcase \
	casttolinestring3.testcase \
	casttolinestring4.testcase \
	casttolinestring5.testcase \
	casttolinestring6.testcase \
	casttolinestring7.testcase \
	casttolinestring8.testcase \
	casttomulti11.testcase \
	casttomulti1.testcase \
	casttomulti2.testcase \
	casttomulti3.testcase \
	casttomulti4.testcase \
	casttomulti5.testcase \
	casttomulti6.testcase \
	casttomulti7.testcase \
	casttomulti8.testcase \
	casttomultilinestring1.testcase \
	casttomultilinestring2.testcase \
	casttomultilinestring3.testcase \
	casttomultilinestring4.testcase \
	casttomultilinestring5.testcase \
	casttomultilinestring6.testcase \
	casttomultilinestring7.testcase \
	casttomultipoint1.testcase \
	casttomultipoint2.testcase \
	casttomultipoint3.testcase \
	casttomultipoint4.testcase \
	casttomultipoint5.testcase \
	casttomultipoint6.testcase \
	casttomultipoint7.testcase \
	casttomultipoint8.testcase \
	casttomultipoint9.testcase \
	casttomultipolygon1.testcase \
	casttomultipolygon2.testcase \
	casttomultipolygon3.testcase \
	casttomultipolygon4.testcase \
	casttomultipolygon5.testcase \
	casttopoint1.testcase \
	casttopoint2.testcase \
	casttopoint3.testcase \
	casttopoint4.testcase \
	casttopoint5.testcase \
	casttopoint6.testcase \
	casttopoint7.testcase \
	casttopoint8.testcase \
	casttopoly1.testcase \
	casttopoly2.testcase \
	casttopoly3.testcase \
	casttopoly4.testcase \
	casttopoly5.testcase \
	casttopoly6.testcase \
	casttopoly7.testcase \
	casttopoly8.testcase \
	casttosingle10.testcase \
	casttosingle12.testcase \
	casttosingle1.testcase \
	casttosingle2.testcase \
	casttosingle3.testcase \
	casttosingle4.testcase \
	casttosingle5.testcase \
	casttosingle6.testcase \
	casttosingle7.testcase \
	casttosingle8.testcase \
	casttosingle9.testcase \
	casttotext10.testcase \
	casttotext11.testcase \
	casttotext12.testcase \
	casttotext13.testcase \
	casttotext14.testcase \
	casttotext15.testcase \
	casttotext1.testcase \
	casttotext2.testcase \
	casttotext3.testcase \
	casttotext4.testcase \
	casttotext5.testcase \
	casttotext6.testcase \
	casttotext7.testcase \
	casttotext8.testcase \
	casttotext9.testcase \
	casttoxy1.testcase \
	casttoxy2.testcase \
	casttoxy3.testcase \
	casttoxym1.testcase \
	casttoxym2.testcase \
	casttoxym3.testcase \
	casttoxym4.testcase \
	casttoxym5.testcase \
	casttoxym6.testcase \
	casttoxym7.testcase \
	casttoxym8.testcase \
	casttoxym9.testcase \
	casttoxym10.testcase \
	casttoxym11.testcase \
	casttoxyz1.testcase \
	casttoxyz2.testcase \
	casttoxyz3.testcase \
	casttoxyz4.testcase \
	casttoxyz5.testcase \
	casttoxyz6.testcase \
	casttoxyz7.testcase \
	casttoxyz8.testcase \
	casttoxyz9.testcase \
	casttoxyz10.testcase \
	casttoxyz11.testcase \
	casttoxyzm1.testcase \
	casttoxyzm2.testcase \
	casttoxyzm3.testcase \
	casttoxyzm4.testcase \
	casttoxyzm5.testcase \
	casttoxyzm6.testcase \
	casttoxyzm7.testcase \
	casttoxyzm8.testcase \
	casttoxyzm9.testcase \
	casttoxyzm10.testcase \
	casttoxyzm11.testcase \
	casttoxyzm12.testcase \
	casttoxyzm13.testcase \
	casttoxyzm14.testcase \
	casttoxyzm15.testcase \
	casttoxyzm16.testcase \
	checkdupl1.testcase \
	checkdupl2.testcase \
	checkspatialmetadata1.testcase \
	checkspatialmetadata2.testcase \
	checkspatialmetadata3.testcase \
	checkspatialmetadata4.testcase \
	checkspatialmetadata5.testcase \
	checkspatialmetadata6.testcase \
	checkspatialmetadata7.testcase \
	checkspatialmetadata8.testcase \
	clonetable1.testcase \
	clonetable2.testcase \
	clonetable3.testcase \
	clonetable4.testcase \
	clonetable5.testcase \
	clonetable6.testcase \
	clonetable7.testcase \
	clonetable8.testcase \
	clonetable9.testcase \
	clonetable10.testcase \
	clonetable11.testcase \
	clonetable12.testcase \
	clonetable13.testcase \
	clonetable14.testcase \
	clonetable15.testcase \
	createclonetable1.testcase \
	createclonetable2.testcase \
	createclonetable3.testcase \
	createclonetable4.testcase \
	createclonetable5.testcase \
	createclonetable6.testcase \
	createclonetable7.testcase \
	createclonetable8.testcase \
	createclonetable9.testcase \
	createclonetable10.testcase \
	createclonetable11.testcase \
	createclonetable12.testcase \
	createclonetable13.testcase \
	createclonetable14.testcase \
	createclonetable15.testcase \
	ch_m.testcase \
	cm_m.testcase \
	collect10.testcase \
	collect11.testcase \
	collect12.testcase \
	collect13.testcase \
	collect14.testcase \
	collect15.testcase \
	collect16.testcase \
	collect17.testcase \
	collect18.testcase \
	collect19.testcase \
	collect1.testcase \
	collect20.testcase \
	collect21.testcase \
	collect23.testcase \
	collect24.testcase \
	collect25.testcase \
	collect26.testcase \
	collect27.testcase \
	collect28.testcase \
	collect29.testcase \
	collect2.testcase \
	collect30.testcase \
	collect31.testcase \
	collect32.testcase \
	collect33.testcase \
	collect34.testcase \
	collect35.testcase \
	collect36.testcase \
	collect37.testcase \
	collect38.testcase \
	collect39.testcase \
	collect3.testcase \
	collect40.testcase \
	collect41.testcase \
	collect42.testcase \
	collect43.testcase \
	collect44.testcase \
	collect45.testcase \
	collect46.testcase \
	collect47.testcase \
	collect48.testcase \
	collect49.testcase \
	collect4.testcase \
	collect50.testcase \
	collect51.testcase \
	collect52.testcase \
	collect53.testcase \
	collect54.testcase \
	collect55.testcase \
	collect56.testcase \
	collect57.testcase \
	collect58.testcase \
	collect59.testcase \
	collect5.testcase \
	collect6.testcase \
	collect7.testcase \
	collect8.testcase \
	collect9.testcase \
	collectextract10.testcase \
	collectextract11.testcase \
	collectextract12.testcase \
	collectextract13.testcase \
	collectextract14.testcase \
	collectextract15.testcase \
	collectextract16.testcase \
	collectextract17.testcase \
	collectextract18.testcase \
	collectextract19.testcase \
	collectextract1.testcase \
	collectextract20.testcase \
	collectextract21.testcase \
	collectextract22.testcase \
	collectextract23.testcase \
	collectextract24.testcase \
	collectextract25.testcase \
	collectextract2.testcase \
	collectextract3.testcase \
	collectextract4.testcase \
	collectextract5.testcase \
	collectextract6.testcase \
	collectextract7.testcase \
	collectextract8.testcase \
	collectextract9.testcase \
	compressgeometry10.testcase \
	compressgeometry11.testcase \
	compressgeometry12.testcase \
	compressgeometry13.testcase \
	compressgeometry14.testcase \
	compressgeometry15.testcase \
	compressgeometry17.testcase \
	compressgeometry18.testcase \
	compressgeometry19.testcase \
	compressgeometry1.testcase \
	compressgeometry20.testcase \
	compressgeometry21.testcase \
	compressgeometry22.testcase \
	compressgeometry23.testcase \
	compressgeometry24.testcase \
	compressgeometry25.testcase \
	compressgeometry26.testcase \
	compressgeometry27.testcase \
	compressgeometry28.testcase \
	compressgeometry29.testcase \
	compressgeometry2.testcase \
	compressgeometry30.testcase \
	compressgeometry31.testcase \
	compressgeometry32.testcase \
	compressgeometry33.testcase \
	compressgeometry34.testcase \
	compressgeometry35.testcase \
	compressgeometry36.testcase \
	compressgeometry37.testcase \
	compressgeometry38.testcase \
	compressgeometry39.testcase \
	compressgeometry3.testcase \
	compressgeometry40.testcase \
	compressgeometry41.testcase \
	compressgeometry42.testcase \
	compressgeometry43.testcase \
	compressgeometry44.testcase \
	compressgeometry45.testcase \
	compressgeometry46.testcase \
	compressgeometry47.testcase \
	compressgeometry48.testcase \
	compressgeometry49.testcase \
	compressgeometry4.testcase \
	compressgeometry50.testcase \
	compressgeometry51.testcase \
	compressgeometry52.testcase \
	compressgeometry53.testcase \
	compressgeometry54.testcase \
	compressgeometry55.testcase \
	compressgeometry56.testcase \
	compressgeometry57.testcase \
	compressgeometry58.testcase \
	compressgeometry59.testcase \
	compressgeometry5.testcase \
	compressgeometry60.testcase \
	compressgeometry61.testcase \
	compressgeometry62.testcase \
	compressgeometry63.testcase \
	compressgeometry64.testcase \
	compressgeometry65.testcase \
	compressgeometry66.testcase \
	compressgeometry67.testcase \
	compressgeometry68.testcase \
	compressgeometry69.testcase \
	compressgeometry6.testcase \
	compressgeometry7.testcase \
	compressgeometry8.testcase \
	compressgeometry9.testcase \
	createrastercoverages.testcase \
	createuuid1.testcase \
	datalic_register1.testcase \
	datalic_register2.testcase \
	datalic_register3.testcase \
	datalic_register4.testcase \
	datalic_register5.testcase \
	datalic_register6.testcase \
	datalic_register7.testcase \
	datalic_register8.testcase \
	datalic_register9.testcase \
	datalic_register10.testcase \
	datalic_rename1.testcase \
	datalic_rename2.testcase \
	datalic_rename3.testcase \
	datalic_rename4.testcase \
	datalic_rename5.testcase \
	datalic_rename6.testcase \
	datalic_rename7.testcase \
	datalic_rename8.testcase \
	datalic_rename9.testcase \
	datalic_seturl1.testcase \
	datalic_seturl2.testcase \
	datalic_seturl3.testcase \
	datalic_seturl4.testcase \
	datalic_seturl5.testcase \
	datalic_seturl6.testcase \
	datalic_seturl7.testcase \
	datalic_seturl8.testcase \
	datalic_seturl9.testcase \
	datalic_unregister1.testcase \
	datalic_unregister2.testcase \
	datalic_unregister3.testcase \
	datalic_unregister4.testcase \
	datalic_unregister5.testcase \
	dirfrompath1.testcase \
	dirfrompath2.testcase \
	dirfrompath3.testcase \
	dirfrompath4.testcase \
	dirfrompath5.testcase \
	dimension1.testcase \
	dimension2.testcase \
	dimension3.testcase \
	dimension4.testcase \
	dimension5.testcase \
	dimension6.testcase \
	dimension7.testcase \
	dimension8.testcase \
	dissolve10.testcase \
	dissolve11.testcase \
	dissolve12.testcase \
	dissolve13.testcase \
	dissolve14.testcase \
	dissolve15.testcase \
	dissolve16.testcase \
	dissolve17.testcase \
	dissolve18.testcase \
	dissolve19.testcase \
	dissolve1.testcase \
	dissolve20.testcase \
	dissolve21.testcase \
	dissolve22.testcase \
	dissolve23.testcase \
	dissolve24.testcase \
	dissolve25.testcase \
	dissolve26.testcase \
	dissolve27.testcase \
	dissolve28.testcase \
	dissolve29.testcase \
	dissolve2.testcase \
	dissolve30.testcase \
	dissolve3.testcase \
	dissolve4.testcase \
	dissolve5.testcase \
	dissolve6.testcase \
	dissolve7.testcase \
	dissolve8.testcase \
	dissolve9.testcase \
	dm_m.testcase \
	DSC_1467.JPG \
	DSCN0042.JPG \
	dropgeo1.testcase \
	dropgeo2.testcase \
	dropgeo3.testcase \
	dropgeo4.testcase \
	dropgeo5.testcase \
	dropgeo6.testcase \
	dropgeo7.testcase \
	dropgeo8.testcase \
	dropgeo9.testcase \
	elemgeo1.testcase \
	elemgeo2.testcase \
	elemgeo3.testcase \
	elemgeo4.testcase \
	elemgeo5.testcase \
	elemgeo6.testcase \
	elemgeo7.testcase \
	elemgeo8.testcase \
	elemgeo9.testcase \
	elemgeo10.testcase \
	elemgeo11.testcase \
	elemgeo12.testcase \
	elemgeo13.testcase \
	elemgeo14.testcase \
	elemgeo15.testcase \
	elemgeo16.testcase \
	elemgeo17.testcase \
	elemgeo18.testcase \
	elemgeo19.testcase \
	emptyfile.txt \
	endpoint1.testcase \
	ensureclosedrings1.testcase \
	ensureclosedrings2.testcase \
	ensureclosedrings3.testcase \
	ensureclosedrings4.testcase \
	ensureclosedrings5.testcase \
	ensureclosedrings6.testcase \
	ensureclosedrings7.testcase \
	ensureclosedrings8.testcase \
	ensureclosedrings9.testcase \
	ensureclosedrings10.testcase \
	envelope1.testcase \
	envelope2.testcase \
	envelope3.testcase \
	envelope4.testcase \
	envelope5.testcase \
	envelope6.testcase \
	envelope7.testcase \
	envintersects10.testcase \
	envintersects1.testcase \
	envintersects2.testcase \
	envintersects3.testcase \
	envintersects4.testcase \
	envintersects5.testcase \
	envintersects6.testcase \
	envintersects7.testcase \
	envintersects8.testcase \
	envintersects9.testcase \
	ewkb10.testcase \
	ewkb11.testcase \
	ewkb12.testcase \
	ewkb1.testcase \
	ewkb2.testcase \
	ewkb3.testcase \
	ewkb4.testcase \
	ewkb5.testcase \
	ewkb6.testcase \
	ewkb7.testcase \
	ewkb8.testcase \
	ewkb9.testcase \
	expand1.testcase \
	expand2.testcase \
	expand3.testcase \
	expand4.testcase \
	expand5.testcase \
	expand6.testcase \
	expand7.testcase \
	extfrompath1.testcase \
	extfrompath2.testcase \
	extfrompath3.testcase \
	extfrompath4.testcase \
	extfrompath5.testcase \
	extent1.testcase \
	extractmultilinestring1.testcase \
	extractmultilinestring2.testcase \
	extractmultilinestring3.testcase \
	extractmultipoint1.testcase \
	extractmultipoint2.testcase \
	extractmultipoint3.testcase \
	extractmultipolygon1.testcase \
	extractmultipolygon2.testcase \
	extractmultipolygon3.testcase \
	fath_m.testcase \
	fdo_ogr1.testcase \
	fdo_ogr2.testcase \
	fdo_ogr3.testcase \
	fdo_ogr4.testcase \
	fdo_ogr5.testcase \
	fdo_ogr6.testcase \
	fdo_ogr7.testcase \
	fdo_ogr8.testcase \
	fdo-wkb.sqlite_RO \
	forcenull10.testcase \
	forcenull11.testcase \
	forcenull12.testcase \
	forcenull13.testcase \
	forcenull14.testcase \
	forcenull15.testcase \
	forcenull16.testcase \
	forcenull17.testcase \
	forcenull18.testcase \
	forcenull19.testcase \
	forcenull1.testcase \
	forcenull20.testcase \
	forcenull21.testcase \
	forcenull22.testcase \
	forcenull23.testcase \
	forcenull24.testcase \
	forcenull25.testcase \
	forcenull26.testcase \
	forcenull27.testcase \
	forcenull28.testcase \
	forcenull2.testcase \
	forcenull3.testcase \
	forcenull4.testcase \
	forcenull5.testcase \
	forcenull6.testcase \
	forcenull7.testcase \
	forcenull8.testcase \
	forcenull9.testcase \
	fromewkt10.testcase \
	fromewkt11.testcase \
	fromewkt12.testcase \
	fromewkt13.testcase \
	fromewkt14.testcase \
	fromewkt15.testcase \
	fromewkt16.testcase \
	fromewkt17.testcase \
	fromewkt18.testcase \
	fromewkt19.testcase \
	fromewkt1.testcase \
	fromewkt20.testcase \
	fromewkt22.testcase \
	fromewkt23.testcase \
	fromewkt24.testcase \
	fromewkt25.testcase \
	fromewkt26.testcase \
	fromewkt27.testcase \
	fromewkt28.testcase \
	fromewkt29.testcase \
	fromewkt2.testcase \
	fromewkt30.testcase \
	fromewkt31.testcase \
	fromewkt32.testcase \
	fromewkt33.testcase \
	fromewkt34.testcase \
	fromewkt35.testcase \
	fromewkt36.testcase \
	fromewkt37.testcase \
	fromewkt38.testcase \
	fromewkt39.testcase \
	fromewkt3.testcase \
	fromewkt4.testcase \
	fromewkt5.testcase \
	fromewkt6.testcase \
	fromewkt7.testcase \
	fromewkt8.testcase \
	fromewkt9.testcase \
	fromgeojson10.testcase \
	fromgeojson11.testcase \
	fromgeojson12.testcase \
	fromgeojson13.testcase \
	fromgeojson14.testcase \
	fromgeojson15.testcase \
	fromgeojson16.testcase \
	fromgeojson17.testcase \
	fromgeojson18.testcase \
	fromgeojson19.testcase \
	fromgeojson1.testcase \
	fromgeojson20.testcase \
	fromgeojson21.testcase \
	fromgeojson22.testcase \
	fromgeojson23.testcase \
	fromgeojson24.testcase \
	fromgeojson25.testcase \
	fromgeojson26.testcase \
	fromgeojson27.testcase \
	fromgeojson28.testcase \
	fromgeojson29.testcase \
	fromgeojson2.testcase \
	fromgeojson30.testcase \
	fromgeojson31.testcase \
	fromgeojson32.testcase \
	fromgeojson3.testcase \
	fromgeojson4.testcase \
	fromgeojson5.testcase \
	fromgeojson6.testcase \
	fromgeojson7.testcase \
	fromgeojson8.testcase \
	fromgeojson9.testcase \
	fromgeojsonmix1.testcase \
	fromgeojsonmix2.testcase \
	fromgeojsonmix3.testcase \
	fromgeojsonmix4.testcase \
	fromgeojsonmix5.testcase \
	fromgeojsonmix6.testcase \
	fromgeojsonmix7.testcase \
	fromgeojsonmix8.testcase \
	fromgeojsonmix9.testcase \
	fromgeojsonpt10.testcase \
	fromgeojsonpt11.testcase \
	fromgeojsonpt12.testcase \
	fromgeojsonpt13.testcase \
	fromgeojsonpt14.testcase \
	fromgeojsonpt15.testcase \
	fromgeojsonpt16.testcase \
	fromgeojsonpt17.testcase \
	fromgeojsonpt18.testcase \
	fromgeojsonpt19.testcase \
	fromgeojsonpt1.testcase \
	fromgeojsonpt20.testcase \
	fromgeojsonpt21.testcase \
	fromgeojsonpt22.testcase \
	fromgeojsonpt23.testcase \
	fromgeojsonpt24.testcase \
	fromgeojsonpt25.testcase \
	fromgeojsonpt26.testcase \
	fromgeojsonpt27.testcase \
	fromgeojsonpt28.testcase \
	fromgeojsonpt29.testcase \
	fromgeojsonpt2.testcase \
	fromgeojsonpt30.testcase \
	fromgeojsonpt31.testcase \
	fromgeojsonpt32.testcase \
	fromgeojsonpt33.testcase \
	fromgeojsonpt34.testcase \
	fromgeojsonpt35.testcase \
	fromgeojsonpt36.testcase \
	fromgeojsonpt37.testcase \
	fromgeojsonpt38.testcase \
	fromgeojsonpt3.testcase \
	fromgeojsonpt4.testcase \
	fromgeojsonpt5.testcase \
	fromgeojsonpt6.testcase \
	fromgeojsonpt7.testcase \
	fromgeojsonpt8.testcase \
	fromgeojsonpt9.testcase \
	fromgml10.testcase \
	fromgml11.testcase \
	fromgml12.testcase \
	fromgml13.testcase \
	fromgml14.testcase \
	fromgml15.testcase \
	fromgml16.testcase \
	fromgml17.testcase \
	fromgml18.testcase \
	fromgml19.testcase \
	fromgml1.testcase \
	fromgml20.testcase \
	fromgml21.testcase \
	fromgml22.testcase \
	fromgml23.testcase \
	fromgml24.testcase \
	fromgml25.testcase \
	fromgml26.testcase \
	fromgml27.testcase \
	fromgml28.testcase \
	fromgml29.testcase \
	fromgml2.testcase \
	fromgml30.testcase \
	fromgml31.testcase \
	fromgml32.testcase \
	fromgml33.testcase \
	fromgml34.testcase \
	fromgml35.testcase \
	fromgml36.testcase \
	fromgml37.testcase \
	fromgml38.testcase \
	fromgml39.testcase \
	fromgml3.testcase \
	fromgml40.testcase \
	fromgml41.testcase \
	fromgml43.testcase \
	fromgml44.testcase \
	fromgml45.testcase \
	fromgml46.testcase \
	fromgml47.testcase \
	fromgml48.testcase \
	fromgml49.testcase \
	fromgml4.testcase \
	fromgml50.testcase \
	fromgml51.testcase \
	fromgml52.testcase \
	fromgml53.testcase \
	fromgml54.testcase \
	fromgml55.testcase \
	fromgml56.testcase \
	fromgml57.testcase \
	fromgml58.testcase \
	fromgml59.testcase \
	fromgml5.testcase \
	fromgml60.testcase \
	fromgml61.testcase \
	fromgml6.testcase \
	fromgml7.testcase \
	fromgml8.testcase \
	fromgml9.testcase \
	fromgmlexp1.testcase \
	fromgmlexp2.testcase \
	fromgmlexp3.testcase \
	fromgmlexp4.testcase \
	fromgmlexp5.testcase \
	fromgmlexp6.testcase \
	fromgmlexp7.testcase \
	fromgmlexp8.testcase \
	fromgmlexp9.testcase \
	fromWkb10.testcase \
	fromWkb11.testcase \
	fromWkb12.testcase \
	fromWkb13.testcase \
	fromWkb14.testcase \
	fromWkb15.testcase \
	fromWkb16.testcase \
	fromWkb17.testcase \
	fromWkb18.testcase \
	fromWkb19.testcase \
	fromWkb1.testcase \
	fromWkb20.testcase \
	fromWkb21.testcase \
	fromWkb22.testcase \
	fromWkb23.testcase \
	fromWkb24.testcase \
	fromWkb25.testcase \
	fromWkb26.testcase \
	fromWkb2.testcase \
	fromWkb3.testcase \
	fromWkb4.testcase \
	fromWkb5.testcase \
	fromWkb6.testcase \
	fromWkb7.testcase \
	fromWkb8.testcase \
	fromWkb9.testcase \
	fromgeojsonexp1.testcase \
	fromgeojsonexp2.testcase \
	fromgeojsonexp3.testcase \
	fromgeojsonexp4.testcase \
	fromgeojsonexp5.testcase \
	fromgeojsonexp6.testcase \
	fromgeojsonexp7.testcase \
	fromgeojsonexp8.testcase \
	fromgeojsonexp9.testcase \
	fromwktexp1.testcase \
	fromwktexp2.testcase \
	fromwktexp3.testcase \
	fromwktexp4.testcase \
	fromwktexp5.testcase \
	fromwktexp6.testcase \
	fromwktexp7.testcase \
	fromwktexp8.testcase \
	fromwktexp9.testcase \
	fromewktexp1.testcase \
	fromewktexp2.testcase \
	fromewktexp3.testcase \
	fromewktexp4.testcase \
	fromewktexp5.testcase \
	fromewktexp6.testcase \
	fromewktexp7.testcase \
	fromewktexp8.testcase \
	fromewktexp9.testcase \
	ft_m.testcase \
	fullnamefrompath1.testcase \
	fullnamefrompath2.testcase \
	fullnamefrompath3.testcase \
	fullnamefrompath4.testcase \
	fullnamefrompath5.testcase \
	garsmbr10.testcase \
	garsmbr11.testcase \
	garsmbr12.testcase \
	garsmbr13.testcase \
	garsmbr14.testcase \
	garsmbr15.testcase \
	garsmbr16.testcase \
	garsmbr17.testcase \
	garsmbr18.testcase \
	garsmbr1.testcase \
	garsmbr20.testcase \
	garsmbr21.testcase \
	garsmbr22.testcase \
	garsmbr23.testcase \
	garsmbr24.testcase \
	garsmbr25.testcase \
	garsmbr26.testcase \
	garsmbr27.testcase \
	garsmbr28.testcase \
	garsmbr29.testcase \
	garsmbr2.testcase \
	garsmbr30.testcase \
	garsmbr31.testcase \
	garsmbr32.testcase \
	garsmbr33.testcase \
	garsmbr34.testcase \
	garsmbr35.testcase \
	garsmbr36.testcase \
	garsmbr3.testcase \
	garsmbr4.testcase \
	garsmbr5.testcase \
	garsmbr6.testcase \
	garsmbr7.testcase \
	garsmbr8.testcase \
	garsmbr9.testcase \
	geodesic-len1.testcase \
	geodesic-len2.testcase \
	geodesic-len3.testcase \
	geodesic-len4.testcase \
	geodesic-len5.testcase \
	geodesic-len6.testcase \
	geodesic-len7.testcase \
	geodesic-len8.testcase \
	geodesicangle1.testcase \
	geodesicangle2.testcase \
	geodesicangle3.testcase \
	geodesicangle4.testcase \
	geodesicangle5.testcase \
	geodesicangle6.testcase \
	geodesicarcarea1.testcase \
	geodesicarcarea2.testcase \
	geodesicarcarea3.testcase \
	geodesicarcheight1.testcase \
	geodesicarcheight2.testcase \
	geodesicarcheight3.testcase \
	geodesicarclen1.testcase \
	geodesicarclen2.testcase \
	geodesicarclen3.testcase \
	geodesicarclen4.testcase \
	geodesicarclen5.testcase \
	geodesicchordlen1.testcase \
	geodesicchordlen2.testcase \
	geodesicchordlen3.testcase \
	geodesicchordlen4.testcase \
	geodesicchordlen5.testcase \
	geojson1.testcase \
	geojson2.testcase \
	geojson3.testcase \
	geojson4.testcase \
	geojson5.testcase \
	geojson6.testcase \
	geomcollfromtext1.testcase \
	geomcollfromtext2.testcase \
	geomconstraints10.testcase \
	geomconstraints11.testcase \
	geomconstraints12.testcase \
	geomconstraints13.testcase \
	geomconstraints14.testcase \
	geomconstraints15.testcase \
	geomconstraints16.testcase \
	geomconstraints17.testcase \
	geomconstraints18.testcase \
	geomconstraints19.testcase \
	geomconstraints1.testcase \
	geomconstraints20.testcase \
	geomconstraints21.testcase \
	geomconstraints22.testcase \
	geomconstraints23.testcase \
	geomconstraints24.testcase \
	geomconstraints25.testcase \
	geomconstraints26.testcase \
	geomconstraints27.testcase \
	geomconstraints28.testcase \
	geomconstraints2.testcase \
	geomconstraints3.testcase \
	geomconstraints4.testcase \
	geomconstraints5.testcase \
	geomconstraints6.testcase \
	geomconstraints7.testcase \
	geomconstraints8.testcase \
	geomconstraints9.testcase \
	geometryn10.testcase \
	geometryn11.testcase \
	geometryn12.testcase \
	geometryn13.testcase \
	geometryn14.testcase \
	geometryn15.testcase \
	geometryn16.testcase \
	geometryn17.testcase \
	geometryn18.testcase \
	geometryn19.testcase \
	geometryn1.testcase \
	geometryn20.testcase \
	geometryn2.testcase \
	geometryn3.testcase \
	geometryn4.testcase \
	geometryn5.testcase \
	geometryn6.testcase \
	geometryn7.testcase \
	geometryn8.testcase \
	geometryn9.testcase \
	geometryn.testcase \
	geomfromewkb1.testcase \
	geomfromewkb2.testcase \
	geomfromkml10.testcase \
	geomfromkml11.testcase \
	geomfromkml12.testcase \
	geomfromkml13.testcase \
	geomfromkml14.testcase \
	geomfromkml15.testcase \
	geomfromkml16.testcase \
	geomfromkml17.testcase \
	geomfromkml18.testcase \
	geomfromkml19.testcase \
	geomfromkml1.testcase \
	geomfromkml20.testcase \
	geomfromkml21.testcase \
	geomfromkml22.testcase \
	geomfromkml23.testcase \
	geomfromkml2.testcase \
	geomfromkml3.testcase \
	geomfromkml4.testcase \
	geomfromkml5.testcase \
	geomfromkml6.testcase \
	geomfromkml7.testcase \
	geomfromkml8.testcase \
	geomfromkml9.testcase \
	geomfromkmlexp1.testcase \
	geomfromkmlexp2.testcase \
	geomfromkmlexp3.testcase \
	geomfromkmlexp4.testcase \
	geomfromkmlexp5.testcase \
	geomfromkmlexp6.testcase \
	geomfromkmlexp7.testcase \
	geomfromkmlexp8.testcase \
	geomfromkmlexp9.testcase \
	geomfromtext10.testcase \
	geomfromtext11.testcase \
	geomfromtext12.testcase \
	geomfromtext13.testcase \
	geomfromtext14.testcase \
	geomfromtext15.testcase \
	geomfromtext16.testcase \
	geomfromtext17.testcase \
	geomfromtext18.testcase \
	geomfromtext19.testcase \
	geomfromtext1.testcase \
	geomfromtext20.testcase \
	geomfromtext21.testcase \
	geomfromtext22.testcase \
	geomfromtext23.testcase \
	geomfromtext24.testcase \
	geomfromtext25.testcase \
	geomfromtext26.testcase \
	geomfromtext27.testcase \
	geomfromtext28.testcase \
	geomfromtext29.testcase \
	geomfromtext2.testcase \
	geomfromtext30.testcase \
	geomfromtext31.testcase \
	geomfromtext32.testcase \
	geomfromtext33.testcase \
	geomfromtext34.testcase \
	geomfromtext35.testcase \
	geomfromtext36.testcase \
	geomfromtext37.testcase \
	geomfromtext38.testcase \
	geomfromtext39.testcase \
	geomfromtext3.testcase \
	geomfromtext40.testcase \
	geomfromtext41.testcase \
	geomfromtext42.testcase \
	geomfromtext43.testcase \
	geomfromtext44.testcase \
	geomfromtext45.testcase \
	geomfromtext4.testcase \
	geomfromtext5.testcase \
	geomfromtext6.testcase \
	geomfromtext7.testcase \
	geomfromtext8.testcase \
	geomfromtext9.testcase \
	geompointencode1.testcase \
	geompointencode2.testcase \
	geompointencode3.testcase \
	geompointencode4.testcase \
	geompointencode5.testcase \
	geompointencode6.testcase \
	geompointencode7.testcase \
	geompointencode8.testcase \
	geompointencode9.testcase \
	geompointencode10.testcase \
	geomtype10.testcase \
	geomtype11.testcase \
	geomtype12.testcase \
	geomtype13.testcase \
	geomtype14.testcase \
	geomtype15.testcase \
	geomtype16.testcase \
	geomtype17.testcase \
	geomtype18.testcase \
	geomtype19.testcase \
	geomtype1.testcase \
	geomtype20.testcase \
	geomtype21.testcase \
	geomtype22.testcase \
	geomtype23.testcase \
	geomtype24.testcase \
	geomtype25.testcase \
	geomtype26.testcase \
	geomtype27.testcase \
	geomtype28.testcase \
	geomtype29.testcase \
	geomtype2.testcase \
	geomtype30.testcase \
	geomtype31.testcase \
	geomtype32.testcase \
	geomtype33.testcase \
	geomtype34.testcase \
	geomtype35.testcase \
	geomtype36.testcase \
	geomtype37.testcase \
	geomtype38.testcase \
	geomtype39.testcase \
	geomtype3.testcase \
	geomtype40.testcase \
	geomtype41.testcase \
	geomtype42.testcase \
	geomtype43.testcase \
	geomtype44.testcase \
	geomtype45.testcase \
	geomtype46.testcase \
	geomtype47.testcase \
	geomtype48.testcase \
	geomtype49.testcase \
	geomtype4.testcase \
	geomtype50.testcase \
	geomtype51.testcase \
	geomtype52.testcase \
	geomtype53.testcase \
	geomtype54.testcase \
	geomtype55.testcase \
	geomtype56.testcase \
	geomtype57.testcase \
	geomtype58.testcase \
	geomtype59.testcase \
	geomtype5.testcase \
	geomtype60.testcase \
	geomtype61.testcase \
	geomtype62.testcase \
	geomtype63.testcase \
	geomtype64.testcase \
	geomtype65.testcase \
	geomtype66.testcase \
	geomtype67.testcase \
	geomtype68.testcase \
	geomtype69.testcase \
	geomtype6.testcase \
	geomtype7.testcase \
	geomtype8.testcase \
	geomtype9.testcase \
	getmimetype1.testcase \
	getmimetype2.testcase \
	getmimetype3.testcase \
	getmimetype4.testcase \
	getmimetype5.testcase \
	getshapefileextent1.testcase \
	getshapefileextent2.testcase \
	getshapefileextent3.testcase \
	getshapefileextent4.testcase \
	getshapefileextent5.testcase \
	gml10.testcase \
	gml11.testcase \
	gml12.testcase \
	gml13.testcase \
	gml14.testcase \
	gml15.testcase \
	gml16.testcase \
	gml1.testcase \
	gml2.testcase \
	gml3.testcase \
	gml4.testcase \
	gml5.testcase \
	gml6.testcase \
	gml7.testcase \
	gml8.testcase \
	gml9.testcase \
	greatcircle-badblob.testcase \
	greatcircle-poly2.testcase \
	greatcircle-poly3.testcase \
	greatcircle-poly4.testcase \
	greatcircle-poly5.testcase \
	greatcircle-poly6.testcase \
	greatcircle-poly7.testcase \
	greatcircle-poly.testcase \
	greatcircle.testcase \
	greatcircle-text.testcase \
	ind_ch_m.testcase \
	ind_ft_m.testcase \
	ind_yd_m.testcase \
	in_m.testcase \
	is3d1.testcase \
	is3d2.testcase \
	is3d3.testcase \
	is3d4.testcase \
	is3d5.testcase \
	is3d6.testcase \
	isempty2.testcase \
	isempty3.testcase \
	isempty4.testcase \
	isempty.testcase \
	ismeasured1.testcase \
	ismeasured2.testcase \
	ismeasured3.testcase \
	ismeasured4.testcase \
	ismeasured5.testcase \
	ispolygccw1.testcase \
	ispolygccw2.testcase \
	ispolygccw3.testcase \
	ispolygccw4.testcase \
	ispolygccw5.testcase \
	ispolygcw1.testcase \
	ispolygcw2.testcase \
	ispolygcw3.testcase \
	ispolygcw4.testcase \
	ispolygcw5.testcase \
	ispopulatedcoverage1.testcase \
	ispopulatedcoverage2.testcase \
	ispopulatedcoverage3.testcase \
	checkfontfacename1.testcase \
	checkfontfacename2.testcase \
	checkfontfacename3.testcase \
	getfontfamily.testcase \
	isfontbold.testcase \
	isfontitalic.testcase \
	islowascii1.testcase \
	islowascii2.testcase \
	islowascii3.testcase \
	islowascii4.testcase \
	islowascii5.testcase \
	islowascii6.testcase \
	isvalidfont1.testcase \
	isvalidfont2.testcase \
	isvalidnodata1.testcase \
	isvalidnodata2.testcase \
	isvalidnodata3.testcase \
	isvalidnodata4.testcase \
	isvalidpalette1.testcase \
	isvalidpalette2.testcase \
	isvalidpalette3.testcase \
	isvalidrasterstats1.testcase \
	isvalidrasterstats2.testcase \
	isvalidrasterstats3.testcase \
	isvalidrasterstats4.testcase \
	isvalidrasterstats5.testcase \
	isvalidrasterstats6.testcase \
	isvalidrasterstats7.testcase \
	isvalidrasterstats8.testcase \
	isvalidrastertile1.testcase \
	isvalidrastertile2.testcase \
	isvalidrastertile3.testcase \
	isvalidrastertile4.testcase \
	isvalidrastertile5.testcase \
	isvalidrastertile6.testcase \
	isvalidrastertile7.testcase \
	isvalidrastertile8.testcase \
	isvalidrastertile9.testcase \
	isvalidtrajectory1.testcase \
	isvalidtrajectory2.testcase \
	isvalidtrajectory3.testcase \
	isvalidtrajectory4.testcase \
	isvalidtrajectory5.testcase \
	isvalidtrajectory6.testcase \
	isvalidtrajectory7.testcase \
	isXblob6.testcase \
	isXblob7.testcase \
	k3b-icon.png \
	km_m.testcase \
	ktorrent_grad1.jpg \
	ktorrent_sidebar.gif \
	La_folla_durante_il_Palio.jpg \
	lhr1.testcase \
	lhr2.testcase \
	lhr3.testcase \
	lhr4.testcase \
	lhr5.testcase \
	lhr6.testcase \
	linefromtext1.testcase \
	linefromtext2.testcase \
	linesfromrings1.testcase \
	linesfromrings2.testcase \
	linesfromrings3.testcase \
	linesfromrings4.testcase \
	linesfromrings5.testcase \
	linesfromrings6.testcase \
	linesfromrings7.testcase \
	link_m.testcase \
	locatemeasure10.testcase \
	locatemeasure11.testcase \
	locatemeasure12.testcase \
	locatemeasure13.testcase \
	locatemeasure14.testcase \
	locatemeasure15.testcase \
	locatemeasure16.testcase \
	locatemeasure17.testcase \
	locatemeasure18.testcase \
	locatemeasure19.testcase \
	locatemeasure1.testcase \
	locatemeasure2.testcase \
	locatemeasure3.testcase \
	locatemeasure4.testcase \
	locatemeasure5.testcase \
	locatemeasure6.testcase \
	locatemeasure7.testcase \
	locatemeasure8.testcase \
	locatemeasure9.testcase \
	makeline10.testcase \
	makeline11.testcase \
	makeline12.testcase \
	makeline13.testcase \
	makeline14.testcase \
	makeline15.testcase \
	makeline16.testcase \
	makeline17.testcase \
	makeline18.testcase \
	makeline19.testcase \
	makeline20.testcase \
	makeline21.testcase \
	makeline22.testcase \
	makeline23.testcase \
	makeline24.testcase \
	makeline25.testcase \
	makeline26.testcase \
	makeline27.testcase \
	makeline28.testcase \
	makeline29.testcase \
	makeline2.testcase \
	makeline3.testcase \
	makeline30.testcase \
	makeline31.testcase \
	makeline32.testcase \
	makeline4.testcase \
	makeline5.testcase \
	makeline6.testcase \
	makeline7.testcase \
	makeline8.testcase \
	makeline9.testcase \
	makeline.testcase \
	makepoint10.testcase \
	makepoint11.testcase \
	makepoint12.testcase \
	makepoint13.testcase \
	makepoint14.testcase \
	makepoint15.testcase \
	makepoint1.testcase \
	makepoint2.testcase \
	makepoint3.testcase \
	makepoint4.testcase \
	makepoint5.testcase \
	makepoint6.testcase \
	makepoint7.testcase \
	makepoint8.testcase \
	makepoint9.testcase \
	makepointm-null1.testcase \
	makepointm-null2.testcase \
	makepointm-null3.testcase \
	makepointm-null4.testcase \
	makepointm-null5.testcase \
	makepointm-null6.testcase \
	makepointm-null7.testcase \
	makepointm-null8.testcase \
	makepoint-null1.testcase \
	makepoint-null2.testcase \
	makepoint-null3.testcase \
	makepoint-null4.testcase \
	makepoint-null5.testcase \
	makepoint-null6.testcase \
	makepoint-null7.testcase \
	makepointzm-null10.testcase \
	makepointzm-null1.testcase \
	makepointzm-null2.testcase \
	makepointzm-null3.testcase \
	makepointzm-null4.testcase \
	makepointzm-null5.testcase \
	makepointzm-null6.testcase \
	makepointzm-null7.testcase \
	makepointzm-null8.testcase \
	makepointzm-null9.testcase \
	makepointz-null1.testcase \
	makepointz-null2.testcase \
	makepointz-null3.testcase \
	makepointz-null4.testcase \
	makepointz-null5.testcase \
	makepointz-null6.testcase \
	makepointz-null7.testcase \
	makepointz-null8.testcase \
	makepointz-null9.testcase \
	makecircle1.testcase \
	makecircle2.testcase \
	makecircle3.testcase \
	makecircle4.testcase \
	makecircle5.testcase \
	makecircle6.testcase \
	makecircle7.testcase \
	makecircle8.testcase \
	makecircle9.testcase \
	makeellipse1.testcase \
	makeellipse2.testcase \
	makeellipse3.testcase \
	makeellipse4.testcase \
	makeellipse5.testcase \
	makeellipse6.testcase \
	makeellipse7.testcase \
	makeellipse8.testcase \
	makeellipse9.testcase \
	makeellipse10.testcase \
	makeellipse11.testcase \
	makeellipse12.testcase \
	makeellipse14.testcase \
	makeellipse15.testcase \
	makeellipse16.testcase \
	makeellipse18.testcase \
	makeellipse19.testcase \
	makeellipse20.testcase \
	makearc1.testcase \
	makearc2.testcase \
	makearc3.testcase \
	makearc4.testcase \
	makearc5.testcase \
	makearc6.testcase \
	makearc7.testcase \
	makearc8.testcase \
	makearc9.testcase \
	makearc10.testcase \
	makearc11.testcase \
	makearc12.testcase \
	makearc13.testcase \
	makearc14.testcase \
	makearc16.testcase \
	makearc17.testcase \
	makearc18.testcase \
	makearc20.testcase \
	makearc21.testcase \
	makearc22.testcase \
	makeellipticarc1.testcase \
	makeellipticarc2.testcase \
	makeellipticarc3.testcase \
	makeellipticarc4.testcase \
	makeellipticarc5.testcase \
	makeellipticarc6.testcase \
	makeellipticarc7.testcase \
	makeellipticarc8.testcase \
	makeellipticarc9.testcase \
	makeellipticarc10.testcase \
	makeellipticarc11.testcase \
	makeellipticarc12.testcase \
	makeellipticarc13.testcase \
	makeellipticarc14.testcase \
	makeellipticarc15.testcase \
	makeellipticarc16.testcase \
	makeellipticarc17.testcase \
	makeellipticarc19.testcase \
	makeellipticarc20.testcase \
	makeellipticarc21.testcase \
	makeellipticarc23.testcase \
	makeellipticarc24.testcase \
	makeellipticarc25.testcase \
	makecircularsector1.testcase \
	makecircularsector2.testcase \
	makecircularsector3.testcase \
	makecircularsector4.testcase \
	makecircularsector5.testcase \
	makecircularsector6.testcase \
	makecircularsector7.testcase \
	makecircularsector8.testcase \
	makecircularsector9.testcase \
	makecircularsector10.testcase \
	makecircularsector11.testcase \
	makecircularsector12.testcase \
	makecircularsector13.testcase \
	makecircularsector14.testcase \
	makecircularsector16.testcase \
	makecircularsector17.testcase \
	makecircularsector18.testcase \
	makecircularsector20.testcase \
	makecircularsector21.testcase \
	makecircularsector22.testcase \
	makecircularstripe1.testcase \
	makecircularstripe2.testcase \
	makecircularstripe3.testcase \
	makecircularstripe4.testcase \
	makecircularstripe5.testcase \
	makecircularstripe6.testcase \
	makecircularstripe7.testcase \
	makecircularstripe8.testcase \
	makecircularstripe9.testcase \
	makecircularstripe10.testcase \
	makecircularstripe11.testcase \
	makecircularstripe12.testcase \
	makecircularstripe13.testcase \
	makecircularstripe14.testcase \
	makecircularstripe16.testcase \
	makecircularstripe17.testcase \
	makecircularstripe18.testcase \
	makecircularstripe20.testcase \
	makecircularstripe21.testcase \
	makecircularstripe22.testcase \
	makecircularstripe24.testcase \
	makecircularstripe25.testcase \
	makecircularstripe26.testcase \
	makeellipticsector1.testcase \
	makeellipticsector2.testcase \
	makeellipticsector3.testcase \
	makeellipticsector4.testcase \
	makeellipticsector5.testcase \
	makeellipticsector6.testcase \
	makeellipticsector7.testcase \
	makeellipticsector8.testcase \
	makeellipticsector9.testcase \
	makeellipticsector10.testcase \
	makeellipticsector11.testcase \
	makeellipticsector12.testcase \
	makeellipticsector13.testcase \
	makeellipticsector14.testcase \
	makeellipticsector15.testcase \
	makeellipticsector16.testcase \
	makeellipticsector17.testcase \
	makeellipticsector19.testcase \
	makeellipticsector20.testcase \
	makeellipticsector21.testcase \
	makeellipticsector23.testcase \
	makeellipticsector24.testcase \
	makeellipticsector25.testcase \
	maxm1.testcase \
	maxm2.testcase \
	maxm3.testcase \
	maxm4.testcase \
	maxm5.testcase \
	maxm6.testcase \
	maxm7.testcase \
	maxz1.testcase \
	maxz2.testcase \
	maxz3.testcase \
	maxz4.testcase \
	maxz5.testcase \
	maxz6.testcase \
	maxz7.testcase \
	mbr10.testcase \
	mbr11.testcase \
	mbr12.testcase \
	mbr13.testcase \
	mbr14.testcase \
	mbr15.testcase \
	mbr16.testcase \
	mbr17.testcase \
	mbr18.testcase \
	mbr19.testcase \
	mbr1.testcase \
	mbr20.testcase \
	mbr21.testcase \
	mbr22.testcase \
	mbr23.testcase \
	mbr24.testcase \
	mbr25.testcase \
	mbr26.testcase \
	mbr27.testcase \
	mbr28.testcase \
	mbr29.testcase \
	mbr2.testcase \
	mbr30.testcase \
	mbr31.testcase \
	mbr32.testcase \
	mbr3.testcase \
	mbr4.testcase \
	mbr5.testcase \
	mbr6.testcase \
	mbr7.testcase \
	mbr8.testcase \
	mbr9.testcase \
	mbrminmax1.testcase \
	mbrminmax2.testcase \
	mbrminmax3.testcase \
	mbrminmax4.testcase \
	mbrminmax5.testcase \
	mbrminmax6.testcase \
	mbrminmax7.testcase \
	mbrminmax8.testcase \
	m_ch.testcase \
	m_cm.testcase \
	m_dm.testcase \
	m_fath.testcase \
	m_ft.testcase \
	m_ft-text.testcase \
	mi_m.testcase \
	m_ind_ch.testcase \
	m_ind_ft.testcase \
	m_ind_yd.testcase \
	minm1.testcase \
	minm2.testcase \
	minm3.testcase \
	minm4.testcase \
	minm5.testcase \
	minm6.testcase \
	m_in.testcase \
	m_in_us.testcase \
	minz1.testcase \
	minz2.testcase \
	minz3.testcase \
	minz4.testcase \
	minz5.testcase \
	minz6.testcase \
	m_km.testcase \
	mlinefromtext1.testcase \
	mlinefromtext2.testcase \
	m_ln.testcase \
	m_mi.testcase \
	m_mm.testcase \
	mm_m.testcase \
	m_nm.testcase \
	mpointfromtext1.testcase \
	mpointfromtext2.testcase \
	mpolygonfromtext1.testcase \
	mpolygonfromtext2.testcase \
	m_us_ch.testcase \
	m_us_ft.testcase \
	m_usmi.testcase \
	m_yd.testcase \
	m_yd_us.testcase \
	namefrompath1.testcase \
	namefrompath2.testcase \
	namefrompath3.testcase \
	namefrompath4.testcase \
	namefrompath5.testcase \
	ndims1.testcase \
	ndims2.testcase \
	ndims3.testcase \
	ndims4.testcase \
	ndims5.testcase \
	ndims6.testcase \
	nm_m.testcase \
	normalizelonlat10.testcase \
	normalizelonlat11.testcase \
	normalizelonlat12.testcase \
	normalizelonlat13.testcase \
	normalizelonlat14.testcase \
	normalizelonlat15.testcase \
	normalizelonlat16.testcase \
	normalizelonlat17.testcase \
	normalizelonlat18.testcase \
	normalizelonlat19.testcase \
	normalizelonlat1.testcase \
	normalizelonlat20.testcase \
	normalizelonlat21.testcase \
	normalizelonlat22.testcase \
	normalizelonlat23.testcase \
	normalizelonlat24.testcase \
	normalizelonlat25.testcase \
	normalizelonlat26.testcase \
	normalizelonlat27.testcase \
	normalizelonlat2.testcase \
	normalizelonlat3.testcase \
	normalizelonlat4.testcase \
	normalizelonlat5.testcase \
	normalizelonlat6.testcase \
	normalizelonlat7.testcase \
	normalizelonlat8.testcase \
	normalizelonlat9.testcase \
	npoints1.testcase \
	npoints2.testcase \
	npoints3.testcase \
	npoints4.testcase \
	npoints5.testcase \
	npoints6.testcase \
	nrings1.testcase \
	nrings2.testcase \
	nrings3.testcase \
	nrings4.testcase \
	nrings5.testcase \
	nrings6.testcase \
	numgeometries1.testcase \
	numgeometries2.testcase \
	numgeometries3.testcase \
	numgeometries4.testcase \
	numgeometries5.testcase \
	numgeometries6.testcase \
	NumPoints2.testcase \
	NumPoints3.testcase \
	NumPoints4.testcase \
	NumPoints5.testcase \
	NumPoints6.testcase \
	NumPoints7.testcase \
	NumPoints.testcase \
	pointfromtext1.testcase \
	pointfromtext2.testcase \
	pointn10.testcase \
	pointn11.testcase \
	pointn12.testcase \
	pointn13.testcase \
	pointn14.testcase \
	pointn15.testcase \
	pointn1.testcase \
	pointn2.testcase \
	pointn3.testcase \
	pointn4.testcase \
	pointn5.testcase \
	pointn6.testcase \
	pointn7.testcase \
	pointn8.testcase \
	pointn9.testcase \
	polygccw1.testcase \
	polygccw2.testcase \
	polygccw3.testcase \
	polygccw4.testcase \
	polygccw5.testcase \
	polygccw6.testcase \
	polygcw1.testcase \
	polygcw2.testcase \
	polygcw3.testcase \
	polygcw4.testcase \
	polygcw5.testcase \
	polygcw6.testcase \
	polygonfromtext1.testcase \
	polygonfromtext2.testcase \
	reflectcoords10.testcase \
	reflectcoords11.testcase \
	reflectcoords12.testcase \
	reflectcoords13.testcase \
	reflectcoords14.testcase \
	reflectcoords15.testcase \
	reflectcoords16.testcase \
	reflectcoords17.testcase \
	reflectcoords1.testcase \
	reflectcoords2.testcase \
	reflectcoords3.testcase \
	reflectcoords4.testcase \
	reflectcoords5.testcase \
	reflectcoords6.testcase \
	reflectcoords7.testcase \
	reflectcoords8.testcase \
	reflectcoords9.testcase \
	removedupl1.testcase \
	removedupl2.testcase \
	removedupl3.testcase \
	removedupl4.testcase \
	removepoint10.testcase \
	removepoint11.testcase \
	removepoint12.testcase \
	removepoint13.testcase \
	removepoint14.testcase \
	removepoint15.testcase \
	removepoint16.testcase \
	removepoint1.testcase \
	removepoint2.testcase \
	removepoint3.testcase \
	removepoint4.testcase \
	removepoint5.testcase \
	removepoint6.testcase \
	removepoint7.testcase \
	removepoint8.testcase \
	removepoint9.testcase \
	repeatedpoints1.testcase \
	repeatedpoints2.testcase \
	repeatedpoints3.testcase \
	repeatedpoints4.testcase \
	repeatedpoints5.testcase \
	repeatedpoints6.testcase \
	repeatedpoints7.testcase \
	repeatedpoints8.testcase \
	repeatedpoints9.testcase \
	repeatedpoints10.testcase \
	repeatedpoints11.testcase \
	repeatedpoints12.testcase \
	repeatedpoints13.testcase \
	repeatedpoints14.testcase \
	reverse1.testcase \
	reverse2.testcase \
	reverse3.testcase \
	reverse4.testcase \
	reverse5.testcase \
	reverse6.testcase \
	ring10.testcase \
	ring11.testcase \
	ring12.testcase \
	ring13.testcase \
	ring14.testcase \
	ring15.testcase \
	ring16.testcase \
	ring17.testcase \
	ring18.testcase \
	ring19.testcase \
	ring1.testcase \
	ring20.testcase \
	ring21.testcase \
	ring22.testcase \
	ring23.testcase \
	ring24.testcase \
	ring25.testcase \
	ring26.testcase \
	ring27.testcase \
	ring28.testcase \
	ring2.testcase \
	ring3.testcase \
	ring4.testcase \
	ring5.testcase \
	ring6.testcase \
	ring7.testcase \
	ring8.testcase \
	ring9.testcase \
	rotatecoords10.testcase \
	rotatecoords11.testcase \
	rotatecoords12.testcase \
	rotatecoords13.testcase \
	rotatecoords14.testcase \
	rotatecoords1.testcase \
	rotatecoords2.testcase \
	rotatecoords3.testcase \
	rotatecoords4.testcase \
	rotatecoords5.testcase \
	rotatecoords6.testcase \
	rotatecoords7.testcase \
	rotatecoords8.testcase \
	rotatecoords9.testcase \
	routing1.testcase \
	routing2.testcase \
	routing3.testcase \
	routing4.testcase \
	routing5.testcase \
	rtreealign1.testcase \
	rtreealign2.testcase \
	rtreealign3.testcase \
	rtreealign4.testcase \
	sandro.jpg \
	sanitizeGeometry10.testcase \
	sanitizeGeometry11.testcase \
	sanitizeGeometry12.testcase \
	sanitizeGeometry13.testcase \
	sanitizeGeometry14.testcase \
	sanitizeGeometry15.testcase \
	sanitizeGeometry16.testcase \
	sanitizeGeometry1.testcase \
	sanitizeGeometry2.testcase \
	sanitizeGeometry3.testcase \
	sanitizeGeometry4.testcase \
	sanitizeGeometry5.testcase \
	sanitizeGeometry6.testcase \
	sanitizeGeometry7.testcase \
	sanitizeGeometry8.testcase \
	sanitizeGeometry9.testcase \
	scalecoords10.testcase \
	scalecoords11.testcase \
	scalecoords12.testcase \
	scalecoords13.testcase \
	scalecoords1.testcase \
	scalecoords2.testcase \
	scalecoords3.testcase \
	scalecoords4.testcase \
	scalecoords5.testcase \
	scalecoords6.testcase \
	scalecoords7.testcase \
	scalecoords8.testcase \
	scalecoords9.testcase \
	seconds.wav \
	setpoint10.testcase \
	setpoint11.testcase \
	setpoint12.testcase \
	setpoint13.testcase \
	setpoint14.testcase \
	setpoint15.testcase \
	setpoint16.testcase \
	setpoint17.testcase \
	setpoint18.testcase \
	setpoint19.testcase \
	setpoint1.testcase \
	setpoint20.testcase \
	setpoint21.testcase \
	setpoint22.testcase \
	setpoint23.testcase \
	setpoint2.testcase \
	setpoint3.testcase \
	setpoint4.testcase \
	setpoint5.testcase \
	setpoint6.testcase \
	setpoint7.testcase \
	setpoint8.testcase \
	setpoint9.testcase \
	setendpoint10.testcase \
	setendpoint11.testcase \
	setendpoint12.testcase \
	setendpoint13.testcase \
	setendpoint14.testcase \
	setendpoint15.testcase \
	setendpoint16.testcase \
	setendpoint1.testcase \
	setendpoint2.testcase \
	setendpoint3.testcase \
	setendpoint4.testcase \
	setendpoint5.testcase \
	setendpoint6.testcase \
	setendpoint7.testcase \
	setendpoint8.testcase \
	setendpoint9.testcase \
	setstartpoint10.testcase \
	setstartpoint11.testcase \
	setstartpoint12.testcase \
	setstartpoint13.testcase \
	setstartpoint14.testcase \
	setstartpoint15.testcase \
	setstartpoint16.testcase \
	setstartpoint1.testcase \
	setstartpoint2.testcase \
	setstartpoint3.testcase \
	setstartpoint4.testcase \
	setstartpoint5.testcase \
	setstartpoint6.testcase \
	setstartpoint7.testcase \
	setstartpoint8.testcase \
	setstartpoint9.testcase \
	shiftcoords10.testcase \
	shiftcoords11.testcase \
	shiftcoords12.testcase \
	shiftcoords13.testcase \
	shiftcoords14.testcase \
	shiftcoords15.testcase \
	shiftcoords1.testcase \
	shiftcoords2.testcase \
	shiftcoords3.testcase \
	shiftcoords4.testcase \
	shiftcoords5.testcase \
	shiftcoords6.testcase \
	shiftcoords7.testcase \
	shiftcoords8.testcase \
	shiftcoords9.testcase \
	shiftlongitude10.testcase \
	shiftlongitude11.testcase \
	shiftlongitude12.testcase \
	shiftlongitude13.testcase \
	shiftlongitude14.testcase \
	shiftlongitude15.testcase \
	shiftlongitude16.testcase \
	shiftlongitude17.testcase \
	shiftlongitude18.testcase \
	shiftlongitude19.testcase \
	shiftlongitude1.testcase \
	shiftlongitude20.testcase \
	shiftlongitude21.testcase \
	shiftlongitude22.testcase \
	shiftlongitude23.testcase \
	shiftlongitude24.testcase \
	shiftlongitude25.testcase \
	shiftlongitude26.testcase \
	shiftlongitude2.testcase \
	shiftlongitude3.testcase \
	shiftlongitude4.testcase \
	shiftlongitude5.testcase \
	shiftlongitude6.testcase \
	shiftlongitude7.testcase \
	shiftlongitude8.testcase \
	shiftlongitude9.testcase \
	spatialindex.testcase \
	srid10.testcase \
	srid11.testcase \
	srid1.testcase \
	srid2.testcase \
	srid3.testcase \
	srid4.testcase \
	srid5.testcase \
	srid6.testcase \
	srid7.testcase \
	srid8.testcase \
	srid9.testcase \
	SridFromAuthCRS2.testcase \
	SridFromAuthCRS3.testcase \
	SridFromAuthCRS4.testcase \
	SridFromAuthCRS5.testcase \
	SridFromAuthCRS6.testcase \
	SridFromAuthCRS.testcase \
	startpoint1.testcase \
	startpoint2.testcase \
	startpoint3.testcase \
	st_m1.testcase \
	st_m2.testcase \
	st_m3.testcase \
	st_m4.testcase \
	st_m5.testcase \
	st_m6.testcase \
	st_m8.testcase \
	st_x1.testcase \
	st_x2.testcase \
	st_x3.testcase \
	st_x4.testcase \
	st_x5.testcase \
	st_x6.testcase \
	st_x7.testcase \
	st_x8.testcase \
	st_x9.testcase \
	st_y1.testcase \
	st_y2.testcase \
	st_y3.testcase \
	st_y4.testcase \
	st_y5.testcase \
	st_y7.testcase \
	st_y8.testcase \
	st_y9.testcase \
	st_z1.testcase \
	st_z2.testcase \
	st_z3.testcase \
	st_z4.testcase \
	st_z5.testcase \
	st_z6.testcase \
	st_z7.testcase \
	st_z8.testcase \
	st_z9.testcase \
	swapcoords10.testcase \
	swapcoords11.testcase \
	swapcoords1.testcase \
	swapcoords2.testcase \
	swapcoords3.testcase \
	swapcoords4.testcase \
	swapcoords5.testcase \
	swapcoords6.testcase \
	swapcoords7.testcase \
	swapcoords8.testcase \
	swapcoords9.testcase \
	testdb1.sqlite \
	testFDO.sqlite \
	testFGF.sqlite \
	test.webp \
	togars10.testcase \
	togars11.testcase \
	togars12.testcase \
	togars13.testcase \
	togars1.testcase \
	togars2.testcase \
	togars3.testcase \
	togars4.testcase \
	togars5.testcase \
	togars6.testcase \
	togars7.testcase \
	togars8.testcase \
	togars9.testcase \
	translate10.testcase \
	translate11.testcase \
	translate12.testcase \
	translate13.testcase \
	translate14.testcase \
	translate15.testcase \
	translate16.testcase \
	translate17.testcase \
	translate18.testcase \
	translate19.testcase \
	translate1.testcase \
	translate2.testcase \
	translate3.testcase \
	translate4.testcase \
	translate5.testcase \
	translate6.testcase \
	translate7.testcase \
	translate8.testcase \
	translate9.testcase \
	trivial.sqlite_RO \
	uncompressgeom1.testcase \
	uncompressgeom2.testcase \
	uncompressgeom3.testcase \
	unsafeTriggers1.testcase \
	us_ch_m.testcase \
	us_ft_m.testcase \
	us_in_m.testcase \
	us_mi_m.testcase \
	us_yd_m.testcase \
	wkb10.testcase \
	wkb11.testcase \
	wkb12.testcase \
	wkb13.testcase \
	wkb14.testcase \
	wkb15.testcase \
	wkb16.testcase \
	wkb17.testcase \
	wkb18.testcase \
	wkb19.testcase \
	wkb1.testcase \
	wkb20.testcase \
	wkb21.testcase \
	wkb22.testcase \
	wkb23.testcase \
	wkb24.testcase \
	wkb25.testcase \
	wkb26.testcase \
	wkb27.testcase \
	wkb28.testcase \
	wkb29.testcase \
	wkb2.testcase \
	wkb30.testcase \
	wkb31.testcase \
	wkb32.testcase \
	wkb33.testcase \
	wkb34.testcase \
	wkb35.testcase \
	wkb36.testcase \
	wkb3.testcase \
	wkb4.testcase \
	wkb5.testcase \
	wkb6.testcase \
	wkb7.testcase \
	wkb8.testcase \
	wkb9.testcase \
	wkbtosql1.testcase \
	wkbtosql2.testcase \
	wkbtosql3.testcase \
	wkttosql1.testcase \
	wkttosql2.testcase \
	wkttosql3.testcase \
	yd_m.testcase \
	getlayerextent1.testcase \
	getlayerextent2.testcase \
	getlayerextent3.testcase \
	getlayerextent4.testcase \
	getlayerextent5.testcase \
	getlayerextent6.testcase \
	getlayerextent7.testcase \
	getlayerextent8.testcase \
	getlayerextent9.testcase \
	getlayerextent10.testcase \
	getlayerextent11.testcase \
	getlayerextent12.testcase \
	getlayerextent13.testcase \
	getlayerextent14.testcase \
	invalidatestats1.testcase \
	invalidatestats2.testcase \
	invalidatestats3.testcase \
	invalidatestats4.testcase \
	invalidatestats5.testcase \
	invalidatestats6.testcase \
	invalidatestats7.testcase \
	invalidatestats8.testcase \
	invalidatestats9.testcase \
	invalidatestats10.testcase \
	updatestats1.testcase \
	updatestats2.testcase \
	updatestats3.testcase \
	updatestats4.testcase \
	updatestats5.testcase \
	updatestats6.testcase \
	updatestats7.testcase \
	updatestats8.testcase \
	updatestats9.testcase \
	updatestats10.testcase \
	makepolygon1.testcase \
	makepolygon2.testcase \
	makepolygon3.testcase \
	makepolygon4.testcase \
	makepolygon5.testcase \
	makepolygon7.testcase \
	makepolygon8.testcase \
	makepolygon9.testcase \
	makepolygon10.testcase \
	makepolygon11.testcase \
	makepolygon12.testcase \
	makepolygon13.testcase \
	makepolygon14.testcase \
	makepolygon15.testcase \
	makepolygon16.testcase \
	makepolygon17.testcase \
	makepolygon18.testcase \
	makepolygon19.testcase \
	makepolygon20.testcase \
	makepolygon21.testcase \
	makepolygon22.testcase \
	makepolygon23.testcase \
	makepolygon24.testcase \
	makepolygon25.testcase \
	makepolygon26.testcase \
	todms1.testcase \
	todms2.testcase \
	todms3.testcase \
	todms4.testcase \
	todms5.testcase \
	todms6.testcase \
	todms7.testcase \
	todms8.testcase \
	todms9.testcase \
	todms10.testcase \
	todms11.testcase \
	todms12.testcase \
	todms13.testcase \
	fromdms1.testcase \
	fromdms2.testcase \
	fromdms3.testcase \
	fromdms4.testcase \
	fromdms5.testcase \
	fromdms6.testcase \
	fromdms7.testcase \
	fromdms8.testcase \
	fromdms9.testcase \
	sridisgeographic1.testcase \
	sridisgeographic2.testcase \
	sridisgeographic3.testcase \
	sridisgeographic4.testcase \
	sridisgeographic5.testcase \
	sridisgeographic6.testcase \
	sridisgeographic7.testcase \
	sridisprojected1.testcase \
	sridisprojected2.testcase \
	sridisprojected3.testcase \
	sridisprojected4.testcase \
	sridisprojected5.testcase \
	sridisprojected6.testcase \
	sridisprojected7.testcase \
	sridflipped1.testcase \
	sridflipped2.testcase \
	sridflipped3.testcase \
	sridflipped4.testcase \
	sridflipped5.testcase \
	sridflipped6.testcase \
	sridflipped7.testcase \
	sridspheroid1.testcase \
	sridspheroid2.testcase \
	sridspheroid3.testcase \
	sridspheroid4.testcase \
	sridspheroid5.testcase \
	sridspheroid6.testcase \
	sridprimem1.testcase \
	sridprimem2.testcase \
	sridprimem3.testcase \
	sridprimem4.testcase \
	sridprimem5.testcase \
	sridprimem6.testcase \
	sriddatum1.testcase \
	sriddatum2.testcase \
	sriddatum3.testcase \
	sriddatum4.testcase \
	sriddatum5.testcase \
	sriddatum6.testcase \
	sridunit1.testcase \
	sridunit2.testcase \
	sridunit3.testcase \
	sridunit4.testcase \
	sridunit5.testcase \
	sridunit6.testcase \
	sridprojection1.testcase \
	sridprojection2.testcase \
	sridprojection3.testcase \
	sridprojection4.testcase \
	sridprojection5.testcase \
	sridprojection6.testcase \
	sridax1name1.testcase \
	sridax1name2.testcase \
	sridax1name3.testcase \
	sridax1name4.testcase \
	sridax1name5.testcase \
	sridax1name6.testcase \
	sridax1orient1.testcase \
	sridax1orient2.testcase \
	sridax1orient3.testcase \
	sridax1orient4.testcase \
	sridax1orient5.testcase \
	sridax1orient6.testcase \
	sridax2name1.testcase \
	sridax2name2.testcase \
	sridax2name3.testcase \
	sridax2name4.testcase \
	sridax2name5.testcase \
	sridax2name6.testcase \
	sridax2orient1.testcase \
	sridax2orient2.testcase \
	sridax2orient3.testcase \
	sridax2orient4.testcase \
	sridax2orient5.testcase \
	sridax2orient6.testcase \
	stringlist1.testcase \
	stringlist2.testcase \
	stringlist3.testcase \
	stringlist4.testcase \
	stringlist5.testcase \
	tinypointencode1.testcase \
	tinypointencode2.testcase \
	tinypointencode3.testcase \
	tinypointencode4.testcase \
	tinypointencode5.testcase \
	tinypointencode6.testcase \
	tinypointencode7.testcase \
	tinypointencode8.testcase \
	tinypointencode9.testcase \
	tinypointencode10.testcase \
	trajectorypoint1.testcase \
	trajectorypoint2.testcase \
	trajectorypoint3.testcase \
	trajectorypoint4.testcase \
	trajectorypoint5.testcase \
	trajectorypoint6.testcase \
	trajectorypoint7.testcase \
	trajectorypoint8.testcase \
	trajectorypoint9.testcase \
	trajectorypoint10.testcase \
	trajectorypoint11.testcase \
	trajectorypoint12.testcase \
	wms_defaultsetting1.testcase \
	wms_defaultsetting2.testcase \
	wms_defaultsetting3.testcase \
	wms_defaultsetting4.testcase \
	wms_defaultsetting5.testcase \
	wms_defaultsetting6.testcase \
	wms_defaultsetting7.testcase \
	wms_defaultsetting8.testcase \
	wms_defaultsetting9.testcase \
	wms_defaultsetting10.testcase \
	wms_defaultsetting11.testcase \
	wms_defaultsetting12.testcase \
	wms_defaultsetting13.testcase \
	wms_defaultsetting14.testcase \
	wms_defaultsetting15.testcase \
	wms_defaultsetting16.testcase \
	wms_defaultsetting17.testcase \
	wms_defaultsrs1.testcase \
	wms_defaultsrs2.testcase \
	wms_defaultsrs3.testcase \
	wms_defaultsrs4.testcase \
	wms_defaultsrs5.testcase \
	wms_defaultsrs6.testcase \
	wms_defaultsrs7.testcase \
	wms_defaultsrs8.testcase \
	wms_defaultsrs9.testcase \
	wms_defaultsrs10.testcase \
	wms_defaultsrs11.testcase \
	wms_defaultsrs12.testcase \
	wms_defaultsrs13.testcase \
	wms_getmapoptions1.testcase \
	wms_getmapoptions2.testcase \
	wms_getmapoptions3.testcase \
	wms_getmapoptions4.testcase \
	wms_getmapoptions5.testcase \
	wms_getmapoptions6.testcase \
	wms_getmapoptions7.testcase \
	wms_getmapoptions8.testcase \
	wms_getmapoptions9.testcase \
	wms_getmapoptions10.testcase \
	wms_getmapoptions11.testcase \
	wms_getmapoptions12.testcase \
	wms_getmapoptions13.testcase \
	wms_getmapoptions14.testcase \
	wms_getmapoptions15.testcase \
	wms_getmapoptions16.testcase \
	wms_getmapoptions17.testcase \
	wms_getmapoptions18.testcase \
	wms_getmapoptions19.testcase \
	wms_getmapoptions20.testcase \
	wms_getmapoptions21.testcase \
	wms_getmapoptions22.testcase \
	wms_getmapoptions23.testcase \
	wms_getmapoptions24.testcase \
	wms_getmapoptions25.testcase \
	wms_getmapoptions26.testcase \
	wms_getmapoptions27.testcase \
	wms_getmapoptions28.testcase \
	wms_getmapoptions29.testcase \
	wms_getmapoptions30.testcase \
	wms_getmapoptions31.testcase \
	wms_getmapoptions32.testcase \
	wms_getmapoptions33.testcase \
	wms_getmapoptions34.testcase \
	wms_getmapoptions35.testcase \
	wms_getmapoptions36.testcase \
	wms_getmapoptions37.testcase \
	wms_getmapoptions38.testcase \
	wms_getmapoptions39.testcase \
	wms_getmapoptions40.testcase \
	wms_getmapoptions41.testcase \
	wms_getmapoptions42.testcase \
	wms_getmapoptions43.testcase \
	wms_getmapoptions44.testcase \
	wms_getinfo_url1.testcase \
	wms_getinfo_url2.testcase \
	wms_getinfo_url3.testcase \
	wms_getinfo_url4.testcase \
	wms_getinfo_url5.testcase \
	wms_getinfo_url6.testcase \
	wms_getinfo_url7.testcase \
	wms_getinfo_url8.testcase \
	wms_getinfo_url9.testcase \
	wms_getinfo_url10.testcase \
	wms_getinfo_url11.testcase \
	wms_getinfo_url12.testcase \
	wms_getinfo_url13.testcase \
	wms_getinfo_url14.testcase \
	wms_getinfo_url15.testcase \
	wms_getinfo_url16.testcase \
	wms_getinfo_url17.testcase \
	wms_getinfo_url18.testcase \
	wms_getinfo_url19.testcase \
	wms_getinfo_url20.testcase \
	wms_getinfo_url21.testcase \
	wms_getinfo_url22.testcase \
	wms_getinfo_url23.testcase \
	wms_getinfo_url24.testcase \
	wms_getinfo_url25.testcase \
	wms_getinfo_url26.testcase \
	wms_getinfo_url27.testcase \
	wms_getinfo_url28.testcase \
	wms_getinfo_url29.testcase \
	wms_getinfo_url30.testcase \
	wms_getinfo_url31.testcase \
	wms_getinfo_url32.testcase \
	wms_getinfo_url33.testcase \
	wms_getinfo_url34.testcase \
	wms_getinfo_url35.testcase \
	wms_getinfo_url36.testcase \
	wms_getinfo_url37.testcase \
	wms_getinfo_url38.testcase \
	wms_getinfo_url39.testcase \
	wms_getinfo_url40.testcase \
	wms_getinfo_url41.testcase \
	wms_getinfo_url42.testcase \
	wms_getmap_url1.testcase \
	wms_getmap_url2.testcase \
	wms_getmap_url3.testcase \
	wms_getmap_url4.testcase \
	wms_getmap_url5.testcase \
	wms_getmap_url6.testcase \
	wms_getmap_url7.testcase \
	wms_getmap_url8.testcase \
	wms_getmap_url9.testcase \
	wms_getmap_url10.testcase \
	wms_getmap_url11.testcase \
	wms_getmap_url12.testcase \
	wms_getmap_url13.testcase \
	wms_getmap_url14.testcase \
	wms_getmap_url15.testcase \
	wms_getmap_url16.testcase \
	wms_getmap_url17.testcase \
	wms_getmap_url18.testcase \
	wms_getmap_url19.testcase \
	wms_getmap_url20.testcase \
	wms_getmap_url21.testcase \
	wms_getmap_url22.testcase \
	wms_getmap_url23.testcase \
	wms_getmap_url24.testcase \
	wms_getmap_url25.testcase \
	wms_getmap_url26.testcase \
	wms_getmap_url27.testcase \
	wms_getmap_url28.testcase \
	wms_getmap_url29.testcase \
	wms_getmap_url30.testcase \
	wms_registergetcapab1.testcase \
	wms_registergetcapab2.testcase \
	wms_registergetcapab3.testcase \
	wms_registergetcapab4.testcase \
	wms_registergetcapab5.testcase \
	wms_registergetcapab6.testcase \
	wms_registergetcapab7.testcase \
	wms_registergetcapab8.testcase \
	wms_registergetcapab9.testcase \
	wms_registergetcapab10.testcase \
	wms_registergetcapab11.testcase \
	wms_registergetcapab12.testcase \
	wms_registergetcapab13.testcase \
	wms_registergetmap1.testcase \
	wms_registergetmap2.testcase \
	wms_registergetmap3.testcase \
	wms_registergetmap4.testcase \
	wms_registergetmap5.testcase \
	wms_registergetmap6.testcase \
	wms_registergetmap7.testcase \
	wms_registergetmap8.testcase \
	wms_registergetmap9.testcase \
	wms_registergetmap10.testcase \
	wms_registergetmap11.testcase \
	wms_registergetmap12.testcase \
	wms_registergetmap13.testcase \
	wms_registergetmap14.testcase \
	wms_registergetmap15.testcase \
	wms_registergetmap16.testcase \
	wms_registergetmap17.testcase \
	wms_registergetmap18.testcase \
	wms_registergetmap19.testcase \
	wms_registergetmap20.testcase \
	wms_registergetmap21.testcase \
	wms_registergetmap22.testcase \
	wms_registergetmap23.testcase \
	wms_registergetmap24.testcase \
	wms_registergetmap25.testcase \
	wms_registergetmap26.testcase \
	wms_registergetmap27.testcase \
	wms_registergetmap28.testcase \
	wms_registergetmap29.testcase \
	wms_registergetmap30.testcase \
	wms_registergetmap31.testcase \
	wms_registergetmap32.testcase \
	wms_registergetmap33.testcase \
	wms_registergetmap34.testcase \
	wms_registergetmap35.testcase \
	wms_registergetmap36.testcase \
	wms_registergetmap37.testcase \
	wms_registergetmap38.testcase \
	wms_registergetmap39.testcase \
	wms_registergetmap40.testcase \
	wms_registergetmap41.testcase \
	wms_registergetmap42.testcase \
	wms_registergetmap43.testcase \
	wms_registergetmap44.testcase \
	wms_registergetmap45.testcase \
	wms_registergetmap46.testcase \
	wms_registergetmap47.testcase \
	wms_registergetmap48.testcase \
	wms_registergetmap49.testcase \
	wms_registergetmap50.testcase \
	wms_registergetmap51.testcase \
	wms_registergetmap52.testcase \
	wms_registergetmap53.testcase \
	wms_registergetmap54.testcase \
	wms_registergetmap55.testcase \
	wms_registergetmap56.testcase \
	wms_registergetmap57.testcase \
	wms_registergetmap58.testcase \
	wms_registergetmap59.testcase \
	wms_registergetmap60.testcase \
	wms_registergetmap61.testcase \
	wms_registergetmap62.testcase \
	wms_registergetmap63.testcase \
	wms_registergetmap64.testcase \
	wms_registergetmap65.testcase \
	wms_registergetmap66.testcase \
	wms_registergetmap67.testcase \
	wms_registergetmap68.testcase \
	wms_registergetmap69.testcase \
	wms_registergetmap70.testcase \
	wms_registergetmap71.testcase \
	wms_registergetmap72.testcase \
	wms_registergetmap73.testcase \
	wms_registergetmap74.testcase \
	wms_registergetmap75.testcase \
	wms_registergetmap76.testcase \
	wms_registergetmap77.testcase \
	wms_registergetmap78.testcase \
	wms_registergetmap79.testcase \
	wms_registergetmap80.testcase \
	wms_registergetmap81.testcase \
	wms_registergetmap82.testcase \
	wms_registergetmap83.testcase \
	wms_registergetmap84.testcase \
	wms_registergetmap85.testcase \
	wms_registergetmap86.testcase \
	wms_registersetting1.testcase \
	wms_registersetting2.testcase \
	wms_registersetting3.testcase \
	wms_registersetting4.testcase \
	wms_registersetting5.testcase \
	wms_registersetting6.testcase \
	wms_registersetting7.testcase \
	wms_registersetting8.testcase \
	wms_registersetting9.testcase \
	wms_registersetting10.testcase \
	wms_registersetting11.testcase \
	wms_registersetting12.testcase \
	wms_registersetting13.testcase \
	wms_registersetting14.testcase \
	wms_registersetting15.testcase \
	wms_registersetting16.testcase \
	wms_registersetting17.testcase \
	wms_registersetting18.testcase \
	wms_registersetting19.testcase \
	wms_registersetting20.testcase \
	wms_registersetting21.testcase \
	wms_registersetting22.testcase \
	wms_registersrs1.testcase \
	wms_registersrs2.testcase \
	wms_registersrs3.testcase \
	wms_registersrs4.testcase \
	wms_registersrs5.testcase \
	wms_registersrs6.testcase \
	wms_registersrs7.testcase \
	wms_registersrs8.testcase \
	wms_registersrs9.testcase \
	wms_registersrs10.testcase \
	wms_registersrs11.testcase \
	wms_registersrs12.testcase \
	wms_registersrs13.testcase \
	wms_registersrs14.testcase \
	wms_registersrs15.testcase \
	wms_registersrs16.testcase \
	wms_registersrs17.testcase \
	wms_registersrs18.testcase \
	wms_registersrs19.testcase \
	wms_registersrs20.testcase \
	wms_registersrs21.testcase \
	wms_registersrs22.testcase \
	wms_registersrs23.testcase \
	wms_registersrs24.testcase \
	wms_registersrs25.testcase \
	wms_registersrs26.testcase \
	wms_registersrs27.testcase \
	wms_registersrs28.testcase \
	wms_registersrs29.testcase \
	wms_setgetcapabinfo1.testcase \
	wms_setgetcapabinfo2.testcase \
	wms_setgetcapabinfo3.testcase \
	wms_setgetcapabinfo4.testcase \
	wms_setgetcapabinfo5.testcase \
	wms_setgetcapabinfo6.testcase \
	wms_setgetcapabinfo7.testcase \
	wms_setgetcapabinfo8.testcase \
	wms_setgetcapabinfo9.testcase \
	wms_setgetcapabinfo10.testcase \
	wms_setgetcapabinfo11.testcase \
	wms_setgetcapabinfo12.testcase \
	wms_setgetcapabinfo13.testcase \
	wms_setcopyright1.testcase \
	wms_setcopyright2.testcase \
	wms_setcopyright3.testcase \
	wms_setcopyright4.testcase \
	wms_setcopyright5.testcase \
	wms_setcopyright6.testcase \
	wms_setcopyright7.testcase \
	wms_setcopyright8.testcase \
	wms_setcopyright9.testcase \
	wms_setcopyright10.testcase \
	wms_setcopyright11.testcase \
	wms_setcopyright12.testcase \
	wms_setcopyright13.testcase \
	wms_setcopyright14.testcase \
	wms_setcopyright15.testcase \
	wms_setcopyright16.testcase \
	wms_setcopyright17.testcase \
	wms_setcopyright18.testcase \
	wms_setcopyright19.testcase \
	wms_setgetmapinfo1.testcase \
	wms_setgetmapinfo2.testcase \
	wms_setgetmapinfo3.testcase \
	wms_setgetmapinfo4.testcase \
	wms_setgetmapinfo5.testcase \
	wms_setgetmapinfo6.testcase \
	wms_setgetmapinfo7.testcase \
	wms_setgetmapinfo8.testcase \
	wms_setgetmapinfo9.testcase \
	wms_setgetmapinfo10.testcase \
	wms_setgetmapinfo11.testcase \
	wms_setgetmapinfo12.testcase \
	wms_setgetmapinfo13.testcase \
	wms_setgetmapinfo14.testcase \
	wms_setgetmapinfo15.testcase \
	wms_setgetmapinfo16.testcase \
	wms_setgetmapinfo17.testcase \
	wms_unregistergetcapab1.testcase \
	wms_unregistergetcapab2.testcase \
	wms_unregistergetcapab3.testcase \
	wms_unregistergetcapab4.testcase \
	wms_unregistergetcapab5.testcase \
	wms_unregistergetmap1.testcase \
	wms_unregistergetmap2.testcase \
	wms_unregistergetmap3.testcase \
	wms_unregistergetmap4.testcase \
	wms_unregistergetmap5.testcase \
	wms_unregistergetmap6.testcase \
	wms_unregistergetmap7.testcase \
	wms_unregistergetmap8.testcase \
	wms_unregistergetmap9.testcase \
	wms_unregistersetting1.testcase \
	wms_unregistersetting2.testcase \
	wms_unregistersetting3.testcase \
	wms_unregistersetting4.testcase \
	wms_unregistersetting5.testcase \
	wms_unregistersetting6.testcase \
	wms_unregistersetting7.testcase \
	wms_unregistersetting8.testcase \
	wms_unregistersetting9.testcase \
	wms_unregistersetting10.testcase \
	wms_unregistersetting11.testcase \
	wms_unregistersetting12.testcase \
	wms_unregistersetting13.testcase \
	wms_unregistersetting14.testcase \
	wms_unregistersetting15.testcase \
	wms_unregistersetting16.testcase \
	wms_unregistersetting17.testcase \
	wms_unregistersrs1.testcase \
	wms_unregistersrs2.testcase \
	wms_unregistersrs3.testcase \
	wms_unregistersrs4.testcase \
	wms_unregistersrs5.testcase \
	wms_unregistersrs6.testcase \
	wms_unregistersrs7.testcase \
	wms_unregistersrs8.testcase \
	wms_unregistersrs9.testcase \
	wms_unregistersrs10.testcase \
	wms_unregistersrs11.testcase \
	wms_unregistersrs12.testcase \
	wms_unregistersrs13.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: # $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to test/sql_stmt_tests/Makefile.am.

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
...
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
...
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
...
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
...
660
661
662
663
664
665
666

667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
...
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
...
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
...
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
....
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
....
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
....
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
....
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
....
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
....
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
....
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
....
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
....
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
....
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
....
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
....
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
	addpoint3.testcase \
	addpoint4.testcase \
	addpoint5.testcase \
	addpoint6.testcase \
	addpoint7.testcase \
	addpoint8.testcase \
	addpoint9.testcase \
	addmeasure1.testcase \
	addmeasure2.testcase \
	addmeasure3.testcase \
	addmeasure4.testcase \
	addmeasure5.testcase \
	addmeasure6.testcase \
	addmeasure7.testcase \
	addmeasure8.testcase \
	addmeasure9.testcase \
	addmeasure10.testcase \
	addmeasure11.testcase \
	addmeasure12.testcase \
	addmeasure13.testcase \
	addmeasure14.testcase \
	addmeasure15.testcase \
	asbinary10.testcase \
	asbinary11.testcase \
	asbinary12.testcase \
	asbinary13.testcase \
	asbinary14.testcase \
	asbinary15.testcase \
	asbinary16.testcase \
................................................................................
	atmcreate16.testcase \
	atmcreate17.testcase \
	atmcreate18.testcase \
	atmcreate19.testcase \
	atmcreate20.testcase \
	atmcreate21.testcase \
	atmcreate22.testcase \
	atmcreate23.testcase \
	atmcreatescale1.testcase \
	atmcreatescale2.testcase \
	atmcreatescale3.testcase \
	atmcreatescale4.testcase \
	atmcreatescale5.testcase \
	atmcreatescale6.testcase \
	atmcreatescale7.testcase \
................................................................................
	atmcreatexroll3.testcase \
	atmcreateyroll1.testcase \
	atmcreateyroll2.testcase \
	atmcreateyroll3.testcase \
	atmcreatezroll1.testcase \
	atmcreatezroll2.testcase \
	atmcreatezroll3.testcase \
	atmdeterminant1.testcase \
	atmdeterminant2.testcase \
	atmdeterminant3.testcase \
	atmdeterminant4.testcase \
	atminvert1.testcase \
	atminvert2.testcase \
	atminvert3.testcase \
	atminvert4.testcase \
	atmisinvert1.testcase \
	atmisinvert2.testcase \
	atmisinvert3.testcase \
	atmisinvert4.testcase \
	atmisvalid1.testcase \
	atmisvalid2.testcase \
	atmisvalid3.testcase \
	atmisvalid4.testcase \
	atmisvalid5.testcase \
	atmisvalid6.testcase \
	atmmultiply1.testcase \
................................................................................
	casttoxy3.testcase \
	casttoxym1.testcase \
	casttoxym2.testcase \
	casttoxym3.testcase \
	casttoxym4.testcase \
	casttoxym5.testcase \
	casttoxym6.testcase \
	casttoxym7.testcase \
	casttoxym8.testcase \
	casttoxym9.testcase \
	casttoxym10.testcase \
	casttoxym11.testcase \
	casttoxyz1.testcase \
	casttoxyz2.testcase \
	casttoxyz3.testcase \
	casttoxyz4.testcase \
	casttoxyz5.testcase \
	casttoxyz6.testcase \
	casttoxyz7.testcase \
	casttoxyz8.testcase \
	casttoxyz9.testcase \
	casttoxyz10.testcase \
	casttoxyz11.testcase \
	casttoxyzm1.testcase \
	casttoxyzm2.testcase \
	casttoxyzm3.testcase \
	casttoxyzm4.testcase \
	casttoxyzm5.testcase \
	casttoxyzm6.testcase \
	casttoxyzm7.testcase \
	casttoxyzm8.testcase \
	casttoxyzm9.testcase \
	casttoxyzm10.testcase \
	casttoxyzm11.testcase \
	casttoxyzm12.testcase \
	casttoxyzm13.testcase \
	casttoxyzm14.testcase \
	casttoxyzm15.testcase \
	casttoxyzm16.testcase \
	checkdupl1.testcase \
	checkdupl2.testcase \
	checkspatialmetadata1.testcase \
	checkspatialmetadata2.testcase \
	checkspatialmetadata3.testcase \
	checkspatialmetadata4.testcase \
	checkspatialmetadata5.testcase \
	checkspatialmetadata6.testcase \
	checkspatialmetadata7.testcase \
	checkspatialmetadata8.testcase \
	clonetable1.testcase \
	clonetable2.testcase \
	clonetable3.testcase \
	clonetable4.testcase \
	clonetable5.testcase \
	clonetable6.testcase \
	clonetable7.testcase \
................................................................................
	clonetable9.testcase \
	clonetable10.testcase \
	clonetable11.testcase \
	clonetable12.testcase \
	clonetable13.testcase \
	clonetable14.testcase \
	clonetable15.testcase \
	createclonetable1.testcase \
	createclonetable2.testcase \
	createclonetable3.testcase \
	createclonetable4.testcase \
	createclonetable5.testcase \
	createclonetable6.testcase \
	createclonetable7.testcase \
	createclonetable8.testcase \
	createclonetable9.testcase \
	createclonetable10.testcase \
	createclonetable11.testcase \
	createclonetable12.testcase \
	createclonetable13.testcase \
	createclonetable14.testcase \
	createclonetable15.testcase \
	ch_m.testcase \
	cm_m.testcase \
	collect10.testcase \
	collect11.testcase \
	collect12.testcase \
	collect13.testcase \
	collect14.testcase \
................................................................................
	compressgeometry68.testcase \
	compressgeometry69.testcase \
	compressgeometry6.testcase \
	compressgeometry7.testcase \
	compressgeometry8.testcase \
	compressgeometry9.testcase \
	createrastercoverages.testcase \

	createuuid1.testcase \
	datalic_register1.testcase \
	datalic_register2.testcase \
	datalic_register3.testcase \
	datalic_register4.testcase \
	datalic_register5.testcase \
	datalic_register6.testcase \
	datalic_register7.testcase \
	datalic_register8.testcase \
	datalic_register9.testcase \
	datalic_register10.testcase \
	datalic_rename1.testcase \
	datalic_rename2.testcase \
	datalic_rename3.testcase \
	datalic_rename4.testcase \
	datalic_rename5.testcase \
	datalic_rename6.testcase \
	datalic_rename7.testcase \
	datalic_rename8.testcase \
	datalic_rename9.testcase \
	datalic_seturl1.testcase \
	datalic_seturl2.testcase \
	datalic_seturl3.testcase \
	datalic_seturl4.testcase \
	datalic_seturl5.testcase \
	datalic_seturl6.testcase \
	datalic_seturl7.testcase \
	datalic_seturl8.testcase \
	datalic_seturl9.testcase \
	datalic_unregister1.testcase \
	datalic_unregister2.testcase \
	datalic_unregister3.testcase \
	datalic_unregister4.testcase \
	datalic_unregister5.testcase \
	dirfrompath1.testcase \
	dirfrompath2.testcase \
	dirfrompath3.testcase \
	dirfrompath4.testcase \
	dirfrompath5.testcase \
	dimension1.testcase \
	dimension2.testcase \
................................................................................
	DSC_1467.JPG \
	DSCN0042.JPG \
	dropgeo1.testcase \
	dropgeo2.testcase \
	dropgeo3.testcase \
	dropgeo4.testcase \
	dropgeo5.testcase \
	dropgeo6.testcase \
	dropgeo7.testcase \
	dropgeo8.testcase \
	dropgeo9.testcase \
	elemgeo1.testcase \
	elemgeo2.testcase \
	elemgeo3.testcase \
	elemgeo4.testcase \
	elemgeo5.testcase \
	elemgeo6.testcase \
	elemgeo7.testcase \
	elemgeo8.testcase \
	elemgeo9.testcase \
	elemgeo10.testcase \
	elemgeo11.testcase \
	elemgeo12.testcase \
	elemgeo13.testcase \
	elemgeo14.testcase \
	elemgeo15.testcase \
	elemgeo16.testcase \
	elemgeo17.testcase \
	elemgeo18.testcase \
	elemgeo19.testcase \
	emptyfile.txt \
	endpoint1.testcase \
	ensureclosedrings1.testcase \
	ensureclosedrings2.testcase \
	ensureclosedrings3.testcase \
	ensureclosedrings4.testcase \
	ensureclosedrings5.testcase \
	ensureclosedrings6.testcase \
	ensureclosedrings7.testcase \
	ensureclosedrings8.testcase \
	ensureclosedrings9.testcase \
	ensureclosedrings10.testcase \
	envelope1.testcase \
	envelope2.testcase \
	envelope3.testcase \
	envelope4.testcase \
	envelope5.testcase \
	envelope6.testcase \
	envelope7.testcase \
................................................................................
	extractmultipoint3.testcase \
	extractmultipolygon1.testcase \
	extractmultipolygon2.testcase \
	extractmultipolygon3.testcase \
	fath_m.testcase \
	fdo_ogr1.testcase \
	fdo_ogr2.testcase \
	fdo_ogr3.testcase \
	fdo_ogr4.testcase \
	fdo_ogr5.testcase \
	fdo_ogr6.testcase \
	fdo_ogr7.testcase \
	fdo_ogr8.testcase \
	fdo-wkb.sqlite_RO \
	forcenull10.testcase \
	forcenull11.testcase \
	forcenull12.testcase \
	forcenull13.testcase \
	forcenull14.testcase \
	forcenull15.testcase \
................................................................................
	fromgeojson3.testcase \
	fromgeojson4.testcase \
	fromgeojson5.testcase \
	fromgeojson6.testcase \
	fromgeojson7.testcase \
	fromgeojson8.testcase \
	fromgeojson9.testcase \
	fromgeojsonmix1.testcase \
	fromgeojsonmix2.testcase \
	fromgeojsonmix3.testcase \
	fromgeojsonmix4.testcase \
	fromgeojsonmix5.testcase \
	fromgeojsonmix6.testcase \
	fromgeojsonmix7.testcase \
	fromgeojsonmix8.testcase \
	fromgeojsonmix9.testcase \
	fromgeojsonpt10.testcase \
	fromgeojsonpt11.testcase \
	fromgeojsonpt12.testcase \
	fromgeojsonpt13.testcase \
	fromgeojsonpt14.testcase \
	fromgeojsonpt15.testcase \
	fromgeojsonpt16.testcase \
	fromgeojsonpt17.testcase \
	fromgeojsonpt18.testcase \
	fromgeojsonpt19.testcase \
	fromgeojsonpt1.testcase \
	fromgeojsonpt20.testcase \
	fromgeojsonpt21.testcase \
	fromgeojsonpt22.testcase \
	fromgeojsonpt23.testcase \
	fromgeojsonpt24.testcase \
	fromgeojsonpt25.testcase \
	fromgeojsonpt26.testcase \
	fromgeojsonpt27.testcase \
	fromgeojsonpt28.testcase \
	fromgeojsonpt29.testcase \
	fromgeojsonpt2.testcase \
	fromgeojsonpt30.testcase \
	fromgeojsonpt31.testcase \
	fromgeojsonpt32.testcase \
	fromgeojsonpt33.testcase \
	fromgeojsonpt34.testcase \
	fromgeojsonpt35.testcase \
	fromgeojsonpt36.testcase \
	fromgeojsonpt37.testcase \
	fromgeojsonpt38.testcase \
	fromgeojsonpt3.testcase \
	fromgeojsonpt4.testcase \
	fromgeojsonpt5.testcase \
	fromgeojsonpt6.testcase \
	fromgeojsonpt7.testcase \
	fromgeojsonpt8.testcase \
	fromgeojsonpt9.testcase \
	fromgml10.testcase \
	fromgml11.testcase \
	fromgml12.testcase \
	fromgml13.testcase \
	fromgml14.testcase \
	fromgml15.testcase \
	fromgml16.testcase \
................................................................................
	fromgml5.testcase \
	fromgml60.testcase \
	fromgml61.testcase \
	fromgml6.testcase \
	fromgml7.testcase \
	fromgml8.testcase \
	fromgml9.testcase \
	fromgmlexp1.testcase \
	fromgmlexp2.testcase \
	fromgmlexp3.testcase \
	fromgmlexp4.testcase \
	fromgmlexp5.testcase \
	fromgmlexp6.testcase \
	fromgmlexp7.testcase \
	fromgmlexp8.testcase \
	fromgmlexp9.testcase \
	fromWkb10.testcase \
	fromWkb11.testcase \
	fromWkb12.testcase \
	fromWkb13.testcase \
	fromWkb14.testcase \
	fromWkb15.testcase \
	fromWkb16.testcase \
................................................................................
	fromWkb3.testcase \
	fromWkb4.testcase \
	fromWkb5.testcase \
	fromWkb6.testcase \
	fromWkb7.testcase \
	fromWkb8.testcase \
	fromWkb9.testcase \
	fromgeojsonexp1.testcase \
	fromgeojsonexp2.testcase \
	fromgeojsonexp3.testcase \
	fromgeojsonexp4.testcase \
	fromgeojsonexp5.testcase \
	fromgeojsonexp6.testcase \
	fromgeojsonexp7.testcase \
	fromgeojsonexp8.testcase \
	fromgeojsonexp9.testcase \
	fromwktexp1.testcase \
	fromwktexp2.testcase \
	fromwktexp3.testcase \
	fromwktexp4.testcase \
	fromwktexp5.testcase \
	fromwktexp6.testcase \
	fromwktexp7.testcase \
	fromwktexp8.testcase \
	fromwktexp9.testcase \
	fromewktexp1.testcase \
	fromewktexp2.testcase \
	fromewktexp3.testcase \
	fromewktexp4.testcase \
	fromewktexp5.testcase \
	fromewktexp6.testcase \
	fromewktexp7.testcase \
	fromewktexp8.testcase \
	fromewktexp9.testcase \
	ft_m.testcase \
	fullnamefrompath1.testcase \
	fullnamefrompath2.testcase \
	fullnamefrompath3.testcase \
	fullnamefrompath4.testcase \
	fullnamefrompath5.testcase \
	garsmbr10.testcase \
................................................................................
	geodesic-len2.testcase \
	geodesic-len3.testcase \
	geodesic-len4.testcase \
	geodesic-len5.testcase \
	geodesic-len6.testcase \
	geodesic-len7.testcase \
	geodesic-len8.testcase \
	geodesicangle1.testcase \
	geodesicangle2.testcase \
	geodesicangle3.testcase \
	geodesicangle4.testcase \
	geodesicangle5.testcase \
	geodesicangle6.testcase \
	geodesicarcarea1.testcase \
	geodesicarcarea2.testcase \
	geodesicarcarea3.testcase \
	geodesicarcheight1.testcase \
	geodesicarcheight2.testcase \
	geodesicarcheight3.testcase \
	geodesicarclen1.testcase \
	geodesicarclen2.testcase \
	geodesicarclen3.testcase \
	geodesicarclen4.testcase \
	geodesicarclen5.testcase \
	geodesicchordlen1.testcase \
	geodesicchordlen2.testcase \
	geodesicchordlen3.testcase \
	geodesicchordlen4.testcase \
	geodesicchordlen5.testcase \
	geojson1.testcase \
	geojson2.testcase \
	geojson3.testcase \
	geojson4.testcase \
	geojson5.testcase \
	geojson6.testcase \
	geomcollfromtext1.testcase \
................................................................................
	geomfromkml3.testcase \
	geomfromkml4.testcase \
	geomfromkml5.testcase \
	geomfromkml6.testcase \
	geomfromkml7.testcase \
	geomfromkml8.testcase \
	geomfromkml9.testcase \
	geomfromkmlexp1.testcase \
	geomfromkmlexp2.testcase \
	geomfromkmlexp3.testcase \
	geomfromkmlexp4.testcase \
	geomfromkmlexp5.testcase \
	geomfromkmlexp6.testcase \
	geomfromkmlexp7.testcase \
	geomfromkmlexp8.testcase \
	geomfromkmlexp9.testcase \
	geomfromtext10.testcase \
	geomfromtext11.testcase \
	geomfromtext12.testcase \
	geomfromtext13.testcase \
	geomfromtext14.testcase \
	geomfromtext15.testcase \
	geomfromtext16.testcase \
................................................................................
	geomfromtext45.testcase \
	geomfromtext4.testcase \
	geomfromtext5.testcase \
	geomfromtext6.testcase \
	geomfromtext7.testcase \
	geomfromtext8.testcase \
	geomfromtext9.testcase \
	geompointencode1.testcase \
	geompointencode2.testcase \
	geompointencode3.testcase \
	geompointencode4.testcase \
	geompointencode5.testcase \
	geompointencode6.testcase \
	geompointencode7.testcase \
	geompointencode8.testcase \
	geompointencode9.testcase \
	geompointencode10.testcase \
	geomtype10.testcase \
	geomtype11.testcase \
	geomtype12.testcase \
	geomtype13.testcase \
	geomtype14.testcase \
	geomtype15.testcase \
	geomtype16.testcase \
................................................................................
	geomtype8.testcase \
	geomtype9.testcase \
	getmimetype1.testcase \
	getmimetype2.testcase \
	getmimetype3.testcase \
	getmimetype4.testcase \
	getmimetype5.testcase \
	getshapefileextent1.testcase \
	getshapefileextent2.testcase \
	getshapefileextent3.testcase \
	getshapefileextent4.testcase \
	getshapefileextent5.testcase \
	gml10.testcase \
	gml11.testcase \
	gml12.testcase \
	gml13.testcase \
	gml14.testcase \
	gml15.testcase \
	gml16.testcase \
................................................................................
	isempty4.testcase \
	isempty.testcase \
	ismeasured1.testcase \
	ismeasured2.testcase \
	ismeasured3.testcase \
	ismeasured4.testcase \
	ismeasured5.testcase \
	ispolygccw1.testcase \
	ispolygccw2.testcase \
	ispolygccw3.testcase \
	ispolygccw4.testcase \
	ispolygccw5.testcase \
	ispolygcw1.testcase \
	ispolygcw2.testcase \
	ispolygcw3.testcase \
	ispolygcw4.testcase \
	ispolygcw5.testcase \
	ispopulatedcoverage1.testcase \
	ispopulatedcoverage2.testcase \
	ispopulatedcoverage3.testcase \
	checkfontfacename1.testcase \
	checkfontfacename2.testcase \
	checkfontfacename3.testcase \
	getfontfamily.testcase \
	isfontbold.testcase \
	isfontitalic.testcase \
	islowascii1.testcase \
	islowascii2.testcase \
	islowascii3.testcase \
	islowascii4.testcase \
	islowascii5.testcase \
	islowascii6.testcase \
	isvalidfont1.testcase \
	isvalidfont2.testcase \
	isvalidnodata1.testcase \
	isvalidnodata2.testcase \
	isvalidnodata3.testcase \
	isvalidnodata4.testcase \
	isvalidpalette1.testcase \
................................................................................
	isvalidrasterstats1.testcase \
	isvalidrasterstats2.testcase \
	isvalidrasterstats3.testcase \
	isvalidrasterstats4.testcase \
	isvalidrasterstats5.testcase \
	isvalidrasterstats6.testcase \
	isvalidrasterstats7.testcase \
	isvalidrasterstats8.testcase \
	isvalidrastertile1.testcase \
	isvalidrastertile2.testcase \
	isvalidrastertile3.testcase \
	isvalidrastertile4.testcase \
	isvalidrastertile5.testcase \
	isvalidrastertile6.testcase \
	isvalidrastertile7.testcase \
	isvalidrastertile8.testcase \
	isvalidrastertile9.testcase \
	isvalidtrajectory1.testcase \
	isvalidtrajectory2.testcase \
	isvalidtrajectory3.testcase \
	isvalidtrajectory4.testcase \
	isvalidtrajectory5.testcase \
	isvalidtrajectory6.testcase \
	isvalidtrajectory7.testcase \
	isXblob6.testcase \
	isXblob7.testcase \
	k3b-icon.png \
	km_m.testcase \
	ktorrent_grad1.jpg \
	ktorrent_sidebar.gif \
	La_folla_durante_il_Palio.jpg \
................................................................................
	pointn3.testcase \
	pointn4.testcase \
	pointn5.testcase \
	pointn6.testcase \
	pointn7.testcase \
	pointn8.testcase \
	pointn9.testcase \
	polygccw1.testcase \
	polygccw2.testcase \
	polygccw3.testcase \
	polygccw4.testcase \
	polygccw5.testcase \
	polygccw6.testcase \
	polygcw1.testcase \
	polygcw2.testcase \
	polygcw3.testcase \
	polygcw4.testcase \
	polygcw5.testcase \
	polygcw6.testcase \
	polygonfromtext1.testcase \
	polygonfromtext2.testcase \
	reflectcoords10.testcase \
	reflectcoords11.testcase \
	reflectcoords12.testcase \
	reflectcoords13.testcase \
	reflectcoords14.testcase \
................................................................................
	reflectcoords5.testcase \
	reflectcoords6.testcase \
	reflectcoords7.testcase \
	reflectcoords8.testcase \
	reflectcoords9.testcase \
	removedupl1.testcase \
	removedupl2.testcase \
	removedupl3.testcase \
	removedupl4.testcase \
	removepoint10.testcase \
	removepoint11.testcase \
	removepoint12.testcase \
	removepoint13.testcase \
	removepoint14.testcase \
	removepoint15.testcase \
	removepoint16.testcase \
................................................................................
	removepoint3.testcase \
	removepoint4.testcase \
	removepoint5.testcase \
	removepoint6.testcase \
	removepoint7.testcase \
	removepoint8.testcase \
	removepoint9.testcase \
	repeatedpoints1.testcase \
	repeatedpoints2.testcase \
	repeatedpoints3.testcase \
	repeatedpoints4.testcase \
	repeatedpoints5.testcase \
	repeatedpoints6.testcase \
	repeatedpoints7.testcase \
	repeatedpoints8.testcase \
	repeatedpoints9.testcase \
	repeatedpoints10.testcase \
	repeatedpoints11.testcase \
	repeatedpoints12.testcase \
	repeatedpoints13.testcase \
	repeatedpoints14.testcase \
	reverse1.testcase \
	reverse2.testcase \
	reverse3.testcase \
	reverse4.testcase \
	reverse5.testcase \
	reverse6.testcase \
	ring10.testcase \
................................................................................
	sridax2name5.testcase \
	sridax2name6.testcase \
	sridax2orient1.testcase \
	sridax2orient2.testcase \
	sridax2orient3.testcase \
	sridax2orient4.testcase \
	sridax2orient5.testcase \
	sridax2orient6.testcase \
	stringlist1.testcase \
	stringlist2.testcase \
	stringlist3.testcase \
	stringlist4.testcase \
	stringlist5.testcase \
	tinypointencode1.testcase \
	tinypointencode2.testcase \
	tinypointencode3.testcase \
	tinypointencode4.testcase \
	tinypointencode5.testcase \
	tinypointencode6.testcase \
	tinypointencode7.testcase \
	tinypointencode8.testcase \
	tinypointencode9.testcase \
	tinypointencode10.testcase \
	trajectorypoint1.testcase \
	trajectorypoint2.testcase \
	trajectorypoint3.testcase \
	trajectorypoint4.testcase \
	trajectorypoint5.testcase \
	trajectorypoint6.testcase \
	trajectorypoint7.testcase \
	trajectorypoint8.testcase \
	trajectorypoint9.testcase \
	trajectorypoint10.testcase \
	trajectorypoint11.testcase \
	trajectorypoint12.testcase \
	wms_defaultsetting1.testcase \
	wms_defaultsetting2.testcase \
	wms_defaultsetting3.testcase \
	wms_defaultsetting4.testcase \
	wms_defaultsetting5.testcase \
	wms_defaultsetting6.testcase \
	wms_defaultsetting7.testcase \
	wms_defaultsetting8.testcase \
	wms_defaultsetting9.testcase \
	wms_defaultsetting10.testcase \
	wms_defaultsetting11.testcase \
	wms_defaultsetting12.testcase \
	wms_defaultsetting13.testcase \
	wms_defaultsetting14.testcase \
	wms_defaultsetting15.testcase \
	wms_defaultsetting16.testcase \
	wms_defaultsetting17.testcase \
	wms_defaultsrs1.testcase \
	wms_defaultsrs2.testcase \
	wms_defaultsrs3.testcase \
	wms_defaultsrs4.testcase \
	wms_defaultsrs5.testcase \
	wms_defaultsrs6.testcase \
	wms_defaultsrs7.testcase \
	wms_defaultsrs8.testcase \
	wms_defaultsrs9.testcase \
	wms_defaultsrs10.testcase \
	wms_defaultsrs11.testcase \
	wms_defaultsrs12.testcase \
	wms_defaultsrs13.testcase \
	wms_getmapoptions1.testcase \
	wms_getmapoptions2.testcase \
	wms_getmapoptions3.testcase \
	wms_getmapoptions4.testcase \
	wms_getmapoptions5.testcase \
	wms_getmapoptions6.testcase \
	wms_getmapoptions7.testcase \
	wms_getmapoptions8.testcase \
	wms_getmapoptions9.testcase \
	wms_getmapoptions10.testcase \
	wms_getmapoptions11.testcase \
	wms_getmapoptions12.testcase \
	wms_getmapoptions13.testcase \
	wms_getmapoptions14.testcase \
	wms_getmapoptions15.testcase \
	wms_getmapoptions16.testcase \
	wms_getmapoptions17.testcase \
	wms_getmapoptions18.testcase \
	wms_getmapoptions19.testcase \
	wms_getmapoptions20.testcase \
	wms_getmapoptions21.testcase \
	wms_getmapoptions22.testcase \
	wms_getmapoptions23.testcase \
	wms_getmapoptions24.testcase \
	wms_getmapoptions25.testcase \
	wms_getmapoptions26.testcase \
	wms_getmapoptions27.testcase \
	wms_getmapoptions28.testcase \
	wms_getmapoptions29.testcase \
	wms_getmapoptions30.testcase \
	wms_getmapoptions31.testcase \
	wms_getmapoptions32.testcase \
	wms_getmapoptions33.testcase \
	wms_getmapoptions34.testcase \
	wms_getmapoptions35.testcase \
	wms_getmapoptions36.testcase \
	wms_getmapoptions37.testcase \
	wms_getmapoptions38.testcase \
	wms_getmapoptions39.testcase \
	wms_getmapoptions40.testcase \
	wms_getmapoptions41.testcase \
	wms_getmapoptions42.testcase \
	wms_getmapoptions43.testcase \
	wms_getmapoptions44.testcase \
	wms_getinfo_url1.testcase \
	wms_getinfo_url2.testcase \
	wms_getinfo_url3.testcase \
	wms_getinfo_url4.testcase \
	wms_getinfo_url5.testcase \
	wms_getinfo_url6.testcase \
	wms_getinfo_url7.testcase \
	wms_getinfo_url8.testcase \
	wms_getinfo_url9.testcase \
	wms_getinfo_url10.testcase \
	wms_getinfo_url11.testcase \
	wms_getinfo_url12.testcase \
	wms_getinfo_url13.testcase \
	wms_getinfo_url14.testcase \
	wms_getinfo_url15.testcase \
	wms_getinfo_url16.testcase \
	wms_getinfo_url17.testcase \
	wms_getinfo_url18.testcase \
	wms_getinfo_url19.testcase \
	wms_getinfo_url20.testcase \
	wms_getinfo_url21.testcase \
	wms_getinfo_url22.testcase \
	wms_getinfo_url23.testcase \
	wms_getinfo_url24.testcase \
	wms_getinfo_url25.testcase \
	wms_getinfo_url26.testcase \
	wms_getinfo_url27.testcase \
	wms_getinfo_url28.testcase \
	wms_getinfo_url29.testcase \
	wms_getinfo_url30.testcase \
	wms_getinfo_url31.testcase \
	wms_getinfo_url32.testcase \
	wms_getinfo_url33.testcase \
	wms_getinfo_url34.testcase \
	wms_getinfo_url35.testcase \
	wms_getinfo_url36.testcase \
	wms_getinfo_url37.testcase \
	wms_getinfo_url38.testcase \
	wms_getinfo_url39.testcase \
	wms_getinfo_url40.testcase \
	wms_getinfo_url41.testcase \
	wms_getinfo_url42.testcase \
	wms_getmap_url1.testcase \
	wms_getmap_url2.testcase \
	wms_getmap_url3.testcase \
	wms_getmap_url4.testcase \
	wms_getmap_url5.testcase \
	wms_getmap_url6.testcase \
	wms_getmap_url7.testcase \
	wms_getmap_url8.testcase \
	wms_getmap_url9.testcase \
	wms_getmap_url10.testcase \
	wms_getmap_url11.testcase \
	wms_getmap_url12.testcase \
	wms_getmap_url13.testcase \
	wms_getmap_url14.testcase \
	wms_getmap_url15.testcase \
	wms_getmap_url16.testcase \
	wms_getmap_url17.testcase \
	wms_getmap_url18.testcase \
	wms_getmap_url19.testcase \
	wms_getmap_url20.testcase \
	wms_getmap_url21.testcase \
	wms_getmap_url22.testcase \
	wms_getmap_url23.testcase \
	wms_getmap_url24.testcase \
	wms_getmap_url25.testcase \
	wms_getmap_url26.testcase \
	wms_getmap_url27.testcase \
	wms_getmap_url28.testcase \
	wms_getmap_url29.testcase \
	wms_getmap_url30.testcase \
	wms_registergetcapab1.testcase \
	wms_registergetcapab2.testcase \
	wms_registergetcapab3.testcase \
	wms_registergetcapab4.testcase \
	wms_registergetcapab5.testcase \
	wms_registergetcapab6.testcase \
	wms_registergetcapab7.testcase \
	wms_registergetcapab8.testcase \
	wms_registergetcapab9.testcase \
	wms_registergetcapab10.testcase \
	wms_registergetcapab11.testcase \
	wms_registergetcapab12.testcase \
	wms_registergetcapab13.testcase \
	wms_registergetmap1.testcase \
	wms_registergetmap2.testcase \
	wms_registergetmap3.testcase \
	wms_registergetmap4.testcase \
	wms_registergetmap5.testcase \
	wms_registergetmap6.testcase \
	wms_registergetmap7.testcase \
	wms_registergetmap8.testcase \
	wms_registergetmap9.testcase \
	wms_registergetmap10.testcase \
	wms_registergetmap11.testcase \
	wms_registergetmap12.testcase \
	wms_registergetmap13.testcase \
	wms_registergetmap14.testcase \
	wms_registergetmap15.testcase \
	wms_registergetmap16.testcase \
	wms_registergetmap17.testcase \
	wms_registergetmap18.testcase \
	wms_registergetmap19.testcase \
	wms_registergetmap20.testcase \
	wms_registergetmap21.testcase \
	wms_registergetmap22.testcase \
	wms_registergetmap23.testcase \
	wms_registergetmap24.testcase \
	wms_registergetmap25.testcase \
	wms_registergetmap26.testcase \
	wms_registergetmap27.testcase \
	wms_registergetmap28.testcase \
	wms_registergetmap29.testcase \
	wms_registergetmap30.testcase \
	wms_registergetmap31.testcase \
	wms_registergetmap32.testcase \
	wms_registergetmap33.testcase \
	wms_registergetmap34.testcase \
	wms_registergetmap35.testcase \
	wms_registergetmap36.testcase \
	wms_registergetmap37.testcase \
	wms_registergetmap38.testcase \
	wms_registergetmap39.testcase \
	wms_registergetmap40.testcase \
	wms_registergetmap41.testcase \
	wms_registergetmap42.testcase \
	wms_registergetmap43.testcase \
	wms_registergetmap44.testcase \
	wms_registergetmap45.testcase \
	wms_registergetmap46.testcase \
	wms_registergetmap47.testcase \
	wms_registergetmap48.testcase \
	wms_registergetmap49.testcase \
	wms_registergetmap50.testcase \
	wms_registergetmap51.testcase \
	wms_registergetmap52.testcase \
	wms_registergetmap53.testcase \
	wms_registergetmap54.testcase \
	wms_registergetmap55.testcase \
	wms_registergetmap56.testcase \
	wms_registergetmap57.testcase \
	wms_registergetmap58.testcase \
	wms_registergetmap59.testcase \
	wms_registergetmap60.testcase \
	wms_registergetmap61.testcase \
	wms_registergetmap62.testcase \
	wms_registergetmap63.testcase \
	wms_registergetmap64.testcase \
	wms_registergetmap65.testcase \
	wms_registergetmap66.testcase \
	wms_registergetmap67.testcase \
	wms_registergetmap68.testcase \
	wms_registergetmap69.testcase \
	wms_registergetmap70.testcase \
	wms_registergetmap71.testcase \
	wms_registergetmap72.testcase \
	wms_registergetmap73.testcase \
	wms_registergetmap74.testcase \
	wms_registergetmap75.testcase \
	wms_registergetmap76.testcase \
	wms_registergetmap77.testcase \
	wms_registergetmap78.testcase \
	wms_registergetmap79.testcase \
	wms_registergetmap80.testcase \
	wms_registergetmap81.testcase \
	wms_registergetmap82.testcase \
	wms_registergetmap83.testcase \
	wms_registergetmap84.testcase \
	wms_registergetmap85.testcase \
	wms_registergetmap86.testcase \
	wms_registersetting1.testcase \
	wms_registersetting2.testcase \
	wms_registersetting3.testcase \
	wms_registersetting4.testcase \
	wms_registersetting5.testcase \
	wms_registersetting6.testcase \
	wms_registersetting7.testcase \
	wms_registersetting8.testcase \
	wms_registersetting9.testcase \
	wms_registersetting10.testcase \
	wms_registersetting11.testcase \
	wms_registersetting12.testcase \
	wms_registersetting13.testcase \
	wms_registersetting14.testcase \
	wms_registersetting15.testcase \
	wms_registersetting16.testcase \
	wms_registersetting17.testcase \
	wms_registersetting18.testcase \
	wms_registersetting19.testcase \
	wms_registersetting20.testcase \
	wms_registersetting21.testcase \
	wms_registersetting22.testcase \
	wms_registersrs1.testcase \
	wms_registersrs2.testcase \
	wms_registersrs3.testcase \
	wms_registersrs4.testcase \
	wms_registersrs5.testcase \
	wms_registersrs6.testcase \
	wms_registersrs7.testcase \
	wms_registersrs8.testcase \
	wms_registersrs9.testcase \
	wms_registersrs10.testcase \
	wms_registersrs11.testcase \
	wms_registersrs12.testcase \
	wms_registersrs13.testcase \
	wms_registersrs14.testcase \
	wms_registersrs15.testcase \
	wms_registersrs16.testcase \
	wms_registersrs17.testcase \
	wms_registersrs18.testcase \
	wms_registersrs19.testcase \
	wms_registersrs20.testcase \
	wms_registersrs21.testcase \
	wms_registersrs22.testcase \
	wms_registersrs23.testcase \
	wms_registersrs24.testcase \
	wms_registersrs25.testcase \
	wms_registersrs26.testcase \
	wms_registersrs27.testcase \
	wms_registersrs28.testcase \
	wms_registersrs29.testcase \
	wms_setgetcapabinfo1.testcase \
	wms_setgetcapabinfo2.testcase \
	wms_setgetcapabinfo3.testcase \
	wms_setgetcapabinfo4.testcase \
	wms_setgetcapabinfo5.testcase \
	wms_setgetcapabinfo6.testcase \
	wms_setgetcapabinfo7.testcase \
	wms_setgetcapabinfo8.testcase \
	wms_setgetcapabinfo9.testcase \
	wms_setgetcapabinfo10.testcase \
	wms_setgetcapabinfo11.testcase \
	wms_setgetcapabinfo12.testcase \
	wms_setgetcapabinfo13.testcase \
	wms_setcopyright1.testcase \
	wms_setcopyright2.testcase \
	wms_setcopyright3.testcase \
	wms_setcopyright4.testcase \
	wms_setcopyright5.testcase \
	wms_setcopyright6.testcase \
	wms_setcopyright7.testcase \
	wms_setcopyright8.testcase \
	wms_setcopyright9.testcase \
	wms_setcopyright10.testcase \
	wms_setcopyright11.testcase \
	wms_setcopyright12.testcase \
	wms_setcopyright13.testcase \
	wms_setcopyright14.testcase \
	wms_setcopyright15.testcase \
	wms_setcopyright16.testcase \
	wms_setcopyright17.testcase \
	wms_setcopyright18.testcase \
	wms_setcopyright19.testcase \
	wms_setgetmapinfo1.testcase \
	wms_setgetmapinfo2.testcase \
	wms_setgetmapinfo3.testcase \
	wms_setgetmapinfo4.testcase \
	wms_setgetmapinfo5.testcase \
	wms_setgetmapinfo6.testcase \
	wms_setgetmapinfo7.testcase \
	wms_setgetmapinfo8.testcase \
	wms_setgetmapinfo9.testcase \
	wms_setgetmapinfo10.testcase \
	wms_setgetmapinfo11.testcase \
	wms_setgetmapinfo12.testcase \
	wms_setgetmapinfo13.testcase \
	wms_setgetmapinfo14.testcase \
	wms_setgetmapinfo15.testcase \
	wms_setgetmapinfo16.testcase \
	wms_setgetmapinfo17.testcase \
	wms_unregistergetcapab1.testcase \
	wms_unregistergetcapab2.testcase \
	wms_unregistergetcapab3.testcase \
	wms_unregistergetcapab4.testcase \
	wms_unregistergetcapab5.testcase \
	wms_unregistergetmap1.testcase \
	wms_unregistergetmap2.testcase \
	wms_unregistergetmap3.testcase \
	wms_unregistergetmap4.testcase \
	wms_unregistergetmap5.testcase \
	wms_unregistergetmap6.testcase \
	wms_unregistergetmap7.testcase \
	wms_unregistergetmap8.testcase \
	wms_unregistergetmap9.testcase \
	wms_unregistersetting1.testcase \
	wms_unregistersetting2.testcase \
	wms_unregistersetting3.testcase \
	wms_unregistersetting4.testcase \
	wms_unregistersetting5.testcase \
	wms_unregistersetting6.testcase \
	wms_unregistersetting7.testcase \
	wms_unregistersetting8.testcase \
	wms_unregistersetting9.testcase \
	wms_unregistersetting10.testcase \
	wms_unregistersetting11.testcase \
	wms_unregistersetting12.testcase \
	wms_unregistersetting13.testcase \
	wms_unregistersetting14.testcase \
	wms_unregistersetting15.testcase \
	wms_unregistersetting16.testcase \
	wms_unregistersetting17.testcase \
	wms_unregistersrs1.testcase \
	wms_unregistersrs2.testcase \
	wms_unregistersrs3.testcase \
	wms_unregistersrs4.testcase \
	wms_unregistersrs5.testcase \
	wms_unregistersrs6.testcase \
	wms_unregistersrs7.testcase \
	wms_unregistersrs8.testcase \
	wms_unregistersrs9.testcase \
	wms_unregistersrs10.testcase \
	wms_unregistersrs11.testcase \
	wms_unregistersrs12.testcase \
	wms_unregistersrs13.testcase







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<






<
<
<
<
<






<
<
<
<
<
<
<
<
<
<
<
<



|
|
|
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
<
<
<
<
<
<
<
<
<







 







<
<
<
<






|
<
<
<
|
|
|
|
|
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<







 







<
<
<
<
<
|
<
<
<
<


<






<
<
<
<
<
<







 







<






<
<
<
<
<
<
<
|
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
23
24
25
26
27
28
29















30
31
32
33
34
35
36
...
133
134
135
136
137
138
139

140
141
142
143
144
145
146
...
160
161
162
163
164
165
166












167
168
169
170
171
172
173
...
406
407
408
409
410
411
412





413
414
415
416
417
418





419
420
421
422
423
424












425
426
427
428
429
430
431

432
433
434
435
436
437
438
...
440
441
442
443
444
445
446















447
448
449
450
451
452
453
...
594
595
596
597
598
599
600
601
602



















603
604
605
606
607









608
609
610
611
612
613
614
...
652
653
654
655
656
657
658




659
660
661
662
663
664
665



666
667
668
669
670





671










672
673
674
675
676
677
678
...
719
720
721
722
723
724
725






726
727
728
729
730
731
732
...
818
819
820
821
822
823
824















































825
826
827
828
829
830
831
...
878
879
880
881
882
883
884









885
886
887
888
889
890
891
...
904
905
906
907
908
909
910



























911
912
913
914
915
916
917
...
953
954
955
956
957
958
959






















960
961
962
963
964
965
966
....
1035
1036
1037
1038
1039
1040
1041









1042
1043
1044
1045
1046
1047
1048
....
1080
1081
1082
1083
1084
1085
1086










1087
1088
1089
1090
1091
1092
1093
....
1154
1155
1156
1157
1158
1159
1160





1161
1162
1163
1164
1165
1166
1167
....
1199
1200
1201
1202
1203
1204
1205





1206




1207
1208

1209
1210
1211
1212
1213
1214






1215
1216
1217
1218
1219
1220
1221
....
1224
1225
1226
1227
1228
1229
1230

1231
1232
1233
1234
1235
1236







1237


1238
1239
1240
1241
1242
1243
1244
....
1666
1667
1668
1669
1670
1671
1672












1673
1674
1675
1676
1677
1678
1679
....
1687
1688
1689
1690
1691
1692
1693


1694
1695
1696
1697
1698
1699
1700
....
1703
1704
1705
1706
1707
1708
1709














1710
1711
1712
1713
1714
1715
1716
....
2196
2197
2198
2199
2200
2201
2202
2203
































































































































































































































































































































































































































	addpoint3.testcase \
	addpoint4.testcase \
	addpoint5.testcase \
	addpoint6.testcase \
	addpoint7.testcase \
	addpoint8.testcase \
	addpoint9.testcase \















	asbinary10.testcase \
	asbinary11.testcase \
	asbinary12.testcase \
	asbinary13.testcase \
	asbinary14.testcase \
	asbinary15.testcase \
	asbinary16.testcase \
................................................................................
	atmcreate16.testcase \
	atmcreate17.testcase \
	atmcreate18.testcase \
	atmcreate19.testcase \
	atmcreate20.testcase \
	atmcreate21.testcase \
	atmcreate22.testcase \

	atmcreatescale1.testcase \
	atmcreatescale2.testcase \
	atmcreatescale3.testcase \
	atmcreatescale4.testcase \
	atmcreatescale5.testcase \
	atmcreatescale6.testcase \
	atmcreatescale7.testcase \
................................................................................
	atmcreatexroll3.testcase \
	atmcreateyroll1.testcase \
	atmcreateyroll2.testcase \
	atmcreateyroll3.testcase \
	atmcreatezroll1.testcase \
	atmcreatezroll2.testcase \
	atmcreatezroll3.testcase \












	atmisvalid1.testcase \
	atmisvalid2.testcase \
	atmisvalid3.testcase \
	atmisvalid4.testcase \
	atmisvalid5.testcase \
	atmisvalid6.testcase \
	atmmultiply1.testcase \
................................................................................
	casttoxy3.testcase \
	casttoxym1.testcase \
	casttoxym2.testcase \
	casttoxym3.testcase \
	casttoxym4.testcase \
	casttoxym5.testcase \
	casttoxym6.testcase \





	casttoxyz1.testcase \
	casttoxyz2.testcase \
	casttoxyz3.testcase \
	casttoxyz4.testcase \
	casttoxyz5.testcase \
	casttoxyz6.testcase \





	casttoxyzm1.testcase \
	casttoxyzm2.testcase \
	casttoxyzm3.testcase \
	casttoxyzm4.testcase \
	casttoxyzm5.testcase \
	casttoxyzm6.testcase \












	checkspatialmetadata1.testcase \
	checkspatialmetadata2.testcase \
	checkspatialmetadata3.testcase \
	checkdupl1.testcase \
	checkdupl2.testcase \
	checkspatialmetadata4.testcase \
	checkspatialmetadata5.testcase \

	clonetable1.testcase \
	clonetable2.testcase \
	clonetable3.testcase \
	clonetable4.testcase \
	clonetable5.testcase \
	clonetable6.testcase \
	clonetable7.testcase \
................................................................................
	clonetable9.testcase \
	clonetable10.testcase \
	clonetable11.testcase \
	clonetable12.testcase \
	clonetable13.testcase \
	clonetable14.testcase \
	clonetable15.testcase \















	ch_m.testcase \
	cm_m.testcase \
	collect10.testcase \
	collect11.testcase \
	collect12.testcase \
	collect13.testcase \
	collect14.testcase \
................................................................................
	compressgeometry68.testcase \
	compressgeometry69.testcase \
	compressgeometry6.testcase \
	compressgeometry7.testcase \
	compressgeometry8.testcase \
	compressgeometry9.testcase \
	createrastercoverages.testcase \
	createvectorcoverages.testcase \
	createuuid1.testcase \



















	decodeurl1.testcase \
	decodeurl2.testcase \
	decodeurl3.testcase \
	decodeurl4.testcase \
	decodeurl5.testcase \









	dirfrompath1.testcase \
	dirfrompath2.testcase \
	dirfrompath3.testcase \
	dirfrompath4.testcase \
	dirfrompath5.testcase \
	dimension1.testcase \
	dimension2.testcase \
................................................................................
	DSC_1467.JPG \
	DSCN0042.JPG \
	dropgeo1.testcase \
	dropgeo2.testcase \
	dropgeo3.testcase \
	dropgeo4.testcase \
	dropgeo5.testcase \




	elemgeo1.testcase \
	elemgeo2.testcase \
	elemgeo3.testcase \
	elemgeo4.testcase \
	elemgeo5.testcase \
	elemgeo6.testcase \
	emptyfile.txt \



	encodeurl1.testcase \
	encodeurl2.testcase \
	encodeurl3.testcase \
	encodeurl4.testcase \
	encodeurl5.testcase \





	endpoint1.testcase \










	envelope1.testcase \
	envelope2.testcase \
	envelope3.testcase \
	envelope4.testcase \
	envelope5.testcase \
	envelope6.testcase \
	envelope7.testcase \
................................................................................
	extractmultipoint3.testcase \
	extractmultipolygon1.testcase \
	extractmultipolygon2.testcase \
	extractmultipolygon3.testcase \
	fath_m.testcase \
	fdo_ogr1.testcase \
	fdo_ogr2.testcase \






	fdo-wkb.sqlite_RO \
	forcenull10.testcase \
	forcenull11.testcase \
	forcenull12.testcase \
	forcenull13.testcase \
	forcenull14.testcase \
	forcenull15.testcase \
................................................................................
	fromgeojson3.testcase \
	fromgeojson4.testcase \
	fromgeojson5.testcase \
	fromgeojson6.testcase \
	fromgeojson7.testcase \
	fromgeojson8.testcase \
	fromgeojson9.testcase \















































	fromgml10.testcase \
	fromgml11.testcase \
	fromgml12.testcase \
	fromgml13.testcase \
	fromgml14.testcase \
	fromgml15.testcase \
	fromgml16.testcase \
................................................................................
	fromgml5.testcase \
	fromgml60.testcase \
	fromgml61.testcase \
	fromgml6.testcase \
	fromgml7.testcase \
	fromgml8.testcase \
	fromgml9.testcase \









	fromWkb10.testcase \
	fromWkb11.testcase \
	fromWkb12.testcase \
	fromWkb13.testcase \
	fromWkb14.testcase \
	fromWkb15.testcase \
	fromWkb16.testcase \
................................................................................
	fromWkb3.testcase \
	fromWkb4.testcase \
	fromWkb5.testcase \
	fromWkb6.testcase \
	fromWkb7.testcase \
	fromWkb8.testcase \
	fromWkb9.testcase \



























	ft_m.testcase \
	fullnamefrompath1.testcase \
	fullnamefrompath2.testcase \
	fullnamefrompath3.testcase \
	fullnamefrompath4.testcase \
	fullnamefrompath5.testcase \
	garsmbr10.testcase \
................................................................................
	geodesic-len2.testcase \
	geodesic-len3.testcase \
	geodesic-len4.testcase \
	geodesic-len5.testcase \
	geodesic-len6.testcase \
	geodesic-len7.testcase \
	geodesic-len8.testcase \






















	geojson1.testcase \
	geojson2.testcase \
	geojson3.testcase \
	geojson4.testcase \
	geojson5.testcase \
	geojson6.testcase \
	geomcollfromtext1.testcase \
................................................................................
	geomfromkml3.testcase \
	geomfromkml4.testcase \
	geomfromkml5.testcase \
	geomfromkml6.testcase \
	geomfromkml7.testcase \
	geomfromkml8.testcase \
	geomfromkml9.testcase \









	geomfromtext10.testcase \
	geomfromtext11.testcase \
	geomfromtext12.testcase \
	geomfromtext13.testcase \
	geomfromtext14.testcase \
	geomfromtext15.testcase \
	geomfromtext16.testcase \
................................................................................
	geomfromtext45.testcase \
	geomfromtext4.testcase \
	geomfromtext5.testcase \
	geomfromtext6.testcase \
	geomfromtext7.testcase \
	geomfromtext8.testcase \
	geomfromtext9.testcase \










	geomtype10.testcase \
	geomtype11.testcase \
	geomtype12.testcase \
	geomtype13.testcase \
	geomtype14.testcase \
	geomtype15.testcase \
	geomtype16.testcase \
................................................................................
	geomtype8.testcase \
	geomtype9.testcase \
	getmimetype1.testcase \
	getmimetype2.testcase \
	getmimetype3.testcase \
	getmimetype4.testcase \
	getmimetype5.testcase \





	gml10.testcase \
	gml11.testcase \
	gml12.testcase \
	gml13.testcase \
	gml14.testcase \
	gml15.testcase \
	gml16.testcase \
................................................................................
	isempty4.testcase \
	isempty.testcase \
	ismeasured1.testcase \
	ismeasured2.testcase \
	ismeasured3.testcase \
	ismeasured4.testcase \
	ismeasured5.testcase \





	ismeasured6.testcase \




	ispopulatedcoverage1.testcase \
	ispopulatedcoverage2.testcase \

	checkfontfacename1.testcase \
	checkfontfacename2.testcase \
	checkfontfacename3.testcase \
	getfontfamily.testcase \
	isfontbold.testcase \
	isfontitalic.testcase \






	isvalidfont1.testcase \
	isvalidfont2.testcase \
	isvalidnodata1.testcase \
	isvalidnodata2.testcase \
	isvalidnodata3.testcase \
	isvalidnodata4.testcase \
	isvalidpalette1.testcase \
................................................................................
	isvalidrasterstats1.testcase \
	isvalidrasterstats2.testcase \
	isvalidrasterstats3.testcase \
	isvalidrasterstats4.testcase \
	isvalidrasterstats5.testcase \
	isvalidrasterstats6.testcase \
	isvalidrasterstats7.testcase \

	isvalidrastertile1.testcase \
	isvalidrastertile2.testcase \
	isvalidrastertile3.testcase \
	isvalidrastertile4.testcase \
	isvalidrastertile5.testcase \
	isvalidrastertile6.testcase \







	isXblob5.testcase \


	isXblob6.testcase \
	isXblob7.testcase \
	k3b-icon.png \
	km_m.testcase \
	ktorrent_grad1.jpg \
	ktorrent_sidebar.gif \
	La_folla_durante_il_Palio.jpg \
................................................................................
	pointn3.testcase \
	pointn4.testcase \
	pointn5.testcase \
	pointn6.testcase \
	pointn7.testcase \
	pointn8.testcase \
	pointn9.testcase \












	polygonfromtext1.testcase \
	polygonfromtext2.testcase \
	reflectcoords10.testcase \
	reflectcoords11.testcase \
	reflectcoords12.testcase \
	reflectcoords13.testcase \
	reflectcoords14.testcase \
................................................................................
	reflectcoords5.testcase \
	reflectcoords6.testcase \
	reflectcoords7.testcase \
	reflectcoords8.testcase \
	reflectcoords9.testcase \
	removedupl1.testcase \
	removedupl2.testcase \


	removepoint10.testcase \
	removepoint11.testcase \
	removepoint12.testcase \
	removepoint13.testcase \
	removepoint14.testcase \
	removepoint15.testcase \
	removepoint16.testcase \
................................................................................
	removepoint3.testcase \
	removepoint4.testcase \
	removepoint5.testcase \
	removepoint6.testcase \
	removepoint7.testcase \
	removepoint8.testcase \
	removepoint9.testcase \














	reverse1.testcase \
	reverse2.testcase \
	reverse3.testcase \
	reverse4.testcase \
	reverse5.testcase \
	reverse6.testcase \
	ring10.testcase \
................................................................................
	sridax2name5.testcase \
	sridax2name6.testcase \
	sridax2orient1.testcase \
	sridax2orient2.testcase \
	sridax2orient3.testcase \
	sridax2orient4.testcase \
	sridax2orient5.testcase \
	sridax2orient6.testcase
































































































































































































































































































































































































































Changes to test/sql_stmt_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
...
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
...
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
...
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
...
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
...
912
913
914
915
916
917
918

919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
...
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
....
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
....
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
....
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
....
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
....
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
....
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
....
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
....
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
....
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
....
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
....
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
....
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
....
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
....
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
....
3185
3186
3187
3188
3189
3190
3191

3192
3193
3194
3195
3196
3197
3198
....
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	addpoint3.testcase \
	addpoint4.testcase \
	addpoint5.testcase \
	addpoint6.testcase \
	addpoint7.testcase \
	addpoint8.testcase \
	addpoint9.testcase \
	addmeasure1.testcase \
	addmeasure2.testcase \
	addmeasure3.testcase \
	addmeasure4.testcase \
	addmeasure5.testcase \
	addmeasure6.testcase \
	addmeasure7.testcase \
	addmeasure8.testcase \
	addmeasure9.testcase \
	addmeasure10.testcase \
	addmeasure11.testcase \
	addmeasure12.testcase \
	addmeasure13.testcase \
	addmeasure14.testcase \
	addmeasure15.testcase \
	asbinary10.testcase \
	asbinary11.testcase \
	asbinary12.testcase \
	asbinary13.testcase \
	asbinary14.testcase \
	asbinary15.testcase \
	asbinary16.testcase \
................................................................................
	atmcreate16.testcase \
	atmcreate17.testcase \
	atmcreate18.testcase \
	atmcreate19.testcase \
	atmcreate20.testcase \
	atmcreate21.testcase \
	atmcreate22.testcase \
	atmcreate23.testcase \
	atmcreatescale1.testcase \
	atmcreatescale2.testcase \
	atmcreatescale3.testcase \
	atmcreatescale4.testcase \
	atmcreatescale5.testcase \
	atmcreatescale6.testcase \
	atmcreatescale7.testcase \
................................................................................
	atmcreatexroll3.testcase \
	atmcreateyroll1.testcase \
	atmcreateyroll2.testcase \
	atmcreateyroll3.testcase \
	atmcreatezroll1.testcase \
	atmcreatezroll2.testcase \
	atmcreatezroll3.testcase \
	atmdeterminant1.testcase \
	atmdeterminant2.testcase \
	atmdeterminant3.testcase \
	atmdeterminant4.testcase \
	atminvert1.testcase \
	atminvert2.testcase \
	atminvert3.testcase \
	atminvert4.testcase \
	atmisinvert1.testcase \
	atmisinvert2.testcase \
	atmisinvert3.testcase \
	atmisinvert4.testcase \
	atmisvalid1.testcase \
	atmisvalid2.testcase \
	atmisvalid3.testcase \
	atmisvalid4.testcase \
	atmisvalid5.testcase \
	atmisvalid6.testcase \
	atmmultiply1.testcase \
................................................................................
	casttoxy3.testcase \
	casttoxym1.testcase \
	casttoxym2.testcase \
	casttoxym3.testcase \
	casttoxym4.testcase \
	casttoxym5.testcase \
	casttoxym6.testcase \
	casttoxym7.testcase \
	casttoxym8.testcase \
	casttoxym9.testcase \
	casttoxym10.testcase \
	casttoxym11.testcase \
	casttoxyz1.testcase \
	casttoxyz2.testcase \
	casttoxyz3.testcase \
	casttoxyz4.testcase \
	casttoxyz5.testcase \
	casttoxyz6.testcase \
	casttoxyz7.testcase \
	casttoxyz8.testcase \
	casttoxyz9.testcase \
	casttoxyz10.testcase \
	casttoxyz11.testcase \
	casttoxyzm1.testcase \
	casttoxyzm2.testcase \
	casttoxyzm3.testcase \
	casttoxyzm4.testcase \
	casttoxyzm5.testcase \
	casttoxyzm6.testcase \
	casttoxyzm7.testcase \
	casttoxyzm8.testcase \
	casttoxyzm9.testcase \
	casttoxyzm10.testcase \
	casttoxyzm11.testcase \
	casttoxyzm12.testcase \
	casttoxyzm13.testcase \
	casttoxyzm14.testcase \
	casttoxyzm15.testcase \
	casttoxyzm16.testcase \
	checkdupl1.testcase \
	checkdupl2.testcase \
	checkspatialmetadata1.testcase \
	checkspatialmetadata2.testcase \
	checkspatialmetadata3.testcase \
	checkspatialmetadata4.testcase \
	checkspatialmetadata5.testcase \
	checkspatialmetadata6.testcase \
	checkspatialmetadata7.testcase \
	checkspatialmetadata8.testcase \
	clonetable1.testcase \
	clonetable2.testcase \
	clonetable3.testcase \
	clonetable4.testcase \
	clonetable5.testcase \
	clonetable6.testcase \
	clonetable7.testcase \
................................................................................
	clonetable9.testcase \
	clonetable10.testcase \
	clonetable11.testcase \
	clonetable12.testcase \
	clonetable13.testcase \
	clonetable14.testcase \
	clonetable15.testcase \
	createclonetable1.testcase \
	createclonetable2.testcase \
	createclonetable3.testcase \
	createclonetable4.testcase \
	createclonetable5.testcase \
	createclonetable6.testcase \
	createclonetable7.testcase \
	createclonetable8.testcase \
	createclonetable9.testcase \
	createclonetable10.testcase \
	createclonetable11.testcase \
	createclonetable12.testcase \
	createclonetable13.testcase \
	createclonetable14.testcase \
	createclonetable15.testcase \
	ch_m.testcase \
	cm_m.testcase \
	collect10.testcase \
	collect11.testcase \
	collect12.testcase \
	collect13.testcase \
	collect14.testcase \
................................................................................
	compressgeometry68.testcase \
	compressgeometry69.testcase \
	compressgeometry6.testcase \
	compressgeometry7.testcase \
	compressgeometry8.testcase \
	compressgeometry9.testcase \
	createrastercoverages.testcase \

	createuuid1.testcase \
	datalic_register1.testcase \
	datalic_register2.testcase \
	datalic_register3.testcase \
	datalic_register4.testcase \
	datalic_register5.testcase \
	datalic_register6.testcase \
	datalic_register7.testcase \
	datalic_register8.testcase \
	datalic_register9.testcase \
	datalic_register10.testcase \
	datalic_rename1.testcase \
	datalic_rename2.testcase \
	datalic_rename3.testcase \
	datalic_rename4.testcase \
	datalic_rename5.testcase \
	datalic_rename6.testcase \
	datalic_rename7.testcase \
	datalic_rename8.testcase \
	datalic_rename9.testcase \
	datalic_seturl1.testcase \
	datalic_seturl2.testcase \
	datalic_seturl3.testcase \
	datalic_seturl4.testcase \
	datalic_seturl5.testcase \
	datalic_seturl6.testcase \
	datalic_seturl7.testcase \
	datalic_seturl8.testcase \
	datalic_seturl9.testcase \
	datalic_unregister1.testcase \
	datalic_unregister2.testcase \
	datalic_unregister3.testcase \
	datalic_unregister4.testcase \
	datalic_unregister5.testcase \
	dirfrompath1.testcase \
	dirfrompath2.testcase \
	dirfrompath3.testcase \
	dirfrompath4.testcase \
	dirfrompath5.testcase \
	dimension1.testcase \
	dimension2.testcase \
................................................................................
	DSC_1467.JPG \
	DSCN0042.JPG \
	dropgeo1.testcase \
	dropgeo2.testcase \
	dropgeo3.testcase \
	dropgeo4.testcase \
	dropgeo5.testcase \
	dropgeo6.testcase \
	dropgeo7.testcase \
	dropgeo8.testcase \
	dropgeo9.testcase \
	elemgeo1.testcase \
	elemgeo2.testcase \
	elemgeo3.testcase \
	elemgeo4.testcase \
	elemgeo5.testcase \
	elemgeo6.testcase \
	elemgeo7.testcase \
	elemgeo8.testcase \
	elemgeo9.testcase \
	elemgeo10.testcase \
	elemgeo11.testcase \
	elemgeo12.testcase \
	elemgeo13.testcase \
	elemgeo14.testcase \
	elemgeo15.testcase \
	elemgeo16.testcase \
	elemgeo17.testcase \
	elemgeo18.testcase \
	elemgeo19.testcase \
	emptyfile.txt \
	endpoint1.testcase \
	ensureclosedrings1.testcase \
	ensureclosedrings2.testcase \
	ensureclosedrings3.testcase \
	ensureclosedrings4.testcase \
	ensureclosedrings5.testcase \
	ensureclosedrings6.testcase \
	ensureclosedrings7.testcase \
	ensureclosedrings8.testcase \
	ensureclosedrings9.testcase \
	ensureclosedrings10.testcase \
	envelope1.testcase \
	envelope2.testcase \
	envelope3.testcase \
	envelope4.testcase \
	envelope5.testcase \
	envelope6.testcase \
	envelope7.testcase \
................................................................................
	extractmultipoint3.testcase \
	extractmultipolygon1.testcase \
	extractmultipolygon2.testcase \
	extractmultipolygon3.testcase \
	fath_m.testcase \
	fdo_ogr1.testcase \
	fdo_ogr2.testcase \
	fdo_ogr3.testcase \
	fdo_ogr4.testcase \
	fdo_ogr5.testcase \
	fdo_ogr6.testcase \
	fdo_ogr7.testcase \
	fdo_ogr8.testcase \
	fdo-wkb.sqlite_RO \
	forcenull10.testcase \
	forcenull11.testcase \
	forcenull12.testcase \
	forcenull13.testcase \
	forcenull14.testcase \
	forcenull15.testcase \
................................................................................
	fromgeojson3.testcase \
	fromgeojson4.testcase \
	fromgeojson5.testcase \
	fromgeojson6.testcase \
	fromgeojson7.testcase \
	fromgeojson8.testcase \
	fromgeojson9.testcase \
	fromgeojsonmix1.testcase \
	fromgeojsonmix2.testcase \
	fromgeojsonmix3.testcase \
	fromgeojsonmix4.testcase \
	fromgeojsonmix5.testcase \
	fromgeojsonmix6.testcase \
	fromgeojsonmix7.testcase \
	fromgeojsonmix8.testcase \
	fromgeojsonmix9.testcase \
	fromgeojsonpt10.testcase \
	fromgeojsonpt11.testcase \
	fromgeojsonpt12.testcase \
	fromgeojsonpt13.testcase \
	fromgeojsonpt14.testcase \
	fromgeojsonpt15.testcase \
	fromgeojsonpt16.testcase \
	fromgeojsonpt17.testcase \
	fromgeojsonpt18.testcase \
	fromgeojsonpt19.testcase \
	fromgeojsonpt1.testcase \
	fromgeojsonpt20.testcase \
	fromgeojsonpt21.testcase \
	fromgeojsonpt22.testcase \
	fromgeojsonpt23.testcase \
	fromgeojsonpt24.testcase \
	fromgeojsonpt25.testcase \
	fromgeojsonpt26.testcase \
	fromgeojsonpt27.testcase \
	fromgeojsonpt28.testcase \
	fromgeojsonpt29.testcase \
	fromgeojsonpt2.testcase \
	fromgeojsonpt30.testcase \
	fromgeojsonpt31.testcase \
	fromgeojsonpt32.testcase \
	fromgeojsonpt33.testcase \
	fromgeojsonpt34.testcase \
	fromgeojsonpt35.testcase \
	fromgeojsonpt36.testcase \
	fromgeojsonpt37.testcase \
	fromgeojsonpt38.testcase \
	fromgeojsonpt3.testcase \
	fromgeojsonpt4.testcase \
	fromgeojsonpt5.testcase \
	fromgeojsonpt6.testcase \
	fromgeojsonpt7.testcase \
	fromgeojsonpt8.testcase \
	fromgeojsonpt9.testcase \
	fromgml10.testcase \
	fromgml11.testcase \
	fromgml12.testcase \
	fromgml13.testcase \
	fromgml14.testcase \
	fromgml15.testcase \
	fromgml16.testcase \
................................................................................
	fromgml5.testcase \
	fromgml60.testcase \
	fromgml61.testcase \
	fromgml6.testcase \
	fromgml7.testcase \
	fromgml8.testcase \
	fromgml9.testcase \
	fromgmlexp1.testcase \
	fromgmlexp2.testcase \
	fromgmlexp3.testcase \
	fromgmlexp4.testcase \
	fromgmlexp5.testcase \
	fromgmlexp6.testcase \
	fromgmlexp7.testcase \
	fromgmlexp8.testcase \
	fromgmlexp9.testcase \
	fromWkb10.testcase \
	fromWkb11.testcase \
	fromWkb12.testcase \
	fromWkb13.testcase \
	fromWkb14.testcase \
	fromWkb15.testcase \
	fromWkb16.testcase \
................................................................................
	fromWkb3.testcase \
	fromWkb4.testcase \
	fromWkb5.testcase \
	fromWkb6.testcase \
	fromWkb7.testcase \
	fromWkb8.testcase \
	fromWkb9.testcase \
	fromgeojsonexp1.testcase \
	fromgeojsonexp2.testcase \
	fromgeojsonexp3.testcase \
	fromgeojsonexp4.testcase \
	fromgeojsonexp5.testcase \
	fromgeojsonexp6.testcase \
	fromgeojsonexp7.testcase \
	fromgeojsonexp8.testcase \
	fromgeojsonexp9.testcase \
	fromwktexp1.testcase \
	fromwktexp2.testcase \
	fromwktexp3.testcase \
	fromwktexp4.testcase \
	fromwktexp5.testcase \
	fromwktexp6.testcase \
	fromwktexp7.testcase \
	fromwktexp8.testcase \
	fromwktexp9.testcase \
	fromewktexp1.testcase \
	fromewktexp2.testcase \
	fromewktexp3.testcase \
	fromewktexp4.testcase \
	fromewktexp5.testcase \
	fromewktexp6.testcase \
	fromewktexp7.testcase \
	fromewktexp8.testcase \
	fromewktexp9.testcase \
	ft_m.testcase \
	fullnamefrompath1.testcase \
	fullnamefrompath2.testcase \
	fullnamefrompath3.testcase \
	fullnamefrompath4.testcase \
	fullnamefrompath5.testcase \
	garsmbr10.testcase \
................................................................................
	geodesic-len2.testcase \
	geodesic-len3.testcase \
	geodesic-len4.testcase \
	geodesic-len5.testcase \
	geodesic-len6.testcase \
	geodesic-len7.testcase \
	geodesic-len8.testcase \
	geodesicangle1.testcase \
	geodesicangle2.testcase \
	geodesicangle3.testcase \
	geodesicangle4.testcase \
	geodesicangle5.testcase \
	geodesicangle6.testcase \
	geodesicarcarea1.testcase \
	geodesicarcarea2.testcase \
	geodesicarcarea3.testcase \
	geodesicarcheight1.testcase \
	geodesicarcheight2.testcase \
	geodesicarcheight3.testcase \
	geodesicarclen1.testcase \
	geodesicarclen2.testcase \
	geodesicarclen3.testcase \
	geodesicarclen4.testcase \
	geodesicarclen5.testcase \
	geodesicchordlen1.testcase \
	geodesicchordlen2.testcase \
	geodesicchordlen3.testcase \
	geodesicchordlen4.testcase \
	geodesicchordlen5.testcase \
	geojson1.testcase \
	geojson2.testcase \
	geojson3.testcase \
	geojson4.testcase \
	geojson5.testcase \
	geojson6.testcase \
	geomcollfromtext1.testcase \
................................................................................
	geomfromkml3.testcase \
	geomfromkml4.testcase \
	geomfromkml5.testcase \
	geomfromkml6.testcase \
	geomfromkml7.testcase \
	geomfromkml8.testcase \
	geomfromkml9.testcase \
	geomfromkmlexp1.testcase \
	geomfromkmlexp2.testcase \
	geomfromkmlexp3.testcase \
	geomfromkmlexp4.testcase \
	geomfromkmlexp5.testcase \
	geomfromkmlexp6.testcase \
	geomfromkmlexp7.testcase \
	geomfromkmlexp8.testcase \
	geomfromkmlexp9.testcase \
	geomfromtext10.testcase \
	geomfromtext11.testcase \
	geomfromtext12.testcase \
	geomfromtext13.testcase \
	geomfromtext14.testcase \
	geomfromtext15.testcase \
	geomfromtext16.testcase \
................................................................................
	geomfromtext45.testcase \
	geomfromtext4.testcase \
	geomfromtext5.testcase \
	geomfromtext6.testcase \
	geomfromtext7.testcase \
	geomfromtext8.testcase \
	geomfromtext9.testcase \
	geompointencode1.testcase \
	geompointencode2.testcase \
	geompointencode3.testcase \
	geompointencode4.testcase \
	geompointencode5.testcase \
	geompointencode6.testcase \
	geompointencode7.testcase \
	geompointencode8.testcase \
	geompointencode9.testcase \
	geompointencode10.testcase \
	geomtype10.testcase \
	geomtype11.testcase \
	geomtype12.testcase \
	geomtype13.testcase \
	geomtype14.testcase \
	geomtype15.testcase \
	geomtype16.testcase \
................................................................................
	geomtype8.testcase \
	geomtype9.testcase \
	getmimetype1.testcase \
	getmimetype2.testcase \
	getmimetype3.testcase \
	getmimetype4.testcase \
	getmimetype5.testcase \
	getshapefileextent1.testcase \
	getshapefileextent2.testcase \
	getshapefileextent3.testcase \
	getshapefileextent4.testcase \
	getshapefileextent5.testcase \
	gml10.testcase \
	gml11.testcase \
	gml12.testcase \
	gml13.testcase \
	gml14.testcase \
	gml15.testcase \
	gml16.testcase \
................................................................................
	isempty4.testcase \
	isempty.testcase \
	ismeasured1.testcase \
	ismeasured2.testcase \
	ismeasured3.testcase \
	ismeasured4.testcase \
	ismeasured5.testcase \
	ispolygccw1.testcase \
	ispolygccw2.testcase \
	ispolygccw3.testcase \
	ispolygccw4.testcase \
	ispolygccw5.testcase \
	ispolygcw1.testcase \
	ispolygcw2.testcase \
	ispolygcw3.testcase \
	ispolygcw4.testcase \
	ispolygcw5.testcase \
	ispopulatedcoverage1.testcase \
	ispopulatedcoverage2.testcase \
	ispopulatedcoverage3.testcase \
	checkfontfacename1.testcase \
	checkfontfacename2.testcase \
	checkfontfacename3.testcase \
	getfontfamily.testcase \
	isfontbold.testcase \
	isfontitalic.testcase \
	islowascii1.testcase \
	islowascii2.testcase \
	islowascii3.testcase \
	islowascii4.testcase \
	islowascii5.testcase \
	islowascii6.testcase \
	isvalidfont1.testcase \
	isvalidfont2.testcase \
	isvalidnodata1.testcase \
	isvalidnodata2.testcase \
	isvalidnodata3.testcase \
	isvalidnodata4.testcase \
	isvalidpalette1.testcase \
................................................................................
	isvalidrasterstats1.testcase \
	isvalidrasterstats2.testcase \
	isvalidrasterstats3.testcase \
	isvalidrasterstats4.testcase \
	isvalidrasterstats5.testcase \
	isvalidrasterstats6.testcase \
	isvalidrasterstats7.testcase \
	isvalidrasterstats8.testcase \
	isvalidrastertile1.testcase \
	isvalidrastertile2.testcase \
	isvalidrastertile3.testcase \
	isvalidrastertile4.testcase \
	isvalidrastertile5.testcase \
	isvalidrastertile6.testcase \
	isvalidrastertile7.testcase \
	isvalidrastertile8.testcase \
	isvalidrastertile9.testcase \
	isvalidtrajectory1.testcase \
	isvalidtrajectory2.testcase \
	isvalidtrajectory3.testcase \
	isvalidtrajectory4.testcase \
	isvalidtrajectory5.testcase \
	isvalidtrajectory6.testcase \
	isvalidtrajectory7.testcase \
	isXblob6.testcase \
	isXblob7.testcase \
	k3b-icon.png \
	km_m.testcase \
	ktorrent_grad1.jpg \
	ktorrent_sidebar.gif \
	La_folla_durante_il_Palio.jpg \
................................................................................
	pointn3.testcase \
	pointn4.testcase \
	pointn5.testcase \
	pointn6.testcase \
	pointn7.testcase \
	pointn8.testcase \
	pointn9.testcase \
	polygccw1.testcase \
	polygccw2.testcase \
	polygccw3.testcase \
	polygccw4.testcase \
	polygccw5.testcase \
	polygccw6.testcase \
	polygcw1.testcase \
	polygcw2.testcase \
	polygcw3.testcase \
	polygcw4.testcase \
	polygcw5.testcase \
	polygcw6.testcase \
	polygonfromtext1.testcase \
	polygonfromtext2.testcase \
	reflectcoords10.testcase \
	reflectcoords11.testcase \
	reflectcoords12.testcase \
	reflectcoords13.testcase \
	reflectcoords14.testcase \
................................................................................
	reflectcoords5.testcase \
	reflectcoords6.testcase \
	reflectcoords7.testcase \
	reflectcoords8.testcase \
	reflectcoords9.testcase \
	removedupl1.testcase \
	removedupl2.testcase \
	removedupl3.testcase \
	removedupl4.testcase \
	removepoint10.testcase \
	removepoint11.testcase \
	removepoint12.testcase \
	removepoint13.testcase \
	removepoint14.testcase \
	removepoint15.testcase \
	removepoint16.testcase \
................................................................................
	removepoint3.testcase \
	removepoint4.testcase \
	removepoint5.testcase \
	removepoint6.testcase \
	removepoint7.testcase \
	removepoint8.testcase \
	removepoint9.testcase \
	repeatedpoints1.testcase \
	repeatedpoints2.testcase \
	repeatedpoints3.testcase \
	repeatedpoints4.testcase \
	repeatedpoints5.testcase \
	repeatedpoints6.testcase \
	repeatedpoints7.testcase \
	repeatedpoints8.testcase \
	repeatedpoints9.testcase \
	repeatedpoints10.testcase \
	repeatedpoints11.testcase \
	repeatedpoints12.testcase \
	repeatedpoints13.testcase \
	repeatedpoints14.testcase \
	reverse1.testcase \
	reverse2.testcase \
	reverse3.testcase \
	reverse4.testcase \
	reverse5.testcase \
	reverse6.testcase \
	ring10.testcase \
................................................................................
	sridax2name5.testcase \
	sridax2name6.testcase \
	sridax2orient1.testcase \
	sridax2orient2.testcase \
	sridax2orient3.testcase \
	sridax2orient4.testcase \
	sridax2orient5.testcase \
	sridax2orient6.testcase \
	stringlist1.testcase \
	stringlist2.testcase \
	stringlist3.testcase \
	stringlist4.testcase \
	stringlist5.testcase \
	tinypointencode1.testcase \
	tinypointencode2.testcase \
	tinypointencode3.testcase \
	tinypointencode4.testcase \
	tinypointencode5.testcase \
	tinypointencode6.testcase \
	tinypointencode7.testcase \
	tinypointencode8.testcase \
	tinypointencode9.testcase \
	tinypointencode10.testcase \
	trajectorypoint1.testcase \
	trajectorypoint2.testcase \
	trajectorypoint3.testcase \
	trajectorypoint4.testcase \
	trajectorypoint5.testcase \
	trajectorypoint6.testcase \
	trajectorypoint7.testcase \
	trajectorypoint8.testcase \
	trajectorypoint9.testcase \
	trajectorypoint10.testcase \
	trajectorypoint11.testcase \
	trajectorypoint12.testcase \
	wms_defaultsetting1.testcase \
	wms_defaultsetting2.testcase \
	wms_defaultsetting3.testcase \
	wms_defaultsetting4.testcase \
	wms_defaultsetting5.testcase \
	wms_defaultsetting6.testcase \
	wms_defaultsetting7.testcase \
	wms_defaultsetting8.testcase \
	wms_defaultsetting9.testcase \
	wms_defaultsetting10.testcase \
	wms_defaultsetting11.testcase \
	wms_defaultsetting12.testcase \
	wms_defaultsetting13.testcase \
	wms_defaultsetting14.testcase \
	wms_defaultsetting15.testcase \
	wms_defaultsetting16.testcase \
	wms_defaultsetting17.testcase \
	wms_defaultsrs1.testcase \
	wms_defaultsrs2.testcase \
	wms_defaultsrs3.testcase \
	wms_defaultsrs4.testcase \
	wms_defaultsrs5.testcase \
	wms_defaultsrs6.testcase \
	wms_defaultsrs7.testcase \
	wms_defaultsrs8.testcase \
	wms_defaultsrs9.testcase \
	wms_defaultsrs10.testcase \
	wms_defaultsrs11.testcase \
	wms_defaultsrs12.testcase \
	wms_defaultsrs13.testcase \
	wms_getmapoptions1.testcase \
	wms_getmapoptions2.testcase \
	wms_getmapoptions3.testcase \
	wms_getmapoptions4.testcase \
	wms_getmapoptions5.testcase \
	wms_getmapoptions6.testcase \
	wms_getmapoptions7.testcase \
	wms_getmapoptions8.testcase \
	wms_getmapoptions9.testcase \
	wms_getmapoptions10.testcase \
	wms_getmapoptions11.testcase \
	wms_getmapoptions12.testcase \
	wms_getmapoptions13.testcase \
	wms_getmapoptions14.testcase \
	wms_getmapoptions15.testcase \
	wms_getmapoptions16.testcase \
	wms_getmapoptions17.testcase \
	wms_getmapoptions18.testcase \
	wms_getmapoptions19.testcase \
	wms_getmapoptions20.testcase \
	wms_getmapoptions21.testcase \
	wms_getmapoptions22.testcase \
	wms_getmapoptions23.testcase \
	wms_getmapoptions24.testcase \
	wms_getmapoptions25.testcase \
	wms_getmapoptions26.testcase \
	wms_getmapoptions27.testcase \
	wms_getmapoptions28.testcase \
	wms_getmapoptions29.testcase \
	wms_getmapoptions30.testcase \
	wms_getmapoptions31.testcase \
	wms_getmapoptions32.testcase \
	wms_getmapoptions33.testcase \
	wms_getmapoptions34.testcase \
	wms_getmapoptions35.testcase \
	wms_getmapoptions36.testcase \
	wms_getmapoptions37.testcase \
	wms_getmapoptions38.testcase \
	wms_getmapoptions39.testcase \
	wms_getmapoptions40.testcase \
	wms_getmapoptions41.testcase \
	wms_getmapoptions42.testcase \
	wms_getmapoptions43.testcase \
	wms_getmapoptions44.testcase \
	wms_getinfo_url1.testcase \
	wms_getinfo_url2.testcase \
	wms_getinfo_url3.testcase \
	wms_getinfo_url4.testcase \
	wms_getinfo_url5.testcase \
	wms_getinfo_url6.testcase \
	wms_getinfo_url7.testcase \
	wms_getinfo_url8.testcase \
	wms_getinfo_url9.testcase \
	wms_getinfo_url10.testcase \
	wms_getinfo_url11.testcase \
	wms_getinfo_url12.testcase \
	wms_getinfo_url13.testcase \
	wms_getinfo_url14.testcase \
	wms_getinfo_url15.testcase \
	wms_getinfo_url16.testcase \
	wms_getinfo_url17.testcase \
	wms_getinfo_url18.testcase \
	wms_getinfo_url19.testcase \
	wms_getinfo_url20.testcase \
	wms_getinfo_url21.testcase \
	wms_getinfo_url22.testcase \
	wms_getinfo_url23.testcase \
	wms_getinfo_url24.testcase \
	wms_getinfo_url25.testcase \
	wms_getinfo_url26.testcase \
	wms_getinfo_url27.testcase \
	wms_getinfo_url28.testcase \
	wms_getinfo_url29.testcase \
	wms_getinfo_url30.testcase \
	wms_getinfo_url31.testcase \
	wms_getinfo_url32.testcase \
	wms_getinfo_url33.testcase \
	wms_getinfo_url34.testcase \
	wms_getinfo_url35.testcase \
	wms_getinfo_url36.testcase \
	wms_getinfo_url37.testcase \
	wms_getinfo_url38.testcase \
	wms_getinfo_url39.testcase \
	wms_getinfo_url40.testcase \
	wms_getinfo_url41.testcase \
	wms_getinfo_url42.testcase \
	wms_getmap_url1.testcase \
	wms_getmap_url2.testcase \
	wms_getmap_url3.testcase \
	wms_getmap_url4.testcase \
	wms_getmap_url5.testcase \
	wms_getmap_url6.testcase \
	wms_getmap_url7.testcase \
	wms_getmap_url8.testcase \
	wms_getmap_url9.testcase \
	wms_getmap_url10.testcase \
	wms_getmap_url11.testcase \
	wms_getmap_url12.testcase \
	wms_getmap_url13.testcase \
	wms_getmap_url14.testcase \
	wms_getmap_url15.testcase \
	wms_getmap_url16.testcase \
	wms_getmap_url17.testcase \
	wms_getmap_url18.testcase \
	wms_getmap_url19.testcase \
	wms_getmap_url20.testcase \
	wms_getmap_url21.testcase \
	wms_getmap_url22.testcase \
	wms_getmap_url23.testcase \
	wms_getmap_url24.testcase \
	wms_getmap_url25.testcase \
	wms_getmap_url26.testcase \
	wms_getmap_url27.testcase \
	wms_getmap_url28.testcase \
	wms_getmap_url29.testcase \
	wms_getmap_url30.testcase \
	wms_registergetcapab1.testcase \
	wms_registergetcapab2.testcase \
	wms_registergetcapab3.testcase \
	wms_registergetcapab4.testcase \
	wms_registergetcapab5.testcase \
	wms_registergetcapab6.testcase \
	wms_registergetcapab7.testcase \
	wms_registergetcapab8.testcase \
	wms_registergetcapab9.testcase \
	wms_registergetcapab10.testcase \
	wms_registergetcapab11.testcase \
	wms_registergetcapab12.testcase \
	wms_registergetcapab13.testcase \
	wms_registergetmap1.testcase \
	wms_registergetmap2.testcase \
	wms_registergetmap3.testcase \
	wms_registergetmap4.testcase \
	wms_registergetmap5.testcase \
	wms_registergetmap6.testcase \
	wms_registergetmap7.testcase \
	wms_registergetmap8.testcase \
	wms_registergetmap9.testcase \
	wms_registergetmap10.testcase \
	wms_registergetmap11.testcase \
	wms_registergetmap12.testcase \
	wms_registergetmap13.testcase \
	wms_registergetmap14.testcase \
	wms_registergetmap15.testcase \
	wms_registergetmap16.testcase \
	wms_registergetmap17.testcase \
	wms_registergetmap18.testcase \
	wms_registergetmap19.testcase \
	wms_registergetmap20.testcase \
	wms_registergetmap21.testcase \
	wms_registergetmap22.testcase \
	wms_registergetmap23.testcase \
	wms_registergetmap24.testcase \
	wms_registergetmap25.testcase \
	wms_registergetmap26.testcase \
	wms_registergetmap27.testcase \
	wms_registergetmap28.testcase \
	wms_registergetmap29.testcase \
	wms_registergetmap30.testcase \
	wms_registergetmap31.testcase \
	wms_registergetmap32.testcase \
	wms_registergetmap33.testcase \
	wms_registergetmap34.testcase \
	wms_registergetmap35.testcase \
	wms_registergetmap36.testcase \
	wms_registergetmap37.testcase \
	wms_registergetmap38.testcase \
	wms_registergetmap39.testcase \
	wms_registergetmap40.testcase \
	wms_registergetmap41.testcase \
	wms_registergetmap42.testcase \
	wms_registergetmap43.testcase \
	wms_registergetmap44.testcase \
	wms_registergetmap45.testcase \
	wms_registergetmap46.testcase \
	wms_registergetmap47.testcase \
	wms_registergetmap48.testcase \
	wms_registergetmap49.testcase \
	wms_registergetmap50.testcase \
	wms_registergetmap51.testcase \
	wms_registergetmap52.testcase \
	wms_registergetmap53.testcase \
	wms_registergetmap54.testcase \
	wms_registergetmap55.testcase \
	wms_registergetmap56.testcase \
	wms_registergetmap57.testcase \
	wms_registergetmap58.testcase \
	wms_registergetmap59.testcase \
	wms_registergetmap60.testcase \
	wms_registergetmap61.testcase \
	wms_registergetmap62.testcase \
	wms_registergetmap63.testcase \
	wms_registergetmap64.testcase \
	wms_registergetmap65.testcase \
	wms_registergetmap66.testcase \
	wms_registergetmap67.testcase \
	wms_registergetmap68.testcase \
	wms_registergetmap69.testcase \
	wms_registergetmap70.testcase \
	wms_registergetmap71.testcase \
	wms_registergetmap72.testcase \
	wms_registergetmap73.testcase \
	wms_registergetmap74.testcase \
	wms_registergetmap75.testcase \
	wms_registergetmap76.testcase \
	wms_registergetmap77.testcase \
	wms_registergetmap78.testcase \
	wms_registergetmap79.testcase \
	wms_registergetmap80.testcase \
	wms_registergetmap81.testcase \
	wms_registergetmap82.testcase \
	wms_registergetmap83.testcase \
	wms_registergetmap84.testcase \
	wms_registergetmap85.testcase \
	wms_registergetmap86.testcase \
	wms_registersetting1.testcase \
	wms_registersetting2.testcase \
	wms_registersetting3.testcase \
	wms_registersetting4.testcase \
	wms_registersetting5.testcase \
	wms_registersetting6.testcase \
	wms_registersetting7.testcase \
	wms_registersetting8.testcase \
	wms_registersetting9.testcase \
	wms_registersetting10.testcase \
	wms_registersetting11.testcase \
	wms_registersetting12.testcase \
	wms_registersetting13.testcase \
	wms_registersetting14.testcase \
	wms_registersetting15.testcase \
	wms_registersetting16.testcase \
	wms_registersetting17.testcase \
	wms_registersetting18.testcase \
	wms_registersetting19.testcase \
	wms_registersetting20.testcase \
	wms_registersetting21.testcase \
	wms_registersetting22.testcase \
	wms_registersrs1.testcase \
	wms_registersrs2.testcase \
	wms_registersrs3.testcase \
	wms_registersrs4.testcase \
	wms_registersrs5.testcase \
	wms_registersrs6.testcase \
	wms_registersrs7.testcase \
	wms_registersrs8.testcase \
	wms_registersrs9.testcase \
	wms_registersrs10.testcase \
	wms_registersrs11.testcase \
	wms_registersrs12.testcase \
	wms_registersrs13.testcase \
	wms_registersrs14.testcase \
	wms_registersrs15.testcase \
	wms_registersrs16.testcase \
	wms_registersrs17.testcase \
	wms_registersrs18.testcase \
	wms_registersrs19.testcase \
	wms_registersrs20.testcase \
	wms_registersrs21.testcase \
	wms_registersrs22.testcase \
	wms_registersrs23.testcase \
	wms_registersrs24.testcase \
	wms_registersrs25.testcase \
	wms_registersrs26.testcase \
	wms_registersrs27.testcase \
	wms_registersrs28.testcase \
	wms_registersrs29.testcase \
	wms_setgetcapabinfo1.testcase \
	wms_setgetcapabinfo2.testcase \
	wms_setgetcapabinfo3.testcase \
	wms_setgetcapabinfo4.testcase \
	wms_setgetcapabinfo5.testcase \
	wms_setgetcapabinfo6.testcase \
	wms_setgetcapabinfo7.testcase \
	wms_setgetcapabinfo8.testcase \
	wms_setgetcapabinfo9.testcase \
	wms_setgetcapabinfo10.testcase \
	wms_setgetcapabinfo11.testcase \
	wms_setgetcapabinfo12.testcase \
	wms_setgetcapabinfo13.testcase \
	wms_setcopyright1.testcase \
	wms_setcopyright2.testcase \
	wms_setcopyright3.testcase \
	wms_setcopyright4.testcase \
	wms_setcopyright5.testcase \
	wms_setcopyright6.testcase \
	wms_setcopyright7.testcase \
	wms_setcopyright8.testcase \
	wms_setcopyright9.testcase \
	wms_setcopyright10.testcase \
	wms_setcopyright11.testcase \
	wms_setcopyright12.testcase \
	wms_setcopyright13.testcase \
	wms_setcopyright14.testcase \
	wms_setcopyright15.testcase \
	wms_setcopyright16.testcase \
	wms_setcopyright17.testcase \
	wms_setcopyright18.testcase \
	wms_setcopyright19.testcase \
	wms_setgetmapinfo1.testcase \
	wms_setgetmapinfo2.testcase \
	wms_setgetmapinfo3.testcase \
	wms_setgetmapinfo4.testcase \
	wms_setgetmapinfo5.testcase \
	wms_setgetmapinfo6.testcase \
	wms_setgetmapinfo7.testcase \
	wms_setgetmapinfo8.testcase \
	wms_setgetmapinfo9.testcase \
	wms_setgetmapinfo10.testcase \
	wms_setgetmapinfo11.testcase \
	wms_setgetmapinfo12.testcase \
	wms_setgetmapinfo13.testcase \
	wms_setgetmapinfo14.testcase \
	wms_setgetmapinfo15.testcase \
	wms_setgetmapinfo16.testcase \
	wms_setgetmapinfo17.testcase \
	wms_unregistergetcapab1.testcase \
	wms_unregistergetcapab2.testcase \
	wms_unregistergetcapab3.testcase \
	wms_unregistergetcapab4.testcase \
	wms_unregistergetcapab5.testcase \
	wms_unregistergetmap1.testcase \
	wms_unregistergetmap2.testcase \
	wms_unregistergetmap3.testcase \
	wms_unregistergetmap4.testcase \
	wms_unregistergetmap5.testcase \
	wms_unregistergetmap6.testcase \
	wms_unregistergetmap7.testcase \
	wms_unregistergetmap8.testcase \
	wms_unregistergetmap9.testcase \
	wms_unregistersetting1.testcase \
	wms_unregistersetting2.testcase \
	wms_unregistersetting3.testcase \
	wms_unregistersetting4.testcase \
	wms_unregistersetting5.testcase \
	wms_unregistersetting6.testcase \
	wms_unregistersetting7.testcase \
	wms_unregistersetting8.testcase \
	wms_unregistersetting9.testcase \
	wms_unregistersetting10.testcase \
	wms_unregistersetting11.testcase \
	wms_unregistersetting12.testcase \
	wms_unregistersetting13.testcase \
	wms_unregistersetting14.testcase \
	wms_unregistersetting15.testcase \
	wms_unregistersetting16.testcase \
	wms_unregistersetting17.testcase \
	wms_unregistersrs1.testcase \
	wms_unregistersrs2.testcase \
	wms_unregistersrs3.testcase \
	wms_unregistersrs4.testcase \
	wms_unregistersrs5.testcase \
	wms_unregistersrs6.testcase \
	wms_unregistersrs7.testcase \
	wms_unregistersrs8.testcase \
	wms_unregistersrs9.testcase \
	wms_unregistersrs10.testcase \
	wms_unregistersrs11.testcase \
	wms_unregistersrs12.testcase \
	wms_unregistersrs13.testcase

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<







 







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<






<
<
<
<
<






<
<
<
<
<
<
<
<
<
<
<
<



|
|
|
|
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
<
<
<
<
<
<
<
<
<







 







<
<
<
<






|
<
<
<
|
|
|
|
|
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<







 







<
<
<
<
<
|
<
<
<
<


<






<
<
<
<
<
<







 







<






<
<
<
<
<
<
<
|
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
264
265
266
267
268
269
270















271
272
273
274
275
276
277
...
374
375
376
377
378
379
380

381
382
383
384
385
386
387
...
401
402
403
404
405
406
407












408
409
410
411
412
413
414
...
647
648
649
650
651
652
653





654
655
656
657
658
659





660
661
662
663
664
665












666
667
668
669
670
671
672

673
674
675
676
677
678
679
...
681
682
683
684
685
686
687















688
689
690
691
692
693
694
...
835
836
837
838
839
840
841
842
843



















844
845
846
847
848









849
850
851
852
853
854
855
...
893
894
895
896
897
898
899




900
901
902
903
904
905
906



907
908
909
910
911





912










913
914
915
916
917
918
919
...
960
961
962
963
964
965
966






967
968
969
970
971
972
973
....
1059
1060
1061
1062
1063
1064
1065















































1066
1067
1068
1069
1070
1071
1072
....
1119
1120
1121
1122
1123
1124
1125









1126
1127
1128
1129
1130
1131
1132
....
1145
1146
1147
1148
1149
1150
1151



























1152
1153
1154
1155
1156
1157
1158
....
1194
1195
1196
1197
1198
1199
1200






















1201
1202
1203
1204
1205
1206
1207
....
1276
1277
1278
1279
1280
1281
1282









1283
1284
1285
1286
1287
1288
1289
....
1321
1322
1323
1324
1325
1326
1327










1328
1329
1330
1331
1332
1333
1334
....
1395
1396
1397
1398
1399
1400
1401





1402
1403
1404
1405
1406
1407
1408
....
1440
1441
1442
1443
1444
1445
1446





1447




1448
1449

1450
1451
1452
1453
1454
1455






1456
1457
1458
1459
1460
1461
1462
....
1465
1466
1467
1468
1469
1470
1471

1472
1473
1474
1475
1476
1477







1478


1479
1480
1481
1482
1483
1484
1485
....
1907
1908
1909
1910
1911
1912
1913












1914
1915
1916
1917
1918
1919
1920
....
1928
1929
1930
1931
1932
1933
1934


1935
1936
1937
1938
1939
1940
1941
....
1944
1945
1946
1947
1948
1949
1950














1951
1952
1953
1954
1955
1956
1957
....
2437
2438
2439
2440
2441
2442
2443
2444
































































































































































































































































































































































































































2445
2446
2447
2448
2449
2450
2451
....
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
....
2629
2630
2631
2632
2633
2634
2635


2636
2637
2638
2639
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	addpoint3.testcase \
	addpoint4.testcase \
	addpoint5.testcase \
	addpoint6.testcase \
	addpoint7.testcase \
	addpoint8.testcase \
	addpoint9.testcase \















	asbinary10.testcase \
	asbinary11.testcase \
	asbinary12.testcase \
	asbinary13.testcase \
	asbinary14.testcase \
	asbinary15.testcase \
	asbinary16.testcase \
................................................................................
	atmcreate16.testcase \
	atmcreate17.testcase \
	atmcreate18.testcase \
	atmcreate19.testcase \
	atmcreate20.testcase \
	atmcreate21.testcase \
	atmcreate22.testcase \

	atmcreatescale1.testcase \
	atmcreatescale2.testcase \
	atmcreatescale3.testcase \
	atmcreatescale4.testcase \
	atmcreatescale5.testcase \
	atmcreatescale6.testcase \
	atmcreatescale7.testcase \
................................................................................
	atmcreatexroll3.testcase \
	atmcreateyroll1.testcase \
	atmcreateyroll2.testcase \
	atmcreateyroll3.testcase \
	atmcreatezroll1.testcase \
	atmcreatezroll2.testcase \
	atmcreatezroll3.testcase \












	atmisvalid1.testcase \
	atmisvalid2.testcase \
	atmisvalid3.testcase \
	atmisvalid4.testcase \
	atmisvalid5.testcase \
	atmisvalid6.testcase \
	atmmultiply1.testcase \
................................................................................
	casttoxy3.testcase \
	casttoxym1.testcase \
	casttoxym2.testcase \
	casttoxym3.testcase \
	casttoxym4.testcase \
	casttoxym5.testcase \
	casttoxym6.testcase \





	casttoxyz1.testcase \
	casttoxyz2.testcase \
	casttoxyz3.testcase \
	casttoxyz4.testcase \
	casttoxyz5.testcase \
	casttoxyz6.testcase \





	casttoxyzm1.testcase \
	casttoxyzm2.testcase \
	casttoxyzm3.testcase \
	casttoxyzm4.testcase \
	casttoxyzm5.testcase \
	casttoxyzm6.testcase \












	checkspatialmetadata1.testcase \
	checkspatialmetadata2.testcase \
	checkspatialmetadata3.testcase \
	checkdupl1.testcase \
	checkdupl2.testcase \
	checkspatialmetadata4.testcase \
	checkspatialmetadata5.testcase \

	clonetable1.testcase \
	clonetable2.testcase \
	clonetable3.testcase \
	clonetable4.testcase \
	clonetable5.testcase \
	clonetable6.testcase \
	clonetable7.testcase \
................................................................................
	clonetable9.testcase \
	clonetable10.testcase \
	clonetable11.testcase \
	clonetable12.testcase \
	clonetable13.testcase \
	clonetable14.testcase \
	clonetable15.testcase \















	ch_m.testcase \
	cm_m.testcase \
	collect10.testcase \
	collect11.testcase \
	collect12.testcase \
	collect13.testcase \
	collect14.testcase \
................................................................................
	compressgeometry68.testcase \
	compressgeometry69.testcase \
	compressgeometry6.testcase \
	compressgeometry7.testcase \
	compressgeometry8.testcase \
	compressgeometry9.testcase \
	createrastercoverages.testcase \
	createvectorcoverages.testcase \
	createuuid1.testcase \



















	decodeurl1.testcase \
	decodeurl2.testcase \
	decodeurl3.testcase \
	decodeurl4.testcase \
	decodeurl5.testcase \









	dirfrompath1.testcase \
	dirfrompath2.testcase \
	dirfrompath3.testcase \
	dirfrompath4.testcase \
	dirfrompath5.testcase \
	dimension1.testcase \
	dimension2.testcase \
................................................................................
	DSC_1467.JPG \
	DSCN0042.JPG \
	dropgeo1.testcase \
	dropgeo2.testcase \
	dropgeo3.testcase \
	dropgeo4.testcase \
	dropgeo5.testcase \




	elemgeo1.testcase \
	elemgeo2.testcase \
	elemgeo3.testcase \
	elemgeo4.testcase \
	elemgeo5.testcase \
	elemgeo6.testcase \
	emptyfile.txt \



	encodeurl1.testcase \
	encodeurl2.testcase \
	encodeurl3.testcase \
	encodeurl4.testcase \
	encodeurl5.testcase \





	endpoint1.testcase \










	envelope1.testcase \
	envelope2.testcase \
	envelope3.testcase \
	envelope4.testcase \
	envelope5.testcase \
	envelope6.testcase \
	envelope7.testcase \
................................................................................
	extractmultipoint3.testcase \
	extractmultipolygon1.testcase \
	extractmultipolygon2.testcase \
	extractmultipolygon3.testcase \
	fath_m.testcase \
	fdo_ogr1.testcase \
	fdo_ogr2.testcase \






	fdo-wkb.sqlite_RO \
	forcenull10.testcase \
	forcenull11.testcase \
	forcenull12.testcase \
	forcenull13.testcase \
	forcenull14.testcase \
	forcenull15.testcase \
................................................................................
	fromgeojson3.testcase \
	fromgeojson4.testcase \
	fromgeojson5.testcase \
	fromgeojson6.testcase \
	fromgeojson7.testcase \
	fromgeojson8.testcase \
	fromgeojson9.testcase \















































	fromgml10.testcase \
	fromgml11.testcase \
	fromgml12.testcase \
	fromgml13.testcase \
	fromgml14.testcase \
	fromgml15.testcase \
	fromgml16.testcase \
................................................................................
	fromgml5.testcase \
	fromgml60.testcase \
	fromgml61.testcase \
	fromgml6.testcase \
	fromgml7.testcase \
	fromgml8.testcase \
	fromgml9.testcase \









	fromWkb10.testcase \
	fromWkb11.testcase \
	fromWkb12.testcase \
	fromWkb13.testcase \
	fromWkb14.testcase \
	fromWkb15.testcase \
	fromWkb16.testcase \
................................................................................
	fromWkb3.testcase \
	fromWkb4.testcase \
	fromWkb5.testcase \
	fromWkb6.testcase \
	fromWkb7.testcase \
	fromWkb8.testcase \
	fromWkb9.testcase \



























	ft_m.testcase \
	fullnamefrompath1.testcase \
	fullnamefrompath2.testcase \
	fullnamefrompath3.testcase \
	fullnamefrompath4.testcase \
	fullnamefrompath5.testcase \
	garsmbr10.testcase \
................................................................................
	geodesic-len2.testcase \
	geodesic-len3.testcase \
	geodesic-len4.testcase \
	geodesic-len5.testcase \
	geodesic-len6.testcase \
	geodesic-len7.testcase \
	geodesic-len8.testcase \






















	geojson1.testcase \
	geojson2.testcase \
	geojson3.testcase \
	geojson4.testcase \
	geojson5.testcase \
	geojson6.testcase \
	geomcollfromtext1.testcase \
................................................................................
	geomfromkml3.testcase \
	geomfromkml4.testcase \
	geomfromkml5.testcase \
	geomfromkml6.testcase \
	geomfromkml7.testcase \
	geomfromkml8.testcase \
	geomfromkml9.testcase \









	geomfromtext10.testcase \
	geomfromtext11.testcase \
	geomfromtext12.testcase \
	geomfromtext13.testcase \
	geomfromtext14.testcase \
	geomfromtext15.testcase \
	geomfromtext16.testcase \
................................................................................
	geomfromtext45.testcase \
	geomfromtext4.testcase \
	geomfromtext5.testcase \
	geomfromtext6.testcase \
	geomfromtext7.testcase \
	geomfromtext8.testcase \
	geomfromtext9.testcase \










	geomtype10.testcase \
	geomtype11.testcase \
	geomtype12.testcase \
	geomtype13.testcase \
	geomtype14.testcase \
	geomtype15.testcase \
	geomtype16.testcase \
................................................................................
	geomtype8.testcase \
	geomtype9.testcase \
	getmimetype1.testcase \
	getmimetype2.testcase \
	getmimetype3.testcase \
	getmimetype4.testcase \
	getmimetype5.testcase \





	gml10.testcase \
	gml11.testcase \
	gml12.testcase \
	gml13.testcase \
	gml14.testcase \
	gml15.testcase \
	gml16.testcase \
................................................................................
	isempty4.testcase \
	isempty.testcase \
	ismeasured1.testcase \
	ismeasured2.testcase \
	ismeasured3.testcase \
	ismeasured4.testcase \
	ismeasured5.testcase \





	ismeasured6.testcase \




	ispopulatedcoverage1.testcase \
	ispopulatedcoverage2.testcase \

	checkfontfacename1.testcase \
	checkfontfacename2.testcase \
	checkfontfacename3.testcase \
	getfontfamily.testcase \
	isfontbold.testcase \
	isfontitalic.testcase \






	isvalidfont1.testcase \
	isvalidfont2.testcase \
	isvalidnodata1.testcase \
	isvalidnodata2.testcase \
	isvalidnodata3.testcase \
	isvalidnodata4.testcase \
	isvalidpalette1.testcase \
................................................................................
	isvalidrasterstats1.testcase \
	isvalidrasterstats2.testcase \
	isvalidrasterstats3.testcase \
	isvalidrasterstats4.testcase \
	isvalidrasterstats5.testcase \
	isvalidrasterstats6.testcase \
	isvalidrasterstats7.testcase \

	isvalidrastertile1.testcase \
	isvalidrastertile2.testcase \
	isvalidrastertile3.testcase \
	isvalidrastertile4.testcase \
	isvalidrastertile5.testcase \
	isvalidrastertile6.testcase \







	isXblob5.testcase \


	isXblob6.testcase \
	isXblob7.testcase \
	k3b-icon.png \
	km_m.testcase \
	ktorrent_grad1.jpg \
	ktorrent_sidebar.gif \
	La_folla_durante_il_Palio.jpg \
................................................................................
	pointn3.testcase \
	pointn4.testcase \
	pointn5.testcase \
	pointn6.testcase \
	pointn7.testcase \
	pointn8.testcase \
	pointn9.testcase \












	polygonfromtext1.testcase \
	polygonfromtext2.testcase \
	reflectcoords10.testcase \
	reflectcoords11.testcase \
	reflectcoords12.testcase \
	reflectcoords13.testcase \
	reflectcoords14.testcase \
................................................................................
	reflectcoords5.testcase \
	reflectcoords6.testcase \
	reflectcoords7.testcase \
	reflectcoords8.testcase \
	reflectcoords9.testcase \
	removedupl1.testcase \
	removedupl2.testcase \


	removepoint10.testcase \
	removepoint11.testcase \
	removepoint12.testcase \
	removepoint13.testcase \
	removepoint14.testcase \
	removepoint15.testcase \
	removepoint16.testcase \
................................................................................
	removepoint3.testcase \
	removepoint4.testcase \
	removepoint5.testcase \
	removepoint6.testcase \
	removepoint7.testcase \
	removepoint8.testcase \
	removepoint9.testcase \














	reverse1.testcase \
	reverse2.testcase \
	reverse3.testcase \
	reverse4.testcase \
	reverse5.testcase \
	reverse6.testcase \
	ring10.testcase \
................................................................................
	sridax2name5.testcase \
	sridax2name6.testcase \
	sridax2orient1.testcase \
	sridax2orient2.testcase \
	sridax2orient3.testcase \
	sridax2orient4.testcase \
	sridax2orient5.testcase \
	sridax2orient6.testcase

































































































































































































































































































































































































































all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sql_stmt_tests/addmeasure1.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - NULL geometry
:memory: #use in-memory database
SELECT ST_AddMeasure(NULL, 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(NULL, 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure10.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - BLOB M-start
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), zeroblob(10), 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), zeroblob(10), 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure11.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - NULL M-end
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 10.0, NULL)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 10.0, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure12.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Text M-end
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 10.0, 'end')
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 10.0, 'end')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure13.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - BLOB M-end
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 10.0, zeroblob(10))
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 10.0, zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure14.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Double M-start and M-end
:memory: #use in-memory database
SELECT ST_AsText(ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 100.0, 400.0))
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 100.0, 400.0))
LINESTRING M(0 0 100, 1 0 200, 1 1 300, 0 1 400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure15.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Int M-start and M-end
:memory: #use in-memory database
SELECT ST_AsText(ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 100, 400))
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 100, 400))
LINESTRING M(0 0 100, 1 0 200, 1 1 300, 0 1 400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure2.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Int geometry
:memory: #use in-memory database
SELECT ST_AddMeasure(1, 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(1, 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure3.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Double geometry
:memory: #use in-memory database
SELECT ST_AddMeasure(1.5, 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(1.5, 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure4.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Text geometry
:memory: #use in-memory database
SELECT ST_AddMeasure('geom', 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure('geom', 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure5.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Invalid Blob geometry
:memory: #use in-memory database
SELECT ST_AddMeasure(zeroblob(10), 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(zeroblob(10), 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure6.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Invalid Point geometry
:memory: #use in-memory database
SELECT ST_AddMeasure(MakePoint(1, 2), 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(MakePoint(1, 2), 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure7.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Invalid Polygon geometry
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'), 10.0, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'), 10.0, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure8.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - NULL M-start
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), NULL, 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), NULL, 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/addmeasure9.testcase.

1
2
3
4
5
6
7
ST_AddMeasure() - Text M-start
:memory: #use in-memory database
SELECT ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 'start', 20.0)
1 # rows (not including the header row)
1 # columns
ST_AddMeasure(GeomFromText('LINESTRING(0 0, 1 0, 1 1, 0 1)'), 'start', 20.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmcreate23.testcase.

1
2
3
4
5
6
7
ATM_Create() - invalid 12th arg
:memory: #use in-memory database
SELECT ATM_Create(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Create(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 'a')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmdeterminant1.testcase.

1
2
3
4
5
6
7
ATM_Determinant() - NULL arg
:memory: #use in-memory database
SELECT ATM_Determinant(NULL)
1 # rows (not including the header row)
1 # columns
ATM_Determinant(NULL)
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmdeterminant2.testcase.

1
2
3
4
5
6
7
ATM_Determinant() - invalid BLOB
:memory: #use in-memory database
SELECT ATM_Determinant(zeroblob(4))
1 # rows (not including the header row)
1 # columns
ATM_Determinant(zeroblob(4))
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmdeterminant3.testcase.

1
2
3
4
5
6
7
ATM_Determinant() - invertible
:memory: #use in-memory database
SELECT ATM_Determinant(ATM_CreateScale(2,2,2))
1 # rows (not including the header row)
1 # columns
ATM_Determinant(ATM_CreateScale(2,2,2))
8.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmdeterminant4.testcase.

1
2
3
4
5
6
7
ATM_Determinant() - not invertible
:memory: #use in-memory database
SELECT ATM_Determinant(ATM_Create(1,2,3,4,5,6,7,8,9,10,11,12))
1 # rows (not including the header row)
1 # columns
ATM_Determinant(ATM_Create(1,2,3,4,5,6,7,8,9,10,11,12))
0.0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atminvert1.testcase.

1
2
3
4
5
6
7
ATM_Invert() - NULL arg
:memory: #use in-memory database
SELECT ATM_Invert(NULL)
1 # rows (not including the header row)
1 # columns
ATM_Invert(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atminvert2.testcase.

1
2
3
4
5
6
7
ATM_Invert() - invalid BLOB
:memory: #use in-memory database
SELECT ATM_Invert(zeroblob(4))
1 # rows (not including the header row)
1 # columns
ATM_Invert(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atminvert3.testcase.

1
2
3
4
5
6
7
ATM_Invert() - invertible
:memory: #use in-memory database
SELECT ATM_IsValid(ATM_Invert(ATM_CreateScale(2,2,2)))
1 # rows (not including the header row)
1 # columns
ATM_IsValid(ATM_Invert(ATM_CreateScale(2,2,2)))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atminvert4.testcase.

1
2
3
4
5
6
7
ATM_Invert() - not invertible
:memory: #use in-memory database
SELECT ATM_Invert(ATM_Create(1,2,3,4,5,6,7,8,9,10,11,12))
1 # rows (not including the header row)
1 # columns
ATM_Invert(ATM_Create(1,2,3,4,5,6,7,8,9,10,11,12))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmisinvert1.testcase.

1
2
3
4
5
6
7
ATM_IsInvertible() - NULL arg
:memory: #use in-memory database
SELECT ATM_IsInvertible(NULL)
1 # rows (not including the header row)
1 # columns
ATM_IsInvertible(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmisinvert2.testcase.

1
2
3
4
5
6
7
ATM_IsInvertible() - invalid BLOB
:memory: #use in-memory database
SELECT ATM_IsInvertible(zeroblob(4))
1 # rows (not including the header row)
1 # columns
ATM_IsInvertible(zeroblob(4))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmisinvert3.testcase.

1
2
3
4
5
6
7
ATM_IsInvertible() - invertible
:memory: #use in-memory database
SELECT ATM_IsInvertible(ATM_CreateScale(2,2,2))
1 # rows (not including the header row)
1 # columns
ATM_IsInvertible(ATM_CreateScale(2,2,2))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmisinvert4.testcase.

1
2
3
4
5
6
7
ATM_IsInvertible() - not invertible
:memory: #use in-memory database
SELECT ATM_IsInvertible(ATM_Create(1,2,3,4,5,6,7,8,9,10,11,12))
1 # rows (not including the header row)
1 # columns
ATM_IsInvertible(ATM_Create(1,2,3,4,5,6,7,8,9,10,11,12))
0
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/atmscale1.testcase.

1
2
3
4
5
6
7
ATM_Scale() - valid (int)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(ATM_Create(), 1, 2))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(ATM_Create(), 1, 2))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Scale() - valid (int)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(1, 2, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(1, 2, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmscale10.testcase.

1
2
3
4
5
6
7
ATM_Scale() - invalid blob
:memory: #use in-memory database
SELECT ATM_Scale(zeroblob(5), 1.0, 2.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale(zeroblob(5), 1.0, 2.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - invalid blob
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 2.0, zeroblob(5))
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 2.0, zeroblob(5))
(NULL)

Changes to test/sql_stmt_tests/atmscale11.testcase.

1
2
3
4
5
6
7
ATM_Scale() - 3rd invalid blob
:memory: #use in-memory database
SELECT ATM_Scale(zeroblob(5), 1.0, 2.0, 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale(zeroblob(5), 1.0, 2.0, 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - 3rd invalid blob
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 2.0, 3.0, zeroblob(5))
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 2.0, 3.0, zeroblob(5))
(NULL)

Changes to test/sql_stmt_tests/atmscale12.testcase.

1
2
3
4
5
6
7
ATM_Scale() - invalid matrix
:memory: #use in-memory database
SELECT ATM_Scale('a', 1.0, 2.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale('a', 1.0, 2.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - invalid matrix
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 2.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 2.0, 'a')
(NULL)

Changes to test/sql_stmt_tests/atmscale13.testcase.

1
2
3
4
5
6
7
ATM_Scale() - 3rd invalid matrix
:memory: #use in-memory database
SELECT ATM_Scale('a', 1.0, 2.0, 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale('a', 1.0, 2.0, 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - 3rd invalid matrix
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 2.0, 3.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 2.0, 3.0, 'a')
(NULL)

Changes to test/sql_stmt_tests/atmscale2.testcase.

1
2
3
4
5
6
7
ATM_Scale() - valid (double)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(ATM_Create(), 1.0, 2.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(ATM_Create(), 1.0, 2.0))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Scale() - valid (double)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(1.0, 2.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(1.0, 2.0, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmscale3.testcase.

1
2
3
4
5
6
7
ATM_Scale() - invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Scale(ATM_Create(), 'a', 2.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale(ATM_Create(), 'a', 2.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Scale('a', 2.0, ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Scale('a', 2.0, ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmscale4.testcase.

1
2
3
4
5
6
7
ATM_Scale() - invalid 2st arg
:memory: #use in-memory database
SELECT ATM_Scale(ATM_Create(), 1.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Scale(ATM_Create(), 1.0, 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - invalid 2st arg
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 'a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 'a', ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmscale5.testcase.

1
2
3
4
5
6
7
ATM_Scale() - valid 3d (int)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(ATM_Create(), 1, 2, 3))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(ATM_Create(), 1, 2, 3))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000008403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Scale() - valid 3d (int)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(1, 2, 3, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(1, 2, 3, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000008403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmscale6.testcase.

1
2
3
4
5
6
7
ATM_Scale() - valid 3d (double)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(ATM_Create(), 1.0, 2.0, 3.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(ATM_Create(), 1.0, 2.0, 3.0))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000008403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Scale() - valid 3d (double)
:memory: #use in-memory database
SELECT Hex(ATM_Scale(1.0, 2.0, 3.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Scale(1.0, 2.0, 3.0, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000000403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A00000000000008403A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmscale7.testcase.

1
2
3
4
5
6
7
ATM_Scale() - 3d invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Scale(ATM_Create(), 'a', 2.0, 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale(ATM_Create(), 'a', 2.0, 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - 3d invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Scale('a', 2.0, 3.0, ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Scale('a', 2.0, 3.0, ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmscale8.testcase.

1
2
3
4
5
6
7
ATM_Scale() - 3d invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_Scale(ATM_Create(), 1.0, 'a', 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Scale(ATM_Create(), 1.0, 'a', 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - 3d invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 'a', 3.0, ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 'a', 3.0, ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmscale9.testcase.

1
2
3
4
5
6
7
ATM_Scale() - 3rd invalid 3nd arg
:memory: #use in-memory database
SELECT ATM_Scale(ATM_Create(), 1.0, 2.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Scale(ATM_Create(), 1.0, 2.0, 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Scale() - 3rd invalid 3nd arg
:memory: #use in-memory database
SELECT ATM_Scale(1.0, 2.0, 'a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Scale(1.0, 2.0, 'a', ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmtrans1.testcase.

1
2
3
4
5
6
7
ATM_Translate() - valid 2d (int)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(ATM_Create(), 1, 2))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(ATM_Create(), 1, 2))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Translate() - valid 2d (int)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(1, 2, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(1, 2, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmtrans10.testcase.

1
2
3
4
5
6
7
ATM_Translate() - invalid blob
:memory: #use in-memory database
SELECT ATM_Translate(zeroblob(10), 1.0, 2.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(zeroblob(10), 1.0, 2.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - invalid blob
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 2.0, zeroblob(10))
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 2.0, zeroblob(10))
(NULL)

Changes to test/sql_stmt_tests/atmtrans11.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 3rd arg
:memory: #use in-memory database
SELECT ATM_Translate(zeroblob(10), 1.0, 2.0, 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(zeroblob(10), 1.0, 2.0, 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 3rd arg
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 2.0, 3.0, zeroblob(10))
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 2.0, 3.0, zeroblob(10))
(NULL)

Changes to test/sql_stmt_tests/atmtrans12.testcase.

1
2
3
4
5
6
7
ATM_Translate() - invalid matrix
:memory: #use in-memory database
SELECT ATM_Translate(1, 1.0, 2.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(1, 1.0, 2.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - invalid matrix
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 2.0, 1)
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 2.0, 1)
(NULL)

Changes to test/sql_stmt_tests/atmtrans13.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid matrix
:memory: #use in-memory database
SELECT ATM_Translate(1, 1.0, 2.0, 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(1, 1.0, 2.0, 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid matrix
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 2.0, 3.0, 1)
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 2.0, 3.0, 1)
(NULL)

Changes to test/sql_stmt_tests/atmtrans2.testcase.

1
2
3
4
5
6
7
ATM_Translate() - valid 2d (double)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(ATM_Create(), 1.0, 2.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(ATM_Create(), 1.0, 2.0))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Translate() - valid 2d (double)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(1.0, 2.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(1.0, 2.0, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmtrans3.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 2d invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Translate(ATM_Create(), 'a', 2.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(ATM_Create(), 'a', 2.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 2d invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Translate('a', 2.0, ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Translate('a', 2.0, ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmtrans4.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 2d invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_Translate(ATM_Create(), 1.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Translate(ATM_Create(), 1.0, 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 2d invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 'a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 'a', ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmtrans5.testcase.

1
2
3
4
5
6
7
ATM_Translate() - valid 3d (int)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(ATM_Create(), 1, 2, 3))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(ATM_Create(), 1, 2, 3))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000008403A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Translate() - valid 3d (int)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(1, 2, 3, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(1, 2, 3, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000008403A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmtrans6.testcase.

1
2
3
4
5
6
7
ATM_Translate() - valid 3d (double)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(ATM_Create(), 1.0, 2.0, 3.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(ATM_Create(), 1.0, 2.0, 3.0))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000008403A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_Translate() - valid 3d (double)
:memory: #use in-memory database
SELECT Hex(ATM_Translate(1.0, 2.0, 3.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_Translate(1.0, 2.0, 3.0, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A000000000000F03F3A00000000000000003A00000000000000403A00000000000000003A00000000000000003A000000000000F03F3A00000000000008403A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmtrans7.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Translate(ATM_Create(), 'a', 2.0, 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(ATM_Create(), 'a', 2.0, 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 1st arg
:memory: #use in-memory database
SELECT ATM_Translate('a', 2.0, 3.0, ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Translate('a', 2.0, 3.0, ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmtrans8.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_Translate(ATM_Create(), 1.0, 'a', 3.0)
1 # rows (not including the header row)
1 # columns
ATM_Translate(ATM_Create(), 1.0, 'a', 3.0)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 'a', 3.0, ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 'a', 3.0, ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmtrans9.testcase.

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 3rd arg
:memory: #use in-memory database
SELECT ATM_Translate(ATM_Create(), 1.0, 2.0, 'a')
1 # rows (not including the header row)
1 # columns
ATM_Translate(ATM_Create(), 1.0, 2.0, 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_Translate() - 3d invalid 3rd arg
:memory: #use in-memory database
SELECT ATM_Translate(1.0, 2.0, 'a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_Translate(1.0, 2.0, 'a', ATM_Create())
(NULL)

Deleted test/sql_stmt_tests/atmtransform10.testcase.

1
2
3
4
5
6
7
ATM_Transform() - invalid Srid
:memory: #use in-memory database
SELECT AsEWKT(ATM_Transform(GeomFromText('POINT(0 0)', 32632), ATM_Create(), 32633.0));
1 # rows (not including the header row)
1 # columns
AsEWKT(ATM_Transform(GeomFromText('POINT(0 0)', 32632), ATM_Create(), 32633.0));
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/atmtransform9.testcase.

1
2
3
4
5
6
7
ATM_Transform() - 4326 Srid
:memory: #use in-memory database
SELECT AsEWKT(ATM_Transform(GeomFromText('POINT(0 0)', 32632), ATM_Create(), 32633));
1 # rows (not including the header row)
1 # columns
AsEWKT(ATM_Transform(GeomFromText('POINT(0 0)', 32632), ATM_Create(), 32633));
SRID=32633;POINT(0 0)
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/atmxroll1.testcase.

1
2
3
4
5
6
7
ATM_XRoll() - invalid angle
:memory: #use in-memory database
SELECT ATM_XRoll(ATM_Create(), 'a')
1 # rows (not including the header row)
1 # columns
ATM_XRoll(ATM_Create(), 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_XRoll() - invalid angle
:memory: #use in-memory database
SELECT ATM_XRoll('a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_XRoll('a', ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmxroll2.testcase.

1
2
3
4
5
6
7
ATM_XRoll() - valid int
:memory: #use in-memory database
SELECT Hex(ATM_XRoll(ATM_Create(), 15))
1 # rows (not including the header row)
1 # columns
Hex(ATM_XRoll(ATM_Create(), 15))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A15BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_XRoll() - valid int
:memory: #use in-memory database
SELECT Hex(ATM_XRoll(15, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_XRoll(15, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A15BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmxroll3.testcase.

1
2
3
4
5
6
7
ATM_XRoll() - valid double
:memory: #use in-memory database
SELECT Hex(ATM_XRoll(ATM_Create(), 15.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_XRoll(ATM_Create(), 15.0))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A15BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_XRoll() - valid double
:memory: #use in-memory database
SELECT Hex(ATM_XRoll(15.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_XRoll(15.0, ATM_Create()))
0001000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A15BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmxroll4.testcase.

1
2
3
4
5
6
7
ATM_XRoll() - invalid blob
:memory: #use in-memory database
SELECT ATM_XRoll(zeroblob(4), 15)
1 # rows (not including the header row)
1 # columns
ATM_XRoll(zeroblob(4), 15)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_XRoll() - invalid blob
:memory: #use in-memory database
SELECT ATM_XRoll(15, zeroblob(4))
1 # rows (not including the header row)
1 # columns
ATM_XRoll(15, zeroblob(4))
(NULL)

Changes to test/sql_stmt_tests/atmxroll5.testcase.

1
2
3
4
5
6
7
ATM_XRoll() - invalid 1st arg
:memory: #use in-memory database
SELECT ATM_XRoll('a', 15)
1 # rows (not including the header row)
1 # columns
ATM_XRoll('a', 15)
(NULL)
|

|


|

1
2
3
4
5
6
7
ATM_XRoll() - invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_XRoll(15, 'a')
1 # rows (not including the header row)
1 # columns
ATM_XRoll(15, 'a')
(NULL)

Changes to test/sql_stmt_tests/atmyroll1.testcase.

1
2
3
4
5
6
7
ATM_YRoll() - invalid angle
:memory: #use in-memory database
SELECT ATM_YRoll(ATM_Create(), 'a')
1 # rows (not including the header row)
1 # columns
ATM_YRoll(ATM_Create(), 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_YRoll() - invalid angle
:memory: #use in-memory database
SELECT ATM_YRoll('a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_YRoll('a', ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmyroll2.testcase.

1
2
3
4
5
6
7
ATM_YRoll() - valid int
:memory: #use in-memory database
SELECT Hex(ATM_YRoll(ATM_Create(), 15))
1 # rows (not including the header row)
1 # columns
Hex(ATM_YRoll(ATM_Create(), 15))
000115BF4847DDE8EE3F3A00000000000000003A900693C17D90D03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A900693C17D90D0BF3A00000000000000003A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_YRoll() - valid int
:memory: #use in-memory database
SELECT Hex(ATM_YRoll(15, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_YRoll(15, ATM_Create()))
000115BF4847DDE8EE3F3A00000000000000003A900693C17D90D03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A900693C17D90D0BF3A00000000000000003A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmyroll3.testcase.

1
2
3
4
5
6
7
ATM_YRoll() - valid double
:memory: #use in-memory database
SELECT Hex(ATM_YRoll(ATM_Create(), 15.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_YRoll(ATM_Create(), 15.0))
000115BF4847DDE8EE3F3A00000000000000003A900693C17D90D03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A900693C17D90D0BF3A00000000000000003A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_YRoll() - valid double
:memory: #use in-memory database
SELECT Hex(ATM_YRoll(15.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_YRoll(15.0, ATM_Create()))
000115BF4847DDE8EE3F3A00000000000000003A900693C17D90D03F3A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A900693C17D90D0BF3A00000000000000003A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmyroll4.testcase.

1
2
3
4
5
6
7
ATM_YRoll() - invalid blob
:memory: #use in-memory database
SELECT ATM_YRoll(zeroblob(4), 15)
1 # rows (not including the header row)
1 # columns
ATM_YRoll(zeroblob(4), 15)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_YRoll() - invalid blob
:memory: #use in-memory database
SELECT ATM_YRoll(15, zeroblob(4))
1 # rows (not including the header row)
1 # columns
ATM_YRoll(15, zeroblob(4))
(NULL)

Changes to test/sql_stmt_tests/atmyroll5.testcase.

1
2
3
4
5
6
7
ATM_YRoll() - invalid 1st arg
:memory: #use in-memory database
SELECT ATM_YRoll('a', 15)
1 # rows (not including the header row)
1 # columns
ATM_YRoll('a', 15)
(NULL)
|

|


|

1
2
3
4
5
6
7
ATM_YRoll() - invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_YRoll(15, 'a')
1 # rows (not including the header row)
1 # columns
ATM_YRoll(15, 'a')
(NULL)

Changes to test/sql_stmt_tests/atmzroll1.testcase.

1
2
3
4
5
6
7
ATM_ZRoll() - invalid angle
:memory: #use in-memory database
SELECT ATM_ZRoll(ATM_Create(), 'a')
1 # rows (not including the header row)
1 # columns
ATM_ZRoll(ATM_Create(), 'a')
(NULL)


|


|

1
2
3
4
5
6
7
ATM_ZRoll() - invalid angle
:memory: #use in-memory database
SELECT ATM_ZRoll('a', ATM_Create())
1 # rows (not including the header row)
1 # columns
ATM_ZRoll('a', ATM_Create())
(NULL)

Changes to test/sql_stmt_tests/atmzroll2.testcase.

1
2
3
4
5
6
7
ATM_ZRoll() - valid int
:memory: #use in-memory database
SELECT Hex(ATM_ZRoll(ATM_Create(), 15))
1 # rows (not including the header row)
1 # columns
Hex(ATM_ZRoll(ATM_Create(), 15))
000115BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_ZRoll() - valid int
:memory: #use in-memory database
SELECT Hex(ATM_ZRoll(15, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_ZRoll(15, ATM_Create()))
000115BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmzroll3.testcase.

1
2
3
4
5
6
7
ATM_ZRoll() - valid double
:memory: #use in-memory database
SELECT Hex(ATM_ZRoll(ATM_Create(), 15.0))
1 # rows (not including the header row)
1 # columns
Hex(ATM_ZRoll(ATM_Create(), 15.0))
000115BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3


|


|

1
2
3
4
5
6
7
ATM_ZRoll() - valid double
:memory: #use in-memory database
SELECT Hex(ATM_ZRoll(15.0, ATM_Create()))
1 # rows (not including the header row)
1 # columns
Hex(ATM_ZRoll(15.0, ATM_Create()))
000115BF4847DDE8EE3F3A900693C17D90D0BF3A00000000000000003A00000000000000003A900693C17D90D03F3A15BF4847DDE8EE3F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03F3A00000000000000003A00000000000000003A00000000000000003A00000000000000003A000000000000F03FB3

Changes to test/sql_stmt_tests/atmzroll4.testcase.

1
2
3
4
5
6
7
ATM_ZRoll() - invalid blob
:memory: #use in-memory database
SELECT ATM_ZRoll(zeroblob(4), 15)
1 # rows (not including the header row)
1 # columns
ATM_ZRoll(zeroblob(4), 15)
(NULL)


|


|

1
2
3
4
5
6
7
ATM_ZRoll() - invalid blob
:memory: #use in-memory database
SELECT ATM_ZRoll(15, zeroblob(4))
1 # rows (not including the header row)
1 # columns
ATM_ZRoll(15, zeroblob(4))
(NULL)

Changes to test/sql_stmt_tests/atmzroll5.testcase.

1
2
3
4
5
6
7
ATM_ZRoll() - invalid 1st arg
:memory: #use in-memory database
SELECT ATM_ZRoll('a', 15)
1 # rows (not including the header row)
1 # columns
ATM_ZRoll('a', 15)
(NULL)
|

|


|

1
2
3
4
5
6
7
ATM_ZRoll() - invalid 2nd arg
:memory: #use in-memory database
SELECT ATM_ZRoll(15, 'a')
1 # rows (not including the header row)
1 # columns
ATM_ZRoll(15, 'a')
(NULL)

Deleted test/sql_stmt_tests/casttoxym10.testcase.

1
2
3
4
5
6
7
casttoxyz - INT nodata
:memory: #use in-memory database
SELECT AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), -1))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), -1))
POINT M(4 3 -1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxym11.testcase.

1
2
3
4
5
6
7
casttoxyz - DOUBLE nodata
:memory: #use in-memory database
SELECT AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), -1.11))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), -1.11))
POINT M(4 3 -1.11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxym7.testcase.

1
2
3
4
5
6
7
casttoxyz - TEXT nodata
:memory: #use in-memory database
SELECT AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), 'nodata'))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), 'nodata'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxym8.testcase.

1
2
3
4
5
6
7
casttoxyz - BLOB nodata
:memory: #use in-memory database
SELECT AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), zeroblob(10)))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), zeroblob(10)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxym9.testcase.

1
2
3
4
5
6
7
casttoxyz - NULL nodata
:memory: #use in-memory database
SELECT AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), NULL))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYM(GeomFromText("POINTZ(4 3 20)"), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyz10.testcase.

1
2
3
4
5
6
7
casttoxyz - INT nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), -1))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), -1))
POINT Z(4 3 -1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyz11.testcase.

1
2
3
4
5
6
7
casttoxyz - DOUBLE nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), -1.11))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), -1.11))
POINT Z(4 3 -1.11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyz7.testcase.

1
2
3
4
5
6
7
casttoxyz - TEXT nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), 'nodata'))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), 'nodata'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyz8.testcase.

1
2
3
4
5
6
7
casttoxyz - BLOB nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), zeroblob(10)))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), zeroblob(10)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyz9.testcase.

1
2
3
4
5
6
7
casttoxyz - NULL nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), NULL))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZ(GeomFromText("POINTM(4 3 20)"), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm10.testcase.

1
2
3
4
5
6
7
casttoxyzm - INT Z nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), -1, -2.22))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), -1, -2.22))
POINT ZM(4 3 -1 20)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm11.testcase.

1
2
3
4
5
6
7
casttoxyzm - DOUBLE Z nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), -1.11, -2.22))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), -1.11, -2.22))
POINT ZM(4 3 -1.11 20)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm12.testcase.

1
2
3
4
5
6
7
casttoxyzm - NULL M nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, NULL))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm13.testcase.

1
2
3
4
5
6
7
casttoxyzm - TEXT M nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, 'nodata'))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, 'nodata'))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm14.testcase.

1
2
3
4
5
6
7
casttoxyzm - BLOB M nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, zeroblob(4)))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, zeroblob(4)))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm15.testcase.

1
2
3
4
5
6
7
casttoxyzm - INT M nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, -2))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, -2))
POINT ZM(4 3 20 -2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm16.testcase.

1
2
3
4
5
6
7
casttoxyzm - DOUBLE M nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, -2.22))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTZ(4 3 20)"), -1.11, -2.22))
POINT ZM(4 3 20 -2.22)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm7.testcase.

1
2
3
4
5
6
7
casttoxyzm - NULL Z nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), NULL, -2.22))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), NULL, -2.22))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm8.testcase.

1
2
3
4
5
6
7
casttoxyzm - TEXT Z nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), 'nodata', -2.22))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), 'nodata', -2.22))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/casttoxyzm9.testcase.

1
2
3
4
5
6
7
casttoxyzm - BLOB Z nodata
:memory: #use in-memory database
SELECT AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), zeroblob(4), -2.22))
1 # rows (not including the header row)
1 # columns
AsText(CastToXYZM(GeomFromText("POINTM(4 3 20)"), zeroblob(4), -2.22))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/checkspatialmetadata6.testcase.

1
2
3
4
5
6
7
checkspatialmetadata
:memory: #use in-memory database
SELECT CheckSpatialMetaData('main')
1 # rows (not including the header row)
1 # columns
CheckSpatialMetaData('main')
3
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/checkspatialmetadata7.testcase.

1
2
3
4
5
6
7
checkspatialmetadata
:memory: #use in-memory database
SELECT CheckSpatialMetaData(1)
1 # rows (not including the header row)
1 # columns
CheckSpatialMetaData(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/checkspatialmetadata8.testcase.

1
2
3
4
5
6
7
checkspatialmetadata - FDO
sql_stmt_tests/fdo-wkb.sqlite_RO #use special test database, read only
SELECT CheckSpatialMetaData('main')
1 # rows (not including the header row)
1 # columns
CheckSpatialMetaData('main')
2
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/collect10.testcase.

1
2
3
4
5
6
7
8
collect - Point, PointM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTM(4 5 3.2)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTM(4 5 3.2)")))
MULTIPOINT(1 2, 4 5)







|

1
2
3
4
5
6
7
8
collect - Point, PointM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTM(4 5 3.2)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTM(4 5 3.2)")))
MULTIPOINT M(1 2 0, 4 5 3.2)

Changes to test/sql_stmt_tests/collect11.testcase.

1
2
3
4
5
6
7
8
collect - Point, PointZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZM(4 5 3.2 6)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZM(4 5 3.2 6)")))
MULTIPOINT(1 2, 4 5)







|

1
2
3
4
5
6
7
8
collect - Point, PointZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZM(4 5 3.2 6)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZM(4 5 3.2 6)")))
MULTIPOINT ZM(1 2 0 0, 4 5 3.2 6)

Changes to test/sql_stmt_tests/collect13.testcase.

1
2
3
4
5
6
7
8
collect - PointZ, PointM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTM(1 2 6)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTM(1 2 6)")))
MULTIPOINT Z(4 5 3.2, 1 2 0)







|

1
2
3
4
5
6
7
8
collect - PointZ, PointM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTM(1 2 6)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTM(1 2 6)")))
MULTIPOINT ZM(4 5 3.2 0, 1 2 0 6)

Changes to test/sql_stmt_tests/collect14.testcase.

1
2
3
4
5
6
7
8
collect - PointZ, PointZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")))
MULTIPOINT Z(4 5 3.2, 1 2 6)







|

1
2
3
4
5
6
7
8
collect - PointZ, PointZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTZ(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")))
MULTIPOINT ZM(4 5 3.2 0, 1 2 6 4)

Changes to test/sql_stmt_tests/collect15.testcase.

1
2
3
4
5
6
7
8
collect - PointM, PointZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")))
MULTIPOINT M(4 5 3.2, 1 2 4)







|

1
2
3
4
5
6
7
8
collect - PointM, PointZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZM(1 2 6 4)")))
MULTIPOINT ZM(4 5 0 3.2, 1 2 6 4)

Changes to test/sql_stmt_tests/collect17.testcase.

1
2
3
4
5
6
7
8
collect - PointM, PointZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZ(1 2 6)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZ(1 2 6)")))
MULTIPOINT M(4 5 3.2, 1 2 0)







|

1
2
3
4
5
6
7
8
collect - PointM, PointZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZ(1 2 6)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINTM(4 5 3.2)"), GeomFromText("POINTZ(1 2 6)")))
MULTIPOINT ZM(4 5 0 3.2, 1 2 6 0)

Changes to test/sql_stmt_tests/collect24.testcase.

1
2
3
4
5
6
7

collect - LineString, LineStringZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZM(4 5 3.2 6, 1 2 4.6 8, 4 2 3.1 9)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZM(4 5 3.2 6, 1 2 4.6 8, 4 2 3.1 9)")))
MULTILINESTRING((1 2, 3 4), (4 5, 1 2, 4 2))







|
>
1
2
3
4
5
6
7
8
collect - LineString, LineStringZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZM(4 5 3.2 6, 1 2 4.6 8, 4 2 3.1 9)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZM(4 5 3.2 6, 1 2 4.6 8, 4 2 3.1 9)")))
MULTILINESTRING ZM((1 2 0 0, 3 4 0 0), (4 5 3.2 6, 1 2 4.6 8, 4 2 3.1 9))

Changes to test/sql_stmt_tests/collect25.testcase.

1
2
3
4
5
6
7

collect - LineString, LineStringZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING((1 2, 3 4), (4 5, 1 2, 4 2))







|
>
1
2
3
4
5
6
7
8
collect - LineString, LineStringZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING Z((1 2 0, 3 4 0), (4 5 3.2, 1 2 4.6, 4 2 3.1))

Changes to test/sql_stmt_tests/collect26.testcase.

1
2
3
4
5
6
7

collect - LineString, LineStringM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGM(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGM(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING((1 2, 3 4), (4 5, 1 2, 4 2))







|
>
1
2
3
4
5
6
7
8
collect - LineString, LineStringM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGM(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("Linestring(1 2, 3 4)"), GeomFromText("LINESTRINGM(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING M((1 2 0, 3 4 0), (4 5 3.2, 1 2 4.6, 4 2 3.1))

Changes to test/sql_stmt_tests/collect28.testcase.

1
2
3
4
5
6
7

collect - LineStringZ, LineStringZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING Z((1 2 4, 3 4 2), (4 5 3.2, 1 2 4.6, 4 2 3.1))








>
1
2
3
4
5
6
7
8
collect - LineStringZ, LineStringZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING Z((1 2 4, 3 4 2), (4 5 3.2, 1 2 4.6, 4 2 3.1))

Changes to test/sql_stmt_tests/collect29.testcase.

1
2
3
4
5
6
7

collect - LineStringZ, LineStringZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")))
MULTILINESTRING Z((1 2 4, 3 4 2), (4 5 3.2, 1 2 4.6, 4 2 3.1))







|
>
1
2
3
4
5
6
7
8
collect - LineStringZ, LineStringZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")))
MULTILINESTRING ZM((1 2 4 0, 3 4 2 0), (4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3))

Changes to test/sql_stmt_tests/collect30.testcase.

1
2
3
4
5
6
7

collect - LineStringZ, LineStringM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGM(4 5 1, 1 2 2, 4 2 3)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGM(4 5 1, 1 2 2, 4 2 3)")))
MULTILINESTRING Z((1 2 4, 3 4 2), (4 5 0, 1 2 0, 4 2 0))







|
>
1
2
3
4
5
6
7
8
collect - LineStringZ, LineStringM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGM(4 5 1, 1 2 2, 4 2 3)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGZ(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGM(4 5 1, 1 2 2, 4 2 3)")))
MULTILINESTRING ZM((1 2 4 0, 3 4 2 0), (4 5 0 1, 1 2 0 2, 4 2 0 3))

Changes to test/sql_stmt_tests/collect34.testcase.

1
2
3
4
5
6
7

collect - LineStringM, LineStringZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")))
MULTILINESTRING M((1 2 4, 3 4 2), (4 5 1, 1 2 2, 4 2 3))







|
>
1
2
3
4
5
6
7
8
collect - LineStringM, LineStringZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZM(4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3)")))
MULTILINESTRING ZM((1 2 0 4, 3 4 0 2), (4 5 3.2 1, 1 2 4.6 2, 4 2 3.1 3))

Changes to test/sql_stmt_tests/collect35.testcase.

1
2
3
4
5
6
7

collect - LineStringM, LineStringZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING M((1 2 4, 3 4 2), (4 5 0, 1 2 0, 4 2 0))







|
>
1
2
3
4
5
6
7
8
collect - LineStringM, LineStringZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("LINESTRINGM(1 2 4, 3 4 2)"), GeomFromText("LINESTRINGZ(4 5 3.2, 1 2 4.6, 4 2 3.1)")))
MULTILINESTRING ZM((1 2 0 4, 3 4 0 2), (4 5 3.2 0, 1 2 4.6 0, 4 2 3.1 0))

Changes to test/sql_stmt_tests/collect41.testcase.

1
2
3
4
5
6
7

collect - PolygonZ, PolygonZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
MULTIPOLYGON Z(((1 2 4, 3 4 2, 3 2 3, 1 2 4), (1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4)), ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2), (2 3 4, 3 4 1, 3 3 1, 2 3 4)))







|
>
1
2
3
4
5
6
7
8
collect - PolygonZ, PolygonZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
MULTIPOLYGON ZM(((1 2 4 0, 3 4 2 0, 3 2 3 0, 1 2 4 0), (1.5 2.5 4 0, 2.5 3.5 3 0, 2.5 2.3 3 0, 1.5 2.5 4 0)), ((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4), (2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1)))

Changes to test/sql_stmt_tests/collect42.testcase.

1
2
3
4
5
6
7

collect - PolygonZ, PolygonM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONM((4 5 4, 1 2 5, 4 2 3, 4 5 4),(2 3 1, 3 4 2, 3 3 3, 2 3 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONM((4 5 4, 1 2 5, 4 2 3, 4 5 4),(2 3 1, 3 4 2, 3 3 3, 2 3 1))")))
MULTIPOLYGON Z(((1 2 4, 3 4 2, 3 2 3, 1 2 4), (1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4)), ((4 5 0, 1 2 0, 4 2 0, 4 5 0), (2 3 0, 3 4 0, 3 3 0, 2 3 0)))







|
>
1
2
3
4
5
6
7
8
collect - PolygonZ, PolygonM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONM((4 5 4, 1 2 5, 4 2 3, 4 5 4),(2 3 1, 3 4 2, 3 3 3, 2 3 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONZ((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONM((4 5 4, 1 2 5, 4 2 3, 4 5 4),(2 3 1, 3 4 2, 3 3 3, 2 3 1))")))
MULTIPOLYGON ZM(((1 2 4 0, 3 4 2 0, 3 2 3 0, 1 2 4 0), (1.5 2.5 4 0, 2.5 3.5 3 0, 2.5 2.3 3 0, 1.5 2.5 4 0)), ((4 5 0 4, 1 2 0 5, 4 2 0 3, 4 5 0 4), (2 3 0 1, 3 4 0 2, 3 3 0 3, 2 3 0 1)))

Changes to test/sql_stmt_tests/collect44.testcase.

1
2
3
4
5
6
7

collect - Polygon, PolygonZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")))
MULTIPOLYGON(((1 2, 3 4, 3 2, 1 2), (1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5)), ((4 5, 1 2, 4 2, 4 5), (2 3, 3 4, 3 3, 2 3)))







|
>
1
2
3
4
5
6
7
8
collect - Polygon, PolygonZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")))
MULTIPOLYGON ZM(((1 2 0 0, 3 4 0 0, 3 2 0 0, 1 2 0 0), (1.5 2.5 0 0, 2.5 3.5 0 0, 2.5 2.3 0 0, 1.5 2.5 0 0)), ((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4), (2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1)))

Changes to test/sql_stmt_tests/collect45.testcase.

1
2
3
4
5
6
7

collect - Polygon, PolygonZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")))
MULTIPOLYGON(((1 2, 3 4, 3 2, 1 2), (1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5)), ((4 5, 1 2, 4 2, 4 5), (2 3, 3 4, 3 3, 2 3)))







|
>
1
2
3
4
5
6
7
8
collect - Polygon, PolygonZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")))
MULTIPOLYGON Z(((1 2 0, 3 4 0, 3 2 0, 1 2 0), (1.5 2.5 0, 2.5 3.5 0, 2.5 2.3 0, 1.5 2.5 0)), ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2), (2 3 4, 3 4 1, 3 3 1, 2 3 4)))

Changes to test/sql_stmt_tests/collect46.testcase.

1
2
3
4
5
6
7

collect - Polygon, PolygonM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONM((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONM((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")))
MULTIPOLYGON(((1 2, 3 4, 3 2, 1 2), (1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5)), ((4 5, 1 2, 4 2, 4 5), (2 3, 3 4, 3 3, 2 3)))







|
>
1
2
3
4
5
6
7
8
collect - Polygon, PolygonM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONM((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGON((1 2, 3 4, 3 2, 1 2),(1.5 2.5, 2.5 3.5, 2.5 2.3, 1.5 2.5))"), GeomFromText("POLYGONM((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")))
MULTIPOLYGON M(((1 2 0, 3 4 0, 3 2 0, 1 2 0), (1.5 2.5 0, 2.5 3.5 0, 2.5 2.3 0, 1.5 2.5 0)), ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2), (2 3 4, 3 4 1, 3 3 1, 2 3 4)))

Changes to test/sql_stmt_tests/collect48.testcase.

1
2
3
4
5
6
7

collect - PolygonM, PolygonZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
MULTIPOLYGON M(((1 2 4, 3 4 2, 3 2 3, 1 2 4), (1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4)), ((4 5 4, 1 2 5, 4 2 3, 4 5 4), (2 3 1, 3 4 2, 3 3 3, 2 3 1)))







|
>
1
2
3
4
5
6
7
8
collect - PolygonM, PolygonZM
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZM((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4),(2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1))")));
MULTIPOLYGON ZM(((1 2 0 4, 3 4 0 2, 3 2 0 3, 1 2 0 4), (1.5 2.5 0 4, 2.5 3.5 0 3, 2.5 2.3 0 3, 1.5 2.5 0 4)), ((4 5 3.2 4, 1 2 4.6 5, 4 2 3.1 3, 4 5 3.2 4), (2 3 4 1, 3 4 1 2, 3 3 1 3, 2 3 4 1)))

Changes to test/sql_stmt_tests/collect49.testcase.

1
2
3
4
5
6
7

collect - PolygonM, PolygonZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")))
MULTIPOLYGON M(((1 2 4, 3 4 2, 3 2 3, 1 2 4), (1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4)), ((4 5 0, 1 2 0, 4 2 0, 4 5 0), (2 3 0, 3 4 0, 3 3 0, 2 3 0)))







|
>
1
2
3
4
5
6
7
8
collect - PolygonM, PolygonZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POLYGONM((1 2 4, 3 4 2, 3 2 3, 1 2 4),(1.5 2.5 4, 2.5 3.5 3, 2.5 2.3 3, 1.5 2.5 4))"), GeomFromText("POLYGONZ((4 5 3.2, 1 2 4.6, 4 2 3.1, 4 5 3.2),(2 3 4, 3 4 1, 3 3 1, 2 3 4))")))
MULTIPOLYGON ZM(((1 2 0 4, 3 4 0 2, 3 2 0 3, 1 2 0 4), (1.5 2.5 0 4, 2.5 3.5 0 3, 2.5 2.3 0 3, 1.5 2.5 0 4)), ((4 5 3.2 0, 1 2 4.6 0, 4 2 3.1 0, 4 5 3.2 0), (2 3 4 0, 3 4 1 0, 3 3 1 0, 2 3 4 0)))

Changes to test/sql_stmt_tests/collect9.testcase.

1
2
3
4
5
6
7

collect - Point, PointZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZ(4 5 3.2)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZ(4 5 3.2)")))
MULTIPOINT(1 2, 4 5)







|
>
1
2
3
4
5
6
7
8
collect - Point, PointZ
:memory: #use in-memory database
SELECT AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZ(4 5 3.2)")));
1 # rows (not including the header row)
1 # columns
AsText(COLLECT(GeomFromText("POINT(1 2)"), GeomFromText("POINTZ(4 5 3.2)")))
MULTIPOINT Z(1 2 0, 4 5 3.2)

Deleted test/sql_stmt_tests/createclonetable1.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL db-prefix
:memory: #use in-memory database
SELECT CreateClonedTable(NULL, 'in_table', 'out_table', 1)
1 # rows (not including the header row)
1 # columns
CreateClonedTable(NULL, 'in_table', 'out_table', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable10.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #6
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable11.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #7
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable12.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #8
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable13.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #9
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable14.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #10
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable15.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - not existing input
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', 'opt10')
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', 'opt10')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable2.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL input-table
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', NULL, 'out_table', 1)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', NULL, 'out_table', 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable3.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL output-table
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', NULL, 1)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', NULL, 1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable4.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL transaction
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable5.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #1
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable6.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #2
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable7.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #3
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', 'option-2', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', 'option-2', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable8.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #4
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', 'option-2', 'opt3', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', 'option-2', 'opt3', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/createclonetable9.testcase.

1
2
3
4
5
6
7
CreateClonedTable() - NULL option #5
:memory: #use in-memory database
SELECT CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', 'option-2', 'opt3', 'opt4', NULL)
1 # rows (not including the header row)
1 # columns
CreateClonedTable('prefix', 'in_table', 'out_table', 1, 'option-1', 'option-2', 'opt3', 'opt4', NULL)
(NULL)
<
<
<
<
<
<
<














Added test/sql_stmt_tests/createvectorcoverages.testcase.

















>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
CreateVectorsCoveragesTables
NEW:memory: #use in-memory database
SELECT CreateVectorCoveragesTables();
1 # rows (not including the header row)
1 # columns
CreateVectorCoveragesTables()
1

Deleted test/sql_stmt_tests/datalic_register1.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - NULL license
:memory: #use in-memory database
SELECT RegisterDataLicense(NULL)
1 # rows (not including the header row)
1 # columns
RegisterDataLicense(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register10.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - Text url
:memory: #use in-memory database
SELECT RegisterDataLicense('alicense', 'anurl')
1 # rows (not including the header row)
1 # columns
RegisterDataLicense('alicense', 'anurl')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register2.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - Int license
:memory: #use in-memory database
SELECT RegisterDataLicense(1)
1 # rows (not including the header row)
1 # columns
RegisterDataLicense(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register3.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - Double license
:memory: #use in-memory database
SELECT RegisterDataLicense(1.6)
1 # rows (not including the header row)
1 # columns
RegisterDataLicense(1.6)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register4.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - BLOB license
:memory: #use in-memory database
SELECT RegisterDataLicense(zeroblob(10))
1 # rows (not including the header row)
1 # columns
RegisterDataLicense(zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register5.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - Text license
:memory: #use in-memory database
SELECT RegisterDataLicense('some license')
1 # rows (not including the header row)
1 # columns
RegisterDataLicense('some license')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register6.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - NULL url
:memory: #use in-memory database
SELECT RegisterDataLicense('some license', NULL)
1 # rows (not including the header row)
1 # columns
RegisterDataLicense('some license', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register7.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - Int url
:memory: #use in-memory database
SELECT RegisterDataLicense('some license', 1)
1 # rows (not including the header row)
1 # columns
RegisterDataLicense('some license', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register8.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - Double url
:memory: #use in-memory database
SELECT RegisterDataLicense('some license', 1.5)
1 # rows (not including the header row)
1 # columns
RegisterDataLicense('some license', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_register9.testcase.

1
2
3
4
5
6
7
RegisterDataLicense() - BLOB url
:memory: #use in-memory database
SELECT RegisterDataLicense('some license', zeroblob(4))
1 # rows (not including the header row)
1 # columns
RegisterDataLicense('some license', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename1.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - NULL license
:memory: #use in-memory database
SELECT RenameDataLicense(NULL, 'new')
1 # rows (not including the header row)
1 # columns
RenameDataLicense(NULL, 'new')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename2.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - Int old-name
:memory: #use in-memory database
SELECT RenameDataLicense(1, 'new')
1 # rows (not including the header row)
1 # columns
RenameDataLicense(1, 'new')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename3.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - Double old-name
:memory: #use in-memory database
SELECT RenameDataLicense(1.6, 'new')
1 # rows (not including the header row)
1 # columns
RenameDataLicense(1.6, 'new')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename4.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - BLOB old-name
:memory: #use in-memory database
SELECT RenameDataLicense(zeroblob(10), 'new')
1 # rows (not including the header row)
1 # columns
RenameDataLicense(zeroblob(10), 'new')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename5.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - valid args
:memory: #use in-memory database
SELECT RenameDataLicense('old', 'new')
1 # rows (not including the header row)
1 # columns
RenameDataLicense('old', 'new')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename6.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - NULL new-name
:memory: #use in-memory database
SELECT RenameDataLicense('old', NULL)
1 # rows (not including the header row)
1 # columns
RenameDataLicense('old', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename7.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - Int new-name
:memory: #use in-memory database
SELECT RenameDataLicense('old', 1)
1 # rows (not including the header row)
1 # columns
RenameDataLicense('old', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename8.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - Double new-name
:memory: #use in-memory database
SELECT RenameDataLicense('old', 1.5)
1 # rows (not including the header row)
1 # columns
RenameDataLicense('old', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_rename9.testcase.

1
2
3
4
5
6
7
RenameDataLicense() - BLOB new-name
:memory: #use in-memory database
SELECT RenameDataLicense('old', zeroblob(4))
1 # rows (not including the header row)
1 # columns
RenameDataLicense('old', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl1.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - NULL license
:memory: #use in-memory database
SELECT SetDataLicenseUrl(NULL, 'anurl')
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl(NULL, 'anurl')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl2.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - Int license
:memory: #use in-memory database
SELECT SetDataLicenseUrl(1, 'anurl')
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl(1, 'anurl')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl3.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - Double license
:memory: #use in-memory database
SELECT SetDataLicenseUrl(1.6, 'anurl')
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl(1.6, 'anurl')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl4.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - BLOB license
:memory: #use in-memory database
SELECT SetDataLicenseUrl(zeroblob(10), 'anurl')
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl(zeroblob(10), 'anurl')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl5.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - valid args
:memory: #use in-memory database
SELECT SetDataLicenseUrl('license x', 'anurl')
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl('license x', 'anurl')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl6.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - NULL url
:memory: #use in-memory database
SELECT SetDataLicenseUrl('some license', NULL)
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl('some license', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl7.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - Int url
:memory: #use in-memory database
SELECT SetDataLicenseUrl('some license', 1)
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl('some license', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl8.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - Double url
:memory: #use in-memory database
SELECT SetDataLicenseUrl('some license', 1.5)
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl('some license', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_seturl9.testcase.

1
2
3
4
5
6
7
SetDataLicenseUrl() - BLOB url
:memory: #use in-memory database
SELECT SetDataLicenseUrl('some license', zeroblob(4))
1 # rows (not including the header row)
1 # columns
SetDataLicenseUrl('some license', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_unregister1.testcase.

1
2
3
4
5
6
7
UnRegisterDataLicense() - NULL license
:memory: #use in-memory database
SELECT UnRegisterDataLicense(NULL)
1 # rows (not including the header row)
1 # columns
UnRegisterDataLicense(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_unregister2.testcase.

1
2
3
4
5
6
7
UnRegisterDataLicense() - Int license
:memory: #use in-memory database
SELECT UnRegisterDataLicense(1)
1 # rows (not including the header row)
1 # columns
UnRegisterDataLicense(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_unregister3.testcase.

1
2
3
4
5
6
7
UnRegisterDataLicense() - Double license
:memory: #use in-memory database
SELECT UnRegisterDataLicense(1.6)
1 # rows (not including the header row)
1 # columns
UnRegisterDataLicense(1.6)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_unregister4.testcase.

1
2
3
4
5
6
7
UnRegisterDataLicense() - BLOB license
:memory: #use in-memory database
SELECT UnRegisterDataLicense(zeroblob(10))
1 # rows (not including the header row)
1 # columns
UnRegisterDataLicense(zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/datalic_unregister5.testcase.

1
2
3
4
5
6
7
UnRegisterDataLicense() - Text license
:memory: #use in-memory database
SELECT UnRegisterDataLicense('wowlicense')
1 # rows (not including the header row)
1 # columns
UnRegisterDataLicense('wowlicense')
1
<
<
<
<
<
<
<














Added test/sql_stmt_tests/decodeurl1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
DecodeURL - NULL
:memory: #use in-memory database
SELECT DecodeURL(NULL);
1 # rows (not including the header row)
1 # columns
DecodeURL(NULL)
(NULL)

Added test/sql_stmt_tests/decodeurl2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
DecodeURL - INT
:memory: #use in-memory database
SELECT DecodeURL(1);
1 # rows (not including the header row)
1 # columns
DecodeURL(1)
(NULL)

Added test/sql_stmt_tests/decodeurl3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
DecodeURL - DOUBLE
:memory: #use in-memory database
SELECT DecodeURL(1.5);
1 # rows (not including the header row)
1 # columns
DecodeURL(1.5)
(NULL)

Added test/sql_stmt_tests/decodeurl4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
DecodeURL - BLOB
:memory: #use in-memory database
SELECT DecodeURL(zeroblob(4));
1 # rows (not including the header row)
1 # columns
DecodeURL(zeroblob(4))
(NULL)

Added test/sql_stmt_tests/decodeurl5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
DecodeURL - valid
:memory: #use in-memory database
SELECT DecodeURL('http://www.acme.it/search?q1=C+%26+opeator&q2=C%2b%2b+%2a+operator');
1 # rows (not including the header row)
1 # columns
DecodeURL('http://www.acme.it/search?q1=C+%26+opeator&q2=C%2b%2b+%2a+operator')
http://www.acme.it/search?q1=C & opeator&q2=C++ * operator

Deleted test/sql_stmt_tests/dropgeo6.testcase.

1
2
3
4
5
6
7
DropGeoTable - prefix, table (not existing) - NULL transaction
:memory: #use in-memory database
SELECT DropGeoTable('prefix', 'table', NULL);
1 # rows (not including the header row)
1 # columns
DropGeoTable('prefix', 'table', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/dropgeo7.testcase.

1
2
3
4
5
6
7
DropGeoTable - prefix, table (not existing) + transaction
:memory: #use in-memory database
SELECT DropGeoTable('prefix', 'table', 0);
1 # rows (not including the header row)
1 # columns
DropGeoTable('prefix', 'table', 0)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/dropgeo8.testcase.

1
2
3
4
5
6
7
DropGeoTable - table (not existing) - NULL transaction
:memory: #use in-memory database
SELECT DropGeoTable('table', NULL);
1 # rows (not including the header row)
1 # columns
DropGeoTable('table', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/dropgeo9.testcase.

1
2
3
4
5
6
7
DropGeoTable - table (not existing) + transaction
:memory: #use in-memory database
SELECT DropGeoTable('table', 0);
1 # rows (not including the header row)
1 # columns
DropGeoTable('table', 0)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo10.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #2
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo11.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #3
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo12.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #4
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo13.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #5
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo14.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #6
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo15.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #7
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo16.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #8
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo17.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #9
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo18.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #10
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo19.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - all options
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', 'opt10');
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, 'opt1', 'opt2', 'opt3', 'opt4', 'opt5', 'opt6', 'opt7', 'opt8', 'opt9', 'opt10')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo7.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL transaction
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo8.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - not existing table + transaction
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 0);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/elemgeo9.testcase.

1
2
3
4
5
6
7
ElementaryGeometries() - NULL option #1
:memory: #use in-memory database
SELECT ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, NULL);
1 # rows (not including the header row)
1 # columns
ElementaryGeometries('in_table', 'geom', 'out_table', 'id', 'old_id', 1, NULL)
(NULL)
<
<
<
<
<
<
<














Added test/sql_stmt_tests/encodeurl1.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
EncodeURL - NULL
:memory: #use in-memory database
SELECT EncodeURL(NULL);
1 # rows (not including the header row)
1 # columns
EncodeURL(NULL)
(NULL)

Added test/sql_stmt_tests/encodeurl2.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
EncodeURL - INT
:memory: #use in-memory database
SELECT EncodeURL(1);
1 # rows (not including the header row)
1 # columns
EncodeURL(1)
(NULL)

Added test/sql_stmt_tests/encodeurl3.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
EncodeURL - DOUBLE
:memory: #use in-memory database
SELECT EncodeURL(1.5);
1 # rows (not including the header row)
1 # columns
EncodeURL(1.5)
(NULL)

Added test/sql_stmt_tests/encodeurl4.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
EncodeURL - BLOB
:memory: #use in-memory database
SELECT EncodeURL(zeroblob(4));
1 # rows (not including the header row)
1 # columns
EncodeURL(zeroblob(4))
(NULL)

Added test/sql_stmt_tests/encodeurl5.testcase.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
EncodeURL - valid
:memory: #use in-memory database
SELECT EncodeURL('C++ * operator');
1 # rows (not including the header row)
1 # columns
EncodeURL('C++ * operator')
C%2b%2b+%2a+operator

Deleted test/sql_stmt_tests/ensureclosedrings1.testcase.

1
2
3
4
5
6
7
EnsureClosedRings NULL Geometry
:memory: #use in-memory database
SELECT EnsureClosedRings(NULL);
1 # rows (not including the header row)
1 # columns
EnsureClosedRings(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings10.testcase.

1
2
3
4
5
6
7
EnsureClosedRings Double Geometry
:memory: #use in-memory database
SELECT EnsureClosedRings(1.5);
1 # rows (not including the header row)
1 # columns
EnsureClosedRings(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings2.testcase.

1
2
3
4
5
6
7
EnsureClosedRings Int Geometry
:memory: #use in-memory database
SELECT EnsureClosedRings(1);
1 # rows (not including the header row)
1 # columns
EnsureClosedRings(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings3.testcase.

1
2
3
4
5
6
7
EnsureClosedRings Text Geometry
:memory: #use in-memory database
SELECT EnsureClosedRings('geom');
1 # rows (not including the header row)
1 # columns
EnsureClosedRings('geom')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings4.testcase.

1
2
3
4
5
6
7
EnsureClosedRings Invalid BLOB Geometry
:memory: #use in-memory database
SELECT EnsureClosedRings(zeroblob(100));
1 # rows (not including the header row)
1 # columns
EnsureClosedRings(zeroblob(100))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings5.testcase.

1
2
3
4
5
6
7
EnsureClosedRings Valid GeometryCollection
:memory: #use in-memory database
SELECT AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326)))
GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings6.testcase.

1
2
3
4
5
6
7
EnsureClosedRings GeometryCollection with unclosed Rings
:memory: #use in-memory database
SELECT AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100), (60 60, 80 60, 80 80, 60 80)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100), (60 60, 80 60, 80 80, 60 80)))', 4326)))
GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings7.testcase.

1
2
3
4
5
6
7
EnsureClosedRings GeometryCollection with unclosed Rings (XYZ)
:memory: #use in-memory database
SELECT AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(1 1 1), LINESTRINGZ(10 10 2, 40 40 3), POLYGONZ((50 50 1, 100 50 2, 100 100 3, 50 100 4), (60 60 5, 80 60 6 , 80 80 7, 60 80 8)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(1 1 1), LINESTRINGZ(10 10 2, 40 40 3), POLYGONZ((50 50 1, 100 50 2, 100 100 3, 50 100 4), (60 60 5, 80 60 6 , 80 80 7, 60 80 8)))', 4326)))
GEOMETRYCOLLECTION Z(POINT Z(1 1 1), LINESTRING Z(10 10 2, 40 40 3), POLYGON Z((50 50 1, 100 50 2, 100 100 3, 50 100 4, 50 50 1), (60 60 5, 80 60 6, 80 80 7, 60 80 8, 60 60 5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings8.testcase.

1
2
3
4
5
6
7
EnsureClosedRings GeometryCollection with unclosed Rings (XYM)
:memory: #use in-memory database
SELECT AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(1 1 1), LINESTRINGM(10 10 2, 40 40 3), POLYGONM((50 50 1, 100 50 2, 100 100 3, 50 100 4), (60 60 5, 80 60 6 , 80 80 7, 60 80 8)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(1 1 1), LINESTRINGM(10 10 2, 40 40 3), POLYGONM((50 50 1, 100 50 2, 100 100 3, 50 100 4), (60 60 5, 80 60 6 , 80 80 7, 60 80 8)))', 4326)))
GEOMETRYCOLLECTION M(POINT M(1 1 1), LINESTRING M(10 10 2, 40 40 3), POLYGON M((50 50 1, 100 50 2, 100 100 3, 50 100 4, 50 50 1), (60 60 5, 80 60 6, 80 80 7, 60 80 8, 60 60 5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ensureclosedrings9.testcase.

1
2
3
4
5
6
7
EnsureClosedRings GeometryCollection with unclosed Rings (XYZM)
:memory: #use in-memory database
SELECT AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(1 1 1 2), LINESTRINGZM(10 10 2 3, 40 40 3 4), POLYGONZM((50 50 1 2, 100 50 2 3, 100 100 3 4, 50 100 4 5), (60 60 5 6, 80 60 6 7, 80 80 7 8, 60 80 8 9)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(EnsureClosedRings(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(1 1 1 2), LINESTRINGZM(10 10 2 3, 40 40 3 4), POLYGONZM((50 50 1 2, 100 50 2 3, 100 100 3 4, 50 100 4 5), (60 60 5 6, 80 60 6 7, 80 80 7 8, 60 80 8 9)))', 4326)))
GEOMETRYCOLLECTION ZM(POINT ZM(1 1 1 2), LINESTRING ZM(10 10 2 3, 40 40 3 4), POLYGON ZM((50 50 1 2, 100 50 2 3, 100 100 3 4, 50 100 4 5, 50 50 1 2), (60 60 5 6, 80 60 6 7, 80 80 7 8, 60 80 8 9, 60 60 5 6)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fdo_ogr3.testcase.

1
2
3
4
5
6
7
FDO_OGR3
:memory: #use in-memory database
SELECT AutoFDOStart('a')
1 # rows (not including the header row)
1 # columns
AutoFDOStart('a')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fdo_ogr4.testcase.

1
2
3
4
5
6
7
FDO_OGR4
:memory: #use in-memory database
SELECT AutoFDOStart(1)
1 # rows (not including the header row)
1 # columns
AutoFDOStart(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fdo_ogr5.testcase.

1
2
3
4
5
6
7
FDO_OGR5
:memory: #use in-memory database
SELECT AutoFDOStop('a')
1 # rows (not including the header row)
1 # columns
AutoFDOStop('a')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fdo_ogr6.testcase.

1
2
3
4
5
6
7
FDO_OGR6
:memory: #use in-memory database
SELECT AutoFDOStop(1)
1 # rows (not including the header row)
1 # columns
AutoFDOStop(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fdo_ogr7.testcase.

1
2
3
4
5
6
7
FDO_OGR7
:memory: #use in-memory database
SELECT AutoFDOStart(NULL)
1 # rows (not including the header row)
1 # columns
AutoFDOStart(NULL)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fdo_ogr8.testcase.

1
2
3
4
5
6
7
FDO_OGR8
:memory: #use in-memory database
SELECT AutoFDOStop(NULL)
1 # rows (not including the header row)
1 # columns
AutoFDOStop(NULL)
0
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/fromWkb1.testcase.

1
2
3
4
5
6
7

fromWkb 
:memory: #use in-memory database
SELECT AsText(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
1 # rows (not including the header row)
1 # columns
AsText(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
POINT(1 2)



|


|
|
>
1
2
3
4
5
6
7
8
fromWkb 
:memory: #use in-memory database
SELECT Hex(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
1 # rows (not including the header row)
1 # columns
Hex(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
000100000000000000000000F03F0000000000000040000000000000F03F00000000000000407C01000000000000000000F03F0000000000000040FE

Changes to test/sql_stmt_tests/fromWkb13.testcase.

1
2
3
4
5
6
7
fromWkb - POINT, 2 arg
:memory: #use in-memory database
SELECT AsText(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
1 # rows (not including the header row)
1 # columns
AsText(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
POINT(1 2)


|


|
|
1
2
3
4
5
6
7
fromWkb - POINT, 2 arg
:memory: #use in-memory database
SELECT Hex(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
1 # rows (not including the header row)
1 # columns
Hex(GeomFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
0001E6100000000000000000F03F0000000000000040000000000000F03F00000000000000407C01000000000000000000F03F0000000000000040FE

Changes to test/sql_stmt_tests/fromWkb14.testcase.

1
2
3
4
5
6
7
fromWkb - mandatory POINT, 2 arg
:memory: #use in-memory database
SELECT AsText(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
1 # rows (not including the header row)
1 # columns
AsText(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
POINT(1 2)


|


|
|
1
2
3
4
5
6
7
fromWkb - mandatory POINT, 2 arg
:memory: #use in-memory database
SELECT Hex(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
1 # rows (not including the header row)
1 # columns
Hex(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326)), 4326))
0001E6100000000000000000F03F0000000000000040000000000000F03F00000000000000407C01000000000000000000F03F0000000000000040FE

Changes to test/sql_stmt_tests/fromWkb5.testcase.

1
2
3
4
5
6
7

fromWkb - mandatory POINT
:memory: #use in-memory database
SELECT AsText(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
1 # rows (not including the header row)
1 # columns
AsText(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
POINT(1 2)



|


|
|
>
1
2
3
4
5
6
7
8
fromWkb - mandatory POINT
:memory: #use in-memory database
SELECT Hex(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
1 # rows (not including the header row)
1 # columns
Hex(PointFromWkb(AsBinary(GeomFromText("Point(1 2)", 4326))))
000100000000000000000000F03F0000000000000040000000000000F03F00000000000000407C01000000000000000000F03F0000000000000040FE

Deleted test/sql_stmt_tests/fromewktexp1.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-1
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(.1 .2 .3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(.1 .2 .3)'))
POINT Z(0.1 0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp2.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-2
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(.1 -.2 +.3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(.1 -.2 +.3)'))
POINT Z(0.1 -0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp3.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-3
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 .2e2 .3E3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 .2e2 .3E3)'))
POINT Z(1 20 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp4.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-4
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 .2e-2 .3E+3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 .2e-2 .3E+3)'))
POINT Z(1 0.002 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp5.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-5
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 +.2e-2 -.3E+3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 +.2e-2 -.3E+3)'))
POINT Z(1 0.002 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp6.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-6
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 +.2e2 -.3E3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(.1e1 +.2e2 -.3E3)'))
POINT Z(1 20 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp7.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-7
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(1.1e1 2.2e2 4.4E3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(1.1e1 2.2e2 4.4E3)'))
POINT Z(11 220 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp8.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-8
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(1.1e1 2.2e-2 4.4E+3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(1.1e1 2.2e-2 4.4E+3)'))
POINT Z(11 0.022 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromewktexp9.testcase.

1
2
3
4
5
6
7
From EWKT - PointZ Exp-9
:memory:
SELECT AsText(GeomFromEWKT('SRID=4326;POINT(1.1e1 +2.2e-2 -4.4E+3)'));
1 # rows
1 # column
AsText(GeomFromEWKT('SRID=4326;POINT(1.1e1 +2.2e-2 -4.4E+3)'))
POINT Z(11 0.022 -4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp1.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-1
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1,.2,.3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1,.2,.3]}'))
POINT Z(0.1 0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp2.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-2
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1,-.2,+.3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1,-.2,+.3]}'))
POINT Z(0.1 -0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp3.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-3
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,.2e2,.3E3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,.2e2,.3E3]}'))
POINT Z(1 20 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp4.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-4
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,.2e-2,.3E+3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,.2e-2,.3E+3]}'))
POINT Z(1 0.002 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp5.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-5
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,+.2e-2,-.3E+3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,+.2e-2,-.3E+3]}'))
POINT Z(1 0.002 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp6.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-6
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,+.2e2,-.3E3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[.1e1,+.2e2,-.3E3]}'))
POINT Z(1 20 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp7.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-7
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1.1e1,2.2e2,4.4E3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1.1e1,2.2e2,4.4E3]}'))
POINT Z(11 220 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp8.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-8
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1.1e1,2.2e-2,4.4E+3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1.1e1,2.2e-2,4.4E+3]}'))
POINT Z(11 0.022 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonexp9.testcase.

1
2
3
4
5
6
7
From GeoJSON - PointZ Exp-9
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1.1e1,+2.2e-2,-4.4E+3]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1.1e1,+2.2e-2,-4.4E+3]}'))
POINT Z(11 0.022 -4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix1.testcase.

1
2
3
4
5
6
7
From GeoJSON - Linestring bbox-coords-crs-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,2,2],"coordinates":[[1,1],[2,2]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"LineString"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,2,2],"coordinates":[[1,1],[2,2]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"LineString"}')):0
SRID=4326;LINESTRING(1 1,2 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix2.testcase.

1
2
3
4
5
6
7
From GeoJSON - Polygon bbox-coords-type-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,2,2],"coordinates":[[[1,1],[1,2],[2,2],[2,1],[1,1]]],"type":"Polygon","crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,2,2],"coordinates":[[[1,1],[1,2],[2,2],[2,1],[1,1]]],"type":"Polygon","crs":{"type":"name","properties":{"name":"EPSG:4326"}}}')):0
SRID=4326;POLYGON((1 1,1 2,2 2,2 1,1 1))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix3.testcase.

1
2
3
4
5
6
7
From GeoJSON - MultiPoint bbox-crs-coords-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,2,2],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[1,2],[2,1]],"type":"MultiPoint"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,2,2],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[1,2],[2,1]],"type":"MultiPoint"}')):0
SRID=4326;MULTIPOINT(1 2,2 1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix4.testcase.

1
2
3
4
5
6
7
From GeoJSON - MultiLineString bbox-crs-type-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,4,4],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"MultiLineString","coordinates":[[[1,2],[2,1]],[[3,4],[4,3]]]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,4,4],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"MultiLineString","coordinates":[[[1,2],[2,1]],[[3,4],[4,3]]]}')):0
SRID=4326;MULTILINESTRING((1 2,2 1),(3 4,4 3))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix5.testcase.

1
2
3
4
5
6
7
From GeoJSON - MultiPolygon bbox-crs-coords-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,21,21],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[[0,0],[10,0],[10,10],[0,10],[0,0]],[[1,1],[5,1],[5,5],[1,5],[1,1]]],[[[20,20],[21,20],[21,21],[20,21],[20,20]]]],"type":"MultiPolygon"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,21,21],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[[[[0,0],[10,0],[10,10],[0,10],[0,0]],[[1,1],[5,1],[5,5],[1,5],[1,1]]],[[[20,20],[21,20],[21,21],[20,21],[20,20]]]],"type":"MultiPolygon"}')):0
SRID=4326;MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(1 1,5 1,5 5,1 5,1 1)),((20 20,21 20,21 21,20 21,20 20)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix6.testcase.

1
2
3
4
5
6
7
From GeoJSON - GeomColl Point-Linestring-Polygon bbox-coords-crs-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,4,4],"geometries":[{"type":"Point","coordinates":[0,0]},{"type":"LineString","coordinates":[[1,1],[2,2]]},{"type":"Polygon","coordinates":[[[3,3],[3,4],[4,4],[4,3],[3,3]]]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"GeometryCollection"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,4,4],"geometries":[{"type":"Point","coordinates":[0,0]},{"type":"LineString","coordinates":[[1,1],[2,2]]},{"type":"Polygon","coordinates":[[[3,3],[3,4],[4,4],[4,3],[3,3]]]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"GeometryCollection"}')):0
SRID=4326;GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 1,2 2),POLYGON((3 3,3 4,4 4,4 3,3 3)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix7.testcase.

1
2
3
4
5
6
7
From GeoJSON - GeomColl Point-Linestring bbox-coords-type-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,2,2],"geometries":[{"type":"Point","coordinates":[0,0]},{"type":"LineString","coordinates":[[1,1],[2,2]]}],"type":"GeometryCollection","crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,2,2],"geometries":[{"type":"Point","coordinates":[0,0]},{"type":"LineString","coordinates":[[1,1],[2,2]]}],"type":"GeometryCollection","crs":{"type":"name","properties":{"name":"EPSG:4326"}}}')):0
SRID=4326;GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 1,2 2))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix8.testcase.

1
2
3
4
5
6
7
From GeoJSON - GeomColl Point-Polygon bbox-crs-coords-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,4,4],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"geometries":[{"type":"Point","coordinates":[0,0]},{"type":"Polygon","coordinates":[[[3,3],[3,4],[4,4],[4,3],[3,3]]]}],"type":"GeometryCollection"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[0,0,4,4],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"geometries":[{"type":"Point","coordinates":[0,0]},{"type":"Polygon","coordinates":[[[3,3],[3,4],[4,4],[4,3],[3,3]]]}],"type":"GeometryCollection"}')):0
SRID=4326;GEOMETRYCOLLECTION(POINT(0 0),POLYGON((3 3,3 4,4 4,4 3,3 3)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonmix9.testcase.

1
2
3
4
5
6
7
From GeoJSON - GeomColl Linestring-Polygon bbox-crs-type-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,4,4],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[1,1],[2,2]]},{"type":"Polygon","coordinates":[[[3,3],[3,4],[4,4],[4,3],[3,3]]]}]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,1,4,4],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"GeometryCollection","geometries":[{"type":"LineString","coordinates":[[1,1],[2,2]]},{"type":"Polygon","coordinates":[[[3,3],[3,4],[4,4],[4,3],[3,3]]]}]}')):0
SRID=4326;GEOMETRYCOLLECTION(LINESTRING(1 1,2 2),POLYGON((3 3,3 4,4 4,4 3,3 3)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt1.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-coords
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1, 2]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1, 2]}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt10.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-coords-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt11.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-type-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"Point","coordinates":[1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"Point","coordinates":[1,2]}')):0
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt12.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-coords-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,2],"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,2],"type":"Point"}')):0
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt13.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-crs-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2],"crs":{"type":"name","properties":{"name":"EPSG:4326"}},"type":"Point"}')):0
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt14.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-type-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2],"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2],"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}}}')):0
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt15.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-crs-bbox-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"coordinates":[1,2,3]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"coordinates":[1,2,3]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt16.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-crs-coords-bbox
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"bbox":[1,2,1,2]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt17.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-coords-bbox-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2,3],"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2,3],"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt18.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-coords-crs-bbox
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt19.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-bbox-coords-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","bbox":[1,2,1,2],"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","bbox":[1,2,1,2],"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt2.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-tyoe
:memory:
SELECT AsText(GeomFromGeoJSON('{"coordinates":[1, 2], "type":"Point"}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"coordinates":[1, 2], "type":"Point"}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt20.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-bbox-crs-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt21.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-type-bbox-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","bbox":[1,2,1,2],"coordinates":[1,2,3]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","bbox":[1,2,1,2],"coordinates":[1,2,3]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt22.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-type-coords-bbox
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","coordinates":[1,2,3],"bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","coordinates":[1,2,3],"bbox":[1,2,1,2]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt23.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-coords-bbox-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"bbox":[1,2,1,2],"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"bbox":[1,2,1,2],"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt24.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-coords-type-bbox
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"type":"Point","bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"type":"Point","bbox":[1,2,1,2]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt25.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-bbox-coords-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"coordinates":[1,2,3],"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"coordinates":[1,2,3],"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt26.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point crs-bbox-type-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"type":"Point","coordinates":[1,2,3]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"type":"Point","coordinates":[1,2,3]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt27.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-crs-type-bbox
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","bbox":[1,2,1,2]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt28.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-crs-bbox-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2],"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt29.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-type-crs-bbox
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"bbox":[1,2,1,2]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt3.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-bbox-coords
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","bbox":[1,2,1,2],"coordinates":[1,2]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","bbox":[1,2,1,2],"coordinates":[1,2]}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt30.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-type-bbox-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"type":"Point","bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"type":"Point","bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt31.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-bbox-type-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"bbox":[1,2,1,2],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"bbox":[1,2,1,2],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt32.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-bbox-crs-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"coordinates":[1,2,3],"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt33.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-coords-crs-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt34.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-coords-type-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt35.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-crs-coords-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"coordinates":[1,2,3],"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt36.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-crs-type-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","coordinates":[1,2,3]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point","coordinates":[1,2,3]}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt37.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-coords-crs-type
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point"}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}},"type":"Point"}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt38.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-coords-type-crs
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2,3],"type":"Point","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:4326"}}}')):0
SRID=4326;POINT(1 2 3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt4.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-coords-bbox
:memory:
SELECT AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2],"bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"type":"Point","coordinates":[1,2],"bbox":[1,2,1,2]}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt5.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-type-coords
:memory:
SELECT AsText(GeomFromGeoJSON('{"bbox":[1,2,1,2],"type":"Point","coordinates":[1,2]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"bbox":[1,2,1,2],"type":"Point","coordinates":[1,2]}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt6.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point bbox-coords-type
:memory:
SELECT AsText(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2],"type":"Point"}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"bbox":[1,2,1,2],"coordinates":[1,2],"type":"Point"}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt7.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-bbox-type
:memory:
SELECT AsText(GeomFromGeoJSON('{"coordinates":[1,2],"bbox":[1,2,1,2],"type":"Point"}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"coordinates":[1,2],"bbox":[1,2,1,2],"type":"Point"}'));
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt8.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point coords-type-bbox
:memory:
SELECT AsText(GeomFromGeoJSON('{"coordinates":[1,2],"type":"Point","bbox":[1,2,1,2]}'));
1 # rows
1 # column
AsText(GeomFromGeoJSON('{"coordinates":[1,2],"type":"Point","bbox":[1,2,1,2]}'))
POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgeojsonpt9.testcase.

1
2
3
4
5
6
7
From GeoJSON - Point type-csr-coords
:memory:
SELECT AsEWKT(GeomFromGeoJSON('{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,2]}'));
1 # rows
1 # column
AsEWKT(GeomFromGeoJSON('{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},"coordinates":[1,2]}')):0
SRID=4326;POINT(1 2)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp1.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-1
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1,.2,.3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1,.2,.3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(0.1 0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp2.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-2
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1,-.2,+.3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1,-.2,+.3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(0.1 -0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp3.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-3
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,.2e2,.3E3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,.2e2,.3E3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(1 20 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp4.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-4
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,.2e-2,.3E+3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,.2e-2,.3E+3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(1 0.002 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp5.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-5
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,+.2e2,-.3E3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,+.2e2,-.3E3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(1 20 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp6.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-6
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,+.2e2,-.3E3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>.1e1,+.2e2,-.3E3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(1 20 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp7.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-7
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1.1e1,2.2e2,4.4E3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1.1e1,2.2e2,4.4E3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(11 220 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp8.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-8
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1.1e1,2.2e-2,4.4E+3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1.1e1,2.2e-2,4.4E+3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(11 0.022 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromgmlexp9.testcase.

1
2
3
4
5
6
7
FromGML - Point Exp-9
:memory: #use in-memory database
SELECT AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1.1e1,+2.2e-2,-4.4E+3</gml:coordinates></gml:Point>'));
1 # rows (not including the header row)
1 # columns
AsEwkt(GeomFromGml('<gml:Point srsName="urn:ogc:def:crs:EPSG:4326"><gml:coordinates>1.1e1,+2.2e-2,-4.4E+3</gml:coordinates></gml:Point>')):0
SRID=4326;POINT(11 0.022 -4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp1.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-1
:memory:
SELECT AsText(GeomFromText('POINTZ(.1 .2 .3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(.1 .2 .3)'))
POINT Z(0.1 0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp2.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-2
:memory:
SELECT AsText(GeomFromText('POINTZ(.1 -.2 +.3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(.1 -.2 +.3)'))
POINT Z(0.1 -0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp3.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-3
:memory:
SELECT AsText(GeomFromText('POINTZ(.1e1 .2e2 .3E3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(.1e1 .2e2 .3E3)'))
POINT Z(1 20 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp4.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-4
:memory:
SELECT AsText(GeomFromText('POINTZ(.1e1 .2e-2 .3E+3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(.1e1 .2e-2 .3E+3)'))
POINT Z(1 0.002 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp5.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-5
:memory:
SELECT AsText(GeomFromText('POINTZ(.1e1 +.2e-2 -.3E+3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(.1e1 +.2e-2 -.3E+3)'))
POINT Z(1 0.002 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp6.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-6
:memory:
SELECT AsText(GeomFromText('POINTZ(.1e1 +.2e2 -.3E3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(.1e1 +.2e2 -.3E3)'))
POINT Z(1 20 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp7.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-7
:memory:
SELECT AsText(GeomFromText('POINTZ(1.1e1 2.2e2 4.4E3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(1.1e1 2.2e2 4.4E3)'))
POINT Z(11 220 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp8.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-8
:memory:
SELECT AsText(GeomFromText('POINTZ(1.1e1 2.2e-2 4.4E+3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(1.1e1 2.2e-2 4.4E+3)'))
POINT Z(11 0.022 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/fromwktexp9.testcase.

1
2
3
4
5
6
7
From Text - PointZ Exp-9
:memory:
SELECT AsText(GeomFromText('POINTZ(1.1e1 +2.2e-2 -4.4E+3)'));
1 # rows
1 # column
AsText(GeomFromText('POINTZ(1.1e1 +2.2e-2 -4.4E+3)'))
POINT Z(11 0.022 -4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicangle1.testcase.

1
2
3
4
5
6
7
geodesic Central Angle - NULL g1
:memory:
SELECT GeodesicCentralAngle(NULL, MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicCentralAngle(NULL, MakePoint(167.836789, -46.969656, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicangle2.testcase.

1
2
3
4
5
6
7
geodesic Central Angle - NULL g2
:memory:
SELECT GeodesicCentralAngle(MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicCentralAngle(MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicangle3.testcase.

1
2
3
4
5
6
7
geodesic Central Angle - valid default
:memory:
SELECT GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326))
0.227494973736389
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicangle4.testcase.

1
2
3
4
5
6
7
geodesic Central Angle - NULL unit of measure
:memory:
SELECT GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicangle5.testcase.

1
2
3
4
5
6
7
geodesic Central Angle - degrees
:memory:
SELECT GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), 0);
1 # rows
1 # column
GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), 0)
13.0345018555346
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicangle6.testcase.

1
2
3
4
5
6
7
geodesic Central Angle - non-geographic SRID
:memory:
SELECT GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 3003), MakePoint(167.836789, -46.969656, 3003));
1 # rows
1 # column
GeodesicCentralAngle(MakePoint(172.677712, -34.426461, 3003), MakePoint(167.836789, -46.969656, 3003))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarcarea1.testcase.

1
2
3
4
5
6
7
geodesic Arc Area - NULL g1
:memory:
SELECT GeodesicArcArea(NULL, MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicArcArea(NULL, MakePoint(167.836789, -46.969656, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarcarea2.testcase.

1
2
3
4
5
6
7
geodesic Arc Area - NULL g2
:memory:
SELECT GeodesicArcArea(MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicArcArea(MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarcarea3.testcase.

1
2
3
4
5
6
7
geodesic Arc Area - valid default
:memory:
SELECT GeodesicArcArea(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicArcArea(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326))
39810530621.6272
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarcheight1.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - NULL g1
:memory:
SELECT GeodesicArcLength(NULL, MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicArcLength(NULL, MakePoint(167.836789, -46.969656, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarcheight2.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - NULL g2
:memory:
SELECT GeodesicArcLength(MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicArcLength(MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarcheight3.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - valid default
:memory:
SELECT GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326))
1450994.10930209
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen1.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - NULL g1
:memory:
SELECT GeodesicArcLength(NULL, MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicArcLength(NULL, MakePoint(167.836789, -46.969656, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen2.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - NULL g2
:memory:
SELECT GeodesicArcLength(MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicArcLength(MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen3.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - valid default
:memory:
SELECT GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326))
1450994.10930209
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen4.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - NULL unit of measure
:memory:
SELECT GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen5.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - degrees
:memory:
SELECT GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), 0);
1 # rows
1 # column
GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), 0)
13.059683636259
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen6.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - different SRIDs
:memory:
SELECT GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 303), 0);
1 # rows
1 # column
GeodesicArcLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 303), 0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicarclen7.testcase.

1
2
3
4
5
6
7
geodesic Arc Length - non-Geographic SRIDs
:memory:
SELECT GeodesicArcLength(MakePoint(172.677712, -34.426461, 3003), MakePoint(167.836789, -46.969656, 3003), 0);
1 # rows
1 # column
GeodesicArcLength(MakePoint(172.677712, -34.426461, 3003), MakePoint(167.836789, -46.969656, 3003), 0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicchordlen1.testcase.

1
2
3
4
5
6
7
geodesic Chord Length - NULL g1
:memory:
SELECT GeodesicChordLength(NULL, MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicChordLength(NULL, MakePoint(167.836789, -46.969656, 4326))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicchordlen2.testcase.

1
2
3
4
5
6
7
geodesic Chord Length - NULL g2
:memory:
SELECT GeodesicChordLength(MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicChordLength(MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicchordlen3.testcase.

1
2
3
4
5
6
7
geodesic Chord Length - valid default
:memory:
SELECT GeodesicChordLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326));
1 # rows
1 # column
GeodesicChordLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326))
1447867.18722221
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicchordlen4.testcase.

1
2
3
4
5
6
7
geodesic Chord Length - NULL unit of measure
:memory:
SELECT GeodesicChordLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), NULL);
1 # rows
1 # column
GeodesicChordLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geodesicchordlen5.testcase.

1
2
3
4
5
6
7
geodesic Chord Length - degrees
:memory:
SELECT GeodesicChordLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), 0);
1 # rows
1 # column
GeodesicChordLength(MakePoint(172.677712, -34.426461, 4326), MakePoint(167.836789, -46.969656, 4326), 0)
13.4449349682307
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp1.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-1
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>.1,.2,.3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>.1,.2,.3</coordinates></Point>")))
POINT Z(0.1 0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp2.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-2
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>.1,-.2,+.3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>.1,-.2,+.3</coordinates></Point>")))
POINT Z(0.1 -0.2 0.3)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp3.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-3
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>.1e1,.2e2,.3E3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>.1e1,.2e2,.3E3</coordinates></Point>")))
POINT Z(1 20 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp4.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-4
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>.1e1,.2e-2,.3E+3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>.1e1,.2e-2,.3E+3</coordinates></Point>")))
POINT Z(1 0.002 300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp5.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-5
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>.1e1,+.2e-2,-.3E+3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>.1e1,+.2e-2,-.3E+3</coordinates></Point>")))
POINT Z(1 0.002 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp6.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-6
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>.1e1,+.2e2,-.3E3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>.1e1,+.2e2,-.3E3</coordinates></Point>")))
POINT Z(1 20 -300)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp7.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-7
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>1.1e1,2.2e2,4.4E3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>1.1e1,2.2e2,4.4E3</coordinates></Point>")))
POINT Z(11 220 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp8.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-8
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>1.1e1,2.2e-2,4.4E+3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>1.1e1,2.2e-2,4.4E+3</coordinates></Point>")))
POINT Z(11 0.022 4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geomfromkmlexp9.testcase.

1
2
3
4
5
6
7
From KML - Point Exp-9
:memory:
SELECT AsText(GeomFromKML("<Point><coordinates>1.1e1,+2.2e-2,-4.4E+3</coordinates></Point>"))
1 # rows
1 # column
AsText(GeomFromKML("<Point><coordinates>1.1e1,+2.2e-2,-4.4E+3</coordinates></Point>")))
POINT Z(11 0.022 -4400)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode1.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - NULL
:memory: #use in-memory database
SELECT GeometryPointEncode(NULL)
1 # rows (not including the header row)
1 # columns
GeometryPointEncode(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode10.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - POINT ZM
:memory: #use in-memory database
SELECT Hex(GeometryPointEncode(x'0081E6100000049A9999999999F13F9A99999999990140333333333333D33FB81E85EB51B89E3FFE'))
1 # rows (not including the header row)
1 # columns
Hex(GeometryPointEncode(x'0081E6100000049A9999999999F13F9A99999999990140333333333333D33FB81E85EB51B89E3FFE'))
0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CB90B00009A9999999999F13F9A99999999990140333333333333D33FB81E85EB51B89E3FFE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode2.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - INTEGER
:memory: #use in-memory database
SELECT GeometryPointEncode(1)
1 # rows (not including the header row)
1 # columns
GeometryPointEncode(1)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode3.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - DOUBLE
:memory: #use in-memory database
SELECT GeometryPointEncode(1.5)
1 # rows (not including the header row)
1 # columns
GeometryPointEncode(1.5)
1.5
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode4.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - TEXT
:memory: #use in-memory database
SELECT GeometryPointEncode('geometry')
1 # rows (not including the header row)
1 # columns
GeometryPointEncode('geometry')
geometry
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode5.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - invalid BLOB
:memory: #use in-memory database
SELECT Hex(GeometryPointEncode(zeroblob(25)))
1 # rows (not including the header row)
1 # columns
Hex(GeometryPointEncode(zeroblob(25)))
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode6.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - LINESTRING
:memory: #use in-memory database
SELECT Hex(GeometryPointEncode(GeomFromText('LINESTRING(1 1, 2 2)')))
1 # rows (not including the header row)
1 # columns
Hex(GeometryPointEncode(GeomFromText('LINESTRING(1 1, 2 2)')))
000100000000000000000000F03F000000000000F03F000000000000004000000000000000407C0200000002000000000000000000F03F000000000000F03F00000000000000400000000000000040FE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode7.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - POINT
:memory: #use in-memory database
SELECT Hex(GeometryPointEncode(x'0081E6100000019A9999999999F13F9A99999999990140FE'))
1 # rows (not including the header row)
1 # columns
Hex(GeometryPointEncode(x'0081E6100000019A9999999999F13F9A99999999990140FE'))
0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407C010000009A9999999999F13F9A99999999990140FE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode8.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - POINT Z
:memory: #use in-memory database
SELECT Hex(GeometryPointEncode(x'0081E6100000029A9999999999F13F9A99999999990140333333333333D33FFE'))
1 # rows (not including the header row)
1 # columns
Hex(GeometryPointEncode(x'0081E6100000029A9999999999F13F9A99999999990140333333333333D33FFE'))
0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CE90300009A9999999999F13F9A99999999990140333333333333D33FFE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/geompointencode9.testcase.

1
2
3
4
5
6
7
GeometryPointEncode() - POINT M
:memory: #use in-memory database
SELECT Hex(GeometryPointEncode(x'0081E6100000039A9999999999F13F9A99999999990140333333333333D33FFE'))
1 # rows (not including the header row)
1 # columns
Hex(GeometryPointEncode(x'0081E6100000039A9999999999F13F9A99999999990140333333333333D33FFE'))
0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CD10700009A9999999999F13F9A99999999990140333333333333D33FFE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/getshapefileextent1.testcase.

1
2
3
4
5
6
7
GetShapefileExtent() - NULL VirtualTable name
:memory: #use in-memory database
SELECT GetShapefileExtent(NULL)
1 # rows (not including the header row)
1 # columns
GetShapefileExtent(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/getshapefileextent2.testcase.

1
2
3
4
5
6
7
GetShapefileExtent() - Int VirtualTable name
:memory: #use in-memory database
SELECT GetShapefileExtent(1)
1 # rows (not including the header row)
1 # columns
GetShapefileExtent(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/getshapefileextent3.testcase.

1
2
3
4
5
6
7
GetShapefileExtent() - Double VirtualTable name
:memory: #use in-memory database
SELECT GetShapefileExtent(1.6)
1 # rows (not including the header row)
1 # columns
GetShapefileExtent(1.6)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/getshapefileextent4.testcase.

1
2
3
4
5
6
7
GetShapefileExtent() - BLOB VirtualTable name
:memory: #use in-memory database
SELECT GetShapefileExtent(zeroblob(10))
1 # rows (not including the header row)
1 # columns
GetShapefileExtent(zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/getshapefileextent5.testcase.

1
2
3
4
5
6
7
GetShapefileExtent() - Text VirtualTable name
:memory: #use in-memory database
SELECT GetShapefileExtent('example');
1 # rows (not including the header row)
1 # columns
GetShapefileExtent('example')
(NULL)
<
<
<
<
<
<
<














Added test/sql_stmt_tests/isXblob5.testcase.























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
isXblob - geom
:memory: #use in-memory database
SELECT Hex(blob), IsPngBlob(blob), IsGifBlob(blob), IsGeometryBlob(blob), IsZipBlob(blob), IsPdfBlob(blob), IsTiffBlob(blob), IsJpegBlob(blob), IsExifBlob(blob), IsExifGpsBlob(blob), IsWebpBlob(blob) FROM (SELECT GeomFromText("POINT(1 3)") as blob) dummy 
1 # rows (not including the header row)
11 # columns
Hex(blob)
IsPngBlob(blob)
IsGifBlob(blob)
IsGeometryBlob(blob)
IsZipBlob(blob)
IsPdfBlob(blob)
IsTiffBlob(blob)
IsJpegBlob(blob)
IsExifBlob(blob)
IsExifGpsBlob(blob)
IsWebpBlob(blob)
000100000000000000000000F03F0000000000000840000000000000F03F00000000000008407C01000000000000000000F03F0000000000000840FE
0
0
1
0
0
0
0
0
0
0

Deleted test/sql_stmt_tests/islowascii1.testcase.

1
2
3
4
5
6
7
IsLowASCII() - NULL string
:memory: #use in-memory database
SELECT IsLowASCII(NULL)
1 # rows (not including the header row)
1 # columns
IsLowASCII(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/islowascii2.testcase.

1
2
3
4
5
6
7
IsLowASCII() - Int string
:memory: #use in-memory database
SELECT IsLowASCII(1)
1 # rows (not including the header row)
1 # columns
IsLowASCII(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/islowascii3.testcase.

1
2
3
4
5
6
7
IsLowASCII() - Double string
:memory: #use in-memory database
SELECT IsLowASCII(1.2)
1 # rows (not including the header row)
1 # columns
IsLowASCII(1.2)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/islowascii4.testcase.

1
2
3
4
5
6
7
IsLowASCII() - BLOB string
:memory: #use in-memory database
SELECT IsLowASCII(zeroblob(10))
1 # rows (not including the header row)
1 # columns
IsLowASCII(zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/islowascii5.testcase.

1
2
3
4
5
6
7
IsLowASCII() - valid string - TRUE
:memory: #use in-memory database
SELECT IsLowASCII('The quick brown Fox jumps over the lazy Dog.')
1 # rows (not including the header row)
1 # columns
IsLowASCII('The quick brown Fox jumps over the lazy Dog.')
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/islowascii6.testcase.

1
2
3
4
5
6
7
IsLowASCII() - valid string - TRUE
:memory: #use in-memory database
SELECT IsLowASCII('Zwölf Boxkämpfer jagen Victor quer über den großen Sylter Deich.')
1 # rows (not including the header row)
1 # columns
IsLowASCII('Zwölf Boxkämpfer jagen Victor quer über den großen Sylter Deich.')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygccw1.testcase.

1
2
3
4
5
6
7
IsPolygonCCW - Invalid Geometry
:memory: #use in-memory database
SELECT ST_IsPolygonCCW(zeroblob(128));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCCW(zeroblob(128))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygccw2.testcase.

1
2
3
4
5
6
7
IsPolygonCCW - True
:memory: #use in-memory database
SELECT ST_IsPolygonCCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON ZM((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))'));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON ZM((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))'));
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygccw3.testcase.

1
2
3
4
5
6
7
IsPolygonCCW - False Exterior Ring
:memory: #use in-memory database
SELECT ST_IsPolygonCCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON ZM((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))'));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON ZM((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))'));
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygccw4.testcase.

1
2
3
4
5
6
7
IsPolygonCCW - False Interior Ring
:memory: #use in-memory database
SELECT ST_IsPolygonCCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON ZM((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))'));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON ZM((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))'));
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygccw5.testcase.

1
2
3
4
5
6
7
IsPolygonCCW - NULL Geometry
:memory: #use in-memory database
SELECT ST_IsPolygonCCW(NULL);
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCCW(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygcw1.testcase.

1
2
3
4
5
6
7
IsPolygonCW - Invalid Geometry
:memory: #use in-memory database
SELECT ST_IsPolygonCW(zeroblob(128));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCW(zeroblob(128))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygcw2.testcase.

1
2
3
4
5
6
7
IsPolygonCW - True
:memory: #use in-memory database
SELECT ST_IsPolygonCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON ZM((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))'));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON ZM((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))'));
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygcw3.testcase.

1
2
3
4
5
6
7
IsPolygonCW - False Exterior Ring
:memory: #use in-memory database
SELECT ST_IsPolygonCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON ZM((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))'));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON ZM((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))'));
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygcw4.testcase.

1
2
3
4
5
6
7
IsPolygonCW - False Interior Ring
:memory: #use in-memory database
SELECT ST_IsPolygonCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON ZM((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))'));
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCW(GeomFromText('GEOMETRYCOLLECTION ZM(POINT ZM(1 2 100 10),LINESTRING ZM(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON ZM((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON ZM((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))'));
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/ispolygcw5.testcase.

1
2
3
4
5
6
7
IsPolygonCW - NULL Geometry
:memory: #use in-memory database
SELECT ST_IsPolygonCW(NULL);
1 # rows (not including the header row)
1 # columns
ST_IsPolygonCW(NULL)
-1
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/ispopulatedcoverage1.testcase.

1
2
3
4
5
6
7
8
IsPopulatedCoverage - standard not existing coverage
NEW:memory: #use in-memory database
SELECT IsPopulatedCoverage(NULL, 'alpha');
1 # rows (not including the header row)
1 # columns
IsPopulatedCoverage(NULL, 'alpha')
0



|


|


1
2
3
4
5
6
7
8
IsPopulatedCoverage - standard not existing coverage
NEW:memory: #use in-memory database
SELECT IsPopulatedCoverage('alpha');
1 # rows (not including the header row)
1 # columns
IsPopulatedCoverage('alpha')
0

Changes to test/sql_stmt_tests/ispopulatedcoverage2.testcase.

1
2
3
4
5
6
7
8
9
IsPopulatedCoverage - NULL coverage-name
NEW:memory: #use in-memory database
SELECT IsPopulatedCoverage('main', NULL);
1 # rows (not including the header row)
1 # columns
IsPopulatedCoverage('main', NULL)
-1




|


|



1
2
3
4
5
6
7
8
9
IsPopulatedCoverage - NULL coverage-name
NEW:memory: #use in-memory database
SELECT IsPopulatedCoverage(NULL);
1 # rows (not including the header row)
1 # columns
IsPopulatedCoverage(NULL)
-1


Deleted test/sql_stmt_tests/ispopulatedcoverage3.testcase.

1
2
3
4
5
6
7
IsPopulatedCoverage - Int DbPrefix
NEW:memory: #use in-memory database
SELECT IsPopulatedCoverage(1, 'alpha');
1 # rows (not including the header row)
1 # columns
IsPopulatedCoverage(1, 'alpha')
-1
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/isvalidrasterstats1.testcase.

1
2
3
4
5
6
7
8
IsValidRasterStatistics - standard
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics('main', 'alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics('main', 'alpha', zeroblob(4))
0

|

|


|


1
2
3
4
5
6
7
8
IsValidRasterStatistics - standard: 2 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics('alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics('alpha', zeroblob(4))
0

Changes to test/sql_stmt_tests/isvalidrasterstats2.testcase.

1
2
3
4
5
6
7

IsValidRasterStatistics - NULL coverage-name
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics('MAIN', NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics('MAIN', NULL, zeroblob(4))
-1

|

|


|

>
1
2
3
4
5
6
7
8
IsValidRasterStatistics - NULL coverage-name: 2 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(NULL, zeroblob(4))
-1

Changes to test/sql_stmt_tests/isvalidrasterstats3.testcase.

1
2
3
4
5
6
7

IsValidRasterStatistics - NULL statistics
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(NULL, 'alpha', NULL);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(NULL, 'alpha', NULL)
-1

|

|


|

>
1
2
3
4
5
6
7
8
IsValidRasterStatistics - NULL statistics: 2 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics('alpha', NULL);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics('alpha', NULL)
-1

Changes to test/sql_stmt_tests/isvalidrasterstats4.testcase.

1
2
3
4
5
6
7

IsValidRasterStatistics - standard
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(zeroblob(4), 'UINT8', 1);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(zeroblob(4), 'UINT8', 1)
0

|






>
1
2
3
4
5
6
7
8
IsValidRasterStatistics - standard: 3 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(zeroblob(4), 'UINT8', 1);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(zeroblob(4), 'UINT8', 1)
0

Changes to test/sql_stmt_tests/isvalidrasterstats5.testcase.

1
2
3
4
5
6
7

IsValidRasterStatistics - NULL statistics
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(NULL, 'UINT8', 1);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(NULL, 'UINT8', 1)
-1

|






>
1
2
3
4
5
6
7
8
IsValidRasterStatistics - NULL statistics: 3 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(NULL, 'UINT8', 1);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(NULL, 'UINT8', 1)
-1

Changes to test/sql_stmt_tests/isvalidrasterstats6.testcase.

1
2
3
4
5
6
7

IsValidRasterStatistics - NULL sample-type
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(zeroblob(4), NULL, 1);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(zeroblob(4), NULL, 1)
-1

|






>
1
2
3
4
5
6
7
8
IsValidRasterStatistics - NULL sample-type: 3 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(zeroblob(4), NULL, 1);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(zeroblob(4), NULL, 1)
-1

Changes to test/sql_stmt_tests/isvalidrasterstats7.testcase.

1
2
3
4
5
6
7

IsValidRasterStatistics - NULL #bands
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(zeroblob(4), 'UINT8', NULL);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(zeroblob(4), 'UINT8', NULL)
-1

|






>
1
2
3
4
5
6
7
8
IsValidRasterStatistics - NULL #bands: 3 args
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(zeroblob(4), 'UINT8', NULL);
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(zeroblob(4), 'UINT8', NULL)
-1

Deleted test/sql_stmt_tests/isvalidrasterstats8.testcase.

1
2
3
4
5
6
7
IsValidRasterStatistics - Int DbPrefix
NEW:memory: #use in-memory database
SELECT IsValidRasterStatistics(1, 'alpha', zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterStatistics(1, 'alpha', zeroblob(4))
-1
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/isvalidrastertile1.testcase.

1
2
3
4
5
6
7
8
IsValidRasterTile - standard
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('main', 'alpha', 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('main', 'alpha', 0, zeroblob(4), zeroblob(4))
0



|


|


1
2
3
4
5
6
7
8
IsValidRasterTile - standard
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('alpha', 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('alpha', 0, zeroblob(4), zeroblob(4))
0

Changes to test/sql_stmt_tests/isvalidrastertile2.testcase.

1
2
3
4
5
6
7
8
IsValidRasterTile - NULL coverage-name
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('MAIN', NULL, 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('MAIN', NULL, 0, zeroblob(4), zeroblob(4))
-1



|


|


1
2
3
4
5
6
7
8
IsValidRasterTile - NULL coverage-name
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(NULL, 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(NULL, 0, zeroblob(4), zeroblob(4))
-1

Changes to test/sql_stmt_tests/isvalidrastertile3.testcase.

1
2
3
4
5
6
7
8
IsValidRasterTile - NULL pyramid-level
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(NULL, 'alpha', NULL, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(NULL, 'alpha', NULL, zeroblob(4), zeroblob(4))
-1



|


|


1
2
3
4
5
6
7
8
IsValidRasterTile - NULL pyramid-level
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('alpha', NULL, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('alpha', NULL, zeroblob(4), zeroblob(4))
-1

Changes to test/sql_stmt_tests/isvalidrastertile4.testcase.

1
2
3
4
5
6
7
8
IsValidRasterTile - NULL odd-tile
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(NULL, 'alpha', 0, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(NULL, 'alpha', 0, NULL, zeroblob(4))
-1



|


|


1
2
3
4
5
6
7
8
IsValidRasterTile - NULL odd-tile
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('alpha', 0, NULL, zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('alpha', 0, NULL, zeroblob(4))
-1

Changes to test/sql_stmt_tests/isvalidrastertile5.testcase.

1
2
3
4
5
6
7
8
IsValidRasterTile - TEXT even-tile
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(NULL, 'alpha', 0, zeroblob(4), 'beta');
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(NULL, 'alpha', 0, zeroblob(4), 'beta')
-1



|


|


1
2
3
4
5
6
7
8
IsValidRasterTile - TEXT even-tile
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('alpha', 0, zeroblob(4), 'beta');
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('alpha', 0, zeroblob(4), 'beta')
-1

Changes to test/sql_stmt_tests/isvalidrastertile6.testcase.

1
2
3
4
5
6
7
8
IsValidRasterTile - standard NULL even-tile
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(NULL, 'alpha', 0, zeroblob(4), NULL);
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(NULL, 'alpha', 0, zeroblob(4), NULL)
0



|


|


1
2
3
4
5
6
7
8
IsValidRasterTile - standard NULL even-tile
NEW:memory: #use in-memory database
SELECT IsValidRasterTile('alpha', 0, zeroblob(4), NULL);
1 # rows (not including the header row)
1 # columns
IsValidRasterTile('alpha', 0, zeroblob(4), NULL)
0

Deleted test/sql_stmt_tests/isvalidrastertile7.testcase.

1
2
3
4
5
6
7
IsValidRasterTile - Int DbPrefix
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(1, 'alpha', 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(1, 'alpha', 0, zeroblob(4), zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidrastertile8.testcase.

1
2
3
4
5
6
7
IsValidRasterTile - Double DbPrefix
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(1.2, 'alpha', 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(1.2, 'alpha', 0, zeroblob(4), zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidrastertile9.testcase.

1
2
3
4
5
6
7
IsValidRasterTile - BLOB DbPrefix
NEW:memory: #use in-memory database
SELECT IsValidRasterTile(zeroblob(4), 'alpha', 0, zeroblob(4), zeroblob(4));
1 # rows (not including the header row)
1 # columns
IsValidRasterTile(zeroblob(4), 'alpha', 0, zeroblob(4), zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory1.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - NULL Geometry
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(NULL)
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory2.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - invalid BLOB Geometry
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(zeroblob(40))
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(zeroblob(40))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory3.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - POINT Geometry
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(MakePointM(10, 10, 10));
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(MakePointM(10, 10, 10))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory4.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - LINESTRING Geometry
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(ST_GeomFromText('LINESTRING(10 10, 20 20)'));
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(ST_GeomFromText('LINESTRING(10 10, 20 20)'))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory5.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - MULTILINESTRING M Geometry
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(ST_GeomFromText('MULTILINESTRINGM((10 10 10, 20 20 20), (50 50 50, 60 60 60))'));
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(ST_GeomFromText('MULTILINESTRINGM((10 10 10, 20 20 20), (50 50 50, 60 60 60))'))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory6.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - LINESTRING M Geometry - true
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(ST_GeomFromText('LINESTRINGM(10 10 10, 20 20 20, 30 30 30, 40 40 40, 50 50 50)'));
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(ST_GeomFromText('LINESTRINGM(10 10 10, 20 20 20, 30 30 30, 40 40 40, 50 50 50)'))
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/isvalidtrajectory7.testcase.

1
2
3
4
5
6
7
ST_IsValidTrajectory - LINESTRING ZM Geometry - false
:memory: #use in-memory database
SELECT ST_IsValidTrajectory(ST_GeomFromText('LINESTRINGZM(10 10 10 10, 20 20 20 20, 30 30 30 30, 40 40 40 10, 50 50 50 50)'));
1 # rows (not including the header row)
1 # columns
ST_IsValidTrajectory(ST_GeomFromText('LINESTRINGZM(10 10 10 10, 20 20 20 20, 30 30 30 30, 40 40 40 10, 50 50 50 50)'))
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygccw1.testcase.

1
2
3
4
5
6
7
forcePolygonCCW - zeroblob
:memory: #use in-memory database
SELECT ST_ForcePolygonCCW(zeroblob(99));
1 # rows (not including the header row)
1 # columns
ST_ForcePolygonCCW(zeroblob(99))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygccw2.testcase.

1
2
3
4
5
6
7
forcePolygonCCW - invalid
:memory: #use in-memory database
SELECT ST_ForcePolygonCCW("alpha");
1 # rows (not including the header row)
1 # columns
ST_ForcePolygonCCW("alpha")
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygccw3.testcase.

1
2
3
4
5
6
7
forcePolygonCCW - GeometryCollection XY
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 4, 5 6, 7 8, 9 9), POLYGON((10 10, 15 10, 13 13, 10 10), (11 10.5, 13 10.5, 13 11.3, 11 10.5)), POLYGON((20 20, 24.1 20, 22 18, 20 20), (21 19.5, 23.1 19.5, 22 18.5, 21 19.5)))")));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 4, 5 6, 7 8, 9 9), POLYGON((10 10, 15 10, 13 13, 10 10), (11 10.5, 13 10.5, 13 11.3, 11 10.5)), POLYGON((20 20, 24.1 20, 22 18, 20 20), (21 19.5, 23.1 19.5, 22 18.5, 21 19.5)))")))
SRID=0;GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6,7 8,9 9),POLYGON((10 10,15 10,13 13,10 10),(11 10.5,13 11.3,13 10.5,11 10.5)),POLYGON((20 20,22 18,24.1 20,20 20),(21 19.5,23.1 19.5,22 18.5,21 19.5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygccw4.testcase.

1
2
3
4
5
6
7
forcePolygonCCW - GeometryCollection XYZ
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTIONZ(POINTZ(1 2 100), LINESTRINGZ(3 4 101, 5 6 102, 7 8 103, 9 9 19), POLYGONZ((10 10 101, 15 10 102, 13 13 103, 10 10 101), (11 10.5 100, 13 10.5 101, 13 11.3 102, 11 10.5 100)), POLYGONZ((20 20 100, 24.1 20 101, 22 18 102, 20 20 100), (21 19.5 101, 23.1 19.5 102, 22 18.5 103, 21 19.5 101)))", 4326)));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTIONZ(POINTZ(1 2 100), LINESTRINGZ(3 4 101, 5 6 102, 7 8 103, 9 9 19), POLYGONZ((10 10 101, 15 10 102, 13 13 103, 10 10 101), (11 10.5 100, 13 10.5 101, 13 11.3 102, 11 10.5 100)), POLYGONZ((20 20 100, 24.1 20 101, 22 18 102, 20 20 100), (21 19.5 101, 23.1 19.5 102, 22 18.5 103, 21 19.5 101)))", 4326)))
SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 100),LINESTRING(3 4 101,5 6 102,7 8 103,9 9 19),POLYGON((10 10 101,15 10 102,13 13 103,10 10 101),(11 10.5 100,13 11.3 102,13 10.5 101,11 10.5 100)),POLYGON((20 20 100,22 18 102,24.1 20 101,20 20 100),(21 19.5 101,23.1 19.5 102,22 18.5 103,21 19.5 101)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygccw5.testcase.

1
2
3
4
5
6
7
forceLHR - GeometryCollection XYM
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTIONM(POINTM(1 2 10), LINESTRINGM(3 4 10, 5 6 11, 7 8 13, 9 9 13), POLYGONM((10 10 11, 15 10 13, 13 13 13, 10 10 11), (11 10.5 10, 13 10.5 11, 13 11.3 13, 11 10.5 10)), POLYGONM((20 20 10, 24.1 20 11, 22 18 13, 20 20 10), (21 19.5 11, 23.1 19.5 13, 22 18.5 13, 21 19.5 11)))", 4326)));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTIONM(POINTM(1 2 10), LINESTRINGM(3 4 10, 5 6 11, 7 8 13, 9 9 13), POLYGONM((10 10 11, 15 10 13, 13 13 13, 10 10 11), (11 10.5 10, 13 10.5 11, 13 11.3 13, 11 10.5 10)), POLYGONM((20 20 10, 24.1 20 11, 22 18 13, 20 20 10), (21 19.5 11, 23.1 19.5 13, 22 18.5 13, 21 19.5 11)))", 4326)))
SRID=4326;GEOMETRYCOLLECTIONM(POINTM(1 2 10),LINESTRINGM(3 4 10,5 6 11,7 8 13,9 9 13),POLYGONM((10 10 11,15 10 13,13 13 13,10 10 11),(11 10.5 10,13 11.3 13,13 10.5 11,11 10.5 10)),POLYGONM((20 20 10,22 18 13,24.1 20 11,20 20 10),(21 19.5 11,23.1 19.5 13,22 18.5 13,21 19.5 11)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygccw6.testcase.

1
2
3
4
5
6
7
forcePolygonCCW - GeometryCollection XYZM
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTIONZM(POINTZM(1 2 100 10), LINESTRINGZM(3 4 101 10, 5 6 102 11, 7 8 103 13, 9 9 19 13), POLYGONZM((10 10 101 11, 15 10 102 13, 13 13 103 13, 10 10 101 11), (11 10.5 100 10, 13 10.5 101 11, 13 11.3 102 13, 11 10.5 100 10)), POLYGONZM((20 20 100 10, 24.1 20 101 11, 22 18 102 13, 20 20 100 10), (21 19.5 101 11, 23.1 19.5 102 13, 22 18.5 103 13, 21 19.5 101 11)))", 4326)));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCCW(GeomFromText("GEOMETRYCOLLECTIONZM(POINTZM(1 2 100 10), LINESTRINGZM(3 4 101 10, 5 6 102 11, 7 8 103 13, 9 9 19 13), POLYGONZM((10 10 101 11, 15 10 102 13, 13 13 103 13, 10 10 101 11), (11 10.5 100 10, 13 10.5 101 11, 13 11.3 102 13, 11 10.5 100 10)), POLYGONZM((20 20 100 10, 24.1 20 101 11, 22 18 102 13, 20 20 100 10), (21 19.5 101 11, 23.1 19.5 102 13, 22 18.5 103 13, 21 19.5 101 11)))", 4326)))
SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 100 10),LINESTRING(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON((10 10 101 11,15 10 102 13,13 13 103 13,10 10 101 11),(11 10.5 100 10,13 11.3 102 13,13 10.5 101 11,11 10.5 100 10)),POLYGON((20 20 100 10,22 18 102 13,24.1 20 101 11,20 20 100 10),(21 19.5 101 11,23.1 19.5 102 13,22 18.5 103 13,21 19.5 101 11)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygcw1.testcase.

1
2
3
4
5
6
7
forcePolygonCW - zeroblob
:memory: #use in-memory database
SELECT ST_ForcePolygonCW(zeroblob(99));
1 # rows (not including the header row)
1 # columns
ST_ForcePolygonCW(zeroblob(99))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygcw2.testcase.

1
2
3
4
5
6
7
forcePolygonCW - invalid
:memory: #use in-memory database
SELECT ST_ForcePolygonCW("alpha");
1 # rows (not including the header row)
1 # columns
ST_ForcePolygonCW("alpha")
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygcw3.testcase.

1
2
3
4
5
6
7
forcePolygonCW - GeometryCollection XY
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 4, 5 6, 7 8, 9 9), POLYGON((10 10, 15 10, 13 13, 10 10), (11 10.5, 13 10.5, 13 11.3, 11 10.5)), POLYGON((20 20, 24.1 20, 22 18, 20 20), (21 19.5, 23.1 19.5, 22 18.5, 21 19.5)))")));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTION(POINT(1 2), LINESTRING(3 4, 5 6, 7 8, 9 9), POLYGON((10 10, 15 10, 13 13, 10 10), (11 10.5, 13 10.5, 13 11.3, 11 10.5)), POLYGON((20 20, 24.1 20, 22 18, 20 20), (21 19.5, 23.1 19.5, 22 18.5, 21 19.5)))")))
SRID=0;GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(3 4,5 6,7 8,9 9),POLYGON((10 10,13 13,15 10,10 10),(11 10.5,13 10.5,13 11.3,11 10.5)),POLYGON((20 20,24.1 20,22 18,20 20),(21 19.5,22 18.5,23.1 19.5,21 19.5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygcw4.testcase.

1
2
3
4
5
6
7
forcePolygonCW - GeometryCollection XYZ
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTIONZ(POINTZ(1 2 100), LINESTRINGZ(3 4 101, 5 6 102, 7 8 103, 9 9 19), POLYGONZ((10 10 101, 15 10 102, 13 13 103, 10 10 101), (11 10.5 100, 13 10.5 101, 13 11.3 102, 11 10.5 100)), POLYGONZ((20 20 100, 24.1 20 101, 22 18 102, 20 20 100), (21 19.5 101, 23.1 19.5 102, 22 18.5 103, 21 19.5 101)))", 4326)));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTIONZ(POINTZ(1 2 100), LINESTRINGZ(3 4 101, 5 6 102, 7 8 103, 9 9 19), POLYGONZ((10 10 101, 15 10 102, 13 13 103, 10 10 101), (11 10.5 100, 13 10.5 101, 13 11.3 102, 11 10.5 100)), POLYGONZ((20 20 100, 24.1 20 101, 22 18 102, 20 20 100), (21 19.5 101, 23.1 19.5 102, 22 18.5 103, 21 19.5 101)))", 4326)))
SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 100),LINESTRING(3 4 101,5 6 102,7 8 103,9 9 19),POLYGON((10 10 101,13 13 103,15 10 102,10 10 101),(11 10.5 100,13 10.5 101,13 11.3 102,11 10.5 100)),POLYGON((20 20 100,24.1 20 101,22 18 102,20 20 100),(21 19.5 101,22 18.5 103,23.1 19.5 102,21 19.5 101)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygcw5.testcase.

1
2
3
4
5
6
7
forceLHR - GeometryCollection XYM
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTIONM(POINTM(1 2 10), LINESTRINGM(3 4 10, 5 6 11, 7 8 13, 9 9 13), POLYGONM((10 10 11, 15 10 13, 13 13 13, 10 10 11), (11 10.5 10, 13 10.5 11, 13 11.3 13, 11 10.5 10)), POLYGONM((20 20 10, 24.1 20 11, 22 18 13, 20 20 10), (21 19.5 11, 23.1 19.5 13, 22 18.5 13, 21 19.5 11)))", 4326)));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTIONM(POINTM(1 2 10), LINESTRINGM(3 4 10, 5 6 11, 7 8 13, 9 9 13), POLYGONM((10 10 11, 15 10 13, 13 13 13, 10 10 11), (11 10.5 10, 13 10.5 11, 13 11.3 13, 11 10.5 10)), POLYGONM((20 20 10, 24.1 20 11, 22 18 13, 20 20 10), (21 19.5 11, 23.1 19.5 13, 22 18.5 13, 21 19.5 11)))", 4326)))
SRID=4326;GEOMETRYCOLLECTIONM(POINTM(1 2 10),LINESTRINGM(3 4 10,5 6 11,7 8 13,9 9 13),POLYGONM((10 10 11,13 13 13,15 10 13,10 10 11),(11 10.5 10,13 10.5 11,13 11.3 13,11 10.5 10)),POLYGONM((20 20 10,24.1 20 11,22 18 13,20 20 10),(21 19.5 11,22 18.5 13,23.1 19.5 13,21 19.5 11)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/polygcw6.testcase.

1
2
3
4
5
6
7
forcePolygonCW - GeometryCollection XYZM
:memory: #use in-memory database
SELECT AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTIONZM(POINTZM(1 2 100 10), LINESTRINGZM(3 4 101 10, 5 6 102 11, 7 8 103 13, 9 9 19 13), POLYGONZM((10 10 101 11, 15 10 102 13, 13 13 103 13, 10 10 101 11), (11 10.5 100 10, 13 10.5 101 11, 13 11.3 102 13, 11 10.5 100 10)), POLYGONZM((20 20 100 10, 24.1 20 101 11, 22 18 102 13, 20 20 100 10), (21 19.5 101 11, 23.1 19.5 102 13, 22 18.5 103 13, 21 19.5 101 11)))", 4326)));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_ForcePolygonCW(GeomFromText("GEOMETRYCOLLECTIONZM(POINTZM(1 2 100 10), LINESTRINGZM(3 4 101 10, 5 6 102 11, 7 8 103 13, 9 9 19 13), POLYGONZM((10 10 101 11, 15 10 102 13, 13 13 103 13, 10 10 101 11), (11 10.5 100 10, 13 10.5 101 11, 13 11.3 102 13, 11 10.5 100 10)), POLYGONZM((20 20 100 10, 24.1 20 101 11, 22 18 102 13, 20 20 100 10), (21 19.5 101 11, 23.1 19.5 102 13, 22 18.5 103 13, 21 19.5 101 11)))", 4326)))
SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 100 10),LINESTRING(3 4 101 10,5 6 102 11,7 8 103 13,9 9 19 13),POLYGON((10 10 101 11,13 13 103 13,15 10 102 13,10 10 101 11),(11 10.5 100 10,13 10.5 101 11,13 11.3 102 13,11 10.5 100 10)),POLYGON((20 20 100 10,24.1 20 101 11,22 18 102 13,20 20 100 10),(21 19.5 101 11,22 18.5 103 13,23.1 19.5 102 13,21 19.5 101 11)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/removedupl3.testcase.

1
2
3
4
5
6
7
RemoveDuplicateRows() - NULL transaction
:memory: #use in-memory database
SELECT RemoveDuplicateRows('table', NULL);
1 # rows (not including the header row)
1 # columns
RemoveDuplicateRows('table', NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/removedupl4.testcase.

1
2
3
4
5
6
7
RemoveDuplicateRows() - not existing table + transaction
:memory: #use in-memory database
SELECT RemoveDuplicateRows('table', 0);
1 # rows (not including the header row)
1 # columns
RemoveDuplicateRows('table', 0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints1.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints NULL Geometry
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(NULL);
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints10.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Repeated Points XY
:memory: #use in-memory database
SELECT AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), POINT(1 1), LINESTRING(10 10, 10 10, 10 10, 40 40, 40 40), POLYGON((50 50, 100 50, 100 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 60, 80 60, 80 80, 60 80, 60 60)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), POINT(1 1), LINESTRING(10 10, 10 10, 10 10, 40 40, 40 40), POLYGON((50 50, 100 50, 100 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 60, 80 60, 80 80, 60 80, 60 60)))', 4326)));
GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints11.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Repeated Points XYZ
:memory: #use in-memory database
SELECT AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(1 1 2), LINESTRINGZ(10 10 1, 10 10 1, 10 10 1, 40 40 3, 40 40 3), POLYGONZ((50 50 1, 100 50 2, 100 50 2, 100 50 2, 100 100 4, 50 100 5, 50 50 1), (60 60 5, 80 60 4, 80 60 4, 80 60 4, 80 80 2, 60 80 1, 60 60 5)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTIONZ(POINTZ(1 1 2), LINESTRINGZ(10 10 1, 10 10 1, 10 10 1, 40 40 3, 40 40 3), POLYGONZ((50 50 1, 100 50 2, 100 50 2, 100 50 2, 100 100 4, 50 100 5, 50 50 1), (60 60 5, 80 60 4, 80 60 4, 80 60 4, 80 80 2, 60 80 1, 60 60 5)))', 4326)));
GEOMETRYCOLLECTION Z(POINT Z(1 1 2), LINESTRING Z(10 10 1, 40 40 3), POLYGON Z((50 50 1, 100 50 2, 100 100 4, 50 100 5, 50 50 1), (60 60 5, 80 60 4, 80 80 2, 60 80 1, 60 60 5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints12.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Repeated Points XYM
:memory: #use in-memory database
SELECT AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(1 1 2), LINESTRINGM(10 10 1, 10 10 1, 10 10 1, 40 40 3, 40 40 3), POLYGONM((50 50 1, 100 50 2, 100 50 3, 100 50 3, 100 100 4, 50 100 5, 50 50 1), (60 60 5, 80 60 4, 80 60 4, 80 60 4, 80 80 2, 60 80 1, 60 60 5)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTIONM(POINTM(1 1 2), LINESTRINGM(10 10 1, 10 10 1, 10 10 1, 40 40 3, 40 40 3), POLYGONM((50 50 1, 100 50 2, 100 50 3, 100 50 3, 100 100 4, 50 100 5, 50 50 1), (60 60 5, 80 60 4, 80 60 4, 80 60 4, 80 80 2, 60 80 1, 60 60 5)))', 4326)));
GEOMETRYCOLLECTION M(POINT M(1 1 2), LINESTRING M(10 10 1, 40 40 3), POLYGON M((50 50 1, 100 50 2, 100 100 4, 50 100 5, 50 50 1), (60 60 5, 80 60 4, 80 80 2, 60 80 1, 60 60 5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints13.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Repeated Points XYZM
:memory: #use in-memory database
SELECT AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(1 1 2 3), LINESTRINGZM(10 10 1 2, 10 10 1 2, 10 10 1 2, 40 40 3 4, 40 40 3 4), POLYGONZM((50 50 1 2, 100 50 2 3, 100 50 3 4, 100 50 3 4, 100 100 4 5, 50 100 5 6, 50 50 1 2), (60 60 5 6, 80 60 4 5, 80 60 4 5, 80 60 4 5, 80 80 2 3, 60 80 1 2, 60 60 5 6)))', 4326), 0));
1 # rows (not including the header row)
1 # columns
AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTIONZM(POINTZM(1 1 2 3), LINESTRINGZM(10 10 1 2, 10 10 1 2, 10 10 1 2, 40 40 3 4, 40 40 3 4), POLYGONZM((50 50 1 2, 100 50 2 3, 100 50 3 4, 100 50 3 4, 100 100 4 5, 50 100 5 6, 50 50 1 2), (60 60 5 6, 80 60 4 5, 80 60 4 5, 80 60 4 5, 80 80 2 3, 60 80 1 2, 60 60 5 6)))', 4326), 0));
GEOMETRYCOLLECTION ZM(POINT ZM(1 1 2 3), LINESTRING ZM(10 10 1 2, 40 40 3 4), POLYGON ZM((50 50 1 2, 100 50 2 3, 100 50 3 4, 100 100 4 5, 50 100 5 6, 50 50 1 2), (60 60 5 6, 80 60 4 5, 80 80 2 3, 60 80 1 2, 60 60 5 6)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints14.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Repeated Points MultiPoint + tolerance
:memory: #use in-memory database
SELECT AsText(RemoveRepeatedPoints(GeomFromText('MULTIPOINT(10 10, 10.01 10.01, 20 20, 10.02 10.02, 20.01 20.01, 10 10, 20 20)', 4326), 0.1));
1 # rows (not including the header row)
1 # columns
AsText(RemoveRepeatedPoints(GeomFromText('MULTIPOINT(10 10, 10.01 10.01, 20 20, 10.02 10.02, 20.01 20.01, 10 10, 20 20)', 4326), 0.1))
MULTIPOINT(10 10, 20 20)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints2.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Int Geometry
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(1);
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints3.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Double Geometry
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(1.5);
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(1.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints4.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Text Geometry
:memory: #use in-memory database
SELECT RemoveRepeatedPoints('geom');
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints('geom')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints5.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Invalid BLOB Geometry
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(zeroblob(100));
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(zeroblob(100))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints6.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints NULL tolerance
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326), NULL);
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints7.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Text tolerance
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326), 'tolerance');
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326), 'tolerance')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints8.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints BLOB tolerance
:memory: #use in-memory database
SELECT RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326), zeroblob(10));
1 # rows (not including the header row)
1 # columns
RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326), zeroblob(10))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/repeatedpoints9.testcase.

1
2
3
4
5
6
7
RemoveRepeatedPoints Valid Geometry
:memory: #use in-memory database
SELECT AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326)));
1 # rows (not including the header row)
1 # columns
AsText(RemoveRepeatedPoints(GeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))', 4326)))
GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(10 10, 40 40), POLYGON((50 50, 100 50, 100 100, 50 100, 50 50), (60 60, 80 60, 80 80, 60 80, 60 60)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/stringlist1.testcase.

1
2
3
4
5
6
7
MakeStringList() - invalid values
:memory: #use in-memory database
SELECT MakeStringList(x) FROM (SELECT NULL AS x UNION SELECT 2.1 AS x UNION SELECT zeroblob(10) AS x); 
1 # rows (not including the header row)
1 # columns
MakeStringList(x) FROM (SELECT NULL AS x UNION SELECT 2.1 AS x UNION SELECT zeroblob(10) AS x)
ILLEGAL_VALUE,ILLEGAL_VALUE,ILLEGAL_VALUE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/stringlist2.testcase.

1
2
3
4
5
6
7
MakeStringList() - int values
:memory: #use in-memory database
SELECT MakeStringList(x) FROM (SELECT 1 AS x UNION SELECT 20 AS x UNION SELECT 300 AS x); 
1 # rows (not including the header row)
1 # columns
MakeStringList(x) FROM (SELECT 1 AS x UNION SELECT 20 AS x UNION SELECT 300 AS x)
1,20,300
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/stringlist3.testcase.

1
2
3
4
5
6
7
MakeStringList() - text values
:memory: #use in-memory database
SELECT MakeStringList(x) FROM (SELECT 'cod1' AS x UNION SELECT 'cod20' AS x UNION SELECT 'cod300' AS x); 
1 # rows (not including the header row)
1 # columns
MakeStringList(x) FROM (SELECT 'cod1' AS x UNION SELECT 'cod20' AS x UNION SELECT 'cod300' AS x)
cod1,cod20,cod300
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/stringlist4.testcase.

1
2
3
4
5
6
7
MakeStringList() - pipe-sign separator
:memory: #use in-memory database
SELECT MakeStringList(x, '|') FROM (SELECT 'cod1' AS x UNION SELECT 'cod20' AS x UNION SELECT 'cod300' AS x); 
1 # rows (not including the header row)
1 # columns
MakeStringList(x, '|') FROM (SELECT 'cod1' AS x UNION SELECT 'cod20' AS x UNION SELECT 'cod300' AS x)
cod1|cod20|cod300
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/stringlist5.testcase.

1
2
3
4
5
6
7
MakeStringList() - NULL separator
:memory: #use in-memory database
SELECT MakeStringList(x, NULL) FROM (SELECT 'cod1' AS x UNION SELECT 'cod20' AS x UNION SELECT 'cod300' AS x); 
1 # rows (not including the header row)
1 # columns
MakeStringList(x, NULL) FROM (SELECT 'cod1' AS x UNION SELECT 'cod20' AS x UNION SELECT 'cod300' AS x)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode1.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - NULL
:memory: #use in-memory database
SELECT TinyPointEncode(NULL)
1 # rows (not including the header row)
1 # columns
TinyPointEncode(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode10.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - POINT ZM
:memory: #use in-memory database
SELECT Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CB90B00009A9999999999F13F9A99999999990140333333333333D33FB81E85EB51B89E3FFE'))
1 # rows (not including the header row)
1 # columns
Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CB90B00009A9999999999F13F9A99999999990140333333333333D33FB81E85EB51B89E3FFE'))
0081E6100000049A9999999999F13F9A99999999990140333333333333D33FB81E85EB51B89E3FFE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode2.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - INTEGER
:memory: #use in-memory database
SELECT TinyPointEncode(1)
1 # rows (not including the header row)
1 # columns
TinyPointEncode(1)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode3.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - DOUBLE
:memory: #use in-memory database
SELECT TinyPointEncode(1.5)
1 # rows (not including the header row)
1 # columns
TinyPointEncode(1.5)
1.5
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode4.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - TEXT
:memory: #use in-memory database
SELECT TinyPointEncode('geometry')
1 # rows (not including the header row)
1 # columns
TinyPointEncode('geometry')
geometry
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode5.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - invalid BLOB
:memory: #use in-memory database
SELECT Hex(TinyPointEncode(zeroblob(54)))
1 # rows (not including the header row)
1 # columns
Hex(TinyPointEncode(zeroblob(54)))
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode6.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - LINESTRING
:memory: #use in-memory database
SELECT Hex(TinyPointEncode(GeomFromText('LINESTRING(1 1, 2 2)')))
1 # rows (not including the header row)
1 # columns
Hex(TinyPointEncode(GeomFromText('LINESTRING(1 1, 2 2)')))
000100000000000000000000F03F000000000000F03F000000000000004000000000000000407C0200000002000000000000000000F03F000000000000F03F00000000000000400000000000000040FE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode7.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - POINT
:memory: #use in-memory database
SELECT Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407C010000009A9999999999F13F9A99999999990140FE'))
1 # rows (not including the header row)
1 # columns
Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407C010000009A9999999999F13F9A99999999990140FE'))
0081E6100000019A9999999999F13F9A99999999990140FE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode8.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - POINT Z
:memory: #use in-memory database
SELECT Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CE90300009A9999999999F13F9A99999999990140333333333333D33FFE'))
1 # rows (not including the header row)
1 # columns
Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CE90300009A9999999999F13F9A99999999990140333333333333D33FFE'))
0081E6100000029A9999999999F13F9A99999999990140333333333333D33FFE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/tinypointencode9.testcase.

1
2
3
4
5
6
7
TinyPointEncode() - POINT M
:memory: #use in-memory database
SELECT Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CD10700009A9999999999F13F9A99999999990140333333333333D33FFE'))
1 # rows (not including the header row)
1 # columns
Hex(TinyPointEncode(x'0001E61000009A9999999999F13F9A999999999901409A9999999999F13F9A999999999901407CD10700009A9999999999F13F9A99999999990140333333333333D33FFE'))
0081E6100000039A9999999999F13F9A99999999990140333333333333D33FFE
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint1.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - NULL Geometry
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(NULL, 5.0));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(NULL, 5.0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint10.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory -- After
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), 11));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), 11))
POINT M(10 10 11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint11.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory-ZM - Before
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), -1));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), -1))
POINT ZM(0 0 0 -1)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint12.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory ZM -- After
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), 11));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), 11))
POINT ZM(10 10 10 11)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint2.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - NULL M-Value
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), NULL));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), NULL))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint3.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Not a valid Trajectory
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 10, 10 10 0)', 4326), 5.0));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 10, 10 10 0)', 4326), 5.0))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint4.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Invalid BLOB
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(zeroblob(50), 5));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(zeroblob(50), 5))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint5.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), 5.0));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), 5.0))
POINT M(5 5 5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint6.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory - Vertex
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), 10));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), 10))
POINT M(10 10 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint7.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory ZM - Vertex
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), 10));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), 10))
POINT ZM(10 10 10 10)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint8.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory ZM
:memory: #use in-memory database
SELECT AsEWKT(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), 5.0));
1 # rows (not including the header row)
1 # columns
AsEWKT(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGZM(0 0 0 0, 10 10 10 10)', 4326), 5.0))
SRID=4326;POINT(5 5 5 5)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/trajectorypoint9.testcase.

1
2
3
4
5
6
7
ST_TrajectoryInterpolatePoint - Valid Trajectory-- Before
:memory: #use in-memory database
SELECT ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), -1));
1 # rows (not including the header row)
1 # columns
ST_AsText(ST_TrajectoryInterpolatePoint(ST_GeomFromText('LINESTRINGM(0 0 0, 10 10 10)', 4326), -1))
POINT M(0 0 -1)
<
<
<
<
<
<
<














Changes to test/sql_stmt_tests/wkbtosql1.testcase.

1
2
3
4
5
6
7
ST_WKBToSQL 
:memory: #use in-memory database
SELECT AsText(ST_WKBToSQL(AsBinary(GeomFromText("Point(1 2)", 4326))))
1 # rows (not including the header row)
1 # columns
AsText(ST_WKBToSQL(AsBinary(GeomFromText("Point(1 2)", 4326))))
POINT(1 2)


|


|
|
1
2
3
4
5
6
7
ST_WKBToSQL 
:memory: #use in-memory database
SELECT Hex(ST_WKBToSQL(AsBinary(GeomFromText("Point(1 2)", 4326))))
1 # rows (not including the header row)
1 # columns
Hex(ST_WKBToSQL(AsBinary(GeomFromText("Point(1 2)", 4326))))
000100000000000000000000F03F0000000000000040000000000000F03F00000000000000407C01000000000000000000F03F0000000000000040FE

Deleted test/sql_stmt_tests/wms_defaultsetting1.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - NULL URL
:memory: #use in-memory database
SELECT WMS_DefaultSetting(NULL, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting(NULL, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting10.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Int value
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 'key', 1);
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 'key', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting11.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Double value
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 'key', 1.1);
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 'key', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting12.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - BLOB value
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 'key', zeroblob(10));
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 'key', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting13.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - valid args
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 'key', 'value')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting14.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', NULL, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', NULL, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting15.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Int layer-name
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 1, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 1, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting16.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Double layer-name
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 1.1, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 1.1, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting17.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', zeroblob(6), 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', zeroblob(6), 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting2.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Int URL
:memory: #use in-memory database
SELECT WMS_DefaultSetting(1, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting(1, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting3.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Double URL
:memory: #use in-memory database
SELECT WMS_DefaultSetting(1.1, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting(1.1, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting4.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - BLOB URL
:memory: #use in-memory database
SELECT WMS_DefaultSetting(zeroblob(10), 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting(zeroblob(10), 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting5.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - NULL key
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', NULL, 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', NULL, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting6.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Int key
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 1, 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 1, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting7.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - Double key
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 1.1, 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 1.1, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting8.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - BLOB key
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', zeroblob(10), 'value');
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', zeroblob(10), 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsetting9.testcase.

1
2
3
4
5
6
7
WMS_DefaultSetting() - NULL value
:memory: #use in-memory database
SELECT WMS_DefaultSetting('some-url', 'layer', 'key', NULL);
1 # rows (not including the header row)
1 # columns
WMS_DefaultSetting('some-url', 'layer', 'key', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs1.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - BLOB URL
:memory: #use in-memory database
SELECT WMS_DefaultRefSys(NULL, 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys(NULL, 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs10.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - Int ref-sys
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 'layer', 1)
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 'layer', 1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs11.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - Double ref-sys
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 'layer', 1.1)
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 'layer', 1.1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs12.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - BLOB ref-sys
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 'layer', zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 'layer', zeroblob(10)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs13.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - valid args
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 'layer', 'EPSG:4326'):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs2.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - Int URL
:memory: #use in-memory database
SELECT WMS_DefaultRefSys(1, 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys(1, 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs3.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - Double URL
:memory: #use in-memory database
SELECT WMS_DefaultRefSys(1.1, 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys(1.1, 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs4.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - BLOB URL
:memory: #use in-memory database
SELECT WMS_DefaultRefSys(zeroblob(4), 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys(zeroblob(4), 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs5.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', NULL, 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', NULL, 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs6.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - Int layer-name
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 1, 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 1, 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs7.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - Double layer-name
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 1.1, 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 1.1, 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs8.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', zeroblob(4), 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', zeroblob(4), 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_defaultsrs9.testcase.

1
2
3
4
5
6
7
WMS_DefaultRefSys() - NULL ref-sys
:memory: #use in-memory database
SELECT WMS_DefaultRefSys('some-url', 'layer', NULL)
1 # rows (not including the header row)
1 # columns
WMS_DefaultRefSys('some-url', 'layer', NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url1.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL base-URL
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl(NULL, 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl(NULL, 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url10.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Int width
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url11.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double width
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1.1, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1.1, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url12.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB width
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', zeroblob(4), 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', zeroblob(4), 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url13.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL height
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, NULL, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, NULL, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url14.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Int height
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url15.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double height
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1.1, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1.1, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url16.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB height
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, zeroblob(5), 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, zeroblob(5), 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url17.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL minx
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, NULL, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, NULL, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url18.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text minx
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 'minx', 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 'minx', 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url19.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB minx
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, zeroblob(4), 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, zeroblob(4), 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url2.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Int base-URL
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl(1, 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl(1, 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url20.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL miny
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, NULL, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, NULL, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url21.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text miny
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 'miny', 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 'miny', 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url22.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB miny
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, zeroblob(5), 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, zeroblob(5), 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url23.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL maxx
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, NULL, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, NULL, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url24.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text maxx
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 'maxy', 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 'maxy', 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url25.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB maxx
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, zeroblob(6), 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, zeroblob(6), 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url26.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL maxy
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, NULL)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url27.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text maxy
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 'maxy')
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 'maxy')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url28.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB maxy
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url29.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Int maxy
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url3.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double base-URL
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl(1.1, 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl(1.1, 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url30.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double maxy
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url31.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL x
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, NULL, 200, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, NULL, 200, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url32.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text x
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 'x', 200, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 'x', 200, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url33.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double x
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 1.1, 200, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 1.1, 200, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url34.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB x
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, zeroblob(10), 200, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, zeroblob(10), 200, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url35.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL y
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, NULL, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, NULL, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url36.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text y
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 'y', 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 'y', 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url37.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double y
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 1.1, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 1.1, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url38.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB y
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, zeroblob(10), 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, zeroblob(10), 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url39.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL feature-count
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, NULL)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url4.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB base-URL
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl(zeroblob(10), 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl(zeroblob(10), 'layer', 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url40.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Text feature-count
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, 'many')
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, 'many')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url41.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double feature-count
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, 1.6)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, 1.6)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url42.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB feature-count
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, zeroblob(8))
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', 1024, 1024, 100, 200, 30.5, 30.5, 60.5, 60.5, zeroblob(8))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url5.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', NULL, 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', NULL, 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url6.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Int layer-name
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 1, 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 1, 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url7.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - Double layer-name
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 1.5, 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 1.5, 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url8.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', zeroblob(4), 1024, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', zeroblob(4), 1024, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getinfo_url9.testcase.

1
2
3
4
5
6
7
WMS_GetFeatureInfoRequestUrl() - NULL width
:memory: #use in-memory database
SELECT WMS_GetFeatureInfoRequestUrl('some_url', 'layer', NULL, 1024, 100, 200, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetFeatureInfoRequestUrl('some_url', 'layer', NULL, 1024, 100, 200, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url1.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL base-URL
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL(NULL, 'layer', 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL(NULL, 'layer', 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url10.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Int width
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url11.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Double width
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1.1, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1.1, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url12.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB width
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', zeroblob(4), 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', zeroblob(4), 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url13.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL height
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, NULL, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, NULL, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url14.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Int height
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url15.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Double height
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1.1, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1.1, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url16.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB height
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, zeroblob(5), 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, zeroblob(5), 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url17.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL minx
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, NULL, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, NULL, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url18.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Text minx
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 'minx', 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 'minx', 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url19.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB minx
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, zeroblob(4), 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, zeroblob(4), 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url2.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Int base-URL
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL(1, 'layer', 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL(1, 'layer', 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url20.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL miny
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, NULL, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, NULL, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url21.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Text miny
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 'miny', 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 'miny', 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url22.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB miny
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, zeroblob(5), 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, zeroblob(5), 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url23.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL maxx
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, NULL, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, NULL, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url24.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Text maxx
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 'maxy', 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 'maxy', 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url25.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB maxx
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, zeroblob(6), 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, zeroblob(6), 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url26.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL maxy
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, NULL)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url27.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Text maxy
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, 'maxy')
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, 'maxy')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url28.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB maxy
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url29.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Int maxy
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url3.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Double base-URL
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL(1.1, 'layer', 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL(1.1, 'layer', 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url30.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Double maxy
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, 60.5)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', 1024, 1024, 30.5, 30.5, 60.5, 60.5)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url4.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB base-URL
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL(zeroblob(10), 'layer', 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL(zeroblob(10), 'layer', 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url5.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', NULL, 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', NULL, 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url6.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Int layer-name
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 1, 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 1, 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url7.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - Double layer-name
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 1.5, 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 1.5, 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url8.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', zeroblob(4), 1024, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', zeroblob(4), 1024, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmap_url9.testcase.

1
2
3
4
5
6
7
WMS_GetMapRequestURL() - NULL width
:memory: #use in-memory database
SELECT WMS_GetMapRequestURL('some_url', 'layer', NULL, 1024, 30, 30, 60, 60)
1 # rows (not including the header row)
1 # columns
WMS_GetMapRequestURL('some_url', 'layer', NULL, 1024, 30, 30, 60, 60)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions1.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL url
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions(NULL, 'layer', 0, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions(NULL, 'layer', 0, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions10.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double flip_axes
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 1.1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions11.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB flip_axes
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions12.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL tiled
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', NULL, 0, 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', NULL, 0, 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions13.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text tiled
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 'no', 0, 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 'no', 0, 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions14.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double tiled
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1.1, 0, 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1.1, 0, 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions15.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB tiled
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', zeroblob(10), 0, 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', zeroblob(10), 0, 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions16.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL cached
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 0, NULL, 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 0, NULL, 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions17.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text cached
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 0, 'no', 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 0, 'no', 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions18.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double cached
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 0, 1.1, 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 0, 1.1, 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions19.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB cached
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 0, zeroblob(5), 256, 256)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 0, zeroblob(5), 256, 256)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions2.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Int url
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions(1, 'layer', 0, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions(1, 'layer', 0, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions20.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - valid args
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions21.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL tile-width
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, NULL, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, NULL, 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions22.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text tile-width
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 'wow', 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 'wow', 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions23.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double tile-width
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 1.1, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 1.1, 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions24.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB tile-width
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, zeroblob(10), 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, zeroblob(10), 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions25.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL tile-height
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions26.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double tile-height
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, 1.1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions27.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text tile-height
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, 'wow')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, 'wow')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions28.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB tile-height
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions29.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - valid args
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0, 512, 512)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions3.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double url
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions(1.1, 'layer', 0, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions(1.1, 'layer', 0, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions30.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Int bgcolor
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions31.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double bgcolor
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1.2)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1.2)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions32.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB bgcolor
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', zeroblob(5))
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', zeroblob(5))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions33.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL bgcolor
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', NULL)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions34.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text bgcolor - valid
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', '00AABB')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', '00AABB')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions35.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text bgcolor - invalid
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 'mom')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 'mom')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions36.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', NULL, 0, 1, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', NULL, 0, 1, 512, 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions37.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Int layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 1, 1, 1, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 1, 1, 1, 512, 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions38.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 1.1, 1, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 1.1, 1, 0, 512, 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions39.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', zeroblob(4), 1, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', zeroblob(4), 1, 0, 512, 512)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions4.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB url
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions(zeroblob(4), 'layer', 0, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions(zeroblob(4), 'layer', 0, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions40.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL is_queryable
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', NULL, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', NULL, 'getfeatureinfo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions41.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text is_queryable
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 'no', 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 'no', 'getfeatureinfo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions42.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double is_queryable
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1.2, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1.2, 'getfeatureinfo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions43.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - BLOB is_queryable
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', zeroblob(6), 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', zeroblob(6), 'getfeatureinfo')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions44.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - is_queryable, NULL getfeatureinfo-url
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 0, NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 0, NULL)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions5.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - NULL transparent
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', NULL, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', NULL, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions6.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Text transparent
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 'yes', 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 'yes', 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions7.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - Double transparent
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1.1, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1.1, 0)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions8.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - valid args
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 0)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_getmapoptions9.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapOptions() - valid args
:memory: #use in-memory database
SELECT WMS_SetGetMapOptions('some_url', 'layer', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapOptions('some_url', 'layer', 1, 'getfeatureinfo')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab1.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - NULL URL
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities(NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab10.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - Int abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 'title', 1);
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab11.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - Double abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 'title', 1.1);
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 'title', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab12.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - BLOB abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 'title', zeroblob(10));
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 'title', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab13.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - valid args
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 'title', 'abstract');
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab2.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - Int URL
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities(1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab3.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - Double URL
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities(1.1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab4.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - BLOB URL
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities(zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities(zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab5.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - NULL title
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', NULL, 'abstract');
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', NULL, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab6.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - Int title
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 1, 'abstract');
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab7.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - Double title
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 1.1, 'abstract');
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 1.1, 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab8.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - BLOB title
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', zeroblob(10), 'abstract');
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', zeroblob(10), 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetcapab9.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetCapabilities() - NULL abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetCapabilities('some-url', 'title', NULL);
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetCapabilities('some-url', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap1.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL GetCapabilities URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap(NULL, 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap(NULL, 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap10.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int version
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1, 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1, 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap11.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double version
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1.3, 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1.3, 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap12.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB version
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', zeroblob(10), 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', zeroblob(10), 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap13.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL ref_sys
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', NULL, 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', NULL, 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap14.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int ref_sys
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 1, 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 1, 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap15.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double ref_sys
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 1.4, 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 1.4, 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap16.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB ref_sys
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', zeroblob(10), 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', zeroblob(10), 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap17.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL image-format
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', NULL, 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', NULL, 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap18.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int image-format
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 1, 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 1, 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap19.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double image-format
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 1.1, 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 1.1, 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap2.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int GetCapabilities URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap(1, 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap(1, 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap20.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB image-format
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', zeroblob(10), 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', zeroblob(10), 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap21.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL style
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', NULL, 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', NULL, 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap22.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int style
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 1, 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 1, 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap23.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double style
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 1.1, 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 1.1, 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap24.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB style
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', zeroblob(10), 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', zeroblob(10), 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap25.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL transparent
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', NULL, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', NULL, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap26.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text transparent
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 'opaque', 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 'opaque', 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap27.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double transparent
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1.1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1.1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap28.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB transparent
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', zeroblob(10), 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', zeroblob(10), 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap29.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tiled
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, NULL, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, NULL, 0, 512, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap3.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double GetCapabilities URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap(1.2, 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap(1.2, 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap30.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text flip_axes
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 'flip')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 'flip'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap31.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double flip_axes
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 1.1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 1.1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap32.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB flip_axes
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, zeroblob(4)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap33.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - valid args
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 1):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap34.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tiled
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, NULL, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, NULL, 0, 512, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap35.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text tiled
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 'tiled', 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 'tiled', 0, 512, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap36.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double tiled
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1.1, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1.1, 0, 512, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap37.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB tiled
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, zeroblob(10), 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, zeroblob(10), 0, 512, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap38.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tile-width
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, NULL, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, NULL, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap39.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text tile-width
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 'wow', 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 'wow', 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap4.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB GetCapabilities URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap(zeroblob(10), 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap(zeroblob(10), 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap40.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double tile-width
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 1.1, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 1.1, 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap41.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB tile-width
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, zeroblob(10), 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, zeroblob(10), 512):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap42.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tile-height
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap43.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text tile-height
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 'wow')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 'wow'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap44.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double tile-height
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 1.2)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 1.2):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap45.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB tile-height
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, zeroblob(10)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap46.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - valid args
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap47.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL title
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', NULL, 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', NULL, 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap48.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int title
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1, 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1, 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap49.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double title
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1.5, 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 1.5, 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap5.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL GetMap URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', NULL, 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', NULL, 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap50.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB title
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', zeroblob(10), 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', zeroblob(10), 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap51.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', NULL, '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', NULL, '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap52.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 1, '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 1, '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap53.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 1.7, '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 1.7, '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap54.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB abstract
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', zeroblob(10), '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', zeroblob(10), '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap55.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - valid args
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap56.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL Version
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', NULL, 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', NULL, 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap57.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL ref_sys
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', NULL, 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', NULL, 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap58.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL image_format
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', NULL, 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', NULL, 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap59.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL style
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', NULL, 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', NULL, 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap6.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int GetMap URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 1, 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 1, 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap60.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL transparent
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', NULL, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', NULL, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap61.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL flip_axes
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, NULL, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, NULL, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap62.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tiled
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, NULL, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, NULL, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap63.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tile_width
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, NULL, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, NULL, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap64.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL tile_height
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, NULL, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, NULL, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap65.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL version
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', NULL, 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', NULL, 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap66.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL ref_sys
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', NULL, 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', NULL, 'image/png', 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap67.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL image_format
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', NULL, 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', NULL, 'default', 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap68.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL style
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', NULL, 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', NULL, 1, 0, 1, 0, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap69.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL cached
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, NULL, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, NULL, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap7.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double GetMap URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 1.2, 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 1.2, 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap70.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text cached
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 'yes', 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 'yes', 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap71.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double cached
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1.1, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1.1, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap72.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB cached
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, zeroblob(5), 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, zeroblob(5), 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap73.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL cached
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, NULL, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, NULL, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap74.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int bgcolor
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 1, 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 1, 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap75.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double bgcolor
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 1.1, 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 1.1, 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap76.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB bgcolor
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, zeroblob(4), 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, zeroblob(4), 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap77.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL bgcolor
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, 'getfeatureinfo'):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap78.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text bgcolor - valid
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 'ffffff', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 'ffffff', 1, 'getfeatureinfo'):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap79.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text bgcolor - invalid
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 'granny', 1, 'getfeatureinfo')
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, 'granny', 1, 'getfeatureinfo'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap8.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB GetMap URL
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', zeroblob(10), 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', zeroblob(10), 'layer', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap80.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL bgcolor and getfeatureinfo-url (valid)
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, NULL):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap81.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Int getfeatureinfo-url
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, 1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, 1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap82.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Double getfeatureinfo-url
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, 1.1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, 1.1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap83.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB getfeatureinfo-url
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, zeroblob(20))
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 1, 512, 512, NULL, 1, zeroblob(20)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap84.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL is_queryable
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, NULL, NULL, NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, NULL, NULL, NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap85.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - Text is_queryable
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, NULL, 'no', NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, NULL, 'no', NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap86.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - BLOB is_queryable
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, NULL, zeroblob(4), NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', 'title', 'abstract', '1.3.0', 'EPSG:3003', 'image/png', 'default', 1, 0, 1, 0, 512, 512, NULL, zeroblob(4), NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registergetmap9.testcase.

1
2
3
4
5
6
7
WMS_RegisterGetMap() - NULL version
:memory: #use in-memory database
SELECT WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', NULL, 'EPSG:3003', 'image/png', 'default', 1, 0)
1 # rows (not including the header row)
1 # columns
WMS_RegisterGetMap('getcapabilities_url', 'getmap_url', 'layer', NULL, 'EPSG:3003', 'image/png', 'default', 1, 0):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting1.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - NULL URL
:memory: #use in-memory database
SELECT WMS_RegisterSetting(NULL, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting(NULL, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting10.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Int value
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 1);
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting11.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Double value
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 1.1);
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting12.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - BLOB value
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', zeroblob(10));
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting13.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - valid args
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 'value')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting14.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - NULL default
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 'value', NULL);
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 'value', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting15.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Double default
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 'value', 1.5);
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 'value', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting16.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - BLOB default
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 'value', zeroblob(10));
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 'value', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting17.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Text default
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 'value', 'default');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 'value', 'default')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting18.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - valid args
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', 'value', 1);
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', 'value', 1)
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting19.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', NULL, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', NULL, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting2.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Int URL
:memory: #use in-memory database
SELECT WMS_RegisterSetting(1, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting(1, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting20.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Int layer-name
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 1, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 1, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting21.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Double layer-name
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 1.1, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 1.1, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting22.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', zeroblob(6), 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', zeroblob(6), 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting3.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Double URL
:memory: #use in-memory database
SELECT WMS_RegisterSetting(1.1, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting(1.1, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting4.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - BLOB URL
:memory: #use in-memory database
SELECT WMS_RegisterSetting(zeroblob(10), 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting(zeroblob(10), 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting5.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - NULL key
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', NULL, 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', NULL, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting6.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Int key
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 1, 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 1, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting7.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - Double key
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 1.1, 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 1.1, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting8.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - BLOB key
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', zeroblob(10), 'value');
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', zeroblob(10), 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersetting9.testcase.

1
2
3
4
5
6
7
WMS_RegisterSetting() - NULL value
:memory: #use in-memory database
SELECT WMS_RegisterSetting('some-url', 'layer', 'key', NULL);
1 # rows (not including the header row)
1 # columns
WMS_RegisterSetting('some-url', 'layer', 'key', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs1.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL URL
:memory: #use in-memory database
SELECT WMS_RegisterRefSys(NULL, 'layer', 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys(NULL, 'layer', 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs10.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Double ref-sys
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 1.1, 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 1.1, 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs11.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB ref-sys
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', zeroblob(4), 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', zeroblob(4), 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs12.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL minx
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', NULL, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', NULL, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs13.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Text minx
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 'minx', 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 'minx', 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs14.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB minx
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', zeroblob(10), 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', zeroblob(10), 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs15.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL miny
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, NULL, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, NULL, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs16.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB miny
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, zeroblob(6), 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, zeroblob(6), 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs17.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Text miny
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 'miny', 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 'miny', 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs18.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL maxx
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, NULL, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, NULL, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs19.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Text maxx
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 'maxx', 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 'maxx', 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs2.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Int URL
:memory: #use in-memory database
SELECT WMS_RegisterRefSys(1, 'layer', 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys(1, 'layer', 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs20.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB maxx
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, zeroblob(5), 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, zeroblob(5), 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs21.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL maxy
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs22.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Text maxy
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, 'maxy')
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, 'maxy'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs23.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Text maxy
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, zeroblob(5))
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, zeroblob(5)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs24.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - valid args (Int coords)
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30, 40, 70, 80):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs25.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - valid args (Double coords)
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, 1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, 1):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs26.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL default
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, NULL)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs27.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Text default
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, 'yes')
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, 'yes'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs28.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Double default
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, 1.1)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, 1.1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs29.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB default
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 'EPSG:4326', 30.1, 40.1, 70.1, 80.1, zeroblob(10)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs3.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Double URL
:memory: #use in-memory database
SELECT WMS_RegisterRefSys(1.1, 'layer', 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys(1.1, 'layer', 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs4.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB URL
:memory: #use in-memory database
SELECT WMS_RegisterRefSys(zeroblob(10), 'layer', 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys(zeroblob(10), 'layer', 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs5.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Int layer-name
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 1, 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 1, 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs6.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Double layer-name
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 1.1, 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 1.1, 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs7.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', zeroblob(5), 'EPSG:4326', 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', zeroblob(5), 'EPSG:4326', 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs8.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - NULL ref-sys
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', NULL, 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', NULL, 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_registersrs9.testcase.

1
2
3
4
5
6
7
WMS_RegisterRefSys() - Int ref-sys
:memory: #use in-memory database
SELECT WMS_RegisterRefSys('some-url', 'layer', 1, 30, 40, 70, 80)
1 # rows (not including the header row)
1 # columns
WMS_RegisterRefSys('some-url', 'layer', 1, 30, 40, 70, 80):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright1.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - NULL url
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright(NULL, 'layer', 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright(NULL, 'layer', 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright10.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Text copyright
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 'somebody')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright11.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Int copyright
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright12.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Double copyright
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 1.5)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 1.5)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright13.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - BLOB copyright
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright14.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - NULL license
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright15.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Int license
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', 1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright16.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Double license
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', 1.4)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', 1.4)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright17.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - BLOB license
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright18.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Text license
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', 'CC0 1.0')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', 'somebody', 'CC0 1.0')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright19.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Text license, NULL copyright
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', NULL, 'CC0 1.0')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', NULL, 'CC0 1.0')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright2.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Int url
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright(1, 'layer', 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright(1, 'layer', 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright3.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Double url
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright(1.2, 'layer', 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright(1.2, 'layer', 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright4.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - BLOB url
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright(zeroblob(4), 'layer', 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright(zeroblob(4), 'layer', 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright5.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - NULL layer
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', NULL, 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', NULL, 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright6.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Int layer
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 1, 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 1, 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright7.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - Double layer
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 1.5, 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 1.5, 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright8.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - BLOB layer
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', zeroblob(10), 'somebody')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', zeroblob(10), 'somebody')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setcopyright9.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapCopyright() - NULL copyright
:memory: #use in-memory database
SELECT WMS_SetGetMapCopyright('anurl', 'layer', NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapCopyright('anurl', 'layer', NULL)
1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo1.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - NULL url
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos(NULL, 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos(NULL, 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo10.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - Int abstract
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 'title', 1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo11.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - Double abstract
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 'title', 1.1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 'title', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo12.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - BLOB abstract
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 'title', zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 'title', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo13.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - valid args
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 'title', 'abstract')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo2.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - Int url
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos(1, 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos(1, 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo3.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - Double url
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos(1.1, 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos(1.1, 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo4.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - BLOB url
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos(zeroblob(10), 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos(zeroblob(10), 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo5.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - NULL title
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', NULL, 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', NULL, 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo6.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - Int title
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 1, 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 1, 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo7.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - Double title
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 1.1, 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 1.1, 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo8.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - BLOB title
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', zeroblob(10), 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', zeroblob(10), 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetcapabinfo9.testcase.

1
2
3
4
5
6
7
WMS_SetGetCapabilitiesInfos() - NULL abstract
:memory: #use in-memory database
SELECT WMS_SetGetCapabilitiesInfos('some-url', 'title', NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetCapabilitiesInfos('some-url', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo1.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - NULL url
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos(NULL, 'layer', 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos(NULL, 'layer', 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo10.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Int abstract
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 'title', 1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 'title', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo11.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Double abstract
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 'title', 1.1)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 'title', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo12.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - BLOB abstract
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 'title', zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 'title', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo13.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - valid args
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 'title', 'abstract')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 'title', 'abstract')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo14.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', NULL, 'title', 'abstract')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', NULL, 'title', 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo15.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Int layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 1, 'title', 'abstract')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 1, 'title', 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo16.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Double layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 1.1, 'title', 'abstract')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 1.1, 'title', 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo17.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', zeroblob(4), 'title', 'abstract')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', zeroblob(4), 'title', 'abstract')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo2.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Int url
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos(1, 'layer', 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos(1, 'layer', 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo3.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Double url
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos(1.1, 'layer', 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos(1.1, 'layer', 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo4.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - BLOB url
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos(zeroblob(10), 'layer', 'title', 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos(zeroblob(10), 'layer', 'title', 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo5.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - NULL title
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', NULL, 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', NULL, 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo6.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Int title
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 1, 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 1, 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo7.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - Double title
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 1.1, 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 1.1, 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo8.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - BLOB title
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', zeroblob(10), 'capabilities')
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', zeroblob(10), 'capabilities')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_setgetmapinfo9.testcase.

1
2
3
4
5
6
7
WMS_SetGetMapInfos() - NULL abstract
:memory: #use in-memory database
SELECT WMS_SetGetMapInfos('some-url', 'layer', 'title', NULL)
1 # rows (not including the header row)
1 # columns
WMS_SetGetMapInfos('some-url', 'layer', 'title', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetcapab1.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetCapabilities() - NULL URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetCapabilities(NULL)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetCapabilities(NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetcapab2.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetCapabilities() - Int URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetCapabilities(1)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetCapabilities(1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetcapab3.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetCapabilities() - Double URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetCapabilities(1.1)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetCapabilities(1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetcapab4.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetCapabilities() - BLOB URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetCapabilities(zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetCapabilities(zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetcapab5.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetCapabilities() - valid args
:memory: #use in-memory database
SELECT WMS_UnRegisterGetCapabilities('some-url')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetCapabilities('some-url')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap1.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - NULL URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap(NULL, 'layer')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap(NULL, 'layer')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap2.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - Int URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap(1, 'layer')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap(1, 'layer')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap3.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - Double URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap(1.1, 'layer')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap(1.1, 'layer')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap4.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - BLOB URL
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap(zeroblob(10), 'layer')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap(zeroblob(10), 'layer')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap5.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - valid args
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap('some-url', 'layer')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap('some-url', 'layer')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap6.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap('some-url', NULL)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap('some-url', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap7.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - Int layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap('some-url', 1)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap('some-url', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap8.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - Double layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap('some-url', 1.1)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap('some-url', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistergetmap9.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterGetMap() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterGetMap('some-url', zeroblob(4))
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterGetMap('some-url', zeroblob(4))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting1.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - NULL URL
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting(NULL, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting(NULL, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting10.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Int value
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 'key', 1);
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 'key', 1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting11.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Double value
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 'key', 1.1);
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 'key', 1.1)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting12.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - BLOB value
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 'key', zeroblob(10));
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 'key', zeroblob(10))
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting13.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - valid args
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 'key', 'value')
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting14.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', NULL, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', NULL, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting15.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Int layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 1, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 1, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting16.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Double layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 1.2, 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 1.2, 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting17.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Double layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', zeroblob(10), 'key', 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', zeroblob(10), 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting2.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Int URL
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting(1, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting(1, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting3.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Double URL
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting(1.1, 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting(1.1, 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting4.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - BLOB URL
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting(zeroblob(10), 'layer', 'key', 'value')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting(zeroblob(10), 'layer', 'key', 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting5.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - NULL key
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', NULL, 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', NULL, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting6.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Int key
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 1, 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 1, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting7.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - Double key
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 1.1, 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 1.1, 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting8.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - BLOB key
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', zeroblob(10), 'value');
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', zeroblob(10), 'value')
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersetting9.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterSetting() - NULL value
:memory: #use in-memory database
SELECT WMS_UnRegisterSetting('some-url', 'layer', 'key', NULL);
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterSetting('some-url', 'layer', 'key', NULL)
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs1.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - BLOB URL
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys(NULL, 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys(NULL, 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs10.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - Int ref-sys
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 'layer', 1)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 'layer', 1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs11.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - Double ref-sys
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 'layer', 1.1)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 'layer', 1.1):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs12.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - BLOB ref-sys
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 'layer', zeroblob(10))
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 'layer', zeroblob(10)):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs13.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - valid args
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 'layer', 'EPSG:4326'):0
0
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs2.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - Int URL
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys(1, 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys(1, 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs3.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - Double URL
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys(1.1, 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys(1.1, 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs4.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - BLOB URL
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys(zeroblob(4), 'layer', 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys(zeroblob(4), 'layer', 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs5.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - NULL layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', NULL, 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', NULL, 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs6.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - Int layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 1, 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 1, 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs7.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - Double layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 1.1, 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 1.1, 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs8.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - BLOB layer-name
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', zeroblob(4), 'EPSG:4326')
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', zeroblob(4), 'EPSG:4326'):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tests/wms_unregistersrs9.testcase.

1
2
3
4
5
6
7
WMS_UnRegisterRefSys() - NULL ref-sys
:memory: #use in-memory database
SELECT WMS_UnRegisterRefSys('some-url', 'layer', NULL)
1 # rows (not including the header row)
1 # columns
WMS_UnRegisterRefSys('some-url', 'layer', NULL):0
-1
<
<
<
<
<
<
<














Deleted test/sql_stmt_tiny_point/Makefile.am.

1
2

EXTRA_DIST = isXblob5.testcase 
<
<




Deleted test/sql_stmt_tiny_point/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_tiny_point
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = isXblob5.testcase 
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_tiny_point/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_tiny_point/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_tiny_point/isXblob5.testcase.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
isXblob - geom - TinyPoint
:memory: #use in-memory database
SELECT Hex(blob), IsPngBlob(blob), IsGifBlob(blob), IsGeometryBlob(blob), IsTinyPointBlob(blob), IsZipBlob(blob), IsPdfBlob(blob), IsTiffBlob(blob), IsJpegBlob(blob), IsExifBlob(blob), IsExifGpsBlob(blob), IsWebpBlob(blob) FROM (SELECT GeomFromText("POINT(1 3)") as blob) dummy 
1 # rows (not including the header row)
12 # columns
Hex(blob)
IsPngBlob(blob)
IsGifBlob(blob)
IsGeometryBlob(blob)
IsTinyPointBlob(blob)
IsZipBlob(blob)
IsPdfBlob(blob)
IsTiffBlob(blob)
IsJpegBlob(blob)
IsExifBlob(blob)
IsExifGpsBlob(blob)
IsWebpBlob(blob)
00810000000001000000000000F03F0000000000000840FE
0
0
0
1
0
0
0
0
0
0
0
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted test/sql_stmt_voronoj1_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

EXTRA_DIST =  voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted test/sql_stmt_voronoj1_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_voronoj1_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_voronoj1_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_voronoj1_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_voronoj1_tests/voronoj1.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj10.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text extra_frame_size (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj11.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL extra_frame_size (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj12.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - BLOB tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj13.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text tolerancey (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj14.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj15.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 0)))
MULTIPOLYGON(((12.5 5.5, 14.5 2.5, 14.5 1.5, 9.5 1.5, 9.5 2.5, 12.5 5.5)), ((14.5 2.5, 12.5 5.5, 12.5 8.5, 16.9 4.1, 14.5 2.5)), ((12.5 8.5, 12.5 5.5, 9.5 2.5, 9.5 9, 12.416667 9, 12.5 8.5)), ((16.9 4.1, 12.5 8.5, 12.416667 9, 20 9, 17.642857 4.285714, 16.9 4.1)), ((14.5 2.5, 16.9 4.1, 17.642857 4.285714, 19.5 1.5, 14.5 1.5, 14.5 2.5)), ((19.5 1.5, 17.642857 4.285714, 20 9, 20.5 9, 20.5 1.5, 19.5 1.5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj16.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=yes)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 1)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 1)))
MULTILINESTRING((12.5 5.5, 14.5 2.5), (12.5 5.5, 12.5 8.5), (12.5 5.5, 9.5 2.5), (12.5 8.5, 16.9 4.1), (12.5 8.5, 12.416667 9), (16.9 4.1, 14.5 2.5), (16.9 4.1, 17.642857 4.285714), (17.642857 4.285714, 19.5 1.5), (17.642857 4.285714, 20 9), (14.5 2.5, 14.5 1.5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj17.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZ(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZ(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)))
MULTIPOLYGON Z(((12.5 5.5 0, 14.5 2.5 0, 14.5 1.5 0, 9.5 1.5 0, 9.5 2.5 0, 12.5 5.5 0)), ((14.5 2.5 0, 12.5 5.5 0, 12.5 8.5 0, 16.9 4.1 0, 14.5 2.5 0)), ((12.5 8.5 0, 12.5 5.5 0, 9.5 2.5 0, 9.5 9 0, 12.416667 9 0, 12.5 8.5 0)), ((16.9 4.1 0, 12.5 8.5 0, 12.416667 9 0, 20 9 0, 17.642857 4.285714 0, 16.9 4.1 0)), ((14.5 2.5 0, 16.9 4.1 0, 17.642857 4.285714 0, 19.5 1.5 0, 14.5 1.5 0, 14.5 2.5 0)), ((19.5 1.5 0, 17.642857 4.285714 0, 20 9 0, 20.5 9 0, 20.5 1.5 0, 19.5 1.5 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj18.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - XYM (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTM(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTM(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)))
MULTIPOLYGON M(((12.5 5.5 0, 14.5 2.5 0, 14.5 1.5 0, 9.5 1.5 0, 9.5 2.5 0, 12.5 5.5 0)), ((14.5 2.5 0, 12.5 5.5 0, 12.5 8.5 0, 16.9 4.1 0, 14.5 2.5 0)), ((12.5 8.5 0, 12.5 5.5 0, 9.5 2.5 0, 9.5 9 0, 12.416667 9 0, 12.5 8.5 0)), ((16.9 4.1 0, 12.5 8.5 0, 12.416667 9 0, 20 9 0, 17.642857 4.285714 0, 16.9 4.1 0)), ((14.5 2.5 0, 16.9 4.1 0, 17.642857 4.285714 0, 19.5 1.5 0, 14.5 1.5 0, 14.5 2.5 0)), ((19.5 1.5 0, 17.642857 4.285714 0, 20 9 0, 20.5 9 0, 20.5 1.5 0, 19.5 1.5 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj19.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - XYZM (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZM(10 5 10 1, 15 5 11 2, 20 4 12 3, 12 3 13 4, 17 2 14 5, 16 6 15 6)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZM(10 5 10 1, 15 5 11 2, 20 4 12 3, 12 3 13 4, 17 2 14 5, 16 6 15 6)'), 0)))
MULTIPOLYGON ZM(((12.5 5.5 0 0, 14.5 2.5 0 0, 14.5 1.5 0 0, 9.5 1.5 0 0, 9.5 2.5 0 0, 12.5 5.5 0 0)), ((14.5 2.5 0 0, 12.5 5.5 0 0, 12.5 8.5 0 0, 16.9 4.1 0 0, 14.5 2.5 0 0)), ((12.5 8.5 0 0, 12.5 5.5 0 0, 9.5 2.5 0 0, 9.5 9 0 0, 12.416667 9 0 0, 12.5 8.5 0 0)), ((16.9 4.1 0 0, 12.5 8.5 0 0, 12.416667 9 0 0, 20 9 0 0, 17.642857 4.285714 0 0, 16.9 4.1 0 0)), ((14.5 2.5 0 0, 16.9 4.1 0 0, 17.642857 4.285714 0 0, 19.5 1.5 0 0, 14.5 1.5 0 0, 14.5 2.5 0 0)), ((19.5 1.5 0 0, 17.642857 4.285714 0 0, 20 9 0 0, 20.5 9 0 0, 20.5 1.5 0 0, 19.5 1.5 0 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj2.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram('alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj20.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(5 10, 2 15, 4 20, 3 12, 2 17, 6 16)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(5 10, 2 15, 4 20, 3 12, 2 17, 6 16)'), 0)))
MULTIPOLYGON(((3.875 16, 4.346154 14.115385, 1.5 13.166667, 1.5 16, 3.875 16)), ((4.346154 14.115385, 3.875 16, 4.285714 17.642857, 6.5 18.75, 6.5 12.833333, 5.928571 12.928571, 4.346154 14.115385)), ((4.285714 17.642857, 3.875 16, 1.5 16, 1.5 19.5, 4.285714 17.642857)), ((6.5 18.75, 4.285714 17.642857, 1.5 19.5, 1.5 20.5, 6.5 20.5, 6.5 18.75)), ((4.346154 14.115385, 5.928571 12.928571, 2.5 9.5, 1.5 9.5, 1.5 13.166667, 4.346154 14.115385)), ((2.5 9.5, 5.928571 12.928571, 6.5 12.833333, 6.5 9.5, 2.5 9.5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj3.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - integer input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(1);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj4.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj5.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj6.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj8.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - double edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0.0);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj1_tests/voronoj9.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - BLOB tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/Makefile.am.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

EXTRA_DIST =  voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted test/sql_stmt_voronoj2_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_voronoj2_tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GEOSCONFIG = @GEOSCONFIG@
GEOS_CFLAGS = @GEOS_CFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = voronoj10.testcase \
	voronoj11.testcase \
	voronoj12.testcase \
	voronoj13.testcase \
	voronoj14.testcase \
	voronoj15.testcase \
	voronoj16.testcase \
	voronoj17.testcase \
	voronoj18.testcase \
	voronoj19.testcase \
	voronoj1.testcase \
	voronoj20.testcase \
	voronoj2.testcase \
	voronoj3.testcase \
	voronoj4.testcase \
	voronoj5.testcase \
	voronoj6.testcase \
	voronoj8.testcase \
	voronoj9.testcase 

all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_voronoj2_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_voronoj2_tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:


distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted test/sql_stmt_voronoj2_tests/voronoj1.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - Invalid BLOB input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj10.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text extra_frame_size (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj11.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL extra_frame_size (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj12.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - BLOB tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj13.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text tolerancey (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj14.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, 0.0, NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj15.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 0)))
MULTIPOLYGON(((9.5 2.5, 9.5 6.5, 12.5 6.5, 12.5 5.5, 9.5 2.5)), ((12.5 6.5, 14.5 6.5, 16.9 4.1, 14.5 2.5, 12.5 5.5, 12.5 6.5)), ((19.5 1.5, 14.3 1.5, 14.5 2.5, 16.9 4.1, 17.642857 4.285714, 19.5 1.5)), ((14.3 1.5, 9.5 1.5, 9.5 2.5, 12.5 5.5, 14.5 2.5, 14.3 1.5)), ((14.5 6.5, 18.75 6.5, 17.642857 4.285714, 16.9 4.1, 14.5 6.5)), ((18.75 6.5, 20.5 6.5, 20.5 1.5, 19.5 1.5, 17.642857 4.285714, 18.75 6.5)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj16.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=yes)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 1)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(10 5, 15 5, 20 4, 12 3, 17 2, 16 6)'), 1)))
MULTILINESTRING((9.5 2.5, 9.5 6.5, 12.5 6.5, 12.5 5.5, 9.5 2.5), (12.5 6.5, 14.5 6.5, 16.9 4.1, 14.5 2.5, 12.5 5.5, 12.5 6.5), (19.5 1.5, 14.3 1.5, 14.5 2.5, 16.9 4.1, 17.642857 4.285714, 19.5 1.5), (14.3 1.5, 9.5 1.5, 9.5 2.5, 12.5 5.5, 14.5 2.5, 14.3 1.5), (14.5 6.5, 18.75 6.5, 17.642857 4.285714, 16.9 4.1, 14.5 6.5), (18.75 6.5, 20.5 6.5, 20.5 1.5, 19.5 1.5, 17.642857 4.285714, 18.75 6.5))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj17.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZ(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZ(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)))
MULTIPOLYGON Z(((9.5 2.5 0, 9.5 6.5 0, 12.5 6.5 0, 12.5 5.5 0, 9.5 2.5 0)), ((12.5 6.5 0, 14.5 6.5 0, 16.9 4.1 0, 14.5 2.5 0, 12.5 5.5 0, 12.5 6.5 0)), ((19.5 1.5 0, 14.3 1.5 0, 14.5 2.5 0, 16.9 4.1 0, 17.642857 4.285714 0, 19.5 1.5 0)), ((14.3 1.5 0, 9.5 1.5 0, 9.5 2.5 0, 12.5 5.5 0, 14.5 2.5 0, 14.3 1.5 0)), ((14.5 6.5 0, 18.75 6.5 0, 17.642857 4.285714 0, 16.9 4.1 0, 14.5 6.5 0)), ((18.75 6.5 0, 20.5 6.5 0, 20.5 1.5 0, 19.5 1.5 0, 17.642857 4.285714 0, 18.75 6.5 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj18.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - XYM (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTM(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTM(10 5 10, 15 5 11, 20 4 12, 12 3 13, 17 2 14, 16 6 15)'), 0)))
MULTIPOLYGON M(((9.5 2.5 0, 9.5 6.5 0, 12.5 6.5 0, 12.5 5.5 0, 9.5 2.5 0)), ((12.5 6.5 0, 14.5 6.5 0, 16.9 4.1 0, 14.5 2.5 0, 12.5 5.5 0, 12.5 6.5 0)), ((19.5 1.5 0, 14.3 1.5 0, 14.5 2.5 0, 16.9 4.1 0, 17.642857 4.285714 0, 19.5 1.5 0)), ((14.3 1.5 0, 9.5 1.5 0, 9.5 2.5 0, 12.5 5.5 0, 14.5 2.5 0, 14.3 1.5 0)), ((14.5 6.5 0, 18.75 6.5 0, 17.642857 4.285714 0, 16.9 4.1 0, 14.5 6.5 0)), ((18.75 6.5 0, 20.5 6.5 0, 20.5 1.5 0, 19.5 1.5 0, 17.642857 4.285714 0, 18.75 6.5 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj19.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - XYZM (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZM(10 5 10 1, 15 5 11 2, 20 4 12 3, 12 3 13 4, 17 2 14 5, 16 6 15 6)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINTZM(10 5 10 1, 15 5 11 2, 20 4 12 3, 12 3 13 4, 17 2 14 5, 16 6 15 6)'), 0)))
MULTIPOLYGON ZM(((9.5 2.5 0 0, 9.5 6.5 0 0, 12.5 6.5 0 0, 12.5 5.5 0 0, 9.5 2.5 0 0)), ((12.5 6.5 0 0, 14.5 6.5 0 0, 16.9 4.1 0 0, 14.5 2.5 0 0, 12.5 5.5 0 0, 12.5 6.5 0 0)), ((19.5 1.5 0 0, 14.3 1.5 0 0, 14.5 2.5 0 0, 16.9 4.1 0 0, 17.642857 4.285714 0 0, 19.5 1.5 0 0)), ((14.3 1.5 0 0, 9.5 1.5 0 0, 9.5 2.5 0 0, 12.5 5.5 0 0, 14.5 2.5 0 0, 14.3 1.5 0 0)), ((14.5 6.5 0 0, 18.75 6.5 0 0, 17.642857 4.285714 0 0, 16.9 4.1 0 0, 14.5 6.5 0 0)), ((18.75 6.5 0 0, 20.5 6.5 0 0, 20.5 1.5 0 0, 19.5 1.5 0 0, 17.642857 4.285714 0 0, 18.75 6.5 0 0)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj2.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram('alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram('alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj20.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - (only_edges=no)
:memory: #use in-memory database
SELECT AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(5 10, 2 15, 4 20, 3 12, 2 17, 6 16)'), 0)));
1 # rows (not including the header row)
1 # columns
AsText(ST_ForceLHR(ST_VoronojDiagram(GeomFromText('MULTIPOINT(5 10, 2 15, 4 20, 3 12, 2 17, 6 16)'), 0)))
MULTIPOLYGON(((6.5 18.75, 6.5 12.833333, 5.928571 12.928571, 4.346154 14.115385, 3.875 16, 4.285714 17.642857, 6.5 18.75)), ((1.5 13.166667, 1.5 16, 3.875 16, 4.346154 14.115385, 1.5 13.166667)), ((1.5 16, 1.5 19.5, 4.285714 17.642857, 3.875 16, 1.5 16)), ((2.5 9.5, 1.5 9.5, 1.5 13.166667, 4.346154 14.115385, 5.928571 12.928571, 2.5 9.5)), ((1.5 19.5, 1.5 20.5, 6.5 20.5, 6.5 18.75, 4.285714 17.642857, 1.5 19.5)), ((6.5 12.833333, 6.5 9.5, 2.5 9.5, 5.928571 12.928571, 6.5 12.833333)))
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj3.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - integer input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(1);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(1)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj4.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL input (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj5.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - NULL edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), NULL);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), NULL)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj6.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - text edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 'alpha');
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 'alpha')
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj8.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - double edges_only (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0.0);
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0.0)
(NULL)
<
<
<
<
<
<
<














Deleted test/sql_stmt_voronoj2_tests/voronoj9.testcase.

1
2
3
4
5
6
7
ST_VoronojDiagram - BLOB tolerance (error)
:memory: #use in-memory database
SELECT ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, zeroblob(4));
1 # rows (not including the header row)
1 # columns
ST_VoronojDiagram(GeomFromText('MULTIPOINT(0 0, 1 1, 2 2, 0 1, 2 1)'), 0, zeroblob(4))
(NULL)
<
<
<
<
<
<
<














Changes to test/sql_stmt_xmlsec_tests/Makefile.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
84
85
86
87
88
89
90

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
294
295
296
297
298
299
300

301
302
303
304
305
306
307
...
468
469
470
471
472
473
474
475
476
477
478
479
480
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_xmlsec_tests

ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_xmlsec_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_xmlsec_tests/Makefile

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

.PRECIOUS: Makefile


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|


|












|
<
<
<
<
<
<
<
<
<
<







 







>







<







 







<







 







>







 







<
<




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17










18
19
20
21
22
23
24
..
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
...
106
107
108
109
110
111
112

113
114
115
116
117
118
119
...
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
...
458
459
460
461
462
463
464


465
466
467
468
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'










am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
................................................................................
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = test/sql_stmt_xmlsec_tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)

mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
................................................................................
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)

DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
................................................................................
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/sql_stmt_xmlsec_tests/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign test/sql_stmt_xmlsec_tests/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
................................................................................
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am




# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Deleted test/sqlproc_error.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--
-- creating a table
--
CREATE TABLE another_test (
    id INTEGER PRIMARY KEY,
    name TEXT NOT NULL,
    value DOUBLE NOT NULL);
    
--
-- populating the table
--
INSERT INTO another_test (id, name, value) VALUES (NULL, 'alpha', 1.5);
INSERT INTO another_test (id, name, value) VALUES (NULL, 'beta', 2.5);
INSERT INTO another_test (id, name, value) VALUES (NULL, 'gamma', 3.5);
INSERT INTO another_test (id, name, value) VALUES (NULL, 'delta', 4.5);
INSERT INTO another_test (id, name, value) VALUES (NULL, 'epsilon', 5.5);

--
-- first check
--
SELECT * FROM another_test;

--
-- testing update
--
UPDATE another_test SET name = 'DELTA' WHERE vallue = 4.5;

--
-- testing delete
--
DELETE FROM another_test WHERE name = 'beta';

--
-- second check
--
SELECT * FROM another_test;

--
-- last check
--
SELECT * FROM another_test WHERE name = 'none';
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































Deleted test/sqlproc_logfile.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--
-- creating a table
--
CREATE TABLE my_test (
    id INTEGER PRIMARY KEY,
    name TEXT NOT NULL,
    value DOUBLE NOT NULL);
    
--
-- populating the table
--
INSERT INTO my_test (id, name, value) VALUES (NULL, 'alpha', 1.5);
INSERT INTO my_test (id, name, value) VALUES (NULL, 'beta', 2.5);
INSERT INTO my_test (id, name, value) VALUES (NULL, 'gamma', 3.5);
INSERT INTO my_test (id, name, value) VALUES (NULL, 'delta', 4.5);
INSERT INTO my_test (id, name, value) VALUES (NULL, 'epsilon', 5.5);

--
-- first check
--
SELECT * FROM my_test;

--
-- testing update
--
UPDATE my_test SET name = 'DELTA' WHERE value = 4.5;

--
-- testing delete
--
DELETE FROM my_test WHERE name = 'beta';

--
-- second check
--
SELECT * FROM my_test;

--
-- last check
--
SELECT * FROM my_test WHERE name = 'none';
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































Deleted test/sqlproc_sample.txt.

1
SELECT @col1@, @col2@ FROM @table@
<


Changes to test/test-legacy-3.0.1.sqlite.

cannot compute difference between binary files

Changes to test/test_helpers.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
..
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#if __GNUC__
#define UNUSED __attribute__ ((__unused__))
#else
#define UNUSED
#endif

#include <ctype.h>

#ifdef __WIN32
/*
 * Windows replacement for strcastr
 *
 * original code from:
 * https://code.google.com/p/msysgit/source/browse/compat/strcasestr.c?repo=4msysgit&name=mingw-v1.5.2.4-devel
 */
................................................................................
	next:
	  ;
      }
    return NULL;
}
#endif

#if defined(__WIN32) && !defined(__MINGW32__)
/* 
 * public domain strtok_r() by Charlie Gordon
 *
 *   from comp.lang.c  9/14/2007
 *
 *      http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684
 *






<
<







 







|







1
2
3
4
5
6


7
8
9
10
11
12
13
..
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#if __GNUC__
#define UNUSED __attribute__ ((__unused__))
#else
#define UNUSED
#endif



#ifdef __WIN32
/*
 * Windows replacement for strcastr
 *
 * original code from:
 * https://code.google.com/p/msysgit/source/browse/compat/strcasestr.c?repo=4msysgit&name=mingw-v1.5.2.4-devel
 */
................................................................................
	next:
	  ;
      }
    return NULL;
}
#endif

#ifdef __WIN32
/* 
 * public domain strtok_r() by Charlie Gordon
 *
 *   from comp.lang.c  9/14/2007
 *
 *      http://groups.google.com/group/comp.lang.c/msg/2ab1ecbb86646684
 *